summaryrefslogtreecommitdiffstats
path: root/arch/arm/cpu/mmu-common.h
Commit message (Collapse)AuthorAgeFilesLines
* include: move panic() prototype to <printk.h>Ahmad Fatoum2022-10-051-0/+1
| | | | | | | | | | | | The panic declaration in <linux/kernel.h> is out of place and unexpected as it's not a Linux kernel. printf() and printk() are defined in <printk.h>, so move it there too. Most files making use of panic(), pull it in via <common.h>, so we only need to adjust two headers for the new location. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220930154247.756577-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: mmu64: map reserved regions uncachedAhmad Fatoum2022-08-181-0/+15
| | | | | | | | | | | | | | | | | Now that we have reserved memory regions specially marked in the SDRAM bank requests, we can use this information to map these regions uncached and eXecute Never to avoid speculative access into these regions from causing hard-to-debug data aborts. The sequence used here is safe because __mmu_init turns off the MMU if enabled, so even if we overwrite early MMU uncached entries they are without effect until the MMU is turned on again, by which time the for_each_reserved_region should have disabled caching for them again (e.g. because they were listed in DT as /reserve-memory). Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220817114244.1810531-7-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arch: add SPDX-License-Identifier to all headersAhmad Fatoum2022-01-051-1/+3
| | | | | | | | | Record GPL-2.0-only as license for all files lacking an explicit license statement. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220103120539.1730644-9-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: mmu: Make sure DMA coherent memory is zeroed outAndrey Smirnov2019-01-211-0/+1
| | | | | | | | | | | In order to avoid passing random/junky values to DMA/HW as well as to allow simplifying memory initialization in individual drivers, change dma_alloc_coherent() to guarantee that memory it returns is properly zeroed out. Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: mmu: Share code for arm_mmu_not_initialized_error()Andrey Smirnov2019-01-211-0/+11
| | | | | | Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: mmu: Share sanity checking code in mmu_init()Andrey Smirnov2019-01-211-0/+1
| | | | | | | | | Share sanity checking code in mmu_init() as well as code to detect if MMU is on or not on both ARM and ARM64. Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: mmu: Share code for dma_alloc_coherent()Andrey Smirnov2019-01-211-0/+7
Both ARM and ARM64 implement almost identical algorithms in dma_alloc_coherent(). Move the code to mmu-common.c, so it can be shared. Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>