Message ID | 20160427204911.GA27058@ravnborg.org |
---|---|
State | RFC |
Delegated to: | David Miller |
Headers | show |
From: Sam Ravnborg <sam@ravnborg.org> Date: Wed, 27 Apr 2016 22:49:11 +0200 > On Wed, Apr 27, 2016 at 04:22:42PM -0400, David Miller wrote: >> From: Rob Gardner <rob.gardner@oracle.com> >> Date: Wed, 27 Apr 2016 14:06:04 -0600 >> >> > Also, perhaps think about a way to make the assembler emit something >> > fatal instead of a warning when this situation occurs? People tend to >> > ignore warnings. ;) >> >> Yeah, good idea, I'll try to come up with something. >> >> I think you can put asserts into the linker script, and we should have >> added a test on swapper_tsb's address a very long time ago. :) > > Something like this: ... Indeed, see the patch I just posted. -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/arch/sparc/kernel/vmlinux.lds.S b/arch/sparc/kernel/vmlinux.lds.S index f1a2f68..d0e87e7 100644 --- a/arch/sparc/kernel/vmlinux.lds.S +++ b/arch/sparc/kernel/vmlinux.lds.S @@ -155,3 +155,10 @@ SECTIONS DISCARDS } + +#ifdef CONFIG_SPARC64 +/* The ASSERT() sink to . is required by binutils 2.14 */ +. = ASSERT((swapper_tsb <= 0x408000), + "trap table alignment is not OK - see arch/sparc/kernel/head_64.S"); +#endif +