aboutsummaryrefslogtreecommitdiff
path: root/drivers/misc/pvpanic.c
AgeCommit message (Collapse)AuthorFilesLines
2020-09-22misc: pvpanic: Use devm_platform_ioremap_resource()Wang ShaoBo1-7/+1
Make use of devm_platform_ioremap_resource() provided by driver core platform instead of duplicated analogue. Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Wang ShaoBo <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2020-01-14misc: pvpanic: add crash loaded eventzhenwei pi1-1/+8
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2020-01-14misc: pvpanic: move bit definition to uapi header filezhenwei pi1-2/+1
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 <[email protected]> Signed-off-by: zhenwei pi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-01-18misc: pvpanic: fix warning implicit declarationAnders Roxell1-0/+4
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 <[email protected]> Signed-off-by: Anders Roxell <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-11-27misc/pvpanic: fix a NULL vs IS_ERR() checkDan Carpenter1-2/+2
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-11-07misc/pvpanic: remove a redundant commaPeng Hao1-1/+1
Remove a redundant comma in pvpanic_device_ids. Reviewed-by: Andy Shevchenko <[email protected]> Acked-by: Mark Rutland <[email protected]> Signed-off-by: Peng Hao <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-11-07misc/pvpanic: convert to SPDX license tagsPeng Hao1-15/+2
Updates license to use SPDX-License-Identifier instead of verbose license text. Reviewed-by: Andy Shevchenko <[email protected]> Acked-by: Mark Rutland <[email protected]> Signed-off-by: Peng Hao <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-11-07misc/pvpanic: change header file sort stylePeng Hao1-1/+1
Make header files alphabetical order. Signed-off-by: Peng Hao <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-11-07misc/pvpanic: remove unnecessary header filePeng Hao1-1/+0
Remove unnecessary header file init.h. Reviewed-by: Andy Shevchenko <[email protected]> Acked-by: Mark Rutland <[email protected]> Signed-off-by: Peng Hao <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-11-07misc/pvpanic : break dependency on ACPIPeng Hao1-2/+21
The pvpanic driver is available for architectures that do not support ACPI.So break the dependency. Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Peng Hao <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-11-07misc/pvpanic : grouping ACPI related stuffPeng Hao1-22/+21
Grouping ACPI related stuff and make preparation to break the ACPI dependency w/o any functional change. Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Peng Hao <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-11-07misc/pvpanic: add support to get pvpanic device info FDTPeng Hao1-1/+63
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 <[email protected]> Signed-off-by: Peng Hao <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-11-07misc/pvpanic: add MMIO supportPeng Hao1-5/+10
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 <[email protected]> [Use acpi_dev_resource_memory API. - Andy] Reviewed-by: Andy Shevchenko <[email protected]> Acked-by: Mark Rutland <[email protected]> Signed-off-by: Peng Hao <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-11-07misc/pvpanic: simplify the code using acpi_dev_resource_ioPeng Hao1-8/+5
Use acpi_dev_resource_io API. Suggested-by: Andy Shevchenko <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Acked-by: Mark Rutland <[email protected]> Signed-off-by: Peng Hao <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-11-07pvpanic: move pvpanic to misc as common driverPeng Hao1-0/+124
Move pvpanic.c from drivers/platform/x86 to drivers/misc. Following patches will use pvpanic device in arm64. Reviewed-by: Andy Shevchenko <[email protected]> Acked-by: Mark Rutland <[email protected]> Signed-off-by: Peng Hao <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>