aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64/kernel/setup.c')
-rw-r--r--arch/sparc64/kernel/setup.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c
index e22bf5fc92ce..40acac5b8337 100644
--- a/arch/sparc64/kernel/setup.c
+++ b/arch/sparc64/kernel/setup.c
@@ -529,15 +529,19 @@ static void __init per_cpu_patch(void)
529 }; 529 };
530 530
531 *(unsigned int *) (addr + 0) = insns[0]; 531 *(unsigned int *) (addr + 0) = insns[0];
532 wmb();
532 __asm__ __volatile__("flush %0" : : "r" (addr + 0)); 533 __asm__ __volatile__("flush %0" : : "r" (addr + 0));
533 534
534 *(unsigned int *) (addr + 4) = insns[1]; 535 *(unsigned int *) (addr + 4) = insns[1];
536 wmb();
535 __asm__ __volatile__("flush %0" : : "r" (addr + 4)); 537 __asm__ __volatile__("flush %0" : : "r" (addr + 4));
536 538
537 *(unsigned int *) (addr + 8) = insns[2]; 539 *(unsigned int *) (addr + 8) = insns[2];
540 wmb();
538 __asm__ __volatile__("flush %0" : : "r" (addr + 8)); 541 __asm__ __volatile__("flush %0" : : "r" (addr + 8));
539 542
540 *(unsigned int *) (addr + 12) = insns[3]; 543 *(unsigned int *) (addr + 12) = insns[3];
544 wmb();
541 __asm__ __volatile__("flush %0" : : "r" (addr + 12)); 545 __asm__ __volatile__("flush %0" : : "r" (addr + 12));
542 546
543 p++; 547 p++;
@@ -558,6 +562,7 @@ static void __init gl_patch(void)
558 unsigned long addr = p1->addr; 562 unsigned long addr = p1->addr;
559 563
560 *(unsigned int *) (addr + 0) = p1->insn; 564 *(unsigned int *) (addr + 0) = p1->insn;
565 wmb();
561 __asm__ __volatile__("flush %0" : : "r" (addr + 0)); 566 __asm__ __volatile__("flush %0" : : "r" (addr + 0));
562 567
563 p1++; 568 p1++;
@@ -568,9 +573,11 @@ static void __init gl_patch(void)
568 unsigned long addr = p2->addr; 573 unsigned long addr = p2->addr;
569 574
570 *(unsigned int *) (addr + 0) = p2->insns[0]; 575 *(unsigned int *) (addr + 0) = p2->insns[0];
576 wmb();
571 __asm__ __volatile__("flush %0" : : "r" (addr + 0)); 577 __asm__ __volatile__("flush %0" : : "r" (addr + 0));
572 578
573 *(unsigned int *) (addr + 3) = p2->insns[1]; 579 *(unsigned int *) (addr + 3) = p2->insns[1];
580 wmb();
574 __asm__ __volatile__("flush %0" : : "r" (addr + 4)); 581 __asm__ __volatile__("flush %0" : : "r" (addr + 4));
575 582
576 p2++; 583 p2++;