tree: https://github.com/ammarfaizi2/linux-block tglx/devel/devmsi head: e2cf9a4421f6a876ff8d2bac1bda6e6e14fdf211 commit: a2507287abcb660d390abb403f5ed58c21b686ec [66/91] genirq/msi: Provide msi_create/free_device_irq_domain() config: arm-randconfig-r026-20221108 compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 463da45892e2d2a262277b91b96f5f8c05dc25d0) 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 arm cross compiling tool for clang build # apt-get install binutils-arm-linux-gnueabi # https://github.com/ammarfaizi2/linux-block/commit/a2507287abcb660d390abb403f5ed58c21b686ec git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block git fetch --no-tags ammarfaizi2-block tglx/devel/devmsi git checkout a2507287abcb660d390abb403f5ed58c21b686ec # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash kernel/irq/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All errors (new ones prefixed by >>): kernel/irq/msi.c:464:56: warning: operator '?:' has lower precedence than '+'; '+' will be evaluated first [-Wparentheses] desc = xa_load(&dev->msi.data->__store, base + pcimsi ? 0 : index); ~~~~~~~~~~~~~ ^ kernel/irq/msi.c:464:56: note: place parentheses around the '+' expression to silence this warning desc = xa_load(&dev->msi.data->__store, base + pcimsi ? 0 : index); ^ ( ) kernel/irq/msi.c:464:56: note: place parentheses around the '?:' expression to evaluate it first desc = xa_load(&dev->msi.data->__store, base + pcimsi ? 0 : index); ^ ( ) >> kernel/irq/msi.c:990:10: error: no member named 'dev' in 'struct irq_domain' domain->dev = dev; ~~~~~~ ^ 1 warning and 1 error generated. vim +990 kernel/irq/msi.c 895 896 /** 897 * msi_create_device_irq_domain - Create a device MSI interrupt domain 898 * @dev: Pointer to the device 899 * @domid: Domain id 900 * @template: MSI domain info bundle used as template 901 * @hwsize: Maximum number of MSI table entries (0 if unknown or unlimited) 902 * @domain_data: Optional pointer to domain specific data which is set in 903 * msi_domain_info::data 904 * @chip_data: Optional pointer to chip specific data which is set in 905 * msi_domain_info::chip_data 906 * 907 * Return: True on success, false otherwise 908 * 909 * There is no firmware node required for this interface because the per 910 * device domains are software constructs which are actually closer to the 911 * hardware reality than any firmware can describe them. 912 * 913 * The domain name and the irq chip name for a MSI device domain are 914 * composed by: "$(PREFIX)$(CHIPNAME)-$(DEVNAME)" 915 * 916 * $PREFIX: Optional prefix provided by the underlying MSI parent domain 917 * via msi_parent_ops::prefix. If that pointer is NULL the prefix 918 * is empty. 919 * $CHIPNAME: The name of the irq_chip in @template 920 * $DEVNAME: The name of the device 921 * 922 * This results in understandable chip names and hardware interrupt numbers 923 * in e.g. /proc/interrupts 924 * 925 * PCI-MSI-0000:00:1c.0 0-edge Parent domain has no prefix 926 * IR-PCI-MSI-0000:00:1c.4 0-edge Same with interrupt remapping prefix 'IR-' 927 * 928 * IR-PCI-MSIX-0000:3d:00.0 0-edge Hardware interrupt numbers reflect 929 * IR-PCI-MSIX-0000:3d:00.0 1-edge the real MSI-X index on that device 930 * IR-PCI-MSIX-0000:3d:00.0 2-edge 931 * 932 * On IMS domains the hardware interrupt number is either a table entry 933 * index or a purely software managed index but it is guaranteed to be 934 * unique. 935 * 936 * The domain pointer is stored in @dev::msi::data::__irqdomains[]. All 937 * subsequent operations on the domain depend on the domain id. 938 * 939 * The domain is automatically freed when the device is removed via devres 940 * in the context of @dev::msi::data freeing, but it can also be 941 * independently removed via @msi_remove_device_irq_domain(). 942 */ 943 bool msi_create_device_irq_domain(struct device *dev, unsigned int domid, 944 const struct msi_domain_template *template, 945 unsigned int hwsize, void *domain_data, 946 void *chip_data) 947 { 948 struct irq_domain *domain, *parent = dev->msi.domain; 949 const struct msi_parent_ops *pops; 950 struct msi_domain_template *bundle; 951 struct fwnode_handle *fwnode; 952 953 if (!irq_domain_is_msi_parent(parent)) 954 return false; 955 956 if (domid >= MSI_MAX_DEVICE_IRQDOMAINS) 957 return false; 958 959 bundle = kmemdup(template, sizeof(*bundle), GFP_KERNEL); 960 if (!bundle) 961 return false; 962 963 bundle->info.hwsize = hwsize ? hwsize : MSI_MAX_INDEX; 964 bundle->info.chip = &bundle->chip; 965 bundle->info.ops = &bundle->ops; 966 bundle->info.data = domain_data; 967 bundle->info.chip_data = chip_data; 968 969 pops = parent->msi_parent_ops; 970 snprintf(bundle->name, sizeof(bundle->name), "%s%s-%s", 971 pops->prefix ? : "", bundle->chip.name, dev_name(dev)); 972 bundle->chip.name = bundle->name; 973 974 fwnode = irq_domain_alloc_named_fwnode(bundle->name); 975 if (!fwnode) 976 goto free_bundle; 977 978 msi_lock_descs(dev); 979 980 if (WARN_ON_ONCE(msi_get_device_domain(dev, domid))) 981 goto fail; 982 983 if (!pops->init_dev_msi_info(dev, parent, parent, &bundle->info)) 984 goto fail; 985 986 domain = __msi_create_irq_domain(fwnode, &bundle->info, IRQ_DOMAIN_FLAG_MSI_DEVICE, parent); 987 if (!domain) 988 goto fail; 989 > 990 domain->dev = dev; 991 dev->msi.data->__irqdomains[domid] = domain; 992 msi_unlock_descs(dev); 993 return true; 994 995 fail: 996 msi_unlock_descs(dev); 997 kfree(fwnode); 998 free_bundle: 999 kfree(bundle); 1000 return false; 1001 } 1002 -- 0-DAY CI Kernel Test Service https://01.org/lkp