diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2013-08-29 13:33:16 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-08-30 02:57:07 -0400 |
commit | 67f43f38eeb34da43b624a29d57b703f4c4844b4 (patch) | |
tree | f38156d87f7bce9e1b32cb8214de0d24447e2dd6 /arch/s390 | |
parent | 0944fe3f4a323f436180d39402cae7f9c46ead17 (diff) |
s390/pci/hotplug: convert to be builtin only
Convert s390' pci hotplug to be builtin only, with no module option.
Suggested-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/include/asm/pci.h | 24 | ||||
-rw-r--r-- | arch/s390/pci/pci.c | 34 |
2 files changed, 17 insertions, 41 deletions
diff --git a/arch/s390/include/asm/pci.h b/arch/s390/include/asm/pci.h index d0872769d44e..64081f85ffdb 100644 --- a/arch/s390/include/asm/pci.h +++ b/arch/s390/include/asm/pci.h | |||
@@ -116,11 +116,6 @@ struct zpci_dev { | |||
116 | struct dentry *debugfs_perf; | 116 | struct dentry *debugfs_perf; |
117 | }; | 117 | }; |
118 | 118 | ||
119 | struct pci_hp_callback_ops { | ||
120 | int (*create_slot) (struct zpci_dev *zdev); | ||
121 | void (*remove_slot) (struct zpci_dev *zdev); | ||
122 | }; | ||
123 | |||
124 | static inline bool zdev_enabled(struct zpci_dev *zdev) | 119 | static inline bool zdev_enabled(struct zpci_dev *zdev) |
125 | { | 120 | { |
126 | return (zdev->fh & (1UL << 31)) ? true : false; | 121 | return (zdev->fh & (1UL << 31)) ? true : false; |
@@ -154,6 +149,17 @@ static inline void zpci_event_error(void *e) {} | |||
154 | static inline void zpci_event_availability(void *e) {} | 149 | static inline void zpci_event_availability(void *e) {} |
155 | #endif /* CONFIG_PCI */ | 150 | #endif /* CONFIG_PCI */ |
156 | 151 | ||
152 | #ifdef CONFIG_HOTPLUG_PCI_S390 | ||
153 | int zpci_init_slot(struct zpci_dev *); | ||
154 | void zpci_exit_slot(struct zpci_dev *); | ||
155 | #else /* CONFIG_HOTPLUG_PCI_S390 */ | ||
156 | static inline int zpci_init_slot(struct zpci_dev *zdev) | ||
157 | { | ||
158 | return 0; | ||
159 | } | ||
160 | static inline void zpci_exit_slot(struct zpci_dev *zdev) {} | ||
161 | #endif /* CONFIG_HOTPLUG_PCI_S390 */ | ||
162 | |||
157 | /* Helpers */ | 163 | /* Helpers */ |
158 | struct zpci_dev *get_zdev(struct pci_dev *); | 164 | struct zpci_dev *get_zdev(struct pci_dev *); |
159 | struct zpci_dev *get_zdev_by_fid(u32); | 165 | struct zpci_dev *get_zdev_by_fid(u32); |
@@ -167,14 +173,6 @@ void zpci_sysfs_remove_device(struct device *); | |||
167 | int zpci_dma_init(void); | 173 | int zpci_dma_init(void); |
168 | void zpci_dma_exit(void); | 174 | void zpci_dma_exit(void); |
169 | 175 | ||
170 | /* Hotplug */ | ||
171 | extern struct mutex zpci_list_lock; | ||
172 | extern struct list_head zpci_list; | ||
173 | extern unsigned int s390_pci_probe; | ||
174 | |||
175 | void zpci_register_hp_ops(struct pci_hp_callback_ops *); | ||
176 | void zpci_deregister_hp_ops(void); | ||
177 | |||
178 | /* FMB */ | 176 | /* FMB */ |
179 | int zpci_fmb_enable_device(struct zpci_dev *); | 177 | int zpci_fmb_enable_device(struct zpci_dev *); |
180 | int zpci_fmb_disable_device(struct zpci_dev *); | 178 | int zpci_fmb_disable_device(struct zpci_dev *); |
diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c index d65dc4f50e2a..56f8a1c4d9bf 100644 --- a/arch/s390/pci/pci.c +++ b/arch/s390/pci/pci.c | |||
@@ -45,11 +45,8 @@ | |||
45 | #define ZPCI_NR_DEVICES CONFIG_PCI_NR_FUNCTIONS | 45 | #define ZPCI_NR_DEVICES CONFIG_PCI_NR_FUNCTIONS |
46 | 46 | ||
47 | /* list of all detected zpci devices */ | 47 | /* list of all detected zpci devices */ |
48 | LIST_HEAD(zpci_list); | 48 | static LIST_HEAD(zpci_list); |
49 | EXPORT_SYMBOL_GPL(zpci_list); | 49 | static DEFINE_MUTEX(zpci_list_lock); |
50 | DEFINE_MUTEX(zpci_list_lock); | ||
51 | EXPORT_SYMBOL_GPL(zpci_list_lock); | ||
52 | |||
53 | 50 | ||
54 | static void zpci_enable_irq(struct irq_data *data); | 51 | static void zpci_enable_irq(struct irq_data *data); |
55 | static void zpci_disable_irq(struct irq_data *data); | 52 | static void zpci_disable_irq(struct irq_data *data); |
@@ -60,8 +57,6 @@ static struct irq_chip zpci_irq_chip = { | |||
60 | .irq_mask = zpci_disable_irq, | 57 | .irq_mask = zpci_disable_irq, |
61 | }; | 58 | }; |
62 | 59 | ||
63 | static struct pci_hp_callback_ops *hotplug_ops; | ||
64 | |||
65 | static DECLARE_BITMAP(zpci_domain, ZPCI_NR_DEVICES); | 60 | static DECLARE_BITMAP(zpci_domain, ZPCI_NR_DEVICES); |
66 | static DEFINE_SPINLOCK(zpci_domain_lock); | 61 | static DEFINE_SPINLOCK(zpci_domain_lock); |
67 | 62 | ||
@@ -828,10 +823,10 @@ int zpci_create_device(struct zpci_dev *zdev) | |||
828 | 823 | ||
829 | mutex_lock(&zpci_list_lock); | 824 | mutex_lock(&zpci_list_lock); |
830 | list_add_tail(&zdev->entry, &zpci_list); | 825 | list_add_tail(&zdev->entry, &zpci_list); |
831 | if (hotplug_ops) | ||
832 | hotplug_ops->create_slot(zdev); | ||
833 | mutex_unlock(&zpci_list_lock); | 826 | mutex_unlock(&zpci_list_lock); |
834 | 827 | ||
828 | zpci_init_slot(zdev); | ||
829 | |||
835 | return 0; | 830 | return 0; |
836 | 831 | ||
837 | out_disable: | 832 | out_disable: |
@@ -884,24 +879,7 @@ static void zpci_mem_exit(void) | |||
884 | kmem_cache_destroy(zdev_fmb_cache); | 879 | kmem_cache_destroy(zdev_fmb_cache); |
885 | } | 880 | } |
886 | 881 | ||
887 | void zpci_register_hp_ops(struct pci_hp_callback_ops *ops) | 882 | static unsigned int s390_pci_probe; |
888 | { | ||
889 | mutex_lock(&zpci_list_lock); | ||
890 | hotplug_ops = ops; | ||
891 | mutex_unlock(&zpci_list_lock); | ||
892 | } | ||
893 | EXPORT_SYMBOL_GPL(zpci_register_hp_ops); | ||
894 | |||
895 | void zpci_deregister_hp_ops(void) | ||
896 | { | ||
897 | mutex_lock(&zpci_list_lock); | ||
898 | hotplug_ops = NULL; | ||
899 | mutex_unlock(&zpci_list_lock); | ||
900 | } | ||
901 | EXPORT_SYMBOL_GPL(zpci_deregister_hp_ops); | ||
902 | |||
903 | unsigned int s390_pci_probe; | ||
904 | EXPORT_SYMBOL_GPL(s390_pci_probe); | ||
905 | 883 | ||
906 | char * __init pcibios_setup(char *str) | 884 | char * __init pcibios_setup(char *str) |
907 | { | 885 | { |
@@ -960,4 +938,4 @@ out_mem: | |||
960 | out: | 938 | out: |
961 | return rc; | 939 | return rc; |
962 | } | 940 | } |
963 | subsys_initcall(pci_base_init); | 941 | subsys_initcall_sync(pci_base_init); |