Michal Suchanek 5afb3a
From ac9caa076ae349fa09758fafc6f36115fc044e54 Mon Sep 17 00:00:00 2001
Michal Suchanek 52ce71
From: Michal Suchanek <msuchanek@suse.de>
Michal Suchanek 52ce71
Date: Thu, 22 Apr 2021 16:37:14 +0200
Michal Suchanek 52ce71
Subject: [PATCH] kABI: powerpc/pseries: Add shutdown() to vio_driver and
Michal Suchanek 52ce71
 vio_bus
Michal Suchanek 52ce71
Michal Suchanek 52ce71
References: bsc#1184209 ltc#190917
Michal Suchanek 52ce71
Patch-mainline: never, kABI
Michal Suchanek 52ce71
Michal Suchanek 52ce71
Drop the shutdown() callback again and keep the remove() fallback only.
Michal Suchanek 52ce71
shutdown() is not implemented by any current driver anyway.
Michal Suchanek 52ce71
Michal Suchanek 52ce71
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Michal Suchanek 52ce71
---
Michal Suchanek 5afb3a
 arch/powerpc/include/asm/vio.h       |  1 -
Michal Suchanek 5afb3a
 arch/powerpc/platforms/pseries/vio.c | 10 +++-------
Michal Suchanek 5afb3a
 2 files changed, 3 insertions(+), 8 deletions(-)
Michal Suchanek 52ce71
Michal Suchanek 52ce71
diff --git a/arch/powerpc/include/asm/vio.h b/arch/powerpc/include/asm/vio.h
Michal Suchanek 52ce71
index 4998c9a08100..0cf52746531b 100644
Michal Suchanek 52ce71
--- a/arch/powerpc/include/asm/vio.h
Michal Suchanek 52ce71
+++ b/arch/powerpc/include/asm/vio.h
Michal Suchanek 52ce71
@@ -114,7 +114,6 @@ struct vio_driver {
Michal Suchanek 52ce71
 	const struct vio_device_id *id_table;
Michal Suchanek 52ce71
 	int (*probe)(struct vio_dev *dev, const struct vio_device_id *id);
Michal Suchanek 52ce71
 	int (*remove)(struct vio_dev *dev);
Michal Suchanek 52ce71
-	void (*shutdown)(struct vio_dev *dev);
Michal Suchanek 52ce71
 	/* A driver must have a get_desired_dma() function to
Michal Suchanek 52ce71
 	 * be loaded in a CMO environment if it uses DMA.
Michal Suchanek 52ce71
 	 */
Michal Suchanek 52ce71
diff --git a/arch/powerpc/platforms/pseries/vio.c b/arch/powerpc/platforms/pseries/vio.c
Michal Suchanek 5afb3a
index 05de2f7351d4..26921294c2e1 100644
Michal Suchanek 52ce71
--- a/arch/powerpc/platforms/pseries/vio.c
Michal Suchanek 52ce71
+++ b/arch/powerpc/platforms/pseries/vio.c
Michal Suchanek 52ce71
@@ -22,7 +22,9 @@
Michal Suchanek 52ce71
 #include <linux/mm.h>
Michal Suchanek 52ce71
 #include <linux/dma-mapping.h>
Michal Suchanek 52ce71
 #include <linux/kobject.h>
Michal Suchanek 52ce71
+#ifndef __GENKSYMS__
Michal Suchanek 52ce71
 #include <linux/kexec.h>
Michal Suchanek 52ce71
+#endif
Michal Suchanek 52ce71
 
Michal Suchanek 52ce71
 #include <asm/iommu.h>
Michal Suchanek 52ce71
 #include <asm/dma.h>
Michal Suchanek 5afb3a
@@ -1279,14 +1281,8 @@ static int vio_bus_remove(struct device *dev)
Michal Suchanek 52ce71
 
Michal Suchanek 5afb3a
 static void vio_bus_shutdown(struct device *dev)
Michal Suchanek 5afb3a
 {
Michal Suchanek 5afb3a
-	struct vio_dev *viodev = to_vio_dev(dev);
Michal Suchanek 5afb3a
-	struct vio_driver *viodrv;
Michal Suchanek 5afb3a
-
Michal Suchanek 52ce71
 	if (dev->driver) {
Michal Suchanek 5afb3a
-		viodrv = to_vio_driver(dev->driver);
Michal Suchanek 52ce71
-		if (viodrv->shutdown)
Michal Suchanek 52ce71
-			viodrv->shutdown(viodev);
Michal Suchanek 52ce71
-		else if (kexec_in_progress)
Michal Suchanek 52ce71
+		if (kexec_in_progress)
Michal Suchanek 52ce71
 			vio_bus_remove(dev);
Michal Suchanek 52ce71
 	}
Michal Suchanek 52ce71
 }
Michal Suchanek 52ce71
-- 
Michal Suchanek 52ce71
2.26.2
Michal Suchanek 52ce71