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

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'for-linus-6.10-1' of https://github.com/cminyard/linux-ipmi

Pull ipmi updates from Corey Minyard:
"Mostly updates for deprecated interfaces, platform.remove and
converting from a tasklet to a BH workqueue.

Also use HAS_IOPORT for disabling inb()/outb()"

* tag 'for-linus-6.10-1' of https://github.com/cminyard/linux-ipmi:
ipmi: kcs_bmc_npcm7xx: Convert to platform remove callback returning void
ipmi: kcs_bmc_aspeed: Convert to platform remove callback returning void
ipmi: ipmi_ssif: Convert to platform remove callback returning void
ipmi: ipmi_si_platform: Convert to platform remove callback returning void
ipmi: ipmi_powernv: Convert to platform remove callback returning void
ipmi: bt-bmc: Convert to platform remove callback returning void
char: ipmi: handle HAS_IOPORT dependencies
ipmi: Convert from tasklet to BH workqueue

+35 -45
+4 -7
drivers/char/ipmi/Makefile
··· 5 5 6 6 ipmi_si-y := ipmi_si_intf.o ipmi_kcs_sm.o ipmi_smic_sm.o ipmi_bt_sm.o \ 7 7 ipmi_si_hotmod.o ipmi_si_hardcode.o ipmi_si_platform.o \ 8 - ipmi_si_port_io.o ipmi_si_mem_io.o 9 - ifdef CONFIG_PCI 10 - ipmi_si-y += ipmi_si_pci.o 11 - endif 12 - ifdef CONFIG_PARISC 13 - ipmi_si-y += ipmi_si_parisc.o 14 - endif 8 + ipmi_si_mem_io.o 9 + ipmi_si-$(CONFIG_HAS_IOPORT) += ipmi_si_port_io.o 10 + ipmi_si-$(CONFIG_PCI) += ipmi_si_pci.o 11 + ipmi_si-$(CONFIG_PARISC) += ipmi_si_parisc.o 15 12 16 13 obj-$(CONFIG_IPMI_HANDLER) += ipmi_msghandler.o 17 14 obj-$(CONFIG_IPMI_DEVICE_INTERFACE) += ipmi_devintf.o
+2 -3
drivers/char/ipmi/bt-bmc.c
··· 459 459 return 0; 460 460 } 461 461 462 - static int bt_bmc_remove(struct platform_device *pdev) 462 + static void bt_bmc_remove(struct platform_device *pdev) 463 463 { 464 464 struct bt_bmc *bt_bmc = dev_get_drvdata(&pdev->dev); 465 465 466 466 misc_deregister(&bt_bmc->miscdev); 467 467 if (bt_bmc->irq < 0) 468 468 del_timer_sync(&bt_bmc->poll_timer); 469 - return 0; 470 469 } 471 470 472 471 static const struct of_device_id bt_bmc_match[] = { ··· 481 482 .of_match_table = bt_bmc_match, 482 483 }, 483 484 .probe = bt_bmc_probe, 484 - .remove = bt_bmc_remove, 485 + .remove_new = bt_bmc_remove, 485 486 }; 486 487 487 488 module_platform_driver(bt_bmc_driver);
+14 -15
drivers/char/ipmi/ipmi_msghandler.c
··· 41 41 42 42 static struct ipmi_recv_msg *ipmi_alloc_recv_msg(void); 43 43 static int ipmi_init_msghandler(void); 44 - static void smi_recv_tasklet(struct tasklet_struct *t); 44 + static void smi_recv_work(struct work_struct *t); 45 45 static void handle_new_recv_msgs(struct ipmi_smi *intf); 46 46 static void need_waiter(struct ipmi_smi *intf); 47 47 static int handle_one_recv_msg(struct ipmi_smi *intf, ··· 498 498 /* 499 499 * Messages queued for delivery. If delivery fails (out of memory 500 500 * for instance), They will stay in here to be processed later in a 501 - * periodic timer interrupt. The tasklet is for handling received 501 + * periodic timer interrupt. The workqueue is for handling received 502 502 * messages directly from the handler. 503 503 */ 504 504 spinlock_t waiting_rcv_msgs_lock; 505 505 struct list_head waiting_rcv_msgs; 506 506 atomic_t watchdog_pretimeouts_to_deliver; 507 - struct tasklet_struct recv_tasklet; 507 + struct work_struct recv_work; 508 508 509 509 spinlock_t xmit_msgs_lock; 510 510 struct list_head xmit_msgs; ··· 704 704 struct cmd_rcvr *rcvr, *rcvr2; 705 705 struct list_head list; 706 706 707 - tasklet_kill(&intf->recv_tasklet); 707 + cancel_work_sync(&intf->recv_work); 708 708 709 709 free_smi_msg_list(&intf->waiting_rcv_msgs); 710 710 free_recv_msg_list(&intf->waiting_events); ··· 1319 1319 { 1320 1320 struct ipmi_user *user = container_of(ref, struct ipmi_user, refcount); 1321 1321 1322 - /* SRCU cleanup must happen in task context. */ 1322 + /* SRCU cleanup must happen in workqueue context. */ 1323 1323 queue_work(remove_work_wq, &user->remove_work); 1324 1324 } 1325 1325 ··· 3605 3605 intf->curr_seq = 0; 3606 3606 spin_lock_init(&intf->waiting_rcv_msgs_lock); 3607 3607 INIT_LIST_HEAD(&intf->waiting_rcv_msgs); 3608 - tasklet_setup(&intf->recv_tasklet, 3609 - smi_recv_tasklet); 3608 + INIT_WORK(&intf->recv_work, smi_recv_work); 3610 3609 atomic_set(&intf->watchdog_pretimeouts_to_deliver, 0); 3611 3610 spin_lock_init(&intf->xmit_msgs_lock); 3612 3611 INIT_LIST_HEAD(&intf->xmit_msgs); ··· 4778 4779 * To preserve message order, quit if we 4779 4780 * can't handle a message. Add the message 4780 4781 * back at the head, this is safe because this 4781 - * tasklet is the only thing that pulls the 4782 + * workqueue is the only thing that pulls the 4782 4783 * messages. 4783 4784 */ 4784 4785 list_add(&smi_msg->link, &intf->waiting_rcv_msgs); ··· 4811 4812 } 4812 4813 } 4813 4814 4814 - static void smi_recv_tasklet(struct tasklet_struct *t) 4815 + static void smi_recv_work(struct work_struct *t) 4815 4816 { 4816 4817 unsigned long flags = 0; /* keep us warning-free. */ 4817 - struct ipmi_smi *intf = from_tasklet(intf, t, recv_tasklet); 4818 + struct ipmi_smi *intf = from_work(intf, t, recv_work); 4818 4819 int run_to_completion = intf->run_to_completion; 4819 4820 struct ipmi_smi_msg *newmsg = NULL; 4820 4821 ··· 4865 4866 4866 4867 /* 4867 4868 * To preserve message order, we keep a queue and deliver from 4868 - * a tasklet. 4869 + * a workqueue. 4869 4870 */ 4870 4871 if (!run_to_completion) 4871 4872 spin_lock_irqsave(&intf->waiting_rcv_msgs_lock, flags); ··· 4886 4887 spin_unlock_irqrestore(&intf->xmit_msgs_lock, flags); 4887 4888 4888 4889 if (run_to_completion) 4889 - smi_recv_tasklet(&intf->recv_tasklet); 4890 + smi_recv_work(&intf->recv_work); 4890 4891 else 4891 - tasklet_schedule(&intf->recv_tasklet); 4892 + queue_work(system_bh_wq, &intf->recv_work); 4892 4893 } 4893 4894 EXPORT_SYMBOL(ipmi_smi_msg_received); 4894 4895 ··· 4898 4899 return; 4899 4900 4900 4901 atomic_set(&intf->watchdog_pretimeouts_to_deliver, 1); 4901 - tasklet_schedule(&intf->recv_tasklet); 4902 + queue_work(system_bh_wq, &intf->recv_work); 4902 4903 } 4903 4904 EXPORT_SYMBOL(ipmi_smi_watchdog_pretimeout); 4904 4905 ··· 5067 5068 flags); 5068 5069 } 5069 5070 5070 - tasklet_schedule(&intf->recv_tasklet); 5071 + queue_work(system_bh_wq, &intf->recv_work); 5071 5072 5072 5073 return need_timer; 5073 5074 }
+2 -4
drivers/char/ipmi/ipmi_powernv.c
··· 281 281 return rc; 282 282 } 283 283 284 - static int ipmi_powernv_remove(struct platform_device *pdev) 284 + static void ipmi_powernv_remove(struct platform_device *pdev) 285 285 { 286 286 struct ipmi_smi_powernv *smi = dev_get_drvdata(&pdev->dev); 287 287 288 288 ipmi_unregister_smi(smi->intf); 289 289 free_irq(smi->irq, smi); 290 290 irq_dispose_mapping(smi->irq); 291 - 292 - return 0; 293 291 } 294 292 295 293 static const struct of_device_id ipmi_powernv_match[] = { ··· 302 304 .of_match_table = ipmi_powernv_match, 303 305 }, 304 306 .probe = ipmi_powernv_probe, 305 - .remove = ipmi_powernv_remove, 307 + .remove_new = ipmi_powernv_remove, 306 308 }; 307 309 308 310
+2 -1
drivers/char/ipmi/ipmi_si_intf.c
··· 1882 1882 } 1883 1883 1884 1884 if (!io->io_setup) { 1885 - if (io->addr_space == IPMI_IO_ADDR_SPACE) { 1885 + if (IS_ENABLED(CONFIG_HAS_IOPORT) && 1886 + io->addr_space == IPMI_IO_ADDR_SPACE) { 1886 1887 io->io_setup = ipmi_si_port_setup; 1887 1888 } else if (io->addr_space == IPMI_MEM_ADDR_SPACE) { 1888 1889 io->io_setup = ipmi_si_mem_setup;
+3
drivers/char/ipmi/ipmi_si_pci.c
··· 97 97 } 98 98 99 99 if (pci_resource_flags(pdev, 0) & IORESOURCE_IO) { 100 + if (!IS_ENABLED(CONFIG_HAS_IOPORT)) 101 + return -ENXIO; 102 + 100 103 io.addr_space = IPMI_IO_ADDR_SPACE; 101 104 io.io_setup = ipmi_si_port_setup; 102 105 } else {
+2 -4
drivers/char/ipmi/ipmi_si_platform.c
··· 405 405 return platform_ipmi_probe(pdev); 406 406 } 407 407 408 - static int ipmi_remove(struct platform_device *pdev) 408 + static void ipmi_remove(struct platform_device *pdev) 409 409 { 410 410 ipmi_si_remove_by_dev(&pdev->dev); 411 - 412 - return 0; 413 411 } 414 412 415 413 static int pdev_match_name(struct device *dev, const void *data) ··· 445 447 .acpi_match_table = ACPI_PTR(acpi_ipmi_match), 446 448 }, 447 449 .probe = ipmi_probe, 448 - .remove = ipmi_remove, 450 + .remove_new = ipmi_remove, 449 451 .id_table = si_plat_ids 450 452 }; 451 453
+2 -3
drivers/char/ipmi/ipmi_ssif.c
··· 2071 2071 return dmi_ipmi_probe(dev); 2072 2072 } 2073 2073 2074 - static int ssif_platform_remove(struct platform_device *dev) 2074 + static void ssif_platform_remove(struct platform_device *dev) 2075 2075 { 2076 2076 struct ssif_addr_info *addr_info = dev_get_drvdata(&dev->dev); 2077 2077 ··· 2079 2079 list_del(&addr_info->link); 2080 2080 kfree(addr_info); 2081 2081 mutex_unlock(&ssif_infos_mutex); 2082 - return 0; 2083 2082 } 2084 2083 2085 2084 static const struct platform_device_id ssif_plat_ids[] = { ··· 2091 2092 .name = DEVICE_NAME, 2092 2093 }, 2093 2094 .probe = ssif_platform_probe, 2094 - .remove = ssif_platform_remove, 2095 + .remove_new = ssif_platform_remove, 2095 2096 .id_table = ssif_plat_ids 2096 2097 }; 2097 2098
+2 -4
drivers/char/ipmi/kcs_bmc_aspeed.c
··· 641 641 return 0; 642 642 } 643 643 644 - static int aspeed_kcs_remove(struct platform_device *pdev) 644 + static void aspeed_kcs_remove(struct platform_device *pdev) 645 645 { 646 646 struct aspeed_kcs_bmc *priv = platform_get_drvdata(pdev); 647 647 struct kcs_bmc_device *kcs_bmc = &priv->kcs_bmc; ··· 656 656 priv->obe.remove = true; 657 657 spin_unlock_irq(&priv->obe.lock); 658 658 del_timer_sync(&priv->obe.timer); 659 - 660 - return 0; 661 659 } 662 660 663 661 static const struct of_device_id ast_kcs_bmc_match[] = { ··· 672 674 .of_match_table = ast_kcs_bmc_match, 673 675 }, 674 676 .probe = aspeed_kcs_probe, 675 - .remove = aspeed_kcs_remove, 677 + .remove_new = aspeed_kcs_remove, 676 678 }; 677 679 module_platform_driver(ast_kcs_bmc_driver); 678 680
+2 -4
drivers/char/ipmi/kcs_bmc_npcm7xx.c
··· 218 218 return 0; 219 219 } 220 220 221 - static int npcm7xx_kcs_remove(struct platform_device *pdev) 221 + static void npcm7xx_kcs_remove(struct platform_device *pdev) 222 222 { 223 223 struct npcm7xx_kcs_bmc *priv = platform_get_drvdata(pdev); 224 224 struct kcs_bmc_device *kcs_bmc = &priv->kcs_bmc; ··· 227 227 228 228 npcm7xx_kcs_enable_channel(kcs_bmc, false); 229 229 npcm7xx_kcs_irq_mask_update(kcs_bmc, (KCS_BMC_EVENT_TYPE_IBF | KCS_BMC_EVENT_TYPE_OBE), 0); 230 - 231 - return 0; 232 230 } 233 231 234 232 static const struct of_device_id npcm_kcs_bmc_match[] = { ··· 241 243 .of_match_table = npcm_kcs_bmc_match, 242 244 }, 243 245 .probe = npcm7xx_kcs_probe, 244 - .remove = npcm7xx_kcs_remove, 246 + .remove_new = npcm7xx_kcs_remove, 245 247 }; 246 248 module_platform_driver(npcm_kcs_bmc_driver); 247 249