[PATCH 1/3] powerpc/powernv: Fix CPU_HOTPLUG=n idle.c compile error

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE3354d

16 messages, 6 authors, 2017-05-30 · open the first message on its own page

[PATCH 1/3] powerpc/powernv: Fix CPU_HOTPLUG=n idle.c compile error

From: Nicholas Piggin <npiggin@gmail.com>
Date: 2017-05-11 15:15:43

Fixes: a7cd88da97 ("powerpc/powernv: Move CPU-Offline idle state invocation from smp.c to idle.c")
Cc: Gautham R. Shenoy <redacted>
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

[PATCH 2/3] powerpc/32: tlbie provide L operand explicitly

From: Nicholas Piggin <npiggin@gmail.com>
Date: 2017-05-11 15:15:47

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 <redacted>
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

[PATCH 3/3] powerpc/8xx: xmon compile fix

From: Nicholas Piggin <npiggin@gmail.com>
Date: 2017-05-11 15:15:52

Cc: Scott Wood <oss@buserror.net>
Cc: Christophe Leroy <redacted>
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

Re: [PATCH 3/3] powerpc/8xx: xmon compile fix

From: christophe leroy <hidden>
Date: 2017-05-11 17:14:09


Le 11/05/2017 à 17:15, Nicholas Piggin a écrit :
quoted hunk
Cc: Scott Wood <oss@buserror.net>
Cc: Christophe Leroy <redacted>
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

Re: [PATCH 3/3] powerpc/8xx: xmon compile fix

From: christophe leroy <hidden>
Date: 2017-05-11 18:53:03


Le 11/05/2017 à 19:14, christophe leroy a écrit :

Le 11/05/2017 à 17:15, Nicholas Piggin a écrit :
quoted
Cc: Scott Wood <oss@buserror.net>
Cc: Christophe Leroy <redacted>
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


quoted
+    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

Re: [PATCH 3/3] powerpc/8xx: xmon compile fix

From: Nicholas Piggin <npiggin@gmail.com>
Date: 2017-05-11 19:31:10

On Thu, 11 May 2017 20:52:56 +0200
christophe leroy [off-list ref] wrote:
Le 11/05/2017 à 19:14, christophe leroy a écrit :
quoted

Le 11/05/2017 à 17:15, Nicholas Piggin a écrit :  
quoted
Cc: Scott Wood <oss@buserror.net>
Cc: Christophe Leroy <redacted>
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

Re: [PATCH 3/3] powerpc/8xx: xmon compile fix

From: Nicholas Piggin <npiggin@gmail.com>
Date: 2017-05-12 00:47:23

On Thu, 11 May 2017 20:52:56 +0200
christophe leroy [off-list ref] wrote:
Le 11/05/2017 à 19:14, christophe leroy a écrit :
quoted

Le 11/05/2017 à 17:15, Nicholas Piggin a écrit :  
quoted
Cc: Scott Wood <oss@buserror.net>
Cc: Christophe Leroy <redacted>
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

Re: [PATCH 2/3] powerpc/32: tlbie provide L operand explicitly

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2017-05-12 03:35:49

Nicholas Piggin [off-list ref] 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

Re: [PATCH 3/3] powerpc/8xx: xmon compile fix

From: Christophe LEROY <hidden>
Date: 2017-05-12 05:38:03


Le 12/05/2017 à 02:47, Nicholas Piggin a écrit :
On Thu, 11 May 2017 20:52:56 +0200
christophe leroy [off-list ref] wrote:
quoted
Le 11/05/2017 à 19:14, christophe leroy a écrit :
quoted

Le 11/05/2017 à 17:15, Nicholas Piggin a écrit :
quoted
Cc: Scott Wood <oss@buserror.net>
Cc: Christophe Leroy <redacted>
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
quoted hunk
---
 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();

Re: [PATCH 1/3] powerpc/powernv: Fix CPU_HOTPLUG=n idle.c compile error

From: Gautham R Shenoy <hidden>
Date: 2017-05-12 09:19:47

Hi Nick,
On Fri, May 12, 2017 at 01:15:20AM +1000, Nicholas Piggin wrote:
quoted hunk
Fixes: a7cd88da97 ("powerpc/powernv: Move CPU-Offline idle state invocation from smp.c to idle.c")
Cc: Gautham R. Shenoy <redacted>
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 <redacted>
 /*
  * Power ISA 3.0 idle initialization.
-- 
2.11.0
--
Thanks and Regards
gautham.

Re: [PATCH 2/3] powerpc/32: tlbie provide L operand explicitly

From: Nick Piggin <npiggin@gmail.com>
Date: 2017-05-12 10:31:29

On 12 May 2017 at 13:35, Michael Ellerman [off-list ref] wrote:
Nicholas Piggin [off-list ref] writes:
quoted
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

Re: [PATCH 3/3] powerpc/8xx: xmon compile fix

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2017-05-26 07:24:29

Nicholas Piggin [off-list ref] writes:
quoted hunk
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

RE: [PATCH 3/3] powerpc/8xx: xmon compile fix

From: David Laight <hidden>
Date: 2017-05-26 16:20:41

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=

RE: [PATCH 3/3] powerpc/8xx: xmon compile fix

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2017-05-29 05:21:45

David Laight [off-list ref] writes:
From:  Michael Ellerman
quoted
Sent: 26 May 2017 08:24
Nicholas Piggin [off-list ref] writes:
quoted
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

Re: [1/3] powerpc/powernv: Fix CPU_HOTPLUG=n idle.c compile error

From: Michael Ellerman <hidden>
Date: 2017-05-30 09:11:17

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 <redacted>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Acked-by: Gautham R. Shenoy <redacted>
Applied to powerpc next, thanks.

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

cheers

Re: [3/3] powerpc/8xx: xmon compile fix

From: Michael Ellerman <hidden>
Date: 2017-05-30 09:11:20

On Fri, 2017-05-12 at 00:47:07 UTC, Nicholas Piggin wrote:
On Thu, 11 May 2017 20:52:56 +0200
christophe leroy [off-list ref] wrote:
quoted
Le 11/05/2017 �� 19:14, christophe leroy a ��crit :
quoted

Le 11/05/2017 �� 17:15, Nicholas Piggin a ��crit :  
quoted
Cc: Scott Wood <oss@buserror.net>
Cc: Christophe Leroy <redacted>
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help