linux/arch/powerpc/sysdev
Michael Ellerman 4ccae23609 powerpc/dart: Drop unnecessary call to kmemleak_no_scan()
Erhard reported that kmemleak was showing a warning at boot:

  kmemleak: Not scanning unknown object at 0xc00000007f000000
  CPU: 0 PID: 0 Comm: swapper Not tainted 5.19.0-rc3-PMacG5+ #2
  Call Trace:
   .dump_stack_lvl+0x7c/0xc4 (unreliable)
   .kmemleak_no_scan+0xe0/0x100
   .iommu_init_early_dart+0x2f0/0x924
   .pmac_probe+0x1b0/0x20c
   .setup_arch+0x1b8/0x674
   .start_kernel+0xdc/0xb74
   start_here_common+0x1c/0x44
  DART table allocated at: (____ptrval____)

Which he bisected to a change in kmemleak, commit
23c2d497de ("mm: kmemleak: take a full lowmem check in kmemleak_*_phys()").

Because pmac_probe() is called before mem_topology_setup(), the min/
max PFN variables are still zero. That causes kmemleak_alloc_phys() to
ignore the allocation, because the checks against the PFN fail. Then
kmemleak_no_scan() can't find the allocation and prints warning.

Given that kmemleak_alloc_phys() is ignoring the allocation to begin
with, there's no need to call kmemleak_no_scan() at all, which avoids
the warning.

Reported-by: Erhard Furtner <erhard_f@mailbox.org>
Closes: https://lore.kernel.org/all/bug-216156-206035@https.bugzilla.kernel.org%2F/
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240419115913.3317575-1-mpe@ellerman.id.au
2024-04-29 23:51:16 +10:00
..
ge powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
xics powerpc/xics: Check return value of kasprintf in icp_native_map_one_cpu 2023-11-27 22:01:15 +11:00
xive powerpc/xive: Fix endian conversion size 2023-10-19 17:12:47 +11:00
6xx-suspend.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
cpm2.c powerpc/cpm2: Remove cpm2_map() and cpm2_unmap() 2023-08-16 23:54:47 +10:00
cpm2_pic.c powerpc/cpm2: Remove cpm2_map() and cpm2_unmap() 2023-08-16 23:54:47 +10:00
cpm2_pic.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cpm_common.c powerpc: Explicitly include correct DT includes 2023-08-02 22:22:19 +10:00
cpm_gpio.c powerpc: Explicitly include correct DT includes 2023-08-02 22:22:19 +10:00
dart.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
dart_iommu.c powerpc/dart: Drop unnecessary call to kmemleak_no_scan() 2024-04-29 23:51:16 +10:00
dcr-low.S powerpc: replace #include <asm/export.h> with #include <linux/export.h> 2023-08-16 23:54:48 +10:00
dcr.c powerpc: Use of_property_read_bool() for boolean properties 2023-03-30 23:36:35 +11:00
ehv_pic.c powerpc/85xx: Mark some functions static and add missing includes to fix no previous prototype error 2023-08-23 15:55:21 +10:00
fsl_gtm.c powerpc/sysdev: fix incorrect use to determine if list is empty 2022-03-08 00:04:56 +11:00
fsl_lbc.c powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
fsl_mpic_err.c powerpc/sysdev: Add __init attribute to eligible functions 2021-12-23 22:33:12 +11:00
fsl_mpic_timer_wakeup.c powerpc/fsl: fix compiler warning in fsl_wakeup_sys_init() 2023-03-28 08:23:54 +02:00
fsl_msi.c powerpc/fsl-soc: hide unused const variable 2024-04-03 21:23:23 +11:00
fsl_msi.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
fsl_pci.c powerpc/fsl-pci: Use PCI_HEADER_TYPE_MASK instead of literal 2023-12-01 15:00:54 -06:00
fsl_pci.h powerpc/fsl_pci: Make fsl_add_bridge() static 2023-08-18 17:03:13 +10:00
fsl_pmc.c powerpc: Explicitly include correct DT includes 2023-08-02 22:22:19 +10:00
fsl_rcpm.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
fsl_rio.c powerpc/85xx: Mark some functions static and add missing includes to fix no previous prototype error 2023-08-23 15:55:21 +10:00
fsl_rio.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
fsl_rmu.c powerpc/85xx: Mark some functions static and add missing includes to fix no previous prototype error 2023-08-23 15:55:21 +10:00
fsl_soc.c TTY/Serial driver changes for 6.6-rc1 2023-09-01 09:38:00 -07:00
fsl_soc.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
grackle.c powerpc/32: Drop unused grackle_set_stg() 2023-11-27 22:01:15 +11:00
i8259.c powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
indirect_pci.c powerpc: Remove asm/prom.h from all files that don't need it 2022-05-08 22:15:04 +10:00
ipic.c powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
ipic.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
Kconfig powerpc/4xx: Remove MSI support which never worked 2021-12-09 11:52:20 +01:00
Makefile powerpc/85xx: Remove FSL_85XX_CACHE_SRAM 2022-05-22 15:58:30 +10:00
mmio_nvram.c powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
mpc5xxx_clocks.c powerpc/mpc5xxx: Add missing fwnode_handle_put() 2023-08-25 08:39:30 +10:00
mpic.c powerpc: mpic: make mpic_subsys const 2024-02-15 00:14:06 +11:00
mpic.h powerpc/pasemi: Add __init attribute to eligible functions 2021-12-23 22:33:14 +11:00
mpic_msgr.c powerpc: Explicitly include correct DT includes 2023-08-02 22:22:19 +10:00
mpic_msi.c powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
mpic_timer.c powerpc: Explicitly include correct DT includes 2023-08-02 22:22:19 +10:00
mpic_u3msi.c powerpc/msi: Fix deassociation of MSI descriptors 2022-12-17 10:58:48 +00:00
msi_bitmap.c powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
of_rtc.c powerpc: Explicitly include correct DT includes 2023-08-02 22:22:19 +10:00
pmi.c powerpc: pmi: Convert to platform remove callback returning void 2024-02-22 21:55:33 +11:00
rtc_cmos_setup.c powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
tsi108_dev.c powerpc: Use of_address_to_resource() 2023-04-04 22:11:03 +10:00
tsi108_pci.c powerpc/sysdev/tsi108: fix resource printk format warnings 2023-03-30 23:36:34 +11:00
udbg_memcons.c powerpc: udbg_memcons: mark functions static 2024-02-06 21:17:44 +11:00