diff options
Diffstat (limited to 'arch/sparc/kernel/leon_smp.c')
-rw-r--r-- | arch/sparc/kernel/leon_smp.c | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/arch/sparc/kernel/leon_smp.c b/arch/sparc/kernel/leon_smp.c index f3e3630e31a3..faff792d53c8 100644 --- a/arch/sparc/kernel/leon_smp.c +++ b/arch/sparc/kernel/leon_smp.c | |||
@@ -73,7 +73,7 @@ static inline unsigned long do_swap(volatile unsigned long *ptr, | |||
73 | 73 | ||
74 | void __cpuinit leon_callin(void) | 74 | void __cpuinit leon_callin(void) |
75 | { | 75 | { |
76 | int cpuid = hard_smpleon_processor_id(); | 76 | int cpuid = hard_smp_processor_id(); |
77 | 77 | ||
78 | local_ops->cache_all(); | 78 | local_ops->cache_all(); |
79 | local_ops->tlb_all(); | 79 | local_ops->tlb_all(); |
@@ -491,39 +491,12 @@ void leon_cross_call_irq(void) | |||
491 | ccall_info.processors_out[i] = 1; | 491 | ccall_info.processors_out[i] = 1; |
492 | } | 492 | } |
493 | 493 | ||
494 | void __init leon_blackbox_id(unsigned *addr) | ||
495 | { | ||
496 | int rd = *addr & 0x3e000000; | ||
497 | int rs1 = rd >> 11; | ||
498 | |||
499 | /* patch places where ___b_hard_smp_processor_id appears */ | ||
500 | addr[0] = 0x81444000 | rd; /* rd %asr17, reg */ | ||
501 | addr[1] = 0x8130201c | rd | rs1; /* srl reg, 0x1c, reg */ | ||
502 | addr[2] = 0x01000000; /* nop */ | ||
503 | } | ||
504 | |||
505 | void __init leon_blackbox_current(unsigned *addr) | ||
506 | { | ||
507 | int rd = *addr & 0x3e000000; | ||
508 | int rs1 = rd >> 11; | ||
509 | |||
510 | /* patch LOAD_CURRENT macro where ___b_load_current appears */ | ||
511 | addr[0] = 0x81444000 | rd; /* rd %asr17, reg */ | ||
512 | addr[2] = 0x8130201c | rd | rs1; /* srl reg, 0x1c, reg */ | ||
513 | addr[4] = 0x81282002 | rd | rs1; /* sll reg, 0x2, reg */ | ||
514 | |||
515 | } | ||
516 | |||
517 | void __init leon_init_smp(void) | 494 | void __init leon_init_smp(void) |
518 | { | 495 | { |
519 | /* Patch ipi15 trap table */ | 496 | /* Patch ipi15 trap table */ |
520 | t_nmi[1] = t_nmi[1] + (linux_trap_ipi15_leon - linux_trap_ipi15_sun4m); | 497 | t_nmi[1] = t_nmi[1] + (linux_trap_ipi15_leon - linux_trap_ipi15_sun4m); |
521 | 498 | ||
522 | BTFIXUPSET_BLACKBOX(hard_smp_processor_id, leon_blackbox_id); | ||
523 | BTFIXUPSET_BLACKBOX(load_current, leon_blackbox_current); | ||
524 | BTFIXUPSET_CALL(smp_cross_call, leon_cross_call, BTFIXUPCALL_NORM); | 499 | BTFIXUPSET_CALL(smp_cross_call, leon_cross_call, BTFIXUPCALL_NORM); |
525 | BTFIXUPSET_CALL(__hard_smp_processor_id, __leon_processor_id, | ||
526 | BTFIXUPCALL_NORM); | ||
527 | BTFIXUPSET_CALL(smp_ipi_resched, leon_ipi_resched, BTFIXUPCALL_NORM); | 500 | BTFIXUPSET_CALL(smp_ipi_resched, leon_ipi_resched, BTFIXUPCALL_NORM); |
528 | BTFIXUPSET_CALL(smp_ipi_single, leon_ipi_single, BTFIXUPCALL_NORM); | 501 | BTFIXUPSET_CALL(smp_ipi_single, leon_ipi_single, BTFIXUPCALL_NORM); |
529 | BTFIXUPSET_CALL(smp_ipi_mask_one, leon_ipi_mask_one, BTFIXUPCALL_NORM); | 502 | BTFIXUPSET_CALL(smp_ipi_mask_one, leon_ipi_mask_one, BTFIXUPCALL_NORM); |