[char-misc:char-misc-testing 35/47] hisi_hikey_usb.c:undefined reference to `usb_role_switch_unregister'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git char-misc-testing
head: 7c33e3c4c79ac5def79e7c773e38a7113eb14204
commit: 7a6ff4c4cbc3570a1ae483a833b3fb12b1a56a9d [35/47] misc: hisi_hikey_usb: Driver to support onboard USB gpio hub on Hikey960
config: nds32-randconfig-m031-20200916 (attached as .config)
compiler: nds32le-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 7a6ff4c4cbc3570a1ae483a833b3fb12b1a56a9d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nds32
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 >>):
nds32le-linux-ld: drivers/misc/hisi_hikey_usb.o: in function `hisi_hikey_usb_remove':
>> hisi_hikey_usb.c:(.text+0xe): undefined reference to `usb_role_switch_unregister'
>> nds32le-linux-ld: hisi_hikey_usb.c:(.text+0x12): undefined reference to `usb_role_switch_unregister'
>> nds32le-linux-ld: hisi_hikey_usb.c:(.text+0x1e): undefined reference to `usb_role_switch_put'
nds32le-linux-ld: hisi_hikey_usb.c:(.text+0x22): undefined reference to `usb_role_switch_put'
nds32le-linux-ld: drivers/misc/hisi_hikey_usb.o: in function `hub_usb_role_switch_set':
>> hisi_hikey_usb.c:(.text+0x36): undefined reference to `usb_role_switch_get_drvdata'
>> nds32le-linux-ld: hisi_hikey_usb.c:(.text+0x3a): undefined reference to `usb_role_switch_get_drvdata'
nds32le-linux-ld: drivers/misc/hisi_hikey_usb.o: in function `hisi_hikey_usb_probe':
>> hisi_hikey_usb.c:(.text+0x180): undefined reference to `usb_role_switch_get'
>> nds32le-linux-ld: hisi_hikey_usb.c:(.text+0x184): undefined reference to `usb_role_switch_get'
>> nds32le-linux-ld: hisi_hikey_usb.c:(.text+0x208): undefined reference to `usb_role_switch_register'
nds32le-linux-ld: hisi_hikey_usb.c:(.text+0x20c): undefined reference to `usb_role_switch_register'
nds32le-linux-ld: hisi_hikey_usb.c:(.text+0x226): undefined reference to `usb_role_switch_put'
nds32le-linux-ld: hisi_hikey_usb.c:(.text+0x22a): undefined reference to `usb_role_switch_put'
nds32le-linux-ld: drivers/misc/hisi_hikey_usb.o: in function `relay_set_role_switch':
>> hisi_hikey_usb.c:(.text+0x2cc): undefined reference to `usb_role_switch_set_role'
>> nds32le-linux-ld: hisi_hikey_usb.c:(.text+0x2d0): undefined reference to `usb_role_switch_set_role'
nds32le-linux-ld: arch/nds32/kernel/ex-entry.o: in function `common_exception_handler':
(.text+0xfe): undefined reference to `__trace_hardirqs_off'
(.text+0xfe): relocation truncated to fit: R_NDS32_25_PCREL_RELA against undefined symbol `__trace_hardirqs_off'
nds32le-linux-ld: arch/nds32/kernel/ex-exit.o: in function `no_work_pending':
(.text+0xce): undefined reference to `__trace_hardirqs_off'
nds32le-linux-ld: (.text+0xd2): undefined reference to `__trace_hardirqs_off'
nds32le-linux-ld: (.text+0xd6): undefined reference to `__trace_hardirqs_on'
nds32le-linux-ld: (.text+0xda): undefined reference to `__trace_hardirqs_on'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
drivers/md/dm-cache-metadata.c:1716:2: warning: 'strncpy' specified bound 16 equals destination size
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fc4f28bb3daf3265d6bc5f73b497306985bb23ab
commit: 20d38f7c45a44e4b762b586a7bcacbc93ddb3153 riscv: Allow building with kcov coverage
date: 7 weeks ago
config: riscv-randconfig-r013-20200916 (attached as .config)
compiler: riscv32-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 20d38f7c45a44e4b762b586a7bcacbc93ddb3153
# 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 warnings (new ones prefixed by >>):
In function 'write_hints',
inlined from 'dm_cache_write_hints' at drivers/md/dm-cache-metadata.c:1740:6:
>> drivers/md/dm-cache-metadata.c:1716:2: warning: 'strncpy' specified bound 16 equals destination size [-Wstringop-truncation]
1716 | strncpy(cmd->policy_name, policy_name, sizeof(cmd->policy_name));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 20d38f7c45a44e4b762b586a7bcacbc93ddb3153
vim +/strncpy +1716 drivers/md/dm-cache-metadata.c
4e781b498ee500 Joe Thornber 2016-09-15 1700
4e781b498ee500 Joe Thornber 2016-09-15 1701 /*
4e781b498ee500 Joe Thornber 2016-09-15 1702 * It's quicker to always delete the hint array, and recreate with
4e781b498ee500 Joe Thornber 2016-09-15 1703 * dm_array_new().
4e781b498ee500 Joe Thornber 2016-09-15 1704 */
4e781b498ee500 Joe Thornber 2016-09-15 1705 static int write_hints(struct dm_cache_metadata *cmd, struct dm_cache_policy *policy)
c6b4fcbad044e6 Joe Thornber 2013-03-01 1706 {
c6b4fcbad044e6 Joe Thornber 2013-03-01 1707 int r;
c6b4fcbad044e6 Joe Thornber 2013-03-01 1708 size_t hint_size;
c6b4fcbad044e6 Joe Thornber 2013-03-01 1709 const char *policy_name = dm_cache_policy_get_name(policy);
4e7f506f642963 Mike Snitzer 2013-03-20 1710 const unsigned *policy_version = dm_cache_policy_get_version(policy);
c6b4fcbad044e6 Joe Thornber 2013-03-01 1711
c6b4fcbad044e6 Joe Thornber 2013-03-01 1712 if (!policy_name[0] ||
c6b4fcbad044e6 Joe Thornber 2013-03-01 1713 (strlen(policy_name) > sizeof(cmd->policy_name) - 1))
c6b4fcbad044e6 Joe Thornber 2013-03-01 1714 return -EINVAL;
c6b4fcbad044e6 Joe Thornber 2013-03-01 1715
c6b4fcbad044e6 Joe Thornber 2013-03-01 @1716 strncpy(cmd->policy_name, policy_name, sizeof(cmd->policy_name));
4e7f506f642963 Mike Snitzer 2013-03-20 1717 memcpy(cmd->policy_version, policy_version, sizeof(cmd->policy_version));
c6b4fcbad044e6 Joe Thornber 2013-03-01 1718
c6b4fcbad044e6 Joe Thornber 2013-03-01 1719 hint_size = dm_cache_policy_get_hint_size(policy);
c6b4fcbad044e6 Joe Thornber 2013-03-01 1720 if (!hint_size)
c6b4fcbad044e6 Joe Thornber 2013-03-01 1721 return 0; /* short-circuit hints initialization */
c6b4fcbad044e6 Joe Thornber 2013-03-01 1722 cmd->policy_hint_size = hint_size;
c6b4fcbad044e6 Joe Thornber 2013-03-01 1723
c6b4fcbad044e6 Joe Thornber 2013-03-01 1724 if (cmd->hint_root) {
c6b4fcbad044e6 Joe Thornber 2013-03-01 1725 r = dm_array_del(&cmd->hint_info, cmd->hint_root);
c6b4fcbad044e6 Joe Thornber 2013-03-01 1726 if (r)
c6b4fcbad044e6 Joe Thornber 2013-03-01 1727 return r;
c6b4fcbad044e6 Joe Thornber 2013-03-01 1728 }
c6b4fcbad044e6 Joe Thornber 2013-03-01 1729
4e781b498ee500 Joe Thornber 2016-09-15 1730 return dm_array_new(&cmd->hint_info, &cmd->hint_root,
c6b4fcbad044e6 Joe Thornber 2013-03-01 1731 from_cblock(cmd->cache_blocks),
4e781b498ee500 Joe Thornber 2016-09-15 1732 get_hint, policy);
0596661f0a16d9 Joe Thornber 2014-04-03 1733 }
0596661f0a16d9 Joe Thornber 2014-04-03 1734
:::::: The code at line 1716 was first introduced by commit
:::::: c6b4fcbad044e6fffcc75bba160e720eb8d67d17 dm: add cache target
:::::: TO: Joe Thornber <ejt(a)redhat.com>
:::::: CC: Alasdair G Kergon <agk(a)redhat.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
Re: [PATCH RFC 07/11] media: vidtv: remove a wrong endiannes check from s302m generator
by kernel test robot
Hi Mauro,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on linuxtv-media/master]
[cannot apply to v5.9-rc5 next-20200916]
[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/Mauro-Carvalho-Chehab/Solve-some...
base: git://linuxtv.org/media_tree.git master
config: x86_64-randconfig-a014-20200916 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 9e3842d60351f986d77dfe0a94f76e4fd895f188)
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 >>):
>> drivers/media/test-drivers/vidtv/vidtv_s302m.c:41:17: warning: unused variable 'reverse' [-Wunused-const-variable]
static const u8 reverse[256] = {
^
1 warning generated.
# https://github.com/0day-ci/linux/commit/f86488b9fb99bd7755b01f7881fe3fbb8...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Mauro-Carvalho-Chehab/Solve-some-issues-and-do-some-improvements-at-vidtv/20200914-170723
git checkout f86488b9fb99bd7755b01f7881fe3fbb857c175a
vim +/reverse +41 drivers/media/test-drivers/vidtv/vidtv_s302m.c
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 40
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 @41 static const u8 reverse[256] = {
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 42 /* from ffmpeg */
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 43 0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0, 0x10, 0x90, 0x50, 0xD0,
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 44 0x30, 0xB0, 0x70, 0xF0, 0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8,
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 45 0x18, 0x98, 0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8, 0x04, 0x84, 0x44, 0xC4,
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 46 0x24, 0xA4, 0x64, 0xE4, 0x14, 0x94, 0x54, 0xD4, 0x34, 0xB4, 0x74, 0xF4,
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 47 0x0C, 0x8C, 0x4C, 0xCC, 0x2C, 0xAC, 0x6C, 0xEC, 0x1C, 0x9C, 0x5C, 0xDC,
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 48 0x3C, 0xBC, 0x7C, 0xFC, 0x02, 0x82, 0x42, 0xC2, 0x22, 0xA2, 0x62, 0xE2,
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 49 0x12, 0x92, 0x52, 0xD2, 0x32, 0xB2, 0x72, 0xF2, 0x0A, 0x8A, 0x4A, 0xCA,
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 50 0x2A, 0xAA, 0x6A, 0xEA, 0x1A, 0x9A, 0x5A, 0xDA, 0x3A, 0xBA, 0x7A, 0xFA,
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 51 0x06, 0x86, 0x46, 0xC6, 0x26, 0xA6, 0x66, 0xE6, 0x16, 0x96, 0x56, 0xD6,
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 52 0x36, 0xB6, 0x76, 0xF6, 0x0E, 0x8E, 0x4E, 0xCE, 0x2E, 0xAE, 0x6E, 0xEE,
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 53 0x1E, 0x9E, 0x5E, 0xDE, 0x3E, 0xBE, 0x7E, 0xFE, 0x01, 0x81, 0x41, 0xC1,
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 54 0x21, 0xA1, 0x61, 0xE1, 0x11, 0x91, 0x51, 0xD1, 0x31, 0xB1, 0x71, 0xF1,
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 55 0x09, 0x89, 0x49, 0xC9, 0x29, 0xA9, 0x69, 0xE9, 0x19, 0x99, 0x59, 0xD9,
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 56 0x39, 0xB9, 0x79, 0xF9, 0x05, 0x85, 0x45, 0xC5, 0x25, 0xA5, 0x65, 0xE5,
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 57 0x15, 0x95, 0x55, 0xD5, 0x35, 0xB5, 0x75, 0xF5, 0x0D, 0x8D, 0x4D, 0xCD,
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 58 0x2D, 0xAD, 0x6D, 0xED, 0x1D, 0x9D, 0x5D, 0xDD, 0x3D, 0xBD, 0x7D, 0xFD,
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 59 0x03, 0x83, 0x43, 0xC3, 0x23, 0xA3, 0x63, 0xE3, 0x13, 0x93, 0x53, 0xD3,
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 60 0x33, 0xB3, 0x73, 0xF3, 0x0B, 0x8B, 0x4B, 0xCB, 0x2B, 0xAB, 0x6B, 0xEB,
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 61 0x1B, 0x9B, 0x5B, 0xDB, 0x3B, 0xBB, 0x7B, 0xFB, 0x07, 0x87, 0x47, 0xC7,
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 62 0x27, 0xA7, 0x67, 0xE7, 0x17, 0x97, 0x57, 0xD7, 0x37, 0xB7, 0x77, 0xF7,
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 63 0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF, 0x1F, 0x9F, 0x5F, 0xDF,
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 64 0x3F, 0xBF, 0x7F, 0xFF,
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 65 };
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 66
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[intel-linux-intel-lts:5.4/yocto 8/24] drivers/gpu/drm/i915/intel_pm.c:4523:1: error: no previous prototype for function 'skl_wm_method1'
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: 8bbfe55bfdb2905c35914605bc1b4a4404d86649
commit: 2521b097a48688b899e3db9cb855aa1ec59b02e8 [8/24] drm/i915/gvt: Rebase IDV 2.1 direct display to 5.4.x.
config: x86_64-randconfig-a014-20200916 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 9e3842d60351f986d77dfe0a94f76e4fd895f188)
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 2521b097a48688b899e3db9cb855aa1ec59b02e8
# 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 >>):
>> drivers/gpu/drm/i915/intel_pm.c:4523:1: error: no previous prototype for function 'skl_wm_method1' [-Werror,-Wmissing-prototypes]
skl_wm_method1(const struct drm_i915_private *dev_priv, u32 pixel_rate,
^
drivers/gpu/drm/i915/intel_pm.c:4522:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
uint_fixed_16_16_t
^
static
>> drivers/gpu/drm/i915/intel_pm.c:4542:1: error: no previous prototype for function 'skl_wm_method2' [-Werror,-Wmissing-prototypes]
skl_wm_method2(u32 pixel_rate, u32 pipe_htotal, u32 latency,
^
drivers/gpu/drm/i915/intel_pm.c:4541:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
uint_fixed_16_16_t
^
static
>> drivers/gpu/drm/i915/intel_pm.c:4559:1: error: no previous prototype for function 'intel_get_linetime_us' [-Werror,-Wmissing-prototypes]
intel_get_linetime_us(const struct intel_crtc_state *crtc_state)
^
drivers/gpu/drm/i915/intel_pm.c:4558:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
uint_fixed_16_16_t
^
static
>> drivers/gpu/drm/i915/intel_pm.c:4886:6: error: no previous prototype for function 'skl_compute_transition_wm' [-Werror,-Wmissing-prototypes]
void skl_compute_transition_wm(const struct intel_crtc_state *crtc_state,
^
drivers/gpu/drm/i915/intel_pm.c:4886:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void skl_compute_transition_wm(const struct intel_crtc_state *crtc_state,
^
static
4 errors generated.
# https://github.com/intel/linux-intel-lts/commit/2521b097a48688b899e3db9cb...
git remote add intel-linux-intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-linux-intel-lts 5.4/yocto
git checkout 2521b097a48688b899e3db9cb855aa1ec59b02e8
vim +/skl_wm_method1 +4523 drivers/gpu/drm/i915/intel_pm.c
b9cec07585cf1f5 Damien Lespiau 2014-11-04 4515
2d41c0b59afcdd8 Pradeep Bhat 2014-11-04 4516 /*
2d41c0b59afcdd8 Pradeep Bhat 2014-11-04 4517 * The max latency should be 257 (max the punit can code is 255 and we add 2us
ac484963f979b6a Ville Syrjälä 2016-01-20 4518 * for the read latency) and cpp should always be <= 8, so that
2d41c0b59afcdd8 Pradeep Bhat 2014-11-04 4519 * should allow pixel_rate up to ~2 GHz which seems sufficient since max
2d41c0b59afcdd8 Pradeep Bhat 2014-11-04 4520 * 2xcdclk is 1350 MHz and the pixel rate should never exceed that.
2d41c0b59afcdd8 Pradeep Bhat 2014-11-04 4521 */
2521b097a48688b Colin Xu 2020-04-14 4522 uint_fixed_16_16_t
5ce9a6497914b21 Jani Nikula 2019-01-18 @4523 skl_wm_method1(const struct drm_i915_private *dev_priv, u32 pixel_rate,
5ce9a6497914b21 Jani Nikula 2019-01-18 4524 u8 cpp, u32 latency, u32 dbuf_block_size)
2d41c0b59afcdd8 Pradeep Bhat 2014-11-04 4525 {
5ce9a6497914b21 Jani Nikula 2019-01-18 4526 u32 wm_intermediate_val;
b95320bdf2d8910 Mahesh Kumar 2016-12-01 4527 uint_fixed_16_16_t ret;
2d41c0b59afcdd8 Pradeep Bhat 2014-11-04 4528
2d41c0b59afcdd8 Pradeep Bhat 2014-11-04 4529 if (latency == 0)
b95320bdf2d8910 Mahesh Kumar 2016-12-01 4530 return FP_16_16_MAX;
2d41c0b59afcdd8 Pradeep Bhat 2014-11-04 4531
b95320bdf2d8910 Mahesh Kumar 2016-12-01 4532 wm_intermediate_val = latency * pixel_rate * cpp;
df8ee19087d24ca Mahesh Kumar 2018-01-30 4533 ret = div_fixed16(wm_intermediate_val, 1000 * dbuf_block_size);
6c64dd378aca528 Paulo Zanoni 2017-08-11 4534
6c64dd378aca528 Paulo Zanoni 2017-08-11 4535 if (INTEL_GEN(dev_priv) >= 10)
6c64dd378aca528 Paulo Zanoni 2017-08-11 4536 ret = add_fixed16_u32(ret, 1);
6c64dd378aca528 Paulo Zanoni 2017-08-11 4537
2d41c0b59afcdd8 Pradeep Bhat 2014-11-04 4538 return ret;
2d41c0b59afcdd8 Pradeep Bhat 2014-11-04 4539 }
2d41c0b59afcdd8 Pradeep Bhat 2014-11-04 4540
2521b097a48688b Colin Xu 2020-04-14 4541 uint_fixed_16_16_t
5ce9a6497914b21 Jani Nikula 2019-01-18 @4542 skl_wm_method2(u32 pixel_rate, u32 pipe_htotal, u32 latency,
b95320bdf2d8910 Mahesh Kumar 2016-12-01 4543 uint_fixed_16_16_t plane_blocks_per_line)
2d41c0b59afcdd8 Pradeep Bhat 2014-11-04 4544 {
5ce9a6497914b21 Jani Nikula 2019-01-18 4545 u32 wm_intermediate_val;
b95320bdf2d8910 Mahesh Kumar 2016-12-01 4546 uint_fixed_16_16_t ret;
2d41c0b59afcdd8 Pradeep Bhat 2014-11-04 4547
2d41c0b59afcdd8 Pradeep Bhat 2014-11-04 4548 if (latency == 0)
b95320bdf2d8910 Mahesh Kumar 2016-12-01 4549 return FP_16_16_MAX;
2d41c0b59afcdd8 Pradeep Bhat 2014-11-04 4550
2d41c0b59afcdd8 Pradeep Bhat 2014-11-04 4551 wm_intermediate_val = latency * pixel_rate;
b95320bdf2d8910 Mahesh Kumar 2016-12-01 4552 wm_intermediate_val = DIV_ROUND_UP(wm_intermediate_val,
b95320bdf2d8910 Mahesh Kumar 2016-12-01 4553 pipe_htotal * 1000);
eac2cb81fb87223 Kumar, Mahesh 2017-07-05 4554 ret = mul_u32_fixed16(wm_intermediate_val, plane_blocks_per_line);
2d41c0b59afcdd8 Pradeep Bhat 2014-11-04 4555 return ret;
2d41c0b59afcdd8 Pradeep Bhat 2014-11-04 4556 }
2d41c0b59afcdd8 Pradeep Bhat 2014-11-04 4557
2521b097a48688b Colin Xu 2020-04-14 4558 uint_fixed_16_16_t
ec193640819e014 Maarten Lankhorst 2019-06-28 @4559 intel_get_linetime_us(const struct intel_crtc_state *crtc_state)
d555cb5827d6032 Kumar, Mahesh 2017-05-17 4560 {
5ce9a6497914b21 Jani Nikula 2019-01-18 4561 u32 pixel_rate;
5ce9a6497914b21 Jani Nikula 2019-01-18 4562 u32 crtc_htotal;
d555cb5827d6032 Kumar, Mahesh 2017-05-17 4563 uint_fixed_16_16_t linetime_us;
d555cb5827d6032 Kumar, Mahesh 2017-05-17 4564
3dd5d78f700217d Maarten Lankhorst 2019-10-31 4565 if (!crtc_state->hw.active)
eac2cb81fb87223 Kumar, Mahesh 2017-07-05 4566 return u32_to_fixed16(0);
d555cb5827d6032 Kumar, Mahesh 2017-05-17 4567
ec193640819e014 Maarten Lankhorst 2019-06-28 4568 pixel_rate = crtc_state->pixel_rate;
d555cb5827d6032 Kumar, Mahesh 2017-05-17 4569
d555cb5827d6032 Kumar, Mahesh 2017-05-17 4570 if (WARN_ON(pixel_rate == 0))
eac2cb81fb87223 Kumar, Mahesh 2017-07-05 4571 return u32_to_fixed16(0);
d555cb5827d6032 Kumar, Mahesh 2017-05-17 4572
3dd5d78f700217d Maarten Lankhorst 2019-10-31 4573 crtc_htotal = crtc_state->hw.adjusted_mode.crtc_htotal;
eac2cb81fb87223 Kumar, Mahesh 2017-07-05 4574 linetime_us = div_fixed16(crtc_htotal * 1000, pixel_rate);
d555cb5827d6032 Kumar, Mahesh 2017-05-17 4575
d555cb5827d6032 Kumar, Mahesh 2017-05-17 4576 return linetime_us;
d555cb5827d6032 Kumar, Mahesh 2017-05-17 4577 }
d555cb5827d6032 Kumar, Mahesh 2017-05-17 4578
:::::: The code at line 4523 was first introduced by commit
:::::: 5ce9a6497914b21ca995ebbc0322b287b28176e8 drm/i915/pm: switch to kernel types
:::::: TO: Jani Nikula <jani.nikula(a)intel.com>
:::::: CC: Jani Nikula <jani.nikula(a)intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
drivers/staging/media/atomisp/pci/hmm/hmm.c:269:6: warning: format '%ld' expects argument of type 'long int', but argument 6 has type 'size_t' {aka 'unsigned int'}
by kernel test robot
Hi Mauro,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fc4f28bb3daf3265d6bc5f73b497306985bb23ab
commit: 03884c93560c48c2739caa9b104b0cb4d3ea8c91 media: atomisp: add debug for hmm alloc
date: 3 months ago
config: i386-randconfig-r011-20200916 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
git checkout 03884c93560c48c2739caa9b104b0cb4d3ea8c91
# 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>
All warnings (new ones prefixed by >>):
cc1: warning: drivers/staging/media/atomisp//pci/hive_isp_css_include/memory_access/: No such file or directory [-Wmissing-include-dirs]
In file included from include/linux/device.h:15,
from include/linux/acpi.h:15,
from include/linux/i2c.h:13,
from drivers/staging/media/atomisp//include/hmm/../../include/linux/atomisp_platform.h:20,
from drivers/staging/media/atomisp//pci/atomisp_internal.h:22,
from drivers/staging/media/atomisp/pci/hmm/hmm.c:33:
drivers/staging/media/atomisp/pci/hmm/hmm.c: In function 'hmm_alloc':
>> drivers/staging/media/atomisp/pci/hmm/hmm.c:269:6: warning: format '%ld' expects argument of type 'long int', but argument 6 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
269 | "%s: pages: 0x%08x (%ld bytes), type: %d from highmem %d, user ptr %p, cached %d\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
19 | #define dev_fmt(fmt) fmt
| ^~~
drivers/staging/media/atomisp/pci/hmm/hmm.c:268:6: note: in expansion of macro 'dev_dbg'
268 | dev_dbg(atomisp_dev,
| ^~~~~~~
drivers/staging/media/atomisp/pci/hmm/hmm.c:269:28: note: format string is defined here
269 | "%s: pages: 0x%08x (%ld bytes), type: %d from highmem %d, user ptr %p, cached %d\n",
| ~~^
| |
| long int
| %d
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 03884c93560c48c2739caa9b104b0cb4d3ea8c91
vim +269 drivers/staging/media/atomisp/pci/hmm/hmm.c
220
221 ia_css_ptr hmm_alloc(size_t bytes, enum hmm_bo_type type,
222 int from_highmem, const void __user *userptr,
223 const uint16_t attrs)
224 {
225 unsigned int pgnr;
226 struct hmm_buffer_object *bo;
227 bool cached = attrs & ATOMISP_MAP_FLAG_CACHED;
228 int ret;
229
230 WARN_ON(attrs & ATOMISP_MAP_FLAG_CONTIGUOUS);
231
232 /*
233 * Check if we are initialized. In the ideal world we wouldn't need
234 * this but we can tackle it once the driver is a lot cleaner
235 */
236
237 if (!hmm_initialized)
238 hmm_init();
239 /* Get page number from size */
240 pgnr = size_to_pgnr_ceil(bytes);
241
242 /* Buffer object structure init */
243 bo = hmm_bo_alloc(&bo_device, pgnr);
244 if (!bo) {
245 dev_err(atomisp_dev, "hmm_bo_create failed.\n");
246 goto create_bo_err;
247 }
248
249 /* Allocate pages for memory */
250 ret = hmm_bo_alloc_pages(bo, type, from_highmem, userptr, cached);
251 if (ret) {
252 dev_err(atomisp_dev, "hmm_bo_alloc_pages failed.\n");
253 goto alloc_page_err;
254 }
255
256 /* Combine the virtual address and pages together */
257 ret = hmm_bo_bind(bo);
258 if (ret) {
259 dev_err(atomisp_dev, "hmm_bo_bind failed.\n");
260 goto bind_err;
261 }
262
263 hmm_mem_stat.tol_cnt += pgnr;
264
265 if (attrs & ATOMISP_MAP_FLAG_CLEARED)
266 hmm_set(bo->start, 0, bytes);
267
268 dev_dbg(atomisp_dev,
> 269 "%s: pages: 0x%08x (%ld bytes), type: %d from highmem %d, user ptr %p, cached %d\n",
270 __func__, bo->start, bytes, type, from_highmem, userptr, cached);
271
272 return bo->start;
273
274 bind_err:
275 hmm_bo_free_pages(bo);
276 alloc_page_err:
277 hmm_bo_unref(bo);
278 create_bo_err:
279 return 0;
280 }
281
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[peterz-queue:sched/wip2 5/5] kernel/sched/core.c:1908:7: error: expected ';', ',' or ')' before 'u32'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/wip2
head: fb0089110c5e29151c75028add05458ad2bf8a68
commit: fb0089110c5e29151c75028add05458ad2bf8a68 [5/5] sched: Massage set_cpus_allowed
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-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 fb0089110c5e29151c75028add05458ad2bf8a68
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc
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 >>):
>> kernel/sched/core.c:1908:7: error: expected ';', ',' or ')' before 'u32'
1908 | u32 flags)
| ^~~
kernel/sched/core.c: In function 'set_cpus_allowed_ptr':
>> kernel/sched/core.c:1986:9: error: implicit declaration of function '__set_cpus_allowed_ptr'; did you mean 'set_cpus_allowed_ptr'? [-Werror=implicit-function-declaration]
1986 | return __set_cpus_allowed_ptr(p, new_mask, 0);
| ^~~~~~~~~~~~~~~~~~~~~~
| set_cpus_allowed_ptr
kernel/sched/core.c: At top level:
kernel/sched/core.c:2412:6: warning: no previous prototype for 'sched_set_stop_task' [-Wmissing-prototypes]
2412 | void sched_set_stop_task(int cpu, struct task_struct *stop)
| ^~~~~~~~~~~~~~~~~~~
kernel/sched/core.c: In function 'schedule_tail':
kernel/sched/core.c:3798:13: warning: variable 'rq' set but not used [-Wunused-but-set-variable]
3798 | struct rq *rq;
| ^~
kernel/sched/core.c: In function 'init_idle':
>> kernel/sched/core.c:6641:2: error: too few arguments to function 'set_cpus_allowed_common'
6641 | set_cpus_allowed_common(idle, cpumask_of(cpu));
| ^~~~~~~~~~~~~~~~~~~~~~~
kernel/sched/core.c:1831:6: note: declared here
1831 | void set_cpus_allowed_common(struct task_struct *p, const struct cpumask *new_mask, u32 flags)
| ^~~~~~~~~~~~~~~~~~~~~~~
kernel/sched/core.c: In function '__balance_push_cpu_stop':
kernel/sched/core.c:6802:2: error: implicit declaration of function 'update_rq_clockrq'; did you mean 'update_rq_clock'? [-Werror=implicit-function-declaration]
6802 | update_rq_clockrq();
| ^~~~~~~~~~~~~~~~~
| update_rq_clock
cc1: some warnings being treated as errors
# https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?...
git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue sched/wip2
git checkout fb0089110c5e29151c75028add05458ad2bf8a68
vim +1908 kernel/sched/core.c
1896
1897 /*
1898 * Change a given task's CPU affinity. Migrate the thread to a
1899 * proper CPU and schedule it away if the CPU it's executing on
1900 * is removed from the allowed bitmask.
1901 *
1902 * NOTE: the caller must have a valid reference to the task, the
1903 * task must not exit() & deallocate itself prematurely. The
1904 * call is not atomic; no spinlocks may be held.
1905 */
1906 static int __set_cpus_allowed_ptr(struct task_struct *p,
1907 const struct cpumask *new_mask
> 1908 u32 flags)
1909 {
1910 const struct cpumask *cpu_valid_mask = cpu_active_mask;
1911 unsigned int dest_cpu;
1912 struct rq_flags rf;
1913 struct rq *rq;
1914 int ret = 0;
1915
1916 rq = task_rq_lock(p, &rf);
1917 update_rq_clock(rq);
1918
1919 if (p->flags & PF_KTHREAD) {
1920 /*
1921 * Kernel threads are allowed on online && !active CPUs
1922 */
1923 cpu_valid_mask = cpu_online_mask;
1924 }
1925
1926 /*
1927 * Must re-check here, to close a race against __kthread_bind(),
1928 * sched_setaffinity() is not guaranteed to observe the flag.
1929 */
1930 if ((flags & SCA_CHECK) && (p->flags & PF_NO_SETAFFINITY)) {
1931 ret = -EINVAL;
1932 goto out;
1933 }
1934
1935 if (!(flags & SCA_MIGRATE_ENABLE) && cpumask_equal(&p->cpus_mask, new_mask))
1936 goto out;
1937
1938 /*
1939 * Picking a ~random cpu helps in cases where we are changing affinity
1940 * for groups of tasks (ie. cpuset), so that load balancing is not
1941 * immediately required to distribute the tasks within their new mask.
1942 */
1943 dest_cpu = cpumask_any_and_distribute(cpu_valid_mask, new_mask);
1944 if (dest_cpu >= nr_cpu_ids) {
1945 ret = -EINVAL;
1946 goto out;
1947 }
1948
1949 __do_set_cpus_allowed(p, new_mask, flags);
1950
1951 if (p->flags & PF_KTHREAD) {
1952 /*
1953 * For kernel threads that do indeed end up on online &&
1954 * !active we want to ensure they are strict per-CPU threads.
1955 */
1956 WARN_ON(cpumask_intersects(new_mask, cpu_online_mask) &&
1957 !cpumask_intersects(new_mask, cpu_active_mask) &&
1958 p->nr_cpus_allowed != 1);
1959 }
1960
1961 /* Can the task run on the task's current CPU? If so, we're done */
1962 if (cpumask_test_cpu(task_cpu(p), new_mask))
1963 goto out;
1964
1965 if (task_running(rq, p) || p->state == TASK_WAKING) {
1966 struct migration_arg arg = { p, dest_cpu };
1967 /* Need help from migration thread: drop lock and wait. */
1968 task_rq_unlock(rq, p, &rf);
1969 stop_one_cpu(cpu_of(rq), migration_cpu_stop, &arg);
1970 return 0;
1971 } else if (task_on_rq_queued(p)) {
1972 /*
1973 * OK, since we're going to drop the lock immediately
1974 * afterwards anyway.
1975 */
1976 rq = move_queued_task(rq, &rf, p, dest_cpu);
1977 }
1978 out:
1979 task_rq_unlock(rq, p, &rf);
1980
1981 return ret;
1982 }
1983
1984 int set_cpus_allowed_ptr(struct task_struct *p, const struct cpumask *new_mask)
1985 {
> 1986 return __set_cpus_allowed_ptr(p, new_mask, 0);
1987 }
1988 EXPORT_SYMBOL_GPL(set_cpus_allowed_ptr);
1989
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[hch-misc:hmm-headers 1/1] drivers/gpu/drm/nouveau/nouveau_dmem.c:148:10: error: implicit declaration of function 'migrate_pfn_to_page'; did you mean
by kernel test robot
tree: git://git.infradead.org/users/hch/misc.git hmm-headers
head: eacffa71b75f2486263f460f97583c2198f9a830
commit: eacffa71b75f2486263f460f97583c2198f9a830 [1/1] hmm: remove unneeded #includes
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-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 eacffa71b75f2486263f460f97583c2198f9a830
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc
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 >>):
>> drivers/gpu/drm/nouveau/nouveau_dmem.c:141:32: warning: 'struct migrate_vma' declared inside parameter list will not be visible outside of this definition or declaration
141 | struct vm_fault *vmf, struct migrate_vma *args,
| ^~~~~~~~~~~
drivers/gpu/drm/nouveau/nouveau_dmem.c: In function 'nouveau_dmem_fault_copy_one':
>> drivers/gpu/drm/nouveau/nouveau_dmem.c:148:10: error: implicit declaration of function 'migrate_pfn_to_page'; did you mean 'hmm_pfn_to_page'? [-Werror=implicit-function-declaration]
148 | spage = migrate_pfn_to_page(args->src[0]);
| ^~~~~~~~~~~~~~~~~~~
| hmm_pfn_to_page
>> drivers/gpu/drm/nouveau/nouveau_dmem.c:148:34: error: dereferencing pointer to incomplete type 'struct migrate_vma'
148 | spage = migrate_pfn_to_page(args->src[0]);
| ^~
>> drivers/gpu/drm/nouveau/nouveau_dmem.c:149:33: error: 'MIGRATE_PFN_MIGRATE' undeclared (first use in this function)
149 | if (!spage || !(args->src[0] & MIGRATE_PFN_MIGRATE))
| ^~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/nouveau/nouveau_dmem.c:149:33: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/gpu/drm/nouveau/nouveau_dmem.c:169:17: error: implicit declaration of function 'migrate_pfn' [-Werror=implicit-function-declaration]
169 | args->dst[0] = migrate_pfn(page_to_pfn(dpage)) | MIGRATE_PFN_LOCKED;
| ^~~~~~~~~~~
>> drivers/gpu/drm/nouveau/nouveau_dmem.c:169:51: error: 'MIGRATE_PFN_LOCKED' undeclared (first use in this function)
169 | args->dst[0] = migrate_pfn(page_to_pfn(dpage)) | MIGRATE_PFN_LOCKED;
| ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/nouveau/nouveau_dmem.c: In function 'nouveau_dmem_migrate_to_ram':
>> drivers/gpu/drm/nouveau/nouveau_dmem.c:188:9: error: variable 'args' has initializer but incomplete type
188 | struct migrate_vma args = {
| ^~~~~~~~~~~
>> drivers/gpu/drm/nouveau/nouveau_dmem.c:189:4: error: 'struct migrate_vma' has no member named 'vma'
189 | .vma = vmf->vma,
| ^~~
>> drivers/gpu/drm/nouveau/nouveau_dmem.c:189:11: warning: excess elements in struct initializer
189 | .vma = vmf->vma,
| ^~~
drivers/gpu/drm/nouveau/nouveau_dmem.c:189:11: note: (near initialization for 'args')
>> drivers/gpu/drm/nouveau/nouveau_dmem.c:190:4: error: 'struct migrate_vma' has no member named 'start'
190 | .start = vmf->address,
| ^~~~~
drivers/gpu/drm/nouveau/nouveau_dmem.c:190:13: warning: excess elements in struct initializer
190 | .start = vmf->address,
| ^~~
drivers/gpu/drm/nouveau/nouveau_dmem.c:190:13: note: (near initialization for 'args')
>> drivers/gpu/drm/nouveau/nouveau_dmem.c:191:4: error: 'struct migrate_vma' has no member named 'end'
191 | .end = vmf->address + PAGE_SIZE,
| ^~~
drivers/gpu/drm/nouveau/nouveau_dmem.c:191:11: warning: excess elements in struct initializer
191 | .end = vmf->address + PAGE_SIZE,
| ^~~
drivers/gpu/drm/nouveau/nouveau_dmem.c:191:11: note: (near initialization for 'args')
>> drivers/gpu/drm/nouveau/nouveau_dmem.c:192:4: error: 'struct migrate_vma' has no member named 'src'
192 | .src = &src,
| ^~~
drivers/gpu/drm/nouveau/nouveau_dmem.c:192:11: warning: excess elements in struct initializer
192 | .src = &src,
| ^
drivers/gpu/drm/nouveau/nouveau_dmem.c:192:11: note: (near initialization for 'args')
>> drivers/gpu/drm/nouveau/nouveau_dmem.c:193:4: error: 'struct migrate_vma' has no member named 'dst'
193 | .dst = &dst,
| ^~~
drivers/gpu/drm/nouveau/nouveau_dmem.c:193:11: warning: excess elements in struct initializer
193 | .dst = &dst,
| ^
drivers/gpu/drm/nouveau/nouveau_dmem.c:193:11: note: (near initialization for 'args')
>> drivers/gpu/drm/nouveau/nouveau_dmem.c:194:4: error: 'struct migrate_vma' has no member named 'pgmap_owner'
194 | .pgmap_owner = drm->dev,
| ^~~~~~~~~~~
drivers/gpu/drm/nouveau/nouveau_dmem.c:194:18: warning: excess elements in struct initializer
194 | .pgmap_owner = drm->dev,
| ^~~
drivers/gpu/drm/nouveau/nouveau_dmem.c:194:18: note: (near initialization for 'args')
>> drivers/gpu/drm/nouveau/nouveau_dmem.c:195:4: error: 'struct migrate_vma' has no member named 'flags'
195 | .flags = MIGRATE_VMA_SELECT_DEVICE_PRIVATE,
| ^~~~~
>> drivers/gpu/drm/nouveau/nouveau_dmem.c:195:13: error: 'MIGRATE_VMA_SELECT_DEVICE_PRIVATE' undeclared (first use in this function)
195 | .flags = MIGRATE_VMA_SELECT_DEVICE_PRIVATE,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/nouveau/nouveau_dmem.c:195:13: warning: excess elements in struct initializer
drivers/gpu/drm/nouveau/nouveau_dmem.c:195:13: note: (near initialization for 'args')
>> drivers/gpu/drm/nouveau/nouveau_dmem.c:188:21: error: storage size of 'args' isn't known
188 | struct migrate_vma args = {
| ^~~~
>> drivers/gpu/drm/nouveau/nouveau_dmem.c:203:6: error: implicit declaration of function 'migrate_vma_setup' [-Werror=implicit-function-declaration]
203 | if (migrate_vma_setup(&args) < 0)
| ^~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/nouveau/nouveau_dmem.c:213:2: error: implicit declaration of function 'migrate_vma_pages'; did you mean 'is_migrate_cma_page'? [-Werror=implicit-function-declaration]
213 | migrate_vma_pages(&args);
| ^~~~~~~~~~~~~~~~~
| is_migrate_cma_page
>> drivers/gpu/drm/nouveau/nouveau_dmem.c:217:2: error: implicit declaration of function 'migrate_vma_finalize' [-Werror=implicit-function-declaration]
217 | migrate_vma_finalize(&args);
| ^~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/nouveau/nouveau_dmem.c:188:21: warning: unused variable 'args' [-Wunused-variable]
188 | struct migrate_vma args = {
| ^~~~
drivers/gpu/drm/nouveau/nouveau_dmem.c: In function 'nouveau_dmem_migrate_copy_one':
drivers/gpu/drm/nouveau/nouveau_dmem.c:575:8: warning: assignment to 'struct page *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
575 | spage = migrate_pfn_to_page(src);
| ^
drivers/gpu/drm/nouveau/nouveau_dmem.c:576:14: error: 'MIGRATE_PFN_MIGRATE' undeclared (first use in this function)
576 | if (!(src & MIGRATE_PFN_MIGRATE))
| ^~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/nouveau/nouveau_dmem.c:602:12: error: 'MIGRATE_PFN_WRITE' undeclared (first use in this function)
602 | if (src & MIGRATE_PFN_WRITE)
| ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/nouveau/nouveau_dmem.c:604:43: error: 'MIGRATE_PFN_LOCKED' undeclared (first use in this function)
604 | return migrate_pfn(page_to_pfn(dpage)) | MIGRATE_PFN_LOCKED;
| ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/nouveau/nouveau_dmem.c: At top level:
drivers/gpu/drm/nouveau/nouveau_dmem.c:616:37: warning: 'struct migrate_vma' declared inside parameter list will not be visible outside of this definition or declaration
616 | struct nouveau_svmm *svmm, struct migrate_vma *args,
| ^~~~~~~~~~~
drivers/gpu/drm/nouveau/nouveau_dmem.c: In function 'nouveau_dmem_migrate_chunk':
drivers/gpu/drm/nouveau/nouveau_dmem.c:620:27: error: dereferencing pointer to incomplete type 'struct migrate_vma'
620 | unsigned long addr = args->start, nr_dma = 0, i;
| ^~
drivers/gpu/drm/nouveau/nouveau_dmem.c: In function 'nouveau_dmem_migrate_vma':
drivers/gpu/drm/nouveau/nouveau_dmem.c:652:9: error: variable 'args' has initializer but incomplete type
652 | struct migrate_vma args = {
| ^~~~~~~~~~~
drivers/gpu/drm/nouveau/nouveau_dmem.c:653:4: error: 'struct migrate_vma' has no member named 'vma'
653 | .vma = vma,
| ^~~
drivers/gpu/drm/nouveau/nouveau_dmem.c:653:11: warning: excess elements in struct initializer
653 | .vma = vma,
| ^~~
drivers/gpu/drm/nouveau/nouveau_dmem.c:653:11: note: (near initialization for 'args')
drivers/gpu/drm/nouveau/nouveau_dmem.c:654:4: error: 'struct migrate_vma' has no member named 'start'
654 | .start = start,
| ^~~~~
drivers/gpu/drm/nouveau/nouveau_dmem.c:654:13: warning: excess elements in struct initializer
654 | .start = start,
| ^~~~~
drivers/gpu/drm/nouveau/nouveau_dmem.c:654:13: note: (near initialization for 'args')
drivers/gpu/drm/nouveau/nouveau_dmem.c:655:4: error: 'struct migrate_vma' has no member named 'pgmap_owner'
655 | .pgmap_owner = drm->dev,
| ^~~~~~~~~~~
drivers/gpu/drm/nouveau/nouveau_dmem.c:655:18: warning: excess elements in struct initializer
655 | .pgmap_owner = drm->dev,
| ^~~
drivers/gpu/drm/nouveau/nouveau_dmem.c:655:18: note: (near initialization for 'args')
drivers/gpu/drm/nouveau/nouveau_dmem.c:656:4: error: 'struct migrate_vma' has no member named 'flags'
656 | .flags = MIGRATE_VMA_SELECT_SYSTEM,
| ^~~~~
drivers/gpu/drm/nouveau/nouveau_dmem.c:656:13: error: 'MIGRATE_VMA_SELECT_SYSTEM' undeclared (first use in this function)
656 | .flags = MIGRATE_VMA_SELECT_SYSTEM,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/nouveau/nouveau_dmem.c:656:13: warning: excess elements in struct initializer
drivers/gpu/drm/nouveau/nouveau_dmem.c:656:13: note: (near initialization for 'args')
drivers/gpu/drm/nouveau/nouveau_dmem.c:652:21: error: storage size of 'args' isn't known
652 | struct migrate_vma args = {
| ^~~~
drivers/gpu/drm/nouveau/nouveau_dmem.c:652:21: warning: unused variable 'args' [-Wunused-variable]
cc1: some warnings being treated as errors
git remote add hch-misc git://git.infradead.org/users/hch/misc.git
git fetch --no-tags hch-misc hmm-headers
git checkout eacffa71b75f2486263f460f97583c2198f9a830
vim +148 drivers/gpu/drm/nouveau/nouveau_dmem.c
2ab2bda53c986a9 Christoph Hellwig 2019-08-14 139
bfe69ef94aeeae7 Christoph Hellwig 2019-08-14 140 static vm_fault_t nouveau_dmem_fault_copy_one(struct nouveau_drm *drm,
bfe69ef94aeeae7 Christoph Hellwig 2019-08-14 @141 struct vm_fault *vmf, struct migrate_vma *args,
bfe69ef94aeeae7 Christoph Hellwig 2019-08-14 142 dma_addr_t *dma_addr)
5be73b690875f7e Jérôme Glisse 2018-07-26 143 {
a788ade4f6e0302 Ben Skeggs 2019-02-15 144 struct device *dev = drm->dev->dev;
5be73b690875f7e Jérôme Glisse 2018-07-26 145 struct page *dpage, *spage;
f8477ce6b5923ef Ralph Campbell 2020-07-23 146 struct nouveau_svmm *svmm;
5be73b690875f7e Jérôme Glisse 2018-07-26 147
bfe69ef94aeeae7 Christoph Hellwig 2019-08-14 @148 spage = migrate_pfn_to_page(args->src[0]);
bfe69ef94aeeae7 Christoph Hellwig 2019-08-14 @149 if (!spage || !(args->src[0] & MIGRATE_PFN_MIGRATE))
bfe69ef94aeeae7 Christoph Hellwig 2019-08-14 150 return 0;
5be73b690875f7e Jérôme Glisse 2018-07-26 151
bfe69ef94aeeae7 Christoph Hellwig 2019-08-14 152 dpage = alloc_page_vma(GFP_HIGHUSER, vmf->vma, vmf->address);
bfe69ef94aeeae7 Christoph Hellwig 2019-08-14 153 if (!dpage)
bfe69ef94aeeae7 Christoph Hellwig 2019-08-14 154 return VM_FAULT_SIGBUS;
721be868142cb95 Christoph Hellwig 2019-06-26 155 lock_page(dpage);
5be73b690875f7e Jérôme Glisse 2018-07-26 156
bfe69ef94aeeae7 Christoph Hellwig 2019-08-14 157 *dma_addr = dma_map_page(dev, dpage, 0, PAGE_SIZE, DMA_BIDIRECTIONAL);
bfe69ef94aeeae7 Christoph Hellwig 2019-08-14 158 if (dma_mapping_error(dev, *dma_addr))
bfe69ef94aeeae7 Christoph Hellwig 2019-08-14 159 goto error_free_page;
5be73b690875f7e Jérôme Glisse 2018-07-26 160
f8477ce6b5923ef Ralph Campbell 2020-07-23 161 svmm = spage->zone_device_data;
f8477ce6b5923ef Ralph Campbell 2020-07-23 162 mutex_lock(&svmm->mutex);
f8477ce6b5923ef Ralph Campbell 2020-07-23 163 nouveau_svmm_invalidate(svmm, args->start, args->end);
bfe69ef94aeeae7 Christoph Hellwig 2019-08-14 164 if (drm->dmem->migrate.copy_func(drm, 1, NOUVEAU_APER_HOST, *dma_addr,
bfe69ef94aeeae7 Christoph Hellwig 2019-08-14 165 NOUVEAU_APER_VRAM, nouveau_dmem_page_addr(spage)))
bfe69ef94aeeae7 Christoph Hellwig 2019-08-14 166 goto error_dma_unmap;
f8477ce6b5923ef Ralph Campbell 2020-07-23 167 mutex_unlock(&svmm->mutex);
5be73b690875f7e Jérôme Glisse 2018-07-26 168
bfe69ef94aeeae7 Christoph Hellwig 2019-08-14 @169 args->dst[0] = migrate_pfn(page_to_pfn(dpage)) | MIGRATE_PFN_LOCKED;
bfe69ef94aeeae7 Christoph Hellwig 2019-08-14 170 return 0;
a788ade4f6e0302 Ben Skeggs 2019-02-15 171
bfe69ef94aeeae7 Christoph Hellwig 2019-08-14 172 error_dma_unmap:
f8477ce6b5923ef Ralph Campbell 2020-07-23 173 mutex_unlock(&svmm->mutex);
bfe69ef94aeeae7 Christoph Hellwig 2019-08-14 174 dma_unmap_page(dev, *dma_addr, PAGE_SIZE, DMA_BIDIRECTIONAL);
bfe69ef94aeeae7 Christoph Hellwig 2019-08-14 175 error_free_page:
5be73b690875f7e Jérôme Glisse 2018-07-26 176 __free_page(dpage);
bfe69ef94aeeae7 Christoph Hellwig 2019-08-14 177 return VM_FAULT_SIGBUS;
5be73b690875f7e Jérôme Glisse 2018-07-26 178 }
5be73b690875f7e Jérôme Glisse 2018-07-26 179
4239f267e3cd31e Christoph Hellwig 2019-06-26 180 static vm_fault_t nouveau_dmem_migrate_to_ram(struct vm_fault *vmf)
5be73b690875f7e Jérôme Glisse 2018-07-26 181 {
1d7f940c3a16623 Ralph Campbell 2020-04-21 182 struct nouveau_drm *drm = page_to_drm(vmf->page);
1d7f940c3a16623 Ralph Campbell 2020-04-21 183 struct nouveau_dmem *dmem = drm->dmem;
bfe69ef94aeeae7 Christoph Hellwig 2019-08-14 184 struct nouveau_fence *fence;
bfe69ef94aeeae7 Christoph Hellwig 2019-08-14 185 unsigned long src = 0, dst = 0;
bfe69ef94aeeae7 Christoph Hellwig 2019-08-14 186 dma_addr_t dma_addr = 0;
bfe69ef94aeeae7 Christoph Hellwig 2019-08-14 187 vm_fault_t ret;
a7d1f22bb74f32c Christoph Hellwig 2019-08-14 @188 struct migrate_vma args = {
a7d1f22bb74f32c Christoph Hellwig 2019-08-14 @189 .vma = vmf->vma,
a7d1f22bb74f32c Christoph Hellwig 2019-08-14 @190 .start = vmf->address,
a7d1f22bb74f32c Christoph Hellwig 2019-08-14 @191 .end = vmf->address + PAGE_SIZE,
bfe69ef94aeeae7 Christoph Hellwig 2019-08-14 @192 .src = &src,
bfe69ef94aeeae7 Christoph Hellwig 2019-08-14 @193 .dst = &dst,
5143192cd410c4f Ralph Campbell 2020-07-23 @194 .pgmap_owner = drm->dev,
5143192cd410c4f Ralph Campbell 2020-07-23 @195 .flags = MIGRATE_VMA_SELECT_DEVICE_PRIVATE,
a7d1f22bb74f32c Christoph Hellwig 2019-08-14 196 };
5be73b690875f7e Jérôme Glisse 2018-07-26 197
5be73b690875f7e Jérôme Glisse 2018-07-26 198 /*
5be73b690875f7e Jérôme Glisse 2018-07-26 199 * FIXME what we really want is to find some heuristic to migrate more
5be73b690875f7e Jérôme Glisse 2018-07-26 200 * than just one page on CPU fault. When such fault happens it is very
5be73b690875f7e Jérôme Glisse 2018-07-26 201 * likely that more surrounding page will CPU fault too.
5be73b690875f7e Jérôme Glisse 2018-07-26 202 */
a7d1f22bb74f32c Christoph Hellwig 2019-08-14 @203 if (migrate_vma_setup(&args) < 0)
5be73b690875f7e Jérôme Glisse 2018-07-26 204 return VM_FAULT_SIGBUS;
a7d1f22bb74f32c Christoph Hellwig 2019-08-14 205 if (!args.cpages)
a7d1f22bb74f32c Christoph Hellwig 2019-08-14 206 return 0;
a7d1f22bb74f32c Christoph Hellwig 2019-08-14 207
bfe69ef94aeeae7 Christoph Hellwig 2019-08-14 208 ret = nouveau_dmem_fault_copy_one(drm, vmf, &args, &dma_addr);
bfe69ef94aeeae7 Christoph Hellwig 2019-08-14 209 if (ret || dst == 0)
bfe69ef94aeeae7 Christoph Hellwig 2019-08-14 210 goto done;
5be73b690875f7e Jérôme Glisse 2018-07-26 211
bfe69ef94aeeae7 Christoph Hellwig 2019-08-14 212 nouveau_fence_new(dmem->migrate.chan, false, &fence);
bfe69ef94aeeae7 Christoph Hellwig 2019-08-14 @213 migrate_vma_pages(&args);
bfe69ef94aeeae7 Christoph Hellwig 2019-08-14 214 nouveau_dmem_fence_done(&fence);
bfe69ef94aeeae7 Christoph Hellwig 2019-08-14 215 dma_unmap_page(drm->dev->dev, dma_addr, PAGE_SIZE, DMA_BIDIRECTIONAL);
bfe69ef94aeeae7 Christoph Hellwig 2019-08-14 216 done:
a7d1f22bb74f32c Christoph Hellwig 2019-08-14 @217 migrate_vma_finalize(&args);
bfe69ef94aeeae7 Christoph Hellwig 2019-08-14 218 return ret;
5be73b690875f7e Jérôme Glisse 2018-07-26 219 }
5be73b690875f7e Jérôme Glisse 2018-07-26 220
:::::: The code at line 148 was first introduced by commit
:::::: bfe69ef94aeeae76531b8f37799b8ac6fca56957 nouveau: simplify nouveau_dmem_migrate_to_ram
:::::: TO: Christoph Hellwig <hch(a)lst.de>
:::::: CC: Jason Gunthorpe <jgg(a)mellanox.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[peterz-queue:sched/wip2 5/5] kernel/sched/core.c:6058:47: error: use of undeclared identifier 'SCA_CHECK'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/wip2
head: fb0089110c5e29151c75028add05458ad2bf8a68
commit: fb0089110c5e29151c75028add05458ad2bf8a68 [5/5] sched: Massage set_cpus_allowed
config: x86_64-randconfig-r026-20200916 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 9e3842d60351f986d77dfe0a94f76e4fd895f188)
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 fb0089110c5e29151c75028add05458ad2bf8a68
# 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 >>):
>> kernel/sched/core.c:6058:47: error: use of undeclared identifier 'SCA_CHECK'
retval = __set_cpus_allowed_ptr(p, new_mask, SCA_CHECK);
^
1 error generated.
# https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?...
git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue sched/wip2
git checkout fb0089110c5e29151c75028add05458ad2bf8a68
vim +/SCA_CHECK +6058 kernel/sched/core.c
5991
5992 long sched_setaffinity(pid_t pid, const struct cpumask *in_mask)
5993 {
5994 cpumask_var_t cpus_allowed, new_mask;
5995 struct task_struct *p;
5996 int retval;
5997
5998 rcu_read_lock();
5999
6000 p = find_process_by_pid(pid);
6001 if (!p) {
6002 rcu_read_unlock();
6003 return -ESRCH;
6004 }
6005
6006 /* Prevent p going away */
6007 get_task_struct(p);
6008 rcu_read_unlock();
6009
6010 if (p->flags & PF_NO_SETAFFINITY) {
6011 retval = -EINVAL;
6012 goto out_put_task;
6013 }
6014 if (!alloc_cpumask_var(&cpus_allowed, GFP_KERNEL)) {
6015 retval = -ENOMEM;
6016 goto out_put_task;
6017 }
6018 if (!alloc_cpumask_var(&new_mask, GFP_KERNEL)) {
6019 retval = -ENOMEM;
6020 goto out_free_cpus_allowed;
6021 }
6022 retval = -EPERM;
6023 if (!check_same_owner(p)) {
6024 rcu_read_lock();
6025 if (!ns_capable(__task_cred(p)->user_ns, CAP_SYS_NICE)) {
6026 rcu_read_unlock();
6027 goto out_free_new_mask;
6028 }
6029 rcu_read_unlock();
6030 }
6031
6032 retval = security_task_setscheduler(p);
6033 if (retval)
6034 goto out_free_new_mask;
6035
6036
6037 cpuset_cpus_allowed(p, cpus_allowed);
6038 cpumask_and(new_mask, in_mask, cpus_allowed);
6039
6040 /*
6041 * Since bandwidth control happens on root_domain basis,
6042 * if admission test is enabled, we only admit -deadline
6043 * tasks allowed to run on all the CPUs in the task's
6044 * root_domain.
6045 */
6046 #ifdef CONFIG_SMP
6047 if (task_has_dl_policy(p) && dl_bandwidth_enabled()) {
6048 rcu_read_lock();
6049 if (!cpumask_subset(task_rq(p)->rd->span, new_mask)) {
6050 retval = -EBUSY;
6051 rcu_read_unlock();
6052 goto out_free_new_mask;
6053 }
6054 rcu_read_unlock();
6055 }
6056 #endif
6057 again:
> 6058 retval = __set_cpus_allowed_ptr(p, new_mask, SCA_CHECK);
6059
6060 if (!retval) {
6061 cpuset_cpus_allowed(p, cpus_allowed);
6062 if (!cpumask_subset(new_mask, cpus_allowed)) {
6063 /*
6064 * We must have raced with a concurrent cpuset
6065 * update. Just reset the cpus_allowed to the
6066 * cpuset's cpus_allowed
6067 */
6068 cpumask_copy(new_mask, cpus_allowed);
6069 goto again;
6070 }
6071 }
6072 out_free_new_mask:
6073 free_cpumask_var(new_mask);
6074 out_free_cpus_allowed:
6075 free_cpumask_var(cpus_allowed);
6076 out_put_task:
6077 put_task_struct(p);
6078 return retval;
6079 }
6080
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years