Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 update from Martin Schwidefsky: "The most prominent change in this patch set is the software dirty bit patch for s390. It removes __HAVE_ARCH_PAGE_TEST_AND_CLEAR_DIRTY and the page_test_and_clear_dirty primitive which makes the common memory management code a bit less obscure. Heiko fixed most of the PCI related fallout, more often than not missing GENERIC_HARDIRQS dependencies. Notable is one of the 3270 patches which adds an export to tty_io to be able to resize a tty. The rest is the usual bunch of cleanups and bug fixes." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (42 commits) s390/module: Add missing R_390_NONE relocation type drivers/gpio: add missing GENERIC_HARDIRQ dependency drivers/input: add couple of missing GENERIC_HARDIRQS dependencies s390/cleanup: rename SPP to LPP s390/mm: implement software dirty bits s390/mm: Fix crst upgrade of mmap with MAP_FIXED s390/linker skript: discard exit.data at runtime drivers/media: add missing GENERIC_HARDIRQS dependency s390/bpf,jit: add vlan tag support drivers/net,AT91RM9200: add missing GENERIC_HARDIRQS dependency iucv: fix kernel panic at reboot s390/Kconfig: sort list of arch selected config options phylib: remove !S390 dependeny from Kconfig uio: remove !S390 dependency from Kconfig dasd: fix sysfs cleanup in dasd_generic_remove s390/pci: fix hotplug module init s390/pci: cleanup clp page allocation s390/pci: cleanup clp inline assembly s390/perf: cpum_cf: fallback to software sampling events s390/mm: provide PAGE_SHARED define ...
This commit is contained in:
@@ -172,25 +172,6 @@ error:
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
static int __init init_pci_slots(void)
|
||||
{
|
||||
struct zpci_dev *zdev;
|
||||
int device = 0;
|
||||
|
||||
/*
|
||||
* Create a structure for each slot, and register that slot
|
||||
* with the pci_hotplug subsystem.
|
||||
*/
|
||||
mutex_lock(&zpci_list_lock);
|
||||
list_for_each_entry(zdev, &zpci_list, entry) {
|
||||
init_pci_slot(zdev);
|
||||
device++;
|
||||
}
|
||||
|
||||
mutex_unlock(&zpci_list_lock);
|
||||
return (device) ? 0 : -ENODEV;
|
||||
}
|
||||
|
||||
static void exit_pci_slot(struct zpci_dev *zdev)
|
||||
{
|
||||
struct list_head *tmp, *n;
|
||||
@@ -205,6 +186,26 @@ static void exit_pci_slot(struct zpci_dev *zdev)
|
||||
}
|
||||
}
|
||||
|
||||
static struct pci_hp_callback_ops hp_ops = {
|
||||
.create_slot = init_pci_slot,
|
||||
.remove_slot = exit_pci_slot,
|
||||
};
|
||||
|
||||
static void __init init_pci_slots(void)
|
||||
{
|
||||
struct zpci_dev *zdev;
|
||||
|
||||
/*
|
||||
* Create a structure for each slot, and register that slot
|
||||
* with the pci_hotplug subsystem.
|
||||
*/
|
||||
mutex_lock(&zpci_list_lock);
|
||||
list_for_each_entry(zdev, &zpci_list, entry) {
|
||||
init_pci_slot(zdev);
|
||||
}
|
||||
mutex_unlock(&zpci_list_lock);
|
||||
}
|
||||
|
||||
static void __exit exit_pci_slots(void)
|
||||
{
|
||||
struct list_head *tmp, *n;
|
||||
@@ -224,28 +225,19 @@ static void __exit exit_pci_slots(void)
|
||||
|
||||
static int __init pci_hotplug_s390_init(void)
|
||||
{
|
||||
/*
|
||||
* Do specific initialization stuff for your driver here
|
||||
* like initializing your controller hardware (if any) and
|
||||
* determining the number of slots you have in the system
|
||||
* right now.
|
||||
*/
|
||||
|
||||
if (!pci_probe)
|
||||
if (!s390_pci_probe)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
/* register callbacks for slot handling from arch code */
|
||||
mutex_lock(&zpci_list_lock);
|
||||
hotplug_ops.create_slot = init_pci_slot;
|
||||
hotplug_ops.remove_slot = exit_pci_slot;
|
||||
mutex_unlock(&zpci_list_lock);
|
||||
pr_info("registered hotplug slot callbacks\n");
|
||||
return init_pci_slots();
|
||||
zpci_register_hp_ops(&hp_ops);
|
||||
init_pci_slots();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __exit pci_hotplug_s390_exit(void)
|
||||
{
|
||||
exit_pci_slots();
|
||||
zpci_deregister_hp_ops();
|
||||
}
|
||||
|
||||
module_init(pci_hotplug_s390_init);
|
||||
|
Reference in New Issue
Block a user