xtensa: Fix execdomain removal
PATCH 1/1 xtensa: Fix execdomain removal
The removal of exexdomain changes pointer offsets into the thread_info structure.
---
Applies on top of Richard's execdomain removal patches. Tested with xtensa qemu session.
arch/xtensa/include/asm/thread_info.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
arch/xtensa/include/asm/thread_info.h +5 -6
@@ -64,12 +64,11 @@ struct thread_info {/* offsets into the thread_info struct for assembly code access */ #define TI_TASK 0x00000000 -#define TI_EXEC_DOMAIN 0x00000004 -#define TI_FLAGS 0x00000008 -#define TI_STATUS 0x0000000C -#define TI_CPU 0x00000010 -#define TI_PRE_COUNT 0x00000014 -#define TI_ADDR_LIMIT 0x00000018 +#define TI_FLAGS 0x00000004 +#define TI_STATUS 0x00000008 +#define TI_CPU 0x0000000C +#define TI_PRE_COUNT 0x00000010 +#define TI_ADDR_LIMIT 0x00000014#endif
Signature · 1 line
2.1.0
Quoted 2 lines · Guenter Roeck
The removal of exexdomain changes pointer offsets into the
thread_infostructure.
...
arch/xtensa/include/asm/thread_info.h struct thread_info { · line 67
Quoted 3 lines
arch/xtensa/include/asm/thread_info.h +1
-2-#define TI_EXEC_DOMAIN 0x00000004 -#define TI_FLAGS 0x00000008 +#define TI_FLAGS 0x00000004
Hmm. If these have to be maintained by hand, perhaps they can be BUILD_BUG_ON'd in some appropriate C file? e.g.,
BUILD_BUG_ON(TI_FLAGS != offsetof(struct thread_info, flags));
Jeff
Quoted 11 lines · Jeff Epler
Quoted 2 lines · Guenter Roeck
The removal of exexdomain changes pointer offsets into the
thread_infostructure....
arch/xtensa/include/asm/thread_info.h struct thread_info { · line 67
Quoted 3 lines
arch/xtensa/include/asm/thread_info.h +1
-2-#define TI_EXEC_DOMAIN 0x00000004 -#define TI_FLAGS 0x00000008 +#define TI_FLAGS 0x00000004Hmm. If these have to be maintained by hand, perhaps they can be BUILD_BUG_ON'd in some appropriate C file? e.g.,
Quoted 4 lines
BUILD_BUG_ON(TI_FLAGS != offsetof(struct thread_info, flags));Jeff
Other architectures use either DEFINE or OFFSET macros to define those flags, so that would probably be a better solution if something more fancy is asked for. That should probably be a separate patch, though.
Guenter