Hi,
This series adds DMA operations support to the qemu fw_cfg kernel
module and populates "etc/vmcoreinfo" with vmcoreinfo location
details.
Note: the support for this entry handling has been merged for upcoming
qemu release (2.11).
v7:
- add a patch to fix driver remove()
- remove DMA operatiom timeout (qemu finishes sync today)
- synchronize the DMA transfer before reading from CPU
- removed kmalloc() use static allocation instead
- drop some r-b tags
v6:
- change acpi_acquire_global_lock() error to return EINVAL
(instead of EBUSY)
- replace 0 as pointer argument for NULL
- add Gabriel r-b/a-b tags
v5:
- resent to CC kdump people on the paddr_vmcoreinfo_note() export patch
v4:
- export paddr_vmcoreinfo_note() to fix fw_cfg.ko build
- fix build with !CONFIG_CRASH_CORE
- replace the unbounded yield() loop with a usleep_range() loop and a
200ms timeout
- do not write vmcoreinfo entry when running the kdump kernel (D. Hatayama)
- drop the experimental sysfs write support patch from this series
v3: (thanks kbuild)
- add "fw_cfg: fix the command line module name" patch
- fix build of "fw_cfg: add DMA register" with CONFIG_FW_CFG_SYSFS_CMDLINE=y
- fix 'Wshift-count-overflow'
v2:
- use platform device for dma mapping
- add etc/vmcoreinfo patch
- some code cleanups
Marc-André Lureau (5):
fw_cfg: fix driver remove
fw_cfg: add DMA register
fw_cfg: do DMA read operation
crash: export paddr_vmcoreinfo_note()
fw_cfg: write vmcoreinfo details
drivers/firmware/qemu_fw_cfg.c | 276 ++++++++++++++++++++++++++++++++++++-----
kernel/crash_core.c | 1 +
2 files changed, 247 insertions(+), 30 deletions(-)
--
2.15.0.277.ga3d2ad2c43
From 1584566799709133301@xxx Mon Nov 20 06:50:59 +0000 2017
X-GM-THRID: 1584566799709133301
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread
On driver remove(), all objects created during probe() should be
removed, but sysfs qemu_fw_cfg/rev file was left. Also reorder
functions to match probe() error cleanup code.
Signed-off-by: Marc-André Lureau <[email protected]>
---
drivers/firmware/qemu_fw_cfg.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/firmware/qemu_fw_cfg.c b/drivers/firmware/qemu_fw_cfg.c
index 5cfe39f7a45f..deb483064f53 100644
--- a/drivers/firmware/qemu_fw_cfg.c
+++ b/drivers/firmware/qemu_fw_cfg.c
@@ -582,9 +582,10 @@ static int fw_cfg_sysfs_remove(struct platform_device *pdev)
{
pr_debug("fw_cfg: unloading.\n");
fw_cfg_sysfs_cache_cleanup();
+ sysfs_remove_file(fw_cfg_top_ko, &fw_cfg_rev_attr.attr);
+ fw_cfg_io_cleanup();
fw_cfg_kset_unregister_recursive(fw_cfg_fname_kset);
fw_cfg_kobj_cleanup(fw_cfg_sel_ko);
- fw_cfg_io_cleanup();
return 0;
}
--
2.15.0.277.ga3d2ad2c43
From 1584513966951098723@xxx Sun Nov 19 16:51:14 +0000 2017
X-GM-THRID: 1581553715797412419
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread
The following patch is going to use the symbol from the fw_cfg module,
to call the function and write the note location details in the
vmcoreinfo entry, so qemu can produce dumps with the vmcoreinfo note.
CC: Andrew Morton <[email protected]>
CC: Baoquan He <[email protected]>
CC: Dave Young <[email protected]>
CC: Dave Young <[email protected]>
CC: Hari Bathini <[email protected]>
CC: Tony Luck <[email protected]>
CC: Vivek Goyal <[email protected]>
Signed-off-by: Marc-André Lureau <[email protected]>
Acked-by: Gabriel Somlo <[email protected]>
---
kernel/crash_core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/crash_core.c b/kernel/crash_core.c
index b3663896278e..2394f0501c65 100644
--- a/kernel/crash_core.c
+++ b/kernel/crash_core.c
@@ -376,6 +376,7 @@ phys_addr_t __weak paddr_vmcoreinfo_note(void)
{
return __pa(vmcoreinfo_note);
}
+EXPORT_SYMBOL(paddr_vmcoreinfo_note);
static int __init crash_save_vmcoreinfo_init(void)
{
--
2.15.0.277.ga3d2ad2c43
From 1583969807133421488@xxx Mon Nov 13 16:42:03 +0000 2017
X-GM-THRID: 1583969807133421488
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread