* Step 3 "target_cpus" of cleaning up io_apic.c modifies the TARGET_CPUS
interface to pass a pointer to the returned mask for arch X86_64,
removing yet another "cpumask_t variable on the stack".
target_cpus = TARGET_CPUS;
becomes:
TARGET_CPUS(target_cpus);
For x86_32 this is expanded to:
target_cpus = (genapic->target_cpus());
For x86_64 this is expanded to:
target_cpus = (genapic->target_cpus)(&(target_cpus));
* All the appropriate genapic "target_cpus" functions are modified
to use this new interface.
* Note that arch-i386-gcc had trouble with the name of the variables
being "target_cpus" (conflicted with the macro TARGET_CPUS expanding
to (target_cpus()), so they are now "tgt_cpus".
Applies to linux-2.6.tip/master.
Signed-off-by: Mike Travis <travis@sgi.com>
---
arch/x86/kernel/genapic_flat_64.c | 8 ++++----
arch/x86/kernel/genx2apic_cluster.c | 4 ++--
arch/x86/kernel/genx2apic_phys.c | 4 ++--
arch/x86/kernel/genx2apic_uv_x.c | 4 ++--
arch/x86/kernel/io_apic.c | 16 ++++++++--------
include/asm-x86/genapic_64.h | 2 +-
include/asm-x86/mach-default/mach_apic.h | 28 +++++++++++++++++-----------
include/asm-x86/mach-generic/mach_apic.h | 6 +++++-
8 files changed, 41 insertions(+), 31 deletions(-)
--- linux-2.6.tip.orig/arch/x86/kernel/genapic_flat_64.c
+++ linux-2.6.tip/arch/x86/kernel/genapic_flat_64.c
@@ -31,9 +31,9 @@ static int __init flat_acpi_madt_oem_che
return 1;
}
-static cpumask_t flat_target_cpus(void)
+static void flat_target_cpus(cpumask_t *retmask)
{
- return cpu_online_map;
+ *retmask = cpu_online_map;
}
static cpumask_t flat_vector_allocation_domain(int cpu)
@@ -194,9 +194,9 @@ static int __init physflat_acpi_madt_oem
return 0;
}
-static cpumask_t physflat_target_cpus(void)
+static void physflat_target_cpus(cpumask_t *retmask)
{
- return cpu_online_map;
+ *retmask = ...