Commit graph

30 commits

Author SHA1 Message Date
Alexander Curtin 39b9280983 staging: unisys: include: Added kerneldoc comments to visor_device
The visor_device struct is used between multiple drivers, so this
adds kerneldoc comments to the fields.

Signed-off-by: Alexander Curtin <alexander.curtin@unisys.com>
Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 22:09:37 -07:00
Alexander Curtin b9edaf7ceb staging: unisys: include: Added kernel-doc for struct visor_driver
This adds kerneldoc style comments to the visor_driver struct since
it's shared between multiple modules.

Signed-off-by: Alexander Curtin <alexander.curtin@unisys.com>
Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 22:09:37 -07:00
Tim Sell 6d24b4b10e staging: unisys: include: remove unused fields from struct visor_driver
The build_date and build_time fields are not used, and have been removed.

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 22:09:37 -07:00
Alexander Curtin d2de2ffff5 staging: unisys: removed unused 'visor_device.respond_to_device_create'
The respond_to_device_create flag was used previously when we used to
delay responses to create requests until the drivers were finished
loading. This behaviour was removed some time ago, yet the field still
existed, while never being referenced or even initialized.

Signed-off-by: Alexander Curtin <alexander.curtin@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-11 21:15:51 -07:00
Alexander Curtin 527486ee8f staging: unisys: removed unused channel_bytes attribute
The channel_bytes attribute in the visor_device struct was meant to keep
track of the number of bytes in the associated channel of the device.
Not only is the variable never set nor used, but the information can
already be accessed by referencing visor_device->visorchannel->nbytes.

Signed-off-by: Alexander Curtin <alexander.curtin@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-30 18:28:32 -07:00
Alexander Curtin 03d0d045c8 staging: unisys: removed 'visor_device.devnodes' field
The 'visor_device.devnodes' field was used for displaying driver version
information through the devmajorminor sysfs attribute, which has recently
been removed, rendering the field unnecessary.

Signed-off-by: Alexander Curtin <alexander.curtin@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-30 18:28:32 -07:00
Alexander Curtin 240f7ec1f4 staging: unisys: removed unused visor_device.type field
The visor_device.type field was included when preparing to remove
the device_info struct. However, it's not used at all, and was already
redundant by the existence of the 'visor_device.channel_type_guid'
field.

Signed-off-by: Alexander Curtin <alexander.curtin@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-30 18:28:32 -07:00
Alexander Curtin 378d638a89 staging: unisys: include: removed unused 'visor_device.description'
The 'description' variable in visor_device was added in preparation for
removing the 'device_info' struct when the uislib files were removed.

That attribute is never accessed nor set, and the 'name' attribute
provides enough information to correctly identify the driver, it is not
needed.

Signed-off-by: Alexander Curtin <alexander.curtin@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-30 18:28:32 -07:00
Alexander Curtin a0fcb63586 staging: unisys: removed unused switch/port info from visorbus.h
The fields 'switch_no' and 'internal_port_no' were originally added to the
visor_device struct in preparation of removing the 'device_info' struct
in the now removed 'uislib' library. After the refactoring was complete,
these attributes are not referenced anywhere, and there are no plans to
use them.

Signed-off-by: Alexander Curtin <alexander.curtin@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-30 18:28:32 -07:00
Tim Sell b750b05939 staging: unisys: visorbus: remove unused sysfs attribute devmajorminor/*
The sysfs attribute directory at:

    /sys/bus/visorbus/devices/vbus<x>:dev<y>/devmajorminor/*

or

    /sys/devices/visorbus<x>/vbus<x>:dev<y>/devmajorminor/*

previously provided a location where a visorbus function driver could
publish information (for usermode use) about possibly-multiple major and
minor device numbers for character devices created for a each visorbus
device, using visorbus_registerdevnode().  This functionality is not
currently used, so it has been removed by this cset.

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Erik Arfvidson b0bc5da143 staging: unisys: visorbus.h fix block comment
This fixes last checkpatch warning:
WARNING: Block comments use a trailing */ on a separate line

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-17 14:25:36 -08:00
Neil Horman fdc792cd1b staging: unisys: visorchannel: Add peek function
According to unisys, the s_par hypervisor has a bug in which it never
triggers an interrupt.  That makes the visornic effectively a 2ms poll
loop.  In order to just have the rx thread shceduling a napi poll every
2ms, lets instead give it the chance to check the response queue for
data before we schedule.  This helper provides that functionality

Signed-off-by: Neil Horman <nhorman@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-03 17:45:02 -07:00
Tim Sell d15a65be55 staging: unisys: prevent faults processing messages
Prevent faults processing messages for devices that no driver has yet
registered to handle.

Previously, code of the form:

    drv = to_visor_driver(dev->device.driver);
    if (!drv)
        goto away;

was not having the desired intent, because to_visor_driver() was
essentially returning garbage if its argument was NULL.  The only existing
case of this is in initiate_chipset_device_pause_resume(), which is called
during IOVM service partition recovery.  We were thus faulting when IOVM
service partition recovery was initiated on a bus that had at least one
device for which no function driver had registered
(visorbus_register_visor_driver).

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 18:34:58 -07:00
Jes Sorensen 4239f82294 staging: unisys: Removed unused entries from struct visor_channeltype_descriptor
min_size/max_size aren't used anywhere, and they were just causing
headaches in the drivers being ported over to the new interfaces.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:36:43 -07:00
Don Zickus a298bc0b59 staging: unisys: Convert device creation to use visor_device
This patch removes the legacy dev_info struct and instead creates
and passes around a traditional struct device.

This allows us to remove a lot of the various look up code and
removes the doubt if the struct exists or not.

Half of the churn is just the conversion of visorchipset_device_info
to visor_device.  Various cleanups include re-arranging the failure
paths to make more sense.

Pay attention to the create_visor_device function.  This had a lot of
churn to simplify everything.

Lots of functions disappeared because they are not needed any more.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:36:43 -07:00
Don Zickus d32517e392 staging: unisys: Convert bus creation to use visor_device
This patch removes the legacy bus_info struct and instead creates
and passes around a traditional struct device.

This allows us to remove a lot of the various look up code and
removes the doubt if the struct exists or not.

Half of the churn is just the conversion of visorchipset_bus_info
to visor_device.  Various cleanups include re-arranging the failure
paths to make more sense.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:36:43 -07:00
Don Zickus 65bd6e4607 staging: unisys: Do not use 0 as the default bus root device number
I used 0 as the device id for the bus root, neglecting the fact that
device 0 is a valid id in Unisys's configuration.  Modify this to
use UINT_MAX instead as a unique number.

As fallout from this change it was noticed the bus_no and dev_no was not
defined the same way consistently.  Fix visorbus.h to use u32 there.  Fix
the resulting printk warning too.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:36:43 -07:00
Don Zickus b4b598fdde staging: unisys: Convert device functions to pass dev_info pointer around
Most device functions pass bus_no and dev_no around and then do a lookup
inside each function to find the dev_info struct.  Instead just pass the
pointer.

This prepares us for a later conversion to using visor device.

No real technical changes.  Just function header changes and little
cleanups as a result.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-24 13:30:31 -07:00
Don Zickus 4f6d8a9783 staging: unisys: Add a function to set the clientpartition
This patch is an attempt to help hide the channel info behind
accessory functions.  I was trying to keep visorchannel as private
as possible.

The only function missing that seemed to be needed for now was
the ability to set the clientpartition.  So I expose that here.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-24 13:28:56 -07:00
Don Zickus 1fb3016eab staging: unisys: Prep for removing 'info' structs
The visorbus driver has three _info structs lying around
(device, bus, channel) that store subsets of info from the
bigger structs.

Having these structs around make resource handling very difficult
and more complicated than it needs to be.  Use the device
infrastructure and instead pass 'struct visor_device' all
over the place.

In order to do that 'struct visor_device' needs to get smarter.
This patch adds the pieces to prep for it.  The new elements
will be used in later patches.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-24 13:28:55 -07:00
Don Zickus 795731627c staging: unisys: Clean up device sysfs attributes
Properly hook into the struct device groups element.  This allows the
core infrastructure to manage the files instead of the bus layer.  And
makes the code easier to read.

I didn't clean up the _show functions just modified them a bit to handle
the different args for now and to prevent a build warning.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-24 13:28:55 -07:00
Jes Sorensen df94247a89 staging: unisys: visorchannel: Make visorchannel_create take a gfp_t
This allows the caller to specify an appropriate GFP flag instead of
hardcoding the lowest common denominator.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 15:27:32 +02:00
Erik Arfvidson c0a14641b1 staging: unisys: remove timskmod.h and procobjecttree.h
This patch move the needed linux include files from timskmod.h
to the files that calls those include. Also procobjecttree.h is
removed since it is dead code.

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 15:27:32 +02:00
Erik Arfvidson d5b3f1dcce staging: unisys: move timskmod.h functionality
This patch removes all timksmod.h pound defines. It also removes
visorkmodutils.c since it no longer has any use by itself. Since
visorkmodutils.c is no longer needed the module_init for
visorchipset.c is modified to call visorutil_spar_detect directly
instead of the extern variable in timksmod.h.

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 15:27:31 +02:00
Prarit Bhargava 779d0752bc staging: unisys: remove BOOL,TRUE,FALSE definitions
These shouldn't be defined in the code and can be replaced with the
standard bool, true, and false usage that the kernel uses.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 15:27:30 +02:00
Jes Sorensen 434cbf28b5 staging: unisys: Finally remove the last remnants of memregion
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 15:27:30 +02:00
Jes Sorensen 8b8fc28b6b staging: unisys: Eliminate unused visorchannel_dump_section()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 15:26:04 +02:00
Jes Sorensen 5f0dc9b1f7 staging: unisys: visorchannel_get_memregion() isn't used
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 15:26:04 +02:00
Jes Sorensen dd5f93851c staging: unisys: visorchannel: visorchannel_create_overlap() is never used
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 15:26:02 +02:00
Don Zickus 9bfc2c796b staging: unisys: Move visorbus.h to public namespace
Turn visorbus.h into a public header that all visor* drivers will
include.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 15:25:58 +02:00
Renamed from drivers/staging/unisys/visorbus/visorbus.h (Browse further)