Commit 5e2ee7cd authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc

Pull sparc fixes from David Miller:
 "Here we have two bug fixes:

  1) The current thread's fault_code is not setup properly upon entry to
     do_sparc64_fault() in some paths, leading to spurious SIGBUS.

  2) Don't use a zero length array at the end of thread_info on sparc64,
     otherwise end_of_stack() isn't right"

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  sparc64: Do not define thread fpregs save area as zero-length array.
  sparc64: Fix corrupted thread fault code.
parents e25b4927 e2653143
...@@ -63,7 +63,8 @@ struct thread_info { ...@@ -63,7 +63,8 @@ struct thread_info {
struct pt_regs *kern_una_regs; struct pt_regs *kern_una_regs;
unsigned int kern_una_insn; unsigned int kern_una_insn;
unsigned long fpregs[0] __attribute__ ((aligned(64))); unsigned long fpregs[(7 * 256) / sizeof(unsigned long)]
__attribute__ ((aligned(64)));
}; };
#endif /* !(__ASSEMBLY__) */ #endif /* !(__ASSEMBLY__) */
......
...@@ -24,11 +24,11 @@ ...@@ -24,11 +24,11 @@
mov TLB_TAG_ACCESS, %g4 ! For reload of vaddr mov TLB_TAG_ACCESS, %g4 ! For reload of vaddr
/* PROT ** ICACHE line 2: More real fault processing */ /* PROT ** ICACHE line 2: More real fault processing */
ldxa [%g4] ASI_DMMU, %g5 ! Put tagaccess in %g5
bgu,pn %xcc, winfix_trampoline ! Yes, perform winfixup bgu,pn %xcc, winfix_trampoline ! Yes, perform winfixup
ldxa [%g4] ASI_DMMU, %g5 ! Put tagaccess in %g5
ba,pt %xcc, sparc64_realfault_common ! Nope, normal fault
mov FAULT_CODE_DTLB | FAULT_CODE_WRITE, %g4 mov FAULT_CODE_DTLB | FAULT_CODE_WRITE, %g4
nop ba,pt %xcc, sparc64_realfault_common ! Nope, normal fault
nop
nop nop
nop nop
nop nop
......
...@@ -162,10 +162,10 @@ tsb_miss_page_table_walk_sun4v_fastpath: ...@@ -162,10 +162,10 @@ tsb_miss_page_table_walk_sun4v_fastpath:
nop nop
.previous .previous
rdpr %tl, %g3 rdpr %tl, %g7
cmp %g3, 1 cmp %g7, 1
bne,pn %xcc, winfix_trampoline bne,pn %xcc, winfix_trampoline
nop mov %g3, %g4
ba,pt %xcc, etrap ba,pt %xcc, etrap
rd %pc, %g7 rd %pc, %g7
call hugetlb_setup call hugetlb_setup
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment