[peterz-queue:x86/module 3/5] module.c:undefined reference to `split_lock_enabled'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git x86/module
head: 1038d7016fbe79920f08d4cd2a8c0d6b9808732b
commit: 48cd170aa2223a0d70f4193377922e353ad27767 [3/5] x86,module: Detect VMX vs SLD conflicts
config: um-defconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
git checkout 48cd170aa2223a0d70f4193377922e353ad27767
# save the attached .config to linux build tree
make W=1 ARCH=um
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
/usr/bin/ld: arch/x86/um/../kernel/module.o: in function `decode_module':
>> module.c:(.text+0x26): undefined reference to `split_lock_enabled'
>> /usr/bin/ld: module.c:(.text+0x39): undefined reference to `insn_init'
/usr/bin/ld: module.c:(.text+0x6b): undefined reference to `insn_get_length'
/usr/bin/ld: module.c:(.text+0x162): undefined reference to `insn_get_prefixes'
collect2: error: ld returned 1 exit status
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
gcc-5: error: -gz is not supported in this configuration
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: abfbb29297c27e3f101f348dc9e467b0fe70f919
commit: 10e68b02c861ccf2b3adb59d3f0c10dc6b5e3ace Makefile: support compressed debug info
date: 12 days ago
config: x86_64-randconfig-r032-20200609 (attached as .config)
compiler: gcc-5 (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010
reproduce (this is a W=1 build):
git checkout 10e68b02c861ccf2b3adb59d3f0c10dc6b5e3ace
# 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 <lkp(a)intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
>> gcc-5: error: -gz is not supported in this configuration
make[2]: *** [scripts/Makefile.build:277: scripts/mod/empty.o] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1169: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:185: __sub-make] Error 2
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[zen-kernel-zen-kernel:5.7/muqss 2/16] kernel/time/hrtimer.c:2224:14: error: redefinition of 'schedule_msec_hrtimeout'
by kernel test robot
tree: https://github.com/zen-kernel/zen-kernel 5.7/muqss
head: 4567060b2f5ff28fb444b38edc2122aff6aa34ce
commit: 18310cf2933b45209c1b9a4735c0efff9141e813 [2/16] Create highres timeout variants of schedule_timeout functions.
config: i386-tinyconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
git checkout 18310cf2933b45209c1b9a4735c0efff9141e813
# 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 <lkp(a)intel.com>
Note: the zen-kernel-zen-kernel/5.7/muqss HEAD 4567060b2f5ff28fb444b38edc2122aff6aa34ce builds fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>, old ones prefixed by <<):
kernel/time/hrtimer.c:120:21: warning: initialized field overwritten [-Woverride-init]
120 | [CLOCK_REALTIME] = HRTIMER_BASE_REALTIME,
| ^~~~~~~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:120:21: note: (near initialization for 'hrtimer_clock_to_base_table[0]')
kernel/time/hrtimer.c:121:22: warning: initialized field overwritten [-Woverride-init]
121 | [CLOCK_MONOTONIC] = HRTIMER_BASE_MONOTONIC,
| ^~~~~~~~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:121:22: note: (near initialization for 'hrtimer_clock_to_base_table[1]')
kernel/time/hrtimer.c:122:21: warning: initialized field overwritten [-Woverride-init]
122 | [CLOCK_BOOTTIME] = HRTIMER_BASE_BOOTTIME,
| ^~~~~~~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:122:21: note: (near initialization for 'hrtimer_clock_to_base_table[7]')
kernel/time/hrtimer.c:123:17: warning: initialized field overwritten [-Woverride-init]
123 | [CLOCK_TAI] = HRTIMER_BASE_TAI,
| ^~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:123:17: note: (near initialization for 'hrtimer_clock_to_base_table[11]')
kernel/time/hrtimer.c: In function '__run_hrtimer':
kernel/time/hrtimer.c:1483:7: warning: variable 'expires_in_hardirq' set but not used [-Wunused-but-set-variable]
1483 | bool expires_in_hardirq;
| ^~~~~~~~~~~~~~~~~~
kernel/time/hrtimer.c: At top level:
>> kernel/time/hrtimer.c:2224:14: error: redefinition of 'schedule_msec_hrtimeout'
2224 | long __sched schedule_msec_hrtimeout(long timeout)
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/ratelimit.h:6,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from include/linux/node.h:18,
from include/linux/cpu.h:17,
from kernel/time/hrtimer.c:25:
include/linux/sched.h:233:20: note: previous definition of 'schedule_msec_hrtimeout' was here
233 | static inline long schedule_msec_hrtimeout(long timeout)
| ^~~~~~~~~~~~~~~~~~~~~~~
>> kernel/time/hrtimer.c:2268:14: error: redefinition of 'schedule_min_hrtimeout'
2268 | long __sched schedule_min_hrtimeout(void)
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/ratelimit.h:6,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from include/linux/node.h:18,
from include/linux/cpu.h:17,
from kernel/time/hrtimer.c:25:
include/linux/sched.h:238:20: note: previous definition of 'schedule_min_hrtimeout' was here
238 | static inline long schedule_min_hrtimeout(void)
| ^~~~~~~~~~~~~~~~~~~~~~
>> kernel/time/hrtimer.c:2275:14: error: redefinition of 'schedule_msec_hrtimeout_interruptible'
2275 | long __sched schedule_msec_hrtimeout_interruptible(long timeout)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/ratelimit.h:6,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from include/linux/node.h:18,
from include/linux/cpu.h:17,
from kernel/time/hrtimer.c:25:
include/linux/sched.h:243:20: note: previous definition of 'schedule_msec_hrtimeout_interruptible' was here
243 | static inline long schedule_msec_hrtimeout_interruptible(long timeout)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/time/hrtimer.c:2282:14: error: redefinition of 'schedule_msec_hrtimeout_uninterruptible'
2282 | long __sched schedule_msec_hrtimeout_uninterruptible(long timeout)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/ratelimit.h:6,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from include/linux/node.h:18,
from include/linux/cpu.h:17,
from kernel/time/hrtimer.c:25:
include/linux/sched.h:248:20: note: previous definition of 'schedule_msec_hrtimeout_uninterruptible' was here
248 | static inline long schedule_msec_hrtimeout_uninterruptible(long timeout)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/schedule_msec_hrtimeout +2224 kernel/time/hrtimer.c
2219
2220 /*
2221 * As per schedule_hrtimeout but taskes a millisecond value and returns how
2222 * many milliseconds are left.
2223 */
> 2224 long __sched schedule_msec_hrtimeout(long timeout)
2225 {
2226 struct hrtimer_sleeper t;
2227 int delta, secs, jiffs;
2228 ktime_t expires;
2229
2230 if (!timeout) {
2231 __set_current_state(TASK_RUNNING);
2232 return 0;
2233 }
2234
2235 jiffs = msecs_to_jiffies(timeout);
2236 /*
2237 * If regular timer resolution is adequate or hrtimer resolution is not
2238 * (yet) better than Hz, as would occur during startup, use regular
2239 * timers.
2240 */
2241 if (jiffs > 4 || hrtimer_resolution >= NSEC_PER_SEC / HZ)
2242 return schedule_timeout(jiffs);
2243
2244 secs = timeout / 1000;
2245 delta = (timeout % 1000) * NSEC_PER_MSEC;
2246 expires = ktime_set(secs, delta);
2247
2248 hrtimer_init_sleeper_on_stack(&t, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
2249 hrtimer_set_expires_range_ns(&t.timer, expires, delta);
2250
2251 hrtimer_sleeper_start_expires(&t, HRTIMER_MODE_REL);
2252
2253 if (likely(t.task))
2254 schedule();
2255
2256 hrtimer_cancel(&t.timer);
2257 destroy_hrtimer_on_stack(&t.timer);
2258
2259 __set_current_state(TASK_RUNNING);
2260
2261 expires = hrtimer_expires_remaining(&t.timer);
2262 timeout = ktime_to_ms(expires);
2263 return timeout < 0 ? 0 : timeout;
2264 }
2265
2266 EXPORT_SYMBOL(schedule_msec_hrtimeout);
2267
> 2268 long __sched schedule_min_hrtimeout(void)
2269 {
2270 return schedule_msec_hrtimeout(1);
2271 }
2272
2273 EXPORT_SYMBOL(schedule_min_hrtimeout);
2274
> 2275 long __sched schedule_msec_hrtimeout_interruptible(long timeout)
2276 {
2277 __set_current_state(TASK_INTERRUPTIBLE);
2278 return schedule_msec_hrtimeout(timeout);
2279 }
2280 EXPORT_SYMBOL(schedule_msec_hrtimeout_interruptible);
2281
> 2282 long __sched schedule_msec_hrtimeout_uninterruptible(long timeout)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[peterz-queue:modules/WIP 22/23] kernel/module.c:1036: undefined reference to `ftrace_module_release'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git modules/WIP
head: f5c11619431a2710b5d96883d3aeff708b7e8557
commit: b07aec8a443f228fe79cd4dbeae1c69ab406336e [22/23] ftrace: Merge ftrace_module_{init,enable}()
config: arm-randconfig-r003-20200608 (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
git checkout b07aec8a443f228fe79cd4dbeae1c69ab406336e
# 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 <lkp(a)intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
arm-linux-gnueabi-ld: kernel/module.o: in function `__do_sys_delete_module':
>> kernel/module.c:1036: undefined reference to `ftrace_module_release'
arm-linux-gnueabi-ld: kernel/module.o: in function `do_init_module':
kernel/module.c:3648: undefined reference to `ftrace_module_release'
arm-linux-gnueabi-ld: kernel/module.o: in function `load_module':
kernel/module.c:3943: undefined reference to `ftrace_module_release'
arm-linux-gnueabi-ld: lib/crypto/chacha20poly1305.o: in function `chacha_init':
include/crypto/chacha.h:78: undefined reference to `chacha_init_arch'
arm-linux-gnueabi-ld: lib/crypto/chacha20poly1305.o: in function `hchacha_block':
include/crypto/chacha.h:49: undefined reference to `hchacha_block_arch'
arm-linux-gnueabi-ld: lib/crypto/chacha20poly1305.o: in function `chacha_init':
include/crypto/chacha.h:78: undefined reference to `chacha_init_arch'
arm-linux-gnueabi-ld: lib/crypto/chacha20poly1305.o: in function `chacha_crypt':
include/crypto/chacha.h:92: undefined reference to `chacha_crypt_arch'
arm-linux-gnueabi-ld: include/crypto/chacha.h:92: undefined reference to `chacha_crypt_arch'
arm-linux-gnueabi-ld: lib/crypto/chacha20poly1305.o: in function `chacha_init':
include/crypto/chacha.h:78: undefined reference to `chacha_init_arch'
arm-linux-gnueabi-ld: lib/crypto/chacha20poly1305.o: in function `chacha_crypt':
include/crypto/chacha.h:92: undefined reference to `chacha_crypt_arch'
arm-linux-gnueabi-ld: include/crypto/chacha.h:92: undefined reference to `chacha_crypt_arch'
arm-linux-gnueabi-ld: lib/crypto/chacha20poly1305.o: in function `chacha_init':
include/crypto/chacha.h:78: undefined reference to `chacha_init_arch'
arm-linux-gnueabi-ld: lib/crypto/chacha20poly1305.o: in function `chacha_crypt':
include/crypto/chacha.h:92: undefined reference to `chacha_crypt_arch'
arm-linux-gnueabi-ld: include/crypto/chacha.h:92: undefined reference to `chacha_crypt_arch'
arm-linux-gnueabi-ld: lib/crypto/chacha20poly1305.o: in function `chacha_init':
include/crypto/chacha.h:78: undefined reference to `chacha_init_arch'
arm-linux-gnueabi-ld: lib/crypto/chacha20poly1305.o: in function `chacha_crypt':
include/crypto/chacha.h:92: undefined reference to `chacha_crypt_arch'
vim +1036 kernel/module.c
972
973 SYSCALL_DEFINE2(delete_module, const char __user *, name_user,
974 unsigned int, flags)
975 {
976 struct module *mod;
977 char name[MODULE_NAME_LEN];
978 int ret, forced = 0;
979
980 if (!capable(CAP_SYS_MODULE) || modules_disabled)
981 return -EPERM;
982
983 if (strncpy_from_user(name, name_user, MODULE_NAME_LEN-1) < 0)
984 return -EFAULT;
985 name[MODULE_NAME_LEN-1] = '\0';
986
987 audit_log_kern_module(name);
988
989 if (mutex_lock_interruptible(&module_mutex) != 0)
990 return -EINTR;
991
992 mod = find_module(name);
993 if (!mod) {
994 ret = -ENOENT;
995 goto out;
996 }
997
998 if (!list_empty(&mod->source_list)) {
999 /* Other modules depend on us: get rid of them first. */
1000 ret = -EWOULDBLOCK;
1001 goto out;
1002 }
1003
1004 /* Doing init or already dying? */
1005 if (mod->state != MODULE_STATE_LIVE) {
1006 /* FIXME: if (force), slam module count damn the torpedoes */
1007 pr_debug("%s already dying\n", mod->name);
1008 ret = -EBUSY;
1009 goto out;
1010 }
1011
1012 /* If it has an init func, it must have an exit func to unload */
1013 if (mod->init && !mod->exit) {
1014 forced = try_force_unload(flags);
1015 if (!forced) {
1016 /* This module can't be removed */
1017 ret = -EBUSY;
1018 goto out;
1019 }
1020 }
1021
1022 /* Stop the machine so refcounts can't move and disable module. */
1023 ret = try_stop_module(mod, flags, &forced);
1024 if (ret != 0)
1025 goto out;
1026
1027 mutex_unlock(&module_mutex);
1028 /* Final destruction now no one is using it. */
1029 if (mod->exit != NULL)
1030 mod->exit();
1031 blocking_notifier_call_chain(&module_notify_list,
1032 MODULE_STATE_GOING, mod);
1033 klp_module_going(mod);
1034 blocking_notifier_call_chain(&module_notify_list,
1035 MODULE_STATE_GONE, mod);
> 1036 ftrace_module_release(mod);
1037
1038 async_synchronize_full();
1039
1040 /* Store the name of the last unloaded module for diagnostic purposes */
1041 strlcpy(last_unloaded_module, mod->name, sizeof(last_unloaded_module));
1042
1043 free_module(mod);
1044 /* someone could wait for the module in add_unformed_module() */
1045 wake_up_all(&module_wq);
1046 return 0;
1047 out:
1048 mutex_unlock(&module_mutex);
1049 return ret;
1050 }
1051
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [PATCH v2 1/2] iommu/amd: Move AMD IOMMU driver into subdirectory
by kernel test robot
Hi Joerg,
I love your patch! Perhaps something to improve:
[auto build test WARNING on iommu/next]
[also build test WARNING on linus/master next-20200609]
[cannot apply to v5.7]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Joerg-Roedel/iommu-Move-Intel-an...
base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: x86_64-randconfig-r026-20200607 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project bc2b70982be8f5250cd0082a7190f8b417bd4dfe)
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
# 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 <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
>> drivers/iommu/amd/init.c:3073:19: warning: no previous prototype for function 'get_amd_iommu' [-Wmissing-prototypes]
struct amd_iommu *get_amd_iommu(unsigned int idx)
^
drivers/iommu/amd/init.c:3073:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
struct amd_iommu *get_amd_iommu(unsigned int idx)
^
static
>> drivers/iommu/amd/init.c:3092:4: warning: no previous prototype for function 'amd_iommu_pc_get_max_banks' [-Wmissing-prototypes]
u8 amd_iommu_pc_get_max_banks(unsigned int idx)
^
drivers/iommu/amd/init.c:3092:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
u8 amd_iommu_pc_get_max_banks(unsigned int idx)
^
static
>> drivers/iommu/amd/init.c:3103:6: warning: no previous prototype for function 'amd_iommu_pc_supported' [-Wmissing-prototypes]
bool amd_iommu_pc_supported(void)
^
drivers/iommu/amd/init.c:3103:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
bool amd_iommu_pc_supported(void)
^
static
>> drivers/iommu/amd/init.c:3109:4: warning: no previous prototype for function 'amd_iommu_pc_get_max_counters' [-Wmissing-prototypes]
u8 amd_iommu_pc_get_max_counters(unsigned int idx)
^
drivers/iommu/amd/init.c:3109:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
u8 amd_iommu_pc_get_max_counters(unsigned int idx)
^
static
>> drivers/iommu/amd/init.c:3158:5: warning: no previous prototype for function 'amd_iommu_pc_get_reg' [-Wmissing-prototypes]
int amd_iommu_pc_get_reg(struct amd_iommu *iommu, u8 bank, u8 cntr, u8 fxn, u64 *value)
^
drivers/iommu/amd/init.c:3158:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int amd_iommu_pc_get_reg(struct amd_iommu *iommu, u8 bank, u8 cntr, u8 fxn, u64 *value)
^
static
>> drivers/iommu/amd/init.c:3167:5: warning: no previous prototype for function 'amd_iommu_pc_set_reg' [-Wmissing-prototypes]
int amd_iommu_pc_set_reg(struct amd_iommu *iommu, u8 bank, u8 cntr, u8 fxn, u64 *value)
^
drivers/iommu/amd/init.c:3167:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int amd_iommu_pc_set_reg(struct amd_iommu *iommu, u8 bank, u8 cntr, u8 fxn, u64 *value)
^
static
6 warnings generated.
vim +/get_amd_iommu +3073 drivers/iommu/amd/init.c
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3072
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 @3073 struct amd_iommu *get_amd_iommu(unsigned int idx)
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3074 {
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3075 unsigned int i = 0;
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3076 struct amd_iommu *iommu;
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3077
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3078 for_each_iommu(iommu)
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3079 if (i++ == idx)
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3080 return iommu;
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3081 return NULL;
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3082 }
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3083 EXPORT_SYMBOL(get_amd_iommu);
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3084
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3085 /****************************************************************************
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3086 *
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3087 * IOMMU EFR Performance Counter support functionality. This code allows
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3088 * access to the IOMMU PC functionality.
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3089 *
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3090 ****************************************************************************/
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3091
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 @3092 u8 amd_iommu_pc_get_max_banks(unsigned int idx)
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3093 {
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3094 struct amd_iommu *iommu = get_amd_iommu(idx);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3095
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3096 if (iommu)
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3097 return iommu->max_banks;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3098
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3099 return 0;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3100 }
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3101 EXPORT_SYMBOL(amd_iommu_pc_get_max_banks);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3102
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 @3103 bool amd_iommu_pc_supported(void)
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3104 {
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3105 return amd_iommu_pc_present;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3106 }
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3107 EXPORT_SYMBOL(amd_iommu_pc_supported);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3108
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 @3109 u8 amd_iommu_pc_get_max_counters(unsigned int idx)
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3110 {
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3111 struct amd_iommu *iommu = get_amd_iommu(idx);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3112
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3113 if (iommu)
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3114 return iommu->max_counters;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3115
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3116 return 0;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3117 }
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3118 EXPORT_SYMBOL(amd_iommu_pc_get_max_counters);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3119
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3120 static int iommu_pc_get_set_reg(struct amd_iommu *iommu, u8 bank, u8 cntr,
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3121 u8 fxn, u64 *value, bool is_write)
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3122 {
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3123 u32 offset;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3124 u32 max_offset_lim;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3125
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3126 /* Make sure the IOMMU PC resource is available */
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3127 if (!amd_iommu_pc_present)
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3128 return -ENODEV;
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3129
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3130 /* Check for valid iommu and pc register indexing */
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3131 if (WARN_ON(!iommu || (fxn > 0x28) || (fxn & 7)))
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3132 return -ENODEV;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3133
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3134 offset = (u32)(((0x40 | bank) << 12) | (cntr << 8) | fxn);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3135
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3136 /* Limit the offset to the hw defined mmio region aperture */
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3137 max_offset_lim = (u32)(((0x40 | iommu->max_banks) << 12) |
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3138 (iommu->max_counters << 8) | 0x28);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3139 if ((offset < MMIO_CNTR_REG_OFFSET) ||
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3140 (offset > max_offset_lim))
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3141 return -EINVAL;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3142
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3143 if (is_write) {
0a6d80c70b9150 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3144 u64 val = *value & GENMASK_ULL(47, 0);
0a6d80c70b9150 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3145
0a6d80c70b9150 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3146 writel((u32)val, iommu->mmio_base + offset);
0a6d80c70b9150 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3147 writel((val >> 32), iommu->mmio_base + offset + 4);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3148 } else {
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3149 *value = readl(iommu->mmio_base + offset + 4);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3150 *value <<= 32;
0a6d80c70b9150 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3151 *value |= readl(iommu->mmio_base + offset);
0a6d80c70b9150 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3152 *value &= GENMASK_ULL(47, 0);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3153 }
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3154
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3155 return 0;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3156 }
38e45d02ea9f19 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2016-02-23 3157
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 @3158 int amd_iommu_pc_get_reg(struct amd_iommu *iommu, u8 bank, u8 cntr, u8 fxn, u64 *value)
38e45d02ea9f19 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2016-02-23 3159 {
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3160 if (!iommu)
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3161 return -EINVAL;
38e45d02ea9f19 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2016-02-23 3162
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3163 return iommu_pc_get_set_reg(iommu, bank, cntr, fxn, value, false);
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3164 }
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3165 EXPORT_SYMBOL(amd_iommu_pc_get_reg);
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3166
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 @3167 int amd_iommu_pc_set_reg(struct amd_iommu *iommu, u8 bank, u8 cntr, u8 fxn, u64 *value)
:::::: The code at line 3073 was first introduced by commit
:::::: f5863a00e73c432b91e4efe1d68778b4ace6a892 x86/events/amd/iommu.c: Modify functions to query max banks and counters
:::::: TO: Suravee Suthikulpanit <Suravee.Suthikulpanit(a)amd.com>
:::::: CC: Ingo Molnar <mingo(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [PATCH 1/3] usb: typec: Add QCOM PMIC typec detection driver
by kernel test robot
Hi Wesley,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on usb/usb-testing]
[also build test ERROR on robh/for-next v5.7 next-20200609]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Wesley-Cheng/Introduce-PMIC-base...
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
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 <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>, old ones prefixed by <<):
>> drivers/usb/typec/qcom-pmic-typec.c:86:6: warning: no previous prototype for 'qcom_pmic_typec_bh_work' [-Wmissing-prototypes]
86 | void qcom_pmic_typec_bh_work(struct work_struct *w)
| ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/usb/typec/qcom-pmic-typec.c:116:13: warning: no previous prototype for 'qcom_pmic_typec_interrupt' [-Wmissing-prototypes]
116 | irqreturn_t qcom_pmic_typec_interrupt(int irq, void *_qcom_usb)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/usb/typec/qcom-pmic-typec.c:7:
drivers/usb/typec/qcom-pmic-typec.c: In function 'qcom_pmic_typec_typec_hw_init':
>> include/linux/build_bug.h:16:51: error: negative width in bit-field '<anonymous>'
16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
| ^
include/linux/regmap.h:84:36: note: in definition of macro 'regmap_update_bits'
84 | regmap_update_bits_base(map, reg, mask, val, NULL, false, false)
| ^~~~
include/linux/bits.h:25:3: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
25 | (BUILD_BUG_ON_ZERO(__builtin_choose_expr( | ^~~~~~~~~~~~~~~~~
include/linux/bits.h:39:3: note: in expansion of macro 'GENMASK_INPUT_CHECK'
39 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~~~~~~~~~~~
>> drivers/usb/typec/qcom-pmic-typec.c:48:34: note: in expansion of macro 'GENMASK'
48 | #define TYPEC_INTR_EN_CFG_1_MASK GENMASK(0, 7)
| ^~~~~~~
>> drivers/usb/typec/qcom-pmic-typec.c:132:7: note: in expansion of macro 'TYPEC_INTR_EN_CFG_1_MASK'
132 | TYPEC_INTR_EN_CFG_1_MASK, 0);
| ^~~~~~~~~~~~~~~~~~~~~~~~
vim +/qcom_pmic_typec_bh_work +86 drivers/usb/typec/qcom-pmic-typec.c
31
32 #define TYPEC_BASE 0x1500
33 #define TYPEC_MISC_STATUS (TYPEC_BASE + 0xb)
34 #define CC_ATTACHED BIT(0)
35 #define CC_ORIENTATION BIT(1)
36 #define SNK_SRC_MODE BIT(6)
37 #define TYPEC_MODE_CFG (TYPEC_BASE + 0x44)
38 #define TYPEC_DISABLE_CMD BIT(0)
39 #define EN_SNK_ONLY BIT(1)
40 #define EN_SRC_ONLY BIT(2)
41 #define EN_TRY_SNK BIT(4)
42 #define TYPEC_VCONN_CONTROL (TYPEC_BASE + 0x46)
43 #define VCONN_EN_SRC BIT(0)
44 #define VCONN_EN_VAL BIT(1)
45 #define TYPEC_EXIT_STATE_CFG (TYPEC_BASE + 0x50)
46 #define SEL_SRC_UPPER_REF BIT(2)
47 #define TYPEC_INTR_EN_CFG_1 (TYPEC_BASE + 0x5e)
> 48 #define TYPEC_INTR_EN_CFG_1_MASK GENMASK(0, 7)
49
50 struct qcom_pmic_typec {
51 struct device *dev;
52 struct fwnode_handle *fwnode;
53 struct regmap *regmap;
54 struct work_struct bh_work;
55
56 struct typec_capability *cap;
57 struct typec_port *port;
58 struct usb_role_switch *role_sw;
59
60 struct regulator_desc usb_vbus_rdesc;
61 struct regulator_dev *usb_vbus_reg;
62 };
63
64 static int qcom_pmic_typec_vbus_enable(struct qcom_pmic_typec *qcom_usb)
65 {
66 int rc;
67
68 rc = regmap_update_bits(qcom_usb->regmap, CMD_OTG, OTG_EN, OTG_EN);
69 if (rc)
70 dev_err(qcom_usb->dev, "failed to update OTG_CTL\n");
71
72 return rc;
73 }
74
75 static int qcom_pmic_typec_vbus_disable(struct qcom_pmic_typec *qcom_usb)
76 {
77 int rc;
78
79 rc = regmap_update_bits(qcom_usb->regmap, CMD_OTG, OTG_EN, 0);
80 if (rc)
81 dev_err(qcom_usb->dev, "failed to update OTG_CTL\n");
82
83 return rc;
84 }
85
> 86 void qcom_pmic_typec_bh_work(struct work_struct *w)
87 {
88 struct qcom_pmic_typec *qcom_usb = container_of(w,
89 struct qcom_pmic_typec,
90 bh_work);
91 enum typec_orientation orientation;
92 enum usb_role role;
93 unsigned int stat;
94
95 regmap_read(qcom_usb->regmap, TYPEC_MISC_STATUS, &stat);
96
97 if (stat & CC_ATTACHED) {
98 orientation = ((stat & CC_ORIENTATION) >> 1) ?
99 TYPEC_ORIENTATION_REVERSE :
100 TYPEC_ORIENTATION_NORMAL;
101 typec_set_orientation(qcom_usb->port, orientation);
102
103 role = (stat & SNK_SRC_MODE) ? USB_ROLE_HOST : USB_ROLE_DEVICE;
104 if (role == USB_ROLE_HOST)
105 qcom_pmic_typec_vbus_enable(qcom_usb);
106 else
107 qcom_pmic_typec_vbus_disable(qcom_usb);
108
109 usb_role_switch_set_role(qcom_usb->role_sw, role);
110 } else {
111 usb_role_switch_set_role(qcom_usb->role_sw, USB_ROLE_NONE);
112 qcom_pmic_typec_vbus_disable(qcom_usb);
113 }
114 }
115
> 116 irqreturn_t qcom_pmic_typec_interrupt(int irq, void *_qcom_usb)
117 {
118 struct qcom_pmic_typec *qcom_usb = _qcom_usb;
119
120 queue_work(system_power_efficient_wq, &qcom_usb->bh_work);
121
122 return IRQ_HANDLED;
123 }
124
125 static void qcom_pmic_typec_typec_hw_init(struct qcom_pmic_typec *qcom_usb)
126 {
127 u8 mode;
128
129 regmap_update_bits(qcom_usb->regmap, TYPE_C_CFG_REG, BC12_START_ON_CC,
130 0);
131 regmap_update_bits(qcom_usb->regmap, TYPEC_INTR_EN_CFG_1,
> 132 TYPEC_INTR_EN_CFG_1_MASK, 0);
133
134 if (qcom_usb->cap->type != TYPEC_PORT_DRP)
135 mode = (qcom_usb->cap->type == TYPEC_PORT_SNK) ?
136 EN_SNK_ONLY : EN_SRC_ONLY;
137 else
138 mode = EN_TRY_SNK;
139 regmap_update_bits(qcom_usb->regmap, TYPEC_MODE_CFG,
140 EN_SNK_ONLY | EN_TRY_SNK | EN_SRC_ONLY, mode);
141
142 regmap_update_bits(qcom_usb->regmap, TYPEC_VCONN_CONTROL,
143 VCONN_EN_SRC | VCONN_EN_VAL, VCONN_EN_SRC);
144 regmap_update_bits(qcom_usb->regmap, TYPEC_VCONN_CONTROL,
145 VCONN_EN_SRC | VCONN_EN_VAL, VCONN_EN_SRC);
146 regmap_update_bits(qcom_usb->regmap, TYPEC_EXIT_STATE_CFG,
147 SEL_SRC_UPPER_REF, SEL_SRC_UPPER_REF);
148 regmap_update_bits(qcom_usb->regmap, OTG_CFG, OTG_EN_SRC_CFG,
149 OTG_EN_SRC_CFG);
150 }
151
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [PATCH] iommu/arm-smmu: Don't bypass pinned stream mappings
by kernel test robot
Hi Jordan,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on iommu/next]
[also build test ERROR on v5.7 next-20200609]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Jordan-Crouse/iommu-arm-smmu-Don...
base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: riscv-allyesconfig (attached as .config)
compiler: riscv64-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=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
drivers/iommu/arm-smmu.c: In function 'arm_smmu_domain_add_master':
>> drivers/iommu/arm-smmu.c:1143:44: error: 'struct arm_smmu_s2cr' has no member named 'pinned'
1143 | if (type == S2CR_TYPE_BYPASS && s2cr[idx].pinned)
| ^
vim +1143 drivers/iommu/arm-smmu.c
1122
1123 static int arm_smmu_domain_add_master(struct arm_smmu_domain *smmu_domain,
1124 struct arm_smmu_master_cfg *cfg,
1125 struct iommu_fwspec *fwspec)
1126 {
1127 struct arm_smmu_device *smmu = smmu_domain->smmu;
1128 struct arm_smmu_s2cr *s2cr = smmu->s2crs;
1129 u8 cbndx = smmu_domain->cfg.cbndx;
1130 enum arm_smmu_s2cr_type type;
1131 int i, idx;
1132
1133 if (smmu_domain->stage == ARM_SMMU_DOMAIN_BYPASS)
1134 type = S2CR_TYPE_BYPASS;
1135 else
1136 type = S2CR_TYPE_TRANS;
1137
1138 for_each_cfg_sme(cfg, fwspec, i, idx) {
1139 if (type == s2cr[idx].type && cbndx == s2cr[idx].cbndx)
1140 continue;
1141
1142 /* Don't bypasss pinned streams; leave them as they are */
> 1143 if (type == S2CR_TYPE_BYPASS && s2cr[idx].pinned)
1144 continue;
1145
1146 s2cr[idx].type = type;
1147 s2cr[idx].privcfg = S2CR_PRIVCFG_DEFAULT;
1148 s2cr[idx].cbndx = cbndx;
1149 arm_smmu_write_s2cr(smmu, idx);
1150 }
1151 return 0;
1152 }
1153
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [PATCH] iommu/arm-smmu: Don't bypass pinned stream mappings
by kernel test robot
Hi Jordan,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on iommu/next]
[also build test ERROR on v5.7 next-20200609]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Jordan-Crouse/iommu-arm-smmu-Don...
base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project bc2b70982be8f5250cd0082a7190f8b417bd4dfe)
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
# 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 <lkp(a)intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
>> drivers/iommu/arm-smmu.c:1143:45: error: no member named 'pinned' in 'struct arm_smmu_s2cr'
if (type == S2CR_TYPE_BYPASS && s2cr[idx].pinned)
~~~~~~~~~ ^
1 error generated.
vim +1143 drivers/iommu/arm-smmu.c
1122
1123 static int arm_smmu_domain_add_master(struct arm_smmu_domain *smmu_domain,
1124 struct arm_smmu_master_cfg *cfg,
1125 struct iommu_fwspec *fwspec)
1126 {
1127 struct arm_smmu_device *smmu = smmu_domain->smmu;
1128 struct arm_smmu_s2cr *s2cr = smmu->s2crs;
1129 u8 cbndx = smmu_domain->cfg.cbndx;
1130 enum arm_smmu_s2cr_type type;
1131 int i, idx;
1132
1133 if (smmu_domain->stage == ARM_SMMU_DOMAIN_BYPASS)
1134 type = S2CR_TYPE_BYPASS;
1135 else
1136 type = S2CR_TYPE_TRANS;
1137
1138 for_each_cfg_sme(cfg, fwspec, i, idx) {
1139 if (type == s2cr[idx].type && cbndx == s2cr[idx].cbndx)
1140 continue;
1141
1142 /* Don't bypasss pinned streams; leave them as they are */
> 1143 if (type == S2CR_TYPE_BYPASS && s2cr[idx].pinned)
1144 continue;
1145
1146 s2cr[idx].type = type;
1147 s2cr[idx].privcfg = S2CR_PRIVCFG_DEFAULT;
1148 s2cr[idx].cbndx = cbndx;
1149 arm_smmu_write_s2cr(smmu, idx);
1150 }
1151 return 0;
1152 }
1153
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[hch-misc:set_fs-removal 85/85] arch/x86/mm/init.c:38:37: error: initializer element is not a compile-time constant
by kernel test robot
tree: git://git.infradead.org/users/hch/misc.git set_fs-removal
head: 153bec971d1618bc5abb582c90a6de920fe00e59
commit: 153bec971d1618bc5abb582c90a6de920fe00e59 [85/85] x86: remove address space overrides using set_fs()
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project bc2b70982be8f5250cd0082a7190f8b417bd4dfe)
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
git checkout 153bec971d1618bc5abb582c90a6de920fe00e59
# 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 <lkp(a)intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
>> arch/x86/mm/init.c:38:37: error: initializer element is not a compile-time constant
const unsigned long task_size_max = TASK_SIZE_MAX;
^~~~~~~~~~~~~
arch/x86/include/asm/processor.h:882:54: note: expanded from macro 'TASK_SIZE_MAX'
#define TASK_SIZE_MAX ((1UL << __VIRTUAL_MASK_SHIFT) - PAGE_SIZE)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
arch/x86/mm/init.c:83:6: warning: no previous prototype for function 'x86_has_pat_wp' [-Wmissing-prototypes]
bool x86_has_pat_wp(void)
^
arch/x86/mm/init.c:83:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
bool x86_has_pat_wp(void)
^
static
arch/x86/mm/init.c:88:22: warning: no previous prototype for function 'pgprot2cachemode' [-Wmissing-prototypes]
enum page_cache_mode pgprot2cachemode(pgprot_t pgprot)
^
arch/x86/mm/init.c:88:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
enum page_cache_mode pgprot2cachemode(pgprot_t pgprot)
^
static
2 warnings and 1 error generated.
--
>> drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:1009:11: error: implicit declaration of function 'get_fs' [-Werror,-Wimplicit-function-declaration]
old_fs = get_fs();
^
drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:1009:11: note: did you mean 'sget_fc'?
include/linux/fs.h:2301:21: note: 'sget_fc' declared here
struct super_block *sget_fc(struct fs_context *fc,
^
>> drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:1009:9: error: assigning to 'mm_segment_t' from incompatible type 'int'
old_fs = get_fs();
^ ~~~~~~~~
>> drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:1010:2: error: implicit declaration of function 'set_fs' [-Werror,-Wimplicit-function-declaration]
set_fs(KERNEL_DS);
^
drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:1010:2: note: did you mean 'get_fs'?
drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:1009:11: note: 'get_fs' declared here
old_fs = get_fs();
^
>> drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:1010:9: error: use of undeclared identifier 'KERNEL_DS'; did you mean 'KERNFS_NS'?
set_fs(KERNEL_DS);
^~~~~~~~~
KERNFS_NS
include/linux/kernfs.h:47:2: note: 'KERNFS_NS' declared here
KERNFS_NS = 0x0020,
^
4 errors generated.
vim +38 arch/x86/mm/init.c
37
> 38 const unsigned long task_size_max = TASK_SIZE_MAX;
39
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months