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

s390/sclp: Remove memory hotplug power management support

Power management support was removed for s390 with
commit 394216275c7d ("s390: remove broken hibernate / power management
support").

Remove leftover sclp memory hotplug-related power management code.

Acked-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>

authored by

Peter Oberparleiter and committed by
Vasily Gorbik
fc8ebe82 2f554d8b

-34
-34
drivers/s390/char/sclp_cmd.c
··· 20 20 #include <linux/mmzone.h> 21 21 #include <linux/memory.h> 22 22 #include <linux/module.h> 23 - #include <linux/platform_device.h> 24 23 #include <asm/ctl_reg.h> 25 24 #include <asm/chpid.h> 26 25 #include <asm/setup.h> ··· 167 168 static LIST_HEAD(sclp_mem_list); 168 169 static u8 sclp_max_storage_id; 169 170 static DECLARE_BITMAP(sclp_storage_ids, 256); 170 - static int sclp_mem_state_changed; 171 171 172 172 struct memory_increment { 173 173 struct list_head list; ··· 357 359 rc = -EINVAL; 358 360 break; 359 361 } 360 - if (!rc) 361 - sclp_mem_state_changed = 1; 362 362 mutex_unlock(&sclp_mem_mutex); 363 363 return rc ? NOTIFY_BAD : NOTIFY_OK; 364 364 } ··· 452 456 list_add(&new_incr->list, prev); 453 457 } 454 458 455 - static int sclp_mem_freeze(struct device *dev) 456 - { 457 - if (!sclp_mem_state_changed) 458 - return 0; 459 - pr_err("Memory hotplug state changed, suspend refused.\n"); 460 - return -EPERM; 461 - } 462 - 463 - static const struct dev_pm_ops sclp_mem_pm_ops = { 464 - .freeze = sclp_mem_freeze, 465 - }; 466 - 467 - static struct platform_driver sclp_mem_pdrv = { 468 - .driver = { 469 - .name = "sclp_mem", 470 - .pm = &sclp_mem_pm_ops, 471 - }, 472 - }; 473 - 474 459 static int __init sclp_detect_standby_memory(void) 475 460 { 476 - struct platform_device *sclp_pdev; 477 461 struct read_storage_sccb *sccb; 478 462 int i, id, assigned, rc; 479 463 ··· 506 530 rc = register_memory_notifier(&sclp_mem_nb); 507 531 if (rc) 508 532 goto out; 509 - rc = platform_driver_register(&sclp_mem_pdrv); 510 - if (rc) 511 - goto out; 512 - sclp_pdev = platform_device_register_simple("sclp_mem", -1, NULL, 0); 513 - rc = PTR_ERR_OR_ZERO(sclp_pdev); 514 - if (rc) 515 - goto out_driver; 516 533 sclp_add_standby_memory(); 517 - goto out; 518 - out_driver: 519 - platform_driver_unregister(&sclp_mem_pdrv); 520 534 out: 521 535 free_page((unsigned long) sccb); 522 536 return rc;