diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-02-06 00:29:28 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-03-20 04:11:48 -0500 |
commit | 936f482af1743141d637483ec10eb881537c26dc (patch) | |
tree | 913da89a4d9f4038c510c9ecf2f5957b0f6d167f /arch/sparc64/kernel/setup.c | |
parent | 6e02493a7f33ac89e698b980a657d77ab2749eaf (diff) |
[SPARC64]: Add initial code to twiddle %gl on trap entry/exit.
Instead of setting/clearing PSTATE_AG we have to change
the %gl register value on sun4v.
Signed-off-by: David S. Miller <davem@davemloft.net>
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(); |