summaryrefslogtreecommitdiff
path: root/drivers/s390/block/dcssblk.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2021-07-04 12:17:38 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2021-07-04 12:17:38 -0700
commit2bb919b62f6e5959552a90a399d09d683afa3d1d (patch)
tree21e237db2bd0563dd458250d1b27d63a478bbcbe /drivers/s390/block/dcssblk.c
parent0d4d4c6ff6debde4c44a418c59b304d4b514541c (diff)
parentd4a01902eb59e478ab7c7d36d7bb90d94a315f89 (diff)
Merge tag 's390-5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 updates from Vasily Gorbik: - Rework inline asm to get rid of error prone "register asm" constructs, which are problematic especially when code instrumentation is enabled. In particular introduce and use register pair union to allocate even/odd register pairs. Unfortunately this breaks compatibility with older clang compilers and minimum clang version for s390 has been raised to 13. https://lore.kernel.org/linux-next/CAK7LNARuSmPCEy-ak0erPrPTgZdGVypBROFhtw+=3spoGoYsyw@mail.gmail.com/ - Fix gcc 11 warnings, which triggered various minor reworks all over the code. - Add zstd kernel image compression support. - Rework boot CPU lowcore handling. - De-duplicate and move kernel memory layout setup logic earlier. - Few fixes in preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for mem functions. - Remove broken and unused power management support leftovers in s390 drivers. - Disable stack-protector for decompressor and purgatory to fix buildroot build. - Fix vt220 sclp console name to match the char device name. - Enable HAVE_IOREMAP_PROT and add zpci_set_irq()/zpci_clear_irq() in zPCI code. - Remove some implausible WARN_ON_ONCEs and remove arch specific counter transaction call backs in favour of default transaction handling in perf code. - Extend/add new uevents for online/config/mode state changes of AP card / queue device in zcrypt. - Minor entry and ccwgroup code improvements. - Other small various fixes and improvements all over the code. * tag 's390-5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (91 commits) s390/dasd: use register pair instead of register asm s390/qdio: get rid of register asm s390/ioasm: use symbolic names for asm operands s390/ioasm: get rid of register asm s390/cmf: get rid of register asm s390/lib,string: get rid of register asm s390/lib,uaccess: get rid of register asm s390/string: get rid of register asm s390/cmpxchg: use register pair instead of register asm s390/mm,pages-states: get rid of register asm s390/lib,xor: get rid of register asm s390/timex: get rid of register asm s390/hypfs: use register pair instead of register asm s390/zcrypt: Switch to flexible array member s390/speculation: Use statically initialized const for instructions virtio/s390: get rid of open-coded kvm hypercall s390/pci: add zpci_set_irq()/zpci_clear_irq() scripts/min-tool-version.sh: Raise minimum clang version to 13.0.0 for s390 s390/ipl: use register pair instead of register asm s390/mem_detect: fix tprot() program check new psw handling ...
Diffstat (limited to 'drivers/s390/block/dcssblk.c')
-rw-r--r--drivers/s390/block/dcssblk.c106
1 files changed, 3 insertions, 103 deletions
diff --git a/drivers/s390/block/dcssblk.c b/drivers/s390/block/dcssblk.c
index 7faa56399999..29180bdf0977 100644
--- a/drivers/s390/block/dcssblk.c
+++ b/drivers/s390/block/dcssblk.c
@@ -17,7 +17,6 @@
#include <linux/blkdev.h>
#include <linux/completion.h>
#include <linux/interrupt.h>
-#include <linux/platform_device.h>
#include <linux/pfn_t.h>
#include <linux/uio.h>
#include <linux/dax.h>
@@ -984,94 +983,11 @@ dcssblk_check_params(void)
}
/*
- * Suspend / Resume
- */
-static int dcssblk_freeze(struct device *dev)
-{
- struct dcssblk_dev_info *dev_info;
- int rc = 0;
-
- list_for_each_entry(dev_info, &dcssblk_devices, lh) {
- switch (dev_info->segment_type) {
- case SEG_TYPE_SR:
- case SEG_TYPE_ER:
- case SEG_TYPE_SC:
- if (!dev_info->is_shared)
- rc = -EINVAL;
- break;
- default:
- rc = -EINVAL;
- break;
- }
- if (rc)
- break;
- }
- if (rc)
- pr_err("Suspending the system failed because DCSS device %s "
- "is writable\n",
- dev_info->segment_name);
- return rc;
-}
-
-static int dcssblk_restore(struct device *dev)
-{
- struct dcssblk_dev_info *dev_info;
- struct segment_info *entry;
- unsigned long start, end;
- int rc = 0;
-
- list_for_each_entry(dev_info, &dcssblk_devices, lh) {
- list_for_each_entry(entry, &dev_info->seg_list, lh) {
- segment_unload(entry->segment_name);
- rc = segment_load(entry->segment_name, SEGMENT_SHARED,
- &start, &end);
- if (rc < 0) {
-// TODO in_use check ?
- segment_warning(rc, entry->segment_name);
- goto out_panic;
- }
- if (start != entry->start || end != entry->end) {
- pr_err("The address range of DCSS %s changed "
- "while the system was suspended\n",
- entry->segment_name);
- goto out_panic;
- }
- }
- }
- return 0;
-out_panic:
- panic("fatal dcssblk resume error\n");
-}
-
-static int dcssblk_thaw(struct device *dev)
-{
- return 0;
-}
-
-static const struct dev_pm_ops dcssblk_pm_ops = {
- .freeze = dcssblk_freeze,
- .thaw = dcssblk_thaw,
- .restore = dcssblk_restore,
-};
-
-static struct platform_driver dcssblk_pdrv = {
- .driver = {
- .name = "dcssblk",
- .pm = &dcssblk_pm_ops,
- },
-};
-
-static struct platform_device *dcssblk_pdev;
-
-
-/*
* The init/exit functions.
*/
static void __exit
dcssblk_exit(void)
{
- platform_device_unregister(dcssblk_pdev);
- platform_driver_unregister(&dcssblk_pdrv);
root_device_unregister(dcssblk_root_dev);
unregister_blkdev(dcssblk_major, DCSSBLK_NAME);
}
@@ -1081,22 +997,9 @@ dcssblk_init(void)
{
int rc;
- rc = platform_driver_register(&dcssblk_pdrv);
- if (rc)
- return rc;
-
- dcssblk_pdev = platform_device_register_simple("dcssblk", -1, NULL,
- 0);
- if (IS_ERR(dcssblk_pdev)) {
- rc = PTR_ERR(dcssblk_pdev);
- goto out_pdrv;
- }
-
dcssblk_root_dev = root_device_register("dcssblk");
- if (IS_ERR(dcssblk_root_dev)) {
- rc = PTR_ERR(dcssblk_root_dev);
- goto out_pdev;
- }
+ if (IS_ERR(dcssblk_root_dev))
+ return PTR_ERR(dcssblk_root_dev);
rc = device_create_file(dcssblk_root_dev, &dev_attr_add);
if (rc)
goto out_root;
@@ -1114,10 +1017,7 @@ dcssblk_init(void)
out_root:
root_device_unregister(dcssblk_root_dev);
-out_pdev:
- platform_device_unregister(dcssblk_pdev);
-out_pdrv:
- platform_driver_unregister(&dcssblk_pdrv);
+
return rc;
}