Skip to content

Commit 206582c

Browse files
committed
sh: Make all PxSEGADDR() calls fatal for non-legacy configs.
This stubs out all of the PxSEGADDR() wrappers for non-legacy code. 29-bit will continue to work with these, while 32-bit code will now blow up on compile rather than at runtime. The vast majority of the in-tree offenders are gone, with the only remaining culprits being unable to support 32-bit mode. Hopefully this will prevent anyone from ever using these again. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
1 parent 88f73d2 commit 206582c

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

‎arch/sh/include/asm/addrspace.h‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,15 @@
4040
((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) | P3SEG))
4141
#define P4SEGADDR(a) \
4242
((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) | P4SEG))
43-
#endif /* 29BIT */
43+
#else
44+
/*
45+
* These will never work in 32-bit, don't even bother.
46+
*/
47+
#define P1SEGADDR(a) __futile_remapping_attempt
48+
#define P2SEGADDR(a) __futile_remapping_attempt
49+
#define P3SEGADDR(a) __futile_remapping_attempt
50+
#define P4SEGADDR(a) __futile_remapping_attempt
51+
#endif
4452
#endif /* P1SEG */
4553

4654
/* Check if an address can be reached in 29 bits */

0 commit comments

Comments
 (0)