[PATCH] Revert "mm: rename _count, field of the struct page, to _refcount"

2016-06-16 Thread Vitaly Kuznetsov
_count -> _refcount rename in commit 0139aa7b7fa12 ("mm: rename _count, field of the struct page, to _refcount") broke kdump. makedumpfile(8) does stuff like READ_MEMBER_OFFSET("page._count", page._count) and fails. While it is definitely possible to fix this particular tool I'm not sure about othe

Re: [PATCH] Revert "mm: rename _count, field of the struct page, to _refcount"

2016-06-16 Thread Christoph Hellwig
On Thu, Jun 16, 2016 at 11:22:46AM +0200, Vitaly Kuznetsov wrote: > _count -> _refcount rename in commit 0139aa7b7fa12 ("mm: rename _count, > field of the struct page, to _refcount") broke kdump. makedumpfile(8) does > stuff like READ_MEMBER_OFFSET("page._count", page._count) and fails. While > it

Re: [PATCH] Revert "mm: rename _count, field of the struct page, to _refcount"

2016-06-16 Thread Vlastimil Babka
On 06/16/2016 11:22 AM, Vitaly Kuznetsov wrote: _count -> _refcount rename in commit 0139aa7b7fa12 ("mm: rename _count, field of the struct page, to _refcount") broke kdump. makedumpfile(8) does stuff like READ_MEMBER_OFFSET("page._count", page._count) and fails. While it is definitely possible t

Re: [PATCH] Revert "mm: rename _count, field of the struct page, to _refcount"

2016-06-16 Thread Vitaly Kuznetsov
Christoph Hellwig writes: > On Thu, Jun 16, 2016 at 11:22:46AM +0200, Vitaly Kuznetsov wrote: >> _count -> _refcount rename in commit 0139aa7b7fa12 ("mm: rename _count, >> field of the struct page, to _refcount") broke kdump. makedumpfile(8) does >> stuff like READ_MEMBER_OFFSET("page._count", pa

Re: [PATCH] Revert "mm: rename _count, field of the struct page, to _refcount"

2016-06-16 Thread Michal Hocko
On Thu 16-06-16 12:30:16, Vitaly Kuznetsov wrote: > Christoph Hellwig writes: > > > On Thu, Jun 16, 2016 at 11:22:46AM +0200, Vitaly Kuznetsov wrote: > >> _count -> _refcount rename in commit 0139aa7b7fa12 ("mm: rename _count, > >> field of the struct page, to _refcount") broke kdump. makedumpfil

Re: [PATCH] Revert "mm: rename _count, field of the struct page, to _refcount"

2016-06-16 Thread Vitaly Kuznetsov
Michal Hocko writes: > On Thu 16-06-16 12:30:16, Vitaly Kuznetsov wrote: >> Christoph Hellwig writes: >> >> > On Thu, Jun 16, 2016 at 11:22:46AM +0200, Vitaly Kuznetsov wrote: >> >> _count -> _refcount rename in commit 0139aa7b7fa12 ("mm: rename _count, >> >> field of the struct page, to _refco

Re: [PATCH] Revert "mm: rename _count, field of the struct page, to _refcount"

2016-06-16 Thread Michal Hocko
On Thu 16-06-16 13:22:27, Vitaly Kuznetsov wrote: > Michal Hocko writes: > > > On Thu 16-06-16 12:30:16, Vitaly Kuznetsov wrote: > >> Christoph Hellwig writes: > >> > >> > On Thu, Jun 16, 2016 at 11:22:46AM +0200, Vitaly Kuznetsov wrote: > >> >> _count -> _refcount rename in commit 0139aa7b7fa1

[PATCH] makedumpfile: support _count -> _refcount rename in struct page

2016-06-16 Thread Vitaly Kuznetsov
_count member was renamed to _refcount in linux commit commit 0139aa7b7fa12 ("mm: rename _count, field of the struct page, to _refcount") and this broke makedumpfile. The reason for making the change was to find all users accessing it directly and not through the recommended API. I tried suggesting

Re: [PATCH] makedumpfile: support _count -> _refcount rename in struct page

2016-06-16 Thread Dave Anderson
- Original Message - > _count member was renamed to _refcount in linux commit commit 0139aa7b7fa12 > ("mm: rename _count, field of the struct page, to _refcount") and this > broke makedumpfile. The reason for making the change was to find all users > accessing it directly and not through

Re: [PATCH] makedumpfile: support _count -> _refcount rename in struct page

2016-06-16 Thread Vitaly Kuznetsov
Dave Anderson writes: > - Original Message - >> _count member was renamed to _refcount in linux commit commit 0139aa7b7fa12 >> ("mm: rename _count, field of the struct page, to _refcount") and this >> broke makedumpfile. The reason for making the change was to find all users >> accessing

Re: [PATCH v2 0/9] kexec_file_load implementation for PowerPC

2016-06-16 Thread Thiago Jung Bauermann
Am Donnerstag, 16 Juni 2016, 15:48:30 schrieb Michael Ellerman: > On Tue, 2016-06-14 at 11:59 -0300, Thiago Jung Bauermann wrote: > > Hello, > > > > This patch series implements the kexec_file_load system call on PowerPC. > > Can you tell me what this syscall does and why I would want it? Sorry,

Re: [PATCH v2 2/9] kexec_file: Generalize kexec_add_buffer.

2016-06-16 Thread Thiago Jung Bauermann
Am Donnerstag, 16 Juni 2016, 09:58:53 schrieb Dave Young: > On 06/15/16 at 01:21pm, Thiago Jung Bauermann wrote: > > +/** > > + * arch_kexec_walk_mem - call func(data) on free memory regions > > + * @image_type:kimage.type > > + * @top_down: Start from the highest address? > > + * @data:

Re: [PATCH v18 03/13] arm64/kexec: Add core kexec support

2016-06-16 Thread Geoff Levand
On Wed, 2016-06-15 at 18:10 +0100, James Morse wrote: > On 09/06/16 21:08, Geoff Levand wrote: > > +++ b/arch/arm64/kernel/machine_kexec.c > > @@ -0,0 +1,185 @@ > > +/* > > + * kexec for arm64 > > + * > > + * Copyright (C) Linaro. > > + * Copyright (C) Huawei Futurewei Technologies. > > + * > > + *

Re: [PATCH v18 04/13] arm64/kexec: Add pr_debug output

2016-06-16 Thread Geoff Levand
On Wed, 2016-06-15 at 18:14 +0100, James Morse wrote: > On 09/06/16 21:08, Geoff Levand wrote: > > To aid in debugging kexec problems or when adding new functionality to > > kexec add > > a new routine kexec_image_info() and several inline pr_debug statements. > > diff --git a/arch/arm64/kernel/m

[PATCH v19 09/13] arm64: kdump: add kdump support

2016-06-16 Thread Geoff Levand
From: AKASHI Takahiro On crash dump kernel, all the information about primary kernel's system memory (core image) is available in elf core header. The primary kernel will set aside this header with reserve_elfcorehdr() at boot time and inform crash dump kernel of its location via a new device-tre

[PATCH v19 12/13] arm64: kdump: update a kernel doc

2016-06-16 Thread Geoff Levand
From: AKASHI Takahiro This patch adds arch specific descriptions about kdump usage on arm64 to kdump.txt. Signed-off-by: AKASHI Takahiro --- Documentation/kdump/kdump.txt | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Documentation/kdump/kdump.txt b/Documen

[PATCH v19 02/13] arm64: Add back cpu reset routines

2016-06-16 Thread Geoff Levand
Commit 68234df4ea79 ("arm64: kill flush_cache_all()") removed the global arm64 routines cpu_reset() and cpu_soft_restart() needed by the arm64 kexec and kdump support. Add simplified versions of those two routines back with some changes needed for kexec in the new files cpu_reset.S, and cpu_reset.

[PATCH v19 01/13] arm64: Add cpus_are_stuck_in_kernel

2016-06-16 Thread Geoff Levand
From: James Morse kernel/smp.c has a fancy counter that keeps track of the number of CPUs it marked as not-present and left in cpu_park_loop(). If there are any CPUs spinning in here, kexec will release them once the memory is re-used by the new kernel. Provide a function to expose whether this

[PATCH v19 08/13] arm64: kdump: implement machine_crash_shutdown()

2016-06-16 Thread Geoff Levand
From: AKASHI Takahiro Primary kernel calls machine_crash_shutdown() to shut down non-boot cpus and save registers' status in per-cpu ELF notes before starting crash dump kernel. See kernel_kexec(). Even if not all secondary cpus have shut down, we do kdump anyway. As we don't have to make non-bo

[PATCH v19 04/13] arm64/kexec: Enable kexec in the arm64 defconfig

2016-06-16 Thread Geoff Levand
Signed-off-by: Geoff Levand --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index fd2d74d..4ed4756 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -70,6 +70,7 @@ CONFIG

[PATCH v19 00/13] arm64 kexec kernel patches

2016-06-16 Thread Geoff Levand
This series adds the core support for kexec re-boot and kdump on ARM64. This version of the series combines Takahiro's kdump patches with my kexec patches. Please consider all patches for inclusion. Takahiro has done some extensive testing for this version with various configurations af endian, i

[PATCH v19 03/13] arm64/kexec: Add core kexec support

2016-06-16 Thread Geoff Levand
Add three new files, kexec.h, machine_kexec.c and relocate_kernel.S to the arm64 architecture that add support for the kexec re-boot mechanism (CONFIG_KEXEC) on arm64 platforms. Signed-off-by: Geoff Levand --- arch/arm64/Kconfig | 10 ++ arch/arm64/include/asm/kexec.h | 4

[PATCH v19 05/13] arm64/kexec: Add pr_debug output

2016-06-16 Thread Geoff Levand
To aid in debugging kexec problems or when adding new functionality to kexec add a new routine kexec_image_info() and several inline pr_debug statements. Signed-off-by: Geoff Levand --- arch/arm64/kernel/machine_kexec.c | 48 +++ 1 file changed, 48 insertions(

[PATCH v19 06/13] arm64: kdump: reserve memory for crash dump kernel

2016-06-16 Thread Geoff Levand
From: AKASHI Takahiro On the startup of primary kernel, the memory region used by crash dump kernel must be specified by "crashkernel=" kernel parameter. reserve_crashkernel() will allocate and reserve the region for later use. User space tools, like kexec-tools, will be able to find that region

[PATCH v19 07/13] arm64: limit memory regions based on DT property, usable-memory

2016-06-16 Thread Geoff Levand
From: AKASHI Takahiro Crash dump kernel will be run with a limited range of memory as System RAM. On arm64, we will use a device-tree property under /chosen, linux,usable-memory = in order for primary kernel either on uefi or non-uefi (device tree only) system to hand over the information ab

[PATCH v19 11/13] arm64: kdump: enable kdump in the arm64 defconfig

2016-06-16 Thread Geoff Levand
From: AKASHI Takahiro Signed-off-by: AKASHI Takahiro --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 4ed4756..aa3e1dd 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconf

[PATCH v19 13/13] Documentation: dt: usable-memory and elfcorehdr nodes for arm64 kexec

2016-06-16 Thread Geoff Levand
From: James Morse Add documentation for linux,usable-memory and linux,elfcorehdr chosen nodes used by arm64 kexec to decribe the kdump reserved area, and the elfcorehdr's location within it. Signed-off-by: James Morse --- Documentation/devicetree/bindings/chosen.txt | 28 ++

[PATCH v19 10/13] arm64: kdump: add VMCOREINFO's for user-space coredump tools

2016-06-16 Thread Geoff Levand
From: AKASHI Takahiro For the current crash utility, we need to know, at least, - kimage_voffset - PHYS_OFFSET to handle the contents of core dump file (/proc/vmcore) correctly due to the introduction of KASLR (CONFIG_RANDOMIZE_BASE) in v4.6. This patch puts them as VMCOREINFO's into the file

RE: [PATCH] makedumpfile: support _count -> _refcount rename in struct page

2016-06-16 Thread Atsushi Kumagai
Hello Vitaly, >_count member was renamed to _refcount in linux commit commit 0139aa7b7fa12 >("mm: rename _count, field of the struct page, to _refcount") and this >broke makedumpfile. The reason for making the change was to find all users >accessing it directly and not through the recommended API.