[PATCH v2, part1 15/29] mm/mn10300: use common help functions to free reserved pages

2013-03-09 Thread Jiang Liu
Use common help functions to free reserved pages. Signed-off-by: Jiang Liu jiang@huawei.com Cc: Koichi Yasutake yasutake.koi...@jp.panasonic.com --- arch/mn10300/mm/init.c | 23 ++- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/arch/mn10300/mm/init.c

[PATCH v2, part1 16/29] mm/openrisc: use common help functions to free reserved pages

2013-03-09 Thread Jiang Liu
Use common help functions to free reserved pages. Also include asm/sections.h to avoid local declarations. Signed-off-by: Jiang Liu jiang@huawei.com Cc: Jonas Bonn jo...@southpole.se --- arch/openrisc/mm/init.c | 27 +++ 1 file changed, 3 insertions(+), 24

[PATCH v2, part1 17/29] mm/parisc: use common help functions to free reserved pages

2013-03-09 Thread Jiang Liu
Use common help functions to free reserved pages. Signed-off-by: Jiang Liu jiang@huawei.com Cc: James E.J. Bottomley j...@parisc-linux.org Cc: Helge Deller del...@gmx.de --- arch/parisc/mm/init.c | 23 ++- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git

[PATCH v2, part1 18/29] mm/ppc: use common help functions to free reserved pages

2013-03-09 Thread Jiang Liu
Use common help functions to free reserved pages. Signed-off-by: Jiang Liu jiang@huawei.com Cc: Benjamin Herrenschmidt b...@kernel.crashing.org Cc: Paul Mackerras pau...@samba.org Cc: Anatolij Gustschin ag...@denx.de --- arch/powerpc/kernel/crash_dump.c |5 +

[PATCH v2, part1 19/29] mm/s390: use common help functions to free reserved pages

2013-03-09 Thread Jiang Liu
Use common help functions to free reserved pages. Signed-off-by: Jiang Liu jiang@huawei.com Cc: Martin Schwidefsky schwidef...@de.ibm.com Cc: Heiko Carstens heiko.carst...@de.ibm.com --- arch/s390/mm/init.c | 35 ++- 1 file changed, 6 insertions(+), 29

[PATCH v2, part1 20/29] mm/score: use common help functions to free reserved pages

2013-03-09 Thread Jiang Liu
Use common help functions to free reserved pages. Signed-off-by: Jiang Liu jiang@huawei.com Cc: Chen Liqin liqin.c...@sunplusct.com Cc: Lennox Wu lennox...@gmail.com --- arch/score/mm/init.c | 33 + 1 file changed, 5 insertions(+), 28 deletions(-) diff

[PATCH v2, part1 21/29] mm/SH: use common help functions to free reserved pages

2013-03-09 Thread Jiang Liu
Use common help functions to free reserved pages. Signed-off-by: Jiang Liu jiang@huawei.com Acked-by: Paul Mundt let...@linux-sh.org --- arch/sh/mm/init.c | 26 +++--- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c

[PATCH v2, part1 22/29] mm/SPARC: use common help functions to free reserved pages

2013-03-09 Thread Jiang Liu
Use common help functions to free reserved pages. Signed-off-by: Jiang Liu jiang@huawei.com Acked-by: David S. Miller da...@davemloft.net Cc: Sam Ravnborg s...@ravnborg.org --- arch/sparc/kernel/leon_smp.c | 15 +++ arch/sparc/mm/init_32.c | 37

[PATCH v2, part1 23/29] mm/um: use common help functions to free reserved pages

2013-03-09 Thread Jiang Liu
Use common help functions to free reserved pages. Signed-off-by: Jiang Liu jiang@huawei.com Cc: Jeff Dike jd...@addtoit.com --- arch/um/kernel/mem.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c index

[PATCH v2, part1 25/29] mm/x86: use common help functions to free reserved pages

2013-03-09 Thread Jiang Liu
Use common help functions to free reserved pages. Signed-off-by: Jiang Liu jiang@huawei.com Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar mi...@redhat.com Cc: H. Peter Anvin h...@zytor.com --- arch/x86/mm/init.c|5 + arch/x86/mm/init_64.c |5 ++--- 2 files changed, 3

[PATCH v2, part1 26/29] mm/xtensa: use common help functions to free reserved pages

2013-03-09 Thread Jiang Liu
Use common help functions to free reserved pages. Signed-off-by: Jiang Liu jiang@huawei.com Cc: Chris Zankel ch...@zankel.net Cc: Max Filippov jcmvb...@gmail.com --- arch/xtensa/mm/init.c | 21 +++-- 1 file changed, 3 insertions(+), 18 deletions(-) diff --git

[PATCH v2, part1 27/29] mm/arc: use common help functions to free reserved pages

2013-03-09 Thread Jiang Liu
Use common help functions to free reserved pages. Signed-off-by: Jiang Liu jiang@huawei.com Acked-by: Vineet Gupta vgu...@synopsys.com Cc: linux-snps-...@vger.kernel.org Cc: linux-kernel@vger.kernel.org (open list) --- arch/arc/mm/init.c | 23 ++- 1 file changed, 2

[PATCH v2, part1 28/29] mm/metag: use common help functions to free reserved pages

2013-03-09 Thread Jiang Liu
Use common help functions to free reserved pages. Signed-off-by: Jiang Liu jiang@huawei.com Cc: James Hogan james.ho...@imgtec.com Cc: linux-kernel@vger.kernel.org --- arch/metag/mm/init.c | 21 ++--- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git

[PATCH v2, part1 29/29] mm,kexec: use common help functions to free reserved pages

2013-03-09 Thread Jiang Liu
Use common help functions to free reserved pages. Signed-off-by: Jiang Liu jiang@huawei.com Cc: Eric Biederman ebied...@xmission.com --- kernel/kexec.c |8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/kernel/kexec.c b/kernel/kexec.c index bddd3d7..be95397 100644

[PATCH v2, part1 24/29] mm/unicore32: use common help functions to free reserved pages

2013-03-09 Thread Jiang Liu
Use common help functions to free reserved pages. Signed-off-by: Jiang Liu jiang@huawei.com Cc: Guan Xuetao g...@mprc.pku.edu.cn --- arch/unicore32/mm/init.c | 28 +++- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/arch/unicore32/mm/init.c

[PATCH v2, part1 04/29] mm/avr32: use common help functions to free reserved pages

2013-03-09 Thread Jiang Liu
Use common help functions to free reserved pages. Signed-off-by: Jiang Liu jiang@huawei.com Acked-by: Hans-Christian Egtvedt egtv...@samfundet.no Cc: Haavard Skinnemoen hskinnem...@gmail.com --- arch/avr32/mm/init.c | 24 ++-- 1 file changed, 2 insertions(+), 22

[PATCH v2, part1 06/29] mm/c6x: use common help functions to free reserved pages

2013-03-09 Thread Jiang Liu
Use common help functions to free reserved pages. Signed-off-by: Jiang Liu jiang@huawei.com Cc: Mark Salter msal...@redhat.com Cc: Aurelien Jacquiot a-jacqu...@ti.com --- arch/c6x/mm/init.c | 30 ++ 1 file changed, 2 insertions(+), 28 deletions(-) diff --git

[PATCH v2, part1 03/29] mm/ARM: use common help functions to free reserved pages

2013-03-09 Thread Jiang Liu
Use common help functions to free reserved pages. Signed-off-by: Jiang Liu jiang@huawei.com Cc: Russell King li...@arm.linux.org.uk Cc: Catalin Marinas catalin.mari...@arm.com Cc: Will Deacon will.dea...@arm.com Cc: linux-arm-ker...@lists.infradead.org Cc: linux-kernel@vger.kernel.org ---

[PATCH v2 01/20] x86: Change get_ramdisk_image() to global

2013-03-09 Thread Yinghai Lu
Need to use get_ramdisk_image() with early microcode_updating in other file. Change it to global. Also make it to take boot_params pointer, as head_32.S need to access it via phys address during 32bit flat mode. Signed-off-by: Yinghai Lu ying...@kernel.org --- arch/x86/include/asm/setup.h |

[PATCH v2 02/20] x86, microcode: Use common get_ramdisk_image()

2013-03-09 Thread Yinghai Lu
Use common get_ramdisk_image() to get ramdisk start phys address. We need this to get correct ramdisk adress for 64bit bzImage that initrd can be loaded above 4G by kexec-tools. Signed-off-by: Yinghai Lu ying...@kernel.org Cc: Fenghua Yu fenghua...@intel.com ---

[PATCH v2 05/20] x86, ACPI: Split acpi_initrd_override to find/copy two functions

2013-03-09 Thread Yinghai Lu
To parse srat early, we need to move acpi table probing early. acpi_initrd_table_override is before acpi table probing. So we need to move it early too. Current code acpi_initrd_table_override is after init_mem_mapping and relocate_initrd(), so it can scan initrd and copy acpi tables with kernel

[PATCH v2 06/20] x86, ACPI: Store override acpi tables phys addr in cpio files info array

2013-03-09 Thread Yinghai Lu
In 32bit we will find table with phys address during 32bit flat mode in head_32.S, because at that time we don't need set page table to access initrd. For copying we could use early_ioremap() with phys directly before mem mapping is set. To keep 32bit and 64bit consistent, use phys_addr for all.

[PATCH v2 07/20] x86, ACPI: Make acpi_initrd_override_find work with 32bit flat mode

2013-03-09 Thread Yinghai Lu
For finding with 32bit, it would be easy to access initrd in 32bit flat mode, as we don't need to set page table. That is from head_32.S, and microcode updating already use this trick. Need to change acpi_initrd_override_find to use phys to access global variables. Pass is_phys in the function,

[PATCH v2 09/20] x86, mm, numa: Move two functions calling on successful path later

2013-03-09 Thread Yinghai Lu
We need to have numa info ready before init_mem_mapping, so we can call init_mem_mapping per nodes also can trim node mem range to big alignment. Current numa parsing need to allocate some buffer and need to be called after init_mem_mapping. So try to split parsing numa info to two stages, and

[PATCH v2 10/20] x86, mm, numa: Call numa_meminfo_cover_memory() checking early

2013-03-09 Thread Yinghai Lu
For the separation, we need to set memblock nid later, as it could change memblock array, and possible doube memblock.memory array that will need to allocate buffer. We do not need to use nid in memblock to find out absent pages. So we can move that numa_meminfo_cover_memory() early. Also could

[PATCH v2 12/20] x86, mm, numa: Use numa_meminfo to check node_map_pfn alignment

2013-03-09 Thread Yinghai Lu
We could use numa_meminfo directly instead of memblock nid. So we could move down set memblock nid and only do it one time for successful path. -v2: according to tj, separate moving to another patch. Signed-off-by: Yinghai Lu ying...@kernel.org --- arch/x86/mm/numa.c | 30

[PATCH v2 13/20] x86, mm, numa: Set memblock nid later

2013-03-09 Thread Yinghai Lu
For the separation, we need to set memblock nid later, as it could change memblock array, and possible doube memblock.memory array that will need to allocate buffer. Only set memblock nid one time for successful path. Also rename numa_register_memblks to numa_check_memblks() after move out code

[PATCH v2 14/20] x86, mm, numa: Move node_possible_map setting later

2013-03-09 Thread Yinghai Lu
Move node_possible_map handling out of numa_check_memblks to avoid side changing in numa_check_memblks(). Only set once for successful path instead of resetting in numa_init() every time. Suggested-by: Tejun Heo t...@kernel.org Signed-off-by: Yinghai Lu ying...@kernel.org --- arch/x86/mm/numa.c

[PATCH v2 15/20] x86, mm, numa: Move emulation handling down.

2013-03-09 Thread Yinghai Lu
It needs to allocate buffer for new numa_meminfo and distance matrix, so move it down. Also we change the behavoir: before this patch, if user input wrong data in command line, it will fall back to next numa probing or disabling numa. after this patch, if user input wrong data in command line, it

[PATCH v2 16/20] x86, ACPI, numa, ia64: split SLIT handling out

2013-03-09 Thread Yinghai Lu
We need to handle slit later, as it need to allocate buffer for distance matrix. Also we do not need SLIT info before init_mem_mapping. So move SLIT parsing later. x86_acpi_numa_init become x86_acpi_numa_init_srat/x86_acpi_numa_init_slit. It should not break ia64 by replacing acpi_numa_init

[PATCH v2 17/20] x86, mm, numa: Add early_initmem_init() stub

2013-03-09 Thread Yinghai Lu
early_initmem_init() call early_x86_numa_init() to parse numa info early. Later will call init_mem_mapping for nodes in it. Signed-off-by: Yinghai Lu ying...@kernel.org Cc: Pekka Enberg penb...@kernel.org Cc: Jacob Shin jacob.s...@amd.com --- arch/x86/include/asm/page_types.h |1 +

[PATCH v2 18/20] x86, mm: Parse numa info early

2013-03-09 Thread Yinghai Lu
Parsing numa info has been separated to two functions now. early_initmem_info() only parse info in numa_meminfo and nodes_parsed. still keep numaq, acpi_numa, amd_numa, dummy fall back sequence working. SLIT and numa emulation handling are still left in initmem_init(). Call early_initmem_init

[PATCH v2 19/20] x86, mm: Make init_mem_mapping be able to be called several times

2013-03-09 Thread Yinghai Lu
Prepare to put page table on local nodes. Move calling of init_mem_mapping to early_initmem_init. Rework alloc_low_pages to alloc page table in following order: BRK, local node, low range Still only load_cr3 one time, otherwise we would break xen 64bit again. Signed-off-by: Yinghai Lu

[PATCH v2 20/20] x86, mm, numa: Put pagetable on local node ram for 64bit

2013-03-09 Thread Yinghai Lu
If node with ram is hotplugable, local node mem for page table and vmemmap should be on that node ram. This patch is some kind of refreshment of | commit 1411e0ec3123ae4c4ead6bfc9fe3ee5a3ae5c327 | Date: Mon Dec 27 16:48:17 2010 -0800 | |x86-64, numa: Put pgtable to local node memory That

[PATCH v2 11/20] x86, mm, numa: Move node_map_pfn alignment() to x86

2013-03-09 Thread Yinghai Lu
Move node_map_pfn_alignment() to arch/x86/mm as no other user for it. Will update it to use numa_meminfo instead of memblock. Signed-off-by: Yinghai Lu ying...@kernel.org --- arch/x86/mm/numa.c | 50 ++ include/linux/mm.h |1 -

Re: [PATCH v2 01/20] vmcore: refer to e_phoff member explicitly

2013-03-09 Thread Zhang Yanfei
于 2013年03月05日 15:35, Zhang Yanfei 写道: 于 2013年03月02日 16:35, HATAYAMA Daisuke 写道: Code around /proc/vmcore currently assumes program header table is next to ELF header. But future change can break the assumption on kexec-tools and the 1st kernel. To avoid worst case, now refer to e_phoff member

[PATCH v2 08/20] x86, ACPI: Find acpi tables in initrd early from head_32.S/head64.c

2013-03-09 Thread Yinghai Lu
head64.c could use #PF handler set page table to access initrd before init mem mapping and initrd relocating. head_32.S could use 32bit flat mode to access initrd before init mem mapping initrd relocating. That make 32bit and 64 bit more consistent. -v2: use inline function in header file

[PATCH v2 04/20] x86, ACPI: Increase override tables number limit

2013-03-09 Thread Yinghai Lu
Current acpi tables in initrd is limited to 10, that is too small. 64 should be good enough as we have 35 sigs and could have several SSDT. Two problems in current code prevent us from increasing limit: 1. that cpio file info array is put in stack, as every element is 32 bytes, could run out

[PATCH v2 03/20] x86, ACPI, mm: Kill max_low_pfn_mapped

2013-03-09 Thread Yinghai Lu
Now we have arch_pfn_mapped array, and max_low_pfn_mapped should not be used anymore. User should use arch_pfn_mapped or just 1UL(32-PAGE_SHIFT) instead. Only user is ACPI_INITRD_TABLE_OVERRIDE, and it should not use that, as later accessing is using early_ioremap(). Change to try to 4G below

[PATCH v2 00/20] x86, ACPI, numa: Parse numa info early

2013-03-09 Thread Yinghai Lu
One commit that tried to parse SRAT early get reverted before v3.9-rc1. | commit e8d1955258091e4c92d5a975ebd7fd8a98f5d30f | Author: Tang Chen tangc...@cn.fujitsu.com | Date: Fri Feb 22 16:33:44 2013 -0800 | |acpi, memory-hotplug: parse SRAT before memblock is ready It broke several things,

Re: [PATCH v2 07/20] vmcore: copy non page-size aligned head and tail pages in 2nd kernel

2013-03-09 Thread Zhang Yanfei
于 2013年03月02日 16:36, HATAYAMA Daisuke 写道: Due to mmap() requirement, we need to copy pages not starting or ending with page-size aligned address in 2nd kernel and to map them to user-space. For example, see the map below: -0001 : reserved 0001-0009f7ff : System

Re: [PATCH v2, part1 22/29] mm/SPARC: use common help functions to free reserved pages

2013-03-09 Thread Sam Ravnborg
On Sun, Mar 10, 2013 at 02:27:05PM +0800, Jiang Liu wrote: Use common help functions to free reserved pages. Signed-off-by: Jiang Liu jiang@huawei.com Acked-by: David S. Miller da...@davemloft.net Cc: Sam Ravnborg s...@ravnborg.org Acked-by: Sam Ravnborg s...@ravnborg.org -- To

<    1   2   3   4