Re: [PATCH v3 RESEND 01/17] ARM: add mechanism for late code patching

2012-09-22 Thread Cyril Chemparathy
On 09/22/12 11:10, Nicolas Pitre wrote: On Fri, 21 Sep 2012, Cyril Chemparathy wrote: The original phys_to_virt/virt_to_phys patching implementation relied on early patching prior to MMU initialization. On PAE systems running out of 4G address space, this would have entailed an additional

Re: [PATCH v3 RESEND 09/17] ARM: LPAE: use phys_addr_t for initrd location and size

2012-09-24 Thread Cyril Chemparathy
On 09/24/12 09:38, Russell King - ARM Linux wrote: On Fri, Sep 21, 2012 at 11:56:07AM -0400, Cyril Chemparathy wrote: From: Vitaly Andrianov vita...@ti.com This patch fixes the initrd setup code to use phys_addr_t instead of assuming 32-bit addressing. Without this we cannot boot on systems

Re: [PATCH v3 RESEND 01/17] ARM: add mechanism for late code patching

2012-09-24 Thread Cyril Chemparathy
Hi Dave, Thanks for the detailed review... On 9/24/2012 8:06 AM, Dave Martin wrote: On Fri, Sep 21, 2012 at 11:55:59AM -0400, Cyril Chemparathy wrote: The original phys_to_virt/virt_to_phys patching implementation relied on early patching prior to MMU initialization. On PAE systems running

Re: [PATCH v7 01/10] ARM: davinci: move private EDMA API to arm/common

2013-02-04 Thread Cyril Chemparathy
On 02/04/2013 12:02 PM, Felipe Balbi wrote: Hi, On Mon, Feb 04, 2013 at 08:54:17PM +0300, Sergei Shtylyov wrote: On Mon, Feb 04, 2013 at 08:36:38PM +0300, Sergei Shtylyov wrote: opted out of it. From the top of my head we have CPPI 3.x, CPPI 4.1, Inventra DMA, OMAP sDMA and ux500 DMA engines

Re: [PATCH v7 01/10] ARM: davinci: move private EDMA API to arm/common

2013-02-04 Thread Cyril Chemparathy
On 02/04/2013 04:11 PM, Linus Walleij wrote: On Mon, Feb 4, 2013 at 9:33 PM, Mark Brown broo...@opensource.wolfsonmicro.com wrote: On Mon, Feb 04, 2013 at 09:29:46PM +0100, Linus Walleij wrote: On Mon, Feb 4, 2013 at 8:22 PM, Cyril Chemparathy cy...@ti.com wrote: Based on our experience

Re: [PATCH v7 01/10] ARM: davinci: move private EDMA API to arm/common

2013-02-04 Thread Cyril Chemparathy
On 02/04/2013 03:29 PM, Linus Walleij wrote: On Mon, Feb 4, 2013 at 8:22 PM, Cyril Chemparathy cy...@ti.com wrote: Based on our experience with fitting multiple subsystems on top of this DMA-Engine driver, I must say that the DMA-Engine interface has proven to be a less than ideal fit

Re: [PATCH v7 01/10] ARM: davinci: move private EDMA API to arm/common

2013-02-05 Thread Cyril Chemparathy
On 02/05/2013 07:38 AM, Russell King - ARM Linux wrote: On Mon, Feb 04, 2013 at 09:47:38PM +, Arnd Bergmann wrote: On Monday 04 February 2013, Linus Walleij wrote: So I think the above concerns are moot. The callback we can set on cookies is entirely optional, and it's even implemented by

Re: [PATCH v7 01/10] ARM: davinci: move private EDMA API to arm/common

2013-02-05 Thread Cyril Chemparathy
On 02/05/2013 07:41 AM, Russell King - ARM Linux wrote: On Mon, Feb 04, 2013 at 04:54:45PM -0500, Cyril Chemparathy wrote: You're assuming that cookies complete in order. That is not necessarily true. Under what circumstances is that not true? Notably when hardware can prioritize certain

Re: [PATCH v7 01/10] ARM: davinci: move private EDMA API to arm/common

2013-02-05 Thread Cyril Chemparathy
On 02/05/2013 01:29 PM, Linus Walleij wrote: On Tue, Feb 5, 2013 at 5:47 PM, Mark Brown broo...@opensource.wolfsonmicro.com wrote: On Tue, Feb 05, 2013 at 05:21:48PM +0100, Linus Walleij wrote: For IRQ mode, use the completion callback to push each cookie to NAPI, and thus let the IRQ drive

[PATCH v4 07/13] ARM: LPAE: define ARCH_LOW_ADDRESS_LIMIT for bootmem

2013-01-31 Thread Cyril Chemparathy
This patch adds an architecture defined override for ARCH_LOW_ADDRESS_LIMIT. On PAE systems, the absence of this override causes bootmem to incorrectly limit itself to 32-bit addressable physical memory. Signed-off-by: Cyril Chemparathy cy...@ti.com Signed-off-by: Vitaly Andrianov vita...@ti.com

[PATCH v4 09/13] ARM: LPAE: accomodate 32-bit addresses for page table base

2013-01-31 Thread Cyril Chemparathy
This patch redefines the early boot time use of the R4 register to steal a few low order bits (ARCH_PGD_SHIFT bits) on LPAE systems. This allows for up to 38-bit physical addresses. Signed-off-by: Cyril Chemparathy cy...@ti.com Signed-off-by: Vitaly Andrianov vita...@ti.com --- arch/arm/include

[PATCH v4 05/13] ARM: LPAE: use phys_addr_t in switch_mm()

2013-01-31 Thread Cyril Chemparathy
This patch modifies the switch_mm() processor functions to use phys_addr_t. On LPAE systems, we now honor the upper 32-bits of the physical address that is being passed in, and program these into TTBR as expected. Signed-off-by: Cyril Chemparathy cy...@ti.com Signed-off-by: Vitaly Andrianov vita

[PATCH v4 08/13] ARM: LPAE: factor out T1SZ and TTBR1 computations

2013-01-31 Thread Cyril Chemparathy
This patch moves the TTBR1 offset calculation and the T1SZ calculation out of the TTB setup assembly code. This should not affect functionality in any way, but improves code readability as well as readability of subsequent patches in this series. Signed-off-by: Cyril Chemparathy cy...@ti.com

[PATCH v4 00/13] ARM LPAE Fixes - Part 1

2013-01-31 Thread Cyril Chemparathy
for membank overlap with [12/13] ARM: mm: clean up membank size limit checks (v4) unchanged from v3 (v3) unchanged from v2 (v2) unchanged from v1 [13/13] ARM: fix type of PHYS_PFN_OFFSET to unsigned long (v4) introduced here Cyril Chemparathy (10): ARM: LPAE: use signed arithmetic

[PATCH v4 10/13] ARM: mm: use physical addresses in highmem sanity checks

2013-01-31 Thread Cyril Chemparathy
be mapped in a monotonically increasing fashion if there are multiple banks of memory, i.e., x y must = pa(x) pa(y). Signed-off-by: Cyril Chemparathy cy...@ti.com Signed-off-by: Vitaly Andrianov vita...@ti.com Acked-by: Nicolas Pitre n...@linaro.org --- arch/arm/mm/mmu.c | 22

[PATCH v4 01/13] ARM: LPAE: use signed arithmetic for mask definitions

2013-01-31 Thread Cyril Chemparathy
thing. Signed-off-by: Cyril Chemparathy cy...@ti.com Signed-off-by: Vitaly Andrianov vita...@ti.com Reviewed-by: Nicolas Pitre n...@linaro.org Reviewed-by: Catalin Marinas catalin.mari...@arm.com --- arch/arm/include/asm/page.h |2 +- arch/arm/include/asm/pgtable-3level.h |6

[PATCH v4 03/13] ARM: LPAE: use phys_addr_t in free_memmap()

2013-01-31 Thread Cyril Chemparathy
. Signed-off-by: Vitaly Andrianov vita...@ti.com Signed-off-by: Cyril Chemparathy cy...@ti.com Acked-by: Nicolas Pitre n...@linaro.org --- arch/arm/mm/init.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index ad722f1..1c5151a 100644

[PATCH v4 13/13] ARM: fix type of PHYS_PFN_OFFSET to unsigned long

2013-01-31 Thread Cyril Chemparathy
'long unsigned int', but argument 2 has type 'phys_addr_t' [-Wformat] This patch fixes this warning by pinning down the PFN type to unsigned long. Signed-off-by: Cyril Chemparathy cy...@ti.com --- arch/arm/include/asm/memory.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v4 02/13] ARM: LPAE: use phys_addr_t in alloc_init_pud()

2013-01-31 Thread Cyril Chemparathy
), which applied similar changes elsewhere in the ARM memory management code. Signed-off-by: Vitaly Andrianov vita...@ti.com Signed-off-by: Cyril Chemparathy cy...@ti.com Acked-by: Nicolas Pitre n...@linaro.org Acked-by: Catalin Marinas catalin.mari...@arm.com --- arch/arm/mm/mmu.c |3 ++- 1 file

[PATCH v4 12/13] ARM: mm: clean up membank size limit checks

2013-01-31 Thread Cyril Chemparathy
by the !highmem condition. Signed-off-by: Cyril Chemparathy cy...@ti.com Signed-off-by: Vitaly Andrianov vita...@ti.com Acked-by: Nicolas Pitre n...@linaro.org --- arch/arm/mm/mmu.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm

[PATCH v4 04/13] ARM: LPAE: use phys_addr_t for initrd location

2013-01-31 Thread Cyril Chemparathy
-by: Cyril Chemparathy cy...@ti.com Acked-by: Nicolas Pitre n...@linaro.org Acked-by: Catalin Marinas catalin.mari...@arm.com --- arch/arm/mm/init.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 1c5151a..87ee0ec 100644

[PATCH v4 06/13] ARM: LPAE: use 64-bit accessors for TTBR registers

2013-01-31 Thread Cyril Chemparathy
-by: Cyril Chemparathy cy...@ti.com Signed-off-by: Vitaly Andrianov vita...@ti.com Acked-by: Nicolas Pitre n...@linaro.org Reviewed-by: Catalin Marinas catalin.mari...@arm.com --- arch/arm/include/asm/proc-fns.h | 22 +- arch/arm/mm/context.c |9 ++--- 2 files

[PATCH v4 11/13] ARM: mm: cleanup checks for membank overlap with vmalloc area

2013-01-31 Thread Cyril Chemparathy
) by checking bank-start against the physical address corresponding to vmalloc_min instead. In the process, this patch also cleans up parts of the highmem sanity check code by removing what has now become a redundant check for banks that entirely overlap with the vmalloc range. Signed-off-by: Cyril

Re: [PATCH v4 00/13] ARM LPAE Fixes - Part 1

2013-02-01 Thread Cyril Chemparathy
Hi Nico, On 01/31/2013 11:00 PM, Nicolas Pitre wrote: On Thu, 31 Jan 2013, Cyril Chemparathy wrote: This series is a repost of the LPAE related changes in preparation for the introduction of the Keystone sub-architecture. The original series has now been split, and this particular series

Re: [PATCH v4 00/13] ARM LPAE Fixes - Part 1

2013-02-01 Thread Cyril Chemparathy
On 02/01/2013 10:14 AM, Russell King - ARM Linux wrote: On Fri, Feb 01, 2013 at 10:10:37AM -0500, Cyril Chemparathy wrote: With this, I ran simple network and filesystem performance tests to compare the code-patching vs. non-code-patching variants. These tests didn't yield any significant

Re: [PATCH v4 02/13] ARM: LPAE: use phys_addr_t in alloc_init_pud()

2013-02-01 Thread Cyril Chemparathy
On 02/01/2013 12:33 PM, Subash Patel wrote: Hi Nicolas, On Thursday 31 January 2013 07:35 PM, Nicolas Pitre wrote: On Fri, 1 Feb 2013, Hui Wang wrote: Cyril Chemparathy wrote: From: Vitaly Andrianov vita...@ti.com This patch fixes the alloc_init_pud() function to use phys_addr_t instead

Re: [PATCH v2 16/22] ARM: mm: cleanup checks for membank overlap with vmalloc area

2012-09-10 Thread Cyril Chemparathy
On 8/12/2012 12:36 AM, Nicolas Pitre wrote: On Fri, 10 Aug 2012, Cyril Chemparathy wrote: On Keystone platforms, physical memory is entirely outside the 32-bit addressible range. Therefore, the (bank-start ULONG_MAX) check below marks the entire system memory as highmem, and this causes

[PATCH v3 RESEND 06/17] ARM: LPAE: use signed arithmetic for mask definitions

2012-09-21 Thread Cyril Chemparathy
thing. Signed-off-by: Cyril Chemparathy cy...@ti.com Signed-off-by: Vitaly Andrianov vita...@ti.com Reviewed-by: Nicolas Pitre n...@linaro.org --- arch/arm/include/asm/page.h |2 +- arch/arm/include/asm/pgtable-3level.h |6 +++--- 2 files changed, 4 insertions(+), 4 deletions

[PATCH v3 RESEND 14/17] ARM: LPAE: accomodate 32-bit addresses for page table base

2012-09-21 Thread Cyril Chemparathy
This patch redefines the early boot time use of the R4 register to steal a few low order bits (ARCH_PGD_SHIFT bits) on LPAE systems. This allows for up to 38-bit physical addresses. Signed-off-by: Cyril Chemparathy cy...@ti.com Signed-off-by: Vitaly Andrianov vita...@ti.com --- arch/arm/include

[PATCH v3 RESEND 08/17] ARM: LPAE: use phys_addr_t in free_memmap()

2012-09-21 Thread Cyril Chemparathy
. Signed-off-by: Vitaly Andrianov vita...@ti.com Signed-off-by: Cyril Chemparathy cy...@ti.com Acked-by: Nicolas Pitre n...@linaro.org --- arch/arm/mm/init.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 9aec41f..19ba70b 100644

[PATCH v3 RESEND 16/17] ARM: mm: cleanup checks for membank overlap with vmalloc area

2012-09-21 Thread Cyril Chemparathy
) by checking bank-start against the physical address corresponding to vmalloc_min instead. In the process, this patch also cleans up parts of the highmem sanity check code by removing what has now become a redundant check for banks that entirely overlap with the vmalloc range. Signed-off-by: Cyril

[PATCH v3 RESEND 00/17] LPAE fixes and extensions for Keystone

2012-09-21 Thread Cyril Chemparathy
(17/22) ARM: mm: clean up membank size limit checks (v3) unchanged from v2 (v2) unchanged from v1 Cyril Chemparathy (14): ARM: add mechanism for late code patching ARM: add self test for runtime patch mechanism ARM: use late patch framework for phys-virt patching ARM: LPAE: use

[PATCH v3 RESEND 12/17] ARM: LPAE: define ARCH_LOW_ADDRESS_LIMIT for bootmem

2012-09-21 Thread Cyril Chemparathy
This patch adds an architecture defined override for ARCH_LOW_ADDRESS_LIMIT. On PAE systems, the absence of this override causes bootmem to incorrectly limit itself to 32-bit addressable physical memory. Signed-off-by: Cyril Chemparathy cy...@ti.com Signed-off-by: Vitaly Andrianov vita...@ti.com

[PATCH v3 RESEND 11/17] ARM: LPAE: use 64-bit accessors for TTBR registers

2012-09-21 Thread Cyril Chemparathy
-by: Cyril Chemparathy cy...@ti.com Signed-off-by: Vitaly Andrianov vita...@ti.com Acked-by: Nicolas Pitre n...@linaro.org --- arch/arm/include/asm/proc-fns.h | 24 +++- arch/arm/mm/context.c |9 ++--- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git

[PATCH v3 RESEND 05/17] ARM: LPAE: support 64-bit virt_to_phys patching

2012-09-21 Thread Cyril Chemparathy
computations on the upper 32-bits would be discarded anyway. Signed-off-by: Cyril Chemparathy cy...@ti.com --- arch/arm/include/asm/memory.h | 38 -- arch/arm/kernel/head.S|4 arch/arm/kernel/setup.c |2 +- 3 files changed, 41 insertions

[PATCH v3 RESEND 07/17] ARM: LPAE: use phys_addr_t in alloc_init_pud()

2012-09-21 Thread Cyril Chemparathy
), which applied similar changes elsewhere in the ARM memory management code. Signed-off-by: Vitaly Andrianov vita...@ti.com Signed-off-by: Cyril Chemparathy cy...@ti.com Acked-by: Nicolas Pitre n...@linaro.org --- arch/arm/mm/mmu.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH v3 RESEND 04/17] ARM: LPAE: use phys_addr_t on virt -- phys conversion

2012-09-21 Thread Cyril Chemparathy
This patch fixes up the types used when converting back and forth between physical and virtual addresses. Signed-off-by: Vitaly Andrianov vita...@ti.com Signed-off-by: Cyril Chemparathy cy...@ti.com Reviewed-by: Nicolas Pitre n...@linaro.org --- arch/arm/include/asm/memory.h | 26

[PATCH v3 RESEND 17/17] ARM: mm: clean up membank size limit checks

2012-09-21 Thread Cyril Chemparathy
by the !highmem condition. Signed-off-by: Cyril Chemparathy cy...@ti.com Signed-off-by: Vitaly Andrianov vita...@ti.com --- arch/arm/mm/mmu.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index e631f73..794457a 100644

[PATCH v3 RESEND 09/17] ARM: LPAE: use phys_addr_t for initrd location and size

2012-09-21 Thread Cyril Chemparathy
-by: Cyril Chemparathy cy...@ti.com Acked-by: Nicolas Pitre n...@linaro.org --- arch/arm/mm/init.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 19ba70b..bae9d05 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c

[PATCH v3 RESEND 10/17] ARM: LPAE: use phys_addr_t in switch_mm()

2012-09-21 Thread Cyril Chemparathy
This patch modifies the switch_mm() processor functions to use phys_addr_t. On LPAE systems, we now honor the upper 32-bits of the physical address that is being passed in, and program these into TTBR as expected. Signed-off-by: Cyril Chemparathy cy...@ti.com Signed-off-by: Vitaly Andrianov vita

[PATCH v3 RESEND 01/17] ARM: add mechanism for late code patching

2012-09-21 Thread Cyril Chemparathy
' modifier has been found to ICE certain versions of GCC, and therefore we resort to stringified symbols here. Signed-off-by: Cyril Chemparathy cy...@ti.com Reviewed-by: Nicolas Pitre n...@linaro.org --- arch/arm/Kconfig |3 + arch/arm/include/asm/module.h|7

[PATCH v3 RESEND 03/17] ARM: use late patch framework for phys-virt patching

2012-09-21 Thread Cyril Chemparathy
This patch replaces the original physical offset patching implementation with one that uses the newly added patching framework. Signed-off-by: Cyril Chemparathy cy...@ti.com --- arch/arm/Kconfig |1 + arch/arm/include/asm/memory.h | 26 +++ arch/arm/kernel/armksyms.c

[PATCH v3 RESEND 13/17] ARM: LPAE: factor out T1SZ and TTBR1 computations

2012-09-21 Thread Cyril Chemparathy
This patch moves the TTBR1 offset calculation and the T1SZ calculation out of the TTB setup assembly code. This should not affect functionality in any way, but improves code readability as well as readability of subsequent patches in this series. Signed-off-by: Cyril Chemparathy cy...@ti.com

[PATCH v3 RESEND 02/17] ARM: add self test for runtime patch mechanism

2012-09-21 Thread Cyril Chemparathy
This patch adds basic sanity tests to ensure that the instruction patching results in valid instruction encodings. This is done by verifying the output of the patch process against a vector of assembler generated instructions at init time. Signed-off-by: Cyril Chemparathy cy...@ti.com --- arch

[PATCH v3 RESEND 15/17] ARM: mm: use physical addresses in highmem sanity checks

2012-09-21 Thread Cyril Chemparathy
be mapped in a monotonically increasing fashion if there are multiple banks of memory, i.e., x y must = pa(x) pa(y). Signed-off-by: Cyril Chemparathy cy...@ti.com Signed-off-by: Vitaly Andrianov vita...@ti.com Acked-by: Nicolas Pitre n...@linaro.org --- arch/arm/mm/mmu.c | 22

Re: [PATCH v3 02/17] ARM: add self test for runtime patch mechanism

2012-09-21 Thread Cyril Chemparathy
On 9/21/2012 1:40 PM, Nicolas Pitre wrote: On Tue, 11 Sep 2012, Cyril Chemparathy wrote: This patch adds basic sanity tests to ensure that the instruction patching results in valid instruction encodings. This is done by verifying the output of the patch process against a vector of assembler

Re: [PATCH v3 01/17] ARM: add mechanism for late code patching

2012-09-21 Thread Cyril Chemparathy
On 9/21/2012 2:09 PM, Nicolas Pitre wrote: On Tue, 11 Sep 2012, Cyril Chemparathy wrote: The original phys_to_virt/virt_to_phys patching implementation relied on early patching prior to MMU initialization. On PAE systems running out of 4G address space, this would have entailed an additional

Re: [PATCH v3 17/17] ARM: mm: clean up membank size limit checks

2012-09-21 Thread Cyril Chemparathy
On 9/21/2012 2:42 PM, Nicolas Pitre wrote: On Tue, 11 Sep 2012, Cyril Chemparathy wrote: This patch cleans up the highmem sanity check code by simplifying the range checks with a pre-calculated size_limit. This patch should otherwise have no functional impact on behavior. This patch also

[PATCH v3 08/17] ARM: LPAE: use phys_addr_t in free_memmap()

2012-09-11 Thread Cyril Chemparathy
. Signed-off-by: Vitaly Andrianov vita...@ti.com Signed-off-by: Cyril Chemparathy cy...@ti.com Acked-by: Nicolas Pitre n...@linaro.org --- arch/arm/mm/init.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index ad722f1..1c5151a 100644

[PATCH v3 04/17] ARM: LPAE: use phys_addr_t on virt -- phys conversion

2012-09-11 Thread Cyril Chemparathy
This patch fixes up the types used when converting back and forth between physical and virtual addresses. Signed-off-by: Vitaly Andrianov vita...@ti.com Signed-off-by: Cyril Chemparathy cy...@ti.com Reviewed-by: Nicolas Pitre n...@linaro.org --- arch/arm/include/asm/memory.h | 26

[PATCH v3 09/17] ARM: LPAE: use phys_addr_t for initrd location and size

2012-09-11 Thread Cyril Chemparathy
-by: Cyril Chemparathy cy...@ti.com Acked-by: Nicolas Pitre n...@linaro.org --- arch/arm/mm/init.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 1c5151a..87ee0ec 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c

[PATCH v3 02/17] ARM: add self test for runtime patch mechanism

2012-09-11 Thread Cyril Chemparathy
This patch adds basic sanity tests to ensure that the instruction patching results in valid instruction encodings. This is done by verifying the output of the patch process against a vector of assembler generated instructions at init time. Signed-off-by: Cyril Chemparathy cy...@ti.com --- arch

[PATCH v3 07/17] ARM: LPAE: use phys_addr_t in alloc_init_pud()

2012-09-11 Thread Cyril Chemparathy
), which applied similar changes elsewhere in the ARM memory management code. Signed-off-by: Vitaly Andrianov vita...@ti.com Signed-off-by: Cyril Chemparathy cy...@ti.com Acked-by: Nicolas Pitre n...@linaro.org --- arch/arm/mm/mmu.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH v3 00/17] LPAE fixes and extensions for Keystone

2012-09-11 Thread Cyril Chemparathy
checks (16/22) ARM: mm: cleanup checks for membank overlap with vmalloc area (17/22) ARM: mm: clean up membank size limit checks (v3) unchanged from v2 (v2) unchanged from v1 Cyril Chemparathy (14): ARM: add mechanism for late code patching ARM: add self test for runtime patch mechanism

[PATCH v3 01/17] ARM: add mechanism for late code patching

2012-09-11 Thread Cyril Chemparathy
' modifier has been found to ICE certain versions of GCC, and therefore we resort to stringified symbols here. Signed-off-by: Cyril Chemparathy cy...@ti.com Reviewed-by: Nicolas Pitre n...@linaro.org --- arch/arm/Kconfig |3 + arch/arm/include/asm/module.h|7

[PATCH v3 03/17] ARM: use late patch framework for phys-virt patching

2012-09-11 Thread Cyril Chemparathy
This patch replaces the original physical offset patching implementation with one that uses the newly added patching framework. Signed-off-by: Cyril Chemparathy cy...@ti.com --- arch/arm/Kconfig |1 + arch/arm/include/asm/memory.h | 26 +++ arch/arm/kernel/armksyms.c

[PATCH v3 11/17] ARM: LPAE: use 64-bit accessors for TTBR registers

2012-09-11 Thread Cyril Chemparathy
-by: Cyril Chemparathy cy...@ti.com Signed-off-by: Vitaly Andrianov vita...@ti.com Acked-by: Nicolas Pitre n...@linaro.org --- arch/arm/include/asm/proc-fns.h | 24 +++- arch/arm/mm/context.c |9 ++--- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git

[PATCH v3 16/17] ARM: mm: cleanup checks for membank overlap with vmalloc area

2012-09-11 Thread Cyril Chemparathy
) by checking bank-start against the physical address corresponding to vmalloc_min instead. In the process, this patch also cleans up parts of the highmem sanity check code by removing what has now become a redundant check for banks that entirely overlap with the vmalloc range. Signed-off-by: Cyril

[PATCH v3 15/17] ARM: mm: use physical addresses in highmem sanity checks

2012-09-11 Thread Cyril Chemparathy
be mapped in a monotonically increasing fashion if there are multiple banks of memory, i.e., x y must = pa(x) pa(y). Signed-off-by: Cyril Chemparathy cy...@ti.com Signed-off-by: Vitaly Andrianov vita...@ti.com Acked-by: Nicolas Pitre n...@linaro.org --- arch/arm/mm/mmu.c | 22

[PATCH v3 14/17] ARM: LPAE: accomodate 32-bit addresses for page table base

2012-09-11 Thread Cyril Chemparathy
This patch redefines the early boot time use of the R4 register to steal a few low order bits (ARCH_PGD_SHIFT bits) on LPAE systems. This allows for up to 38-bit physical addresses. Signed-off-by: Cyril Chemparathy cy...@ti.com Signed-off-by: Vitaly Andrianov vita...@ti.com --- arch/arm/include

[PATCH v3 05/17] ARM: LPAE: support 64-bit virt_to_phys patching

2012-09-11 Thread Cyril Chemparathy
computations on the upper 32-bits would be discarded anyway. Signed-off-by: Cyril Chemparathy cy...@ti.com --- arch/arm/include/asm/memory.h | 38 -- arch/arm/kernel/head.S|4 arch/arm/kernel/setup.c |2 +- 3 files changed, 41 insertions

[PATCH v3 10/17] ARM: LPAE: use phys_addr_t in switch_mm()

2012-09-11 Thread Cyril Chemparathy
This patch modifies the switch_mm() processor functions to use phys_addr_t. On LPAE systems, we now honor the upper 32-bits of the physical address that is being passed in, and program these into TTBR as expected. Signed-off-by: Cyril Chemparathy cy...@ti.com Signed-off-by: Vitaly Andrianov vita

[PATCH v3 13/17] ARM: LPAE: factor out T1SZ and TTBR1 computations

2012-09-11 Thread Cyril Chemparathy
This patch moves the TTBR1 offset calculation and the T1SZ calculation out of the TTB setup assembly code. This should not affect functionality in any way, but improves code readability as well as readability of subsequent patches in this series. Signed-off-by: Cyril Chemparathy cy...@ti.com

[PATCH v3 12/17] ARM: LPAE: define ARCH_LOW_ADDRESS_LIMIT for bootmem

2012-09-11 Thread Cyril Chemparathy
This patch adds an architecture defined override for ARCH_LOW_ADDRESS_LIMIT. On PAE systems, the absence of this override causes bootmem to incorrectly limit itself to 32-bit addressable physical memory. Signed-off-by: Cyril Chemparathy cy...@ti.com Signed-off-by: Vitaly Andrianov vita...@ti.com

[PATCH v3 06/17] ARM: LPAE: use signed arithmetic for mask definitions

2012-09-11 Thread Cyril Chemparathy
thing. Signed-off-by: Cyril Chemparathy cy...@ti.com Signed-off-by: Vitaly Andrianov vita...@ti.com Reviewed-by: Nicolas Pitre n...@linaro.org --- arch/arm/include/asm/page.h |2 +- arch/arm/include/asm/pgtable-3level.h |6 +++--- 2 files changed, 4 insertions(+), 4 deletions

[PATCH v3 17/17] ARM: mm: clean up membank size limit checks

2012-09-11 Thread Cyril Chemparathy
by the !highmem condition. Signed-off-by: Cyril Chemparathy cy...@ti.com Signed-off-by: Vitaly Andrianov vita...@ti.com --- arch/arm/mm/mmu.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 6c35483..50d9df5 100644

[PATCH] ARM: fix type of PHYS_PFN_OFFSET to unsigned long

2012-09-12 Thread Cyril Chemparathy
'long unsigned int', but argument 2 has type 'phys_addr_t' [-Wformat] This patch fixes this warning by pinning down the PFN type to unsigned long. Signed-off-by: Cyril Chemparathy cy...@ti.com --- arch/arm/include/asm/memory.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] ARM: fix warning on uninitialized offset.un

2012-09-12 Thread Cyril Chemparathy
is to promote the initialization of offset into do_alignment(). Signed-off-by: Cyril Chemparathy cy...@ti.com --- arch/arm/mm/alignment.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c index 9107231..d15877c 100644 --- a/arch/arm

[PATCH] /dev/mem: use phys_addr_t for physical addresses

2012-09-12 Thread Cyril Chemparathy
This patch fixes the /dev/mem driver to use phys_addr_t for physical addresses. This is required on PAE systems, especially those that run entirely out of 4G physical memory space. --- arch/arm/include/asm/io.h |2 +- arch/arm/mm/mmap.c |2 +- arch/ia64/include/asm/io.h |2

[PATCH] of: specify initrd location using 64-bit

2012-09-12 Thread Cyril Chemparathy
On some PAE architectures, the entire range of physical memory could reside outside the 32-bit limit. These systems need the ability to specify the initrd location using 64-bit numbers. This patch globally modifies the early_init_dt_setup_initrd_arch() function to use 64-bit numbers instead of

[PATCH] mm: bootmem: use phys_addr_t for physical addresses

2012-09-12 Thread Cyril Chemparathy
guidance towards a better solution to this problem. Signed-off-by: Vitaly Andrianov vita...@ti.com Signed-off-by: Cyril Chemparathy cy...@ti.com --- include/linux/bootmem.h | 30 mm/bootmem.c| 59 --- 2 files changed

Re: [PATCH] of: specify initrd location using 64-bit

2012-09-12 Thread Cyril Chemparathy
On 9/12/2012 12:16 PM, Geert Uytterhoeven wrote: On Wed, Sep 12, 2012 at 6:05 PM, Cyril Chemparathy cy...@ti.com wrote: On some PAE architectures, the entire range of physical memory could reside outside the 32-bit limit. These systems need the ability to specify the initrd location using 64

[PATCH v2] /dev/mem: use phys_addr_t for physical addresses

2012-09-12 Thread Cyril Chemparathy
This patch fixes the /dev/mem driver to use phys_addr_t for physical addresses. This is required on PAE systems, especially those that run entirely out of 4G physical memory space. Signed-off-by: Cyril Chemparathy cy...@ti.com --- arch/arm/include/asm/io.h |2 +- arch/arm/mm/mmap.c

[PATCH] davinci: check for presence of channel controller on slot alloc

2012-09-12 Thread Cyril Chemparathy
This patch adds a check for the presence of the channel controller when trying to allocate a slot. Without this fix, the kernel panics with a NULL pointer dereference when the dma-engine drivers are probed. Signed-off-by: Cyril Chemparathy cy...@ti.com --- arch/arm/mach-davinci/dma.c |3

Re: [PATCH v2] /dev/mem: use phys_addr_t for physical addresses

2012-09-12 Thread Cyril Chemparathy
Greg, On 9/12/2012 2:15 PM, Greg KH wrote: On Wed, Sep 12, 2012 at 02:05:58PM -0400, Cyril Chemparathy wrote: This patch fixes the /dev/mem driver to use phys_addr_t for physical addresses. This is required on PAE systems, especially those that run entirely out of 4G physical memory space

Re: [PATCH] of: specify initrd location using 64-bit

2012-09-12 Thread Cyril Chemparathy
On 9/12/2012 4:23 PM, Rob Herring wrote: On 09/12/2012 11:05 AM, Cyril Chemparathy wrote: On some PAE architectures, the entire range of physical memory could reside outside the 32-bit limit. These systems need the ability to specify the initrd location using 64-bit numbers. This patch

Re: [PATCH] mm: bootmem: use phys_addr_t for physical addresses

2012-09-12 Thread Cyril Chemparathy
Hi Tejun, On 9/12/2012 4:39 PM, Tejun Heo wrote: Hello, On Wed, Sep 12, 2012 at 12:06:48PM -0400, Cyril Chemparathy wrote: static void * __init alloc_bootmem_core(unsigned long size, unsigned long align

Re: [PATCH] mm: bootmem: use phys_addr_t for physical addresses

2012-09-12 Thread Cyril Chemparathy
Hi Tejun, On 9/12/2012 8:34 PM, Tejun Heo wrote: Hello, On Wed, Sep 12, 2012 at 08:08:30PM -0400, Cyril Chemparathy wrote: So, a function which takes phys_addr_t for goal and limit but returns void * doesn't make much sense unless the function creates directly addressable mapping somewhere

[PATCH] sch_red: fix weighted average calculation

2012-09-13 Thread Cyril Chemparathy
This patch fixes an apparent bug in the running weighted average calculation used in the RED algorithm. Going by the described formula: qavg = qavg*(1-W) + backlog*W = qavg = qavg + (backlog - qavg) * W ... with W converted to a pre-calculated shift, this then becomes:

Re: [RFC 02/23] ARM: LPAE: use signed arithmetic for mask definitions

2012-07-31 Thread Cyril Chemparathy
Hi Catalin, On 7/24/2012 6:05 AM, Catalin Marinas wrote: On Tue, Jul 24, 2012 at 02:09:04AM +0100, Cyril Chemparathy wrote: This patch applies to PAGE_MASK, PMD_MASK, and PGDIR_MASK, where forcing unsigned long math truncates the mask at the 32-bits. This clearly does bad things on PAE

Re: [PATCH 01/22] ARM: add mechanism for late code patching

2012-08-07 Thread Cyril Chemparathy
Hi Nicolas, On 8/4/2012 1:38 AM, Nicolas Pitre wrote: [...] extern unsigned __patch_table_begin, __patch_table_end; You could use exttern void __patch_table_begin so those symbols don't get any type that could be misused by mistake, while you still can take their addresses. Looks like

Re: [PATCH 01/22] ARM: add mechanism for late code patching

2012-08-08 Thread Cyril Chemparathy
On 08/08/12 01:56, Nicolas Pitre wrote: On Tue, 7 Aug 2012, Cyril Chemparathy wrote: [...] u32 arm_check[] = { 0xe2810041, 0xe2810082, 0xe2810f41, 0xe2810f82, 0xe2810e41, 0xe2810e82, 0xe2810d41, 0xe2810d82, 0xe2810c41, 0xe2810c82, 0xe2810b41, 0xe2810b82, 0xe2810a41

Re: [PATCH 03/22] ARM: LPAE: use phys_addr_t on virt -- phys conversion

2012-08-09 Thread Cyril Chemparathy
Hi Russell, On 8/6/2012 7:14 AM, Russell King - ARM Linux wrote: On Tue, Jul 31, 2012 at 07:04:39PM -0400, Cyril Chemparathy wrote: This patch fixes up the types used when converting back and forth between physical and virtual addresses. Signed-off-by: Vitaly Andrianov vita...@ti.com Signed

[PATCH v2 14/22] ARM: LPAE: accomodate 32-bit addresses for page table base

2012-08-10 Thread Cyril Chemparathy
This patch redefines the early boot time use of the R4 register to steal a few low order bits (ARCH_PGD_SHIFT bits) on LPAE systems. This allows for up to 38-bit physical addresses. Signed-off-by: Cyril Chemparathy cy...@ti.com Signed-off-by: Vitaly Andrianov vita...@ti.com --- arch/arm/include

[PATCH v2 17/22] ARM: mm: clean up membank size limit checks

2012-08-10 Thread Cyril Chemparathy
by the !highmem condition. Signed-off-by: Cyril Chemparathy cy...@ti.com Signed-off-by: Vitaly Andrianov vita...@ti.com --- arch/arm/mm/mmu.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 3d685c6..662684b 100644

[PATCH v2 12/22] ARM: LPAE: define ARCH_LOW_ADDRESS_LIMIT for bootmem

2012-08-10 Thread Cyril Chemparathy
This patch adds an architecture defined override for ARCH_LOW_ADDRESS_LIMIT. On PAE systems, the absence of this override causes bootmem to incorrectly limit itself to 32-bit addressable physical memory. Signed-off-by: Cyril Chemparathy cy...@ti.com Signed-off-by: Vitaly Andrianov vita...@ti.com

[PATCH v2 10/22] ARM: LPAE: use phys_addr_t in switch_mm()

2012-08-10 Thread Cyril Chemparathy
This patch modifies the switch_mm() processor functions to use phys_addr_t. On LPAE systems, we now honor the upper 32-bits of the physical address that is being passed in, and program these into TTBR as expected. Signed-off-by: Cyril Chemparathy cy...@ti.com Signed-off-by: Vitaly Andrianov vita

[RFC v2 20/22] ARM: keystone: introducing TI Keystone platform

2012-08-10 Thread Cyril Chemparathy
physical memory addressing capabilities via LPAE. Signed-off-by: Vitaly Andrianov vita...@ti.com Signed-off-by: Cyril Chemparathy cy...@ti.com Reviewed-by: Arnd Bergmann a...@arndb.de --- arch/arm/Kconfig | 18 + arch/arm/Makefile

[PATCH v2 05/22] ARM: LPAE: support 64-bit virt_to_phys patching

2012-08-10 Thread Cyril Chemparathy
computations on the upper 32-bits would be discarded anyway. Signed-off-by: Cyril Chemparathy cy...@ti.com --- arch/arm/include/asm/memory.h | 22 ++ arch/arm/kernel/head.S|4 arch/arm/kernel/setup.c |2 +- 3 files changed, 23 insertions(+), 5 deletions

[PATCH v2 19/22] ARM: recreate kernel mappings in early_paging_init()

2012-08-10 Thread Cyril Chemparathy
a machine descriptor hook that allows the PHYS_OFFSET to be overridden in a machine specific fashion. Signed-off-by: Cyril Chemparathy cy...@ti.com Signed-off-by: Vitaly Andrianov vita...@ti.com --- arch/arm/include/asm/mach/arch.h |1 + arch/arm/kernel/setup.c |3 ++ arch/arm/mm/mmu.c

[PATCH v2 15/22] ARM: mm: use physical addresses in highmem sanity checks

2012-08-10 Thread Cyril Chemparathy
be mapped in a monotonically increasing fashion if there are multiple banks of memory, i.e., x y must = pa(x) pa(y). Signed-off-by: Cyril Chemparathy cy...@ti.com Signed-off-by: Vitaly Andrianov vita...@ti.com --- arch/arm/mm/mmu.c | 22 ++ 1 file changed, 10 insertions

[PATCH v2 01/22] ARM: add mechanism for late code patching

2012-08-10 Thread Cyril Chemparathy
' modifier has been found to ICE certain versions of GCC, and therefore we resort to stringified symbols here. Signed-off-by: Cyril Chemparathy cy...@ti.com --- arch/arm/Kconfig |3 + arch/arm/include/asm/module.h|7 ++ arch/arm/include/asm/runtime-patch.h | 175

[PATCH v2 04/22] ARM: LPAE: use phys_addr_t on virt -- phys conversion

2012-08-10 Thread Cyril Chemparathy
This patch fixes up the types used when converting back and forth between physical and virtual addresses. Signed-off-by: Vitaly Andrianov vita...@ti.com Signed-off-by: Cyril Chemparathy cy...@ti.com --- arch/arm/include/asm/memory.h | 26 ++ 1 file changed, 18

[PATCH v2 13/22] ARM: LPAE: factor out T1SZ and TTBR1 computations

2012-08-10 Thread Cyril Chemparathy
This patch moves the TTBR1 offset calculation and the T1SZ calculation out of the TTB setup assembly code. This should not affect functionality in any way, but improves code readability as well as readability of subsequent patches in this series. Signed-off-by: Cyril Chemparathy cy...@ti.com

[PATCH v2 07/22] ARM: LPAE: use phys_addr_t in alloc_init_pud()

2012-08-10 Thread Cyril Chemparathy
), which applied similar changes elsewhere in the ARM memory management code. Signed-off-by: Vitaly Andrianov vita...@ti.com Signed-off-by: Cyril Chemparathy cy...@ti.com Acked-by: Nicolas Pitre n...@linaro.org --- arch/arm/mm/mmu.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH v2 03/22] ARM: use late patch framework for phys-virt patching

2012-08-10 Thread Cyril Chemparathy
This patch replaces the original physical offset patching implementation with one that uses the newly added patching framework. In the process, we now unconditionally initialize the __pv_phys_offset and __pv_offset globals in the head.S code. Signed-off-by: Cyril Chemparathy cy...@ti.com

[PATCH v2 00/22] Introducing the TI Keystone platform

2012-08-10 Thread Cyril Chemparathy
This series is a follow on to the series posted earlier (archived at [1]). Patches 01/22 .. 09/22 of this series have been pretty intensively reviewed; thanks to all who helped. We've modified per feedback, and these should be in reasonable shape. Patches 10/22 .. 19/22 of this series have not

[RFC v2 22/22] ARM: keystone: add switch over to high physical address range

2012-08-10 Thread Cyril Chemparathy
...@ti.com Signed-off-by: Cyril Chemparathy cy...@ti.com --- arch/arm/Kconfig |1 + arch/arm/boot/dts/keystone-sim.dts |8 +++--- arch/arm/configs/keystone_defconfig |1 + arch/arm/mach-keystone/include/mach/memory.h | 25

[PATCH v2 16/22] ARM: mm: cleanup checks for membank overlap with vmalloc area

2012-08-10 Thread Cyril Chemparathy
) by checking bank-start against the physical address corresponding to vmalloc_min instead. In the process, this patch also cleans up parts of the highmem sanity check code by removing what has now become a redundant check for banks that entirely overlap with the vmalloc range. Signed-off-by: Cyril

[PATCH v2 11/22] ARM: LPAE: use 64-bit accessors for TTBR registers

2012-08-10 Thread Cyril Chemparathy
-by: Cyril Chemparathy cy...@ti.com Signed-off-by: Vitaly Andrianov vita...@ti.com --- arch/arm/include/asm/proc-fns.h | 24 +++- arch/arm/mm/context.c |9 ++--- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/arch/arm/include/asm/proc-fns.h b/arch

  1   2   3   4   >