Commit-ID: d2de688891909b148efe83a6fc9520a9cd6015f0
Gitweb: http://git.kernel.org/tip/d2de688891909b148efe83a6fc9520a9cd6015f0
Author: Stephen Rothwell <[email protected]>
AuthorDate: Thu, 9 Apr 2009 15:17:22 +1000
Committer: Ingo Molnar <[email protected]>
CommitDate: Thu, 9 Apr 2009 08:09:50 +0200
sparc64: extend TI_RESTART_BLOCK space by 8 bytes
Impact: build fix
Today's linux-next build (sparc64 defconfig) failed like this:
arch/sparc/kernel/built-in.o: In function `trap_init':
(.init.text+0x4): undefined reference to `thread_info_offsets_are_bolixed_dave'
Caused by commit 52400ba946759af28442dee6265c5c0180ac7122 ("futex: add
requeue_pi functionality") (from the tip-core tree) which changed the
size of struct restart_block.
Shift TI_KUNA_REGS and TI_KUNA_INSN up by 8 bytes to make space for the
larger restart block.
Signed-off-by: Stephen Rothwell <[email protected]>
Acked-by: "David S. Miller" <[email protected]>
Cc: Darren Hart <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
---
arch/sparc/include/asm/thread_info_64.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/sparc/include/asm/thread_info_64.h b/arch/sparc/include/asm/thread_info_64.h
index 639ac80..6586572 100644
--- a/arch/sparc/include/asm/thread_info_64.h
+++ b/arch/sparc/include/asm/thread_info_64.h
@@ -102,8 +102,8 @@ struct thread_info {
#define TI_KERN_CNTD1 0x00000488
#define TI_PCR 0x00000490
#define TI_RESTART_BLOCK 0x00000498
-#define TI_KUNA_REGS 0x000004c0
-#define TI_KUNA_INSN 0x000004c8
+#define TI_KUNA_REGS 0x000004c8
+#define TI_KUNA_INSN 0x000004d0
#define TI_FPREGS 0x00000500
/* We embed this in the uppermost byte of thread_info->flags */
Stephen Rothwell wrote:
> Commit-ID: d2de688891909b148efe83a6fc9520a9cd6015f0
> Gitweb: http://git.kernel.org/tip/d2de688891909b148efe83a6fc9520a9cd6015f0
> Author: Stephen Rothwell <[email protected]>
> AuthorDate: Thu, 9 Apr 2009 15:17:22 +1000
> Committer: Ingo Molnar <[email protected]>
> CommitDate: Thu, 9 Apr 2009 08:09:50 +0200
>
> sparc64: extend TI_RESTART_BLOCK space by 8 bytes
>
> Impact: build fix
>
> Today's linux-next build (sparc64 defconfig) failed like this:
>
> arch/sparc/kernel/built-in.o: In function `trap_init':
> (.init.text+0x4): undefined reference to `thread_info_offsets_are_bolixed_dave'
>
> Caused by commit 52400ba946759af28442dee6265c5c0180ac7122 ("futex: add
> requeue_pi functionality") (from the tip-core tree) which changed the
> size of struct restart_block.
>
In order to avoid such situations in the future, perhaps it would make
sense to add a comment in thread_info.h stating spar64's dependency on
the size of the restart_block?
Also, I noticed the following embedded in the definition of the
structure, does enabling this option also break sparc64 builds?
#ifdef CONFIG_COMPAT
struct compat_timespec __user *compat_rmtp;
#endif
Thanks,
Darren Hart
> Shift TI_KUNA_REGS and TI_KUNA_INSN up by 8 bytes to make space for the
> larger restart block.
>
> Signed-off-by: Stephen Rothwell <[email protected]>
> Acked-by: "David S. Miller" <[email protected]>
> Cc: Darren Hart <[email protected]>
> LKML-Reference: <[email protected]>
> Signed-off-by: Ingo Molnar <[email protected]>
>
>
> ---
> arch/sparc/include/asm/thread_info_64.h | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/sparc/include/asm/thread_info_64.h b/arch/sparc/include/asm/thread_info_64.h
> index 639ac80..6586572 100644
> --- a/arch/sparc/include/asm/thread_info_64.h
> +++ b/arch/sparc/include/asm/thread_info_64.h
> @@ -102,8 +102,8 @@ struct thread_info {
> #define TI_KERN_CNTD1 0x00000488
> #define TI_PCR 0x00000490
> #define TI_RESTART_BLOCK 0x00000498
> -#define TI_KUNA_REGS 0x000004c0
> -#define TI_KUNA_INSN 0x000004c8
> +#define TI_KUNA_REGS 0x000004c8
> +#define TI_KUNA_INSN 0x000004d0
> #define TI_FPREGS 0x00000500
>
> /* We embed this in the uppermost byte of thread_info->flags */
--
Darren Hart
IBM Linux Technology Center
Real-Time Linux Team
Hi Darren,
On Thu, 09 Apr 2009 08:23:09 -0700 Darren Hart <[email protected]> wrote:
>
> Also, I noticed the following embedded in the definition of the
> structure, does enabling this option also break sparc64 builds?
>
> #ifdef CONFIG_COMPAT
> struct compat_timespec __user *compat_rmtp;
> #endif
Sparc64 would always have CONFIG_COMPAT enabled.
--
Cheers,
Stephen Rothwell [email protected]
http://www.canb.auug.org.au/~sfr/
From: Stephen Rothwell <[email protected]>
Date: Fri, 10 Apr 2009 08:32:09 +1000
> Hi Darren,
>
> On Thu, 09 Apr 2009 08:23:09 -0700 Darren Hart <[email protected]> wrote:
>>
>> Also, I noticed the following embedded in the definition of the
>> structure, does enabling this option also break sparc64 builds?
>>
>> #ifdef CONFIG_COMPAT
>> struct compat_timespec __user *compat_rmtp;
>> #endif
>
> Sparc64 would always have CONFIG_COMPAT enabled.
I can be turned off, and people have done this who want to
run a 64-bit only system.