1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun * Adjunct processor (AP) interfaces
4*4882a593Smuzhiyun *
5*4882a593Smuzhiyun * Copyright IBM Corp. 2017
6*4882a593Smuzhiyun *
7*4882a593Smuzhiyun * Author(s): Tony Krowiak <akrowia@linux.vnet.ibm.com>
8*4882a593Smuzhiyun * Martin Schwidefsky <schwidefsky@de.ibm.com>
9*4882a593Smuzhiyun * Harald Freudenberger <freude@de.ibm.com>
10*4882a593Smuzhiyun */
11*4882a593Smuzhiyun
12*4882a593Smuzhiyun #ifndef _ASM_S390_AP_H_
13*4882a593Smuzhiyun #define _ASM_S390_AP_H_
14*4882a593Smuzhiyun
15*4882a593Smuzhiyun /**
16*4882a593Smuzhiyun * The ap_qid_t identifier of an ap queue.
17*4882a593Smuzhiyun * If the AP facilities test (APFT) facility is available,
18*4882a593Smuzhiyun * card and queue index are 8 bit values, otherwise
19*4882a593Smuzhiyun * card index is 6 bit and queue index a 4 bit value.
20*4882a593Smuzhiyun */
21*4882a593Smuzhiyun typedef unsigned int ap_qid_t;
22*4882a593Smuzhiyun
23*4882a593Smuzhiyun #define AP_MKQID(_card, _queue) (((_card) & 0xff) << 8 | ((_queue) & 0xff))
24*4882a593Smuzhiyun #define AP_QID_CARD(_qid) (((_qid) >> 8) & 0xff)
25*4882a593Smuzhiyun #define AP_QID_QUEUE(_qid) ((_qid) & 0xff)
26*4882a593Smuzhiyun
27*4882a593Smuzhiyun /**
28*4882a593Smuzhiyun * struct ap_queue_status - Holds the AP queue status.
29*4882a593Smuzhiyun * @queue_empty: Shows if queue is empty
30*4882a593Smuzhiyun * @replies_waiting: Waiting replies
31*4882a593Smuzhiyun * @queue_full: Is 1 if the queue is full
32*4882a593Smuzhiyun * @irq_enabled: Shows if interrupts are enabled for the AP
33*4882a593Smuzhiyun * @response_code: Holds the 8 bit response code
34*4882a593Smuzhiyun *
35*4882a593Smuzhiyun * The ap queue status word is returned by all three AP functions
36*4882a593Smuzhiyun * (PQAP, NQAP and DQAP). There's a set of flags in the first
37*4882a593Smuzhiyun * byte, followed by a 1 byte response code.
38*4882a593Smuzhiyun */
39*4882a593Smuzhiyun struct ap_queue_status {
40*4882a593Smuzhiyun unsigned int queue_empty : 1;
41*4882a593Smuzhiyun unsigned int replies_waiting : 1;
42*4882a593Smuzhiyun unsigned int queue_full : 1;
43*4882a593Smuzhiyun unsigned int _pad1 : 4;
44*4882a593Smuzhiyun unsigned int irq_enabled : 1;
45*4882a593Smuzhiyun unsigned int response_code : 8;
46*4882a593Smuzhiyun unsigned int _pad2 : 16;
47*4882a593Smuzhiyun };
48*4882a593Smuzhiyun
49*4882a593Smuzhiyun /**
50*4882a593Smuzhiyun * ap_intructions_available() - Test if AP instructions are available.
51*4882a593Smuzhiyun *
52*4882a593Smuzhiyun * Returns true if the AP instructions are installed, otherwise false.
53*4882a593Smuzhiyun */
ap_instructions_available(void)54*4882a593Smuzhiyun static inline bool ap_instructions_available(void)
55*4882a593Smuzhiyun {
56*4882a593Smuzhiyun register unsigned long reg0 asm ("0") = AP_MKQID(0, 0);
57*4882a593Smuzhiyun register unsigned long reg1 asm ("1") = 0;
58*4882a593Smuzhiyun register unsigned long reg2 asm ("2") = 0;
59*4882a593Smuzhiyun
60*4882a593Smuzhiyun asm volatile(
61*4882a593Smuzhiyun " .long 0xb2af0000\n" /* PQAP(TAPQ) */
62*4882a593Smuzhiyun "0: la %0,1\n"
63*4882a593Smuzhiyun "1:\n"
64*4882a593Smuzhiyun EX_TABLE(0b, 1b)
65*4882a593Smuzhiyun : "+d" (reg1), "+d" (reg2)
66*4882a593Smuzhiyun : "d" (reg0)
67*4882a593Smuzhiyun : "cc");
68*4882a593Smuzhiyun return reg1 != 0;
69*4882a593Smuzhiyun }
70*4882a593Smuzhiyun
71*4882a593Smuzhiyun /**
72*4882a593Smuzhiyun * ap_tapq(): Test adjunct processor queue.
73*4882a593Smuzhiyun * @qid: The AP queue number
74*4882a593Smuzhiyun * @info: Pointer to queue descriptor
75*4882a593Smuzhiyun *
76*4882a593Smuzhiyun * Returns AP queue status structure.
77*4882a593Smuzhiyun */
ap_tapq(ap_qid_t qid,unsigned long * info)78*4882a593Smuzhiyun static inline struct ap_queue_status ap_tapq(ap_qid_t qid, unsigned long *info)
79*4882a593Smuzhiyun {
80*4882a593Smuzhiyun register unsigned long reg0 asm ("0") = qid;
81*4882a593Smuzhiyun register struct ap_queue_status reg1 asm ("1");
82*4882a593Smuzhiyun register unsigned long reg2 asm ("2");
83*4882a593Smuzhiyun
84*4882a593Smuzhiyun asm volatile(".long 0xb2af0000" /* PQAP(TAPQ) */
85*4882a593Smuzhiyun : "=d" (reg1), "=d" (reg2)
86*4882a593Smuzhiyun : "d" (reg0)
87*4882a593Smuzhiyun : "cc");
88*4882a593Smuzhiyun if (info)
89*4882a593Smuzhiyun *info = reg2;
90*4882a593Smuzhiyun return reg1;
91*4882a593Smuzhiyun }
92*4882a593Smuzhiyun
93*4882a593Smuzhiyun /**
94*4882a593Smuzhiyun * ap_test_queue(): Test adjunct processor queue.
95*4882a593Smuzhiyun * @qid: The AP queue number
96*4882a593Smuzhiyun * @tbit: Test facilities bit
97*4882a593Smuzhiyun * @info: Pointer to queue descriptor
98*4882a593Smuzhiyun *
99*4882a593Smuzhiyun * Returns AP queue status structure.
100*4882a593Smuzhiyun */
ap_test_queue(ap_qid_t qid,int tbit,unsigned long * info)101*4882a593Smuzhiyun static inline struct ap_queue_status ap_test_queue(ap_qid_t qid,
102*4882a593Smuzhiyun int tbit,
103*4882a593Smuzhiyun unsigned long *info)
104*4882a593Smuzhiyun {
105*4882a593Smuzhiyun if (tbit)
106*4882a593Smuzhiyun qid |= 1UL << 23; /* set T bit*/
107*4882a593Smuzhiyun return ap_tapq(qid, info);
108*4882a593Smuzhiyun }
109*4882a593Smuzhiyun
110*4882a593Smuzhiyun /**
111*4882a593Smuzhiyun * ap_pqap_rapq(): Reset adjunct processor queue.
112*4882a593Smuzhiyun * @qid: The AP queue number
113*4882a593Smuzhiyun *
114*4882a593Smuzhiyun * Returns AP queue status structure.
115*4882a593Smuzhiyun */
ap_rapq(ap_qid_t qid)116*4882a593Smuzhiyun static inline struct ap_queue_status ap_rapq(ap_qid_t qid)
117*4882a593Smuzhiyun {
118*4882a593Smuzhiyun register unsigned long reg0 asm ("0") = qid | (1UL << 24);
119*4882a593Smuzhiyun register struct ap_queue_status reg1 asm ("1");
120*4882a593Smuzhiyun
121*4882a593Smuzhiyun asm volatile(
122*4882a593Smuzhiyun ".long 0xb2af0000" /* PQAP(RAPQ) */
123*4882a593Smuzhiyun : "=d" (reg1)
124*4882a593Smuzhiyun : "d" (reg0)
125*4882a593Smuzhiyun : "cc");
126*4882a593Smuzhiyun return reg1;
127*4882a593Smuzhiyun }
128*4882a593Smuzhiyun
129*4882a593Smuzhiyun /**
130*4882a593Smuzhiyun * ap_pqap_zapq(): Reset and zeroize adjunct processor queue.
131*4882a593Smuzhiyun * @qid: The AP queue number
132*4882a593Smuzhiyun *
133*4882a593Smuzhiyun * Returns AP queue status structure.
134*4882a593Smuzhiyun */
ap_zapq(ap_qid_t qid)135*4882a593Smuzhiyun static inline struct ap_queue_status ap_zapq(ap_qid_t qid)
136*4882a593Smuzhiyun {
137*4882a593Smuzhiyun register unsigned long reg0 asm ("0") = qid | (2UL << 24);
138*4882a593Smuzhiyun register struct ap_queue_status reg1 asm ("1");
139*4882a593Smuzhiyun
140*4882a593Smuzhiyun asm volatile(
141*4882a593Smuzhiyun ".long 0xb2af0000" /* PQAP(ZAPQ) */
142*4882a593Smuzhiyun : "=d" (reg1)
143*4882a593Smuzhiyun : "d" (reg0)
144*4882a593Smuzhiyun : "cc");
145*4882a593Smuzhiyun return reg1;
146*4882a593Smuzhiyun }
147*4882a593Smuzhiyun
148*4882a593Smuzhiyun /**
149*4882a593Smuzhiyun * struct ap_config_info - convenience struct for AP crypto
150*4882a593Smuzhiyun * config info as returned by the ap_qci() function.
151*4882a593Smuzhiyun */
152*4882a593Smuzhiyun struct ap_config_info {
153*4882a593Smuzhiyun unsigned int apsc : 1; /* S bit */
154*4882a593Smuzhiyun unsigned int apxa : 1; /* N bit */
155*4882a593Smuzhiyun unsigned int qact : 1; /* C bit */
156*4882a593Smuzhiyun unsigned int rc8a : 1; /* R bit */
157*4882a593Smuzhiyun unsigned char _reserved1 : 4;
158*4882a593Smuzhiyun unsigned char _reserved2[3];
159*4882a593Smuzhiyun unsigned char Na; /* max # of APs - 1 */
160*4882a593Smuzhiyun unsigned char Nd; /* max # of Domains - 1 */
161*4882a593Smuzhiyun unsigned char _reserved3[10];
162*4882a593Smuzhiyun unsigned int apm[8]; /* AP ID mask */
163*4882a593Smuzhiyun unsigned int aqm[8]; /* AP (usage) queue mask */
164*4882a593Smuzhiyun unsigned int adm[8]; /* AP (control) domain mask */
165*4882a593Smuzhiyun unsigned char _reserved4[16];
166*4882a593Smuzhiyun } __aligned(8);
167*4882a593Smuzhiyun
168*4882a593Smuzhiyun /**
169*4882a593Smuzhiyun * ap_qci(): Get AP configuration data
170*4882a593Smuzhiyun *
171*4882a593Smuzhiyun * Returns 0 on success, or -EOPNOTSUPP.
172*4882a593Smuzhiyun */
ap_qci(struct ap_config_info * config)173*4882a593Smuzhiyun static inline int ap_qci(struct ap_config_info *config)
174*4882a593Smuzhiyun {
175*4882a593Smuzhiyun register unsigned long reg0 asm ("0") = 4UL << 24;
176*4882a593Smuzhiyun register unsigned long reg1 asm ("1") = -EOPNOTSUPP;
177*4882a593Smuzhiyun register struct ap_config_info *reg2 asm ("2") = config;
178*4882a593Smuzhiyun
179*4882a593Smuzhiyun asm volatile(
180*4882a593Smuzhiyun ".long 0xb2af0000\n" /* PQAP(QCI) */
181*4882a593Smuzhiyun "0: la %0,0\n"
182*4882a593Smuzhiyun "1:\n"
183*4882a593Smuzhiyun EX_TABLE(0b, 1b)
184*4882a593Smuzhiyun : "+d" (reg1)
185*4882a593Smuzhiyun : "d" (reg0), "d" (reg2)
186*4882a593Smuzhiyun : "cc", "memory");
187*4882a593Smuzhiyun
188*4882a593Smuzhiyun return reg1;
189*4882a593Smuzhiyun }
190*4882a593Smuzhiyun
191*4882a593Smuzhiyun /*
192*4882a593Smuzhiyun * struct ap_qirq_ctrl - convenient struct for easy invocation
193*4882a593Smuzhiyun * of the ap_aqic() function. This struct is passed as GR1
194*4882a593Smuzhiyun * parameter to the PQAP(AQIC) instruction. For details please
195*4882a593Smuzhiyun * see the AR documentation.
196*4882a593Smuzhiyun */
197*4882a593Smuzhiyun struct ap_qirq_ctrl {
198*4882a593Smuzhiyun unsigned int _res1 : 8;
199*4882a593Smuzhiyun unsigned int zone : 8; /* zone info */
200*4882a593Smuzhiyun unsigned int ir : 1; /* ir flag: enable (1) or disable (0) irq */
201*4882a593Smuzhiyun unsigned int _res2 : 4;
202*4882a593Smuzhiyun unsigned int gisc : 3; /* guest isc field */
203*4882a593Smuzhiyun unsigned int _res3 : 6;
204*4882a593Smuzhiyun unsigned int gf : 2; /* gisa format */
205*4882a593Smuzhiyun unsigned int _res4 : 1;
206*4882a593Smuzhiyun unsigned int gisa : 27; /* gisa origin */
207*4882a593Smuzhiyun unsigned int _res5 : 1;
208*4882a593Smuzhiyun unsigned int isc : 3; /* irq sub class */
209*4882a593Smuzhiyun };
210*4882a593Smuzhiyun
211*4882a593Smuzhiyun /**
212*4882a593Smuzhiyun * ap_aqic(): Control interruption for a specific AP.
213*4882a593Smuzhiyun * @qid: The AP queue number
214*4882a593Smuzhiyun * @qirqctrl: struct ap_qirq_ctrl (64 bit value)
215*4882a593Smuzhiyun * @ind: The notification indicator byte
216*4882a593Smuzhiyun *
217*4882a593Smuzhiyun * Returns AP queue status.
218*4882a593Smuzhiyun */
ap_aqic(ap_qid_t qid,struct ap_qirq_ctrl qirqctrl,void * ind)219*4882a593Smuzhiyun static inline struct ap_queue_status ap_aqic(ap_qid_t qid,
220*4882a593Smuzhiyun struct ap_qirq_ctrl qirqctrl,
221*4882a593Smuzhiyun void *ind)
222*4882a593Smuzhiyun {
223*4882a593Smuzhiyun register unsigned long reg0 asm ("0") = qid | (3UL << 24);
224*4882a593Smuzhiyun register union {
225*4882a593Smuzhiyun unsigned long value;
226*4882a593Smuzhiyun struct ap_qirq_ctrl qirqctrl;
227*4882a593Smuzhiyun struct ap_queue_status status;
228*4882a593Smuzhiyun } reg1 asm ("1");
229*4882a593Smuzhiyun register void *reg2 asm ("2") = ind;
230*4882a593Smuzhiyun
231*4882a593Smuzhiyun reg1.qirqctrl = qirqctrl;
232*4882a593Smuzhiyun
233*4882a593Smuzhiyun asm volatile(
234*4882a593Smuzhiyun ".long 0xb2af0000" /* PQAP(AQIC) */
235*4882a593Smuzhiyun : "+d" (reg1)
236*4882a593Smuzhiyun : "d" (reg0), "d" (reg2)
237*4882a593Smuzhiyun : "cc");
238*4882a593Smuzhiyun
239*4882a593Smuzhiyun return reg1.status;
240*4882a593Smuzhiyun }
241*4882a593Smuzhiyun
242*4882a593Smuzhiyun /*
243*4882a593Smuzhiyun * union ap_qact_ap_info - used together with the
244*4882a593Smuzhiyun * ap_aqic() function to provide a convenient way
245*4882a593Smuzhiyun * to handle the ap info needed by the qact function.
246*4882a593Smuzhiyun */
247*4882a593Smuzhiyun union ap_qact_ap_info {
248*4882a593Smuzhiyun unsigned long val;
249*4882a593Smuzhiyun struct {
250*4882a593Smuzhiyun unsigned int : 3;
251*4882a593Smuzhiyun unsigned int mode : 3;
252*4882a593Smuzhiyun unsigned int : 26;
253*4882a593Smuzhiyun unsigned int cat : 8;
254*4882a593Smuzhiyun unsigned int : 8;
255*4882a593Smuzhiyun unsigned char ver[2];
256*4882a593Smuzhiyun };
257*4882a593Smuzhiyun };
258*4882a593Smuzhiyun
259*4882a593Smuzhiyun /**
260*4882a593Smuzhiyun * ap_qact(): Query AP combatibility type.
261*4882a593Smuzhiyun * @qid: The AP queue number
262*4882a593Smuzhiyun * @apinfo: On input the info about the AP queue. On output the
263*4882a593Smuzhiyun * alternate AP queue info provided by the qact function
264*4882a593Smuzhiyun * in GR2 is stored in.
265*4882a593Smuzhiyun *
266*4882a593Smuzhiyun * Returns AP queue status. Check response_code field for failures.
267*4882a593Smuzhiyun */
ap_qact(ap_qid_t qid,int ifbit,union ap_qact_ap_info * apinfo)268*4882a593Smuzhiyun static inline struct ap_queue_status ap_qact(ap_qid_t qid, int ifbit,
269*4882a593Smuzhiyun union ap_qact_ap_info *apinfo)
270*4882a593Smuzhiyun {
271*4882a593Smuzhiyun register unsigned long reg0 asm ("0") = qid | (5UL << 24)
272*4882a593Smuzhiyun | ((ifbit & 0x01) << 22);
273*4882a593Smuzhiyun register union {
274*4882a593Smuzhiyun unsigned long value;
275*4882a593Smuzhiyun struct ap_queue_status status;
276*4882a593Smuzhiyun } reg1 asm ("1");
277*4882a593Smuzhiyun register unsigned long reg2 asm ("2");
278*4882a593Smuzhiyun
279*4882a593Smuzhiyun reg1.value = apinfo->val;
280*4882a593Smuzhiyun
281*4882a593Smuzhiyun asm volatile(
282*4882a593Smuzhiyun ".long 0xb2af0000" /* PQAP(QACT) */
283*4882a593Smuzhiyun : "+d" (reg1), "=d" (reg2)
284*4882a593Smuzhiyun : "d" (reg0)
285*4882a593Smuzhiyun : "cc");
286*4882a593Smuzhiyun apinfo->val = reg2;
287*4882a593Smuzhiyun return reg1.status;
288*4882a593Smuzhiyun }
289*4882a593Smuzhiyun
290*4882a593Smuzhiyun /**
291*4882a593Smuzhiyun * ap_nqap(): Send message to adjunct processor queue.
292*4882a593Smuzhiyun * @qid: The AP queue number
293*4882a593Smuzhiyun * @psmid: The program supplied message identifier
294*4882a593Smuzhiyun * @msg: The message text
295*4882a593Smuzhiyun * @length: The message length
296*4882a593Smuzhiyun *
297*4882a593Smuzhiyun * Returns AP queue status structure.
298*4882a593Smuzhiyun * Condition code 1 on NQAP can't happen because the L bit is 1.
299*4882a593Smuzhiyun * Condition code 2 on NQAP also means the send is incomplete,
300*4882a593Smuzhiyun * because a segment boundary was reached. The NQAP is repeated.
301*4882a593Smuzhiyun */
ap_nqap(ap_qid_t qid,unsigned long long psmid,void * msg,size_t length)302*4882a593Smuzhiyun static inline struct ap_queue_status ap_nqap(ap_qid_t qid,
303*4882a593Smuzhiyun unsigned long long psmid,
304*4882a593Smuzhiyun void *msg, size_t length)
305*4882a593Smuzhiyun {
306*4882a593Smuzhiyun register unsigned long reg0 asm ("0") = qid | 0x40000000UL;
307*4882a593Smuzhiyun register struct ap_queue_status reg1 asm ("1");
308*4882a593Smuzhiyun register unsigned long reg2 asm ("2") = (unsigned long) msg;
309*4882a593Smuzhiyun register unsigned long reg3 asm ("3") = (unsigned long) length;
310*4882a593Smuzhiyun register unsigned long reg4 asm ("4") = (unsigned int) (psmid >> 32);
311*4882a593Smuzhiyun register unsigned long reg5 asm ("5") = psmid & 0xffffffff;
312*4882a593Smuzhiyun
313*4882a593Smuzhiyun asm volatile (
314*4882a593Smuzhiyun "0: .long 0xb2ad0042\n" /* NQAP */
315*4882a593Smuzhiyun " brc 2,0b"
316*4882a593Smuzhiyun : "+d" (reg0), "=d" (reg1), "+d" (reg2), "+d" (reg3)
317*4882a593Smuzhiyun : "d" (reg4), "d" (reg5)
318*4882a593Smuzhiyun : "cc", "memory");
319*4882a593Smuzhiyun return reg1;
320*4882a593Smuzhiyun }
321*4882a593Smuzhiyun
322*4882a593Smuzhiyun /**
323*4882a593Smuzhiyun * ap_dqap(): Receive message from adjunct processor queue.
324*4882a593Smuzhiyun * @qid: The AP queue number
325*4882a593Smuzhiyun * @psmid: Pointer to program supplied message identifier
326*4882a593Smuzhiyun * @msg: The message text
327*4882a593Smuzhiyun * @length: The message length
328*4882a593Smuzhiyun *
329*4882a593Smuzhiyun * Returns AP queue status structure.
330*4882a593Smuzhiyun * Condition code 1 on DQAP means the receive has taken place
331*4882a593Smuzhiyun * but only partially. The response is incomplete, hence the
332*4882a593Smuzhiyun * DQAP is repeated.
333*4882a593Smuzhiyun * Condition code 2 on DQAP also means the receive is incomplete,
334*4882a593Smuzhiyun * this time because a segment boundary was reached. Again, the
335*4882a593Smuzhiyun * DQAP is repeated.
336*4882a593Smuzhiyun * Note that gpr2 is used by the DQAP instruction to keep track of
337*4882a593Smuzhiyun * any 'residual' length, in case the instruction gets interrupted.
338*4882a593Smuzhiyun * Hence it gets zeroed before the instruction.
339*4882a593Smuzhiyun */
ap_dqap(ap_qid_t qid,unsigned long long * psmid,void * msg,size_t length)340*4882a593Smuzhiyun static inline struct ap_queue_status ap_dqap(ap_qid_t qid,
341*4882a593Smuzhiyun unsigned long long *psmid,
342*4882a593Smuzhiyun void *msg, size_t length)
343*4882a593Smuzhiyun {
344*4882a593Smuzhiyun register unsigned long reg0 asm("0") = qid | 0x80000000UL;
345*4882a593Smuzhiyun register struct ap_queue_status reg1 asm ("1");
346*4882a593Smuzhiyun register unsigned long reg2 asm("2") = 0UL;
347*4882a593Smuzhiyun register unsigned long reg4 asm("4") = (unsigned long) msg;
348*4882a593Smuzhiyun register unsigned long reg5 asm("5") = (unsigned long) length;
349*4882a593Smuzhiyun register unsigned long reg6 asm("6") = 0UL;
350*4882a593Smuzhiyun register unsigned long reg7 asm("7") = 0UL;
351*4882a593Smuzhiyun
352*4882a593Smuzhiyun
353*4882a593Smuzhiyun asm volatile(
354*4882a593Smuzhiyun "0: .long 0xb2ae0064\n" /* DQAP */
355*4882a593Smuzhiyun " brc 6,0b\n"
356*4882a593Smuzhiyun : "+d" (reg0), "=d" (reg1), "+d" (reg2),
357*4882a593Smuzhiyun "+d" (reg4), "+d" (reg5), "+d" (reg6), "+d" (reg7)
358*4882a593Smuzhiyun : : "cc", "memory");
359*4882a593Smuzhiyun *psmid = (((unsigned long long) reg6) << 32) + reg7;
360*4882a593Smuzhiyun return reg1;
361*4882a593Smuzhiyun }
362*4882a593Smuzhiyun
363*4882a593Smuzhiyun /*
364*4882a593Smuzhiyun * Interface to tell the AP bus code that a configuration
365*4882a593Smuzhiyun * change has happened. The bus code should at least do
366*4882a593Smuzhiyun * an ap bus resource rescan.
367*4882a593Smuzhiyun */
368*4882a593Smuzhiyun #if IS_ENABLED(CONFIG_ZCRYPT)
369*4882a593Smuzhiyun void ap_bus_cfg_chg(void);
370*4882a593Smuzhiyun #else
ap_bus_cfg_chg(void)371*4882a593Smuzhiyun static inline void ap_bus_cfg_chg(void){};
372*4882a593Smuzhiyun #endif
373*4882a593Smuzhiyun
374*4882a593Smuzhiyun #endif /* _ASM_S390_AP_H_ */
375