- 08 Dec, 2011 6 commits
-
-
Catalin Marinas authored
The DFSR and IFSR register format is different when LPAE is enabled. In addition, DFSR and IFSR have similar definitions for the fault type. This modifies the fault code to correctly handle the new format. Signed-off-by:
Catalin Marinas <catalin.marinas@arm.com>
-
Catalin Marinas authored
This patch adds the MMU initialisation for the LPAE page table format. The swapper_pg_dir size with LPAE is 5 rather than 4 pages. A new proc-v7-3level.S file contains the TTB initialisation, context switch and PTE setting code with the LPAE. The TTBRx split is based on the PAGE_OFFSET with TTBR1 used for the kernel mappings. The 36-bit mappings (supersections) and a few other memory types in mmu.c are conditionally compiled. Signed-off-by:
Catalin Marinas <catalin.marinas@arm.com>
-
Catalin Marinas authored
This patch modifies the pgd/pmd/pte manipulation functions to support the 3-level page table format. Since there is no need for an 'ext' argument to cpu_set_pte_ext(), this patch conditionally defines a different prototype for this function when CONFIG_ARM_LPAE. The patch also introduces the L_PGD_SWAPPER flag to mark pgd entries pointing to pmd tables pre-allocated in the swapper_pg_dir and avoid trying to free them at run-time. This flag is 0 with the classic page table format. Signed-off-by:
Catalin Marinas <catalin.marinas@arm.com>
-
Catalin Marinas authored
This patch modifies the proc-v7.S file so that it only contains code shared between classic MMU and LPAE. The non-common code is factored out into a separate file. Signed-off-by:
Catalin Marinas <catalin.marinas@arm.com>
-
Catalin Marinas authored
The FSR structure is different with LPAE and this patch moves the classic MMU specific definition to a separate fsr-2level.c file that is included in fault.c. It also moves the fsr_fs and FSR bits to the fault.h file. Signed-off-by:
Catalin Marinas <catalin.marinas@arm.com>
-
Catalin Marinas authored
With the arch/arm code conversion to pgtable-nopud.h, the section and supersection (un|re)map code triggers compiler warnings on UP systems. This is caused by pmd_offset() being given a pgd_t argument rather than a pud_t one. This patch makes the necessary conversion with the assumption that the pud is folded into the pgd. The page table setting code only loops over the pmd which is enough with the classic page tables. This code is not compiled when LPAE is enabled. Signed-off-by:
Catalin Marinas <catalin.marinas@arm.com>
-
- 06 Dec, 2011 4 commits
-
-
Will Deacon authored
The ARM SMP booting code allocates a temporary set of page tables containing an identity mapping of the kernel image and provides this to secondary CPUs for initial booting. In reality, we only need to include the __turn_mmu_on function in the identity mapping since the rest of the kernel is executing from virtual addresses after this point. This patch adds __turn_mmu_on to the .idmap.text section, allowing the SMP booting code to use the idmap_pgd directly and not have to populate its own set of page table. As a result of this patch, we can make the identity_mapping_add function static (since it is only used within mm/idmap.c) and also remove the identity_mapping_del function. The identity map population is moved to an early initcall so that it is setup in time for secondary CPU bringup. Reviewed-by:
Catalin Marinas <catalin.marinas@arm.com> Signed-off-by:
Will Deacon <will.deacon@arm.com>
-
Will Deacon authored
For soft-rebooting a system, it is necessary to map the MMU-off code with an identity mapping so that execution can continue safely once the MMU has been switched off. Currently, switch_mm_for_reboot takes out a 1:1 mapping from 0x0 to TASK_SIZE during reboot in the hope that the reset code lives at a physical address corresponding to a userspace virtual address. This patch modifies the code so that we switch to the idmap_pgd tables, which contain a 1:1 mapping of the cpu_reset code. This has the advantage of only remapping the code that we need and also means we don't need to worry about allocating a pgd from an atomic context in the case that the physical address of the cpu_reset code aliases with the virtual space used by the kernel. Acked-by:
Dave Martin <dave.martin@linaro.org> Reviewed-by:
Catalin Marinas <catalin.marinas@arm.com> Signed-off-by:
Will Deacon <will.deacon@arm.com>
-
Will Deacon authored
The CPU reset functions disable the MMU and therefore must be executed with an identity mapping in place. This patch places the CPU reset functions into the .idmap.text section, causing the idmap code to include them as part of the identity mapping. Acked-by:
Dave Martin <dave.martin@linaro.org> Signed-off-by:
Will Deacon <will.deacon@arm.com>
-
Will Deacon authored
When disabling and re-enabling the MMU, it is necessary to take out an identity mapping for the code that manipulates the SCTLR in order to avoid it disappearing from under our feet. This is useful when soft rebooting and returning from CPU suspend. This patch allocates a set of page tables during boot and populates them with an identity mapping for the .idmap.text section. This means that users of the identity map do not need to manage their own pgd and can instead annotate their functions with __idmap or, in the case of assembly code, place them in the correct section. Acked-by:
Dave Martin <dave.martin@linaro.org> Reviewed-by:
Catalin Marinas <catalin.marinas@arm.com> Tested-by:
Lorenzo Pieralisi <Lorenzo.Pieralisi@arm.com> Signed-off-by:
Will Deacon <will.deacon@arm.com>
-
- 10 Nov, 2011 1 commit
-
-
Russell King authored
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>
-
- 31 Oct, 2011 5 commits
-
-
Paul Gortmaker authored
These files all make use of one of the EXPORT_SYMBOL variants or the THIS_MODULE macro. So they will need <linux/export.h> Signed-off-by:
Paul Gortmaker <paul.gortmaker@windriver.com>
-
Paul Gortmaker authored
Building these files does not reveal a hidden need for any of these. Since module.h brings in the whole kitchen sink, it just needlessly adds 30k+ lines to the cpp burden. There are probably lots more, but ARM files of mach-* and plat-* don't get coverage via a simple yesconfig build. They will have to be cleaned up and tested via using their respective configs. Signed-off-by:
Paul Gortmaker <paul.gortmaker@windriver.com>
-
Sascha Hauer authored
The patch merges the build of imx3 and imx6. The Kconfig symbol ARCH_IMX_V6_V7 is introduced to replace ARCH_MX3 and ARCH_MX6. Signed-off-by:
Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by:
Shawn Guo <shawn.guo@linaro.org>
-
Shawn Guo authored
It adds generic device tree based machine support for imx6q. Signed-off-by:
Shawn Guo <shawn.guo@linaro.org>
-
Rob Herring authored
This adds basic support for the Calxeda Highbank platform. Signed-off-by:
Rob Herring <rob.herring@calxeda.com> Reviewed-by:
Jamie Iles <jamie@jamieiles.com> Reviewed-by:
Shawn Guo <shawn.guo@linaro.org>
-
- 22 Oct, 2011 1 commit
-
-
Tony Lindgren authored
This allows mapping external memory such as SRAM for use. This is needed for some small chunks of code, such as reprogramming SDRAM memory source clocks that can't be executed in SDRAM. Other use cases include some PM related code. Acked-by:
Nicolas Pitre <nicolas.pitre@linaro.org> Acked-by:
Andres Salomon <dilinger@queued.net> Signed-off-by:
Tony Lindgren <tony@atomide.com> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
- 17 Oct, 2011 5 commits
-
-
Barry Song authored
we save the l2x0 registers at the first initialization, and platform codes can get them to restore l2x0 status after wakeup. Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Signed-off-by:
Barry Song <Baohua.Song@csr.com> Reviewed-by:
Santosh Shilimkar <santosh.shilimkar@ti.com> Tested-by:
Shawn Guo <shawn.guo@linaro.org> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
Barry Song authored
this patch fixes the error in Rob Herring's ARM: 7009/1: l2x0: Add OF based initialization http://www.spinics.net/lists/arm-kernel/msg131123.html it has been in rmk/for-next with commit 41c86ff5b Cc: Shawn Guo <shawn.guo@linaro.org> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by:
Barry Song <Baohua.Song@csr.com> Acked-by:
Rob Herring <robherring2@gmail.com> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
Barry Song authored
using cpu_relax in busy loops is a well-known idiom in the kernel. It's more for documentation purposes than technically needed here. Signed-off-by:
Barry Song <Baohua.Song@csr.com> Acked-by:
Arnd Bergmann <arnd@arndb.de> Reviewed-by:
Jamie Iles <jamie@jamieiles.com> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
Rob Herring authored
This adds probing for ARM L2x0 cache controllers via device tree. Support includes the L210, L220, and PL310 controllers. The binding allows setting up cache RAM latencies and filter addresses (PL310 only). Signed-off-by:
Rob Herring <rob.herring@calxeda.com> Acked-by:
Grant Likely <grant.likely@secretlab.ca> Acked-by:
Arnd Bergmann <arnd@arndb.de> Acked-by:
Olof Johansson <olof@lixom.net> Acked-by:
Barry Song <21cnbao@gmail.com> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
Jamie Iles authored
The definition of __exception_irq_entry for CONFIG_FUNCTION_GRAPH_TRACER=y needs linux/ftrace.h, but this creates a circular dependency with it's current home in asm/system.h. Create asm/exception.h and update all current users. v4: - rebase to rmk/for-next v3: - remove redundant includes of linux/ftrace.h v2: - document the usage restricitions of __exception* Cc: Zoltan Devai <zdevai@gmail.com> Signed-off-by:
Jamie Iles <jamie@jamieiles.com> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
- 06 Oct, 2011 1 commit
-
-
Catalin Marinas authored
This patch defines the (pte|pmd)val_t as u32 and changes the page table types to be based on these. The PMD bits are converted to the corresponding type using the _AT macro. The flush_pmd_entry/clean_pmd_entry argument was changed to (void *) to allow them to be used with both PGD and PMD pointers and avoid code duplication. Signed-off-by:
Catalin Marinas <catalin.marinas@arm.com> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
- 01 Oct, 2011 3 commits
-
-
Arnd Bergmann authored
Support for the cpu_suspend functions is only built-in when CONFIG_PM_SLEEP is enabled, but omap3/4, exynos4 and pxa always call cpu_suspend when CONFIG_PM is enabled. Signed-off-by:
Arnd Bergmann <arnd@arndb.de>
-
Arnd Bergmann authored
The two functions cpu_is_v6_unaligned and safe_usermode are only defined when CONFIG_PROC_FS is enabled, but are used outside of the #ifdef. Signed-off-by:
Arnd Bergmann <arnd@arndb.de> Cc: Dave Martin <dave.martin@linaro.org>
-
Linus Walleij authored
The VM subsystem assumes that there are valid memmap entries from the bank start aligned to MAX_ORDER_NR_PAGES. On the Ux500 we have a lot of mem=N arguments on the commandline triggering this bug several times over and causing kernel oops messages. Cc: stable@kernel.org Cc: Michael Bohan <mbohan@codeaurora.org> Cc: Nicolas Pitre <nico@fluxnic.net> Signed-off-by:
Johan Palsson <johan.palsson@stericsson.com> Signed-off-by:
Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
- 26 Sep, 2011 1 commit
-
-
Russell King authored
If the attempt to map a page for DMA fails (eg, because we're out of mapping space) then we must not hold on to the page we allocated for DMA - doing so will result in a memory leak. Cc: <stable@kernel.org> Reported-by:
Bryan Phillippe <bp@darkforest.org> Tested-by:
Bryan Phillippe <bp@darkforest.org> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
- 23 Sep, 2011 1 commit
-
-
Santosh Shilimkar authored
On certain architectures, there might be a need to mark certain addresses with strongly ordered memory attributes to avoid ordering issues at the interconnect level. On OMAP4, the asynchronous bridge buffers can only be drained with strongly ordered accesses and hence the need to mark the memory strongly ordered. Signed-off-by:
Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by:
Woodruff Richard <r-woodruff2@ti.com> Tested-by:
Vishwanath BS <vishwanath.bs@ti.com>
-
- 20 Sep, 2011 3 commits
-
-
Russell King authored
There is no need to save and restore the context ID register on ARMv6 and ARMv7 with a temporary page table as we write the context ID register when we switch back to the real page tables for the thread. Moreover, the temporary page tables do not contain any non-global mappings, so the context ID value should not be used. To be safe, initialize the register to a reserved context ID value. Tested-by:
Santosh Shilimkar <santosh.shilimkar@ti.com> Tested-by:
Shawn Guo <shawn.guo@linaro.org> Tested-by:
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
Russell King authored
Only use the preallocated page table during the resume, not while suspending. This avoids the overhead of having to switch unnecessarily to the resume page table in the suspend path. Tested-by:
Santosh Shilimkar <santosh.shilimkar@ti.com> Tested-by:
Shawn Guo <shawn.guo@linaro.org> Tested-by:
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
Russell King authored
Preallocate a page table and setup an identity mapping for the MMU enable code. This means we don't have to "borrow" a page table to do this, avoiding complexities with L2 cache coherency. Tested-by:
Santosh Shilimkar <santosh.shilimkar@ti.com> Tested-by:
Shawn Guo <shawn.guo@linaro.org> Tested-by:
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
- 17 Sep, 2011 1 commit
-
-
Will Deacon authored
This patch implements a workaround for erratum 764369 affecting Cortex-A9 MPCore with two or more processors (all current revisions). Under certain timing circumstances, a data cache line maintenance operation by MVA targeting an Inner Shareable memory region may fail to proceed up to either the Point of Coherency or to the Point of Unification of the system. This workaround adds a DSB instruction before the relevant cache maintenance functions and sets a specific bit in the diagnostic control register of the SCU. Cc: <stable@kernel.org> Signed-off-by:
Will Deacon <will.deacon@arm.com> Signed-off-by:
Catalin Marinas <catalin.marinas@arm.com> Tested-by:
Mark Rutland <mark.rutland@arm.com> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
- 13 Sep, 2011 1 commit
-
-
Thomas Gleixner authored
Annotate the low level hardware locks which must not be preempted. In mainline this change documents the low level nature of the lock - otherwise there's no functional difference. Lockdep and Sparse checking will work as usual. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Cc: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by:
Ingo Molnar <mingo@elte.hu>
-
- 10 Sep, 2011 1 commit
-
-
Janusz Krzysztofik authored
Commit be020f86 , "ARM: entry: abort-macro: specify registers to be used for macros", while replacing register numbers with macro parameter names, mismatched the name used for r1. For me, this resulted in user space built for EABI with -march=armv4t -mtune=arm920t -mthumb-interwork -mthumb broken on my OMAP1510 based Amstrad Delta (old ABI and no thumb still worked for me though). Fix this by using correct parameter name fsr instead of mismatched psr, used by callers for another purpose. Signed-off-by:
Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
- 06 Sep, 2011 1 commit
-
-
Linus Walleij authored
Fighting unfixed U-Boots and other beasts that may the cache in a locked-down state when starting the kernel, we make sure to disable all cache lock-down when initializing the l2x0 so we are in a known state. Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> Cc: Rabin Vincent <rabin.vincent@stericsson.com> Cc: Adrian Bunk <adrian.bunk@movial.com> Cc: Rob Herring <robherring2@gmail.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Reviewed-by:
Santosh Shilimkar <santosh.shilimkar@ti.com> Reported-by:
Jan Rinze <janrinze@gmail.com> Tested-by:
Robert Marklund <robert.marklund@stericsson.com> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
- 04 Sep, 2011 1 commit
-
-
Mark Rutland authored
When ARCH_HAS_HOLES_MEMORYMODEL is selected, pfn_valid calls memblock_is_memory to test validity of a pfn: > memblock_is_memory(pfn << PAGE_SHIFT); On LPAE systems this cuts off the top bits, as the shift occurs before the value is promoted to a phys_addr_t. This patch replaces the shift with a call to __pfn_to_phys (which casts pfn to phys_addr_t before shifting), preventing the loss of significant bits. Signed-off-by:
Mark Rutland <mark.rutland@arm.com> Acked-by:
Will Deacon <will.deacon@arm.com> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
- 28 Aug, 2011 4 commits
-
-
Russell King authored
For ARMv7 kernels running in the non-secure world, writing to the auxillary control register causes an abort, so we must avoid directly writing the auxillary control register. If the ACR has already been reinitialized by SoC code, don't try to restore it. Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
Russell King authored
Add a dsb after the isb to ensure that the previous writes to the CP15 registers take effect before we enable the MMU. Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
Russell King authored
ARM920 and ARM926 save four registers, not three. Fix the size of the suspend region required. Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
Russell King authored
r1 stores the v:p offset from the CPU invariant resume code, and is expected to be preserved by the CPU specific code. Overwriting it is not a good idea. We've managed to get away with it on sa1100 platforms because most happen to have PHYS_OFFSET == PAGE_OFFSET, but that may not be the case depending on kernel configuration. So fix this latent bug. This fixes xsc3 as well which was saving and restoring this register independently. Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-