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 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 the traffic. The whole purpose of N

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 ce

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 e

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 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 for the network

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 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 wrote: Based on our experience with fitting multiple subsystems on top of this

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 s

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 This patch fixes the alloc_init_pud() function to use phys_addr_t instead of unsigned long

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 signif

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

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

2013-01-31 Thread Cyril Chemparathy
NG_MAX) 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-

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

2013-01-31 Thread Cyril Chemparathy
: Cyril Chemparathy Signed-off-by: Vitaly Andrianov Acked-by: Nicolas Pitre Reviewed-by: Catalin Marinas --- arch/arm/include/asm/proc-fns.h | 22 +- arch/arm/mm/context.c |9 ++--- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/arch/arm

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

2013-01-31 Thread Cyril Chemparathy
From: Vitaly Andrianov 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 where initrd is located above the 4G physical address limit. Signed-off-by: Vitaly Andrianov Signed-off-by: Cyril Chemparathy Acked

[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 Signed-off-by: Vitaly Andrianov Acked-by: Nicolas Pitre --- 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 85ed732..2a02ff0 100644

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

2013-01-31 Thread Cyril Chemparathy
similar changes elsewhere in the ARM memory management code. Signed-off-by: Vitaly Andrianov Signed-off-by: Cyril Chemparathy Acked-by: Nicolas Pitre Acked-by: Catalin Marinas --- arch/arm/mm/mmu.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mm/mmu.c b/arch

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

2013-01-31 Thread Cyril Chemparathy
cts argument of type '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 --- arch/arm/include/asm/memory.h |2 +- 1 file changed, 1 insertion(

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

2013-01-31 Thread Cyril Chemparathy
: Vitaly Andrianov Signed-off-by: Cyril Chemparathy Acked-by: Nicolas Pitre --- 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 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c

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

2013-01-31 Thread Cyril Chemparathy
thing. Signed-off-by: Cyril Chemparathy Signed-off-by: Vitaly Andrianov Reviewed-by: Nicolas Pitre Reviewed-by: Catalin Marinas --- arch/arm/include/asm/page.h |2 +- arch/arm/include/asm/pgtable-3level.h |6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git

[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 Signed-off-by: Vitaly Andrianov Acked-by: Nicolas Pitre --- arch/arm/mm/mmu.c | 22 ++ 1 file changed, 10 i

[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 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 Signed-off-by

[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 Signed-off-by: Vitaly Andrianov Reviewed-by

[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 Signed-off-by: Vitaly Andrianov --- arch/arm/include/asm

[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 Signed-off-by: Vitaly Andrianov --- arch/arm/include/asm/memory.h | 16

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 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 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 where initrd is

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 additio

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

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 additio

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

[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 Signed-off-by: Vitaly Andrianov Acked-by: Nicolas Pitre --- arch/arm/mm/mmu.c | 22 ++ 1 file changed, 10 i

[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 --- arch/arm/Kconfig

[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 Signed-off-by

[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 --- arch/arm/Kconfig |1 + arch/arm/include/asm/memory.h | 26 +++ arch/arm/kernel/armksyms.c|4

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

2012-09-21 Thread Cyril Chemparathy
long %c0). However, the 'c' modifier has been found to ICE certain versions of GCC, and therefore we resort to stringified symbols here. Signed-off-by: Cyril Chemparathy Reviewed-by: Nicolas Pitre --- arch/arm/Kconfig |3 + arch/arm/include/asm/module.h

[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 Signed-off-by: Vitaly Andrianov --- arch/arm

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

2012-09-21 Thread Cyril Chemparathy
From: Vitaly Andrianov 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 where initrd is located above the 4G physical address limit. Signed-off-by: Vitaly Andrianov Signed-off-by: Cyril Chemparathy Acked

[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 Signed-off-by: Vitaly Andrianov --- 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 --- a/arch/arm/mm/mmu.c

[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 Signed-off-by: Cyril Chemparathy Reviewed-by: Nicolas Pitre --- arch/arm/include/asm/memory.h | 26 ++ 1 file changed, 18

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

2012-09-21 Thread Cyril Chemparathy
similar changes elsewhere in the ARM memory management code. Signed-off-by: Vitaly Andrianov Signed-off-by: Cyril Chemparathy Acked-by: Nicolas Pitre --- arch/arm/mm/mmu.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index c2fa21d

[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 --- arch/arm/include/asm/memory.h | 38 -- arch/arm/kernel/head.S|4 arch/arm/kernel/setup.c |2 +- 3 files changed, 41 insertions(+), 3

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

2012-09-21 Thread Cyril Chemparathy
: Cyril Chemparathy Signed-off-by: Vitaly Andrianov Acked-by: Nicolas Pitre --- 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

[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 Signed-off-by: Vitaly Andrianov --- arch/arm/include/asm

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

2012-09-21 Thread Cyril Chemparathy
verlap 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 ARM: use late patch framework for phys-virt patchi

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

2012-09-21 Thread Cyril Chemparathy
NG_MAX) 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-

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

2012-09-21 Thread Cyril Chemparathy
: Vitaly Andrianov Signed-off-by: Cyril Chemparathy Acked-by: Nicolas Pitre --- 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 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c

[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 Signed-off-by: Vitaly Andrianov --- arch/arm/include/asm/memory.h | 15

[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 Signed-off-by: Vitaly Andrianov Reviewed-by: Nicolas Pitre --- arch/arm/include/asm/page.h |2 +- arch/arm/include/asm/pgtable-3level.h |6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/include/asm/page.h

[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: [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 some

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] 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 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 sp

[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 --- arch/arm/mach-davinci/dma.c |3 +++ 1 file

[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 --- arch/arm/include/asm/io.h |2 +- arch/arm/mm/mmap.c |

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 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

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

2012-09-12 Thread Cyril Chemparathy
a better solution to this problem. Signed-off-by: Vitaly Andrianov Signed-off-by: Cyril Chemparathy --- include/linux/bootmem.h | 30 mm/bootmem.c| 59 --- 2 files changed, 45 insertions(+), 44 deletions

[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 th

[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] ARM: fix warning on uninitialized offset.un

2012-09-12 Thread Cyril Chemparathy
s declared here The fix is to promote the initialization of offset into do_alignment(). Signed-off-by: Cyril Chemparathy --- 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..d1

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

2012-09-12 Thread Cyril Chemparathy
cts argument of type '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 --- arch/arm/include/asm/memory.h |2 +- 1 file changed, 1 insertion(

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

2012-09-11 Thread Cyril Chemparathy
thing. Signed-off-by: Cyril Chemparathy Signed-off-by: Vitaly Andrianov Reviewed-by: Nicolas Pitre --- arch/arm/include/asm/page.h |2 +- arch/arm/include/asm/pgtable-3level.h |6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/include/asm/page.h

[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 Signed-off-by: Vitaly Andrianov --- 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 --- a/arch/arm/mm/mmu.c

[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 Signed-off-by: Vitaly Andrianov --- arch/arm/include/asm

[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 Signed-off-by

[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 Signed-off-by: Vitaly Andrianov --- arch/arm

[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 --- arch/arm/include/asm/memory.h | 38 -- arch/arm/kernel/head.S|4 arch/arm/kernel/setup.c |2 +- 3 files changed, 41 insertions(+), 3

[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 Signed-off-by: Vitaly Andrianov --- arch/arm/include/asm/memory.h | 15

[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 Signed-off-by: Vitaly Andrianov Acked-by: Nicolas Pitre --- arch/arm/mm/mmu.c | 22 ++ 1 file changed, 10 i

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

2012-09-11 Thread Cyril Chemparathy
NG_MAX) 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-

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

2012-09-11 Thread Cyril Chemparathy
: Cyril Chemparathy Signed-off-by: Vitaly Andrianov Acked-by: Nicolas Pitre --- 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

[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 --- arch/arm/Kconfig |1 + arch/arm/include/asm/memory.h | 26 +++ arch/arm/kernel/armksyms.c|4

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

2012-09-11 Thread Cyril Chemparathy
long %c0). However, the 'c' modifier has been found to ICE certain versions of GCC, and therefore we resort to stringified symbols here. Signed-off-by: Cyril Chemparathy Reviewed-by: Nicolas Pitre --- arch/arm/Kconfig |3 + arch/arm/include/asm/module.h

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

2012-09-11 Thread Cyril Chemparathy
resses in highmem sanity 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

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

2012-09-11 Thread Cyril Chemparathy
similar changes elsewhere in the ARM memory management code. Signed-off-by: Vitaly Andrianov Signed-off-by: Cyril Chemparathy Acked-by: Nicolas Pitre --- arch/arm/mm/mmu.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 941dfb9

[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 --- arch/arm/Kconfig

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

2012-09-11 Thread Cyril Chemparathy
From: Vitaly Andrianov 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 where initrd is located above the 4G physical address limit. Signed-off-by: Vitaly Andrianov Signed-off-by: Cyril Chemparathy Acked

[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 Signed-off-by: Cyril Chemparathy Reviewed-by: Nicolas Pitre --- arch/arm/include/asm/memory.h | 26 ++ 1 file changed, 18

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

2012-09-11 Thread Cyril Chemparathy
: Vitaly Andrianov Signed-off-by: Cyril Chemparathy Acked-by: Nicolas Pitre --- 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 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c

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

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

2012-08-12 Thread Cyril Chemparathy
On 08/11/12 23:39, Nicolas Pitre wrote: On Fri, 10 Aug 2012, Cyril Chemparathy wrote: This patch adds support for 64-bit physical addresses in virt_to_phys() patching. This does not do real 64-bit add/sub, but instead patches in the upper 32-bits of the phys_offset directly into the output of

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

2012-08-12 Thread Cyril Chemparathy
On 08/11/12 22:22, Nicolas Pitre wrote: On Fri, 10 Aug 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 additio

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

2012-08-12 Thread Cyril Chemparathy
On 08/11/12 23:03, Nicolas Pitre wrote: On Fri, 10 Aug 2012, Cyril Chemparathy wrote: 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

Re: [PATCH v2 02/22] ARM: add self test for runtime patch mechanism

2012-08-12 Thread Cyril Chemparathy
On 08/11/12 22:35, Nicolas Pitre wrote: On Fri, 10 Aug 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 2/2] ARM: local timers: add timer support using IO mapped register

2012-08-10 Thread Cyril Chemparathy
On 8/10/2012 5:58 PM, Rohit Vaswani wrote: The current arch_timer only support accessing through CP15 interface. Add support for ARM processors that only support IO mapped register interface It looks like this patch attempts to address both (a) non-percpu arch timers, and (b) memory mapped ar

[PATCH v2 09/22] ARM: LPAE: use phys_addr_t for initrd location and size

2012-08-10 Thread Cyril Chemparathy
From: Vitaly Andrianov 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 where initrd is located above the 4G physical address limit. Signed-off-by: Vitaly Andrianov Signed-off-by: Cyril Chemparathy

[RFC v2 21/22] ARM: keystone: enable SMP on Keystone machines

2012-08-10 Thread Cyril Chemparathy
This patch adds basic SMP support for Keystone machines. Nothing very fancy here, just enough to get 4 CPUs booted up. This does not include support for hotplug, etc. Signed-off-by: Vitaly Andrianov Signed-off-by: Cyril Chemparathy --- arch/arm/Kconfig|1 + arch/arm

[PATCH v2 06/22] ARM: LPAE: use signed arithmetic for mask definitions

2012-08-10 Thread Cyril Chemparathy
thing. Signed-off-by: Cyril Chemparathy Signed-off-by: Vitaly Andrianov --- arch/arm/include/asm/page.h |2 +- arch/arm/include/asm/pgtable-3level.h |6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/include/asm/page.h b/arch/arm/include/asm

[PATCH v2 18/22] ARM: add virt_to_idmap for interconnect aliasing

2012-08-10 Thread Cyril Chemparathy
macro untouched, i.e., do a simply virt_to_phys() and nothing more. Signed-off-by: Vitaly Andrianov Signed-off-by: Cyril Chemparathy --- arch/arm/include/asm/memory.h |9 + arch/arm/kernel/smp.c |2 +- arch/arm/mm/idmap.c |4 ++-- 3 files changed, 12

[PATCH v2 08/22] ARM: LPAE: use phys_addr_t in free_memmap()

2012-08-10 Thread Cyril Chemparathy
: Vitaly Andrianov Signed-off-by: Cyril Chemparathy Acked-by: Nicolas Pitre --- 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 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c

[PATCH v2 02/22] ARM: add self test for runtime patch mechanism

2012-08-10 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 --- arch/arm/Kconfig

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

2012-08-10 Thread Cyril Chemparathy
NG_MAX) 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-

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

2012-08-10 Thread Cyril Chemparathy
: Cyril Chemparathy Signed-off-by: Vitaly Andrianov --- 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/arm/include/asm/proc

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

2012-08-10 Thread Cyril Chemparathy
ov Signed-off-by: Cyril Chemparathy --- 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 + arch/arm/mac

[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 b

[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 --- arch/arm

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

2012-08-10 Thread Cyril Chemparathy
similar changes elsewhere in the ARM memory management code. Signed-off-by: Vitaly Andrianov Signed-off-by: Cyril Chemparathy Acked-by: Nicolas Pitre --- arch/arm/mm/mmu.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 4c2d045

[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 Signed-off-by

[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 Signed-off-by: Cyril Chemparathy --- arch/arm/include/asm/memory.h | 26 ++ 1 file changed, 18 insertions(+), 8 deletions(-) diff

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

2012-08-10 Thread Cyril Chemparathy
long %c0). However, the 'c' modifier has been found to ICE certain versions of GCC, and therefore we resort to stringified symbols here. Signed-off-by: Cyril Chemparathy --- arch/arm/Kconfig |3 + arch/arm/include/asm/module.h|7 ++ arch/arm/i

[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 Signed-off-by: Vitaly Andrianov --- arch/arm/mm/mmu.c | 22 ++ 1 file changed, 10 insertions(+), 12 deletions

  1   2   >