Commit c79d8451 authored by Benjamin Romer's avatar Benjamin Romer Committed by Greg Kroah-Hartman

staging: unisys: remove remaining proc directory entries

Finally, remove /proc/uislib and all remaining, redundant entries created
under /proc/uislib/vbus.
Signed-off-by: default avatarBenjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7ec96720
...@@ -89,12 +89,6 @@ static DEFINE_SEMAPHORE(Lock_Polling_Device_Channels); /* unlocked */ ...@@ -89,12 +89,6 @@ static DEFINE_SEMAPHORE(Lock_Polling_Device_Channels); /* unlocked */
static DECLARE_WAIT_QUEUE_HEAD(Wakeup_Polling_Device_Channels); static DECLARE_WAIT_QUEUE_HEAD(Wakeup_Polling_Device_Channels);
static int Go_Polling_Device_Channels; static int Go_Polling_Device_Channels;
static struct proc_dir_entry *uislib_proc_dir;
static struct proc_dir_entry *uislib_proc_vbus_dir;
#define DIR_PROC_ENTRY "uislib"
#define DIR_VBUS_PROC_ENTRY "vbus"
#define CALLHOME_PROC_ENTRY_FN "callhome" #define CALLHOME_PROC_ENTRY_FN "callhome"
#define CALLHOME_THROTTLED_PROC_ENTRY_FN "callhome_throttled" #define CALLHOME_THROTTLED_PROC_ENTRY_FN "callhome_throttled"
...@@ -119,22 +113,6 @@ static unsigned long long cycles_before_wait, wait_cycles; ...@@ -119,22 +113,6 @@ static unsigned long long cycles_before_wait, wait_cycles;
/* local functions */ /* local functions */
/*****************************************************/ /*****************************************************/
static int proc_info_vbus_show(struct seq_file *m, void *v);
static int
proc_info_vbus_open(struct inode *inode, struct file *filp)
{
/* proc_info_vbus_show will grab this from seq_file.private: */
struct bus_info *bus = PDE_DATA(inode);
return single_open(filp, proc_info_vbus_show, bus);
}
static const struct file_operations proc_info_vbus_fops = {
.open = proc_info_vbus_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
};
static ssize_t info_debugfs_read(struct file *file, char __user *buf, static ssize_t info_debugfs_read(struct file *file, char __user *buf,
size_t len, loff_t *offset); size_t len, loff_t *offset);
static const struct file_operations debugfs_info_fops = { static const struct file_operations debugfs_info_fops = {
...@@ -150,17 +128,6 @@ init_msg_header(CONTROLVM_MESSAGE *msg, U32 id, uint rsp, uint svr) ...@@ -150,17 +128,6 @@ init_msg_header(CONTROLVM_MESSAGE *msg, U32 id, uint rsp, uint svr)
msg->hdr.Flags.server = svr; msg->hdr.Flags.server = svr;
} }
static void
create_bus_proc_entries(struct bus_info *bus)
{
bus->proc_dir = proc_mkdir(bus->name, uislib_proc_vbus_dir);
if (!bus->proc_dir) {
LOGERR("failed to create /proc/uislib/vbus/%s directory",
bus->name);
return;
}
}
static __iomem void * static __iomem void *
init_vbus_channel(U64 channelAddr, U32 channelBytes, int isServer) init_vbus_channel(U64 channelAddr, U32 channelBytes, int isServer)
{ {
...@@ -296,7 +263,6 @@ create_bus(CONTROLVM_MESSAGE *msg, char *buf) ...@@ -296,7 +263,6 @@ create_bus(CONTROLVM_MESSAGE *msg, char *buf)
CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_CALLBACK_ERROR; CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_CALLBACK_ERROR;
} }
} }
create_bus_proc_entries(bus);
/* add bus at the head of our list */ /* add bus at the head of our list */
write_lock(&BusListLock); write_lock(&BusListLock);
...@@ -373,14 +339,6 @@ destroy_bus(CONTROLVM_MESSAGE *msg, char *buf) ...@@ -373,14 +339,6 @@ destroy_bus(CONTROLVM_MESSAGE *msg, char *buf)
read_unlock(&BusListLock); read_unlock(&BusListLock);
return CONTROLVM_RESP_ERROR_ALREADY_DONE; return CONTROLVM_RESP_ERROR_ALREADY_DONE;
} }
if (bus->proc_info) {
remove_proc_entry("info", bus->proc_dir);
bus->proc_info = NULL;
}
if (bus->proc_dir) {
remove_proc_entry(bus->name, uislib_proc_vbus_dir);
bus->proc_dir = NULL;
}
if (bus->pBusChannel) { if (bus->pBusChannel) {
uislib_iounmap(bus->pBusChannel); uislib_iounmap(bus->pBusChannel);
bus->pBusChannel = NULL; bus->pBusChannel = NULL;
...@@ -1338,44 +1296,6 @@ info_debugfs_read(struct file *file, char __user *buf, ...@@ -1338,44 +1296,6 @@ info_debugfs_read(struct file *file, char __user *buf,
ProcReadBuffer, totalBytes); ProcReadBuffer, totalBytes);
} }
/* proc/uislib/vbus/<x>/info */
static int
proc_info_vbus_show(struct seq_file *m, void *v)
{
struct bus_info *bus = m->private;
int i, devInfoCount, x;
char buf[999];
if (bus == NULL)
return 0;
seq_printf(m, "Client device / client driver info for %s partition (vbus #%d):\n",
bus->partitionName, bus->busNo);
if ((bus->busChannelBytes == 0) || (bus->pBusChannel == NULL))
return 0;
devInfoCount =
(bus->busChannelBytes -
sizeof(ULTRA_VBUS_CHANNEL_PROTOCOL)) /
sizeof(ULTRA_VBUS_DEVICEINFO);
x = VBUSCHANNEL_devInfoToStringBuffer(&bus->pBusChannel->ChpInfo, buf,
sizeof(buf) - 1, -1);
buf[x] = '\0';
seq_printf(m, "%s", buf);
x = VBUSCHANNEL_devInfoToStringBuffer(&bus->pBusChannel->BusInfo,
buf, sizeof(buf) - 1, -1);
buf[x] = '\0';
seq_printf(m, "%s", buf);
for (i = 0; i < devInfoCount; i++) {
x = VBUSCHANNEL_devInfoToStringBuffer(&bus->pBusChannel->
DevInfo[i], buf,
sizeof(buf) - 1, i);
if (x > 0) {
buf[x] = '\0';
seq_printf(m, "%s", buf);
}
}
return 0;
}
static struct device_info * static struct device_info *
find_dev(U32 busNo, U32 devNo) find_dev(U32 busNo, U32 devNo)
{ {
...@@ -1666,14 +1586,7 @@ uislib_mod_init(void) ...@@ -1666,14 +1586,7 @@ uislib_mod_init(void)
* then map this physical address to a virtual address. */ * then map this physical address to a virtual address. */
POSTCODE_LINUX_2(DRIVER_ENTRY_PC, POSTCODE_SEVERITY_INFO); POSTCODE_LINUX_2(DRIVER_ENTRY_PC, POSTCODE_SEVERITY_INFO);
/* create the proc entries for the channels */
uislib_proc_dir = proc_mkdir(DIR_PROC_ENTRY, NULL);
/* (e.g., for /proc/uislib/vbus/<x>/info) */
uislib_proc_vbus_dir = proc_mkdir(DIR_VBUS_PROC_ENTRY, uislib_proc_dir);
dir_debugfs = debugfs_create_dir(DIR_DEBUGFS_ENTRY, NULL); dir_debugfs = debugfs_create_dir(DIR_DEBUGFS_ENTRY, NULL);
if (dir_debugfs) { if (dir_debugfs) {
info_debugfs_entry = debugfs_create_file( info_debugfs_entry = debugfs_create_file(
INFO_DEBUGFS_ENTRY_FN, 0444, dir_debugfs, NULL, INFO_DEBUGFS_ENTRY_FN, 0444, dir_debugfs, NULL,
...@@ -1699,11 +1612,6 @@ uislib_mod_init(void) ...@@ -1699,11 +1612,6 @@ uislib_mod_init(void)
static void __exit static void __exit
uislib_mod_exit(void) uislib_mod_exit(void)
{ {
if (uislib_proc_vbus_dir)
remove_proc_entry(DIR_VBUS_PROC_ENTRY, uislib_proc_dir);
if (uislib_proc_dir)
remove_proc_entry(DIR_PROC_ENTRY, NULL);
if (ProcReadBuffer) { if (ProcReadBuffer) {
vfree(ProcReadBuffer); vfree(ProcReadBuffer);
ProcReadBuffer = NULL; ProcReadBuffer = NULL;
......
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