2015-04-12 02:20:07

by Guenter Roeck

[permalink] [raw]
Subject: [PATCH] xtensa: Fix execdomain removal

The removal of exexdomain changes pointer offsets into the thread_info
structure.

Signed-off-by: Guenter Roeck <[email protected]>
---
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(-)

diff --git a/arch/xtensa/include/asm/thread_info.h b/arch/xtensa/include/asm/thread_info.h
index d120278073b5..b3680a4738cd 100644
--- a/arch/xtensa/include/asm/thread_info.h
+++ b/arch/xtensa/include/asm/thread_info.h
@@ -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

--
2.1.0


2015-04-12 14:43:58

by Jeff Epler

[permalink] [raw]
Subject: Re: [PATCH] xtensa: Fix execdomain removal

On Sat, Apr 11, 2015 at 07:19:51PM -0700, Guenter Roeck wrote:
> The removal of exexdomain changes pointer offsets into the thread_info
> structure.
...
> -#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

2015-04-12 15:00:51

by Guenter Roeck

[permalink] [raw]
Subject: Re: [PATCH] xtensa: Fix execdomain removal

On 04/12/2015 07:43 AM, Jeff Epler wrote:
> On Sat, Apr 11, 2015 at 07:19:51PM -0700, Guenter Roeck wrote:
>> The removal of exexdomain changes pointer offsets into the thread_info
>> structure.
> ...
>> -#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
>
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

2015-11-26 16:30:21

by Richard Weinberger

[permalink] [raw]
Subject: Re: [PATCH] xtensa: Fix execdomain removal

Jeff,

I'll add them to asm-offsets.c as I did for m32r and blackfin.

Thanks????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?