linux-stable/arch/arm/mach-omap2
Mike Rapoport 7e1c4e2792 memblock: stop using implicit alignment to SMP_CACHE_BYTES
When a memblock allocation APIs are called with align = 0, the alignment
is implicitly set to SMP_CACHE_BYTES.

Implicit alignment is done deep in the memblock allocator and it can
come as a surprise.  Not that such an alignment would be wrong even
when used incorrectly but it is better to be explicit for the sake of
clarity and the prinicple of the least surprise.

Replace all such uses of memblock APIs with the 'align' parameter
explicitly set to SMP_CACHE_BYTES and stop implicit alignment assignment
in the memblock internal allocation functions.

For the case when memblock APIs are used via helper functions, e.g.  like
iommu_arena_new_node() in Alpha, the helper functions were detected with
Coccinelle's help and then manually examined and updated where
appropriate.

The direct memblock APIs users were updated using the semantic patch below:

@@
expression size, min_addr, max_addr, nid;
@@
(
|
- memblock_alloc_try_nid_raw(size, 0, min_addr, max_addr, nid)
+ memblock_alloc_try_nid_raw(size, SMP_CACHE_BYTES, min_addr, max_addr,
nid)
|
- memblock_alloc_try_nid_nopanic(size, 0, min_addr, max_addr, nid)
+ memblock_alloc_try_nid_nopanic(size, SMP_CACHE_BYTES, min_addr, max_addr,
nid)
|
- memblock_alloc_try_nid(size, 0, min_addr, max_addr, nid)
+ memblock_alloc_try_nid(size, SMP_CACHE_BYTES, min_addr, max_addr, nid)
|
- memblock_alloc(size, 0)
+ memblock_alloc(size, SMP_CACHE_BYTES)
|
- memblock_alloc_raw(size, 0)
+ memblock_alloc_raw(size, SMP_CACHE_BYTES)
|
- memblock_alloc_from(size, 0, min_addr)
+ memblock_alloc_from(size, SMP_CACHE_BYTES, min_addr)
|
- memblock_alloc_nopanic(size, 0)
+ memblock_alloc_nopanic(size, SMP_CACHE_BYTES)
|
- memblock_alloc_low(size, 0)
+ memblock_alloc_low(size, SMP_CACHE_BYTES)
|
- memblock_alloc_low_nopanic(size, 0)
+ memblock_alloc_low_nopanic(size, SMP_CACHE_BYTES)
|
- memblock_alloc_from_nopanic(size, 0, min_addr)
+ memblock_alloc_from_nopanic(size, SMP_CACHE_BYTES, min_addr)
|
- memblock_alloc_node(size, 0, nid)
+ memblock_alloc_node(size, SMP_CACHE_BYTES, nid)
)

[mhocko@suse.com: changelog update]
[akpm@linux-foundation.org: coding-style fixes]
[rppt@linux.ibm.com: fix missed uses of implicit alignment]
  Link: http://lkml.kernel.org/r/20181016133656.GA10925@rapoport-lnx
Link: http://lkml.kernel.org/r/1538687224-17535-1-git-send-email-rppt@linux.vnet.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Suggested-by: Michal Hocko <mhocko@suse.com>
Acked-by: Paul Burton <paul.burton@mips.com>	[MIPS]
Acked-by: Michael Ellerman <mpe@ellerman.id.au>	[powerpc]
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Guan Xuetao <gxt@pku.edu.cn>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Richard Weinberger <richard@nod.at>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-10-31 08:54:16 -07:00
..
include/mach
am33xx-restart.c
am33xx.h
board-generic.c ARM: OMAP2+: Make display related init into device_initcall 2018-04-30 12:04:51 -07:00
board-n8x0.c bus: ti-sysc: Add support for platform data callbacks 2018-02-26 14:16:11 -08:00
clkt2xxx_dpll.c
clkt2xxx_dpllcore.c
clkt2xxx_virt_prcm_set.c
clock.c
clock.h
clock2xxx.h
clock3xxx.h
clockdomain.c ARM: OMAP2+: clockdomain: Inroduce cpu_pm notifiers for context save/restore 2018-05-18 06:56:12 -07:00
clockdomain.h ARM: OMAP2+: Add functions to save and restore clockdomain context en-masse. 2018-05-17 14:30:18 -07:00
clockdomains2xxx_3xxx_data.c
clockdomains3xxx_data.c
clockdomains7xx_data.c
clockdomains33xx_data.c
clockdomains43xx_data.c
clockdomains44xx_data.c
clockdomains54xx_data.c
clockdomains81xx_data.c
clockdomains2420_data.c
clockdomains2430_data.c
cm-regbits-7xx.h
cm-regbits-24xx.h
cm-regbits-33xx.h
cm-regbits-34xx.h
cm-regbits-44xx.h
cm-regbits-54xx.h
cm.h
cm1_7xx.h
cm1_44xx.h
cm1_54xx.h
cm2_7xx.h
cm2_44xx.h
cm2_54xx.h
cm2xxx.c
cm2xxx.h
cm2xxx_3xxx.h
cm3xxx.c
cm3xxx.h
cm33xx.c ARM: OMAP2+: Add functions to save and restore clockdomain context en-masse. 2018-05-17 14:30:18 -07:00
cm33xx.h
cm44xx.h
cm81xx.h
cm_common.c
cminst44xx.c ARM: OMAP2+: Add functions to save and restore clockdomain context en-masse. 2018-05-17 14:30:18 -07:00
common-board-devices.h
common.c
common.h Merge branch 'i2c/for-4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2018-06-14 16:21:46 +09:00
control.c ARM: AM43XX: Add functions to save/restore am43xx control registers 2018-05-23 11:54:26 -07:00
control.h ARM: AM43XX: Add functions to save/restore am43xx control registers 2018-05-23 11:54:26 -07:00
cpuidle34xx.c
cpuidle44xx.c
ctrl_module_wkup_44xx.h
devices.c ARM: OMAP2+: Remove unused gpio header file references 2018-02-14 10:28:13 -08:00
display.c ARM: OMAP2+: Make display related init into device_initcall 2018-04-30 12:04:51 -07:00
display.h
dma.c
fb.c
gpmc.h
hdq1w.c
hdq1w.h
hsmmc.c - Error path bug fix for overflow tests (Dan) 2018-06-12 18:28:00 -07:00
hsmmc.h mmc: omap_hsmmc: Delete platform data GPIO CD and WP 2018-10-08 11:40:43 +02:00
i2c.c ARM: OMAP2+: Drop unused pm-noop 2018-04-16 10:22:40 -07:00
i2c.h ARM: OMAP: Move plat/i2c.h into mach-omap1 folder 2018-02-14 10:28:13 -08:00
id.c
id.h
io.c ARM: OMAP2+: Initialize SoC PM later 2018-04-30 12:04:51 -07:00
iomap.h
Kconfig ARM: OMAP2+: pm33xx-core: Add platform code needed for PM 2018-02-27 08:53:37 -08:00
l3_2xxx.h
l3_3xxx.h
l4_2xxx.h
l4_3xxx.h
Makefile ti-sysc driver related changes for omap variants 2018-05-14 01:18:44 -07:00
mcbsp.c
mmc.h
msdi.c ARM: OMAP2+: Remove unused gpio header file references 2018-02-14 10:28:13 -08:00
omap-headsmp.S
omap-hotplug.c
omap-mpuss-lowpower.c
omap-secure.c
omap-secure.h
omap-smc.S
omap-smp.c ARM: DRA7/OMAP5: Enable ACTLR[0] (Enable invalidates of BTB) for secondary cores 2018-07-12 03:56:32 -07:00
omap-wakeupgen.c ARM: OMAP2+: Fix sar_base inititalization for HS omaps 2018-02-14 08:35:14 -08:00
omap-wakeupgen.h
omap2-restart.c
omap3-restart.c
omap4-common.c
omap4-restart.c
omap4-sar-layout.h ARM: OMAP2+: Fix typo for wakeup_ns_pa_addr 2018-02-28 14:47:13 -08:00
omap24xx.h
omap34xx.h
omap44xx.h
omap54xx.h
omap_device.c - Error path bug fix for overflow tests (Dan) 2018-06-12 18:28:00 -07:00
omap_device.h
omap_hwmod.c memblock: stop using implicit alignment to SMP_CACHE_BYTES 2018-10-31 08:54:16 -07:00
omap_hwmod.h ARM: OMAP2+: Use signed value for sysc register offsets 2018-04-30 12:04:51 -07:00
omap_hwmod_2xxx_3xxx_ipblock_data.c
omap_hwmod_2xxx_interconnect_data.c
omap_hwmod_2xxx_ipblock_data.c ARM: OMAP2+: Cleanup omap2_spi_dev_attr and other legacy data 2018-02-14 10:28:12 -08:00
omap_hwmod_3xxx_data.c Merge branch 'i2c/for-4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2018-06-14 16:21:46 +09:00
omap_hwmod_7xx_data.c Merge branch 'i2c/for-4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2018-06-14 16:21:46 +09:00
omap_hwmod_33xx_43xx_common_data.h ARM: OMAP2+: Cleanup omap2_spi_dev_attr and other legacy data 2018-02-14 10:28:12 -08:00
omap_hwmod_33xx_43xx_interconnect_data.c
omap_hwmod_33xx_43xx_ipblock_data.c ARM: OMAP2+: Use signed value for sysc register offsets 2018-04-30 12:04:51 -07:00
omap_hwmod_33xx_data.c i2c: omap: move header to platform_data 2018-05-17 16:27:58 +02:00
omap_hwmod_43xx_data.c ARM: OMAP2+: Use signed value for sysc register offsets 2018-04-30 12:04:51 -07:00
omap_hwmod_44xx_data.c Merge branch 'i2c/for-4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2018-06-14 16:21:46 +09:00
omap_hwmod_54xx_data.c Merge branch 'i2c/for-4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2018-06-14 16:21:46 +09:00
omap_hwmod_81xx_data.c ARM: OMAP2+: Use signed value for sysc register offsets 2018-04-30 12:04:51 -07:00
omap_hwmod_2420_data.c i2c: omap: move header to platform_data 2018-05-17 16:27:58 +02:00
omap_hwmod_2430_data.c i2c: omap: move header to platform_data 2018-05-17 16:27:58 +02:00
omap_hwmod_common_data.c
omap_hwmod_common_data.h ARM: OMAP2+: Cleanup omap_gpio_dev_attr usage 2018-02-14 10:28:12 -08:00
omap_hwmod_common_ipblock_data.c
omap_hwmod_reset.c ARM: hwmod: RTC: Don't assume lock/unlock will be called with irq enabled 2018-07-03 01:46:52 -07:00
omap_opp_data.h
omap_phy_internal.c
omap_twl.c
opp2xxx.h
opp3xxx_data.c
opp4xxx_data.c
opp2420_data.c
opp2430_data.c
pdata-quirks.c MMC core: 2018-10-23 08:36:15 +01:00
pm-asm-offsets.c ARM: OMAP2+: sleep33/43xx: Add RTC-Mode support 2018-07-09 23:01:34 -07:00
pm-debug.c ARM: OMAP2+: reuse DEFINE_SHOW_ATTRIBUTE() macro 2018-07-09 22:58:06 -07:00
pm.c ARM: OMAP2+: Initialize SoC PM later 2018-04-30 12:04:51 -07:00
pm.h ARM: OMAP2+: pm33xx-core: Add platform code needed for PM 2018-02-27 08:53:37 -08:00
pm24xx.c gpio: omap: Remove custom PM calls and use cpu_pm instead 2018-09-24 14:24:44 +02:00
pm33xx-core.c ARM: OMAP2+: sleep33/43xx: Add RTC-Mode support 2018-07-09 23:01:34 -07:00
pm34xx.c gpio: omap: Remove custom PM calls and use cpu_pm instead 2018-09-24 14:24:44 +02:00
pm44xx.c ARM: OMAP2+: Make sure LOGICRETSTATE bits are not cleared 2018-05-18 07:26:33 -07:00
powerdomain-common.c
powerdomain.c ARM: SoC platform updates 2018-06-11 17:49:09 -07:00
powerdomain.h ARM: OMAP2+: Add functions to save and restore powerdomain context 2018-05-18 06:56:26 -07:00
powerdomains2xxx_3xxx_data.c
powerdomains2xxx_3xxx_data.h
powerdomains2xxx_data.c
powerdomains3xxx_data.c
powerdomains7xx_data.c
powerdomains33xx_data.c
powerdomains43xx_data.c
powerdomains44xx_data.c
powerdomains54xx_data.c
prcm-common.h
prcm43xx.h
prcm44xx.h
prcm_mpu7xx.h
prcm_mpu44xx.c
prcm_mpu44xx.h
prcm_mpu54xx.h
prcm_mpu_44xx_54xx.h
prm-regbits-24xx.h
prm-regbits-33xx.h
prm-regbits-34xx.h
prm-regbits-44xx.h
prm.h
prm2xxx.c
prm2xxx.h
prm2xxx_3xxx.c
prm2xxx_3xxx.h
prm3xxx.c
prm3xxx.h
prm7xx.h
prm33xx.c ARM: OMAP2+: Add functions to save and restore powerdomain context 2018-05-18 06:56:26 -07:00
prm33xx.h
prm44xx.c ARM: OMAP2+: prm44xx: Inroduce cpu_pm notifiers for context save/restore 2018-05-18 06:59:29 -07:00
prm44xx.h
prm44xx_54xx.h
prm54xx.h
prm_common.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
prminst44xx.c
prminst44xx.h
scrm44xx.h
scrm54xx.h
sdrc.c
sdrc.h
sdrc2xxx.c
serial.h
sleep24xx.S
sleep33xx.S ARM: OMAP2+: sleep33/43xx: Add RTC-Mode support 2018-07-09 23:01:34 -07:00
sleep34xx.S
sleep43xx.S ARM: OMAP2+: sleep33/43xx: Add RTC-Mode support 2018-07-09 23:01:34 -07:00
sleep44xx.S ARM: OMAP2+: Use v7_invalidate_l1 in omap4_finish_suspend 2018-02-28 14:46:53 -08:00
smartreflex-class3.c
soc.h
sr_device.c ARM: OMAP2+: Enable ti-sysc to use device tree data for smartreflex 2018-02-28 20:03:21 -08:00
sram.c
sram.h
sram242x.S
sram243x.S
ti81xx-restart.c
ti81xx.h
timer.c Late omap soc changes for v4.18 merge window 2018-05-25 15:23:25 -07:00
usb-tusb6010.c
usb.h
vc.c
vc.h
vc3xxx_data.c
vc44xx_data.c
voltage.c
voltage.h
voltagedomains2xxx_data.c
voltagedomains3xxx_data.c
voltagedomains44xx_data.c
voltagedomains54xx_data.c
vp.c
vp.h
vp3xxx_data.c
vp44xx_data.c
wd_timer.c
wd_timer.h