diff options
Diffstat (limited to 'arch/sparc64/kernel/setup.c')
-rw-r--r-- | arch/sparc64/kernel/setup.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c index 2918ed3eb1ba..aaab319ad885 100644 --- a/arch/sparc64/kernel/setup.c +++ b/arch/sparc64/kernel/setup.c | |||
@@ -545,6 +545,24 @@ static void __init per_cpu_patch(void) | |||
545 | #endif | 545 | #endif |
546 | } | 546 | } |
547 | 547 | ||
548 | static void __init gl_patch(void) | ||
549 | { | ||
550 | struct gl_1insn_patch_entry *p; | ||
551 | |||
552 | if (tlb_type != hypervisor) | ||
553 | return; | ||
554 | |||
555 | p = &__gl_1insn_patch; | ||
556 | while (p < &__gl_1insn_patch_end) { | ||
557 | unsigned long addr = p->addr; | ||
558 | |||
559 | *(unsigned int *) (addr + 0) = p->insn; | ||
560 | __asm__ __volatile__("flush %0" : : "r" (addr + 0)); | ||
561 | |||
562 | p++; | ||
563 | } | ||
564 | } | ||
565 | |||
548 | void __init setup_arch(char **cmdline_p) | 566 | void __init setup_arch(char **cmdline_p) |
549 | { | 567 | { |
550 | /* Initialize PROM console and command line. */ | 568 | /* Initialize PROM console and command line. */ |
@@ -567,6 +585,8 @@ void __init setup_arch(char **cmdline_p) | |||
567 | */ | 585 | */ |
568 | per_cpu_patch(); | 586 | per_cpu_patch(); |
569 | 587 | ||
588 | gl_patch(); | ||
589 | |||
570 | boot_flags_init(*cmdline_p); | 590 | boot_flags_init(*cmdline_p); |
571 | 591 | ||
572 | idprom_init(); | 592 | idprom_init(); |