]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/pseries: Add shutdown() to vio_driver and vio_bus
authorTyrel Datwyler <tyreld@linux.ibm.com>
Fri, 2 Apr 2021 00:13:25 +0000 (18:13 -0600)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 20 Apr 2021 04:22:24 +0000 (14:22 +1000)
commit8ffae9f7fa897b0ff52e71e35ef64d37b4aa750d
tree581ebaaa32930995e7409ae40fd58882cf7b9967
parente637e5d48aa23059efb815b66380b7380c8ae78f
powerpc/pseries: Add shutdown() to vio_driver and vio_bus

Currently, neither the vio_bus or vio_driver structures provide support
for a shutdown() routine.

Add support for shutdown() by allowing drivers to provide a
implementation via function pointer in their vio_driver struct and
provide a proper implementation in the driver template for the vio_bus
that calls a vio drivers shutdown() if defined.

In the case that no shutdown() is defined by a vio driver and a kexec is
in progress we implement a big hammer that calls remove() to ensure no
further DMA for the devices is possible.

Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210402001325.939668-1-tyreld@linux.ibm.com
arch/powerpc/include/asm/vio.h
arch/powerpc/platforms/pseries/vio.c