@@ -105,21 +105,9 @@
#ifdef CONFIG_SMP
#define LOAD_CURRENT(dest_reg, idreg) \
-661: rd %tbr, %idreg; \
- srl %idreg, 10, %idreg; \
- and %idreg, 0xc, %idreg; \
- .section .cpuid_patch, "ax"; \
- /* Instruction location. */ \
- .word 661b; \
- /* SUN4D implementation. */ \
- lda [%g0] ASI_M_VIKING_TMP1, %idreg; \
- sll %idreg, 2, %idreg; \
- nop; \
- /* LEON implementation. */ \
rd %asr17, %idreg; \
srl %idreg, 0x1c, %idreg; \
sll %idreg, 0x02, %idreg; \
- .previous; \
sethi %hi(current_set), %dest_reg; \
or %dest_reg, %lo(current_set), %dest_reg;\
ld [%idreg + %dest_reg], %dest_reg;
@@ -984,21 +984,8 @@ flushw_all:
#ifdef CONFIG_SMP
ENTRY(hard_smp_processor_id)
-661: rd %tbr, %g1
- srl %g1, 12, %o0
- and %o0, 3, %o0
- .section .cpuid_patch, "ax"
- /* Instruction location. */
- .word 661b
- /* SUN4D implementation. */
- lda [%g0] ASI_M_VIKING_TMP1, %o0
- nop
- nop
- /* LEON implementation. */
rd %asr17, %o0
srl %o0, 0x1c, %o0
- nop
- .previous
retl
nop
ENDPROC(hard_smp_processor_id)
@@ -178,34 +178,6 @@ extern int root_mountflags;
char reboot_command[COMMAND_LINE_SIZE];
-struct cpuid_patch_entry {
- unsigned int addr;
- unsigned int sun4d[3];
- unsigned int leon[3];
-};
-extern struct cpuid_patch_entry __cpuid_patch, __cpuid_patch_end;
-
-static void __init per_cpu_patch(void)
-{
- struct cpuid_patch_entry *p;
-
- p = &__cpuid_patch;
- while (p < &__cpuid_patch_end) {
- unsigned long addr = p->addr;
- unsigned int *insns;
-
- insns = &p->leon[0];
- *(unsigned int *) (addr + 0) = insns[0];
- flushi(addr + 0);
- *(unsigned int *) (addr + 4) = insns[1];
- flushi(addr + 4);
- *(unsigned int *) (addr + 8) = insns[2];
- flushi(addr + 8);
-
- p++;
- }
-}
-
static __init void leon_patch(void)
{
/* Default instruction is leon - no patching */
@@ -271,9 +243,6 @@ void __init setup_arch(char **cmdline_p)
(*(linux_dbvec->teach_debugger))();
}
- /* Run-time patch instructions to match the cpu model */
- per_cpu_patch();
-
paging_init();
smp_setup_cpu_possible_map();