diff mbox

[1/4] powerpc: Revert show_regs() define for readability

Message ID 1317905621-5537-1-git-send-email-galak@kernel.crashing.org (mailing list archive)
State Accepted, archived
Delegated to: Benjamin Herrenschmidt
Headers show

Commit Message

Kumar Gala Oct. 6, 2011, 12:53 p.m. UTC
We had an existing ifdef for 4xx & BOOKE processors that got changed to
CONFIG_PPC_ADV_DEBUG_REGS.  The define has nothing to do with
CONFIG_PPC_ADV_DEBUG_REGS.  The define really should be:

 #if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)

and not

 #ifdef CONFIG_PPC_ADV_DEBUG_REGS

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
 arch/powerpc/kernel/process.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Jimi Xenidis Oct. 28, 2011, 7:40 p.m. UTC | #1
On Oct 5, 2011, at 9:53 PM, Kumar Gala wrote:

> We had an existing ifdef for 4xx & BOOKE processors that got changed to
> CONFIG_PPC_ADV_DEBUG_REGS.  The define has nothing to do with
> CONFIG_PPC_ADV_DEBUG_REGS.  The define really should be:
> 
> #if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
> 
> and not
> 
> #ifdef CONFIG_PPC_ADV_DEBUG_REGS
> 
> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
> 
> ---
> arch/powerpc/kernel/process.c |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
> index 8f53954..a1b5981 100644
> --- a/arch/powerpc/kernel/process.c
> +++ b/arch/powerpc/kernel/process.c
> @@ -657,7 +657,7 @@ void show_regs(struct pt_regs * regs)
> 	if ((regs->trap != 0xc00) && cpu_has_feature(CPU_FTR_CFAR))
> 		printk("CFAR: "REG"\n", regs->orig_gpr3);
> 	if (trap == 0x300 || trap == 0x600)
> -#ifdef CONFIG_PPC_ADV_DEBUG_REGS
> +#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
> 		printk("DEAR: "REG", ESR: "REG"\n", regs->dar, regs->dsisr);

I'll be needing "|| defined(CONFIG_PPC_BOOK3E)" added to this please.
-jx


> #else
> 		printk("DAR: "REG", DSISR: %08lx\n", regs->dar, regs->dsisr);
Kumar Gala Oct. 31, 2011, 2:18 p.m. UTC | #2
On Oct 28, 2011, at 2:40 PM, Jimi Xenidis wrote:

> 
> On Oct 5, 2011, at 9:53 PM, Kumar Gala wrote:
> 
>> We had an existing ifdef for 4xx & BOOKE processors that got changed to
>> CONFIG_PPC_ADV_DEBUG_REGS.  The define has nothing to do with
>> CONFIG_PPC_ADV_DEBUG_REGS.  The define really should be:
>> 
>> #if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
>> 
>> and not
>> 
>> #ifdef CONFIG_PPC_ADV_DEBUG_REGS
>> 
>> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
>> 
>> ---
>> arch/powerpc/kernel/process.c |    2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>> 
>> diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
>> index 8f53954..a1b5981 100644
>> --- a/arch/powerpc/kernel/process.c
>> +++ b/arch/powerpc/kernel/process.c
>> @@ -657,7 +657,7 @@ void show_regs(struct pt_regs * regs)
>> 	if ((regs->trap != 0xc00) && cpu_has_feature(CPU_FTR_CFAR))
>> 		printk("CFAR: "REG"\n", regs->orig_gpr3);
>> 	if (trap == 0x300 || trap == 0x600)
>> -#ifdef CONFIG_PPC_ADV_DEBUG_REGS
>> +#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
>> 		printk("DEAR: "REG", ESR: "REG"\n", regs->dar, regs->dsisr);
> 
> I'll be needing "|| defined(CONFIG_PPC_BOOK3E)" added to this please.
> -jx

Under what platform is CONFIG_PPC_BOOK3E set and CONFIG_BOOKE is not?

- k
Jimi Xenidis Oct. 31, 2011, 6:35 p.m. UTC | #3
On Oct 31, 2011, at 9:18 AM, Kumar Gala wrote:

> 
> On Oct 28, 2011, at 2:40 PM, Jimi Xenidis wrote:
> 
>> 
>> On Oct 5, 2011, at 9:53 PM, Kumar Gala wrote:
>> 
>>> We had an existing ifdef for 4xx & BOOKE processors that got changed to
>>> CONFIG_PPC_ADV_DEBUG_REGS.  The define has nothing to do with
>>> CONFIG_PPC_ADV_DEBUG_REGS.  The define really should be:
>>> 
>>> #if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
>>> 
>>> and not
>>> 
>>> #ifdef CONFIG_PPC_ADV_DEBUG_REGS
>>> 
>>> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
>>> 
>>> ---
>>> arch/powerpc/kernel/process.c |    2 +-
>>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>> 
>>> diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
>>> index 8f53954..a1b5981 100644
>>> --- a/arch/powerpc/kernel/process.c
>>> +++ b/arch/powerpc/kernel/process.c
>>> @@ -657,7 +657,7 @@ void show_regs(struct pt_regs * regs)
>>> 	if ((regs->trap != 0xc00) && cpu_has_feature(CPU_FTR_CFAR))
>>> 		printk("CFAR: "REG"\n", regs->orig_gpr3);
>>> 	if (trap == 0x300 || trap == 0x600)
>>> -#ifdef CONFIG_PPC_ADV_DEBUG_REGS
>>> +#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
>>> 		printk("DEAR: "REG", ESR: "REG"\n", regs->dar, regs->dsisr);
>> 
>> I'll be needing "|| defined(CONFIG_PPC_BOOK3E)" added to this please.
>> -jx
> 
> Under what platform is CONFIG_PPC_BOOK3E set and CONFIG_BOOKE is not?

this was a grep typo on my part.  sorry.
-jx


> 
> - k
>
diff mbox

Patch

diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 8f53954..a1b5981 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -657,7 +657,7 @@  void show_regs(struct pt_regs * regs)
 	if ((regs->trap != 0xc00) && cpu_has_feature(CPU_FTR_CFAR))
 		printk("CFAR: "REG"\n", regs->orig_gpr3);
 	if (trap == 0x300 || trap == 0x600)
-#ifdef CONFIG_PPC_ADV_DEBUG_REGS
+#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
 		printk("DEAR: "REG", ESR: "REG"\n", regs->dar, regs->dsisr);
 #else
 		printk("DAR: "REG", DSISR: %08lx\n", regs->dar, regs->dsisr);