mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Ingo Molnar <mingo@kernel.org>,
	linux-s390@vger.kernel.org,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	linux-kernel@vger.kernel.org, Olof Johansson <olof@lixom.net>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	linux390@de.ibm.com,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] sched, arm64: Fix the fallout of increasing the offset of 'thread_struct' within 'task_struct'
Date: Mon, 20 Jul 2015 15:03:55 +0100	[thread overview]
Message-ID: <20150720140355.GM20385@e104818-lin.cambridge.arm.com> (raw)
In-Reply-To: <55ACFD1C.8090907@roeck-us.net>

On Mon, Jul 20, 2015 at 06:52:28AM -0700, Guenter Roeck wrote:
> On 07/20/2015 12:20 AM, Ingo Molnar wrote:
> >* Guenter <linux@roeck-us.net> wrote:
> >>On Sat, Jul 18, 2015 at 04:27:17PM -0700, Guenter wrote:
> >>>Commit 0c8c0f03e3a2 ("x86/fpu, sched: Dynamically allocate 'struct fpu'")
> >>>causes s390 builds in mainline to fail as follows.
> >>>
> >>>arch/s390/kernel/traps.c: Assembler messages:
> >>>arch/s390/kernel/traps.c:262: Error: operand out of range
> >>>	(0x00000000000023e8 is not between 0x0000000000000000 and 0x0000000000000fff)
> >>>arch/s390/kernel/traps.c:300: Error: operand out of range
> >>>	(0x00000000000023e8 is not between 0x0000000000000000 and 0x0000000000000fff)
> >>>
> >>
> >>Also:
> >>
> >>arm64:allmodconfig:
> >>
> >>arch/arm64/kernel/entry.S: Assembler messages:
> >>arch/arm64/kernel/entry.S:588: Error: immediate out of range
> >>arch/arm64/kernel/entry.S:597: Error: immediate out of range
> >>make[1]: *** [arch/arm64/kernel/entry.o] Error 1
> >>
> >>I didn't bisect that one, but it looks like the cause is the same.
> >
> >Hm, it looks like the new, increased offset of 'thread_struct' within
> >'task_struct' goes over a limit that these instructions are able to support on
> >arm64:
> >
> >  arch/arm64/kernel/asm-offsets.c:  DEFINE(THREAD_CPU_CONTEXT,    offsetof(struct task_struct, thread.cpu_context));
> >  arch/arm64/kernel/entry.S:      add     x8, x0, #THREAD_CPU_CONTEXT
> >  arch/arm64/kernel/entry.S:      add     x8, x1, #THREAD_CPU_CONTEXT
> >
> >If there's no instruction that can support such offset sizes then I suspect the
> >straightforward fix would be to pass in thread_struct instead - like the patch
> >below. That's a tiny bit cleaner for type encapsulation anyway.
> 
> Olof submitted a different patch to solve the problem:
> 	http://www.spinics.net/lists/kernel/msg2036825.html
> 
> His patch is passing cpu_context instead of thread_context.

It's likely that we'll use this patch instead:

http://lkml.kernel.org/g/20150720105345.GC9908@arm.com

-- 
Catalin

  reply	other threads:[~2015-07-20 14:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-18 23:27 Build error due to "x86/fpu, sched: Dynamically allocate 'struct fpu'" Guenter
2015-07-18 23:34 ` Guenter
2015-07-20  7:20   ` [PATCH] sched, arm64: Fix the fallout of increasing the offset of 'thread_struct' within 'task_struct' Ingo Molnar
2015-07-20 13:52     ` Guenter Roeck
2015-07-20 14:03       ` Catalin Marinas [this message]
2015-07-20  7:34 ` sched, s390: " Ingo Molnar
2015-07-20 14:31   ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150720140355.GM20385@e104818-lin.cambridge.arm.com \
    --to=catalin.marinas@arm.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux390@de.ibm.com \
    --cc=linux@roeck-us.net \
    --cc=mingo@kernel.org \
    --cc=olof@lixom.net \
    --cc=schwidefsky@de.ibm.com \
    --cc=sfr@canb.auug.org.au \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®