* [efi:next 3/6] arch/x86/boot/compressed/acpi.c:58:41: sparse: sparse: cast truncates bits from constant value (eb9d2d30 becomes 30)
@ 2021-03-18 7:34 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-03-18 7:34 UTC (permalink / raw)
To: Ard Biesheuvel; +Cc: kbuild-all, linux-efi
[-- Attachment #1: Type: text/plain, Size: 6176 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git next
head: 3cfafc4b8f12ebf4b9b6bd85f41353012c5441f3
commit: 31bc510eb86b1a10c12281ce823d22aeb3c6275f [3/6] efi: use 32-bit alignment for efi_guid_t literals
config: i386-randconfig-s002-20210318 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-277-gc089cd2d-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git/commit/?id=31bc510eb86b1a10c12281ce823d22aeb3c6275f
git remote add efi https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git
git fetch --no-tags efi next
git checkout 31bc510eb86b1a10c12281ce823d22aeb3c6275f
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> arch/x86/boot/compressed/acpi.c:58:41: sparse: sparse: cast truncates bits from constant value (eb9d2d30 becomes 30)
>> arch/x86/boot/compressed/acpi.c:58:41: sparse: sparse: cast truncates bits from constant value (eb9d2d becomes 2d)
>> arch/x86/boot/compressed/acpi.c:58:41: sparse: sparse: cast truncates bits from constant value (eb9d becomes 9d)
>> arch/x86/boot/compressed/acpi.c:58:41: sparse: sparse: cast truncates bits from constant value (2d88 becomes 88)
>> arch/x86/boot/compressed/acpi.c:58:41: sparse: sparse: cast truncates bits from constant value (11d3 becomes d3)
>> arch/x86/boot/compressed/acpi.c:60:46: sparse: sparse: cast truncates bits from constant value (8868e871 becomes 71)
>> arch/x86/boot/compressed/acpi.c:60:46: sparse: sparse: cast truncates bits from constant value (8868e8 becomes e8)
>> arch/x86/boot/compressed/acpi.c:60:46: sparse: sparse: cast truncates bits from constant value (8868 becomes 68)
>> arch/x86/boot/compressed/acpi.c:60:46: sparse: sparse: cast truncates bits from constant value (e4f1 becomes f1)
arch/x86/boot/compressed/acpi.c:60:46: sparse: sparse: cast truncates bits from constant value (11d3 becomes d3)
vim +58 arch/x86/boot/compressed/acpi.c
02a3e3cdb7f12f Chao Fan 2019-01-23 16
02a3e3cdb7f12f Chao Fan 2019-01-23 17 /*
02a3e3cdb7f12f Chao Fan 2019-01-23 18 * Immovable memory regions representation. Max amount of memory regions is
02a3e3cdb7f12f Chao Fan 2019-01-23 19 * MAX_NUMNODES*2.
02a3e3cdb7f12f Chao Fan 2019-01-23 20 */
02a3e3cdb7f12f Chao Fan 2019-01-23 @21 struct mem_vector immovable_mem[MAX_NUMNODES*2];
02a3e3cdb7f12f Chao Fan 2019-01-23 22
0a23ebc66a4678 Junichi Nomura 2019-04-11 23 /*
0a23ebc66a4678 Junichi Nomura 2019-04-11 24 * Search EFI system tables for RSDP. If both ACPI_20_TABLE_GUID and
0a23ebc66a4678 Junichi Nomura 2019-04-11 25 * ACPI_TABLE_GUID are found, take the former, which has more features.
0a23ebc66a4678 Junichi Nomura 2019-04-11 26 */
0a23ebc66a4678 Junichi Nomura 2019-04-11 27 static acpi_physical_address
0a23ebc66a4678 Junichi Nomura 2019-04-11 28 __efi_get_rsdp_addr(unsigned long config_tables, unsigned int nr_tables,
0a23ebc66a4678 Junichi Nomura 2019-04-11 29 bool efi_64)
33f0df8d843deb Chao Fan 2019-01-23 30 {
33f0df8d843deb Chao Fan 2019-01-23 31 acpi_physical_address rsdp_addr = 0;
33f0df8d843deb Chao Fan 2019-01-23 32
33f0df8d843deb Chao Fan 2019-01-23 33 #ifdef CONFIG_EFI
0a23ebc66a4678 Junichi Nomura 2019-04-11 34 int i;
0a23ebc66a4678 Junichi Nomura 2019-04-11 35
0a23ebc66a4678 Junichi Nomura 2019-04-11 36 /* Get EFI tables from systab. */
0a23ebc66a4678 Junichi Nomura 2019-04-11 37 for (i = 0; i < nr_tables; i++) {
0a23ebc66a4678 Junichi Nomura 2019-04-11 38 acpi_physical_address table;
0a23ebc66a4678 Junichi Nomura 2019-04-11 39 efi_guid_t guid;
0a23ebc66a4678 Junichi Nomura 2019-04-11 40
0a23ebc66a4678 Junichi Nomura 2019-04-11 41 if (efi_64) {
0a23ebc66a4678 Junichi Nomura 2019-04-11 42 efi_config_table_64_t *tbl = (efi_config_table_64_t *)config_tables + i;
0a23ebc66a4678 Junichi Nomura 2019-04-11 43
0a23ebc66a4678 Junichi Nomura 2019-04-11 44 guid = tbl->guid;
0a23ebc66a4678 Junichi Nomura 2019-04-11 45 table = tbl->table;
0a23ebc66a4678 Junichi Nomura 2019-04-11 46
0a23ebc66a4678 Junichi Nomura 2019-04-11 47 if (!IS_ENABLED(CONFIG_X86_64) && table >> 32) {
0a23ebc66a4678 Junichi Nomura 2019-04-11 48 debug_putstr("Error getting RSDP address: EFI config table located above 4GB.\n");
0a23ebc66a4678 Junichi Nomura 2019-04-11 49 return 0;
0a23ebc66a4678 Junichi Nomura 2019-04-11 50 }
0a23ebc66a4678 Junichi Nomura 2019-04-11 51 } else {
0a23ebc66a4678 Junichi Nomura 2019-04-11 52 efi_config_table_32_t *tbl = (efi_config_table_32_t *)config_tables + i;
0a23ebc66a4678 Junichi Nomura 2019-04-11 53
0a23ebc66a4678 Junichi Nomura 2019-04-11 54 guid = tbl->guid;
0a23ebc66a4678 Junichi Nomura 2019-04-11 55 table = tbl->table;
0a23ebc66a4678 Junichi Nomura 2019-04-11 56 }
0a23ebc66a4678 Junichi Nomura 2019-04-11 57
0a23ebc66a4678 Junichi Nomura 2019-04-11 @58 if (!(efi_guidcmp(guid, ACPI_TABLE_GUID)))
0a23ebc66a4678 Junichi Nomura 2019-04-11 59 rsdp_addr = table;
0a23ebc66a4678 Junichi Nomura 2019-04-11 @60 else if (!(efi_guidcmp(guid, ACPI_20_TABLE_GUID)))
0a23ebc66a4678 Junichi Nomura 2019-04-11 61 return table;
0a23ebc66a4678 Junichi Nomura 2019-04-11 62 }
0a23ebc66a4678 Junichi Nomura 2019-04-11 63 #endif
0a23ebc66a4678 Junichi Nomura 2019-04-11 64 return rsdp_addr;
0a23ebc66a4678 Junichi Nomura 2019-04-11 65 }
0a23ebc66a4678 Junichi Nomura 2019-04-11 66
:::::: The code at line 58 was first introduced by commit
:::::: 0a23ebc66a46786769dd68bfdaa3102345819b9c x86/boot: Use efi_setup_data for searching RSDP on kexec-ed kernels
:::::: TO: Junichi Nomura <j-nomura@ce.jp.nec.com>
:::::: CC: Borislav Petkov <bp@suse.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36431 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-03-18 7:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-18 7:34 [efi:next 3/6] arch/x86/boot/compressed/acpi.c:58:41: sparse: sparse: cast truncates bits from constant value (eb9d2d30 becomes 30) kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).