diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2013-04-16 08:15:42 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-04-17 08:07:37 -0400 |
commit | b2a9e87d2ce8fb2d0ce08ee49168805975c622da (patch) | |
tree | 7f7a1dea7010829f7244911b4f79c67e463df206 /arch/s390/pci | |
parent | cbcca5d070c30909fd355018ed96134ee9018425 (diff) |
s390/pci: rename instruction wrappers
Use distinct (and hopefully sane) names for the pci instruction
wrappers.
Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.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/pci')
-rw-r--r-- | arch/s390/pci/pci.c | 12 | ||||
-rw-r--r-- | arch/s390/pci/pci_dma.c | 5 | ||||
-rw-r--r-- | arch/s390/pci/pci_insn.c | 18 |
3 files changed, 18 insertions, 17 deletions
diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c index 01478f63c8a8..2b21749cc2b3 100644 --- a/arch/s390/pci/pci.c +++ b/arch/s390/pci/pci.c | |||
@@ -176,7 +176,7 @@ static int zpci_register_airq(struct zpci_dev *zdev, unsigned int aisb, | |||
176 | fib->aisb = (u64) bucket->aisb + aisb / 8; | 176 | fib->aisb = (u64) bucket->aisb + aisb / 8; |
177 | fib->aisbo = aisb & ZPCI_MSI_MASK; | 177 | fib->aisbo = aisb & ZPCI_MSI_MASK; |
178 | 178 | ||
179 | rc = mpcifc_instr(req, fib); | 179 | rc = s390pci_mod_fc(req, fib); |
180 | pr_debug("%s mpcifc returned noi: %d\n", __func__, fib->noi); | 180 | pr_debug("%s mpcifc returned noi: %d\n", __func__, fib->noi); |
181 | 181 | ||
182 | free_page((unsigned long) fib); | 182 | free_page((unsigned long) fib); |
@@ -206,7 +206,7 @@ static int mod_pci(struct zpci_dev *zdev, int fn, u8 dmaas, struct mod_pci_args | |||
206 | fib->iota = args->iota; | 206 | fib->iota = args->iota; |
207 | fib->fmb_addr = args->fmb_addr; | 207 | fib->fmb_addr = args->fmb_addr; |
208 | 208 | ||
209 | rc = mpcifc_instr(req, fib); | 209 | rc = s390pci_mod_fc(req, fib); |
210 | free_page((unsigned long) fib); | 210 | free_page((unsigned long) fib); |
211 | return rc; | 211 | return rc; |
212 | } | 212 | } |
@@ -280,7 +280,7 @@ static int zpci_cfg_load(struct zpci_dev *zdev, int offset, u32 *val, u8 len) | |||
280 | u64 data; | 280 | u64 data; |
281 | int rc; | 281 | int rc; |
282 | 282 | ||
283 | rc = pcilg_instr(&data, req, offset); | 283 | rc = s390pci_load(&data, req, offset); |
284 | data = data << ((8 - len) * 8); | 284 | data = data << ((8 - len) * 8); |
285 | data = le64_to_cpu(data); | 285 | data = le64_to_cpu(data); |
286 | if (!rc) | 286 | if (!rc) |
@@ -298,7 +298,7 @@ static int zpci_cfg_store(struct zpci_dev *zdev, int offset, u32 val, u8 len) | |||
298 | 298 | ||
299 | data = cpu_to_le64(data); | 299 | data = cpu_to_le64(data); |
300 | data = data >> ((8 - len) * 8); | 300 | data = data >> ((8 - len) * 8); |
301 | rc = pcistg_instr(data, req, offset); | 301 | rc = s390pci_store(data, req, offset); |
302 | return rc; | 302 | return rc; |
303 | } | 303 | } |
304 | 304 | ||
@@ -470,7 +470,7 @@ scan: | |||
470 | } | 470 | } |
471 | 471 | ||
472 | /* enable interrupts again */ | 472 | /* enable interrupts again */ |
473 | sic_instr(SIC_IRQ_MODE_SINGLE, NULL, PCI_ISC); | 473 | set_irq_ctrl(SIC_IRQ_MODE_SINGLE, NULL, PCI_ISC); |
474 | 474 | ||
475 | /* check again to not lose initiative */ | 475 | /* check again to not lose initiative */ |
476 | rmb(); | 476 | rmb(); |
@@ -785,7 +785,7 @@ static int __init zpci_irq_init(void) | |||
785 | spin_lock_init(&bucket->lock); | 785 | spin_lock_init(&bucket->lock); |
786 | /* set summary to 1 to be called every time for the ISC */ | 786 | /* set summary to 1 to be called every time for the ISC */ |
787 | *zpci_irq_si = 1; | 787 | *zpci_irq_si = 1; |
788 | sic_instr(SIC_IRQ_MODE_SINGLE, NULL, PCI_ISC); | 788 | set_irq_ctrl(SIC_IRQ_MODE_SINGLE, NULL, PCI_ISC); |
789 | return 0; | 789 | return 0; |
790 | 790 | ||
791 | out_ai: | 791 | out_ai: |
diff --git a/arch/s390/pci/pci_dma.c b/arch/s390/pci/pci_dma.c index a547419907c3..60e4999e6b67 100644 --- a/arch/s390/pci/pci_dma.c +++ b/arch/s390/pci/pci_dma.c | |||
@@ -169,8 +169,9 @@ static int dma_update_trans(struct zpci_dev *zdev, unsigned long pa, | |||
169 | * needs to be redone! | 169 | * needs to be redone! |
170 | */ | 170 | */ |
171 | goto no_refresh; | 171 | goto no_refresh; |
172 | rc = rpcit_instr((u64) zdev->fh << 32, start_dma_addr, | 172 | |
173 | nr_pages * PAGE_SIZE); | 173 | rc = s390pci_refresh_trans((u64) zdev->fh << 32, start_dma_addr, |
174 | nr_pages * PAGE_SIZE); | ||
174 | 175 | ||
175 | no_refresh: | 176 | no_refresh: |
176 | spin_unlock_irqrestore(&zdev->dma_table_lock, irq_flags); | 177 | spin_unlock_irqrestore(&zdev->dma_table_lock, irq_flags); |
diff --git a/arch/s390/pci/pci_insn.c b/arch/s390/pci/pci_insn.c index c55962529f4f..d9b573bf4eb7 100644 --- a/arch/s390/pci/pci_insn.c +++ b/arch/s390/pci/pci_insn.c | |||
@@ -26,7 +26,7 @@ static inline u8 __mpcifc(u64 req, struct zpci_fib *fib, u8 *status) | |||
26 | return cc; | 26 | return cc; |
27 | } | 27 | } |
28 | 28 | ||
29 | int mpcifc_instr(u64 req, struct zpci_fib *fib) | 29 | int s390pci_mod_fc(u64 req, struct zpci_fib *fib) |
30 | { | 30 | { |
31 | u8 cc, status; | 31 | u8 cc, status; |
32 | 32 | ||
@@ -60,7 +60,7 @@ static inline u8 __rpcit(u64 fn, u64 addr, u64 range, u8 *status) | |||
60 | return cc; | 60 | return cc; |
61 | } | 61 | } |
62 | 62 | ||
63 | int rpcit_instr(u64 fn, u64 addr, u64 range) | 63 | int s390pci_refresh_trans(u64 fn, u64 addr, u64 range) |
64 | { | 64 | { |
65 | u8 cc, status; | 65 | u8 cc, status; |
66 | 66 | ||
@@ -77,7 +77,7 @@ int rpcit_instr(u64 fn, u64 addr, u64 range) | |||
77 | } | 77 | } |
78 | 78 | ||
79 | /* Set Interruption Controls */ | 79 | /* Set Interruption Controls */ |
80 | void sic_instr(u16 ctl, char *unused, u8 isc) | 80 | void set_irq_ctrl(u16 ctl, char *unused, u8 isc) |
81 | { | 81 | { |
82 | asm volatile ( | 82 | asm volatile ( |
83 | " .insn rsy,0xeb00000000d1,%[ctl],%[isc],%[u]\n" | 83 | " .insn rsy,0xeb00000000d1,%[ctl],%[isc],%[u]\n" |
@@ -104,7 +104,7 @@ static inline u8 __pcilg(u64 *data, u64 req, u64 offset, u8 *status) | |||
104 | return cc; | 104 | return cc; |
105 | } | 105 | } |
106 | 106 | ||
107 | int pcilg_instr(u64 *data, u64 req, u64 offset) | 107 | int s390pci_load(u64 *data, u64 req, u64 offset) |
108 | { | 108 | { |
109 | u8 cc, status; | 109 | u8 cc, status; |
110 | 110 | ||
@@ -123,7 +123,7 @@ int pcilg_instr(u64 *data, u64 req, u64 offset) | |||
123 | } | 123 | } |
124 | return (cc) ? -EIO : 0; | 124 | return (cc) ? -EIO : 0; |
125 | } | 125 | } |
126 | EXPORT_SYMBOL_GPL(pcilg_instr); | 126 | EXPORT_SYMBOL_GPL(s390pci_load); |
127 | 127 | ||
128 | /* PCI Store */ | 128 | /* PCI Store */ |
129 | static inline u8 __pcistg(u64 data, u64 req, u64 offset, u8 *status) | 129 | static inline u8 __pcistg(u64 data, u64 req, u64 offset, u8 *status) |
@@ -143,7 +143,7 @@ static inline u8 __pcistg(u64 data, u64 req, u64 offset, u8 *status) | |||
143 | return cc; | 143 | return cc; |
144 | } | 144 | } |
145 | 145 | ||
146 | int pcistg_instr(u64 data, u64 req, u64 offset) | 146 | int s390pci_store(u64 data, u64 req, u64 offset) |
147 | { | 147 | { |
148 | u8 cc, status; | 148 | u8 cc, status; |
149 | 149 | ||
@@ -158,7 +158,7 @@ int pcistg_instr(u64 data, u64 req, u64 offset) | |||
158 | __func__, cc, status, req, offset); | 158 | __func__, cc, status, req, offset); |
159 | return (cc) ? -EIO : 0; | 159 | return (cc) ? -EIO : 0; |
160 | } | 160 | } |
161 | EXPORT_SYMBOL_GPL(pcistg_instr); | 161 | EXPORT_SYMBOL_GPL(s390pci_store); |
162 | 162 | ||
163 | /* PCI Store Block */ | 163 | /* PCI Store Block */ |
164 | static inline u8 __pcistb(const u64 *data, u64 req, u64 offset, u8 *status) | 164 | static inline u8 __pcistb(const u64 *data, u64 req, u64 offset, u8 *status) |
@@ -176,7 +176,7 @@ static inline u8 __pcistb(const u64 *data, u64 req, u64 offset, u8 *status) | |||
176 | return cc; | 176 | return cc; |
177 | } | 177 | } |
178 | 178 | ||
179 | int pcistb_instr(const u64 *data, u64 req, u64 offset) | 179 | int s390pci_store_block(const u64 *data, u64 req, u64 offset) |
180 | { | 180 | { |
181 | u8 cc, status; | 181 | u8 cc, status; |
182 | 182 | ||
@@ -191,4 +191,4 @@ int pcistb_instr(const u64 *data, u64 req, u64 offset) | |||
191 | __func__, cc, status, req, offset); | 191 | __func__, cc, status, req, offset); |
192 | return (cc) ? -EIO : 0; | 192 | return (cc) ? -EIO : 0; |
193 | } | 193 | } |
194 | EXPORT_SYMBOL_GPL(pcistb_instr); | 194 | EXPORT_SYMBOL_GPL(s390pci_store_block); |