Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1581235
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] arm64: define BUG() instruction without CONFIG_BUG |
| Date | 2017-02-15 12:40 +0100 |
| Message-ID | <tb66d-7Lf-9@gated-at.bofh.it> (permalink) |
| References | <taT90-79j-21@gated-at.bofh.it> <tb5Wy-7HU-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Feb 15, 2017 at 12:22 PM, Will Deacon <will.deacon@arm.com> wrote:
> On Tue, Feb 14, 2017 at 10:39:28PM +0100, Arnd Bergmann wrote:
>> @@ -57,6 +58,14 @@ _BUGVERBOSE_LOCATION(__FILE__, __LINE__) \
>>
>> #define __WARN_TAINT(taint) _BUG_FLAGS(BUGFLAG_TAINT(taint))
>>
>> +#else
>> +
>> +#define BUG() do { \
>> + asm volatile("brk %[imm]" \
>> + :: [imm] "i" (BUG_BRK_IMM)); \
>> + unreachable(); \
>> +} while (0)
>
> Do we need to duplicate the asm, or can we reuse the existing BUG
> definition in this header? The only extra thing we do is push a __bug_table
> entry, but I can't see why that would be a problem.
The only reason for turning off CONFIG_BUG is to save a little extra space
in the kernel image, so I think we really don't want the __bug_table to be
generated.
However, we could split the existing asm in two and have only one definition
for the asm containing the brk instruction.
Arnd
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] arm64: define BUG() instruction without CONFIG_BUG Arnd Bergmann <arnd@arndb.de> - 2017-02-14 22:50 +0100
Re: [PATCH] arm64: define BUG() instruction without CONFIG_BUG Will Deacon <will.deacon@arm.com> - 2017-02-15 12:30 +0100
Re: [PATCH] arm64: define BUG() instruction without CONFIG_BUG Arnd Bergmann <arnd@arndb.de> - 2017-02-15 12:40 +0100
csiph-web