Commit 1fb3016e authored by Don Zickus's avatar Don Zickus Committed by Greg Kroah-Hartman

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: default avatarDon Zickus <dzickus@redhat.com>
Signed-off-by: default avatarBenjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 79573162
...@@ -40,9 +40,18 @@ ...@@ -40,9 +40,18 @@
struct visor_driver; struct visor_driver;
struct visor_device; struct visor_device;
extern struct bus_type visorbus_type;
typedef void (*visorbus_state_complete_func) (struct visor_device *dev, typedef void (*visorbus_state_complete_func) (struct visor_device *dev,
int status); int status);
struct visorchipset_state {
u32 created:1;
u32 attached:1;
u32 configured:1;
u32 running:1;
/* Add new fields above. */
/* Remaining bits in this 32-bit word are unused. */
};
/** This struct describes a specific Supervisor channel, by providing its /** This struct describes a specific Supervisor channel, by providing its
* GUID, name, and sizes. * GUID, name, and sizes.
...@@ -141,6 +150,16 @@ struct visor_device { ...@@ -141,6 +150,16 @@ struct visor_device {
bool resuming; bool resuming;
unsigned long chipset_bus_no; unsigned long chipset_bus_no;
unsigned long chipset_dev_no; unsigned long chipset_dev_no;
struct visorchipset_state state;
uuid_le type;
uuid_le inst;
u8 *name;
u8 *description;
struct controlvm_message_header *pending_msg_hdr;
void *vbus_hdr_info;
u32 switch_no;
u32 internal_port_no;
uuid_le partition_uuid;
}; };
#define to_visor_device(x) container_of(x, struct visor_device, device) #define to_visor_device(x) container_of(x, struct visor_device, device)
......
...@@ -88,7 +88,7 @@ const struct attribute_group *visorbus_bus_groups[] = { ...@@ -88,7 +88,7 @@ const struct attribute_group *visorbus_bus_groups[] = {
/** This describes the TYPE of bus. /** This describes the TYPE of bus.
* (Don't confuse this with an INSTANCE of the bus.) * (Don't confuse this with an INSTANCE of the bus.)
*/ */
static struct bus_type visorbus_type = { struct bus_type visorbus_type = {
.name = "visorbus", .name = "visorbus",
.match = visorbus_match, .match = visorbus_match,
.uevent = visorbus_uevent, .uevent = visorbus_uevent,
......
...@@ -27,15 +27,6 @@ ...@@ -27,15 +27,6 @@
struct visorchannel; struct visorchannel;
struct visorchipset_state {
u32 created:1;
u32 attached:1;
u32 configured:1;
u32 running:1;
/* Add new fields above. */
/* Remaining bits in this 32-bit word are unused. */
};
enum visorchipset_addresstype { enum visorchipset_addresstype {
/** address is guest physical, but outside of the physical memory /** address is guest physical, but outside of the physical memory
* region that is controlled by the running OS (this is the normal * region that is controlled by the running OS (this is the normal
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include "version.h" #include "version.h"
#include "visorbus.h" #include "visorbus.h"
#include <linux/uuid.h> #include <linux/uuid.h>
#include "controlvmchannel.h"
#define MYDRVNAME "visorchannel" #define MYDRVNAME "visorchannel"
...@@ -44,6 +45,9 @@ struct visorchannel { ...@@ -44,6 +45,9 @@ struct visorchannel {
struct signal_queue_header event_queue; struct signal_queue_header event_queue;
struct signal_queue_header ack_queue; struct signal_queue_header ack_queue;
} safe_uis_queue; } safe_uis_queue;
struct irq_info intr;
uuid_le type;
uuid_le inst;
}; };
/* Creates the struct visorchannel abstraction for a data area in memory, /* Creates the struct visorchannel abstraction for a data area in memory,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment