Re: [PATCH v10 20/20] x86/efi: EFI stub DRTM launch support for Secure Launch
Hi Ross, kernel test robot noticed the following build warnings: [auto build test WARNING on tip/x86/core] [also build test WARNING on char-misc/char-misc-testing char-misc/char-misc-next char-misc/char-misc-linus herbert-cryptodev-2.6/master efi/next linus/master v6.11-rc5] [cannot apply to herbert-crypto-2.6/master next-20240828] [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#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Ross-Philipson/Documentation-x86-Secure-Launch-kernel-documentation/20240827-065225 base: tip/x86/core patch link: https://lore.kernel.org/r/20240826223835.3928819-21-ross.philipson%40oracle.com patch subject: [PATCH v10 20/20] x86/efi: EFI stub DRTM launch support for Secure Launch config: i386-randconfig-062-20240828 (https://download.01.org/0day-ci/archive/20240829/202408290030.febuhhbr-...@intel.com/config) compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240829/202408290030.febuhhbr-...@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202408290030.febuhhbr-...@intel.com/ sparse warnings: (new ones prefixed by >>) >> drivers/firmware/efi/libstub/x86-stub.c:945:41: sparse: sparse: non >> size-preserving pointer to integer cast drivers/firmware/efi/libstub/x86-stub.c:953:65: sparse: sparse: non size-preserving pointer to integer cast >> drivers/firmware/efi/libstub/x86-stub.c:980:70: sparse: sparse: non >> size-preserving integer to pointer cast drivers/firmware/efi/libstub/x86-stub.c:1014:45: sparse: sparse: non size-preserving integer to pointer cast vim +945 drivers/firmware/efi/libstub/x86-stub.c 927 928 static bool efi_secure_launch_update_boot_params(struct slr_table *slrt, 929 struct boot_params *boot_params) 930 { 931 struct slr_entry_intel_info *txt_info; 932 struct slr_entry_policy *policy; 933 struct txt_os_mle_data *os_mle; 934 bool updated = false; 935 int i; 936 937 txt_info = slr_next_entry_by_tag(slrt, NULL, SLR_ENTRY_INTEL_INFO); 938 if (!txt_info) 939 return false; 940 941 os_mle = txt_os_mle_data_start((void *)txt_info->txt_heap); 942 if (!os_mle) 943 return false; 944 > 945 os_mle->boot_params_addr = (u64)boot_params; 946 947 policy = slr_next_entry_by_tag(slrt, NULL, SLR_ENTRY_ENTRY_POLICY); 948 if (!policy) 949 return false; 950 951 for (i = 0; i < policy->nr_entries; i++) { 952 if (policy->policy_entries[i].entity_type == SLR_ET_BOOT_PARAMS) { 953 policy->policy_entries[i].entity = (u64)boot_params; 954 updated = true; 955 break; 956 } 957 } 958 959 /* 960 * If this is a PE entry into EFI stub the mocked up boot params will 961 * be missing some of the setup header data needed for the second stage 962 * of the Secure Launch boot. 963 */ 964 if (image) { 965 struct setup_header *hdr = (struct setup_header *)((u8 *)image->image_base + 966 offsetof(struct boot_params, hdr)); 967 u64 cmdline_ptr; 968 969 boot_params->hdr.setup_sects = hdr->setup_sects; 970 boot_params->hdr.syssize = hdr->syssize; 971 boot_params->hdr.version = hdr->version; 972 boot_params->hdr.loadflags = hdr->loadflags; 973 boot_params->hdr.kernel_alignment = hdr->kernel_alignment; 974 boot_params->hdr.min_alignment = hdr->min_alignment; 975 boot_params->hdr.xloadflags = hdr->xloadflags; 976 boot_params->hdr.init_size = hdr->init_size; 977 boot_params->hdr.kernel_info_offset = hdr->kernel_info_offset; 978 efi_set_u64_form(boot_params->hdr.cmd_line_ptr, boot_params->ext_cmd_line_ptr, 979 &cmdline_ptr); > 980 boot_params->hdr.cmdline_size = strlen((const char > *)cmdline_ptr);
Re: [PATCH v10 20/20] x86/efi: EFI stub DRTM launch support for Secure Launch
Hi Ross, kernel test robot noticed the following build warnings: [auto build test WARNING on tip/x86/core] [also build test WARNING on char-misc/char-misc-testing char-misc/char-misc-next char-misc/char-misc-linus herbert-cryptodev-2.6/master efi/next linus/master v6.11-rc5] [cannot apply to herbert-crypto-2.6/master next-20240827] [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#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Ross-Philipson/Documentation-x86-Secure-Launch-kernel-documentation/20240827-065225 base: tip/x86/core patch link: https://lore.kernel.org/r/20240826223835.3928819-21-ross.philipson%40oracle.com patch subject: [PATCH v10 20/20] x86/efi: EFI stub DRTM launch support for Secure Launch config: i386-allmodconfig (https://download.01.org/0day-ci/archive/20240828/202408280656.66zxoool-...@intel.com/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240828/202408280656.66zxoool-...@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202408280656.66zxoool-...@intel.com/ All warnings (new ones prefixed by >>): drivers/firmware/efi/libstub/x86-stub.c: In function 'efi_secure_launch_update_boot_params': >> drivers/firmware/efi/libstub/x86-stub.c:941:40: warning: cast to pointer >> from integer of different size [-Wint-to-pointer-cast] 941 | os_mle = txt_os_mle_data_start((void *)txt_info->txt_heap); |^ drivers/firmware/efi/libstub/x86-stub.c:945:36: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 945 | os_mle->boot_params_addr = (u64)boot_params; |^ drivers/firmware/efi/libstub/x86-stub.c:953:60: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 953 | policy->policy_entries[i].entity = (u64)boot_params; |^ drivers/firmware/efi/libstub/x86-stub.c:980:56: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 980 | boot_params->hdr.cmdline_size = strlen((const char *)cmdline_ptr); |^ drivers/firmware/efi/libstub/x86-stub.c: In function 'efi_secure_launch': drivers/firmware/efi/libstub/x86-stub.c:1014:28: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 1014 | handler_callback = (dl_handler_func)dlinfo->dl_handler; |^ vim +941 drivers/firmware/efi/libstub/x86-stub.c 927 928 static bool efi_secure_launch_update_boot_params(struct slr_table *slrt, 929 struct boot_params *boot_params) 930 { 931 struct slr_entry_intel_info *txt_info; 932 struct slr_entry_policy *policy; 933 struct txt_os_mle_data *os_mle; 934 bool updated = false; 935 int i; 936 937 txt_info = slr_next_entry_by_tag(slrt, NULL, SLR_ENTRY_INTEL_INFO); 938 if (!txt_info) 939 return false; 940 > 941 os_mle = txt_os_mle_data_start((void *)txt_info->txt_heap); 942 if (!os_mle) 943 return false; 944 945 os_mle->boot_params_addr = (u64)boot_params; 946 947 policy = slr_next_entry_by_tag(slrt, NULL, SLR_ENTRY_ENTRY_POLICY); 948 if (!policy) 949 return false; 950 951 for (i = 0; i < policy->nr_entries; i++) { 952 if (policy->policy_entries[i].entity_type == SLR_ET_BOOT_PARAMS) { 953 policy->policy_entries[i].entity = (u64)boot_params; 954 updated = true; 955 break; 956 } 957 } 958 959 /* 960 * If this is a PE entry into EFI stub the mocked up boot params will 961 * be missing some of the setup header data needed for the second stage 962 * of the Secure Launch boot. 963 */ 964 if (image) { 965 struct setup_header *hdr = (struct setup_header *)((u8 *)image->image_base + 966 offsetof(struct boot_params, hdr)); 967 u64 cmdlin
Re: [PATCH v7 09/13] x86: Secure Launch SMP bringup support
Hi Ross, kernel test robot noticed the following build warnings: [auto build test WARNING on tip/x86/core] [also build test WARNING on herbert-cryptodev-2.6/master herbert-crypto-2.6/master linus/master v6.6 next-20231110] [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#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Ross-Philipson/x86-boot-Place-kernel_info-at-a-fixed-offset/2023-063453 base: tip/x86/core patch link: https://lore.kernel.org/r/20231110222751.219836-10-ross.philipson%40oracle.com patch subject: [PATCH v7 09/13] x86: Secure Launch SMP bringup support config: x86_64-rhel-8.3-rust (https://download.01.org/0day-ci/archive/2023/20231806.sbmcwun1-...@intel.com/config) compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/2023/20231806.sbmcwun1-...@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/20231806.sbmcwun1-...@intel.com/ All warnings (new ones prefixed by >>): >> arch/x86/kernel/smpboot.c:1097:6: warning: variable 'ret' is used >> uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] if (slaunch_is_txt_launch()) ^~~ arch/x86/kernel/smpboot.c:1107:6: note: uninitialized use occurs here if (ret) ^~~ arch/x86/kernel/smpboot.c:1097:2: note: remove the 'if' if its condition is always false if (slaunch_is_txt_launch()) ^~~~ arch/x86/kernel/smpboot.c:1046:9: note: initialize the variable 'ret' to silence this warning int ret; ^ = 0 1 warning generated. vim +1097 arch/x86/kernel/smpboot.c 1036 1037 /* 1038 * NOTE - on most systems this is a PHYSICAL apic ID, but on multiquad 1039 * (ie clustered apic addressing mode), this is a LOGICAL apic ID. 1040 * Returns zero if startup was successfully sent, else error code from 1041 * ->wakeup_secondary_cpu. 1042 */ 1043 static int do_boot_cpu(u32 apicid, int cpu, struct task_struct *idle) 1044 { 1045 unsigned long start_ip = real_mode_header->trampoline_start; 1046 int ret; 1047 1048 #ifdef CONFIG_X86_64 1049 /* If 64-bit wakeup method exists, use the 64-bit mode trampoline IP */ 1050 if (apic->wakeup_secondary_cpu_64) 1051 start_ip = real_mode_header->trampoline_start64; 1052 #endif 1053 idle->thread.sp = (unsigned long)task_pt_regs(idle); 1054 initial_code = (unsigned long)start_secondary; 1055 1056 if (IS_ENABLED(CONFIG_X86_32)) { 1057 early_gdt_descr.address = (unsigned long)get_cpu_gdt_rw(cpu); 1058 initial_stack = idle->thread.sp; 1059 } else if (!(smpboot_control & STARTUP_PARALLEL_MASK)) { 1060 smpboot_control = cpu; 1061 } 1062 1063 /* Enable the espfix hack for this CPU */ 1064 init_espfix_ap(cpu); 1065 1066 /* So we see what's up */ 1067 announce_cpu(cpu, apicid); 1068 1069 /* 1070 * This grunge runs the startup process for 1071 * the targeted processor. 1072 */ 1073 if (x86_platform.legacy.warm_reset) { 1074 1075 pr_debug("Setting warm reset code and vector.\n"); 1076 1077 smpboot_setup_warm_reset_vector(start_ip); 1078 /* 1079 * Be paranoid about clearing APIC errors. 1080 */ 1081 if (APIC_INTEGRATED(boot_cpu_apic_version)) { 1082 apic_write(APIC_ESR, 0); 1083 apic_read(APIC_ESR); 1084 } 1085 } 1086 1087 smp_mb(); 1088 1089 /* 1090 * Wake up a CPU in difference cases: 1091 * - Intel TXT DRTM launch uses its own method to wake the APs 1092 * - Use a method from the APIC driver if one defined, with wakeup 1093 * straight to 64-bit mode preferred over wakeup to RM. 1094 * Otherwise, 1095 * - Use an INIT boot APIC message 1096 */ > 1097 if (slaunch_is_txt_launch()) 1098 slaunch_wakeup_cpu_from_txt(cpu, apicid); 1099 else if (apic->
[linux-next:master] BUILD REGRESSION 088b9c375534d905a4d337c78db3b3bfbb52c4a0
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: 088b9c375534d905a4d337c78db3b3bfbb52c4a0 Add linux-next specific files for 20220706 Error/Warning reports: https://lore.kernel.org/linux-doc/202207070644.x48xoovs-...@intel.com Error/Warning: (recently discovered and may have been fixed) Documentation/arm/google/chromebook-boot-flow.rst: WARNING: document isn't included in any toctree arm-linux-gnueabi-ld: dc_dmub_srv.c:(.text+0x1108): undefined reference to `__aeabi_ddiv' arm-linux-gnueabi-ld: dc_dmub_srv.c:(.text+0x1124): undefined reference to `__aeabi_ui2d' arm-linux-gnueabi-ld: dc_dmub_srv.c:(.text+0x1164): undefined reference to `__aeabi_dmul' arm-linux-gnueabi-ld: dc_dmub_srv.c:(.text+0x1170): undefined reference to `__aeabi_dadd' arm-linux-gnueabi-ld: dc_dmub_srv.c:(.text+0x1180): undefined reference to `__aeabi_dsub' arm-linux-gnueabi-ld: dc_dmub_srv.c:(.text+0x1190): undefined reference to `__aeabi_d2uiz' arm-linux-gnueabi-ld: dc_dmub_srv.c:(.text+0x162c): undefined reference to `__aeabi_d2iz' arm-linux-gnueabi-ld: dc_dmub_srv.c:(.text+0x16b0): undefined reference to `__aeabi_i2d' dc_dmub_srv.c:(.text+0x10f8): undefined reference to `__aeabi_ui2d' dc_dmub_srv.c:(.text+0x464): undefined reference to `__floatunsidf' dc_dmub_srv.c:(.text.dc_dmub_setup_subvp_dmub_command+0x33c): undefined reference to `__floatunsidf' drivers/pci/endpoint/functions/pci-epf-vntb.c:975:5: warning: no previous prototype for 'pci_read' [-Wmissing-prototypes] drivers/pci/endpoint/functions/pci-epf-vntb.c:984:5: warning: no previous prototype for 'pci_write' [-Wmissing-prototypes] drivers/vfio/vfio_iommu_type1.c:2141:35: warning: cast to smaller integer type 'enum iommu_cap' from 'void *' [-Wvoid-pointer-to-enum-cast] mips-linux-ld: dc_dmub_srv.c:(.text.dc_dmub_setup_subvp_dmub_command+0x34c): undefined reference to `__floatunsidf' mips-linux-ld: dc_dmub_srv.c:(.text.dc_dmub_setup_subvp_dmub_command+0x378): undefined reference to `__divdf3' mips-linux-ld: dc_dmub_srv.c:(.text.dc_dmub_setup_subvp_dmub_command+0x38c): undefined reference to `__muldf3' mips-linux-ld: dc_dmub_srv.c:(.text.dc_dmub_setup_subvp_dmub_command+0x3a0): undefined reference to `__adddf3' mips-linux-ld: dc_dmub_srv.c:(.text.dc_dmub_setup_subvp_dmub_command+0x3b4): undefined reference to `__subdf3' mips-linux-ld: dc_dmub_srv.c:(.text.dc_dmub_setup_subvp_dmub_command+0x3d4): undefined reference to `__fixunsdfsi' mips-linux-ld: dc_dmub_srv.c:(.text.dc_dmub_setup_subvp_dmub_command+0x750): undefined reference to `__fixdfsi' mips-linux-ld: dc_dmub_srv.c:(.text.dc_dmub_setup_subvp_dmub_command+0x7c0): undefined reference to `__floatsidf' powerpc-linux-ld: drivers/pci/endpoint/functions/pci-epf-vntb.c:174: undefined reference to `ntb_link_event' xtensa-linux-ld: dc_dmub_srv.c:(.text+0x468): undefined reference to `__divdf3' xtensa-linux-ld: dc_dmub_srv.c:(.text+0x46c): undefined reference to `__muldf3' xtensa-linux-ld: dc_dmub_srv.c:(.text+0x470): undefined reference to `__adddf3' xtensa-linux-ld: dc_dmub_srv.c:(.text+0x474): undefined reference to `__subdf3' xtensa-linux-ld: dc_dmub_srv.c:(.text+0x478): undefined reference to `__fixunsdfsi' xtensa-linux-ld: dc_dmub_srv.c:(.text+0x47c): undefined reference to `__fixdfsi' xtensa-linux-ld: dc_dmub_srv.c:(.text+0x480): undefined reference to `__floatsidf' xtensa-linux-ld: dc_dmub_srv.c:(.text+0x60c): undefined reference to `__floatunsidf' Unverified Error/Warning (likely false positive, please contact us if interested): arch/x86/events/core.c:2114 init_hw_perf_events() warn: missing error code 'err' drivers/android/binder.c:1481:19-23: ERROR: from is NULL but dereferenced. drivers/android/binder.c:2920:29-33: ERROR: target_thread is NULL but dereferenced. drivers/android/binder.c:353:25-35: ERROR: node -> proc is NULL but dereferenced. drivers/android/binder.c:4888:16-20: ERROR: t is NULL but dereferenced. drivers/base/regmap/regmap.c:1996:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/char/random.c:869:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/firmware/arm_scmi/clock.c:394:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/firmware/arm_scmi/powercap.c:376:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_powertune.c:1214:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/gpu/drm/amd/display/dc/os_types.h: drm/drm_print.h is included more than once. drivers/gpu/drm/bridge/ite-it66121.c:1398:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/greybus/operation.c:617:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/infiniband/hw/irdma/hw.c:1484:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/md/dm-mpath.c:1681:1: internal compiler error: in arc_ifcvt, at config/arc/ar
[linux-next:master] BUILD REGRESSION 2a2aa3f05338270aecbe2492fda910d6c17e0102
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: 2a2aa3f05338270aecbe2492fda910d6c17e0102 Add linux-next specific files for 20220705 Error/Warning reports: https://lore.kernel.org/linux-doc/202207051821.3f0erisl-...@intel.com Error/Warning: (recently discovered and may have been fixed) Documentation/PCI/endpoint/pci-vntb-function.rst:82: WARNING: Unexpected indentation. Documentation/PCI/endpoint/pci-vntb-howto.rst:131: WARNING: Title underline too short. drivers/pci/endpoint/functions/pci-epf-vntb.c:975:5: warning: no previous prototype for 'pci_read' [-Wmissing-prototypes] drivers/pci/endpoint/functions/pci-epf-vntb.c:984:5: warning: no previous prototype for 'pci_write' [-Wmissing-prototypes] Unverified Error/Warning (likely false positive, please contact us if interested): block/partitions/efi.c:223:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 block/sed-opal.c:427:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 crypto/asymmetric_keys/pkcs7_verify.c:311:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/ata/libata-core.c:2802:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/ata/libata-eh.c:2842:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/ata/sata_dwc_460ex.c:691:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/base/power/runtime.c:1570:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/block/rbd.c:6142:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/bluetooth/hci_ll.c:588:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/bluetooth/hci_qca.c:2137:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/cdrom/cdrom.c:1041:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/char/ipmi/ipmi_ssif.c:1918:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/char/pcmcia/cm4000_cs.c:922:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/char/random.c:869:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/char/tpm/tpm_tis_core.c:1122:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/clk/bcm/clk-iproc-armpll.c:139:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/clk/clk-bd718x7.c:50:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/clk/clk-lochnagar.c:187:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/crypto/ccree/cc_request_mgr.c:206:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/crypto/qce/sha.c:73:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/crypto/qce/skcipher.c:61:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/cxl/core/hdm.c:38:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/cxl/core/pci.c:67:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/dma-buf/dma-buf.c:1100:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/firmware/arm_scmi/bus.c:152:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/firmware/arm_scmi/clock.c:394:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/firmware/arm_scmi/powercap.c:376:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/firmware/arm_scmi/sensors.c:673:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/firmware/arm_scmi/voltage.c:363:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/fpga/dfl-fme-mgr.c:163:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/gnss/usb.c:68:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_debug.c:175:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c:1006:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_resource.c:1035:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/gpu/drm/amd/amdgpu/../display/dc/dce112/dce112_resource.c:955:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:3895:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu8_hwmgr.c:754:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_powertune.c:1214:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/smu7_smumgr.c:195:1: internal compile
Re: [PATCH v6 04/10] gpu: host1x: Add context device management code
Hi Mikko, Thank you for the patch! Yet something to improve: [auto build test ERROR on drm/drm-next] [also build test ERROR on tegra/for-next linus/master v5.19-rc5] [cannot apply to tegra-drm/drm/tegra/for-next next-20220704] [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/intel-lab-lkp/linux/commits/Mikko-Perttunen/Host1x-context-isolation-support/20220621-231339 base: git://anongit.freedesktop.org/drm/drm drm-next config: arm-randconfig-r005-20220703 (https://download.01.org/0day-ci/archive/20220705/202207051045.jwevr4tw-...@intel.com/config) compiler: arm-linux-gnueabi-gcc (GCC) 11.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/intel-lab-lkp/linux/commit/2501beeae7469b805f9f624049fd56643cf6e18e git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Mikko-Perttunen/Host1x-context-isolation-support/20220621-231339 git checkout 2501beeae7469b805f9f624049fd56643cf6e18e # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot All errors (new ones prefixed by >>): drivers/gpu/host1x/context.c: In function 'host1x_memory_context_list_init': >> drivers/gpu/host1x/context.c:80:40: error: 'struct iommu_fwspec' has no >> member named 'ids' 80 | ctx->stream_id = fwspec->ids[0] & 0x; |^~ vim +80 drivers/gpu/host1x/context.c 15 16 int host1x_memory_context_list_init(struct host1x *host1x) 17 { 18 struct host1x_memory_context_list *cdl = &host1x->context_list; 19 struct device_node *node = host1x->dev->of_node; 20 struct host1x_memory_context *ctx; 21 unsigned int i; 22 int err; 23 24 cdl->devs = NULL; 25 cdl->len = 0; 26 mutex_init(&cdl->lock); 27 28 err = of_property_count_u32_elems(node, "iommu-map"); 29 if (err < 0) 30 return 0; 31 32 cdl->devs = kcalloc(err, sizeof(*cdl->devs), GFP_KERNEL); 33 if (!cdl->devs) 34 return -ENOMEM; 35 cdl->len = err / 4; 36 37 for (i = 0; i < cdl->len; i++) { 38 struct iommu_fwspec *fwspec; 39 40 ctx = &cdl->devs[i]; 41 42 ctx->host = host1x; 43 44 device_initialize(&ctx->dev); 45 46 /* 47 * Due to an issue with T194 NVENC, only 38 bits can be used. 48 * Anyway, 256GiB of IOVA ought to be enough for anyone. 49 */ 50 ctx->dma_mask = DMA_BIT_MASK(38); 51 ctx->dev.dma_mask = &ctx->dma_mask; 52 ctx->dev.coherent_dma_mask = ctx->dma_mask; 53 dev_set_name(&ctx->dev, "host1x-ctx.%d", i); 54 ctx->dev.bus = &host1x_context_device_bus_type; 55 ctx->dev.parent = host1x->dev; 56 57 dma_set_max_seg_size(&ctx->dev, UINT_MAX); 58 59 err = device_add(&ctx->dev); 60 if (err) { 61 dev_err(host1x->dev, "could not add context device %d: %d\n", i, err); 62 goto del_devices; 63 } 64 65 err = of_dma_configure_id(&ctx->dev, node, true, &i); 66 if (err) { 67 dev_err(host1x->dev, "IOMMU configuration failed for context device %d: %d\n", 68 i, err); 69 device_del(&ctx->dev); 70 goto del_devices; 71 } 72 73 fwspec = dev_iommu_fwspec_get(&ctx->dev); 74 if (!fwspec) { 75 dev_err(host1x->dev, "Context device %d has no IOMMU!\n", i); 76 device_del(&ctx->dev); 77 goto de
[linux-next:master] BUILD REGRESSION b6f1f2fa2bddd69ff46a190b8120bd440fd50563
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: b6f1f2fa2bddd69ff46a190b8120bd440fd50563 Add linux-next specific files for 20220704 Error/Warning: (recently discovered and may have been fixed) drivers/pci/endpoint/functions/pci-epf-vntb.c:975:5: warning: no previous prototype for 'pci_read' [-Wmissing-prototypes] drivers/pci/endpoint/functions/pci-epf-vntb.c:984:5: warning: no previous prototype for 'pci_write' [-Wmissing-prototypes] Unverified Error/Warning (likely false positive, please contact us if interested): block/partitions/efi.c:223:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 block/sed-opal.c:427:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 crypto/asymmetric_keys/pkcs7_verify.c:311:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/ata/libata-core.c:2802:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/ata/libata-eh.c:2842:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/ata/sata_dwc_460ex.c:691:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/base/power/runtime.c:1573:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/block/rbd.c:6142:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/bluetooth/hci_ll.c:588:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/bluetooth/hci_qca.c:2137:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/cdrom/cdrom.c:1041:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/char/ipmi/ipmi_ssif.c:1918:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/char/pcmcia/cm4000_cs.c:922:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/char/random.c:869:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/char/tpm/tpm_tis_core.c:1122:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/clk/bcm/clk-iproc-armpll.c:139:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/clk/bcm/clk-iproc-armpll.c:228:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/clk/clk-bd718x7.c:50:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/clk/clk-lochnagar.c:187:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/crypto/ccree/cc_request_mgr.c:206:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/crypto/qce/sha.c:73:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/crypto/qce/skcipher.c:61:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/cxl/core/hdm.c:38:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/cxl/core/pci.c:67:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/dma-buf/dma-buf.c:1100:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/firmware/arm_scmi/bus.c:166:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/firmware/arm_scmi/clock.c:394:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/firmware/arm_scmi/sensors.c:673:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/firmware/arm_scmi/voltage.c:363:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/fpga/dfl-fme-mgr.c:163:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/gnss/usb.c:68:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_debug.c:175:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c:1006:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_resource.c:1035:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/gpu/drm/amd/amdgpu/../display/dc/dce112/dce112_resource.c:955:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:3895:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu8_hwmgr.c:754:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_powertune.c:1214:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/smu7_smumgr.c:195:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0.c:362:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9637 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:695:1: internal compiler error: in arc_ifcvt, at confi
Re: [PATCH v2 1/2] vfio/type1: Simplify bus_type determination
Hi Robin, I love your patch! Yet something to improve: [auto build test ERROR on v5.19-rc3] [also build test ERROR on linus/master next-20220622] [cannot apply to awilliam-vfio/next] [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/intel-lab-lkp/linux/commits/Robin-Murphy/vfio-type1-Simplify-bus_type-determination/20220622-200503 base:a111daf0c53ae91e71fd2bfe7497862d14132e3e config: x86_64-rhel-8.3-kselftests (https://download.01.org/0day-ci/archive/20220623/202206231208.pgasmluw-...@intel.com/config) compiler: gcc-11 (Debian 11.3.0-3) 11.3.0 reproduce (this is a W=1 build): # https://github.com/intel-lab-lkp/linux/commit/7a6e1ddc765bde40f879995137a2ff20cb0eda47 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Robin-Murphy/vfio-type1-Simplify-bus_type-determination/20220622-200503 git checkout 7a6e1ddc765bde40f879995137a2ff20cb0eda47 # save the config file mkdir build_dir && cp config build_dir/.config make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot All errors (new ones prefixed by >>, old ones prefixed by <<): >> ERROR: modpost: "vfio_device_get_from_iommu" >> [drivers/vfio/vfio_iommu_type1.ko] undefined! >> ERROR: modpost: "vfio_device_put" [drivers/vfio/vfio_iommu_type1.ko] >> undefined! -- 0-DAY CI Kernel Test Service https://01.org/lkp ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH v6 04/10] gpu: host1x: Add context device management code
Hi Mikko, Thank you for the patch! Yet something to improve: [auto build test ERROR on drm/drm-next] [also build test ERROR on tegra/for-next linus/master v5.19-rc3] [cannot apply to tegra-drm/drm/tegra/for-next next-20220621] [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/intel-lab-lkp/linux/commits/Mikko-Perttunen/Host1x-context-isolation-support/20220621-231339 base: git://anongit.freedesktop.org/drm/drm drm-next config: arm64-randconfig-r021-20220622 (https://download.01.org/0day-ci/archive/20220622/202206221557.laes8ynq-...@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 8b8d126598ce7bd5243da7f94f69fa1104288bee) 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 arm64 cross compiling tool for clang build # apt-get install binutils-aarch64-linux-gnu # https://github.com/intel-lab-lkp/linux/commit/2501beeae7469b805f9f624049fd56643cf6e18e git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Mikko-Perttunen/Host1x-context-isolation-support/20220621-231339 git checkout 2501beeae7469b805f9f624049fd56643cf6e18e # 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=arm64 SHELL=/bin/bash drivers/gpu/host1x/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot All errors (new ones prefixed by >>): >> drivers/gpu/host1x/context.c:80:28: error: no member named 'ids' in 'struct >> iommu_fwspec' ctx->stream_id = fwspec->ids[0] & 0x; ~~ ^ 1 error generated. vim +80 drivers/gpu/host1x/context.c 15 16 int host1x_memory_context_list_init(struct host1x *host1x) 17 { 18 struct host1x_memory_context_list *cdl = &host1x->context_list; 19 struct device_node *node = host1x->dev->of_node; 20 struct host1x_memory_context *ctx; 21 unsigned int i; 22 int err; 23 24 cdl->devs = NULL; 25 cdl->len = 0; 26 mutex_init(&cdl->lock); 27 28 err = of_property_count_u32_elems(node, "iommu-map"); 29 if (err < 0) 30 return 0; 31 32 cdl->devs = kcalloc(err, sizeof(*cdl->devs), GFP_KERNEL); 33 if (!cdl->devs) 34 return -ENOMEM; 35 cdl->len = err / 4; 36 37 for (i = 0; i < cdl->len; i++) { 38 struct iommu_fwspec *fwspec; 39 40 ctx = &cdl->devs[i]; 41 42 ctx->host = host1x; 43 44 device_initialize(&ctx->dev); 45 46 /* 47 * Due to an issue with T194 NVENC, only 38 bits can be used. 48 * Anyway, 256GiB of IOVA ought to be enough for anyone. 49 */ 50 ctx->dma_mask = DMA_BIT_MASK(38); 51 ctx->dev.dma_mask = &ctx->dma_mask; 52 ctx->dev.coherent_dma_mask = ctx->dma_mask; 53 dev_set_name(&ctx->dev, "host1x-ctx.%d", i); 54 ctx->dev.bus = &host1x_context_device_bus_type; 55 ctx->dev.parent = host1x->dev; 56 57 dma_set_max_seg_size(&ctx->dev, UINT_MAX); 58 59 err = device_add(&ctx->dev); 60 if (err) { 61 dev_err(host1x->dev, "could not add context device %d: %d\n", i, err); 62 goto del_devices; 63 } 64 65 err = of_dma_configure_id(&ctx->dev, node, true, &i); 66 if (err) { 67 dev_err(host1x->dev, "IOMMU configuration failed for context device %d: %d\n", 68 i, err); 69 device_del(&ctx->dev); 70 goto del_devices; 71 } 72 73 fwspec = dev_iommu_fwspec_get(&ctx->dev); 74 if (!fwspec) { 75 dev_err(host1x->dev, "Context device %d
Re: [PATCH] uacce: Tidy up locking
Hi Jean-Philippe, I love your patch! Perhaps something to improve: [auto build test WARNING on char-misc/char-misc-testing] [also build test WARNING on soc/for-next linus/master v5.19-rc2 next-20220617] [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/intel-lab-lkp/linux/commits/Jean-Philippe-Brucker/uacce-Tidy-up-locking/20220620-220634 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git 0a35780c755ccec097d15c6b4ff8b246a89f1689 config: i386-randconfig-s001 (https://download.01.org/0day-ci/archive/20220621/202206210432.wvkoxvu5-...@intel.com/config) compiler: gcc-11 (Debian 11.3.0-3) 11.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.4-30-g92122700-dirty # https://github.com/intel-lab-lkp/linux/commit/3589b5391f54bea3dc85ed65fe0f036757a4f21c git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Jean-Philippe-Brucker/uacce-Tidy-up-locking/20220620-220634 git checkout 3589b5391f54bea3dc85ed65fe0f036757a4f21c # save the config file mkdir build_dir && cp config build_dir/.config make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash drivers/misc/uacce/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) >> drivers/misc/uacce/uacce.c:291:21: sparse: sparse: incorrect type in >> assignment (different base types) @@ expected int ret @@ got >> restricted __poll_t @@ drivers/misc/uacce/uacce.c:291:21: sparse: expected int ret drivers/misc/uacce/uacce.c:291:21: sparse: got restricted __poll_t >> drivers/misc/uacce/uacce.c:295:16: sparse: sparse: incorrect type in return >> expression (different base types) @@ expected restricted __poll_t @@ >> got int ret @@ drivers/misc/uacce/uacce.c:295:16: sparse: expected restricted __poll_t drivers/misc/uacce/uacce.c:295:16: sparse: got int ret vim +291 drivers/misc/uacce/uacce.c 277 278 static __poll_t uacce_fops_poll(struct file *file, poll_table *wait) 279 { 280 struct uacce_queue *q = file->private_data; 281 struct uacce_device *uacce = q->uacce; 282 int ret = 0; 283 284 poll_wait(file, &q->wait, wait); 285 286 mutex_lock(&q->mutex); 287 if (!uacce_queue_is_valid(q)) 288 goto out_unlock; 289 290 if (uacce->ops->is_q_updated && uacce->ops->is_q_updated(q)) > 291 ret = EPOLLIN | EPOLLRDNORM; 292 293 out_unlock: 294 mutex_unlock(&q->mutex); > 295 return ret; 296 } 297 -- 0-DAY CI Kernel Test Service https://01.org/lkp ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH v9 3/3] iommu/mediatek: Allow page table PA up to 35bit
Hi, Thank you for the patch! Yet something to improve: [auto build test ERROR on joro-iommu/next] [also build test ERROR on linus/master v5.19-rc2 next-20220615] [cannot apply to arm-perf/for-next/perf] [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/intel-lab-lkp/linux/commits/yf-wang-mediatek-com/iommu-io-pgtable-arm-v7s-Add-a-quirk-to-allow-pgtable-PA-up-to-35bit/20220616-011227 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20220616/202206161233.wdjdwjgb-...@intel.com/config) compiler: arceb-elf-gcc (GCC) 11.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/intel-lab-lkp/linux/commit/0032fcce9c1ab50caec1ef5dd4089a8a61fcf15c git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review yf-wang-mediatek-com/iommu-io-pgtable-arm-v7s-Add-a-quirk-to-allow-pgtable-PA-up-to-35bit/20220616-011227 git checkout 0032fcce9c1ab50caec1ef5dd4089a8a61fcf15c # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot All errors (new ones prefixed by >>): In file included from include/linux/scatterlist.h:9, from include/linux/dma-mapping.h:10, from include/linux/dma-direct.h:9, from drivers/iommu/mtk_iommu.c:11: drivers/iommu/mtk_iommu.c: In function 'mtk_iommu_attach_device': >> drivers/iommu/mtk_iommu.c:693:49: error: 'struct mtk_iommu_data' has no >> member named 'base' 693 | writel(bank->m4u_dom->ttbr, data->base + REG_MMU_PT_BASE_ADDR); | ^~ arch/arc/include/asm/io.h:231:75: note: in definition of macro 'writel_relaxed' 231 | #define writel_relaxed(v,c) __raw_writel((__force u32) cpu_to_le32(v),c) | ^ drivers/iommu/mtk_iommu.c:693:17: note: in expansion of macro 'writel' 693 | writel(bank->m4u_dom->ttbr, data->base + REG_MMU_PT_BASE_ADDR); | ^~ vim +693 drivers/iommu/mtk_iommu.c 646 647 static int mtk_iommu_attach_device(struct iommu_domain *domain, 648 struct device *dev) 649 { 650 struct mtk_iommu_data *data = dev_iommu_priv_get(dev), *frstdata; 651 struct mtk_iommu_domain *dom = to_mtk_domain(domain); 652 struct list_head *hw_list = data->hw_list; 653 struct device *m4udev = data->dev; 654 struct mtk_iommu_bank_data *bank; 655 unsigned int bankid; 656 int ret, region_id; 657 658 region_id = mtk_iommu_get_iova_region_id(dev, data->plat_data); 659 if (region_id < 0) 660 return region_id; 661 662 bankid = mtk_iommu_get_bank_id(dev, data->plat_data); 663 mutex_lock(&dom->mutex); 664 if (!dom->bank) { 665 /* Data is in the frstdata in sharing pgtable case. */ 666 frstdata = mtk_iommu_get_frst_data(hw_list); 667 668 ret = mtk_iommu_domain_finalise(dom, frstdata, region_id); 669 if (ret) { 670 mutex_unlock(&dom->mutex); 671 return -ENODEV; 672 } 673 dom->bank = &data->bank[bankid]; 674 } 675 mutex_unlock(&dom->mutex); 676 677 mutex_lock(&data->mutex); 678 bank = &data->bank[bankid]; 679 if (!bank->m4u_dom) { /* Initialize the M4U HW for each a BANK */ 680 ret = pm_runtime_resume_and_get(m4udev); 681 if (ret < 0) { 682 dev_err(m4udev, "pm get fail(%d) in attach.\n", ret); 683 goto err_unlock; 684 } 685 686 ret = mtk_iommu_hw_init(data, bankid); 687 if (ret) { 688 pm_runtime_put(m4udev); 689 goto err_unlock; 690 } 691
Re: [PATCH 4/6] iommu/qcom: Add support for AArch64 IOMMU pagetables
Hi Konrad, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on joro-iommu/next] [also build test WARNING on v5.18 next-20220527] [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/intel-lab-lkp/linux/commits/Konrad-Dybcio/iommu-qcom-Use-the-asid-read-from-device-tree-if-specified/20220528-062952 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20220528/202205280904.vsncfpph-...@intel.com/config) compiler: arceb-elf-gcc (GCC) 11.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/intel-lab-lkp/linux/commit/0744f7d6ebfff8d6854a24d0f95f8e58885b5212 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Konrad-Dybcio/iommu-qcom-Use-the-asid-read-from-device-tree-if-specified/20220528-062952 git checkout 0744f7d6ebfff8d6854a24d0f95f8e58885b5212 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash drivers/iommu/arm/arm-smmu/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot All warnings (new ones prefixed by >>): drivers/iommu/arm/arm-smmu/qcom_iommu.c: In function 'qcom_iommu_tlb_inv_range_nosync': >> drivers/iommu/arm/arm-smmu/qcom_iommu.c:174:58: warning: left shift count >= >> width of type [-Wshift-count-overflow] 174 | iova |= (unsigned long)ctx->asid << 48; | ^~ vim +174 drivers/iommu/arm/arm-smmu/qcom_iommu.c 157 158 static void qcom_iommu_tlb_inv_range_nosync(unsigned long iova, size_t size, 159 size_t granule, bool leaf, void *cookie) 160 { 161 struct qcom_iommu_domain *qcom_domain = cookie; 162 struct iommu_fwspec *fwspec = qcom_domain->fwspec; 163 unsigned i, reg; 164 165 reg = leaf ? ARM_SMMU_CB_S1_TLBIVAL : ARM_SMMU_CB_S1_TLBIVA; 166 167 for (i = 0; i < fwspec->num_ids; i++) { 168 struct qcom_iommu_dev *qcom_iommu = qcom_domain->iommu; 169 struct qcom_iommu_ctx *ctx = to_ctx(qcom_domain, fwspec->ids[i]); 170 size_t s = size; 171 172 if (qcom_iommu->use_aarch64_pt) { 173 iova >>= 12; > 174 iova |= (unsigned long)ctx->asid << 48; 175 } else { 176 iova &= (1UL << 12) - 1UL; 177 iova |= ctx->asid; 178 } 179 do { 180 iommu_writel(ctx, reg, iova); 181 iova += granule; 182 } while (s -= granule); 183 } 184 } 185 -- 0-DAY CI Kernel Test Service https://01.org/lkp ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH 1/3] iommu: Add Visconti5 IOMMU driver
Hi Nobuhiro, I love your patch! Yet something to improve: [auto build test ERROR on joro-iommu/next] [also build test ERROR on arm-perf/for-next/perf soc/for-next linus/master v5.18 next-20220524] [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/intel-lab-lkp/linux/commits/Nobuhiro-Iwamatsu/Add-Visconti5-IOMMU-driver/20220525-093326 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20220525/202205251708.q7cwjpf8-...@intel.com/config) compiler: alpha-linux-gcc (GCC) 11.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/intel-lab-lkp/linux/commit/69bb4f3c2ef0bb1f65922bc72bb31109897a6393 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Nobuhiro-Iwamatsu/Add-Visconti5-IOMMU-driver/20220525-093326 git checkout 69bb4f3c2ef0bb1f65922bc72bb31109897a6393 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=alpha SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot Note: the linux-review/Nobuhiro-Iwamatsu/Add-Visconti5-IOMMU-driver/20220525-093326 HEAD 07739c72b066c0781c371eec7614ed876441e8dd builds fine. It only hurts bisectability. All errors (new ones prefixed by >>): >> drivers/iommu/visconti-atu.c:47:29: error: field 'iommu' has incomplete type 47 | struct iommu_device iommu; | ^ >> drivers/iommu/visconti-atu.c:62:29: error: field 'io_domain' has incomplete >> type 62 | struct iommu_domain io_domain; | ^ In file included from include/linux/bits.h:22, from include/linux/ratelimit_types.h:5, from include/linux/ratelimit.h:5, from include/linux/dev_printk.h:16, from include/linux/device.h:15, from include/linux/dma-mapping.h:7, from drivers/iommu/visconti-atu.c:12: drivers/iommu/visconti-atu.c: In function 'to_atu_domain': include/linux/compiler_types.h:293:27: error: expression in static assertion is not an integer 293 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) | ^~~~ include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert' 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) |^~~~ include/linux/container_of.h:19:9: note: in expansion of macro 'static_assert' 19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \ | ^ include/linux/container_of.h:19:23: note: in expansion of macro '__same_type' 19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \ | ^~~ drivers/iommu/visconti-atu.c:70:16: note: in expansion of macro 'container_of' 70 | return container_of(domain, struct visconti_atu_domain, io_domain); |^~~~ drivers/iommu/visconti-atu.c: In function 'visconti_atu_attach_device': >> drivers/iommu/visconti-atu.c:121:43: error: implicit declaration of function >> 'dev_iommu_priv_get' [-Werror=implicit-function-declaration] 121 | struct visconti_atu_device *atu = dev_iommu_priv_get(dev); | ^~ drivers/iommu/visconti-atu.c:121:43: warning: initialization of 'struct visconti_atu_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion] drivers/iommu/visconti-atu.c: In function 'visconti_atu_detach_device': drivers/iommu/visconti-atu.c:150:43: warning: initialization of 'struct visconti_atu_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 150 | struct visconti_atu_device *atu = dev_iommu_priv_get(dev); | ^~ drivers/iommu/visconti-atu.c: At top level: drivers/iommu/visconti-atu.c:196:41: warning: 's
Re: [PATCH 1/3] iommu: Add Visconti5 IOMMU driver
Hi Nobuhiro, I love your patch! Perhaps something to improve: [auto build test WARNING on joro-iommu/next] [also build test WARNING on arm-perf/for-next/perf soc/for-next linus/master v5.18 next-20220524] [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/intel-lab-lkp/linux/commits/Nobuhiro-Iwamatsu/Add-Visconti5-IOMMU-driver/20220525-093326 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20220525/202205251452.kfxlqhqx-...@intel.com/config) compiler: alpha-linux-gcc (GCC) 11.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/intel-lab-lkp/linux/commit/69bb4f3c2ef0bb1f65922bc72bb31109897a6393 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Nobuhiro-Iwamatsu/Add-Visconti5-IOMMU-driver/20220525-093326 git checkout 69bb4f3c2ef0bb1f65922bc72bb31109897a6393 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=alpha SHELL=/bin/bash drivers/iommu/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot All warnings (new ones prefixed by >>): drivers/iommu/visconti-atu.c:47:29: error: field 'iommu' has incomplete type 47 | struct iommu_device iommu; | ^ drivers/iommu/visconti-atu.c:62:29: error: field 'io_domain' has incomplete type 62 | struct iommu_domain io_domain; | ^ In file included from include/linux/bits.h:22, from include/linux/ratelimit_types.h:5, from include/linux/ratelimit.h:5, from include/linux/dev_printk.h:16, from include/linux/device.h:15, from include/linux/dma-mapping.h:7, from drivers/iommu/visconti-atu.c:12: drivers/iommu/visconti-atu.c: In function 'to_atu_domain': include/linux/compiler_types.h:293:27: error: expression in static assertion is not an integer 293 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) | ^~~~ include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert' 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) |^~~~ include/linux/container_of.h:19:9: note: in expansion of macro 'static_assert' 19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \ | ^ include/linux/container_of.h:19:23: note: in expansion of macro '__same_type' 19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \ | ^~~ drivers/iommu/visconti-atu.c:70:16: note: in expansion of macro 'container_of' 70 | return container_of(domain, struct visconti_atu_domain, io_domain); |^~~~ drivers/iommu/visconti-atu.c: In function 'visconti_atu_attach_device': drivers/iommu/visconti-atu.c:121:43: error: implicit declaration of function 'dev_iommu_priv_get' [-Werror=implicit-function-declaration] 121 | struct visconti_atu_device *atu = dev_iommu_priv_get(dev); | ^~ >> drivers/iommu/visconti-atu.c:121:43: warning: initialization of 'struct >> visconti_atu_device *' from 'int' makes pointer from integer without a cast >> [-Wint-conversion] drivers/iommu/visconti-atu.c: In function 'visconti_atu_detach_device': drivers/iommu/visconti-atu.c:150:43: warning: initialization of 'struct visconti_atu_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 150 | struct visconti_atu_device *atu = dev_iommu_priv_get(dev); | ^~ drivers/iommu/visconti-atu.c: At top level: >> drivers/iommu/visconti-atu.c:196:41: warning: 'struct iommu_iotlb_gather' >> declared inside parameter list will not be visible outside of this >> definition or declaration 196 | struct iommu_iotlb_gather *iotlb_ga
Re: [PATCH 1/3] iommu: Add Visconti5 IOMMU driver
Hi Nobuhiro, I love your patch! Perhaps something to improve: [auto build test WARNING on joro-iommu/next] [also build test WARNING on arm-perf/for-next/perf soc/for-next linus/master v5.18 next-20220524] [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/intel-lab-lkp/linux/commits/Nobuhiro-Iwamatsu/Add-Visconti5-IOMMU-driver/20220525-093326 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: nios2-allyesconfig (https://download.01.org/0day-ci/archive/20220525/202205251205.phq3cwj3-...@intel.com/config) compiler: nios2-linux-gcc (GCC) 11.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/intel-lab-lkp/linux/commit/69bb4f3c2ef0bb1f65922bc72bb31109897a6393 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Nobuhiro-Iwamatsu/Add-Visconti5-IOMMU-driver/20220525-093326 git checkout 69bb4f3c2ef0bb1f65922bc72bb31109897a6393 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=nios2 SHELL=/bin/bash drivers/iommu/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot All warnings (new ones prefixed by >>): drivers/iommu/visconti-atu.c:47:29: error: field 'iommu' has incomplete type 47 | struct iommu_device iommu; | ^ drivers/iommu/visconti-atu.c:62:29: error: field 'io_domain' has incomplete type 62 | struct iommu_domain io_domain; | ^ In file included from include/linux/bits.h:22, from include/linux/ratelimit_types.h:5, from include/linux/ratelimit.h:5, from include/linux/dev_printk.h:16, from include/linux/device.h:15, from include/linux/dma-mapping.h:7, from drivers/iommu/visconti-atu.c:12: drivers/iommu/visconti-atu.c: In function 'to_atu_domain': include/linux/compiler_types.h:293:27: error: expression in static assertion is not an integer 293 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) | ^~~~ include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert' 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) |^~~~ include/linux/container_of.h:19:9: note: in expansion of macro 'static_assert' 19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \ | ^ include/linux/container_of.h:19:23: note: in expansion of macro '__same_type' 19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \ | ^~~ drivers/iommu/visconti-atu.c:70:16: note: in expansion of macro 'container_of' 70 | return container_of(domain, struct visconti_atu_domain, io_domain); |^~~~ drivers/iommu/visconti-atu.c: In function 'visconti_atu_enable_entry': >> drivers/iommu/visconti-atu.c:102:52: warning: right shift count >= width of >> type [-Wshift-count-overflow] 102 |(atu->iova[num] >> 32) & ATU_BGADDR_MASK); |^~ drivers/iommu/visconti-atu.c: In function 'visconti_atu_attach_device': drivers/iommu/visconti-atu.c:121:43: error: implicit declaration of function 'dev_iommu_priv_get' [-Werror=implicit-function-declaration] 121 | struct visconti_atu_device *atu = dev_iommu_priv_get(dev); | ^~ drivers/iommu/visconti-atu.c:121:43: warning: initialization of 'struct visconti_atu_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion] drivers/iommu/visconti-atu.c: In function 'visconti_atu_detach_device': drivers/iommu/visconti-atu.c:150:43: warning: initialization of 'struct visconti_atu_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 150 | struct visconti_atu_device *atu = dev_iommu_priv_get(dev); |
Re: [PATCH v3 1/2] iommu/io-pgtable-arm-v7s: Add a quirk to allow pgtable PA up to 35bit
Hi, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on arm-perf/for-next/perf] [also build test WARNING on linus/master v5.18-rc6] [cannot apply to joro-iommu/next] [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/intel-lab-lkp/linux/commits/yf-wang-mediatek-com/iommu-io-pgtable-arm-v7s-Add-a-quirk-to-allow-pgtable-PA-up-to-35bit/20220512-234603 base: https://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git for-next/perf config: arm-qcom_defconfig (https://download.01.org/0day-ci/archive/20220513/202205131021.3gskebg2-...@intel.com/config) compiler: arm-linux-gnueabi-gcc (GCC) 11.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/intel-lab-lkp/linux/commit/916a5fc41cbb8ddfe343193598f250d06b09e3fa git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review yf-wang-mediatek-com/iommu-io-pgtable-arm-v7s-Add-a-quirk-to-allow-pgtable-PA-up-to-35bit/20220512-234603 git checkout 916a5fc41cbb8ddfe343193598f250d06b09e3fa # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/iommu/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): In file included from include/linux/ratelimit_types.h:5, from include/linux/ratelimit.h:5, from include/linux/dev_printk.h:16, from include/linux/device.h:15, from include/linux/dma-mapping.h:7, from drivers/iommu/io-pgtable-arm-v7s.c:25: drivers/iommu/io-pgtable-arm-v7s.c: In function 'arm_v7s_alloc_pgtable': include/linux/bits.h:35:29: warning: left shift count >= width of type [-Wshift-count-overflow] 35 | (((~UL(0)) - (UL(1) << (l)) + 1) & \ | ^~ include/linux/bits.h:38:38: note: in expansion of macro '__GENMASK' 38 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l)) | ^ drivers/iommu/io-pgtable-arm-v7s.c:154:46: note: in expansion of macro 'GENMASK' 154 | ((ttbr & ((u32)(~0U << 3))) | ((pa & GENMASK(34, 32)) >> 32)) | ^~~ drivers/iommu/io-pgtable-arm-v7s.c:886:25: note: in expansion of macro 'ARM_V7S_TTBR_35BIT_PA' 886 | ARM_V7S_TTBR_35BIT_PA(cfg->arm_v7s_cfg.ttbr, paddr); | ^ include/linux/bits.h:36:18: warning: right shift count is negative [-Wshift-count-negative] 36 | (~UL(0) >> (BITS_PER_LONG - 1 - (h | ^~ include/linux/bits.h:38:38: note: in expansion of macro '__GENMASK' 38 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l)) | ^ drivers/iommu/io-pgtable-arm-v7s.c:154:46: note: in expansion of macro 'GENMASK' 154 | ((ttbr & ((u32)(~0U << 3))) | ((pa & GENMASK(34, 32)) >> 32)) | ^~~ drivers/iommu/io-pgtable-arm-v7s.c:886:25: note: in expansion of macro 'ARM_V7S_TTBR_35BIT_PA' 886 | ARM_V7S_TTBR_35BIT_PA(cfg->arm_v7s_cfg.ttbr, paddr); | ^ >> drivers/iommu/io-pgtable-arm-v7s.c:154:63: warning: right shift count >= >> width of type [-Wshift-count-overflow] 154 | ((ttbr & ((u32)(~0U << 3))) | ((pa & GENMASK(34, 32)) >> 32)) | ^~ drivers/iommu/io-pgtable-arm-v7s.c:886:25: note: in expansion of macro 'ARM_V7S_TTBR_35BIT_PA' 886 | ARM_V7S_TTBR_35BIT_PA(cfg->arm_v7s_cfg.ttbr, paddr); | ^ vim +154 drivers/iommu/io-pgtable-arm-v7s.c 145 146 #define ARM_V7S_TTBR_S BIT(1) 147 #define ARM_V7S_TTBR_NOSBIT(5) 148 #define ARM_V7S_TTBR_ORGN_ATTR(attr)(((attr) & 0x3) << 3) 149 #define ARM_V7S_TTBR_IRGN_ATTR(attr) \ 150 attr) & 0x1) << 6) | (((attr) & 0x2) >> 1))
Re: [PATCH v3 1/2] iommu/io-pgtable-arm-v7s: Add a quirk to allow pgtable PA up to 35bit
Hi, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on arm-perf/for-next/perf] [also build test WARNING on linus/master v5.18-rc6 next-20220512] [cannot apply to joro-iommu/next] [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/intel-lab-lkp/linux/commits/yf-wang-mediatek-com/iommu-io-pgtable-arm-v7s-Add-a-quirk-to-allow-pgtable-PA-up-to-35bit/20220512-234603 base: https://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git for-next/perf config: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20220513/202205131016.ati0kpnr-...@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 9519dacab7b8afd537811fc2abaceb4d14f4e16a) 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/intel-lab-lkp/linux/commit/916a5fc41cbb8ddfe343193598f250d06b09e3fa git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review yf-wang-mediatek-com/iommu-io-pgtable-arm-v7s-Add-a-quirk-to-allow-pgtable-PA-up-to-35bit/20220512-234603 git checkout 916a5fc41cbb8ddfe343193598f250d06b09e3fa # 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=hexagon SHELL=/bin/bash drivers/iommu/ drivers/rtc/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> drivers/iommu/io-pgtable-arm-v7s.c:886:4: warning: shift count >= width of >> type [-Wshift-count-overflow] ARM_V7S_TTBR_35BIT_PA(cfg->arm_v7s_cfg.ttbr, paddr); ^~~ drivers/iommu/io-pgtable-arm-v7s.c:154:39: note: expanded from macro 'ARM_V7S_TTBR_35BIT_PA' ((ttbr & ((u32)(~0U << 3))) | ((pa & GENMASK(34, 32)) >> 32)) ^~~ include/linux/bits.h:38:31: note: expanded from macro 'GENMASK' (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l)) ^~~ include/linux/bits.h:35:22: note: expanded from macro '__GENMASK' (((~UL(0)) - (UL(1) << (l)) + 1) & \ ^ ~~~ >> drivers/iommu/io-pgtable-arm-v7s.c:886:4: warning: shift count is negative >> [-Wshift-count-negative] ARM_V7S_TTBR_35BIT_PA(cfg->arm_v7s_cfg.ttbr, paddr); ^~~ drivers/iommu/io-pgtable-arm-v7s.c:154:39: note: expanded from macro 'ARM_V7S_TTBR_35BIT_PA' ((ttbr & ((u32)(~0U << 3))) | ((pa & GENMASK(34, 32)) >> 32)) ^~~ include/linux/bits.h:38:31: note: expanded from macro 'GENMASK' (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l)) ^~~ include/linux/bits.h:36:11: note: expanded from macro '__GENMASK' (~UL(0) >> (BITS_PER_LONG - 1 - (h ^ ~ >> drivers/iommu/io-pgtable-arm-v7s.c:886:4: warning: shift count >= width of >> type [-Wshift-count-overflow] ARM_V7S_TTBR_35BIT_PA(cfg->arm_v7s_cfg.ttbr, paddr); ^~~ drivers/iommu/io-pgtable-arm-v7s.c:154:56: note: expanded from macro 'ARM_V7S_TTBR_35BIT_PA' ((ttbr & ((u32)(~0U << 3))) | ((pa & GENMASK(34, 32)) >> 32)) ^ ~~ 3 warnings generated. vim +886 drivers/iommu/io-pgtable-arm-v7s.c 795 796 static struct io_pgtable *arm_v7s_alloc_pgtable(struct io_pgtable_cfg *cfg, 797 void *cookie) 798 { 799 slab_flags_t slab_flag = ARM_V7S_TABLE_SLAB_FLAGS; 800 struct arm_v7s_io_pgtable *data; 801 phys_addr_t paddr; 802 803 if (cfg->ias > (arm_v7s_is_mtk_enabled(cfg) ? 34 : ARM_V7S_ADDR_BITS)) 804 return NULL; 805 806 if (cfg->oas > (arm_v7s_is_mtk_enabled(cfg) ? 35 : ARM_V7S_ADDR_BITS)) 807 return NULL; 808 809 if (cfg->quirks & ~(IO_PGTABLE_QUIRK_ARM_NS | 810
Re: [PATCH v2] iommu: fix an incorrect NULL check on list iterator
Hi Xiaomeng, Thank you for the patch! Yet something to improve: [auto build test ERROR on joro-iommu/next] [also build test ERROR on v5.18-rc5 next-20220429] [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/intel-lab-lkp/linux/commits/Xiaomeng-Tong/iommu-fix-an-incorrect-NULL-check-on-list-iterator/20220501-211400 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: arm-allmodconfig (https://download.01.org/0day-ci/archive/20220502/202205021754.gethfnns-...@intel.com/config) compiler: arm-linux-gnueabi-gcc (GCC) 11.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/intel-lab-lkp/linux/commit/99e334beef5d5be25ed19d3142d16000f0a1986d git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Xiaomeng-Tong/iommu-fix-an-incorrect-NULL-check-on-list-iterator/20220501-211400 git checkout 99e334beef5d5be25ed19d3142d16000f0a1986d # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): drivers/iommu/msm_iommu.c: In function 'qcom_iommu_of_xlate': >> drivers/iommu/msm_iommu.c:629:17: error: 'ret' undeclared (first use in this >> function); did you mean 'net'? 629 | ret = -ENODEV; | ^~~ | net drivers/iommu/msm_iommu.c:629:17: note: each undeclared identifier is reported only once for each function it appears in drivers/iommu/msm_iommu.c:638:1: error: control reaches end of non-void function [-Werror=return-type] 638 | } | ^ cc1: some warnings being treated as errors vim +629 drivers/iommu/msm_iommu.c f78ebca8ff3d61 Sricharan R 2016-06-13 614 f78ebca8ff3d61 Sricharan R 2016-06-13 615 static int qcom_iommu_of_xlate(struct device *dev, f78ebca8ff3d61 Sricharan R 2016-06-13 616 struct of_phandle_args *spec) f78ebca8ff3d61 Sricharan R 2016-06-13 617 { 99e334beef5d5b Xiaomeng Tong 2022-05-01 618struct msm_iommu_dev *iommu = NULL, *iter; f78ebca8ff3d61 Sricharan R 2016-06-13 619unsigned long flags; f78ebca8ff3d61 Sricharan R 2016-06-13 620 f78ebca8ff3d61 Sricharan R 2016-06-13 621 spin_lock_irqsave(&msm_iommu_lock, flags); 99e334beef5d5b Xiaomeng Tong 2022-05-01 622list_for_each_entry(iter, &qcom_iommu_devices, dev_node) 99e334beef5d5b Xiaomeng Tong 2022-05-01 623if (iter->dev->of_node == spec->np) { 99e334beef5d5b Xiaomeng Tong 2022-05-01 624iommu = iter; f78ebca8ff3d61 Sricharan R 2016-06-13 625break; 99e334beef5d5b Xiaomeng Tong 2022-05-01 626} f78ebca8ff3d61 Sricharan R 2016-06-13 627 99e334beef5d5b Xiaomeng Tong 2022-05-01 628if (!iommu) { f78ebca8ff3d61 Sricharan R 2016-06-13 @629ret = -ENODEV; f78ebca8ff3d61 Sricharan R 2016-06-13 630goto fail; f78ebca8ff3d61 Sricharan R 2016-06-13 631} f78ebca8ff3d61 Sricharan R 2016-06-13 632 bb5bdc5ab7f133 Xiaoke Wang 2022-04-28 633ret = insert_iommu_master(dev, &iommu, spec); f78ebca8ff3d61 Sricharan R 2016-06-13 634 fail: f78ebca8ff3d61 Sricharan R 2016-06-13 635 spin_unlock_irqrestore(&msm_iommu_lock, flags); f78ebca8ff3d61 Sricharan R 2016-06-13 636 f78ebca8ff3d61 Sricharan R 2016-06-13 637return ret; f78ebca8ff3d61 Sricharan R 2016-06-13 638 } f78ebca8ff3d61 Sricharan R 2016-06-13 639 -- 0-DAY CI Kernel Test Service https://01.org/lkp ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH v11 4/9] ACPI/IORT: Add support to retrieve IORT RMR reserved regions
Hi Shameer, I love your patch! Perhaps something to improve: [auto build test WARNING on joro-iommu/next] [also build test WARNING on rafael-pm/linux-next arm/for-next arm64/for-next/core soc/for-next linus/master v5.18-rc3 next-20220422] [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/intel-lab-lkp/linux/commits/Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20220423-003822 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20220423/202204232022.kmubee9l-...@intel.com/config) compiler: aarch64-linux-gcc (GCC) 11.2.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/intel-lab-lkp/linux/commit/5b73fd681a27e2ad450bac28f8a81f4b35fe4d68 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20220423-003822 git checkout 5b73fd681a27e2ad450bac28f8a81f4b35fe4d68 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/acpi/arm64/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> drivers/acpi/arm64/iort.c:801:29: warning: no previous prototype for >> 'iort_rmr_alloc' [-Wmissing-prototypes] 801 | struct iommu_iort_rmr_data *iort_rmr_alloc(struct acpi_iort_rmr_desc *rmr_desc, | ^~ drivers/acpi/arm64/iort.c: In function 'iort_get_rmrs': drivers/acpi/arm64/iort.c:896:34: error: 'ACPI_IORT_RMR_REMAP_PERMITTED' undeclared (first use in this function) 896 | if (rmr->flags & ACPI_IORT_RMR_REMAP_PERMITTED) | ^ drivers/acpi/arm64/iort.c:896:34: note: each undeclared identifier is reported only once for each function it appears in drivers/acpi/arm64/iort.c:901:34: error: 'ACPI_IORT_RMR_ACCESS_PRIVILEGE' undeclared (first use in this function) 901 | if (rmr->flags & ACPI_IORT_RMR_ACCESS_PRIVILEGE) | ^~ drivers/acpi/arm64/iort.c:905:21: error: implicit declaration of function 'ACPI_IORT_RMR_ACCESS_ATTRIBUTES'; did you mean 'ACPI_IORT_MF_ATTRIBUTES'? [-Werror=implicit-function-declaration] 905 | if (ACPI_IORT_RMR_ACCESS_ATTRIBUTES(rmr->flags) <= | ^~~ | ACPI_IORT_MF_ATTRIBUTES drivers/acpi/arm64/iort.c:906:33: error: 'ACPI_IORT_RMR_ATTR_DEVICE_GRE' undeclared (first use in this function) 906 | ACPI_IORT_RMR_ATTR_DEVICE_GRE) | ^ drivers/acpi/arm64/iort.c:909:33: error: 'ACPI_IORT_RMR_ATTR_NORMAL_IWB_OWB' undeclared (first use in this function) 909 | ACPI_IORT_RMR_ATTR_NORMAL_IWB_OWB) | ^ cc1: some warnings being treated as errors vim +/iort_rmr_alloc +801 drivers/acpi/arm64/iort.c 800 > 801 struct iommu_iort_rmr_data *iort_rmr_alloc(struct acpi_iort_rmr_desc > *rmr_desc, 802 int prot, enum iommu_resv_type type, 803 u32 *sids, u32 num_sids) 804 { 805 struct iommu_iort_rmr_data *rmr_data; 806 struct iommu_resv_region *region; 807 u32 *sids_copy; 808 u64 addr = rmr_desc->base_address, size = rmr_desc->length; 809 810 rmr_data = kmalloc(sizeof(*rmr_data), GFP_KERNEL); 811 if (!rmr_data) 812 return NULL; 813 814 /* Create a copy of SIDs array to associate with this rmr_data */ 815 sids_copy = kmemdup(sids, num_sids * sizeof(*sids), GFP_KERNEL); 816 if (!sids_copy) { 817 kfree(rmr_data); 818 return NULL; 819 } 820 rmr_data->sids = sids_copy; 821 rmr_data->num_sids = num_sids; 822 823 if (!IS_ALIGNED(addr, SZ_64K) || !IS_ALIGNED(size, SZ_64K)) { 824 /* PAGE align base add
Re: [PATCH v11 4/9] ACPI/IORT: Add support to retrieve IORT RMR reserved regions
Hi Shameer, I love your patch! Perhaps something to improve: [auto build test WARNING on joro-iommu/next] [also build test WARNING on rafael-pm/linux-next arm/for-next arm64/for-next/core soc/for-next linus/master v5.18-rc3 next-20220422] [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/intel-lab-lkp/linux/commits/Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20220423-003822 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: arm64-randconfig-r012-20220422 (https://download.01.org/0day-ci/archive/20220423/202204231737.0jkkpxzk-...@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 5bd87350a5ae429baf8f373cb226a57b62f87280) 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 arm64 cross compiling tool for clang build # apt-get install binutils-aarch64-linux-gnu # https://github.com/intel-lab-lkp/linux/commit/5b73fd681a27e2ad450bac28f8a81f4b35fe4d68 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20220423-003822 git checkout 5b73fd681a27e2ad450bac28f8a81f4b35fe4d68 # 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=arm64 SHELL=/bin/bash drivers/acpi/arm64/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> drivers/acpi/arm64/iort.c:801:29: warning: no previous prototype for >> function 'iort_rmr_alloc' [-Wmissing-prototypes] struct iommu_iort_rmr_data *iort_rmr_alloc(struct acpi_iort_rmr_desc *rmr_desc, ^ drivers/acpi/arm64/iort.c:801:1: note: declare 'static' if the function is not intended to be used outside of this translation unit struct iommu_iort_rmr_data *iort_rmr_alloc(struct acpi_iort_rmr_desc *rmr_desc, ^ static drivers/acpi/arm64/iort.c:896:20: error: use of undeclared identifier 'ACPI_IORT_RMR_REMAP_PERMITTED' if (rmr->flags & ACPI_IORT_RMR_REMAP_PERMITTED) ^ drivers/acpi/arm64/iort.c:901:20: error: use of undeclared identifier 'ACPI_IORT_RMR_ACCESS_PRIVILEGE' if (rmr->flags & ACPI_IORT_RMR_ACCESS_PRIVILEGE) ^ drivers/acpi/arm64/iort.c:905:7: error: call to undeclared function 'ACPI_IORT_RMR_ACCESS_ATTRIBUTES'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] if (ACPI_IORT_RMR_ACCESS_ATTRIBUTES(rmr->flags) <= ^ drivers/acpi/arm64/iort.c:906:5: error: use of undeclared identifier 'ACPI_IORT_RMR_ATTR_DEVICE_GRE' ACPI_IORT_RMR_ATTR_DEVICE_GRE) ^ drivers/acpi/arm64/iort.c:909:5: error: use of undeclared identifier 'ACPI_IORT_RMR_ATTR_NORMAL_IWB_OWB' ACPI_IORT_RMR_ATTR_NORMAL_IWB_OWB) ^ 1 warning and 5 errors generated. vim +/iort_rmr_alloc +801 drivers/acpi/arm64/iort.c 800 > 801 struct iommu_iort_rmr_data *iort_rmr_alloc(struct acpi_iort_rmr_desc > *rmr_desc, 802 int prot, enum iommu_resv_type type, 803 u32 *sids, u32 num_sids) 804 { 805 struct iommu_iort_rmr_data *rmr_data; 806 struct iommu_resv_region *region; 807 u32 *sids_copy; 808 u64 addr = rmr_desc->base_address, size = rmr_desc->length; 809 810 rmr_data = kmalloc(sizeof(*rmr_data), GFP_KERNEL); 811 if (!rmr_data) 812 return NULL; 813 814 /* Create a copy of SIDs array to associate with this rmr_data */ 815 sids_copy = kmemdup(sids, num_sids * sizeof(*sids), GFP_KERNEL); 816 if (!sids_copy) { 817 kfree(rmr_data); 818 return NULL; 819 } 820 rmr_data->sids = sids_copy; 821 rmr_data->num_sids = num_sids; 822 823 if (!IS_ALIGNED(addr, SZ_64K) || !IS_ALIGNED(size, SZ_64K)) { 824 /* PAGE align base addr and size */ 825 addr &= PAGE_MASK; 826 size = PAGE_ALIGN(
Re: [PATCH] iommu/mediatek: fix NULL pointer dereference when printing dev_name
Hi Miles, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on joro-iommu/next] [also build test WARNING on v5.18-rc3 next-20220422] [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/intel-lab-lkp/linux/commits/Miles-Chen/iommu-mediatek-fix-NULL-pointer-dereference-when-printing-dev_name/20220423-070605 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: hexagon-randconfig-r041-20220422 (https://download.01.org/0day-ci/archive/20220423/202204231446.iykdz674-...@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 5bd87350a5ae429baf8f373cb226a57b62f87280) 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/intel-lab-lkp/linux/commit/85771767e503ca60069fe4e6ec2ddb80c7f9bafa git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Miles-Chen/iommu-mediatek-fix-NULL-pointer-dereference-when-printing-dev_name/20220423-070605 git checkout 85771767e503ca60069fe4e6ec2ddb80c7f9bafa # 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=hexagon SHELL=/bin/bash drivers/iommu/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> drivers/iommu/mtk_iommu.c:605:6: warning: variable 'larbdev' is >> uninitialized when used here [-Wuninitialized] if (larbdev) { ^~~ drivers/iommu/mtk_iommu.c:597:24: note: initialize the variable 'larbdev' to silence this warning struct device *larbdev; ^ = NULL 1 warning generated. vim +/larbdev +605 drivers/iommu/mtk_iommu.c 592 593 static void mtk_iommu_release_device(struct device *dev) 594 { 595 struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev); 596 struct mtk_iommu_data *data; 597 struct device *larbdev; 598 unsigned int larbid; 599 600 if (!fwspec || fwspec->ops != &mtk_iommu_ops) 601 return; 602 603 data = dev_iommu_priv_get(dev); 604 larbid = MTK_M4U_TO_LARB(fwspec->ids[0]); > 605 if (larbdev) { 606 larbdev = data->larb_imu[larbid].dev; 607 device_link_remove(dev, larbdev); 608 } 609 610 iommu_fwspec_free(dev); 611 } 612 -- 0-DAY CI Kernel Test Service https://01.org/lkp ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH v6 4/7] hisi_ptt: Add tune function support for HiSilicon PCIe Tune and Trace device
Hi Yicong, I love your patch! Perhaps something to improve: [auto build test WARNING on joro-iommu/next] [also build test WARNING on linus/master linux/master v5.18-rc1 next-20220406] [cannot apply to tip/perf/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/intel-lab-lkp/linux/commits/Yicong-Yang/Add-support-for-HiSilicon-PCIe-Tune-and-Trace-device/20220406-200044 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20220407/202204071201.acepulor-...@intel.com/config) compiler: alpha-linux-gcc (GCC) 11.2.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/intel-lab-lkp/linux/commit/9400668b70cbcd5ec74a52f043c3a333b80135f8 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Yicong-Yang/Add-support-for-HiSilicon-PCIe-Tune-and-Trace-device/20220406-200044 git checkout 9400668b70cbcd5ec74a52f043c3a333b80135f8 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=alpha SHELL=/bin/bash drivers/hwtracing/ptt/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): drivers/hwtracing/ptt/hisi_ptt.c: In function 'hisi_ptt_tune_data_get': >> drivers/hwtracing/ptt/hisi_ptt.c:46:16: warning: conversion from 'long >> unsigned int' to 'u32' {aka 'unsigned int'} changes value from >> '18446744073709551615' to '4294967295' [-Woverflow] 46 | writel(~0UL, hisi_ptt->iobase + HISI_PTT_TUNING_DATA); |^~~~ drivers/hwtracing/ptt/hisi_ptt.c: At top level: drivers/hwtracing/ptt/hisi_ptt.c:1131:6: warning: no previous prototype for 'hisi_ptt_remove' [-Wmissing-prototypes] 1131 | void hisi_ptt_remove(struct pci_dev *pdev) | ^~~ vim +46 drivers/hwtracing/ptt/hisi_ptt.c 33 34 static int hisi_ptt_tune_data_get(struct hisi_ptt *hisi_ptt, 35u32 event, u16 *data) 36 { 37 u32 reg; 38 39 reg = readl(hisi_ptt->iobase + HISI_PTT_TUNING_CTRL); 40 reg &= ~(HISI_PTT_TUNING_CTRL_CODE | HISI_PTT_TUNING_CTRL_SUB); 41 reg |= FIELD_PREP(HISI_PTT_TUNING_CTRL_CODE | HISI_PTT_TUNING_CTRL_SUB, 42event); 43 writel(reg, hisi_ptt->iobase + HISI_PTT_TUNING_CTRL); 44 45 /* Write all 1 to indicates it's the read process */ > 46 writel(~0UL, hisi_ptt->iobase + HISI_PTT_TUNING_DATA); 47 48 if (!hisi_ptt_wait_tuning_finish(hisi_ptt)) 49 return -ETIMEDOUT; 50 51 reg = readl(hisi_ptt->iobase + HISI_PTT_TUNING_DATA); 52 reg &= HISI_PTT_TUNING_DATA_VAL_MASK; 53 *data = FIELD_GET(HISI_PTT_TUNING_DATA_VAL_MASK, reg); 54 55 return 0; 56 } 57 -- 0-DAY CI Kernel Test Service https://01.org/lkp ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH] RDMA/usnic: Refactor usnic_uiom_alloc_pd()
Hi Robin, I love your patch! Yet something to improve: [auto build test ERROR on rdma/for-next] [also build test ERROR on v5.18-rc1 next-20220406] [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/intel-lab-lkp/linux/commits/Robin-Murphy/RDMA-usnic-Refactor-usnic_uiom_alloc_pd/20220406-133657 base: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git for-next config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220407/202204070316.vozworw5-...@intel.com/config) compiler: gcc-11 (Debian 11.2.0-19) 11.2.0 reproduce (this is a W=1 build): # https://github.com/intel-lab-lkp/linux/commit/0aa6215010a083081b26ccb23d0aa2b4089bbbfd git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Robin-Murphy/RDMA-usnic-Refactor-usnic_uiom_alloc_pd/20220406-133657 git checkout 0aa6215010a083081b26ccb23d0aa2b4089bbbfd # save the config file to linux build tree mkdir build_dir make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): drivers/infiniband/hw/usnic/usnic_uiom.c: In function 'usnic_uiom_init': >> drivers/infiniband/hw/usnic/usnic_uiom.c:561:29: error: 'pci_bus_type' >> undeclared (first use in this function); did you mean 'bus_type'? 561 | if (!iommu_present(&pci_bus_type)) { | ^~~~ | bus_type drivers/infiniband/hw/usnic/usnic_uiom.c:561:29: note: each undeclared identifier is reported only once for each function it appears in vim +561 drivers/infiniband/hw/usnic/usnic_uiom.c e3cf00d0a87f02 Upinder Malhi 2013-09-10 558 e3cf00d0a87f02 Upinder Malhi 2013-09-10 559 int usnic_uiom_init(char *drv_name) e3cf00d0a87f02 Upinder Malhi 2013-09-10 560 { e3cf00d0a87f02 Upinder Malhi 2013-09-10 @561if (!iommu_present(&pci_bus_type)) { -- 0-DAY CI Kernel Test Service https://01.org/lkp ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH v2] iommu/amd: Add support to indicate whether DMA remap support is enabled
Hi Mario, Thank you for the patch! Yet something to improve: [auto build test ERROR on joro-iommu/next] [also build test ERROR on v5.17 next-20220318] [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/Mario-Limonciello/iommu-amd-Add-support-to-indicate-whether-DMA-remap-support-is-enabled/20220319-063131 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: x86_64-defconfig (https://download.01.org/0day-ci/archive/20220321/202203211032.fsaaokqt-...@intel.com/config) compiler: gcc-9 (Ubuntu 9.4.0-1ubuntu1~20.04) 9.4.0 reproduce (this is a W=1 build): # https://github.com/0day-ci/linux/commit/105690537e561d997e376617aa6a7d6d7b74a6a6 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Mario-Limonciello/iommu-amd-Add-support-to-indicate-whether-DMA-remap-support-is-enabled/20220319-063131 git checkout 105690537e561d997e376617aa6a7d6d7b74a6a6 # save the config file to linux build tree mkdir build_dir make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): drivers/iommu/amd/iommu.c: In function 'amd_iommu_capable': >> drivers/iommu/amd/iommu.c:2165:7: error: 'IOMMU_CAP_PRE_BOOT_PROTECTION' >> undeclared (first use in this function) 2165 | case IOMMU_CAP_PRE_BOOT_PROTECTION: | ^ drivers/iommu/amd/iommu.c:2165:7: note: each undeclared identifier is reported only once for each function it appears in vim +/IOMMU_CAP_PRE_BOOT_PROTECTION +2165 drivers/iommu/amd/iommu.c 2155 2156 static bool amd_iommu_capable(enum iommu_cap cap) 2157 { 2158 switch (cap) { 2159 case IOMMU_CAP_CACHE_COHERENCY: 2160 return true; 2161 case IOMMU_CAP_INTR_REMAP: 2162 return (irq_remapping_enabled == 1); 2163 case IOMMU_CAP_NOEXEC: 2164 return false; > 2165 case IOMMU_CAP_PRE_BOOT_PROTECTION: 2166 return amdr_ivrs_remap_support; 2167 default: 2168 break; 2169 } 2170 2171 return false; 2172 } 2173 -- 0-DAY CI Kernel Test Service https://01.org/lkp ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH v2] iommu/amd: Add support to indicate whether DMA remap support is enabled
Hi Mario, Thank you for the patch! Yet something to improve: [auto build test ERROR on joro-iommu/next] [also build test ERROR on v5.17 next-20220318] [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/Mario-Limonciello/iommu-amd-Add-support-to-indicate-whether-DMA-remap-support-is-enabled/20220319-063131 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: x86_64-buildonly-randconfig-r004-20220321 (https://download.01.org/0day-ci/archive/20220321/202203211052.wepydsq9-...@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 85e9b2687a13d1908aa86d1b89c5ce398a06cd39) 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/105690537e561d997e376617aa6a7d6d7b74a6a6 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Mario-Limonciello/iommu-amd-Add-support-to-indicate-whether-DMA-remap-support-is-enabled/20220319-063131 git checkout 105690537e561d997e376617aa6a7d6d7b74a6a6 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/iommu/amd/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): >> drivers/iommu/amd/iommu.c:2165:7: error: use of undeclared identifier >> 'IOMMU_CAP_PRE_BOOT_PROTECTION' case IOMMU_CAP_PRE_BOOT_PROTECTION: ^ 1 error generated. vim +/IOMMU_CAP_PRE_BOOT_PROTECTION +2165 drivers/iommu/amd/iommu.c 2155 2156 static bool amd_iommu_capable(enum iommu_cap cap) 2157 { 2158 switch (cap) { 2159 case IOMMU_CAP_CACHE_COHERENCY: 2160 return true; 2161 case IOMMU_CAP_INTR_REMAP: 2162 return (irq_remapping_enabled == 1); 2163 case IOMMU_CAP_NOEXEC: 2164 return false; > 2165 case IOMMU_CAP_PRE_BOOT_PROTECTION: 2166 return amdr_ivrs_remap_support; 2167 default: 2168 break; 2169 } 2170 2171 return false; 2172 } 2173 -- 0-DAY CI Kernel Test Service https://01.org/lkp ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH 2/2] thunderbolt: Use pre-boot DMA protection on AMD systems
Hi Mario, Thank you for the patch! Yet something to improve: [auto build test ERROR on joro-iommu/next] [also build test ERROR on arm-perf/for-next/perf linus/master v5.17-rc8 next-20220315] [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/Mario-Limonciello/iommu-amd-Add-support-to-indicate-whether-DMA-remap-support-is-enabled/20220316-002821 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: x86_64-randconfig-a012 (https://download.01.org/0day-ci/archive/20220316/202203160904.vb4alcdg-...@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project a6b2f50fb47da3baeee10b1906da6e30ac5d26ec) 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/9b0b7079d348c607cba7af4c87eaae1a79e52d91 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Mario-Limonciello/iommu-amd-Add-support-to-indicate-whether-DMA-remap-support-is-enabled/20220316-002821 git checkout 9b0b7079d348c607cba7af4c87eaae1a79e52d91 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/ 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/thunderbolt/domain.c:9: >> include/linux/amd-iommu.h:159:52: error: use of undeclared identifier >> 'ENODEV' static inline int amd_iommu_detect(void) { return -ENODEV; } ^ 1 error generated. vim +/ENODEV +159 include/linux/amd-iommu.h 6a9401a7ac13e6 arch/x86/include/asm/amd_iommu.h Joerg Roedel 2009-11-20 158 480125ba49ba62 arch/x86/include/asm/amd_iommu.h Konrad Rzeszutek Wilk 2010-08-26 @159 static inline int amd_iommu_detect(void) { return -ENODEV; } 6a9401a7ac13e6 arch/x86/include/asm/amd_iommu.h Joerg Roedel 2009-11-20 160 --- 0-DAY CI Kernel Test Service https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH 1/2] iommu/amd: Add support to indicate whether DMA remap support is enabled
Hi Mario, Thank you for the patch! Yet something to improve: [auto build test ERROR on joro-iommu/next] [also build test ERROR on arm-perf/for-next/perf linus/master v5.17-rc8 next-20220315] [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/Mario-Limonciello/iommu-amd-Add-support-to-indicate-whether-DMA-remap-support-is-enabled/20220316-002821 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: x86_64-defconfig (https://download.01.org/0day-ci/archive/20220316/202203160844.lkviwr1q-...@intel.com/config) compiler: gcc-9 (Ubuntu 9.4.0-1ubuntu1~20.04) 9.4.0 reproduce (this is a W=1 build): # https://github.com/0day-ci/linux/commit/fa63035401902e438c5ef3213112901a1054c621 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Mario-Limonciello/iommu-amd-Add-support-to-indicate-whether-DMA-remap-support-is-enabled/20220316-002821 git checkout fa63035401902e438c5ef3213112901a1054c621 # save the config file to linux build tree mkdir build_dir make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): >> drivers/iommu/amd/init.c:3294:6: error: redefinition of >> 'amd_ivrs_remap_support' 3294 | bool amd_ivrs_remap_support(void) | ^~ In file included from drivers/iommu/amd/init.c:20: include/linux/amd-iommu.h:198:20: note: previous definition of 'amd_ivrs_remap_support' was here 198 | static inline bool amd_ivrs_remap_support(void) |^~ vim +/amd_ivrs_remap_support +3294 drivers/iommu/amd/init.c 3284 3285 /* 3286 * ivrs_remap_support - Is %IOMMU_IVINFO_DMA_REMAP set in IVRS table 3287 * 3288 * Returns true if the platform has %IOMMU_IVINFO_DMA_REMAP% set in the IOMMU 3289 * IVRS IVInfo field. 3290 * Presence of this flag indicates to the OS/HV that the IOMMU is used for 3291 * Preboot DMA protection and device accessed memory should be remapped after 3292 * the OS has loaded. 3293 */ > 3294 bool amd_ivrs_remap_support(void) 3295 { 3296 return amdr_ivrs_remap_support; 3297 } 3298 EXPORT_SYMBOL_GPL(amd_ivrs_remap_support); 3299 --- 0-DAY CI Kernel Test Service https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH] iommu/amd: Fix loop timeout issue in iommu_ga_log_enable()
Hi Joerg, I love your patch! Yet something to improve: [auto build test ERROR on joro-iommu/next] [also build test ERROR on v5.17-rc2 next-20220131] [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/Joerg-Roedel/iommu-amd-Fix-loop-timeout-issue-in-iommu_ga_log_enable/20220201-002214 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20220201/202202011448.2ufiizhd-...@intel.com/config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce (this is a W=1 build): # https://github.com/0day-ci/linux/commit/5b5785526da0e2a6e793d2107d09afc9f310f17f git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Joerg-Roedel/iommu-amd-Fix-loop-timeout-issue-in-iommu_ga_log_enable/20220201-002214 git checkout 5b5785526da0e2a6e793d2107d09afc9f310f17f # save the config file to linux build tree mkdir build_dir make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): drivers/iommu/amd/init.c: In function 'iommu_ga_log_enable': >> drivers/iommu/amd/init.c:837:3: error: implicit declaration of function >> 'udelay' [-Werror=implicit-function-declaration] 837 | udelay(1); | ^~ cc1: some warnings being treated as errors vim +/udelay +837 drivers/iommu/amd/init.c 804 805 static int iommu_ga_log_enable(struct amd_iommu *iommu) 806 { 807 #ifdef CONFIG_IRQ_REMAP 808 u32 status, i; 809 u64 entry; 810 811 if (!iommu->ga_log) 812 return -EINVAL; 813 814 /* Check if already running */ 815 status = readl(iommu->mmio_base + MMIO_STATUS_OFFSET); 816 if (WARN_ON(status & (MMIO_STATUS_GALOG_RUN_MASK))) 817 return 0; 818 819 entry = iommu_virt_to_phys(iommu->ga_log) | GA_LOG_SIZE_512; 820 memcpy_toio(iommu->mmio_base + MMIO_GA_LOG_BASE_OFFSET, 821 &entry, sizeof(entry)); 822 entry = (iommu_virt_to_phys(iommu->ga_log_tail) & 823 (BIT_ULL(52)-1)) & ~7ULL; 824 memcpy_toio(iommu->mmio_base + MMIO_GA_LOG_TAIL_OFFSET, 825 &entry, sizeof(entry)); 826 writel(0x00, iommu->mmio_base + MMIO_GA_HEAD_OFFSET); 827 writel(0x00, iommu->mmio_base + MMIO_GA_TAIL_OFFSET); 828 829 830 iommu_feature_enable(iommu, CONTROL_GAINT_EN); 831 iommu_feature_enable(iommu, CONTROL_GALOG_EN); 832 833 for (i = 0; i < LOOP_TIMEOUT; ++i) { 834 status = readl(iommu->mmio_base + MMIO_STATUS_OFFSET); 835 if (status & (MMIO_STATUS_GALOG_RUN_MASK)) 836 break; > 837 udelay(1); 838 } 839 840 if (WARN_ON(i >= LOOP_TIMEOUT)) 841 return -EINVAL; 842 #endif /* CONFIG_IRQ_REMAP */ 843 return 0; 844 } 845 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH v2 11/11] iommu: Move flush queue data into iommu_dma_cookie
Hi Robin, I love your patch! Yet something to improve: [auto build test ERROR on joro-iommu/next] [also build test ERROR on tegra/for-next v5.16-rc4] [cannot apply to tegra-drm/drm/tegra/for-next] [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/Robin-Murphy/iommu-refactor-flush-queues-into-iommu-dma/20211211-015635 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: arm64-randconfig-r014-20211210 (https://download.01.org/0day-ci/archive/20211211/202112110744.cwu0wc1o-...@intel.com/config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 097a1cb1d5ebb3a0ec4bcaed8ba3ff6a8e33c00a) 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 arm64 cross compiling tool for clang build # apt-get install binutils-aarch64-linux-gnu # https://github.com/0day-ci/linux/commit/3b6adb4a8ec42d7b5c1b3b1af2c857a2375fd7e1 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Robin-Murphy/iommu-refactor-flush-queues-into-iommu-dma/20211211-015635 git checkout 3b6adb4a8ec42d7b5c1b3b1af2c857a2375fd7e1 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/gpu/drm/tegra/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): >> drivers/gpu/drm/tegra/hub.c:1043:17: error: implicit declaration of function >> 'dma_get_mask' [-Werror,-Wimplicit-function-declaration] u64 dma_mask = dma_get_mask(pdev->dev.parent); ^ drivers/gpu/drm/tegra/hub.c:1043:17: note: did you mean 'xa_get_mark'? include/linux/xarray.h:354:6: note: 'xa_get_mark' declared here bool xa_get_mark(struct xarray *, unsigned long index, xa_mark_t); ^ >> drivers/gpu/drm/tegra/hub.c:1050:8: error: implicit declaration of function >> 'dma_coerce_mask_and_coherent' [-Werror,-Wimplicit-function-declaration] err = dma_coerce_mask_and_coherent(&pdev->dev, dma_mask); ^ 2 errors generated. -- >> drivers/gpu/drm/tegra/plane.c:46:21: error: use of undeclared identifier >> 'DMA_MAPPING_ERROR' state->iova[i] = DMA_MAPPING_ERROR; ^ drivers/gpu/drm/tegra/plane.c:76:19: error: use of undeclared identifier 'DMA_MAPPING_ERROR' copy->iova[i] = DMA_MAPPING_ERROR; ^ >> drivers/gpu/drm/tegra/plane.c:170:10: error: implicit declaration of >> function 'dma_map_sgtable' [-Werror,-Wimplicit-function-declaration] err = dma_map_sgtable(dc->dev, sgt, DMA_TO_DEVICE, 0); ^ drivers/gpu/drm/tegra/plane.c:170:10: note: did you mean 'iommu_map_sgtable'? include/linux/iommu.h:1097:22: note: 'iommu_map_sgtable' declared here static inline size_t iommu_map_sgtable(struct iommu_domain *domain, ^ >> drivers/gpu/drm/tegra/plane.c:170:40: error: use of undeclared identifier >> 'DMA_TO_DEVICE' err = dma_map_sgtable(dc->dev, sgt, DMA_TO_DEVICE, 0); ^ >> drivers/gpu/drm/tegra/plane.c:202:4: error: implicit declaration of function >> 'dma_unmap_sgtable' [-Werror,-Wimplicit-function-declaration] dma_unmap_sgtable(dc->dev, sgt, DMA_TO_DEVICE, 0); ^ drivers/gpu/drm/tegra/plane.c:202:4: note: did you mean 'iommu_map_sgtable'? include/linux/iommu.h:1097:22: note: 'iommu_map_sgtable' declared here static inline size_t iommu_map_sgtable(struct iommu_domain *domain, ^ drivers/gpu/drm/tegra/plane.c:202:36: error: use of undeclared identifier 'DMA_TO_DEVICE' dma_unmap_sgtable(dc->dev, sgt, DMA_TO_DEVICE, 0); ^ drivers/gpu/drm/tegra/plane.c:205:20: error: use of undeclared identifier 'DMA_MAPPING_ERROR' state->iova[i] = DMA_MAPPING_ERROR; ^ drivers/gpu/drm/tegra/plane.c:221:4: error: implicit declaration of function 'dma_unmap_sgtable' [-Werror,-W
Re: [PATCH v2 11/11] iommu: Move flush queue data into iommu_dma_cookie
Hi Robin, I love your patch! Yet something to improve: [auto build test ERROR on joro-iommu/next] [also build test ERROR on tegra/for-next v5.16-rc4] [cannot apply to tegra-drm/drm/tegra/for-next] [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/Robin-Murphy/iommu-refactor-flush-queues-into-iommu-dma/20211211-015635 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: arm-randconfig-r013-20211210 (https://download.01.org/0day-ci/archive/20211211/202112110753.vybslmnq-...@intel.com/config) compiler: arm-linux-gnueabi-gcc (GCC) 11.2.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/3b6adb4a8ec42d7b5c1b3b1af2c857a2375fd7e1 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Robin-Murphy/iommu-refactor-flush-queues-into-iommu-dma/20211211-015635 git checkout 3b6adb4a8ec42d7b5c1b3b1af2c857a2375fd7e1 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash drivers/gpu/drm/tegra/ drivers/iommu/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): drivers/gpu/drm/tegra/hub.c: In function 'tegra_display_hub_probe': >> drivers/gpu/drm/tegra/hub.c:1043:24: error: implicit declaration of function >> 'dma_get_mask'; did you mean 'xa_get_mark'? >> [-Werror=implicit-function-declaration] 1043 | u64 dma_mask = dma_get_mask(pdev->dev.parent); |^~~~ |xa_get_mark >> drivers/gpu/drm/tegra/hub.c:1050:15: error: implicit declaration of function >> 'dma_coerce_mask_and_coherent' [-Werror=implicit-function-declaration] 1050 | err = dma_coerce_mask_and_coherent(&pdev->dev, dma_mask); | ^~~~ cc1: some warnings being treated as errors -- drivers/gpu/drm/tegra/plane.c: In function 'tegra_plane_reset': >> drivers/gpu/drm/tegra/plane.c:46:42: error: 'DMA_MAPPING_ERROR' undeclared >> (first use in this function) 46 | state->iova[i] = DMA_MAPPING_ERROR; | ^ drivers/gpu/drm/tegra/plane.c:46:42: note: each undeclared identifier is reported only once for each function it appears in drivers/gpu/drm/tegra/plane.c: In function 'tegra_plane_atomic_duplicate_state': drivers/gpu/drm/tegra/plane.c:76:33: error: 'DMA_MAPPING_ERROR' undeclared (first use in this function) 76 | copy->iova[i] = DMA_MAPPING_ERROR; | ^ drivers/gpu/drm/tegra/plane.c: In function 'tegra_dc_pin': >> drivers/gpu/drm/tegra/plane.c:170:31: error: implicit declaration of >> function 'dma_map_sgtable'; did you mean 'iommu_map_sgtable'? >> [-Werror=implicit-function-declaration] 170 | err = dma_map_sgtable(dc->dev, sgt, DMA_TO_DEVICE, 0); | ^~~ | iommu_map_sgtable >> drivers/gpu/drm/tegra/plane.c:170:61: error: 'DMA_TO_DEVICE' undeclared >> (first use in this function); did you mean 'MT_DEVICE'? 170 | err = dma_map_sgtable(dc->dev, sgt, DMA_TO_DEVICE, 0); | ^ | MT_DEVICE >> drivers/gpu/drm/tegra/plane.c:202:25: error: implicit declaration of >> function 'dma_unmap_sgtable'; did you mean 'iommu_map_sgtable'? >> [-Werror=implicit-function-declaration] 202 | dma_unmap_sgtable(dc->dev, sgt, DMA_TO_DEVICE, 0); | ^ | iommu_map_sgtable drivers/gpu/drm/tegra/plane.c:205:34: error: 'DMA_MAPPING_ERROR' undeclared (first use in this function) 205 | state->iova[i] = DMA_MAPPING_ERROR; | ^~~~
Re: [PATCH 4/4] dmaengine: idxd: Use DMA API for in-kernel DMA with PASID
Hi Jacob, I love your patch! Yet something to improve: [auto build test ERROR on joro-iommu/next] [also build test ERROR on vkoul-dmaengine/next linux/master linus/master v5.16-rc4 next-20211208] [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/Jacob-Pan/Enable-PASID-for-DMA-API-users/20211208-063637 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: x86_64-randconfig-a013-20211208 (https://download.01.org/0day-ci/archive/20211209/202112090231.mek0hpuw-...@intel.com/config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce (this is a W=1 build): # https://github.com/0day-ci/linux/commit/018108bcd08fc145526791870b4b58edeecfca1e git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Jacob-Pan/Enable-PASID-for-DMA-API-users/20211208-063637 git checkout 018108bcd08fc145526791870b4b58edeecfca1e # save the config file to linux build tree mkdir build_dir make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/dma/idxd/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): drivers/dma/idxd/init.c: In function 'idxd_enable_system_pasid': >> drivers/dma/idxd/init.c:532:10: error: implicit declaration of function >> 'iommu_enable_pasid_dma'; did you mean 'iommu_enable_nesting'? >> [-Werror=implicit-function-declaration] 532 | pasid = iommu_enable_pasid_dma(&idxd->pdev->dev); | ^~ | iommu_enable_nesting drivers/dma/idxd/init.c: In function 'idxd_disable_system_pasid': >> drivers/dma/idxd/init.c:544:2: error: implicit declaration of function >> 'iommu_disable_pasid_dma' [-Werror=implicit-function-declaration] 544 | iommu_disable_pasid_dma(&idxd->pdev->dev); | ^~~ cc1: some warnings being treated as errors vim +532 drivers/dma/idxd/init.c 527 528 static int idxd_enable_system_pasid(struct idxd_device *idxd) 529 { 530 u32 pasid; 531 > 532 pasid = iommu_enable_pasid_dma(&idxd->pdev->dev); 533 if (pasid == INVALID_IOASID) { 534 dev_err(&idxd->pdev->dev, "No kernel DMA PASID\n"); 535 return -ENODEV; 536 } 537 idxd->pasid = pasid; 538 539 return 0; 540 } 541 542 static void idxd_disable_system_pasid(struct idxd_device *idxd) 543 { > 544 iommu_disable_pasid_dma(&idxd->pdev->dev); 545 idxd->pasid = 0; 546 } 547 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH 9/9] iommu: Move flush queue data into iommu_dma_cookie
Hi Robin, I love your patch! Perhaps something to improve: [auto build test WARNING on joro-iommu/next] [also build test WARNING on v5.16-rc2 next-20211123] [cannot apply to tegra-drm/drm/tegra/for-next] [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/Robin-Murphy/iommu-Refactor-flush-queues-into-iommu-dma/20211123-221220 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: arm-defconfig (https://download.01.org/0day-ci/archive/20211124/202111240645.30neuyaq-...@intel.com/config.gz) compiler: arm-linux-gnueabi-gcc (GCC) 11.2.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/d4623bb02366503fa7c3805228fa9534c9490d20 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Robin-Murphy/iommu-Refactor-flush-queues-into-iommu-dma/20211123-221220 git checkout d4623bb02366503fa7c3805228fa9534c9490d20 # save the config file to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arm If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): drivers/gpu/drm/tegra/vic.c: In function 'vic_exit': drivers/gpu/drm/tegra/vic.c:196:17: error: implicit declaration of function 'dma_unmap_single'; did you mean 'mount_single'? [-Werror=implicit-function-declaration] 196 | dma_unmap_single(vic->dev, vic->falcon.firmware.phys, | ^~~~ | mount_single drivers/gpu/drm/tegra/vic.c:197:61: error: 'DMA_TO_DEVICE' undeclared (first use in this function); did you mean 'MT_DEVICE'? 197 | vic->falcon.firmware.size, DMA_TO_DEVICE); | ^ | MT_DEVICE drivers/gpu/drm/tegra/vic.c:197:61: note: each undeclared identifier is reported only once for each function it appears in drivers/gpu/drm/tegra/vic.c:202:17: error: implicit declaration of function 'dma_free_coherent' [-Werror=implicit-function-declaration] 202 | dma_free_coherent(vic->dev, vic->falcon.firmware.size, | ^ drivers/gpu/drm/tegra/vic.c: In function 'vic_load_firmware': drivers/gpu/drm/tegra/vic.c:234:24: error: implicit declaration of function 'dma_alloc_coherent' [-Werror=implicit-function-declaration] 234 | virt = dma_alloc_coherent(vic->dev, size, &iova, GFP_KERNEL); |^~ >> drivers/gpu/drm/tegra/vic.c:234:22: warning: assignment to 'void *' from >> 'int' makes pointer from integer without a cast [-Wint-conversion] 234 | virt = dma_alloc_coherent(vic->dev, size, &iova, GFP_KERNEL); | ^ drivers/gpu/drm/tegra/vic.c:236:23: error: implicit declaration of function 'dma_mapping_error' [-Werror=implicit-function-declaration] 236 | err = dma_mapping_error(vic->dev, iova); | ^ drivers/gpu/drm/tegra/vic.c:258:24: error: implicit declaration of function 'dma_map_single' [-Werror=implicit-function-declaration] 258 | phys = dma_map_single(vic->dev, virt, size, DMA_TO_DEVICE); |^~ drivers/gpu/drm/tegra/vic.c:258:61: error: 'DMA_TO_DEVICE' undeclared (first use in this function); did you mean 'MT_DEVICE'? 258 | phys = dma_map_single(vic->dev, virt, size, DMA_TO_DEVICE); | ^ | MT_DEVICE drivers/gpu/drm/tegra/vic.c: In function 'vic_probe': drivers/gpu/drm/tegra/vic.c:412:15: error: implicit declaration of function 'dma_coerce_mask_and_coherent' [-Werror=implicit-function-declaration] 412 | err = dma_coerce_mask_and_coherent(dev, *dev->parent->dma_mask); | ^~~~ cc1: some warnings being treated as errors vim +234 drivers/gpu/drm/tegra/vic.c 0ae797a8ba05a2 Arto Merilainen 2016-12-14 214 77a0b09dd993c8 Thierry Reding 201
Re: [PATCH] dma-direct: fix DMA_ATTR_NO_KERNEL_MAPPING
Hi Walter, Thank you for the patch! Yet something to improve: [auto build test ERROR on linux/master] [also build test ERROR on linus/master v5.15 next-20211029] [cannot apply to hch-configfs/for-next] [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/Walter-Wu/dma-direct-fix-DMA_ATTR_NO_KERNEL_MAPPING/20211101-111657 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 2f111a6fd5b5297b4e92f53798ca086f7c7d33a4 config: i386-randconfig-r036-20211101 (attached as .config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 82ed106567063ea269c6d5669278b733e173a42f) 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/4694d2ac8f4f9a7476f829f9f43a25111424eca8 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Walter-Wu/dma-direct-fix-DMA_ATTR_NO_KERNEL_MAPPING/20211101-111657 git checkout 4694d2ac8f4f9a7476f829f9f43a25111424eca8 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): >> kernel/dma/direct.c:174:3: error: implicit declaration of function >> 'set_memory_valid' [-Werror,-Wimplicit-function-declaration] set_memory_valid((unsigned long)phys_to_virt(dma_to_phys(dev, *dma_handle)), ^ kernel/dma/direct.c:287:3: error: implicit declaration of function 'set_memory_valid' [-Werror,-Wimplicit-function-declaration] set_memory_valid((unsigned long)phys_to_virt(dma_to_phys(dev, dma_addr)), ^ 2 errors generated. vim +/set_memory_valid +174 kernel/dma/direct.c 152 153 void *dma_direct_alloc(struct device *dev, size_t size, 154 dma_addr_t *dma_handle, gfp_t gfp, unsigned long attrs) 155 { 156 struct page *page; 157 void *ret; 158 int err; 159 160 size = PAGE_ALIGN(size); 161 if (attrs & DMA_ATTR_NO_WARN) 162 gfp |= __GFP_NOWARN; 163 164 if ((attrs & DMA_ATTR_NO_KERNEL_MAPPING) && 165 !force_dma_unencrypted(dev) && !is_swiotlb_for_alloc(dev)) { 166 page = __dma_direct_alloc_pages(dev, size, gfp & ~__GFP_ZERO); 167 if (!page) 168 return NULL; 169 /* remove any dirty cache lines on the kernel alias */ 170 if (!PageHighMem(page)) 171 arch_dma_prep_coherent(page, size); 172 *dma_handle = phys_to_dma_direct(dev, page_to_phys(page)); 173 /* remove kernel mapping for pages */ > 174 set_memory_valid((unsigned > long)phys_to_virt(dma_to_phys(dev, *dma_handle)), 175 size >> PAGE_SHIFT, 0); 176 /* return the page pointer as the opaque cookie */ 177 return page; 178 } 179 180 if (!IS_ENABLED(CONFIG_ARCH_HAS_DMA_SET_UNCACHED) && 181 !IS_ENABLED(CONFIG_DMA_DIRECT_REMAP) && 182 !IS_ENABLED(CONFIG_DMA_GLOBAL_POOL) && 183 !dev_is_dma_coherent(dev) && 184 !is_swiotlb_for_alloc(dev)) 185 return arch_dma_alloc(dev, size, dma_handle, gfp, attrs); 186 187 if (IS_ENABLED(CONFIG_DMA_GLOBAL_POOL) && 188 !dev_is_dma_coherent(dev)) 189 return dma_alloc_from_global_coherent(dev, size, dma_handle); 190 191 /* 192 * Remapping or decrypting memory may block. If either is required and 193 * we can't block, allocate the memory from the atomic pools. 194 * If restricted DMA (i.e., is_swiotlb_for_alloc) is required, one must 195 * set up another device coherent pool by shared-dma-pool and use 196 * dma_alloc_from_dev_coherent instead. 197 */ 198 if (IS_ENABLED(CONFIG_DMA_COHERENT_POOL) && 199 !gfpflags_allow_blocking(gfp) && 200 (force_dma_unencrypted(dev) || 201 (IS_ENABLED(CONFIG_DMA_DIRECT_REMAP) && 202!dev_is_dma_coherent(dev))) && 203 !is_sw
Re: [PATCH] iommu/iova: Add support for IOVA max alignment tuning
Hi Georgi, I love your patch! Yet something to improve: [auto build test ERROR on joro-iommu/next] [also build test ERROR on hnaz-mm/master linus/master v5.15-rc5 next-20211013] [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/Georgi-Djakov/iommu-iova-Add-support-for-IOVA-max-alignment-tuning/20211014-021248 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: i386-randconfig-a003-20211013 (attached as .config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project b6a8c695542b2987eb9a203d5663a0740cb4725f) 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/dc4cf3ea22a4c30a8a2c395e830ea37dd819 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Georgi-Djakov/iommu-iova-Add-support-for-IOVA-max-alignment-tuning/20211014-021248 git checkout dc4cf3ea22a4c30a8a2c395e830ea37dd819 # save the attached .config to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/iommu/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All error/warnings (new ones prefixed by >>): >> drivers/iommu/iova.c:52:13: error: expected parameter declarator early_param("iommu.max_align_shift", iommu_set_def_max_align_shift); ^ >> drivers/iommu/iova.c:52:13: error: expected ')' drivers/iommu/iova.c:52:12: note: to match this '(' early_param("iommu.max_align_shift", iommu_set_def_max_align_shift); ^ >> drivers/iommu/iova.c:52:1: warning: declaration specifier missing, >> defaulting to 'int' early_param("iommu.max_align_shift", iommu_set_def_max_align_shift); ^ int >> drivers/iommu/iova.c:52:12: error: this function declaration is not a >> prototype [-Werror,-Wstrict-prototypes] early_param("iommu.max_align_shift", iommu_set_def_max_align_shift); ^ void 1 warning and 3 errors generated. vim +52 drivers/iommu/iova.c 40 41 static int __init iommu_set_def_max_align_shift(char *str) 42 { 43 unsigned long max_align_shift; 44 45 int ret = kstrtoul(str, 10, &max_align_shift); 46 47 if (!ret) 48 iommu_max_align_shift = max_align_shift; 49 50 return 0; 51 } > 52 early_param("iommu.max_align_shift", iommu_set_def_max_align_shift); 53 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH v2 4/8] iommu/dma: Support granule > PAGE_SIZE in dma_map_sg
Hi Sven, I love your patch! Perhaps something to improve: [auto build test WARNING on iommu/next] [also build test WARNING on v5.14-rc7 next-20210827] [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/Sven-Peter/Support-IOMMU-page-sizes-larger-than-the-CPU-page-size/20210828-233909 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: x86_64-randconfig-r004-20210827 (attached as .config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 4e1a164d7bd53653f79decc121afe784d2fde0a7) 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/fa978f84667cfd7d8cb467899da60c08321798a5 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Sven-Peter/Support-IOMMU-page-sizes-larger-than-the-CPU-page-size/20210828-233909 git checkout fa978f84667cfd7d8cb467899da60c08321798a5 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): drivers/iommu/dma-iommu.c:935:18: error: implicit declaration of function 'phys_to_page' [-Werror,-Wimplicit-function-declaration] sg_set_page(s, phys_to_page(sg_phys(s) + s_iova_off), s_length, ^ >> drivers/iommu/dma-iommu.c:935:18: warning: incompatible integer to pointer >> conversion passing 'int' to parameter of type 'struct page *' >> [-Wint-conversion] sg_set_page(s, phys_to_page(sg_phys(s) + s_iova_off), s_length, ^ include/linux/scatterlist.h:110:69: note: passing argument to parameter 'page' here static inline void sg_set_page(struct scatterlist *sg, struct page *page, ^ drivers/iommu/dma-iommu.c:982:9: error: implicit declaration of function 'phys_to_page' [-Werror,-Wimplicit-function-declaration] phys_to_page(sg_phys(s) + sg_dma_address(s)), ^ drivers/iommu/dma-iommu.c:982:9: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'struct page *' [-Wint-conversion] phys_to_page(sg_phys(s) + sg_dma_address(s)), ^~~~ include/linux/scatterlist.h:110:69: note: passing argument to parameter 'page' here static inline void sg_set_page(struct scatterlist *sg, struct page *page, ^ drivers/iommu/dma-iommu.c:1068:18: error: implicit declaration of function 'phys_to_page' [-Werror,-Wimplicit-function-declaration] sg_set_page(s, phys_to_page(s_phys - s_iova_off), ^ drivers/iommu/dma-iommu.c:1068:18: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'struct page *' [-Wint-conversion] sg_set_page(s, phys_to_page(s_phys - s_iova_off), ^ include/linux/scatterlist.h:110:69: note: passing argument to parameter 'page' here static inline void sg_set_page(struct scatterlist *sg, struct page *page, ^ 3 warnings and 3 errors generated. vim +935 drivers/iommu/dma-iommu.c 913 914 /* 915 * Prepare a successfully-mapped scatterlist to give back to the caller. 916 * 917 * At this point the segments are already laid out by iommu_dma_map_sg() to 918 * avoid individually crossing any boundaries, so we merely need to check a 919 * segment's start address to avoid concatenating across one. 920 */ 921 static int __finalise_sg(struct device *dev, struct scatterlist *sg, int nents, 922 dma_addr_t dma_addr) 923 { 924 struct scatterlist *s, *cur = sg; 925 unsigned long seg_mask = dma_get_seg_boundary(dev); 926 unsigned int cur_len = 0, max_len = dma_get_max_seg_size(dev); 927 int i, count = 0; 928 929 for_each_sg(sg, s, nents, i) { 930 /* R
Re: [PATCH v2 4/8] iommu/dma: Support granule > PAGE_SIZE in dma_map_sg
Hi Sven, I love your patch! Perhaps something to improve: [auto build test WARNING on iommu/next] [also build test WARNING on v5.14-rc7 next-20210827] [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/Sven-Peter/Support-IOMMU-page-sizes-larger-than-the-CPU-page-size/20210828-233909 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: x86_64-randconfig-m001-20210827 (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce (this is a W=1 build): # https://github.com/0day-ci/linux/commit/fa978f84667cfd7d8cb467899da60c08321798a5 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Sven-Peter/Support-IOMMU-page-sizes-larger-than-the-CPU-page-size/20210828-233909 git checkout fa978f84667cfd7d8cb467899da60c08321798a5 # save the attached .config to linux build tree make W=1 ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): drivers/iommu/dma-iommu.c: In function '__finalise_sg': drivers/iommu/dma-iommu.c:935:18: error: implicit declaration of function 'phys_to_page'; did you mean 'pfn_to_page'? [-Werror=implicit-function-declaration] 935 | sg_set_page(s, phys_to_page(sg_phys(s) + s_iova_off), s_length, | ^~~~ | pfn_to_page >> drivers/iommu/dma-iommu.c:935:18: warning: passing argument 2 of >> 'sg_set_page' makes pointer from integer without a cast [-Wint-conversion] 935 | sg_set_page(s, phys_to_page(sg_phys(s) + s_iova_off), s_length, | ^ | | | int In file included from include/linux/dma-mapping.h:10, from include/linux/dma-map-ops.h:9, from drivers/iommu/dma-iommu.c:13: include/linux/scatterlist.h:110:69: note: expected 'struct page *' but argument is of type 'int' 110 | static inline void sg_set_page(struct scatterlist *sg, struct page *page, | ~^~~~ drivers/iommu/dma-iommu.c: In function '__invalidate_sg': drivers/iommu/dma-iommu.c:982:9: warning: passing argument 2 of 'sg_set_page' makes pointer from integer without a cast [-Wint-conversion] 982 | phys_to_page(sg_phys(s) + sg_dma_address(s)), | ^~~~ | | | int In file included from include/linux/dma-mapping.h:10, from include/linux/dma-map-ops.h:9, from drivers/iommu/dma-iommu.c:13: include/linux/scatterlist.h:110:69: note: expected 'struct page *' but argument is of type 'int' 110 | static inline void sg_set_page(struct scatterlist *sg, struct page *page, | ~^~~~ drivers/iommu/dma-iommu.c: In function 'iommu_dma_map_sg': drivers/iommu/dma-iommu.c:1068:18: warning: passing argument 2 of 'sg_set_page' makes pointer from integer without a cast [-Wint-conversion] 1068 | sg_set_page(s, phys_to_page(s_phys - s_iova_off), | ^ | | | int In file included from include/linux/dma-mapping.h:10, from include/linux/dma-map-ops.h:9, from drivers/iommu/dma-iommu.c:13: include/linux/scatterlist.h:110:69: note: expected 'struct page *' but argument is of type 'int' 110 | static inline void sg_set_page(struct scatterlist *sg, struct page *page, | ~^~~~ cc1: some warnings being treated as errors vim +/sg_set_page +935 drivers/iommu/dma-iommu.c 913 914 /* 915 * Prepare a successfully-mapped scatterlist to give back to the caller. 916 * 917 * At this point the segments are already laid out by iommu_dma_map_sg() to 918 * avoid individually crossing any boundaries, so we merely need to check a 919 * segment's start address to avoid concatenating across one. 920 */ 921 static int __finalise_sg(struct device *dev, struct scatterlist *sg, int nents, 922 dma_addr_t dma_addr) 923 { 924 struct scatterlist *s, *cur = sg; 925 unsigned long seg_mask = dma_get_seg_boundary(dev);
Re: [PATCH v2 4/8] iommu/dma: Support granule > PAGE_SIZE in dma_map_sg
Hi Sven, I love your patch! Perhaps something to improve: [auto build test WARNING on iommu/next] [also build test WARNING on v5.14-rc7 next-20210827] [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/Sven-Peter/Support-IOMMU-page-sizes-larger-than-the-CPU-page-size/20210828-233909 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: i386-randconfig-c001-20210827 (attached as .config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 4e1a164d7bd53653f79decc121afe784d2fde0a7) 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/fa978f84667cfd7d8cb467899da60c08321798a5 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Sven-Peter/Support-IOMMU-page-sizes-larger-than-the-CPU-page-size/20210828-233909 git checkout fa978f84667cfd7d8cb467899da60c08321798a5 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): drivers/iommu/dma-iommu.c:935:18: error: implicit declaration of function 'phys_to_page' [-Werror,-Wimplicit-function-declaration] sg_set_page(s, phys_to_page(sg_phys(s) + s_iova_off), s_length, ^ >> drivers/iommu/dma-iommu.c:935:18: warning: incompatible integer to pointer >> conversion passing 'int' to parameter of type 'struct page *' >> [-Wint-conversion] sg_set_page(s, phys_to_page(sg_phys(s) + s_iova_off), s_length, ^ include/linux/scatterlist.h:110:69: note: passing argument to parameter 'page' here static inline void sg_set_page(struct scatterlist *sg, struct page *page, ^ drivers/iommu/dma-iommu.c:982:9: error: implicit declaration of function 'phys_to_page' [-Werror,-Wimplicit-function-declaration] phys_to_page(sg_phys(s) + sg_dma_address(s)), ^ drivers/iommu/dma-iommu.c:982:9: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'struct page *' [-Wint-conversion] phys_to_page(sg_phys(s) + sg_dma_address(s)), ^~~~ include/linux/scatterlist.h:110:69: note: passing argument to parameter 'page' here static inline void sg_set_page(struct scatterlist *sg, struct page *page, ^ drivers/iommu/dma-iommu.c:1068:18: error: implicit declaration of function 'phys_to_page' [-Werror,-Wimplicit-function-declaration] sg_set_page(s, phys_to_page(s_phys - s_iova_off), ^ drivers/iommu/dma-iommu.c:1068:18: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'struct page *' [-Wint-conversion] sg_set_page(s, phys_to_page(s_phys - s_iova_off), ^ include/linux/scatterlist.h:110:69: note: passing argument to parameter 'page' here static inline void sg_set_page(struct scatterlist *sg, struct page *page, ^ 3 warnings and 3 errors generated. vim +935 drivers/iommu/dma-iommu.c 913 914 /* 915 * Prepare a successfully-mapped scatterlist to give back to the caller. 916 * 917 * At this point the segments are already laid out by iommu_dma_map_sg() to 918 * avoid individually crossing any boundaries, so we merely need to check a 919 * segment's start address to avoid concatenating across one. 920 */ 921 static int __finalise_sg(struct device *dev, struct scatterlist *sg, int nents, 922 dma_addr_t dma_addr) 923 { 924 struct scatterlist *s, *cur = sg; 925 unsigned long seg_mask = dma_get_seg_boundary(dev); 926 unsigned int cur_len = 0, max_len = dma_get_max_seg_size(dev); 927 int i, count = 0; 928 929 for_each_sg(sg, s, nents, i) { 930 /* Resto
[iommu:x86/vt-d 41/59] drivers/iommu/io-pgtable-arm-v7s.c:703:43: error: 'struct iommu_iotlb_gather' has no member named 'queued'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git x86/vt-d head: 423d39d8518c1bba12e0889a92beeddbb1502392 commit: a8e5f04458c4e496eada2b029ce96713bb6c388d [41/59] iommu/io-pgtable: Remove non-strict quirk config: nds32-buildonly-randconfig-r001-20210820 (attached as .config) compiler: nds32le-linux-gcc (GCC) 11.2.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://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git/commit/?id=a8e5f04458c4e496eada2b029ce96713bb6c388d git remote add iommu https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git git fetch --no-tags iommu x86/vt-d git checkout a8e5f04458c4e496eada2b029ce96713bb6c388d # save the attached .config to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=nds32 SHELL=/bin/bash drivers/iommu/ 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 include/linux/init.h:5, from arch/nds32/include/asm/nds32.h:11, from arch/nds32/include/asm/irqflags.h:4, from include/linux/irqflags.h:16, from include/asm-generic/cmpxchg.h:15, from ./arch/nds32/include/generated/asm/cmpxchg.h:1, from include/asm-generic/atomic.h:12, from ./arch/nds32/include/generated/asm/atomic.h:1, from include/linux/atomic.h:7, from drivers/iommu/io-pgtable-arm-v7s.c:24: drivers/iommu/io-pgtable-arm-v7s.c: In function '__arm_v7s_unmap': >> drivers/iommu/io-pgtable-arm-v7s.c:703:43: error: 'struct >> iommu_iotlb_gather' has no member named 'queued' 703 | } else if (!gather->queued) { | ^~ include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var' 58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond)) |^~~~ drivers/iommu/io-pgtable-arm-v7s.c:703:32: note: in expansion of macro 'if' 703 | } else if (!gather->queued) { |^~ >> drivers/iommu/io-pgtable-arm-v7s.c:703:43: error: 'struct >> iommu_iotlb_gather' has no member named 'queued' 703 | } else if (!gather->queued) { | ^~ include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var' 58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond)) | ^~~~ drivers/iommu/io-pgtable-arm-v7s.c:703:32: note: in expansion of macro 'if' 703 | } else if (!gather->queued) { |^~ >> drivers/iommu/io-pgtable-arm-v7s.c:703:43: error: 'struct >> iommu_iotlb_gather' has no member named 'queued' 703 | } else if (!gather->queued) { | ^~ include/linux/compiler.h:69:10: note: in definition of macro '__trace_if_value' 69 | (cond) ?\ | ^~~~ include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var' 56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) ) |^~ drivers/iommu/io-pgtable-arm-v7s.c:703:32: note: in expansion of macro 'if' 703 | } else if (!gather->queued) { |^~ vim +703 drivers/iommu/io-pgtable-arm-v7s.c 650 651 static size_t __arm_v7s_unmap(struct arm_v7s_io_pgtable *data, 652struct iommu_iotlb_gather *gather, 653unsigned long iova, size_t size, int lvl, 654arm_v7s_iopte *ptep) 655 { 656 arm_v7s_iopte pte[ARM_V7S_CONT_PAGES]; 657 struct io_pgtable *iop = &data->iop; 658 int idx, i = 0, num_entries = size >> ARM_V7S_LVL_SHIFT(lvl); 659 660 /* Something went horribly wrong and we ran out of page table */ 661 if (WARN_ON(lvl > 2)) 662 return 0; 663 664 idx =
Re: [PATCH v4 5/6] swiotlb: support aligned swiotlb buffers
Hi David, Thank you for the patch! Yet something to improve: [auto build test ERROR on iommu/next] [also build test ERROR on hch-configfs/for-next linus/master v5.14-rc5] [cannot apply to swiotlb/linux-next next-20210813] [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/David-Stevens/Fixes-for-dma-iommu-swiotlb-bounce-buffers/20210813-154739 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: x86_64-randconfig-a003-20210812 (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce (this is a W=1 build): # https://github.com/0day-ci/linux/commit/50aeec27cc4ccaa914c0bbefa59e349278646b6e git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review David-Stevens/Fixes-for-dma-iommu-swiotlb-bounce-buffers/20210813-154739 git checkout 50aeec27cc4ccaa914c0bbefa59e349278646b6e # save the attached .config to linux build tree mkdir build_dir make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): drivers/xen/swiotlb-xen.c: In function 'xen_swiotlb_map_page': >> drivers/xen/swiotlb-xen.c:385:8: error: too few arguments to function >> 'swiotlb_tbl_map_single' 385 | map = swiotlb_tbl_map_single(dev, phys, size, size, dir, attrs); |^~ In file included from arch/x86/include/asm/swiotlb.h:5, from arch/x86/include/asm/dma-mapping.h:12, from include/linux/dma-map-ops.h:75, from include/linux/dma-direct.h:10, from drivers/xen/swiotlb-xen.c:30: include/linux/swiotlb.h:45:13: note: declared here 45 | phys_addr_t swiotlb_tbl_map_single(struct device *hwdev, phys_addr_t phys, | ^~ vim +/swiotlb_tbl_map_single +385 drivers/xen/swiotlb-xen.c b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 352 b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 353 /* b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 354 * Map a single buffer of the indicated size for DMA in streaming mode. The b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 355 * physical address to use is returned. b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 356 * b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 357 * Once the device is given the dma address, the device owns this memory until b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 358 * either xen_swiotlb_unmap_page or xen_swiotlb_dma_sync_single is performed. b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 359 */ dceb1a6819ab2c Christoph Hellwig 2017-05-21 360 static dma_addr_t xen_swiotlb_map_page(struct device *dev, struct page *page, b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 361 unsigned long offset, size_t size, b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 362 enum dma_data_direction dir, 00085f1efa387a Krzysztof Kozlowski 2016-08-03 363 unsigned long attrs) b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 364 { e05ed4d1fad9e7 Alexander Duyck 2012-10-15 365phys_addr_t map, phys = page_to_phys(page) + offset; 91ffe4ad534ab2 Stefano Stabellini2020-07-10 366dma_addr_t dev_addr = xen_phys_to_dma(dev, phys); b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 367 b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 368BUG_ON(dir == DMA_NONE); b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 369/* b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 370 * If the address happens to be in the device's DMA window, b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 371 * we can safely return the device addr and not worry about bounce b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 372 * buffering it. b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 373 */ 68a33b1794665b Christoph Hellwig 2019-11-19 374if (dma_capable(dev, dev_addr, size, true) && a4dba130891271 Stefano Stabellini2014-11-21 375 !range_straddles_page_boundary(phys, size) && 291be10fd75111 Julien Grall 2015-09-09 376 !xen_arch_need_swiotlb(dev, phys, dev_addr) && 063b8271ec8f70 Christoph Hellwig 2019-04-11 377swiotlb_force != SWIOTLB_FORCE) 063b8271ec8f70 Christoph Hellwig 2019-04-11 378goto done; b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 379 b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 380/* b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 381 * Oh well, have to allocate
[iommu:apple/dart 3/3] drivers/iommu/apple-dart.c:730:17: error: initialization of 'size_t (*)(struct iommu_domain *, long unsigned int, size_t, struct iommu_iotlb_gather *)' {aka 'long unsigned int
tree: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git apple/dart head: 05ce9d20d699b093dec985192a7db63b48f26ca2 commit: 05ce9d20d699b093dec985192a7db63b48f26ca2 [3/3] iommu/dart: Add DART iommu driver config: sparc-allyesconfig (attached as .config) compiler: sparc64-linux-gcc (GCC) 10.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://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git/commit/?id=05ce9d20d699b093dec985192a7db63b48f26ca2 git remote add iommu https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git git fetch --no-tags iommu apple/dart git checkout 05ce9d20d699b093dec985192a7db63b48f26ca2 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=sparc If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): drivers/iommu/apple-dart.c: In function 'apple_dart_map_pages': drivers/iommu/apple-dart.c:380:12: error: 'struct io_pgtable_ops' has no member named 'map_pages' 380 | return ops->map_pages(ops, iova, paddr, pgsize, pgcount, prot, gfp, |^~ drivers/iommu/apple-dart.c: In function 'apple_dart_unmap_pages': drivers/iommu/apple-dart.c:392:12: error: 'struct io_pgtable_ops' has no member named 'unmap_pages' 392 | return ops->unmap_pages(ops, iova, pgsize, pgcount, gather); |^~ drivers/iommu/apple-dart.c: At top level: drivers/iommu/apple-dart.c:729:3: error: 'const struct iommu_ops' has no member named 'map_pages' 729 | .map_pages = apple_dart_map_pages, | ^ drivers/iommu/apple-dart.c:729:15: error: initialization of 'int (*)(struct iommu_domain *, long unsigned int, phys_addr_t, size_t, int, gfp_t)' {aka 'int (*)(struct iommu_domain *, long unsigned int, long long unsigned int, long unsigned int, int, unsigned int)'} from incompatible pointer type 'int (*)(struct iommu_domain *, long unsigned int, phys_addr_t, size_t, size_t, int, gfp_t, size_t *)' {aka 'int (*)(struct iommu_domain *, long unsigned int, long long unsigned int, long unsigned int, long unsigned int, int, unsigned int, long unsigned int *)'} [-Werror=incompatible-pointer-types] 729 | .map_pages = apple_dart_map_pages, | ^~~~ drivers/iommu/apple-dart.c:729:15: note: (near initialization for 'apple_dart_iommu_ops.map') drivers/iommu/apple-dart.c:730:3: error: 'const struct iommu_ops' has no member named 'unmap_pages' 730 | .unmap_pages = apple_dart_unmap_pages, | ^~~ >> drivers/iommu/apple-dart.c:730:17: error: initialization of 'size_t >> (*)(struct iommu_domain *, long unsigned int, size_t, struct >> iommu_iotlb_gather *)' {aka 'long unsigned int (*)(struct iommu_domain *, >> long unsigned int, long unsigned int, struct iommu_iotlb_gather *)'} from >> incompatible pointer type 'size_t (*)(struct iommu_domain *, long unsigned >> int, size_t, size_t, struct iommu_iotlb_gather *)' {aka 'long unsigned >> int (*)(struct iommu_domain *, long unsigned int, long unsigned int, long >> unsigned int, struct iommu_iotlb_gather *)'} >> [-Werror=incompatible-pointer-types] 730 | .unmap_pages = apple_dart_unmap_pages, | ^~ drivers/iommu/apple-dart.c:730:17: note: (near initialization for 'apple_dart_iommu_ops.unmap') drivers/iommu/apple-dart.c: In function 'apple_dart_unmap_pages': drivers/iommu/apple-dart.c:393:1: error: control reaches end of non-void function [-Werror=return-type] 393 | } | ^ drivers/iommu/apple-dart.c: In function 'apple_dart_map_pages': drivers/iommu/apple-dart.c:382:1: error: control reaches end of non-void function [-Werror=return-type] 382 | } | ^ cc1: some warnings being treated as errors vim +730 drivers/iommu/apple-dart.c 723 724 static const struct iommu_ops apple_dart_iommu_ops = { 725 .domain_alloc = apple_dart_domain_alloc, 726 .domain_free = apple_dart_domain_free, 727 .attach_dev = apple_dart_attach_dev, 728 .detach_dev = apple_dart_detach_dev, > 729 .map_pages = apple_dart_map_pages, > 730 .unmap_pages = apple_dart_unmap_pages, 731 .flush_iotlb_all = apple_dart_flush_iotlb_all, 732 .iotlb_sync = apple_dart_iotlb_sync, 733 .iotlb_syn
Re: [PATCH v2 2/9] dma-iommu: expose a few helper functions to module
Hi David, Thank you for the patch! Yet something to improve: [auto build test ERROR on iommu/next] [also build test ERROR on drm-intel/for-linux-next hch-configfs/for-next linus/master v5.14-rc4] [cannot apply to next-20210805] [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/David-Stevens/Add-dynamic-iommu-backed-bounce-buffers/20210806-183631 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: i386-randconfig-a011-20210804 (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce (this is a W=1 build): # https://github.com/0day-ci/linux/commit/385dff3d789a97ef650912616e9d696fba96cb20 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review David-Stevens/Add-dynamic-iommu-backed-bounce-buffers/20210806-183631 git checkout 385dff3d789a97ef650912616e9d696fba96cb20 # save the attached .config to linux build tree mkdir build_dir make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): >> drivers/iommu/dma-iommu.c:415:12: error: conflicting types for >> '__iommu_dma_alloc_iova' 415 | dma_addr_t __iommu_dma_alloc_iova(struct iommu_domain *domain, |^~ In file included from drivers/iommu/dma-iommu.c:14: include/linux/dma-iommu.h:47:12: note: previous declaration of '__iommu_dma_alloc_iova' was here 47 | dma_addr_t __iommu_dma_alloc_iova(struct iommu_domain *domain, |^~ vim +/__iommu_dma_alloc_iova +415 drivers/iommu/dma-iommu.c 414 > 415 dma_addr_t __iommu_dma_alloc_iova(struct iommu_domain *domain, 416 size_t size, u64 dma_limit, struct device *dev) 417 { 418 struct iommu_dma_cookie *cookie = domain->iova_cookie; 419 struct iova_domain *iovad = &cookie->iovad; 420 unsigned long shift, iova_len, iova = 0; 421 422 if (cookie->type == IOMMU_DMA_MSI_COOKIE) { 423 cookie->msi_iova += size; 424 return cookie->msi_iova - size; 425 } 426 427 shift = iova_shift(iovad); 428 iova_len = size >> shift; 429 /* 430 * Freeing non-power-of-two-sized allocations back into the IOVA caches 431 * will come back to bite us badly, so we have to waste a bit of space 432 * rounding up anything cacheable to make sure that can't happen. The 433 * order of the unadjusted size will still match upon freeing. 434 */ 435 if (iova_len < (1 << (IOVA_RANGE_CACHE_MAX_SIZE - 1))) 436 iova_len = roundup_pow_of_two(iova_len); 437 438 dma_limit = min_not_zero(dma_limit, dev->bus_dma_limit); 439 440 if (domain->geometry.force_aperture) 441 dma_limit = min(dma_limit, (u64)domain->geometry.aperture_end); 442 443 /* Try to get PCI devices a SAC address */ 444 if (dma_limit > DMA_BIT_MASK(32) && !iommu_dma_forcedac && dev_is_pci(dev)) 445 iova = alloc_iova_fast(iovad, iova_len, 446 DMA_BIT_MASK(32) >> shift, false); 447 448 if (!iova) 449 iova = alloc_iova_fast(iovad, iova_len, dma_limit >> shift, 450 true); 451 452 return (dma_addr_t)iova << shift; 453 } 454 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH v2 3/9] dma-iommu: bounce buffers for untrusted devices
Hi David, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on iommu/next] [also build test WARNING on drm-intel/for-linux-next hch-configfs/for-next linus/master v5.14-rc4] [cannot apply to next-20210805] [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/David-Stevens/Add-dynamic-iommu-backed-bounce-buffers/20210806-183631 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: ia64-randconfig-r025-20210804 (attached as .config) compiler: ia64-linux-gcc (GCC) 10.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/c5f1f9fa88a7062c1ded50fa165f6b01ed73f161 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review David-Stevens/Add-dynamic-iommu-backed-bounce-buffers/20210806-183631 git checkout c5f1f9fa88a7062c1ded50fa165f6b01ed73f161 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=ia64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> drivers/iommu/io-buffer-manager.c:57:24: warning: no previous prototype for >> 'find_fallback_node' [-Wmissing-prototypes] 57 | struct io_buffer_node *find_fallback_node(struct rb_root *root, dma_addr_t iova) |^~ >> drivers/iommu/io-buffer-manager.c:75:6: warning: no previous prototype for >> 'insert_fallback_node' [-Wmissing-prototypes] 75 | bool insert_fallback_node(struct rb_root *root, struct io_buffer_node *node) | ^~~~ vim +/find_fallback_node +57 drivers/iommu/io-buffer-manager.c 56 > 57 struct io_buffer_node *find_fallback_node(struct rb_root *root, dma_addr_t iova) 58 { 59 struct rb_node *node = root->rb_node; 60 61 while (node) { 62 struct io_buffer_node *cur = 63 container_of(node, struct io_buffer_node, node); 64 65 if (iova < cur->info.iova) 66 node = node->rb_left; 67 else if (iova >= cur->info.iova + cur->info.size) 68 node = node->rb_right; 69 else 70 return cur; 71 } 72 return NULL; 73 } 74 > 75 bool insert_fallback_node(struct rb_root *root, struct io_buffer_node *node) 76 { 77 struct rb_node **new = &(root->rb_node), *parent = NULL; 78 dma_addr_t node_end = node->info.iova + node->info.size; 79 80 while (*new) { 81 struct io_buffer_node *cur = 82 container_of(*new, struct io_buffer_node, node); 83 dma_addr_t cur_end = cur->info.iova + cur->info.size; 84 85 parent = *new; 86 if (node_end <= cur->info.iova) 87 new = &((*new)->rb_left); 88 else if (node->info.iova >= cur_end) 89 new = &((*new)->rb_right); 90 else { 91 pr_crit("IOVA collision new=[%llx,%llx) old=[%llx,%llx)\n", 92 node->info.iova, node_end, cur->info.iova, 93 cur_end); 94 return false; 95 } 96 } 97 98 rb_link_node(&node->node, parent, new); 99 rb_insert_color(&node->node, root); 100 return true; 101 } 102 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH v3 02/25] iommu/amd: Drop IOVA cookie management
Hi Robin, I love your patch! Yet something to improve: [auto build test ERROR on iommu/next] [also build test ERROR on rockchip/for-next sunxi/sunxi/for-next linus/master v5.14-rc4 next-20210804] [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/Robin-Murphy/iommu-Refactor-DMA-domain-strictness/20210805-011913 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: x86_64-allyesconfig (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce (this is a W=1 build): # https://github.com/0day-ci/linux/commit/33b83e4adc16220361ed42c229e8cd37f8a2a3aa git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Robin-Murphy/iommu-Refactor-DMA-domain-strictness/20210805-011913 git checkout 33b83e4adc16220361ed42c229e8cd37f8a2a3aa # save the attached .config to linux build tree make W=1 ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): drivers/iommu/amd/iommu.c: In function 'amd_iommu_probe_finalize': >> drivers/iommu/amd/iommu.c:1757:3: error: implicit declaration of function >> 'iommu_setup_dma_ops'; did you mean 'arch_setup_dma_ops'? >> [-Werror=implicit-function-declaration] 1757 | iommu_setup_dma_ops(dev, 0, U64_MAX); | ^~~ | arch_setup_dma_ops cc1: some warnings being treated as errors vim +1757 drivers/iommu/amd/iommu.c 1ac4cbbc5eb56d arch/x86/kernel/amd_iommu.c Joerg Roedel 2008-12-10 1749 dce8d6964ebdb3 drivers/iommu/amd_iommu.c Joerg Roedel 2020-04-29 1750 static void amd_iommu_probe_finalize(struct device *dev) dce8d6964ebdb3 drivers/iommu/amd_iommu.c Joerg Roedel 2020-04-29 1751 { dce8d6964ebdb3 drivers/iommu/amd_iommu.c Joerg Roedel 2020-04-29 1752 struct iommu_domain *domain; ac1534a55d1e87 drivers/iommu/amd_iommu.c Joerg Roedel 2012-06-21 1753 07ee86948c9111 drivers/iommu/amd_iommu.c Joerg Roedel 2015-05-28 1754 /* Domains are initialized for this device - have a look what we ended up with */ 07ee86948c9111 drivers/iommu/amd_iommu.c Joerg Roedel 2015-05-28 1755 domain = iommu_get_domain_for_dev(dev); 57f9842e488406 drivers/iommu/amd_iommu.c Joerg Roedel 2020-04-29 1756 if (domain->type == IOMMU_DOMAIN_DMA) ac6d704679d343 drivers/iommu/amd/iommu.c Jean-Philippe Brucker 2021-06-18 @1757 iommu_setup_dma_ops(dev, 0, U64_MAX); d6177a6556f853 drivers/iommu/amd/iommu.c Jean-Philippe Brucker 2021-04-22 1758 else d6177a6556f853 drivers/iommu/amd/iommu.c Jean-Philippe Brucker 2021-04-22 1759 set_dma_ops(dev, NULL); e275a2a0fc9e21 arch/x86/kernel/amd_iommu.c Joerg Roedel 2008-12-10 1760 } e275a2a0fc9e21 arch/x86/kernel/amd_iommu.c Joerg Roedel 2008-12-10 1761 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH 17/23] iommu/vt-d: Prepare for multiple DMA domain types
Hi Robin, I love your patch! Yet something to improve: [auto build test ERROR on iommu/next] [also build test ERROR on rockchip/for-next linus/master v5.14-rc2 next-20210722] [cannot apply to sunxi/sunxi/for-next] [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/Robin-Murphy/iommu-Refactor-DMA-domain-strictness/20210722-022514 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: x86_64-randconfig-a015-20210722 (attached as .config) compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9625ca5b602616b2f5584e8a49ba93c52c141e40) 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 x86_64 cross compiling tool for clang build # apt-get install binutils-x86-64-linux-gnu # https://github.com/0day-ci/linux/commit/c05e0e1856b394eff1167c00f7bbd6ac7cc9dea6 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Robin-Murphy/iommu-Refactor-DMA-domain-strictness/20210722-022514 git checkout c05e0e1856b394eff1167c00f7bbd6ac7cc9dea6 # save the attached .config to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=x86_64 SHELL=/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): >> drivers/iommu/intel/iommu.c:604:38: error: use of undeclared identifier >> '__IOMMU_DOMAIN_DMA' if (WARN_ON(!(domain->domain.type & __IOMMU_DOMAIN_DMA))) ^ 1 error generated. vim +/__IOMMU_DOMAIN_DMA +604 drivers/iommu/intel/iommu.c 597 598 /* This functionin only returns single iommu in a domain */ 599 struct intel_iommu *domain_get_iommu(struct dmar_domain *domain) 600 { 601 int iommu_id; 602 603 /* si_domain and vm domain should not get here. */ > 604 if (WARN_ON(!(domain->domain.type & __IOMMU_DOMAIN_DMA))) 605 return NULL; 606 607 for_each_domain_iommu(iommu_id, domain) 608 break; 609 610 if (iommu_id < 0 || iommu_id >= g_num_of_iommus) 611 return NULL; 612 613 return g_iommus[iommu_id]; 614 } 615 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH 17/23] iommu/vt-d: Prepare for multiple DMA domain types
Hi Robin, I love your patch! Yet something to improve: [auto build test ERROR on iommu/next] [also build test ERROR on rockchip/for-next linus/master v5.14-rc2 next-20210722] [cannot apply to sunxi/sunxi/for-next] [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/Robin-Murphy/iommu-Refactor-DMA-domain-strictness/20210722-022514 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: ia64-allmodconfig (attached as .config) compiler: ia64-linux-gcc (GCC) 10.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/c05e0e1856b394eff1167c00f7bbd6ac7cc9dea6 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Robin-Murphy/iommu-Refactor-DMA-domain-strictness/20210722-022514 git checkout c05e0e1856b394eff1167c00f7bbd6ac7cc9dea6 # save the attached .config to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=ia64 SHELL=/bin/bash 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 arch/ia64/include/asm/bug.h:17, from include/linux/bug.h:5, from include/linux/thread_info.h:13, from include/asm-generic/preempt.h:5, from ./arch/ia64/include/generated/asm/preempt.h:1, from include/linux/preempt.h:78, from include/linux/spinlock.h:51, from include/linux/wait.h:9, from include/linux/wait_bit.h:8, from include/linux/fs.h:6, from include/linux/debugfs.h:15, from drivers/iommu/intel/iommu.c:18: drivers/iommu/intel/iommu.c: In function 'domain_get_iommu': >> drivers/iommu/intel/iommu.c:604:38: error: '__IOMMU_DOMAIN_DMA' undeclared >> (first use in this function); did you mean 'IOMMU_DOMAIN_DMA'? 604 | if (WARN_ON(!(domain->domain.type & __IOMMU_DOMAIN_DMA))) | ^~ include/asm-generic/bug.h:121:25: note: in definition of macro 'WARN_ON' 121 | int __ret_warn_on = !!(condition);\ | ^ drivers/iommu/intel/iommu.c:604:38: note: each undeclared identifier is reported only once for each function it appears in 604 | if (WARN_ON(!(domain->domain.type & __IOMMU_DOMAIN_DMA))) | ^~ include/asm-generic/bug.h:121:25: note: in definition of macro 'WARN_ON' 121 | int __ret_warn_on = !!(condition);\ | ^ vim +604 drivers/iommu/intel/iommu.c 597 598 /* This functionin only returns single iommu in a domain */ 599 struct intel_iommu *domain_get_iommu(struct dmar_domain *domain) 600 { 601 int iommu_id; 602 603 /* si_domain and vm domain should not get here. */ > 604 if (WARN_ON(!(domain->domain.type & __IOMMU_DOMAIN_DMA))) 605 return NULL; 606 607 for_each_domain_iommu(iommu_id, domain) 608 break; 609 610 if (iommu_id < 0 || iommu_id >= g_num_of_iommus) 611 return NULL; 612 613 return g_iommus[iommu_id]; 614 } 615 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
[asahilinux:dart/dev 1/4] drivers/iommu/dma-iommu.c:249:5: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'phys_addr_t' {aka 'unsigned int'}
tree: https://github.com/AsahiLinux/linux dart/dev head: 1bc74c306de810171ce90d15c42ac846bbf183dc commit: df7d638f551bba7275f5deedee488db2b7fbcc51 [1/4] iommu/dma: Fix IOVA reserve dma ranges config: i386-allyesconfig (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce (this is a W=1 build): # https://github.com/AsahiLinux/linux/commit/df7d638f551bba7275f5deedee488db2b7fbcc51 git remote add asahilinux https://github.com/AsahiLinux/linux git fetch --no-tags asahilinux dart/dev git checkout df7d638f551bba7275f5deedee488db2b7fbcc51 # save the attached .config to linux build tree make W=1 ARCH=i386 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): In file included from include/linux/device.h:15, from include/linux/acpi.h:15, from include/linux/acpi_iort.h:10, from drivers/iommu/dma-iommu.c:11: drivers/iommu/dma-iommu.c: In function 'iova_reserve_pci_windows': >> drivers/iommu/dma-iommu.c:249:5: warning: format '%llx' expects argument of >> type 'long long unsigned int', but argument 3 has type 'phys_addr_t' {aka >> 'unsigned int'} [-Wformat=] 249 | "Failed to reserve IOVA [%#010llx-%#010llx]\n", | ^~ include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt' 19 | #define dev_fmt(fmt) fmt | ^~~ drivers/iommu/dma-iommu.c:248:4: note: in expansion of macro 'dev_err' 248 |dev_err(&dev->dev, |^~~ drivers/iommu/dma-iommu.c:249:37: note: format string is defined here 249 | "Failed to reserve IOVA [%#010llx-%#010llx]\n", | ~~~^ | | | long long unsigned int | %#010x In file included from include/linux/device.h:15, from include/linux/acpi.h:15, from include/linux/acpi_iort.h:10, from drivers/iommu/dma-iommu.c:11: drivers/iommu/dma-iommu.c:249:5: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'phys_addr_t' {aka 'unsigned int'} [-Wformat=] 249 | "Failed to reserve IOVA [%#010llx-%#010llx]\n", | ^~ include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt' 19 | #define dev_fmt(fmt) fmt | ^~~ drivers/iommu/dma-iommu.c:248:4: note: in expansion of macro 'dev_err' 248 |dev_err(&dev->dev, |^~~ drivers/iommu/dma-iommu.c:249:46: note: format string is defined here 249 | "Failed to reserve IOVA [%#010llx-%#010llx]\n", | ~~~^ | | | long long unsigned int | %#010x vim +249 drivers/iommu/dma-iommu.c 220 221 static int iova_reserve_pci_windows(struct pci_dev *dev, 222 struct iova_domain *iovad) 223 { 224 struct pci_host_bridge *bridge = pci_find_host_bridge(dev->bus); 225 struct resource_entry *window; 226 unsigned long lo, hi; 227 phys_addr_t start = 0, end; 228 229 resource_list_for_each_entry(window, &bridge->windows) { 230 if (resource_type(window->res) != IORESOURCE_MEM) 231 continue; 232 233 lo = iova_pfn(iovad, window->res->start - window->offset); 234 hi = iova_pfn(iovad, window->res->end - window->offset); 235 reserve_iova(iovad, lo, hi); 236 } 237 238 /* Get reserved DMA windows from host bridge */ 239 resource_list_for_each_entry(window, &bridge->dma_ranges) { 240 end = window->res->start - window->offset; 241 resv_iova: 242 if (end > start) { 243 lo = iova_pfn(iovad, start); 244 hi = iova_pfn(iovad, end); 245 reserve_iova(iovad, lo, hi); 246 } else if (end < start) { 247 /* dma_ranges list should be sorted */ 248 dev_err(&dev->dev, > 249
Re: [PATCH v3 2/6] ACPI: Move IOMMU setup code out of IORT
Hi Jean-Philippe, I love your patch! Yet something to improve: [auto build test ERROR on pm/linux-next] [also build test ERROR on iommu/next arm64/for-next/core linus/master v5.13-rc4 next-20210602] [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/Jean-Philippe-Brucker/Add-support-for-ACPI-VIOT/20210602-235849 base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next config: x86_64-randconfig-a012-20210602 (attached as .config) compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project d41cb6bb2607fa5c7a9df2b3dab361353657d225) 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 x86_64 cross compiling tool for clang build # apt-get install binutils-x86-64-linux-gnu # https://github.com/0day-ci/linux/commit/937da71a81108243877fb1f0f568e56a08a62c50 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Jean-Philippe-Brucker/Add-support-for-ACPI-VIOT/20210602-235849 git checkout 937da71a81108243877fb1f0f568e56a08a62c50 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): >> drivers/acpi/scan.c:1540:26: error: no member named 'ops' in 'struct >> iommu_fwspec' return fwspec ? fwspec->ops : NULL; ~~ ^ >> drivers/acpi/scan.c:1564:9: error: implicit declaration of function >> 'iommu_probe_device' [-Werror,-Wimplicit-function-declaration] err = iommu_probe_device(dev); ^ 2 errors generated. vim +1540 drivers/acpi/scan.c 1535 1536 static inline const struct iommu_ops *acpi_iommu_fwspec_ops(struct device *dev) 1537 { 1538 struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev); 1539 > 1540 return fwspec ? fwspec->ops : NULL; 1541 } 1542 1543 static const struct iommu_ops *acpi_iommu_configure_id(struct device *dev, 1544 const u32 *id_in) 1545 { 1546 int err; 1547 const struct iommu_ops *ops; 1548 1549 /* 1550 * If we already translated the fwspec there is nothing left to do, 1551 * return the iommu_ops. 1552 */ 1553 ops = acpi_iommu_fwspec_ops(dev); 1554 if (ops) 1555 return ops; 1556 1557 err = iort_iommu_configure_id(dev, id_in); 1558 1559 /* 1560 * If we have reason to believe the IOMMU driver missed the initial 1561 * add_device callback for dev, replay it to get things in order. 1562 */ 1563 if (!err && dev->bus && !device_iommu_mapped(dev)) > 1564 err = iommu_probe_device(dev); 1565 1566 /* Ignore all other errors apart from EPROBE_DEFER */ 1567 if (err == -EPROBE_DEFER) { 1568 return ERR_PTR(err); 1569 } else if (err) { 1570 dev_dbg(dev, "Adding to IOMMU failed: %d\n", err); 1571 return NULL; 1572 } 1573 return acpi_iommu_fwspec_ops(dev); 1574 } 1575 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH v7 4/4] iommu: rockchip: Add support for iommu v2
Hi Benjamin, I love your patch! Yet something to improve: [auto build test ERROR on iommu/next] [also build test ERROR on rockchip/for-next robh/for-next v5.13-rc3 next-20210525] [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/Benjamin-Gaignard/Add-IOMMU-driver-for-rk356x/20210525-201749 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: arm-randconfig-r025-20210525 (attached as .config) compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 99155e913e9bad5f7f8a247f8bb3a3ff3da74af1) 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/0day-ci/linux/commit/bd6c989c628be7c8ac1f8aeb9f301bd3a6e0a078 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Benjamin-Gaignard/Add-IOMMU-driver-for-rk356x/20210525-201749 git checkout bd6c989c628be7c8ac1f8aeb9f301bd3a6e0a078 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): >> drivers/iommu/rockchip-iommu.c:1384:19: error: use of undeclared identifier >> 'rk_dma_addr_dte'; did you mean 'rk_dma_addr_dte_v2'? .dma_addr_dte = &rk_dma_addr_dte, ^~~ rk_dma_addr_dte_v2 drivers/iommu/rockchip-iommu.c:551:19: note: 'rk_dma_addr_dte_v2' declared here static inline u32 rk_dma_addr_dte_v2(dma_addr_t dt_dma) ^ 1 error generated. vim +1384 drivers/iommu/rockchip-iommu.c 0f181d3cf7d984b Jeffy Chen2018-03-23 1378 ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25 1379 static struct rk_iommu_ops iommu_data_ops_v1 = { ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25 1380 .pt_address = &rk_dte_pt_address, ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25 1381 .mk_dtentries = &rk_mk_dte, ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25 1382 .mk_ptentries = &rk_mk_pte, ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25 1383 .dte_addr_phys = &rk_dte_addr_phys, ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25 @1384 .dma_addr_dte = &rk_dma_addr_dte, ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25 1385 .dma_bit_mask = DMA_BIT_MASK(32), ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25 1386 }; ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25 1387 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH v7 4/4] iommu: rockchip: Add support for iommu v2
Hi Benjamin, I love your patch! Yet something to improve: [auto build test ERROR on iommu/next] [also build test ERROR on rockchip/for-next robh/for-next v5.13-rc3 next-20210525] [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/Benjamin-Gaignard/Add-IOMMU-driver-for-rk356x/20210525-201749 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: powerpc-randconfig-s031-20210525 (attached as .config) compiler: powerpc64-linux-gcc (GCC) 9.3.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # apt-get install sparse # sparse version: v0.6.3-341-g8af24329-dirty # https://github.com/0day-ci/linux/commit/bd6c989c628be7c8ac1f8aeb9f301bd3a6e0a078 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Benjamin-Gaignard/Add-IOMMU-driver-for-rk356x/20210525-201749 git checkout bd6c989c628be7c8ac1f8aeb9f301bd3a6e0a078 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=powerpc If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): >> drivers/iommu/rockchip-iommu.c:1384:19: error: 'rk_dma_addr_dte' undeclared >> here (not in a function); did you mean 'rk_dma_addr_dte_v2'? 1384 | .dma_addr_dte = &rk_dma_addr_dte, | ^~~ | rk_dma_addr_dte_v2 vim +1384 drivers/iommu/rockchip-iommu.c 0f181d3cf7d984b Jeffy Chen2018-03-23 1378 ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25 1379 static struct rk_iommu_ops iommu_data_ops_v1 = { ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25 1380 .pt_address = &rk_dte_pt_address, ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25 1381 .mk_dtentries = &rk_mk_dte, ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25 1382 .mk_ptentries = &rk_mk_pte, ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25 1383 .dte_addr_phys = &rk_dte_addr_phys, ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25 @1384 .dma_addr_dte = &rk_dma_addr_dte, ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25 1385 .dma_bit_mask = DMA_BIT_MASK(32), ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25 1386 }; ce0eeece4c9ef42 Benjamin Gaignard 2021-05-25 1387 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH v5 2/8] iommu/dma: Introduce generic helper to retrieve RMR info
Hi Shameer, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on iommu/next] [also build test WARNING on pm/linux-next arm64/for-next/core linus/master v5.13-rc3 next-20210524] [cannot apply to xlnx/master arm/for-next soc/for-next] [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/Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20210524-190633 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: x86_64-randconfig-a013-20210524 (attached as .config) compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 93d1e5822ed64abd777eb94ea9899e96c4c39fbe) 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 x86_64 cross compiling tool for clang build # apt-get install binutils-x86-64-linux-gnu # https://github.com/0day-ci/linux/commit/2c046e03beb7d64e0f7182d01a7dc63dce79c882 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20210524-190633 git checkout 2c046e03beb7d64e0f7182d01a7dc63dce79c882 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): In file included from drivers/vfio/vfio_iommu_type1.c:41: >> include/linux/dma-iommu.h:90:5: warning: no previous prototype for function >> 'iommu_dma_get_rmrs' [-Wmissing-prototypes] int iommu_dma_get_rmrs(struct fwnode_handle *iommu, struct list_head *list) ^ include/linux/dma-iommu.h:90:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int iommu_dma_get_rmrs(struct fwnode_handle *iommu, struct list_head *list) ^ static >> include/linux/dma-iommu.h:95:6: warning: no previous prototype for function >> 'iommu_dma_put_rmrs' [-Wmissing-prototypes] void iommu_dma_put_rmrs(struct fwnode_handle *iommu, struct list_head *list) ^ include/linux/dma-iommu.h:95:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void iommu_dma_put_rmrs(struct fwnode_handle *iommu, struct list_head *list) ^ static 2 warnings generated. vim +/iommu_dma_get_rmrs +90 include/linux/dma-iommu.h 89 > 90 int iommu_dma_get_rmrs(struct fwnode_handle *iommu, struct list_head *list) 91 { 92 return -ENODEV; 93 } 94 > 95 void iommu_dma_put_rmrs(struct fwnode_handle *iommu, struct list_head *list) 96 { 97 } 98 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH v2 09/15] iova: Add init_iova_domain_ext()
Hi John, I love your patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v5.13-rc1 next-20210510] [cannot apply to iommu/next mkp-scsi/for-next scsi/for-next] [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/John-Garry/dma-mapping-iommu-Allow-IOMMU-IOVA-rcache-range-to-be-configured/20210510-222805 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 6efb943b8616ec53a5e444193dccf1af9ad627b5 config: i386-randconfig-s002-20210510 (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.3-341-g8af24329-dirty # https://github.com/0day-ci/linux/commit/d9a8e3a4ac0070cd3094af3b41e9c6277faf3ea6 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review John-Garry/dma-mapping-iommu-Allow-IOMMU-IOVA-rcache-range-to-be-configured/20210510-222805 git checkout d9a8e3a4ac0070cd3094af3b41e9c6277faf3ea6 # save the attached .config to linux build tree make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=i386 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> drivers/iommu/iova.c:50:1: warning: no previous prototype for >> '__init_iova_domain' [-Wmissing-prototypes] 50 | __init_iova_domain(struct iova_domain *iovad, unsigned long granule, | ^~ sparse warnings: (new ones prefixed by >>) >> drivers/iommu/iova.c:50:1: sparse: sparse: symbol '__init_iova_domain' was >> not declared. Should it be static? Please review and possibly fold the followup patch. vim +/__init_iova_domain +50 drivers/iommu/iova.c 48 49 void > 50 __init_iova_domain(struct iova_domain *iovad, unsigned long granule, 51 unsigned long start_pfn, unsigned long iova_len) 52 { 53 /* 54 * IOVA granularity will normally be equal to the smallest 55 * supported IOMMU page size; both *must* be capable of 56 * representing individual CPU pages exactly. 57 */ 58 BUG_ON((granule > PAGE_SIZE) || !is_power_of_2(granule)); 59 60 spin_lock_init(&iovad->iova_rbtree_lock); 61 iovad->rbroot = RB_ROOT; 62 iovad->cached_node = &iovad->anchor.node; 63 iovad->cached32_node = &iovad->anchor.node; 64 iovad->granule = granule; 65 iovad->start_pfn = start_pfn; 66 iovad->dma_32bit_pfn = 1UL << (32 - iova_shift(iovad)); 67 iovad->max32_alloc_size = iovad->dma_32bit_pfn; 68 iovad->flush_cb = NULL; 69 iovad->fq = NULL; 70 iovad->anchor.pfn_lo = iovad->anchor.pfn_hi = IOVA_ANCHOR; 71 rb_link_node(&iovad->anchor.node, NULL, &iovad->rbroot.rb_node); 72 rb_insert_color(&iovad->anchor.node, &iovad->rbroot); 73 cpuhp_state_add_instance_nocalls(CPUHP_IOMMU_IOVA_DEAD, &iovad->cpuhp_dead); 74 init_iova_rcaches(iovad, iova_len); 75 } 76 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
[RFC PATCH] iova: __init_iova_domain can be static
drivers/iommu/iova.c:50:1: warning: symbol '__init_iova_domain' was not declared. Should it be static? Reported-by: kernel test robot Signed-off-by: kernel test robot --- iova.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/iova.c b/drivers/iommu/iova.c index 273a689006c36..ae4901073a98a 100644 --- a/drivers/iommu/iova.c +++ b/drivers/iommu/iova.c @@ -46,7 +46,7 @@ static struct iova *to_iova(struct rb_node *node) return rb_entry(node, struct iova, node); } -void +static void __init_iova_domain(struct iova_domain *iovad, unsigned long granule, unsigned long start_pfn, unsigned long iova_len) { ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH v3 04/10] iommu/dma: Add a helper function to reserve RMRs for IOMMU drivers
Hi Shameer, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on pm/linux-next] [also build test WARNING on arm/for-next soc/for-next arm64/for-next/core linus/master v5.12-rc8] [cannot apply to iommu/next xlnx/master next-20210420] [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/Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20210420-173125 base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next config: arm-randconfig-r023-20210420 (attached as .config) compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project ca8eef7e3da8f750d7c7aa004fe426d1d34787ea) 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/0day-ci/linux/commit/2501962e423895e2e4f126ff5998b226f4803186 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20210420-173125 git checkout 2501962e423895e2e4f126ff5998b226f4803186 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): In file included from drivers/iommu/arm/arm-smmu/arm-smmu.c:24: >> include/linux/dma-iommu.h:94:71: warning: declaration of 'struct iommu_rmr' >> will not be visible outside of this function [-Wvisibility] static void iommu_dma_get_rmr_resv_regions(struct device *dev, struct iommu_rmr *rmr, ^ include/linux/dma-iommu.h:100:1: error: expected identifier or '(' { ^ 1 warning and 1 error generated. vim +94 include/linux/dma-iommu.h 93 > 94 static void iommu_dma_get_rmr_resv_regions(struct device *dev, struct iommu_rmr *rmr, 95 struct list_head *list) 96 { 97 } 98 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH v3 10/10] iommu/arm-smmu: Reserve any RMR regions associated with a dev
Hi Shameer, I love your patch! Yet something to improve: [auto build test ERROR on pm/linux-next] [also build test ERROR on arm/for-next soc/for-next arm64/for-next/core linus/master v5.12-rc8] [cannot apply to iommu/next xlnx/master next-20210420] [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/Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20210420-173125 base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next config: arm-randconfig-r023-20210420 (attached as .config) compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project ca8eef7e3da8f750d7c7aa004fe426d1d34787ea) 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/0day-ci/linux/commit/ea2019c2969e4e8f6ec2b0dc2d492f0d05f36cd9 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20210420-173125 git checkout ea2019c2969e4e8f6ec2b0dc2d492f0d05f36cd9 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm 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/iommu/arm/arm-smmu/arm-smmu.c:24: include/linux/dma-iommu.h:94:71: warning: declaration of 'struct iommu_rmr' will not be visible outside of this function [-Wvisibility] static void iommu_dma_get_rmr_resv_regions(struct device *dev, struct iommu_rmr *rmr, ^ include/linux/dma-iommu.h:100:1: error: expected identifier or '(' { ^ >> drivers/iommu/arm/arm-smmu/arm-smmu.c:1622:39: error: incompatible pointer >> types passing 'struct iommu_rmr *' to parameter of type 'struct iommu_rmr *' >> [-Werror,-Wincompatible-pointer-types] iommu_dma_get_rmr_resv_regions(dev, rmr, head); ^~~ include/linux/dma-iommu.h:94:82: note: passing argument to parameter 'rmr' here static void iommu_dma_get_rmr_resv_regions(struct device *dev, struct iommu_rmr *rmr, ^ 1 warning and 2 errors generated. vim +1622 drivers/iommu/arm/arm-smmu/arm-smmu.c 1609 1610 static void arm_smmu_rmr_get_resv_regions(struct device *dev, 1611struct list_head *head) 1612 { 1613 struct arm_smmu_master_cfg *cfg = dev_iommu_priv_get(dev); 1614 struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev); 1615 struct arm_smmu_device *smmu = cfg->smmu; 1616 struct iommu_rmr *rmr; 1617 1618 list_for_each_entry(rmr, &smmu->rmr_list, list) { 1619 if (!arm_smmu_dev_has_rmr(cfg, fwspec, rmr)) 1620 continue; 1621 > 1622 iommu_dma_get_rmr_resv_regions(dev, rmr, head); 1623 } 1624 } 1625 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH v3 02/10] iommu/dma: Introduce generic helper to retrieve RMR info
Hi Shameer, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on pm/linux-next] [also build test WARNING on arm/for-next soc/for-next arm64/for-next/core linus/master v5.12-rc8] [cannot apply to iommu/next xlnx/master next-20210420] [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/Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20210420-173125 base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next config: x86_64-randconfig-a002-20210420 (attached as .config) compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project ca8eef7e3da8f750d7c7aa004fe426d1d34787ea) 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 x86_64 cross compiling tool for clang build # apt-get install binutils-x86-64-linux-gnu # https://github.com/0day-ci/linux/commit/c68d4ba37ecc2173a2dc418799e23a184685d681 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20210420-173125 git checkout c68d4ba37ecc2173a2dc418799e23a184685d681 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): In file included from drivers/iommu/arm/arm-smmu/qcom_iommu.c:13: >> include/linux/dma-iommu.h:92:31: warning: declaration of 'struct >> fwnode_handle' will not be visible outside of this function [-Wvisibility] int iommu_dma_get_rmrs(struct fwnode_handle *iommu, struct list_head *list); ^ include/linux/dma-iommu.h:93:1: error: expected identifier or '(' { ^ 1 warning and 1 error generated. vim +92 include/linux/dma-iommu.h 91 > 92 int iommu_dma_get_rmrs(struct fwnode_handle *iommu, struct list_head *list); 93 { 94 return 0; 95 } 96 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH v3 02/10] iommu/dma: Introduce generic helper to retrieve RMR info
Hi Shameer, Thank you for the patch! Yet something to improve: [auto build test ERROR on pm/linux-next] [also build test ERROR on arm/for-next soc/for-next arm64/for-next/core linus/master v5.12-rc8] [cannot apply to iommu/next xlnx/master next-20210420] [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/Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20210420-173125 base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next config: arm-randconfig-r023-20210420 (attached as .config) compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project ca8eef7e3da8f750d7c7aa004fe426d1d34787ea) 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/0day-ci/linux/commit/c68d4ba37ecc2173a2dc418799e23a184685d681 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20210420-173125 git checkout c68d4ba37ecc2173a2dc418799e23a184685d681 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm 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/iommu/arm/arm-smmu/arm-smmu.c:24: >> include/linux/dma-iommu.h:93:1: error: expected identifier or '(' { ^ 1 error generated. vim +93 include/linux/dma-iommu.h 91 92 int iommu_dma_get_rmrs(struct fwnode_handle *iommu, struct list_head *list); > 93 { 94 return 0; 95 } 96 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH v3 04/10] iommu/dma: Add a helper function to reserve RMRs for IOMMU drivers
Hi Shameer, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on pm/linux-next] [also build test WARNING on arm/for-next soc/for-next arm64/for-next/core linus/master v5.12-rc8] [cannot apply to iommu/next xlnx/master next-20210420] [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/Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20210420-173125 base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next config: m68k-randconfig-m031-20210420 (attached as .config) compiler: m68k-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/2501962e423895e2e4f126ff5998b226f4803186 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20210420-173125 git checkout 2501962e423895e2e4f126ff5998b226f4803186 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=m68k If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): In file included from drivers/iommu/rockchip-iommu.c:13: >> include/linux/dma-iommu.h:94:71: warning: 'struct iommu_rmr' declared inside >> parameter list will not be visible outside of this definition or declaration 94 | static void iommu_dma_get_rmr_resv_regions(struct device *dev, struct iommu_rmr *rmr, | ^ include/linux/dma-iommu.h:100:1: error: expected identifier or '(' before '{' token 100 | { | ^ In file included from drivers/iommu/rockchip-iommu.c:13: include/linux/dma-iommu.h:94:13: warning: 'iommu_dma_get_rmr_resv_regions' defined but not used [-Wunused-function] 94 | static void iommu_dma_get_rmr_resv_regions(struct device *dev, struct iommu_rmr *rmr, | ^~ Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for ADI_AXI_ADC Depends on IIO && HAS_IOMEM && OF Selected by - AD9467 && IIO && SPI vim +94 include/linux/dma-iommu.h 93 > 94 static void iommu_dma_get_rmr_resv_regions(struct device *dev, struct iommu_rmr *rmr, 95 struct list_head *list) 96 { 97 } 98 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH v3 02/10] iommu/dma: Introduce generic helper to retrieve RMR info
Hi Shameer, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on pm/linux-next] [also build test WARNING on arm/for-next soc/for-next arm64/for-next/core linus/master v5.12-rc8] [cannot apply to iommu/next xlnx/master next-20210420] [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/Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20210420-173125 base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next config: arc-allyesconfig (attached as .config) compiler: arceb-elf-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/c68d4ba37ecc2173a2dc418799e23a184685d681 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20210420-173125 git checkout c68d4ba37ecc2173a2dc418799e23a184685d681 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=arc If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): In file included from drivers/gpu/drm/exynos/exynos_drm_dma.c:7: >> include/linux/dma-iommu.h:92:31: warning: 'struct fwnode_handle' declared >> inside parameter list will not be visible outside of this definition or >> declaration 92 | int iommu_dma_get_rmrs(struct fwnode_handle *iommu, struct list_head *list); | ^ include/linux/dma-iommu.h:93:1: error: expected identifier or '(' before '{' token 93 | { | ^ vim +92 include/linux/dma-iommu.h 91 > 92 int iommu_dma_get_rmrs(struct fwnode_handle *iommu, struct list_head *list); 93 { 94 return 0; 95 } 96 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH v3 2/2] iommu/sva: Remove mm parameter from SVA bind API
Hi Jacob, I love your patch! Yet something to improve: [auto build test ERROR on e49d033bddf5b565044e2abe4241353959bc9120] url: https://github.com/0day-ci/linux/commits/Jacob-Pan/Simplify-and-restrict-IOMMU-SVA-APIs/20210417-052451 base: e49d033bddf5b565044e2abe4241353959bc9120 config: arm64-randconfig-r034-20210416 (attached as .config) compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project f549176ad976caa3e19edd036df9a7e12770af7c) 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 arm64 cross compiling tool for clang build # apt-get install binutils-aarch64-linux-gnu # https://github.com/0day-ci/linux/commit/6d85fee95bdcd7e53f10442ddc71d0c310d43367 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Jacob-Pan/Simplify-and-restrict-IOMMU-SVA-APIs/20210417-052451 git checkout 6d85fee95bdcd7e53f10442ddc71d0c310d43367 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): >> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:2631:15: error: incompatible >> function pointer types initializing 'struct iommu_sva *(*)(struct device *, >> unsigned int)' with an expression of type 'struct iommu_sva *(struct device >> *, struct mm_struct *, unsigned int)' >> [-Werror,-Wincompatible-function-pointer-types] .sva_bind = arm_smmu_sva_bind, ^ 1 error generated. vim +2631 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c f534d98b9d2705 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c Jean-Philippe Brucker 2020-09-18 2608 48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2609 static struct iommu_ops arm_smmu_ops = { 48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2610 .capable= arm_smmu_capable, 48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2611 .domain_alloc = arm_smmu_domain_alloc, 48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2612 .domain_free= arm_smmu_domain_free, 48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2613 .attach_dev = arm_smmu_attach_dev, 48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2614 .map= arm_smmu_map, 48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2615 .unmap = arm_smmu_unmap, 07fdef34d2be68 drivers/iommu/arm-smmu-v3.c Zhen Lei 2018-09-20 2616 .flush_iotlb_all= arm_smmu_flush_iotlb_all, 32b124492bdf97 drivers/iommu/arm-smmu-v3.c Robin Murphy 2017-09-28 2617 .iotlb_sync = arm_smmu_iotlb_sync, 48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2618 .iova_to_phys = arm_smmu_iova_to_phys, cefa0d55da3753 drivers/iommu/arm-smmu-v3.c Joerg Roedel 2020-04-29 2619 .probe_device = arm_smmu_probe_device, cefa0d55da3753 drivers/iommu/arm-smmu-v3.c Joerg Roedel 2020-04-29 2620 .release_device = arm_smmu_release_device, 08d4ca2a672bab drivers/iommu/arm-smmu-v3.c Robin Murphy 2016-09-12 2621 .device_group = arm_smmu_device_group, 48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2622 .domain_get_attr= arm_smmu_domain_get_attr, 48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2623 .domain_set_attr= arm_smmu_domain_set_attr, 8f78515425daea drivers/iommu/arm-smmu-v3.c Robin Murphy 2016-09-12 2624 .of_xlate = arm_smmu_of_xlate, 50019f09a4baa0 drivers/iommu/arm-smmu-v3.c Eric Auger 2017-01-19 2625 .get_resv_regions = arm_smmu_get_resv_regions, a66c5dc549d1e1 drivers/iommu/arm-smmu-v3.c Thierry Reding 2019-12-18 2626 .put_resv_regions = generic_iommu_put_resv_regions, f534d98b9d2705 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c Jean-Philippe Brucker 2020-09-18 2627 .dev_has_feat = arm_smmu_dev_has_feature, f534d98b9d2705 drivers/iommu/arm/arm-smmu-
Re: [PATCH v3 2/2] iommu/sva: Remove mm parameter from SVA bind API
Hi Jacob, I love your patch! Yet something to improve: [auto build test ERROR on e49d033bddf5b565044e2abe4241353959bc9120] url: https://github.com/0day-ci/linux/commits/Jacob-Pan/Simplify-and-restrict-IOMMU-SVA-APIs/20210417-052451 base: e49d033bddf5b565044e2abe4241353959bc9120 config: arm64-randconfig-r022-20210416 (attached as .config) compiler: aarch64-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/6d85fee95bdcd7e53f10442ddc71d0c310d43367 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Jacob-Pan/Simplify-and-restrict-IOMMU-SVA-APIs/20210417-052451 git checkout 6d85fee95bdcd7e53f10442ddc71d0c310d43367 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=arm64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): >> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:2631:15: error: initialization >> of 'struct iommu_sva * (*)(struct device *, unsigned int)' from incompatible >> pointer type 'struct iommu_sva * (*)(struct device *, struct mm_struct *, >> unsigned int)' [-Werror=incompatible-pointer-types] 2631 | .sva_bind = arm_smmu_sva_bind, | ^ drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:2631:15: note: (near initialization for 'arm_smmu_ops.sva_bind') cc1: some warnings being treated as errors vim +2631 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c f534d98b9d2705 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c Jean-Philippe Brucker 2020-09-18 2608 48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2609 static struct iommu_ops arm_smmu_ops = { 48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2610 .capable= arm_smmu_capable, 48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2611 .domain_alloc = arm_smmu_domain_alloc, 48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2612 .domain_free= arm_smmu_domain_free, 48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2613 .attach_dev = arm_smmu_attach_dev, 48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2614 .map= arm_smmu_map, 48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2615 .unmap = arm_smmu_unmap, 07fdef34d2be68 drivers/iommu/arm-smmu-v3.c Zhen Lei 2018-09-20 2616 .flush_iotlb_all= arm_smmu_flush_iotlb_all, 32b124492bdf97 drivers/iommu/arm-smmu-v3.c Robin Murphy 2017-09-28 2617 .iotlb_sync = arm_smmu_iotlb_sync, 48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2618 .iova_to_phys = arm_smmu_iova_to_phys, cefa0d55da3753 drivers/iommu/arm-smmu-v3.c Joerg Roedel 2020-04-29 2619 .probe_device = arm_smmu_probe_device, cefa0d55da3753 drivers/iommu/arm-smmu-v3.c Joerg Roedel 2020-04-29 2620 .release_device = arm_smmu_release_device, 08d4ca2a672bab drivers/iommu/arm-smmu-v3.c Robin Murphy 2016-09-12 2621 .device_group = arm_smmu_device_group, 48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2622 .domain_get_attr= arm_smmu_domain_get_attr, 48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2623 .domain_set_attr= arm_smmu_domain_set_attr, 8f78515425daea drivers/iommu/arm-smmu-v3.c Robin Murphy 2016-09-12 2624 .of_xlate = arm_smmu_of_xlate, 50019f09a4baa0 drivers/iommu/arm-smmu-v3.c Eric Auger 2017-01-19 2625 .get_resv_regions = arm_smmu_get_resv_regions, a66c5dc549d1e1 drivers/iommu/arm-smmu-v3.c Thierry Reding 2019-12-18 2626 .put_resv_regions = generic_iommu_put_resv_regions, f534d98b9d2705 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c Jean-Philippe Brucker 2020-09-18 2627 .dev_has_feat = arm_smmu_dev_has_feature, f534d98b9d2705 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c Jean-Philippe Brucker 2020-09-18 2628 .dev_feat_enabled = arm_smmu_dev_feature_enabl
Re: [PATCH 1/2] iommu/sva: Tighten SVA bind API with explicit flags
Hi Jacob, I love your patch! Yet something to improve: [auto build test ERROR on vkoul-dmaengine/next] [also build test ERROR on char-misc/char-misc-testing v5.12-rc7] [cannot apply to iommu/next next-20210413] [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/Jacob-Pan/iommu-sva-Tighten-SVA-bind-API-with-explicit-flags/20210409-094521 base: https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git next config: x86_64-randconfig-a016-20210413 (attached as .config) compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9829f5e6b1bca9b61efc629770d28bb9014dec45) 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 x86_64 cross compiling tool for clang build # apt-get install binutils-x86-64-linux-gnu # https://github.com/0day-ci/linux/commit/3b009446e2f451c401cff7a6d4766424acbcc890 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Jacob-Pan/iommu-sva-Tighten-SVA-bind-API-with-explicit-flags/20210409-094521 git checkout 3b009446e2f451c401cff7a6d4766424acbcc890 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): >> drivers/dma/idxd/init.c:307:10: error: use of undeclared identifier >> 'IOMMU_SVA_BIND_SUPERVISOR' flags = IOMMU_SVA_BIND_SUPERVISOR; ^ drivers/dma/idxd/init.c:422:30: warning: shift count >= width of type [-Wshift-count-overflow] rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(64)); ^~~~ include/linux/dma-mapping.h:76:54: note: expanded from macro 'DMA_BIT_MASK' #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) ^ ~~~ drivers/dma/idxd/init.c:428:41: warning: shift count >= width of type [-Wshift-count-overflow] rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)); ^~~~ include/linux/dma-mapping.h:76:54: note: expanded from macro 'DMA_BIT_MASK' #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) ^ ~~~ 2 warnings and 1 error generated. vim +/IOMMU_SVA_BIND_SUPERVISOR +307 drivers/dma/idxd/init.c 300 301 static int idxd_enable_system_pasid(struct idxd_device *idxd) 302 { 303 unsigned int flags; 304 unsigned int pasid; 305 struct iommu_sva *sva; 306 > 307 flags = IOMMU_SVA_BIND_SUPERVISOR; 308 309 sva = iommu_sva_bind_device(&idxd->pdev->dev, NULL, flags); 310 if (IS_ERR(sva)) { 311 dev_warn(&idxd->pdev->dev, 312 "iommu sva bind failed: %ld\n", PTR_ERR(sva)); 313 return PTR_ERR(sva); 314 } 315 316 pasid = iommu_sva_get_pasid(sva); 317 if (pasid == IOMMU_PASID_INVALID) { 318 iommu_sva_unbind_device(sva); 319 return -ENODEV; 320 } 321 322 idxd->sva = sva; 323 idxd->pasid = pasid; 324 dev_dbg(&idxd->pdev->dev, "system pasid: %u\n", pasid); 325 return 0; 326 } 327 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH 1/2] iommu/sva: Tighten SVA bind API with explicit flags
Hi Jacob, I love your patch! Yet something to improve: [auto build test ERROR on vkoul-dmaengine/next] [also build test ERROR on char-misc/char-misc-testing v5.12-rc7] [cannot apply to iommu/next next-20210413] [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/Jacob-Pan/iommu-sva-Tighten-SVA-bind-API-with-explicit-flags/20210409-094521 base: https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git next config: x86_64-randconfig-a016-20200531 (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce (this is a W=1 build): # https://github.com/0day-ci/linux/commit/3b009446e2f451c401cff7a6d4766424acbcc890 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Jacob-Pan/iommu-sva-Tighten-SVA-bind-API-with-explicit-flags/20210409-094521 git checkout 3b009446e2f451c401cff7a6d4766424acbcc890 # save the attached .config to linux build tree make W=1 ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): drivers/dma/idxd/init.c: In function 'idxd_enable_system_pasid': >> drivers/dma/idxd/init.c:307:10: error: 'IOMMU_SVA_BIND_SUPERVISOR' >> undeclared (first use in this function) 307 | flags = IOMMU_SVA_BIND_SUPERVISOR; | ^ drivers/dma/idxd/init.c:307:10: note: each undeclared identifier is reported only once for each function it appears in vim +/IOMMU_SVA_BIND_SUPERVISOR +307 drivers/dma/idxd/init.c 300 301 static int idxd_enable_system_pasid(struct idxd_device *idxd) 302 { 303 unsigned int flags; 304 unsigned int pasid; 305 struct iommu_sva *sva; 306 > 307 flags = IOMMU_SVA_BIND_SUPERVISOR; 308 309 sva = iommu_sva_bind_device(&idxd->pdev->dev, NULL, flags); 310 if (IS_ERR(sva)) { 311 dev_warn(&idxd->pdev->dev, 312 "iommu sva bind failed: %ld\n", PTR_ERR(sva)); 313 return PTR_ERR(sva); 314 } 315 316 pasid = iommu_sva_get_pasid(sva); 317 if (pasid == IOMMU_PASID_INVALID) { 318 iommu_sva_unbind_device(sva); 319 return -ENODEV; 320 } 321 322 idxd->sva = sva; 323 idxd->pasid = pasid; 324 dev_dbg(&idxd->pdev->dev, "system pasid: %u\n", pasid); 325 return 0; 326 } 327 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH v13 03/13] vfio: VFIO_IOMMU_SET_MSI_BINDING
Hi Eric, I love your patch! Yet something to improve: [auto build test ERROR on v5.12-rc6] [also build test ERROR on next-20210409] [cannot apply to vfio/next] [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/Eric-Auger/SMMUv3-Nested-Stage-Setup-VFIO-part/20210411-195216 base:e49d033bddf5b565044e2abe4241353959bc9120 config: i386-randconfig-s001-20210411 (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.3-279-g6d5d9b42-dirty # https://github.com/0day-ci/linux/commit/8a9991f0409cae6af9a387b8b90dbb7ad004f590 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Eric-Auger/SMMUv3-Nested-Stage-Setup-VFIO-part/20210411-195216 git checkout 8a9991f0409cae6af9a387b8b90dbb7ad004f590 # save the attached .config to linux build tree make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 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 include/linux/vfio.h:16, from drivers/vfio/vfio_iommu_type1.c:37: include/uapi/linux/vfio.h:1226:34: error: field 'config' has incomplete type 1226 | struct iommu_pasid_table_config config; /* used on SET */ | ^~ drivers/vfio/vfio_iommu_type1.c: In function 'vfio_detach_pasid_table': drivers/vfio/vfio_iommu_type1.c:2872:3: error: implicit declaration of function 'iommu_detach_pasid_table'; did you mean 'vfio_detach_pasid_table'? [-Werror=implicit-function-declaration] 2872 | iommu_detach_pasid_table(d->domain); | ^~~~ | vfio_detach_pasid_table drivers/vfio/vfio_iommu_type1.c: In function 'vfio_attach_pasid_table': drivers/vfio/vfio_iommu_type1.c:2886:9: error: implicit declaration of function 'iommu_uapi_attach_pasid_table'; did you mean 'vfio_attach_pasid_table'? [-Werror=implicit-function-declaration] 2886 | ret = iommu_uapi_attach_pasid_table(d->domain, (void __user *)arg); | ^ | vfio_attach_pasid_table drivers/vfio/vfio_iommu_type1.c: In function 'vfio_bind_msi': >> drivers/vfio/vfio_iommu_type1.c:2915:9: error: implicit declaration of >> function 'iommu_bind_guest_msi' [-Werror=implicit-function-declaration] 2915 | ret = iommu_bind_guest_msi(d->domain, giova, gpa, size); | ^~~~ >> drivers/vfio/vfio_iommu_type1.c:2922:3: error: implicit declaration of >> function 'iommu_unbind_guest_msi' [-Werror=implicit-function-declaration] 2922 | iommu_unbind_guest_msi(d->domain, giova); | ^~ cc1: some warnings being treated as errors vim +/iommu_bind_guest_msi +2915 drivers/vfio/vfio_iommu_type1.c 2904 2905 static int 2906 vfio_bind_msi(struct vfio_iommu *iommu, 2907dma_addr_t giova, phys_addr_t gpa, size_t size) 2908 { 2909 struct vfio_domain *d; 2910 int ret = 0; 2911 2912 mutex_lock(&iommu->lock); 2913 2914 list_for_each_entry(d, &iommu->domain_list, next) { > 2915 ret = iommu_bind_guest_msi(d->domain, giova, gpa, size); 2916 if (ret) 2917 goto unwind; 2918 } 2919 goto unlock; 2920 unwind: 2921 list_for_each_entry_continue_reverse(d, &iommu->domain_list, next) { > 2922 iommu_unbind_guest_msi(d->domain, giova); 2923 } 2924 unlock: 2925 mutex_unlock(&iommu->lock); 2926 return ret; 2927 } 2928 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH v13 01/13] vfio: VFIO_IOMMU_SET_PASID_TABLE
Hi Eric, Thank you for the patch! Yet something to improve: [auto build test ERROR on v5.12-rc6] [also build test ERROR on next-20210409] [cannot apply to vfio/next] [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/Eric-Auger/SMMUv3-Nested-Stage-Setup-VFIO-part/20210411-195216 base:e49d033bddf5b565044e2abe4241353959bc9120 config: i386-randconfig-s001-20210411 (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.3-279-g6d5d9b42-dirty # https://github.com/0day-ci/linux/commit/0af9db19db29eb2a707b9e1ca4ff9e1a08a1c511 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Eric-Auger/SMMUv3-Nested-Stage-Setup-VFIO-part/20210411-195216 git checkout 0af9db19db29eb2a707b9e1ca4ff9e1a08a1c511 # save the attached .config to linux build tree make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 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 include/linux/vfio.h:16, from drivers/vfio/vfio.c:32: >> include/uapi/linux/vfio.h:1226:34: error: field 'config' has incomplete type 1226 | struct iommu_pasid_table_config config; /* used on SET */ | ^~ -- In file included from include/linux/vfio.h:16, from drivers/vfio/vfio_iommu_type1.c:37: >> include/uapi/linux/vfio.h:1226:34: error: field 'config' has incomplete type 1226 | struct iommu_pasid_table_config config; /* used on SET */ | ^~ drivers/vfio/vfio_iommu_type1.c: In function 'vfio_detach_pasid_table': >> drivers/vfio/vfio_iommu_type1.c:2844:3: error: implicit declaration of >> function 'iommu_detach_pasid_table'; did you mean 'vfio_detach_pasid_table'? >> [-Werror=implicit-function-declaration] 2844 | iommu_detach_pasid_table(d->domain); | ^~~~ | vfio_detach_pasid_table drivers/vfio/vfio_iommu_type1.c: In function 'vfio_attach_pasid_table': >> drivers/vfio/vfio_iommu_type1.c:2858:9: error: implicit declaration of >> function 'iommu_uapi_attach_pasid_table'; did you mean >> 'vfio_attach_pasid_table'? [-Werror=implicit-function-declaration] 2858 | ret = iommu_uapi_attach_pasid_table(d->domain, (void __user *)arg); | ^ | vfio_attach_pasid_table cc1: some warnings being treated as errors vim +/config +1226 include/uapi/linux/vfio.h 1211 1212 /* 1213 * VFIO_IOMMU_SET_PASID_TABLE - _IOWR(VFIO_TYPE, VFIO_BASE + 18, 1214 * struct vfio_iommu_type1_set_pasid_table) 1215 * 1216 * The SET operation passes a PASID table to the host while the 1217 * UNSET operation detaches the one currently programmed. It is 1218 * allowed to "SET" the table several times without unsetting as 1219 * long as the table config does not stay IOMMU_PASID_CONFIG_TRANSLATE. 1220 */ 1221 struct vfio_iommu_type1_set_pasid_table { 1222 __u32 argsz; 1223 __u32 flags; 1224 #define VFIO_PASID_TABLE_FLAG_SET (1 << 0) 1225 #define VFIO_PASID_TABLE_FLAG_UNSET (1 << 1) > 1226 struct iommu_pasid_table_config config; /* used on SET */ 1227 }; 1228 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH v13 01/13] vfio: VFIO_IOMMU_SET_PASID_TABLE
Hi Eric, Thank you for the patch! Yet something to improve: [auto build test ERROR on v5.12-rc6] [also build test ERROR on next-20210409] [cannot apply to vfio/next] [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/Eric-Auger/SMMUv3-Nested-Stage-Setup-VFIO-part/20210411-195216 base:e49d033bddf5b565044e2abe4241353959bc9120 config: arm-randconfig-r003-20210411 (attached as .config) compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9829f5e6b1bca9b61efc629770d28bb9014dec45) 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/0day-ci/linux/commit/0af9db19db29eb2a707b9e1ca4ff9e1a08a1c511 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Eric-Auger/SMMUv3-Nested-Stage-Setup-VFIO-part/20210411-195216 git checkout 0af9db19db29eb2a707b9e1ca4ff9e1a08a1c511 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm 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/vfio/vfio.c:32: In file included from include/linux/vfio.h:16: >> include/uapi/linux/vfio.h:1226:34: error: field has incomplete type 'struct >> iommu_pasid_table_config' struct iommu_pasid_table_config config; /* used on SET */ ^ include/uapi/linux/vfio.h:1226:9: note: forward declaration of 'struct iommu_pasid_table_config' struct iommu_pasid_table_config config; /* used on SET */ ^ 1 error generated. vim +1226 include/uapi/linux/vfio.h 1211 1212 /* 1213 * VFIO_IOMMU_SET_PASID_TABLE - _IOWR(VFIO_TYPE, VFIO_BASE + 18, 1214 * struct vfio_iommu_type1_set_pasid_table) 1215 * 1216 * The SET operation passes a PASID table to the host while the 1217 * UNSET operation detaches the one currently programmed. It is 1218 * allowed to "SET" the table several times without unsetting as 1219 * long as the table config does not stay IOMMU_PASID_CONFIG_TRANSLATE. 1220 */ 1221 struct vfio_iommu_type1_set_pasid_table { 1222 __u32 argsz; 1223 __u32 flags; 1224 #define VFIO_PASID_TABLE_FLAG_SET (1 << 0) 1225 #define VFIO_PASID_TABLE_FLAG_UNSET (1 << 1) > 1226 struct iommu_pasid_table_config config; /* used on SET */ 1227 }; 1228 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH 1/4] iommu/vt-d: Enable write protect for supervisor SVM
Hi Jacob, I love your patch! Yet something to improve: [auto build test ERROR on iommu/next] [also build test ERROR on linux/master linus/master v5.12-rc1 next-20210303] [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/Jacob-Pan/Misc-vSVA-fixes-for-VT-d/20210219-141141 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: ia64-randconfig-r023-20210304 (attached as .config) compiler: ia64-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/4c1de3403ecb6f91cc1bdc5e3ca81f16a2ffc0b5 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Jacob-Pan/Misc-vSVA-fixes-for-VT-d/20210219-141141 git checkout 4c1de3403ecb6f91cc1bdc5e3ca81f16a2ffc0b5 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64 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 arch/ia64/include/asm/pgtable.h:154, from include/linux/pgtable.h:6, from include/linux/mm.h:33, from include/linux/scatterlist.h:8, from include/linux/dma-mapping.h:10, from include/linux/iova.h:16, from include/linux/intel-iommu.h:14, from drivers/iommu/intel/pasid.c:15: arch/ia64/include/asm/mmu_context.h: In function 'reload_context': arch/ia64/include/asm/mmu_context.h:127:41: warning: variable 'old_rr4' set but not used [-Wunused-but-set-variable] 127 | unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4; | ^~~ drivers/iommu/intel/pasid.c: In function 'pasid_enable_wpe': >> drivers/iommu/intel/pasid.c:536:22: error: implicit declaration of function >> 'read_cr0' [-Werror=implicit-function-declaration] 536 | unsigned long cr0 = read_cr0(); | ^~~~ In file included from include/linux/build_bug.h:5, from include/linux/bits.h:22, from include/linux/bitops.h:6, from drivers/iommu/intel/pasid.c:12: >> drivers/iommu/intel/pasid.c:539:23: error: 'X86_CR0_WP' undeclared (first >> use in this function) 539 | if (unlikely(!(cr0 & X86_CR0_WP))) { | ^~ include/linux/compiler.h:78:42: note: in definition of macro 'unlikely' 78 | # define unlikely(x) __builtin_expect(!!(x), 0) | ^ drivers/iommu/intel/pasid.c:539:23: note: each undeclared identifier is reported only once for each function it appears in 539 | if (unlikely(!(cr0 & X86_CR0_WP))) { | ^~ include/linux/compiler.h:78:42: note: in definition of macro 'unlikely' 78 | # define unlikely(x) __builtin_expect(!!(x), 0) | ^ cc1: some warnings being treated as errors vim +/read_cr0 +536 drivers/iommu/intel/pasid.c 533 534 static inline int pasid_enable_wpe(struct pasid_entry *pte) 535 { > 536 unsigned long cr0 = read_cr0(); 537 538 /* CR0.WP is normally set but just to be sure */ > 539 if (unlikely(!(cr0 & X86_CR0_WP))) { 540 pr_err_ratelimited("No CPU write protect!\n"); 541 return -EINVAL; 542 } 543 pasid_set_wpe(pte); 544 545 return 0; 546 }; 547 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH v12 01/13] vfio: VFIO_IOMMU_SET_PASID_TABLE
Hi Eric, Thank you for the patch! Yet something to improve: [auto build test ERROR on v5.11] [also build test ERROR on next-20210223] [cannot apply to vfio/next] [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/Eric-Auger/SMMUv3-Nested-Stage-Setup-VFIO-part/20210224-051641 base:f40ddce88593482919761f74910f42f4b84c004b config: i386-randconfig-s001-20210223 (attached as .config) compiler: gcc-9 (Debian 9.3.0-15) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.3-229-g60c1f270-dirty # https://github.com/0day-ci/linux/commit/3bb0b5b270edf8c80af65a89749296990f9b9213 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Eric-Auger/SMMUv3-Nested-Stage-Setup-VFIO-part/20210224-051641 git checkout 3bb0b5b270edf8c80af65a89749296990f9b9213 # save the attached .config to linux build tree make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 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 include/linux/vfio.h:16, from drivers/gpu/drm/i915/gvt/dmabuf.h:33, from : >> include/uapi/linux/vfio.h:1198:34: error: field 'config' has incomplete type 1198 | struct iommu_pasid_table_config config; /* used on SET */ | ^~ vim +/config +1198 include/uapi/linux/vfio.h 1184 1185 /* 1186 * VFIO_IOMMU_SET_PASID_TABLE - _IOWR(VFIO_TYPE, VFIO_BASE + 18, 1187 * struct vfio_iommu_type1_set_pasid_table) 1188 * 1189 * The SET operation passes a PASID table to the host while the 1190 * UNSET operation detaches the one currently programmed. Setting 1191 * a table while another is already programmed replaces the old table. 1192 */ 1193 struct vfio_iommu_type1_set_pasid_table { 1194 __u32 argsz; 1195 __u32 flags; 1196 #define VFIO_PASID_TABLE_FLAG_SET (1 << 0) 1197 #define VFIO_PASID_TABLE_FLAG_UNSET (1 << 1) > 1198 struct iommu_pasid_table_config config; /* used on SET */ 1199 }; 1200 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH v12 03/13] vfio: VFIO_IOMMU_SET_MSI_BINDING
Hi Eric, I love your patch! Yet something to improve: [auto build test ERROR on v5.11] [cannot apply to vfio/next next-20210223] [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/Eric-Auger/SMMUv3-Nested-Stage-Setup-VFIO-part/20210224-051641 base:f40ddce88593482919761f74910f42f4b84c004b config: arm64-randconfig-r003-20210223 (attached as .config) compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476) 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 arm64 cross compiling tool for clang build # apt-get install binutils-aarch64-linux-gnu # https://github.com/0day-ci/linux/commit/ec823a68d862693dc787422f168409996f43b10a git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Eric-Auger/SMMUv3-Nested-Stage-Setup-VFIO-part/20210224-051641 git checkout ec823a68d862693dc787422f168409996f43b10a # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 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/vfio/vfio_iommu_type1.c:36: In file included from include/linux/vfio.h:16: include/uapi/linux/vfio.h:1198:34: error: field has incomplete type 'struct iommu_pasid_table_config' struct iommu_pasid_table_config config; /* used on SET */ ^ include/uapi/linux/vfio.h:1198:9: note: forward declaration of 'struct iommu_pasid_table_config' struct iommu_pasid_table_config config; /* used on SET */ ^ drivers/vfio/vfio_iommu_type1.c:2625:3: error: implicit declaration of function 'iommu_detach_pasid_table' [-Werror,-Wimplicit-function-declaration] iommu_detach_pasid_table(d->domain); ^ drivers/vfio/vfio_iommu_type1.c:2625:3: note: did you mean 'vfio_detach_pasid_table'? drivers/vfio/vfio_iommu_type1.c:2619:1: note: 'vfio_detach_pasid_table' declared here vfio_detach_pasid_table(struct vfio_iommu *iommu) ^ drivers/vfio/vfio_iommu_type1.c:2639:9: error: implicit declaration of function 'iommu_uapi_attach_pasid_table' [-Werror,-Wimplicit-function-declaration] ret = iommu_uapi_attach_pasid_table(d->domain, (void __user *)arg); ^ drivers/vfio/vfio_iommu_type1.c:2642:5: error: implicit declaration of function 'iommu_detach_pasid_table' [-Werror,-Wimplicit-function-declaration] iommu_detach_pasid_table(d->domain); ^ >> drivers/vfio/vfio_iommu_type1.c:2668:9: error: implicit declaration of >> function 'iommu_bind_guest_msi' [-Werror,-Wimplicit-function-declaration] ret = iommu_bind_guest_msi(d->domain, giova, gpa, size); ^ >> drivers/vfio/vfio_iommu_type1.c:2675:3: error: implicit declaration of >> function 'iommu_unbind_guest_msi' [-Werror,-Wimplicit-function-declaration] iommu_unbind_guest_msi(d->domain, giova); ^ drivers/vfio/vfio_iommu_type1.c:2689:3: error: implicit declaration of function 'iommu_unbind_guest_msi' [-Werror,-Wimplicit-function-declaration] iommu_unbind_guest_msi(d->domain, giova); ^ 7 errors generated. vim +/iommu_bind_guest_msi +2668 drivers/vfio/vfio_iommu_type1.c 2617 2618 static void > 2619 vfio_detach_pasid_table(struct vfio_iommu *iommu) 2620 { 2621 struct vfio_domain *d; 2622 2623 mutex_lock(&iommu->lock); 2624 list_for_each_entry(d, &iommu->domain_list, next) 2625 iommu_detach_pasid_table(d->domain); 2626 2627 mutex_unlock(&iommu->lock); 2628 } 2629 2630 static int 2631 vfio_attach_pasid_table(struct vfio_iommu *iommu, unsigned long arg) 2632 { 2633 struct vfio_domain *d; 2634 int ret = 0; 2635 2636 mutex_lock(&iommu->lock); 2637 2638 list_for_each_entry(d, &iommu->domain_list, next) { > 2639 ret = iommu_uapi_attach_pasid_table(d->domain, (void > __user *)arg); 2640 if (ret) { 2641 list_for_each_entry_continue_reverse(d, &iommu->d
Re: [PATCH v12 01/13] vfio: VFIO_IOMMU_SET_PASID_TABLE
Hi Eric, Thank you for the patch! Yet something to improve: [auto build test ERROR on v5.11] [also build test ERROR on next-20210223] [cannot apply to vfio/next] [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/Eric-Auger/SMMUv3-Nested-Stage-Setup-VFIO-part/20210224-051641 base:f40ddce88593482919761f74910f42f4b84c004b config: arm64-randconfig-r003-20210223 (attached as .config) compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476) 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 arm64 cross compiling tool for clang build # apt-get install binutils-aarch64-linux-gnu # https://github.com/0day-ci/linux/commit/3bb0b5b270edf8c80af65a89749296990f9b9213 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Eric-Auger/SMMUv3-Nested-Stage-Setup-VFIO-part/20210224-051641 git checkout 3bb0b5b270edf8c80af65a89749296990f9b9213 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 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/vfio/vfio.c:32: In file included from include/linux/vfio.h:16: >> include/uapi/linux/vfio.h:1198:34: error: field has incomplete type 'struct >> iommu_pasid_table_config' struct iommu_pasid_table_config config; /* used on SET */ ^ include/uapi/linux/vfio.h:1198:9: note: forward declaration of 'struct iommu_pasid_table_config' struct iommu_pasid_table_config config; /* used on SET */ ^ 1 error generated. -- In file included from drivers/vfio/vfio_iommu_type1.c:36: In file included from include/linux/vfio.h:16: >> include/uapi/linux/vfio.h:1198:34: error: field has incomplete type 'struct >> iommu_pasid_table_config' struct iommu_pasid_table_config config; /* used on SET */ ^ include/uapi/linux/vfio.h:1198:9: note: forward declaration of 'struct iommu_pasid_table_config' struct iommu_pasid_table_config config; /* used on SET */ ^ >> drivers/vfio/vfio_iommu_type1.c:2597:3: error: implicit declaration of >> function 'iommu_detach_pasid_table' [-Werror,-Wimplicit-function-declaration] iommu_detach_pasid_table(d->domain); ^ drivers/vfio/vfio_iommu_type1.c:2597:3: note: did you mean 'vfio_detach_pasid_table'? drivers/vfio/vfio_iommu_type1.c:2591:1: note: 'vfio_detach_pasid_table' declared here vfio_detach_pasid_table(struct vfio_iommu *iommu) ^ >> drivers/vfio/vfio_iommu_type1.c:2611:9: error: implicit declaration of >> function 'iommu_uapi_attach_pasid_table' >> [-Werror,-Wimplicit-function-declaration] ret = iommu_uapi_attach_pasid_table(d->domain, (void __user *)arg); ^ drivers/vfio/vfio_iommu_type1.c:2614:5: error: implicit declaration of function 'iommu_detach_pasid_table' [-Werror,-Wimplicit-function-declaration] iommu_detach_pasid_table(d->domain); ^ 4 errors generated. vim +1198 include/uapi/linux/vfio.h 1184 1185 /* 1186 * VFIO_IOMMU_SET_PASID_TABLE - _IOWR(VFIO_TYPE, VFIO_BASE + 18, 1187 * struct vfio_iommu_type1_set_pasid_table) 1188 * 1189 * The SET operation passes a PASID table to the host while the 1190 * UNSET operation detaches the one currently programmed. Setting 1191 * a table while another is already programmed replaces the old table. 1192 */ 1193 struct vfio_iommu_type1_set_pasid_table { 1194 __u32 argsz; 1195 __u32 flags; 1196 #define VFIO_PASID_TABLE_FLAG_SET (1 << 0) 1197 #define VFIO_PASID_TABLE_FLAG_UNSET (1 << 1) > 1198 struct iommu_pasid_table_config config; /* used on SET */ 1199 }; 1200 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH v12 01/13] vfio: VFIO_IOMMU_SET_PASID_TABLE
Hi Eric, Thank you for the patch! Yet something to improve: [auto build test ERROR on v5.11] [also build test ERROR on next-20210223] [cannot apply to vfio/next] [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/Eric-Auger/SMMUv3-Nested-Stage-Setup-VFIO-part/20210224-051641 base:f40ddce88593482919761f74910f42f4b84c004b config: x86_64-randconfig-s021-20210223 (attached as .config) compiler: gcc-9 (Debian 9.3.0-15) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.3-229-g60c1f270-dirty # https://github.com/0day-ci/linux/commit/3bb0b5b270edf8c80af65a89749296990f9b9213 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Eric-Auger/SMMUv3-Nested-Stage-Setup-VFIO-part/20210224-051641 git checkout 3bb0b5b270edf8c80af65a89749296990f9b9213 # save the attached .config to linux build tree make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 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 :32: >> ./usr/include/linux/vfio.h:1198:34: error: field 'config' has incomplete type 1198 | struct iommu_pasid_table_config config; /* used on SET */ | ^~ --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
[iommu:x86/vt-d 10/12] drivers/iommu/intel/iommu.c:5468:21: error: initialization of 'void iommu_domain from incompatible pointer type 'void iommu_domain long unsigned int, size_t)' {aka 'void iommu_d
tree: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git x86/vt-d head: 31a75cbbb9274cf8185f402904bf11386917870b commit: 933fcd01e97e2ba29880dd5f1239365e40094950 [10/12] iommu/vt-d: Add iotlb_sync_map callback config: x86_64-rhel-8.3 (attached as .config) compiler: gcc-9 (Debian 9.3.0-15) 9.3.0 reproduce (this is a W=1 build): # https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git/commit/?id=933fcd01e97e2ba29880dd5f1239365e40094950 git remote add iommu https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git git fetch --no-tags iommu x86/vt-d git checkout 933fcd01e97e2ba29880dd5f1239365e40094950 # save the attached .config to linux build tree make W=1 ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): >> drivers/iommu/intel/iommu.c:5468:21: error: initialization of 'void >> (*)(struct iommu_domain *)' from incompatible pointer type 'void (*)(struct >> iommu_domain *, long unsigned int, size_t)' {aka 'void (*)(struct >> iommu_domain *, long unsigned int, long unsigned int)'} >> [-Werror=incompatible-pointer-types] 5468 | .iotlb_sync_map = intel_iommu_iotlb_sync_map, | ^~ drivers/iommu/intel/iommu.c:5468:21: note: (near initialization for 'intel_iommu_ops.iotlb_sync_map') cc1: some warnings being treated as errors vim +5468 drivers/iommu/intel/iommu.c 5455 5456 const struct iommu_ops intel_iommu_ops = { 5457 .capable= intel_iommu_capable, 5458 .domain_alloc = intel_iommu_domain_alloc, 5459 .domain_free= intel_iommu_domain_free, 5460 .domain_get_attr= intel_iommu_domain_get_attr, 5461 .domain_set_attr= intel_iommu_domain_set_attr, 5462 .attach_dev = intel_iommu_attach_device, 5463 .detach_dev = intel_iommu_detach_device, 5464 .aux_attach_dev = intel_iommu_aux_attach_device, 5465 .aux_detach_dev = intel_iommu_aux_detach_device, 5466 .aux_get_pasid = intel_iommu_aux_get_pasid, 5467 .map= intel_iommu_map, > 5468 .iotlb_sync_map = intel_iommu_iotlb_sync_map, 5469 .unmap = intel_iommu_unmap, 5470 .flush_iotlb_all= intel_flush_iotlb_all, 5471 .iotlb_sync = intel_iommu_tlb_sync, 5472 .iova_to_phys = intel_iommu_iova_to_phys, 5473 .probe_device = intel_iommu_probe_device, 5474 .probe_finalize = intel_iommu_probe_finalize, 5475 .release_device = intel_iommu_release_device, 5476 .get_resv_regions = intel_iommu_get_resv_regions, 5477 .put_resv_regions = generic_iommu_put_resv_regions, 5478 .device_group = intel_iommu_device_group, 5479 .dev_has_feat = intel_iommu_dev_has_feat, 5480 .dev_feat_enabled = intel_iommu_dev_feat_enabled, 5481 .dev_enable_feat= intel_iommu_dev_enable_feat, 5482 .dev_disable_feat = intel_iommu_dev_disable_feat, 5483 .is_attach_deferred = intel_iommu_is_attach_deferred, 5484 .def_domain_type= device_def_domain_type, 5485 .pgsize_bitmap = INTEL_IOMMU_PGSIZES, 5486 #ifdef CONFIG_INTEL_IOMMU_SVM 5487 .cache_invalidate = intel_iommu_sva_invalidate, 5488 .sva_bind_gpasid= intel_svm_bind_gpasid, 5489 .sva_unbind_gpasid = intel_svm_unbind_gpasid, 5490 .sva_bind = intel_svm_bind, 5491 .sva_unbind = intel_svm_unbind, 5492 .sva_get_pasid = intel_svm_get_pasid, 5493 .page_response = intel_svm_page_response, 5494 #endif 5495 }; 5496 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH v3 2/2] iommu: add Unisoc iommu basic driver
Hi Chunyan, I love your patch! Perhaps something to improve: [auto build test WARNING on iommu/next] [also build test WARNING on robh/for-next v5.11-rc6 next-20210125] [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/Chunyan-Zhang/Add-Unisoc-iommu-basic-driver/20210203-171459 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: nios2-allyesconfig (attached as .config) compiler: nios2-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/02726f17be90f0d6226117f44cef3497250e378f git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Chunyan-Zhang/Add-Unisoc-iommu-basic-driver/20210203-171459 git checkout 02726f17be90f0d6226117f44cef3497250e378f # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): In file included from ./arch/nios2/include/generated/asm/bug.h:1, from include/linux/bug.h:5, from include/linux/thread_info.h:12, from include/asm-generic/current.h:5, from ./arch/nios2/include/generated/asm/current.h:1, from include/linux/mutex.h:14, from include/linux/notifier.h:14, from include/linux/clk.h:14, from drivers/iommu/sprd-iommu.c:9: drivers/iommu/sprd-iommu.c: In function 'sprd_iommu_iova_to_phys': >> drivers/iommu/sprd-iommu.c:375:4: warning: format '%llx' expects argument of >> type 'long long unsigned int', but argument 5 has type 'dma_addr_t' {aka >> 'unsigned int'} [-Wformat=] 375 |"iova (0x%llx) exceeds the vpn range[0x%lx-0x%lx]\n", |^~~~ 376 |iova, start, end)) | || |dma_addr_t {aka unsigned int} include/asm-generic/bug.h:89:48: note: in definition of macro '__WARN_printf' 89 | warn_slowpath_fmt(__FILE__, __LINE__, taint, arg); \ |^~~ drivers/iommu/sprd-iommu.c:374:6: note: in expansion of macro 'WARN' 374 | if (WARN(iova < start || iova > end, | ^~~~ drivers/iommu/sprd-iommu.c:375:16: note: format string is defined here 375 |"iova (0x%llx) exceeds the vpn range[0x%lx-0x%lx]\n", | ~~~^ || |long long unsigned int | %x drivers/iommu/sprd-iommu.c: At top level: drivers/iommu/sprd-iommu.c:438:20: error: initialization of 'void (*)(struct iommu_domain *, long unsigned int, size_t)' {aka 'void (*)(struct iommu_domain *, long unsigned int, unsigned int)'} from incompatible pointer type 'void (*)(struct iommu_domain *)' [-Werror=incompatible-pointer-types] 438 | .iotlb_sync_map = sprd_iommu_sync_map, |^~~ drivers/iommu/sprd-iommu.c:438:20: note: (near initialization for 'sprd_iommu_ops.iotlb_sync_map') cc1: some warnings being treated as errors vim +375 drivers/iommu/sprd-iommu.c 364 365 static phys_addr_t sprd_iommu_iova_to_phys(struct iommu_domain *domain, 366 dma_addr_t iova) 367 { 368 struct sprd_iommu_domain *dom = to_sprd_domain(domain); 369 unsigned long flags; 370 phys_addr_t pa; 371 unsigned long start = domain->geometry.aperture_start; 372 unsigned long end = domain->geometry.aperture_end; 373 374 if (WARN(iova < start || iova > end, > 375 "iova (0x%llx) exceeds the vpn range[0x%lx-0x%lx]\n", 376 iova, start, end)) 377 return 0; 378 379 spin_lock_irqsave(&dom->pgtlock, flags); 380 pa = *(dom->pgt_va + ((iova - start) >> SPRD_IOMMU_PAGE_SHIFT)); 381 pa = (pa << SPRD_IOMMU_PAGE_SHIFT) + ((iova - start) & (SPRD_IOMMU_PAGE_SIZE - 1)); 382 spin_unlock_irqrestore(&dom->pgtlock, flags); 383 384 return pa; 385 } 386 --- 0-DAY CI Kernel Test Service,
Re: [PATCH v1 2/2] iommu: add Unisoc iommu basic driver
Hi Chunyan, I love your patch! Yet something to improve: [auto build test ERROR on robh/for-next] [also build test ERROR on v5.11-rc4 next-20210121] [cannot apply to iommu/next] [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/Chunyan-Zhang/Add-Unisoc-iommu-basic-driver/20210121-194023 base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next config: arc-allyesconfig (attached as .config) compiler: arceb-elf-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/891db11d7229149235a02e5bc31a61188243a5d7 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Chunyan-Zhang/Add-Unisoc-iommu-basic-driver/20210121-194023 git checkout 891db11d7229149235a02e5bc31a61188243a5d7 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): drivers/iommu/sprd-iommu.c: In function 'sprd_iommu_attach_device': >> drivers/iommu/sprd-iommu.c:248:16: error: implicit declaration of function >> 'dma_alloc_coherent' [-Werror=implicit-function-declaration] 248 | dom->pgt_va = dma_alloc_coherent(sdev->dev, pgt_size, &dom->pgt_pa, GFP_KERNEL); |^~ drivers/iommu/sprd-iommu.c:248:14: warning: assignment to 'u32 *' {aka 'unsigned int *'} from 'int' makes pointer from integer without a cast [-Wint-conversion] 248 | dom->pgt_va = dma_alloc_coherent(sdev->dev, pgt_size, &dom->pgt_pa, GFP_KERNEL); | ^ drivers/iommu/sprd-iommu.c: In function 'sprd_iommu_detach_device': >> drivers/iommu/sprd-iommu.c:270:2: error: implicit declaration of function >> 'dma_free_coherent' [-Werror=implicit-function-declaration] 270 | dma_free_coherent(sdev->dev, pgt_size, dom->pgt_va, dom->pgt_pa); | ^ In file included from include/linux/device.h:15, from drivers/iommu/sprd-iommu.c:10: drivers/iommu/sprd-iommu.c: In function 'sprd_iommu_map': drivers/iommu/sprd-iommu.c:296:27: warning: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Wformat=] 296 | dev_err(dom->sdev->dev, "(iova(0x%lx) + sixe(0x%lx)) are not in the range!\n", | ^ include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt' 19 | #define dev_fmt(fmt) fmt | ^~~ drivers/iommu/sprd-iommu.c:296:3: note: in expansion of macro 'dev_err' 296 | dev_err(dom->sdev->dev, "(iova(0x%lx) + sixe(0x%lx)) are not in the range!\n", | ^~~ drivers/iommu/sprd-iommu.c:296:52: note: format string is defined here 296 | dev_err(dom->sdev->dev, "(iova(0x%lx) + sixe(0x%lx)) are not in the range!\n", | ~~^ || |long unsigned int | %x drivers/iommu/sprd-iommu.c:279:38: warning: variable 'mdata' set but not used [-Wunused-but-set-variable] 279 | const struct sprd_iommu_match_data *mdata; | ^ drivers/iommu/sprd-iommu.c: In function 'sprd_iommu_probe': drivers/iommu/sprd-iommu.c:483:21: warning: assignment to 'u32 *' {aka 'unsigned int *'} from 'int' makes pointer from integer without a cast [-Wint-conversion] 483 | sdev->prot_page_va = dma_alloc_coherent(dev, SPRD_IOMMU_PAGE_SIZE, | ^ cc1: some warnings being treated as errors vim +/dma_alloc_coherent +248 drivers/iommu/sprd-iommu.c 240 241 static int sprd_iommu_attach_device(struct iommu_domain *domain, 242 struct device *dev) 243 { 244 struct sprd_iommu_device *sdev = dev_iommu_priv_get(dev); 245 struct sprd_iommu_domain *dom = to_sprd_domain(domain); 246 size_t pgt_size
Re: [PATCH v1 2/2] iommu: add Unisoc iommu basic driver
Hi Chunyan, I love your patch! Perhaps something to improve: [auto build test WARNING on robh/for-next] [also build test WARNING on v5.11-rc4 next-20210121] [cannot apply to iommu/next] [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/Chunyan-Zhang/Add-Unisoc-iommu-basic-driver/20210121-194023 base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next config: arc-allyesconfig (attached as .config) compiler: arceb-elf-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/891db11d7229149235a02e5bc31a61188243a5d7 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Chunyan-Zhang/Add-Unisoc-iommu-basic-driver/20210121-194023 git checkout 891db11d7229149235a02e5bc31a61188243a5d7 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): drivers/iommu/sprd-iommu.c: In function 'sprd_iommu_attach_device': drivers/iommu/sprd-iommu.c:248:16: error: implicit declaration of function 'dma_alloc_coherent' [-Werror=implicit-function-declaration] 248 | dom->pgt_va = dma_alloc_coherent(sdev->dev, pgt_size, &dom->pgt_pa, GFP_KERNEL); |^~ >> drivers/iommu/sprd-iommu.c:248:14: warning: assignment to 'u32 *' {aka >> 'unsigned int *'} from 'int' makes pointer from integer without a cast >> [-Wint-conversion] 248 | dom->pgt_va = dma_alloc_coherent(sdev->dev, pgt_size, &dom->pgt_pa, GFP_KERNEL); | ^ drivers/iommu/sprd-iommu.c: In function 'sprd_iommu_detach_device': drivers/iommu/sprd-iommu.c:270:2: error: implicit declaration of function 'dma_free_coherent' [-Werror=implicit-function-declaration] 270 | dma_free_coherent(sdev->dev, pgt_size, dom->pgt_va, dom->pgt_pa); | ^ In file included from include/linux/device.h:15, from drivers/iommu/sprd-iommu.c:10: drivers/iommu/sprd-iommu.c: In function 'sprd_iommu_map': >> drivers/iommu/sprd-iommu.c:296:27: warning: format '%lx' expects argument of >> type 'long unsigned int', but argument 4 has type 'size_t' {aka 'unsigned >> int'} [-Wformat=] 296 | dev_err(dom->sdev->dev, "(iova(0x%lx) + sixe(0x%lx)) are not in the range!\n", | ^ include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt' 19 | #define dev_fmt(fmt) fmt | ^~~ drivers/iommu/sprd-iommu.c:296:3: note: in expansion of macro 'dev_err' 296 | dev_err(dom->sdev->dev, "(iova(0x%lx) + sixe(0x%lx)) are not in the range!\n", | ^~~ drivers/iommu/sprd-iommu.c:296:52: note: format string is defined here 296 | dev_err(dom->sdev->dev, "(iova(0x%lx) + sixe(0x%lx)) are not in the range!\n", | ~~^ || |long unsigned int | %x >> drivers/iommu/sprd-iommu.c:279:38: warning: variable 'mdata' set but not >> used [-Wunused-but-set-variable] 279 | const struct sprd_iommu_match_data *mdata; | ^ drivers/iommu/sprd-iommu.c: In function 'sprd_iommu_probe': drivers/iommu/sprd-iommu.c:483:21: warning: assignment to 'u32 *' {aka 'unsigned int *'} from 'int' makes pointer from integer without a cast [-Wint-conversion] 483 | sdev->prot_page_va = dma_alloc_coherent(dev, SPRD_IOMMU_PAGE_SIZE, | ^ cc1: some warnings being treated as errors vim +248 drivers/iommu/sprd-iommu.c 240 241 static int sprd_iommu_attach_device(struct iommu_domain *domain, 242 struct device *dev) 243 { 244 struct sprd_iommu_device *sdev = dev_iommu_priv_get(dev); 245 struct sprd_iommu_domain *dom = to_sprd_domain(domain); 246
Re: [PATCH v2 1/7] iommu/io-pgtable: Introduce dynamic io-pgtable fmt registration
Hi "Isaac, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on iommu/next] [also build test WARNING on soc/for-next xlnx/master linus/master v5.10 next-20201223] [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/Isaac-J-Manjarres/iommu-Permit-modular-builds-of-io-pgtable-drivers/20201222-085121 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: alpha-randconfig-r023-20201221 (attached as .config) compiler: alpha-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/9cc3cfc5f79e5c9072aea2218dd9080227933caa git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Isaac-J-Manjarres/iommu-Permit-modular-builds-of-io-pgtable-drivers/20201222-085121 git checkout 9cc3cfc5f79e5c9072aea2218dd9080227933caa # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=alpha If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): In file included from include/linux/printk.h:7, from include/linux/kernel.h:16, from include/asm-generic/bug.h:20, from arch/alpha/include/asm/bug.h:23, from include/linux/bug.h:5, from include/linux/scatterlist.h:7, from include/linux/iommu.h:10, from include/linux/io-pgtable.h:6, from drivers/iommu/io-pgtable-arm.c:14: drivers/iommu/io-pgtable-arm.c: In function 'arm_lpae_init': >> include/linux/kern_levels.h:5:18: warning: format '%d' expects a matching >> 'int' argument [-Wformat=] 5 | #define KERN_SOH "\001" /* ASCII Start Of Header */ | ^~ include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH' 11 | #define KERN_ERR KERN_SOH "3" /* error conditions */ | ^~~~ include/linux/printk.h:343:9: note: in expansion of macro 'KERN_ERR' 343 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) | ^~~~ drivers/iommu/io-pgtable-arm.c:1257:4: note: in expansion of macro 'pr_err' 1257 |pr_err("Failed to register ARM LPAE fmt: %d\n"); |^~ drivers/iommu/io-pgtable-arm.c:1257:46: note: format string is defined here 1257 |pr_err("Failed to register ARM LPAE fmt: %d\n"); | ~^ | | | int vim +5 include/linux/kern_levels.h 314ba3520e513a7 Joe Perches 2012-07-30 4 04d2c8c83d0e3ac Joe Perches 2012-07-30 @5 #define KERN_SOH "\001" /* ASCII Start Of Header */ 04d2c8c83d0e3ac Joe Perches 2012-07-30 6 #define KERN_SOH_ASCII '\001' 04d2c8c83d0e3ac Joe Perches 2012-07-30 7 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH v13 05/15] iommu/smmuv3: Get prepared for nested stage support
Hi Eric, I love your patch! Perhaps something to improve: [auto build test WARNING on iommu/next] [also build test WARNING on linus/master v5.10-rc4 next-20201118] [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/Eric-Auger/SMMUv3-Nested-Stage-Setup-IOMMU-part/20201118-192520 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: arm64-randconfig-s031-20201118 (attached as .config) compiler: aarch64-linux-gcc (GCC) 9.3.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # apt-get install sparse # sparse version: v0.6.3-123-g626c4742-dirty # https://github.com/0day-ci/linux/commit/7308cdb07384d807c5ef43e6bfe0cd61c35a121e git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Eric-Auger/SMMUv3-Nested-Stage-Setup-IOMMU-part/20201118-192520 git checkout 7308cdb07384d807c5ef43e6bfe0cd61c35a121e # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot "sparse warnings: (new ones prefixed by >>)" >> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:1326:37: sparse: sparse: >> restricted __le64 degrades to integer drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:1326:37: sparse: sparse: cast to restricted __le64 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c: note: in included file (through arch/arm64/include/asm/atomic.h, include/linux/atomic.h, include/asm-generic/bitops/atomic.h, ...): arch/arm64/include/asm/cmpxchg.h:172:1: sparse: sparse: cast truncates bits from constant value (8000 becomes 0) arch/arm64/include/asm/cmpxchg.h:172:1: sparse: sparse: cast truncates bits from constant value (8000 becomes 0) vim +1326 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c 1175 1176 static void arm_smmu_write_strtab_ent(struct arm_smmu_master *master, u32 sid, 1177__le64 *dst) 1178 { 1179 /* 1180 * This is hideously complicated, but we only really care about 1181 * three cases at the moment: 1182 * 1183 * 1. Invalid (all zero) -> bypass/fault (init) 1184 * 2. Bypass/fault -> single stage translation/bypass (attach) 1185 * 3. Single or nested stage Translation/bypass -> bypass/fault (detach) 1186 * 4. S2 -> S1 + S2 (attach_pasid_table) 1187 * 5. S1 + S2 -> S2 (detach_pasid_table) 1188 * 1189 * Given that we can't update the STE atomically and the SMMU 1190 * doesn't read the thing in a defined order, that leaves us 1191 * with the following maintenance requirements: 1192 * 1193 * 1. Update Config, return (init time STEs aren't live) 1194 * 2. Write everything apart from dword 0, sync, write dword 0, sync 1195 * 3. Update Config, sync 1196 */ 1197 u64 val = le64_to_cpu(dst[0]); 1198 bool s1_live = false, s2_live = false, ste_live; 1199 bool abort, nested = false, translate = false; 1200 struct arm_smmu_device *smmu = NULL; 1201 struct arm_smmu_s1_cfg *s1_cfg; 1202 struct arm_smmu_s2_cfg *s2_cfg; 1203 struct arm_smmu_domain *smmu_domain = NULL; 1204 struct arm_smmu_cmdq_ent prefetch_cmd = { 1205 .opcode = CMDQ_OP_PREFETCH_CFG, 1206 .prefetch = { 1207 .sid= sid, 1208 }, 1209 }; 1210 1211 if (master) { 1212 smmu_domain = master->domain; 1213 smmu = master->smmu; 1214 } 1215 1216 if (smmu_domain) { 1217 s1_cfg = &smmu_domain->s1_cfg; 1218 s2_cfg = &smmu_domain->s2_cfg; 1219 1220 switch (smmu_domain->stage) { 1221 case ARM_SMMU_DOMAIN_S1: 1222 s1_cfg->set = true; 1223 s2_cfg->set = false; 1224 break; 1225 case ARM_SMMU_DOMAIN_S2: 1226 s1_cfg->set = false; 1227 s2_cfg->set = true; 1228 break; 1229 case ARM_SMMU_DOMAIN_NESTED: 1230
Re: [PATCH v11 01/13] vfio: VFIO_IOMMU_SET_PASID_TABLE
Hi Eric, Thank you for the patch! Yet something to improve: [auto build test ERROR on v5.10-rc4] [also build test ERROR on next-20201116] [cannot apply to vfio/next] [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/Eric-Auger/SMMUv3-Nested-Stage-Setup-VFIO-part/20201116-190742 base:09162bc32c880a791c6c0668ce0745cf7958f576 config: x86_64-randconfig-s022-20201115 (attached as .config) compiler: gcc-9 (Debian 9.3.0-15) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.3-107-gaf3512a6-dirty # https://github.com/0day-ci/linux/commit/ce7c900f2d50c7e8cc62d54836369a3f3150adaf git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Eric-Auger/SMMUv3-Nested-Stage-Setup-VFIO-part/20201116-190742 git checkout ce7c900f2d50c7e8cc62d54836369a3f3150adaf # save the attached .config to linux build tree make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 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 :32: >> ./usr/include/linux/vfio.h:1197:34: error: field 'config' has incomplete type 1197 | struct iommu_pasid_table_config config; /* used on SET */ | ^~ --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH v11 05/13] vfio/pci: Register an iommu fault handler
Hi Eric, I love your patch! Perhaps something to improve: [auto build test WARNING on v5.10-rc4] [also build test WARNING on next-20201116] [cannot apply to vfio/next] [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/Eric-Auger/SMMUv3-Nested-Stage-Setup-VFIO-part/20201116-190742 base:09162bc32c880a791c6c0668ce0745cf7958f576 config: x86_64-allyesconfig (attached as .config) compiler: gcc-9 (Debian 9.3.0-15) 9.3.0 reproduce (this is a W=1 build): # https://github.com/0day-ci/linux/commit/747ef402696e1192684908ca99f06f3d68466c04 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Eric-Auger/SMMUv3-Nested-Stage-Setup-VFIO-part/20201116-190742 git checkout 747ef402696e1192684908ca99f06f3d68466c04 # save the attached .config to linux build tree make W=1 ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): In file included from include/linux/vfio.h:16, from drivers/vfio/pci/vfio_pci.c:26: include/uapi/linux/vfio.h:1231:34: error: field 'config' has incomplete type 1231 | struct iommu_pasid_table_config config; /* used on SET */ | ^~ >> drivers/vfio/pci/vfio_pci.c:339:5: warning: no previous prototype for >> 'vfio_pci_iommu_dev_fault_handler' [-Wmissing-prototypes] 339 | int vfio_pci_iommu_dev_fault_handler(struct iommu_fault *fault, void *data) | ^~~~ vim +/vfio_pci_iommu_dev_fault_handler +339 drivers/vfio/pci/vfio_pci.c 338 > 339 int vfio_pci_iommu_dev_fault_handler(struct iommu_fault *fault, void > *data) 340 { 341 struct vfio_pci_device *vdev = (struct vfio_pci_device *)data; 342 struct vfio_region_dma_fault *reg = 343 (struct vfio_region_dma_fault *)vdev->fault_pages; 344 struct iommu_fault *new; 345 u32 head, tail, size; 346 int ret = -EINVAL; 347 348 349 if (WARN_ON(!reg)) 350 return ret; 351 352 mutex_lock(&vdev->fault_queue_lock); 353 354 head = reg->head; 355 tail = reg->tail; 356 size = reg->nb_entries; 357 358 new = (struct iommu_fault *)(vdev->fault_pages + reg->offset + 359 head * reg->entry_size); 360 361 if (CIRC_SPACE(head, tail, size) < 1) { 362 ret = -ENOSPC; 363 goto unlock; 364 } 365 366 *new = *fault; 367 reg->head = (head + 1) % size; 368 ret = 0; 369 unlock: 370 mutex_unlock(&vdev->fault_queue_lock); 371 return ret; 372 } 373 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH v12 15/15] iommu/smmuv3: Add PASID cache invalidation per PASID
Hi Eric, I love your patch! Perhaps something to improve: [auto build test WARNING on iommu/next] [also build test WARNING on linus/master v5.10-rc4 next-20201116] [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/Eric-Auger/SMMUv3-Nested-Stage-Setup-IOMMU-part/20201116-185039 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: arm64-randconfig-r034-20201115 (attached as .config) compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c044709b8fbea2a9a375e4173a6bd735f6866c0c) 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 arm64 cross compiling tool for clang build # apt-get install binutils-aarch64-linux-gnu # https://github.com/0day-ci/linux/commit/95e4ccc61b7a7c06e1e0c6c01f362d590136ad3c git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Eric-Auger/SMMUv3-Nested-Stage-Setup-IOMMU-part/20201116-185039 git checkout 95e4ccc61b7a7c06e1e0c6c01f362d590136ad3c # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:3010:8: warning: logical not is >> only applied to the left hand side of this bitwise operator >> [-Wlogical-not-parentheses] if (!info->flags & IOMMU_INV_PASID_FLAGS_PASID) ^~ drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:3010:8: note: add parentheses after the '!' to evaluate the bitwise operator first if (!info->flags & IOMMU_INV_PASID_FLAGS_PASID) ^ () drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:3010:8: note: add parentheses around left hand side expression to silence this warning if (!info->flags & IOMMU_INV_PASID_FLAGS_PASID) ^ ( ) 1 warning generated. vim +3010 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c 2960 2961 static int 2962 arm_smmu_cache_invalidate(struct iommu_domain *domain, struct device *dev, 2963struct iommu_cache_invalidate_info *inv_info) 2964 { 2965 struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain); 2966 struct arm_smmu_device *smmu = smmu_domain->smmu; 2967 2968 if (smmu_domain->stage != ARM_SMMU_DOMAIN_NESTED) 2969 return -EINVAL; 2970 2971 if (!smmu) 2972 return -EINVAL; 2973 2974 if (inv_info->version != IOMMU_CACHE_INVALIDATE_INFO_VERSION_1) 2975 return -EINVAL; 2976 2977 if (inv_info->cache & IOMMU_CACHE_INV_TYPE_IOTLB) { 2978 if (inv_info->granularity == IOMMU_INV_GRANU_PASID) { 2979 struct iommu_inv_pasid_info *info = 2980 &inv_info->granu.pasid_info; 2981 2982 if (!(info->flags & IOMMU_INV_PASID_FLAGS_ARCHID) || 2983 (info->flags & IOMMU_INV_PASID_FLAGS_PASID)) 2984 return -EINVAL; 2985 2986 __arm_smmu_tlb_inv_context(smmu_domain, info->archid); 2987 2988 } else if (inv_info->granularity == IOMMU_INV_GRANU_ADDR) { 2989 struct iommu_inv_addr_info *info = &inv_info->granu.addr_info; 2990 size_t size = info->nb_granules * info->granule_size; 2991 bool leaf = info->flags & IOMMU_INV_ADDR_FLAGS_LEAF; 2992 2993 if (!(info->flags & IOMMU_INV_ADDR_FLAGS_ARCHID) || 2994 (info->flags & IOMMU_INV_ADDR_FLAGS_PASID)) 2995 return -EINVAL; 2996 2997 __arm_smmu_tlb_inv_range(info->addr, size, 2998 info->granule_size, leaf, 2999smmu_domain, info->archid); 3000 3001 arm_smmu_cmdq_issue_sync(smmu); 3002 } else {
Re: [PATCH v12 01/15] iommu: Introduce attach/detach_pasid_table API
Hi Eric, I love your patch! Perhaps something to improve: [auto build test WARNING on iommu/next] [also build test WARNING on linus/master v5.10-rc4 next-20201116] [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/Eric-Auger/SMMUv3-Nested-Stage-Setup-IOMMU-part/20201116-185039 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: arm64-randconfig-r034-20201115 (attached as .config) compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c044709b8fbea2a9a375e4173a6bd735f6866c0c) 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 arm64 cross compiling tool for clang build # apt-get install binutils-aarch64-linux-gnu # https://github.com/0day-ci/linux/commit/54be9a9e014a566f9c7640da201c24cfb1eda06e git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Eric-Auger/SMMUv3-Nested-Stage-Setup-IOMMU-part/20201116-185039 git checkout 54be9a9e014a566f9c7640da201c24cfb1eda06e # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> drivers/iommu/iommu.c:2225:34: warning: overlapping comparisons always >> evaluate to false [-Wtautological-overlap-compare] if (pasid_table_data.config < 1 && pasid_table_data.config > 3) ^~ 1 warning generated. vim +2225 drivers/iommu/iommu.c 2182 2183 int iommu_uapi_attach_pasid_table(struct iommu_domain *domain, 2184void __user *uinfo) 2185 { 2186 struct iommu_pasid_table_config pasid_table_data = { 0 }; 2187 u32 minsz; 2188 2189 if (unlikely(!domain->ops->attach_pasid_table)) 2190 return -ENODEV; 2191 2192 /* 2193 * No new spaces can be added before the variable sized union, the 2194 * minimum size is the offset to the union. 2195 */ 2196 minsz = offsetof(struct iommu_pasid_table_config, vendor_data); 2197 2198 /* Copy minsz from user to get flags and argsz */ 2199 if (copy_from_user(&pasid_table_data, uinfo, minsz)) 2200 return -EFAULT; 2201 2202 /* Fields before the variable size union are mandatory */ 2203 if (pasid_table_data.argsz < minsz) 2204 return -EINVAL; 2205 2206 /* PASID and address granu require additional info beyond minsz */ 2207 if (pasid_table_data.version != PASID_TABLE_CFG_VERSION_1) 2208 return -EINVAL; 2209 if (pasid_table_data.format == IOMMU_PASID_FORMAT_SMMUV3 && 2210 pasid_table_data.argsz < 2211 offsetofend(struct iommu_pasid_table_config, vendor_data.smmuv3)) 2212 return -EINVAL; 2213 2214 /* 2215 * User might be using a newer UAPI header which has a larger data 2216 * size, we shall support the existing flags within the current 2217 * size. Copy the remaining user data _after_ minsz but not more 2218 * than the current kernel supported size. 2219 */ 2220 if (copy_from_user((void *)&pasid_table_data + minsz, uinfo + minsz, 2221 min_t(u32, pasid_table_data.argsz, sizeof(pasid_table_data)) - minsz)) return -EFAULT; 2223 2224 /* Now the argsz is validated, check the content */ > 2225 if (pasid_table_data.config < 1 && pasid_table_data.config > 3) 2226 return -EINVAL; 2227 2228 return domain->ops->attach_pasid_table(domain, &pasid_table_data); 2229 } 2230 EXPORT_SYMBOL_GPL(iommu_uapi_attach_pasid_table); 2231 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH v11 05/13] vfio/pci: Register an iommu fault handler
Hi Eric, I love your patch! Perhaps something to improve: [auto build test WARNING on v5.10-rc4] [also build test WARNING on next-20201116] [cannot apply to vfio/next] [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/Eric-Auger/SMMUv3-Nested-Stage-Setup-VFIO-part/20201116-190742 base:09162bc32c880a791c6c0668ce0745cf7958f576 config: powerpc64-randconfig-r026-20201116 (attached as .config) compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c044709b8fbea2a9a375e4173a6bd735f6866c0c) 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/747ef402696e1192684908ca99f06f3d68466c04 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Eric-Auger/SMMUv3-Nested-Stage-Setup-VFIO-part/20201116-190742 git checkout 747ef402696e1192684908ca99f06f3d68466c04 # 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 warnings (new ones prefixed by >>): In file included from drivers/vfio/pci/vfio_pci.c:26: In file included from include/linux/vfio.h:16: include/uapi/linux/vfio.h:1231:34: error: field has incomplete type 'struct iommu_pasid_table_config' struct iommu_pasid_table_config config; /* used on SET */ ^ include/uapi/linux/vfio.h:1231:9: note: forward declaration of 'struct iommu_pasid_table_config' struct iommu_pasid_table_config config; /* used on SET */ ^ >> drivers/vfio/pci/vfio_pci.c:339:5: warning: no previous prototype for >> function 'vfio_pci_iommu_dev_fault_handler' [-Wmissing-prototypes] int vfio_pci_iommu_dev_fault_handler(struct iommu_fault *fault, void *data) ^ drivers/vfio/pci/vfio_pci.c:339:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int vfio_pci_iommu_dev_fault_handler(struct iommu_fault *fault, void *data) ^ static 1 warning and 1 error generated. vim +/vfio_pci_iommu_dev_fault_handler +339 drivers/vfio/pci/vfio_pci.c 338 > 339 int vfio_pci_iommu_dev_fault_handler(struct iommu_fault *fault, void > *data) 340 { 341 struct vfio_pci_device *vdev = (struct vfio_pci_device *)data; 342 struct vfio_region_dma_fault *reg = 343 (struct vfio_region_dma_fault *)vdev->fault_pages; 344 struct iommu_fault *new; 345 u32 head, tail, size; 346 int ret = -EINVAL; 347 348 349 if (WARN_ON(!reg)) 350 return ret; 351 352 mutex_lock(&vdev->fault_queue_lock); 353 354 head = reg->head; 355 tail = reg->tail; 356 size = reg->nb_entries; 357 358 new = (struct iommu_fault *)(vdev->fault_pages + reg->offset + 359 head * reg->entry_size); 360 361 if (CIRC_SPACE(head, tail, size) < 1) { 362 ret = -ENOSPC; 363 goto unlock; 364 } 365 366 *new = *fault; 367 reg->head = (head + 1) % size; 368 ret = 0; 369 unlock: 370 mutex_unlock(&vdev->fault_queue_lock); 371 return ret; 372 } 373 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH v2 1/2] dma-mapping: add benchmark support for streaming DMA APIs
Hi Barry, I love your patch! Yet something to improve: [auto build test ERROR on kselftest/next] [also build test ERROR on linus/master v5.10-rc1] [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/Barry-Song/dma-mapping-provide-a-benchmark-for-streaming-DMA-mapping/20201101-182009 base: https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git next config: h8300-allyesconfig (attached as .config) compiler: h8300-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/b9abda38be7f32b9420c27b6c24eff2e69defa87 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Barry-Song/dma-mapping-provide-a-benchmark-for-streaming-DMA-mapping/20201101-182009 git checkout b9abda38be7f32b9420c27b6c24eff2e69defa87 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=h8300 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): h8300-linux-ld: kernel/dma/map_benchmark.o: in function `.L28': map_benchmark.c:(.text+0x283): undefined reference to `__udivdi3' >> h8300-linux-ld: map_benchmark.c:(.text+0x2c1): undefined reference to >> `__udivdi3' h8300-linux-ld: map_benchmark.c:(.text+0x327): undefined reference to `__udivdi3' h8300-linux-ld: kernel/dma/map_benchmark.o: in function `.L26': map_benchmark.c:(.text+0x3d7): undefined reference to `__udivdi3' h8300-linux-ld: kernel/dma/map_benchmark.o: in function `.L44': map_benchmark.c:(.text+0x799): undefined reference to `__divdi3' h8300-linux-ld: kernel/dma/map_benchmark.o: in function `.L45': map_benchmark.c:(.text+0x7f5): undefined reference to `__divdi3' --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH v2 1/2] dma-mapping: add benchmark support for streaming DMA APIs
Hi Barry, I love your patch! Yet something to improve: [auto build test ERROR on kselftest/next] [also build test ERROR on linus/master v5.10-rc1 next-20201030] [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/Barry-Song/dma-mapping-provide-a-benchmark-for-streaming-DMA-mapping/20201101-182009 base: https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git next config: mips-allyesconfig (attached as .config) compiler: mips-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/b9abda38be7f32b9420c27b6c24eff2e69defa87 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Barry-Song/dma-mapping-provide-a-benchmark-for-streaming-DMA-mapping/20201101-182009 git checkout b9abda38be7f32b9420c27b6c24eff2e69defa87 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): arch/mips/kernel/head.o: in function `dtb_found': (.ref.text+0xe0): relocation truncated to fit: R_MIPS_26 against `start_kernel' init/main.o: in function `set_reset_devices': main.c:(.init.text+0x20): relocation truncated to fit: R_MIPS_26 against `_mcount' main.c:(.init.text+0x30): relocation truncated to fit: R_MIPS_26 against `__sanitizer_cov_trace_pc' init/main.o: in function `debug_kernel': main.c:(.init.text+0x9c): relocation truncated to fit: R_MIPS_26 against `_mcount' main.c:(.init.text+0xac): relocation truncated to fit: R_MIPS_26 against `__sanitizer_cov_trace_pc' init/main.o: in function `quiet_kernel': main.c:(.init.text+0x118): relocation truncated to fit: R_MIPS_26 against `_mcount' main.c:(.init.text+0x128): relocation truncated to fit: R_MIPS_26 against `__sanitizer_cov_trace_pc' init/main.o: in function `init_setup': main.c:(.init.text+0x1a4): relocation truncated to fit: R_MIPS_26 against `_mcount' main.c:(.init.text+0x1c8): relocation truncated to fit: R_MIPS_26 against `__sanitizer_cov_trace_pc' main.c:(.init.text+0x1e8): relocation truncated to fit: R_MIPS_26 against `__sanitizer_cov_trace_pc' main.c:(.init.text+0x1fc): additional relocation overflows omitted from the output mips-linux-ld: kernel/dma/map_benchmark.o: in function `map_benchmark_thread': >> map_benchmark.c:(.text.map_benchmark_thread+0x1f4): undefined reference to >> `__divdi3' >> mips-linux-ld: map_benchmark.c:(.text.map_benchmark_thread+0x218): undefined >> reference to `__divdi3' mips-linux-ld: kernel/dma/map_benchmark.o: in function `do_map_benchmark': >> map_benchmark.c:(.text.do_map_benchmark+0x260): undefined reference to >> `__udivdi3' >> mips-linux-ld: map_benchmark.c:(.text.do_map_benchmark+0x284): undefined >> reference to `__udivdi3' mips-linux-ld: map_benchmark.c:(.text.do_map_benchmark+0x2b4): undefined reference to `__udivdi3' mips-linux-ld: map_benchmark.c:(.text.do_map_benchmark+0x300): undefined reference to `__udivdi3' --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH] RDMA: Fix software RDMA drivers for dma mapping error
Hi Parav, Thank you for the patch! Yet something to improve: [auto build test ERROR on rdma/for-next] [also build test ERROR on v5.10-rc1 next-20201028] [cannot apply to hch-configfs/for-next] [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/Parav-Pandit/RDMA-Fix-software-RDMA-drivers-for-dma-mapping-error/20201027-205440 base: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git for-next config: x86_64-rhel-8.3 (attached as .config) compiler: gcc-9 (Debian 9.3.0-15) 9.3.0 reproduce (this is a W=1 build): # https://github.com/0day-ci/linux/commit/cbe9509f0d3a076646d576c1d1f5adc59159316c git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Parav-Pandit/RDMA-Fix-software-RDMA-drivers-for-dma-mapping-error/20201027-205440 git checkout cbe9509f0d3a076646d576c1d1f5adc59159316c # save the attached .config to linux build tree make W=1 ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): drivers/infiniband/sw/rxe/rxe_verbs.c: In function 'rxe_register_device': >> drivers/infiniband/sw/rxe/rxe_verbs.c:1133:48: error: 'DMA_MASK_NONE' >> undeclared (first use in this function); did you mean 'CPU_MASK_NONE'? 1133 | err = dma_coerce_mask_and_coherent(&dev->dev, DMA_MASK_NONE); |^ |CPU_MASK_NONE drivers/infiniband/sw/rxe/rxe_verbs.c:1133:48: note: each undeclared identifier is reported only once for each function it appears in -- drivers/infiniband/sw/siw/siw_main.c: In function 'siw_device_create': >> drivers/infiniband/sw/siw/siw_main.c:387:51: error: 'DMA_MASK_NONE' >> undeclared (first use in this function); did you mean 'CPU_MASK_NONE'? 387 | if (dma_coerce_mask_and_coherent(&base_dev->dev, DMA_MASK_NONE)) | ^ | CPU_MASK_NONE drivers/infiniband/sw/siw/siw_main.c:387:51: note: each undeclared identifier is reported only once for each function it appears in vim +1133 drivers/infiniband/sw/rxe/rxe_verbs.c 1115 1116 int rxe_register_device(struct rxe_dev *rxe, const char *ibdev_name) 1117 { 1118 int err; 1119 struct ib_device *dev = &rxe->ib_dev; 1120 struct crypto_shash *tfm; 1121 1122 strlcpy(dev->node_desc, "rxe", sizeof(dev->node_desc)); 1123 1124 dev->node_type = RDMA_NODE_IB_CA; 1125 dev->phys_port_cnt = 1; 1126 dev->num_comp_vectors = num_possible_cpus(); 1127 dev->dev.parent = rxe_dma_device(rxe); 1128 dev->local_dma_lkey = 0; 1129 addrconf_addr_eui48((unsigned char *)&dev->node_guid, 1130 rxe->ndev->dev_addr); 1131 dev->dev.dma_parms = &rxe->dma_parms; 1132 dma_set_max_seg_size(&dev->dev, UINT_MAX); > 1133 err = dma_coerce_mask_and_coherent(&dev->dev, DMA_MASK_NONE); --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH 1/4] of/fdt: Update zone_dma_bits when running in bcm2711
Hi Nicolas, I love your patch! Perhaps something to improve: [auto build test WARNING on next-20201001] [also build test WARNING on v5.9-rc7] [cannot apply to robh/for-next arm64/for-next/core hnaz-linux-mm/master linus/master v5.9-rc7 v5.9-rc6 v5.9-rc5] [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/Nicolas-Saenz-Julienne/arm64-Default-to-32-bit-wide-ZONE_DMA/20201002-002007 base:d39294091fee6b89d9c4a683bb19441b25098330 config: arm64-randconfig-r005-20200930 (attached as .config) compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project bcd05599d0e53977a963799d6ee4f6e0bc21331b) 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 arm64 cross compiling tool for clang build # apt-get install binutils-aarch64-linux-gnu # https://github.com/0day-ci/linux/commit/7d073ab6c280772b1bcf9e337528be2138d0bc85 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Nicolas-Saenz-Julienne/arm64-Default-to-32-bit-wide-ZONE_DMA/20201002-002007 git checkout 7d073ab6c280772b1bcf9e337528be2138d0bc85 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> drivers/of/fdt.c:1202:13: warning: no previous prototype for function >> 'early_init_dt_update_zone_dma_bits' [-Wmissing-prototypes] void __init early_init_dt_update_zone_dma_bits(void) ^ drivers/of/fdt.c:1202:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void __init early_init_dt_update_zone_dma_bits(void) ^ static 1 warning generated. vim +/early_init_dt_update_zone_dma_bits +1202 drivers/of/fdt.c 1201 > 1202 void __init early_init_dt_update_zone_dma_bits(void) 1203 { 1204 unsigned long dt_root = of_get_flat_dt_root(); 1205 1206 if (of_flat_dt_is_compatible(dt_root, "brcm,bcm2711")) 1207 zone_dma_bits = 30; 1208 } 1209 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH] iommu/qcom: add missing put_device() call in qcom_iommu_of_xlate()
Hi Yu, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on iommu/next] [also build test WARNING on linus/master v5.9-rc6 next-20200922] [cannot apply to robclark/msm-next] [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/Yu-Kuai/iommu-qcom-add-missing-put_device-call-in-qcom_iommu_of_xlate/20200918-091341 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: arm64-randconfig-m031-20200923 (attached as .config) compiler: aarch64-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 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): In file included from arch/arm64/include/asm/atomic.h:12, from include/linux/atomic.h:7, from drivers/iommu/arm/arm-smmu/qcom_iommu.c:9: drivers/iommu/arm/arm-smmu/qcom_iommu.c: In function 'qcom_iommu_of_xlate': >> include/linux/compiler.h:56:23: warning: this 'if' clause does not guard... >> [-Wmisleading-indentation] 56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) ) | ^~ drivers/iommu/arm/arm-smmu/qcom_iommu.c:599:3: note: in expansion of macro 'if' 599 | if (WARN_ON(qcom_iommu != dev_iommu_priv_get(dev))) | ^~ drivers/iommu/arm/arm-smmu/qcom_iommu.c:601:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if' 601 |return -EINVAL; |^~ # https://github.com/0day-ci/linux/commit/2d982fb40897ad8088dd9dba06aee499f51c73ba git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Yu-Kuai/iommu-qcom-add-missing-put_device-call-in-qcom_iommu_of_xlate/20200918-091341 git checkout 2d982fb40897ad8088dd9dba06aee499f51c73ba vim +/if +56 include/linux/compiler.h 2bcd521a684cc9 Steven Rostedt 2008-11-21 50 2bcd521a684cc9 Steven Rostedt 2008-11-21 51 #ifdef CONFIG_PROFILE_ALL_BRANCHES 2bcd521a684cc9 Steven Rostedt 2008-11-21 52 /* 2bcd521a684cc9 Steven Rostedt 2008-11-21 53 * "Define 'is'", Bill Clinton 2bcd521a684cc9 Steven Rostedt 2008-11-21 54 * "Define 'if'", Steven Rostedt 2bcd521a684cc9 Steven Rostedt 2008-11-21 55 */ a15fd609ad53a6 Linus Torvalds 2019-03-20 @56 #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) ) a15fd609ad53a6 Linus Torvalds 2019-03-20 57 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH] iommu/qcom: add missing put_device() call in qcom_iommu_of_xlate()
Hi Yu, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on iommu/next] [also build test WARNING on linus/master v5.9-rc6 next-20200921] [cannot apply to robclark/msm-next] [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/Yu-Kuai/iommu-qcom-add-missing-put_device-call-in-qcom_iommu_of_xlate/20200918-091341 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: arm64-randconfig-r023-20200920 (attached as .config) compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 4e8c028158b56d9c2142a62464e8e0686bde3584) 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 arm64 cross compiling tool for clang build # apt-get install binutils-aarch64-linux-gnu # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> drivers/iommu/arm/arm-smmu/qcom_iommu.c:601:4: warning: misleading >> indentation; statement is not part of the previous 'if' >> [-Wmisleading-indentation] return -EINVAL; ^ drivers/iommu/arm/arm-smmu/qcom_iommu.c:599:3: note: previous statement is here if (WARN_ON(qcom_iommu != dev_iommu_priv_get(dev))) ^ 1 warning generated. # https://github.com/0day-ci/linux/commit/2d982fb40897ad8088dd9dba06aee499f51c73ba git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Yu-Kuai/iommu-qcom-add-missing-put_device-call-in-qcom_iommu_of_xlate/20200918-091341 git checkout 2d982fb40897ad8088dd9dba06aee499f51c73ba vim +/if +601 drivers/iommu/arm/arm-smmu/qcom_iommu.c 0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark2017-08-09 562 0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark2017-08-09 563 static int qcom_iommu_of_xlate(struct device *dev, struct of_phandle_args *args) 0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark2017-08-09 564 { 0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark2017-08-09 565 struct qcom_iommu_dev *qcom_iommu; 0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark2017-08-09 566 struct platform_device *iommu_pdev; 0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark2017-08-09 567 unsigned asid = args->args[0]; 0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark2017-08-09 568 0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark2017-08-09 569 if (args->args_count != 1) { 0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark2017-08-09 570 dev_err(dev, "incorrect number of iommu params found for %s " 0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark2017-08-09 571 "(found %d, expected 1)\n", 0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark2017-08-09 572 args->np->full_name, args->args_count); 0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark2017-08-09 573 return -EINVAL; 0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark2017-08-09 574 } 0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark2017-08-09 575 0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark2017-08-09 576 iommu_pdev = of_find_device_by_node(args->np); 0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark2017-08-09 577 if (WARN_ON(!iommu_pdev)) 0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark2017-08-09 578 return -EINVAL; 0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark2017-08-09 579 0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark2017-08-09 580 qcom_iommu = platform_get_drvdata(iommu_pdev); 0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark2017-08-09 581 0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark2017-08-09 582 /* make sure the asid specified in dt is valid, so we don't have 0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark2017-08-09 583 * to sanity check this elsewhere, since 'asid - 1' is used to 0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark2017-08-09 584 * index into qcom_
Re: [PATCH v9 12/32] drm: msm: fix common struct sg_table related issues
Hi Marek, I love your patch! Yet something to improve: [auto build test ERROR on linuxtv-media/master] [also build test ERROR on drm-intel/for-linux-next linus/master v5.9-rc2 next-20200826] [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/Marek-Szyprowski/DRM-fix-struct-sg_table-nents-vs-orig_nents-misuse/20200826-143908 base: git://linuxtv.org/media_tree.git master config: arm64-randconfig-r002-20200826 (attached as .config) compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 7cfcecece0e0430937cf529ce74d3a071a4dedc6) 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 arm64 cross compiling tool for clang build # apt-get install binutils-aarch64-linux-gnu # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): aarch64-linux-gnu-ld: warning: -z norelro ignored aarch64-linux-gnu-ld: fs/orangefs/orangefs-debugfs.o: in function `orangefs_debug_read': fs/orangefs/orangefs-debugfs.c:375: undefined reference to `stpcpy' aarch64-linux-gnu-ld: security/apparmor/lsm.o: in function `param_get_mode': security/apparmor/lsm.c:1559: undefined reference to `stpcpy' aarch64-linux-gnu-ld: security/apparmor/lsm.o: in function `param_get_audit': security/apparmor/lsm.c:1530: undefined reference to `stpcpy' aarch64-linux-gnu-ld: crypto/async_tx/async_tx.o: in function `async_tx_channel_switch': crypto/async_tx/async_tx.c:118: undefined reference to `dma_wait_for_async_tx' aarch64-linux-gnu-ld: crypto/async_tx/async_tx.o: in function `async_tx_quiesce': crypto/async_tx/async_tx.c:270: undefined reference to `dma_wait_for_async_tx' aarch64-linux-gnu-ld: crypto/async_tx/async_tx.c:270: undefined reference to `dma_wait_for_async_tx' aarch64-linux-gnu-ld: crypto/async_tx/async_memcpy.o: in function `async_memcpy': crypto/async_tx/async_memcpy.c:43: undefined reference to `dmaengine_get_unmap_data' aarch64-linux-gnu-ld: crypto/async_tx/async_memcpy.c:89: undefined reference to `dmaengine_unmap_put' aarch64-linux-gnu-ld: crypto/async_tx/async_xor.o: in function `async_xor': crypto/async_tx/async_xor.c:172: undefined reference to `dmaengine_get_unmap_data' aarch64-linux-gnu-ld: crypto/async_tx/async_xor.c:199: undefined reference to `dmaengine_unmap_put' aarch64-linux-gnu-ld: crypto/async_tx/async_xor.c:199: undefined reference to `dmaengine_unmap_put' aarch64-linux-gnu-ld: crypto/async_tx/async_xor.c:196: undefined reference to `dmaengine_unmap_put' aarch64-linux-gnu-ld: crypto/async_tx/async_xor.o: in function `async_xor_val': crypto/async_tx/async_xor.c:268: undefined reference to `dmaengine_get_unmap_data' aarch64-linux-gnu-ld: crypto/async_tx/async_xor.c:324: undefined reference to `dmaengine_unmap_put' aarch64-linux-gnu-ld: crypto/async_tx/async_pq.o: in function `async_gen_syndrome': crypto/async_tx/async_pq.c:176: undefined reference to `dmaengine_get_unmap_data' aarch64-linux-gnu-ld: crypto/async_tx/async_pq.c:233: undefined reference to `dmaengine_unmap_put' aarch64-linux-gnu-ld: crypto/async_tx/async_pq.c:229: undefined reference to `dmaengine_unmap_put' aarch64-linux-gnu-ld: crypto/async_tx/async_pq.o: in function `async_syndrome_val': crypto/async_tx/async_pq.c:295: undefined reference to `dmaengine_get_unmap_data' aarch64-linux-gnu-ld: crypto/async_tx/async_pq.c:412: undefined reference to `dmaengine_unmap_put' aarch64-linux-gnu-ld: drivers/xen/sys-hypervisor.o: in function `buildid_show': drivers/xen/sys-hypervisor.c:375: undefined reference to `stpcpy' aarch64-linux-gnu-ld: drivers/tty/tty_io.o: in function `tty_line_name': drivers/tty/tty_io.c:1139: undefined reference to `stpcpy' aarch64-linux-gnu-ld: drivers/tty/tty_io.c:1139: undefined reference to `stpcpy' aarch64-linux-gnu-ld: drivers/tty/tty_io.c:1139: undefined reference to `stpcpy' aarch64-linux-gnu-ld: drivers/gpu/drm/vc4/vc4_dsi.o: in function `dsi_dma_workaround_write': drivers/gpu/drm/vc4/vc4_dsi.c:581: undefined reference to `dma_sync_wait' aarch64-linux-gnu-ld: drivers/gpu/drm/vc4/vc4_dsi.c:581: undefined reference to `dma_sync_wait' aarch64-linux-gnu-ld: drivers/gpu/drm/vc4/vc4_dsi.c:581: undefined reference to `dma_sync_wait' a
Re: [PATCH v2 3/9] iommu/ioasid: Introduce ioasid_set APIs
Hi Jacob, I love your patch! Perhaps something to improve: [auto build test WARNING on iommu/next] [also build test WARNING on linux/master linus/master v5.9-rc1 next-20200821] [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/Jacob-Pan/IOASID-extensions-for-guest-SVA/20200822-123111 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: x86_64-allyesconfig (attached as .config) compiler: gcc-9 (Debian 9.3.0-15) 9.3.0 reproduce (this is a W=1 build): # save the attached .config to linux build tree make W=1 ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): drivers/iommu/ioasid.c: In function 'ioasid_get_capacity': >> drivers/iommu/ioasid.c:50:10: warning: old-style function definition >> [-Wold-style-definition] 50 | ioasid_t ioasid_get_capacity() | ^~~ drivers/iommu/ioasid.c: At top level: >> drivers/iommu/ioasid.c:577:6: warning: no previous prototype for >> 'ioasid_set_get' [-Wmissing-prototypes] 577 | void ioasid_set_get(struct ioasid_set *set) | ^~ # https://github.com/0day-ci/linux/commit/59b6f319b27588b2a8a0268a4f4f09f7be458861 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Jacob-Pan/IOASID-extensions-for-guest-SVA/20200822-123111 git checkout 59b6f319b27588b2a8a0268a4f4f09f7be458861 vim +50 drivers/iommu/ioasid.c 49 > 50 ioasid_t ioasid_get_capacity() 51 { 52 return ioasid_capacity; 53 } 54 EXPORT_SYMBOL_GPL(ioasid_get_capacity); 55 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH v2 5/9] iommu/ioasid: Introduce ioasid_set private ID
Hi Jacob, I love your patch! Yet something to improve: [auto build test ERROR on iommu/next] [also build test ERROR on linux/master linus/master v5.9-rc1 next-20200821] [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/Jacob-Pan/IOASID-extensions-for-guest-SVA/20200822-123111 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: mips-randconfig-r015-20200822 (attached as .config) compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project b587ca93be114d07ec3bf654add97d7872325281) 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 mips cross compiling tool for clang build # apt-get install binutils-mips-linux-gnu # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips 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/of/device.c:7: In file included from include/linux/of_iommu.h:6: In file included from include/linux/iommu.h:16: >> include/linux/ioasid.h:141:1: error: unknown type name 'staic'; did you mean >> 'static'? staic inline int ioasid_attach_spid(ioasid_t ioasid, ioasid_t spid) ^ static In file included from drivers/of/device.c:8: include/linux/dma-mapping.h:824:9: warning: implicit conversion from 'unsigned long long' to 'unsigned long' changes value from 18446744073709551615 to 4294967295 [-Wconstant-conversion] return DMA_BIT_MASK(32); ~~ ^~~~ include/linux/dma-mapping.h:139:40: note: expanded from macro 'DMA_BIT_MASK' #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) ^ 1 warning and 1 error generated. -- In file included from drivers/of/platform.c:20: In file included from include/linux/of_iommu.h:6: In file included from include/linux/iommu.h:16: >> include/linux/ioasid.h:141:1: error: unknown type name 'staic'; did you mean >> 'static'? staic inline int ioasid_attach_spid(ioasid_t ioasid, ioasid_t spid) ^ static 1 error generated. # https://github.com/0day-ci/linux/commit/09f31e901946399a274ce954bdefa4108e895b33 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Jacob-Pan/IOASID-extensions-for-guest-SVA/20200822-123111 git checkout 09f31e901946399a274ce954bdefa4108e895b33 vim +141 include/linux/ioasid.h 140 > 141 staic inline int ioasid_attach_spid(ioasid_t ioasid, ioasid_t spid) 142 { 143 return -ENOTSUPP; 144 } 145 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH v2 5/9] iommu/ioasid: Introduce ioasid_set private ID
Hi Jacob, I love your patch! Yet something to improve: [auto build test ERROR on iommu/next] [also build test ERROR on linux/master linus/master v5.9-rc1 next-20200821] [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/Jacob-Pan/IOASID-extensions-for-guest-SVA/20200822-123111 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: ia64-randconfig-r003-20200822 (attached as .config) compiler: ia64-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 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64 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 include/linux/iommu.h:16, from include/linux/of_iommu.h:6, from drivers/of/device.c:7: >> include/linux/ioasid.h:141:6: error: expected ';' before 'inline' 141 | staic inline int ioasid_attach_spid(ioasid_t ioasid, ioasid_t spid) | ^ | ; -- In file included from include/linux/iommu.h:16, from drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:34: >> include/linux/ioasid.h:141:6: error: expected ';' before 'inline' 141 | staic inline int ioasid_attach_spid(ioasid_t ioasid, ioasid_t spid) | ^ | ; drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:1094:5: warning: no previous prototype for 'amdgpu_ttm_gart_bind' [-Wmissing-prototypes] 1094 | int amdgpu_ttm_gart_bind(struct amdgpu_device *adev, | ^~~~ In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:55: drivers/gpu/drm/amd/amdgpu/amdgpu.h:190:18: warning: 'sched_policy' defined but not used [-Wunused-const-variable=] 190 | static const int sched_policy = KFD_SCHED_POLICY_HWS; | ^~~~ In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:33, from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30, from drivers/gpu/drm/amd/amdgpu/../include/dm_pp_interface.h:26, from drivers/gpu/drm/amd/amdgpu/amdgpu.h:65, from drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:55: drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:76:32: warning: 'dc_fixpt_ln2_div_2' defined but not used [-Wunused-const-variable=] 76 | static const struct fixed31_32 dc_fixpt_ln2_div_2 = { 1488522236LL }; |^~ drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:75:32: warning: 'dc_fixpt_ln2' defined but not used [-Wunused-const-variable=] 75 | static const struct fixed31_32 dc_fixpt_ln2 = { 2977044471LL }; |^~~~ drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:74:32: warning: 'dc_fixpt_e' defined but not used [-Wunused-const-variable=] 74 | static const struct fixed31_32 dc_fixpt_e = { 11674931555LL }; |^~ drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:73:32: warning: 'dc_fixpt_two_pi' defined but not used [-Wunused-const-variable=] 73 | static const struct fixed31_32 dc_fixpt_two_pi = { 26986075409LL }; |^~~ drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:72:32: warning: 'dc_fixpt_pi' defined but not used [-Wunused-const-variable=] 72 | static const struct fixed31_32 dc_fixpt_pi = { 13493037705LL }; |^~~ drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:67:32: warning: 'dc_fixpt_zero' defined but not used [-Wunused-const-variable=] 67 | static const struct fixed31_32 dc_fixpt_zero = { 0 }; |^ -- In file included from include/linux/iommu.h:16, from drivers/gpu/drm/nouveau/include/nvif/os.h:30, from drivers/gpu/drm/nouveau/include/nvkm/core/os.h:4, from drivers/gpu/drm/nouveau/include/nvkm/core/oclass.h:3, from drivers/gpu/drm/nouveau/include/nvkm/core/device.h:4, from drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h:4, from drivers/gpu/drm/nouveau/nvkm/nvfw/acr.c:22: >> include/linux/ioasid.h:141:6: error:
Re: [PATCH 1/2] Add new flush_iotlb_range and handle freelists when using iommu_unmap_fast
Hi Tom, Thank you for the patch! Yet something to improve: [auto build test ERROR on tegra/for-next] [also build test ERROR on vfio/next v5.9-rc1 next-20200817] [cannot apply to iommu/next] [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/Tom-Murphy/Add-new-flush_iotlb_range-and-handle-freelists-when-using-iommu_unmap_fast/20200818-052129 base: https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git for-next config: arm-allyesconfig (attached as .config) compiler: arm-linux-gnueabi-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 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): >> drivers/iommu/mtk_iommu_v1.c:526:12: error: initialization of 'size_t >> (*)(struct iommu_domain *, long unsigned int, size_t, struct >> iommu_iotlb_gather *, struct page **)' {aka 'unsigned int (*)(struct >> iommu_domain *, long unsigned int, unsigned int, struct iommu_iotlb_gather >> *, struct page **)'} from incompatible pointer type 'size_t (*)(struct >> iommu_domain *, long unsigned int, size_t, struct iommu_iotlb_gather *)' >> {aka 'unsigned int (*)(struct iommu_domain *, long unsigned int, unsigned >> int, struct iommu_iotlb_gather *)'} [-Werror=incompatible-pointer-types] 526 | .unmap = mtk_iommu_unmap, |^~~ drivers/iommu/mtk_iommu_v1.c:526:12: note: (near initialization for 'mtk_iommu_ops.unmap') cc1: some warnings being treated as errors # https://github.com/0day-ci/linux/commit/d64ecd192f5239ba9fbf8124e7b3069cb4145c47 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Tom-Murphy/Add-new-flush_iotlb_range-and-handle-freelists-when-using-iommu_unmap_fast/20200818-052129 git checkout d64ecd192f5239ba9fbf8124e7b3069cb4145c47 vim +526 drivers/iommu/mtk_iommu_v1.c b17336c55d8928 Honghui Zhang 2016-06-08 519 b65f501627fffc Arvind Yadav 2018-10-18 520 static const struct iommu_ops mtk_iommu_ops = { b17336c55d8928 Honghui Zhang 2016-06-08 521.domain_alloc = mtk_iommu_domain_alloc, b17336c55d8928 Honghui Zhang 2016-06-08 522.domain_free= mtk_iommu_domain_free, b17336c55d8928 Honghui Zhang 2016-06-08 523.attach_dev = mtk_iommu_attach_device, b17336c55d8928 Honghui Zhang 2016-06-08 524.detach_dev = mtk_iommu_detach_device, b17336c55d8928 Honghui Zhang 2016-06-08 525.map= mtk_iommu_map, b17336c55d8928 Honghui Zhang 2016-06-08 @526.unmap = mtk_iommu_unmap, b17336c55d8928 Honghui Zhang 2016-06-08 527.iova_to_phys = mtk_iommu_iova_to_phys, 57dbf81f50c82a Joerg Roedel 2020-04-29 528.probe_device = mtk_iommu_probe_device, 57dbf81f50c82a Joerg Roedel 2020-04-29 529.probe_finalize = mtk_iommu_probe_finalize, 57dbf81f50c82a Joerg Roedel 2020-04-29 530.release_device = mtk_iommu_release_device, 8bbe13f52cb796 Yong Wu 2020-05-15 531.def_domain_type = mtk_iommu_def_domain_type, 57dbf81f50c82a Joerg Roedel 2020-04-29 532.device_group = generic_device_group, b17336c55d8928 Honghui Zhang 2016-06-08 533.pgsize_bitmap = ~0UL << MT2701_IOMMU_PAGE_SHIFT, b17336c55d8928 Honghui Zhang 2016-06-08 534 }; b17336c55d8928 Honghui Zhang 2016-06-08 535 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH v3 2/2] dma-pool: Only allocate from CMA when in same memory zone
Hi Nicolas, I love your patch! Perhaps something to improve: [auto build test WARNING on iommu/next] [also build test WARNING on linus/master v5.8] [cannot apply to next-20200806] [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/Nicolas-Saenz-Julienne/dma-pool-fixes/20200807-025101 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: x86_64-randconfig-s031-20200806 (attached as .config) compiler: gcc-9 (Debian 9.3.0-15) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.2-117-g8c7aee71-dirty # save the attached .config to linux build tree make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>, old ones prefixed by <<): >> WARNING: modpost: vmlinux.o(.text+0x2840fa): Section mismatch in reference >> from the function atomic_pool_expand() to the function >> .meminit.text:memblock_start_of_DRAM() The function atomic_pool_expand() references the function __meminit memblock_start_of_DRAM(). This is often because atomic_pool_expand lacks a __meminit annotation or the annotation of memblock_start_of_DRAM is wrong. --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH] iommu/vt-d:Add support for ACPI device in RMRR
Hi FelixCuioc, Thank you for the patch! Yet something to improve: [auto build test ERROR on iommu/next] [also build test ERROR on linux/master linus/master v5.8-rc7 next-20200730] [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/FelixCuioc/iommu-vt-d-Add-support-for-ACPI-device-in-RMRR/20200728-182409 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: x86_64-randconfig-a014-20200731 (attached as .config) compiler: gcc-9 (Debian 9.3.0-14) 9.3.0 reproduce (this is a W=1 build): # save the attached .config to linux build tree make W=1 ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): ld: drivers/iommu/intel/dmar.o: in function `dmar_acpi_bus_add_dev': >> drivers/iommu/intel/dmar.c:745: undefined reference to >> `dmar_rmrr_add_acpi_dev' vim +745 drivers/iommu/intel/dmar.c 670 671 struct dmar_drhd_unit * 672 dmar_find_matched_drhd_unit(struct pci_dev *dev) 673 { 674 struct dmar_drhd_unit *dmaru; 675 struct acpi_dmar_hardware_unit *drhd; 676 677 dev = pci_physfn(dev); 678 679 rcu_read_lock(); 680 for_each_drhd_unit(dmaru) { 681 drhd = container_of(dmaru->hdr, 682 struct acpi_dmar_hardware_unit, 683 header); 684 685 if (dmaru->include_all && 686 drhd->segment == pci_domain_nr(dev->bus)) 687 goto out; 688 689 if (dmar_pci_device_match(dmaru->devices, 690dmaru->devices_cnt, dev)) 691 goto out; 692 } 693 dmaru = NULL; 694 out: 695 rcu_read_unlock(); 696 697 return dmaru; 698 } 699 int dmar_acpi_insert_dev_scope(u8 device_number, 700 struct acpi_device *adev, 701 void *start, void *end, 702 struct dmar_dev_scope *devices, 703 int devices_cnt) 704 { 705 struct acpi_dmar_device_scope *scope; 706 struct device *tmp; 707 int i; 708 struct acpi_dmar_pci_path *path; 709 710 for (; start < end; start += scope->length) { 711 scope = start; 712 if (scope->entry_type != ACPI_DMAR_SCOPE_TYPE_NAMESPACE) 713 continue; 714 if (scope->enumeration_id != device_number) 715 continue; 716 path = (void *)(scope + 1); 717 for_each_dev_scope(devices, devices_cnt, i, tmp) 718 if (tmp == NULL) { 719 devices[i].bus = scope->bus; 720 devices[i].devfn = PCI_DEVFN(path->device, path->function); 721 rcu_assign_pointer(devices[i].dev, 722 get_device(&adev->dev)); 723 return 1; 724 } 725 WARN_ON(i >= devices_cnt); 726 } 727 return 0; 728 } 729 static int dmar_acpi_bus_add_dev(u8 device_number, struct acpi_device *adev) 730 { 731 struct dmar_drhd_unit *dmaru; 732 struct acpi_dmar_hardware_unit *drhd; 733 int ret = 0; 734 735 for_each_drhd_unit(dmaru) { 736 drhd = container_of(dmaru->hdr, 737 struct acpi_dmar_hardware_unit, 738 header); 739 ret = dmar_acpi_insert_dev_scope(device_number, adev, (void *)(drhd+1), 740 ((void *)drhd)+drhd->header.length, 741 dmaru->devices, dmaru->devices_cnt); 742 if (ret) 743 break; 744 } > 745 ret = dmar_rmrr_add_acpi_dev(device_number, adev); 746 747 return ret; 748 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH] PCI/ATS: PASID and PRI are only enumerated in PF devices.
Hi Ashok, Thank you for the patch! Yet something to improve: [auto build test ERROR on pci/next] [also build test ERROR on iommu/next linux/master linus/master v5.8-rc6 next-20200720] [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/Ashok-Raj/PCI-ATS-PASID-and-PRI-are-only-enumerated-in-PF-devices/20200721-004510 base: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next config: arm64-defconfig (attached as .config) compiler: aarch64-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 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All error/warnings (new ones prefixed by >>): >> drivers/pci/ats.c:471:6: warning: no previous prototype for >> 'pci_pri_supported' [-Wmissing-prototypes] 471 | bool pci_pri_supported(struct pci_dev *pdev) | ^ drivers/pci/ats.c: In function 'pci_pri_supported': >> drivers/pci/ats.c:474:30: error: 'struct pci_dev' has no member named >> 'pri_cap'; did you mean 'pcie_cap'? 474 | return !!(pci_physfn(pdev)->pri_cap); | ^~~ | pcie_cap >> drivers/pci/ats.c:475:1: warning: control reaches end of non-void function >> [-Wreturn-type] 475 | } | ^ vim +474 drivers/pci/ats.c 463 464 /** 465 * pci_pri_supported - Check if PRI is supported. 466 * @pdev: PCI device structure 467 * 468 * Returns false when no PRI capability is present. 469 * Returns true if PRI feature is supported and enabled 470 */ > 471 bool pci_pri_supported(struct pci_dev *pdev) 472 { 473 /* VFs share the PF PRI configuration */ > 474 return !!(pci_physfn(pdev)->pri_cap); > 475 } 476 EXPORT_SYMBOL_GPL(pci_pri_supported); 477 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH] PCI/ATS: PASID and PRI are only enumerated in PF devices.
Hi Ashok, Thank you for the patch! Yet something to improve: [auto build test ERROR on pci/next] [also build test ERROR on iommu/next linux/master linus/master v5.8-rc6 next-20200720] [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/Ashok-Raj/PCI-ATS-PASID-and-PRI-are-only-enumerated-in-PF-devices/20200721-004510 base: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next config: x86_64-kexec (attached as .config) compiler: gcc-9 (Debian 9.3.0-14) 9.3.0 reproduce (this is a W=1 build): # save the attached .config to linux build tree make W=1 ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): drivers/iommu/intel/iommu.c: In function 'dmar_insert_one_dev_info': >> drivers/iommu/intel/iommu.c:2557:8: error: implicit declaration of function >> 'pci_pri_supported'; did you mean 'pci_ats_supported'? >> [-Werror=implicit-function-declaration] 2557 |pci_pri_supported(pdev)) |^ |pci_ats_supported cc1: some warnings being treated as errors vim +2557 drivers/iommu/intel/iommu.c 2504 2505 static struct dmar_domain *dmar_insert_one_dev_info(struct intel_iommu *iommu, 2506 int bus, int devfn, 2507 struct device *dev, 2508 struct dmar_domain *domain) 2509 { 2510 struct dmar_domain *found = NULL; 2511 struct device_domain_info *info; 2512 unsigned long flags; 2513 int ret; 2514 2515 info = alloc_devinfo_mem(); 2516 if (!info) 2517 return NULL; 2518 2519 if (!dev_is_real_dma_subdevice(dev)) { 2520 info->bus = bus; 2521 info->devfn = devfn; 2522 info->segment = iommu->segment; 2523 } else { 2524 struct pci_dev *pdev = to_pci_dev(dev); 2525 2526 info->bus = pdev->bus->number; 2527 info->devfn = pdev->devfn; 2528 info->segment = pci_domain_nr(pdev->bus); 2529 } 2530 2531 info->ats_supported = info->pasid_supported = info->pri_supported = 0; 2532 info->ats_enabled = info->pasid_enabled = info->pri_enabled = 0; 2533 info->ats_qdep = 0; 2534 info->dev = dev; 2535 info->domain = domain; 2536 info->iommu = iommu; 2537 info->pasid_table = NULL; 2538 info->auxd_enabled = 0; 2539 INIT_LIST_HEAD(&info->auxiliary_domains); 2540 2541 if (dev && dev_is_pci(dev)) { 2542 struct pci_dev *pdev = to_pci_dev(info->dev); 2543 2544 if (ecap_dev_iotlb_support(iommu->ecap) && 2545 pci_ats_supported(pdev) && 2546 dmar_find_matched_atsr_unit(pdev)) 2547 info->ats_supported = 1; 2548 2549 if (sm_supported(iommu)) { 2550 if (pasid_supported(iommu)) { 2551 int features = pci_pasid_features(pdev); 2552 if (features >= 0) 2553 info->pasid_supported = features | 1; 2554 } 2555 2556 if (info->ats_supported && ecap_prs(iommu->ecap) && > 2557 pci_pri_supported(pdev)) 2558 info->pri_supported = 1; 2559 } 2560 } 2561 2562 spin_lock_irqsave(&device_domain_lock, flags); 2563 if (dev) 2564 found = find_domain(dev); 2565 2566 if (!found) { 2567 struct device_domain_info *info2; 2568 info2 = dmar_search_domain_by_dev_info(info->segment, info->bus, 2569 info->devfn); 2570 if (info2) { 2571 found = info2->domain; 2572 info2->dev = dev; 2573 } 2574 } 2575 2576 if (found) { 2577 spin_unlock_irqrestore(&device_domain_lock, flags); 2578 free_devinfo_mem(info); 2579
Re: [PATCH 1/5] iommu/arm-smmu: Make all valid stream mappings BYPASS
Hi Bjorn, I love your patch! Perhaps something to improve: [auto build test WARNING on iommu/next] [also build test WARNING on arm-perf/for-next/perf v5.8-rc5 next-20200715] [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/Bjorn-Andersson/iommu-arm-smmu-Support-maintaining-bootloader-mappings/20200709-130417 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: arm64-randconfig-r022-20200715 (attached as .config) compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 02946de3802d3bc65bc9f2eb9b8d4969b5a7add8) 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 arm64 cross compiling tool for clang build # apt-get install binutils-aarch64-linux-gnu # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> drivers/iommu/arm-smmu.c:1927:5: warning: no previous prototype for function >> 'arm_smmu_setup_identity' [-Wmissing-prototypes] int arm_smmu_setup_identity(struct arm_smmu_device *smmu) ^ drivers/iommu/arm-smmu.c:1927:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int arm_smmu_setup_identity(struct arm_smmu_device *smmu) ^ static 1 warning generated. vim +/arm_smmu_setup_identity +1927 drivers/iommu/arm-smmu.c 1926 > 1927 int arm_smmu_setup_identity(struct arm_smmu_device *smmu) 1928 { 1929 int i; 1930 1931 for (i = 0; i < smmu->num_mapping_groups; i++) { 1932 if (smmu->smrs[i].valid) { 1933 smmu->s2crs[i].type = S2CR_TYPE_BYPASS; 1934 smmu->s2crs[i].privcfg = S2CR_PRIVCFG_DEFAULT; 1935 smmu->s2crs[i].cbndx = 0xff; 1936 smmu->s2crs[i].count++; 1937 } 1938 } 1939 1940 return 0; 1941 } 1942 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
[iommu:core 18/19] drivers/iommu/exynos-iommu.c:724:20: error: conflicting types for 'update_pte'
Hi Robin, First bad commit (maybe != root cause): tree: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git core head: 97215a7df4351fdd9141418568be872fb1032d6e commit: b4ceb4a5359ed1c9ba4a20acf3a70d4bbead3248 [18/19] iommu: Tidy up Kconfig for SoC IOMMUs config: xtensa-allyesconfig (attached as .config) compiler: xtensa-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 git checkout b4ceb4a5359ed1c9ba4a20acf3a70d4bbead3248 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa 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 include/linux/err.h:5, from include/linux/clk.h:12, from drivers/iommu/exynos-iommu.c:11: include/linux/scatterlist.h: In function 'sg_set_buf': arch/xtensa/include/asm/page.h:193:9: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] 193 | ((pfn) >= ARCH_PFN_OFFSET && ((pfn) - ARCH_PFN_OFFSET) < max_mapnr) | ^~ include/linux/compiler.h:78:42: note: in definition of macro 'unlikely' 78 | # define unlikely(x) __builtin_expect(!!(x), 0) | ^ include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON' 143 | BUG_ON(!virt_addr_valid(buf)); | ^~ arch/xtensa/include/asm/page.h:201:32: note: in expansion of macro 'pfn_valid' 201 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) |^ include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid' 143 | BUG_ON(!virt_addr_valid(buf)); | ^~~ In file included from ./arch/xtensa/include/generated/asm/bug.h:1, from include/linux/bug.h:5, from include/linux/thread_info.h:12, from arch/xtensa/include/asm/current.h:18, from include/linux/mutex.h:14, from include/linux/notifier.h:14, from include/linux/clk.h:14, from drivers/iommu/exynos-iommu.c:11: include/linux/dma-mapping.h: In function 'dma_map_resource': arch/xtensa/include/asm/page.h:193:9: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] 193 | ((pfn) >= ARCH_PFN_OFFSET && ((pfn) - ARCH_PFN_OFFSET) < max_mapnr) | ^~ include/asm-generic/bug.h:144:27: note: in definition of macro 'WARN_ON_ONCE' 144 | int __ret_warn_once = !!(condition); \ | ^ include/linux/dma-mapping.h:352:19: note: in expansion of macro 'pfn_valid' 352 | if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr | ^ drivers/iommu/exynos-iommu.c: At top level: >> drivers/iommu/exynos-iommu.c:724:20: error: conflicting types for >> 'update_pte' 724 | static inline void update_pte(sysmmu_pte_t *ent, sysmmu_pte_t val) |^~ In file included from include/linux/pgtable.h:6, from include/linux/mm.h:32, from include/linux/scatterlist.h:8, from include/linux/dma-mapping.h:11, from drivers/iommu/exynos-iommu.c:12: arch/xtensa/include/asm/pgtable.h:306:20: note: previous definition of 'update_pte' was here 306 | static inline void update_pte(pte_t *ptep, pte_t pteval) |^~ vim +/update_pte +724 drivers/iommu/exynos-iommu.c 2a96536e77b43c KyongHo Cho 2012-05-12 723 5e3435eb7e1d8c Marek Szyprowski 2016-02-18 @724 static inline void update_pte(sysmmu_pte_t *ent, sysmmu_pte_t val) 2a96536e77b43c KyongHo Cho 2012-05-12 725 { 5e3435eb7e1d8c Marek Szyprowski 2016-02-18 726 dma_sync_single_for_cpu(dma_dev, virt_to_phys(ent), sizeof(*ent), 5e3435eb7e1d8c Marek Szyprowski 2016-02-18 727 DMA_TO_DEVICE); 6ae5343c26f9cb Ben Dooks2016-06-08 728 *ent = cpu_to_le32(val); 5e3435eb7e1d8c Marek Szyprowski 2016-02-18 729 dma_sync_single_for_device(dma_dev, virt_to_phys(ent), sizeof(*ent), 5e3435eb7e1d8c Marek Szyprowski 2016-02-18 730 DMA_TO_DEVICE); 2a96536e77b43c KyongHo Cho 2012-05-12 731 } 2a96536e77b43c KyongHo Cho 2012-05-12 732 :: The code at line 724 was first introduced by commit :: 5e3435eb7e1d8c9431254f5e0053
Re: [PATCH 1/5] iommu/arm-smmu: Make all valid stream mappings BYPASS
Hi Bjorn, I love your patch! Perhaps something to improve: [auto build test WARNING on iommu/next] [also build test WARNING on arm-perf/for-next/perf v5.8-rc5 next-20200713] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Bjorn-Andersson/iommu-arm-smmu-Support-maintaining-bootloader-mappings/20200709-130417 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: x86_64-randconfig-s021-20200713 (attached as .config) compiler: gcc-9 (Debian 9.3.0-14) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.2-37-gc9676a3b-dirty # save the attached .config to linux build tree make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) >> drivers/iommu/arm-smmu.c:1927:5: sparse: sparse: symbol >> 'arm_smmu_setup_identity' was not declared. Should it be static? Please review and possibly fold the followup patch. --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
[RFC PATCH] iommu/arm-smmu: arm_smmu_setup_identity() can be static
Signed-off-by: kernel test robot --- arm-smmu.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index 2e27cf9815ab6..fb85e716ae9ac 100644 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c @@ -1924,7 +1924,7 @@ static int arm_smmu_device_cfg_probe(struct arm_smmu_device *smmu) return 0; } -int arm_smmu_setup_identity(struct arm_smmu_device *smmu) +static int arm_smmu_setup_identity(struct arm_smmu_device *smmu) { int i; ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu