Lines Matching full:cc
24 u8 cc; member
38 static inline void zpci_err_insn_req(int lvl, u8 insn, u8 cc, u8 status, in zpci_err_insn_req() argument
42 .insn = insn, .cc = cc, .status = status, in zpci_err_insn_req()
48 static inline void zpci_err_insn_addr(int lvl, u8 insn, u8 cc, u8 status, in zpci_err_insn_addr() argument
52 .insn = insn, .cc = cc, .status = status, in zpci_err_insn_addr()
61 int cc; in __mpcifc() local
65 CC_IPM(cc) in __mpcifc()
66 : CC_OUT(cc, cc), [req] "+d" (req), [fib] "+Q" (*fib) in __mpcifc()
70 return CC_TRANSFORM(cc); in __mpcifc()
76 u8 cc; in zpci_mod_fc() local
79 cc = __mpcifc(req, fib, status); in zpci_mod_fc()
80 if (cc == 2) { in zpci_mod_fc()
83 zpci_err_insn_req(1, 'M', cc, *status, req, 0); in zpci_mod_fc()
87 } while (cc == 2); in zpci_mod_fc()
89 if (cc) in zpci_mod_fc()
90 zpci_err_insn_req(0, 'M', cc, *status, req, 0); in zpci_mod_fc()
92 zpci_err_insn_req(1, 'M', cc, *status, req, 0); in zpci_mod_fc()
94 return cc; in zpci_mod_fc()
102 int cc; in __rpcit() local
106 CC_IPM(cc) in __rpcit()
107 : CC_OUT(cc, cc), [fn] "+d" (fn) in __rpcit()
111 return CC_TRANSFORM(cc); in __rpcit()
117 u8 cc, status; in zpci_refresh_trans() local
120 cc = __rpcit(fn, addr, range, &status); in zpci_refresh_trans()
121 if (cc == 2) { in zpci_refresh_trans()
124 zpci_err_insn_addr(1, 'R', cc, status, addr, range); in zpci_refresh_trans()
128 } while (cc == 2); in zpci_refresh_trans()
130 if (cc) in zpci_refresh_trans()
131 zpci_err_insn_addr(0, 'R', cc, status, addr, range); in zpci_refresh_trans()
133 zpci_err_insn_addr(1, 'R', cc, status, addr, range); in zpci_refresh_trans()
135 if (cc == 1 && (status == 4 || status == 16)) in zpci_refresh_trans()
138 return (cc) ? -EIO : 0; in zpci_refresh_trans()
159 int cc, exception; in ____pcilg() local
167 CC_IPM(cc) in ____pcilg()
169 : CC_OUT(cc, cc), [data] "=d" (__data), in ____pcilg()
175 return exception ? -ENXIO : CC_TRANSFORM(cc); in ____pcilg()
181 int cc; in __pcilg() local
183 cc = ____pcilg(&__data, req, offset, status); in __pcilg()
184 if (!cc) in __pcilg()
187 return cc; in __pcilg()
194 int cc; in __zpci_load() local
197 cc = __pcilg(data, req, offset, &status); in __zpci_load()
198 if (cc == 2) { in __zpci_load()
201 zpci_err_insn_req(1, 'l', cc, status, req, offset); in __zpci_load()
205 } while (cc == 2); in __zpci_load()
207 if (cc) in __zpci_load()
208 zpci_err_insn_req(0, 'l', cc, status, req, offset); in __zpci_load()
210 zpci_err_insn_req(1, 'l', cc, status, req, offset); in __zpci_load()
212 return (cc > 0) ? -EIO : cc; in __zpci_load()
228 int cc, exception; in __pcilg_mio() local
236 CC_IPM(cc) in __pcilg_mio()
238 : CC_OUT(cc, cc), [data] "=d" (__data), in __pcilg_mio()
244 return exception ? -ENXIO : CC_TRANSFORM(cc); in __pcilg_mio()
250 int cc; in zpci_load() local
255 cc = __pcilg_mio(data, (__force u64) addr, len, &status); in zpci_load()
256 if (cc) in zpci_load()
257 zpci_err_insn_addr(0, 'L', cc, status, (__force u64) addr, len); in zpci_load()
259 return (cc > 0) ? -EIO : cc; in zpci_load()
267 int cc, exception; in __pcistg() local
274 CC_IPM(cc) in __pcistg()
276 : CC_OUT(cc, cc), [req_off] "+d" (req_off.pair), [exc] "+d" (exception) in __pcistg()
280 return exception ? -ENXIO : CC_TRANSFORM(cc); in __pcistg()
287 int cc; in __zpci_store() local
290 cc = __pcistg(data, req, offset, &status); in __zpci_store()
291 if (cc == 2) { in __zpci_store()
294 zpci_err_insn_req(1, 's', cc, status, req, offset); in __zpci_store()
298 } while (cc == 2); in __zpci_store()
300 if (cc) in __zpci_store()
301 zpci_err_insn_req(0, 's', cc, status, req, offset); in __zpci_store()
303 zpci_err_insn_req(1, 's', cc, status, req, offset); in __zpci_store()
305 return (cc > 0) ? -EIO : cc; in __zpci_store()
321 int cc, exception; in __pcistg_mio() local
328 CC_IPM(cc) in __pcistg_mio()
330 : CC_OUT(cc, cc), [ioaddr_len] "+d" (ioaddr_len.pair), [exc] "+d" (exception) in __pcistg_mio()
334 return exception ? -ENXIO : CC_TRANSFORM(cc); in __pcistg_mio()
340 int cc; in zpci_store() local
345 cc = __pcistg_mio(data, (__force u64) addr, len, &status); in zpci_store()
346 if (cc) in zpci_store()
347 zpci_err_insn_addr(0, 'S', cc, status, (__force u64) addr, len); in zpci_store()
349 return (cc > 0) ? -EIO : cc; in zpci_store()
356 int cc, exception; in __pcistb() local
363 CC_IPM(cc) in __pcistb()
365 : CC_OUT(cc, cc), [req] "+d" (req), [exc] "+d" (exception) in __pcistb()
369 return exception ? -ENXIO : CC_TRANSFORM(cc); in __pcistb()
376 int cc; in __zpci_store_block() local
379 cc = __pcistb(data, req, offset, &status); in __zpci_store_block()
380 if (cc == 2) { in __zpci_store_block()
383 zpci_err_insn_req(0, 'b', cc, status, req, offset); in __zpci_store_block()
387 } while (cc == 2); in __zpci_store_block()
389 if (cc) in __zpci_store_block()
390 zpci_err_insn_req(0, 'b', cc, status, req, offset); in __zpci_store_block()
392 zpci_err_insn_req(1, 'b', cc, status, req, offset); in __zpci_store_block()
394 return (cc > 0) ? -EIO : cc; in __zpci_store_block()
410 int cc, exception; in __pcistb_mio() local
417 CC_IPM(cc) in __pcistb_mio()
419 : CC_OUT(cc, cc), [len] "+d" (len), [exc] "+d" (exception) in __pcistb_mio()
423 return exception ? -ENXIO : CC_TRANSFORM(cc); in __pcistb_mio()
430 int cc; in zpci_write_block() local
435 cc = __pcistb_mio(src, (__force u64) dst, len, &status); in zpci_write_block()
436 if (cc) in zpci_write_block()
437 zpci_err_insn_addr(0, 'B', cc, status, (__force u64) dst, len); in zpci_write_block()
439 return (cc > 0) ? -EIO : cc; in zpci_write_block()