Chunhe Lan | 1 Jun 10:16 2012

[PATCH 1/2] edac: Use ccsr_pci structure instead of hardcoded define

There are some differences of register offset and definition between
pci and pcie error management registers. While, some other pci/pcie
error management registers are nearly the same.

To merge pci and pcie edac code into one, it is easier to use ccsr_pci
structure than the hardcoded define. So remove the hardcoded define and
add pci/pcie error management register in ccsr_pci structure.

Signed-off-by: Chunhe Lan <Chunhe.Lan <at> freescale.com>
Signed-off-by: Kumar Gala <galak <at> kernel.crashing.org>
Cc: Grant Likely <grant.likely <at> secretlab.ca>
Cc: Doug Thompson <dougthompson <at> xmission.com>
---
 arch/powerpc/sysdev/fsl_pci.h |   46 +++++++++++++++++++++++++++++++++-------
 drivers/edac/mpc85xx_edac.h   |   13 +---------
 2 files changed, 40 insertions(+), 19 deletions(-)

diff --git a/arch/powerpc/sysdev/fsl_pci.h b/arch/powerpc/sysdev/fsl_pci.h
index a39ed5c..5378a47 100644
--- a/arch/powerpc/sysdev/fsl_pci.h
+++ b/arch/powerpc/sysdev/fsl_pci.h
 <at>  <at>  -1,7 +1,7  <at>  <at> 
 /*
  * MPC85xx/86xx PCI Express structure define
  *
- * Copyright 2007,2011 Freescale Semiconductor, Inc
+ * Copyright 2007,2011,2012 Freescale Semiconductor, Inc
  *
  * This program is free software; you can redistribute  it and/or modify it
  * under  the terms of  the GNU General  Public License as published by the
(Continue reading)

Chunhe Lan | 1 Jun 10:16 2012

[PATCH 2/2] edac/85xx: PCI/PCIe error interrupt edac support

Adding pcie error interrupt edac support for mpc85xx and p4080.
mpc85xx uses the legacy interrupt report mechanism - the error
interrupts are reported directly to mpic. While, p4080 attaches
the most of error interrupts to interrupt 0. And report error
interrupts to mpic via interrupt 0. This patch can handle both
of them.

Signed-off-by: Chunhe Lan <Chunhe.Lan <at> freescale.com>
Signed-off-by: Kumar Gala <galak <at> kernel.crashing.org>
Cc: Grant Likely <grant.likely <at> secretlab.ca>
Cc: Doug Thompson <dougthompson <at> xmission.com>
---
 drivers/edac/mpc85xx_edac.c |  236 +++++++++++++++++++++++++++++++++----------
 drivers/edac/mpc85xx_edac.h |    9 ++-
 2 files changed, 191 insertions(+), 54 deletions(-)

diff --git a/drivers/edac/mpc85xx_edac.c b/drivers/edac/mpc85xx_edac.c
index 73464a6..35eef79 100644
--- a/drivers/edac/mpc85xx_edac.c
+++ b/drivers/edac/mpc85xx_edac.c
 <at>  <at>  -1,5 +1,6  <at>  <at> 
 /*
  * Freescale MPC85xx Memory Controller kenel module
+ * Copyright (c) 2012 Freescale Semiconductor, Inc.
  *
  * Author: Dave Jiang <djiang <at> mvista.com>
  *
 <at>  <at>  -21,6 +22,7  <at>  <at> 

 #include <linux/of_platform.h>
(Continue reading)

Richard Yang | 1 Jun 03:25 2012
Picon

Re: [PATCH] powerpc/pci: cleanup on duplicate assignment

Agree, this is a duplication.

On Thu, May 31, 2012 at 02:17:29PM +0800, Gavin Shan wrote:
>While creating the PCI root bus through function pci_create_root_bus()
>of PCI core, it should have assigned the secondary bus number for the
>newly created PCI root bus. Thus we needn't do the explicit assignment
>for the secondary bus number again in pcibios_scan_phb().
>
>Signed-off-by: Gavin Shan <shangw <at> linux.vnet.ibm.com>
>---
> arch/powerpc/kernel/pci-common.c |    1 -
> 1 file changed, 1 deletion(-)
>
>diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
>index 8e78e93..0f75bd5 100644
>--- a/arch/powerpc/kernel/pci-common.c
>+++ b/arch/powerpc/kernel/pci-common.c
> <at>  <at>  -1646,7 +1646,6  <at>  <at>  void __devinit pcibios_scan_phb(struct pci_controller *hose)
> 		pci_free_resource_list(&resources);
> 		return;
> 	}
>-	bus->secondary = hose->first_busno;
> 	hose->bus = bus;
>
> 	/* Get probe mode and perform scan */
>-- 
>1.7.9.5
>
>_______________________________________________
>Linuxppc-dev mailing list
(Continue reading)

Mike Frysinger | 1 Jun 06:36 2012
Picon

Re: [PATCH 5/9] blackfin: A couple of task->mm handling fixes

On Monday 23 April 2012 03:09:01 Anton Vorontsov wrote:
> 1. Working with task->mm w/o getting mm or grabing the task lock is
>    dangerous as ->mm might disappear (exit_mm() assigns NULL under
>    task_lock(), so tasklist lock is not enough).

that isn't a problem for this code as it specifically checks if it's in an 
atomic section.  if it is, then task->mm can't go away on us.

>    We can't use get_task_mm()/mmput() pair as mmput() might sleep,
>    so we have to take the task lock while handle its mm.

if we're not in an atomic section, then sleeping is fine.

> 2. Checking for process->mm is not enough because process' main
>    thread may exit or detach its mm via use_mm(), but other threads
>    may still have a valid mm.

i don't think it matters for this code (per the reasons above).

>    To catch this we use find_lock_task_mm(), which walks up all
>    threads and returns an appropriate task (with task lock held).

certainly fine for the non-atomic code path.  i guess we'll notice in crashes 
if it causes a problem in atomic code paths as well.
-mike
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev <at> lists.ozlabs.org
(Continue reading)

Stephen Rothwell | 1 Jun 08:59 2012
Picon
Picon

linux-next: boot failuresfor next-20120601

Hi all,

Today's linux-next fails to boot on my PowerPC boxes like this (one
example):

calling  .ipr_init+0x0/0x68  <at>  1
ipr: IBM Power RAID SCSI Device Driver version: 2.5.3 (March 10, 2012)
ipr 0000:01:01.0: Found IOA with IRQ: 26
ipr 0000:01:01.0: Starting IOA initialization sequence.
ipr 0000:01:01.0: Adapter firmware version: 06160039
ipr 0000:01:01.0: IOA initialized.
scsi0 : IBM 572E Storage Adapter
async_waiting  <at>  1
async_continuing  <at>  1 after 0 usec
scsi 0:0:1:0: Direct-Access     IBM-ESXS MAY2036RC        T106 PQ: 0 ANSI: 5
async_waiting  <at>  1
async_continuing  <at>  1 after 0 usec
async_waiting  <at>  1
async_continuing  <at>  1 after 0 usec
	.
	.	(lots and lots of these)
	.
async_waiting  <at>  1
async_continuing  <at>  1 after 0 usec
scsi: unknown device type 31
scsi 0:255:255:255: No Device         IBM      572E001          0150 PQ: 0 ANSI: 0
initcall .ipr_init+0x0/0x68 returned 0 after 967815 usecs
	.
	.
	.
(Continue reading)

Benjamin Herrenschmidt | 1 Jun 11:12 2012

Re: Re[2]: [RFC] [PATCH] powerpc: Add MSR_DE to MSR_KERNEL

On Thu, 2012-05-31 at 11:05 +0200, Joakim Tjernlund wrote:
> Abatron Support <support <at> abatron.ch> wrote on 2012/05/30 14:08:26:
> >
> > >> I have tested this briefly with BDI2000 on P2010(e500) and
> > >> it works for me. I don't know if there are any bad side effects,
> > >> therfore
> > >> this RFC.
> >
> > > We used to have MSR_DE surrounded by CONFIG_something
> > > to ensure it wasn't set under normal operation.  IIRC, if MSR_DE
> > > is set, you will have problems with software debuggers that
> > > utilize the the debugging registers in the chip itself.  You only want
> > > to force this to be set when using the BDI, not at other times.
> >
> > This MSR_DE is also of interest and used for software debuggers that
> > make use of the debug registers. Only if MSR_DE is set then debug
> > interrupts are generated. If a debug event leads to a debug interrupt
> > handled by a software debugger or if it leads to a debug halt handled
> > by a JTAG tool is selected with DBCR0_EDM / DBCR0_IDM.
> >
> > The "e500 Core Family Reference Manual" chapter "Chapter 8
> > Debug Support" explains in detail the effect of MSR_DE.
> 
> So what is the verdict on this? I don't buy into Dan argument without some
> hard data.

The kernel normally controls when to set or not set MSR:DE, at least
when using SW breakpoints. Setting it globally should remain some kind
of specific debug option.

(Continue reading)

Benjamin Herrenschmidt | 1 Jun 11:14 2012

Re: [RFC] [PATCH] powerpc: Add MSR_DE to MSR_KERNEL

On Wed, 2012-05-30 at 09:26 -0400, Bob Cochran wrote:
> I believe that additional patches are required for CodeWarrior to
> work 
> properly (e.g., assembly start up).  I think the patches should come 
> from Freescale.  For whatever reason, they include them in their SDK, 
> but haven't submitted them for inclusion in the mainline.
> 
> As a developer on Freescale Power products, I would like to see 
> Freescale offer up a CodeWarrior patch set, so I don't have to manage 
> the patches myself when working outside the SDK (i.e., on a more
> recent 
> kernel).

Such patches would have a hard time getting upstream considering that
codewarrior is a commercial product.

Ben.
Benjamin Herrenschmidt | 1 Jun 11:18 2012

Re: kernel panic during kernel module load (powerpc specific part)

On Thu, 2012-05-31 at 13:04 +0200, Gabriel Paubert wrote:

> I believe that the basic premise is that you should provide a directly reachable copy 
> of the save/rstore functions, even if this means that you need several copies of the functions.

I just fixed a very similar problem with grub2 in fact. It was using r0
and trashing the saved LR that way.

The real fix is indeed to statically link those gcc "helpers", we
shouldn't generate things like cross-module calls inside function
prologs and epilogues, when stackframes aren't even guaranteed to be
reliable.

However, in the grub2 case, it was easier to just use r12 :-)

Cheers,
Ben.

> > 
> > Unfortunately the same doc and predecessors show r11 in all basic examples for PLT/trampoline code
AFAICS, which is likely why all trampoline code uses r11 in any known case.
> > 
> > I would guess that it was never envisioned that compiler generated code would be in a different section
than save/restore functions, i.e., the Linux module "__init" assumptions for Power break the ABI. Or
does the ABI break the __init concept?!
> > 
> > Using r12 in the trampoline seems to be the obvious solution for module loading.
> > 
> > But what about other code loading done? If, e.g., a user runs any app from bash it gets loaded and relocated
and trampolines might get set up somehow.
(Continue reading)

Srivatsa S. Bhat | 1 Jun 11:14 2012
Picon

[PATCH 18/27] powerpc, smpboot: Use generic SMP booting infrastructure

From: Nikunj A. Dadhania <nikunj <at> linux.vnet.ibm.com>

Convert powerpc to use the generic framework to boot secondary CPUs.

Signed-off-by: Nikunj A. Dadhania <nikunj <at> linux.vnet.ibm.com>
Cc: Benjamin Herrenschmidt <benh <at> kernel.crashing.org>
Cc: Paul Mackerras <paulus <at> samba.org>
Cc: Thomas Gleixner <tglx <at> linutronix.de>
Cc: Yong Zhang <yong.zhang0 <at> gmail.com>
Cc: Paul Gortmaker <paul.gortmaker <at> windriver.com>
Cc: linuxppc-dev <at> lists.ozlabs.org
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat <at> linux.vnet.ibm.com>
---

 arch/powerpc/kernel/smp.c |   26 +++++++++++++++-----------
 1 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 1928058a..96c3718 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
 <at>  <at>  -544,16 +544,18  <at>  <at>  static struct device_node *cpu_to_l2cache(int cpu)
 /* Activate a secondary processor. */
 void __devinit start_secondary(void *unused)
 {
+	smpboot_start_secondary(unused);
+}
+
+void __cpuinit __cpu_pre_starting(void *unused)
+{
(Continue reading)

Paul Mackerras | 1 Jun 12:01 2012
Picon

[PATCH] powerpc/time: Sanity check of decrementer expiration is necessary

This reverts 68568add2c ("powerpc/time: Remove unnecessary sanity check
of decrementer expiration").  We do need to check whether we have reached
the expiration time of the next event, because we sometimes get an early
decrementer interrupt, most notably when we set the decrementer to 1 in
arch_irq_work_raise().  The effect of not having the sanity check is that
if timer_interrupt() gets called early, we leave the decrementer set to
its maximum value, which means we then don't get any more decrementer
interrupts for about 4 seconds (or longer, depending on timebase
frequency).  I saw these pauses as a consequence of getting a stray
hypervisor decrementer interrupt left over from exiting a KVM guest.

This isn't quite a straight revert because of changes to the surrounding
code, but it restores the same algorithm as was previously used.

Cc: stable <at> kernel.org
Cc: Anton Blanchard <anton <at> samba.org>
Acked-by: Benjamin Herrenschmidt <benh <at> kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus <at> samba.org>
---
If there are no objections, I'll send this to Linus shortly.  This
regression is present in 3.3 and 3.4 as well as current upstream.

 arch/powerpc/kernel/time.c |   14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 99a995c..be171ee 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
 <at>  <at>  -475,6 +475,7  <at>  <at>  void timer_interrupt(struct pt_regs * regs)
(Continue reading)


Gmane