summaryrefslogtreecommitdiff
path: root/drivers/misc/pvpanic.c
AgeCommit message (Collapse)Author
2020-01-14misc: pvpanic: add crash loaded eventzhenwei pi
Some users prefer kdump tools to generate guest kernel dumpfile, at the same time, need a out-of-band kernel panic event. Currently if booting guest kernel with 'crash_kexec_post_notifiers', QEMU will receive PVPANIC_PANICKED event and stop VM. If booting guest kernel without 'crash_kexec_post_notifiers', guest will not call notifier chain. Add PVPANIC_CRASH_LOADED bit for pvpanic event, it means that guest kernel actually hit a kernel panic, but the guest kernel wants to handle by itself. Signed-off-by: zhenwei pi <pizhenwei@bytedance.com> Link: https://lore.kernel.org/r/20200102023513.318836-3-pizhenwei@bytedance.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-14misc: pvpanic: move bit definition to uapi header filezhenwei pi
Some processes outside of the kernel(Ex, QEMU) should know what the value really is for, so move the bit definition to a uapi file. Suggested-by: Greg KH <gregkh@linuxfoundation.org> Signed-off-by: zhenwei pi <pizhenwei@bytedance.com> Link: https://lore.kernel.org/r/20200102023513.318836-2-pizhenwei@bytedance.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-18misc: pvpanic: fix warning implicit declarationAnders Roxell
When building and have fragment CONFIG_NO_IOPORT_MAP enabled then the following warning: ../drivers/misc/pvpanic.c: In function ‘pvpanic_walk_resources’: ../drivers/misc/pvpanic.c:73:10: error: implicit declaration of function ‘ioport_map’; did you mean ‘ioremap’? [-Werror=implicit-function-declaration] base = ioport_map(r.start, resource_size(&r)); ^~~~~~~~~~ Since commmit 5d32a66541c4 ("PCI/ACPI: Allow ACPI to be built without CONFIG_PCI set"), its now possible to have ACPI enabled without haveing PCI enabled. However, the pvpanic driver depends on HAS_IOPORT_MAP or HAVE_IOREMAP_PROT when ACPI is enabled. It was fine until commit 725eba2928ad ("misc/pvpanic: add MMIO support") got added. Rework so that we do a extra check ifdef CONFIG_HAS_IOPORT_MAP. Fixes: 5d32a66541c4 ("PCI/ACPI: Allow ACPI to be built without CONFIG_PCI set") Suggested-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-27misc/pvpanic: fix a NULL vs IS_ERR() checkDan Carpenter
The devm_ioremap_resource() function doesn't return NULL, it returns error pointers. Fixes: 46f934c9a12f ("misc/pvpanic: add support to get pvpanic device info FDT") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-07misc/pvpanic: remove a redundant commaPeng Hao
Remove a redundant comma in pvpanic_device_ids. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Peng Hao <peng.hao2@zte.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-07misc/pvpanic: convert to SPDX license tagsPeng Hao
Updates license to use SPDX-License-Identifier instead of verbose license text. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Peng Hao <peng.hao2@zte.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-07misc/pvpanic: change header file sort stylePeng Hao
Make header files alphabetical order. Signed-off-by: Peng Hao <peng.hao2@zte.com.cn> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-07misc/pvpanic: remove unnecessary header filePeng Hao
Remove unnecessary header file init.h. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Peng Hao <peng.hao2@zte.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-07misc/pvpanic : break dependency on ACPIPeng Hao
The pvpanic driver is available for architectures that do not support ACPI.So break the dependency. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Peng Hao <peng.hao2@zte.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-07misc/pvpanic : grouping ACPI related stuffPeng Hao
Grouping ACPI related stuff and make preparation to break the ACPI dependency w/o any functional change. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Peng Hao <peng.hao2@zte.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-07misc/pvpanic: add support to get pvpanic device info FDTPeng Hao
By default, when ACPI tables and FDT coexist for ARM64, current kernel takes precedence over FDT to get device information. Virt machine in qemu provides both FDT and ACPI table. Increases the way to get information through FDT. Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Peng Hao <peng.hao2@zte.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-07misc/pvpanic: add MMIO supportPeng Hao
On some architectures (e.g. arm64), it's preferable to use MMIO, since this can be used standalone. Add MMIO support to the pvpanic driver. Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com> [Use acpi_dev_resource_memory API. - Andy] Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Peng Hao <peng.hao2@zte.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-07misc/pvpanic: simplify the code using acpi_dev_resource_ioPeng Hao
Use acpi_dev_resource_io API. Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Peng Hao <peng.hao2@zte.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-07pvpanic: move pvpanic to misc as common driverPeng Hao
Move pvpanic.c from drivers/platform/x86 to drivers/misc. Following patches will use pvpanic device in arm64. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Peng Hao <peng.hao2@zte.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>