aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2013-08-29 13:33:16 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2013-08-30 02:57:07 -0400
commit67f43f38eeb34da43b624a29d57b703f4c4844b4 (patch)
treef38156d87f7bce9e1b32cb8214de0d24447e2dd6 /arch/s390
parent0944fe3f4a323f436180d39402cae7f9c46ead17 (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.h24
-rw-r--r--arch/s390/pci/pci.c34
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
119struct pci_hp_callback_ops {
120 int (*create_slot) (struct zpci_dev *zdev);
121 void (*remove_slot) (struct zpci_dev *zdev);
122};
123
124static inline bool zdev_enabled(struct zpci_dev *zdev) 119static 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) {}
154static inline void zpci_event_availability(void *e) {} 149static inline void zpci_event_availability(void *e) {}
155#endif /* CONFIG_PCI */ 150#endif /* CONFIG_PCI */
156 151
152#ifdef CONFIG_HOTPLUG_PCI_S390
153int zpci_init_slot(struct zpci_dev *);
154void zpci_exit_slot(struct zpci_dev *);
155#else /* CONFIG_HOTPLUG_PCI_S390 */
156static inline int zpci_init_slot(struct zpci_dev *zdev)
157{
158 return 0;
159}
160static inline void zpci_exit_slot(struct zpci_dev *zdev) {}
161#endif /* CONFIG_HOTPLUG_PCI_S390 */
162
157/* Helpers */ 163/* Helpers */
158struct zpci_dev *get_zdev(struct pci_dev *); 164struct zpci_dev *get_zdev(struct pci_dev *);
159struct zpci_dev *get_zdev_by_fid(u32); 165struct zpci_dev *get_zdev_by_fid(u32);
@@ -167,14 +173,6 @@ void zpci_sysfs_remove_device(struct device *);
167int zpci_dma_init(void); 173int zpci_dma_init(void);
168void zpci_dma_exit(void); 174void zpci_dma_exit(void);
169 175
170/* Hotplug */
171extern struct mutex zpci_list_lock;
172extern struct list_head zpci_list;
173extern unsigned int s390_pci_probe;
174
175void zpci_register_hp_ops(struct pci_hp_callback_ops *);
176void zpci_deregister_hp_ops(void);
177
178/* FMB */ 176/* FMB */
179int zpci_fmb_enable_device(struct zpci_dev *); 177int zpci_fmb_enable_device(struct zpci_dev *);
180int zpci_fmb_disable_device(struct zpci_dev *); 178int 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 */
48LIST_HEAD(zpci_list); 48static LIST_HEAD(zpci_list);
49EXPORT_SYMBOL_GPL(zpci_list); 49static DEFINE_MUTEX(zpci_list_lock);
50DEFINE_MUTEX(zpci_list_lock);
51EXPORT_SYMBOL_GPL(zpci_list_lock);
52
53 50
54static void zpci_enable_irq(struct irq_data *data); 51static void zpci_enable_irq(struct irq_data *data);
55static void zpci_disable_irq(struct irq_data *data); 52static 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
63static struct pci_hp_callback_ops *hotplug_ops;
64
65static DECLARE_BITMAP(zpci_domain, ZPCI_NR_DEVICES); 60static DECLARE_BITMAP(zpci_domain, ZPCI_NR_DEVICES);
66static DEFINE_SPINLOCK(zpci_domain_lock); 61static 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
837out_disable: 832out_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
887void zpci_register_hp_ops(struct pci_hp_callback_ops *ops) 882static unsigned int s390_pci_probe;
888{
889 mutex_lock(&zpci_list_lock);
890 hotplug_ops = ops;
891 mutex_unlock(&zpci_list_lock);
892}
893EXPORT_SYMBOL_GPL(zpci_register_hp_ops);
894
895void zpci_deregister_hp_ops(void)
896{
897 mutex_lock(&zpci_list_lock);
898 hotplug_ops = NULL;
899 mutex_unlock(&zpci_list_lock);
900}
901EXPORT_SYMBOL_GPL(zpci_deregister_hp_ops);
902
903unsigned int s390_pci_probe;
904EXPORT_SYMBOL_GPL(s390_pci_probe);
905 883
906char * __init pcibios_setup(char *str) 884char * __init pcibios_setup(char *str)
907{ 885{
@@ -960,4 +938,4 @@ out_mem:
960out: 938out:
961 return rc; 939 return rc;
962} 940}
963subsys_initcall(pci_base_init); 941subsys_initcall_sync(pci_base_init);