Skip to content

Commit

Permalink
sh: Make all PxSEGADDR() calls fatal for non-legacy configs.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Mundt committed Jan 13, 2010
1 parent 88f73d2 commit 206582c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion arch/sh/include/asm/addrspace.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,15 @@
((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) | P3SEG))
#define P4SEGADDR(a) \
((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) | P4SEG))
#endif /* 29BIT */
#else
/*
* These will never work in 32-bit, don't even bother.
*/
#define P1SEGADDR(a) __futile_remapping_attempt
#define P2SEGADDR(a) __futile_remapping_attempt
#define P3SEGADDR(a) __futile_remapping_attempt
#define P4SEGADDR(a) __futile_remapping_attempt
#endif
#endif /* P1SEG */

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

0 comments on commit 206582c

Please sign in to comment.