forked from Minki/linux
powerpc: Consolidate feature fixup macros for 64/32 bit
Currently we have three versions of MAKE_FTR_SECTION_ENTRY(), the macro that generates a feature section entry. There is 64bit version, a 32bit version and version for 32bit code built with a 64bit kernel. Rather than triplicating (?) the MAKE_FTR_SECTION_ENTRY() logic, we can move the 64bit/32bit differences into separate macros, and then only have one version of MAKE_FTR_SECTION_ENTRY(). Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Acked-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
parent
c5157e587b
commit
c1137c37a9
@ -19,55 +19,27 @@
|
|||||||
* that values will be negative, that is, the fixup table has to be
|
* that values will be negative, that is, the fixup table has to be
|
||||||
* located after the code it fixes up.
|
* located after the code it fixes up.
|
||||||
*/
|
*/
|
||||||
#ifdef CONFIG_PPC64
|
#if defined(CONFIG_PPC64) && !defined(__powerpc64__)
|
||||||
|
|
||||||
#ifdef __powerpc64__
|
|
||||||
|
|
||||||
/* 64 bits kernel, 64 bits code */
|
|
||||||
#define MAKE_FTR_SECTION_ENTRY(msk, val, label, sect) \
|
|
||||||
99: \
|
|
||||||
.section sect,"a"; \
|
|
||||||
.align 3; \
|
|
||||||
98: \
|
|
||||||
.llong msk; \
|
|
||||||
.llong val; \
|
|
||||||
.llong label##b-98b; \
|
|
||||||
.llong 99b-98b; \
|
|
||||||
.previous
|
|
||||||
|
|
||||||
#else /* __powerpc64__ */
|
|
||||||
|
|
||||||
/* 64 bits kernel, 32 bits code (ie. vdso32) */
|
/* 64 bits kernel, 32 bits code (ie. vdso32) */
|
||||||
|
#define FTR_ENTRY_LONG .llong
|
||||||
|
#define FTR_ENTRY_OFFSET .long 0xffffffff; .long
|
||||||
|
#else
|
||||||
|
/* 64 bit kernel 64 bit code, or 32 bit kernel 32 bit code */
|
||||||
|
#define FTR_ENTRY_LONG PPC_LONG
|
||||||
|
#define FTR_ENTRY_OFFSET PPC_LONG
|
||||||
|
#endif
|
||||||
|
|
||||||
#define MAKE_FTR_SECTION_ENTRY(msk, val, label, sect) \
|
#define MAKE_FTR_SECTION_ENTRY(msk, val, label, sect) \
|
||||||
99: \
|
99: \
|
||||||
.section sect,"a"; \
|
.section sect,"a"; \
|
||||||
.align 3; \
|
.align 3; \
|
||||||
98: \
|
98: \
|
||||||
.llong msk; \
|
FTR_ENTRY_LONG msk; \
|
||||||
.llong val; \
|
FTR_ENTRY_LONG val; \
|
||||||
.long 0xffffffff; \
|
FTR_ENTRY_OFFSET label##b-98b; \
|
||||||
.long label##b-98b; \
|
FTR_ENTRY_OFFSET 99b-98b; \
|
||||||
.long 0xffffffff; \
|
|
||||||
.long 99b-98b; \
|
|
||||||
.previous
|
.previous
|
||||||
|
|
||||||
#endif /* !__powerpc64__ */
|
|
||||||
|
|
||||||
#else /* CONFIG_PPC64 */
|
|
||||||
|
|
||||||
/* 32 bits kernel, 32 bits code */
|
|
||||||
#define MAKE_FTR_SECTION_ENTRY(msk, val, label, sect) \
|
|
||||||
99: \
|
|
||||||
.section sect,"a"; \
|
|
||||||
.align 2; \
|
|
||||||
98: \
|
|
||||||
.long msk; \
|
|
||||||
.long val; \
|
|
||||||
.long label##b-98b; \
|
|
||||||
.long 99b-98b; \
|
|
||||||
.previous
|
|
||||||
|
|
||||||
#endif /* !CONFIG_PPC64 */
|
|
||||||
|
|
||||||
|
|
||||||
/* CPU feature dependent sections */
|
/* CPU feature dependent sections */
|
||||||
|
Loading…
Reference in New Issue
Block a user