提交 af20aeb1 编写于 作者: M Milton Miller 提交者: Benjamin Herrenschmidt

powerpc: Enable MMU feature sections for inline asm

powerpc: Enable MMU feature sections for inline asm

This adds the ability to do MMU feature sections for inline asm.
Signed-off-by: NMilton Miller <miltonm@bga.com>
Signed-off-by: NMichael Neuling <mikey@neuling.org>
Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
上级 dfb432cb
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
* 2 of the License, or (at your option) any later version. * 2 of the License, or (at your option) any later version.
*/ */
#ifdef __ASSEMBLY__
/* /*
* Feature section common macros * Feature section common macros
* *
...@@ -23,10 +21,12 @@ ...@@ -23,10 +21,12 @@
/* 64 bits kernel, 32 bits code (ie. vdso32) */ /* 64 bits kernel, 32 bits code (ie. vdso32) */
#define FTR_ENTRY_LONG .llong #define FTR_ENTRY_LONG .llong
#define FTR_ENTRY_OFFSET .long 0xffffffff; .long #define FTR_ENTRY_OFFSET .long 0xffffffff; .long
#elif defined(CONFIG_PPC64)
#define FTR_ENTRY_LONG .llong
#define FTR_ENTRY_OFFSET .llong
#else #else
/* 64 bit kernel 64 bit code, or 32 bit kernel 32 bit code */ #define FTR_ENTRY_LONG .long
#define FTR_ENTRY_LONG PPC_LONG #define FTR_ENTRY_OFFSET .long
#define FTR_ENTRY_OFFSET PPC_LONG
#endif #endif
#define START_FTR_SECTION(label) label##1: #define START_FTR_SECTION(label) label##1:
...@@ -141,6 +141,21 @@ label##5: \ ...@@ -141,6 +141,21 @@ label##5: \
#define ALT_FW_FTR_SECTION_END_IFCLR(msk) \ #define ALT_FW_FTR_SECTION_END_IFCLR(msk) \
ALT_FW_FTR_SECTION_END_NESTED_IFCLR(msk, 97) ALT_FW_FTR_SECTION_END_NESTED_IFCLR(msk, 97)
#ifndef __ASSEMBLY__
#define ASM_MMU_FTR_IF(section_if, section_else, msk, val) \
stringify_in_c(BEGIN_MMU_FTR_SECTION) \
section_if "; " \
stringify_in_c(MMU_FTR_SECTION_ELSE) \
section_else "; " \
stringify_in_c(ALT_MMU_FTR_SECTION_END((msk), (val)))
#define ASM_MMU_FTR_IFSET(section_if, section_else, msk) \
ASM_MMU_FTR_IF(section_if, section_else, (msk), (msk))
#define ASM_MMU_FTR_IFCLR(section_if, section_else, msk) \
ASM_MMU_FTR_IF(section_if, section_else, (msk), 0)
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
/* LWSYNC feature sections */ /* LWSYNC feature sections */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册