Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: unisys: visorbus: remove unused chipsetready information

Chipsetready sysfs entry is not used by any guests or service
partitions.

remove unused g_chipset_msg_hdr our service partition

remove unused chipsetready_store and driver attributes:
chipsetready_store()
visorchipset_guest_attrs
visorchipset_guest_groupw

remove unused chipsets_events:
check_chipset_events()
clear_chipset_events()
visorchipset_holdchipsetready

remove sysfs documentation dealing with chipsetready

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Erik Arfvidson and committed by
Greg Kroah-Hartman
260d8992 39b92809

+1 -102
-14
drivers/staging/unisys/Documentation/ABI/sysfs-platform-visorchipset
··· 50 50 commission the guest. 51 51 Users: sparmaintainer@unisys.com 52 52 53 - What: guest/chipsetready 54 - Date: 7/18/2014 55 - KernelVersion: TBD 56 - Contact: sparmaintainer@unisys.com 57 - Description: This entry is used by Unisys application software on the guest 58 - to acknowledge completion of specific events for integration 59 - purposes, but these acknowledgements are not required for the 60 - guest to operate correctly. The interface accepts one of two 61 - strings: MODULES_LOADED to indicate that the s-Par driver 62 - modules have been loaded successfully, or CALLHOMEDISK_MOUNTED, 63 - which indicates that the disk used to support call home services 64 - has been successfully mounted. 65 - Users: sparmaintainer@unisys.com 66 - 67 53 What: parahotplug/deviceenabled 68 54 Date: 7/18/2014 69 55 KernelVersion: TBD
+1 -88
drivers/staging/unisys/visorbus/visorchipset.c
··· 59 59 */ 60 60 static int visorchipset_major; 61 61 static int visorchipset_visorbusregwait = 1; /* default is on */ 62 - static int visorchipset_holdchipsetready; 63 62 static unsigned long controlvm_payload_bytes_buffered; 64 63 static u32 dump_vhba_bus; 65 64 ··· 89 90 static unsigned long most_recent_message_jiffies; 90 91 static int visorbusregistered; 91 92 92 - #define MAX_CHIPSET_EVENTS 2 93 - static u8 chipset_events[MAX_CHIPSET_EVENTS] = { 0, 0 }; 94 - 95 93 struct parser_context { 96 94 unsigned long allocbytes; 97 95 unsigned long param_bytes; ··· 103 107 104 108 static struct cdev file_cdev; 105 109 static struct visorchannel **file_controlvm_channel; 106 - static struct controlvm_message_header g_chipset_msg_hdr; 107 110 static struct controlvm_message_packet g_devicechangestate_packet; 108 111 109 112 static LIST_HEAD(bus_info_list); ··· 269 274 const char *buf, size_t count); 270 275 static DEVICE_ATTR_RW(remaining_steps); 271 276 272 - static ssize_t chipsetready_store(struct device *dev, 273 - struct device_attribute *attr, 274 - const char *buf, size_t count); 275 - static DEVICE_ATTR_WO(chipsetready); 276 - 277 277 static ssize_t devicedisabled_store(struct device *dev, 278 278 struct device_attribute *attr, 279 279 const char *buf, size_t count); ··· 293 303 .attrs = visorchipset_install_attrs 294 304 }; 295 305 296 - static struct attribute *visorchipset_guest_attrs[] = { 297 - &dev_attr_chipsetready.attr, 298 - NULL 299 - }; 300 - 301 - static struct attribute_group visorchipset_guest_group = { 302 - .name = "guest", 303 - .attrs = visorchipset_guest_attrs 304 - }; 305 - 306 306 static struct attribute *visorchipset_parahotplug_attrs[] = { 307 307 &dev_attr_devicedisabled.attr, 308 308 &dev_attr_deviceenabled.attr, ··· 306 326 307 327 static const struct attribute_group *visorchipset_dev_groups[] = { 308 328 &visorchipset_install_group, 309 - &visorchipset_guest_group, 310 329 &visorchipset_parahotplug_group, 311 330 NULL 312 331 }; ··· 690 711 return vdev; 691 712 } 692 713 EXPORT_SYMBOL(visorbus_get_device_by_id); 693 - 694 - static u8 695 - check_chipset_events(void) 696 - { 697 - int i; 698 - u8 send_msg = 1; 699 - /* Check events to determine if response should be sent */ 700 - for (i = 0; i < MAX_CHIPSET_EVENTS; i++) 701 - send_msg &= chipset_events[i]; 702 - return send_msg; 703 - } 704 - 705 - static void 706 - clear_chipset_events(void) 707 - { 708 - int i; 709 - /* Clear chipset_events */ 710 - for (i = 0; i < MAX_CHIPSET_EVENTS; i++) 711 - chipset_events[i] = 0; 712 - } 713 714 714 715 void 715 716 visorchipset_register_busdev( ··· 1416 1457 1417 1458 if (rc != CONTROLVM_RESP_SUCCESS) 1418 1459 rc = -rc; 1419 - if (msg_hdr->flags.response_expected && !visorchipset_holdchipsetready) 1460 + if (msg_hdr->flags.response_expected) 1420 1461 controlvm_respond(msg_hdr, rc); 1421 - if (msg_hdr->flags.response_expected && visorchipset_holdchipsetready) { 1422 - /* Send CHIPSET_READY response when all modules have been loaded 1423 - * and disks mounted for the partition 1424 - */ 1425 - g_chipset_msg_hdr = *msg_hdr; 1426 - } 1427 1462 } 1428 1463 1429 1464 static void ··· 1812 1859 if (visorchipset_visorbusregwait && !visorbusregistered) 1813 1860 goto cleanup; 1814 1861 1815 - /* Check events to determine if response to CHIPSET_READY 1816 - * should be sent 1817 - */ 1818 - if (visorchipset_holdchipsetready && 1819 - (g_chipset_msg_hdr.id != CONTROLVM_INVALID)) { 1820 - if (check_chipset_events() == 1) { 1821 - controlvm_respond(&g_chipset_msg_hdr, 0); 1822 - clear_chipset_events(); 1823 - memset(&g_chipset_msg_hdr, 0, 1824 - sizeof(struct controlvm_message_header)); 1825 - } 1826 - } 1827 - 1828 1862 while (visorchannel_signalremove(controlvm_channel, 1829 1863 CONTROLVM_QUEUE_RESPONSE, 1830 1864 &inmsg)) ··· 2033 2093 dev_info->pending_msg_hdr = NULL; 2034 2094 } 2035 2095 2036 - static ssize_t chipsetready_store(struct device *dev, 2037 - struct device_attribute *attr, 2038 - const char *buf, size_t count) 2039 - { 2040 - char msgtype[64]; 2041 - 2042 - if (sscanf(buf, "%63s", msgtype) != 1) 2043 - return -EINVAL; 2044 - 2045 - if (!strcmp(msgtype, "CALLHOMEDISK_MOUNTED")) { 2046 - chipset_events[0] = 1; 2047 - return count; 2048 - } else if (!strcmp(msgtype, "MODULES_LOADED")) { 2049 - chipset_events[1] = 1; 2050 - return count; 2051 - } 2052 - return -EINVAL; 2053 - } 2054 - 2055 2096 /* The parahotplug/devicedisabled interface gets called by our support script 2056 2097 * when an SR-IOV device has been shut down. The ID is passed to the script 2057 2098 * and then passed back when the device has been removed. ··· 2228 2307 if (err < 0) 2229 2308 goto error_destroy_payload; 2230 2309 2231 - memset(&g_chipset_msg_hdr, 0, sizeof(struct controlvm_message_header)); 2232 - 2233 2310 /* if booting in a crash kernel */ 2234 2311 if (is_kdump_kernel()) 2235 2312 INIT_DELAYED_WORK(&periodic_controlvm_work, ··· 2281 2362 2282 2363 cancel_delayed_work_sync(&periodic_controlvm_work); 2283 2364 destroy_controlvm_payload_info(&controlvm_payload_info); 2284 - 2285 - memset(&g_chipset_msg_hdr, 0, sizeof(struct controlvm_message_header)); 2286 2365 2287 2366 visorchannel_destroy(controlvm_channel); 2288 2367 ··· 2350 2433 module_param_named(visorbusregwait, visorchipset_visorbusregwait, int, S_IRUGO); 2351 2434 MODULE_PARM_DESC(visorchipset_visorbusreqwait, 2352 2435 "1 to have the module wait for the visor bus to register"); 2353 - module_param_named(holdchipsetready, visorchipset_holdchipsetready, 2354 - int, S_IRUGO); 2355 - MODULE_PARM_DESC(visorchipset_holdchipsetready, 2356 - "1 to hold response to CHIPSET_READY"); 2357 2436 2358 2437 module_init(init_unisys); 2359 2438 module_exit(exit_unisys);