LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 17/17] powerpc: crypto: enable the PFO-based encryption device
From: Kent Yoder @ 2012-03-21 21:41 UTC (permalink / raw)
  To: linux-kernel; +Cc: rcj, linuxppc-dev, linux-crypto
In-Reply-To: <1332365297.3858.5.camel@key-ThinkPad-W510>

This patch adds the cas bits to advertise support for the Platform
Facilities Option (PFO) based encryption accelerator device. The nx
device driver provides support for this hardware feature.

Signed-off-by: Kent Yoder <key@linux.vnet.ibm.com>
---
 arch/powerpc/kernel/prom_init.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 6691077..fb5412e 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -716,6 +716,12 @@ static void __init early_cmdline_parse(void)
 #else
 #define OV5_PFO_HW_RNG		0x00
 #endif
+#if defined(CONFIG_CRYPTO_DEV_NX) || \
+	defined(CONFIG_CRYPTO_DEV_NX_MODULE)
+#define OV5_PFO_HW_ENCR		0x20
+#else
+#define OV5_PFO_HW_ENCR		0x00
+#endif
 
 /* Option Vector 6: IBM PAPR hints */
 #define OV6_LINUX		0x02	/* Linux is our OS */
@@ -783,7 +789,7 @@ static unsigned char ibm_architecture_vec[] = {
 	0,
 	0,
 	0,
-	OV5_PFO_HW_RNG,
+	OV5_PFO_HW_RNG | OV5_PFO_HW_ENCR,
 
 	/* option vector 6: IBM PAPR hints */
 	4 - 2,				/* length */
-- 
1.7.1

^ permalink raw reply related

* Re: [PATCH 15/17] powerpc: crypto: sysfs routines and docs for the nx device driver
From: Greg KH @ 2012-03-21 22:11 UTC (permalink / raw)
  To: Kent Yoder; +Cc: rcj, linuxppc-dev, linux-kernel, linux-crypto
In-Reply-To: <1332366080.3858.52.camel@key-ThinkPad-W510>

On Wed, Mar 21, 2012 at 04:41:20PM -0500, Kent Yoder wrote:
> These routines add sysfs files supporting the Power7+ in-Nest encryption
> accelerator driver.
> 
> Signed-off-by: Kent Yoder <key@linux.vnet.ibm.com>
> ---
>  Documentation/powerpc/pfo-nx-crypto.txt |   52 ++++++++

Please put sysfs file information in Documentation/ABI/ where it
belongs.

>  arch/powerpc/crypto/nx/nx_sysfs.c       |  194 +++++++++++++++++++++++++++++++
>  2 files changed, 246 insertions(+), 0 deletions(-)
>  create mode 100644 Documentation/powerpc/pfo-nx-crypto.txt
>  create mode 100644 arch/powerpc/crypto/nx/nx_sysfs.c
> 
> diff --git a/Documentation/powerpc/pfo-nx-crypto.txt b/Documentation/powerpc/pfo-nx-crypto.txt
> new file mode 100644
> index 0000000..63440d3
> --- /dev/null
> +++ b/Documentation/powerpc/pfo-nx-crypto.txt
> @@ -0,0 +1,52 @@
> +
> +Documentation for the sysfs interfaces provided by the nx-crypto driver, built
> +in arch/powerpc/crypto/nx.
> +
> +The driver provides 2 sets of sysfs files, 1 for confirming that the device is
> +actually being used and 1 for error detection.

Shouldn't the first just be debugfs files, as no "normal" user will ever
care about such a thing?

Actually, why are these sysfs files at all, how about all of this going
into debugfs?


> +Error Detection
> +===============

<snip>

What can anyone do with any of these files?  What use are they to users?

> +Device Use
> +==========

Again, what does a user care about these items for?

> +int
> +nx_sysfs_init(struct device_driver *drv)
> +{
> +	int rc;
> +
> +	rc = driver_create_file(drv, &driver_attr_aes_ops);
> +	if (rc)
> +		goto out;

<snip>

Oh, ${DIETY}, no.  Please don't create files one by one, we do have
functions that do all of this for you automatically, why aren't you
using them?

> +void
> +nx_sysfs_fini(struct device_driver *drv)
> +{
> +	driver_remove_file(drv, &driver_attr_sync_ops);
> +	driver_remove_file(drv, &driver_attr_aes_bytes);
> +	driver_remove_file(drv, &driver_attr_aes_ops);
> +	driver_remove_file(drv, &driver_attr_sha256_bytes);
> +	driver_remove_file(drv, &driver_attr_sha256_ops);
> +	driver_remove_file(drv, &driver_attr_sha512_bytes);
> +	driver_remove_file(drv, &driver_attr_sha512_ops);

Same here, don't do this, do it all at once.

> +}

Who is calling these functions?  Where in the device lifecycle are the
files being created?  Did you just race userspace with how they are
created, or are you doing it "properly"?  (hint, odds are, as you are
trying to manually create and remove these by hand, you aren't doing it
properly...)

thanks,

greg k-h

^ permalink raw reply

* Re: kilauea compilation breaks with v3.3 kernel and ELDK 4.2
From: Tony Breeds @ 2012-03-21 22:14 UTC (permalink / raw)
  To: Robert Berger; +Cc: linuxppc-dev
In-Reply-To: <4F69C553.6070409@gmail.com>

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

On Wed, Mar 21, 2012 at 02:10:59PM +0200, Robert Berger wrote:
> Hi,
> 
> Up to 3.2.x I was able to compile a mainline kernel for the kilauea
> board, but...
> 
> http://git.denx.de/?p=linux-denx.git;a=commitdiff;h=075bcf5879225d0c2a119c23d8046b890e051e81
> 
> shows, that mfdcrx was introduced in the v3.3 kernel.
> 
> The problem is that for ppc-linux-gcc (GCC) 4.2.2 (which comes with the
> ELDK 4.2) this assembly instruction is not known and the build breaks.

If the instruction is available on your platform but not in your
toolchain we can do something ugly (as we hav in the past) and replace
"mfdrcx" with ".long xxxx".  That will bypass the compiler breakage.
 
> What puzzles me is that also stuff for boards is being compiled which is
> not really needed like treeboot-currituck.c even when I configure the
> kernel for a kilauea board.

Can you either propvide the config file or the name of the config target
so I look into why it's enabling the currituck platform.

Yours Tony

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply

* Re: [PATCH 14/17] powerpc: crypto: nx driver code supporting nx encryption
From: Greg KH @ 2012-03-21 22:15 UTC (permalink / raw)
  To: Kent Yoder; +Cc: rcj, linuxppc-dev, linux-kernel, linux-crypto
In-Reply-To: <1332366068.3858.50.camel@key-ThinkPad-W510>

On Wed, Mar 21, 2012 at 04:41:08PM -0500, Kent Yoder wrote:
> +static int nx_register_algs(void)
> +{
> +	int rc = -1;
> +
> +	if (nx_driver.of.flags != NX_OF_FLAG_MASK_READY)
> +		goto out;
> +
> +	memset(&nx_driver.stats, 0, sizeof(struct nx_stats));
> +
> +	rc = nx_sysfs_init(&nx_driver.viodriver.driver);

Ok, that's not bad, you are doing it from the probe() function of your
bus.  As long as the bus got things right on when uevents get sent to
userspace, does it?

> +static struct vio_device_id nx_crypto_driver_ids[] __devinitdata = {
> +	{ "ibm,sym-encryption-v1", "ibm,sym-encryption" },
> +	{ "", "" }
> +};
> +MODULE_DEVICE_TABLE(vio, nx_crypto_driver_ids);
> +
> +/* driver state structure */
> +struct nx_crypto_driver nx_driver = {
> +	.viodriver = {
> +		.id_table = nx_crypto_driver_ids,
> +		.probe = nx_probe,
> +		.remove = nx_remove,
> +		.driver = {
> +			.name  = "nx",
> +			.owner = THIS_MODULE,
> +		},

Really?  vio drivers are supposed to look like this with the .name and
.owner field manually being set in the static initialization of the
driver?  That's sad, and should be fixed, the vio core should do this
type of thing for you.

greg k-h

^ permalink raw reply

* Re: kilauea compilation breaks with v3.3 kernel and ELDK 4.2
From: Wolfgang Denk @ 2012-03-21 22:34 UTC (permalink / raw)
  To: Tony Breeds; +Cc: linuxppc-dev, Robert Berger
In-Reply-To: <20120321221402.GA18735@thor.bakeyournoodle.com>

Dear Tony,

In message <20120321221402.GA18735@thor.bakeyournoodle.com> you wrote:
> 
> > What puzzles me is that also stuff for boards is being compiled which is
> > not really needed like treeboot-currituck.c even when I configure the
> > kernel for a kilauea board.
> 
> Can you either propvide the config file or the name of the config target
> so I look into why it's enabling the currituck platform.

Robert mentioned it in the Subjct:  he was building for the Kilauea
board, i. e. 40x/kilauea_defconfig 


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
I must follow the people.  Am I not their leader? - Benjamin Disraeli

^ permalink raw reply

* Re: [PATCH 15/17] powerpc: crypto: sysfs routines and docs for the nx device driver
From: Kent Yoder @ 2012-03-21 22:46 UTC (permalink / raw)
  To: Greg KH; +Cc: rcj, linuxppc-dev, linux-kernel, linux-crypto
In-Reply-To: <20120321221122.GA30748@kroah.com>

Hi Greg,

On Wed, 2012-03-21 at 15:11 -0700, Greg KH wrote:
> On Wed, Mar 21, 2012 at 04:41:20PM -0500, Kent Yoder wrote:
> > These routines add sysfs files supporting the Power7+ in-Nest encryption
> > accelerator driver.
> > 
> > Signed-off-by: Kent Yoder <key@linux.vnet.ibm.com>
> > ---
> >  Documentation/powerpc/pfo-nx-crypto.txt |   52 ++++++++
> 
> Please put sysfs file information in Documentation/ABI/ where it
> belongs.

  Will do, I see debugfs docs in there too.

> Shouldn't the first just be debugfs files, as no "normal" user will ever
> care about such a thing?
> 
> Actually, why are these sysfs files at all, how about all of this going
> into debugfs?

  Yes, that's fine.  These really are just for checking 'am I really
doing hardware encryption' and debugging any return codes that may come
back from the hcall. The error return is probably more easily dev_err'd
though.

> 
> > +Error Detection
> > +===============
> 
> <snip>
> 
> What can anyone do with any of these files?  What use are they to users?
> 
> > +Device Use
> > +==========
> 
> Again, what does a user care about these items for?
> 
> > +int
> > +nx_sysfs_init(struct device_driver *drv)
> > +{
> > +	int rc;
> > +
> > +	rc = driver_create_file(drv, &driver_attr_aes_ops);
> > +	if (rc)
> > +		goto out;
> 
> <snip>
> 
> Oh, ${DIETY}, no.  Please don't create files one by one, we do have
> functions that do all of this for you automatically, why aren't you
> using them?

  Ok, I'll go look for some debugfs wrappers.

> > +void
> > +nx_sysfs_fini(struct device_driver *drv)
> > +{
> > +	driver_remove_file(drv, &driver_attr_sync_ops);
> > +	driver_remove_file(drv, &driver_attr_aes_bytes);
> > +	driver_remove_file(drv, &driver_attr_aes_ops);
> > +	driver_remove_file(drv, &driver_attr_sha256_bytes);
> > +	driver_remove_file(drv, &driver_attr_sha256_ops);
> > +	driver_remove_file(drv, &driver_attr_sha512_bytes);
> > +	driver_remove_file(drv, &driver_attr_sha512_ops);
> 
> Same here, don't do this, do it all at once.
> 
> > +}
> 
> Who is calling these functions?  Where in the device lifecycle are the
> files being created?  Did you just race userspace with how they are
> created, or are you doing it "properly"?  (hint, odds are, as you are
> trying to manually create and remove these by hand, you aren't doing it
> properly...)

  We're not racing here, other than with cat.  Just so an admin can see
his workload is getting offloaded.

Thanks,
Kent

> thanks,
> 
> greg k-h
> 

^ permalink raw reply

* [git pull] Please pull powerpc.git next branch
From: Benjamin Herrenschmidt @ 2012-03-22  0:46 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linuxppc-dev list, Andrew Morton, Russell King, Linux Kernel list

Hi Linus !

Here's the powerpc batch for this merge window. It is going to be a bit
more nasty than usual as in touching things outside of arch/powerpc
mostly due to the big iSeriesectomy :-) We finally got rid of the bugger
(legacy iSeries support) which was a PITA to maintain and that nobody
really used anymore.

Here are some of the highlights:

 - Legacy iSeries is gone. Thanks Stephen ! There's still some bits and
pieces remaining if you do a grep -ir series arch/powerpc but they are
harmless and will be removed in the next few weeks hopefully.

 - The 'fadump' functionality (Firmware Assisted Dump) replaces the
previous (equivalent) "pHyp assisted dump"... it's a rewrite of a
mechanism to get the hypervisor to do crash dumps on pSeries, the new
implementation hopefully being much more reliable. Thanks Mahesh
Salgaonkar.

 - The "EEH" code (pSeries PCI error handling & recovery) got a big
spring cleaning, motivated by the need to be able to implement a new
backend for it on top of some new different type of firwmare. The work
isn't complete yet, but a good chunk of the cleanups is there. Note that
this adds a field to struct device_node which is not very nice and which
Grant objects to. I will have a patch soon that moves that to a powerpc
private data structure (hopefully before rc1) and we'll improve things
further later on (hopefully getting rid of the need for that pointer
completely). Thanks Gavin Shan.

 - I dug into our exception & interrupt handling code to improve the way
we do lazy interrupt handling (and make it work properly with "edge"
triggered interrupt sources), and while at it found & fixed a wagon of
issues in those areas, including adding support for page fault retry &
fatal signals on page faults.

 - Your usual random batch of small fixes & updates, including a bunch
of new embedded boards, both Freescale and APM based ones, etc...

Cheers,
Ben.

The following changes since commit 203738e548cefc3fc3c2f73a9063176c9f3583d5:

  Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (2012-02-26 12:47:17 -0800)

are available in the git repository at:


  git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git next

for you to fetch changes up to dfbc2d75c1bd47c3186fa91f1655ea2f3825b0ec:

  powerpc/ps3: Do not adjust the wrapper load address (2012-03-21 11:16:13 +1100)

----------------------------------------------------------------
Akinobu Mita (1):
      powerpc/pmac: Use string library in nvram code

Andrea Gelmini (1):
      Documentation/powerpc/mpc52xx.txt: Checkpatch cleanup

Anton Blanchard (2):
      atomic: Allow atomic_inc_not_zero to be overridden
      powerpc/atomic: Implement atomic*_inc_not_zero

Benjamin Herrenschmidt (21):
      Merge remote-tracking branch 'origin/master' into next
      powerpc/mpic: Fix allocation of reverse-map for multi-ISU mpics
      powerpc: Remove legacy iSeries bits from assembly files
      powerpc: Use the same interrupt prolog for perfmon as other interrupts
      powerpc: Rework runlatch code
      powerpc: Improve 64-bit syscall entry/exit
      powerpc: Improve behaviour of irq tracing on 64-bit exception entry
      powerpc: Call do_page_fault() with interrupts off
      powerpc: Disable interrupts in 64-bit kernel FP and vector faults
      powerpc: Add support for page fault retry and fatal signals
      powerpc/xmon: Add display of soft & hard irq states
      powerpc: Fix register clobbering when accumulating stolen time
      powerpc: Fix 64-bit BookE FP unavailable exceptions
      powerpc: Replace mfmsr instructions with load from PACA kernel_msr field
      powerpc: Rework lazy-interrupt handling
      Merge branch 'eeh' into next
      powerpc/hvc_udbg: Don't crash when udbg_putc is NULL
      powerpc: Fix power4/970 idle code regression with lockdep
      Merge remote-tracking branch 'jwb/next' into next
      Merge remote-tracking branch 'kumar/next' into next
      powerpc/spufs: Fix double unlocks

Claudiu Manoil (2):
      powerpc/85xx: Fix compiler error with THIS_MODULE and related
      powerpc/85xx: Add missing config option for CACHE SRAM code

Danny Kukawka (2):
      arch/powerpc/kvm/book3s_hv.c: included linux/sched.h twice
      arch/powerpc/platforms/powernv/setup.c: included asm/xics.h twice

Diana CRACIUN (1):
      powerpc/fsl: Added aliased MSIIR register address to MSI node in dts

Gavin Shan (21):
      powerpc/eeh: Cleanup comments in the EEH core
      powerpc/eeh: Cleanup function names in the EEH core
      powerpc/eeh: Platform dependent EEH operations
      powerpc/eeh: pseries platform EEH initialization
      powerpc/eeh: pseries platform EEH operations
      powerpc/eeh: pseries platform EEH PE address retrieval
      powerpc/eeh: pseries platform PE state retrieval
      powerpc/eeh: pseries platform EEH wait PE state
      powerpc/eeh: pseries platform EEH reset PE
      powerpc/eeh: pseries platform EEH error log retrieval
      powerpc/eeh: pseries platform EEH configure bridge
      powerpc/pseries: Cleanup comments in EEH aux components
      powerpc/eeh: Cleanup function names in EEH aux components
      powerpc/eeh: Introduce EEH device
      powerpc/eeh: Replace pci_dn with eeh_dev for EEH sysfs
      powerpc/eeh: Replace pci_dn with eeh_dev for EEH address cache
      powerpc/eeh: Replace pci_dn with eeh_dev for EEH core
      powerpc/eeh: Replace pci_dn with eeh_dev for EEH aux components
      powerpc/eeh: Replace pci_dn with eeh_dev for EEH on pSeries
      powerpc/eeh: Introduce struct eeh_stats for EEH
      powerpc/eeh: pseries platform config space access in EEH

Grant Likely (2):
      powerpc: Make SPARSE_IRQ required
      powerpc/5200: convert mpc5200 to use of_platform_populate()

Gustavo Zacarias (1):
      powerpc/85xx: fix typo in p1010rdb.dtsi

Heiko Schocher (3):
      powerpc/mpc5200: update mpc5200_defconfig to fit for charon board
      powerpc/mpc52xx: add a4m072 board support
      powerpc/mpc5200: add options to mpc5200_defconfig

Ira Snyder (2):
      carma-fpga: fix lockdep warning
      carma-fpga: fix race between data dumping and DMA callback

Jerry Huang (2):
      powerpc/85xx: add P1020MBG-PC platform support
      powerpc/85xx: add P1020UTM-PC platform support

Jia Hongtao (3):
      powerpc/85xx: Clean up partition nodes in dts for MPC8572DS
      powerpc: add support for MPIC message register API
      powerpc: document the FSL MPIC message register binding

Jimi Xenidis (1):
      powerpc/icswx: Fix race condition with IPI setting ACOP

Joe Perches (1):
      powerpc: Use vsprintf extention %pf with builtin_return_address

Josh Boyer (1):
      MAINTAINERS: Update PowerPC 4xx tree

Kumar Gala (2):
      powerpc/fsl-booke: Fixup calc_cam_sz to support MMU v2
      powerpc: Add initial e6500 cpu support

Kyle Moffett (6):
      powerpc/mpic: Fix use of "flags" variable in mpic_alloc()
      fsl/mpic: Document and use the "big-endian" device-tree flag
      fsl/mpic: Create and document the "single-cpu-affinity" device-tree flag
      powerpc/mpic: Remove MPIC_BROKEN_FRR_NIRQS and duplicate irq_count
      powerpc/mpic: Add "last-interrupt-source" property to override hardware
      powerpc/mpic: Remove duplicate MPIC_WANTS_RESET flag

Liu Gang (2):
      powerpc/srio: Fix the relocation errors when building with 64bit
      powerpc/srio: Fix the compile errors when building with 64bit

Liu Shuo (2):
      powerpc/fsl_msi: return proper error value when ioremap failed.
      powerpc/dts: fix the compatible string of sec 4.0

Mahesh Salgaonkar (10):
      fadump: Add documentation for firmware-assisted dump.
      fadump: Reserve the memory for firmware assisted dump.
      fadump: Register for firmware assisted dump.
      fadump: Initialize elfcore header and add PT_LOAD program headers.
      fadump: Convert firmware-assisted cpu state dump data into elf notes.
      fadump: Add PT_NOTE program header for vmcoreinfo
      fadump: Introduce cleanup routine to invalidate /proc/vmcore.
      fadump: Invalidate registration and release reserved memory for general use.
      fadump: Invalidate the fadump registration during machine shutdown.
      fadump: Remove the phyp assisted dump code.

Martyn Welch (4):
      powerpc: Add GE FPGA config option
      gpio: Move GE GPIO driver to reside within GPIO subsystem
      powerpc: Move GE PIC drivers
      powerpc/85xx: Board support for GE IMP3A

Masanari Iida (1):
      macintosh: Fix typo in mediabay.c

Matt Fleming (1):
      powerpc: Use set_current_blocked() and block_sigmask()

Michael Ellerman (1):
      powerpc/perf: Move perf core & PMU code into a subdirectory

Nishanth Aravamudan (1):
      powerpc/prom: Remove limit on maximum size of properties

Paul Gortmaker (2):
      powerpc/85xx: fix Kconfig warning about missing 8250 dependency
      powerpc/83xx: mpc836x - fix failed phy detection for ucc ethernet on MDS

Prabhakar Kushwaha (1):
      NAND Machine support for Integrated Flash Controller

Ramneek Mehresh (1):
      powerpc/85xx: Add usb controller version info

Sebastian Andrzej Siewior (2):
      powerpc/85xx: p2020rdb - move the NAND address.
      powerpc/85xx: p2020rdb & p1010rdb - lower spi flash freq to 40Mhz

Stephen Rothwell (15):
      powerpc: remove CONFIG_PPC_ISERIES from the architecture Kconfig files
      powerpc: Remove the main legacy iSerie platform code
      net: powerpc: remove the legacy iSeries ethernet driver
      powerpc: remove the legacy iSeries part of ibmvscsi
      tty: powerpc: remove hvc_iseries
      tty: powerpc: remove SERIAL_ICOM dependency on PPC_ISERIES
      driver-core: remove legacy iSeries hack
      powerpc: clean up vio.c
      powerpc: Remove some of the legacy iSeries specific device drivers
      tty/hvc_vio: FW_FEATURE_ISERIES is no longer selectable
      powerpc: Remove FW_FEATURE ISERIES from arch code
      init: Remove CONFIG_PPC_ISERIES
      powerpc: Remove the remaining CONFIG_PPC_ISERIES pieces
      powerpc: Remove the rest of the legacy iSeries include files
      powerpc/ps3: Do not adjust the wrapper load address

Tang Yuantian (2):
      powerpc/85xx: Adds Support for P2020RDB-PC board
      powerpc/85xx: Add p2020rdb-pc dts support

Timur Tabi (4):
      powerpc/85xx: create 32-bit DTS for the P1022DS
      powerpc/85xx: p1022ds: disable the NOR flash node if video is enabled
      powerpc/85xx: p1022ds: enable monitor switching via pixis indirect mode
      powerpc/85xx: allow CONFIG_PHYS_64BIT to be selectable

Vinh Nguyen Huu Tuong (3):
      powerpc/44x: The bug fixed support for APM821xx SoC and Bluestone board
      powerpc/44x: Add support PCI-E for APM821xx SoC and Bluestone board
      powerpc/44x: Add additional device support for APM821xx SoC and Bluestone board

Xie Xiaobo (2):
      powerpc/85xx: Add some DTS nodes and attributes for mpc8536ds
      powerpc/85xx: Add magic-packet properties for etsec

Xu Jiucheng (2):
      powerpc/85xx: Added dts for P1021RDB-PC board
      powerpc/85xx: Added P1021RDB-PC Platform support

Zhao Chenhui (3):
      powerpc/85xx: mpc8548cds - fix alias in mpc8548si-pre.dtsi
      powerpc/85xx: Refactor mpc8548cds device tree
      powerpc/85xx: mpc8548cds - add 36-bit dts

Zhicheng Fan (6):
      powerpc/85xx: Add p1025rdb platform support
      powerpc/85xx: Add dts for p1025rdb board
      powerpc/85xx: Add p1020rdb-pc platform support
      powerpc/85xx: Add dts for p1020rdb-pc board
      powerpc/85xx: Abstract common define of signal multiplex control for qe
      powerpc/85xx: Add Quicc Engine support for p1025rdb

chenhui zhao (5):
      powerpc/85xx: l2sram - Add compatible entry for mpc8548 L2 controller
      powerpc/85xx: mpc85xxcds - Fix PCI I/O space resource of PCI bridge
      powerpc/85xx: mpc8548cds - Add NOR flash node to dts
      powerpc/85xx: mpc8548cds - Add RapidIO node to dts
      powerpc/85xx: mpc8548cds - Add FPGA node to dts

 .../devicetree/bindings/powerpc/fsl/mpic-msgr.txt  |   63 +
 .../devicetree/bindings/powerpc/fsl/mpic.txt       |   22 +-
 .../devicetree/bindings/powerpc/fsl/msi-pic.txt    |    6 +-
 Documentation/powerpc/firmware-assisted-dump.txt   |  270 +++
 Documentation/powerpc/mpc52xx.txt                  |   12 +-
 Documentation/powerpc/phyp-assisted-dump.txt       |  127 --
 MAINTAINERS                                        |    2 +-
 arch/powerpc/Kconfig                               |   18 +-
 arch/powerpc/Kconfig.debug                         |    7 -
 arch/powerpc/Makefile                              |    1 +
 arch/powerpc/boot/Makefile                         |   11 +-
 arch/powerpc/boot/dts/a4m072.dts                   |  168 ++
 arch/powerpc/boot/dts/bluestone.dts                |  127 ++-
 arch/powerpc/boot/dts/fsl/mpc8536si-post.dtsi      |    4 +-
 arch/powerpc/boot/dts/fsl/mpc8548si-post.dtsi      |   16 +
 arch/powerpc/boot/dts/fsl/mpc8548si-pre.dtsi       |    4 +-
 arch/powerpc/boot/dts/fsl/p1010si-post.dtsi        |    3 +
 arch/powerpc/boot/dts/fsl/p1020si-post.dtsi        |    6 +
 arch/powerpc/boot/dts/fsl/p1021si-post.dtsi        |    7 +
 arch/powerpc/boot/dts/fsl/p1022si-post.dtsi        |   12 +-
 arch/powerpc/boot/dts/fsl/p1023si-post.dtsi        |    3 +
 arch/powerpc/boot/dts/fsl/p2020si-post.dtsi        |    3 +
 arch/powerpc/boot/dts/fsl/p2041si-post.dtsi        |    2 +
 arch/powerpc/boot/dts/fsl/p3041si-post.dtsi        |    2 +
 arch/powerpc/boot/dts/fsl/p3060si-post.dtsi        |    6 +
 arch/powerpc/boot/dts/fsl/p5020si-post.dtsi        |    2 +
 arch/powerpc/boot/dts/fsl/pq3-etsec1-0.dtsi        |    3 +-
 arch/powerpc/boot/dts/fsl/pq3-etsec1-1.dtsi        |    3 +-
 arch/powerpc/boot/dts/fsl/pq3-etsec1-2.dtsi        |    3 +-
 arch/powerpc/boot/dts/fsl/pq3-etsec1-3.dtsi        |    3 +-
 arch/powerpc/boot/dts/fsl/pq3-mpic.dtsi            |    3 +
 arch/powerpc/boot/dts/fsl/pq3-sec4.4-0.dtsi        |   10 +-
 arch/powerpc/boot/dts/fsl/qoriq-mpic.dtsi          |    6 +-
 arch/powerpc/boot/dts/ge_imp3a.dts                 |  255 +++
 arch/powerpc/boot/dts/mpc836x_mds.dts              |    4 +
 arch/powerpc/boot/dts/mpc8536ds.dts                |    6 +-
 arch/powerpc/boot/dts/mpc8536ds.dtsi               |   93 ++
 arch/powerpc/boot/dts/mpc8536ds_36b.dts            |    8 +-
 arch/powerpc/boot/dts/mpc8548cds.dts               |  306 ----
 arch/powerpc/boot/dts/mpc8548cds.dtsi              |  306 ++++
 arch/powerpc/boot/dts/mpc8548cds_32b.dts           |   86 +
 arch/powerpc/boot/dts/mpc8548cds_36b.dts           |   86 +
 arch/powerpc/boot/dts/mpc8572ds.dtsi               |   50 +-
 arch/powerpc/boot/dts/p1010rdb.dtsi                |    4 +-
 arch/powerpc/boot/dts/p1020rdb-pc.dtsi             |  247 +++
 arch/powerpc/boot/dts/p1020rdb-pc_32b.dts          |   90 +
 arch/powerpc/boot/dts/p1020rdb-pc_36b.dts          |   90 +
 arch/powerpc/boot/dts/p1020rdb-pc_camp_core0.dts   |   64 +
 arch/powerpc/boot/dts/p1020rdb-pc_camp_core1.dts   |  142 ++
 arch/powerpc/boot/dts/p1021rdb.dts                 |   96 ++
 arch/powerpc/boot/dts/p1021rdb.dtsi                |  236 +++
 arch/powerpc/boot/dts/p1021rdb_36b.dts             |   96 ++
 arch/powerpc/boot/dts/p1022ds.dts                  |  274 ----
 arch/powerpc/boot/dts/p1022ds.dtsi                 |  234 +++
 arch/powerpc/boot/dts/p1022ds_32b.dts              |  103 ++
 arch/powerpc/boot/dts/p1022ds_36b.dts              |  103 ++
 arch/powerpc/boot/dts/p1025rdb.dtsi                |  286 ++++
 arch/powerpc/boot/dts/p1025rdb_32b.dts             |  135 ++
 arch/powerpc/boot/dts/p1025rdb_36b.dts             |   88 +
 arch/powerpc/boot/dts/p2020rdb-pc.dtsi             |  241 +++
 arch/powerpc/boot/dts/p2020rdb-pc_32b.dts          |   96 ++
 arch/powerpc/boot/dts/p2020rdb-pc_36b.dts          |   96 ++
 arch/powerpc/boot/dts/p2020rdb.dts                 |    4 +-
 arch/powerpc/boot/wrapper                          |   22 +-
 arch/powerpc/configs/85xx/ge_imp3a_defconfig       |  257 +++
 arch/powerpc/configs/86xx/gef_ppc9a_defconfig      |    1 +
 arch/powerpc/configs/86xx/gef_sbc310_defconfig     |    1 +
 arch/powerpc/configs/86xx/gef_sbc610_defconfig     |    2 +
 arch/powerpc/configs/iseries_defconfig             |  236 ---
 arch/powerpc/configs/mpc5200_defconfig             |   27 +-
 arch/powerpc/configs/mpc85xx_defconfig             |    1 +
 arch/powerpc/configs/mpc85xx_smp_defconfig         |    1 +
 arch/powerpc/include/asm/abs_addr.h                |   21 +-
 arch/powerpc/include/asm/atomic.h                  |   59 +-
 arch/powerpc/include/asm/cputable.h                |   12 +-
 arch/powerpc/include/asm/device.h                  |    3 +
 arch/powerpc/include/asm/dma.h                     |    4 -
 arch/powerpc/include/asm/eeh.h                     |  134 ++-
 arch/powerpc/include/asm/eeh_event.h               |   33 +-
 arch/powerpc/include/asm/exception-64s.h           |  113 +-
 arch/powerpc/include/asm/fadump.h                  |  218 +++
 arch/powerpc/include/asm/firmware.h                |    9 -
 arch/powerpc/include/asm/fsl_guts.h                |    6 +-
 arch/powerpc/include/asm/hw_irq.h                  |   63 +-
 arch/powerpc/include/asm/irqflags.h                |   37 +-
 arch/powerpc/include/asm/iseries/alpaca.h          |   31 -
 arch/powerpc/include/asm/iseries/hv_call.h         |  111 --
 arch/powerpc/include/asm/iseries/hv_call_event.h   |  201 ---
 arch/powerpc/include/asm/iseries/hv_call_sc.h      |   50 -
 arch/powerpc/include/asm/iseries/hv_call_xm.h      |   61 -
 arch/powerpc/include/asm/iseries/hv_lp_config.h    |  128 --
 arch/powerpc/include/asm/iseries/hv_lp_event.h     |  162 --
 arch/powerpc/include/asm/iseries/hv_types.h        |  112 --
 arch/powerpc/include/asm/iseries/iommu.h           |   37 -
 arch/powerpc/include/asm/iseries/it_lp_queue.h     |   78 -
 arch/powerpc/include/asm/iseries/lpar_map.h        |   85 -
 arch/powerpc/include/asm/iseries/mf.h              |   51 -
 arch/powerpc/include/asm/iseries/vio.h             |  265 ---
 arch/powerpc/include/asm/lppaca.h                  |    8 -
 arch/powerpc/include/asm/mpic.h                    |    9 +-
 arch/powerpc/include/asm/mpic_msgr.h               |  132 ++
 arch/powerpc/include/asm/paca.h                    |    2 +-
 arch/powerpc/include/asm/phyp_dump.h               |   47 -
 arch/powerpc/include/asm/ppc-pci.h                 |   89 +-
 arch/powerpc/include/asm/ppc_asm.h                 |    2 +
 arch/powerpc/include/asm/reg.h                     |   22 +-
 arch/powerpc/include/asm/reg_booke.h               |    1 +
 arch/powerpc/include/asm/spinlock.h                |    5 +-
 arch/powerpc/include/asm/system.h                  |   38 +
 arch/powerpc/include/asm/thread_info.h             |    9 +-
 arch/powerpc/include/asm/time.h                    |   15 -
 arch/powerpc/kernel/Makefile                       |   10 +-
 arch/powerpc/kernel/asm-offsets.c                  |   16 +-
 arch/powerpc/kernel/cputable.c                     |   20 +-
 arch/powerpc/kernel/dbell.c                        |    2 +
 arch/powerpc/kernel/entry_64.S                     |  250 ++--
 arch/powerpc/kernel/exceptions-64e.S               |  236 ++-
 arch/powerpc/kernel/exceptions-64s.S               |  314 +---
 arch/powerpc/kernel/fadump.c                       | 1315 +++++++++++++++
 arch/powerpc/kernel/head_32.S                      |    4 +-
 arch/powerpc/kernel/head_40x.S                     |    4 +-
 arch/powerpc/kernel/head_64.S                      |   62 +-
 arch/powerpc/kernel/head_8xx.S                     |    4 +-
 arch/powerpc/kernel/head_booke.h                   |    4 +-
 arch/powerpc/kernel/head_fsl_booke.S               |    2 +-
 arch/powerpc/kernel/idle.c                         |    6 +-
 arch/powerpc/kernel/idle_book3e.S                  |   25 +-
 arch/powerpc/kernel/idle_power4.S                  |   24 +-
 arch/powerpc/kernel/idle_power7.S                  |   23 +-
 arch/powerpc/kernel/iommu.c                        |    8 +-
 arch/powerpc/kernel/irq.c                          |  212 ++-
 arch/powerpc/kernel/isa-bridge.c                   |    3 -
 arch/powerpc/kernel/lparcfg.c                      |  108 +--
 arch/powerpc/kernel/misc.S                         |    1 -
 arch/powerpc/kernel/of_platform.c                  |    6 +-
 arch/powerpc/kernel/paca.c                         |   12 +-
 arch/powerpc/kernel/pci-common.c                   |   15 -
 arch/powerpc/kernel/process.c                      |   27 +-
 arch/powerpc/kernel/prom.c                         |   98 +-
 arch/powerpc/kernel/prom_init.c                    |   15 -
 arch/powerpc/kernel/rtas_pci.c                     |    3 +
 arch/powerpc/kernel/setup-common.c                 |   14 +
 arch/powerpc/kernel/signal.c                       |   13 +-
 arch/powerpc/kernel/signal_32.c                    |   11 +-
 arch/powerpc/kernel/sysfs.c                        |    7 +-
 arch/powerpc/kernel/time.c                         |  116 +--
 arch/powerpc/kernel/traps.c                        |    6 +
 arch/powerpc/kernel/vio.c                          |   18 +-
 arch/powerpc/kernel/vmlinux.lds.S                  |    5 -
 arch/powerpc/kvm/book3s_hv.c                       |    1 -
 arch/powerpc/lib/locks.c                           |   24 +-
 arch/powerpc/mm/fault.c                            |  181 ++-
 arch/powerpc/mm/fsl_booke_mmu.c                    |   19 +-
 arch/powerpc/mm/hash_utils_64.c                    |   20 +-
 arch/powerpc/mm/icswx.c                            |   23 +-
 arch/powerpc/mm/icswx.h                            |    6 +
 arch/powerpc/mm/pgtable_32.c                       |    2 +-
 arch/powerpc/mm/slb.c                              |    6 -
 arch/powerpc/mm/slb_low.S                          |   16 -
 arch/powerpc/mm/stab.c                             |    9 -
 arch/powerpc/oprofile/common.c                     |    3 -
 arch/powerpc/perf/Makefile                         |   14 +
 .../{kernel/perf_callchain.c => perf/callchain.c}  |    2 +-
 .../{kernel/perf_event.c => perf/core-book3s.c}    |    0
 .../perf_event_fsl_emb.c => perf/core-fsl-emb.c}   |    0
 arch/powerpc/{kernel => perf}/e500-pmu.c           |    0
 arch/powerpc/{kernel => perf}/mpc7450-pmu.c        |    0
 arch/powerpc/{kernel => perf}/power4-pmu.c         |    0
 arch/powerpc/{kernel => perf}/power5+-pmu.c        |    0
 arch/powerpc/{kernel => perf}/power5-pmu.c         |    0
 arch/powerpc/{kernel => perf}/power6-pmu.c         |    2 +-
 arch/powerpc/{kernel => perf}/power7-pmu.c         |    0
 arch/powerpc/{kernel => perf}/ppc970-pmu.c         |    2 +-
 arch/powerpc/platforms/44x/Kconfig                 |    1 +
 arch/powerpc/platforms/44x/currituck.c             |    2 +-
 arch/powerpc/platforms/44x/iss4xx.c                |    3 +-
 arch/powerpc/platforms/44x/ppc44x_simple.c         |    2 +-
 arch/powerpc/platforms/52xx/mpc5200_simple.c       |    1 +
 arch/powerpc/platforms/52xx/mpc52xx_common.c       |   10 +-
 arch/powerpc/platforms/85xx/Kconfig                |   27 +-
 arch/powerpc/platforms/85xx/Makefile               |    1 +
 arch/powerpc/platforms/85xx/corenet_ds.c           |    4 +-
 arch/powerpc/platforms/85xx/ge_imp3a.c             |  246 +++
 arch/powerpc/platforms/85xx/ksi8560.c              |    3 +-
 arch/powerpc/platforms/85xx/mpc8536_ds.c           |    4 +-
 arch/powerpc/platforms/85xx/mpc85xx_ads.c          |    3 +-
 arch/powerpc/platforms/85xx/mpc85xx_cds.c          |   84 +-
 arch/powerpc/platforms/85xx/mpc85xx_ds.c           |    6 +-
 arch/powerpc/platforms/85xx/mpc85xx_mds.c          |   40 +-
 arch/powerpc/platforms/85xx/mpc85xx_rdb.c          |  222 +++-
 arch/powerpc/platforms/85xx/p1010rdb.c             |    5 +-
 arch/powerpc/platforms/85xx/p1022_ds.c             |  207 +++-
 arch/powerpc/platforms/85xx/p1023_rds.c            |    5 +-
 arch/powerpc/platforms/85xx/sbc8548.c              |    3 +-
 arch/powerpc/platforms/85xx/sbc8560.c              |    3 +-
 arch/powerpc/platforms/85xx/socrates.c             |    3 +-
 arch/powerpc/platforms/85xx/stx_gp3.c              |    3 +-
 arch/powerpc/platforms/85xx/tqm85xx.c              |    2 +-
 arch/powerpc/platforms/85xx/xes_mpc85xx.c          |    4 +-
 arch/powerpc/platforms/86xx/Kconfig                |    3 +
 arch/powerpc/platforms/86xx/Makefile               |    7 +-
 arch/powerpc/platforms/86xx/gef_ppc9a.c            |    2 +-
 arch/powerpc/platforms/86xx/gef_sbc310.c           |    2 +-
 arch/powerpc/platforms/86xx/gef_sbc610.c           |    2 +-
 arch/powerpc/platforms/86xx/pic.c                  |    5 +-
 arch/powerpc/platforms/Kconfig                     |   11 +-
 arch/powerpc/platforms/Makefile                    |    1 -
 arch/powerpc/platforms/cell/setup.c                |    3 +-
 arch/powerpc/platforms/cell/spufs/inode.c          |    1 +
 arch/powerpc/platforms/cell/spufs/syscalls.c       |    2 -
 arch/powerpc/platforms/chrp/setup.c                |    3 +-
 arch/powerpc/platforms/embedded6xx/holly.c         |    6 +-
 arch/powerpc/platforms/embedded6xx/linkstation.c   |    3 +-
 arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c  |    6 +-
 arch/powerpc/platforms/embedded6xx/storcenter.c    |    3 +-
 arch/powerpc/platforms/iseries/Kconfig             |   38 -
 arch/powerpc/platforms/iseries/Makefile            |    9 -
 arch/powerpc/platforms/iseries/call_hpt.h          |  102 --
 arch/powerpc/platforms/iseries/call_pci.h          |  309 ----
 arch/powerpc/platforms/iseries/call_sm.h           |   37 -
 arch/powerpc/platforms/iseries/dt.c                |  643 --------
 arch/powerpc/platforms/iseries/exception.S         |  311 ----
 arch/powerpc/platforms/iseries/exception.h         |   58 -
 arch/powerpc/platforms/iseries/htab.c              |  257 ---
 arch/powerpc/platforms/iseries/hvcall.S            |   94 --
 arch/powerpc/platforms/iseries/hvlog.c             |   35 -
 arch/powerpc/platforms/iseries/hvlpconfig.c        |   39 -
 arch/powerpc/platforms/iseries/iommu.c             |  260 ---
 arch/powerpc/platforms/iseries/ipl_parms.h         |   68 -
 arch/powerpc/platforms/iseries/irq.c               |  400 -----
 arch/powerpc/platforms/iseries/irq.h               |   13 -
 arch/powerpc/platforms/iseries/it_exp_vpd_panel.h  |   51 -
 arch/powerpc/platforms/iseries/it_lp_naca.h        |   80 -
 arch/powerpc/platforms/iseries/ksyms.c             |   21 -
 arch/powerpc/platforms/iseries/lpardata.c          |  318 ----
 arch/powerpc/platforms/iseries/lpevents.c          |  341 ----
 arch/powerpc/platforms/iseries/main_store.h        |  165 --
 arch/powerpc/platforms/iseries/mf.c                | 1275 ---------------
 arch/powerpc/platforms/iseries/misc.S              |   26 -
 arch/powerpc/platforms/iseries/naca.h              |   24 -
 arch/powerpc/platforms/iseries/pci.c               |  919 -----------
 arch/powerpc/platforms/iseries/pci.h               |   58 -
 arch/powerpc/platforms/iseries/proc.c              |  120 --
 arch/powerpc/platforms/iseries/processor_vpd.h     |   85 -
 arch/powerpc/platforms/iseries/release_data.h      |   63 -
 arch/powerpc/platforms/iseries/setup.c             |  722 ---------
 arch/powerpc/platforms/iseries/setup.h             |   27 -
 arch/powerpc/platforms/iseries/smp.c               |   88 -
 arch/powerpc/platforms/iseries/spcomm_area.h       |   34 -
 arch/powerpc/platforms/iseries/vio.c               |  556 -------
 arch/powerpc/platforms/iseries/viopath.c           |  677 --------
 arch/powerpc/platforms/iseries/vpd_areas.h         |   88 -
 arch/powerpc/platforms/maple/setup.c               |    2 +-
 arch/powerpc/platforms/pasemi/setup.c              |    2 +-
 arch/powerpc/platforms/powermac/nvram.c            |   42 +-
 arch/powerpc/platforms/powermac/pic.c              |    1 -
 arch/powerpc/platforms/powernv/pci.c               |    1 +
 arch/powerpc/platforms/powernv/setup.c             |    1 -
 arch/powerpc/platforms/pseries/Kconfig             |    2 +-
 arch/powerpc/platforms/pseries/Makefile            |    4 +-
 arch/powerpc/platforms/pseries/eeh.c               | 1044 ++++++-------
 arch/powerpc/platforms/pseries/eeh_cache.c         |   44 +-
 arch/powerpc/platforms/pseries/eeh_dev.c           |  102 ++
 arch/powerpc/platforms/pseries/eeh_driver.c        |  213 ++--
 arch/powerpc/platforms/pseries/eeh_event.c         |   55 +-
 arch/powerpc/platforms/pseries/eeh_pseries.c       |  565 +++++++
 arch/powerpc/platforms/pseries/eeh_sysfs.c         |   25 +-
 arch/powerpc/platforms/pseries/lpar.c              |    1 +
 arch/powerpc/platforms/pseries/msi.c               |    2 +-
 arch/powerpc/platforms/pseries/pci_dlpar.c         |    3 +
 arch/powerpc/platforms/pseries/phyp_dump.c         |  513 ------
 arch/powerpc/platforms/pseries/processor_idle.c    |   18 +-
 arch/powerpc/platforms/pseries/setup.c             |   12 +-
 arch/powerpc/sysdev/Kconfig                        |    4 +
 arch/powerpc/sysdev/Makefile                       |    4 +
 arch/powerpc/sysdev/fsl_85xx_cache_sram.c          |    1 +
 arch/powerpc/sysdev/fsl_85xx_l2ctlr.c              |    4 +
 arch/powerpc/sysdev/fsl_msi.c                      |    1 +
 arch/powerpc/sysdev/fsl_rio.c                      |    4 +-
 arch/powerpc/sysdev/fsl_rmu.c                      |   42 +-
 arch/powerpc/sysdev/ge/Makefile                    |    1 +
 .../86xx/gef_pic.c => sysdev/ge/ge_pic.c}          |    2 +-
 .../86xx/gef_pic.h => sysdev/ge/ge_pic.h}          |    0
 arch/powerpc/sysdev/mpic.c                         |  107 +-
 arch/powerpc/sysdev/mpic_msgr.c                    |  282 ++++
 arch/powerpc/sysdev/mpic_msi.c                     |    4 +-
 arch/powerpc/sysdev/ppc4xx_pci.c                   |   70 +
 arch/powerpc/xmon/xmon.c                           |   33 +-
 drivers/base/driver.c                              |   30 -
 drivers/block/viodasd.c                            |  809 ---------
 drivers/cdrom/viocd.c                              |  739 ---------
 drivers/char/viotape.c                             | 1041 ------------
 drivers/gpio/Kconfig                               |   11 +
 drivers/gpio/Makefile                              |    1 +
 .../86xx/gef_gpio.c => drivers/gpio/gpio-ge.c      |   30 +-
 drivers/macintosh/mediabay.c                       |    2 +-
 drivers/misc/carma/carma-fpga.c                    |  114 +-
 drivers/mtd/nand/Kconfig                           |   10 +
 drivers/mtd/nand/Makefile                          |    1 +
 drivers/mtd/nand/fsl_ifc_nand.c                    | 1072 ++++++++++++
 drivers/net/ethernet/ibm/Kconfig                   |    4 -
 drivers/net/ethernet/ibm/Makefile                  |    1 -
 drivers/net/ethernet/ibm/iseries_veth.c            | 1710 --------------------
 drivers/scsi/Kconfig                               |    3 +-
 drivers/scsi/ibmvscsi/Makefile                     |    1 -
 drivers/scsi/ibmvscsi/ibmvscsi.c                   |   12 +-
 drivers/scsi/ibmvscsi/ibmvscsi.h                   |    1 -
 drivers/scsi/ibmvscsi/iseries_vscsi.c              |  173 --
 drivers/tty/hvc/Kconfig                            |   14 +-
 drivers/tty/hvc/Makefile                           |    1 -
 drivers/tty/hvc/hvc_iseries.c                      |  599 -------
 drivers/tty/hvc/hvc_udbg.c                         |    8 +-
 drivers/tty/hvc/hvc_vio.c                          |    4 -
 drivers/tty/serial/Kconfig                         |    2 +-
 drivers/watchdog/Kconfig                           |    2 +-
 fs/proc/vmcore.c                                   |   23 +
 include/linux/atomic.h                             |    2 +
 include/linux/device.h                             |    4 -
 include/linux/of.h                                 |   10 +
 include/linux/pci.h                                |    7 +
 init/do_mounts_rd.c                                |    4 +-
 321 files changed, 11235 insertions(+), 19006 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/powerpc/fsl/mpic-msgr.txt
 create mode 100644 Documentation/powerpc/firmware-assisted-dump.txt
 delete mode 100644 Documentation/powerpc/phyp-assisted-dump.txt
 create mode 100644 arch/powerpc/boot/dts/a4m072.dts
 create mode 100644 arch/powerpc/boot/dts/ge_imp3a.dts
 delete mode 100644 arch/powerpc/boot/dts/mpc8548cds.dts
 create mode 100644 arch/powerpc/boot/dts/mpc8548cds.dtsi
 create mode 100644 arch/powerpc/boot/dts/mpc8548cds_32b.dts
 create mode 100644 arch/powerpc/boot/dts/mpc8548cds_36b.dts
 create mode 100644 arch/powerpc/boot/dts/p1020rdb-pc.dtsi
 create mode 100644 arch/powerpc/boot/dts/p1020rdb-pc_32b.dts
 create mode 100644 arch/powerpc/boot/dts/p1020rdb-pc_36b.dts
 create mode 100644 arch/powerpc/boot/dts/p1020rdb-pc_camp_core0.dts
 create mode 100644 arch/powerpc/boot/dts/p1020rdb-pc_camp_core1.dts
 create mode 100644 arch/powerpc/boot/dts/p1021rdb.dts
 create mode 100644 arch/powerpc/boot/dts/p1021rdb.dtsi
 create mode 100644 arch/powerpc/boot/dts/p1021rdb_36b.dts
 delete mode 100644 arch/powerpc/boot/dts/p1022ds.dts
 create mode 100644 arch/powerpc/boot/dts/p1022ds.dtsi
 create mode 100644 arch/powerpc/boot/dts/p1022ds_32b.dts
 create mode 100644 arch/powerpc/boot/dts/p1022ds_36b.dts
 create mode 100644 arch/powerpc/boot/dts/p1025rdb.dtsi
 create mode 100644 arch/powerpc/boot/dts/p1025rdb_32b.dts
 create mode 100644 arch/powerpc/boot/dts/p1025rdb_36b.dts
 create mode 100644 arch/powerpc/boot/dts/p2020rdb-pc.dtsi
 create mode 100644 arch/powerpc/boot/dts/p2020rdb-pc_32b.dts
 create mode 100644 arch/powerpc/boot/dts/p2020rdb-pc_36b.dts
 create mode 100644 arch/powerpc/configs/85xx/ge_imp3a_defconfig
 delete mode 100644 arch/powerpc/configs/iseries_defconfig
 create mode 100644 arch/powerpc/include/asm/fadump.h
 delete mode 100644 arch/powerpc/include/asm/iseries/alpaca.h
 delete mode 100644 arch/powerpc/include/asm/iseries/hv_call.h
 delete mode 100644 arch/powerpc/include/asm/iseries/hv_call_event.h
 delete mode 100644 arch/powerpc/include/asm/iseries/hv_call_sc.h
 delete mode 100644 arch/powerpc/include/asm/iseries/hv_call_xm.h
 delete mode 100644 arch/powerpc/include/asm/iseries/hv_lp_config.h
 delete mode 100644 arch/powerpc/include/asm/iseries/hv_lp_event.h
 delete mode 100644 arch/powerpc/include/asm/iseries/hv_types.h
 delete mode 100644 arch/powerpc/include/asm/iseries/iommu.h
 delete mode 100644 arch/powerpc/include/asm/iseries/it_lp_queue.h
 delete mode 100644 arch/powerpc/include/asm/iseries/lpar_map.h
 delete mode 100644 arch/powerpc/include/asm/iseries/mf.h
 delete mode 100644 arch/powerpc/include/asm/iseries/vio.h
 create mode 100644 arch/powerpc/include/asm/mpic_msgr.h
 delete mode 100644 arch/powerpc/include/asm/phyp_dump.h
 create mode 100644 arch/powerpc/kernel/fadump.c
 create mode 100644 arch/powerpc/perf/Makefile
 rename arch/powerpc/{kernel/perf_callchain.c => perf/callchain.c} (99%)
 rename arch/powerpc/{kernel/perf_event.c => perf/core-book3s.c} (100%)
 rename arch/powerpc/{kernel/perf_event_fsl_emb.c => perf/core-fsl-emb.c} (100%)
 rename arch/powerpc/{kernel => perf}/e500-pmu.c (100%)
 rename arch/powerpc/{kernel => perf}/mpc7450-pmu.c (100%)
 rename arch/powerpc/{kernel => perf}/power4-pmu.c (100%)
 rename arch/powerpc/{kernel => perf}/power5+-pmu.c (100%)
 rename arch/powerpc/{kernel => perf}/power5-pmu.c (100%)
 rename arch/powerpc/{kernel => perf}/power6-pmu.c (99%)
 rename arch/powerpc/{kernel => perf}/power7-pmu.c (100%)
 rename arch/powerpc/{kernel => perf}/ppc970-pmu.c (99%)
 create mode 100644 arch/powerpc/platforms/85xx/ge_imp3a.c
 delete mode 100644 arch/powerpc/platforms/iseries/Kconfig
 delete mode 100644 arch/powerpc/platforms/iseries/Makefile
 delete mode 100644 arch/powerpc/platforms/iseries/call_hpt.h
 delete mode 100644 arch/powerpc/platforms/iseries/call_pci.h
 delete mode 100644 arch/powerpc/platforms/iseries/call_sm.h
 delete mode 100644 arch/powerpc/platforms/iseries/dt.c
 delete mode 100644 arch/powerpc/platforms/iseries/exception.S
 delete mode 100644 arch/powerpc/platforms/iseries/exception.h
 delete mode 100644 arch/powerpc/platforms/iseries/htab.c
 delete mode 100644 arch/powerpc/platforms/iseries/hvcall.S
 delete mode 100644 arch/powerpc/platforms/iseries/hvlog.c
 delete mode 100644 arch/powerpc/platforms/iseries/hvlpconfig.c
 delete mode 100644 arch/powerpc/platforms/iseries/iommu.c
 delete mode 100644 arch/powerpc/platforms/iseries/ipl_parms.h
 delete mode 100644 arch/powerpc/platforms/iseries/irq.c
 delete mode 100644 arch/powerpc/platforms/iseries/irq.h
 delete mode 100644 arch/powerpc/platforms/iseries/it_exp_vpd_panel.h
 delete mode 100644 arch/powerpc/platforms/iseries/it_lp_naca.h
 delete mode 100644 arch/powerpc/platforms/iseries/ksyms.c
 delete mode 100644 arch/powerpc/platforms/iseries/lpardata.c
 delete mode 100644 arch/powerpc/platforms/iseries/lpevents.c
 delete mode 100644 arch/powerpc/platforms/iseries/main_store.h
 delete mode 100644 arch/powerpc/platforms/iseries/mf.c
 delete mode 100644 arch/powerpc/platforms/iseries/misc.S
 delete mode 100644 arch/powerpc/platforms/iseries/naca.h
 delete mode 100644 arch/powerpc/platforms/iseries/pci.c
 delete mode 100644 arch/powerpc/platforms/iseries/pci.h
 delete mode 100644 arch/powerpc/platforms/iseries/proc.c
 delete mode 100644 arch/powerpc/platforms/iseries/processor_vpd.h
 delete mode 100644 arch/powerpc/platforms/iseries/release_data.h
 delete mode 100644 arch/powerpc/platforms/iseries/setup.c
 delete mode 100644 arch/powerpc/platforms/iseries/setup.h
 delete mode 100644 arch/powerpc/platforms/iseries/smp.c
 delete mode 100644 arch/powerpc/platforms/iseries/spcomm_area.h
 delete mode 100644 arch/powerpc/platforms/iseries/vio.c
 delete mode 100644 arch/powerpc/platforms/iseries/viopath.c
 delete mode 100644 arch/powerpc/platforms/iseries/vpd_areas.h
 create mode 100644 arch/powerpc/platforms/pseries/eeh_dev.c
 create mode 100644 arch/powerpc/platforms/pseries/eeh_pseries.c
 delete mode 100644 arch/powerpc/platforms/pseries/phyp_dump.c
 create mode 100644 arch/powerpc/sysdev/ge/Makefile
 rename arch/powerpc/{platforms/86xx/gef_pic.c => sysdev/ge/ge_pic.c} (99%)
 rename arch/powerpc/{platforms/86xx/gef_pic.h => sysdev/ge/ge_pic.h} (100%)
 create mode 100644 arch/powerpc/sysdev/mpic_msgr.c
 delete mode 100644 drivers/block/viodasd.c
 delete mode 100644 drivers/cdrom/viocd.c
 delete mode 100644 drivers/char/viotape.c
 rename arch/powerpc/platforms/86xx/gef_gpio.c => drivers/gpio/gpio-ge.c (83%)
 create mode 100644 drivers/mtd/nand/fsl_ifc_nand.c
 delete mode 100644 drivers/net/ethernet/ibm/iseries_veth.c
 delete mode 100644 drivers/scsi/ibmvscsi/iseries_vscsi.c
 delete mode 100644 drivers/tty/hvc/hvc_iseries.c

^ permalink raw reply

* [PATCH 1/3] powerpc/eeh: remove eeh device from OF node
From: Gavin Shan @ 2012-03-21  7:30 UTC (permalink / raw)
  To: linuxppc-dev, benh; +Cc: sfr, shangw

Originally, the PCI sensitive OF node is tracing the eeh device
through struct device_node::edev. However, it was regarded as
bad idea.

The patch removes struct device_node::edev and uses PCI_DN to
trace the corresponding eeh device according to BenH's comments.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
---
 arch/powerpc/include/asm/pci-bridge.h    |    8 ++++++++
 arch/powerpc/platforms/pseries/eeh_dev.c |    2 +-
 include/linux/of.h                       |   10 ----------
 3 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/arch/powerpc/include/asm/pci-bridge.h b/arch/powerpc/include/asm/pci-bridge.h
index 5d48765..21f99ae 100644
--- a/arch/powerpc/include/asm/pci-bridge.h
+++ b/arch/powerpc/include/asm/pci-bridge.h
@@ -155,6 +155,7 @@ struct pci_dn {
 
 	struct	pci_dev *pcidev;	/* back-pointer to the pci device */
 #ifdef CONFIG_EEH
+	struct eeh_dev *edev;		/* eeh device */
 	int	class_code;		/* pci device class */
 	int	eeh_mode;		/* See eeh.h for possible EEH_MODEs */
 	int	eeh_config_addr;
@@ -185,6 +186,13 @@ static inline int pci_device_from_OF_node(struct device_node *np,
 	return 0;
 }
 
+#if defined(CONFIG_EEH)
+static inline struct eeh_dev *of_node_to_eeh_dev(struct device_node *dn)
+{
+	return PCI_DN(dn)->edev;
+}
+#endif
+
 /** Find the bus corresponding to the indicated device node */
 extern struct pci_bus *pcibios_find_pci_bus(struct device_node *dn);
 
diff --git a/arch/powerpc/platforms/pseries/eeh_dev.c b/arch/powerpc/platforms/pseries/eeh_dev.c
index f3aed7d..c4507d0 100644
--- a/arch/powerpc/platforms/pseries/eeh_dev.c
+++ b/arch/powerpc/platforms/pseries/eeh_dev.c
@@ -62,7 +62,7 @@ void * __devinit eeh_dev_init(struct device_node *dn, void *data)
 	}
 
 	/* Associate EEH device with OF node */
-	dn->edev  = edev;
+	PCI_DN(dn)->edev = edev;
 	edev->dn  = dn;
 	edev->phb = phb;
 
diff --git a/include/linux/of.h b/include/linux/of.h
index bdb1c07..92cf6ad 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -58,9 +58,6 @@ struct device_node {
 	struct	kref kref;
 	unsigned long _flags;
 	void	*data;
-#if defined(CONFIG_EEH)
-	struct eeh_dev *edev;
-#endif
 #if defined(CONFIG_SPARC)
 	char	*path_component_name;
 	unsigned int unique_id;
@@ -75,13 +72,6 @@ struct of_phandle_args {
 	uint32_t args[MAX_PHANDLE_ARGS];
 };
 
-#if defined(CONFIG_EEH)
-static inline struct eeh_dev *of_node_to_eeh_dev(struct device_node *dn)
-{
-	return dn->edev;
-}
-#endif
-
 #if defined(CONFIG_SPARC) || !defined(CONFIG_OF)
 /* Dummy ref counting routines - to be implemented later */
 static inline struct device_node *of_node_get(struct device_node *node)
-- 
1.7.5.4

^ permalink raw reply related

* [PATCH 3/3] powerpc/eeh: Retrieve PHB from global list
From: Gavin Shan @ 2012-03-21  7:30 UTC (permalink / raw)
  To: linuxppc-dev, benh; +Cc: sfr, shangw
In-Reply-To: <1332315029-29688-1-git-send-email-shangw@linux.vnet.ibm.com>

Currently, the existing PHBs are retrieved from the FDT (Flat
Device Tree) based on the name of FDT node. Specificly, those
FDT nodes whose names have prefix "pci" are regarded as PHBs.
That's inappropriate because some PCI bridges possibilly have
names leading with "pci". It caused EEH is enabled on same
PCI devices for towice.

The patch fixes the above issue. Besides, the PHBs are expected
to be figured out from FDT before enable EEH on them. Therefore,
it's resonable to retrieve the PHBs from the global linked list
traced by variable "hose_list" insteading poking them from FDT.

For the EEH implementation on pSeries platform, RTAS is critical
because all low-level functions are implemented based on RTAS.
Therefore, we should make sure "/rtas" OF node is available and
ready before to enable EEH core. However, it actually introduced
duplicate since the previous pSeries platform dependent initialization
function already do the check. Besides, we want to make eeh core
platform independent, so RTAS related staff should be removed there.
The patch removes the duplicate check on "/rtas" OF node for eeh
core.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
---
 arch/powerpc/platforms/pseries/eeh.c |   19 +++++--------------
 1 files changed, 5 insertions(+), 14 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c
index 8011088..309d38e 100644
--- a/arch/powerpc/platforms/pseries/eeh.c
+++ b/arch/powerpc/platforms/pseries/eeh.c
@@ -984,7 +984,8 @@ int __exit eeh_ops_unregister(const char *name)
  */
 void __init eeh_init(void)
 {
-	struct device_node *phb, *np;
+	struct pci_controller *hose, *tmp;
+	struct device_node *phb;
 	int ret;
 
 	/* call platform initialization function */
@@ -1000,19 +1001,9 @@ void __init eeh_init(void)
 
 	raw_spin_lock_init(&confirm_error_lock);
 
-	np = of_find_node_by_path("/rtas");
-	if (np == NULL)
-		return;
-
-	/* Enable EEH for all adapters.  Note that eeh requires buid's */
-	for (phb = of_find_node_by_name(NULL, "pci"); phb;
-	     phb = of_find_node_by_name(phb, "pci")) {
-		unsigned long buid;
-
-		buid = get_phb_buid(phb);
-		if (buid == 0 || !of_node_to_eeh_dev(phb))
-			continue;
-
+	/* Enable EEH for all adapters */
+	list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
+		phb = hose->dn;
 		traverse_pci_devices(phb, eeh_early_enable, NULL);
 	}
 
-- 
1.7.5.4

^ permalink raw reply related

* [PATCH 2/3] powerpc/eeh: remove eeh information from pci_dn
From: Gavin Shan @ 2012-03-21  7:30 UTC (permalink / raw)
  To: linuxppc-dev, benh; +Cc: sfr, shangw
In-Reply-To: <1332315029-29688-1-git-send-email-shangw@linux.vnet.ibm.com>

The patch removes the eeh information from pci_dn since the eeh
device (struct eeh_dev) already contained those information.
Also, the pseries IOMMU mapping functions have been changed
for a little bit to retrieve PE address from eeh device instead
of pci_dn.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
---
 arch/powerpc/include/asm/pci-bridge.h  |    8 --------
 arch/powerpc/platforms/pseries/iommu.c |   29 +++++++++++++----------------
 2 files changed, 13 insertions(+), 24 deletions(-)

diff --git a/arch/powerpc/include/asm/pci-bridge.h b/arch/powerpc/include/asm/pci-bridge.h
index 21f99ae..ac39e6a 100644
--- a/arch/powerpc/include/asm/pci-bridge.h
+++ b/arch/powerpc/include/asm/pci-bridge.h
@@ -156,14 +156,6 @@ struct pci_dn {
 	struct	pci_dev *pcidev;	/* back-pointer to the pci device */
 #ifdef CONFIG_EEH
 	struct eeh_dev *edev;		/* eeh device */
-	int	class_code;		/* pci device class */
-	int	eeh_mode;		/* See eeh.h for possible EEH_MODEs */
-	int	eeh_config_addr;
-	int	eeh_pe_config_addr; /* new-style partition endpoint address */
-	int	eeh_check_count;	/* # times driver ignored error */
-	int	eeh_freeze_count;	/* # times this device froze up. */
-	int	eeh_false_positives;	/* # times this device reported #ff's */
-	u32	config_space[16];	/* saved PCI config space */
 #endif
 #define IODA_INVALID_PE		(-1)
 #ifdef CONFIG_PPC_POWERNV
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
index c442f2b..0915b1a 100644
--- a/arch/powerpc/platforms/pseries/iommu.c
+++ b/arch/powerpc/platforms/pseries/iommu.c
@@ -809,8 +809,7 @@ machine_arch_initcall(pseries, find_existing_ddw_windows);
 static int query_ddw(struct pci_dev *dev, const u32 *ddw_avail,
 			struct ddw_query_response *query)
 {
-	struct device_node *dn;
-	struct pci_dn *pcidn;
+	struct eeh_dev *edev;
 	u32 cfg_addr;
 	u64 buid;
 	int ret;
@@ -821,12 +820,12 @@ static int query_ddw(struct pci_dev *dev, const u32 *ddw_avail,
 	 * Retrieve them from the pci device, not the node with the
 	 * dma-window property
 	 */
-	dn = pci_device_to_OF_node(dev);
-	pcidn = PCI_DN(dn);
-	cfg_addr = pcidn->eeh_config_addr;
-	if (pcidn->eeh_pe_config_addr)
-		cfg_addr = pcidn->eeh_pe_config_addr;
-	buid = pcidn->phb->buid;
+	edev = pci_dev_to_eeh_dev(dev);
+	cfg_addr = edev->config_addr;
+	if (edev->pe_config_addr)
+		cfg_addr = edev->pe_config_addr;
+	buid = edev->phb->buid;
+
 	ret = rtas_call(ddw_avail[0], 3, 5, (u32 *)query,
 		  cfg_addr, BUID_HI(buid), BUID_LO(buid));
 	dev_info(&dev->dev, "ibm,query-pe-dma-windows(%x) %x %x %x"
@@ -839,8 +838,7 @@ static int create_ddw(struct pci_dev *dev, const u32 *ddw_avail,
 			struct ddw_create_response *create, int page_shift,
 			int window_shift)
 {
-	struct device_node *dn;
-	struct pci_dn *pcidn;
+	struct eeh_dev *edev;
 	u32 cfg_addr;
 	u64 buid;
 	int ret;
@@ -851,12 +849,11 @@ static int create_ddw(struct pci_dev *dev, const u32 *ddw_avail,
 	 * Retrieve them from the pci device, not the node with the
 	 * dma-window property
 	 */
-	dn = pci_device_to_OF_node(dev);
-	pcidn = PCI_DN(dn);
-	cfg_addr = pcidn->eeh_config_addr;
-	if (pcidn->eeh_pe_config_addr)
-		cfg_addr = pcidn->eeh_pe_config_addr;
-	buid = pcidn->phb->buid;
+	edev = pci_dev_to_eeh_dev(dev);
+	cfg_addr = edev->config_addr;
+	if (edev->pe_config_addr)
+		cfg_addr = edev->pe_config_addr;
+	buid = edev->phb->buid;
 
 	do {
 		/* extra outputs are LIOBN and dma-addr (hi, lo) */
-- 
1.7.5.4

^ permalink raw reply related

* [PATCH 1/6] powerpc: Make function that parses RTAS error logs global
From: Anton Blanchard @ 2012-03-22  1:47 UTC (permalink / raw)
  To: benh, paulus; +Cc: linuxppc-dev


The IO event interrupt code has a function that finds specific
sections in an RTAS error log. We want to use it in the EPOW
code so make it global.

Rename things to make it less cryptic:

find_xelog_section() -> get_pseries_errorlog()
struct pseries_elog_section -> struct pseries_errorlog

Signed-off-by: Anton Blanchard <anton@samba.org>
---

Index: linux-build/arch/powerpc/include/asm/rtas.h
===================================================================
--- linux-build.orig/arch/powerpc/include/asm/rtas.h	2012-03-22 11:46:57.408187770 +1100
+++ linux-build/arch/powerpc/include/asm/rtas.h	2012-03-22 11:48:25.221771962 +1100
@@ -204,6 +203,39 @@ struct rtas_ext_event_log_v6 {
 					/* Variable length.		*/
 };
 
+/* pSeries event log format */
+
+/* Two bytes ASCII section IDs */
+#define PSERIES_ELOG_SECT_ID_PRIV_HDR		(('P' << 8) | 'H')
+#define PSERIES_ELOG_SECT_ID_USER_HDR		(('U' << 8) | 'H')
+#define PSERIES_ELOG_SECT_ID_PRIMARY_SRC	(('P' << 8) | 'S')
+#define PSERIES_ELOG_SECT_ID_EXTENDED_UH	(('E' << 8) | 'H')
+#define PSERIES_ELOG_SECT_ID_FAILING_MTMS	(('M' << 8) | 'T')
+#define PSERIES_ELOG_SECT_ID_SECONDARY_SRC	(('S' << 8) | 'S')
+#define PSERIES_ELOG_SECT_ID_DUMP_LOCATOR	(('D' << 8) | 'H')
+#define PSERIES_ELOG_SECT_ID_FW_ERROR		(('S' << 8) | 'W')
+#define PSERIES_ELOG_SECT_ID_IMPACT_PART_ID	(('L' << 8) | 'P')
+#define PSERIES_ELOG_SECT_ID_LOGIC_RESOURCE_ID	(('L' << 8) | 'R')
+#define PSERIES_ELOG_SECT_ID_HMC_ID		(('H' << 8) | 'M')
+#define PSERIES_ELOG_SECT_ID_EPOW		(('E' << 8) | 'P')
+#define PSERIES_ELOG_SECT_ID_IO_EVENT		(('I' << 8) | 'E')
+#define PSERIES_ELOG_SECT_ID_MANUFACT_INFO	(('M' << 8) | 'I')
+#define PSERIES_ELOG_SECT_ID_CALL_HOME		(('C' << 8) | 'H')
+#define PSERIES_ELOG_SECT_ID_USER_DEF		(('U' << 8) | 'D')
+
+/* Vendor specific Platform Event Log Format, Version 6, section header */
+struct pseries_errorlog {
+	uint16_t id;			/* 0x00 2-byte ASCII section ID	*/
+	uint16_t length;		/* 0x02 Section length in bytes	*/
+	uint8_t version;		/* 0x04 Section version		*/
+	uint8_t subtype;		/* 0x05 Section subtype		*/
+	uint16_t creator_component;	/* 0x06 Creator component ID	*/
+	uint8_t data[];			/* 0x08 Start of section data	*/
+};
+
+struct pseries_errorlog *get_pseries_errorlog(struct rtas_error_log *log,
+					      uint16_t section_id);
+
 /*
  * This can be set by the rtas_flash module so that it can get called
  * as the absolutely last thing before the kernel terminates.
Index: linux-build/arch/powerpc/kernel/rtas.c
===================================================================
--- linux-build.orig/arch/powerpc/kernel/rtas.c	2012-03-22 11:46:57.424188057 +1100
+++ linux-build/arch/powerpc/kernel/rtas.c	2012-03-22 11:48:25.221771962 +1100
@@ -868,6 +868,40 @@ int rtas_ibm_suspend_me(struct rtas_args
 }
 #endif
 
+/**
+ * Find a specific pseries error log in an RTAS extended event log.
+ * @log: RTAS error/event log
+ * @section_id: two character section identifier
+ *
+ * Returns a pointer to the specified errorlog or NULL if not found.
+ */
+struct pseries_errorlog *get_pseries_errorlog(struct rtas_error_log *log,
+					      uint16_t section_id)
+{
+	struct rtas_ext_event_log_v6 *ext_log =
+		(struct rtas_ext_event_log_v6 *)log->buffer;
+	struct pseries_errorlog *sect;
+	unsigned char *p, *log_end;
+
+	/* Check that we understand the format */
+	if (log->extended_log_length < sizeof(struct rtas_ext_event_log_v6) ||
+	    ext_log->log_format != RTAS_V6EXT_LOG_FORMAT_EVENT_LOG ||
+	    ext_log->company_id != RTAS_V6EXT_COMPANY_ID_IBM)
+		return NULL;
+
+	log_end = log->buffer + log->extended_log_length;
+	p = ext_log->vendor_log;
+
+	while (p < log_end) {
+		sect = (struct pseries_errorlog *)p;
+		if (sect->id == section_id)
+			return sect;
+		p += sect->length;
+	}
+
+	return NULL;
+}
+
 asmlinkage int ppc_rtas(struct rtas_args __user *uargs)
 {
 	struct rtas_args args;
Index: linux-build/arch/powerpc/platforms/pseries/io_event_irq.c
===================================================================
--- linux-build.orig/arch/powerpc/platforms/pseries/io_event_irq.c	2012-03-22 11:46:57.444188419 +1100
+++ linux-build/arch/powerpc/platforms/pseries/io_event_irq.c	2012-03-22 11:48:25.221771962 +1100
@@ -63,73 +63,9 @@ EXPORT_SYMBOL_GPL(pseries_ioei_notifier_
 
 static int ioei_check_exception_token;
 
-/* pSeries event log format */
-
-/* Two bytes ASCII section IDs */
-#define PSERIES_ELOG_SECT_ID_PRIV_HDR		(('P' << 8) | 'H')
-#define PSERIES_ELOG_SECT_ID_USER_HDR		(('U' << 8) | 'H')
-#define PSERIES_ELOG_SECT_ID_PRIMARY_SRC	(('P' << 8) | 'S')
-#define PSERIES_ELOG_SECT_ID_EXTENDED_UH	(('E' << 8) | 'H')
-#define PSERIES_ELOG_SECT_ID_FAILING_MTMS	(('M' << 8) | 'T')
-#define PSERIES_ELOG_SECT_ID_SECONDARY_SRC	(('S' << 8) | 'S')
-#define PSERIES_ELOG_SECT_ID_DUMP_LOCATOR	(('D' << 8) | 'H')
-#define PSERIES_ELOG_SECT_ID_FW_ERROR		(('S' << 8) | 'W')
-#define PSERIES_ELOG_SECT_ID_IMPACT_PART_ID	(('L' << 8) | 'P')
-#define PSERIES_ELOG_SECT_ID_LOGIC_RESOURCE_ID	(('L' << 8) | 'R')
-#define PSERIES_ELOG_SECT_ID_HMC_ID		(('H' << 8) | 'M')
-#define PSERIES_ELOG_SECT_ID_EPOW		(('E' << 8) | 'P')
-#define PSERIES_ELOG_SECT_ID_IO_EVENT		(('I' << 8) | 'E')
-#define PSERIES_ELOG_SECT_ID_MANUFACT_INFO	(('M' << 8) | 'I')
-#define PSERIES_ELOG_SECT_ID_CALL_HOME		(('C' << 8) | 'H')
-#define PSERIES_ELOG_SECT_ID_USER_DEF		(('U' << 8) | 'D')
-
-/* Vendor specific Platform Event Log Format, Version 6, section header */
-struct pseries_elog_section {
-	uint16_t id;			/* 0x00 2-byte ASCII section ID	*/
-	uint16_t length;		/* 0x02 Section length in bytes	*/
-	uint8_t version;		/* 0x04 Section version		*/
-	uint8_t subtype;		/* 0x05 Section subtype		*/
-	uint16_t creator_component;	/* 0x06 Creator component ID	*/
-	uint8_t data[];			/* 0x08 Start of section data	*/
-};
-
 static char ioei_rtas_buf[RTAS_DATA_BUF_SIZE] __cacheline_aligned;
 
 /**
- * Find data portion of a specific section in RTAS extended event log.
- * @elog: RTAS error/event log.
- * @sect_id: secsion ID.
- *
- * Return:
- *	pointer to the section data of the specified section
- *	NULL if not found
- */
-static struct pseries_elog_section *find_xelog_section(struct rtas_error_log *elog,
-						       uint16_t sect_id)
-{
-	struct rtas_ext_event_log_v6 *xelog =
-		(struct rtas_ext_event_log_v6 *) elog->buffer;
-	struct pseries_elog_section *sect;
-	unsigned char *p, *log_end;
-
-	/* Check that we understand the format */
-	if (elog->extended_log_length < sizeof(struct rtas_ext_event_log_v6) ||
-	    xelog->log_format != RTAS_V6EXT_LOG_FORMAT_EVENT_LOG ||
-	    xelog->company_id != RTAS_V6EXT_COMPANY_ID_IBM)
-		return NULL;
-
-	log_end = elog->buffer + elog->extended_log_length;
-	p = xelog->vendor_log;
-	while (p < log_end) {
-		sect = (struct pseries_elog_section *)p;
-		if (sect->id == sect_id)
-			return sect;
-		p += sect->length;
-	}
-	return NULL;
-}
-
-/**
  * Find the data portion of an IO Event section from event log.
  * @elog: RTAS error/event log.
  *
@@ -138,7 +74,7 @@ static struct pseries_elog_section *find
  */
 static struct pseries_io_event * ioei_find_event(struct rtas_error_log *elog)
 {
-	struct pseries_elog_section *sect;
+	struct pseries_errorlog *sect;
 
 	/* We should only ever get called for io-event interrupts, but if
 	 * we do get called for another type then something went wrong so
@@ -152,7 +88,7 @@ static struct pseries_io_event * ioei_fi
 		return NULL;
 	}
 
-	sect = find_xelog_section(elog, PSERIES_ELOG_SECT_ID_IO_EVENT);
+	sect = get_pseries_errorlog(elog, PSERIES_ELOG_SECT_ID_IO_EVENT);
 	if (unlikely(!sect)) {
 		printk_once(KERN_WARNING "io_event_irq: RTAS extended event "
 			    "log does not contain an IO Event section. "

^ permalink raw reply

* [PATCH 2/6] powerpc/pseries: Parse and handle EPOW interrupts
From: Anton Blanchard @ 2012-03-22  1:49 UTC (permalink / raw)
  To: benh, paulus; +Cc: linuxppc-dev
In-Reply-To: <20120322124707.3cd3037f@kryten>


We have code to take environmental and power warning (EPOW)
interrupts but it simply prints a terse error message:

EPOW <0x6240040000000b8 0x0 0x0>

which tells us nothing about what happened. Even worse, if we
don't correctly respond to the interrupt we may get terminated
by firmware.

Add code to printk some useful information when we get EPOW events.
We want to make it clear that we have an error, that it was
reported by firmware and that the RTAS error log will have more
detailed information. eg:

	Ambient temperature too high reported by firmware.
	Check RTAS error log for details

Depending on the error encountered, we now issue an immediate or
an orderly power down.

Move initialization of the EPOW interrupt earlier in boot since we
want to respond to them as early as possible.

Signed-off-by: Anton Blanchard <anton@samba.org>
---

Index: linux-build/arch/powerpc/platforms/pseries/ras.c
===================================================================
--- linux-build.orig/arch/powerpc/platforms/pseries/ras.c	2012-03-22 12:24:24.980892033 +1100
+++ linux-build/arch/powerpc/platforms/pseries/ras.c	2012-03-22 12:25:06.857659239 +1100
@@ -35,6 +35,8 @@
 #include <linux/random.h>
 #include <linux/sysrq.h>
 #include <linux/bitops.h>
+#include <linux/fs.h>
+#include <linux/reboot.h>
 
 #include <asm/uaccess.h>
 #include <asm/system.h>
@@ -95,26 +97,127 @@ static int __init init_ras_IRQ(void)
 
 	return 0;
 }
-__initcall(init_ras_IRQ);
+subsys_initcall(init_ras_IRQ);
 
-/*
- * Handle power subsystem events (EPOW).
- *
- * Presently we just log the event has occurred.  This should be fixed
- * to examine the type of power failure and take appropriate action where
- * the time horizon permits something useful to be done.
- */
+#define EPOW_SHUTDOWN_NORMAL				1
+#define EPOW_SHUTDOWN_ON_UPS				2
+#define EPOW_SHUTDOWN_LOSS_OF_CRITICAL_FUNCTIONS	3
+#define EPOW_SHUTDOWN_AMBIENT_TEMPERATURE_TOO_HIGH	4
+
+static void handle_system_shutdown(char event_modifier)
+{
+	switch (event_modifier) {
+	case EPOW_SHUTDOWN_NORMAL:
+		pr_emerg("Firmware initiated power off");
+		orderly_poweroff(1);
+		break;
+
+	case EPOW_SHUTDOWN_ON_UPS:
+		pr_emerg("Loss of power reported by firmware, system is "
+			"running on UPS/battery");
+		break;
+
+	case EPOW_SHUTDOWN_LOSS_OF_CRITICAL_FUNCTIONS:
+		pr_emerg("Loss of system critical functions reported by "
+			"firmware");
+		pr_emerg("Check RTAS error log for details");
+		orderly_poweroff(1);
+		break;
+
+	case EPOW_SHUTDOWN_AMBIENT_TEMPERATURE_TOO_HIGH:
+		pr_emerg("Ambient temperature too high reported by firmware");
+		pr_emerg("Check RTAS error log for details");
+		orderly_poweroff(1);
+		break;
+
+	default:
+		pr_err("Unknown power/cooling shutdown event (modifier %d)",
+			event_modifier);
+	}
+}
+
+struct epow_errorlog {
+	unsigned char sensor_value;
+	unsigned char event_modifier;
+	unsigned char extended_modifier;
+	unsigned char reserved;
+	unsigned char platform_reason;
+};
+
+#define EPOW_RESET			0
+#define EPOW_WARN_COOLING		1
+#define EPOW_WARN_POWER			2
+#define EPOW_SYSTEM_SHUTDOWN		3
+#define EPOW_SYSTEM_HALT		4
+#define EPOW_MAIN_ENCLOSURE		5
+#define EPOW_POWER_OFF			7
+
+void rtas_parse_epow_errlog(struct rtas_error_log *log)
+{
+	struct pseries_errorlog *pseries_log;
+	struct epow_errorlog *epow_log;
+	char action_code;
+	char modifier;
+
+	pseries_log = get_pseries_errorlog(log, PSERIES_ELOG_SECT_ID_EPOW);
+	if (pseries_log == NULL)
+		return;
+
+	epow_log = (struct epow_errorlog *)pseries_log->data;
+	action_code = epow_log->sensor_value & 0xF;	/* bottom 4 bits */
+	modifier = epow_log->event_modifier & 0xF;	/* bottom 4 bits */
+
+	switch (action_code) {
+	case EPOW_RESET:
+		pr_err("Non critical power or cooling issue cleared");
+		break;
+
+	case EPOW_WARN_COOLING:
+		pr_err("Non critical cooling issue reported by firmware");
+		pr_err("Check RTAS error log for details");
+		break;
+
+	case EPOW_WARN_POWER:
+		pr_err("Non critical power issue reported by firmware");
+		pr_err("Check RTAS error log for details");
+		break;
+
+	case EPOW_SYSTEM_SHUTDOWN:
+		handle_system_shutdown(epow_log->event_modifier);
+		break;
+
+	case EPOW_SYSTEM_HALT:
+		pr_emerg("Firmware initiated power off");
+		orderly_poweroff(1);
+		break;
+
+	case EPOW_MAIN_ENCLOSURE:
+	case EPOW_POWER_OFF:
+		pr_emerg("Critical power/cooling issue reported by firmware");
+		pr_emerg("Check RTAS error log for details");
+		pr_emerg("Immediate power off");
+		emergency_sync();
+		kernel_power_off();
+		break;
+
+	default:
+		pr_err("Unknown power/cooling event (action code %d)",
+			action_code);
+	}
+}
+
+/* Handle environmental and power warning (EPOW) interrupts. */
 static irqreturn_t ras_epow_interrupt(int irq, void *dev_id)
 {
-	int status = 0xdeadbeef;
-	int state = 0;
+	int status;
+	int state;
 	int critical;
 
 	status = rtas_call(ras_get_sensor_state_token, 2, 2, &state,
 			   EPOW_SENSOR_TOKEN, EPOW_SENSOR_INDEX);
 
 	if (state > 3)
-		critical = 1;  /* Time Critical */
+		critical = 1;		/* Time Critical */
 	else
 		critical = 0;
 
@@ -127,14 +230,10 @@ static irqreturn_t ras_epow_interrupt(in
 			   critical, __pa(&ras_log_buf),
 				rtas_get_error_log_max());
 
-	udbg_printf("EPOW <0x%lx 0x%x 0x%x>\n",
-		    *((unsigned long *)&ras_log_buf), status, state);
-	printk(KERN_WARNING "EPOW <0x%lx 0x%x 0x%x>\n",
-	       *((unsigned long *)&ras_log_buf), status, state);
-
-	/* format and print the extended information */
 	log_error(ras_log_buf, ERR_TYPE_RTAS_LOG, 0);
 
+	rtas_parse_epow_errlog((struct rtas_error_log *)ras_log_buf);
+
 	spin_unlock(&ras_log_buf_lock);
 	return IRQ_HANDLED;
 }

^ permalink raw reply

* Re: [PATCH 14/17] powerpc: crypto: nx driver code supporting nx encryption
From: Benjamin Herrenschmidt @ 2012-03-22  1:50 UTC (permalink / raw)
  To: Greg KH; +Cc: Kent Yoder, linuxppc-dev, linux-kernel, rcj, linux-crypto
In-Reply-To: <20120321221517.GB30748@kroah.com>

On Wed, 2012-03-21 at 15:15 -0700, Greg KH wrote:
> 
> Really?  vio drivers are supposed to look like this with the .name and
> .owner field manually being set in the static initialization of the
> driver?  That's sad, and should be fixed, the vio core should do this
> type of thing for you. 

Yeah, they still do it the old way, nobody got to fix that yet, should
be pretty easy though.

Cheers,
Ben.

^ permalink raw reply

* [PATCH 3/6] powerpc/pseries: Use rtas_get_sensor in RAS code
From: Anton Blanchard @ 2012-03-22  1:53 UTC (permalink / raw)
  To: benh, paulus; +Cc: linuxppc-dev
In-Reply-To: <20120322124707.3cd3037f@kryten>


We have rtas_get_sensor so we may as well use it.

Signed-off-by: Anton Blanchard <anton@samba.org>
---

Index: linux-build/arch/powerpc/platforms/pseries/ras.c
===================================================================
--- linux-build.orig/arch/powerpc/platforms/pseries/ras.c	2012-03-22 12:42:54.473140239 +1100
+++ linux-build/arch/powerpc/platforms/pseries/ras.c	2012-03-22 12:43:28.957765972 +1100
@@ -59,7 +59,6 @@ static DEFINE_SPINLOCK(ras_log_buf_lock)
 static char global_mce_data_buf[RTAS_ERROR_LOG_MAX];
 static DEFINE_PER_CPU(__u64, mce_data_buf);
 
-static int ras_get_sensor_state_token;
 static int ras_check_exception_token;
 
 #define EPOW_SENSOR_TOKEN	9
@@ -77,7 +76,6 @@ static int __init init_ras_IRQ(void)
 {
 	struct device_node *np;
 
-	ras_get_sensor_state_token = rtas_token("get-sensor-state");
 	ras_check_exception_token = rtas_token("check-exception");
 
 	/* Internal Errors */
@@ -213,8 +211,7 @@ static irqreturn_t ras_epow_interrupt(in
 	int state;
 	int critical;
 
-	status = rtas_call(ras_get_sensor_state_token, 2, 2, &state,
-			   EPOW_SENSOR_TOKEN, EPOW_SENSOR_INDEX);
+	status = rtas_get_sensor(EPOW_SENSOR_TOKEN, EPOW_SENSOR_INDEX, &state);
 
 	if (state > 3)
 		critical = 1;		/* Time Critical */

^ permalink raw reply

* [PATCH 4/6] powerpc/pseries: Remove RTAS_POWERMGM_EVENTS
From: Anton Blanchard @ 2012-03-22  1:56 UTC (permalink / raw)
  To: benh, paulus; +Cc: linuxppc-dev
In-Reply-To: <20120322125343.63d77e82@kryten>


IBM bit 2 in the rtas event-scan and check-exception calls is
marked reserved in the PAPR, so remove it from our RAS code.

Signed-off-by: Anton Blanchard <anton@samba.org>
---

Index: linux-build/arch/powerpc/include/asm/rtas.h
===================================================================
--- linux-build.orig/arch/powerpc/include/asm/rtas.h	2012-03-22 12:41:38.079754144 +1100
+++ linux-build/arch/powerpc/include/asm/rtas.h	2012-03-22 12:43:56.574267101 +1100
@@ -74,7 +74,6 @@ struct rtas_suspend_me_data {
 /* RTAS event classes */
 #define RTAS_INTERNAL_ERROR		0x80000000 /* set bit 0 */
 #define RTAS_EPOW_WARNING		0x40000000 /* set bit 1 */
-#define RTAS_POWERMGM_EVENTS		0x20000000 /* set bit 2 */
 #define RTAS_HOTPLUG_EVENTS		0x10000000 /* set bit 3 */
 #define RTAS_IO_EVENTS			0x08000000 /* set bit 4 */
 #define RTAS_EVENT_SCAN_ALL_EVENTS	0xffffffff
Index: linux-build/arch/powerpc/platforms/pseries/ras.c
===================================================================
--- linux-build.orig/arch/powerpc/platforms/pseries/ras.c	2012-03-22 12:43:50.842163086 +1100
+++ linux-build/arch/powerpc/platforms/pseries/ras.c	2012-03-22 12:43:56.574267101 +1100
@@ -223,7 +223,7 @@ static irqreturn_t ras_epow_interrupt(in
 	status = rtas_call(ras_check_exception_token, 6, 1, NULL,
 			   RTAS_VECTOR_EXTERNAL_INTERRUPT,
 			   virq_to_hw(irq),
-			   RTAS_EPOW_WARNING | RTAS_POWERMGM_EVENTS,
+			   RTAS_EPOW_WARNING,
 			   critical, __pa(&ras_log_buf),
 				rtas_get_error_log_max());
 

^ permalink raw reply

* [PATCH 5/6] powerpc/pseries: Clean up ras_error_interrupt code
From: Anton Blanchard @ 2012-03-22  1:58 UTC (permalink / raw)
  To: benh, paulus; +Cc: linuxppc-dev
In-Reply-To: <20120322125649.434c6f5e@kryten>


The RAS error interrupt is no longer used but we may as well
mirror the changes we made to the EPOW interrupt.

Signed-off-by: Anton Blanchard <anton@samba.org>
---

Index: linux-build/arch/powerpc/platforms/pseries/ras.c
===================================================================
--- linux-build.orig/arch/powerpc/platforms/pseries/ras.c	2012-03-22 12:43:56.574267101 +1100
+++ linux-build/arch/powerpc/platforms/pseries/ras.c	2012-03-22 12:44:13.306570733 +1100
@@ -246,7 +246,7 @@ static irqreturn_t ras_epow_interrupt(in
 static irqreturn_t ras_error_interrupt(int irq, void *dev_id)
 {
 	struct rtas_error_log *rtas_elog;
-	int status = 0xdeadbeef;
+	int status;
 	int fatal;
 
 	spin_lock(&ras_log_buf_lock);
@@ -254,7 +254,7 @@ static irqreturn_t ras_error_interrupt(i
 	status = rtas_call(ras_check_exception_token, 6, 1, NULL,
 			   RTAS_VECTOR_EXTERNAL_INTERRUPT,
 			   virq_to_hw(irq),
-			   RTAS_INTERNAL_ERROR, 1 /*Time Critical */,
+			   RTAS_INTERNAL_ERROR, 1 /* Time Critical */,
 			   __pa(&ras_log_buf),
 				rtas_get_error_log_max());
 
@@ -269,24 +269,13 @@ static irqreturn_t ras_error_interrupt(i
 	log_error(ras_log_buf, ERR_TYPE_RTAS_LOG, fatal);
 
 	if (fatal) {
-		udbg_printf("Fatal HW Error <0x%lx 0x%x>\n",
-			    *((unsigned long *)&ras_log_buf), status);
-		printk(KERN_EMERG "Error: Fatal hardware error <0x%lx 0x%x>\n",
-		       *((unsigned long *)&ras_log_buf), status);
-
-#ifndef DEBUG_RTAS_POWER_OFF
-		/* Don't actually power off when debugging so we can test
-		 * without actually failing while injecting errors.
-		 * Error data will not be logged to syslog.
-		 */
-		ppc_md.power_off();
-#endif
+		pr_emerg("Fatal hardware error reported by firmware");
+		pr_emerg("Check RTAS error log for details");
+		pr_emerg("Immediate power off");
+		emergency_sync();
+		kernel_power_off();
 	} else {
-		udbg_printf("Recoverable HW Error <0x%lx 0x%x>\n",
-			    *((unsigned long *)&ras_log_buf), status);
-		printk(KERN_WARNING
-		       "Warning: Recoverable hardware error <0x%lx 0x%x>\n",
-		       *((unsigned long *)&ras_log_buf), status);
+		pr_err("Recoverable hardware error reported by firmware");
 	}
 
 	spin_unlock(&ras_log_buf_lock);

^ permalink raw reply

* [PATCH 6/6] powerpc/pseries: Cut down on enthusiastic use of defines in RAS code
From: Anton Blanchard @ 2012-03-22  1:59 UTC (permalink / raw)
  To: benh, paulus; +Cc: linuxppc-dev
In-Reply-To: <20120322125803.40bb5e34@kryten>


So many defines for such a little file. Most of them can go.

Also remove the single entry changelog, we have git for that.

Signed-off-by: Anton Blanchard <anton@samba.org>
---

Index: linux-build/arch/powerpc/platforms/pseries/ras.c
===================================================================
--- linux-build.orig/arch/powerpc/platforms/pseries/ras.c	2012-03-22 12:44:13.306570733 +1100
+++ linux-build/arch/powerpc/platforms/pseries/ras.c	2012-03-22 12:44:24.798779279 +1100
@@ -16,39 +16,15 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
 
-/* Change Activity:
- * 2001/09/21 : engebret : Created with minimal EPOW and HW exception support.
- * End Change Activity
- */
-
-#include <linux/errno.h>
-#include <linux/threads.h>
-#include <linux/kernel_stat.h>
-#include <linux/signal.h>
 #include <linux/sched.h>
-#include <linux/ioport.h>
 #include <linux/interrupt.h>
-#include <linux/timex.h>
-#include <linux/init.h>
-#include <linux/delay.h>
 #include <linux/irq.h>
-#include <linux/random.h>
-#include <linux/sysrq.h>
-#include <linux/bitops.h>
+#include <linux/of.h>
 #include <linux/fs.h>
 #include <linux/reboot.h>
 
-#include <asm/uaccess.h>
-#include <asm/system.h>
-#include <asm/io.h>
-#include <asm/pgtable.h>
-#include <asm/irq.h>
-#include <asm/cache.h>
-#include <asm/prom.h>
-#include <asm/ptrace.h>
 #include <asm/machdep.h>
 #include <asm/rtas.h>
-#include <asm/udbg.h>
 #include <asm/firmware.h>
 
 #include "pseries.h"

^ permalink raw reply

* Re: [git pull] Please pull powerpc.git next branch
From: Linus Torvalds @ 2012-03-22  2:02 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Grant Likely, Kyle Moffett
  Cc: linuxppc-dev list, Andrew Morton, Russell King, Linux Kernel list
In-Reply-To: <1332377206.2982.60.camel@pasglop>

On Wed, Mar 21, 2012 at 5:46 PM, Benjamin Herrenschmidt
<benh@kernel.crashing.org> wrote:
>
> Here's the powerpc batch for this merge window. It is going to be a bit
> more nasty than usual as in touching things outside of arch/powerpc
> mostly due to the big iSeriesectomy :-) We finally got rid of the bugger
> (legacy iSeries support) which was a PITA to maintain and that nobody
> really used anymore.
>
> Here are some of the highlights:

Ok, so this conflicted a bit with the generalized irq-domain stuff
from Grant Likely, and while I tried to fix it up I can't even
compile-test the end result, so you really need to verify my merge and
perhaps send me fixups. Ok?

Especially the sysdev/mpic.c resolution needs somebody who knows the
code to verify. Added Grant and Kyle explicitly to the cc..

                      Linus

^ permalink raw reply

* Re: [git pull] Please pull powerpc.git next branch
From: Benjamin Herrenschmidt @ 2012-03-22  2:44 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Russell King, Linux Kernel list, linuxppc-dev list, Kyle Moffett,
	Andrew Morton
In-Reply-To: <CA+55aFz-pyBHa73zkbkub4czwnU+k4_qKzBEaAGvi66MBBUTpQ@mail.gmail.com>

On Wed, 2012-03-21 at 19:02 -0700, Linus Torvalds wrote:
> 
> Ok, so this conflicted a bit with the generalized irq-domain stuff
> from Grant Likely, and while I tried to fix it up I can't even
> compile-test the end result, so you really need to verify my merge and
> perhaps send me fixups. Ok?

Ok, I expected some of that, I'll run some tests today.

> Especially the sysdev/mpic.c resolution needs somebody who knows the
> code to verify. Added Grant and Kyle explicitly to the cc..

Thanks !

Cheers,
Ben.

^ permalink raw reply

* Re: [PATCH 14/17] powerpc: crypto: nx driver code supporting nx encryption
From: Benjamin Herrenschmidt @ 2012-03-22  2:57 UTC (permalink / raw)
  To: Kent Yoder, David Miller
  Cc: Greg KH, rcj, linuxppc-dev, linux-kernel, linux-crypto
In-Reply-To: <1332381004.2982.65.camel@pasglop>

On Thu, 2012-03-22 at 12:50 +1100, Benjamin Herrenschmidt wrote:
> On Wed, 2012-03-21 at 15:15 -0700, Greg KH wrote:
> > 
> > Really?  vio drivers are supposed to look like this with the .name and
> > .owner field manually being set in the static initialization of the
> > driver?  That's sad, and should be fixed, the vio core should do this
> > type of thing for you. 
> 
> Yeah, they still do it the old way, nobody got to fix that yet, should
> be pretty easy though.

Kent, Dave care to try this ? It's only compile tested.

powerpc+sparc/vio: Modernize driver registration

This makes vio_register_driver() get the module owner & name at compile
time like PCI drivers do, and adds a name pointer directly in struct
vio_driver to avoid having to explicitly initialize the embedded
struct device.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 arch/powerpc/include/asm/vio.h     |   10 +++++++++-
 arch/powerpc/kernel/vio.c          |    9 +++++++--
 arch/sparc/include/asm/vio.h       |    9 ++++++++-
 arch/sparc/kernel/ds.c             |    5 +----
 arch/sparc/kernel/vio.c            |    9 +++++++--
 drivers/block/sunvdc.c             |    5 +----
 drivers/net/ethernet/ibm/ibmveth.c |    7 ++-----
 drivers/net/ethernet/sun/sunvnet.c |    5 +----
 drivers/scsi/ibmvscsi/ibmvfc.c     |    7 ++-----
 drivers/scsi/ibmvscsi/ibmvscsi.c   |    7 ++-----
 drivers/scsi/ibmvscsi/ibmvstgt.c   |    5 +----
 drivers/tty/hvc/hvc_vio.c          |    7 ++-----
 drivers/tty/hvc/hvcs.c             |    5 +----
 13 files changed, 44 insertions(+), 46 deletions(-)

diff --git a/arch/powerpc/include/asm/vio.h b/arch/powerpc/include/asm/vio.h
index 0a290a1..6bfd5ff 100644
--- a/arch/powerpc/include/asm/vio.h
+++ b/arch/powerpc/include/asm/vio.h
@@ -69,6 +69,7 @@ struct vio_dev {
 };
 
 struct vio_driver {
+	const char *name;
 	const struct vio_device_id *id_table;
 	int (*probe)(struct vio_dev *dev, const struct vio_device_id *id);
 	int (*remove)(struct vio_dev *dev);
@@ -76,10 +77,17 @@ struct vio_driver {
 	 * be loaded in a CMO environment if it uses DMA.
 	 */
 	unsigned long (*get_desired_dma)(struct vio_dev *dev);
+	const struct dev_pm_ops *pm;
 	struct device_driver driver;
 };
 
-extern int vio_register_driver(struct vio_driver *drv);
+extern int __vio_register_driver(struct vio_driver *drv, struct module *owner,
+				 const char *mod_name);
+/*
+ * vio_register_driver must be a macro so that KBUILD_MODNAME can be expanded
+ */
+#define vio_register_driver(driver)		\
+	__vio_register_driver(driver, THIS_MODULE, KBUILD_MODNAME)
 extern void vio_unregister_driver(struct vio_driver *drv);
 
 extern int vio_cmo_entitlement_update(size_t);
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c
index bca3fc4..879dd25 100644
--- a/arch/powerpc/kernel/vio.c
+++ b/arch/powerpc/kernel/vio.c
@@ -1159,17 +1159,22 @@ static int vio_bus_remove(struct device *dev)
  * vio_register_driver: - Register a new vio driver
  * @drv:	The vio_driver structure to be registered.
  */
-int vio_register_driver(struct vio_driver *viodrv)
+int __vio_register_driver(struct vio_driver *viodrv, struct module *owner,
+			  const char *mod_name)
 {
 	printk(KERN_DEBUG "%s: driver %s registering\n", __func__,
 		viodrv->driver.name);
 
 	/* fill in 'struct driver' fields */
+	viodrv->driver.name = viodrv->name;
+	viodrv->driver.pm = viodrv->pm;
 	viodrv->driver.bus = &vio_bus_type;
+	viodrv->driver.owner = owner;
+	viodrv->driver.mod_name = mod_name;
 
 	return driver_register(&viodrv->driver);
 }
-EXPORT_SYMBOL(vio_register_driver);
+EXPORT_SYMBOL(__vio_register_driver);
 
 /**
  * vio_unregister_driver - Remove registration of vio driver.
diff --git a/arch/sparc/include/asm/vio.h b/arch/sparc/include/asm/vio.h
index 9d83d3b..432afa8 100644
--- a/arch/sparc/include/asm/vio.h
+++ b/arch/sparc/include/asm/vio.h
@@ -284,6 +284,7 @@ struct vio_dev {
 };
 
 struct vio_driver {
+	const char			*name;
 	struct list_head		node;
 	const struct vio_device_id	*id_table;
 	int (*probe)(struct vio_dev *dev, const struct vio_device_id *id);
@@ -371,7 +372,13 @@ do {	if (vio->debug & VIO_DEBUG_##TYPE) \
 		       vio->vdev->channel_id, ## a); \
 } while (0)
 
-extern int vio_register_driver(struct vio_driver *drv);
+extern int __vio_register_driver(struct vio_driver *drv, struct module *owner,
+				 const char *mod_name);
+/*
+ * vio_register_driver must be a macro so that KBUILD_MODNAME can be expanded
+ */
+#define vio_register_driver(driver)		\
+	__vio_register_driver(driver, THIS_MODULE, KBUILD_MODNAME)
 extern void vio_unregister_driver(struct vio_driver *drv);
 
 static inline struct vio_driver *to_vio_driver(struct device_driver *drv)
diff --git a/arch/sparc/kernel/ds.c b/arch/sparc/kernel/ds.c
index 381edcd..fea13c7 100644
--- a/arch/sparc/kernel/ds.c
+++ b/arch/sparc/kernel/ds.c
@@ -1244,10 +1244,7 @@ static struct vio_driver ds_driver = {
 	.id_table	= ds_match,
 	.probe		= ds_probe,
 	.remove		= ds_remove,
-	.driver		= {
-		.name	= "ds",
-		.owner	= THIS_MODULE,
-	}
+	.name		= "ds",
 };
 
 static int __init ds_init(void)
diff --git a/arch/sparc/kernel/vio.c b/arch/sparc/kernel/vio.c
index f67e28e..6758b0b 100644
--- a/arch/sparc/kernel/vio.c
+++ b/arch/sparc/kernel/vio.c
@@ -119,13 +119,18 @@ static struct bus_type vio_bus_type = {
 	.remove		= vio_device_remove,
 };
 
-int vio_register_driver(struct vio_driver *viodrv)
+int __vio_register_driver(struct vio_driver *viodrv, struct module *owner,
+			const char *mod_name)
 {
 	viodrv->driver.bus = &vio_bus_type;
+	viodrv->driver.name = viodrv->name;
+	viodrv->driver.bus = &vio_bus_type;
+	viodrv->driver.owner = owner;
+	viodrv->driver.mod_name = mod_name;
 
 	return driver_register(&viodrv->driver);
 }
-EXPORT_SYMBOL(vio_register_driver);
+EXPORT_SYMBOL(__vio_register_driver);
 
 void vio_unregister_driver(struct vio_driver *viodrv)
 {
diff --git a/drivers/block/sunvdc.c b/drivers/block/sunvdc.c
index 48e8fee..9dcf76a 100644
--- a/drivers/block/sunvdc.c
+++ b/drivers/block/sunvdc.c
@@ -839,10 +839,7 @@ static struct vio_driver vdc_port_driver = {
 	.id_table	= vdc_port_match,
 	.probe		= vdc_port_probe,
 	.remove		= vdc_port_remove,
-	.driver		= {
-		.name	= "vdc_port",
-		.owner	= THIS_MODULE,
-	}
+	.name		= "vdc_port",
 };
 
 static int __init vdc_init(void)
diff --git a/drivers/net/ethernet/ibm/ibmveth.c b/drivers/net/ethernet/ibm/ibmveth.c
index e877371..9010cea 100644
--- a/drivers/net/ethernet/ibm/ibmveth.c
+++ b/drivers/net/ethernet/ibm/ibmveth.c
@@ -1616,11 +1616,8 @@ static struct vio_driver ibmveth_driver = {
 	.probe		= ibmveth_probe,
 	.remove		= ibmveth_remove,
 	.get_desired_dma = ibmveth_get_desired_dma,
-	.driver		= {
-		.name	= ibmveth_driver_name,
-		.owner	= THIS_MODULE,
-		.pm = &ibmveth_pm_ops,
-	}
+	.name		= ibmveth_driver_name,
+	.pm		= &ibmveth_pm_ops,
 };
 
 static int __init ibmveth_module_init(void)
diff --git a/drivers/net/ethernet/sun/sunvnet.c b/drivers/net/ethernet/sun/sunvnet.c
index 8c6c059..998c0f0 100644
--- a/drivers/net/ethernet/sun/sunvnet.c
+++ b/drivers/net/ethernet/sun/sunvnet.c
@@ -1264,10 +1264,7 @@ static struct vio_driver vnet_port_driver = {
 	.id_table	= vnet_port_match,
 	.probe		= vnet_port_probe,
 	.remove		= vnet_port_remove,
-	.driver		= {
-		.name	= "vnet_port",
-		.owner	= THIS_MODULE,
-	}
+	.name		= "vnet_port",
 };
 
 static int __init vnet_init(void)
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
index bdfa223..134a0ae 100644
--- a/drivers/scsi/ibmvscsi/ibmvfc.c
+++ b/drivers/scsi/ibmvscsi/ibmvfc.c
@@ -4890,11 +4890,8 @@ static struct vio_driver ibmvfc_driver = {
 	.probe = ibmvfc_probe,
 	.remove = ibmvfc_remove,
 	.get_desired_dma = ibmvfc_get_desired_dma,
-	.driver = {
-		.name = IBMVFC_NAME,
-		.owner = THIS_MODULE,
-		.pm = &ibmvfc_pm_ops,
-	}
+	.name = IBMVFC_NAME,
+	.pm = &ibmvfc_pm_ops,
 };
 
 static struct fc_function_template ibmvfc_transport_functions = {
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c
index e984951..3a6c474 100644
--- a/drivers/scsi/ibmvscsi/ibmvscsi.c
+++ b/drivers/scsi/ibmvscsi/ibmvscsi.c
@@ -2061,11 +2061,8 @@ static struct vio_driver ibmvscsi_driver = {
 	.probe = ibmvscsi_probe,
 	.remove = ibmvscsi_remove,
 	.get_desired_dma = ibmvscsi_get_desired_dma,
-	.driver = {
-		.name = "ibmvscsi",
-		.owner = THIS_MODULE,
-		.pm = &ibmvscsi_pm_ops,
-	}
+	.name = "ibmvscsi",
+	.pm = &ibmvscsi_pm_ops,
 };
 
 static struct srp_function_template ibmvscsi_transport_functions = {
diff --git a/drivers/scsi/ibmvscsi/ibmvstgt.c b/drivers/scsi/ibmvscsi/ibmvstgt.c
index 2256bab..aa7ed81 100644
--- a/drivers/scsi/ibmvscsi/ibmvstgt.c
+++ b/drivers/scsi/ibmvscsi/ibmvstgt.c
@@ -918,10 +918,7 @@ static struct vio_driver ibmvstgt_driver = {
 	.id_table = ibmvstgt_device_table,
 	.probe = ibmvstgt_probe,
 	.remove = ibmvstgt_remove,
-	.driver = {
-		.name = "ibmvscsis",
-		.owner = THIS_MODULE,
-	}
+	.name = "ibmvscsis",
 };
 
 static int get_system_info(void)
diff --git a/drivers/tty/hvc/hvc_vio.c b/drivers/tty/hvc/hvc_vio.c
index 3a0d53d..ee30779 100644
--- a/drivers/tty/hvc/hvc_vio.c
+++ b/drivers/tty/hvc/hvc_vio.c
@@ -310,11 +310,8 @@ static int __devexit hvc_vio_remove(struct vio_dev *vdev)
 static struct vio_driver hvc_vio_driver = {
 	.id_table	= hvc_driver_table,
 	.probe		= hvc_vio_probe,
-	.remove		= __devexit_p(hvc_vio_remove),
-	.driver		= {
-		.name	= hvc_driver_name,
-		.owner	= THIS_MODULE,
-	}
+	.remove		= hvc_vio_remove,
+	.name		= hvc_driver_name,
 };
 
 static int __init hvc_vio_init(void)
diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c
index d237591..3436436 100644
--- a/drivers/tty/hvc/hvcs.c
+++ b/drivers/tty/hvc/hvcs.c
@@ -879,10 +879,7 @@ static struct vio_driver hvcs_vio_driver = {
 	.id_table	= hvcs_driver_table,
 	.probe		= hvcs_probe,
 	.remove		= __devexit_p(hvcs_remove),
-	.driver		= {
-		.name	= hvcs_driver_name,
-		.owner	= THIS_MODULE,
-	}
+	.name		= hvcs_driver_name,
 };
 
 /* Only called from hvcs_get_pi please */

^ permalink raw reply related

* Re: [git pull] Please pull powerpc.git next branch
From: Tony Breeds @ 2012-03-22  3:01 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Russell King, Linux Kernel list, linuxppc-dev list, Kyle Moffett,
	Andrew Morton
In-Reply-To: <CA+55aFz-pyBHa73zkbkub4czwnU+k4_qKzBEaAGvi66MBBUTpQ@mail.gmail.com>

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

On Wed, Mar 21, 2012 at 07:02:00PM -0700, Linus Torvalds wrote:

> Ok, so this conflicted a bit with the generalized irq-domain stuff
> from Grant Likely, and while I tried to fix it up I can't even
> compile-test the end result, so you really need to verify my merge and
> perhaps send me fixups. Ok?

/me pimps his toolchains on kernel.org :)
	http://kernel.org/pub/tools/crosstool/files/bin/
Bug reports welcome.

Yours Tony

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply

* Re: [PATCH] EEH: remove eeh device from OF node
From: Gavin Shan @ 2012-03-22  3:28 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: sfr, linux-kernel, linux-next, paulus, linuxppc-dev
In-Reply-To: <1332288866.2982.33.camel@pasglop>

>> Originally, the PCI sensitive OF node is tracing the eeh device
>> through struct device_node::edev. However, it was regarded as
>> bad idea.
>> 
>> The patch removes struct device_node::edev. In addition, the
>> global list of eeh devices is introduced, and do retrival of
>> eeh device according to the given OF node through the global
>> list.
>
>So I'm not too happy with that. The main problem I see is that
>the code -constantly- calls of_node_to_eeh_dev.
>

Yes, it's somewhat expensive.

>IE. On any MMIO that happens to return all 1's, we'll call
>eeh_check_failure() for example, which does that. In fact for a hot path
>it's pretty horrid, it will:
>
> - Do an address cache lookup to get the pci_dev
> - Get the device-node frokm the pci_dev
> - Lookup your list to get the eeh_dev
>
>Shouldn't we instead change the address cache to contain eeh_dev
>instead ? And if you prefer keeping pci_dev, then it shouldn't be hard
>to stick a pointer to the eeh_dev in there via either struct archdata or
>maybe platform_data.
>
>The EEH code still, even after your rework, constantly pass "dn"'s as
>argument to functions just to convert it back to a struct eeh_dev rather
>than trying to pass the eeh_dev.
>

I'm working on explicit PE support and hopefully, I can send out
the code next week for review. The basic idea is to introuce
struct eeh_pe and attached eeh_dev to the corresponding PE. In turn,
eeh core will use PE as parameter instead of current eeh_dev ;-)

>So turning that into a list lookup will slow things down to a crawl.
>Also your patch never seems to remove anything from your list, which
>doesn't look right vs. hotplug.
>
>I suggest we fix that with a two phase approach:
>
> 1- ASAP so we can still get that into 3.4, move the eeh_dev pointer to
>struct pci_dn instead of struct device_node. This structure is
>accessible directly via dn->data and is ppc specific, that will be a
>better temporary solution and and adding stuff to the generic struct
>device_node.
>

I've sent patch again it and please take a look when you have time.

> 2- Then, what we need to do is generalize the use of eeh_dev rather
>than device_node as the main object being worked on in the eeh layer and
>thus as the argument to most functions.
>
>Cheers,
>Ben.
>

Thanks,
Gavin

>> Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
>> ---
>>  arch/powerpc/include/asm/eeh.h           |    7 +++++++
>>  arch/powerpc/platforms/pseries/eeh_dev.c |   29 ++++++++++++++++++++++++++++-
>>  include/linux/of.h                       |   10 ----------
>>  3 files changed, 35 insertions(+), 11 deletions(-)
>> 
>> diff --git a/arch/powerpc/include/asm/eeh.h b/arch/powerpc/include/asm/eeh.h
>> index d60f998..591e0a1 100644
>> --- a/arch/powerpc/include/asm/eeh.h
>> +++ b/arch/powerpc/include/asm/eeh.h
>> @@ -56,6 +56,7 @@ struct eeh_dev {
>>  	struct pci_controller *phb;	/* Associated PHB		*/
>>  	struct device_node *dn;		/* Associated device node	*/
>>  	struct pci_dev *pdev;		/* Associated PCI device	*/
>> +	struct list_head list;		/* Form the global link list	*/
>>  };
>>  
>>  static inline struct device_node *eeh_dev_to_of_node(struct eeh_dev *edev)
>> @@ -115,6 +116,7 @@ extern int eeh_subsystem_enabled;
>>   */
>>  #define EEH_MAX_ALLOWED_FREEZES 5
>>  
>> +struct eeh_dev *eeh_dev_from_of_node(struct device_node *dn);
>>  void * __devinit eeh_dev_init(struct device_node *dn, void *data);
>>  void __devinit eeh_dev_phb_init_dynamic(struct pci_controller *phb);
>>  void __init eeh_dev_phb_init(void);
>> @@ -132,6 +134,11 @@ void eeh_add_device_tree_early(struct device_node *);
>>  void eeh_add_device_tree_late(struct pci_bus *);
>>  void eeh_remove_bus_device(struct pci_dev *);
>>  
>> +static inline struct eeh_dev *of_node_to_eeh_dev(struct device_node *dn)
>> +{
>> +	return eeh_dev_from_of_node(dn);
>> +}
>> +
>>  /**
>>   * EEH_POSSIBLE_ERROR() -- test for possible MMIO failure.
>>   *
>> diff --git a/arch/powerpc/platforms/pseries/eeh_dev.c b/arch/powerpc/platforms/pseries/eeh_dev.c
>> index f3aed7d..925d3a3 100644
>> --- a/arch/powerpc/platforms/pseries/eeh_dev.c
>> +++ b/arch/powerpc/platforms/pseries/eeh_dev.c
>> @@ -34,6 +34,7 @@
>>  #include <linux/export.h>
>>  #include <linux/gfp.h>
>>  #include <linux/init.h>
>> +#include <linux/list.h>
>>  #include <linux/kernel.h>
>>  #include <linux/pci.h>
>>  #include <linux/string.h>
>> @@ -41,6 +42,30 @@
>>  #include <asm/pci-bridge.h>
>>  #include <asm/ppc-pci.h>
>>  
>> +/* eeh device list */
>> +static LIST_HEAD(eeh_dev_list);
>> +
>> +/**
>> + * eeh_dev_from_of_node - Retrieve EEH device according to OF node
>> + * @dn: OF node
>> + *
>> + * All existing eeh devices have been put into the global list.
>> + * In addition, the eeh device is tracing the corresponding
>> + * OF node. The function is used to retrieve the corresponding
>> + * eeh device according to the given OF node.
>> + */
>> +struct eeh_dev *eeh_dev_from_of_node(struct device_node *dn)
>> +{
>> +	struct eeh_dev *edev = NULL;
>> +
>> +	list_for_each_entry(edev, &eeh_dev_list, list) {
>> +		if (edev->dn && edev->dn == dn)
>> +			return edev;
>> +	}
>> +
>> +	return NULL;
>> +}
>> +
>>  /**
>>   * eeh_dev_init - Create EEH device according to OF node
>>   * @dn: device node
>> @@ -62,10 +87,12 @@ void * __devinit eeh_dev_init(struct device_node *dn, void *data)
>>  	}
>>  
>>  	/* Associate EEH device with OF node */
>> -	dn->edev  = edev;
>>  	edev->dn  = dn;
>>  	edev->phb = phb;
>>  
>> +	/* Add to global list */
>> +	list_add_tail(&edev->list, &eeh_dev_list);
>> +
>>  	return NULL;
>>  }
>>  
>> diff --git a/include/linux/of.h b/include/linux/of.h
>> index 3e710d8..a75a831 100644
>> --- a/include/linux/of.h
>> +++ b/include/linux/of.h
>> @@ -58,9 +58,6 @@ struct device_node {
>>  	struct	kref kref;
>>  	unsigned long _flags;
>>  	void	*data;
>> -#if defined(CONFIG_EEH)
>> -	struct eeh_dev *edev;
>> -#endif
>>  #if defined(CONFIG_SPARC)
>>  	char	*path_component_name;
>>  	unsigned int unique_id;
>> @@ -75,13 +72,6 @@ struct of_phandle_args {
>>  	uint32_t args[MAX_PHANDLE_ARGS];
>>  };
>>  
>> -#if defined(CONFIG_EEH)
>> -static inline struct eeh_dev *of_node_to_eeh_dev(struct device_node *dn)
>> -{
>> -	return dn->edev;
>> -}
>> -#endif
>> -
>>  #if defined(CONFIG_SPARC) || !defined(CONFIG_OF)
>>  /* Dummy ref counting routines - to be implemented later */
>>  static inline struct device_node *of_node_get(struct device_node *node)
>
>

^ permalink raw reply

* Re: [PATCH 14/17] powerpc: crypto: nx driver code supporting nx encryption
From: Greg KH @ 2012-03-22  3:39 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: rcj, linux-kernel, linux-crypto, Kent Yoder, linuxppc-dev,
	David Miller
In-Reply-To: <1332385050.2982.71.camel@pasglop>

On Thu, Mar 22, 2012 at 01:57:30PM +1100, Benjamin Herrenschmidt wrote:
> +int __vio_register_driver(struct vio_driver *viodrv, struct module *owner,
> +			const char *mod_name)
>  {
>  	viodrv->driver.bus = &vio_bus_type;
> +	viodrv->driver.name = viodrv->name;
> +	viodrv->driver.bus = &vio_bus_type;
> +	viodrv->driver.owner = owner;
> +	viodrv->driver.mod_name = mod_name;

Any reason you set .bus twice?

^ permalink raw reply

* [PATCH] c6x: remove irq_set_virq_count
From: Stephen Rothwell @ 2012-03-22  3:43 UTC (permalink / raw)
  To: Mark Salter, Aurelien Jacquiot; +Cc: ppc-dev, linux-c6x-dev

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

This function was copied over from the powerpc architecture but is not
used at all, so just remove it.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/c6x/include/asm/irq.h |   10 ----------
 arch/c6x/kernel/irq.c      |    9 ---------
 2 files changed, 0 insertions(+), 19 deletions(-)

This was found while cleaning up the PowerPC legacy iSeries platform.

diff --git a/arch/c6x/include/asm/irq.h b/arch/c6x/include/asm/irq.h
index a6ae3c9..7febe9d 100644
--- a/arch/c6x/include/asm/irq.h
+++ b/arch/c6x/include/asm/irq.h
@@ -174,16 +174,6 @@ extern void irq_set_default_host(struct irq_host *host);
 
 
 /**
- * irq_set_virq_count - Set the maximum number of virt irqs
- * @count: number of linux virtual irqs, capped with NR_IRQS
- *
- * This is mainly for use by platforms like iSeries who want to program
- * the virtual irq number in the controller to avoid the reverse mapping
- */
-extern void irq_set_virq_count(unsigned int count);
-
-
-/**
  * irq_create_mapping - Map a hardware interrupt into linux virq space
  * @host: host owning this hardware interrupt or NULL for default host
  * @hwirq: hardware irq number in that host space
diff --git a/arch/c6x/kernel/irq.c b/arch/c6x/kernel/irq.c
index 0929e4b..e2e4daa 100644
--- a/arch/c6x/kernel/irq.c
+++ b/arch/c6x/kernel/irq.c
@@ -279,15 +279,6 @@ void irq_set_default_host(struct irq_host *host)
 	irq_default_host = host;
 }
 
-void irq_set_virq_count(unsigned int count)
-{
-	pr_debug("irq: Trying to set virq count to %d\n", count);
-
-	BUG_ON(count < NR_PRIORITY_IRQS);
-	if (count < NR_IRQS)
-		irq_virq_count = count;
-}
-
 static int irq_setup_virq(struct irq_host *host, unsigned int virq,
 			    irq_hw_number_t hwirq)
 {
-- 
1.7.9.1

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply related

* [PATCH] powerpc: remove NO_IRQ_IGNORE
From: Stephen Rothwell @ 2012-03-22  4:09 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: ppc-dev

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

Now that legacy iSeries is gone, this is no longer used.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/powerpc/include/asm/irq.h     |    6 ------
 arch/powerpc/include/asm/machdep.h |    4 +---
 arch/powerpc/kernel/irq.c          |    4 ++--
 3 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/arch/powerpc/include/asm/irq.h b/arch/powerpc/include/asm/irq.h
index c0e1bc3..22064be 100644
--- a/arch/powerpc/include/asm/irq.h
+++ b/arch/powerpc/include/asm/irq.h
@@ -26,12 +26,6 @@ extern atomic_t ppc_n_lost_interrupts;
 /* This number is used when no interrupt has been assigned */
 #define NO_IRQ			(0)
 
-/* This is a special irq number to return from get_irq() to tell that
- * no interrupt happened _and_ ignore it (don't count it as bad). Some
- * platforms like iSeries rely on that.
- */
-#define NO_IRQ_IGNORE		((unsigned int)-1)
-
 /* Total number of virq in the platform */
 #define NR_IRQS		CONFIG_NR_IRQS
 
diff --git a/arch/powerpc/include/asm/machdep.h b/arch/powerpc/include/asm/machdep.h
index bf37931..42ce570 100644
--- a/arch/powerpc/include/asm/machdep.h
+++ b/arch/powerpc/include/asm/machdep.h
@@ -99,9 +99,7 @@ struct machdep_calls {
 
 	void		(*init_IRQ)(void);
 
-	/* Return an irq, or NO_IRQ to indicate there are none pending.
-	 * If for some reason there is no irq, but the interrupt
-	 * shouldn't be counted as spurious, return NO_IRQ_IGNORE. */
+	/* Return an irq, or NO_IRQ to indicate there are none pending. */
 	unsigned int	(*get_irq)(void);
 
 	/* PCI stuff */
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 45b367c..4ec471a 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -445,9 +445,9 @@ void do_IRQ(struct pt_regs *regs)
 	may_hard_irq_enable();
 
 	/* And finally process it */
-	if (irq != NO_IRQ && irq != NO_IRQ_IGNORE)
+	if (irq != NO_IRQ)
 		handle_one_irq(irq);
-	else if (irq != NO_IRQ_IGNORE)
+	else
 		__get_cpu_var(irq_stat).spurious_irqs++;
 
 	irq_exit();
-- 
1.7.9.1

-- 
Stephen Rothwell <sfr@canb.auug.org.au>

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox