summaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/nommu.c
Commit message (Collapse)AuthorAgeFilesLines
* ARM: constify machine_desc structure usesRussell King2013-07-261-1/+1
| | | | | | | | | | | | | struct machine_desc records are defined everywhere as a 'const' structure, but unfortuantely it loses its const-ness through the use of linker magic - the symbols which surround the section are not declared const so it becomes possible not to use 'const' for pointers to these const structures. Let's fix this oversight - all pointers to these structures should be marked const too. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* Merge branch 'devel-stable' into for-nextRussell King2013-06-291-1/+263
|\ | | | | | | | | | | Conflicts: arch/arm/Makefile arch/arm/include/asm/glue-proc.h
| * ARM: mpu: Complete initialisation of the MPU after reaching the C-worldJonathan Austin2013-06-071-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Much like with the MMU, MPU initialisation is performed in two stages; the first in the pre-C world and the 'real' initialisation during arch setup. This patch wires in previously added MPU initialisation functions so that the whole of memory is mapped with the appropriate region properties for 'normal' RAM (the appropriate properties depend on whether the system is SMP). Stub initialisation functions are added for the case that there MPU support is not configured in to the kernel. Signed-off-by: Jonathan Austin <jonathan.austin@arm.com> Reviewed-by: Will Deacon <will.deacon@arm.com> CC: Hyok S. Choi <hyok.choi@samsung.com>
| * ARM: mpu: add MPU probe and initialisation functions in CJonathan Austin2013-06-071-0/+249
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds new functions for probing and initialising the ARMv7 PMSA-compliant MPU. These use the pre-defined and reserved MPU_PROBE_REGION for establishing properties of the MPU, which is necessary because certain probe operations require modifying region properties and reading back the results. This patch also introduces a minimal sanity_check_meminfo_mpu function, that ensures that the memory set-up passed to the kernel can be used in conjunction with the MPU. The base address of a region must be aligned to the region size, otherwise behavior is unpredictable and region sizes can only be specified as a power-of-two. To simplify the satisfaction of these requirements this implementation currently enforces that all memory is contiguous from PHYS_OFFSET, merging banks that are contiguous but passed in separately. The functions are added in this patch but wired in to the boot process later in the series. Signed-off-by: Jonathan Austin <jonathan.austin@arm.com> Reviewed-by: Will Deacon <will.deacon@arm.com> CC: Hyok S. Choi <hyok.choi@samsung.com>
| * ARM: Add base support for ARMv7-MCatalin Marinas2013-04-171-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the base support for the ARMv7-M architecture. It consists of the corresponding arch/arm/mm/ files and various #ifdef's around the kernel. Exception handling is implemented by a subsequent patch. [ukleinek: squash in some changes originating from commit b5717ba (Cortex-M3: Add support for the Microcontroller Prototyping System) from the v2.6.33-arm1 patch stack, port to post 3.6, drop zImage support, drop reorganisation of pt_regs, assert CONFIG_CPU_V7M doesn't leak into installed headers and a few cosmetic changes] Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Reviewed-by: Jonathan Austin <jonathan.austin@arm.com> Tested-by: Jonathan Austin <jonathan.austin@arm.com> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
| |
| \
*-. \ Merge branches 'fixes', 'mcpm', 'misc' and 'mmci' into for-nextRussell King2013-06-291-3/+3
|\ \ \ | | |/ | |/|
| | * ARM: 7728/1: mm: Use phys_addr_t properly for ioremap functionsLaura Abbott2013-05-231-3/+3
| |/ | | | | | | | | | | | | | | | | | | | | | | | | Several of the ioremap functions use unsigned long in places resulting in truncation if physical addresses greater than 4G are passed in. Change the types of the functions and the callers accordingly. Cc: Krzysztof Halasa <khc@pm.waw.pl> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Laura Abbott <lauraa@codeaurora.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* / ARM: 7772/1: Fix missing flush_kernel_dcache_page() for noMMUSimon Baatz2013-06-241-0/+6
|/ | | | | | | | | | | | Commit 1bc3974 (ARM: 7755/1: handle user space mapped pages in flush_kernel_dcache_page) moved the implementation of flush_kernel_dcache_page() into mm/flush.c but did not implement it on noMMU ARM. Signed-off-by: Simon Baatz <gmbnomis@gmail.com> Acked-by: Kevin Hilman <khilman@linaro.org> Cc: <stable@vger.kernel.org> # 3.2+: 1bc3974: ARM: 7755/1 Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: 7383/1: nommu: populate vectors page from paging_initWill Deacon2012-04-131-0/+2
| | | | | | | | | | | | Commit 94e5a85b ("ARM: earlier initialization of vectors page") made it the responsibility of paging_init to initialise the vectors page. This patch adds a call to early_trap_init for the !CONFIG_MMU case, placing the vectors at CONFIG_VECTORS_BASE. Cc: Jonathan Austin <jonathan.austin@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: fix ioremap/iounmap for !CONFIG_MMURob Herring2012-03-111-2/+6
| | | | | | | | | | | With commit 4fe7ef3a081 (ARM: provide runtime hook for ioremap/iounmap), compiles with !CONFIG_MMU were broken. Rename nommu __iounmap to __arm_iounmap and add arch_ioremap_caller and arch_iounmap. Its not expected that these need to be overriden for !CONFIG_MMU, so setting the function ptrs has no effect in this case. Signed-off-by: Rob Herring <rob.herring@calxeda.com> Cc: Russell King <linux@arm.linux.org.uk>
* Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into ↵Russell King2011-12-051-0/+2
|\ | | | | | | devel-stable
| * ARM: move initialization of the high_memory variable earlierNicolas Pitre2011-11-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | Some upcoming changes must know the VMALLOC_START value, which is based on high_memory, before bootmem_init() is called. The best location to set it is in sanity_check_meminfo() where the needed computation is already done, and in the non MMU case it is trivial to do now that the meminfo array is already sorted at that point. Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
* | ARM: restart: remove argument to setup_mm_for_reboot()Russell King2011-11-101-1/+1
|/ | | | | | | | | | setup_mm_for_reboot() doesn't make use of its argument, so remove it. Acked-by: Nicolas Pitre <nico@linaro.org> Acked-by: Will Deacon <will.deacon@arm.com> Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: move memory layout sanity checking before meminfo initializationRussell King2011-07-051-0/+4
| | | | | | | | | | Ensure that the meminfo array is sanity checked before we pass the memory to memblock. This helps to ensure that memblock and meminfo agree on the dimensions of memory, especially when more memory is passed than the kernel can deal with. Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: Convert platform reservations to use LMB rather than bootmemRussell King2010-07-271-1/+1
| | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: initial LMB trialRussell King2010-07-271-16/+3
| | | | | Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: Move platform memory reservations out of generic codeRussell King2010-07-161-1/+1
| | | | | | | Move the platform specific bootmem memory reservations out of arch/arm/mm/mmu.c into their respective platform files. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: Remove DISCONTIGMEM supportRussell King2010-07-161-8/+5
| | | | | | | Everything should now be using sparsemem rather than discontigmem, so remove the code supporting discontigmem from ARM. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: 6106/1: Implement copy_to_user_page() for noMMUCatalin Marinas2010-05-081-0/+9
| | | | | | | | | Commit 7959722 introduced calls to copy_(to|from)_user_page() from access_process_vm() in mm/nommu.c. The copy_to_user_page() was not implemented on noMMU ARM. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: 6105/1: Fix the __arm_ioremap_caller() definition in nommu.cCatalin Marinas2010-05-081-2/+2
| | | | | | | | Commit 31aa8fd6 introduced the __arm_ioremap_caller() function but the nommu.c version did not have the _caller suffix. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: Add caller information to ioremapRussell King2010-02-151-0/+12
| | | | | | | | | This allows the procfs vmallocinfo file to show who created the ioremap regions. Note: __builtin_return_address(0) doesn't do what's expected if its used in an inline function, so we leave __arm_ioremap callers in such places alone. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: add size argument to __cpuc_flush_dcache_pageRussell King2009-12-141-1/+1
| | | | | | | ... and rename the function since it no longer operates on just pages. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* nommu: Include asm/setup.h in arch/arm/mm/nommu.cCatalin Marinas2009-07-241-0/+1
| | | | | | This is needed for the struct meminfo definition. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
* [ARM] use asm/sections.hRussell King2008-12-011-2/+3
| | | | | | | | Update to use the asm/sections.h header rather than declaring these symbols ourselves. Change __data_start to _data to conform with the naming found within asm/sections.h. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] rationalize memory configuration code some moreNicolas Pitre2008-11-281-16/+2
| | | | | | | | | | | | | | | Currently there are two instances of struct meminfo: one in kernel/setup.c marked __initdata, and another in mm/init.c with permanent storage. Let's keep only the later to directly populate the permanent version from arm_add_memory(). Also move common validation tests between the MMU and non-MMU cases into arm_add_memory() to remove some duplication. Protection against overflowing the membank array is also moved in there in order to cover the kernel cmdline parsing path as well. Signed-off-by: Nicolas Pitre <nico@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] mm: move validation of membanks to one placeRussell King2008-09-301-0/+14
| | | | | | | | The newly introduced sanity_check_meminfo() function should be used to collect all validation of the meminfo array, which we have in bootmem_init(). Move it there. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] Convert asm/io.h to linux/io.hRussell King2008-09-061-1/+1
| | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] clean up a load of old declarationsRussell King2008-09-061-2/+0
| | | | | | ... some of which are now in linux/*.h headers. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* Introduce flags for reserve_bootmem()Bernhard Walle2008-02-071-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | This patchset adds a flags variable to reserve_bootmem() and uses the BOOTMEM_EXCLUSIVE flag in crashkernel reservation code to detect collisions between crashkernel area and already used memory. This patch: Change the reserve_bootmem() function to accept a new flag BOOTMEM_EXCLUSIVE. If that flag is set, the function returns with -EBUSY if the memory already has been reserved in the past. This is to avoid conflicts. Because that code runs before SMP initialisation, there's no race condition inside reserve_bootmem_core(). [akpm@linux-foundation.org: coding-style fixes] [akpm@linux-foundation.org: fix powerpc build] Signed-off-by: Bernhard Walle <bwalle@suse.de> Cc: <linux-arch@vger.kernel.org> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Vivek Goyal <vgoyal@in.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [ARM] mm 10: allow memory type to be specified with ioremapRussell King2007-05-051-6/+6
| | | | | | | | | | | | | | __ioremap() took a set of page table flags (specifically the cacheable and bufferable bits) to control the mapping type. However, with the advent of ARMv6, this is far too limited. Replace the page table flags with a memory type index, so that the desired attributes can be selected from the mem_type table. Finally, to prevent silent miscompilation due to the differing arguments, rename the __ioremap() and __ioremap_pfn() functions. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] Fix nommu buildRussell King2006-11-301-1/+3
| | | | | | | Fix warnings and errors in arch/arm/mm for nommu build. Remove commented out function prototype in pgtable-nommu.h Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] Add setup_mm_for_reboot() for nommuRussell King2006-09-271-0/+7
| | | | | | Add an empty setup_mm_for_reboot() function for nommu machines. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] Split ARM MM initialisation for !mmuRussell King2006-09-271-0/+36
| | | | | | | Move the MMU specific code from init.c into mmu.c, and add nommu fixups to nommu.c Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] nommu: export flush_dcache_page()Hyok S. Choi2006-06-281-0/+1
| | | | | | | This is a trivial patch to export flush_dcache_page in mm/nommu.c. Signed-off-by: Hyok S. Choi <hyok.choi@samsung.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] nommu: Provide a simple flush_dcache_page implementationRussell King2006-06-281-0/+8
| | | | | | | | nommu doesn't require a complex flush_dcache_page implementation like the MMU-ful CPUs do, so provide a simplified version in nommu.c and omit flush.c from the build as appropriate. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] nommu: add stubs for ioremap and friendsRussell King2006-06-281-0/+30
nommu doesn't have any form of remapping support, so ioremap, etc become stubs which just return the casted address, doing nothing else. Move ioport_map(), ioport_unmap(), pci_iomap(), pci_iounmap() into a separate file which is always built. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>