Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
torvalds committed Oct 19, 2014
2 parents e25b492 + e265314 commit 5e2ee7c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion arch/sparc/include/asm/thread_info_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ struct thread_info {
struct pt_regs *kern_una_regs;
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__) */
Expand Down
6 changes: 3 additions & 3 deletions arch/sparc/kernel/dtlb_prot.S
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
mov TLB_TAG_ACCESS, %g4 ! For reload of vaddr

/* 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
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
nop
ba,pt %xcc, sparc64_realfault_common ! Nope, normal fault
nop
nop
nop
nop
Expand Down
6 changes: 3 additions & 3 deletions arch/sparc/kernel/tsb.S
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,10 @@ tsb_miss_page_table_walk_sun4v_fastpath:
nop
.previous

rdpr %tl, %g3
cmp %g3, 1
rdpr %tl, %g7
cmp %g7, 1
bne,pn %xcc, winfix_trampoline
nop
mov %g3, %g4
ba,pt %xcc, etrap
rd %pc, %g7
call hugetlb_setup
Expand Down

0 comments on commit 5e2ee7c

Please sign in to comment.