linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] *** SUBJECT HERE ***
@ 2010-08-18 16:44 Dave Kleikamp
  2010-08-18 16:44 ` [PATCH 1/4] powerpc/47x: Make sure mcsr is cleared before enabling machine check interrupts Dave Kleikamp
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Dave Kleikamp @ 2010-08-18 16:44 UTC (permalink / raw)
  To: Josh Boyer; +Cc: Dave Kleikamp, linuxppc-dev list

Josh,
Here are some bug fixes for the powerpc-4xx tree.  It'd be nice if they
could make it into 2.6.46.

Thanks,
Shaggy

Dave Kleikamp (4):
  powerpc/47x: Make sure mcsr is cleared before enabling machine check
    interrupts
  powerpc/47x: Remove redundant line from cputable.c
  powerpc/4xx: Index interrupt stacks by physical cpu
  powerpc/47x: Add an isync before the tlbivax instruction

 arch/powerpc/kernel/cputable.c   |    1 -
 arch/powerpc/kernel/head_44x.S   |    4 ++++
 arch/powerpc/kernel/irq.c        |   15 ++++++++-------
 arch/powerpc/kernel/setup_32.c   |    9 +++++----
 arch/powerpc/mm/tlb_nohash_low.S |    1 +
 5 files changed, 18 insertions(+), 12 deletions(-)

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

* [PATCH 1/4] powerpc/47x: Make sure mcsr is cleared before enabling machine check interrupts
  2010-08-18 16:44 [PATCH 0/4] *** SUBJECT HERE *** Dave Kleikamp
@ 2010-08-18 16:44 ` Dave Kleikamp
  2010-08-18 16:44 ` [PATCH 2/4] powerpc/47x: Remove redundant line from cputable.c Dave Kleikamp
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Dave Kleikamp @ 2010-08-18 16:44 UTC (permalink / raw)
  To: Josh Boyer; +Cc: Dave Kleikamp, linuxppc-dev list

Clear the machine check syndrom register before enabling machine check
interrupts.  The initial state of the tlb can lead to parity errors being
flagged early after a cold boot.

Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
---
 arch/powerpc/kernel/head_44x.S |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/kernel/head_44x.S b/arch/powerpc/kernel/head_44x.S
index 5ab484e..562305b 100644
--- a/arch/powerpc/kernel/head_44x.S
+++ b/arch/powerpc/kernel/head_44x.S
@@ -113,6 +113,10 @@ _ENTRY(_start);
 	stw	r5, 0(r4)	/* Save abatron_pteptrs at a fixed location */
 	stw	r6, 0(r5)
 
+	/* Clear the Machine Check Syndrome Register */
+	li	r0,0
+	mtspr	SPRN_MCSR,r0
+
 	/* Let's move on */
 	lis	r4,start_kernel@h
 	ori	r4,r4,start_kernel@l
-- 
1.7.1

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

* [PATCH 2/4] powerpc/47x: Remove redundant line from cputable.c
  2010-08-18 16:44 [PATCH 0/4] *** SUBJECT HERE *** Dave Kleikamp
  2010-08-18 16:44 ` [PATCH 1/4] powerpc/47x: Make sure mcsr is cleared before enabling machine check interrupts Dave Kleikamp
@ 2010-08-18 16:44 ` Dave Kleikamp
  2010-08-18 16:44 ` [PATCH 3/4] powerpc/4xx: Index interrupt stacks by physical cpu Dave Kleikamp
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Dave Kleikamp @ 2010-08-18 16:44 UTC (permalink / raw)
  To: Josh Boyer; +Cc: Dave Kleikamp, linuxppc-dev list

There are two entries for .cpu_user_features in
arch/powerpc/kernel/cputable.c.  Remove the one that doesn't belong

Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
---
 arch/powerpc/kernel/cputable.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index 65e2b4e..1f9123f 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -1826,7 +1826,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
 		.cpu_features		= CPU_FTRS_47X,
 		.cpu_user_features	= COMMON_USER_BOOKE |
 			PPC_FEATURE_HAS_FPU,
-		.cpu_user_features	= COMMON_USER_BOOKE,
 		.mmu_features		= MMU_FTR_TYPE_47x |
 			MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
 		.icache_bsize		= 32,
-- 
1.7.1

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

* [PATCH 3/4] powerpc/4xx: Index interrupt stacks by physical cpu
  2010-08-18 16:44 [PATCH 0/4] *** SUBJECT HERE *** Dave Kleikamp
  2010-08-18 16:44 ` [PATCH 1/4] powerpc/47x: Make sure mcsr is cleared before enabling machine check interrupts Dave Kleikamp
  2010-08-18 16:44 ` [PATCH 2/4] powerpc/47x: Remove redundant line from cputable.c Dave Kleikamp
@ 2010-08-18 16:44 ` Dave Kleikamp
  2010-08-19 12:34   ` Josh Boyer
  2010-08-18 16:44 ` [PATCH 4/4] powerpc/47x: Add an isync before the tlbivax instruction Dave Kleikamp
  2010-08-18 16:45 ` [PATCH 0/4] Some 47x patches for the powerpc-4xx tree Dave Kleikamp
  4 siblings, 1 reply; 9+ messages in thread
From: Dave Kleikamp @ 2010-08-18 16:44 UTC (permalink / raw)
  To: Josh Boyer; +Cc: Dave Kleikamp, linuxppc-dev list

The interrupt stacks need to be indexed by the physical cpu since the
critical, debug and machine check handlers use the contents of SPRN_PIR to
index the critirq_ctx, dbgirq_ctx, and mcheckirq_ctx arrays.

Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
---
 arch/powerpc/kernel/irq.c      |   15 ++++++++-------
 arch/powerpc/kernel/setup_32.c |    9 +++++----
 2 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index d3ce67c..52e9c95 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -446,22 +446,23 @@ struct thread_info *mcheckirq_ctx[NR_CPUS] __read_mostly;
 void exc_lvl_ctx_init(void)
 {
 	struct thread_info *tp;
-	int i;
+	int i, hw_cpu;
 
 	for_each_possible_cpu(i) {
-		memset((void *)critirq_ctx[i], 0, THREAD_SIZE);
-		tp = critirq_ctx[i];
+		hw_cpu = get_hard_smp_processor_id(i);
+		memset((void *)critirq_ctx[hw_cpu], 0, THREAD_SIZE);
+		tp = critirq_ctx[hw_cpu];
 		tp->cpu = i;
 		tp->preempt_count = 0;
 
 #ifdef CONFIG_BOOKE
-		memset((void *)dbgirq_ctx[i], 0, THREAD_SIZE);
-		tp = dbgirq_ctx[i];
+		memset((void *)dbgirq_ctx[hw_cpu], 0, THREAD_SIZE);
+		tp = dbgirq_ctx[hw_cpu];
 		tp->cpu = i;
 		tp->preempt_count = 0;
 
-		memset((void *)mcheckirq_ctx[i], 0, THREAD_SIZE);
-		tp = mcheckirq_ctx[i];
+		memset((void *)mcheckirq_ctx[hw_cpu], 0, THREAD_SIZE);
+		tp = mcheckirq_ctx[hw_cpu];
 		tp->cpu = i;
 		tp->preempt_count = HARDIRQ_OFFSET;
 #endif
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index a10ffc8..93666f9 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -258,17 +258,18 @@ static void __init irqstack_early_init(void)
 #if defined(CONFIG_BOOKE) || defined(CONFIG_40x)
 static void __init exc_lvl_early_init(void)
 {
-	unsigned int i;
+	unsigned int i, hw_cpu;
 
 	/* interrupt stacks must be in lowmem, we get that for free on ppc32
 	 * as the memblock is limited to lowmem by MEMBLOCK_REAL_LIMIT */
 	for_each_possible_cpu(i) {
-		critirq_ctx[i] = (struct thread_info *)
+		hw_cpu = get_hard_smp_processor_id(i);
+		critirq_ctx[hw_cpu] = (struct thread_info *)
 			__va(memblock_alloc(THREAD_SIZE, THREAD_SIZE));
 #ifdef CONFIG_BOOKE
-		dbgirq_ctx[i] = (struct thread_info *)
+		dbgirq_ctx[hw_cpu] = (struct thread_info *)
 			__va(memblock_alloc(THREAD_SIZE, THREAD_SIZE));
-		mcheckirq_ctx[i] = (struct thread_info *)
+		mcheckirq_ctx[hw_cpu] = (struct thread_info *)
 			__va(memblock_alloc(THREAD_SIZE, THREAD_SIZE));
 #endif
 	}
-- 
1.7.1

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

* [PATCH 4/4] powerpc/47x: Add an isync before the tlbivax instruction
  2010-08-18 16:44 [PATCH 0/4] *** SUBJECT HERE *** Dave Kleikamp
                   ` (2 preceding siblings ...)
  2010-08-18 16:44 ` [PATCH 3/4] powerpc/4xx: Index interrupt stacks by physical cpu Dave Kleikamp
@ 2010-08-18 16:44 ` Dave Kleikamp
  2010-08-18 16:45 ` [PATCH 0/4] Some 47x patches for the powerpc-4xx tree Dave Kleikamp
  4 siblings, 0 replies; 9+ messages in thread
From: Dave Kleikamp @ 2010-08-18 16:44 UTC (permalink / raw)
  To: Josh Boyer; +Cc: Dave Kleikamp, linuxppc-dev list

Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
---
 arch/powerpc/mm/tlb_nohash_low.S |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/mm/tlb_nohash_low.S b/arch/powerpc/mm/tlb_nohash_low.S
index cfa7682..b9d9fed 100644
--- a/arch/powerpc/mm/tlb_nohash_low.S
+++ b/arch/powerpc/mm/tlb_nohash_low.S
@@ -200,6 +200,7 @@ _GLOBAL(_tlbivax_bcast)
 	rlwimi	r5,r4,0,16,31
 	wrteei	0
 	mtspr	SPRN_MMUCR,r5
+	isync
 /*	tlbivax	0,r3 - use .long to avoid binutils deps */
 	.long 0x7c000624 | (r3 << 11)
 	isync
-- 
1.7.1

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

* Re: [PATCH 0/4] Some 47x patches for the powerpc-4xx tree
  2010-08-18 16:44 [PATCH 0/4] *** SUBJECT HERE *** Dave Kleikamp
                   ` (3 preceding siblings ...)
  2010-08-18 16:44 ` [PATCH 4/4] powerpc/47x: Add an isync before the tlbivax instruction Dave Kleikamp
@ 2010-08-18 16:45 ` Dave Kleikamp
  2010-08-19  3:19   ` Benjamin Herrenschmidt
  4 siblings, 1 reply; 9+ messages in thread
From: Dave Kleikamp @ 2010-08-18 16:45 UTC (permalink / raw)
  To: Josh Boyer; +Cc: linuxppc-dev list

Sorry!  Forgot to change the subject.

Shaggy

On Wed, 2010-08-18 at 11:44 -0500, Dave Kleikamp wrote:
> Josh,
> Here are some bug fixes for the powerpc-4xx tree.  It'd be nice if they
> could make it into 2.6.46.
> 
> Thanks,
> Shaggy
> 
> Dave Kleikamp (4):
>   powerpc/47x: Make sure mcsr is cleared before enabling machine check
>     interrupts
>   powerpc/47x: Remove redundant line from cputable.c
>   powerpc/4xx: Index interrupt stacks by physical cpu
>   powerpc/47x: Add an isync before the tlbivax instruction
> 
>  arch/powerpc/kernel/cputable.c   |    1 -
>  arch/powerpc/kernel/head_44x.S   |    4 ++++
>  arch/powerpc/kernel/irq.c        |   15 ++++++++-------
>  arch/powerpc/kernel/setup_32.c   |    9 +++++----
>  arch/powerpc/mm/tlb_nohash_low.S |    1 +
>  5 files changed, 18 insertions(+), 12 deletions(-)
> 

-- 
Dave Kleikamp
IBM Linux Technology Center

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

* Re: [PATCH 0/4] Some 47x patches for the powerpc-4xx tree
  2010-08-18 16:45 ` [PATCH 0/4] Some 47x patches for the powerpc-4xx tree Dave Kleikamp
@ 2010-08-19  3:19   ` Benjamin Herrenschmidt
  2010-08-23 12:13     ` Josh Boyer
  0 siblings, 1 reply; 9+ messages in thread
From: Benjamin Herrenschmidt @ 2010-08-19  3:19 UTC (permalink / raw)
  To: Dave Kleikamp; +Cc: linuxppc-dev list

On Wed, 2010-08-18 at 11:45 -0500, Dave Kleikamp wrote:
> Sorry!  Forgot to change the subject.
> 
> Shaggy
> 
> On Wed, 2010-08-18 at 11:44 -0500, Dave Kleikamp wrote:
> > Josh,
> > Here are some bug fixes for the powerpc-4xx tree.  It'd be nice if they
> > could make it into 2.6.46.

Yeah and I'm sure they can make it into 2.6.46... if you want to wait
that long ! In the meantime, 2.6.36 will do :-)

Cheers,
Ben.

> > Thanks,
> > Shaggy
> > 
> > Dave Kleikamp (4):
> >   powerpc/47x: Make sure mcsr is cleared before enabling machine check
> >     interrupts
> >   powerpc/47x: Remove redundant line from cputable.c
> >   powerpc/4xx: Index interrupt stacks by physical cpu
> >   powerpc/47x: Add an isync before the tlbivax instruction
> > 
> >  arch/powerpc/kernel/cputable.c   |    1 -
> >  arch/powerpc/kernel/head_44x.S   |    4 ++++
> >  arch/powerpc/kernel/irq.c        |   15 ++++++++-------
> >  arch/powerpc/kernel/setup_32.c   |    9 +++++----
> >  arch/powerpc/mm/tlb_nohash_low.S |    1 +
> >  5 files changed, 18 insertions(+), 12 deletions(-)
> > 
> 

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

* Re: [PATCH 3/4] powerpc/4xx: Index interrupt stacks by physical cpu
  2010-08-18 16:44 ` [PATCH 3/4] powerpc/4xx: Index interrupt stacks by physical cpu Dave Kleikamp
@ 2010-08-19 12:34   ` Josh Boyer
  0 siblings, 0 replies; 9+ messages in thread
From: Josh Boyer @ 2010-08-19 12:34 UTC (permalink / raw)
  To: Dave Kleikamp; +Cc: linuxppc-dev list

On Wed, Aug 18, 2010 at 11:44:25AM -0500, Dave Kleikamp wrote:
>The interrupt stacks need to be indexed by the physical cpu since the
>critical, debug and machine check handlers use the contents of SPRN_PIR to
>index the critirq_ctx, dbgirq_ctx, and mcheckirq_ctx arrays.
>
>Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
>---
> arch/powerpc/kernel/irq.c      |   15 ++++++++-------
> arch/powerpc/kernel/setup_32.c |    9 +++++----
> 2 files changed, 13 insertions(+), 11 deletions(-)
>
>diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
>index d3ce67c..52e9c95 100644
>--- a/arch/powerpc/kernel/irq.c
>+++ b/arch/powerpc/kernel/irq.c
>@@ -446,22 +446,23 @@ struct thread_info *mcheckirq_ctx[NR_CPUS] __read_mostly;
> void exc_lvl_ctx_init(void)
> {
> 	struct thread_info *tp;
>-	int i;
>+	int i, hw_cpu;
>
> 	for_each_possible_cpu(i) {
>-		memset((void *)critirq_ctx[i], 0, THREAD_SIZE);
>-		tp = critirq_ctx[i];
>+		hw_cpu = get_hard_smp_processor_id(i);

This one throws this compile error when trying to build
ppc44x_defconfig:

CC      arch/powerpc/kernel/irq.o
arch/powerpc/kernel/irq.c: In function 'exc_lvl_ctx_init':
arch/powerpc/kernel/irq.c:452: error: implicit declaration of function
'get_hard_smp_processor_id'
make[1]: *** [arch/powerpc/kernel/irq.o] Error 1
make: *** [arch/powerpc/kernel] Error 2

I'm guessing it needs a #include <asm/smp.h> added to it.

josh

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

* Re: [PATCH 0/4] Some 47x patches for the powerpc-4xx tree
  2010-08-19  3:19   ` Benjamin Herrenschmidt
@ 2010-08-23 12:13     ` Josh Boyer
  0 siblings, 0 replies; 9+ messages in thread
From: Josh Boyer @ 2010-08-23 12:13 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list, Dave Kleikamp

On Thu, Aug 19, 2010 at 01:19:57PM +1000, Benjamin Herrenschmidt wrote:
>On Wed, 2010-08-18 at 11:45 -0500, Dave Kleikamp wrote:
>> Sorry!  Forgot to change the subject.
>> 
>> Shaggy
>> 
>> On Wed, 2010-08-18 at 11:44 -0500, Dave Kleikamp wrote:
>> > Josh,
>> > Here are some bug fixes for the powerpc-4xx tree.  It'd be nice if they
>> > could make it into 2.6.46.
>
>Yeah and I'm sure they can make it into 2.6.46... if you want to wait
>that long ! In the meantime, 2.6.36 will do :-)

Added the minor #include fix and sent them your way.

josh

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

end of thread, other threads:[~2010-08-23 12:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-18 16:44 [PATCH 0/4] *** SUBJECT HERE *** Dave Kleikamp
2010-08-18 16:44 ` [PATCH 1/4] powerpc/47x: Make sure mcsr is cleared before enabling machine check interrupts Dave Kleikamp
2010-08-18 16:44 ` [PATCH 2/4] powerpc/47x: Remove redundant line from cputable.c Dave Kleikamp
2010-08-18 16:44 ` [PATCH 3/4] powerpc/4xx: Index interrupt stacks by physical cpu Dave Kleikamp
2010-08-19 12:34   ` Josh Boyer
2010-08-18 16:44 ` [PATCH 4/4] powerpc/47x: Add an isync before the tlbivax instruction Dave Kleikamp
2010-08-18 16:45 ` [PATCH 0/4] Some 47x patches for the powerpc-4xx tree Dave Kleikamp
2010-08-19  3:19   ` Benjamin Herrenschmidt
2010-08-23 12:13     ` Josh Boyer

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