Re: [PATCH 1/3] Add Numachip APIC support

From: Ingo Molnar
Date: Thu Oct 27 2011 - 03:28:38 EST



* Daniel J Blueman <daniel@xxxxxxxxxxxxxxxxxx> wrote:

> diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
> index 9f548cb..f4b93de 100644
> --- a/arch/x86/kernel/smpboot.c
> +++ b/arch/x86/kernel/smpboot.c
> @@ -66,6 +66,7 @@
> #include <asm/apic.h>
> #include <asm/io_apic.h>
> #include <asm/setup.h>
> +#include <asm/numachip/numachip.h>
> #include <asm/uv/uv.h>
> #include <linux/mc146818rtc.h>
>
> @@ -513,7 +514,7 @@ wakeup_secondary_cpu_via_nmi(int logical_apicid, unsigned long start_eip)
> return (send_status | accept_status);
> }
>
> -static int __cpuinit
> +int __cpuinit
> wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip)
> {
> unsigned long send_status, accept_status = 0;
> @@ -1094,6 +1095,9 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus)
> print_cpu_info(&cpu_data(0));
> x86_init.timers.setup_percpu_clockev();
>
> + if (is_numachip_system())
> + numachip_system_init();
> +
> if (is_uv_system())
> uv_system_init();

This is pretty ugly in its present form - please don't repeat the
is_uv_system() mistakes but check how the MRST platform uses the
x86_init methods to install its callbacks in setup code.

If you need a callback a new place then please extend x86_init
accordingly.

Thanks,

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/