[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210212161439.pkrw6cpbfqhafrnk@treble>
Date: Fri, 12 Feb 2021 10:14:39 -0600
From: Josh Poimboeuf <jpoimboe@...hat.com>
To: Jason Gerecke <killertofu@...il.com>
Cc: linux-kernel@...r.kernel.org,
Peter Zijlstra <peterz@...radead.org>,
Jason Baron <jbaron@...mai.com>,
Jason Gerecke <jason.gerecke@...om.com>,
Steven Rostedt <rostedt@...dmis.org>,
Ard Biesheuvel <ardb@...nel.org>
Subject: Re: [PATCH] RFC: x86/jump_label: Mark arguments as const to satisfy
asm constraints
On Thu, Feb 11, 2021 at 01:48:48PM -0800, Jason Gerecke wrote:
> When compiling an external kernel module with `-O0` or `-O1`, the following
> compile error may be reported:
>
> ./arch/x86/include/asm/jump_label.h:25:2: error: impossible constraint in ‘asm’
> 25 | asm_volatile_goto("1:"
> | ^~~~~~~~~~~~~~~~~
>
> It appears that these lower optimization levels prevent GCC from detecting
> that the key/branch arguments can be treated as constants and used as
> immediate operands. To work around this, explicitly add the `const` label.
>
> Signed-off-by: Jason Gerecke <jason.gerecke@...om.com>
> Cc: Steven Rostedt <rostedt@...dmis.org>
> Cc: Ard Biesheuvel <ardb@...nel.org>
> ---
> Marked RFC since I'm not familiar with this subsystem or the asm blocks that
> are impacted. Extra-close inspection would be appreciated.
Acked-by: Josh Poimboeuf <jpoimboe@...hat.com>
--
Josh
Powered by blists - more mailing lists