linux-stable/drivers/mtd/maps
Baruch Siach 6853209fd3 mtd: maps: physmap-core: fix flash size larger than 32-bit
[ Upstream commit 3884f03edd ]

mtd-ram can potentially be larger than 4GB. get_bitmask_order() uses
fls() that is not guaranteed to work with values larger than 32-bit.
Specifically on aarch64 fls() returns 0 when all 32 LSB bits are clear.
Use fls64() instead.

Fixes: ba32ce95cb ("mtd: maps: Merge gpio-addr-flash.c into physmap-core.c")
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/9fbf3664ce00f8b07867f1011834015f21d162a5.1707388458.git.baruch@tkos.co.il
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-26 18:19:52 -04:00
..
Kconfig mtd: maps: ixp4xx: Drop driver 2022-04-25 10:37:49 +02:00
Makefile mtd: maps: ixp4xx: Drop driver 2022-04-25 10:37:49 +02:00
amd76xrom.c mtd: amd76xrom: remove unnecessary oom message 2021-06-11 20:44:18 +02:00
cfi_flagadm.c
ck804xrom.c mtd: ck804xrom: remove unnecessary oom message 2021-06-11 20:44:14 +02:00
dc21285.c
esb2rom.c mtd: esb2rom: remove unnecessary oom message 2021-06-11 20:44:07 +02:00
ichxrom.c mtd: ichxrom: remove unnecessary oom message 2021-06-11 20:43:58 +02:00
impa7.c
intel_vr_nor.c
l440gx.c
lantiq-flash.c mtd: lantiq-flash: Use devm_platform_get_and_ioremap_resource() 2023-07-12 14:08:24 +02:00
map_funcs.c
netsc520.c
nettel.c
pci.c
pcmciamtd.c
physmap-bt1-rom.c mtd: Explicitly include correct DT includes 2023-07-27 17:03:41 +02:00
physmap-bt1-rom.h
physmap-core.c mtd: maps: physmap-core: fix flash size larger than 32-bit 2024-03-26 18:19:52 -04:00
physmap-gemini.c mtd: Explicitly include correct DT includes 2023-07-27 17:03:41 +02:00
physmap-gemini.h
physmap-ixp4xx.c mtd: Explicitly include correct DT includes 2023-07-27 17:03:41 +02:00
physmap-ixp4xx.h mtd: Explicitly include correct DT includes 2023-07-27 17:03:41 +02:00
physmap-versatile.c mtd: maps: fix -Wvoid-pointer-to-enum-cast warning 2023-08-18 16:38:54 +02:00
physmap-versatile.h
pismo.c mtd: maps: pismo: Switch back to use i2c_driver's .probe() 2023-06-19 10:26:03 +02:00
plat-ram.c mtd: plat-ram: Use devm_platform_get_and_ioremap_resource() 2023-07-12 14:08:22 +02:00
pxa2xx-flash.c mtd: maps: pxa2xx-flash: fix memory leak in probe 2022-11-24 12:33:38 +01:00
sa1100-flash.c
sbc_gxx.c
sc520cdp.c
scb2_flash.c
scx200_docflash.c
solutionengine.c
sun_uflash.c mtd: Explicitly include correct DT includes 2023-07-27 17:03:41 +02:00
ts5500_flash.c
tsunami_flash.c
uclinux.c
vmu-flash.c mtd: maps: vmu-flash: Fix the (mtd core) switch to ref counters 2024-01-31 16:18:50 -08:00