drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:242:39: warning: initialized field overwritten
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 3fb6d0e00efc958d01c2f109c8453033a2d96796
commit: 688f97ed3f5e339c0c2c09d9ee7ff23d5807b0a7 drm/amd/display: Add vupdate_no_lock interrupts for DCN2.1
date: 4 days ago
config: i386-randconfig-r002-20210227 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/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 688f97ed3f5e339c0c2c09d9ee7ff23d5807b0a7
# 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 >>):
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:43:20: warning: no previous prototype for 'to_dal_irq_source_dcn21' [-Wmissing-prototypes]
43 | enum dc_irq_source to_dal_irq_source_dcn21(
| ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:242:39: warning: initialized field overwritten [-Woverride-init]
242 | [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
| ^~
243 | IRQ_REG_ENTRY(OTG, reg_num,\
|
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:242:39: note: in definition of macro 'vupdate_no_lock_int_entry'
242 | [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
| ^~
243 | IRQ_REG_ENTRY(OTG, reg_num,\
|
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:242:39: note: (near initialization for 'irq_source_info_dcn21[72]')
242 | [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
| ^~
243 | IRQ_REG_ENTRY(OTG, reg_num,\
|
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:242:39: note: in definition of macro 'vupdate_no_lock_int_entry'
242 | [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
| ^~
243 | IRQ_REG_ENTRY(OTG, reg_num,\
|
>> drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:242:39: warning: initialized field overwritten [-Woverride-init]
242 | [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
| ^~
243 | IRQ_REG_ENTRY(OTG, reg_num,\
|
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:242:39: note: in definition of macro 'vupdate_no_lock_int_entry'
242 | [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
| ^~
243 | IRQ_REG_ENTRY(OTG, reg_num,\
|
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:242:39: note: (near initialization for 'irq_source_info_dcn21[73]')
242 | [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
| ^~
243 | IRQ_REG_ENTRY(OTG, reg_num,\
|
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:242:39: note: in definition of macro 'vupdate_no_lock_int_entry'
242 | [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
| ^~
243 | IRQ_REG_ENTRY(OTG, reg_num,\
|
>> drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:242:39: warning: initialized field overwritten [-Woverride-init]
242 | [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
| ^~
243 | IRQ_REG_ENTRY(OTG, reg_num,\
|
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:242:39: note: in definition of macro 'vupdate_no_lock_int_entry'
242 | [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
| ^~
243 | IRQ_REG_ENTRY(OTG, reg_num,\
|
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:242:39: note: (near initialization for 'irq_source_info_dcn21[74]')
242 | [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
| ^~
243 | IRQ_REG_ENTRY(OTG, reg_num,\
|
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:242:39: note: in definition of macro 'vupdate_no_lock_int_entry'
242 | [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
| ^~
243 | IRQ_REG_ENTRY(OTG, reg_num,\
|
>> drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:242:39: warning: initialized field overwritten [-Woverride-init]
242 | [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
| ^~
243 | IRQ_REG_ENTRY(OTG, reg_num,\
|
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:242:39: note: in definition of macro 'vupdate_no_lock_int_entry'
242 | [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
| ^~
243 | IRQ_REG_ENTRY(OTG, reg_num,\
|
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:242:39: note: (near initialization for 'irq_source_info_dcn21[75]')
242 | [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
| ^~
243 | IRQ_REG_ENTRY(OTG, reg_num,\
|
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:242:39: note: in definition of macro 'vupdate_no_lock_int_entry'
242 | [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
| ^~
243 | IRQ_REG_ENTRY(OTG, reg_num,\
|
>> drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:242:39: warning: initialized field overwritten [-Woverride-init]
242 | [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
| ^~
243 | IRQ_REG_ENTRY(OTG, reg_num,\
|
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:242:39: note: in definition of macro 'vupdate_no_lock_int_entry'
242 | [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
| ^~
243 | IRQ_REG_ENTRY(OTG, reg_num,\
|
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:242:39: note: (near initialization for 'irq_source_info_dcn21[76]')
242 | [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
| ^~
243 | IRQ_REG_ENTRY(OTG, reg_num,\
|
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:242:39: note: in definition of macro 'vupdate_no_lock_int_entry'
242 | [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
| ^~
243 | IRQ_REG_ENTRY(OTG, reg_num,\
|
>> drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:242:39: warning: initialized field overwritten [-Woverride-init]
242 | [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
| ^~
243 | IRQ_REG_ENTRY(OTG, reg_num,\
|
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:242:39: note: in definition of macro 'vupdate_no_lock_int_entry'
242 | [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
| ^~
243 | IRQ_REG_ENTRY(OTG, reg_num,\
|
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:242:39: note: (near initialization for 'irq_source_info_dcn21[77]')
242 | [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
| ^~
243 | IRQ_REG_ENTRY(OTG, reg_num,\
|
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:242:39: note: in definition of macro 'vupdate_no_lock_int_entry'
242 | [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
| ^~
243 | IRQ_REG_ENTRY(OTG, reg_num,\
|
vim +242 drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c
178
179 /* compile time expand base address. */
180 #define BASE(seg) \
181 BASE_INNER(seg)
182
183
184 #define SRI(reg_name, block, id)\
185 BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \
186 mm ## block ## id ## _ ## reg_name
187
188
189 #define IRQ_REG_ENTRY(block, reg_num, reg1, mask1, reg2, mask2)\
190 .enable_reg = SRI(reg1, block, reg_num),\
191 .enable_mask = \
192 block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK,\
193 .enable_value = {\
194 block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK,\
195 ~block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK \
196 },\
197 .ack_reg = SRI(reg2, block, reg_num),\
198 .ack_mask = \
199 block ## reg_num ## _ ## reg2 ## __ ## mask2 ## _MASK,\
200 .ack_value = \
201 block ## reg_num ## _ ## reg2 ## __ ## mask2 ## _MASK \
202
203
204
205 #define hpd_int_entry(reg_num)\
206 [DC_IRQ_SOURCE_HPD1 + reg_num] = {\
207 IRQ_REG_ENTRY(HPD, reg_num,\
208 DC_HPD_INT_CONTROL, DC_HPD_INT_EN,\
209 DC_HPD_INT_CONTROL, DC_HPD_INT_ACK),\
210 .status_reg = SRI(DC_HPD_INT_STATUS, HPD, reg_num),\
211 .funcs = &hpd_irq_info_funcs\
212 }
213
214 #define hpd_rx_int_entry(reg_num)\
215 [DC_IRQ_SOURCE_HPD1RX + reg_num] = {\
216 IRQ_REG_ENTRY(HPD, reg_num,\
217 DC_HPD_INT_CONTROL, DC_HPD_RX_INT_EN,\
218 DC_HPD_INT_CONTROL, DC_HPD_RX_INT_ACK),\
219 .status_reg = SRI(DC_HPD_INT_STATUS, HPD, reg_num),\
220 .funcs = &hpd_rx_irq_info_funcs\
221 }
222 #define pflip_int_entry(reg_num)\
223 [DC_IRQ_SOURCE_PFLIP1 + reg_num] = {\
224 IRQ_REG_ENTRY(HUBPREQ, reg_num,\
225 DCSURF_SURFACE_FLIP_INTERRUPT, SURFACE_FLIP_INT_MASK,\
226 DCSURF_SURFACE_FLIP_INTERRUPT, SURFACE_FLIP_CLEAR),\
227 .funcs = &pflip_irq_info_funcs\
228 }
229
230 #define vupdate_int_entry(reg_num)\
231 [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
232 IRQ_REG_ENTRY(OTG, reg_num,\
233 OTG_GLOBAL_SYNC_STATUS, VUPDATE_INT_EN,\
234 OTG_GLOBAL_SYNC_STATUS, VUPDATE_EVENT_CLEAR),\
235 .funcs = &vblank_irq_info_funcs\
236 }
237
238 /* vupdate_no_lock_int_entry maps to DC_IRQ_SOURCE_VUPDATEx, to match semantic
239 * of DCE's DC_IRQ_SOURCE_VUPDATEx.
240 */
241 #define vupdate_no_lock_int_entry(reg_num)\
> 242 [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
243 IRQ_REG_ENTRY(OTG, reg_num,\
244 OTG_GLOBAL_SYNC_STATUS, VUPDATE_NO_LOCK_INT_EN,\
245 OTG_GLOBAL_SYNC_STATUS, VUPDATE_NO_LOCK_EVENT_CLEAR),\
246 .funcs = &vupdate_no_lock_irq_info_funcs\
247 }
248
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
arch/arm/boot/compressed/fdt_check_mem_start.c:62:10: warning: no previous prototype for function 'fdt_check_mem_start'
by kernel test robot
Hi Geert,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 3fb6d0e00efc958d01c2f109c8453033a2d96796
commit: 0673cb38951215060d7993b43ad3c45cd413c2c3 ARM: 9045/1: uncompress: Validate start of physical memory against passed DTB
date: 4 weeks ago
config: arm-randconfig-r003-20210226 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project b889ef4214bc6dc8880fdd4badc0dcd9a3197753)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://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 0673cb38951215060d7993b43ad3c45cd413c2c3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> arch/arm/boot/compressed/fdt_check_mem_start.c:62:10: warning: no previous prototype for function 'fdt_check_mem_start' [-Wmissing-prototypes]
uint32_t fdt_check_mem_start(uint32_t mem_start, const void *fdt)
^
arch/arm/boot/compressed/fdt_check_mem_start.c:62:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
uint32_t fdt_check_mem_start(uint32_t mem_start, const void *fdt)
^
static
1 warning generated.
vim +/fdt_check_mem_start +62 arch/arm/boot/compressed/fdt_check_mem_start.c
46
47 /*
48 * Check the start of physical memory
49 *
50 * Traditionally, the start address of physical memory is obtained by masking
51 * the program counter. However, this does require that this address is a
52 * multiple of 128 MiB, precluding booting Linux on platforms where this
53 * requirement is not fulfilled.
54 * Hence validate the calculated address against the memory information in the
55 * DTB, and, if out-of-range, replace it by the real start address.
56 * To preserve backwards compatibility (systems reserving a block of memory
57 * at the start of physical memory, kdump, ...), the traditional method is
58 * always used if it yields a valid address.
59 *
60 * Return value: start address of physical memory to use
61 */
> 62 uint32_t fdt_check_mem_start(uint32_t mem_start, const void *fdt)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
[linux-stable-rc:linux-4.19.y 6064/9999] undefined reference to `atmel_sha_authenc_is_ready'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
head: e864f43593ccf9180c61738abdf1c1dde091367d
commit: 716f9563c3b52afa85b4e3b1a38e533e34832b7d [6064/9999] crypto: atmel - Fix authenc support when it is set to m
config: parisc-randconfig-r002-20210227 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gi...
git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git fetch --no-tags linux-stable-rc linux-4.19.y
git checkout 716f9563c3b52afa85b4e3b1a38e533e34832b7d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
hppa-linux-ld: drivers/crypto/atmel-aes.o: in function `atmel_aes_authenc_complete':
>> (.text+0x5ec): undefined reference to `atmel_sha_authenc_abort'
hppa-linux-ld: drivers/crypto/atmel-aes.o: in function `atmel_aes_authenc_init_tfm':
>> (.text+0x17ac): undefined reference to `atmel_sha_authenc_get_reqsize'
>> hppa-linux-ld: (.text+0x17b8): undefined reference to `atmel_sha_authenc_spawn'
hppa-linux-ld: drivers/crypto/atmel-aes.o: in function `atmel_aes_authenc_start':
>> (.text+0x1a18): undefined reference to `atmel_sha_authenc_schedule'
hppa-linux-ld: drivers/crypto/atmel-aes.o: in function `atmel_aes_authenc_init':
>> (.text+0x1ba8): undefined reference to `atmel_sha_authenc_init'
hppa-linux-ld: drivers/crypto/atmel-aes.o: in function `atmel_aes_authenc_digest':
>> (.text+0x1c28): undefined reference to `atmel_sha_authenc_final'
hppa-linux-ld: drivers/crypto/atmel-aes.o: in function `atmel_aes_authenc_exit_tfm':
>> (.text+0x1c70): undefined reference to `atmel_sha_authenc_free'
hppa-linux-ld: drivers/crypto/atmel-aes.o: in function `atmel_aes_authenc_setkey':
>> (.text+0x1ccc): undefined reference to `crypto_authenc_extractkeys'
>> hppa-linux-ld: (.text+0x1cf8): undefined reference to `atmel_sha_authenc_setkey'
hppa-linux-ld: drivers/crypto/atmel-aes.o: in function `atmel_aes_probe':
>> (.text+0x2b94): undefined reference to `atmel_sha_authenc_is_ready'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
[lee-linaro:tb-fix-w1-warnings 215/226] drivers/scsi/bfa/bfa_fcs_lport.c:1912 bfa_fcs_lport_fdmi_build_rhba_pyld() warn: signedness bug returning '(-12)'
by Dan Carpenter
Hi Lee,
First bad commit (maybe != root cause):
tree: https://git.linaro.org/people/lee.jones/linux.git tb-fix-w1-warnings
head: 49fe493a5f7cebaec70944df919df3350d4cb520
commit: ffdcc79844033bab9aae2f65246b91334831ee11 [215/226] fixup! scsi: bfa: bfa_fcs_lport: Move a large struct from the stack onto the heap
config: xtensa-randconfig-m031-20210227 (attached as .config)
compiler: xtensa-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/scsi/bfa/bfa_fcs_lport.c:1912 bfa_fcs_lport_fdmi_build_rhba_pyld() warn: signedness bug returning '(-12)'
vim +1912 drivers/scsi/bfa/bfa_fcs_lport.c
a36c61f9025b8924 Krishna Gudipati 2010-09-15 1899 static u16
^^^
a36c61f9025b8924 Krishna Gudipati 2010-09-15 1900 bfa_fcs_lport_fdmi_build_rhba_pyld(struct bfa_fcs_lport_fdmi_s *fdmi, u8 *pyld)
a36c61f9025b8924 Krishna Gudipati 2010-09-15 1901 {
a36c61f9025b8924 Krishna Gudipati 2010-09-15 1902 struct bfa_fcs_lport_s *port = fdmi->ms->port;
ffdcc79844033bab Lee Jones 2021-02-26 1903 struct bfa_fcs_fdmi_hba_attr_s *fcs_hba_attr;
a36c61f9025b8924 Krishna Gudipati 2010-09-15 1904 struct fdmi_rhba_s *rhba = (struct fdmi_rhba_s *) pyld;
a36c61f9025b8924 Krishna Gudipati 2010-09-15 1905 struct fdmi_attr_s *attr;
a36c61f9025b8924 Krishna Gudipati 2010-09-15 1906 u8 *curr_ptr;
a36c61f9025b8924 Krishna Gudipati 2010-09-15 1907 u16 len, count;
50444a340028119c Maggie 2010-11-29 1908 u16 templen;
a36c61f9025b8924 Krishna Gudipati 2010-09-15 1909
ffdcc79844033bab Lee Jones 2021-02-26 1910 fcs_hba_attr = kzalloc(sizeof(*fcs_hba_attr), GFP_KERNEL);
ffdcc79844033bab Lee Jones 2021-02-26 1911 if (!fcs_hba_attr)
7ba45b2cf0939bf6 Lee Jones 2021-02-25 @1912 return -ENOMEM;
^^^^^^^^^^^^^^^
-ENOMEM gets truncated to u16
7ba45b2cf0939bf6 Lee Jones 2021-02-25 1913
a36c61f9025b8924 Krishna Gudipati 2010-09-15 1914 /*
a36c61f9025b8924 Krishna Gudipati 2010-09-15 1915 * get hba attributes
a36c61f9025b8924 Krishna Gudipati 2010-09-15 1916 */
a36c61f9025b8924 Krishna Gudipati 2010-09-15 1917 bfa_fcs_fdmi_get_hbaattr(fdmi, fcs_hba_attr);
a36c61f9025b8924 Krishna Gudipati 2010-09-15 1918
a36c61f9025b8924 Krishna Gudipati 2010-09-15 1919 rhba->hba_id = bfa_fcs_lport_get_pwwn(port);
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
arch/powerpc/sysdev/xive/common.c:279 xmon_xive_get_irq_config() warn: variable dereferenced before check 'd' (see line 261)
by Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8b83369ddcb3fb9cab5c1088987ce477565bb630
commit: 97ef275077932c65b1b8ec5022abd737a9fbf3e0 powerpc/xive: Fix xmon support on the PowerNV platform
config: powerpc64-randconfig-m031-20210226 (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
arch/powerpc/sysdev/xive/common.c:279 xmon_xive_get_irq_config() warn: variable dereferenced before check 'd' (see line 261)
vim +/d +279 arch/powerpc/sysdev/xive/common.c
5896163f7f91c05 Cédric Le Goater 2019-09-10 259 int xmon_xive_get_irq_config(u32 hw_irq, struct irq_data *d)
b4868ff55d082bc Cédric Le Goater 2019-08-14 260 {
97ef275077932c6 Cédric Le Goater 2020-03-06 @261 struct irq_chip *chip = irq_data_get_irq_chip(d);
^
Dereferenced inside function
5896163f7f91c05 Cédric Le Goater 2019-09-10 262 int rc;
5896163f7f91c05 Cédric Le Goater 2019-09-10 263 u32 target;
5896163f7f91c05 Cédric Le Goater 2019-09-10 264 u8 prio;
5896163f7f91c05 Cédric Le Goater 2019-09-10 265 u32 lirq;
5896163f7f91c05 Cédric Le Goater 2019-09-10 266
97ef275077932c6 Cédric Le Goater 2020-03-06 267 if (!is_xive_irq(chip))
97ef275077932c6 Cédric Le Goater 2020-03-06 268 return -EINVAL;
97ef275077932c6 Cédric Le Goater 2020-03-06 269
5896163f7f91c05 Cédric Le Goater 2019-09-10 270 rc = xive_ops->get_irq_config(hw_irq, &target, &prio, &lirq);
5896163f7f91c05 Cédric Le Goater 2019-09-10 271 if (rc) {
5896163f7f91c05 Cédric Le Goater 2019-09-10 272 xmon_printf("IRQ 0x%08x : no config rc=%d\n", hw_irq, rc);
5896163f7f91c05 Cédric Le Goater 2019-09-10 273 return rc;
5896163f7f91c05 Cédric Le Goater 2019-09-10 274 }
5896163f7f91c05 Cédric Le Goater 2019-09-10 275
5896163f7f91c05 Cédric Le Goater 2019-09-10 276 xmon_printf("IRQ 0x%08x : target=0x%x prio=%02x lirq=0x%x ",
5896163f7f91c05 Cédric Le Goater 2019-09-10 277 hw_irq, target, prio, lirq);
5896163f7f91c05 Cédric Le Goater 2019-09-10 278
5896163f7f91c05 Cédric Le Goater 2019-09-10 @279 if (d) {
^^^^^^
Checked too late
5896163f7f91c05 Cédric Le Goater 2019-09-10 280 struct xive_irq_data *xd = irq_data_get_irq_handler_data(d);
5896163f7f91c05 Cédric Le Goater 2019-09-10 281 u64 val = xive_esb_read(xd, XIVE_ESB_GET);
5896163f7f91c05 Cédric Le Goater 2019-09-10 282
5896163f7f91c05 Cédric Le Goater 2019-09-10 283 xmon_printf("PQ=%c%c",
5896163f7f91c05 Cédric Le Goater 2019-09-10 284 val & XIVE_ESB_VAL_P ? 'P' : '-',
5896163f7f91c05 Cédric Le Goater 2019-09-10 285 val & XIVE_ESB_VAL_Q ? 'Q' : '-');
5896163f7f91c05 Cédric Le Goater 2019-09-10 286 }
5896163f7f91c05 Cédric Le Goater 2019-09-10 287
5896163f7f91c05 Cédric Le Goater 2019-09-10 288 xmon_printf("\n");
5896163f7f91c05 Cédric Le Goater 2019-09-10 289 return 0;
b4868ff55d082bc Cédric Le Goater 2019-08-14 290 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
[ardb:arm64-ro-page-tables-pkvm 34/57] kernel/poke.c:13:23: error: implicit declaration of function 'phys_to_virt'
by kernel test robot
Hi Quentin,
FYI, the error/warning still remains.
tree: git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git arm64-ro-page-tables-pkvm
head: c5266cc8ebfbdcc7e1ea856a82beb017d0a4f611
commit: c75121a984d82981c73f4c7d3f0eb3c9c5b6ed4c [34/57] [DEBUG] poke: Add sysctl to poke abitrary PAs
config: s390-randconfig-r025-20210226 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project b889ef4214bc6dc8880fdd4badc0dcd9a3197753)
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 s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git/commit/?id...
git remote add ardb git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git
git fetch --no-tags ardb arm64-ro-page-tables-pkvm
git checkout c75121a984d82981c73f4c7d3f0eb3c9c5b6ed4c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390
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 >>):
>> kernel/poke.c:13:23: error: implicit declaration of function 'phys_to_virt' [-Werror,-Wimplicit-function-declaration]
unsigned long *ptr = phys_to_virt(phys);
^
>> kernel/poke.c:13:17: warning: incompatible integer to pointer conversion initializing 'unsigned long *' with an expression of type 'int' [-Wint-conversion]
unsigned long *ptr = phys_to_virt(phys);
^ ~~~~~~~~~~~~~~~~~~
kernel/poke.c:21:23: error: implicit declaration of function 'phys_to_virt' [-Werror,-Wimplicit-function-declaration]
unsigned long *ptr = phys_to_virt(phys);
^
kernel/poke.c:21:17: warning: incompatible integer to pointer conversion initializing 'unsigned long *' with an expression of type 'int' [-Wint-conversion]
unsigned long *ptr = phys_to_virt(phys);
^ ~~~~~~~~~~~~~~~~~~
2 warnings and 2 errors generated.
vim +/phys_to_virt +13 kernel/poke.c
10
11 static ssize_t val_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf)
12 {
> 13 unsigned long *ptr = phys_to_virt(phys);
14
15 return sprintf(buf, "0x%lx\n", *ptr);
16 }
17
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
arch/sh/kernel/ftrace.c:274:25: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 3fb6d0e00efc958d01c2f109c8453033a2d96796
commit: e5fc436f06eef54ef512ea55a9db8eb9f2e76959 sparse: use static inline for __chk_{user,io}_ptr()
date: 6 months ago
config: sh-randconfig-s031-20210227 (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-241-geaceeafa-dirty
# 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 e5fc436f06eef54ef512ea55a9db8eb9f2e76959
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=sh
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"sparse warnings: (new ones prefixed by >>)"
arch/sh/kernel/ftrace.c:50:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned char * @@
arch/sh/kernel/ftrace.c:50:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/ftrace.c:50:9: sparse: got unsigned char *
arch/sh/kernel/ftrace.c:57:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned char * @@
arch/sh/kernel/ftrace.c:57:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/ftrace.c:57:9: sparse: got unsigned char *
>> arch/sh/kernel/ftrace.c:274:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long * @@
arch/sh/kernel/ftrace.c:274:25: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/ftrace.c:274:25: sparse: got unsigned long *
>> arch/sh/kernel/ftrace.c:277:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long ip @@
arch/sh/kernel/ftrace.c:277:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/ftrace.c:277:9: sparse: got unsigned long ip
arch/sh/kernel/ftrace.c:368:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long *parent @@
arch/sh/kernel/ftrace.c:368:17: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/ftrace.c:368:17: sparse: got unsigned long *parent
vim +274 arch/sh/kernel/ftrace.c
327933f5d6cdf0 Matt Fleming 2009-07-11 265
327933f5d6cdf0 Matt Fleming 2009-07-11 266 static int ftrace_mod(unsigned long ip, unsigned long old_addr,
327933f5d6cdf0 Matt Fleming 2009-07-11 267 unsigned long new_addr)
327933f5d6cdf0 Matt Fleming 2009-07-11 268 {
327933f5d6cdf0 Matt Fleming 2009-07-11 269 unsigned char code[MCOUNT_INSN_SIZE];
327933f5d6cdf0 Matt Fleming 2009-07-11 270
fe557319aa06c2 Christoph Hellwig 2020-06-17 271 if (copy_from_kernel_nofault(code, (void *)ip, MCOUNT_INSN_SIZE))
327933f5d6cdf0 Matt Fleming 2009-07-11 272 return -EFAULT;
327933f5d6cdf0 Matt Fleming 2009-07-11 273
327933f5d6cdf0 Matt Fleming 2009-07-11 @274 if (old_addr != __raw_readl((unsigned long *)code))
327933f5d6cdf0 Matt Fleming 2009-07-11 275 return -EINVAL;
327933f5d6cdf0 Matt Fleming 2009-07-11 276
327933f5d6cdf0 Matt Fleming 2009-07-11 @277 __raw_writel(new_addr, ip);
327933f5d6cdf0 Matt Fleming 2009-07-11 278 return 0;
327933f5d6cdf0 Matt Fleming 2009-07-11 279 }
327933f5d6cdf0 Matt Fleming 2009-07-11 280
:::::: The code at line 274 was first introduced by commit
:::::: 327933f5d6cdf083284d3c06e0370d1de464aef4 sh: Function graph tracer support
:::::: TO: Matt Fleming <matt(a)console-pimps.org>
:::::: CC: Paul Mundt <lethal(a)linux-sh.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
[ardb:arm64-ro-page-tables-pkvm 3/18] mm/huge_memory.c:2191:48: error: passing argument 1 of 'page_to_phys' from incompatible pointer type
by kernel test robot
tree: git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git arm64-ro-page-tables-pkvm
head: c5266cc8ebfbdcc7e1ea856a82beb017d0a4f611
commit: 59ebe17c5fd61622da88cab6da5079414a207885 [3/18] mm: HACK provide target address when migrating a PMD entry
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
# https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git/commit/?id...
git remote add ardb git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git
git fetch --no-tags ardb arm64-ro-page-tables-pkvm
git checkout 59ebe17c5fd61622da88cab6da5079414a207885
# 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 >>):
In file included from include/linux/byteorder/big_endian.h:5,
from arch/powerpc/include/uapi/asm/byteorder.h:14,
from include/asm-generic/bitops/le.h:6,
from arch/powerpc/include/asm/bitops.h:265,
from include/linux/bitops.h:32,
from include/linux/kernel.h:11,
from include/asm-generic/bug.h:20,
from arch/powerpc/include/asm/bug.h:109,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/mm.h:9,
from mm/huge_memory.c:8:
mm/huge_memory.c: In function '__split_huge_pmd_locked':
>> mm/huge_memory.c:2191:48: error: passing argument 1 of 'page_to_phys' from incompatible pointer type [-Werror=incompatible-pointer-types]
2191 | set_pmd_at(mm, haddr, pmd, __pmd(page_to_phys(pgtable) | PMD_TYPE_TABLE));
| ^~~~~~~
| |
| pgtable_t {aka struct <anonymous> *}
include/uapi/linux/byteorder/big_endian.h:37:51: note: in definition of macro '__cpu_to_be64'
37 | #define __cpu_to_be64(x) ((__force __be64)(__u64)(x))
| ^
mm/huge_memory.c:2191:29: note: in expansion of macro '__pmd'
2191 | set_pmd_at(mm, haddr, pmd, __pmd(page_to_phys(pgtable) | PMD_TYPE_TABLE));
| ^~~~~
In file included from include/linux/io.h:13,
from include/linux/irq.h:20,
from arch/powerpc/include/asm/hardirq.h:6,
from include/linux/hardirq.h:10,
from include/linux/highmem.h:10,
from mm/huge_memory.c:12:
arch/powerpc/include/asm/io.h:938:53: note: expected 'struct page *' but argument is of type 'pgtable_t' {aka 'struct <anonymous> *'}
938 | static inline phys_addr_t page_to_phys(struct page *page)
| ~~~~~~~~~~~~~^~~~
In file included from include/linux/byteorder/big_endian.h:5,
from arch/powerpc/include/uapi/asm/byteorder.h:14,
from include/asm-generic/bitops/le.h:6,
from arch/powerpc/include/asm/bitops.h:265,
from include/linux/bitops.h:32,
from include/linux/kernel.h:11,
from include/asm-generic/bug.h:20,
from arch/powerpc/include/asm/bug.h:109,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/mm.h:9,
from mm/huge_memory.c:8:
>> mm/huge_memory.c:2191:59: error: 'PMD_TYPE_TABLE' undeclared (first use in this function)
2191 | set_pmd_at(mm, haddr, pmd, __pmd(page_to_phys(pgtable) | PMD_TYPE_TABLE));
| ^~~~~~~~~~~~~~
include/uapi/linux/byteorder/big_endian.h:37:51: note: in definition of macro '__cpu_to_be64'
37 | #define __cpu_to_be64(x) ((__force __be64)(__u64)(x))
| ^
mm/huge_memory.c:2191:29: note: in expansion of macro '__pmd'
2191 | set_pmd_at(mm, haddr, pmd, __pmd(page_to_phys(pgtable) | PMD_TYPE_TABLE));
| ^~~~~
mm/huge_memory.c:2191:59: note: each undeclared identifier is reported only once for each function it appears in
2191 | set_pmd_at(mm, haddr, pmd, __pmd(page_to_phys(pgtable) | PMD_TYPE_TABLE));
| ^~~~~~~~~~~~~~
include/uapi/linux/byteorder/big_endian.h:37:51: note: in definition of macro '__cpu_to_be64'
37 | #define __cpu_to_be64(x) ((__force __be64)(__u64)(x))
| ^
mm/huge_memory.c:2191:29: note: in expansion of macro '__pmd'
2191 | set_pmd_at(mm, haddr, pmd, __pmd(page_to_phys(pgtable) | PMD_TYPE_TABLE));
| ^~~~~
cc1: some warnings being treated as errors
vim +/page_to_phys +2191 mm/huge_memory.c
2027
2028 static void __split_huge_pmd_locked(struct vm_area_struct *vma, pmd_t *pmd,
2029 unsigned long haddr, bool freeze)
2030 {
2031 struct mm_struct *mm = vma->vm_mm;
2032 struct page *page;
2033 pgtable_t pgtable;
2034 pmd_t old_pmd, _pmd;
2035 bool young, write, soft_dirty, pmd_migration = false, uffd_wp = false;
2036 unsigned long addr;
2037 int i;
2038
2039 VM_BUG_ON(haddr & ~HPAGE_PMD_MASK);
2040 VM_BUG_ON_VMA(vma->vm_start > haddr, vma);
2041 VM_BUG_ON_VMA(vma->vm_end < haddr + HPAGE_PMD_SIZE, vma);
2042 VM_BUG_ON(!is_pmd_migration_entry(*pmd) && !pmd_trans_huge(*pmd)
2043 && !pmd_devmap(*pmd));
2044
2045 count_vm_event(THP_SPLIT_PMD);
2046
2047 if (!vma_is_anonymous(vma)) {
2048 _pmd = pmdp_huge_clear_flush_notify(vma, haddr, pmd);
2049 /*
2050 * We are going to unmap this huge page. So
2051 * just go ahead and zap it
2052 */
2053 if (arch_needs_pgtable_deposit())
2054 zap_deposited_table(mm, pmd);
2055 if (vma_is_special_huge(vma))
2056 return;
2057 page = pmd_page(_pmd);
2058 if (!PageDirty(page) && pmd_dirty(_pmd))
2059 set_page_dirty(page);
2060 if (!PageReferenced(page) && pmd_young(_pmd))
2061 SetPageReferenced(page);
2062 page_remove_rmap(page, true);
2063 put_page(page);
2064 add_mm_counter(mm, mm_counter_file(page), -HPAGE_PMD_NR);
2065 return;
2066 } else if (pmd_trans_huge(*pmd) && is_huge_zero_pmd(*pmd)) {
2067 /*
2068 * FIXME: Do we want to invalidate secondary mmu by calling
2069 * mmu_notifier_invalidate_range() see comments below inside
2070 * __split_huge_pmd() ?
2071 *
2072 * We are going from a zero huge page write protected to zero
2073 * small page also write protected so it does not seems useful
2074 * to invalidate secondary mmu at this time.
2075 */
2076 return __split_huge_zero_page_pmd(vma, haddr, pmd);
2077 }
2078
2079 /*
2080 * Up to this point the pmd is present and huge and userland has the
2081 * whole access to the hugepage during the split (which happens in
2082 * place). If we overwrite the pmd with the not-huge version pointing
2083 * to the pte here (which of course we could if all CPUs were bug
2084 * free), userland could trigger a small page size TLB miss on the
2085 * small sized TLB while the hugepage TLB entry is still established in
2086 * the huge TLB. Some CPU doesn't like that.
2087 * See http://support.amd.com/TechDocs/41322_10h_Rev_Gd.pdf, Erratum
2088 * 383 on page 105. Intel should be safe but is also warns that it's
2089 * only safe if the permission and cache attributes of the two entries
2090 * loaded in the two TLB is identical (which should be the case here).
2091 * But it is generally safer to never allow small and huge TLB entries
2092 * for the same virtual address to be loaded simultaneously. So instead
2093 * of doing "pmd_populate(); flush_pmd_tlb_range();" we first mark the
2094 * current pmd notpresent (atomically because here the pmd_trans_huge
2095 * must remain set at all times on the pmd until the split is complete
2096 * for this pmd), then we flush the SMP TLB and finally we write the
2097 * non-huge version of the pmd entry with pmd_populate.
2098 */
2099 old_pmd = pmdp_invalidate(vma, haddr, pmd);
2100
2101 pmd_migration = is_pmd_migration_entry(old_pmd);
2102 if (unlikely(pmd_migration)) {
2103 swp_entry_t entry;
2104
2105 entry = pmd_to_swp_entry(old_pmd);
2106 page = pfn_to_page(swp_offset(entry));
2107 write = is_write_migration_entry(entry);
2108 young = false;
2109 soft_dirty = pmd_swp_soft_dirty(old_pmd);
2110 uffd_wp = pmd_swp_uffd_wp(old_pmd);
2111 } else {
2112 page = pmd_page(old_pmd);
2113 if (pmd_dirty(old_pmd))
2114 SetPageDirty(page);
2115 write = pmd_write(old_pmd);
2116 young = pmd_young(old_pmd);
2117 soft_dirty = pmd_soft_dirty(old_pmd);
2118 uffd_wp = pmd_uffd_wp(old_pmd);
2119 }
2120 VM_BUG_ON_PAGE(!page_count(page), page);
2121 page_ref_add(page, HPAGE_PMD_NR - 1);
2122
2123 /*
2124 * Withdraw the table only after we mark the pmd entry invalid.
2125 * This's critical for some architectures (Power).
2126 */
2127 pgtable = pgtable_trans_huge_withdraw(mm, pmd);
2128 pmd_populate(mm, &_pmd, pgtable);
2129
2130 for (i = 0, addr = haddr; i < HPAGE_PMD_NR; i++, addr += PAGE_SIZE) {
2131 pte_t entry, *pte;
2132 /*
2133 * Note that NUMA hinting access restrictions are not
2134 * transferred to avoid any possibility of altering
2135 * permissions across VMAs.
2136 */
2137 if (freeze || pmd_migration) {
2138 swp_entry_t swp_entry;
2139 swp_entry = make_migration_entry(page + i, write);
2140 entry = swp_entry_to_pte(swp_entry);
2141 if (soft_dirty)
2142 entry = pte_swp_mksoft_dirty(entry);
2143 if (uffd_wp)
2144 entry = pte_swp_mkuffd_wp(entry);
2145 } else {
2146 entry = mk_pte(page + i, READ_ONCE(vma->vm_page_prot));
2147 entry = maybe_mkwrite(entry, vma);
2148 if (!write)
2149 entry = pte_wrprotect(entry);
2150 if (!young)
2151 entry = pte_mkold(entry);
2152 if (soft_dirty)
2153 entry = pte_mksoft_dirty(entry);
2154 if (uffd_wp)
2155 entry = pte_mkuffd_wp(entry);
2156 }
2157 pte = pte_offset_map(&_pmd, addr);
2158 BUG_ON(!pte_none(*pte));
2159 set_pte_at(mm, addr, pte, entry);
2160 if (!pmd_migration)
2161 atomic_inc(&page[i]._mapcount);
2162 pte_unmap(pte);
2163 }
2164
2165 if (!pmd_migration) {
2166 /*
2167 * Set PG_double_map before dropping compound_mapcount to avoid
2168 * false-negative page_mapped().
2169 */
2170 if (compound_mapcount(page) > 1 &&
2171 !TestSetPageDoubleMap(page)) {
2172 for (i = 0; i < HPAGE_PMD_NR; i++)
2173 atomic_inc(&page[i]._mapcount);
2174 }
2175
2176 lock_page_memcg(page);
2177 if (atomic_add_negative(-1, compound_mapcount_ptr(page))) {
2178 /* Last compound_mapcount is gone. */
2179 __dec_lruvec_page_state(page, NR_ANON_THPS);
2180 if (TestClearPageDoubleMap(page)) {
2181 /* No need in mapcount reference anymore */
2182 for (i = 0; i < HPAGE_PMD_NR; i++)
2183 atomic_dec(&page[i]._mapcount);
2184 }
2185 }
2186 unlock_page_memcg(page);
2187 }
2188
2189 smp_wmb(); /* make pte visible before pmd */
2190 //pmd_populate(mm, pmd, pgtable);
> 2191 set_pmd_at(mm, haddr, pmd, __pmd(page_to_phys(pgtable) | PMD_TYPE_TABLE));
2192
2193 if (freeze) {
2194 for (i = 0; i < HPAGE_PMD_NR; i++) {
2195 page_remove_rmap(page + i, false);
2196 put_page(page + i);
2197 }
2198 }
2199 }
2200
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
[agd5f:s0ix 165/167] drivers/acpi/processor_idle.c:426 acpi_processor_power_verify() warn: inconsistent indenting
by kernel test robot
tree: https://gitlab.freedesktop.org/agd5f/linux.git s0ix
head: 08979374c0ad1cf849d785d75e1305bba81e58c9
commit: 2099eae8b314d5960d9d2a358a1b89c9fec35643 [165/167] ACPI / idle: override and update c-state latency when not conformance with s0ix
config: i386-randconfig-m021-20210226 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
New smatch warnings:
drivers/acpi/processor_idle.c:426 acpi_processor_power_verify() warn: inconsistent indenting
drivers/acpi/processor_idle.c:426 acpi_processor_power_verify() error: uninitialized symbol 'latency2'.
drivers/acpi/processor_idle.c:426 acpi_processor_power_verify() error: uninitialized symbol 'latency3'.
Old smatch warnings:
drivers/acpi/processor_idle.c:77 set_max_cstate() warn: argument 3 to %ld specifier is cast from pointer
vim +426 drivers/acpi/processor_idle.c
389
390 static int acpi_processor_power_verify(struct acpi_processor *pr)
391 {
392 unsigned int i;
393 unsigned int working = 0;
394 u32 latency2, latency3;
395
396 pr->power.timer_broadcast_on_state = INT_MAX;
397
398 for (i = 1; i < ACPI_PROCESSOR_MAX_POWER && i <= max_cstate; i++) {
399 struct acpi_processor_cx *cx = &pr->power.states[i];
400
401 switch (cx->type) {
402 case ACPI_STATE_C1:
403 cx->valid = 1;
404 break;
405
406 case ACPI_STATE_C2:
407 if (!cx->address)
408 break;
409 cx->valid = 1;
410 latency2 = cx->latency;
411 break;
412
413 case ACPI_STATE_C3:
414 latency3 = cx->latency;
415 acpi_processor_power_verify_c3(pr, cx);
416 break;
417 }
418 if (!cx->valid)
419 continue;
420
421 lapic_timer_check_state(i, pr, cx);
422 tsc_check_state(cx->type);
423 working++;
424 }
425
> 426 if (latency2 >= latency3) {
427 pr->power.states[2].latency = 18;
428 pr->power.states[3].latency = 350;
429 }
430
431 lapic_timer_propagate_broadcast(pr);
432
433 return (working);
434 }
435
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months