2017-12-07 17:11:48

by Kershner, David A

[permalink] [raw]
Subject: [PATCH v2] drivers: visorbus: move driver out of staging

Move the visorbus driver out of staging (drivers/staging/unisys/visorbus)
and to drivers/visorbus. Modify the configuration and makefiles so they
now reference the new location. The s-Par header file visorbus.h that is
referenced by all s-Par drivers, is being moved into include/linux.

Signed-off-by: David Kershner <[email protected]>
Reviewed-by: Tim Sell <[email protected]>
---

The files are based off the latest revision in the staging-next tree:

https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git

Changes from v1:
-- Simplified to one single patch
-- Combined include files into a single file
-- Fixed the dependency flags that were in the wrong
location.


MAINTAINERS | 2 ++
drivers/Kconfig | 2 ++
drivers/Makefile | 1 +
drivers/staging/unisys/Kconfig | 1 -
drivers/staging/unisys/Makefile | 1 -
drivers/staging/unisys/include/iochannel.h | 3 +--
drivers/staging/unisys/visorhba/visorhba_main.c | 2 +-
drivers/staging/unisys/visorinput/visorinput.c | 2 +-
drivers/staging/unisys/visornic/visornic_main.c | 2 +-
drivers/{staging/unisys => }/visorbus/Kconfig | 1 -
drivers/{staging/unisys => }/visorbus/Makefile | 2 --
drivers/{staging/unisys => }/visorbus/controlvmchannel.h | 3 +--
drivers/{staging/unisys => }/visorbus/vbuschannel.h | 2 +-
drivers/{staging/unisys => }/visorbus/visorbus_main.c | 2 +-
drivers/{staging/unisys => }/visorbus/visorbus_private.h | 2 +-
drivers/{staging/unisys => }/visorbus/visorchannel.c | 2 +-
drivers/{staging/unisys => }/visorbus/visorchipset.c | 2 +-
{drivers/staging/unisys/include => include/linux}/visorbus.h | 0
18 files changed, 15 insertions(+), 17 deletions(-)
rename drivers/{staging/unisys => }/visorbus/Kconfig (95%)
rename drivers/{staging/unisys => }/visorbus/Makefile (81%)
rename drivers/{staging/unisys => }/visorbus/controlvmchannel.h (99%)
rename drivers/{staging/unisys => }/visorbus/vbuschannel.h (99%)
rename drivers/{staging/unisys => }/visorbus/visorbus_main.c (99%)
rename drivers/{staging/unisys => }/visorbus/visorbus_private.h (98%)
rename drivers/{staging/unisys => }/visorbus/visorchannel.c (99%)
rename drivers/{staging/unisys => }/visorbus/visorchipset.c (99%)
rename {drivers/staging/unisys/include => include/linux}/visorbus.h (100%)

diff --git a/MAINTAINERS b/MAINTAINERS
index 6308fa7..36f76be 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -14006,6 +14006,8 @@ UNISYS S-PAR DRIVERS
M: David Kershner <[email protected]>
L: [email protected] (Unisys internal)
S: Supported
+F: include/linux/visorbus.h
+F: drivers/visorbus/
F: drivers/staging/unisys/

UNIVERSAL FLASH STORAGE HOST CONTROLLER DRIVER
diff --git a/drivers/Kconfig b/drivers/Kconfig
index 152744c..ef5fb83 100644
--- a/drivers/Kconfig
+++ b/drivers/Kconfig
@@ -211,4 +211,6 @@ source "drivers/mux/Kconfig"

source "drivers/opp/Kconfig"

+source "drivers/visorbus/Kconfig"
+
endmenu
diff --git a/drivers/Makefile b/drivers/Makefile
index e06f7f6..7a23300 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -184,3 +184,4 @@ obj-$(CONFIG_FPGA) += fpga/
obj-$(CONFIG_FSI) += fsi/
obj-$(CONFIG_TEE) += tee/
obj-$(CONFIG_MULTIPLEXER) += mux/
+obj-$(CONFIG_UNISYS_VISORBUS) += visorbus/
diff --git a/drivers/staging/unisys/Kconfig b/drivers/staging/unisys/Kconfig
index 4d19038..c27dab3 100644
--- a/drivers/staging/unisys/Kconfig
+++ b/drivers/staging/unisys/Kconfig
@@ -8,7 +8,6 @@ menuconfig UNISYSSPAR

if UNISYSSPAR

-source "drivers/staging/unisys/visorbus/Kconfig"
source "drivers/staging/unisys/visornic/Kconfig"
source "drivers/staging/unisys/visorinput/Kconfig"
source "drivers/staging/unisys/visorhba/Kconfig"
diff --git a/drivers/staging/unisys/Makefile b/drivers/staging/unisys/Makefile
index 20eb098..e45f44b 100644
--- a/drivers/staging/unisys/Makefile
+++ b/drivers/staging/unisys/Makefile
@@ -1,7 +1,6 @@
#
# Makefile for Unisys SPAR drivers
#
-obj-$(CONFIG_UNISYS_VISORBUS) += visorbus/
obj-$(CONFIG_UNISYS_VISORNIC) += visornic/
obj-$(CONFIG_UNISYS_VISORINPUT) += visorinput/
obj-$(CONFIG_UNISYS_VISORHBA) += visorhba/
diff --git a/drivers/staging/unisys/include/iochannel.h b/drivers/staging/unisys/include/iochannel.h
index 9023cf5..45c785d 100644
--- a/drivers/staging/unisys/include/iochannel.h
+++ b/drivers/staging/unisys/include/iochannel.h
@@ -33,8 +33,7 @@

#include <linux/uuid.h>
#include <linux/skbuff.h>
-
-#include "visorbus.h"
+#include <linux/visorbus.h>

/*
* Must increment these whenever you insert or delete fields within this channel
diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c b/drivers/staging/unisys/visorhba/visorhba_main.c
index da650d6..167e98f 100644
--- a/drivers/staging/unisys/visorhba/visorhba_main.c
+++ b/drivers/staging/unisys/visorhba/visorhba_main.c
@@ -9,12 +9,12 @@
#include <linux/idr.h>
#include <linux/module.h>
#include <linux/seq_file.h>
+#include <linux/visorbus.h>
#include <scsi/scsi.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_device.h>

-#include "visorbus.h"
#include "iochannel.h"

/* The Send and Receive Buffers of the IO Queue may both be full */
diff --git a/drivers/staging/unisys/visorinput/visorinput.c b/drivers/staging/unisys/visorinput/visorinput.c
index dabc5b4..d8048e4 100644
--- a/drivers/staging/unisys/visorinput/visorinput.c
+++ b/drivers/staging/unisys/visorinput/visorinput.c
@@ -16,8 +16,8 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/uuid.h>
+#include <linux/visorbus.h>

-#include "visorbus.h"
#include "ultrainputreport.h"

/* Keyboard channel {c73416d0-b0b8-44af-b304-9d2ae99f1b3d} */
diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c
index 112a76e..92dceb5 100644
--- a/drivers/staging/unisys/visornic/visornic_main.c
+++ b/drivers/staging/unisys/visornic/visornic_main.c
@@ -16,8 +16,8 @@
#include <linux/kthread.h>
#include <linux/skbuff.h>
#include <linux/rtnetlink.h>
+#include <linux/visorbus.h>

-#include "visorbus.h"
#include "iochannel.h"

#define VISORNIC_INFINITE_RSP_WAIT 0
diff --git a/drivers/staging/unisys/visorbus/Kconfig b/drivers/visorbus/Kconfig
similarity index 95%
rename from drivers/staging/unisys/visorbus/Kconfig
rename to drivers/visorbus/Kconfig
index 3866804..1f5812b 100644
--- a/drivers/staging/unisys/visorbus/Kconfig
+++ b/drivers/visorbus/Kconfig
@@ -4,7 +4,6 @@

config UNISYS_VISORBUS
tristate "Unisys visorbus driver"
- depends on UNISYSSPAR
depends on X86_64 && ACPI
---help---
The visorbus driver is a virtualized bus for the Unisys s-Par firmware.
diff --git a/drivers/staging/unisys/visorbus/Makefile b/drivers/visorbus/Makefile
similarity index 81%
rename from drivers/staging/unisys/visorbus/Makefile
rename to drivers/visorbus/Makefile
index 784cdc1..e8df59d 100644
--- a/drivers/staging/unisys/visorbus/Makefile
+++ b/drivers/visorbus/Makefile
@@ -8,5 +8,3 @@ obj-$(CONFIG_UNISYS_VISORBUS) += visorbus.o
visorbus-y := visorbus_main.o
visorbus-y += visorchannel.o
visorbus-y += visorchipset.o
-
-ccflags-y += -Idrivers/staging/unisys/include
diff --git a/drivers/staging/unisys/visorbus/controlvmchannel.h b/drivers/visorbus/controlvmchannel.h
similarity index 99%
rename from drivers/staging/unisys/visorbus/controlvmchannel.h
rename to drivers/visorbus/controlvmchannel.h
index b0ae29e..8c57562 100644
--- a/drivers/staging/unisys/visorbus/controlvmchannel.h
+++ b/drivers/visorbus/controlvmchannel.h
@@ -8,8 +8,7 @@
#define __CONTROLVMCHANNEL_H__

#include <linux/uuid.h>
-
-#include "visorbus.h"
+#include <linux/visorbus.h>

/* {2B3C2D10-7EF5-4ad8-B966-3448B7386B3D} */
#define VISOR_CONTROLVM_CHANNEL_GUID \
diff --git a/drivers/staging/unisys/visorbus/vbuschannel.h b/drivers/visorbus/vbuschannel.h
similarity index 99%
rename from drivers/staging/unisys/visorbus/vbuschannel.h
rename to drivers/visorbus/vbuschannel.h
index 622c9d7..b1dce26 100644
--- a/drivers/staging/unisys/visorbus/vbuschannel.h
+++ b/drivers/visorbus/vbuschannel.h
@@ -17,7 +17,7 @@
*/

#include <linux/uuid.h>
-#include "visorbus.h"
+#include <linux/visorbus.h>

/* {193b331b-c58f-11da-95a9-00e08161165f} */
#define VISOR_VBUS_CHANNEL_GUID \
diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/visorbus/visorbus_main.c
similarity index 99%
rename from drivers/staging/unisys/visorbus/visorbus_main.c
rename to drivers/visorbus/visorbus_main.c
index a167155..0b2434c 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/visorbus/visorbus_main.c
@@ -8,9 +8,9 @@
#include <linux/debugfs.h>
#include <linux/module.h>
#include <linux/slab.h>
+#include <linux/visorbus.h>
#include <linux/uuid.h>

-#include "visorbus.h"
#include "visorbus_private.h"

static const guid_t visor_vbus_channel_guid = VISOR_VBUS_CHANNEL_GUID;
diff --git a/drivers/staging/unisys/visorbus/visorbus_private.h b/drivers/visorbus/visorbus_private.h
similarity index 98%
rename from drivers/staging/unisys/visorbus/visorbus_private.h
rename to drivers/visorbus/visorbus_private.h
index e48498f..366380b 100644
--- a/drivers/staging/unisys/visorbus/visorbus_private.h
+++ b/drivers/visorbus/visorbus_private.h
@@ -9,10 +9,10 @@

#include <linux/uuid.h>
#include <linux/utsname.h>
+#include <linux/visorbus.h>

#include "controlvmchannel.h"
#include "vbuschannel.h"
-#include "visorbus.h"

struct visor_device *visorbus_get_device_by_id(u32 bus_no, u32 dev_no,
struct visor_device *from);
diff --git a/drivers/staging/unisys/visorbus/visorchannel.c b/drivers/visorbus/visorchannel.c
similarity index 99%
rename from drivers/staging/unisys/visorbus/visorchannel.c
rename to drivers/visorbus/visorchannel.c
index f3996a7..bd890e0 100644
--- a/drivers/staging/unisys/visorbus/visorchannel.c
+++ b/drivers/visorbus/visorchannel.c
@@ -12,8 +12,8 @@
#include <linux/uuid.h>
#include <linux/io.h>
#include <linux/slab.h>
+#include <linux/visorbus.h>

-#include "visorbus.h"
#include "visorbus_private.h"
#include "controlvmchannel.h"

diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/visorbus/visorchipset.c
similarity index 99%
rename from drivers/staging/unisys/visorbus/visorchipset.c
rename to drivers/visorbus/visorchipset.c
index daff44d..ca752b8 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/visorbus/visorchipset.c
@@ -6,8 +6,8 @@

#include <linux/acpi.h>
#include <linux/crash_dump.h>
+#include <linux/visorbus.h>

-#include "visorbus.h"
#include "visorbus_private.h"

/* {72120008-4AAB-11DC-8530-444553544200} */
diff --git a/drivers/staging/unisys/include/visorbus.h b/include/linux/visorbus.h
similarity index 100%
rename from drivers/staging/unisys/include/visorbus.h
rename to include/linux/visorbus.h
--
1.9.1


2017-12-08 15:39:17

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH v2] drivers: visorbus: move driver out of staging

On Thu, Dec 07, 2017 at 12:11:07PM -0500, David Kershner wrote:
> Move the visorbus driver out of staging (drivers/staging/unisys/visorbus)
> and to drivers/visorbus. Modify the configuration and makefiles so they
> now reference the new location. The s-Par header file visorbus.h that is
> referenced by all s-Par drivers, is being moved into include/linux.
>
> Signed-off-by: David Kershner <[email protected]>
> Reviewed-by: Tim Sell <[email protected]>

Nice work, now applied to my testing tree!

greg k-h

2017-12-08 16:53:05

by Joe Perches

[permalink] [raw]
Subject: Re: [PATCH v2] drivers: visorbus: move driver out of staging

On Fri, 2017-12-08 at 16:39 +0100, Greg KH wrote:
> On Thu, Dec 07, 2017 at 12:11:07PM -0500, David Kershner wrote:
> > Move the visorbus driver out of staging (drivers/staging/unisys/visorbus)
> > and to drivers/visorbus. Modify the configuration and makefiles so they
> > now reference the new location. The s-Par header file visorbus.h that is
> > referenced by all s-Par drivers, is being moved into include/linux.

Perhaps moving visorbus.h and visorbus_private.h to
drivers/visorbus would be better than adding more
relatively localized #include files to include/linux/

what about controlvmchannel?


2017-12-08 18:42:49

by Dan Carpenter

[permalink] [raw]
Subject: Re: [PATCH v2] drivers: visorbus: move driver out of staging

On Fri, Dec 08, 2017 at 04:39:13PM +0100, Greg KH wrote:
> On Thu, Dec 07, 2017 at 12:11:07PM -0500, David Kershner wrote:
> > Move the visorbus driver out of staging (drivers/staging/unisys/visorbus)
> > and to drivers/visorbus. Modify the configuration and makefiles so they
> > now reference the new location. The s-Par header file visorbus.h that is
> > referenced by all s-Par drivers, is being moved into include/linux.
> >
> > Signed-off-by: David Kershner <[email protected]>
> > Reviewed-by: Tim Sell <[email protected]>
>
> Nice work, now applied to my testing tree!

Congrats. :)

regards,
dan carpenter

2017-12-08 21:55:40

by Kershner, David A

[permalink] [raw]
Subject: RE: [PATCH v2] drivers: visorbus: move driver out of staging

> -----Original Message-----
> From: Joe Perches [mailto:[email protected]]
> Sent: Friday, December 8, 2017 11:53 AM
> To: Greg KH <[email protected]>; Kershner, David A
> <[email protected]>
> Cc: [email protected]; [email protected]; driverdev-
> [email protected]; *S-Par-Maintainer
> <[email protected]>; [email protected];
> [email protected]
> Subject: Re: [PATCH v2] drivers: visorbus: move driver out of staging
>
> On Fri, 2017-12-08 at 16:39 +0100, Greg KH wrote:
> > On Thu, Dec 07, 2017 at 12:11:07PM -0500, David Kershner wrote:
> > > Move the visorbus driver out of staging
(drivers/staging/unisys/visorbus)
> > > and to drivers/visorbus. Modify the configuration and makefiles so
they
> > > now reference the new location. The s-Par header file visorbus.h that
is
> > > referenced by all s-Par drivers, is being moved into include/linux.
>
> Perhaps moving visorbus.h and visorbus_private.h to
> drivers/visorbus would be better than adding more
> relatively localized #include files to include/linux/
>
> what about controlvmchannel?
>

The file visorbus.h is currently included by 4 drivers: visorbus and 3
other drivers that are staying in staging for now, but we plan to move out
soon.

The files visorbus_private.h and controlvmchannel.h are only used by the
visorbus driver and belong solely in the visorbus directory, no one should
be including them besides the visorbus driver.

David Kershner


Attachments:
smime.p7s (7.68 kB)

2017-12-08 21:57:21

by Kershner, David A

[permalink] [raw]
Subject: RE: [PATCH v2] drivers: visorbus: move driver out of staging

> -----Original Message-----
> From: Dan Carpenter [mailto:[email protected]]
> Sent: Friday, December 8, 2017 1:32 PM
> To: Greg KH <[email protected]>
> Cc: Kershner, David A <[email protected]>;
> [email protected]; [email protected];
> [email protected]; *S-Par-Maintainer
> <[email protected]>; [email protected];
> [email protected]
> Subject: Re: [PATCH v2] drivers: visorbus: move driver out of staging
>
> On Fri, Dec 08, 2017 at 04:39:13PM +0100, Greg KH wrote:
> > On Thu, Dec 07, 2017 at 12:11:07PM -0500, David Kershner wrote:
> > > Move the visorbus driver out of staging
(drivers/staging/unisys/visorbus)
> > > and to drivers/visorbus. Modify the configuration and makefiles so
they
> > > now reference the new location. The s-Par header file visorbus.h that
is
> > > referenced by all s-Par drivers, is being moved into include/linux.
> > >
> > > Signed-off-by: David Kershner <[email protected]>
> > > Reviewed-by: Tim Sell <[email protected]>
> >
> > Nice work, now applied to my testing tree!
>
> Congrats. :)
>

Thanks, and thanks for all the help getting to this point!

David Kershner

> regards,
> dan carpenter


Attachments:
smime.p7s (7.68 kB)

2017-12-08 22:13:23

by Joe Perches

[permalink] [raw]
Subject: Re: [PATCH v2] drivers: visorbus: move driver out of staging

On Fri, 2017-12-08 at 21:55 +0000, Kershner, David A wrote:
> > -----Original Message-----
> > From: Joe Perches [mailto:[email protected]]
> > Sent: Friday, December 8, 2017 11:53 AM
> > To: Greg KH <[email protected]>; Kershner, David A
> > <[email protected]>
> > Cc: [email protected]; [email protected]; driverdev-
> > [email protected]; *S-Par-Maintainer
> > <[email protected]>; [email protected];
> > [email protected]
> > Subject: Re: [PATCH v2] drivers: visorbus: move driver out of staging
> >
> > On Fri, 2017-12-08 at 16:39 +0100, Greg KH wrote:
> > > On Thu, Dec 07, 2017 at 12:11:07PM -0500, David Kershner wrote:
> > > > Move the visorbus driver out of staging
>
> (drivers/staging/unisys/visorbus)
> > > > and to drivers/visorbus. Modify the configuration and makefiles so
>
> they
> > > > now reference the new location. The s-Par header file visorbus.h that
>
> is
> > > > referenced by all s-Par drivers, is being moved into include/linux.
> >
> > Perhaps moving visorbus.h and visorbus_private.h to
> > drivers/visorbus would be better than adding more
> > relatively localized #include files to include/linux/
> >
> > what about controlvmchannel?
> >
>
> The file visorbus.h is currently included by 4 drivers: visorbus and 3
> other drivers that are staying in staging for now, but we plan to move out
> soon.

OK.

Where do you plan on moving the 3 other drivers?

Today, these drivers (visorhba, visorinput, and visornic)
are all under the staging/unisys directory

visorbus -> drivers/visorbus
visorhba -> ?
visorinput -> ?
visornic -> ?

Perhaps all these, including visorbus, should be under virt/
or perhaps visorbus should be under virt/ and the others
under drivers/virt/

2017-12-09 17:40:24

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH v2] drivers: visorbus: move driver out of staging

On Fri, Dec 08, 2017 at 02:13:18PM -0800, Joe Perches wrote:
> On Fri, 2017-12-08 at 21:55 +0000, Kershner, David A wrote:
> > > -----Original Message-----
> > > From: Joe Perches [mailto:[email protected]]
> > > Sent: Friday, December 8, 2017 11:53 AM
> > > To: Greg KH <[email protected]>; Kershner, David A
> > > <[email protected]>
> > > Cc: [email protected]; [email protected]; driverdev-
> > > [email protected]; *S-Par-Maintainer
> > > <[email protected]>; [email protected];
> > > [email protected]
> > > Subject: Re: [PATCH v2] drivers: visorbus: move driver out of staging
> > >
> > > On Fri, 2017-12-08 at 16:39 +0100, Greg KH wrote:
> > > > On Thu, Dec 07, 2017 at 12:11:07PM -0500, David Kershner wrote:
> > > > > Move the visorbus driver out of staging
> >
> > (drivers/staging/unisys/visorbus)
> > > > > and to drivers/visorbus. Modify the configuration and makefiles so
> >
> > they
> > > > > now reference the new location. The s-Par header file visorbus.h that
> >
> > is
> > > > > referenced by all s-Par drivers, is being moved into include/linux.
> > >
> > > Perhaps moving visorbus.h and visorbus_private.h to
> > > drivers/visorbus would be better than adding more
> > > relatively localized #include files to include/linux/
> > >
> > > what about controlvmchannel?
> > >
> >
> > The file visorbus.h is currently included by 4 drivers: visorbus and 3
> > other drivers that are staying in staging for now, but we plan to move out
> > soon.
>
> OK.
>
> Where do you plan on moving the 3 other drivers?
>
> Today, these drivers (visorhba, visorinput, and visornic)
> are all under the staging/unisys directory
>
> visorbus -> drivers/visorbus
> visorhba -> ?
> visorinput -> ?
> visornic -> ?
>
> Perhaps all these, including visorbus, should be under virt/
> or perhaps visorbus should be under virt/ and the others
> under drivers/virt/

They will move to the proper subsystem directory (storage, input,
networking), when they are ready.

thanks,

greg k-h

2017-12-12 09:13:09

by Christoph Hellwig

[permalink] [raw]
Subject: Re: [PATCH v2] drivers: visorbus: move driver out of staging

Hi David,

as said before, please submit the actual files as new code to the
kernel. The code will need a full review, and a simple move is not
going to cut it. Posting the actual code as patches will allow for the
proper review that is needed.