Re: [kbuild-all] [PATCH 4/5 v2] pseries/iommu: implement DDW-aware dma_get_page_shift
Hi Michael, > > > > How did the robot decide to build this series in the first place? Does > > > > it build > > > > everything sent to one of the lists on CC? > > > > > > Yes, currently the following mailing lists are subscribed. Patches > > > sent to them will be tested if they can be git-am to RC or linux-next > > > kernels: > > > > > > kvm > > > linux-acpi > > > linux-bluetooth > > > linux-btrfs > > > linux-embedded > > > linux-ext4 > > > linux-fsdevel > > > linux-media > > > linux-mmc > > > linux-nfs > > > linux-omap > > > linux-pci > > > linux-pm > > > linux-raid > > > linux-rdma > > > linux-scsi > > > linux-usb > > > linux-wireless > > > netdev > > > netfilter-devel > > > linux-mm > > > driverdev-devel > > > intel-gfx > > > > And of course linux-kernel. More lists could be added in future. > > So do you mind adding linuxppc-dev@lists.ozlabs.org ? :) > > It's pretty low traffic compared to lkml. Sure, I'm subscribing to it. :) Thanks, Fengguang ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [kbuild-all] [PATCH 4/5 v2] pseries/iommu: implement DDW-aware dma_get_page_shift
On Sun, 2015-10-11 at 22:22 +0800, Fengguang Wu wrote: > > > > So do you mind adding linuxppc-dev@lists.ozlabs.org ? :) > > > > It's pretty low traffic compared to lkml. > > Sure, I'm subscribing to it. :) Thanks. cheers ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [kbuild-all] [PATCH 4/5 v2] pseries/iommu: implement DDW-aware dma_get_page_shift
Hi Fengguang, I think this proactive testing does a little more harm than good in it's current form. While offering testing for patches that aren't in git trees and or by people that don't even have a git tree that the build bots known about does seem useful, blindly doing it for every patch against something that most likely isn't the right base seems counter intertuitive. We'll probaby need some annotation in the O/n mail that asks for a test and sets a base tree to actually make it useful. With those few tweaks it should be really useful! Maybe we should have a discussion about this at kernel summit? On Thu, Oct 08, 2015 at 09:16:09AM +0800, Fengguang Wu wrote: > And of course linux-kernel. More lists could be added in future. > > Thanks, > Fengguang ---end quoted text--- ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [kbuild-all] [PATCH 4/5 v2] pseries/iommu: implement DDW-aware dma_get_page_shift
On Wed, 2015-10-07 at 21:56 +0800, Fengguang Wu wrote: > On Tue, Oct 06, 2015 at 02:39:06PM +1100, Michael Ellerman wrote: > > On Sat, 2015-10-03 at 04:33 +0800, kbuild test robot wrote: > > > Hi Nishanth, > > > > > > [auto build test results on v4.3-rc3 -- if it's inappropriate base, > > > please ignore] > > > > > > config: powerpc-defconfig (attached as .config) > > > reproduce: > > > wget > > > https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross > > > -O ~/bin/make.cross > > > chmod +x ~/bin/make.cross > > > # save the attached .config to linux build tree > > > make.cross ARCH=powerpc > > > > > > All error/warnings (new ones prefixed by >>): > > > > > >arch/powerpc/platforms/pseries/iommu.c: In function > > > 'iommu_init_early_pSeries': > > > >> arch/powerpc/platforms/pseries/iommu.c:1433:9: error: 'struct > > > >> machdep_calls' has no member named 'dma_get_page_shift' > > > ppc_md.dma_get_page_shift = dma_get_page_shift_pSeriesLP; > > > > It was added in patch 3/5, so I think this error is bogus. Unless there's a > > typo I'm missing? > > Yes sorry, the patchset was not detected correctly in your case, > ending up the patches being tested as individual ones. > > I'll fixup the robot. Thanks. How did the robot decide to build this series in the first place? Does it build everything sent to one of the lists on CC? cheers ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [kbuild-all] [PATCH 4/5 v2] pseries/iommu: implement DDW-aware dma_get_page_shift
On Thu, 2015-10-08 at 09:16 +0800, Fengguang Wu wrote: > On Thu, Oct 08, 2015 at 09:06:03AM +0800, Fengguang Wu wrote: > > On Thu, Oct 08, 2015 at 11:11:59AM +1100, Michael Ellerman wrote: > > > On Wed, 2015-10-07 at 21:56 +0800, Fengguang Wu wrote: > > > > On Tue, Oct 06, 2015 at 02:39:06PM +1100, Michael Ellerman wrote: > > > > > On Sat, 2015-10-03 at 04:33 +0800, kbuild test robot wrote: > > > > > > Hi Nishanth, > > > > > > > > > > > > [auto build test results on v4.3-rc3 -- if it's inappropriate base, > > > > > > please ignore] > > > > > > > > > > > > config: powerpc-defconfig (attached as .config) > > > > > > reproduce: > > > > > > wget > > > > > > https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross > > > > > > -O ~/bin/make.cross > > > > > > chmod +x ~/bin/make.cross > > > > > > # save the attached .config to linux build tree > > > > > > make.cross ARCH=powerpc > > > > > > > > > > > > All error/warnings (new ones prefixed by >>): > > > > > > > > > > > >arch/powerpc/platforms/pseries/iommu.c: In function > > > > > > 'iommu_init_early_pSeries': > > > > > > >> arch/powerpc/platforms/pseries/iommu.c:1433:9: error: 'struct > > > > > > >> machdep_calls' has no member named 'dma_get_page_shift' > > > > > > ppc_md.dma_get_page_shift = dma_get_page_shift_pSeriesLP; > > > > > > > > > > It was added in patch 3/5, so I think this error is bogus. Unless > > > > > there's a > > > > > typo I'm missing? > > > > > > > > Yes sorry, the patchset was not detected correctly in your case, > > > > ending up the patches being tested as individual ones. > > > > > > > > I'll fixup the robot. > > > > > > Thanks. > > > > > > How did the robot decide to build this series in the first place? Does it > > > build > > > everything sent to one of the lists on CC? > > > > Yes, currently the following mailing lists are subscribed. Patches > > sent to them will be tested if they can be git-am to RC or linux-next > > kernels: > > > > kvm > > linux-acpi > > linux-bluetooth > > linux-btrfs > > linux-embedded > > linux-ext4 > > linux-fsdevel > > linux-media > > linux-mmc > > linux-nfs > > linux-omap > > linux-pci > > linux-pm > > linux-raid > > linux-rdma > > linux-scsi > > linux-usb > > linux-wireless > > netdev > > netfilter-devel > > linux-mm > > driverdev-devel > > intel-gfx > > And of course linux-kernel. More lists could be added in future. So do you mind adding linuxppc-dev@lists.ozlabs.org ? :) It's pretty low traffic compared to lkml. cheers ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [kbuild-all] [PATCH 4/5 v2] pseries/iommu: implement DDW-aware dma_get_page_shift
On Thu, Oct 08, 2015 at 09:06:03AM +0800, Fengguang Wu wrote: > On Thu, Oct 08, 2015 at 11:11:59AM +1100, Michael Ellerman wrote: > > On Wed, 2015-10-07 at 21:56 +0800, Fengguang Wu wrote: > > > On Tue, Oct 06, 2015 at 02:39:06PM +1100, Michael Ellerman wrote: > > > > On Sat, 2015-10-03 at 04:33 +0800, kbuild test robot wrote: > > > > > Hi Nishanth, > > > > > > > > > > [auto build test results on v4.3-rc3 -- if it's inappropriate base, > > > > > please ignore] > > > > > > > > > > config: powerpc-defconfig (attached as .config) > > > > > reproduce: > > > > > wget > > > > > https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross > > > > > -O ~/bin/make.cross > > > > > chmod +x ~/bin/make.cross > > > > > # save the attached .config to linux build tree > > > > > make.cross ARCH=powerpc > > > > > > > > > > All error/warnings (new ones prefixed by >>): > > > > > > > > > >arch/powerpc/platforms/pseries/iommu.c: In function > > > > > 'iommu_init_early_pSeries': > > > > > >> arch/powerpc/platforms/pseries/iommu.c:1433:9: error: 'struct > > > > > >> machdep_calls' has no member named 'dma_get_page_shift' > > > > > ppc_md.dma_get_page_shift = dma_get_page_shift_pSeriesLP; > > > > > > > > It was added in patch 3/5, so I think this error is bogus. Unless > > > > there's a > > > > typo I'm missing? > > > > > > Yes sorry, the patchset was not detected correctly in your case, > > > ending up the patches being tested as individual ones. > > > > > > I'll fixup the robot. > > > > Thanks. > > > > How did the robot decide to build this series in the first place? Does it > > build > > everything sent to one of the lists on CC? > > Yes, currently the following mailing lists are subscribed. Patches > sent to them will be tested if they can be git-am to RC or linux-next > kernels: > > kvm > linux-acpi > linux-bluetooth > linux-btrfs > linux-embedded > linux-ext4 > linux-fsdevel > linux-media > linux-mmc > linux-nfs > linux-omap > linux-pci > linux-pm > linux-raid > linux-rdma > linux-scsi > linux-usb > linux-wireless > netdev > netfilter-devel > linux-mm > driverdev-devel > intel-gfx And of course linux-kernel. More lists could be added in future. Thanks, Fengguang ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [kbuild-all] [PATCH 4/5 v2] pseries/iommu: implement DDW-aware dma_get_page_shift
On Thu, Oct 08, 2015 at 11:11:59AM +1100, Michael Ellerman wrote: > On Wed, 2015-10-07 at 21:56 +0800, Fengguang Wu wrote: > > On Tue, Oct 06, 2015 at 02:39:06PM +1100, Michael Ellerman wrote: > > > On Sat, 2015-10-03 at 04:33 +0800, kbuild test robot wrote: > > > > Hi Nishanth, > > > > > > > > [auto build test results on v4.3-rc3 -- if it's inappropriate base, > > > > please ignore] > > > > > > > > config: powerpc-defconfig (attached as .config) > > > > reproduce: > > > > wget > > > > https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross > > > > -O ~/bin/make.cross > > > > chmod +x ~/bin/make.cross > > > > # save the attached .config to linux build tree > > > > make.cross ARCH=powerpc > > > > > > > > All error/warnings (new ones prefixed by >>): > > > > > > > >arch/powerpc/platforms/pseries/iommu.c: In function > > > > 'iommu_init_early_pSeries': > > > > >> arch/powerpc/platforms/pseries/iommu.c:1433:9: error: 'struct > > > > >> machdep_calls' has no member named 'dma_get_page_shift' > > > > ppc_md.dma_get_page_shift = dma_get_page_shift_pSeriesLP; > > > > > > It was added in patch 3/5, so I think this error is bogus. Unless there's > > > a > > > typo I'm missing? > > > > Yes sorry, the patchset was not detected correctly in your case, > > ending up the patches being tested as individual ones. > > > > I'll fixup the robot. > > Thanks. > > How did the robot decide to build this series in the first place? Does it > build > everything sent to one of the lists on CC? Yes, currently the following mailing lists are subscribed. Patches sent to them will be tested if they can be git-am to RC or linux-next kernels: kvm linux-acpi linux-bluetooth linux-btrfs linux-embedded linux-ext4 linux-fsdevel linux-media linux-mmc linux-nfs linux-omap linux-pci linux-pm linux-raid linux-rdma linux-scsi linux-usb linux-wireless netdev netfilter-devel linux-mm driverdev-devel intel-gfx Thanks, Fengguang ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [kbuild-all] [PATCH 4/5 v2] pseries/iommu: implement DDW-aware dma_get_page_shift
On Tue, Oct 06, 2015 at 02:39:06PM +1100, Michael Ellerman wrote: > On Sat, 2015-10-03 at 04:33 +0800, kbuild test robot wrote: > > Hi Nishanth, > > > > [auto build test results on v4.3-rc3 -- if it's inappropriate base, please > > ignore] > > > > config: powerpc-defconfig (attached as .config) > > reproduce: > > wget > > https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross > > -O ~/bin/make.cross > > chmod +x ~/bin/make.cross > > # save the attached .config to linux build tree > > make.cross ARCH=powerpc > > > > All error/warnings (new ones prefixed by >>): > > > >arch/powerpc/platforms/pseries/iommu.c: In function > > 'iommu_init_early_pSeries': > > >> arch/powerpc/platforms/pseries/iommu.c:1433:9: error: 'struct > > >> machdep_calls' has no member named 'dma_get_page_shift' > > ppc_md.dma_get_page_shift = dma_get_page_shift_pSeriesLP; > > It was added in patch 3/5, so I think this error is bogus. Unless there's a > typo I'm missing? Yes sorry, the patchset was not detected correctly in your case, ending up the patches being tested as individual ones. I'll fixup the robot. Thanks, Fengguang ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 4/5 v2] pseries/iommu: implement DDW-aware dma_get_page_shift
On Sat, 2015-10-03 at 04:33 +0800, kbuild test robot wrote: > Hi Nishanth, > > [auto build test results on v4.3-rc3 -- if it's inappropriate base, please > ignore] > > config: powerpc-defconfig (attached as .config) > reproduce: > wget > https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross > -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # save the attached .config to linux build tree > make.cross ARCH=powerpc > > All error/warnings (new ones prefixed by >>): > >arch/powerpc/platforms/pseries/iommu.c: In function > 'iommu_init_early_pSeries': > >> arch/powerpc/platforms/pseries/iommu.c:1433:9: error: 'struct > >> machdep_calls' has no member named 'dma_get_page_shift' > ppc_md.dma_get_page_shift = dma_get_page_shift_pSeriesLP; It was added in patch 3/5, so I think this error is bogus. Unless there's a typo I'm missing? cheers ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH 4/5 v2] pseries/iommu: implement DDW-aware dma_get_page_shift
When DDW (Dynamic DMA Windows) are present for a device, we have stored the TCE (Translation Control Entry) size in a special device tree property. Check if we have enabled DDW for the device and return the TCE size from that property if present. If the property isn't present, fallback to looking the value up in struct iommu_table. If we don't find a iommu_table, fallback to the kernel's page size. Signed-off-by: Nishanth Aravamudandiff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index 0946b98..1bf6471 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c @@ -1292,6 +1292,40 @@ static u64 dma_get_required_mask_pSeriesLP(struct device *dev) return dma_iommu_ops.get_required_mask(dev); } +static unsigned long dma_get_page_shift_pSeriesLP(struct device *dev) +{ + struct iommu_table *tbl; + + if (!disable_ddw && dev_is_pci(dev)) { + struct pci_dev *pdev = to_pci_dev(dev); + struct device_node *dn; + + dn = pci_device_to_OF_node(pdev); + + /* search upwards for ibm,dma-window */ + for (; dn && PCI_DN(dn) && !PCI_DN(dn)->table_group; + dn = dn->parent) + if (of_get_property(dn, "ibm,dma-window", NULL)) + break; + /* +* if there is a DDW configuration, the TCE shift is stored in +* the property +*/ + if (dn && PCI_DN(dn)) { + const struct dynamic_dma_window_prop *direct64 = + of_get_property(dn, DIRECT64_PROPNAME, NULL); + if (direct64) + return be32_to_cpu(direct64->tce_shift); + } + } + + tbl = get_iommu_table_base(dev); + if (tbl) + return tbl->it_page_shift; + + return PAGE_SHIFT; +} + #else /* CONFIG_PCI */ #define pci_dma_bus_setup_pSeries NULL #define pci_dma_dev_setup_pSeries NULL @@ -1299,6 +1333,7 @@ static u64 dma_get_required_mask_pSeriesLP(struct device *dev) #define pci_dma_dev_setup_pSeriesLPNULL #define dma_set_mask_pSeriesLP NULL #define dma_get_required_mask_pSeriesLPNULL +#define dma_get_page_shift_pSeriesLP NULL #endif /* !CONFIG_PCI */ static int iommu_mem_notifier(struct notifier_block *nb, unsigned long action, @@ -1395,6 +1430,7 @@ void iommu_init_early_pSeries(void) pseries_pci_controller_ops.dma_dev_setup = pci_dma_dev_setup_pSeriesLP; ppc_md.dma_set_mask = dma_set_mask_pSeriesLP; ppc_md.dma_get_required_mask = dma_get_required_mask_pSeriesLP; + ppc_md.dma_get_page_shift = dma_get_page_shift_pSeriesLP; } else { pseries_pci_controller_ops.dma_bus_setup = pci_dma_bus_setup_pSeries; pseries_pci_controller_ops.dma_dev_setup = pci_dma_dev_setup_pSeries; ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 4/5 v2] pseries/iommu: implement DDW-aware dma_get_page_shift
Hi Nishanth, [auto build test results on v4.3-rc3 -- if it's inappropriate base, please ignore] config: powerpc-defconfig (attached as .config) reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=powerpc All error/warnings (new ones prefixed by >>): arch/powerpc/platforms/pseries/iommu.c: In function 'iommu_init_early_pSeries': >> arch/powerpc/platforms/pseries/iommu.c:1433:9: error: 'struct machdep_calls' >> has no member named 'dma_get_page_shift' ppc_md.dma_get_page_shift = dma_get_page_shift_pSeriesLP; ^ vim +1433 arch/powerpc/platforms/pseries/iommu.c 1427 1428 if (firmware_has_feature(FW_FEATURE_LPAR)) { 1429 pseries_pci_controller_ops.dma_bus_setup = pci_dma_bus_setup_pSeriesLP; 1430 pseries_pci_controller_ops.dma_dev_setup = pci_dma_dev_setup_pSeriesLP; 1431 ppc_md.dma_set_mask = dma_set_mask_pSeriesLP; 1432 ppc_md.dma_get_required_mask = dma_get_required_mask_pSeriesLP; > 1433 ppc_md.dma_get_page_shift = > dma_get_page_shift_pSeriesLP; 1434 } else { 1435 pseries_pci_controller_ops.dma_bus_setup = pci_dma_bus_setup_pSeries; 1436 pseries_pci_controller_ops.dma_dev_setup = pci_dma_dev_setup_pSeries; --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: Binary data ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev