[PATCH] mn10300: Use is_vmalloc_addr

2017-09-30 Thread Min-Hua Chen
To is_vmalloc_addr() to check if an address is a vmalloc address instead of checking VMALLOC_START and VMALLOC_END manually. Signed-off-by: Min-Hua Chen <orca.c...@gmail.com> --- arch/mn10300/kernel/gdb-stub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/m

[PATCH] mn10300: Use is_vmalloc_addr

2017-09-30 Thread Min-Hua Chen
To is_vmalloc_addr() to check if an address is a vmalloc address instead of checking VMALLOC_START and VMALLOC_END manually. Signed-off-by: Min-Hua Chen --- arch/mn10300/kernel/gdb-stub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mn10300/kernel/gdb-stub.c b/arch

Re: [PATCHv3 1/2] arm: fix non-section-aligned low memory mapping

2015-06-10 Thread Min-Hua Chen
On Wed, Jun 10, 2015 at 11:40:59PM +0100, Russell King - ARM Linux wrote: > On Thu, Jun 11, 2015 at 02:59:32AM +0800, Min-Hua Chen wrote: > > In current design, the memblock.current_limit is set to > > a section-aligned value in sanity_check_meminfo(). > > > > H

[PATCHv3 0/2] creating non-section aligned lowmem mappings

2015-06-10 Thread Min-Hua Chen
because the memblock_reserve() calls in arm_memblock_init(). *** BLURB HERE *** Min-Hua Chen (2): arm: fix non-section-aligned low memory mapping arm: use max_lowmem_limit in find_limit() arch/arm/mm/init.c |2 +- arch/arm/mm/mmu.c | 48

[PATCHv3 2/2] arm: use max_lowmem_limit in find_limit()

2015-06-10 Thread Min-Hua Chen
, arm_lowmem_limit cannot be changed by a public API. Second, the high_memory is set by arm_lowmem_limit and is a natural limit of low memory area in bootmem_init(). Signed-off-by: Min-Hua Chen --- arch/arm/mm/init.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mm/init.c b

[PATCHv3 1/2] arm: fix non-section-aligned low memory mapping

2015-06-10 Thread Min-Hua Chen
memblock layout. So we can say that the first section-aligned limit is valid during map_lowmem(). Hence fix the problem described above. Signed-off-by: Min-Hua Chen --- arch/arm/mm/mmu.c | 48 ++-- 1 file changed, 14 insertions(+), 34 deletions(-) diff

[PATCHv3 0/2] creating non-section aligned lowmem mappings

2015-06-10 Thread Min-Hua Chen
because the memblock_reserve() calls in arm_memblock_init(). *** BLURB HERE *** Min-Hua Chen (2): arm: fix non-section-aligned low memory mapping arm: use max_lowmem_limit in find_limit() arch/arm/mm/init.c |2 +- arch/arm/mm/mmu.c | 48

[PATCHv3 2/2] arm: use max_lowmem_limit in find_limit()

2015-06-10 Thread Min-Hua Chen
, arm_lowmem_limit cannot be changed by a public API. Second, the high_memory is set by arm_lowmem_limit and is a natural limit of low memory area in bootmem_init(). Signed-off-by: Min-Hua Chen orca.c...@gmail.com --- arch/arm/mm/init.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCHv3 1/2] arm: fix non-section-aligned low memory mapping

2015-06-10 Thread Min-Hua Chen
memblock layout. So we can say that the first section-aligned limit is valid during map_lowmem(). Hence fix the problem described above. Signed-off-by: Min-Hua Chen orca.c...@gmail.com --- arch/arm/mm/mmu.c | 48 ++-- 1 file changed, 14 insertions(+), 34

Re: [PATCHv3 1/2] arm: fix non-section-aligned low memory mapping

2015-06-10 Thread Min-Hua Chen
On Wed, Jun 10, 2015 at 11:40:59PM +0100, Russell King - ARM Linux wrote: On Thu, Jun 11, 2015 at 02:59:32AM +0800, Min-Hua Chen wrote: In current design, the memblock.current_limit is set to a section-aligned value in sanity_check_meminfo(). However, the section-aligned memblock may

Re: [PATCH v2] arm: improve non-section-aligned low memory mapping

2015-05-07 Thread Min-Hua Chen
On Wed, May 06, 2015 at 11:32:49AM +0100, Russell King - ARM Linux wrote: > On Sun, Apr 26, 2015 at 04:47:08PM +0800, Min-Hua Chen wrote: > > @@ -1384,6 +1351,15 @@ static void __init map_lowmem(void) > >

Re: [PATCH v2] arm: improve non-section-aligned low memory mapping

2015-05-07 Thread Min-Hua Chen
On Wed, May 06, 2015 at 11:32:49AM +0100, Russell King - ARM Linux wrote: On Sun, Apr 26, 2015 at 04:47:08PM +0800, Min-Hua Chen wrote: @@ -1384,6 +1351,15 @@ static void __init map_lowmem(void) create_mapping(map

[PATCH v2] arm: improve non-section-aligned low memory mapping

2015-04-26 Thread Min-Hua Chen
by arm_lowmem_limit and is a natural limit of low memory area in bootmem_init(). thanks, Min-Hua Signed-off-by: Min-Hua Chen --- arch/arm/mm/init.c |2 +- arch/arm/mm/mmu.c | 44 ++-- 2 files changed, 11 insertions(+), 35 deletions(-) diff --git a/arch/arm/mm

[PATCH] arm: improve non-section-aligned low memory mapping

2015-04-26 Thread Min-Hua Chen
>From d8dbec3573b02afd8a23fe10f92bc0d324b0c951 Mon Sep 17 00:00:00 2001 From: Min-Hua Chen Date: Sun, 26 Apr 2015 15:07:44 +0800 Subject: [PATCH] arm: improve non-section-aligned low memory mapping In current design, the memblock.current_limit is set to a section-aligned va

[PATCH] arm: improve non-section-aligned low memory mapping

2015-04-26 Thread Min-Hua Chen
From d8dbec3573b02afd8a23fe10f92bc0d324b0c951 Mon Sep 17 00:00:00 2001 From: Min-Hua Chen orca.c...@gmail.com Date: Sun, 26 Apr 2015 15:07:44 +0800 Subject: [PATCH] arm: improve non-section-aligned low memory mapping In current design, the memblock.current_limit is set to a section-aligned value

[PATCH v2] arm: improve non-section-aligned low memory mapping

2015-04-26 Thread Min-Hua Chen
by arm_lowmem_limit and is a natural limit of low memory area in bootmem_init(). thanks, Min-Hua Signed-off-by: Min-Hua Chen orca.c...@gmail.com --- arch/arm/mm/init.c |2 +- arch/arm/mm/mmu.c | 44 ++-- 2 files changed, 11 insertions(+), 35 deletions(-) diff

Re: [PATCH] arm64: add ioremap physical address information

2015-01-06 Thread Min-Hua Chen
On Tue, Jan 6, 2015 at 10:17 PM, Will Deacon wrote: > On Fri, Dec 26, 2014 at 04:52:10PM +0000, Min-Hua Chen wrote: >> In /proc/vmallocinfo, it's good to show the physical address >> of each ioremap in vmallocinfo. Add physical address information >> in arm64 ioremap. >

Re: [PATCH] arm64: add ioremap physical address information

2015-01-06 Thread Min-Hua Chen
On Tue, Jan 6, 2015 at 10:17 PM, Will Deacon will.dea...@arm.com wrote: On Fri, Dec 26, 2014 at 04:52:10PM +, Min-Hua Chen wrote: In /proc/vmallocinfo, it's good to show the physical address of each ioremap in vmallocinfo. Add physical address information in arm64 ioremap

[PATCH] arm64: add ioremap physical address information

2014-12-26 Thread Min-Hua Chen
_nv013519rm+0x57/0xa0 [nvidia] phys=f8008000 ioremap 0xc9000480-0xc90004821000 135168 e1000_probe+0x22c/0xb95 [e1000e] phys=f430 ioremap 0xc900049c-0xc900049e1000 135168 _nv013521rm+0x4d/0xd0 [nvidia] phys=e014 ioremap Signed-off-by: Min-Hua Chen --- arch/arm64/mm

[PATCH] arm64: add ioremap physical address information

2014-12-26 Thread Min-Hua Chen
_nv013519rm+0x57/0xa0 [nvidia] phys=f8008000 ioremap 0xc9000480-0xc90004821000 135168 e1000_probe+0x22c/0xb95 [e1000e] phys=f430 ioremap 0xc900049c-0xc900049e1000 135168 _nv013521rm+0x4d/0xd0 [nvidia] phys=e014 ioremap Signed-off-by: Min-Hua Chen orca.c...@gmail.com

Re: [PATCH] arm64: setup return path for el1_undef

2014-12-23 Thread Min-Hua Chen
On Tue, Dec 23, 2014 at 11:57 PM, Catalin Marinas wrote: > On Tue, Dec 23, 2014 at 03:15:10PM +0000, Min-Hua Chen wrote: >> Setup return path for el1_undef since el1_undef may >> be handled by handlers. > > Did you find a real issue or it was just code inspection.

[PATCH] arm64: setup return path for el1_undef

2014-12-23 Thread Min-Hua Chen
*/ if (!aarch32_break_handler(regs)) return; if (call_undef_hook(regs) == 0) return; ... } Signed-off-by: Min-Hua Chen --- arch/arm64/kernel/entry.S |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S index

[PATCH] arm64: setup return path for el1_undef

2014-12-23 Thread Min-Hua Chen
*/ if (!aarch32_break_handler(regs)) return; if (call_undef_hook(regs) == 0) return; ... } Signed-off-by: Min-Hua Chen orca.c...@gmail.com --- arch/arm64/kernel/entry.S |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel

Re: [PATCH] arm64: setup return path for el1_undef

2014-12-23 Thread Min-Hua Chen
On Tue, Dec 23, 2014 at 11:57 PM, Catalin Marinas catalin.mari...@arm.com wrote: On Tue, Dec 23, 2014 at 03:15:10PM +, Min-Hua Chen wrote: Setup return path for el1_undef since el1_undef may be handled by handlers. Did you find a real issue or it was just code inspection. Thanks for your

[PATCH] slub: fix confusing error messages in check_slab

2014-11-24 Thread Min-Hua Chen
In check_slab, s->name is passed incorrectly to the error messages. It will cause confusing error messages if the object check fails. This patch fix this bug by removing s->name. Signed-off-by: Min-Hua Chen --- mm/slub.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH] slub: fix confusing error messages in check_slab

2014-11-24 Thread Min-Hua Chen
In check_slab, s-name is passed incorrectly to the error messages. It will cause confusing error messages if the object check fails. This patch fix this bug by removing s-name. Signed-off-by: Min-Hua Chen orca.c...@gmail.com --- mm/slub.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions

Does kernel assume PHYS_OFFSET must be SECTION_SIZE aligned?

2014-11-17 Thread Min-Hua Chen
Hi, I have a problem about kernel_x_start and kernel_x_end in map_lowmem. If the start address of DRAM is 0x2000 and PHYS_OFFSET is 0x2010 (1MB) and _start is 0xc0008000 and SECTION_SIZE is 0x20 (2MB). Let's say the memory between 0x2000 and 0x2010 is used by some H/W, and not

Does kernel assume PHYS_OFFSET must be SECTION_SIZE aligned?

2014-11-17 Thread Min-Hua Chen
Hi, I have a problem about kernel_x_start and kernel_x_end in map_lowmem. If the start address of DRAM is 0x2000 and PHYS_OFFSET is 0x2010 (1MB) and _start is 0xc0008000 and SECTION_SIZE is 0x20 (2MB). Let's say the memory between 0x2000 and 0x2010 is used by some H/W, and not

[PATCH] arm: use phys_addr_t to describe physical address

2014-10-30 Thread Min-Hua Chen
Hi, Use phys_addr_t to describe physical_address. When LPAE is enabled, physical address can be more than 32 bits, so we have to use phys_addr_t to handle the case. Signed-off-by: Min-Hua Chen --- arch/arm/mm/mmu.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch

[PATCH] arm: use phys_addr_t to describe physical address

2014-10-30 Thread Min-Hua Chen
Hi, Use phys_addr_t to describe physical_address. When LPAE is enabled, physical address can be more than 32 bits, so we have to use phys_addr_t to handle the case. Signed-off-by: Min-Hua Chen orca.c...@gmail.com --- arch/arm/mm/mmu.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH] arm64: Fix data type for physical address

2014-10-08 Thread Min-Hua Chen
Use phys_addr_t for physical address in alloc_init_pud. Although phys_addr_t and unsigned long are 64 bit in arm64, it is better to use phys_addr_t to describe physical addresses. Signed-off-by: Min-Hua Chen --- arch/arm64/mm/mmu.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH] arm64: Fix data type for physical address

2014-10-08 Thread Min-Hua Chen
Use phys_addr_t for physical address in alloc_init_pud. Although phys_addr_t and unsigned long are 64 bit in arm64, it is better to use phys_addr_t to describe physical addresses. Signed-off-by: Min-Hua Chen orca.c...@gmail.com --- arch/arm64/mm/mmu.c |2 +- 1 file changed, 1 insertion(+), 1

[PATCH] slub: fix coding style problems

2014-10-02 Thread Min-Hua Chen
fix most obvious coding style problems reported by checkpatch.pl -f mm/slub.c Signed-off-by: Min-Hua Chen --- mm/slub.c | 121 - 1 file changed, 63 insertions(+), 58 deletions(-) diff --git a/mm/slub.c b/mm/slub.c index 3e8afcc

[PATCH] [RESEND]arm64: Use phys_addr_t type for physical address

2014-10-02 Thread Min-Hua Chen
Change the type of physical address from unsigned long to phys_addr_t, make valid_phys_addr_range more readable. Signed-off-by: Min-Hua Chen --- arch/arm64/include/asm/io.h |2 +- arch/arm64/mm/mmap.c|2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch

Re: [PATCH] Use phys_addr_t type for physical address (arm64)

2014-10-02 Thread Min-Hua Chen
Change the type of physical address from unsigned long to phys_addr_t, make valid_phys_addr_range more readable. Signed-off-by: Min-Hua Chen --- arch/arm64/include/asm/io.h |2 +- arch/arm64/mm/mmap.c|2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch

Re: [PATCH] Use phys_addr_t type for physical address (arm64)

2014-10-02 Thread Min-Hua Chen
Change the type of physical address from unsigned long to phys_addr_t, make valid_phys_addr_range more readable. Signed-off-by: Min-Hua Chen orca.c...@gmail.com --- arch/arm64/include/asm/io.h |2 +- arch/arm64/mm/mmap.c|2 +- 2 files changed, 2 insertions(+), 2 deletions

[PATCH] [RESEND]arm64: Use phys_addr_t type for physical address

2014-10-02 Thread Min-Hua Chen
Change the type of physical address from unsigned long to phys_addr_t, make valid_phys_addr_range more readable. Signed-off-by: Min-Hua Chen orca.c...@gmail.com --- arch/arm64/include/asm/io.h |2 +- arch/arm64/mm/mmap.c|2 +- 2 files changed, 2 insertions(+), 2 deletions

[PATCH] slub: fix coding style problems

2014-10-02 Thread Min-Hua Chen
fix most obvious coding style problems reported by checkpatch.pl -f mm/slub.c Signed-off-by: Min-Hua Chen orca.c...@gmail.com --- mm/slub.c | 121 - 1 file changed, 63 insertions(+), 58 deletions(-) diff --git a/mm/slub.c b/mm/slub.c

[PATCH] Use phys_addr_t type for physical address (arm64)

2014-10-01 Thread Min-Hua Chen
Hi, I found that valid_phys_addr_range does not use phys_addr_t to describe physical address. Is it better to change the type from unsigned long to phys_addr_t? Thanks, Min-Hua Signed-off-by: Min-Hua Chen diff --git a/arch/arm64/include/asm/io.h b/arch/arm64/include/asm/io.h index e0ecdcf

[PATCH] Use phys_addr_t type for physical address (arm64)

2014-10-01 Thread Min-Hua Chen
Hi, I found that valid_phys_addr_range does not use phys_addr_t to describe physical address. Is it better to change the type from unsigned long to phys_addr_t? Thanks, Min-Hua Signed-off-by: Min-Hua Chenorca.c...@gmail.com diff --git a/arch/arm64/include/asm/io.h b/arch/arm64/include/asm/io.h