<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/arm64/kernel/machine_kexec.c, branch linux-4.14.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.14.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.14.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-05-27T14:43:06Z</updated>
<entry>
<title>arm64: fix the flush_icache_range arguments in machine_kexec</title>
<updated>2020-05-27T14:43:06Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2020-05-21T14:41:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=524550a72cb801ba6f3391dc83eb4e9046947d8d'/>
<id>urn:sha1:524550a72cb801ba6f3391dc83eb4e9046947d8d</id>
<content type='text'>
Commit d51c214541c5154dda3037289ee895ea3ded5ebd upstream.

The second argument is the end "pointer", not the length.

Fixes: d28f6df1305a ("arm64/kexec: Add core kexec support")
Cc: &lt;stable@vger.kernel.org&gt; # 4.8.x-
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>arm64: kexec: have own crash_smp_send_stop() for crash dump for nonpanic cores</title>
<updated>2017-08-21T17:01:04Z</updated>
<author>
<name>Hoeun Ryu</name>
</author>
<published>2017-08-17T02:24:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a88ce63b642cf8cd82cbc278429ccd9de4455a07'/>
<id>urn:sha1:a88ce63b642cf8cd82cbc278429ccd9de4455a07</id>
<content type='text'>
 Commit 0ee5941 : (x86/panic: replace smp_send_stop() with kdump friendly
version in panic path) introduced crash_smp_send_stop() which is a weak
function and can be overridden by architecture codes to fix the side effect
caused by commit f06e515 : (kernel/panic.c: add "crash_kexec_post_
notifiers" option).

 ARM64 architecture uses the weak version function and the problem is that
the weak function simply calls smp_send_stop() which makes other CPUs
offline and takes away the chance to save crash information for nonpanic
CPUs in machine_crash_shutdown() when crash_kexec_post_notifiers kernel
option is enabled.

 Calling smp_send_crash_stop() in machine_crash_shutdown() is useless
because all nonpanic CPUs are already offline by smp_send_stop() in this
case and smp_send_crash_stop() only works against online CPUs.

 The result is that secondary CPUs registers are not saved by
crash_save_cpu() and the vmcore file misreports these CPUs as being
offline.

 crash_smp_send_stop() is implemented to fix this problem by replacing the
existing smp_send_crash_stop() and adding a check for multiple calling to
the function. The function (strong symbol version) saves crash information
for nonpanic CPUs and machine_crash_shutdown() tries to save crash
information for nonpanic CPUs only when crash_kexec_post_notifiers kernel
option is disabled.

* crash_kexec_post_notifiers : false

  panic()
    __crash_kexec()
      machine_crash_shutdown()
        crash_smp_send_stop()    &lt;= save crash dump for nonpanic cores

* crash_kexec_post_notifiers : true

  panic()
    crash_smp_send_stop()        &lt;= save crash dump for nonpanic cores
    __crash_kexec()
      machine_crash_shutdown()
        crash_smp_send_stop()    &lt;= just return.

Signed-off-by: Hoeun Ryu &lt;hoeun.ryu@gmail.com&gt;
Reviewed-by: James Morse &lt;james.morse@arm.com&gt;
Tested-by: James Morse &lt;james.morse@arm.com&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
</entry>
<entry>
<title>arm64: kdump: add VMCOREINFO's for user-space tools</title>
<updated>2017-04-05T17:29:47Z</updated>
<author>
<name>AKASHI Takahiro</name>
</author>
<published>2017-04-03T02:24:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=20a166243328c14a0c24bd8c7919223ab4174917'/>
<id>urn:sha1:20a166243328c14a0c24bd8c7919223ab4174917</id>
<content type='text'>
In addition to common VMCOREINFO's defined in
crash_save_vmcoreinfo_init(), we need to know, for crash utility,
  - kimage_voffset
  - PHYS_OFFSET
to examine the contents of a dump file (/proc/vmcore) correctly
due to the introduction of KASLR (CONFIG_RANDOMIZE_BASE) in v4.6.

  - VA_BITS
is also required for makedumpfile command.

arch_crash_save_vmcoreinfo() appends them to the dump file.
More VMCOREINFO's may be added later.

Signed-off-by: AKASHI Takahiro &lt;takahiro.akashi@linaro.org&gt;
Reviewed-by: James Morse &lt;james.morse@arm.com&gt;
Acked-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
</entry>
<entry>
<title>arm64: kdump: implement machine_crash_shutdown()</title>
<updated>2017-04-05T17:29:15Z</updated>
<author>
<name>AKASHI Takahiro</name>
</author>
<published>2017-04-03T02:24:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=78fd584cdec0518075cf3aa75e5ec491cc8f3ff3'/>
<id>urn:sha1:78fd584cdec0518075cf3aa75e5ec491cc8f3ff3</id>
<content type='text'>
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-boot(crashed) cpus offline (to preserve
correct status of cpus at crash dump) before shutting down, this patch
also adds a variant of smp_send_stop().

Signed-off-by: AKASHI Takahiro &lt;takahiro.akashi@linaro.org&gt;
Reviewed-by: James Morse &lt;james.morse@arm.com&gt;
Acked-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
</entry>
<entry>
<title>arm64: hibernate: preserve kdump image around hibernation</title>
<updated>2017-04-05T17:28:50Z</updated>
<author>
<name>AKASHI Takahiro</name>
</author>
<published>2017-04-03T02:24:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=254a41c0ba0573fa23272945d3fbe39efcc5d07d'/>
<id>urn:sha1:254a41c0ba0573fa23272945d3fbe39efcc5d07d</id>
<content type='text'>
Since arch_kexec_protect_crashkres() removes a mapping for crash dump
kernel image, the loaded data won't be preserved around hibernation.

In this patch, helper functions, crash_prepare_suspend()/
crash_post_resume(), are additionally called before/after hibernation so
that the relevant memory segments will be mapped again and preserved just
as the others are.

In addition, to minimize the size of hibernation image, crash_is_nosave()
is added to pfn_is_nosave() in order to recognize only the pages that hold
loaded crash dump kernel image as saveable. Hibernation excludes any pages
that are marked as Reserved and yet "nosave."

Signed-off-by: AKASHI Takahiro &lt;takahiro.akashi@linaro.org&gt;
Reviewed-by: James Morse &lt;james.morse@arm.com&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
</entry>
<entry>
<title>arm64: kdump: protect crash dump kernel memory</title>
<updated>2017-04-05T17:28:35Z</updated>
<author>
<name>Takahiro Akashi</name>
</author>
<published>2017-04-03T02:24:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=98d2e1539b84abddce4b3c2ca8733f6aeacdee47'/>
<id>urn:sha1:98d2e1539b84abddce4b3c2ca8733f6aeacdee47</id>
<content type='text'>
arch_kexec_protect_crashkres() and arch_kexec_unprotect_crashkres()
are meant to be called by kexec_load() in order to protect the memory
allocated for crash dump kernel once the image is loaded.

The protection is implemented by unmapping the relevant segments in crash
dump kernel memory, rather than making it read-only as other archs do,
to prevent coherency issues due to potential cache aliasing (with
mismatched attributes).

Page-level mappings are consistently used here so that we can change
the attributes of segments in page granularity as well as shrink the region
also in page granularity through /sys/kernel/kexec_crash_size, putting
the freed memory back to buddy system.

Signed-off-by: AKASHI Takahiro &lt;takahiro.akashi@linaro.org&gt;
Reviewed-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
</entry>
<entry>
<title>arm64/kexec: Add pr_debug output</title>
<updated>2016-06-27T15:31:26Z</updated>
<author>
<name>Geoff Levand</name>
</author>
<published>2016-06-23T17:54:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=221f2c770e10d3f8dca71e1e14e24e61dc8988dd'/>
<id>urn:sha1:221f2c770e10d3f8dca71e1e14e24e61dc8988dd</id>
<content type='text'>
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 &lt;geoff@infradead.org&gt;
Reviewed-by: James Morse &lt;james.morse@arm.com&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
</entry>
<entry>
<title>arm64/kexec: Add core kexec support</title>
<updated>2016-06-27T15:31:25Z</updated>
<author>
<name>Geoff Levand</name>
</author>
<published>2016-06-23T17:54:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d28f6df1305a86715e4e7ea0f043ba01c0a0e8d9'/>
<id>urn:sha1:d28f6df1305a86715e4e7ea0f043ba01c0a0e8d9</id>
<content type='text'>
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 &lt;geoff@infradead.org&gt;
Reviewed-by: James Morse &lt;james.morse@arm.com&gt;
[catalin.marinas@arm.com: removed dead code following James Morse's comments]
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
</entry>
</feed>
