Re: [PATCH 1/2] genirq: add an affinity parameter to irq_create_mapping()
On 24/11/2020 23:19, Thomas Gleixner wrote: > On Tue, Nov 24 2020 at 21:03, Laurent Vivier wrote: >> This parameter is needed to pass it to irq_domain_alloc_descs(). >> >> This seems to have been missed by >> o06ee6d571f0e ("genirq: Add affinity hint to irq allocation") > > No, this has not been missed at all. There was and is no reason to do > this. > >> This is needed to implement proper support for multiqueue with >> pseries. > > And because pseries needs this _all_ callers need to be changed? > >> 123 files changed, 171 insertions(+), 146 deletions(-) > > Lots of churn for nothing. 99% of the callers will never need that. > > What's wrong with simply adding an interface which takes that parameter, > make the existing one an inline wrapper and and leave the rest alone? Nothing. I'm going to do like that. Thank you for your comment. Laurent
Re: [PATCH 1/2] genirq: add an affinity parameter to irq_create_mapping()
Hi Laurent, Thank you for the patch! Yet something to improve: [auto build test ERROR on gpio/for-next] [also build test ERROR on linus/master v5.10-rc5 next-20201124] [cannot apply to powerpc/next tip/irq/core] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Laurent-Vivier/powerpc-pseries-fix-MSI-X-IRQ-affinity-on-pseries/20201125-040537 base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git for-next config: powerpc64-randconfig-r024-20201124 (attached as .config) compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project df9ae5992889560a8f3c6760b54d5051b47c7bf5) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install powerpc64 cross compiling tool for clang build # apt-get install binutils-powerpc64-linux-gnu # https://github.com/0day-ci/linux/commit/86de9fd2e4f360722119b69bb2269330ae9e1d54 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Laurent-Vivier/powerpc-pseries-fix-MSI-X-IRQ-affinity-on-pseries/20201125-040537 git checkout 86de9fd2e4f360722119b69bb2269330ae9e1d54 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): In file included from drivers/mfd/wm831x-core.c:21: >> include/linux/mfd/wm831x/core.h:424:51: error: too few arguments to function >> call, expected 3, have 2 return irq_create_mapping(wm831x->irq_domain, irq); ~~^ include/linux/irqdomain.h:387:21: note: 'irq_create_mapping' declared here extern unsigned int irq_create_mapping(struct irq_domain *host, ^ 1 error generated. vim +424 include/linux/mfd/wm831x/core.h 7d4d0a3e7343e31 Mark Brown 2009-07-27 421 cd99758ba3bde64 Mark Brown 2012-05-14 422 static inline int wm831x_irq(struct wm831x *wm831x, int irq) cd99758ba3bde64 Mark Brown 2012-05-14 423 { cd99758ba3bde64 Mark Brown 2012-05-14 @424 return irq_create_mapping(wm831x->irq_domain, irq); cd99758ba3bde64 Mark Brown 2012-05-14 425 } cd99758ba3bde64 Mark Brown 2012-05-14 426 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip
Re: [PATCH 1/2] genirq: add an affinity parameter to irq_create_mapping()
Hi Laurent, Thank you for the patch! Yet something to improve: [auto build test ERROR on gpio/for-next] [also build test ERROR on linus/master v5.10-rc5 next-20201124] [cannot apply to powerpc/next tip/irq/core] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Laurent-Vivier/powerpc-pseries-fix-MSI-X-IRQ-affinity-on-pseries/20201125-040537 base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git for-next config: parisc-randconfig-r014-20201124 (attached as .config) compiler: hppa64-linux-gcc (GCC) 9.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/86de9fd2e4f360722119b69bb2269330ae9e1d54 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Laurent-Vivier/powerpc-pseries-fix-MSI-X-IRQ-affinity-on-pseries/20201125-040537 git checkout 86de9fd2e4f360722119b69bb2269330ae9e1d54 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): In file included from drivers/regulator/wm831x-dcdc.c:21: include/linux/mfd/wm831x/core.h: In function 'wm831x_irq': >> include/linux/mfd/wm831x/core.h:424:9: error: too few arguments to function >> 'irq_create_mapping' 424 | return irq_create_mapping(wm831x->irq_domain, irq); | ^~ In file included from include/linux/acpi.h:13, from include/linux/i2c.h:13, from drivers/regulator/wm831x-dcdc.c:14: include/linux/irqdomain.h:387:21: note: declared here 387 | extern unsigned int irq_create_mapping(struct irq_domain *host, | ^~ In file included from drivers/regulator/wm831x-dcdc.c:21: include/linux/mfd/wm831x/core.h:425:1: error: control reaches end of non-void function [-Werror=return-type] 425 | } | ^ cc1: some warnings being treated as errors vim +/irq_create_mapping +424 include/linux/mfd/wm831x/core.h 7d4d0a3e7343e31 Mark Brown 2009-07-27 421 cd99758ba3bde64 Mark Brown 2012-05-14 422 static inline int wm831x_irq(struct wm831x *wm831x, int irq) cd99758ba3bde64 Mark Brown 2012-05-14 423 { cd99758ba3bde64 Mark Brown 2012-05-14 @424 return irq_create_mapping(wm831x->irq_domain, irq); cd99758ba3bde64 Mark Brown 2012-05-14 425 } cd99758ba3bde64 Mark Brown 2012-05-14 426 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip
Re: [PATCH 1/2] genirq: add an affinity parameter to irq_create_mapping()
On Tue, Nov 24 2020 at 21:03, Laurent Vivier wrote: > This parameter is needed to pass it to irq_domain_alloc_descs(). > > This seems to have been missed by > o06ee6d571f0e ("genirq: Add affinity hint to irq allocation") No, this has not been missed at all. There was and is no reason to do this. > This is needed to implement proper support for multiqueue with > pseries. And because pseries needs this _all_ callers need to be changed? > 123 files changed, 171 insertions(+), 146 deletions(-) Lots of churn for nothing. 99% of the callers will never need that. What's wrong with simply adding an interface which takes that parameter, make the existing one an inline wrapper and and leave the rest alone? Thanks, tglx
[PATCH 1/2] genirq: add an affinity parameter to irq_create_mapping()
This parameter is needed to pass it to irq_domain_alloc_descs(). This seems to have been missed by o06ee6d571f0e ("genirq: Add affinity hint to irq allocation") This is needed to implement proper support for multiqueue with pseries. All irq_create_mapping() callers have been updated with the help of the following coccinelle script: @@ expression a, b; @@ <... - irq_create_mapping(a, b) + irq_create_mapping(a, b, NULL) ...> With some manual changes to comply with checkpatch errors. No functional change. Signed-off-by: Laurent Vivier --- arch/arc/kernel/intc-arcv2.c | 4 ++-- arch/arc/kernel/mcip.c| 2 +- arch/arm/common/sa.c | 2 +- arch/arm/mach-s3c/irq-s3c24xx.c | 3 ++- arch/arm/plat-orion/gpio.c| 2 +- arch/mips/ath25/ar2315.c | 4 ++-- arch/mips/ath25/ar5312.c | 4 ++-- arch/mips/lantiq/irq.c| 2 +- arch/mips/pci/pci-ar2315.c| 3 ++- arch/mips/pic32/pic32mzda/time.c | 2 +- arch/mips/ralink/irq.c| 2 +- arch/powerpc/kernel/pci-common.c | 2 +- arch/powerpc/kvm/book3s_xive.c| 2 +- arch/powerpc/platforms/44x/ppc476.c | 4 ++-- arch/powerpc/platforms/cell/interrupt.c | 4 ++-- arch/powerpc/platforms/cell/iommu.c | 3 ++- arch/powerpc/platforms/cell/pmu.c | 2 +- arch/powerpc/platforms/cell/spider-pic.c | 2 +- arch/powerpc/platforms/cell/spu_manage.c | 6 +++--- arch/powerpc/platforms/maple/pci.c| 2 +- arch/powerpc/platforms/pasemi/dma_lib.c | 5 +++-- arch/powerpc/platforms/pasemi/msi.c | 2 +- arch/powerpc/platforms/pasemi/setup.c | 4 ++-- arch/powerpc/platforms/powermac/pci.c | 2 +- arch/powerpc/platforms/powermac/pic.c | 2 +- arch/powerpc/platforms/powermac/smp.c | 2 +- arch/powerpc/platforms/powernv/opal-irqchip.c | 5 +++-- arch/powerpc/platforms/powernv/pci.c | 2 +- arch/powerpc/platforms/powernv/vas.c | 2 +- arch/powerpc/platforms/ps3/interrupt.c| 2 +- arch/powerpc/platforms/pseries/ibmebus.c | 2 +- arch/powerpc/platforms/pseries/msi.c | 2 +- arch/powerpc/sysdev/fsl_mpic_err.c| 2 +- arch/powerpc/sysdev/fsl_msi.c | 2 +- arch/powerpc/sysdev/mpic.c| 3 ++- arch/powerpc/sysdev/mpic_u3msi.c | 2 +- arch/powerpc/sysdev/xics/xics-common.c| 2 +- arch/powerpc/sysdev/xive/common.c | 2 +- arch/sh/boards/mach-se/7343/irq.c | 2 +- arch/sh/boards/mach-se/7722/irq.c | 2 +- arch/sh/boards/mach-x3proto/gpio.c| 2 +- arch/xtensa/kernel/perf_event.c | 2 +- arch/xtensa/kernel/smp.c | 2 +- arch/xtensa/kernel/time.c | 2 +- drivers/ata/pata_macio.c | 2 +- drivers/base/regmap/regmap-irq.c | 2 +- drivers/bus/moxtet.c | 2 +- drivers/clocksource/ingenic-timer.c | 2 +- drivers/clocksource/timer-riscv.c | 2 +- drivers/extcon/extcon-max8997.c | 3 ++- drivers/gpio/gpio-bcm-kona.c | 2 +- drivers/gpio/gpio-brcmstb.c | 2 +- drivers/gpio/gpio-davinci.c | 2 +- drivers/gpio/gpio-em.c| 3 ++- drivers/gpio/gpio-grgpio.c| 2 +- drivers/gpio/gpio-mockup.c| 2 +- drivers/gpio/gpio-mpc8xxx.c | 2 +- drivers/gpio/gpio-mvebu.c | 2 +- drivers/gpio/gpio-tb10x.c | 2 +- drivers/gpio/gpio-tegra.c | 2 +- drivers/gpio/gpio-wm831x.c| 2 +- drivers/gpio/gpiolib.c| 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 3 ++- drivers/gpu/ipu-v3/ipu-common.c | 2 +- drivers/hid/hid-rmi.c | 2 +- drivers/i2c/busses/i2c-cht-wc.c | 2 +- drivers/i2c/i2c-core-base.c | 2 +- drivers/i2c/muxes/i2c-mux-pca954x.c | 2 +- drivers/ide/pmac.c| 2 +- drivers/iio/dummy/iio_dummy_evgen.c | 3 ++- drivers/input/rmi4/rmi_bus.c | 2 +- drivers/irqchip/irq-ath79-misc.c | 3 ++- drivers/irqchip/irq-bcm2835.c | 3 ++- drivers/irqchip/irq-csky-mpintc.c | 2 +- drivers/irqchip/irq-eznps.c | 2 +- drivers/irqchip/irq-mips-gic.c| 8 +--- drivers/irqchip/irq-mmp.c | 4 ++-- drivers/irqchip/irq-versatile-fpga.c | 2 +- drivers/irqchip/irq-vic.c | 2 +- drivers/macintosh/macio_asic.c| 2 +- drivers/memory/omap-gpmc.c| 2 +- drivers/mfd/ab8500-core.c