diff options
author | Tony Luck <tony.luck@intel.com> | 2005-03-31 00:26:23 -0800 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2005-03-31 00:26:23 -0800 |
commit | 1a89e511e152998311f49c60e55b21d48d1b8973 (patch) | |
tree | 70d3edfee37f7c6094020235149f77cb001d45d6 | |
parent | 5227ffd37189ab2c6d442ab5b43c7a0636622e01 (diff) | |
parent | 3d5e39cfe35cfd43174c3e74849ac17ddd34a38c (diff) | |
download | history-1a89e511e152998311f49c60e55b21d48d1b8973.tar.gz |
Merge intel.com:/data/home/aegl/BK/work/0
into intel.com:/data/home/aegl/BK/linux-ia64-release-2.6.12
-rw-r--r-- | arch/ia64/kernel/iosapic.c | 9 | ||||
-rw-r--r-- | include/asm-ia64/smp.h | 45 |
2 files changed, 28 insertions, 26 deletions
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c index 111dad9175ba10..c15be5c38f5605 100644 --- a/arch/ia64/kernel/iosapic.c +++ b/arch/ia64/kernel/iosapic.c @@ -91,7 +91,6 @@ #undef DEBUG_INTERRUPT_ROUTING -#undef OVERRIDE_DEBUG #ifdef DEBUG_INTERRUPT_ROUTING #define DBG(fmt...) printk(fmt) @@ -499,14 +498,14 @@ get_target_cpu (unsigned int gsi, int vector) * distribute interrupts. */ if (smp_int_redirect & SMP_IRQ_REDIRECTION) - return hard_smp_processor_id(); + return cpu_physical_id(smp_processor_id()); /* * Some interrupts (ACPI SCI, for instance) are registered * before the BSP is marked as online. */ if (!cpu_online(smp_processor_id())) - return hard_smp_processor_id(); + return cpu_physical_id(smp_processor_id()); #ifdef CONFIG_NUMA { @@ -553,7 +552,7 @@ skip_numa_setup: return cpu_physical_id(cpu); #else - return hard_smp_processor_id(); + return cpu_physical_id(smp_processor_id()); #endif } @@ -740,7 +739,7 @@ iosapic_override_isa_irq (unsigned int isa_irq, unsigned int gsi, unsigned long trigger) { int vector; - unsigned int dest = hard_smp_processor_id(); + unsigned int dest = cpu_physical_id(smp_processor_id()); vector = isa_irq_to_vector(isa_irq); diff --git a/include/asm-ia64/smp.h b/include/asm-ia64/smp.h index d6838c9b7bb4ee..c4a227acfeb0a4 100644 --- a/include/asm-ia64/smp.h +++ b/include/asm-ia64/smp.h @@ -3,16 +3,14 @@ * * Copyright (C) 1999 VA Linux Systems * Copyright (C) 1999 Walt Drummond <drummond@valinux.com> - * Copyright (C) 2001-2003 Hewlett-Packard Co + * (c) Copyright 2001-2003, 2005 Hewlett-Packard Development Company, L.P. * David Mosberger-Tang <davidm@hpl.hp.com> + * Bjorn Helgaas <bjorn.helgaas@hp.com> */ #ifndef _ASM_IA64_SMP_H #define _ASM_IA64_SMP_H #include <linux/config.h> - -#ifdef CONFIG_SMP - #include <linux/init.h> #include <linux/threads.h> #include <linux/kernel.h> @@ -24,6 +22,25 @@ #include <asm/processor.h> #include <asm/ptrace.h> +static inline unsigned int +ia64_get_lid (void) +{ + union { + struct { + unsigned long reserved : 16; + unsigned long eid : 8; + unsigned long id : 8; + unsigned long ignored : 32; + } f; + unsigned long bits; + } lid; + + lid.bits = ia64_getreg(_IA64_REG_CR_LID); + return lid.f.id << 8 | lid.f.eid; +} + +#ifdef CONFIG_SMP + #define XTP_OFFSET 0x1e0008 #define SMP_IRQ_REDIRECTION (1 << 0) @@ -90,22 +107,7 @@ max_xtp (void) writeb(0x0f, ipi_base_addr + XTP_OFFSET); /* Set XTP to max */ } -static inline unsigned int -hard_smp_processor_id (void) -{ - union { - struct { - unsigned long reserved : 16; - unsigned long eid : 8; - unsigned long id : 8; - unsigned long ignored : 32; - } f; - unsigned long bits; - } lid; - - lid.bits = ia64_getreg(_IA64_REG_CR_LID); - return lid.f.id << 8 | lid.f.eid; -} +#define hard_smp_processor_id() ia64_get_lid() /* Upping and downing of CPUs */ extern int __cpu_disable (void); @@ -125,7 +127,8 @@ extern void unlock_ipi_calllock(void); #else -#define cpu_logical_id(cpuid) 0 +#define cpu_logical_id(i) 0 +#define cpu_physical_id(i) ia64_get_lid() #endif /* CONFIG_SMP */ #endif /* _ASM_IA64_SMP_H */ |