Commit 9389339f authored by Martin Schwidefsky's avatar Martin Schwidefsky

s390/pci: cleanup function names

Rename s390pci_xyz to zpci_xxz and set_irq_ctrl to zpci_set_irq_ctrl.
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent a9a6f034
...@@ -79,11 +79,11 @@ struct zpci_fib { ...@@ -79,11 +79,11 @@ struct zpci_fib {
} __packed; } __packed;
int s390pci_mod_fc(u64 req, struct zpci_fib *fib); int zpci_mod_fc(u64 req, struct zpci_fib *fib);
int s390pci_refresh_trans(u64 fn, u64 addr, u64 range); int zpci_refresh_trans(u64 fn, u64 addr, u64 range);
int s390pci_load(u64 *data, u64 req, u64 offset); int zpci_load(u64 *data, u64 req, u64 offset);
int s390pci_store(u64 data, u64 req, u64 offset); int zpci_store(u64 data, u64 req, u64 offset);
int s390pci_store_block(const u64 *data, u64 req, u64 offset); int zpci_store_block(const u64 *data, u64 req, u64 offset);
void set_irq_ctrl(u16 ctl, char *unused, u8 isc); void zpci_set_irq_ctrl(u16 ctl, char *unused, u8 isc);
#endif #endif
...@@ -36,7 +36,7 @@ static inline RETTYPE zpci_read_##RETTYPE(const volatile void __iomem *addr) \ ...@@ -36,7 +36,7 @@ static inline RETTYPE zpci_read_##RETTYPE(const volatile void __iomem *addr) \
u64 data; \ u64 data; \
int rc; \ int rc; \
\ \
rc = s390pci_load(&data, req, ZPCI_OFFSET(addr)); \ rc = zpci_load(&data, req, ZPCI_OFFSET(addr)); \
if (rc) \ if (rc) \
data = -1ULL; \ data = -1ULL; \
return (RETTYPE) data; \ return (RETTYPE) data; \
...@@ -50,7 +50,7 @@ static inline void zpci_write_##VALTYPE(VALTYPE val, \ ...@@ -50,7 +50,7 @@ static inline void zpci_write_##VALTYPE(VALTYPE val, \
u64 req = ZPCI_CREATE_REQ(entry->fh, entry->bar, LENGTH); \ u64 req = ZPCI_CREATE_REQ(entry->fh, entry->bar, LENGTH); \
u64 data = (VALTYPE) val; \ u64 data = (VALTYPE) val; \
\ \
s390pci_store(data, req, ZPCI_OFFSET(addr)); \ zpci_store(data, req, ZPCI_OFFSET(addr)); \
} }
zpci_read(8, u64) zpci_read(8, u64)
...@@ -83,7 +83,7 @@ static inline int zpci_write_single(u64 req, const u64 *data, u64 offset, u8 len ...@@ -83,7 +83,7 @@ static inline int zpci_write_single(u64 req, const u64 *data, u64 offset, u8 len
val = 0; /* let FW report error */ val = 0; /* let FW report error */
break; break;
} }
return s390pci_store(val, req, offset); return zpci_store(val, req, offset);
} }
static inline int zpci_read_single(u64 req, u64 *dst, u64 offset, u8 len) static inline int zpci_read_single(u64 req, u64 *dst, u64 offset, u8 len)
...@@ -91,7 +91,7 @@ static inline int zpci_read_single(u64 req, u64 *dst, u64 offset, u8 len) ...@@ -91,7 +91,7 @@ static inline int zpci_read_single(u64 req, u64 *dst, u64 offset, u8 len)
u64 data; u64 data;
int cc; int cc;
cc = s390pci_load(&data, req, offset); cc = zpci_load(&data, req, offset);
if (cc) if (cc)
goto out; goto out;
...@@ -115,7 +115,7 @@ static inline int zpci_read_single(u64 req, u64 *dst, u64 offset, u8 len) ...@@ -115,7 +115,7 @@ static inline int zpci_read_single(u64 req, u64 *dst, u64 offset, u8 len)
static inline int zpci_write_block(u64 req, const u64 *data, u64 offset) static inline int zpci_write_block(u64 req, const u64 *data, u64 offset)
{ {
return s390pci_store_block(data, req, offset); return zpci_store_block(data, req, offset);
} }
static inline u8 zpci_get_max_write_size(u64 src, u64 dst, int len, int max) static inline u8 zpci_get_max_write_size(u64 src, u64 dst, int len, int max)
......
...@@ -179,7 +179,7 @@ static int zpci_register_airq(struct zpci_dev *zdev, unsigned int aisb, ...@@ -179,7 +179,7 @@ static int zpci_register_airq(struct zpci_dev *zdev, unsigned int aisb,
fib->aisb = (u64) bucket->aisb + aisb / 8; fib->aisb = (u64) bucket->aisb + aisb / 8;
fib->aisbo = aisb & ZPCI_MSI_MASK; fib->aisbo = aisb & ZPCI_MSI_MASK;
rc = s390pci_mod_fc(req, fib); rc = zpci_mod_fc(req, fib);
pr_debug("%s mpcifc returned noi: %d\n", __func__, fib->noi); pr_debug("%s mpcifc returned noi: %d\n", __func__, fib->noi);
free_page((unsigned long) fib); free_page((unsigned long) fib);
...@@ -209,7 +209,7 @@ static int mod_pci(struct zpci_dev *zdev, int fn, u8 dmaas, struct mod_pci_args ...@@ -209,7 +209,7 @@ static int mod_pci(struct zpci_dev *zdev, int fn, u8 dmaas, struct mod_pci_args
fib->iota = args->iota; fib->iota = args->iota;
fib->fmb_addr = args->fmb_addr; fib->fmb_addr = args->fmb_addr;
rc = s390pci_mod_fc(req, fib); rc = zpci_mod_fc(req, fib);
free_page((unsigned long) fib); free_page((unsigned long) fib);
return rc; return rc;
} }
...@@ -283,7 +283,7 @@ static int zpci_cfg_load(struct zpci_dev *zdev, int offset, u32 *val, u8 len) ...@@ -283,7 +283,7 @@ static int zpci_cfg_load(struct zpci_dev *zdev, int offset, u32 *val, u8 len)
u64 data; u64 data;
int rc; int rc;
rc = s390pci_load(&data, req, offset); rc = zpci_load(&data, req, offset);
if (!rc) { if (!rc) {
data = data << ((8 - len) * 8); data = data << ((8 - len) * 8);
data = le64_to_cpu(data); data = le64_to_cpu(data);
...@@ -301,7 +301,7 @@ static int zpci_cfg_store(struct zpci_dev *zdev, int offset, u32 val, u8 len) ...@@ -301,7 +301,7 @@ static int zpci_cfg_store(struct zpci_dev *zdev, int offset, u32 val, u8 len)
data = cpu_to_le64(data); data = cpu_to_le64(data);
data = data >> ((8 - len) * 8); data = data >> ((8 - len) * 8);
rc = s390pci_store(data, req, offset); rc = zpci_store(data, req, offset);
return rc; return rc;
} }
...@@ -448,7 +448,7 @@ static void zpci_irq_handler(struct airq_struct *airq) ...@@ -448,7 +448,7 @@ static void zpci_irq_handler(struct airq_struct *airq)
} }
/* enable interrupts again */ /* enable interrupts again */
set_irq_ctrl(SIC_IRQ_MODE_SINGLE, NULL, PCI_ISC); zpci_set_irq_ctrl(SIC_IRQ_MODE_SINGLE, NULL, PCI_ISC);
/* check again to not lose initiative */ /* check again to not lose initiative */
rmb(); rmb();
...@@ -727,7 +727,7 @@ static int __init zpci_irq_init(void) ...@@ -727,7 +727,7 @@ static int __init zpci_irq_init(void)
per_cpu(next_sbit, cpu) = 0; per_cpu(next_sbit, cpu) = 0;
spin_lock_init(&bucket->lock); spin_lock_init(&bucket->lock);
set_irq_ctrl(SIC_IRQ_MODE_SINGLE, NULL, PCI_ISC); zpci_set_irq_ctrl(SIC_IRQ_MODE_SINGLE, NULL, PCI_ISC);
return 0; return 0;
out_ai: out_ai:
......
...@@ -170,8 +170,8 @@ static int dma_update_trans(struct zpci_dev *zdev, unsigned long pa, ...@@ -170,8 +170,8 @@ static int dma_update_trans(struct zpci_dev *zdev, unsigned long pa,
*/ */
goto no_refresh; goto no_refresh;
rc = s390pci_refresh_trans((u64) zdev->fh << 32, start_dma_addr, rc = zpci_refresh_trans((u64) zdev->fh << 32, start_dma_addr,
nr_pages * PAGE_SIZE); nr_pages * PAGE_SIZE);
no_refresh: no_refresh:
spin_unlock_irqrestore(&zdev->dma_table_lock, irq_flags); spin_unlock_irqrestore(&zdev->dma_table_lock, irq_flags);
......
...@@ -27,7 +27,7 @@ static inline u8 __mpcifc(u64 req, struct zpci_fib *fib, u8 *status) ...@@ -27,7 +27,7 @@ static inline u8 __mpcifc(u64 req, struct zpci_fib *fib, u8 *status)
return cc; return cc;
} }
int s390pci_mod_fc(u64 req, struct zpci_fib *fib) int zpci_mod_fc(u64 req, struct zpci_fib *fib)
{ {
u8 cc, status; u8 cc, status;
...@@ -61,7 +61,7 @@ static inline u8 __rpcit(u64 fn, u64 addr, u64 range, u8 *status) ...@@ -61,7 +61,7 @@ static inline u8 __rpcit(u64 fn, u64 addr, u64 range, u8 *status)
return cc; return cc;
} }
int s390pci_refresh_trans(u64 fn, u64 addr, u64 range) int zpci_refresh_trans(u64 fn, u64 addr, u64 range)
{ {
u8 cc, status; u8 cc, status;
...@@ -78,7 +78,7 @@ int s390pci_refresh_trans(u64 fn, u64 addr, u64 range) ...@@ -78,7 +78,7 @@ int s390pci_refresh_trans(u64 fn, u64 addr, u64 range)
} }
/* Set Interruption Controls */ /* Set Interruption Controls */
void set_irq_ctrl(u16 ctl, char *unused, u8 isc) void zpci_set_irq_ctrl(u16 ctl, char *unused, u8 isc)
{ {
asm volatile ( asm volatile (
" .insn rsy,0xeb00000000d1,%[ctl],%[isc],%[u]\n" " .insn rsy,0xeb00000000d1,%[ctl],%[isc],%[u]\n"
...@@ -109,7 +109,7 @@ static inline int __pcilg(u64 *data, u64 req, u64 offset, u8 *status) ...@@ -109,7 +109,7 @@ static inline int __pcilg(u64 *data, u64 req, u64 offset, u8 *status)
return cc; return cc;
} }
int s390pci_load(u64 *data, u64 req, u64 offset) int zpci_load(u64 *data, u64 req, u64 offset)
{ {
u8 status; u8 status;
int cc; int cc;
...@@ -125,7 +125,7 @@ int s390pci_load(u64 *data, u64 req, u64 offset) ...@@ -125,7 +125,7 @@ int s390pci_load(u64 *data, u64 req, u64 offset)
__func__, cc, status, req, offset); __func__, cc, status, req, offset);
return (cc > 0) ? -EIO : cc; return (cc > 0) ? -EIO : cc;
} }
EXPORT_SYMBOL_GPL(s390pci_load); EXPORT_SYMBOL_GPL(zpci_load);
/* PCI Store */ /* PCI Store */
static inline int __pcistg(u64 data, u64 req, u64 offset, u8 *status) static inline int __pcistg(u64 data, u64 req, u64 offset, u8 *status)
...@@ -147,7 +147,7 @@ static inline int __pcistg(u64 data, u64 req, u64 offset, u8 *status) ...@@ -147,7 +147,7 @@ static inline int __pcistg(u64 data, u64 req, u64 offset, u8 *status)
return cc; return cc;
} }
int s390pci_store(u64 data, u64 req, u64 offset) int zpci_store(u64 data, u64 req, u64 offset)
{ {
u8 status; u8 status;
int cc; int cc;
...@@ -163,7 +163,7 @@ int s390pci_store(u64 data, u64 req, u64 offset) ...@@ -163,7 +163,7 @@ int s390pci_store(u64 data, u64 req, u64 offset)
__func__, cc, status, req, offset); __func__, cc, status, req, offset);
return (cc > 0) ? -EIO : cc; return (cc > 0) ? -EIO : cc;
} }
EXPORT_SYMBOL_GPL(s390pci_store); EXPORT_SYMBOL_GPL(zpci_store);
/* PCI Store Block */ /* PCI Store Block */
static inline int __pcistb(const u64 *data, u64 req, u64 offset, u8 *status) static inline int __pcistb(const u64 *data, u64 req, u64 offset, u8 *status)
...@@ -183,7 +183,7 @@ static inline int __pcistb(const u64 *data, u64 req, u64 offset, u8 *status) ...@@ -183,7 +183,7 @@ static inline int __pcistb(const u64 *data, u64 req, u64 offset, u8 *status)
return cc; return cc;
} }
int s390pci_store_block(const u64 *data, u64 req, u64 offset) int zpci_store_block(const u64 *data, u64 req, u64 offset)
{ {
u8 status; u8 status;
int cc; int cc;
...@@ -199,4 +199,4 @@ int s390pci_store_block(const u64 *data, u64 req, u64 offset) ...@@ -199,4 +199,4 @@ int s390pci_store_block(const u64 *data, u64 req, u64 offset)
__func__, cc, status, req, offset); __func__, cc, status, req, offset);
return (cc > 0) ? -EIO : cc; return (cc > 0) ? -EIO : cc;
} }
EXPORT_SYMBOL_GPL(s390pci_store_block); EXPORT_SYMBOL_GPL(zpci_store_block);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment