[pm:acpica-osl 5/6] drivers/acpi/osl.c:1756:20: sparse: sparse: incorrect type in assignment (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git acpica-osl
head: c32c3c4079f8a62616413abbead45b6622fb7602
commit: 39192732c7bbd4e54968acde6fb8dd999246aef9 [5/6] ACPI: OSL: Change the type of acpi_os_map_generic_address() return value
config: x86_64-randconfig-s022-20200904 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-191-g10164920-dirty
git checkout 39192732c7bbd4e54968acde6fb8dd999246aef9
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
drivers/acpi/osl.c:376:17: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/acpi/osl.c:1756:20: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *rv @@ got void [noderef] __iomem * @@
>> drivers/acpi/osl.c:1756:20: sparse: expected void *rv
>> drivers/acpi/osl.c:1756:20: sparse: got void [noderef] __iomem *
drivers/acpi/osl.c:708:1: sparse: sparse: context imbalance in 'acpi_os_read_memory' - wrong count at exit
drivers/acpi/osl.c:741:1: sparse: sparse: context imbalance in 'acpi_os_write_memory' - wrong count at exit
# https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/commi...
git remote add pm https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
git fetch --no-tags pm acpica-osl
git checkout 39192732c7bbd4e54968acde6fb8dd999246aef9
vim +1756 drivers/acpi/osl.c
4dde507fc19844 Lv Zheng 2014-02-11 1742
d362edaf5386ac Myron Stowe 2010-10-21 1743 acpi_status __init acpi_os_initialize(void)
d362edaf5386ac Myron Stowe 2010-10-21 1744 {
d362edaf5386ac Myron Stowe 2010-10-21 1745 acpi_os_map_generic_address(&acpi_gbl_FADT.xpm1a_event_block);
d362edaf5386ac Myron Stowe 2010-10-21 1746 acpi_os_map_generic_address(&acpi_gbl_FADT.xpm1b_event_block);
d362edaf5386ac Myron Stowe 2010-10-21 1747 acpi_os_map_generic_address(&acpi_gbl_FADT.xgpe0_block);
d362edaf5386ac Myron Stowe 2010-10-21 1748 acpi_os_map_generic_address(&acpi_gbl_FADT.xgpe1_block);
a4714a898e8520 Randy Wright 2014-06-04 1749 if (acpi_gbl_FADT.flags & ACPI_FADT_RESET_REGISTER) {
a4714a898e8520 Randy Wright 2014-06-04 1750 /*
a4714a898e8520 Randy Wright 2014-06-04 1751 * Use acpi_os_map_generic_address to pre-map the reset
a4714a898e8520 Randy Wright 2014-06-04 1752 * register if it's in system memory.
a4714a898e8520 Randy Wright 2014-06-04 1753 */
39192732c7bbd4 Rafael J. Wysocki 2020-09-04 1754 void *rv;
a4714a898e8520 Randy Wright 2014-06-04 1755
a4714a898e8520 Randy Wright 2014-06-04 @1756 rv = acpi_os_map_generic_address(&acpi_gbl_FADT.reset_register);
39192732c7bbd4 Rafael J. Wysocki 2020-09-04 1757 pr_debug(PREFIX "%s: map reset_reg %s\n", __func__,
39192732c7bbd4 Rafael J. Wysocki 2020-09-04 1758 rv ? "successful" : "failed");
a4714a898e8520 Randy Wright 2014-06-04 1759 }
7901a052a98169 Lv Zheng 2015-08-05 1760 acpi_os_initialized = true;
d362edaf5386ac Myron Stowe 2010-10-21 1761
d362edaf5386ac Myron Stowe 2010-10-21 1762 return AE_OK;
d362edaf5386ac Myron Stowe 2010-10-21 1763 }
d362edaf5386ac Myron Stowe 2010-10-21 1764
:::::: The code at line 1756 was first introduced by commit
:::::: a4714a898e85205e1118ec923cde43d88eb105f6 ACPI: Fix bug when ACPI reset register is implemented in system memory
:::::: TO: Randy Wright <rwright(a)hp.com>
:::::: CC: Rafael J. Wysocki <rafael.j.wysocki(a)intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]
1 year, 11 months
[pm:acpica-osl 6/6] drivers/acpi/acpica/evgpeinit.c:39:3: warning: cast from pointer to integer of different size
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git acpica-osl
head: c32c3c4079f8a62616413abbead45b6622fb7602
commit: c32c3c4079f8a62616413abbead45b6622fb7602 [6/6] ACPI: OSL: Make ACPICA use logical addresses of GPE blocks
config: i386-randconfig-r006-20200904 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
git checkout c32c3c4079f8a62616413abbead45b6622fb7602
# 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/acpi/acpica/evgpeinit.c: In function 'acpi_ev_gpe_initialize':
>> drivers/acpi/acpica/evgpeinit.c:39:3: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
39 | (u64)acpi_gbl_xgpe##N##_block_logical_address : \
| ^
drivers/acpi/acpica/evgpeinit.c:99:12: note: in expansion of macro 'ACPI_FADT_GPE_BLOCK_ADDRESS'
99 | address = ACPI_FADT_GPE_BLOCK_ADDRESS(0);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/acpi/acpica/evgpeinit.c:39:3: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
39 | (u64)acpi_gbl_xgpe##N##_block_logical_address : \
| ^
drivers/acpi/acpica/evgpeinit.c:124:12: note: in expansion of macro 'ACPI_FADT_GPE_BLOCK_ADDRESS'
124 | address = ACPI_FADT_GPE_BLOCK_ADDRESS(1);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
--
In file included from include/acpi/acpi.h:24,
from drivers/acpi/acpica/hwgpe.c:10:
drivers/acpi/acpica/hwgpe.c: In function 'acpi_hw_gpe_read':
>> include/acpi/actypes.h:501:48: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
501 | #define ACPI_CAST_PTR(t, p) ((t *) (acpi_uintptr_t) (p))
| ^
drivers/acpi/acpica/acmacros.h:18:41: note: in expansion of macro 'ACPI_CAST_PTR'
18 | #define ACPI_CAST8(ptr) ACPI_CAST_PTR (u8, (ptr))
| ^~~~~~~~~~~~~
drivers/acpi/acpica/acmacros.h:22:43: note: in expansion of macro 'ACPI_CAST8'
22 | #define ACPI_GET8(ptr) (*ACPI_CAST8 (ptr))
| ^~~~~~~~~~
drivers/acpi/acpica/hwgpe.c:50:17: note: in expansion of macro 'ACPI_GET8'
50 | *value = (u64)ACPI_GET8(reg->address);
| ^~~~~~~~~
drivers/acpi/acpica/hwgpe.c: In function 'acpi_hw_gpe_write':
>> include/acpi/actypes.h:501:48: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
501 | #define ACPI_CAST_PTR(t, p) ((t *) (acpi_uintptr_t) (p))
| ^
drivers/acpi/acpica/acmacros.h:18:41: note: in expansion of macro 'ACPI_CAST_PTR'
18 | #define ACPI_CAST8(ptr) ACPI_CAST_PTR (u8, (ptr))
| ^~~~~~~~~~~~~
drivers/acpi/acpica/acmacros.h:26:43: note: in expansion of macro 'ACPI_CAST8'
26 | #define ACPI_SET8(ptr, val) (*ACPI_CAST8 (ptr) = (u8) (val))
| ^~~~~~~~~~
drivers/acpi/acpica/hwgpe.c:85:3: note: in expansion of macro 'ACPI_SET8'
85 | ACPI_SET8(reg->address, value);
| ^~~~~~~~~
# https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/commi...
git remote add pm https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
git fetch --no-tags pm acpica-osl
git checkout c32c3c4079f8a62616413abbead45b6622fb7602
vim +39 drivers/acpi/acpica/evgpeinit.c
3fe50208b29b24 Bob Moore 2010-04-27 14
3fe50208b29b24 Bob Moore 2010-04-27 15 #define _COMPONENT ACPI_EVENTS
3fe50208b29b24 Bob Moore 2010-04-27 16 ACPI_MODULE_NAME("evgpeinit")
33620c5419e8a1 Bob Moore 2012-02-14 17 #if (!ACPI_REDUCED_HARDWARE) /* Entire module */
da50337373c90c Lin Ming 2010-12-13 18 /*
da50337373c90c Lin Ming 2010-12-13 19 * Note: History of _PRW support in ACPICA
da50337373c90c Lin Ming 2010-12-13 20 *
da50337373c90c Lin Ming 2010-12-13 21 * Originally (2000 - 2010), the GPE initialization code performed a walk of
da50337373c90c Lin Ming 2010-12-13 22 * the entire namespace to execute the _PRW methods and detect all GPEs
da50337373c90c Lin Ming 2010-12-13 23 * capable of waking the system.
da50337373c90c Lin Ming 2010-12-13 24 *
da50337373c90c Lin Ming 2010-12-13 25 * As of 10/2010, the _PRW method execution has been removed since it is
da50337373c90c Lin Ming 2010-12-13 26 * actually unnecessary. The host OS must in fact execute all _PRW methods
da50337373c90c Lin Ming 2010-12-13 27 * in order to identify the device/power-resource dependencies. We now put
da50337373c90c Lin Ming 2010-12-13 28 * the onus on the host OS to identify the wake GPEs as part of this process
da50337373c90c Lin Ming 2010-12-13 29 * and to inform ACPICA of these GPEs via the acpi_setup_gpe_for_wake interface. This
da50337373c90c Lin Ming 2010-12-13 30 * not only reduces the complexity of the ACPICA initialization code, but in
da50337373c90c Lin Ming 2010-12-13 31 * some cases (on systems with very large namespaces) it should reduce the
da50337373c90c Lin Ming 2010-12-13 32 * kernel boot time as well.
da50337373c90c Lin Ming 2010-12-13 33 */
da50337373c90c Lin Ming 2010-12-13 34
a1705780821d0f Rafael J. Wysocki 2020-09-04 35 #ifdef ACPI_GPE_USE_LOGICAL_ADDRESSES
a1705780821d0f Rafael J. Wysocki 2020-09-04 36 #define ACPI_FADT_GPE_BLOCK_ADDRESS(N) \
a1705780821d0f Rafael J. Wysocki 2020-09-04 37 acpi_gbl_FADT.xgpe##N##_block.space_id == \
a1705780821d0f Rafael J. Wysocki 2020-09-04 38 ACPI_ADR_SPACE_SYSTEM_MEMORY ? \
a1705780821d0f Rafael J. Wysocki 2020-09-04 @39 (u64)acpi_gbl_xgpe##N##_block_logical_address : \
a1705780821d0f Rafael J. Wysocki 2020-09-04 40 acpi_gbl_FADT.xgpe##N##_block.address
a1705780821d0f Rafael J. Wysocki 2020-09-04 41 #else
a1705780821d0f Rafael J. Wysocki 2020-09-04 42 #define ACPI_FADT_GPE_BLOCK_ADDRESS(N) acpi_gbl_FADT.xgpe##N##_block.address
a1705780821d0f Rafael J. Wysocki 2020-09-04 43 #endif /* ACPI_GPE_USE_LOGICAL_ADDRESSES */
a1705780821d0f Rafael J. Wysocki 2020-09-04 44
:::::: The code at line 39 was first introduced by commit
:::::: a1705780821d0f36a542bacc21b8c353080a3204 ACPICA: Add support for using logical addresses of GPE blocks
:::::: TO: Rafael J. Wysocki <rafael.j.wysocki(a)intel.com>
:::::: CC: Rafael J. Wysocki <rafael.j.wysocki(a)intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]
1 year, 11 months
[pm:bleeding-edge] BUILD SUCCESS 7eada1ae101b2de8a32fb7125db0162b00965d48
by kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git bleeding-edge
branch HEAD: 7eada1ae101b2de8a32fb7125db0162b00965d48 Merge branch 'pm-cpufreq' into linux-next
elapsed time: 722m
configs tested: 159
configs skipped: 14
The following configs have been built successfully.
More configs may be tested in the coming days.
gcc tested configs:
arm defconfig
arm64 allyesconfig
arm64 defconfig
arm allyesconfig
arm allmodconfig
sh se7206_defconfig
mips pnx8335_stb225_defconfig
arm mmp2_defconfig
sh sh2007_defconfig
sh edosk7705_defconfig
mips bmips_stb_defconfig
sh espt_defconfig
mips rs90_defconfig
c6x evmc6474_defconfig
powerpc allnoconfig
arm shannon_defconfig
arm eseries_pxa_defconfig
arm footbridge_defconfig
riscv allnoconfig
sh migor_defconfig
sh rsk7264_defconfig
powerpc mgcoge_defconfig
sh r7780mp_defconfig
sh se7712_defconfig
sparc sparc64_defconfig
powerpc defconfig
arm pxa_defconfig
arm gemini_defconfig
microblaze nommu_defconfig
s390 zfcpdump_defconfig
arm clps711x_defconfig
powerpc mvme5100_defconfig
sh sh7770_generic_defconfig
sh se7343_defconfig
arm efm32_defconfig
arm shmobile_defconfig
sh microdev_defconfig
arm rpc_defconfig
powerpc ppc40x_defconfig
powerpc mpc885_ads_defconfig
arm imx_v6_v7_defconfig
c6x defconfig
ia64 bigsur_defconfig
mips bcm63xx_defconfig
sh rsk7269_defconfig
ia64 defconfig
sh sh7785lcr_32bit_defconfig
arm hackkit_defconfig
arm mvebu_v5_defconfig
xtensa common_defconfig
arm lart_defconfig
arm pxa255-idp_defconfig
arm mv78xx0_defconfig
arm s3c2410_defconfig
arm alldefconfig
riscv nommu_k210_defconfig
nios2 3c120_defconfig
m68k alldefconfig
m68k m5475evb_defconfig
sh ecovec24-romimage_defconfig
powerpc storcenter_defconfig
mips tb0287_defconfig
mips cu1000-neo_defconfig
mips malta_defconfig
powerpc gamecube_defconfig
mips malta_kvm_defconfig
m68k m5249evb_defconfig
x86_64 defconfig
sh kfr2r09_defconfig
arm aspeed_g5_defconfig
m68k stmark2_defconfig
nds32 defconfig
sh r7785rp_defconfig
mips tb0226_defconfig
xtensa virt_defconfig
mips tb0219_defconfig
arm moxart_defconfig
arc allyesconfig
arm magician_defconfig
nds32 alldefconfig
mips maltaup_xpa_defconfig
arm dove_defconfig
powerpc mpc512x_defconfig
arm qcom_defconfig
mips rm200_defconfig
arc haps_hs_defconfig
powerpc ppc64e_defconfig
arm ixp4xx_defconfig
mips cobalt_defconfig
powerpc maple_defconfig
arm simpad_defconfig
sh rsk7201_defconfig
arm nhk8815_defconfig
mips bigsur_defconfig
arm realview_defconfig
mips ip28_defconfig
sh polaris_defconfig
m68k q40_defconfig
sparc allyesconfig
mips decstation_r4k_defconfig
ia64 allmodconfig
ia64 allyesconfig
m68k allmodconfig
m68k defconfig
m68k allyesconfig
nios2 defconfig
nds32 allnoconfig
c6x allyesconfig
nios2 allyesconfig
csky defconfig
alpha defconfig
alpha allyesconfig
xtensa allyesconfig
h8300 allyesconfig
arc defconfig
sh allmodconfig
parisc defconfig
s390 allyesconfig
parisc allyesconfig
s390 defconfig
i386 allyesconfig
sparc defconfig
i386 defconfig
mips allyesconfig
mips allmodconfig
powerpc allyesconfig
powerpc allmodconfig
x86_64 randconfig-a004-20200901
x86_64 randconfig-a006-20200901
x86_64 randconfig-a003-20200901
x86_64 randconfig-a005-20200901
x86_64 randconfig-a001-20200901
x86_64 randconfig-a002-20200901
i386 randconfig-a004-20200901
i386 randconfig-a005-20200901
i386 randconfig-a006-20200901
i386 randconfig-a002-20200901
i386 randconfig-a001-20200901
i386 randconfig-a003-20200901
i386 randconfig-a016-20200901
i386 randconfig-a015-20200901
i386 randconfig-a011-20200901
i386 randconfig-a013-20200901
i386 randconfig-a014-20200901
i386 randconfig-a012-20200901
riscv allyesconfig
riscv defconfig
riscv allmodconfig
x86_64 rhel
x86_64 allyesconfig
x86_64 rhel-7.6-kselftests
x86_64 rhel-8.3
x86_64 kexec
clang tested configs:
x86_64 randconfig-a013-20200901
x86_64 randconfig-a016-20200901
x86_64 randconfig-a011-20200901
x86_64 randconfig-a012-20200901
x86_64 randconfig-a015-20200901
x86_64 randconfig-a014-20200901
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]
1 year, 11 months
[pm:bleeding-edge] BUILD SUCCESS 13f46f822831fb135644e4d61137fd4d53c9c0ad
by kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git bleeding-edge
branch HEAD: 13f46f822831fb135644e4d61137fd4d53c9c0ad cpufreq: intel_pstate: Free memory only when turning off
elapsed time: 725m
configs tested: 103
configs skipped: 6
The following configs have been built successfully.
More configs may be tested in the coming days.
arm defconfig
arm64 allyesconfig
arm64 defconfig
arm allyesconfig
arm allmodconfig
arm s3c6400_defconfig
ia64 zx1_defconfig
m68k sun3x_defconfig
sh se7751_defconfig
arm u8500_defconfig
parisc generic-32bit_defconfig
m68k mvme147_defconfig
powerpc allmodconfig
m68k apollo_defconfig
sh r7785rp_defconfig
powerpc mpc83xx_defconfig
arm u300_defconfig
powerpc pmac32_defconfig
arc defconfig
parisc allyesconfig
arm zeus_defconfig
m68k atari_defconfig
arm cerfcube_defconfig
sh sh7710voipgw_defconfig
mips malta_kvm_defconfig
sh microdev_defconfig
mips bmips_stb_defconfig
arm mps2_defconfig
sh se7750_defconfig
sh se7206_defconfig
nios2 allyesconfig
sh ecovec24-romimage_defconfig
nios2 defconfig
arm imx_v6_v7_defconfig
mips rs90_defconfig
mips gcw0_defconfig
arm bcm2835_defconfig
arc hsdk_defconfig
arm s5pv210_defconfig
powerpc wii_defconfig
sh sh7757lcr_defconfig
powerpc tqm8xx_defconfig
nios2 alldefconfig
powerpc ppc64e_defconfig
sh alldefconfig
arm stm32_defconfig
mips jmr3927_defconfig
ia64 allmodconfig
ia64 defconfig
ia64 allyesconfig
m68k allmodconfig
m68k defconfig
m68k allyesconfig
arc allyesconfig
nds32 allnoconfig
c6x allyesconfig
nds32 defconfig
csky defconfig
alpha defconfig
alpha allyesconfig
xtensa allyesconfig
h8300 allyesconfig
sh allmodconfig
parisc defconfig
s390 allyesconfig
s390 defconfig
i386 allyesconfig
sparc allyesconfig
sparc defconfig
i386 defconfig
mips allyesconfig
mips allmodconfig
powerpc allyesconfig
powerpc allnoconfig
powerpc defconfig
i386 randconfig-a001-20200831
i386 randconfig-a002-20200831
i386 randconfig-a004-20200831
i386 randconfig-a006-20200831
i386 randconfig-a005-20200831
i386 randconfig-a003-20200831
x86_64 randconfig-a012-20200831
x86_64 randconfig-a015-20200831
x86_64 randconfig-a014-20200831
x86_64 randconfig-a011-20200831
x86_64 randconfig-a016-20200831
x86_64 randconfig-a013-20200831
i386 randconfig-a013-20200831
i386 randconfig-a011-20200831
i386 randconfig-a012-20200831
i386 randconfig-a015-20200831
i386 randconfig-a016-20200831
i386 randconfig-a014-20200831
riscv allyesconfig
riscv allnoconfig
riscv defconfig
riscv allmodconfig
x86_64 rhel
x86_64 allyesconfig
x86_64 rhel-7.6-kselftests
x86_64 defconfig
x86_64 rhel-8.3
x86_64 kexec
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]
1 year, 11 months