From: John Williams <john.williams@petalogix.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Jiri Kosina <trivial@kernel.org>,
microblaze-uclinux@itee.uq.edu.au, linux-kernel@vger.kernel.org
Subject: Re: [microblaze-linux] [PATCH 2/5] microblaze: s/#if[!] CONFIG/#if[n]def CONFIG/
Date: Tue, 21 Feb 2012 09:53:50 +1000 [thread overview]
Message-ID: <CACPZLaX79gaBR60tfQH+zeEX22RpJYwjvWzGU40t0hy1_iF-BQ@mail.gmail.com> (raw)
In-Reply-To: <CAMuHMdUm=juT2efdHPzELK1MEeb1FJRQmS6=ajMqxmB_f5M4AQ@mail.gmail.com>
Hi Geert,
On Mon, Feb 20, 2012 at 9:59 PM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
> On Mon, Feb 20, 2012 at 01:27, John Williams
> <john.williams@petalogix.com> wrote:
>> NACK - please see comments below
>>
>> On Mon, Feb 20, 2012 at 1:11 AM, Geert Uytterhoeven
>> <geert@linux-m68k.org> wrote:
>>> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
>>> Cc: Michal Simek <monstr@monstr.eu>
>>> Cc: microblaze-uclinux@itee.uq.edu.au
>>> ---
>>> arch/microblaze/include/asm/exceptions.h | 2 +-
>>> arch/microblaze/include/asm/irqflags.h | 2 +-
>>> arch/microblaze/kernel/entry-nommu.S | 2 +-
>>> arch/microblaze/kernel/entry.S | 4 ++--
>>> arch/microblaze/kernel/setup.c | 4 ++--
>>> 5 files changed, 7 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/arch/microblaze/include/asm/exceptions.h b/arch/microblaze/include/asm/exceptions.h
>>> index e6a8dde..48c197b 100644
>>> --- a/arch/microblaze/include/asm/exceptions.h
>>> +++ b/arch/microblaze/include/asm/exceptions.h
>>> @@ -25,7 +25,7 @@
>>> /* Define MSR enable bit for HW exceptions */
>>> #define HWEX_MSR_BIT (1 << 8)
>>>
>>> -#if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR
>>> +#ifdef CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR
>>
>> We actually care about the value of this one - it is always defined,
>> but is either 0 or 1 depending upon the presence or absence of this
>> feature in the target CPU.
>>
>> These CPU feature-related configs are defined in
>> arch/microblaze/platform/generic/Kconfig.auto
>>
>> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=arch/microblaze/platform/generic/Kconfig.auto;h=25a6f019e94d5d9a1c884dfef9e906435685f980;hb=HEAD
>>
>> not as bools, but as integers. Kconfig.auto is actually a placeholder
>> for a design file which is emitted from the MicroBlaze CPU / SoC
>> design tool flow and copied into place by the user.
>>
>> In my view these should remain integers rather than booleans for a
>> couple of reasons:
>> * breakage for all current users
>> * MicroBlaze is an evolving architecture, there are other cases of
>> seemingly boolean HW parametesr growing to become integers, such as
>> the USE_FPU option. Once upon a time it was yes/no, now there's 2
>> different flavours of FPU as well as 'none'. MSR is just as likely to
>> change in future.
>>
>>> -#if CONFIG_MANUAL_RESET_VECTOR
>>> +#ifdef CONFIG_MANUAL_RESET_VECTOR
>>
>> This guy is also always defined (Kconfig 'hex' type), we just need to
>> do something different for a non-zero value.
>
> Sorry, I missed these are not bool values.
No problem.
> To avoid this from happening again, perhaps it's a good idea to
> explicitly write e.g.
>
> #if CONFIG_MANUAL_RESET_VECTOR != 0
>
> like is done for other int config values?
Yes I think that's probably worth doing.
Thanks,
John
next prev parent reply other threads:[~2012-02-20 23:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-19 15:11 [PATCH 1/5] blackfin: s/#if CONFIG/#ifdef CONFIG/ Geert Uytterhoeven
2012-02-19 15:11 ` [PATCH 2/5] microblaze: s/#if[!] CONFIG/#if[n]def CONFIG/ Geert Uytterhoeven
2012-02-20 0:27 ` [microblaze-linux] " John Williams
2012-02-20 11:59 ` Geert Uytterhoeven
2012-02-20 23:53 ` John Williams [this message]
2012-02-19 15:11 ` [PATCH 3/5] x86: s/#if CONFIG/#ifdef CONFIG/ Geert Uytterhoeven
2012-02-20 8:25 ` Ingo Molnar
2012-02-19 15:11 ` [PATCH 4/5] input: " Geert Uytterhoeven
2012-02-19 15:11 ` [PATCH 5/5] fbdev: " Geert Uytterhoeven
2012-02-19 22:44 ` Florian Tobias Schandinat
2012-04-06 0:00 ` Jiri Kosina
2012-02-19 20:08 ` [PATCH 1/5] blackfin: " Mike Frysinger
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=CACPZLaX79gaBR60tfQH+zeEX22RpJYwjvWzGU40t0hy1_iF-BQ@mail.gmail.com \
--to=john.williams@petalogix.com \
--cc=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=microblaze-uclinux@itee.uq.edu.au \
--cc=trivial@kernel.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;
as well as URLs for NNTP newsgroup(s).