All of lore.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will.deacon@arm.com>
To: linux-arch@vger.kernel.org
Cc: heiko.carstens@de.ibm.com, akpm@linux-foundation.org,
	viro@zeniv.linux.org.uk, tglx@linutronix.de, tony.luck@intel.com
Subject: LATENCYTOP not building on ia64
Date: Wed, 27 Jan 2016 15:00:31 +0000	[thread overview]
Message-ID: <20160127150031.GI2390@arm.com> (raw)

Hi all,

After da48d094ce5d ("Kconfig: remove HAVE_LATENCYTOP_SUPPORT"),
CONFIG_LATENCYTOP can be selected on all architectures. Unfortunately,
viro reported that this breaks the build for ia64:

  arch/ia64/kernel/entry.S: Assembler messages:
  arch/ia64/kernel/entry.S:621: Error: Operand 2 of `adds' should be a 14-bit integer (-8192-8191)
  arch/ia64/kernel/entry.S:728: Error: Operand 2 of `adds' should be a 14-bit integer (-8192-8191)
  arch/ia64/kernel/entry.S:859: Error: Operand 2 of `adds' should be a 14-bit integer (-8192-8191)
  make[1]: *** [arch/ia64/kernel/entry.o] Error 1

This is because the task_struct is over 8K thanks to the latency_record
array, which means that the 14-bit immediate offset expected by the adds
instruction to grab hold of the thread info flags is now out-of-range on
ia64. I had a quick go at fixing it in entry.S, but I ended up with
worse code due to the need to perform the offset calculation as a
separate step (which introduces a hazard).

We could simply revert da48d094ce5d to make the problem disappear, but
I'd be interested to know whether or not this is an ia64-specific problem
and therefore whether LATENCYTOP should be opt-out as opposed to opt-in
for a given architecture.

Prior to da48d094ce5d, arc, arm, metag, microblaze, parisc, powerpc,
s390, sh, sparc, unicore32 and x86 all selected HAVE_LATENCYTOP_SUPPORT
so assumedly they don't run into problems. arm64 also works ok with the
option enabled.

Will

--->8

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index ecb9e75614bf..9c66339e3879 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1600,6 +1600,7 @@ config LATENCYTOP
 	depends on DEBUG_KERNEL
 	depends on STACKTRACE_SUPPORT
 	depends on PROC_FS
+	depends on !IA64
 	select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM_UNWIND && !ARC
 	select KALLSYMS
 	select KALLSYMS_ALL

                 reply	other threads:[~2016-01-27 15:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20160127150031.GI2390@arm.com \
    --to=will.deacon@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=viro@zeniv.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.