Re: [PATCHv2] ARM: ioremap: Fix static vm area boundary checking.

2014-05-16 Thread Richard Lee
On Fri, May 16, 2014 at 3:17 PM, li.xi...@freescale.com wrote: >> Subject: Re: [PATCHv2] ARM: ioremap: Fix static vm area boundary checking. >> >> On Fri, May 16, 2014 at 1:28 AM, Nicolas Pitre >> wrote: >> > On Thu, 15 May 2014, Richard Lee wrote: >>

Re: [PATCHv2] ARM: ioremap: Fix static vm area boundary checking.

2014-05-15 Thread Richard Lee
On Fri, May 16, 2014 at 1:28 AM, Nicolas Pitre wrote: > On Thu, 15 May 2014, Richard Lee wrote: > >> Static vm area boundary check: >> >> paddr1 --->| | >> | | >> |---| <-\--- svm-

[PATCHv2] ARM: ioremap: Fix static vm area boundary checking.

2014-05-15 Thread Richard Lee
ddr == paddr1, then continue; <2> If the paddr == paddr2~paddr4 and paddr_end > phys_addr_end, then continue; <3> if the paddr >= paddr5 then continue; Signed-off-by: Richard Lee --- Change in V2: - PAGE_SIZE --> PAGE_MASK - remove the 'size' page size ali

Re: [PATCH] ARM: ioremap: Fix static vm area boundary checking.

2014-05-15 Thread Richard Lee
>addr + svm->vm_size >> >> <1> If the paddr == paddr1, then continue; >> <2> If the paddr == paddr2~paddr4 and paddr_end > phys_addr_end, >> then continue; >> <3> if the paddr >= paddr5 then continue; >> >> Signed-off-by: Richard Lee

Re: [PATCHv2 1/2] mm/vmalloc: Add IO mapping space reused interface support.

2014-05-15 Thread Richard Lee
On Thu, May 15, 2014 at 6:56 AM, Andrew Morton wrote: > On Wed, 14 May 2014 16:18:51 +0800 Richard Lee > wrote: > >> For the IO mapping, the same physical address space maybe >> mapped more than one time, for example, in some SoCs: >> - 0x20001000 ~

[PATCH] ARM: ioremap: Fix static vm area boundary checking.

2014-05-14 Thread Richard Lee
ddr == paddr1, then continue; <2> If the paddr == paddr2~paddr4 and paddr_end > phys_addr_end, then continue; <3> if the paddr >= paddr5 then continue; Signed-off-by: Richard Lee --- arch/arm/mm/ioremap.c | 44 ++-- 1 file changed, 42

Re: [PATCHv2 1/2] mm/vmalloc: Add IO mapping space reused interface support.

2014-05-14 Thread Richard Lee
On Thu, May 15, 2014 at 12:06 AM, Rob Herring wrote: > Adding Nico... > > On Wed, May 14, 2014 at 3:18 AM, Richard Lee wrote: >> For the IO mapping, the same physical address space maybe >> mapped more than one time, for example, in some SoCs: >> - 0x20001000 ~

[PATCHv2 2/2] ARM: ioremap: Add IO mapping space reused support.

2014-05-14 Thread Richard Lee
tion will just return the exist vmalloc area. This patch add IO mapping space reused support. Signed-off-by: Richard Lee --- arch/arm/mm/ioremap.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c index f9c32ba..be69333 100644 --- a/arch/a

[PATCHv2 1/2] mm/vmalloc: Add IO mapping space reused interface support.

2014-05-14 Thread Richard Lee
tion will just return the exist vmalloc area. Signed-off-by: Richard Lee --- include/linux/vmalloc.h | 5 +++ mm/vmalloc.c| 82 + 2 files changed, 87 insertions(+) diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index 4b

[PATCHv2 0/2] Add IO mapping space reused support

2014-05-14 Thread Richard Lee
Changes in V2: - Uses the atomic_t instead. - Revises some comment message. Richard Lee (2): mm/vmalloc: Add IO mapping space reused interface support. ARM: ioremap: Add IO mapping space reused support. arch/arm/mm/ioremap.c | 6 include/linux/vmalloc.h | 5 +++ mm/vmalloc.c

Re: [RFC][PATCH 2/2] ARM: ioremap: Add IO mapping space reused support.

2014-05-13 Thread Richard Lee
On Tue, May 13, 2014 at 4:43 PM, Arnd Bergmann wrote: > On Tuesday 13 May 2014 09:45:08 Richard Lee wrote: >> > On Mon, May 12, 2014 at 3:51 PM, Arnd Bergmann wrote: >> > On Monday 12 May 2014 10:19:55 Richard Lee wrote: >> >> For the IO mapping, for the

Re: [RFC][PATCH 1/2] mm/vmalloc: Add IO mapping space reused interface.

2014-05-12 Thread Richard Lee
On Tue, May 13, 2014 at 11:13 AM, Rob Herring wrote: > On Sun, May 11, 2014 at 9:19 PM, Richard Lee wrote: >> For the IO mapping, for the same physical address space maybe >> mapped more than one time, for example, in some SoCs: >> 0x2000 ~ 0x20001000: are global co

Re: [RFC][PATCH 2/2] ARM: ioremap: Add IO mapping space reused support.

2014-05-12 Thread Richard Lee
> On Mon, May 12, 2014 at 3:51 PM, Arnd Bergmann wrote: > On Monday 12 May 2014 10:19:55 Richard Lee wrote: >> For the IO mapping, for the same physical address space maybe >> mapped more than one time, for example, in some SoCs: >> 0x2000 ~ 0x20001000: are global

[RFC][PATCH 2/2] ARM: ioremap: Add IO mapping space reused support.

2014-05-11 Thread Richard Lee
waste to much malloc virtual spaces. This patch add IO mapping space reused support. Signed-off-by: Richard Lee --- arch/arm/mm/ioremap.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c index f9c32ba..26a3744 100644

[RFC][PATCH 0/2] Add IO mapping space reused support

2014-05-11 Thread Richard Lee
Richard Lee (2): mm/vmalloc: Add IO mapping space reused interface. ARM: ioremap: Add IO mapping space reused support. arch/arm/mm/ioremap.c | 11 - include/linux/vmalloc.h | 5 mm/vmalloc.c| 63 + 3 files changed

[RFC][PATCH 1/2] mm/vmalloc: Add IO mapping space reused interface.

2014-05-11 Thread Richard Lee
by more than one consumer. Signed-off-by: Richard Lee --- include/linux/vmalloc.h | 5 mm/vmalloc.c| 63 + 2 files changed, 68 insertions(+) diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index 4b8a891..2b811f6