* Patch "genirq: Deal with desc->set_type() changing desc->chip" has been added to the 2.6.34-stable tree
From: gregkh @ 2010-07-28 0:24 UTC (permalink / raw)
To: tglx, benh, eha, gregkh, linuxppc-dev; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
genirq: Deal with desc->set_type() changing desc->chip
to the 2.6.34-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
genirq-deal-with-desc-set_type-changing-desc-chip.patch
and it can be found in the queue-2.6.34 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@kernel.org> know about it.
>From 4673247562e39a17e09440fa1400819522ccd446 Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de>
Date: Mon, 7 Jun 2010 17:53:51 +0200
Subject: genirq: Deal with desc->set_type() changing desc->chip
From: Thomas Gleixner <tglx@linutronix.de>
commit 4673247562e39a17e09440fa1400819522ccd446 upstream.
The set_type() function can change the chip implementation when the
trigger mode changes. That might result in using an non-initialized
irq chip when called from __setup_irq() or when called via
set_irq_type() on an already enabled irq.
The set_irq_type() function should not be called on an enabled irq,
but because we forgot to put a check into it, we have a bunch of users
which grew the habit of doing that and it never blew up as the
function is serialized via desc->lock against all users of desc->chip
and they never hit the non-initialized irq chip issue.
The easy fix for the __setup_irq() issue would be to move the
irq_chip_set_defaults(desc->chip) call after the trigger setting to
make sure that a chip change is covered.
But as we have already users, which do the type setting after
request_irq(), the safe fix for now is to call irq_chip_set_defaults()
from __irq_set_trigger() when desc->set_type() changed the irq chip.
It needs a deeper analysis whether we should refuse to change the chip
on an already enabled irq, but that'd be a large scale change to fix
all the existing users. So that's neither stable nor 2.6.35 material.
Reported-by: Esben Haabendal <eha@doredevelopment.dk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev <linuxppc-dev@ozlabs.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
kernel/irq/manage.c | 3 +++
1 file changed, 3 insertions(+)
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -440,6 +440,9 @@ int __irq_set_trigger(struct irq_desc *d
/* note that IRQF_TRIGGER_MASK == IRQ_TYPE_SENSE_MASK */
desc->status &= ~(IRQ_LEVEL | IRQ_TYPE_SENSE_MASK);
desc->status |= flags;
+
+ if (chip != desc->chip)
+ irq_chip_set_defaults(desc->chip);
}
return ret;
Patches currently in stable-queue which might be from tglx@linutronix.de are
queue-2.6.34/genirq-deal-with-desc-set_type-changing-desc-chip.patch
queue-2.6.34/x86-send-a-sigtrap-for-user-icebp-traps.patch
^ permalink raw reply
* Re: [PATCH 04/11] powerpc: Simplify update_vsyscall
From: Paul Mackerras @ 2010-07-27 23:41 UTC (permalink / raw)
To: John Stultz
Cc: linuxppc-dev, Thomas Gleixner, Ingo Molnar, LKML, Anton Blanchard
In-Reply-To: <1279068988-21864-5-git-send-email-johnstul@us.ibm.com>
On Tue, Jul 13, 2010 at 05:56:21PM -0700, John Stultz wrote:
> Currently powerpc's update_vsyscall calls an inline update_gtod.
> However, both are straightforward, and there are no other users,
> so this patch merges update_gtod into update_vsyscall.
>
> Compiles, but otherwise untested.
This and the following two patches will cause interesting conflicts
with two commits in Ben Herrenschmidt's powerpc.git next branch,
specifically 8fd63a9e ("powerpc: Rework VDSO gettimeofday to prevent
time going backwards") and c1aa687d ("powerpc: Clean up obsolete code
relating to decrementer and timebase") from me. In fact the first of
those two commits includes changes equivalent to those in your 5/11
patch ("powerpc: Cleanup xtime usage"), as far as I can see.
BTW, BenH's tree is at:
git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git
Paul.
^ permalink raw reply
* mpc512x_dma hangs when used from multiple threads
From: Ilya Yanok @ 2010-07-27 23:01 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Piotr Ziecik
Hello Piotr, everybody,
I've found that mpc512x_dma channels hang sometimes while accessed from
more than one thread simultaneously.
The easiest way to reproduce this error I've managed to found is using
dmatest module with rather high threads_per_chan value (20 should be
enough):
-bash-3.2# insmod dmatest.ko max_channels=1 iterations=1 threads_per_chan=20
[ 32.559568] dma0chan0-copy0: terminating after 1 tests, 0 failures
(status 0)
-bash-3.2# [ 35.553688] dma0chan0-copy1: #0: test timed out
[ 35.558207] dma0chan0-copy1: terminating after 1 tests, 1 failures
(status 0)
[ 35.565458] dma0chan0-copy1: #0: test timed out
[ 35.569968] dma0chan0-copy1: terminating after 1 tests, 1 failures
(status 0)
[ 35.577219] dma0chan0-copy1: #0: test timed out
[ 35.581735] dma0chan0-copy1: terminating after 1 tests, 1 failures
(status 0)
[ 35.588953] dma0chan0-copy2: #0: test timed out
[ 35.593502] dma0chan0-copy2: terminating after 1 tests, 1 failures
(status 0)
[ 35.600720] dma0chan0-copy3: #0: test timed out
[ 35.605284] dma0chan0-copy3: terminating after 1 tests, 1 failures
(status 0)
[ 35.612472] dma0chan0-copy4: #0: test timed out
[ 35.617052] dma0chan0-copy4: terminating after 1 tests, 1 failures
(status 0)
[ 35.624381] dma0chan0-copy5: #0: test timed out
[ 35.628895] dma0chan0-copy5: terminating after 1 tests, 1 failures
(status 0)
[ 35.636126] dma0chan0-copy6: #0: test timed out
[ 35.640657] dma0chan0-copy6: terminating after 1 tests, 1 failures
(status 0)
[ 35.647876] dma0chan0-copy7: #0: test timed out
[ 35.652425] dma0chan0-copy7: terminating after 1 tests, 1 failures
(status 0)
[ 35.659643] dma0chan0-copy8: #0: test timed out
[ 35.664209] dma0chan0-copy8: terminating after 1 tests, 1 failures
(status 0)
[ 35.671395] dma0chan0-copy9: #0: test timed out
[ 35.675976] dma0chan0-copy9: terminating after 1 tests, 1 failures
(status 0)
[ 35.683164] dma0chan0-copy1: #0: test timed out
[ 35.687743] dma0chan0-copy1: terminating after 1 tests, 1 failures
(status 0)
[ 35.694942] dma0chan0-copy1: #0: test timed out
[ 35.699495] dma0chan0-copy1: terminating after 1 tests, 1 failures
(status 0)
[ 35.706714] dma0chan0-copy1: #0: test timed out
[ 35.711264] dma0chan0-copy1: terminating after 1 tests, 1 failures
(status 0)
[ 35.719826] dma0chan0-copy1: #0: test timed out
[ 35.724404] dma0chan0-copy1: terminating after 1 tests, 1 failures
(status 0)
[ 35.731549] dma0chan0-copy1: #0: test timed out
[ 35.736131] dma0chan0-copy1: terminating after 1 tests, 1 failures
(status 0)
[ 35.744247] dma0chan0-copy1: #0: test timed out
[ 35.748778] dma0chan0-copy1: terminating after 1 tests, 1 failures
(status 0)
[ 35.756768] dma0chan0-copy1: #0: test timed out
[ 35.761301] dma0chan0-copy1: terminating after 1 tests, 1 failures
(status 0)
[ 35.769306] dma0chan0-copy1: #0: test timed out
[ 35.773883] dma0chan0-copy1: terminating after 1 tests, 1 failures
(status 0)
Also, this can be reproduced using more than one channel at once (in
this case some of channels eventually hang). With max_channels=1 and
threads_per_chan=1 dmatest works fine so I think this should be a
synchronization issue.
After the hang, channel becomes unusable and cannot be even freed...
Is it a known problem? Maybe there exists some fix or workaround for it?
Regards, Ilya.
^ permalink raw reply
* [PATCH v4 2/2] powerpc/mpc5121: add initial support for PDM360NG board
From: Anatolij Gustschin @ 2010-07-27 21:26 UTC (permalink / raw)
To: linuxppc-dev
Cc: Detlev Zundel, Markus Fischer, devicetree-discuss, Michael Weiss,
Anatolij Gustschin, Wolfgang Grandegger
In-Reply-To: <1279892973-24110-1-git-send-email-agust@denx.de>
Adds IFM PDM360NG device tree and platform code.
Currently following is supported:
- Spansion S29GL512P 256 MB NOR flash
- ST Micro NAND 1 GiB flash
- DIU, please use "fbcon=map:5 video=fslfb:800x480-32@60"
at the kernel command line to enable PrimeView PM070WL3
Display support.
- FEC
- I2C
- RTC, EEPROM
- MSCAN
- PSC UART, please pass "console=tty0 console=ttyPSC5,115200"
on the kernel command line.
- SPI, ADS7845 Touchscreen
- USB0/1 Host
- USB0 OTG Host/Device
- VIU, Overlay/Capture support
Signed-off-by: Markus Fischer <markus.fischer.ec@ifm.com>
Signed-off-by: Wolfgang Grandegger <wg@denx.de>
Signed-off-by: Michael Weiss <michael.weiss@ifm.com>
Signed-off-by: Detlev Zundel <dzu@denx.de>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: devicetree-discuss@lists.ozlabs.org
Cc: Grant Likely <grant.likely@secretlab.ca>
---
v4:
- set interrupt-parent in root node only, less verbose DT
- add compatible property to phy node
- update touch screen controller node (add reg and
spi-max-frequency properties)
- drop unnecessary (u32 *) casts
- change return statement in pdm360ng_get_pendown_state()
as suggested
- use correct error codes (-ENODEV) when returning on errors
- use of_iomap() to eliminate some code
- rework pdm360ng_touchscreen_init() to only use bus notifier
for addition of platform data for touch screen driver
- eliminate machine_device_initcall(), code moved to init
callback
v3:
- uncomment and correct .irq_flags field of touchscreen
platform data struct as proposed extension to this
data struct has been accepted and merged via input tree
a short while ago
v1 -> v2:
- fix interrupt-parent property in nfc node
- drop #address-cells in ipic node
- remove device_type from ethernet-phy sub-node
- remove device_type from ethernet node
- add aliases node for eth0, needed for MAC address
update by U-Boot
- removed spaces around &ipic
arch/powerpc/boot/dts/pdm360ng.dts | 410 ++++++++++++++++++++++++++++++++
arch/powerpc/platforms/512x/Kconfig | 7 +
arch/powerpc/platforms/512x/Makefile | 1 +
arch/powerpc/platforms/512x/pdm360ng.c | 129 ++++++++++
4 files changed, 547 insertions(+), 0 deletions(-)
create mode 100644 arch/powerpc/boot/dts/pdm360ng.dts
create mode 100644 arch/powerpc/platforms/512x/pdm360ng.c
diff --git a/arch/powerpc/boot/dts/pdm360ng.dts b/arch/powerpc/boot/dts/pdm360ng.dts
new file mode 100644
index 0000000..94dfa5c
--- /dev/null
+++ b/arch/powerpc/boot/dts/pdm360ng.dts
@@ -0,0 +1,410 @@
+/*
+ * Device Tree Source for IFM PDM360NG.
+ *
+ * Copyright 2009 - 2010 DENX Software Engineering.
+ * Anatolij Gustschin <agust@denx.de>
+ *
+ * Based on MPC5121E ADS dts.
+ * Copyright 2008 Freescale Semiconductor Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ */
+
+/dts-v1/;
+
+/ {
+ model = "pdm360ng";
+ compatible = "ifm,pdm360ng";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ interrupt-parent = <&ipic>;
+
+ aliases {
+ ethernet0 = ð0;
+ };
+
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ PowerPC,5121@0 {
+ device_type = "cpu";
+ reg = <0>;
+ d-cache-line-size = <0x20>; // 32 bytes
+ i-cache-line-size = <0x20>; // 32 bytes
+ d-cache-size = <0x8000>; // L1, 32K
+ i-cache-size = <0x8000>; // L1, 32K
+ timebase-frequency = <49500000>;// 49.5 MHz (csb/4)
+ bus-frequency = <198000000>; // 198 MHz csb bus
+ clock-frequency = <396000000>; // 396 MHz ppc core
+ };
+ };
+
+ memory {
+ device_type = "memory";
+ reg = <0x00000000 0x20000000>; // 512MB at 0
+ };
+
+ nfc@40000000 {
+ compatible = "fsl,mpc5121-nfc";
+ reg = <0x40000000 0x100000>;
+ interrupts = <0x6 0x8>;
+ #address-cells = <0x1>;
+ #size-cells = <0x1>;
+ bank-width = <0x1>;
+ chips = <0x1>;
+
+ partition@0 {
+ label = "nand0";
+ reg = <0x0 0x40000000>;
+ };
+ };
+
+ sram@50000000 {
+ compatible = "fsl,mpc5121-sram";
+ reg = <0x50000000 0x20000>; // 128K at 0x50000000
+ };
+
+ localbus@80000020 {
+ compatible = "fsl,mpc5121-localbus";
+ #address-cells = <2>;
+ #size-cells = <1>;
+ reg = <0x80000020 0x40>;
+
+ ranges = <0x0 0x0 0xf0000000 0x10000000 /* Flash */
+ 0x2 0x0 0x50040000 0x00020000>; /* CS2: MRAM */
+
+ flash@0,0 {
+ compatible = "amd,s29gl01gp", "cfi-flash";
+ reg = <0 0x00000000 0x08000000
+ 0 0x08000000 0x08000000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ bank-width = <4>;
+ device-width = <2>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x00000000 0x00080000>;
+ read-only;
+ };
+ partition@80000 {
+ label = "environment";
+ reg = <0x00080000 0x00080000>;
+ read-only;
+ };
+ partition@100000 {
+ label = "splash-image";
+ reg = <0x00100000 0x00080000>;
+ read-only;
+ };
+ partition@180000 {
+ label = "device-tree";
+ reg = <0x00180000 0x00040000>;
+ };
+ partition@1c0000 {
+ label = "kernel";
+ reg = <0x001c0000 0x00500000>;
+ };
+ partition@6c0000 {
+ label = "filesystem";
+ reg = <0x006c0000 0x07940000>;
+ };
+ };
+
+ mram0@2,0 {
+ compatible = "mtd-ram";
+ reg = <2 0x00000 0x10000>;
+ bank-width = <2>;
+ };
+
+ mram1@2,10000 {
+ compatible = "mtd-ram";
+ reg = <2 0x010000 0x10000>;
+ bank-width = <2>;
+ };
+ };
+
+ soc@80000000 {
+ compatible = "fsl,mpc5121-immr";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ #interrupt-cells = <2>;
+ ranges = <0x0 0x80000000 0x400000>;
+ reg = <0x80000000 0x400000>;
+ bus-frequency = <66000000>; // 66 MHz ips bus
+
+ // IPIC
+ // interrupts cell = <intr #, sense>
+ // sense values match linux IORESOURCE_IRQ_* defines:
+ // sense == 8: Level, low assertion
+ // sense == 2: Edge, high-to-low change
+ //
+ ipic: interrupt-controller@c00 {
+ compatible = "fsl,mpc5121-ipic", "fsl,ipic";
+ interrupt-controller;
+ #address-cells = <0>;
+ #interrupt-cells = <2>;
+ reg = <0xc00 0x100>;
+ };
+
+ rtc@a00 { // Real time clock
+ compatible = "fsl,mpc5121-rtc";
+ reg = <0xa00 0x100>;
+ interrupts = <79 0x8 80 0x8>;
+ };
+
+ reset@e00 { // Reset module
+ compatible = "fsl,mpc5121-reset";
+ reg = <0xe00 0x100>;
+ };
+
+ clock@f00 { // Clock control
+ compatible = "fsl,mpc5121-clock";
+ reg = <0xf00 0x100>;
+ };
+
+ pmc@1000{ //Power Management Controller
+ compatible = "fsl,mpc5121-pmc";
+ reg = <0x1000 0x100>;
+ interrupts = <83 0x2>;
+ };
+
+ gpio@1100 {
+ compatible = "fsl,mpc5121-gpio";
+ reg = <0x1100 0x100>;
+ interrupts = <78 0x8>;
+ };
+
+ can@1300 {
+ compatible = "fsl,mpc5121-mscan";
+ interrupts = <12 0x8>;
+ reg = <0x1300 0x80>;
+ };
+
+ can@1380 {
+ compatible = "fsl,mpc5121-mscan";
+ interrupts = <13 0x8>;
+ reg = <0x1380 0x80>;
+ };
+
+ i2c@1700 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "fsl,mpc5121-i2c";
+ reg = <0x1700 0x20>;
+ interrupts = <0x9 0x8>;
+ fsl,preserve-clocking;
+
+ eeprom@50 {
+ compatible = "at,24c01";
+ reg = <0x50>;
+ };
+
+ rtc@68 {
+ compatible = "stm,m41t00";
+ reg = <0x68>;
+ };
+ };
+
+ i2c@1740 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "fsl,mpc5121-i2c";
+ reg = <0x1740 0x20>;
+ interrupts = <0xb 0x8>;
+ fsl,preserve-clocking;
+ };
+
+ i2ccontrol@1760 {
+ compatible = "fsl,mpc5121-i2c-ctrl";
+ reg = <0x1760 0x8>;
+ };
+
+ axe@2000 {
+ compatible = "fsl,mpc5121-axe";
+ reg = <0x2000 0x100>;
+ interrupts = <42 0x8>;
+ };
+
+ display@2100 {
+ compatible = "fsl,mpc5121-diu";
+ reg = <0x2100 0x100>;
+ interrupts = <64 0x8>;
+ };
+
+ can@2300 {
+ compatible = "fsl,mpc5121-mscan";
+ interrupts = <90 0x8>;
+ reg = <0x2300 0x80>;
+ };
+
+ can@2380 {
+ compatible = "fsl,mpc5121-mscan";
+ interrupts = <91 0x8>;
+ reg = <0x2380 0x80>;
+ };
+
+ viu@2400 {
+ compatible = "fsl,mpc5121-viu";
+ reg = <0x2400 0x400>;
+ interrupts = <67 0x8>;
+ };
+
+ mdio@2800 {
+ compatible = "fsl,mpc5121-fec-mdio";
+ reg = <0x2800 0x200>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ phy: ethernet-phy@0 {
+ compatible = "smsc,lan8700";
+ reg = <0x1f>;
+ };
+ };
+
+ eth0: ethernet@2800 {
+ compatible = "fsl,mpc5121-fec";
+ reg = <0x2800 0x200>;
+ local-mac-address = [ 00 00 00 00 00 00 ];
+ interrupts = <4 0x8>;
+ phy-handle = < &phy >;
+ };
+
+ // USB1 using external ULPI PHY
+ usb@3000 {
+ compatible = "fsl,mpc5121-usb2-dr";
+ reg = <0x3000 0x600>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ interrupts = <43 0x8>;
+ dr_mode = "host";
+ phy_type = "ulpi";
+ };
+
+ // USB0 using internal UTMI PHY
+ usb@4000 {
+ compatible = "fsl,mpc5121-usb2-dr";
+ reg = <0x4000 0x600>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ interrupts = <44 0x8>;
+ dr_mode = "otg";
+ phy_type = "utmi_wide";
+ fsl,invert-pwr-fault;
+ };
+
+ // IO control
+ ioctl@a000 {
+ compatible = "fsl,mpc5121-ioctl";
+ reg = <0xA000 0x1000>;
+ };
+
+ // 512x PSCs are not 52xx PSCs compatible
+ serial@11000 {
+ compatible = "fsl,mpc5121-psc-uart", "fsl,mpc5121-psc";
+ cell-index = <0>;
+ reg = <0x11000 0x100>;
+ interrupts = <40 0x8>;
+ fsl,rx-fifo-size = <16>;
+ fsl,tx-fifo-size = <16>;
+ };
+
+ serial@11100 {
+ compatible = "fsl,mpc5121-psc-uart", "fsl,mpc5121-psc";
+ cell-index = <1>;
+ reg = <0x11100 0x100>;
+ interrupts = <40 0x8>;
+ fsl,rx-fifo-size = <16>;
+ fsl,tx-fifo-size = <16>;
+ };
+
+ serial@11200 {
+ compatible = "fsl,mpc5121-psc-uart", "fsl,mpc5121-psc";
+ cell-index = <2>;
+ reg = <0x11200 0x100>;
+ interrupts = <40 0x8>;
+ fsl,rx-fifo-size = <16>;
+ fsl,tx-fifo-size = <16>;
+ };
+
+ serial@11300 {
+ compatible = "fsl,mpc5121-psc-uart", "fsl,mpc5121-psc";
+ cell-index = <3>;
+ reg = <0x11300 0x100>;
+ interrupts = <40 0x8>;
+ fsl,rx-fifo-size = <16>;
+ fsl,tx-fifo-size = <16>;
+ };
+
+ serial@11400 {
+ compatible = "fsl,mpc5121-psc-uart", "fsl,mpc5121-psc";
+ cell-index = <4>;
+ reg = <0x11400 0x100>;
+ interrupts = <40 0x8>;
+ fsl,rx-fifo-size = <16>;
+ fsl,tx-fifo-size = <16>;
+ };
+
+ serial@11600 {
+ compatible = "fsl,mpc5121-psc-uart", "fsl,mpc5121-psc";
+ cell-index = <6>;
+ reg = <0x11600 0x100>;
+ interrupts = <40 0x8>;
+ fsl,rx-fifo-size = <16>;
+ fsl,tx-fifo-size = <16>;
+ };
+
+ serial@11800 {
+ compatible = "fsl,mpc5121-psc-uart", "fsl,mpc5121-psc";
+ cell-index = <8>;
+ reg = <0x11800 0x100>;
+ interrupts = <40 0x8>;
+ fsl,rx-fifo-size = <16>;
+ fsl,tx-fifo-size = <16>;
+ };
+
+ serial@11B00 {
+ compatible = "fsl,mpc5121-psc-uart", "fsl,mpc5121-psc";
+ cell-index = <11>;
+ reg = <0x11B00 0x100>;
+ interrupts = <40 0x8>;
+ fsl,rx-fifo-size = <16>;
+ fsl,tx-fifo-size = <16>;
+ };
+
+ pscfifo@11f00 {
+ compatible = "fsl,mpc5121-psc-fifo";
+ reg = <0x11f00 0x100>;
+ interrupts = <40 0x8>;
+ };
+
+ spi@11900 {
+ compatible = "fsl,mpc5121-psc-spi", "fsl,mpc5121-psc";
+ cell-index = <9>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x11900 0x100>;
+ interrupts = <40 0x8>;
+ fsl,rx-fifo-size = <16>;
+ fsl,tx-fifo-size = <16>;
+
+ // 7845 touch screen controller
+ ts@0 {
+ compatible = "ti,ads7846";
+ reg = <0x0>;
+ spi-max-frequency = <3000000>;
+ // pen irq is GPIO25
+ interrupts = <78 0x8>;
+ };
+ };
+
+ dma@14000 {
+ compatible = "fsl,mpc5121-dma";
+ reg = <0x14000 0x1800>;
+ interrupts = <65 0x8>;
+ };
+ };
+};
diff --git a/arch/powerpc/platforms/512x/Kconfig b/arch/powerpc/platforms/512x/Kconfig
index e9dca28..27b0651 100644
--- a/arch/powerpc/platforms/512x/Kconfig
+++ b/arch/powerpc/platforms/512x/Kconfig
@@ -25,3 +25,10 @@ config MPC5121_GENERIC
Compatible boards include: Protonic LVT base boards (ZANMCU
and VICVT2).
+
+config PDM360NG
+ bool "ifm PDM360NG board"
+ depends on PPC_MPC512x
+ select DEFAULT_UIMAGE
+ help
+ This option enables support for the PDM360NG board.
diff --git a/arch/powerpc/platforms/512x/Makefile b/arch/powerpc/platforms/512x/Makefile
index 90be2f5..4efc1c4 100644
--- a/arch/powerpc/platforms/512x/Makefile
+++ b/arch/powerpc/platforms/512x/Makefile
@@ -4,3 +4,4 @@
obj-y += clock.o mpc512x_shared.o
obj-$(CONFIG_MPC5121_ADS) += mpc5121_ads.o mpc5121_ads_cpld.o
obj-$(CONFIG_MPC5121_GENERIC) += mpc5121_generic.o
+obj-$(CONFIG_PDM360NG) += pdm360ng.o
diff --git a/arch/powerpc/platforms/512x/pdm360ng.c b/arch/powerpc/platforms/512x/pdm360ng.c
new file mode 100644
index 0000000..1eb8b0f
--- /dev/null
+++ b/arch/powerpc/platforms/512x/pdm360ng.c
@@ -0,0 +1,129 @@
+/*
+ * Copyright (C) 2010 DENX Software Engineering
+ *
+ * Anatolij Gustschin, <agust@denx.de>
+ *
+ * PDM360NG board setup
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/io.h>
+#include <linux/of_platform.h>
+
+#include <asm/machdep.h>
+#include <asm/ipic.h>
+
+#include "mpc512x.h"
+
+#if defined(CONFIG_TOUCHSCREEN_ADS7846) || \
+ defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
+#include <linux/interrupt.h>
+#include <linux/spi/ads7846.h>
+#include <linux/spi/spi.h>
+#include <linux/notifier.h>
+
+static void *pdm360ng_gpio_base;
+
+static int pdm360ng_get_pendown_state(void)
+{
+ u32 reg;
+
+ reg = in_be32(pdm360ng_gpio_base + 0xc);
+ if (reg & 0x40)
+ setbits32(pdm360ng_gpio_base + 0xc, 0x40);
+
+ reg = in_be32(pdm360ng_gpio_base + 0x8);
+
+ /* return 1 if pen is down */
+ return (reg & 0x40) == 0;
+}
+
+static struct ads7846_platform_data pdm360ng_ads7846_pdata = {
+ .model = 7845,
+ .get_pendown_state = pdm360ng_get_pendown_state,
+ .irq_flags = IRQF_TRIGGER_LOW,
+};
+
+static int __init pdm360ng_penirq_init(void)
+{
+ struct device_node *np;
+
+ np = of_find_compatible_node(NULL, NULL, "fsl,mpc5121-gpio");
+ if (!np) {
+ pr_err("%s: Can't find 'mpc5121-gpio' node\n", __func__);
+ return -ENODEV;
+ }
+
+ pdm360ng_gpio_base = of_iomap(np, 0);
+ of_node_put(np);
+ if (!pdm360ng_gpio_base) {
+ pr_err("%s: Can't map gpio regs.\n", __func__);
+ return -ENODEV;
+ }
+ out_be32(pdm360ng_gpio_base + 0xc, 0xffffffff);
+ setbits32(pdm360ng_gpio_base + 0x18, 0x2000);
+ setbits32(pdm360ng_gpio_base + 0x10, 0x40);
+
+ return 0;
+}
+
+static int pdm360ng_touchscreen_notifier_call(struct notifier_block *nb,
+ unsigned long event, void *__dev)
+{
+ struct device *dev = __dev;
+
+ if ((event == BUS_NOTIFY_ADD_DEVICE) &&
+ of_device_is_compatible(dev->of_node, "ti,ads7846")) {
+ dev->platform_data = &pdm360ng_ads7846_pdata;
+ return NOTIFY_OK;
+ }
+ return NOTIFY_DONE;
+}
+
+static struct notifier_block pdm360ng_touchscreen_nb = {
+ .notifier_call = pdm360ng_touchscreen_notifier_call,
+};
+
+static void __init pdm360ng_touchscreen_init(void)
+{
+ if (pdm360ng_penirq_init())
+ return;
+
+ bus_register_notifier(&spi_bus_type, &pdm360ng_touchscreen_nb);
+}
+#else
+static inline void __init pdm360ng_touchscreen_init(void)
+{
+}
+#endif /* CONFIG_TOUCHSCREEN_ADS7846 */
+
+void __init pdm360ng_init(void)
+{
+ mpc512x_init();
+ pdm360ng_touchscreen_init();
+}
+
+static int __init pdm360ng_probe(void)
+{
+ unsigned long root = of_get_flat_dt_root();
+
+ return of_flat_dt_is_compatible(root, "ifm,pdm360ng");
+}
+
+define_machine(pdm360ng) {
+ .name = "PDM360NG",
+ .probe = pdm360ng_probe,
+ .setup_arch = mpc512x_setup_diu,
+ .init = pdm360ng_init,
+ .init_early = mpc512x_init_diu,
+ .init_IRQ = mpc512x_init_IRQ,
+ .get_irq = ipic_get_irq,
+ .calibrate_decr = generic_calibrate_decr,
+ .restart = mpc512x_restart,
+};
--
1.7.0.4
^ permalink raw reply related
* [PATCH] xilinxfb: update tft comp versions
From: Adrian Alonso @ 2010-07-27 21:24 UTC (permalink / raw)
To: linuxppc-dev; +Cc: devicetree-discuss, Adrian Alonso
* Add tft display module compatibility for new
hardware modules
Signed-off-by: Adrian Alonso <aalonso00@gmail.com>
---
drivers/video/xilinxfb.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c
index 574dc54..29b5daa 100644
--- a/drivers/video/xilinxfb.c
+++ b/drivers/video/xilinxfb.c
@@ -485,6 +485,8 @@ static int __devexit xilinxfb_of_remove(struct of_device *op)
/* Match table for of_platform binding */
static struct of_device_id xilinxfb_of_match[] __devinitdata = {
{ .compatible = "xlnx,xps-tft-1.00.a", },
+ { .compatible = "xlnx,xps-tft-2.00.a", },
+ { .compatible = "xlnx,xps-tft-2.01.a", },
{ .compatible = "xlnx,plb-tft-cntlr-ref-1.00.a", },
{ .compatible = "xlnx,plb-dvi-cntlr-ref-1.00.c", },
{},
--
1.7.2
^ permalink raw reply related
* Re: [Patch v2] kexec: increase max of kexec segments and use dynamic allocation
From: Eric W. Biederman @ 2010-07-27 18:24 UTC (permalink / raw)
To: Milton Miller
Cc: Neil Horman, WANG Cong, Neil Horman, huang ying, linux-kernel,
kexec, linuxppc-dev
In-Reply-To: <kexec-nrseg-reply1@mdm.bga.com>
Milton Miller <miltonm@bga.com> writes:
> [ Added kexec at lists.infradead.org and linuxppc-dev@lists.ozlabs.org ]
>
>>
>> Currently KEXEC_SEGMENT_MAX is only 16 which is too small for machine with
>> many memory ranges. When hibernate on a machine with disjoint memory we do
>> need one segment for each memory region. Increase this hard limit to 16K
>> which is reasonably large.
>>
>> And change ->segment from a static array to a dynamically allocated memory.
>>
>> Cc: Neil Horman <nhorman@redhat.com>
>> Cc: huang ying <huang.ying.caritas@gmail.com>
>> Cc: Eric W. Biederman <ebiederm@xmission.com>
>> Signed-off-by: WANG Cong <amwang@redhat.com>
>>
>> ---
>> diff --git a/arch/powerpc/kernel/machine_kexec_64.c b/arch/powerpc/kernel/machine_kexec_64.c
>> index ed31a29..f115585 100644
>> --- a/arch/powerpc/kernel/machine_kexec_64.c
>> +++ b/arch/powerpc/kernel/machine_kexec_64.c
>> @@ -131,10 +131,7 @@ static void copy_segments(unsigned long ind)
>> void kexec_copy_flush(struct kimage *image)
>> {
>> long i, nr_segments = image->nr_segments;
>> - struct kexec_segment ranges[KEXEC_SEGMENT_MAX];
>> -
>> - /* save the ranges on the stack to efficiently flush the icache */
>> - memcpy(ranges, image->segment, sizeof(ranges));
>> + struct kexec_segment range;
>
> I'm glad you found our copy on the stack and removed the stack overflow
> that comes with this bump, but ...
>
>>
>> /*
>> * After this call we may not use anything allocated in dynamic
>> @@ -148,9 +145,11 @@ void kexec_copy_flush(struct kimage *image)
>> * we need to clear the icache for all dest pages sometime,
>> * including ones that were in place on the original copy
>> */
>> - for (i = 0; i < nr_segments; i++)
>> - flush_icache_range((unsigned long)__va(ranges[i].mem),
>> - (unsigned long)__va(ranges[i].mem + ranges[i].memsz));
>> + for (i = 0; i < nr_segments; i++) {
>> + memcpy(&range, &image->segment[i], sizeof(range));
>> + flush_icache_range((unsigned long)__va(range.mem),
>> + (unsigned long)__va(range.mem + range.memsz));
>> + }
>> }
>
> This is executed after the copy, so as it says,
> "we may not use anything allocated in dynamic memory".
>
> We could allocate control pages to copy the segment list into.
> Actually ppc64 doesn't use the existing control page, but that
> is only 4kB today.
>
> We need the list to icache flush all the pages in all the segments.
> The as the indirect list doesn't have pages that were allocated at
> their destination.
An interesting point.
> Or maybe the icache flush should be done in the generic code
> like it does for crash load segments?
Please. I don't quite understand the icache flush requirement.
But we really should not be looking at the segments in the
architecture specific code.
Ideally we would only keep the segment information around for
the duration of the kexec_load syscall and not have it when
it comes time to start the second kernel.
I am puzzled. We should be completely replacing the page tables so
can't we just do a global flush? Perhaps I am being naive about what
is required for a ppc flush.
Eric
^ permalink raw reply
* Re: [PATCH 3/6] of/spi: add support to parse the SPI flash's partitions
From: Grant Likely @ 2010-07-27 19:24 UTC (permalink / raw)
To: Hu Mingkai-B21284; +Cc: linuxppc-dev, spi-devel-general, Zang Roy-R61911
In-Reply-To: <73839B4A0818E747864426270AC332C305400687@zmy16exm20.fsl.freescale.net>
[cc'ing spi-devel-general]
On Mon, Jul 26, 2010 at 2:20 AM, Hu Mingkai-B21284 <B21284@freescale.com> w=
rote:
>
>
>> -----Original Message-----
>> From: glikely@secretlab.ca [mailto:glikely@secretlab.ca] On
>> Behalf Of Grant Likely
>> Sent: Monday, July 26, 2010 3:53 PM
>> To: Hu Mingkai-B21284
>> Cc: linuxppc-dev@ozlabs.org; galak@kernel.crashing.org; Zang
>> Roy-R61911
>> Subject: Re: [PATCH 3/6] of/spi: add support to parse the SPI
>> flash's partitions
>>
>> On Mon, Jul 26, 2010 at 1:25 AM, Hu Mingkai-B21284
>> <B21284@freescale.com> wrote:
>> >
>> >
>> >> -----Original Message-----
>> >> From: Grant Likely [mailto:glikely@secretlab.ca] On Behalf
>> Of Grant
>> >> Likely
>> >> Sent: Monday, July 26, 2010 8:28 AM
>> >> To: Hu Mingkai-B21284
>> >> Cc: linuxppc-dev@ozlabs.org; galak@kernel.crashing.org; Zang
>> >> Roy-R61911
>> >> Subject: Re: [PATCH 3/6] of/spi: add support to parse the
>> SPI flash's
>> >> partitions
>> >>
>> >> On Tue, Jul 20, 2010 at 10:08:22AM +0800, Mingkai Hu wrote:
>> >> > Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com>
>> >> > ---
>> >> > =A0drivers/of/of_spi.c =A0 =A0 =A0 | =A0 11 +++++++++++
>> >> > =A0drivers/spi/spi_mpc8xxx.c | =A0 =A01 +
>> >> > =A02 files changed, 12 insertions(+), 0 deletions(-)
>> >> >
>> >> > diff --git a/drivers/of/of_spi.c b/drivers/of/of_spi.c index
>> >> > 5fed7e3..284ca0e 100644
>> >> > --- a/drivers/of/of_spi.c
>> >> > +++ b/drivers/of/of_spi.c
>> >> > @@ -10,6 +10,8 @@
>> >> > =A0#include <linux/device.h>
>> >> > =A0#include <linux/spi/spi.h>
>> >> > =A0#include <linux/of_spi.h>
>> >> > +#include <linux/spi/flash.h>
>> >> > +#include <linux/mtd/partitions.h>
>> >> >
>> >> > =A0/**
>> >> > =A0 * of_register_spi_devices - Register child devices onto
>> >> the SPI bus
>> >> > @@ -26,6 +28,7 @@ void of_register_spi_devices(struct
>> >> spi_master *master, struct device_node *np)
>> >> > =A0 =A0 const __be32 *prop;
>> >> > =A0 =A0 int rc;
>> >> > =A0 =A0 int len;
>> >> > + =A0 struct flash_platform_data *pdata;
>> >> >
>> >> > =A0 =A0 for_each_child_of_node(np, nc) {
>> >> > =A0 =A0 =A0 =A0 =A0 =A0 /* Alloc an spi_device */ @@ -81,6 +84,14 @=
@ void
>> >> > of_register_spi_devices(struct
>> >> spi_master *master, struct device_node *np)
>> >> > =A0 =A0 =A0 =A0 =A0 =A0 of_node_get(nc);
>> >> > =A0 =A0 =A0 =A0 =A0 =A0 spi->dev.of_node =3D nc;
>> >> >
>> >> > + =A0 =A0 =A0 =A0 =A0 /* Parse the mtd partitions */
>> >> > + =A0 =A0 =A0 =A0 =A0 pdata =3D kzalloc(sizeof(*pdata), GFP_KERNEL)=
;
>> >> > + =A0 =A0 =A0 =A0 =A0 if (!pdata)
>> >> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 return;
>> >> > + =A0 =A0 =A0 =A0 =A0 pdata->nr_parts =3D
>> of_mtd_parse_partitions(&master->dev,
>> >> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 nc, &pdata->p=
arts);
>> >> > + =A0 =A0 =A0 =A0 =A0 spi->dev.platform_data =3D pdata;
>> >> > +
>> >>
>> >> Nack. =A0Not all spi devices are mtd devices. =A0In fact, most are no=
t.
>> >>
>> >> The spi driver itself should call the
>> of_mtd_parse_partitions code to
>> >> get the partition map. =A0Do not use pdata in this case.
>> >>
>> >
>> > Yes, we can call of_mtd_parse_partitions to get the
>> partiton map, but
>> > how can we pass this map to spi device to register to MTD layer?
>> >
>> > The spi device is created and registered when call
>> > of_register_spi_device in the spi controller probe
>> function, then the
>> > spi device will traverse the spi device driver list to find
>> the proper
>> > driver, if matched, then call the spi device driver probe
>> code where
>> > the mtd partition info is registered to the mtd layer.
>> >
>> > so where is the proper place to put the
>> of_mtd_parse_partitions code?
>>
>> In the device driver probe code.
>>
>
> This is the way that I did at first, thus we need to add the same code
> in all the spi flash driver to get partition map info.
>
> or we add the get partition map code to of_spi.c?
No, it really does not belong in of_spi.c because the spi code has no
knowledge about MTD devices.
I only see two valid options, to either:
a) add it to each MTD driver, or
b) add a hook to the core MTD code so that if an of_node pointer is
provided, and no partition data is provided, then it will parse the
partitions when the MTD device is registered. You'd also need to code
it in a way that becomes a no-op when CONFIG_OF is not set.
>
> +/*
> + * of_parse_flash_partition - Parse the flash partition on the SPI bus
> + * @spi: =A0 =A0 =A0 Pointer to spi_device device
> + */
> +void of_parse_flash_partition(struct spi_device *spi)
> +{
> + =A0 =A0 =A0 struct mtd_partition *parts;
> + =A0 =A0 =A0 struct flash_platform_data *spi_pdata;
> + =A0 =A0 =A0 int nr_parts =3D 0;
> + =A0 =A0 =A0 static int num_flash;
> + =A0 =A0 =A0 struct device_node *np =3D spi->dev.archdata.of_node;
> +
> + =A0 =A0 =A0 nr_parts =3D of_mtd_parse_partitions(&spi->dev, np, &parts)=
;
> + =A0 =A0 =A0 if (!nr_parts)
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 goto end;
> +
> + =A0 =A0 =A0 spi_pdata =3D kzalloc(sizeof(*spi_pdata), GFP_KERNEL);
> + =A0 =A0 =A0 if (!spi_pdata)
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 goto end;
> + =A0 =A0 =A0 spi_pdata->name =3D kzalloc(10, GFP_KERNEL);
> + =A0 =A0 =A0 if (!spi_pdata->name)
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 goto free_flash;
> + =A0 =A0 =A0 snprintf(spi_pdata->name, 10, "SPIFLASH%d", num_flash++);
> +
> + =A0 =A0 =A0 spi_pdata->parts =3D parts;
> + =A0 =A0 =A0 spi_pdata->nr_parts =3D nr_parts;
> +
> + =A0 =A0 =A0 spi->dev.platform_data =3D spi_pdata;
> +
> + =A0 =A0 =A0 return;
> +
> +free_flash:
> + =A0 =A0 =A0 kfree(spi_pdata);
> +end:
> + =A0 =A0 =A0 return;
> +}
>
>
>> >> > diff --git a/drivers/spi/spi_mpc8xxx.c
>> b/drivers/spi/spi_mpc8xxx.c
>> >> > index efed70e..0fadaeb 100644
>> >> > --- a/drivers/spi/spi_mpc8xxx.c
>> >> > +++ b/drivers/spi/spi_mpc8xxx.c
>> >> > @@ -137,6 +137,7 @@ int mpc8xxx_spi_transfer(struct spi_device
>> >> > *spi,
>> >> >
>> >> > =A0void mpc8xxx_spi_cleanup(struct spi_device *spi) =A0{
>> >> > + =A0 kfree(spi->dev.platform_data);
>> >>
>> >> Irrelevant given the above comment, but how does this even work?
>> >> What if a driver was detached and reattached to an
>> spi_device? =A0The
>> >> platform_data would be freed. =A0Not to mention that the
>> pointer isn't
>> >> cleared, so the driver would have no idea that it has a freed
>> >> pointer.
>> >>
>> >
>> > It works. If the driver detached, the spi device
>> platform_data will be
>> > released, when reattached, the of_register_spi_devices will
>> be called
>> > again, the platform_data will be allocated.
>>
>> Ah right, I wasn't looking in the right place. =A0On that note
>> however, the cleanup of spi_device allocated by the OF code
>> should also have a reciprocal helper that frees them too. =A0It
>> shouldn't be done in the individual drivers.
>>
>
> We can define a helper to free the platform_data, but where it should be =
called?
> Maybe spidev_release is a better place to call, after all the platfrom_da=
ta is allocated
> when the spi device is created, so it should be freed when released.
It would be called from the spi core code. However, with two options
I gave above, platform_data shouldn't be needed at all.
--=20
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply
* Re: [PATCH v3 2/2] powerpc/mpc5121: add initial support for PDM360NG board
From: Grant Likely @ 2010-07-27 17:43 UTC (permalink / raw)
To: Anatolij Gustschin
Cc: Detlev Zundel, Markus Fischer, devicetree-discuss, Michael Weiss,
linuxppc-dev, Wolfgang Grandegger
In-Reply-To: <20100727192856.63edc8e0@wker>
On Tue, Jul 27, 2010 at 11:28 AM, Anatolij Gustschin <agust@denx.de> wrote:
> On Tue, 27 Jul 2010 10:58:33 -0600
> Grant Likely <grant.likely@secretlab.ca> wrote:
> ...
>> >> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 spi@11900 {
>> >> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 compatible =3D "fsl,m=
pc5121-psc-spi", "fsl,mpc5121-psc";
>> >> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 cell-index =3D <9>;
>> >>
>> >> Try to drop the cell-index properties. =A0They are almost always misu=
sed.
>> >
>> > Removing cell-index would require changing the spi driver's probe.
>> > Currently cell-index is used to set spi bus number. What could be used
>> > for bus enumeration instead? Is it okay to use part of the spi node
>> > address? e.g. obtaining the offset 0x11900, masking out the unrelated
>> > bits and shifting by 8 would deliver unique index 9 for PSC9 in SPI
>> > mode. This would work for all 12 PSC SPI controllers of mpc5121.
>>
>> Does the spi bus number really matter? =A0The device tree context gives
>> you a firm association between spi masters and devices which doesn't
>> require assigning a specific bus number. =A0The core spi code can
>> dynamically assign a bus number for the bus by setting bus_num to -1.
>
> The bus number is used in the mpc5121 psc spi driver to obtain correct
> clock for PSC in question (0 to 11) and to enable the PSC clock at probe
> time. Therefore using dynamically assigned bus number would require anoth=
er
> change to the spi driver.
That's unrelated to the bus number. Use cell-index value directly for
obtaining the clock if you need to; but limit its exposure. Once
Jeremy gets his common clock architecture merged, then we could
probably migrate to that for obtaining the correct clock without
cell-index.
g.
^ permalink raw reply
* Re: [PATCH v3 2/2] powerpc/mpc5121: add initial support for PDM360NG board
From: Anatolij Gustschin @ 2010-07-27 17:28 UTC (permalink / raw)
To: Grant Likely
Cc: Detlev Zundel, Markus Fischer, devicetree-discuss, Michael Weiss,
linuxppc-dev, Wolfgang Grandegger
In-Reply-To: <AANLkTika=KeKcaY_FF8tN5Fy-H+cozjZsGObXoQhKiVh@mail.gmail.com>
On Tue, 27 Jul 2010 10:58:33 -0600
Grant Likely <grant.likely@secretlab.ca> wrote:
...
> >> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 spi@11900 {
> >> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 compatible =3D "fsl,mp=
c5121-psc-spi", "fsl,mpc5121-psc";
> >> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 cell-index =3D <9>;
> >>
> >> Try to drop the cell-index properties. =A0They are almost always misus=
ed.
> >
> > Removing cell-index would require changing the spi driver's probe.
> > Currently cell-index is used to set spi bus number. What could be used
> > for bus enumeration instead? Is it okay to use part of the spi node
> > address? e.g. obtaining the offset 0x11900, masking out the unrelated
> > bits and shifting by 8 would deliver unique index 9 for PSC9 in SPI
> > mode. This would work for all 12 PSC SPI controllers of mpc5121.
>=20
> Does the spi bus number really matter? The device tree context gives
> you a firm association between spi masters and devices which doesn't
> require assigning a specific bus number. The core spi code can
> dynamically assign a bus number for the bus by setting bus_num to -1.
The bus number is used in the mpc5121 psc spi driver to obtain correct
clock for PSC in question (0 to 11) and to enable the PSC clock at probe
time. Therefore using dynamically assigned bus number would require another
change to the spi driver.
...
> > This requires fixing the mpc5121 psc spi driver to create spi child
> > nodes of the spi master node. I have already send the appropriate
> > patch to spi-devel list, but it is not the right approach to call
> > of_register_spi_devices() in each driver.
>=20
> It's not wrong; but it isn't ideal either.
>=20
> > Do you plan to fix it in
> > core spi code in v2.6.36?
>=20
> Apparently I no longer have to because you've gone ahead and done it
> for me anyway. :-) I'll take a look at that patch and send you my
> comments.
Okay, thanks,
Anatolij
^ permalink raw reply
* Re: [PATCH v3 2/2] powerpc/mpc5121: add initial support for PDM360NG board
From: Grant Likely @ 2010-07-27 16:58 UTC (permalink / raw)
To: Anatolij Gustschin
Cc: Detlev Zundel, Markus Fischer, devicetree-discuss, Michael Weiss,
linuxppc-dev, Wolfgang Grandegger
In-Reply-To: <20100727123647.0a3b8832@wker>
On Tue, Jul 27, 2010 at 4:36 AM, Anatolij Gustschin <agust@denx.de> wrote:
> Hi Grant,
>
> On Sun, 25 Jul 2010 01:42:23 -0600
> Grant Likely <grant.likely@secretlab.ca> wrote:
> ...
>> Hi Anatolij,
>>
>> Finally got some time tonight to properly dig into this patch. =A0Commen=
ts below.
>
> Thanks for review and comments! My reply below.
Thanks Anatolij, replies below.
>> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 spi@11900 {
>> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 compatible =3D "fsl,mpc5=
121-psc-spi", "fsl,mpc5121-psc";
>> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 cell-index =3D <9>;
>>
>> Try to drop the cell-index properties. =A0They are almost always misused=
.
>
> Removing cell-index would require changing the spi driver's probe.
> Currently cell-index is used to set spi bus number. What could be used
> for bus enumeration instead? Is it okay to use part of the spi node
> address? e.g. obtaining the offset 0x11900, masking out the unrelated
> bits and shifting by 8 would deliver unique index 9 for PSC9 in SPI
> mode. This would work for all 12 PSC SPI controllers of mpc5121.
Does the spi bus number really matter? The device tree context gives
you a firm association between spi masters and devices which doesn't
require assigning a specific bus number. The core spi code can
dynamically assign a bus number for the bus by setting bus_num to -1.
>> > +
>> > + =A0 =A0 =A0 if (bus_num < 0 || bus_num > 11)
>> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 return -ENODEV;
>> > +
>> > + =A0 =A0 =A0 info.bus_num =3D bus_num;
>> > +
>> > + =A0 =A0 =A0 of_dev =3D of_find_device_by_node(np);
>> > + =A0 =A0 =A0 of_node_put(np);
>> > + =A0 =A0 =A0 if (of_dev) {
>> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 struct fsl_spi_platform_data *pdata;
>> > +
>> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 pdata =3D kzalloc(sizeof(*pdata), GFP_KE=
RNEL);
>> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (pdata) {
>> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 pdata->bus_num =3D bus_n=
um;
>> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 pdata->max_chipselect =
=3D 1;
>> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 of_dev->dev.platform_dat=
a =3D pdata;
>> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 }
>> > + =A0 =A0 =A0 }
>> > +
>> > + =A0 =A0 =A0 if (pdm360ng_penirq_init())
>> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 return -ENODEV;
>> > +
>> > + =A0 =A0 =A0 return spi_register_board_info(&info, 1);
>>
>> This ends up being a lot of code simply to attach a pdata structure to
>> an spi device. =A0I've been thinking about this problem, and I think
>> there is a better way. =A0Instead, use a bus notifier attached to the
>> SPI bus to wait for the spi_device to get registered, but before it
>> gets bound to a driver. =A0Then you can attach the pdata structure very
>> simply. =A0Something like this I think (completely untested, or even
>> compiled. =A0Details are left as an exercise to the developer):
>>
>> static int pdm360ng_touchscreen_notifier_call(struct notifier_block *nb,
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 unsigned long event, void *__dev)
>> {
>> =A0 =A0 =A0 struct device *dev =3D __dev;
>>
>> =A0 =A0 =A0 if ((event =3D=3D BUS_NOTIFIY_ADD_DEVICE) && (dev->of_node =
=3D=3D [FOO]))
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 dev->platform_data =3D [BAR];
>> }
>>
>> static struct notifier_block pdm360ng_touchscreen_nb =3D {
>> =A0 =A0 =A0 notifier_call =3D pdm360ng_touchscreen_notifier_call;
>> };
>>
>> static int __init pdm360ng_touchscreen_init(void)
>> {
>> =A0 =A0 =A0 bus_register_notifier(&spi_bus_type, pdm360ng_touchscreen_nb=
);
>> }
>
> Thanks! Bus notifier is now used for setting platform data in v4.
Cool!
> This requires fixing the mpc5121 psc spi driver to create spi child
> nodes of the spi master node. I have already send the appropriate
> patch to spi-devel list, but it is not the right approach to call
> of_register_spi_devices() in each driver.
It's not wrong; but it isn't ideal either.
> Do you plan to fix it in
> core spi code in v2.6.36?
Apparently I no longer have to because you've gone ahead and done it
for me anyway. :-) I'll take a look at that patch and send you my
comments.
Cheers,
g.
^ permalink raw reply
* Re: [PATCH v3] of: Create asm-generic/of.h and provide default of_node_to_nid()
From: Sam Ravnborg @ 2010-07-27 16:52 UTC (permalink / raw)
To: Arnd Bergmann
Cc: sfr, microblaze-uclinux, devicetree-discuss, linux-kernel,
linuxppc-dev, sparclinux, davem
In-Reply-To: <201007271534.01250.arnd@arndb.de>
On Tue, Jul 27, 2010 at 03:34:01PM +0200, Arnd Bergmann wrote:
> On Tuesday 27 July 2010, Grant Likely wrote:
> > > I suggest to go back to v2 of your patch where you use asm-generic/of.h.
> >
> > Stephen suggested dropping asm-generic/of.h. I'm happy to do it either way.
>
> I don't mind adding stuff to asm-generic, but I think in this case it would
> be easier to keep this in linux/of.h because there is nothing wrong with
> all architectures including it.
>
> Most files in asm-generic are there only for historical reasons, where some
> architectures use them but others don't. IMHO we should use the include/linux
> headers preferred for new stuff though.
Hi Arnd.
Thanks for this explanation. Obviously my previous post
about asm-generic was wrong (as Grant already indicated).
Sam
^ permalink raw reply
* Re: Please pull my perf.git urgent branch
From: Scott Wood @ 2010-07-27 16:28 UTC (permalink / raw)
To: Paul Mackerras
Cc: Peter Zijlstra, Kumar Gala, linux-kernel, linuxppc-dev,
Ingo Molnar, Linus Torvalds
In-Reply-To: <20100727124019.GB14947@brick.ozlabs.ibm.com>
On Tue, 27 Jul 2010 22:40:19 +1000
Paul Mackerras <paulus@samba.org> wrote:
> Please do a pull from
>
> git://git.kernel.org/pub/scm/linux/kernel/git/paulus/perf.git urgent
>
> to get one commit that fixes a problem where, on some Freescale
> embedded PowerPC machines, unprivileged userspace could oops the
> kernel using the perf_event subsystem. I know it's late, but it is a
> potential security hole (but only on Freescale embedded systems), the
> fix is small (3 lines) and only affects Freescale embedded processors,
> and I was on vacation for the past two weeks. :)
[snip]
> diff --git a/arch/powerpc/kernel/perf_event_fsl_emb.c b/arch/powerpc/kernel/perf_event_fsl_emb.c
> index 369872f..babccee 100644
> --- a/arch/powerpc/kernel/perf_event_fsl_emb.c
> +++ b/arch/powerpc/kernel/perf_event_fsl_emb.c
> @@ -566,9 +566,9 @@ static void record_and_restart(struct perf_event *event, unsigned long val,
> * Finally record data if requested.
> */
> if (record) {
> - struct perf_sample_data data = {
> - .period = event->hw.last_period,
> - };
> + struct perf_sample_data data;
> +
> + perf_sample_data_init(&data, 0);
>
> if (perf_event_overflow(event, nmi, &data, regs)) {
> /*
Doesn't the setting of .period need to be maintained (it is in the other
powerpc perf_event implementation that this is derived from)?
I don't see how this is a security fix -- the existing initializer above
should zero-fill the fields that are not explicitly initialized. In fact,
it's taking other fields that were previously initialized to zero and is
making them uninitialized, since perf_sample_data_init only sets addr and
raw.
CCing linuxppc-dev on the original patch would have been nice...
-Scott
^ permalink raw reply
* Re: [PATCH v3] of: Create asm-generic/of.h and provide default of_node_to_nid()
From: Arnd Bergmann @ 2010-07-27 13:34 UTC (permalink / raw)
To: devicetree-discuss
Cc: sfr, microblaze-uclinux, linux-kernel, linuxppc-dev, sparclinux,
Sam Ravnborg, davem
In-Reply-To: <AANLkTikcV3jJUm_My-oK-drudSDz3M2iH1cWhxdt+W1s@mail.gmail.com>
On Tuesday 27 July 2010, Grant Likely wrote:
> > I suggest to go back to v2 of your patch where you use asm-generic/of.h.
>
> Stephen suggested dropping asm-generic/of.h. I'm happy to do it either way.
I don't mind adding stuff to asm-generic, but I think in this case it would
be easier to keep this in linux/of.h because there is nothing wrong with
all architectures including it.
Most files in asm-generic are there only for historical reasons, where some
architectures use them but others don't. IMHO we should use the include/linux
headers preferred for new stuff though.
Arnd
^ permalink raw reply
* Please pull my perf.git urgent branch
From: Paul Mackerras @ 2010-07-27 12:40 UTC (permalink / raw)
To: Linus Torvalds
Cc: Peter Zijlstra, Kumar Gala, linux-kernel, linuxppc-dev,
Ingo Molnar
Linus,
Please do a pull from
git://git.kernel.org/pub/scm/linux/kernel/git/paulus/perf.git urgent
to get one commit that fixes a problem where, on some Freescale
embedded PowerPC machines, unprivileged userspace could oops the
kernel using the perf_event subsystem. I know it's late, but it is a
potential security hole (but only on Freescale embedded systems), the
fix is small (3 lines) and only affects Freescale embedded processors,
and I was on vacation for the past two weeks. :)
Thanks,
Paul.
Peter Zijlstra (1):
perf, powerpc: Use perf_sample_data_init() for the FSL code
arch/powerpc/kernel/perf_event_fsl_emb.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
commit 6b95ed345b9faa4ab3598a82991968f2e9f851bb
Author: Peter Zijlstra <a.p.zijlstra@chello.nl>
Date: Fri Jul 9 10:21:21 2010 +0200
perf, powerpc: Use perf_sample_data_init() for the FSL code
We should use perf_sample_data_init() to initialize struct
perf_sample_data. As explained in the description of commit dc1d628a
("perf: Provide generic perf_sample_data initialization"), it is
possible for userspace to get the kernel to dereference data.raw,
so if it is not initialized, that means that unprivileged userspace
can possibly oops the kernel. Using perf_sample_data_init makes sure
it gets initialized to NULL.
This conversion should have been included in commit dc1d628a, but it
got missed.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
diff --git a/arch/powerpc/kernel/perf_event_fsl_emb.c b/arch/powerpc/kernel/perf_event_fsl_emb.c
index 369872f..babccee 100644
--- a/arch/powerpc/kernel/perf_event_fsl_emb.c
+++ b/arch/powerpc/kernel/perf_event_fsl_emb.c
@@ -566,9 +566,9 @@ static void record_and_restart(struct perf_event *event, unsigned long val,
* Finally record data if requested.
*/
if (record) {
- struct perf_sample_data data = {
- .period = event->hw.last_period,
- };
+ struct perf_sample_data data;
+
+ perf_sample_data_init(&data, 0);
if (perf_event_overflow(event, nmi, &data, regs)) {
/*
^ permalink raw reply related
* Re: [PATCH v3 2/2] powerpc/mpc5121: add initial support for PDM360NG board
From: Anatolij Gustschin @ 2010-07-27 10:36 UTC (permalink / raw)
To: Grant Likely
Cc: Detlev Zundel, Markus Fischer, devicetree-discuss, Michael Weiss,
linuxppc-dev, Wolfgang Grandegger
In-Reply-To: <AANLkTi=Ee6HR+Ux0g4V1+81DXUmsO=UDhi6jWsDgGchv@mail.gmail.com>
Hi Grant,
On Sun, 25 Jul 2010 01:42:23 -0600
Grant Likely <grant.likely@secretlab.ca> wrote:
...
> Hi Anatolij,
>=20
> Finally got some time tonight to properly dig into this patch. Comments =
below.
Thanks for review and comments! My reply below.
...
> > + =A0 =A0 =A0 nfc@40000000 {
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 compatible =3D "fsl,mpc5121-nfc";
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 reg =3D <0x40000000 0x100000>;
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 interrupts =3D <0x6 0x8>;
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 interrupt-parent =3D <&ipic>;
>=20
> This device tree can be less verbose if you remove the
> interrupt-parent property from all the nodes, and have a single
> interrupt-parent =3D <&ipic>; in the root node. Nodes inherit the
> interrupt-parent from their (grand-)parents.
Fixed in next patch version to use interrupt-parent in root node only.
...
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 mdio@2800 {
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 compatible =3D "fsl,mpc51=
21-fec-mdio";
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 reg =3D <0x2800 0x200>;
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 #address-cells =3D <1>;
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 #size-cells =3D <0>;
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 phy: ethernet-phy@0 {
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 reg =3D <=
0x1f>;
>=20
> For completeness, phy should have a compatible property.
Added in next patch version.
...
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 spi@11900 {
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 compatible =3D "fsl,mpc51=
21-psc-spi", "fsl,mpc5121-psc";
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 cell-index =3D <9>;
>=20
> Try to drop the cell-index properties. They are almost always misused.
Removing cell-index would require changing the spi driver's probe.
Currently cell-index is used to set spi bus number. What could be used
for bus enumeration instead? Is it okay to use part of the spi node
address? e.g. obtaining the offset 0x11900, masking out the unrelated
bits and shifting by 8 would deliver unique index 9 for PSC9 in SPI
mode. This would work for all 12 PSC SPI controllers of mpc5121.
...
> > +static int pdm360ng_get_pendown_state(void)
> > +{
> > + =A0 =A0 =A0 u32 reg;
> > +
> > + =A0 =A0 =A0 reg =3D in_be32((u32 *)(pdm360ng_gpio_base + 0xc));
> > + =A0 =A0 =A0 if (reg & 0x40)
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 setbits32((u32 *)(pdm360ng_gpio_base + 0x=
c), 0x40);
> > +
> > + =A0 =A0 =A0 reg =3D in_be32((u32 *)(pdm360ng_gpio_base + 0x8));
>=20
> (u32*) casts are unnecessary and can be removed.
Fixed.
> > +
> > + =A0 =A0 =A0 /* return 1 if pen is down */
> > + =A0 =A0 =A0 return reg & 0x40 ? 0 : 1;
>=20
> return reg & 0x40 =3D=3D 0;
Fixed.
...
> > +static int __init pdm360ng_penirq_init(void)
> > +{
> > + =A0 =A0 =A0 struct device_node *np;
> > + =A0 =A0 =A0 struct resource r;
> > +
> > + =A0 =A0 =A0 np =3D of_find_compatible_node(NULL, NULL, "fsl,mpc5121-g=
pio");
> > + =A0 =A0 =A0 if (!np) {
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 pr_err("%s: Can't find 'mpc5121-gpio' nod=
e\n", __func__);
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 return -1;
> > + =A0 =A0 =A0 }
>=20
> return -ENODEV;
Ok, fixed also.
...
> > + =A0 =A0 =A0 pdm360ng_gpio_base =3D ioremap(r.start, resource_size(&r)=
);
>=20
> Or you could have simply used of_iomap() to eliminate some code.
of_iomap() is used in next patch version.
...
> > +static int __init pdm360ng_touchscreen_init(void)
> > +{
> > + =A0 =A0 =A0 struct device_node *np;
> > + =A0 =A0 =A0 struct of_device *of_dev;
> > + =A0 =A0 =A0 struct spi_board_info info;
> > + =A0 =A0 =A0 const u32 *prop;
> > + =A0 =A0 =A0 int bus_num =3D -1;
> > + =A0 =A0 =A0 int len;
> > +
> > + =A0 =A0 =A0 np =3D of_find_compatible_node(NULL, NULL, "ti,ads7845");
> > + =A0 =A0 =A0 if (!np)
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 return -ENODEV;
> > +
> > + =A0 =A0 =A0 memset(&info, 0, sizeof(info));
> > + =A0 =A0 =A0 info.irq =3D irq_of_parse_and_map(np, 0);
> > + =A0 =A0 =A0 if (info.irq =3D=3D NO_IRQ)
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 return -ENODEV;
> > +
> > + =A0 =A0 =A0 info.platform_data =3D &pdm360ng_ads7846_pdata;
> > + =A0 =A0 =A0 if (strlcpy(info.modalias, "ads7846",
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 SPI_NAME_SIZE) >=3D SPI_NAME_SIZE)
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 return -ENOMEM;
> > +
> > + =A0 =A0 =A0 np =3D of_get_next_parent(np);
> > + =A0 =A0 =A0 if (!np)
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 return -ENODEV;
> > +
> > + =A0 =A0 =A0 prop =3D of_get_property(np, "cell-index", &len);
> > + =A0 =A0 =A0 if (prop && len =3D=3D 4)
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 bus_num =3D *prop;
>=20
> Blech. Don't use cell-index for bus enumeration. In fact, none of
> this should be necessary at all (see below).
I dropped this code entirely in the next patch version.
> > +
> > + =A0 =A0 =A0 if (bus_num < 0 || bus_num > 11)
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 return -ENODEV;
> > +
> > + =A0 =A0 =A0 info.bus_num =3D bus_num;
> > +
> > + =A0 =A0 =A0 of_dev =3D of_find_device_by_node(np);
> > + =A0 =A0 =A0 of_node_put(np);
> > + =A0 =A0 =A0 if (of_dev) {
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 struct fsl_spi_platform_data *pdata;
> > +
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 pdata =3D kzalloc(sizeof(*pdata), GFP_KER=
NEL);
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (pdata) {
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 pdata->bus_num =3D bus_nu=
m;
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 pdata->max_chipselect =3D=
1;
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 of_dev->dev.platform_data=
=3D pdata;
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 }
> > + =A0 =A0 =A0 }
> > +
> > + =A0 =A0 =A0 if (pdm360ng_penirq_init())
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 return -ENODEV;
> > +
> > + =A0 =A0 =A0 return spi_register_board_info(&info, 1);
>=20
> This ends up being a lot of code simply to attach a pdata structure to
> an spi device. I've been thinking about this problem, and I think
> there is a better way. Instead, use a bus notifier attached to the
> SPI bus to wait for the spi_device to get registered, but before it
> gets bound to a driver. Then you can attach the pdata structure very
> simply. Something like this I think (completely untested, or even
> compiled. Details are left as an exercise to the developer):
>=20
> static int pdm360ng_touchscreen_notifier_call(struct notifier_block *nb,
> unsigned long event, void *__dev)
> {
> struct device *dev =3D __dev;
>=20
> if ((event =3D=3D BUS_NOTIFIY_ADD_DEVICE) && (dev->of_node =3D=3D [FOO]))
> dev->platform_data =3D [BAR];
> }
>=20
> static struct notifier_block pdm360ng_touchscreen_nb =3D {
> notifier_call =3D pdm360ng_touchscreen_notifier_call;
> };
>=20
> static int __init pdm360ng_touchscreen_init(void)
> {
> bus_register_notifier(&spi_bus_type, pdm360ng_touchscreen_nb);
> }
Thanks! Bus notifier is now used for setting platform data in v4.
This requires fixing the mpc5121 psc spi driver to create spi child
nodes of the spi master node. I have already send the appropriate
patch to spi-devel list, but it is not the right approach to call
of_register_spi_devices() in each driver. Do you plan to fix it in
core spi code in v2.6.36?
...
> > +}
> > +machine_device_initcall(pdm360ng, pdm360ng_touchscreen_init);
>=20
> This code is *in the same file* as the board setup file. Don't use an
> initcall. Call it from the init callback instead.
OK, initcall dropped.
Thanks,
Anatolij
^ permalink raw reply
* Re: [Patch v2] kexec: increase max of kexec segments and use dynamic allocation
From: Milton Miller @ 2010-07-27 10:00 UTC (permalink / raw)
To: WANG Cong
Cc: Neil Horman, Neil Horman, huang ying, linux-kernel, kexec,
Eric W. Biederman, linuxppc-dev
In-Reply-To: <20100727082321.5813.84456.sendpatchset@localhost.localdomain>
[ Added kexec at lists.infradead.org and linuxppc-dev@lists.ozlabs.org ]
>
> Currently KEXEC_SEGMENT_MAX is only 16 which is too small for machine with
> many memory ranges. When hibernate on a machine with disjoint memory we do
> need one segment for each memory region. Increase this hard limit to 16K
> which is reasonably large.
>
> And change ->segment from a static array to a dynamically allocated memory.
>
> Cc: Neil Horman <nhorman@redhat.com>
> Cc: huang ying <huang.ying.caritas@gmail.com>
> Cc: Eric W. Biederman <ebiederm@xmission.com>
> Signed-off-by: WANG Cong <amwang@redhat.com>
>
> ---
> diff --git a/arch/powerpc/kernel/machine_kexec_64.c b/arch/powerpc/kernel/machine_kexec_64.c
> index ed31a29..f115585 100644
> --- a/arch/powerpc/kernel/machine_kexec_64.c
> +++ b/arch/powerpc/kernel/machine_kexec_64.c
> @@ -131,10 +131,7 @@ static void copy_segments(unsigned long ind)
> void kexec_copy_flush(struct kimage *image)
> {
> long i, nr_segments = image->nr_segments;
> - struct kexec_segment ranges[KEXEC_SEGMENT_MAX];
> -
> - /* save the ranges on the stack to efficiently flush the icache */
> - memcpy(ranges, image->segment, sizeof(ranges));
> + struct kexec_segment range;
I'm glad you found our copy on the stack and removed the stack overflow
that comes with this bump, but ...
>
> /*
> * After this call we may not use anything allocated in dynamic
> @@ -148,9 +145,11 @@ void kexec_copy_flush(struct kimage *image)
> * we need to clear the icache for all dest pages sometime,
> * including ones that were in place on the original copy
> */
> - for (i = 0; i < nr_segments; i++)
> - flush_icache_range((unsigned long)__va(ranges[i].mem),
> - (unsigned long)__va(ranges[i].mem + ranges[i].memsz));
> + for (i = 0; i < nr_segments; i++) {
> + memcpy(&range, &image->segment[i], sizeof(range));
> + flush_icache_range((unsigned long)__va(range.mem),
> + (unsigned long)__va(range.mem + range.memsz));
> + }
> }
This is executed after the copy, so as it says,
"we may not use anything allocated in dynamic memory".
We could allocate control pages to copy the segment list into.
Actually ppc64 doesn't use the existing control page, but that
is only 4kB today.
We need the list to icache flush all the pages in all the segments.
The as the indirect list doesn't have pages that were allocated at
their destination.
Or maybe the icache flush should be done in the generic code
like it does for crash load segments?
>
> #ifdef CONFIG_SMP
> diff --git a/include/linux/kexec.h b/include/linux/kexec.h
> index 03e8e8d..26b70ff 100644
> --- a/include/linux/kexec.h
> +++ b/include/linux/kexec.h
> @@ -57,7 +57,7 @@ typedef unsigned long kimage_entry_t;
> #define IND_DONE 0x4
> #define IND_SOURCE 0x8
>
> -#define KEXEC_SEGMENT_MAX 16
> +#define KEXEC_SEGMENT_MAX (1024*16)
> struct kexec_segment {
> void __user *buf;
> size_t bufsz;
> @@ -86,7 +86,7 @@ struct kimage {
> struct page *swap_page;
>
> unsigned long nr_segments;
> - struct kexec_segment segment[KEXEC_SEGMENT_MAX];
> + struct kexec_segment *segment;
>
> struct list_head control_pages;
> struct list_head dest_pages;
> diff --git a/kernel/kexec.c b/kernel/kexec.c
> index 131b170..3f97309 100644
> --- a/kernel/kexec.c
> +++ b/kernel/kexec.c
> @@ -131,6 +131,11 @@ static int do_kimage_alloc(struct kimage **rimage, unsigned long entry,
> if (!image)
> goto out;
>
> + image->segment = kzalloc(nr_segments * sizeof(struct kexec_segment),
> + GFP_KERNEL);
> + if (!image->segment)
> + goto out;
> +
> image->head = 0;
> image->entry = &image->head;
> image->last_entry = &image->head;
> @@ -216,8 +221,10 @@ static int do_kimage_alloc(struct kimage **rimage, unsigned long entry,
> out:
> if (result == 0)
> *rimage = image;
> - else
> + else if (image) {
> + kfree(image->segment);
> kfree(image);
> + }
>
> return result;
>
> @@ -261,8 +268,10 @@ static int kimage_normal_alloc(struct kimage **rimage, unsigned long entry,
> out:
> if (result == 0)
> *rimage = image;
> - else
> + else if (image) {
> + kfree(image->segment);
> kfree(image);
> + }
>
> return result;
> }
> @@ -330,8 +339,10 @@ static int kimage_crash_alloc(struct kimage **rimage, unsigned long entry,
> out:
> if (result == 0)
> *rimage = image;
> - else
> + else if (image) {
> + kfree(image->segment);
> kfree(image);
> + }
>
> return result;
> }
> @@ -656,6 +667,7 @@ static void kimage_free(struct kimage *image)
>
> /* Free the kexec control pages... */
> kimage_free_page_list(&image->control_pages);
> + kfree(image->segment);
> kfree(image);
> }
>
milton
^ permalink raw reply
* Re: Where are logical memory block regions setup?
From: Benjamin Herrenschmidt @ 2010-07-27 9:28 UTC (permalink / raw)
To: Rick Ramstetter; +Cc: linuxppc-dev
In-Reply-To: <AANLkTi=mAZOuyC4GmSUnk8d5gHs3N0NC2dhUH0K3jwUM@mail.gmail.com>
On Mon, 2010-07-26 at 22:52 -0400, Rick Ramstetter wrote:
> Hi all,
>
> Where can I find the code that sets values in lmb.reserved.region[i]?
> This is in reference to 2.6.27's arch/powerpc/mm/mem.c and
> include/linux/lmb.h
>
> I'm looking specifically for code that sets lmb_region's region.size
> and region.base.
They come from the reserve map in the device-tree, plus possible
additional calls to lmb_reserve. Do a grep -r lmb_reserve arch/powerpc
and you should find it all.
Cheers,
Ben.
^ permalink raw reply
* Re: [PATCH] powerpc: Add vmcoreinfo symbols to allow makdumpfile to filter core files properly
From: Américo Wang @ 2010-07-27 9:13 UTC (permalink / raw)
To: Neil Horman; +Cc: linuxppc-dev, kexec, linux-kernel, paulus, vgoyal
In-Reply-To: <20100726152315.GA18789@hmsreliant.think-freely.org>
On Mon, Jul 26, 2010 at 11:23 PM, Neil Horman <nhorman@tuxdriver.com> wrote=
:
> On Tue, Jul 13, 2010 at 09:46:09AM -0400, Neil Horman wrote:
>> Hey all-
>> =C2=A0 =C2=A0 =C2=A0 About 2 years ago now, I sent this patch upstream t=
o allow makedumpfile
>> to properly filter cores on ppc64:
>> http://www.mail-archive.com/kexec@lists.infradead.org/msg02426.html
>> It got acks from the kexec folks so I pulled it into RHEL, but I never c=
hecked
>> back here to make sure it ever made it in, which apparently it didn't. =
=C2=A0It still
>> needs to be included, so I'm reposting it here, making sure to copy all =
the ppc
>> folks this time. =C2=A0I've retested it on the latest linus kernel and i=
t works fine,
>> allowing makedumpfile to find all the symbols it needs to properly strip=
a
>> vmcore on ppc64.
>>
>> Neil
>>
>> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
>>
> Ping, anyone want to chime in on this, its needed for dump filtering to w=
ork
> properly on ppc64
This patch looks good for me.
Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
Thanks!
^ permalink raw reply
* [PATCH] powerpc/kexec: Fix orphaned offline CPUs across kexec
From: Matt Evans @ 2010-07-27 7:54 UTC (permalink / raw)
To: linuxppc-dev
When CPU hotplug is used, some CPUs may be offline at the time a kexec is
performed. The subsequent kernel may expect these CPUs to be already running,
and will declare them stuck. On pseries, there's also a soft-offline (cede)
state that CPUs may be in; this can also cause problems as the kexeced kernel
may ask RTAS if they're online -- and RTAS would say they are. Again, stuck.
This patch kicks each present offline CPU awake before the kexec, so that
none are lost to these assumptions in the subsequent kernel.
Signed-off-by: Matt Evans <matt@ozlabs.org>
---
arch/powerpc/kernel/machine_kexec_64.c | 42 +++++++++++++++++++++++++++----
1 files changed, 36 insertions(+), 6 deletions(-)
diff --git a/arch/powerpc/kernel/machine_kexec_64.c b/arch/powerpc/kernel/machine_kexec_64.c
index 4fbb3be..c2fd914 100644
--- a/arch/powerpc/kernel/machine_kexec_64.c
+++ b/arch/powerpc/kernel/machine_kexec_64.c
@@ -15,6 +15,8 @@
#include <linux/thread_info.h>
#include <linux/init_task.h>
#include <linux/errno.h>
+#include <linux/kernel.h>
+#include <linux/cpu.h>
#include <asm/page.h>
#include <asm/current.h>
@@ -181,7 +183,7 @@ static void kexec_prepare_cpus_wait(int wait_state)
int my_cpu, i, notified=-1;
my_cpu = get_cpu();
- /* Make sure each CPU has atleast made it to the state we need */
+ /* Make sure each CPU has at least made it to the state we need. */
for_each_online_cpu(i) {
if (i == my_cpu)
continue;
@@ -189,9 +191,9 @@ static void kexec_prepare_cpus_wait(int wait_state)
while (paca[i].kexec_state < wait_state) {
barrier();
if (i != notified) {
- printk( "kexec: waiting for cpu %d (physical"
- " %d) to enter %i state\n",
- i, paca[i].hw_cpu_id, wait_state);
+ printk(KERN_INFO "kexec: waiting for cpu %d "
+ "(physical %d) to enter %i state\n",
+ i, paca[i].hw_cpu_id, wait_state);
notified = i;
}
}
@@ -199,9 +201,32 @@ static void kexec_prepare_cpus_wait(int wait_state)
mb();
}
-static void kexec_prepare_cpus(void)
+/*
+ * We need to make sure each present CPU is online. The next kernel will scan
+ * the device tree and assume primary threads are online and query secondary
+ * threads via RTAS to online them if required. If we don't online primary
+ * threads, they will be stuck. However, we also online secondary threads as we
+ * may be using 'cede offline'. In this case RTAS doesn't see the secondary
+ * threads as offline -- and again, these CPUs will be stuck.
+ *
+ * So, we online all CPUs that should be running, including secondary threads.
+ */
+static void wake_offline_cpus(void)
{
+ int cpu = 0;
+ for_each_present_cpu(cpu) {
+ if (!cpu_online(cpu)) {
+ printk(KERN_INFO "kexec: Waking offline cpu %d.\n",
+ cpu);
+ cpu_up(cpu);
+ }
+ }
+}
+
+static void kexec_prepare_cpus(void)
+{
+ wake_offline_cpus();
smp_call_function(kexec_smp_down, NULL, /* wait */0);
local_irq_disable();
mb(); /* make sure IRQs are disabled before we say they are */
@@ -215,7 +240,10 @@ static void kexec_prepare_cpus(void)
if (ppc_md.kexec_cpu_down)
ppc_md.kexec_cpu_down(0, 0);
- /* Before removing MMU mapings make sure all CPUs have entered real mode */
+ /*
+ * Before removing MMU mappings make sure all CPUs have entered real
+ * mode:
+ */
kexec_prepare_cpus_wait(KEXEC_STATE_REAL_MODE);
put_cpu();
@@ -284,6 +312,8 @@ void default_machine_kexec(struct kimage *image)
if (crashing_cpu == -1)
kexec_prepare_cpus();
+ pr_debug("kexec: Starting switchover sequence.\n");
+
/* switch to a staticly allocated stack. Based on irq stack code.
* XXX: the task struct will likely be invalid once we do the copy!
*/
--
1.6.3.3
^ permalink raw reply related
* Re: Memory Mapping a char array in User Space
From: Ravi Gupta @ 2010-07-27 7:04 UTC (permalink / raw)
To: David Howells; +Cc: linuxppc-dev
In-Reply-To: <918.1280173321@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 488 bytes --]
Hi David,
Thanks for the quick reply. One more thing, in the end I have to memory map
a DMA buffer allocated using pci_alloc_consisten() function to user space.
*> I think you should be leaving the mapping to the core VM routines.*
*> Furthermore, I don't think *you* should be calling remap_pfn_range().*
Let say I have allocated a page using __get_free_pages(). But how would the
core VM routines knows that which page I want to memory map? If possible,
please explain with example.
[-- Attachment #2: Type: text/html, Size: 573 bytes --]
^ permalink raw reply
* Re: [RFC][PATCH] kconfig: implement select with values
From: Sam Ravnborg @ 2010-07-27 6:45 UTC (permalink / raw)
To: Grant Likely
Cc: Michal Marek, Stephen Rothwell, Andi Kleen, Catalin Marinas,
linux-kbuild, Linus, Li Zefan, LKML, Steven Rostedt,
Josh Triplett, Vadim Bendebury, Nir Tzachar, Francis Galiegue,
Trevor Keith, Jiri Kosina, Andrew Morton, ppc-dev, Cheng Renquan
In-Reply-To: <AANLkTikP3nZd-LionO27vsinjXz=upKbDZeErSD4CAfz@mail.gmail.com>
>
> Cute. I didn't know this was possible. I'll give it a try and see
> how it works for me. Do override config options also pickup
> select/depends constraints applied by later definitions? I think that
> would be necessary to kick out warnings when a defconfig selection
> isn't actually achievable.
kconfig allows one to add more properties to a config
symbol by defining the symbol again.
So:
config FOO
bool
prompt "foo prompt"
default y
help
Help text
Is the same as:
config FOO
bool
config FOO
prompt "foo prompt"
config FOO
default y
config FOO
help
help text
The abvoe four lines can be located in different files.
And likewise kconfig allows the same property to be
specified twice or more.
So it is OK to say:
config BAR
tristate "bar prompt"
default m
default y
Here kconfig just picks the first default is see.
And the example in my original mail uses the feature
that we can specify several defaults - and kconfig uses the first.
For choices the same is possible but then you need to use
a named choice - something that no one does today in the kernel.
choice CHOICE_X86_CPU
default M386
endchoice
Here we change the default to M386 which becomes the
selected if we use "alldefconfig".
[Note: It does not work until we use named choices in arch/x86/Kconfig.cpu]
>
> > Now in the original suggestion of Linus he used:
> >
> > KBUILD_KCONFIG=Mykconfig make allnoconfig
> >
> > And "allnoconfig" would make the modified defaults useless.
> >
> > But the soon-to-be-introduced alldefconfig is more sensible.
> >
> > alldefconfig uses default values for everything.
>
> I basically used defconfig in the prototype that I posted. I think it
> works well for me, and I've got it integrated into the build targets
> (just like Stephen's earlier patch) without having to do a
> KBUILD_KCONFIG trick.
"defconfig" with an empty file gives same config as "alldefconfig" so
it makes sense. But we wanted to drop the use of defconfig files
in favour of files with Kconfig syntax.
So alldefconfig is just a better fit here.
[The above btw. also makes "savedefconfig" less usefull].
Sam
^ permalink raw reply
* Memory Mapping DMA Buffers in User Space
From: Ravi Gupta @ 2010-07-27 6:37 UTC (permalink / raw)
To: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 464 bytes --]
Hi,
I am new to linux device driver development and I'm trying to learn the
memory mapping. Currently I am trying to memory map a dma buffer allocated
using pci_alloc_consistent() function.
Now what exactly I want is that whenever I map a char device from user space
program, let say /dev/test, internally that DMA buffer gets memory mapped to
the user space? Also what should I pass as the length parameter in the
mmap() function?
Thanks in advance
Ravi Gupta
[-- Attachment #2: Type: text/html, Size: 505 bytes --]
^ permalink raw reply
* Re: [PATCH v3 0/7] Fixup booting with device trees and uImage/elf on ppc32
From: Matthew McClintock @ 2010-07-27 4:22 UTC (permalink / raw)
To: Simon Horman; +Cc: muvarov, linuxppc-dev, sebastian, kexec
In-Reply-To: <20100727025506.GA1944@verge.net.au>
On Jul 26, 2010, at 9:55 PM, Simon Horman wrote:
> [Cced linuxppc-dev]
>=20
> On Tue, Jul 20, 2010 at 11:42:57PM -0500, Matthew McClintock wrote:
>> This patch series adds full support for booting with a flat device =
tree
>> with either uImage or elf file formats. Kexec and Kdump should work, =
and
>> you should also be able to use ramdisks or reuse your current ramdisk =
as well
>>=20
>> This patch series was tested on an mpc85xx system with a kernel =
version
>> 2.6.35-rc3
>>=20
>> v1: Initial version
>>=20
>> v2: Added support for fs2dt (file system to device tree)
>>=20
>> v3: Fix some misc. git problems I had and other code cleanups
>=20
> Hi Matthew,
>=20
> I'm a little concerned that these changes are non trivial and haven't =
had
> much review. But I am prepared to put them into my tree once 2.0.2 is
> released - perhaps that way they will get some test coverage. Does
> that work for you?
Either way works for me. I know they could use more review, however as =
Maxim said the current tree does not work AFAIK. Either way, I'm willing =
to keeping addressing everyones concerns and wait or move forward and =
make some quick fixes as well.
-M
>=20
>>=20
>> Matthew McClintock (7):
>> Restore kexec uImage-ppc to working state
>> Fix case where phys_addr_t !=3D unsigned long when reading proc =
entries
>> Update uImage to support crash kernel and misc fixes
>> Update Elf-ppc to support crash kernel and misc fixes
>> Add support for ramdisk on ppc32 for uImage-ppc and Elf-ppc
>> Add support for reworking flat device tree support
>> Add documentation/howto for mpc85xx systems
>>=20
>> doc/mpc85xx.txt | 190 +++++++++++++++++++++
>> kexec/arch/ppc/Makefile | 1 +
>> kexec/arch/ppc/fixup_dtb.c | 298 =
++++++++++++++++++++++++++++++++-
>> kexec/arch/ppc/fixup_dtb.h | 6 +-
>> kexec/arch/ppc/include/arch/options.h | 3 +
>> kexec/arch/ppc/kexec-elf-ppc.c | 186 +++++++++------------
>> kexec/arch/ppc/kexec-ppc.c | 262 =
+++++++++++++++++------------
>> kexec/arch/ppc/kexec-ppc.h | 3 +
>> kexec/arch/ppc/kexec-uImage-ppc.c | 136 ++++++++++++---
>> kexec/arch/ppc/ops.h | 1 -
>> purgatory/arch/ppc/purgatory-ppc.c | 5 +
>> 11 files changed, 852 insertions(+), 239 deletions(-)
>> create mode 100644 doc/mpc85xx.txt
>>=20
>>=20
>>=20
>> _______________________________________________
>> kexec mailing list
>> kexec@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/kexec
>=20
^ permalink raw reply
* Re: [PATCH v3 0/7] Fixup booting with device trees and uImage/elf on ppc32
From: Maxim Uvarov @ 2010-07-27 3:59 UTC (permalink / raw)
To: Simon Horman; +Cc: Matthew McClintock, sebastian, kexec, linuxppc-dev
In-Reply-To: <20100727025506.GA1944@verge.net.au>
[-- Attachment #1: Type: text/plain, Size: 2500 bytes --]
2010/7/27 Simon Horman <horms@verge.net.au>
> [Cced linuxppc-dev]
>
> On Tue, Jul 20, 2010 at 11:42:57PM -0500, Matthew McClintock wrote:
> > This patch series adds full support for booting with a flat device tree
> > with either uImage or elf file formats. Kexec and Kdump should work, and
> > you should also be able to use ramdisks or reuse your current ramdisk as
> well
> >
> > This patch series was tested on an mpc85xx system with a kernel version
> > 2.6.35-rc3
> >
> > v1: Initial version
> >
> > v2: Added support for fs2dt (file system to device tree)
> >
> > v3: Fix some misc. git problems I had and other code cleanups
>
> Hi Matthew,
>
> I'm a little concerned that these changes are non trivial and haven't had
> much review. But I am prepared to put them into my tree once 2.0.2 is
> released - perhaps that way they will get some test coverage. Does
> that work for you?
>
> Actually Matthew did that did not work before. Like kdump for booke. But
because kernel patches are not already in it's not urgent to commit it right
now.
> >
> > Matthew McClintock (7):
> > Restore kexec uImage-ppc to working state
> > Fix case where phys_addr_t != unsigned long when reading proc entries
> > Update uImage to support crash kernel and misc fixes
> > Update Elf-ppc to support crash kernel and misc fixes
> > Add support for ramdisk on ppc32 for uImage-ppc and Elf-ppc
> > Add support for reworking flat device tree support
> > Add documentation/howto for mpc85xx systems
> >
> > doc/mpc85xx.txt | 190 +++++++++++++++++++++
> > kexec/arch/ppc/Makefile | 1 +
> > kexec/arch/ppc/fixup_dtb.c | 298
> ++++++++++++++++++++++++++++++++-
> > kexec/arch/ppc/fixup_dtb.h | 6 +-
> > kexec/arch/ppc/include/arch/options.h | 3 +
> > kexec/arch/ppc/kexec-elf-ppc.c | 186 +++++++++------------
> > kexec/arch/ppc/kexec-ppc.c | 262
> +++++++++++++++++------------
> > kexec/arch/ppc/kexec-ppc.h | 3 +
> > kexec/arch/ppc/kexec-uImage-ppc.c | 136 ++++++++++++---
> > kexec/arch/ppc/ops.h | 1 -
> > purgatory/arch/ppc/purgatory-ppc.c | 5 +
> > 11 files changed, 852 insertions(+), 239 deletions(-)
> > create mode 100644 doc/mpc85xx.txt
> >
> >
> >
> > _______________________________________________
> > kexec mailing list
> > kexec@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/kexec
>
--
Best regards,
Maxim Uvarov
[-- Attachment #2: Type: text/html, Size: 3428 bytes --]
^ permalink raw reply
* Re: [PATCH v3 0/7] Fixup booting with device trees and uImage/elf on ppc32
From: Simon Horman @ 2010-07-27 2:55 UTC (permalink / raw)
To: Matthew McClintock; +Cc: muvarov, linuxppc-dev, sebastian, kexec
In-Reply-To: <1279687384-9770-1-git-send-email-msm@freescale.com>
[Cced linuxppc-dev]
On Tue, Jul 20, 2010 at 11:42:57PM -0500, Matthew McClintock wrote:
> This patch series adds full support for booting with a flat device tree
> with either uImage or elf file formats. Kexec and Kdump should work, and
> you should also be able to use ramdisks or reuse your current ramdisk as well
>
> This patch series was tested on an mpc85xx system with a kernel version
> 2.6.35-rc3
>
> v1: Initial version
>
> v2: Added support for fs2dt (file system to device tree)
>
> v3: Fix some misc. git problems I had and other code cleanups
Hi Matthew,
I'm a little concerned that these changes are non trivial and haven't had
much review. But I am prepared to put them into my tree once 2.0.2 is
released - perhaps that way they will get some test coverage. Does
that work for you?
>
> Matthew McClintock (7):
> Restore kexec uImage-ppc to working state
> Fix case where phys_addr_t != unsigned long when reading proc entries
> Update uImage to support crash kernel and misc fixes
> Update Elf-ppc to support crash kernel and misc fixes
> Add support for ramdisk on ppc32 for uImage-ppc and Elf-ppc
> Add support for reworking flat device tree support
> Add documentation/howto for mpc85xx systems
>
> doc/mpc85xx.txt | 190 +++++++++++++++++++++
> kexec/arch/ppc/Makefile | 1 +
> kexec/arch/ppc/fixup_dtb.c | 298 ++++++++++++++++++++++++++++++++-
> kexec/arch/ppc/fixup_dtb.h | 6 +-
> kexec/arch/ppc/include/arch/options.h | 3 +
> kexec/arch/ppc/kexec-elf-ppc.c | 186 +++++++++------------
> kexec/arch/ppc/kexec-ppc.c | 262 +++++++++++++++++------------
> kexec/arch/ppc/kexec-ppc.h | 3 +
> kexec/arch/ppc/kexec-uImage-ppc.c | 136 ++++++++++++---
> kexec/arch/ppc/ops.h | 1 -
> purgatory/arch/ppc/purgatory-ppc.c | 5 +
> 11 files changed, 852 insertions(+), 239 deletions(-)
> create mode 100644 doc/mpc85xx.txt
>
>
>
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox