diff options
author | David S. Miller <davem@davemloft.net> | 2008-08-03 22:52:41 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-08-04 13:51:37 -0700 |
commit | 5e0797e5b84408a13260a107e2f7a49ee6342ae4 (patch) | |
tree | 7f44ab72a2c79a44d0efee14ddb7b2a985c1e77d /arch/sparc64 | |
parent | abd9e6982815ad7bd2c70dbf4cc0c08b48229d6e (diff) | |
download | kernel_samsung_smdk4412-5e0797e5b84408a13260a107e2f7a49ee6342ae4.zip kernel_samsung_smdk4412-5e0797e5b84408a13260a107e2f7a49ee6342ae4.tar.gz kernel_samsung_smdk4412-5e0797e5b84408a13260a107e2f7a49ee6342ae4.tar.bz2 |
sparc64: Use function pointer for cross-call sending.
Initialize it using the smp_setup_processor_id() hook.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64')
-rw-r--r-- | arch/sparc64/kernel/smp.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c index 340842e..3c6970a 100644 --- a/arch/sparc64/kernel/smp.c +++ b/arch/sparc64/kernel/smp.c @@ -756,6 +756,8 @@ dump_cpu_list_and_out: printk("]\n"); } +static void (*xcall_deliver)(u64, u64, u64, cpumask_t); + /* Send cross call to all processors mentioned in MASK * except self. */ @@ -767,12 +769,7 @@ static void smp_cross_call_masked(unsigned long *func, u32 ctx, u64 data1, u64 d cpus_and(mask, mask, cpu_online_map); cpu_clear(this_cpu, mask); - if (tlb_type == spitfire) - spitfire_xcall_deliver(data0, data1, data2, mask); - else if (tlb_type == cheetah || tlb_type == cheetah_plus) - cheetah_xcall_deliver(data0, data1, data2, mask); - else - hypervisor_xcall_deliver(data0, data1, data2, mask); + xcall_deliver(data0, data1, data2, mask); /* NOTE: Caller runs local copy on master. */ put_cpu(); @@ -1202,6 +1199,16 @@ void __devinit smp_prepare_boot_cpu(void) { } +void __init smp_setup_processor_id(void) +{ + if (tlb_type == spitfire) + xcall_deliver = spitfire_xcall_deliver; + else if (tlb_type == cheetah || tlb_type == cheetah_plus) + xcall_deliver = cheetah_xcall_deliver; + else + xcall_deliver = hypervisor_xcall_deliver; +} + void __devinit smp_fill_in_sib_core_maps(void) { unsigned int i; |