From: Robert Berger <hidden> Date: 2012-10-18 17:45:13
FYI:
When I replace arch/powerpc/sysdev/ppc4xx_msi.c from a 3.6 kernel with a
ppc4xx_msi.c from 47da421981571c69ef29740cc55fa7248682e167 it boots from
nfs with a defconfig, so this seems to be the guilty one.
Please find attached the difference between the good and bad
ppc4xx_msi.c files.
I'll be happy to test your patches;)
Regards,
Robert
The above changes look bad. The first one is stupid, the second one is clearly broken.
The diff us from good to bad right ? Looks like somebody added a very busted patch.
If I look at the code in current upstream, I see:
mtdcri(SDR0, *sdr_addr, upper_32_bits(res.start)); /*HIGH addr */
mtdcri(SDR0, *sdr_addr + 1, lower_32_bits(res.start)); /* Low addr */
msi->msi_dev = of_find_node_by_name(NULL, "ppc4xx-msi");
if (!msi->msi_dev)
return -ENODEV;
Which looks correct. So this might be something specific to ELDK ?
Cheers,
Ben.
The above changes look bad. The first one is stupid, the second one is clearly broken.
The diff us from good to bad right ? Looks like somebody added a very busted patch.
this (from 3.6) does not work:
- mtdcri(SDR0, *sdr_addr, upper_32_bits(res.start)); /*HIGH
addr */
- mtdcri(SDR0, *sdr_addr + 1, lower_32_bits(res.start)); /* Low
addr */
The good old file (which works) is this:
+ SDR0_WRITE(sdr_addr, (u64)res.start >> 32); /*HIGH addr */
+ SDR0_WRITE(sdr_addr + 1, res.start & 0xFFFFFFFF); /* Low addr */
+
If I look at the code in current upstream, I see:
mtdcri(SDR0, *sdr_addr, upper_32_bits(res.start)); /*HIGH addr */
mtdcri(SDR0, *sdr_addr + 1, lower_32_bits(res.start)); /* Low addr */
msi->msi_dev = of_find_node_by_name(NULL, "ppc4xx-msi");
if (!msi->msi_dev)
return -ENODEV;
Which looks correct. So this might be something specific to ELDK ?
I will be on the road from tomorrow for a week or so, but maybe I can
isolate the exact lines which break it. I can also try a newer compiler
to see if this changes anything.
Is there someone out there with a kilauea board who can boot a 3.6.
mainline kernel with a default config with a rootfs over nfs?
@@ -150,12 +157,11 @@ static int ppc4xx_setup_pcieh_hw(struct
platform_device *dev,
if (!sdr_addr)
return -1;
- SDR0_WRITE(sdr_addr, (u64)res.start >> 32); /*HIGH addr */
- SDR0_WRITE(sdr_addr + 1, res.start & 0xFFFFFFFF); /* Low addr */
-
+ mtdcri(SDR0, *sdr_addr, upper_32_bits(res.start)); /*HIGH addr
*/
+ mtdcri(SDR0, *sdr_addr + 1, lower_32_bits(res.start)); /* Low addr
*/
msi->msi_dev = of_find_node_by_name(NULL, "ppc4xx-msi");
- if (msi->msi_dev)
+ if (!msi->msi_dev)
return -ENODEV;
msi->msi_regs = of_iomap(msi->msi_dev, 0);
1. The first few lines: change from SDR0_WRITE to mtdcri since the old one
cause crash. I use ELDK 4.2.
2. The second one should mean that: if not find any node then return error.
So it should be "!msi->msi_dev"
Regards,
Mai La.
On Fri, Oct 19, 2012 at 3:05 AM, Robert Berger <robert.karl.berger@gmail.com
wrote:
Hi,
On 10/18/2012 10:03 PM, Benjamin Herrenschmidt wrote:
quoted
On Thu, 2012-10-18 at 20:45 +0300, Robert Berger wrote:
msi->msi_dev = of_find_node_by_name(NULL, "ppc4xx-msi");
if (!msi->msi_dev)
return -ENODEV;
Which looks correct. So this might be something specific to ELDK ?
I will be on the road from tomorrow for a week or so, but maybe I can
isolate the exact lines which break it. I can also try a newer compiler
to see if this changes anything.
Is there someone out there with a kilauea board who can boot a 3.6.
mainline kernel with a default config with a rootfs over nfs?
From: Robert Berger <hidden> Date: 2012-10-19 06:36:03
Hi,
On 10/19/2012 06:16 AM, Mai La wrote:
quoted hunk
Hi,
My patch was:
@@ -150,12 +157,11 @@ static int ppc4xx_setup_pcieh_hw(struct
platform_device *dev,
if (!sdr_addr)
return -1;
- SDR0_WRITE(sdr_addr, (u64)res.start >> 32); /*HIGH addr */
- SDR0_WRITE(sdr_addr + 1, res.start & 0xFFFFFFFF); /* Low addr */
-
+ mtdcri(SDR0, *sdr_addr, upper_32_bits(res.start)); /*HIGH
addr */
+ mtdcri(SDR0, *sdr_addr + 1, lower_32_bits(res.start)); /* Low
addr */
msi->msi_dev = of_find_node_by_name(NULL, "ppc4xx-msi");
- if (msi->msi_dev)
+ if (!msi->msi_dev)
return -ENODEV;
msi->msi_regs = of_iomap(msi->msi_dev, 0);
1. The first few lines: change from SDR0_WRITE to mtdcri since the old
one cause crash. I use ELDK 4.2.
The old one does not cause a crash for me. As I said on a kilauea board
with ELDK 4.2 a 3.6 kernel, default config and everything reverted to
the good old file I can boot happily with a rootfs from nfs.
If I use the file as it is in 3.6 I don't see the kernel booting. but it
crashes.
2. The second one should mean that: if not find any node then return
error. So it should be "!msi->msi_dev"
In the 3.6 kernel it's with ! the old file (which works for me) is
without the !
... very strange ...