* Re: [GIT PULL] Disintegrate and kill asm/system.h
From: Grant Likely @ 2012-03-29 21:14 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: linux-arch, Stephen Rothwell, Michael Neuling, arnd, ppc-dev,
linux-kernel, David Howells, paul.gortmaker, hpa, akpm,
Linus Torvalds
In-Reply-To: <1333008684.3010.9.camel@pasglop>
On Thu, Mar 29, 2012 at 2:11 AM, Benjamin Herrenschmidt
<benh@kernel.crashing.org> wrote:
> On Wed, 2012-03-28 at 22:02 -0700, Linus Torvalds wrote:
>> On Wed, Mar 28, 2012 at 9:42 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>> >
>> > How about this (build tested on powerpc allyesconfig):
>>
>> Looks better.
>>
>> Grant - what's the plan about that CONFIG_VIRQ_DEBUG thing? In theory
>> something like it could be useful as a generic thing, but at least
>> right now it is clearly powerpc-specific (not just that the config
>> option only exists for powerpc: it has that whole
>> 'powerpc_debugfs_root' thing in it)?
>>
>> Stephen's patch very much looks like the right thing, but if there was
>> some plan to actually make this generic ...
>
> Yes, as I said earlier I think Grant should make it generic, there's
> no reason to keep that powerpc specific, it's fairly useful and nothing
> in userspace relies on the existing location of the debugfs file that I
> know about.
>
> Another option is to put the mapping information in /proc/interrupts but
> worry that changing anything in there (like adding a column) will break
> countless userspace tools.
I posted an RFC patch that does exactly that, but I'm similarly
nervous for the same reason:
http://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg56368.html
The rightmost fields of /proc/interrupts are a weird set of
conditional outputs that don't really have any parsable formatting to
them. It may be safe to apply my patch because it adds another field
in the middle of a section of conditional outputs* anyway so tools
already won't know what those fields mean. But, regardless, I'm not
going to take responsibility for applying that patch unless encouraged
by several other maintainers to do so.
*It's added to the middle instead of the end purely for aesthetic
reasons. The rightmost field is a freeform string without a field
width, so if put at the end they would never line up. Suggestions for
a better layout are welcome.
g.
^ permalink raw reply
* [PATCH 11/17] powerpc: mark const init data with __initconst instead of __initdata
From: Uwe Kleine-König @ 2012-03-29 21:12 UTC (permalink / raw)
To: linux-kernel, Andrew Morton
Cc: cbe-oss-dev, Arnd Bergmann, Paul Mackerras, kernel,
Anatolij Gustschin, linuxppc-dev
In-Reply-To: <20120329211131.GA31250@pengutronix.de>
As long as there is no other non-const variable marked __initdata in the
same compilation unit it doesn't hurt. If there were one however
compilation would fail with
error: $variablename causes a section type conflict
because a section containing const variables is marked read only and so
cannot contain non-const variables.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Josh Boyer <jwboyer@gmail.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: cbe-oss-dev@lists.ozlabs.org
---
arch/powerpc/platforms/40x/ppc40x_simple.c | 2 +-
arch/powerpc/platforms/512x/mpc5121_generic.c | 2 +-
arch/powerpc/platforms/52xx/lite5200.c | 2 +-
arch/powerpc/platforms/52xx/media5200.c | 2 +-
arch/powerpc/platforms/52xx/mpc5200_simple.c | 2 +-
arch/powerpc/platforms/52xx/mpc52xx_pci.c | 2 +-
arch/powerpc/platforms/83xx/mpc830x_rdb.c | 2 +-
arch/powerpc/platforms/83xx/mpc831x_rdb.c | 2 +-
arch/powerpc/platforms/83xx/mpc837x_rdb.c | 2 +-
arch/powerpc/platforms/85xx/tqm85xx.c | 2 +-
arch/powerpc/platforms/cell/qpace_setup.c | 2 +-
arch/powerpc/platforms/cell/setup.c | 2 +-
12 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/arch/powerpc/platforms/40x/ppc40x_simple.c b/arch/powerpc/platforms/40x/ppc40x_simple.c
index 9761206..2efba25 100644
--- a/arch/powerpc/platforms/40x/ppc40x_simple.c
+++ b/arch/powerpc/platforms/40x/ppc40x_simple.c
@@ -50,7 +50,7 @@ machine_device_initcall(ppc40x_simple, ppc40x_device_probe);
* Again, if your board needs to do things differently then create a
* board.c file for it rather than adding it to this list.
*/
-static const char *board[] __initdata = {
+static const char *board[] __initconst = {
"amcc,acadia",
"amcc,haleakala",
"amcc,kilauea",
diff --git a/arch/powerpc/platforms/512x/mpc5121_generic.c b/arch/powerpc/platforms/512x/mpc5121_generic.c
index 926731f..b1b558c 100644
--- a/arch/powerpc/platforms/512x/mpc5121_generic.c
+++ b/arch/powerpc/platforms/512x/mpc5121_generic.c
@@ -26,7 +26,7 @@
/*
* list of supported boards
*/
-static const char *board[] __initdata = {
+static const char *board[] __initconst = {
"prt,prtlvt",
NULL
};
diff --git a/arch/powerpc/platforms/52xx/lite5200.c b/arch/powerpc/platforms/52xx/lite5200.c
index 01ffa64..86bd6f2 100644
--- a/arch/powerpc/platforms/52xx/lite5200.c
+++ b/arch/powerpc/platforms/52xx/lite5200.c
@@ -172,7 +172,7 @@ static void __init lite5200_setup_arch(void)
mpc52xx_setup_pci();
}
-static const char *board[] __initdata = {
+static const char *board[] __initconst = {
"fsl,lite5200",
"fsl,lite5200b",
NULL,
diff --git a/arch/powerpc/platforms/52xx/media5200.c b/arch/powerpc/platforms/52xx/media5200.c
index 17d91b7..df4d53a 100644
--- a/arch/powerpc/platforms/52xx/media5200.c
+++ b/arch/powerpc/platforms/52xx/media5200.c
@@ -232,7 +232,7 @@ static void __init media5200_setup_arch(void)
}
/* list of the supported boards */
-static const char *board[] __initdata = {
+static const char *board[] __initconst = {
"fsl,media5200",
NULL
};
diff --git a/arch/powerpc/platforms/52xx/mpc5200_simple.c b/arch/powerpc/platforms/52xx/mpc5200_simple.c
index c0aa040..2622361 100644
--- a/arch/powerpc/platforms/52xx/mpc5200_simple.c
+++ b/arch/powerpc/platforms/52xx/mpc5200_simple.c
@@ -49,7 +49,7 @@ static void __init mpc5200_simple_setup_arch(void)
}
/* list of the supported boards */
-static const char *board[] __initdata = {
+static const char *board[] __initconst = {
"anonymous,a4m072",
"anon,charon",
"intercontrol,digsy-mtc",
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pci.c b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
index bfb11e0..e2d401a 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pci.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
@@ -93,7 +93,7 @@ struct mpc52xx_pci {
};
/* MPC5200 device tree match tables */
-const struct of_device_id mpc52xx_pci_ids[] __initdata = {
+const struct of_device_id mpc52xx_pci_ids[] __initconst = {
{ .type = "pci", .compatible = "fsl,mpc5200-pci", },
{ .type = "pci", .compatible = "mpc5200-pci", },
{}
diff --git a/arch/powerpc/platforms/83xx/mpc830x_rdb.c b/arch/powerpc/platforms/83xx/mpc830x_rdb.c
index 4f2d9fe..3327ab9 100644
--- a/arch/powerpc/platforms/83xx/mpc830x_rdb.c
+++ b/arch/powerpc/platforms/83xx/mpc830x_rdb.c
@@ -34,7 +34,7 @@ static void __init mpc830x_rdb_setup_arch(void)
mpc831x_usb_cfg();
}
-static const char *board[] __initdata = {
+static const char *board[] __initconst = {
"MPC8308RDB",
"fsl,mpc8308rdb",
"denx,mpc8308_p1m",
diff --git a/arch/powerpc/platforms/83xx/mpc831x_rdb.c b/arch/powerpc/platforms/83xx/mpc831x_rdb.c
index fa25977..067d3f0 100644
--- a/arch/powerpc/platforms/83xx/mpc831x_rdb.c
+++ b/arch/powerpc/platforms/83xx/mpc831x_rdb.c
@@ -35,7 +35,7 @@ static void __init mpc831x_rdb_setup_arch(void)
mpc831x_usb_cfg();
}
-static const char *board[] __initdata = {
+static const char *board[] __initconst = {
"MPC8313ERDB",
"fsl,mpc8315erdb",
NULL
diff --git a/arch/powerpc/platforms/83xx/mpc837x_rdb.c b/arch/powerpc/platforms/83xx/mpc837x_rdb.c
index 16c9c9c..a9a15bb 100644
--- a/arch/powerpc/platforms/83xx/mpc837x_rdb.c
+++ b/arch/powerpc/platforms/83xx/mpc837x_rdb.c
@@ -60,7 +60,7 @@ static void __init mpc837x_rdb_setup_arch(void)
machine_device_initcall(mpc837x_rdb, mpc83xx_declare_of_platform_devices);
-static const char *board[] __initdata = {
+static const char *board[] __initconst = {
"fsl,mpc8377rdb",
"fsl,mpc8378rdb",
"fsl,mpc8379rdb",
diff --git a/arch/powerpc/platforms/85xx/tqm85xx.c b/arch/powerpc/platforms/85xx/tqm85xx.c
index 4d786c2..c182de0 100644
--- a/arch/powerpc/platforms/85xx/tqm85xx.c
+++ b/arch/powerpc/platforms/85xx/tqm85xx.c
@@ -125,7 +125,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1520,
machine_device_initcall(tqm85xx, mpc85xx_common_publish_devices);
-static const char *board[] __initdata = {
+static const char *board[] __initconst = {
"tqc,tqm8540",
"tqc,tqm8541",
"tqc,tqm8548",
diff --git a/arch/powerpc/platforms/cell/qpace_setup.c b/arch/powerpc/platforms/cell/qpace_setup.c
index 7f9b674..6e3409d 100644
--- a/arch/powerpc/platforms/cell/qpace_setup.c
+++ b/arch/powerpc/platforms/cell/qpace_setup.c
@@ -61,7 +61,7 @@ static void qpace_progress(char *s, unsigned short hex)
printk("*** %04x : %s\n", hex, s ? s : "");
}
-static const struct of_device_id qpace_bus_ids[] __initdata = {
+static const struct of_device_id qpace_bus_ids[] __initconst = {
{ .type = "soc", },
{ .compatible = "soc", },
{ .type = "spider", },
diff --git a/arch/powerpc/platforms/cell/setup.c b/arch/powerpc/platforms/cell/setup.c
index fa3e294..4ab0876 100644
--- a/arch/powerpc/platforms/cell/setup.c
+++ b/arch/powerpc/platforms/cell/setup.c
@@ -140,7 +140,7 @@ static int __devinit cell_setup_phb(struct pci_controller *phb)
return 0;
}
-static const struct of_device_id cell_bus_ids[] __initdata = {
+static const struct of_device_id cell_bus_ids[] __initconst = {
{ .type = "soc", },
{ .compatible = "soc", },
{ .type = "spider", },
--
1.7.9.1
^ permalink raw reply related
* [PATCH 00/17] mark const init data with __initconst instead of __initdata
From: Uwe Kleine-König @ 2012-03-29 21:11 UTC (permalink / raw)
To: linux-kernel, Andrew Morton
Cc: Andrew Lunn, Christoph Lameter, linux-mips, Tony Lindgren,
Linus Walleij, Nicolas Ferre, Matthew Garrett,
platform-driver-x86, ibm-acpi-devel, Randy Dunlap, linux-mtd,
Sekhar Nori, Daniel Walker, lm-sensors, Klaus Kudielka,
Guenter Roeck, Kevin Hilman, linux-ia64, Kukjin Kim, Russell King,
Samuel Ortiz, Yoshinori Sato, Lennert Buytenhek, Kyungmin Park,
David Brown, Anatolij Gustschin, Jean-Christophe Plagniol-Villard,
Alexey Dobriyan, Joerg Reuter, linux-media, cbe-oss-dev,
Fenghua Yu, Arnd Bergmann, Tony Luck, Lucas De Marchi,
linux-arm-msm, Andreas Koensgen, Henrique de Moraes Holschuh,
Haojian Zhuang, Mauro Carvalho Chehab, Tejun Heo,
linux-samsung-soc, linux-mm, Barry Song, linux-hams, linux-omap,
Andrew Victor, linux-arm-kernel, David Howells,
davinci-linux-open-source, Jean-Paul Roubelat, Eric Miao,
Linus Walleij, linux-ide, linuxppc-dev, Nicolas Pitre,
Ralf Baechle, Tomasz Stanislawski, Bryan Huntsman, Sascha Hauer,
netdev, Jean Delvare, Paul Mackerras, Shawn Guo, David Woodhouse,
David S. Miller
Hello,
this series fixes a common error to use __initdata to mark const
variables. Most of the time this works well enough to go unnoticed
(though I wonder why the linker doesn't warn about that).
Just try adding something like
int something __initdata;
to one of the patched files and compile to see the error.
While touching these annotations I also corrected the position where it
was wrong to go between the variable name and the =.
Note this series is not compile tested.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply
* [git pull] Please pull powerpc.git next branch
From: Kumar Gala @ 2012-03-29 20:44 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
Ben,
A few minor bug fixes and missing dts updates for 3.4. There got lost in
the mix. Sorry for the delay
- k
The following changes since commit 1ce447b90f3e71c81ae59e0062bc305ef267668b:
powerpc/perf: Fix instruction address sampling on 970 and Power4 (2012-03-28 11:33:24 +1100)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc.git next
Dave Liu (1):
powerpc/qe: Update the SNUM table for MPC8569 Rev2.0
Diana CRACIUN (1):
powerpc/dts: Removed fsl,msi property from dts.
Jerry Huang (2):
powerpc/85xx: add the P1020MBG-PC DTS support
powerpc/85xx: add the P1020UTM-PC DTS support
Shaveta Leekha (1):
powerpc/85xx: Enable I2C_CHARDEV and I2C_MPC options in defconfigs
Timur Tabi (2):
powerpc/8xxx: remove 85xx/86xx restrictions from fsl_guts.h
powerpc/epapr: add "memory" as a clobber to all hypercalls
arch/powerpc/boot/dts/p1020mbg-pc.dtsi | 151 ++++++++++++++++++++++++++
arch/powerpc/boot/dts/p1020mbg-pc_32b.dts | 89 +++++++++++++++
arch/powerpc/boot/dts/p1020mbg-pc_36b.dts | 89 +++++++++++++++
arch/powerpc/boot/dts/p1020utm-pc.dtsi | 140 ++++++++++++++++++++++++
arch/powerpc/boot/dts/p1020utm-pc_32b.dts | 89 +++++++++++++++
arch/powerpc/boot/dts/p1020utm-pc_36b.dts | 89 +++++++++++++++
arch/powerpc/boot/dts/p2041rdb.dts | 3 -
arch/powerpc/boot/dts/p3041ds.dts | 4 -
arch/powerpc/boot/dts/p3060qds.dts | 2 -
arch/powerpc/boot/dts/p4080ds.dts | 3 -
arch/powerpc/boot/dts/p5020ds.dts | 4 -
arch/powerpc/configs/corenet32_smp_defconfig | 1 +
arch/powerpc/configs/corenet64_smp_defconfig | 2 +
arch/powerpc/configs/mpc85xx_defconfig | 1 +
arch/powerpc/configs/mpc85xx_smp_defconfig | 1 +
arch/powerpc/include/asm/epapr_hcalls.h | 7 +-
arch/powerpc/include/asm/fsl_guts.h | 26 +----
arch/powerpc/platforms/85xx/mpc85xx_mds.c | 2 +-
arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 2 +-
arch/powerpc/platforms/85xx/p1022_ds.c | 4 +-
arch/powerpc/platforms/86xx/mpc8610_hpcd.c | 2 +-
arch/powerpc/sysdev/qe_lib/qe.c | 22 ++++-
drivers/net/ethernet/freescale/ucc_geth.c | 6 +-
sound/soc/fsl/mpc8610_hpcd.c | 8 +-
sound/soc/fsl/p1022_ds.c | 10 +-
25 files changed, 701 insertions(+), 56 deletions(-)
create mode 100644 arch/powerpc/boot/dts/p1020mbg-pc.dtsi
create mode 100644 arch/powerpc/boot/dts/p1020mbg-pc_32b.dts
create mode 100644 arch/powerpc/boot/dts/p1020mbg-pc_36b.dts
create mode 100644 arch/powerpc/boot/dts/p1020utm-pc.dtsi
create mode 100644 arch/powerpc/boot/dts/p1020utm-pc_32b.dts
create mode 100644 arch/powerpc/boot/dts/p1020utm-pc_36b.dts
^ permalink raw reply
* Re: Help initialize phy-less ethernet in 2.6.38
From: Scott Wood @ 2012-03-29 20:30 UTC (permalink / raw)
To: Fabio; +Cc: Andy Fleming, linuxppc-dev
In-Reply-To: <CAP-cLV5hAT8sp7uxy5o3_NOw5xoAvoz-rV04zB4pmULSp3pXcg@mail.gmail.com>
On 03/29/2012 02:56 PM, Fabio wrote:
>> Which old kernel driver? Why do you need to mess with fs_platform_info?
> I have to port a custom platform driver written for 2.6.10 to support
> this custom board.
So it's old arch/ppc stuff. Now fs_platform_info is driver-internal and
info comes from the device tree. You shouldn't touch the struct directly.
>> Why do you think the interrupt is misconfigured?
> Because I don't get any error during boot or when I run ifconfig, but
> I don't see
> any interrupt if I run 'cat /proc/interrupts':
That could mean that something else is failing, such that you don't
have the activity that would cause an interrupt.
>> Looking at the code, though, I'm not sure if this stuff still works --
>> e.g. I don't see where any fields of fixed-link but the ID are used, or
>> what's supposed to happen when of_phy_connect_fixed_link() calls
>> phy_connect().
> If it isn't so, do you have any suggestion about how to re-add this
> functionality to the existing code?
Andy, do you know what the state of this stuff is?
-Scott
^ permalink raw reply
* Re: Help initialize phy-less ethernet in 2.6.38
From: Fabio @ 2012-03-29 19:56 UTC (permalink / raw)
To: Scott Wood; +Cc: Andy Fleming, linuxppc-dev
In-Reply-To: <4F74AB70.7070209@freescale.com>
> Which old kernel driver? =C2=A0Why do you need to mess with fs_platform_i=
nfo?
I have to port a custom platform driver written for 2.6.10 to support
this custom board.
That driver directly initializes the fs_platform_info data structure,
so after some failed attempts I thought to directly assign some values
to the fs_platform_info structure to see reuse part of the old code,
just to get the device to work.
> Why do you think the interrupt is misconfigured?
Because I don't get any error during boot or when I run ifconfig, but
I don't see
any interrupt if I run 'cat /proc/interrupts':
---
CPU0
16: 136 CPM2 SIU Level cpm_uart
32: 0 CPM2 SIU Level fs_enet-mac
LOC: 1219 Local timer interrupts
SPU: 0 Spurious interrupts
CNT: 0 Performance monitoring interrupts
MCE: 0 Machine check exceptions
----
>Looking at the code, though, I'm not sure if this stuff still works --
>e.g. I don't see where any fields of fixed-link but the ID are used, or
>what's supposed to happen when of_phy_connect_fixed_link() calls
>phy_connect().
If it isn't so, do you have any suggestion about how to re-add this
functionality to the existing code?
I will make some other tests taking as an example the mgcoge.dts which
seems the most similar to my custom board.
Thanks in advance,
--=20
Fabio Pozzi
^ permalink raw reply
* Re: Help initialize phy-less ethernet in 2.6.38
From: Scott Wood @ 2012-03-29 18:35 UTC (permalink / raw)
To: Fabio; +Cc: Andy Fleming, linuxppc-dev
In-Reply-To: <CAP-cLV5pF-j_izadBSVD7p4hQte96O_g2udCxi=9tkaPwxEsaw@mail.gmail.com>
On 03/28/2012 11:13 AM, Fabio wrote:
> Hi all,
> I am a newbie trying to get the FCC1 ethernet interface to work on a
> custom board.
> The hardware used is based on mpc8270 which is connected via FCC1 to a
> phy-less interface linked to another microcontroller.
> FCC1 should be recognized as eth0 by the linux kernel and it should
> receive data when set up in promiscuous mode.
> Currently during the boot it seems that the device initialization goes
> ok but I can't understand why I can't receive data when I put the
> interface in promiscuous mode.
Is the problem only with promiscuous mode, or do you have problems with
normal operation as well (receiving broadcast packets and packets
addressed to you, sending pakcets, etc)?
> Going into details I can see that the fs_enet probe function gets called.
> I customized it to setup the fs_platform_info structure using the
> values taken from the old kernel driver for now.
Which old kernel driver? Why do you need to mess with fs_platform_info?
> The only fields I cannot setup are the bus_id,phy_irq,phy_addr because
> they are not part of the fs_platform_info data structure anymore.
All this stuff comes from the device tree.
> I can't see any errors during the initialization, but I can't receive
> data on the interface.
>
> I think the problem can be in an interrupt misconfiguration but I
> haven't figured out how to configure the ethernet dts part in the
> right way or how to handle the phy-less situation correctly.
Why do you think the interrupt is misconfigured?
For phy-less you should have a fixed-link property. For some reason
this property is documented only in
Documentation/devicetree/bindings/net/fsl-tsec-phy.txt, but it is
applicable here as well.
Looking at the code, though, I'm not sure if this stuff still works --
e.g. I don't see where any fields of fixed-link but the ID are used, or
what's supposed to happen when of_phy_connect_fixed_link() calls
phy_connect().
> --- dts snippet ---
> eth0: ethernet@11300 {
> device_type = "network";
> compatible = "fsl,cpm2-fcc-enet";
> reg = <0x11300 0x20 0x8400 0x100 0x11390 0x1>;
> local-mac-address = [ 00 01 02 03 04 05 ];
> interrupts = <32 8>;
> interrupt-parent = <&PIC>;
> linux,network-index = <0>;
> fsl,cpm-command = <0x12000300>;
> };
Some of this stuff shouldn't be needed anymore (device-type,
linux,network-index), and you should use a real MAC address, but
otherwise this looks right.
-Scott
^ permalink raw reply
* Re: powerpc/85xx: p2020rdb - move the NAND address.
From: Bryan Hundven @ 2012-03-29 18:28 UTC (permalink / raw)
To: Kumar Gala, Sebastian Andrzej Siewior; +Cc: linuxppc-dev@lists.ozlabs.org
In-Reply-To: <9460468D-281C-4960-839A-F8435638DE4B@kernel.crashing.org>
[-- Attachment #1: Type: text/plain, Size: 2838 bytes --]
Kumar,
Sorry, i should have posted to the ml.
Thank you, I was looking in the wrong spot.
Cheers,
-Bryan
Kumar Gala <galak@kernel.crashing.org> wrote:
On Mar 29, 2012, at 2:26 AM, Sebastian Andrzej Siewior wrote:
> On 03/28/2012 10:30 PM, Bryan Hundven wrote:
>> > It is not at 0xffa00000. According to current u-boot source the NAND
>> > controller is always at 0xff800000 and it is either at CS0 or CS1
>> > depending on NAND or NAND+NOR mode. In 36bit mode it is shifted to
>> > 0xfff800000 but it has always an eight there and never an A.
>> >
>> > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
>> > Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
>>
>> I am having a hard time verifying this change. I don't think you are
>> wrong, I'm just having a hard time following.
>>
>> I do not see where this has always been 0xff800000 in u-boot.
>
> <cut>
>
>> But while I was checking changes in arch/powerpc/, I found this change
>> and wanted to understand why 0xffa00000 has worked for us for so long?
>
> Kumar, I wasn't wrong entirely I just missed one detail. U-Boot
> provides two different configs, not just one define like its for
> SPL/SPI/...:
>
> - include/configs/P1_P2_RDB.h
>
> #ifndef CONFIG_NAND_SPL
> #define CONFIG_SYS_NAND_BASE 0xffa00000
> #ifdef CONFIG_PHYS_64BIT
> #define CONFIG_SYS_NAND_BASE_PHYS 0xfffa00000ull
> #else
> #define CONFIG_SYS_NAND_BASE_PHYS CONFIG_SYS_NAND_BASE
> #endif
> #else
> #define CONFIG_SYS_NAND_BASE 0xfff00000
> #ifdef CONFIG_PHYS_64BIT
> #define CONFIG_SYS_NAND_BASE_PHYS 0xffff00000ull
> #else
> #define CONFIG_SYS_NAND_BASE_PHYS CONFIG_SYS_NAND_BASE
> #endif
> #endif
>
> - include/configs/p1_p2_rdb_pc.h
>
> #ifdef CONFIG_NAND_FSL_ELBC
> #define CONFIG_SYS_NAND_BASE 0xff800000
> #ifdef CONFIG_PHYS_64BIT
> #define CONFIG_SYS_NAND_BASE_PHYS 0xfff800000ull
> #else
> #define CONFIG_SYS_NAND_BASE_PHYS CONFIG_SYS_NAND_BASE
> #endif
>
> and for kernel they use both the same device tree. So with the change,
> the _pc variant finds its flash. Before that it worked for the non-pc
> variant only if NAND_SPL wasn't used.
> Any suggestion on fixing that? Providing a new dt for _pc would "fix"
> it but the non pc variant won't find it in the case of NAND_SPL.
There are two (well 3 since rdb-pc has both 32b & 36b) in the tree now:
arch/powerpc/boot/dts/p2020rdb.dts
arch/powerpc/boot/dts/p2020rdb-pc_32b.dts
arch/powerpc/boot/dts/p2020rdb-pc_36b.dts
>
> Since both system have the same SoC and the NAND_SPL is always linked
> against 0xfff00000 I don't see anything wrong to relocate the NAND CS
> later to 0xff800000 (or to 0xffa00000) and having it consistent among
> both configs.
- k
[-- Attachment #2: Type: text/html, Size: 4345 bytes --]
^ permalink raw reply
* Re: why use 'raw_spin_lock_irqsave' inf function 'of_find_node_with_property'
From: Tabi Timur-B04825 @ 2012-03-29 15:48 UTC (permalink / raw)
To: Huang Changming-R66093; +Cc: linuxppc-dev@ozlabs.org
In-Reply-To: <110EED8CC96DFC488B7E717A2027A27C05F5BA@039-SN1MPN1-003.039d.mgd.msft.net>
On Thu, Mar 29, 2012 at 5:01 AM, Huang Changming-R66093
<r66093@freescale.com> wrote:
> Hi, all
>
> In function =93of_find_node_with_property=94, why use =93raw_spin_lock_ir=
qsave=94 to
> disable preemption and disable interrupt?
Where do you see raw_spin_lock_irqsave?
struct device_node *of_find_node_with_property(struct device_node *from,
const char *prop_name)
{
struct device_node *np;
struct property *pp;
read_lock(&devtree_lock);
np =3D from ? from->allnext : allnodes;
for (; np; np =3D np->allnext) {
for (pp =3D np->properties; pp !=3D 0; pp =3D pp->next) {
if (of_prop_cmp(pp->name, prop_name) =3D=3D 0) {
of_node_get(np);
goto out;
}
}
}
out:
of_node_put(from);
read_unlock(&devtree_lock);
return np;
}
We need a lock so that we don't parse the tree while it's being
modified. That would cause the for-loop to fail in strange ways.
--=20
Timur Tabi
Linux kernel developer at Freescale=
^ permalink raw reply
* Re: [PATCHv2 02/14] X86 & IA64: adapt for dma_map_ops changes
From: Thomas Gleixner @ 2012-03-29 13:51 UTC (permalink / raw)
To: Marek Szyprowski
Cc: linux-mips, Kevin Cernekee, linux-ia64, linux-sh, linux-mm,
sparclinux, Guan Xuetao, linux-arch, Stephen Rothwell,
Jonathan Corbet, x86, Matt Turner, Dezhong Diao, Fenghua Yu,
Arnd Bergmann, microblaze-uclinux, linaro-mm-sig, Ivan Kokshaysky,
Andrzej Pietrasiewicz, linux-arm-kernel, Richard Henderson,
discuss, Michal Simek, Tony Luck, linux-kernel, Richard Kuo,
FUJITA Tomonori, Kyungmin Park, Paul Mundt, linux-alpha,
Andrew Morton, linuxppc-dev, David S. Miller
In-Reply-To: <1332855768-32583-3-git-send-email-m.szyprowski@samsung.com>
On Tue, 27 Mar 2012, Marek Szyprowski wrote:
> From: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
> -static inline void *dma_alloc_coherent(struct device *dev, size_t size,
> - dma_addr_t *daddr, gfp_t gfp)
> +#define dma_alloc_coherent(d,s,h,f) dma_alloc_attrs(d,s,h,f,NULL)
Please make this an inline function.
>
> +#define dma_alloc_coherent(d,s,h,f) dma_alloc_attrs(d,s,h,f,NULL)
Inline please.
> -static inline void dma_free_coherent(struct device *dev, size_t size,
> - void *vaddr, dma_addr_t bus)
> +#define dma_free_coherent(d,s,c,h) dma_free_attrs(d,s,c,h,NULL)
Ditto
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Thanks,
tglx
^ permalink raw reply
* Re: powerpc/85xx: p2020rdb - move the NAND address.
From: Kumar Gala @ 2012-03-29 13:10 UTC (permalink / raw)
To: Sebastian Andrzej Siewior; +Cc: Bryan Hundven, linuxppc-dev
In-Reply-To: <4F740E98.50104@linutronix.de>
On Mar 29, 2012, at 2:26 AM, Sebastian Andrzej Siewior wrote:
> On 03/28/2012 10:30 PM, Bryan Hundven wrote:
>> > It is not at 0xffa00000. According to current u-boot source the NAND
>> > controller is always at 0xff800000 and it is either at CS0 or CS1
>> > depending on NAND or NAND+NOR mode. In 36bit mode it is shifted to
>> > 0xfff800000 but it has always an eight there and never an A.
>> >
>> > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
>> > Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
>>
>> I am having a hard time verifying this change. I don't think you are
>> wrong, I'm just having a hard time following.
>>
>> I do not see where this has always been 0xff800000 in u-boot.
>
> <cut>
>
>> But while I was checking changes in arch/powerpc/, I found this change
>> and wanted to understand why 0xffa00000 has worked for us for so long?
>
> Kumar, I wasn't wrong entirely I just missed one detail. U-Boot
> provides two different configs, not just one define like its for
> SPL/SPI/...:
>
> - include/configs/P1_P2_RDB.h
>
> #ifndef CONFIG_NAND_SPL
> #define CONFIG_SYS_NAND_BASE 0xffa00000
> #ifdef CONFIG_PHYS_64BIT
> #define CONFIG_SYS_NAND_BASE_PHYS 0xfffa00000ull
> #else
> #define CONFIG_SYS_NAND_BASE_PHYS CONFIG_SYS_NAND_BASE
> #endif
> #else
> #define CONFIG_SYS_NAND_BASE 0xfff00000
> #ifdef CONFIG_PHYS_64BIT
> #define CONFIG_SYS_NAND_BASE_PHYS 0xffff00000ull
> #else
> #define CONFIG_SYS_NAND_BASE_PHYS CONFIG_SYS_NAND_BASE
> #endif
> #endif
>
> - include/configs/p1_p2_rdb_pc.h
>
> #ifdef CONFIG_NAND_FSL_ELBC
> #define CONFIG_SYS_NAND_BASE 0xff800000
> #ifdef CONFIG_PHYS_64BIT
> #define CONFIG_SYS_NAND_BASE_PHYS 0xfff800000ull
> #else
> #define CONFIG_SYS_NAND_BASE_PHYS CONFIG_SYS_NAND_BASE
> #endif
>
> and for kernel they use both the same device tree. So with the change,
> the _pc variant finds its flash. Before that it worked for the non-pc
> variant only if NAND_SPL wasn't used.
> Any suggestion on fixing that? Providing a new dt for _pc would "fix"
> it but the non pc variant won't find it in the case of NAND_SPL.
There are two (well 3 since rdb-pc has both 32b & 36b) in the tree now:
arch/powerpc/boot/dts/p2020rdb.dts
arch/powerpc/boot/dts/p2020rdb-pc_32b.dts
arch/powerpc/boot/dts/p2020rdb-pc_36b.dts
>
> Since both system have the same SoC and the NAND_SPL is always linked
> against 0xfff00000 I don't see anything wrong to relocate the NAND CS
> later to 0xff800000 (or to 0xffa00000) and having it consistent among
> both configs.
- k
^ permalink raw reply
* why use 'raw_spin_lock_irqsave' inf function 'of_find_node_with_property'
From: Huang Changming-R66093 @ 2012-03-29 10:01 UTC (permalink / raw)
To: linuxppc-dev@ozlabs.org
[-- Attachment #1: Type: text/plain, Size: 480 bytes --]
Hi, all
In function "of_find_node_with_property", why use "raw_spin_lock_irqsave" to disable preemption and disable interrupt?
If enable them, what impact will be observed?
This function just finds the node from the DTS file, it can't be interrupted or preempted?
I have done one test: remove "raw_spin_lock_irqsave" and "raw_spin_unlock_irqrestore" from this function,
It seems there is no any bad result, the Linux kernel still work well.
Best Regards
Jerry Huang
[-- Attachment #2: Type: text/html, Size: 2660 bytes --]
^ permalink raw reply
* Re: [GIT PULL] Disintegrate and kill asm/system.h
From: Benjamin Herrenschmidt @ 2012-03-29 8:11 UTC (permalink / raw)
To: Linus Torvalds
Cc: linux-arch, Stephen Rothwell, Michael Neuling, arnd, linux-kernel,
David Howells, paul.gortmaker, hpa, akpm, ppc-dev
In-Reply-To: <CA+55aFzjQ7qb=bPAj_gGoGLPXOGweTaqtmOBZH4mUt8E_KQwsg@mail.gmail.com>
On Wed, 2012-03-28 at 22:02 -0700, Linus Torvalds wrote:
> On Wed, Mar 28, 2012 at 9:42 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > How about this (build tested on powerpc allyesconfig):
>
> Looks better.
>
> Grant - what's the plan about that CONFIG_VIRQ_DEBUG thing? In theory
> something like it could be useful as a generic thing, but at least
> right now it is clearly powerpc-specific (not just that the config
> option only exists for powerpc: it has that whole
> 'powerpc_debugfs_root' thing in it)?
>
> Stephen's patch very much looks like the right thing, but if there was
> some plan to actually make this generic ...
Yes, as I said earlier I think Grant should make it generic, there's
no reason to keep that powerpc specific, it's fairly useful and nothing
in userspace relies on the existing location of the debugfs file that I
know about.
Another option is to put the mapping information in /proc/interrupts but
worry that changing anything in there (like adding a column) will break
countless userspace tools.
Cheers,
Ben.
^ permalink raw reply
* Re: powerpc/85xx: p2020rdb - move the NAND address.
From: Sebastian Andrzej Siewior @ 2012-03-29 7:26 UTC (permalink / raw)
To: Kumar Gala, linuxppc-dev; +Cc: Bryan Hundven
In-Reply-To: <E9CCADB024EDCD44A9C1083605680C42B9053302@ES05CO.wgti.net>
On 03/28/2012 10:30 PM, Bryan Hundven wrote:
> > It is not at 0xffa00000. According to current u-boot source the NAND
> > controller is always at 0xff800000 and it is either at CS0 or CS1
> > depending on NAND or NAND+NOR mode. In 36bit mode it is shifted to
> > 0xfff800000 but it has always an eight there and never an A.
> >
> > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> > Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
>
> I am having a hard time verifying this change. I don't think you are
> wrong, I'm just having a hard time following.
>
> I do not see where this has always been 0xff800000 in u-boot.
<cut>
> But while I was checking changes in arch/powerpc/, I found this change
> and wanted to understand why 0xffa00000 has worked for us for so long?
Kumar, I wasn't wrong entirely I just missed one detail. U-Boot
provides two different configs, not just one define like its for
SPL/SPI/...:
- include/configs/P1_P2_RDB.h
#ifndef CONFIG_NAND_SPL
#define CONFIG_SYS_NAND_BASE 0xffa00000
#ifdef CONFIG_PHYS_64BIT
#define CONFIG_SYS_NAND_BASE_PHYS 0xfffa00000ull
#else
#define CONFIG_SYS_NAND_BASE_PHYS CONFIG_SYS_NAND_BASE
#endif
#else
#define CONFIG_SYS_NAND_BASE 0xfff00000
#ifdef CONFIG_PHYS_64BIT
#define CONFIG_SYS_NAND_BASE_PHYS 0xffff00000ull
#else
#define CONFIG_SYS_NAND_BASE_PHYS CONFIG_SYS_NAND_BASE
#endif
#endif
- include/configs/p1_p2_rdb_pc.h
#ifdef CONFIG_NAND_FSL_ELBC
#define CONFIG_SYS_NAND_BASE 0xff800000
#ifdef CONFIG_PHYS_64BIT
#define CONFIG_SYS_NAND_BASE_PHYS 0xfff800000ull
#else
#define CONFIG_SYS_NAND_BASE_PHYS CONFIG_SYS_NAND_BASE
#endif
and for kernel they use both the same device tree. So with the change,
the _pc variant finds its flash. Before that it worked for the non-pc
variant only if NAND_SPL wasn't used.
Any suggestion on fixing that? Providing a new dt for _pc would "fix"
it but the non pc variant won't find it in the case of NAND_SPL.
Since both system have the same SoC and the NAND_SPL is always linked
against 0xfff00000 I don't see anything wrong to relocate the NAND CS
later to 0xff800000 (or to 0xffa00000) and having it consistent among
both configs.
> -Bryan
Sebastian
^ permalink raw reply
* Re: [GIT PULL] Disintegrate and kill asm/system.h
From: Linus Torvalds @ 2012-03-29 5:02 UTC (permalink / raw)
To: Stephen Rothwell
Cc: linux-arch, Michael Neuling, arnd, linux-kernel, David Howells,
paul.gortmaker, hpa, akpm, ppc-dev
In-Reply-To: <20120329154238.1ce219f7c998da45452af4b2@canb.auug.org.au>
On Wed, Mar 28, 2012 at 9:42 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> How about this (build tested on powerpc allyesconfig):
Looks better.
Grant - what's the plan about that CONFIG_VIRQ_DEBUG thing? In theory
something like it could be useful as a generic thing, but at least
right now it is clearly powerpc-specific (not just that the config
option only exists for powerpc: it has that whole
'powerpc_debugfs_root' thing in it)?
Stephen's patch very much looks like the right thing, but if there was
some plan to actually make this generic ...
Linus
^ permalink raw reply
* Re: [GIT PULL] Disintegrate and kill asm/system.h
From: Michael Neuling @ 2012-03-29 4:55 UTC (permalink / raw)
To: Stephen Rothwell
Cc: linux-arch, arnd, ppc-dev, linux-kernel, David Howells,
paul.gortmaker, hpa, akpm, Linus Torvalds
In-Reply-To: <20120329154238.1ce219f7c998da45452af4b2@canb.auug.org.au>
> > Can we please move that abortion into arch/powerpc/? Instead of making
> > generic code even uglier..
>
> How about this (build tested on powerpc allyesconfig):
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Thu, 29 Mar 2012 14:58:10 +1100
> Subject: [PATCH] powerpc: fix fallout from system.h split up
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
FWIW.. this works for me too..
Acked-by: Michael Neuling <mikey@neuling.org>
Mikey
> ---
> arch/powerpc/kernel/fadump.c | 2 +
> arch/powerpc/kernel/irq.c | 72 ++++++++++++++++++++++++++++++++++++++=
> ++++
> arch/powerpc/kernel/kgdb.c | 1 +
> kernel/irq/irqdomain.c | 72 --------------------------------------=
> ----
> 4 files changed, 75 insertions(+), 72 deletions(-)
>
> diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
> index cfe7a38..18bdf74 100644
> --- a/arch/powerpc/kernel/fadump.c
> +++ b/arch/powerpc/kernel/fadump.c
> @@ -40,6 +40,8 @@
> #include <asm/prom.h>
> #include <asm/rtas.h>
> #include <asm/fadump.h>
> +#include <asm/debug.h>
> +#include <asm/setup.h>
> =20
> static struct fw_dump fw_dump;
> static struct fadump_mem_struct fdm;
> diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
> index 243dbab..ff165f5 100644
> --- a/arch/powerpc/kernel/irq.c
> +++ b/arch/powerpc/kernel/irq.c
> @@ -623,3 +623,75 @@ static int __init setup_noirqdistrib(char *str)
> =20
> __setup("noirqdistrib", setup_noirqdistrib);
> #endif /* CONFIG_PPC64 */
> +
> +#ifdef CONFIG_VIRQ_DEBUG
> +static int virq_debug_show(struct seq_file *m, void *private)
> +{
> + unsigned long flags;
> + struct irq_desc *desc;
> + const char *p;
> + static const char none[] =3D "none";
> + void *data;
> + int i;
> +
> + seq_printf(m, "%-5s %-7s %-15s %-18s %s\n", "virq", "hwirq",
> + "chip name", "chip data", "domain name");
> +
> + for (i =3D 1; i < nr_irqs; i++) {
> + desc =3D irq_to_desc(i);
> + if (!desc)
> + continue;
> +
> + raw_spin_lock_irqsave(&desc->lock, flags);
> +
> + if (desc->action && desc->action->handler) {
> + struct irq_chip *chip;
> +
> + seq_printf(m, "%5d ", i);
> + seq_printf(m, "0x%05lx ", desc->irq_data.hwirq);
> +
> + chip =3D irq_desc_get_chip(desc);
> + if (chip && chip->name)
> + p =3D chip->name;
> + else
> + p =3D none;
> + seq_printf(m, "%-15s ", p);
> +
> + data =3D irq_desc_get_chip_data(desc);
> + seq_printf(m, "0x%16p ", data);
> +
> + if (desc->irq_data.domain->of_node)
> + p =3D desc->irq_data.domain->of_node->full_name
;
> + else
> + p =3D none;
> + seq_printf(m, "%s\n", p);
> + }
> +
> + raw_spin_unlock_irqrestore(&desc->lock, flags);
> + }
> +
> + return 0;
> +}
> +
> +static int virq_debug_open(struct inode *inode, struct file *file)
> +{
> + return single_open(file, virq_debug_show, inode->i_private);
> +}
> +
> +static const struct file_operations virq_debug_fops =3D {
> + .open =3D virq_debug_open,
> + .read =3D seq_read,
> + .llseek =3D seq_lseek,
> + .release =3D single_release,
> +};
> +
> +static int __init irq_debugfs_init(void)
> +{
> + if (debugfs_create_file("virq_mapping", S_IRUGO, powerpc_debugfs_root,
> + NULL, &virq_debug_fops) =3D=3D NULL)
> + return -ENOMEM;
> +
> + return 0;
> +}
> +__initcall(irq_debugfs_init);
> +#endif /* CONFIG_VIRQ_DEBUG */
> diff --git a/arch/powerpc/kernel/kgdb.c b/arch/powerpc/kernel/kgdb.c
> index 76a6e40..782bd0a 100644
> --- a/arch/powerpc/kernel/kgdb.c
> +++ b/arch/powerpc/kernel/kgdb.c
> @@ -24,6 +24,7 @@
> #include <asm/current.h>
> #include <asm/processor.h>
> #include <asm/machdep.h>
> +#include <asm/debug.h>
> =20
> /*
> * This table contains the mapping between PowerPC hardware trap types, and
> diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
> index af48e59..ae645ab 100644
> --- a/kernel/irq/irqdomain.c
> +++ b/kernel/irq/irqdomain.c
> @@ -632,78 +632,6 @@ unsigned int irq_linear_revmap(struct irq_domain *doma=
> in,
> return revmap[hwirq];
> }
> =20
> -#ifdef CONFIG_VIRQ_DEBUG
> -static int virq_debug_show(struct seq_file *m, void *private)
> -{
> - unsigned long flags;
> - struct irq_desc *desc;
> - const char *p;
> - static const char none[] =3D "none";
> - void *data;
> - int i;
> -
> - seq_printf(m, "%-5s %-7s %-15s %-18s %s\n", "virq", "hwirq",
> - "chip name", "chip data", "domain name");
> -
> - for (i =3D 1; i < nr_irqs; i++) {
> - desc =3D irq_to_desc(i);
> - if (!desc)
> - continue;
> -
> - raw_spin_lock_irqsave(&desc->lock, flags);
> -
> - if (desc->action && desc->action->handler) {
> - struct irq_chip *chip;
> -
> - seq_printf(m, "%5d ", i);
> - seq_printf(m, "0x%05lx ", desc->irq_data.hwirq);
> -
> - chip =3D irq_desc_get_chip(desc);
> - if (chip && chip->name)
> - p =3D chip->name;
> - else
> - p =3D none;
> - seq_printf(m, "%-15s ", p);
> -
> - data =3D irq_desc_get_chip_data(desc);
> - seq_printf(m, "0x%16p ", data);
> -
> - if (desc->irq_data.domain->of_node)
> - p =3D desc->irq_data.domain->of_node->full_name
;
> - else
> - p =3D none;
> - seq_printf(m, "%s\n", p);
> - }
> -
> - raw_spin_unlock_irqrestore(&desc->lock, flags);
> - }
> -
> - return 0;
> -}
> -
> -static int virq_debug_open(struct inode *inode, struct file *file)
> -{
> - return single_open(file, virq_debug_show, inode->i_private);
> -}
> -
> -static const struct file_operations virq_debug_fops =3D {
> - .open =3D virq_debug_open,
> - .read =3D seq_read,
> - .llseek =3D seq_lseek,
> - .release =3D single_release,
> -};
> -
> -static int __init irq_debugfs_init(void)
> -{
> - if (debugfs_create_file("virq_mapping", S_IRUGO, powerpc_debugfs_root,
> - NULL, &virq_debug_fops) =3D=3D NULL)
> - return -ENOMEM;
> -
> - return 0;
> -}
> -__initcall(irq_debugfs_init);
> -#endif /* CONFIG_VIRQ_DEBUG */
> -
> int irq_domain_simple_map(struct irq_domain *d, unsigned int irq,
> irq_hw_number_t hwirq)
> {
> --=20
> 1.7.9.1
>
>
> --=20
> Cheers,
> Stephen Rothwell sfr@canb.auug.org.au
> http://www.canb.auug.org.au/~sfr/
^ permalink raw reply
* Re: [GIT PULL] Disintegrate and kill asm/system.h
From: Stephen Rothwell @ 2012-03-29 4:42 UTC (permalink / raw)
To: Linus Torvalds
Cc: linux-arch, Michael Neuling, arnd, linux-kernel, David Howells,
paul.gortmaker, hpa, akpm, ppc-dev
In-Reply-To: <CA+55aFzn=bsH76hPDUgS-FBP=RVu51gwmRdqjkw5RJO=Q_cRfA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 6352 bytes --]
Hi Linus,
On Wed, 28 Mar 2012 21:24:41 -0700 Linus Torvalds <torvalds@linux-foundation.org> wrote:
>
> On Wed, Mar 28, 2012 at 9:15 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > The following patch fixes (as much as possible) a powerpc allyesconfig build.
>
> Ugh:
>
> > diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
> > index af48e59..1f94ddf 100644
> > --- a/kernel/irq/irqdomain.c
> > +++ b/kernel/irq/irqdomain.c
> > @@ -12,6 +12,9 @@
> > #include <linux/slab.h>
> > #include <linux/smp.h>
> > #include <linux/fs.h>
> > +#ifdef CONFIG_VIRQ_DEBUG
> > +#include <asm/debug.h>
> > +#endif
>
> Can we please move that abortion into arch/powerpc/? Instead of making
> generic code even uglier..
How about this (build tested on powerpc allyesconfig):
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 29 Mar 2012 14:58:10 +1100
Subject: [PATCH] powerpc: fix fallout from system.h split up
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
arch/powerpc/kernel/fadump.c | 2 +
arch/powerpc/kernel/irq.c | 72 ++++++++++++++++++++++++++++++++++++++++++
arch/powerpc/kernel/kgdb.c | 1 +
kernel/irq/irqdomain.c | 72 ------------------------------------------
4 files changed, 75 insertions(+), 72 deletions(-)
diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
index cfe7a38..18bdf74 100644
--- a/arch/powerpc/kernel/fadump.c
+++ b/arch/powerpc/kernel/fadump.c
@@ -40,6 +40,8 @@
#include <asm/prom.h>
#include <asm/rtas.h>
#include <asm/fadump.h>
+#include <asm/debug.h>
+#include <asm/setup.h>
static struct fw_dump fw_dump;
static struct fadump_mem_struct fdm;
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 243dbab..ff165f5 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -623,3 +623,75 @@ static int __init setup_noirqdistrib(char *str)
__setup("noirqdistrib", setup_noirqdistrib);
#endif /* CONFIG_PPC64 */
+
+#ifdef CONFIG_VIRQ_DEBUG
+static int virq_debug_show(struct seq_file *m, void *private)
+{
+ unsigned long flags;
+ struct irq_desc *desc;
+ const char *p;
+ static const char none[] = "none";
+ void *data;
+ int i;
+
+ seq_printf(m, "%-5s %-7s %-15s %-18s %s\n", "virq", "hwirq",
+ "chip name", "chip data", "domain name");
+
+ for (i = 1; i < nr_irqs; i++) {
+ desc = irq_to_desc(i);
+ if (!desc)
+ continue;
+
+ raw_spin_lock_irqsave(&desc->lock, flags);
+
+ if (desc->action && desc->action->handler) {
+ struct irq_chip *chip;
+
+ seq_printf(m, "%5d ", i);
+ seq_printf(m, "0x%05lx ", desc->irq_data.hwirq);
+
+ chip = irq_desc_get_chip(desc);
+ if (chip && chip->name)
+ p = chip->name;
+ else
+ p = none;
+ seq_printf(m, "%-15s ", p);
+
+ data = irq_desc_get_chip_data(desc);
+ seq_printf(m, "0x%16p ", data);
+
+ if (desc->irq_data.domain->of_node)
+ p = desc->irq_data.domain->of_node->full_name;
+ else
+ p = none;
+ seq_printf(m, "%s\n", p);
+ }
+
+ raw_spin_unlock_irqrestore(&desc->lock, flags);
+ }
+
+ return 0;
+}
+
+static int virq_debug_open(struct inode *inode, struct file *file)
+{
+ return single_open(file, virq_debug_show, inode->i_private);
+}
+
+static const struct file_operations virq_debug_fops = {
+ .open = virq_debug_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = single_release,
+};
+
+static int __init irq_debugfs_init(void)
+{
+ if (debugfs_create_file("virq_mapping", S_IRUGO, powerpc_debugfs_root,
+ NULL, &virq_debug_fops) == NULL)
+ return -ENOMEM;
+
+ return 0;
+}
+__initcall(irq_debugfs_init);
+#endif /* CONFIG_VIRQ_DEBUG */
diff --git a/arch/powerpc/kernel/kgdb.c b/arch/powerpc/kernel/kgdb.c
index 76a6e40..782bd0a 100644
--- a/arch/powerpc/kernel/kgdb.c
+++ b/arch/powerpc/kernel/kgdb.c
@@ -24,6 +24,7 @@
#include <asm/current.h>
#include <asm/processor.h>
#include <asm/machdep.h>
+#include <asm/debug.h>
/*
* This table contains the mapping between PowerPC hardware trap types, and
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index af48e59..ae645ab 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -632,78 +632,6 @@ unsigned int irq_linear_revmap(struct irq_domain *domain,
return revmap[hwirq];
}
-#ifdef CONFIG_VIRQ_DEBUG
-static int virq_debug_show(struct seq_file *m, void *private)
-{
- unsigned long flags;
- struct irq_desc *desc;
- const char *p;
- static const char none[] = "none";
- void *data;
- int i;
-
- seq_printf(m, "%-5s %-7s %-15s %-18s %s\n", "virq", "hwirq",
- "chip name", "chip data", "domain name");
-
- for (i = 1; i < nr_irqs; i++) {
- desc = irq_to_desc(i);
- if (!desc)
- continue;
-
- raw_spin_lock_irqsave(&desc->lock, flags);
-
- if (desc->action && desc->action->handler) {
- struct irq_chip *chip;
-
- seq_printf(m, "%5d ", i);
- seq_printf(m, "0x%05lx ", desc->irq_data.hwirq);
-
- chip = irq_desc_get_chip(desc);
- if (chip && chip->name)
- p = chip->name;
- else
- p = none;
- seq_printf(m, "%-15s ", p);
-
- data = irq_desc_get_chip_data(desc);
- seq_printf(m, "0x%16p ", data);
-
- if (desc->irq_data.domain->of_node)
- p = desc->irq_data.domain->of_node->full_name;
- else
- p = none;
- seq_printf(m, "%s\n", p);
- }
-
- raw_spin_unlock_irqrestore(&desc->lock, flags);
- }
-
- return 0;
-}
-
-static int virq_debug_open(struct inode *inode, struct file *file)
-{
- return single_open(file, virq_debug_show, inode->i_private);
-}
-
-static const struct file_operations virq_debug_fops = {
- .open = virq_debug_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
-};
-
-static int __init irq_debugfs_init(void)
-{
- if (debugfs_create_file("virq_mapping", S_IRUGO, powerpc_debugfs_root,
- NULL, &virq_debug_fops) == NULL)
- return -ENOMEM;
-
- return 0;
-}
-__initcall(irq_debugfs_init);
-#endif /* CONFIG_VIRQ_DEBUG */
-
int irq_domain_simple_map(struct irq_domain *d, unsigned int irq,
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
* Re: [GIT PULL] Disintegrate and kill asm/system.h
From: Linus Torvalds @ 2012-03-29 4:24 UTC (permalink / raw)
To: Stephen Rothwell
Cc: linux-arch, Michael Neuling, arnd, linux-kernel, David Howells,
paul.gortmaker, hpa, akpm, ppc-dev
In-Reply-To: <20120329151544.ef2117821dfb459e8b52af48@canb.auug.org.au>
On Wed, Mar 28, 2012 at 9:15 PM, Stephen Rothwell <sfr@canb.auug.org.au> wr=
ote:
>
> The following patch fixes (as much as possible) a powerpc allyesconfig bu=
ild.
Ugh:
> diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
> index af48e59..1f94ddf 100644
> --- a/kernel/irq/irqdomain.c
> +++ b/kernel/irq/irqdomain.c
> @@ -12,6 +12,9 @@
> =A0#include <linux/slab.h>
> =A0#include <linux/smp.h>
> =A0#include <linux/fs.h>
> +#ifdef CONFIG_VIRQ_DEBUG
> +#include <asm/debug.h>
> +#endif
Can we please move that abortion into arch/powerpc/? Instead of making
generic code even uglier..
Linus
^ permalink raw reply
* Re: [GIT PULL] Disintegrate and kill asm/system.h
From: Michael Neuling @ 2012-03-29 4:21 UTC (permalink / raw)
To: Stephen Rothwell
Cc: linux-arch, arnd, ppc-dev, linux-kernel, David Howells,
paul.gortmaker, hpa, akpm, Linus
In-Reply-To: <20120329151544.ef2117821dfb459e8b52af48@canb.auug.org.au>
In message <20120329151544.ef2117821dfb459e8b52af48@canb.auug.org.au> you wrote
:
> --Signature=_Thu__29_Mar_2012_15_15_44_+1100_WbAuFOESkuBxVlHq
> Content-Type: text/plain; charset=US-ASCII
> Content-Disposition: inline
> Content-Transfer-Encoding: quoted-printable
>
> Hi all,
>
> On Thu, 29 Mar 2012 13:55:55 +1100 Stephen Rothwell <sfr@canb.auug.org.au> =
> wrote:
> >
> > On Thu, 29 Mar 2012 13:50:44 +1100 Michael Neuling <mikey@neuling.org> wr=
> ote:
> > >
> > > > Here are a bunch of patches to disintegrate asm/system.h into a set o=
> f separate
> > > > bits to relieve the problem of circular inclusion dependencies.
> > > >=20
> > > > The following changes since commit 437538267b672f9320833907f1b5acbb26=
> 05f4be:
> > > >=20
> > > > Merge tag 'fbdev-updates-for-3.4' of git://github.com/schandinat/li=
> nux-2.6 (2012-03-22 20:43:40 -0700)
> > > >=20
> > > > are available in the git repository at:
> > > >=20
> > > > git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-asm_sy=
> stem.git split-asm-system_h
> > >=20
> > > It would have been nice to have this in linux-next for a day or two to
> > > sort out the merge issues, hence....
> >=20
> > Um, what can I say but "yeah, it would have been nice" :-(
>
> The following patch fixes (as much as possible) a powerpc allyesconfig build.
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Thu, 29 Mar 2012 14:58:10 +1100
> Subject: [PATCH] powerpc: fix fallout from system.h split up
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Michael Neuling <mikey@neuling.org>
Thanks, this is much better than my crappy fix.
Mikey
> ---
> arch/powerpc/kernel/fadump.c | 2 ++
> arch/powerpc/kernel/kgdb.c | 1 +
> kernel/irq/irqdomain.c | 3 +++
> 3 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
> index cfe7a38..18bdf74 100644
> --- a/arch/powerpc/kernel/fadump.c
> +++ b/arch/powerpc/kernel/fadump.c
> @@ -40,6 +40,8 @@
> #include <asm/prom.h>
> #include <asm/rtas.h>
> #include <asm/fadump.h>
> +#include <asm/debug.h>
> +#include <asm/setup.h>
> =20
> static struct fw_dump fw_dump;
> static struct fadump_mem_struct fdm;
> diff --git a/arch/powerpc/kernel/kgdb.c b/arch/powerpc/kernel/kgdb.c
> index 76a6e40..782bd0a 100644
> --- a/arch/powerpc/kernel/kgdb.c
> +++ b/arch/powerpc/kernel/kgdb.c
> @@ -24,6 +24,7 @@
> #include <asm/current.h>
> #include <asm/processor.h>
> #include <asm/machdep.h>
> +#include <asm/debug.h>
> =20
> /*
> * This table contains the mapping between PowerPC hardware trap types, and
> diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
> index af48e59..1f94ddf 100644
> --- a/kernel/irq/irqdomain.c
> +++ b/kernel/irq/irqdomain.c
> @@ -12,6 +12,9 @@
> #include <linux/slab.h>
> #include <linux/smp.h>
> #include <linux/fs.h>
> +#ifdef CONFIG_VIRQ_DEBUG
> +#include <asm/debug.h>
> +#endif
> =20
> #define IRQ_DOMAIN_MAP_LEGACY 0 /* driver allocated fixed range of irqs.
> * ie. legacy 8259, gets irqs 1..15 */
> --=20
> 1.7.9.1
>
> --=20
> Cheers,
> Stephen Rothwell sfr@canb.auug.org.au
>
> --Signature=_Thu__29_Mar_2012_15_15_44_+1100_WbAuFOESkuBxVlHq
> Content-Type: application/pgp-signature
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.12 (GNU/Linux)
>
> iQIcBAEBCAAGBQJPc+HwAAoJEECxmPOUX5FET2oP/2slayQM3wN4DhXAE/v+JeBU
> bEmqlZE5DgrAK6Pu65YrlZlYVvfvOsivTwu/tfQ+FLlJHGiPHbVu7zKv/em+cRtz
> dTMQSuYolSyRzAyk+QBD4lUN+SZ8OFfs9XbVxhyTCBe+1qdUUdyul4ajrvo9vMiw
> +0eHw1WlozwGOdWcYy/9BdHXPVUiJGjWksmGmAQz0aTbTY5DVfKjiEsHIRS+lJ0f
> nsrKfWOk5z+4yT2AjteEYcPScxxO2F73VZEr/xBEn5R3siuEgZF6P1n96gTxe/3l
> jdKQG6R2QHfKBpx8kphL3qAom5ehese2YaYkufDn4u+/QXtrDoYE/F2a646I7dc3
> LN2SCiLLiaba11uW06cfdiwpkrlF05nHJR3CnEUt8dSQbS/vEjxlRHa9V3cl7Y9/
> c2rK6z3YQwZXL53LTO4YMv5yaYDathWPKwanGJSocWICq6gbtWl4XevoLRwmkRo1
> TuMAj1jy69mxFdiQQA5LO+JRkQN4POo2+vBUb+0RncNrR/tIpp5xB9np30bwIdNI
> +VS0I2IQD4VntQp+CF/O/y8SEfyqo/7BWPpZhneRy6LMKC9aOe1RpSgKDa4ZvWYh
> BW60vTDNnc5CNSjOtfOtW55m+JH/eY2/Hidy/Yt7PjLXGi+6KKy0eY7Kl6G0PuS1
> 3/KLLW8Vu3GxBLUWiXZv
> =1Nhy
> -----END PGP SIGNATURE-----
>
> --Signature=_Thu__29_Mar_2012_15_15_44_+1100_WbAuFOESkuBxVlHq--
>
^ permalink raw reply
* Re: [GIT PULL] Disintegrate and kill asm/system.h
From: Stephen Rothwell @ 2012-03-29 4:15 UTC (permalink / raw)
To: Linus
Cc: linux-arch, Michael Neuling, arnd, linux-kernel, David Howells,
paul.gortmaker, hpa, akpm, ppc-dev
In-Reply-To: <20120329135555.06593144b65bf81cc9191f8a@canb.auug.org.au>
[-- Attachment #1: Type: text/plain, Size: 2677 bytes --]
Hi all,
On Thu, 29 Mar 2012 13:55:55 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> On Thu, 29 Mar 2012 13:50:44 +1100 Michael Neuling <mikey@neuling.org> wrote:
> >
> > > Here are a bunch of patches to disintegrate asm/system.h into a set of separate
> > > bits to relieve the problem of circular inclusion dependencies.
> > >
> > > The following changes since commit 437538267b672f9320833907f1b5acbb2605f4be:
> > >
> > > Merge tag 'fbdev-updates-for-3.4' of git://github.com/schandinat/linux-2.6 (2012-03-22 20:43:40 -0700)
> > >
> > > are available in the git repository at:
> > >
> > > git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-asm_system.git split-asm-system_h
> >
> > It would have been nice to have this in linux-next for a day or two to
> > sort out the merge issues, hence....
>
> Um, what can I say but "yeah, it would have been nice" :-(
The following patch fixes (as much as possible) a powerpc allyesconfig build.
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 29 Mar 2012 14:58:10 +1100
Subject: [PATCH] powerpc: fix fallout from system.h split up
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
arch/powerpc/kernel/fadump.c | 2 ++
arch/powerpc/kernel/kgdb.c | 1 +
kernel/irq/irqdomain.c | 3 +++
3 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
index cfe7a38..18bdf74 100644
--- a/arch/powerpc/kernel/fadump.c
+++ b/arch/powerpc/kernel/fadump.c
@@ -40,6 +40,8 @@
#include <asm/prom.h>
#include <asm/rtas.h>
#include <asm/fadump.h>
+#include <asm/debug.h>
+#include <asm/setup.h>
static struct fw_dump fw_dump;
static struct fadump_mem_struct fdm;
diff --git a/arch/powerpc/kernel/kgdb.c b/arch/powerpc/kernel/kgdb.c
index 76a6e40..782bd0a 100644
--- a/arch/powerpc/kernel/kgdb.c
+++ b/arch/powerpc/kernel/kgdb.c
@@ -24,6 +24,7 @@
#include <asm/current.h>
#include <asm/processor.h>
#include <asm/machdep.h>
+#include <asm/debug.h>
/*
* This table contains the mapping between PowerPC hardware trap types, and
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index af48e59..1f94ddf 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -12,6 +12,9 @@
#include <linux/slab.h>
#include <linux/smp.h>
#include <linux/fs.h>
+#ifdef CONFIG_VIRQ_DEBUG
+#include <asm/debug.h>
+#endif
#define IRQ_DOMAIN_MAP_LEGACY 0 /* driver allocated fixed range of irqs.
* ie. legacy 8259, gets irqs 1..15 */
--
1.7.9.1
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply related
* Re: bpf_slow_path: sibling call to `skb_copy_bits' not allowed multiple TOCs (ppc)
From: Stephen Rothwell @ 2012-03-29 3:30 UTC (permalink / raw)
To: Paul Gortmaker; +Cc: netdev, linux-next, linuxppc-dev
In-Reply-To: <CAP=VYLqwbjNDQ-TTbs_6cH4X2MMzy=MAFy4=R116zGL8a6qUag@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 814 bytes --]
Hi Paul,
On Wed, 28 Mar 2012 20:54:56 -0400 Paul Gortmaker <paul.gortmaker@windriver.com> wrote:
>
> coverage. Even in the absence of the skb error, it still fails to link with:
>
> "powerpc-linux-ld: TOC section size exceeds 64k"
>
> i.e. it never links into anything a person could actually try and boot anyway.
>
> So, just knowing "yes that is bogus because you've got a giant kernel
> with multiple TOC" would be useful information here.
This last message has been known for a long time and would require us to
change the way we link the kernel to fix. I had a go at it a year or so
ago, but ran into binutils bugs :-(
The other message may be a result of the TOC section size problem, but I
am not sure.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* bpf_slow_path: sibling call to `skb_copy_bits' not allowed multiple TOCs (ppc)
From: Paul Gortmaker @ 2012-03-29 0:54 UTC (permalink / raw)
To: netdev; +Cc: linuxppc-dev, linux-next
Hi all,
Wondering if anyone has researched this, before I waste more time on it.
The linux-next build of powerpc-allyesconfig has for quite some time shown this:
LD .tmp_vmlinux1
powerpc-linux-ld: arch/powerpc/net/built-in.o: In function `bpf_slow_path_word':
(.text+0x90): sibling call optimization to `skb_copy_bits' does not
allow automatic
multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or
make `skb_copy_bits' extern
We get the same error for s/word/half/ and s/word/byte/ and s/word/msh/
Visually "bisecting" the linux-next builds shows the following:
good: Dec 7th, 2011: http://kisskb.ellerman.id.au/kisskb/buildresult/5059024/
bad: Dec 8th, 2011: http://kisskb.ellerman.id.au/kisskb/buildresult/5062069/
I wouldn't be surprised if this was some kind of size thing that doesn't matter
in the real world, as the powerpc-allyesconfig is really only of value for build
coverage. Even in the absence of the skb error, it still fails to link with:
"powerpc-linux-ld: TOC section size exceeds 64k"
i.e. it never links into anything a person could actually try and boot anyway.
So, just knowing "yes that is bogus because you've got a giant kernel
with multiple TOC" would be useful information here.
Thanks,
Paul.
^ permalink raw reply
* Re: [patch 1/2] powerpc/eeh: remove eeh_event_handler()->daemonize()
From: Benjamin Herrenschmidt @ 2012-03-28 23:22 UTC (permalink / raw)
To: akpm; +Cc: tj, linuxppc-dev, linasvepstas, matt.fleming, oleg
In-Reply-To: <20120328222057.B749EA0363@akpm.mtv.corp.google.com>
On Wed, 2012-03-28 at 15:20 -0700, akpm@linux-foundation.org wrote:
> From: Oleg Nesterov <oleg@redhat.com>
> Subject: powerpc/eeh: remove eeh_event_handler()->daemonize()
>
> daemonize() is only needed when a user-space task does kernel_thread().
>
> eeh_event_handler() thread is created by the worker kthread, and thus it
> doesn't need the soon-to-be-deprecated daemonize().
For some reason I thought you were sending that directly to Linus, but
looking at your CC list that's obviously not the case :-) I'll send
them myself.
Cheers,
Ben.
> Signed-off-by: Oleg Nesterov <oleg@redhat.com>
> Acked-by: Linas Vepstas <linasvepstas@gmail.com>
> Acked-by: Tejun Heo <tj@kernel.org>
> Acked-by: Matt Fleming <matt.fleming@intel.com>
> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
> arch/powerpc/platforms/pseries/eeh_event.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff -puN arch/powerpc/platforms/pseries/eeh_event.c~powerpc-eeh-remove-eeh_event_handler-daemonize arch/powerpc/platforms/pseries/eeh_event.c
> --- a/arch/powerpc/platforms/pseries/eeh_event.c~powerpc-eeh-remove-eeh_event_handler-daemonize
> +++ a/arch/powerpc/platforms/pseries/eeh_event.c
> @@ -59,7 +59,7 @@ static int eeh_event_handler(void * dumm
> struct eeh_event *event;
> struct eeh_dev *edev;
>
> - daemonize("eehd");
> + set_task_comm(current, "eehd");
> set_current_state(TASK_INTERRUPTIBLE);
>
> spin_lock_irqsave(&eeh_eventlist_lock, flags);
> _
^ permalink raw reply
* [patch 1/2] powerpc/eeh: remove eeh_event_handler()->daemonize()
From: akpm @ 2012-03-28 22:20 UTC (permalink / raw)
To: benh; +Cc: matt.fleming, oleg, linuxppc-dev, tj, akpm, linasvepstas
From: Oleg Nesterov <oleg@redhat.com>
Subject: powerpc/eeh: remove eeh_event_handler()->daemonize()
daemonize() is only needed when a user-space task does kernel_thread().
eeh_event_handler() thread is created by the worker kthread, and thus it
doesn't need the soon-to-be-deprecated daemonize().
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Linas Vepstas <linasvepstas@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Acked-by: Matt Fleming <matt.fleming@intel.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
arch/powerpc/platforms/pseries/eeh_event.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -puN arch/powerpc/platforms/pseries/eeh_event.c~powerpc-eeh-remove-eeh_event_handler-daemonize arch/powerpc/platforms/pseries/eeh_event.c
--- a/arch/powerpc/platforms/pseries/eeh_event.c~powerpc-eeh-remove-eeh_event_handler-daemonize
+++ a/arch/powerpc/platforms/pseries/eeh_event.c
@@ -59,7 +59,7 @@ static int eeh_event_handler(void * dumm
struct eeh_event *event;
struct eeh_dev *edev;
- daemonize("eehd");
+ set_task_comm(current, "eehd");
set_current_state(TASK_INTERRUPTIBLE);
spin_lock_irqsave(&eeh_eventlist_lock, flags);
_
^ permalink raw reply
* [patch 2/2] arch/powerpc/platforms/pseries/eeh_event.c: slightly fix set_current_state() wart
From: akpm @ 2012-03-28 22:20 UTC (permalink / raw)
To: benh; +Cc: linuxppc-dev, akpm, paulus
From: Andrew Morton <akpm@linux-foundation.org>
Subject: arch/powerpc/platforms/pseries/eeh_event.c: slightly fix set_current_state() wart
That set_current_state() won't work very well: the subsequent mutex_lock()
might flip the task back into TASK_RUNNING.
Attempt to put it somewhere where it might have been meant to be, and
attempt to describe why it might have been added.
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
arch/powerpc/platforms/pseries/eeh_event.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -puN arch/powerpc/platforms/pseries/eeh_event.c~arch-powerpc-platforms-pseries-eeh_eventc-slightly-fix-set_current_state-wart arch/powerpc/platforms/pseries/eeh_event.c
--- a/arch/powerpc/platforms/pseries/eeh_event.c~arch-powerpc-platforms-pseries-eeh_eventc-slightly-fix-set_current_state-wart
+++ a/arch/powerpc/platforms/pseries/eeh_event.c
@@ -60,7 +60,6 @@ static int eeh_event_handler(void * dumm
struct eeh_dev *edev;
set_task_comm(current, "eehd");
- set_current_state(TASK_INTERRUPTIBLE);
spin_lock_irqsave(&eeh_eventlist_lock, flags);
event = NULL;
@@ -83,6 +82,7 @@ static int eeh_event_handler(void * dumm
printk(KERN_INFO "EEH: Detected PCI bus error on device %s\n",
eeh_pci_name(edev->pdev));
+ set_current_state(TASK_INTERRUPTIBLE); /* Don't add to load average */
edev = handle_eeh_events(event);
eeh_clear_slot(eeh_dev_to_of_node(edev), EEH_MODE_RECOVERING);
_
^ 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