All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] powerpc/powernv: Fix CPU_HOTPLUG=n idle.c compile error
@ 2017-05-11 15:15 Nicholas Piggin
  2017-05-11 15:15 ` [PATCH 2/3] powerpc/32: tlbie provide L operand explicitly Nicholas Piggin
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Nicholas Piggin @ 2017-05-11 15:15 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Nicholas Piggin, Gautham R . Shenoy

Fixes: a7cd88da97 ("powerpc/powernv: Move CPU-Offline idle state invocation from smp.c to idle.c")
Cc: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 arch/powerpc/platforms/powernv/idle.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/powerpc/platforms/powernv/idle.c b/arch/powerpc/platforms/powernv/idle.c
index 445f30a2c5ef..0c21747ed7e0 100644
--- a/arch/powerpc/platforms/powernv/idle.c
+++ b/arch/powerpc/platforms/powernv/idle.c
@@ -261,6 +261,7 @@ static u64 pnv_deepest_stop_psscr_val;
 static u64 pnv_deepest_stop_psscr_mask;
 static bool deepest_stop_found;
 
+#ifdef CONFIG_HOTPLUG_CPU
 /*
  * pnv_cpu_offline: A function that puts the CPU into the deepest
  * available platform idle state on a CPU-Offline.
@@ -293,6 +294,7 @@ unsigned long pnv_cpu_offline(unsigned int cpu)
 
 	return srr1;
 }
+#endif
 
 /*
  * Power ISA 3.0 idle initialization.
-- 
2.11.0

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

* [PATCH 2/3] powerpc/32: tlbie provide L operand explicitly
  2017-05-11 15:15 [PATCH 1/3] powerpc/powernv: Fix CPU_HOTPLUG=n idle.c compile error Nicholas Piggin
@ 2017-05-11 15:15 ` Nicholas Piggin
  2017-05-12  3:35   ` Michael Ellerman
  2017-05-11 15:15 ` [PATCH 3/3] powerpc/8xx: xmon compile fix Nicholas Piggin
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 16+ messages in thread
From: Nicholas Piggin @ 2017-05-11 15:15 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Nicholas Piggin, Scott Wood, Christophe Leroy

The single-operand form of tlbie used to be accepted as the second
operand (L) being implicitly 0. Newer binutils reject this.

Change remaining single-op tlbie instructions to have explicit 0
second argument.

Cc: Scott Wood <oss@buserror.net>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 arch/powerpc/include/asm/ppc_asm.h      | 2 +-
 arch/powerpc/kernel/head_32.S           | 2 +-
 arch/powerpc/kernel/head_8xx.S          | 8 ++++----
 arch/powerpc/kernel/swsusp_32.S         | 2 +-
 arch/powerpc/mm/hash_low_32.S           | 8 ++++----
 arch/powerpc/mm/mmu_decl.h              | 2 +-
 arch/powerpc/platforms/powermac/sleep.S | 2 +-
 7 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/arch/powerpc/include/asm/ppc_asm.h b/arch/powerpc/include/asm/ppc_asm.h
index 359c44341761..6e250733912a 100644
--- a/arch/powerpc/include/asm/ppc_asm.h
+++ b/arch/powerpc/include/asm/ppc_asm.h
@@ -418,7 +418,7 @@ END_FTR_SECTION_IFCLR(CPU_FTR_601)
 	lis	r4,KERNELBASE@h;		\
 	.machine push;				\
 	.machine "power4";			\
-0:	tlbie	r4;				\
+0:	tlbie	r4,0;				\
 	.machine pop;				\
 	addi	r4,r4,0x1000;			\
 	bdnz	0b
diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S
index e22734278458..c0be7f9654ac 100644
--- a/arch/powerpc/kernel/head_32.S
+++ b/arch/powerpc/kernel/head_32.S
@@ -1103,7 +1103,7 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_USE_HIGH_BATS)
 flush_tlbs:
 	lis	r10, 0x40
 1:	addic.	r10, r10, -0x1000
-	tlbie	r10
+	tlbie	r10,0
 	bgt	1b
 	sync
 	blr
diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S
index c032fe8c2d26..dda28cad8024 100644
--- a/arch/powerpc/kernel/head_8xx.S
+++ b/arch/powerpc/kernel/head_8xx.S
@@ -317,9 +317,9 @@ SystemCall:
 #ifdef CONFIG_8xx_CPU15
 #define INVALIDATE_ADJACENT_PAGES_CPU15(tmp, addr)	\
 	addi	tmp, addr, PAGE_SIZE;	\
-	tlbie	tmp;			\
+	tlbie	tmp,0;			\
 	addi	tmp, addr, -PAGE_SIZE;	\
-	tlbie	tmp
+	tlbie	tmp,0
 #else
 #define INVALIDATE_ADJACENT_PAGES_CPU15(tmp, addr)
 #endif
@@ -572,7 +572,7 @@ InstructionTLBError:
 	mr	r5,r9
 	andis.	r10,r5,0x4000
 	beq+	1f
-	tlbie	r4
+	tlbie	r4,0
 itlbie:
 	/* 0x400 is InstructionAccess exception, needed by bad_page_fault() */
 1:	EXC_XFER_LITE(0x400, handle_page_fault)
@@ -597,7 +597,7 @@ DARFixed:/* Return from dcbx instruction bug workaround */
 	mfspr	r4,SPRN_DAR
 	andis.	r10,r5,0x4000
 	beq+	1f
-	tlbie	r4
+	tlbie	r4,0
 dtlbie:
 1:	li	r10,RPN_PATTERN
 	mtspr	SPRN_DAR,r10	/* Tag DAR, to be used in DTLB Error */
diff --git a/arch/powerpc/kernel/swsusp_32.S b/arch/powerpc/kernel/swsusp_32.S
index ba4dee3d233f..cb26ab39a8d5 100644
--- a/arch/powerpc/kernel/swsusp_32.S
+++ b/arch/powerpc/kernel/swsusp_32.S
@@ -302,7 +302,7 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_USE_HIGH_BATS)
 	/* Flush all TLBs */
 	lis	r4,0x1000
 1:	addic.	r4,r4,-0x1000
-	tlbie	r4
+	tlbie	r4,0
 	bgt	1b
 	sync
 
diff --git a/arch/powerpc/mm/hash_low_32.S b/arch/powerpc/mm/hash_low_32.S
index 6f962e5cb5e1..31dfbc51a3f1 100644
--- a/arch/powerpc/mm/hash_low_32.S
+++ b/arch/powerpc/mm/hash_low_32.S
@@ -350,7 +350,7 @@ _GLOBAL(hash_page_patch_A)
 	 */
 	andi.	r6,r6,_PAGE_HASHPTE
 	beq+	10f			/* no PTE: go look for an empty slot */
-	tlbie	r4
+	tlbie	r4,0
 
 	addis	r4,r7,htab_hash_searches@ha
 	lwz	r6,htab_hash_searches@l(r4)
@@ -610,7 +610,7 @@ _GLOBAL(flush_hash_patch_B)
 3:	li	r0,0
 	STPTE	r0,0(r12)		/* invalidate entry */
 4:	sync
-	tlbie	r4			/* in hw tlb too */
+	tlbie	r4,0			/* in hw tlb too */
 	sync
 
 8:	ble	cr1,9f			/* if all ptes checked */
@@ -659,7 +659,7 @@ _GLOBAL(_tlbie)
 	stwcx.	r8,0,r9
 	bne-	10b
 	eieio
-	tlbie	r3
+	tlbie	r3,0
 	sync
 	TLBSYNC
 	li	r0,0
@@ -668,7 +668,7 @@ _GLOBAL(_tlbie)
 	SYNC_601
 	isync
 #else /* CONFIG_SMP */
-	tlbie	r3
+	tlbie	r3,0
 	sync
 #endif /* CONFIG_SMP */
 	blr
diff --git a/arch/powerpc/mm/mmu_decl.h b/arch/powerpc/mm/mmu_decl.h
index f988db655e5b..9b9e780b8003 100644
--- a/arch/powerpc/mm/mmu_decl.h
+++ b/arch/powerpc/mm/mmu_decl.h
@@ -55,7 +55,7 @@ extern void _tlbil_pid_noind(unsigned int pid);
 static inline void _tlbil_va(unsigned long address, unsigned int pid,
 			     unsigned int tsize, unsigned int ind)
 {
-	asm volatile ("tlbie %0; sync" : : "r" (address) : "memory");
+	asm volatile ("tlbie %0,0; sync" : : "r" (address) : "memory");
 }
 #elif defined(CONFIG_PPC_BOOK3E)
 extern void _tlbil_va(unsigned long address, unsigned int pid,
diff --git a/arch/powerpc/platforms/powermac/sleep.S b/arch/powerpc/platforms/powermac/sleep.S
index 1c2802fabd57..7991ae5b83f6 100644
--- a/arch/powerpc/platforms/powermac/sleep.S
+++ b/arch/powerpc/platforms/powermac/sleep.S
@@ -347,7 +347,7 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_USE_HIGH_BATS)
 	/* Flush all TLBs */
 	lis	r4,0x1000
 1:	addic.	r4,r4,-0x1000
-	tlbie	r4
+	tlbie	r4,0
 	blt	1b
 	sync
 
-- 
2.11.0

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

* [PATCH 3/3] powerpc/8xx: xmon compile fix
  2017-05-11 15:15 [PATCH 1/3] powerpc/powernv: Fix CPU_HOTPLUG=n idle.c compile error Nicholas Piggin
  2017-05-11 15:15 ` [PATCH 2/3] powerpc/32: tlbie provide L operand explicitly Nicholas Piggin
@ 2017-05-11 15:15 ` Nicholas Piggin
  2017-05-11 17:14   ` christophe leroy
  2017-05-12  9:19 ` [PATCH 1/3] powerpc/powernv: Fix CPU_HOTPLUG=n idle.c compile error Gautham R Shenoy
  2017-05-30  9:11 ` [1/3] " Michael Ellerman
  3 siblings, 1 reply; 16+ messages in thread
From: Nicholas Piggin @ 2017-05-11 15:15 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Nicholas Piggin, Scott Wood, Christophe Leroy

Cc: Scott Wood <oss@buserror.net>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 arch/powerpc/xmon/xmon.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index f11f65634aab..ec420b0e6e88 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -1242,10 +1242,13 @@ bpt_cmds(void)
 {
 	int cmd;
 	unsigned long a;
-	int mode, i;
+	int i;
 	struct bpt *bp;
+#ifndef CONFIG_8xx
+	int mode;
 	const char badaddr[] = "Only kernel addresses are permitted "
 		"for breakpoints\n";
+#endif
 
 	cmd = inchar();
 	switch (cmd) {
-- 
2.11.0

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

* Re: [PATCH 3/3] powerpc/8xx: xmon compile fix
  2017-05-11 15:15 ` [PATCH 3/3] powerpc/8xx: xmon compile fix Nicholas Piggin
@ 2017-05-11 17:14   ` christophe leroy
  2017-05-11 18:52     ` christophe leroy
  0 siblings, 1 reply; 16+ messages in thread
From: christophe leroy @ 2017-05-11 17:14 UTC (permalink / raw)
  To: Nicholas Piggin, linuxppc-dev; +Cc: Scott Wood



Le 11/05/2017 à 17:15, Nicholas Piggin a écrit :
> Cc: Scott Wood <oss@buserror.net>
> Cc: Christophe Leroy <christophe.leroy@c-s.fr>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> ---
>  arch/powerpc/xmon/xmon.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
> index f11f65634aab..ec420b0e6e88 100644
> --- a/arch/powerpc/xmon/xmon.c
> +++ b/arch/powerpc/xmon/xmon.c
> @@ -1242,10 +1242,13 @@ bpt_cmds(void)
>  {
>  	int cmd;
>  	unsigned long a;
> -	int mode, i;
> +	int i;
>  	struct bpt *bp;
> +#ifndef CONFIG_8xx

Would be better to use CONFIG_PPC_8xx

As stated in arch/powerpc/platform/Kconfig.cputype, CONFIG_8xx is temp 
to handle compat with arch/ppc, and we are trying to get rid of it

Christophe



> +	int mode;
>  	const char badaddr[] = "Only kernel addresses are permitted "
>  		"for breakpoints\n";
> +#endif
>
>  	cmd = inchar();
>  	switch (cmd) {
>

---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus

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

* Re: [PATCH 3/3] powerpc/8xx: xmon compile fix
  2017-05-11 17:14   ` christophe leroy
@ 2017-05-11 18:52     ` christophe leroy
  2017-05-11 19:30       ` Nicholas Piggin
  2017-05-12  0:47       ` Nicholas Piggin
  0 siblings, 2 replies; 16+ messages in thread
From: christophe leroy @ 2017-05-11 18:52 UTC (permalink / raw)
  To: Nicholas Piggin, linuxppc-dev; +Cc: Scott Wood



Le 11/05/2017 à 19:14, christophe leroy a écrit :
>
>
> Le 11/05/2017 à 17:15, Nicholas Piggin a écrit :
>> Cc: Scott Wood <oss@buserror.net>
>> Cc: Christophe Leroy <christophe.leroy@c-s.fr>
>> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
>> ---
>>  arch/powerpc/xmon/xmon.c | 5 ++++-
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
>> index f11f65634aab..ec420b0e6e88 100644
>> --- a/arch/powerpc/xmon/xmon.c
>> +++ b/arch/powerpc/xmon/xmon.c
>> @@ -1242,10 +1242,13 @@ bpt_cmds(void)
>>  {
>>      int cmd;
>>      unsigned long a;
>> -    int mode, i;
>> +    int i;
>>      struct bpt *bp;
>> +#ifndef CONFIG_8xx
>
> Would be better to use CONFIG_PPC_8xx
>
> As stated in arch/powerpc/platform/Kconfig.cputype, CONFIG_8xx is temp
> to handle compat with arch/ppc, and we are trying to get rid of it

I had the same comment in https://patchwork.ozlabs.org/patch/700354/
I also suggested to move the relevant declarations inside the switch()

Christophe

>
> Christophe
>
>
>
>> +    int mode;
>>      const char badaddr[] = "Only kernel addresses are permitted "
>>          "for breakpoints\n";
>> +#endif
>>
>>      cmd = inchar();
>>      switch (cmd) {
>>
>
> ---
> L'absence de virus dans ce courrier électronique a été vérifiée par le
> logiciel antivirus Avast.
> https://www.avast.com/antivirus

---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus

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

* Re: [PATCH 3/3] powerpc/8xx: xmon compile fix
  2017-05-11 18:52     ` christophe leroy
@ 2017-05-11 19:30       ` Nicholas Piggin
  2017-05-12  0:47       ` Nicholas Piggin
  1 sibling, 0 replies; 16+ messages in thread
From: Nicholas Piggin @ 2017-05-11 19:30 UTC (permalink / raw)
  To: christophe leroy; +Cc: linuxppc-dev, Scott Wood

On Thu, 11 May 2017 20:52:56 +0200
christophe leroy <christophe.leroy@c-s.fr> wrote:

> Le 11/05/2017 à 19:14, christophe leroy a écrit :
> >
> >
> > Le 11/05/2017 à 17:15, Nicholas Piggin a écrit :  
> >> Cc: Scott Wood <oss@buserror.net>
> >> Cc: Christophe Leroy <christophe.leroy@c-s.fr>
> >> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> >> ---
> >>  arch/powerpc/xmon/xmon.c | 5 ++++-
> >>  1 file changed, 4 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
> >> index f11f65634aab..ec420b0e6e88 100644
> >> --- a/arch/powerpc/xmon/xmon.c
> >> +++ b/arch/powerpc/xmon/xmon.c
> >> @@ -1242,10 +1242,13 @@ bpt_cmds(void)
> >>  {
> >>      int cmd;
> >>      unsigned long a;
> >> -    int mode, i;
> >> +    int i;
> >>      struct bpt *bp;
> >> +#ifndef CONFIG_8xx  
> >
> > Would be better to use CONFIG_PPC_8xx
> >
> > As stated in arch/powerpc/platform/Kconfig.cputype, CONFIG_8xx is temp
> > to handle compat with arch/ppc, and we are trying to get rid of it  
> 
> I had the same comment in https://patchwork.ozlabs.org/patch/700354/
> I also suggested to move the relevant declarations inside the switch()

Apologies, you did. I was just cleaning out an old backlog of
patches and I forgot about your comments. Sorry, I'll resend
the patch.

Thanks,
Nick

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

* Re: [PATCH 3/3] powerpc/8xx: xmon compile fix
  2017-05-11 18:52     ` christophe leroy
  2017-05-11 19:30       ` Nicholas Piggin
@ 2017-05-12  0:47       ` Nicholas Piggin
  2017-05-12  5:37         ` Christophe LEROY
                           ` (2 more replies)
  1 sibling, 3 replies; 16+ messages in thread
From: Nicholas Piggin @ 2017-05-12  0:47 UTC (permalink / raw)
  To: christophe leroy; +Cc: linuxppc-dev, Scott Wood

On Thu, 11 May 2017 20:52:56 +0200
christophe leroy <christophe.leroy@c-s.fr> wrote:

> Le 11/05/2017 à 19:14, christophe leroy a écrit :
> >
> >
> > Le 11/05/2017 à 17:15, Nicholas Piggin a écrit :  
> >> Cc: Scott Wood <oss@buserror.net>
> >> Cc: Christophe Leroy <christophe.leroy@c-s.fr>
> >> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> >> ---
> >>  arch/powerpc/xmon/xmon.c | 5 ++++-
> >>  1 file changed, 4 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
> >> index f11f65634aab..ec420b0e6e88 100644
> >> --- a/arch/powerpc/xmon/xmon.c
> >> +++ b/arch/powerpc/xmon/xmon.c
> >> @@ -1242,10 +1242,13 @@ bpt_cmds(void)
> >>  {
> >>      int cmd;
> >>      unsigned long a;
> >> -    int mode, i;
> >> +    int i;
> >>      struct bpt *bp;
> >> +#ifndef CONFIG_8xx  
> >
> > Would be better to use CONFIG_PPC_8xx
> >
> > As stated in arch/powerpc/platform/Kconfig.cputype, CONFIG_8xx is temp
> > to handle compat with arch/ppc, and we are trying to get rid of it  
> 
> I had the same comment in https://patchwork.ozlabs.org/patch/700354/
> I also suggested to move the relevant declarations inside the switch()

How's this one?

---
 arch/powerpc/xmon/xmon.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index f11f65634aab..438fdb0fb142 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -1242,14 +1242,16 @@ bpt_cmds(void)
 {
 	int cmd;
 	unsigned long a;
-	int mode, i;
+	int i;
 	struct bpt *bp;
-	const char badaddr[] = "Only kernel addresses are permitted "
-		"for breakpoints\n";
 
 	cmd = inchar();
 	switch (cmd) {
-#ifndef CONFIG_8xx
+#ifndef CONFIG_PPC_8xx
+	int mode;
+	const char badaddr[] = "Only kernel addresses are permitted "
+		"for breakpoints\n";
+
 	case 'd':	/* bd - hardware data breakpoint */
 		mode = 7;
 		cmd = inchar();
-- 
2.11.0

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

* Re: [PATCH 2/3] powerpc/32: tlbie provide L operand explicitly
  2017-05-11 15:15 ` [PATCH 2/3] powerpc/32: tlbie provide L operand explicitly Nicholas Piggin
@ 2017-05-12  3:35   ` Michael Ellerman
  2017-05-12 10:31     ` Nick Piggin
  0 siblings, 1 reply; 16+ messages in thread
From: Michael Ellerman @ 2017-05-12  3:35 UTC (permalink / raw)
  To: Nicholas Piggin, linuxppc-dev; +Cc: Scott Wood, Nicholas Piggin

Nicholas Piggin <npiggin@gmail.com> writes:

> The single-operand form of tlbie used to be accepted as the second
> operand (L) being implicitly 0. Newer binutils reject this.
>
> Change remaining single-op tlbie instructions to have explicit 0
> second argument.

Do old(er) binutils accept the two operand version?

cheers

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

* Re: [PATCH 3/3] powerpc/8xx: xmon compile fix
  2017-05-12  0:47       ` Nicholas Piggin
@ 2017-05-12  5:37         ` Christophe LEROY
  2017-05-26  7:24         ` Michael Ellerman
  2017-05-30  9:11         ` [3/3] " Michael Ellerman
  2 siblings, 0 replies; 16+ messages in thread
From: Christophe LEROY @ 2017-05-12  5:37 UTC (permalink / raw)
  To: Nicholas Piggin; +Cc: linuxppc-dev, Scott Wood



Le 12/05/2017 à 02:47, Nicholas Piggin a écrit :
> On Thu, 11 May 2017 20:52:56 +0200
> christophe leroy <christophe.leroy@c-s.fr> wrote:
>
>> Le 11/05/2017 à 19:14, christophe leroy a écrit :
>>>
>>>
>>> Le 11/05/2017 à 17:15, Nicholas Piggin a écrit :
>>>> Cc: Scott Wood <oss@buserror.net>
>>>> Cc: Christophe Leroy <christophe.leroy@c-s.fr>
>>>> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
>>>> ---
>>>>  arch/powerpc/xmon/xmon.c | 5 ++++-
>>>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
>>>> index f11f65634aab..ec420b0e6e88 100644
>>>> --- a/arch/powerpc/xmon/xmon.c
>>>> +++ b/arch/powerpc/xmon/xmon.c
>>>> @@ -1242,10 +1242,13 @@ bpt_cmds(void)
>>>>  {
>>>>      int cmd;
>>>>      unsigned long a;
>>>> -    int mode, i;
>>>> +    int i;
>>>>      struct bpt *bp;
>>>> +#ifndef CONFIG_8xx
>>>
>>> Would be better to use CONFIG_PPC_8xx
>>>
>>> As stated in arch/powerpc/platform/Kconfig.cputype, CONFIG_8xx is temp
>>> to handle compat with arch/ppc, and we are trying to get rid of it
>>
>> I had the same comment in https://patchwork.ozlabs.org/patch/700354/
>> I also suggested to move the relevant declarations inside the switch()
>
> How's this one?

Looks good.

Christophe

>
> ---
>  arch/powerpc/xmon/xmon.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
> index f11f65634aab..438fdb0fb142 100644
> --- a/arch/powerpc/xmon/xmon.c
> +++ b/arch/powerpc/xmon/xmon.c
> @@ -1242,14 +1242,16 @@ bpt_cmds(void)
>  {
>  	int cmd;
>  	unsigned long a;
> -	int mode, i;
> +	int i;
>  	struct bpt *bp;
> -	const char badaddr[] = "Only kernel addresses are permitted "
> -		"for breakpoints\n";
>
>  	cmd = inchar();
>  	switch (cmd) {
> -#ifndef CONFIG_8xx
> +#ifndef CONFIG_PPC_8xx
> +	int mode;
> +	const char badaddr[] = "Only kernel addresses are permitted "
> +		"for breakpoints\n";
> +
>  	case 'd':	/* bd - hardware data breakpoint */
>  		mode = 7;
>  		cmd = inchar();
>

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

* Re: [PATCH 1/3] powerpc/powernv: Fix CPU_HOTPLUG=n idle.c compile error
  2017-05-11 15:15 [PATCH 1/3] powerpc/powernv: Fix CPU_HOTPLUG=n idle.c compile error Nicholas Piggin
  2017-05-11 15:15 ` [PATCH 2/3] powerpc/32: tlbie provide L operand explicitly Nicholas Piggin
  2017-05-11 15:15 ` [PATCH 3/3] powerpc/8xx: xmon compile fix Nicholas Piggin
@ 2017-05-12  9:19 ` Gautham R Shenoy
  2017-05-30  9:11 ` [1/3] " Michael Ellerman
  3 siblings, 0 replies; 16+ messages in thread
From: Gautham R Shenoy @ 2017-05-12  9:19 UTC (permalink / raw)
  To: Nicholas Piggin; +Cc: linuxppc-dev, Gautham R . Shenoy

Hi Nick,
On Fri, May 12, 2017 at 01:15:20AM +1000, Nicholas Piggin wrote:
> Fixes: a7cd88da97 ("powerpc/powernv: Move CPU-Offline idle state invocation from smp.c to idle.c")
> Cc: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> ---
>  arch/powerpc/platforms/powernv/idle.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/powerpc/platforms/powernv/idle.c b/arch/powerpc/platforms/powernv/idle.c
> index 445f30a2c5ef..0c21747ed7e0 100644
> --- a/arch/powerpc/platforms/powernv/idle.c
> +++ b/arch/powerpc/platforms/powernv/idle.c
> @@ -261,6 +261,7 @@ static u64 pnv_deepest_stop_psscr_val;
>  static u64 pnv_deepest_stop_psscr_mask;
>  static bool deepest_stop_found;
> 
> +#ifdef CONFIG_HOTPLUG_CPU
>  /*
>   * pnv_cpu_offline: A function that puts the CPU into the deepest
>   * available platform idle state on a CPU-Offline.
> @@ -293,6 +294,7 @@ unsigned long pnv_cpu_offline(unsigned int cpu)
> 
>  	return srr1;
>  }
> +#endif

Looks like the updated verison of "powerpc/powernv: Move CPU-Offline
idle state invocation from smp.c to idle.c"
(https://lkml.org/lkml/2017/3/30/235) wasn't picked.

Thanks for catching this!
Acked-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>

> 
>  /*
>   * Power ISA 3.0 idle initialization.
> -- 
> 2.11.0
> 

--
Thanks and Regards
gautham.

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

* Re: [PATCH 2/3] powerpc/32: tlbie provide L operand explicitly
  2017-05-12  3:35   ` Michael Ellerman
@ 2017-05-12 10:31     ` Nick Piggin
  0 siblings, 0 replies; 16+ messages in thread
From: Nick Piggin @ 2017-05-12 10:31 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: open list:LINUX FOR POWERPC (32-BIT AND 64-BIT), Scott Wood

[-- Attachment #1: Type: text/plain, Size: 691 bytes --]

On 12 May 2017 at 13:35, Michael Ellerman <mpe@ellerman.id.au> wrote:

> Nicholas Piggin <npiggin@gmail.com> writes:
>
> > The single-operand form of tlbie used to be accepted as the second
> > operand (L) being implicitly 0. Newer binutils reject this.
> >
> > Change remaining single-op tlbie instructions to have explicit 0
> > second argument.
>
> Do old(er) binutils accept the two operand version?
>

They should going back to 2002, but now I dig further into it, the problem
is
my cross compiler that is not setting the cpu / ISA version correctly. So
powerpc32 CPUs with current binutils tlbie second parameter is still
optional
AFAIKS.

So this patch is not required.

Thanks,
Nick

[-- Attachment #2: Type: text/html, Size: 1207 bytes --]

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

* Re: [PATCH 3/3] powerpc/8xx: xmon compile fix
  2017-05-12  0:47       ` Nicholas Piggin
  2017-05-12  5:37         ` Christophe LEROY
@ 2017-05-26  7:24         ` Michael Ellerman
  2017-05-26 16:20           ` David Laight
  2017-05-30  9:11         ` [3/3] " Michael Ellerman
  2 siblings, 1 reply; 16+ messages in thread
From: Michael Ellerman @ 2017-05-26  7:24 UTC (permalink / raw)
  To: Nicholas Piggin, christophe leroy; +Cc: Scott Wood, linuxppc-dev

Nicholas Piggin <npiggin@gmail.com> writes:
> diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
> index f11f65634aab..438fdb0fb142 100644
> --- a/arch/powerpc/xmon/xmon.c
> +++ b/arch/powerpc/xmon/xmon.c
> @@ -1242,14 +1242,16 @@ bpt_cmds(void)
>  {
>  	int cmd;
>  	unsigned long a;
> -	int mode, i;
> +	int i;
>  	struct bpt *bp;
> -	const char badaddr[] =3D "Only kernel addresses are permitted "
> -		"for breakpoints\n";
>=20=20
>  	cmd =3D inchar();
>  	switch (cmd) {
> -#ifndef CONFIG_8xx
> +#ifndef CONFIG_PPC_8xx
> +	int mode;
> +	const char badaddr[] =3D "Only kernel addresses are permitted "
> +		"for breakpoints\n";
> +
>  	case 'd':	/* bd - hardware data breakpoint */
>  		mode =3D 7;
>  		cmd =3D inchar();

GCC 7 rejects this:

  arch/powerpc/xmon/xmon.c: In function =E2=80=98bpt_cmds=E2=80=99:
  arch/powerpc/xmon/xmon.c:1252:13: error: statement will never be executed=
 [-Werror=3Dswitch-unreachable]
    const char badaddr[] =3D "Only kernel addresses are permitted for break=
points\n";
               ^~~~~~~

I'll go back to the earlier version.

cheers

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

* RE: [PATCH 3/3] powerpc/8xx: xmon compile fix
  2017-05-26  7:24         ` Michael Ellerman
@ 2017-05-26 16:20           ` David Laight
  2017-05-29  5:21             ` Michael Ellerman
  0 siblings, 1 reply; 16+ messages in thread
From: David Laight @ 2017-05-26 16:20 UTC (permalink / raw)
  To: 'Michael Ellerman', Nicholas Piggin, christophe leroy
  Cc: Scott Wood, linuxppc-dev

RnJvbTogIE1pY2hhZWwgRWxsZXJtYW4NCj4gU2VudDogMjYgTWF5IDIwMTcgMDg6MjQNCj4gTmlj
aG9sYXMgUGlnZ2luIDxucGlnZ2luQGdtYWlsLmNvbT4gd3JpdGVzOg0KPiA+IGRpZmYgLS1naXQg
YS9hcmNoL3Bvd2VycGMveG1vbi94bW9uLmMgYi9hcmNoL3Bvd2VycGMveG1vbi94bW9uLmMNCj4g
PiBpbmRleCBmMTFmNjU2MzRhYWIuLjQzOGZkYjBmYjE0MiAxMDA2NDQNCj4gPiAtLS0gYS9hcmNo
L3Bvd2VycGMveG1vbi94bW9uLmMNCj4gPiArKysgYi9hcmNoL3Bvd2VycGMveG1vbi94bW9uLmMN
Cj4gPiBAQCAtMTI0MiwxNCArMTI0MiwxNiBAQCBicHRfY21kcyh2b2lkKQ0KPiA+ICB7DQo+ID4g
IAlpbnQgY21kOw0KPiA+ICAJdW5zaWduZWQgbG9uZyBhOw0KPiA+IC0JaW50IG1vZGUsIGk7DQo+
ID4gKwlpbnQgaTsNCj4gPiAgCXN0cnVjdCBicHQgKmJwOw0KPiA+IC0JY29uc3QgY2hhciBiYWRh
ZGRyW10gPSAiT25seSBrZXJuZWwgYWRkcmVzc2VzIGFyZSBwZXJtaXR0ZWQgIg0KPiA+IC0JCSJm
b3IgYnJlYWtwb2ludHNcbiI7DQo+ID4NCj4gPiAgCWNtZCA9IGluY2hhcigpOw0KPiA+ICAJc3dp
dGNoIChjbWQpIHsNCj4gPiAtI2lmbmRlZiBDT05GSUdfOHh4DQo+ID4gKyNpZm5kZWYgQ09ORklH
X1BQQ184eHgNCj4gPiArCWludCBtb2RlOw0KPiA+ICsJY29uc3QgY2hhciBiYWRhZGRyW10gPSAi
T25seSBrZXJuZWwgYWRkcmVzc2VzIGFyZSBwZXJtaXR0ZWQgIg0KPiA+ICsJCSJmb3IgYnJlYWtw
b2ludHNcbiI7DQo+ID4gKw0KPiA+ICAJY2FzZSAnZCc6CS8qIGJkIC0gaGFyZHdhcmUgZGF0YSBi
cmVha3BvaW50ICovDQo+ID4gIAkJbW9kZSA9IDc7DQo+ID4gIAkJY21kID0gaW5jaGFyKCk7DQo+
IA0KPiBHQ0MgNyByZWplY3RzIHRoaXM6DQo+IA0KPiAgIGFyY2gvcG93ZXJwYy94bW9uL3htb24u
YzogSW4gZnVuY3Rpb24gYnB0X2NtZHM6DQo+ICAgYXJjaC9wb3dlcnBjL3htb24veG1vbi5jOjEy
NTI6MTM6IGVycm9yOiBzdGF0ZW1lbnQgd2lsbCBuZXZlciBiZSBleGVjdXRlZCBbLVdlcnJvcj1z
d2l0Y2gtDQo+IHVucmVhY2hhYmxlXQ0KPiAgICAgY29uc3QgY2hhciBiYWRhZGRyW10gPSAiT25s
eSBrZXJuZWwgYWRkcmVzc2VzIGFyZSBwZXJtaXR0ZWQgZm9yIGJyZWFrcG9pbnRzXG4iOw0KPiAg
ICAgICAgICAgICAgICBefn5+fn5+DQoNClRyeSAnc3RhdGljJyA/DQoNCglEYXZpZA0KDQo=

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

* RE: [PATCH 3/3] powerpc/8xx: xmon compile fix
  2017-05-26 16:20           ` David Laight
@ 2017-05-29  5:21             ` Michael Ellerman
  0 siblings, 0 replies; 16+ messages in thread
From: Michael Ellerman @ 2017-05-29  5:21 UTC (permalink / raw)
  To: David Laight, Nicholas Piggin, christophe leroy; +Cc: Scott Wood, linuxppc-dev

David Laight <David.Laight@ACULAB.COM> writes:

> From:  Michael Ellerman
>> Sent: 26 May 2017 08:24
>> Nicholas Piggin <npiggin@gmail.com> writes:
>> > diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
>> > index f11f65634aab..438fdb0fb142 100644
>> > --- a/arch/powerpc/xmon/xmon.c
>> > +++ b/arch/powerpc/xmon/xmon.c
>> > @@ -1242,14 +1242,16 @@ bpt_cmds(void)
>> >  {
>> >  	int cmd;
>> >  	unsigned long a;
>> > -	int mode, i;
>> > +	int i;
>> >  	struct bpt *bp;
>> > -	const char badaddr[] = "Only kernel addresses are permitted "
>> > -		"for breakpoints\n";
>> >
>> >  	cmd = inchar();
>> >  	switch (cmd) {
>> > -#ifndef CONFIG_8xx
>> > +#ifndef CONFIG_PPC_8xx
>> > +	int mode;
>> > +	const char badaddr[] = "Only kernel addresses are permitted "
>> > +		"for breakpoints\n";
>> > +
>> >  	case 'd':	/* bd - hardware data breakpoint */
>> >  		mode = 7;
>> >  		cmd = inchar();
>> 
>> GCC 7 rejects this:
>> 
>>   arch/powerpc/xmon/xmon.c: In function bpt_cmds:
>>   arch/powerpc/xmon/xmon.c:1252:13: error: statement will never be executed [-Werror=switch-
>> unreachable]
>>     const char badaddr[] = "Only kernel addresses are permitted for breakpoints\n";
>>                ^~~~~~~
>
> Try 'static' ?

Yep that works, will rebase this again ... O_o

cheers

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

* Re: [1/3] powerpc/powernv: Fix CPU_HOTPLUG=n idle.c compile error
  2017-05-11 15:15 [PATCH 1/3] powerpc/powernv: Fix CPU_HOTPLUG=n idle.c compile error Nicholas Piggin
                   ` (2 preceding siblings ...)
  2017-05-12  9:19 ` [PATCH 1/3] powerpc/powernv: Fix CPU_HOTPLUG=n idle.c compile error Gautham R Shenoy
@ 2017-05-30  9:11 ` Michael Ellerman
  3 siblings, 0 replies; 16+ messages in thread
From: Michael Ellerman @ 2017-05-30  9:11 UTC (permalink / raw)
  To: Nicholas Piggin, linuxppc-dev; +Cc: Gautham R . Shenoy, Nicholas Piggin

On Thu, 2017-05-11 at 15:15:20 UTC, Nicholas Piggin wrote:
> Fixes: a7cd88da97 ("powerpc/powernv: Move CPU-Offline idle state invocation from smp.c to idle.c")
> Cc: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> Acked-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/67d20418088680d22037119d914982

cheers

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

* Re: [3/3] powerpc/8xx: xmon compile fix
  2017-05-12  0:47       ` Nicholas Piggin
  2017-05-12  5:37         ` Christophe LEROY
  2017-05-26  7:24         ` Michael Ellerman
@ 2017-05-30  9:11         ` Michael Ellerman
  2 siblings, 0 replies; 16+ messages in thread
From: Michael Ellerman @ 2017-05-30  9:11 UTC (permalink / raw)
  To: Nicholas Piggin, christophe leroy; +Cc: Scott Wood, linuxppc-dev

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1417 bytes --]

On Fri, 2017-05-12 at 00:47:07 UTC, Nicholas Piggin wrote:
> On Thu, 11 May 2017 20:52:56 +0200
> christophe leroy <christophe.leroy@c-s.fr> wrote:
> 
> > Le 11/05/2017 à 19:14, christophe leroy a écrit :
> > >
> > >
> > > Le 11/05/2017 à 17:15, Nicholas Piggin a écrit :  
> > >> Cc: Scott Wood <oss@buserror.net>
> > >> Cc: Christophe Leroy <christophe.leroy@c-s.fr>
> > >> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> > >> ---
> > >>  arch/powerpc/xmon/xmon.c | 5 ++++-
> > >>  1 file changed, 4 insertions(+), 1 deletion(-)
> > >>
> > >> diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
> > >> index f11f65634aab..ec420b0e6e88 100644
> > >> --- a/arch/powerpc/xmon/xmon.c
> > >> +++ b/arch/powerpc/xmon/xmon.c
> > >> @@ -1242,10 +1242,13 @@ bpt_cmds(void)
> > >>  {
> > >>      int cmd;
> > >>      unsigned long a;
> > >> -    int mode, i;
> > >> +    int i;
> > >>      struct bpt *bp;
> > >> +#ifndef CONFIG_8xx  
> > >
> > > Would be better to use CONFIG_PPC_8xx
> > >
> > > As stated in arch/powerpc/platform/Kconfig.cputype, CONFIG_8xx is temp
> > > to handle compat with arch/ppc, and we are trying to get rid of it  
> > 
> > I had the same comment in https://patchwork.ozlabs.org/patch/700354/
> > I also suggested to move the relevant declarations inside the switch()

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/09b6c1129f899c72d70b8bea360206

cheers

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

end of thread, other threads:[~2017-05-30  9:11 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-11 15:15 [PATCH 1/3] powerpc/powernv: Fix CPU_HOTPLUG=n idle.c compile error Nicholas Piggin
2017-05-11 15:15 ` [PATCH 2/3] powerpc/32: tlbie provide L operand explicitly Nicholas Piggin
2017-05-12  3:35   ` Michael Ellerman
2017-05-12 10:31     ` Nick Piggin
2017-05-11 15:15 ` [PATCH 3/3] powerpc/8xx: xmon compile fix Nicholas Piggin
2017-05-11 17:14   ` christophe leroy
2017-05-11 18:52     ` christophe leroy
2017-05-11 19:30       ` Nicholas Piggin
2017-05-12  0:47       ` Nicholas Piggin
2017-05-12  5:37         ` Christophe LEROY
2017-05-26  7:24         ` Michael Ellerman
2017-05-26 16:20           ` David Laight
2017-05-29  5:21             ` Michael Ellerman
2017-05-30  9:11         ` [3/3] " Michael Ellerman
2017-05-12  9:19 ` [PATCH 1/3] powerpc/powernv: Fix CPU_HOTPLUG=n idle.c compile error Gautham R Shenoy
2017-05-30  9:11 ` [1/3] " Michael Ellerman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.