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

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
sparc32: Fix thinko in previous change.
sparc: Align clone and signal stacks to 16 bytes.

+20 -14
+1 -1
arch/sparc/kernel/process_32.c
··· 526 526 * Set some valid stack frames to give to the child. 527 527 */ 528 528 childstack = (struct sparc_stackf __user *) 529 - (sp & ~0x7UL); 529 + (sp & ~0xfUL); 530 530 parentstack = (struct sparc_stackf __user *) 531 531 regs->u_regs[UREG_FP]; 532 532
+4 -4
arch/sparc/kernel/process_64.c
··· 398 398 } else 399 399 __get_user(fp, &(((struct reg_window32 __user *)psp)->ins[6])); 400 400 401 - /* Now 8-byte align the stack as this is mandatory in the 402 - * Sparc ABI due to how register windows work. This hides 403 - * the restriction from thread libraries etc. -DaveM 401 + /* Now align the stack as this is mandatory in the Sparc ABI 402 + * due to how register windows work. This hides the 403 + * restriction from thread libraries etc. 404 404 */ 405 - csp &= ~7UL; 405 + csp &= ~15UL; 406 406 407 407 distance = fp - psp; 408 408 rval = (csp - distance);
+6 -4
arch/sparc/kernel/signal32.c
··· 120 120 }; 121 121 122 122 /* Align macros */ 123 - #define SF_ALIGNEDSZ (((sizeof(struct signal_frame32) + 7) & (~7))) 124 - #define RT_ALIGNEDSZ (((sizeof(struct rt_signal_frame32) + 7) & (~7))) 123 + #define SF_ALIGNEDSZ (((sizeof(struct signal_frame32) + 15) & (~15))) 124 + #define RT_ALIGNEDSZ (((sizeof(struct rt_signal_frame32) + 15) & (~15))) 125 125 126 126 int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from) 127 127 { ··· 420 420 sp = current->sas_ss_sp + current->sas_ss_size; 421 421 } 422 422 423 + sp -= framesize; 424 + 423 425 /* Always align the stack frame. This handles two cases. First, 424 426 * sigaltstack need not be mindful of platform specific stack 425 427 * alignment. Second, if we took this signal because the stack 426 428 * is not aligned properly, we'd like to take the signal cleanly 427 429 * and report that. 428 430 */ 429 - sp &= ~7UL; 431 + sp &= ~15UL; 430 432 431 - return (void __user *)(sp - framesize); 433 + return (void __user *) sp; 432 434 } 433 435 434 436 static int save_fpu_state32(struct pt_regs *regs, __siginfo_fpu_t __user *fpu)
+4 -2
arch/sparc/kernel/signal_32.c
··· 267 267 sp = current->sas_ss_sp + current->sas_ss_size; 268 268 } 269 269 270 + sp -= framesize; 271 + 270 272 /* Always align the stack frame. This handles two cases. First, 271 273 * sigaltstack need not be mindful of platform specific stack 272 274 * alignment. Second, if we took this signal because the stack 273 275 * is not aligned properly, we'd like to take the signal cleanly 274 276 * and report that. 275 277 */ 276 - sp &= ~7UL; 278 + sp &= ~15UL; 277 279 278 - return (void __user *)(sp - framesize); 280 + return (void __user *) sp; 279 281 } 280 282 281 283 static inline int
+5 -3
arch/sparc/kernel/signal_64.c
··· 353 353 /* Checks if the fp is valid */ 354 354 static int invalid_frame_pointer(void __user *fp, int fplen) 355 355 { 356 - if (((unsigned long) fp) & 7) 356 + if (((unsigned long) fp) & 15) 357 357 return 1; 358 358 return 0; 359 359 } ··· 396 396 sp = current->sas_ss_sp + current->sas_ss_size; 397 397 } 398 398 399 + sp -= framesize; 400 + 399 401 /* Always align the stack frame. This handles two cases. First, 400 402 * sigaltstack need not be mindful of platform specific stack 401 403 * alignment. Second, if we took this signal because the stack 402 404 * is not aligned properly, we'd like to take the signal cleanly 403 405 * and report that. 404 406 */ 405 - sp &= ~7UL; 407 + sp &= ~15UL; 406 408 407 - return (void __user *)(sp - framesize); 409 + return (void __user *) sp; 408 410 } 409 411 410 412 static inline void