* Re: 3.4-rc3 compile failed on IBM Power6 [not found] <CAPxxNQmfkJLPHq0BvzxOnLFO-e0FRmaF1VqLhP-jMqF-ziM2tA@mail.gmail.com> @ 2012-04-25 0:54 ` Nishanth Aravamudan 2012-04-25 1:50 ` Gavin Shan 0 siblings, 1 reply; 4+ messages in thread From: Nishanth Aravamudan @ 2012-04-25 0:54 UTC (permalink / raw) To: Ryan Wang; +Cc: Nishanth Aravamudan, linuxppc-dev, linux-kernel, Gavin Shan Hi Ryan, Thanks for the report! On 25.04.2012 [08:22:19 +0800], Ryan Wang wrote: > # gcc --version > gcc (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3) > Copyright (C) 2010 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > platform : pSeries > model : IBM,9117-MMA > machine : CHRP IBM,9117-MMA <snip> > CC arch/powerpc/platforms/pseries/iommu.o > /usr/src/kernels/linux/arch/powerpc/platforms/pseries/iommu.c: In function > ?query_ddw?: > /usr/src/kernels/linux/arch/powerpc/platforms/pseries/iommu.c:823: error: > implicit declaration of function ?pci_dev_to_eeh_dev? > /usr/src/kernels/linux/arch/powerpc/platforms/pseries/iommu.c:823: warning: > assignment makes pointer from integer without a cast > /usr/src/kernels/linux/arch/powerpc/platforms/pseries/iommu.c:824: error: > dereferencing pointer to incomplete type > /usr/src/kernels/linux/arch/powerpc/platforms/pseries/iommu.c:825: error: > dereferencing pointer to incomplete type > /usr/src/kernels/linux/arch/powerpc/platforms/pseries/iommu.c:826: error: > dereferencing pointer to incomplete type > /usr/src/kernels/linux/arch/powerpc/platforms/pseries/iommu.c:827: error: > dereferencing pointer to incomplete type > /usr/src/kernels/linux/arch/powerpc/platforms/pseries/iommu.c: In function > ?create_ddw?: > /usr/src/kernels/linux/arch/powerpc/platforms/pseries/iommu.c:852: warning: > assignment makes pointer from integer without a cast > /usr/src/kernels/linux/arch/powerpc/platforms/pseries/iommu.c:853: error: > dereferencing pointer to incomplete type > /usr/src/kernels/linux/arch/powerpc/platforms/pseries/iommu.c:854: error: > dereferencing pointer to incomplete type > /usr/src/kernels/linux/arch/powerpc/platforms/pseries/iommu.c:855: error: > dereferencing pointer to incomplete type > /usr/src/kernels/linux/arch/powerpc/platforms/pseries/iommu.c:856: error: > dereferencing pointer to incomplete type > make[3]: *** [arch/powerpc/platforms/pseries/iommu.o] Error 1 > make[2]: *** [arch/powerpc/platforms/pseries] Error 2 > make[1]: *** [arch/powerpc/platforms] Error 2 > make: *** [sub-make] Error 2 Do you have CONFIG_EEH set in your .config? I'm guessing not, and that causes pci.h to not define pci_dev_to_eeh_dev(). Gavin, I think this is broken by your 39baadbf36cee3ede5fdb8a34006d9109e5e2570. Probably need a wrapper for pci_dev_to_eeh_dev() when !CONFIG_EEH? Actually, looking at it more, eeh_dev, which is protected by CONFIG_EEH in arch/powerpc/include/asm/eeh.h won't be defined in such situations and is the type of the return from pci_dev_to_eeh_dev(). So that's going to be broken completely if !CONFIG_EEH as above. So maybe the callers should be EEH-unaware (as they were before) and the callee becomes of the EEH variety (at compile-time) if CONFIG_EEH is set? Thanks, Nish -- Nishanth Aravamudan <nacc@us.ibm.com> IBM Linux Technology Center ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 3.4-rc3 compile failed on IBM Power6 2012-04-25 0:54 ` 3.4-rc3 compile failed on IBM Power6 Nishanth Aravamudan @ 2012-04-25 1:50 ` Gavin Shan 2012-04-25 4:10 ` Benjamin Herrenschmidt 0 siblings, 1 reply; 4+ messages in thread From: Gavin Shan @ 2012-04-25 1:50 UTC (permalink / raw) To: Nishanth Aravamudan, Ryan Wang; +Cc: benh, linuxppc-dev, linux-kernel Hi Nish, >> # gcc --version >> gcc (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3) >> Copyright (C) 2010 Free Software Foundation, Inc. >> This is free software; see the source for copying conditions. There is NO >> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. >> >> platform : pSeries >> model : IBM,9117-MMA >> machine : CHRP IBM,9117-MMA > ><snip> > >> CC arch/powerpc/platforms/pseries/iommu.o >> /usr/src/kernels/linux/arch/powerpc/platforms/pseries/iommu.c: In function >> ?query_ddw?: >> /usr/src/kernels/linux/arch/powerpc/platforms/pseries/iommu.c:823: error: >> implicit declaration of function ?pci_dev_to_eeh_dev? >> /usr/src/kernels/linux/arch/powerpc/platforms/pseries/iommu.c:823: warning: >> assignment makes pointer from integer without a cast >> /usr/src/kernels/linux/arch/powerpc/platforms/pseries/iommu.c:824: error: >> dereferencing pointer to incomplete type >> /usr/src/kernels/linux/arch/powerpc/platforms/pseries/iommu.c:825: error: >> dereferencing pointer to incomplete type >> /usr/src/kernels/linux/arch/powerpc/platforms/pseries/iommu.c:826: error: >> dereferencing pointer to incomplete type >> /usr/src/kernels/linux/arch/powerpc/platforms/pseries/iommu.c:827: error: >> dereferencing pointer to incomplete type >> /usr/src/kernels/linux/arch/powerpc/platforms/pseries/iommu.c: In function >> ?create_ddw?: >> /usr/src/kernels/linux/arch/powerpc/platforms/pseries/iommu.c:852: warning: >> assignment makes pointer from integer without a cast >> /usr/src/kernels/linux/arch/powerpc/platforms/pseries/iommu.c:853: error: >> dereferencing pointer to incomplete type >> /usr/src/kernels/linux/arch/powerpc/platforms/pseries/iommu.c:854: error: >> dereferencing pointer to incomplete type >> /usr/src/kernels/linux/arch/powerpc/platforms/pseries/iommu.c:855: error: >> dereferencing pointer to incomplete type >> /usr/src/kernels/linux/arch/powerpc/platforms/pseries/iommu.c:856: error: >> dereferencing pointer to incomplete type >> make[3]: *** [arch/powerpc/platforms/pseries/iommu.o] Error 1 >> make[2]: *** [arch/powerpc/platforms/pseries] Error 2 >> make[1]: *** [arch/powerpc/platforms] Error 2 >> make: *** [sub-make] Error 2 > >Do you have CONFIG_EEH set in your .config? I'm guessing not, and that >causes pci.h to not define pci_dev_to_eeh_dev(). > >Gavin, I think this is broken by your >39baadbf36cee3ede5fdb8a34006d9109e5e2570. Probably need a wrapper for >pci_dev_to_eeh_dev() when !CONFIG_EEH? > >Actually, looking at it more, eeh_dev, which is protected by CONFIG_EEH >in arch/powerpc/include/asm/eeh.h won't be defined in such situations >and is the type of the return from pci_dev_to_eeh_dev(). So that's going >to be broken completely if !CONFIG_EEH as above. > I think it's because iommu.c depends on CONFIG_EEH heavily anyway with or without the fix 39baadbf36cee3ede5fdb8a34006d9109e5e2570. That means without CONFIG_EEH, iommu.c won't work properly even it can be compiled successfully :-) The story behind is that the PCI device is expected to be PE sensitive. While setting up its DMA (through IOMMU), the number of the PE to which the PCI device belongs to is passed to the related RTAS call. So the PE number of the PCI device is expected if possible. As I knew, the PE number of the PCI device is -ONLY- figured out by EEH. >So maybe the callers should be EEH-unaware (as they were before) and the >callee becomes of the EEH variety (at compile-time) if CONFIG_EEH is >set? > In order to make iommu.c irrelative to CONFIG_EEH, we might figure out the PE number of the PCI device during PCI probe time. Here're some rough thoughts about the rework. - Introduce additional field "int pe_num" to "struct dev_archdata". That would be traced like: (struct pci_dev)->(struct device dev) ->(struct dev_archdata archdata). - During the PCI probe time (maybe pci_fixup_early), we can figure out the PE number. Then we can retrieve the PE number of PCI device from "int pe_num" and needn't care CONFIG_EEH has been turned on or off. I'm not sure Ben has any comments on the idea? Thanks, Gavin ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 3.4-rc3 compile failed on IBM Power6 2012-04-25 1:50 ` Gavin Shan @ 2012-04-25 4:10 ` Benjamin Herrenschmidt 2012-04-25 5:50 ` Gavin Shan 0 siblings, 1 reply; 4+ messages in thread From: Benjamin Herrenschmidt @ 2012-04-25 4:10 UTC (permalink / raw) To: Gavin Shan; +Cc: Nishanth Aravamudan, Ryan Wang, linuxppc-dev, linux-kernel On Wed, 2012-04-25 at 09:50 +0800, Gavin Shan wrote: > In order to make iommu.c irrelative to CONFIG_EEH, we might figure out > the PE number of the PCI device during PCI probe time. Here're some > rough thoughts about the rework. > > - Introduce additional field "int pe_num" to "struct dev_archdata". > That would be traced like: (struct pci_dev)->(struct device dev) > ->(struct dev_archdata archdata). > - During the PCI probe time (maybe pci_fixup_early), we can figure > out the PE number. > > Then we can retrieve the PE number of PCI device from "int pe_num" and needn't > care CONFIG_EEH has been turned on or off. I'm not sure Ben has any comments > on the idea? Just select EEH from pseries Kconfig, no point in keeping that a user visible option. Cheers, Ben. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 3.4-rc3 compile failed on IBM Power6 2012-04-25 4:10 ` Benjamin Herrenschmidt @ 2012-04-25 5:50 ` Gavin Shan 0 siblings, 0 replies; 4+ messages in thread From: Gavin Shan @ 2012-04-25 5:50 UTC (permalink / raw) To: Benjamin Herrenschmidt Cc: Nishanth Aravamudan, Ryan Wang, linuxppc-dev, linux-kernel >> In order to make iommu.c irrelative to CONFIG_EEH, we might figure out >> the PE number of the PCI device during PCI probe time. Here're some >> rough thoughts about the rework. >> >> - Introduce additional field "int pe_num" to "struct dev_archdata". >> That would be traced like: (struct pci_dev)->(struct device dev) >> ->(struct dev_archdata archdata). >> - During the PCI probe time (maybe pci_fixup_early), we can figure >> out the PE number. >> >> Then we can retrieve the PE number of PCI device from "int pe_num" and needn't >> care CONFIG_EEH has been turned on or off. I'm not sure Ben has any comments >> on the idea? > >Just select EEH from pseries Kconfig, no point in keeping that a user visible option. > Thanks for the suggestion, Ben :-) I've sent one trivial patch against it. >Cheers, >Ben. > > Thanks, Gavin ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-04-25 5:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CAPxxNQmfkJLPHq0BvzxOnLFO-e0FRmaF1VqLhP-jMqF-ziM2tA@mail.gmail.com>
2012-04-25 0:54 ` 3.4-rc3 compile failed on IBM Power6 Nishanth Aravamudan
2012-04-25 1:50 ` Gavin Shan
2012-04-25 4:10 ` Benjamin Herrenschmidt
2012-04-25 5:50 ` Gavin Shan
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox