linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] blackfin: s/#if CONFIG/#ifdef CONFIG/
@ 2012-02-19 15:11 Geert Uytterhoeven
  2012-02-19 15:11 ` [PATCH 2/5] microblaze: s/#if[!] CONFIG/#if[n]def CONFIG/ Geert Uytterhoeven
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2012-02-19 15:11 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: linux-kernel, Geert Uytterhoeven, Mike Frysinger, uclinux-dist-devel

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: uclinux-dist-devel@blackfin.uclinux.org
---
 arch/blackfin/mach-common/entry.S |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S
index e413729..48bb434 100644
--- a/arch/blackfin/mach-common/entry.S
+++ b/arch/blackfin/mach-common/entry.S
@@ -1244,7 +1244,7 @@ ENTRY(_software_trace_buff)
 	.endr
 #endif /* CONFIG_DEBUG_BFIN_HWTRACE_EXPAND */
 
-#if CONFIG_EARLY_PRINTK
+#ifdef CONFIG_EARLY_PRINTK
 __INIT
 ENTRY(_early_trap)
 	SAVE_ALL_SYS
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 2/5] microblaze: s/#if[!] CONFIG/#if[n]def CONFIG/
  2012-02-19 15:11 [PATCH 1/5] blackfin: s/#if CONFIG/#ifdef CONFIG/ Geert Uytterhoeven
@ 2012-02-19 15:11 ` Geert Uytterhoeven
  2012-02-20  0:27   ` [microblaze-linux] " John Williams
  2012-02-19 15:11 ` [PATCH 3/5] x86: s/#if CONFIG/#ifdef CONFIG/ Geert Uytterhoeven
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 12+ messages in thread
From: Geert Uytterhoeven @ 2012-02-19 15:11 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: linux-kernel, Geert Uytterhoeven, Michal Simek, microblaze-uclinux

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
 #define __enable_hw_exceptions()					\
 	__asm__ __volatile__ ("	msrset	r0, %0;				\
 				nop;"					\
diff --git a/arch/microblaze/include/asm/irqflags.h b/arch/microblaze/include/asm/irqflags.h
index c9a6262..3cfe473 100644
--- a/arch/microblaze/include/asm/irqflags.h
+++ b/arch/microblaze/include/asm/irqflags.h
@@ -12,7 +12,7 @@
 #include <linux/types.h>
 #include <asm/registers.h>
 
-#if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR
+#ifdef CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR
 
 static inline notrace unsigned long arch_local_irq_save(void)
 {
diff --git a/arch/microblaze/kernel/entry-nommu.S b/arch/microblaze/kernel/entry-nommu.S
index 34b526f..84f1f87 100644
--- a/arch/microblaze/kernel/entry-nommu.S
+++ b/arch/microblaze/kernel/entry-nommu.S
@@ -18,7 +18,7 @@
 #include <asm/percpu.h>
 #include <asm/signal.h>
 
-#if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR
+#ifdef CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR
 	.macro	disable_irq
 	msrclr r0, MSR_IE
 	.endm
diff --git a/arch/microblaze/kernel/entry.S b/arch/microblaze/kernel/entry.S
index 66e34a3..add11b5 100644
--- a/arch/microblaze/kernel/entry.S
+++ b/arch/microblaze/kernel/entry.S
@@ -49,7 +49,7 @@ syscall_debug_table:
  * This is mucky, but necessary using microblaze version that
  * allows msr ops to write to BIP
  */
-#if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR
+#ifdef CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR
 	.macro	clear_bip
 	msrclr	r0, MSR_BIP
 	.endm
@@ -993,7 +993,7 @@ ENTRY(_reset)
 	/* These are compiled and loaded into high memory, then
 	 * copied into place in mach_early_setup */
 	.section	.init.ivt, "ax"
-#if CONFIG_MANUAL_RESET_VECTOR
+#ifdef CONFIG_MANUAL_RESET_VECTOR
 	.org	0x0
 	brai	CONFIG_MANUAL_RESET_VECTOR
 #endif
diff --git a/arch/microblaze/kernel/setup.c b/arch/microblaze/kernel/setup.c
index 604cd9d..e046199 100644
--- a/arch/microblaze/kernel/setup.c
+++ b/arch/microblaze/kernel/setup.c
@@ -164,7 +164,7 @@ void __init machine_early_init(const char *cmdline, unsigned int ram,
 	printk("New klimit: 0x%08x\n", (unsigned)klimit);
 #endif
 
-#if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR
+#ifdef CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR
 	if (msr)
 		printk("!!!Your kernel has setup MSR instruction but "
 				"CPU don't have it %x\n", msr);
@@ -177,7 +177,7 @@ void __init machine_early_init(const char *cmdline, unsigned int ram,
 	/* Do not copy reset vectors. offset = 0x2 means skip the first
 	 * two instructions. dst is pointer to MB vectors which are placed
 	 * in block ram. If you want to copy reset vector setup offset to 0x0 */
-#if !CONFIG_MANUAL_RESET_VECTOR
+#ifndef CONFIG_MANUAL_RESET_VECTOR
 	offset = 0x2;
 #endif
 	dst = (unsigned long *) (offset * sizeof(u32));
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 3/5] x86: s/#if CONFIG/#ifdef CONFIG/
  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-19 15:11 ` Geert Uytterhoeven
  2012-02-20  8:25   ` Ingo Molnar
  2012-02-19 15:11 ` [PATCH 4/5] input: " Geert Uytterhoeven
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 12+ messages in thread
From: Geert Uytterhoeven @ 2012-02-19 15:11 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: linux-kernel, Geert Uytterhoeven, Thomas Gleixner, Ingo Molnar, x86

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>"
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: x86@kernel.org
---
 arch/x86/boot/compressed/head_32.S |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S
index a055993..a37b117 100644
--- a/arch/x86/boot/compressed/head_32.S
+++ b/arch/x86/boot/compressed/head_32.S
@@ -173,7 +173,7 @@ relocated:
 	call	decompress_kernel
 	addl	$20, %esp
 
-#if CONFIG_RELOCATABLE
+#ifdef CONFIG_RELOCATABLE
 /*
  * Find the address of the relocations.
  */
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 4/5] input: s/#if CONFIG/#ifdef CONFIG/
  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-19 15:11 ` [PATCH 3/5] x86: s/#if CONFIG/#ifdef CONFIG/ Geert Uytterhoeven
@ 2012-02-19 15:11 ` Geert Uytterhoeven
  2012-02-19 15:11 ` [PATCH 5/5] fbdev: " Geert Uytterhoeven
  2012-02-19 20:08 ` [PATCH 1/5] blackfin: " Mike Frysinger
  4 siblings, 0 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2012-02-19 15:11 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: linux-kernel, Geert Uytterhoeven, Dmitry Torokhov, linux-input

On m68k:

drivers/input/misc/twl4030-vibra.c:175:5: warning: "CONFIG_PM" is not defined

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org
---
 drivers/input/misc/twl4030-vibra.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/input/misc/twl4030-vibra.c b/drivers/input/misc/twl4030-vibra.c
index 3765137..2739f32 100644
--- a/drivers/input/misc/twl4030-vibra.c
+++ b/drivers/input/misc/twl4030-vibra.c
@@ -172,7 +172,7 @@ static void twl4030_vibra_close(struct input_dev *input)
 }
 
 /*** Module ***/
-#if CONFIG_PM
+#ifdef CONFIG_PM
 static int twl4030_vibra_suspend(struct device *dev)
 {
 	struct platform_device *pdev = to_platform_device(dev);
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 5/5] fbdev: s/#if CONFIG/#ifdef CONFIG/
  2012-02-19 15:11 [PATCH 1/5] blackfin: s/#if CONFIG/#ifdef CONFIG/ Geert Uytterhoeven
                   ` (2 preceding siblings ...)
  2012-02-19 15:11 ` [PATCH 4/5] input: " Geert Uytterhoeven
@ 2012-02-19 15:11 ` Geert Uytterhoeven
  2012-02-19 22:44   ` Florian Tobias Schandinat
  2012-02-19 20:08 ` [PATCH 1/5] blackfin: " Mike Frysinger
  4 siblings, 1 reply; 12+ messages in thread
From: Geert Uytterhoeven @ 2012-02-19 15:11 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: linux-kernel, Geert Uytterhoeven, Florian Tobias Schandinat, linux-fbdev

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: linux-fbdev@vger.kernel.org
---
 drivers/video/au1100fb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/au1100fb.c b/drivers/video/au1100fb.c
index de9da67..4da1895 100644
--- a/drivers/video/au1100fb.c
+++ b/drivers/video/au1100fb.c
@@ -532,7 +532,7 @@ static int __devinit au1100fb_drv_probe(struct platform_device *dev)
 	for (page = (unsigned long)fbdev->fb_mem;
 	     page < PAGE_ALIGN((unsigned long)fbdev->fb_mem + fbdev->fb_len);
 	     page += PAGE_SIZE) {
-#if CONFIG_DMA_NONCOHERENT
+#ifdef CONFIG_DMA_NONCOHERENT
 		SetPageReserved(virt_to_page(CAC_ADDR((void *)page)));
 #else
 		SetPageReserved(virt_to_page(page));
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/5] blackfin: s/#if CONFIG/#ifdef CONFIG/
  2012-02-19 15:11 [PATCH 1/5] blackfin: s/#if CONFIG/#ifdef CONFIG/ Geert Uytterhoeven
                   ` (3 preceding siblings ...)
  2012-02-19 15:11 ` [PATCH 5/5] fbdev: " Geert Uytterhoeven
@ 2012-02-19 20:08 ` Mike Frysinger
  4 siblings, 0 replies; 12+ messages in thread
From: Mike Frysinger @ 2012-02-19 20:08 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Jiri Kosina, linux-kernel, uclinux-dist-devel

[-- Attachment #1: Type: Text/Plain, Size: 39 bytes --]

thx, pushed to the Blackfin tree
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 5/5] fbdev: s/#if CONFIG/#ifdef CONFIG/
  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
  0 siblings, 1 reply; 12+ messages in thread
From: Florian Tobias Schandinat @ 2012-02-19 22:44 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Jiri Kosina, linux-kernel, linux-fbdev

On 02/19/2012 03:11 PM, Geert Uytterhoeven wrote:
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>

Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
(I assume you want that to go mainline via Jiri's tree)


Best regards,

Florian Tobias Schandinat

> Cc: linux-fbdev@vger.kernel.org
> ---
>  drivers/video/au1100fb.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/video/au1100fb.c b/drivers/video/au1100fb.c
> index de9da67..4da1895 100644
> --- a/drivers/video/au1100fb.c
> +++ b/drivers/video/au1100fb.c
> @@ -532,7 +532,7 @@ static int __devinit au1100fb_drv_probe(struct platform_device *dev)
>  	for (page = (unsigned long)fbdev->fb_mem;
>  	     page < PAGE_ALIGN((unsigned long)fbdev->fb_mem + fbdev->fb_len);
>  	     page += PAGE_SIZE) {
> -#if CONFIG_DMA_NONCOHERENT
> +#ifdef CONFIG_DMA_NONCOHERENT
>  		SetPageReserved(virt_to_page(CAC_ADDR((void *)page)));
>  #else
>  		SetPageReserved(virt_to_page(page));


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [microblaze-linux] [PATCH 2/5] microblaze: s/#if[!] CONFIG/#if[n]def CONFIG/
  2012-02-19 15:11 ` [PATCH 2/5] microblaze: s/#if[!] CONFIG/#if[n]def CONFIG/ Geert Uytterhoeven
@ 2012-02-20  0:27   ` John Williams
  2012-02-20 11:59     ` Geert Uytterhoeven
  0 siblings, 1 reply; 12+ messages in thread
From: John Williams @ 2012-02-20  0:27 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Jiri Kosina, microblaze-uclinux, linux-kernel

Hi Geert,

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.

Regards,

John

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 3/5] x86: s/#if CONFIG/#ifdef CONFIG/
  2012-02-19 15:11 ` [PATCH 3/5] x86: s/#if CONFIG/#ifdef CONFIG/ Geert Uytterhoeven
@ 2012-02-20  8:25   ` Ingo Molnar
  0 siblings, 0 replies; 12+ messages in thread
From: Ingo Molnar @ 2012-02-20  8:25 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Jiri Kosina, linux-kernel, Thomas Gleixner, Ingo Molnar, x86


* Geert Uytterhoeven <geert@linux-m68k.org> wrote:

> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Cc: "H. Peter Anvin" <hpa@zytor.com>"
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: x86@kernel.org
> ---
>  arch/x86/boot/compressed/head_32.S |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S
> index a055993..a37b117 100644
> --- a/arch/x86/boot/compressed/head_32.S
> +++ b/arch/x86/boot/compressed/head_32.S
> @@ -173,7 +173,7 @@ relocated:
>  	call	decompress_kernel
>  	addl	$20, %esp
>  
> -#if CONFIG_RELOCATABLE
> +#ifdef CONFIG_RELOCATABLE
>  /*
>   * Find the address of the relocations.
>   */

I'd really prefer to read an actual "this is safe, because this 
value is defined in the Kconfig as ..." type of commit log 
instead of nothing, which would ensure us that you didnt just do 
a (fundamentally unsafe) sed job over the kernel tree but 
actually have *read* the Kconfig entries in question to ensure 
the correctness of your patches...

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [microblaze-linux] [PATCH 2/5] microblaze: s/#if[!] CONFIG/#if[n]def CONFIG/
  2012-02-20  0:27   ` [microblaze-linux] " John Williams
@ 2012-02-20 11:59     ` Geert Uytterhoeven
  2012-02-20 23:53       ` John Williams
  0 siblings, 1 reply; 12+ messages in thread
From: Geert Uytterhoeven @ 2012-02-20 11:59 UTC (permalink / raw)
  To: John Williams; +Cc: Jiri Kosina, microblaze-uclinux, linux-kernel

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.

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?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [microblaze-linux] [PATCH 2/5] microblaze: s/#if[!] CONFIG/#if[n]def CONFIG/
  2012-02-20 11:59     ` Geert Uytterhoeven
@ 2012-02-20 23:53       ` John Williams
  0 siblings, 0 replies; 12+ messages in thread
From: John Williams @ 2012-02-20 23:53 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Jiri Kosina, microblaze-uclinux, linux-kernel

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 5/5] fbdev: s/#if CONFIG/#ifdef CONFIG/
  2012-02-19 22:44   ` Florian Tobias Schandinat
@ 2012-04-06  0:00     ` Jiri Kosina
  0 siblings, 0 replies; 12+ messages in thread
From: Jiri Kosina @ 2012-04-06  0:00 UTC (permalink / raw)
  To: Florian Tobias Schandinat; +Cc: Geert Uytterhoeven, linux-kernel, linux-fbdev

On Sun, 19 Feb 2012, Florian Tobias Schandinat wrote:

> On 02/19/2012 03:11 PM, Geert Uytterhoeven wrote:
> > Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> > Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
> 
> Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
> (I assume you want that to go mainline via Jiri's tree)

As this doesn't seem to be in linux-next through any other tree as of 
today, I have picked it up.

Thanks,

-- 
Jiri Kosina
SUSE Labs

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2012-04-06  0:00 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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).