staging: unisys: cleanup visorbus_private.h
visorbus_private.h contains code that is called from visorbus into the visorchipset code. Now that the visorchipset code has been brought into the visorbus directory, many of the declarations are not necessary and can be cleaned up. TODO: PARSER_WHICH_STRING enum only has one member used (PARSERSTRING_NAME). TODO: crash_obj_type appears to be unnecessary in the overall scheme of code. 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>
This commit is contained in:
parent
c79b28f733
commit
2ee0deec49
|
@ -26,32 +26,7 @@
|
|||
#include "vbusdeviceinfo.h"
|
||||
#include "vbushelper.h"
|
||||
|
||||
#define VISORCHIPSET_MMAP_CONTROLCHANOFFSET 0x00000000
|
||||
|
||||
/** Describes the state from the perspective of which controlvm messages have
|
||||
* been received for a bus or device.
|
||||
*/
|
||||
|
||||
enum PARSER_WHICH_STRING {
|
||||
PARSERSTRING_INITIATOR,
|
||||
PARSERSTRING_TARGET,
|
||||
PARSERSTRING_CONNECTION,
|
||||
PARSERSTRING_NAME,
|
||||
};
|
||||
|
||||
struct visorchannel;
|
||||
struct parser_context *parser_init(u64 addr, u32 bytes, bool isLocal,
|
||||
bool *tryAgain);
|
||||
struct parser_context *parser_init_byte_stream(u64 addr, u32 bytes, bool local,
|
||||
bool *retry);
|
||||
void parser_param_start(struct parser_context *ctx,
|
||||
PARSER_WHICH_STRING which_string);
|
||||
void *parser_param_get(struct parser_context *ctx, char *nam, int namesize);
|
||||
void *parser_string_get(struct parser_context *ctx);
|
||||
uuid_le parser_id_get(struct parser_context *ctx);
|
||||
char *parser_simpleString_get(struct parser_context *ctx);
|
||||
void *parser_byte_stream_get(struct parser_context *ctx, unsigned long *nbytes);
|
||||
void parser_done(struct parser_context *ctx);
|
||||
|
||||
struct visorchipset_state {
|
||||
u32 created:1;
|
||||
|
@ -75,11 +50,6 @@ enum visorchipset_addresstype {
|
|||
ADDRTYPE_LOCALTEST,
|
||||
};
|
||||
|
||||
enum crash_obj_type {
|
||||
CRASH_DEV,
|
||||
CRASH_BUS,
|
||||
};
|
||||
|
||||
/** Attributes for a particular Supervisor channel.
|
||||
*/
|
||||
struct visorchipset_channel_info {
|
||||
|
@ -167,18 +137,6 @@ struct visorchipset_busdev_responders {
|
|||
void (*device_resume)(u32 bus_no, u32 dev_no, int response);
|
||||
};
|
||||
|
||||
/** Register functions (in the bus driver) to get called by visorchipset
|
||||
* whenever a bus or device appears for which this service partition is
|
||||
* to be the server for. visorchipset will fill in <responders>, to
|
||||
* indicate functions the bus driver should call to indicate message
|
||||
* responses.
|
||||
*/
|
||||
void
|
||||
visorchipset_register_busdev_client(
|
||||
struct visorchipset_busdev_notifiers *notifiers,
|
||||
struct visorchipset_busdev_responders *responders,
|
||||
struct ultra_vbus_deviceinfo *driver_info);
|
||||
|
||||
/** Register functions (in the bus driver) to get called by visorchipset
|
||||
* whenever a bus or device appears for which this service partition is
|
||||
* to be the client for. visorchipset will fill in <responders>, to
|
||||
|
@ -191,26 +149,11 @@ visorchipset_register_busdev_server(
|
|||
struct visorchipset_busdev_responders *responders,
|
||||
struct ultra_vbus_deviceinfo *driver_info);
|
||||
|
||||
void visorchipset_device_pause_response(u32 bus_no, u32 dev_no, int response);
|
||||
|
||||
bool visorchipset_get_bus_info(u32 bus_no,
|
||||
struct visorchipset_bus_info *bus_info);
|
||||
bool visorchipset_get_device_info(u32 bus_no, u32 dev_no,
|
||||
struct visorchipset_device_info *dev_info);
|
||||
bool visorchipset_set_bus_context(u32 bus_no, void *context);
|
||||
bool visorchipset_set_device_context(u32 bus_no, u32 dev_no, void *context);
|
||||
int visorchipset_chipset_ready(void);
|
||||
int visorchipset_chipset_selftest(void);
|
||||
int visorchipset_chipset_notready(void);
|
||||
void visorchipset_save_message(struct controlvm_message *msg,
|
||||
enum crash_obj_type type);
|
||||
void *visorchipset_cache_alloc(struct kmem_cache *pool,
|
||||
bool ok_to_block, char *fn, int ln);
|
||||
void visorchipset_cache_free(struct kmem_cache *pool, void *p,
|
||||
char *fn, int ln);
|
||||
int visorchipset_file_init(dev_t majorDev,
|
||||
struct visorchannel **pControlVm_channel);
|
||||
void visorchipset_file_cleanup(dev_t major_dev);
|
||||
|
||||
/* visorbus init and exit functions */
|
||||
int __init visorbus_init(void);
|
||||
|
|
|
@ -49,6 +49,9 @@
|
|||
#define POLLJIFFIES_CONTROLVMCHANNEL_SLOW 100
|
||||
|
||||
#define MAX_CONTROLVM_PAYLOAD_BYTES (1024*128)
|
||||
|
||||
#define VISORCHIPSET_MMAP_CONTROLCHANOFFSET 0x00000000
|
||||
|
||||
/*
|
||||
* Module parameters
|
||||
*/
|
||||
|
@ -261,6 +264,9 @@ static void device_create_response(u32 bus_no, u32 dev_no, int response);
|
|||
static void device_destroy_response(u32 bus_no, u32 dev_no, int response);
|
||||
static void device_resume_response(u32 bus_no, u32 dev_no, int response);
|
||||
|
||||
static void visorchipset_device_pause_response(u32 bus_no, u32 dev_no,
|
||||
int response);
|
||||
|
||||
static struct visorchipset_busdev_responders busdev_responders = {
|
||||
.bus_create = bus_create_response,
|
||||
.bus_destroy = bus_destroy_response,
|
||||
|
@ -382,6 +388,8 @@ static void controlvm_respond_physdev_changestate(
|
|||
struct spar_segment_state state);
|
||||
|
||||
|
||||
static void parser_done(struct parser_context *ctx);
|
||||
|
||||
static struct parser_context *
|
||||
parser_init_guts(u64 addr, u32 bytes, bool local,
|
||||
bool standard_payload_header, bool *retry)
|
||||
|
@ -527,8 +535,20 @@ parser_id_get(struct parser_context *ctx)
|
|||
return phdr->id;
|
||||
}
|
||||
|
||||
/** Describes the state from the perspective of which controlvm messages have
|
||||
* been received for a bus or device.
|
||||
*/
|
||||
|
||||
enum PARSER_WHICH_STRING {
|
||||
PARSERSTRING_INITIATOR,
|
||||
PARSERSTRING_TARGET,
|
||||
PARSERSTRING_CONNECTION,
|
||||
PARSERSTRING_NAME, /* TODO: only PARSERSTRING_NAME is used ? */
|
||||
};
|
||||
|
||||
void
|
||||
parser_param_start(struct parser_context *ctx, PARSER_WHICH_STRING which_string)
|
||||
parser_param_start(struct parser_context *ctx,
|
||||
enum PARSER_WHICH_STRING which_string)
|
||||
{
|
||||
struct spar_controlvm_parameters_header *phdr = NULL;
|
||||
|
||||
|
@ -1032,6 +1052,12 @@ visorchipset_register_busdev_server(
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(visorchipset_register_busdev_server);
|
||||
|
||||
/** Register functions (in the bus driver) to get called by visorchipset
|
||||
* whenever a bus or device appears for which this service partition is
|
||||
* to be the server for. visorchipset will fill in <responders>, to
|
||||
* indicate functions the bus driver should call to indicate message
|
||||
* responses.
|
||||
*/
|
||||
void
|
||||
visorchipset_register_busdev_client(
|
||||
struct visorchipset_busdev_notifiers *notifiers,
|
||||
|
@ -1175,6 +1201,11 @@ static void controlvm_respond_physdev_changestate(
|
|||
}
|
||||
}
|
||||
|
||||
enum crash_obj_type {
|
||||
CRASH_DEV,
|
||||
CRASH_BUS,
|
||||
};
|
||||
|
||||
void
|
||||
visorchipset_save_message(struct controlvm_message *msg,
|
||||
enum crash_obj_type type)
|
||||
|
@ -1218,7 +1249,7 @@ visorchipset_save_message(struct controlvm_message *msg,
|
|||
POSTCODE_SEVERITY_ERR);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
} else { /* CRASH_DEV */
|
||||
if (visorchannel_write(controlvm_channel,
|
||||
crash_msg_offset +
|
||||
sizeof(struct controlvm_message), msg,
|
||||
|
|
Loading…
Reference in New Issue