blob: c57c5c2f2484ab821a4f8aec2d4cf05af3209f70 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Linus Torvalds1da177e2005-04-16 15:20:36 -07002 * S390 version
Heiko Carstensa53c8fa2012-07-20 11:15:04 +02003 * Copyright IBM Corp. 1999
Linus Torvalds1da177e2005-04-16 15:20:36 -07004 * Author(s): Hartmut Penner (hp@de.ibm.com),
5 * Martin Schwidefsky (schwidefsky@de.ibm.com)
6 *
7 * Derived from "include/asm-i386/processor.h"
8 * Copyright (C) 1994, Linus Torvalds
9 */
10
11#ifndef __ASM_S390_PROCESSOR_H
12#define __ASM_S390_PROCESSOR_H
13
Heiko Carstens92778b92015-10-06 16:23:39 +020014#include <linux/const.h>
15
Martin Schwidefskyd3a73ac2014-04-15 12:55:07 +020016#define CIF_MCCK_PENDING 0 /* machine check handling is pending */
Heiko Carstens606aa4a2017-02-17 08:12:30 +010017#define CIF_ASCE_PRIMARY 1 /* primary asce needs fixup / uaccess */
Heiko Carstensb5a882f2017-02-17 08:13:28 +010018#define CIF_ASCE_SECONDARY 2 /* secondary asce needs fixup / uaccess */
19#define CIF_NOHZ_DELAY 3 /* delay HZ disable for a tick */
20#define CIF_FPU 4 /* restore FPU registers */
21#define CIF_IGNORE_IRQ 5 /* ignore interrupt (for udelay) */
22#define CIF_ENABLED_WAIT 6 /* in enabled wait state */
Martin Schwidefskyd3a73ac2014-04-15 12:55:07 +020023
Heiko Carstens92778b92015-10-06 16:23:39 +020024#define _CIF_MCCK_PENDING _BITUL(CIF_MCCK_PENDING)
Heiko Carstens606aa4a2017-02-17 08:12:30 +010025#define _CIF_ASCE_PRIMARY _BITUL(CIF_ASCE_PRIMARY)
Heiko Carstensb5a882f2017-02-17 08:13:28 +010026#define _CIF_ASCE_SECONDARY _BITUL(CIF_ASCE_SECONDARY)
Heiko Carstens92778b92015-10-06 16:23:39 +020027#define _CIF_NOHZ_DELAY _BITUL(CIF_NOHZ_DELAY)
28#define _CIF_FPU _BITUL(CIF_FPU)
29#define _CIF_IGNORE_IRQ _BITUL(CIF_IGNORE_IRQ)
Martin Schwidefsky419123f2015-11-19 11:09:45 +010030#define _CIF_ENABLED_WAIT _BITUL(CIF_ENABLED_WAIT)
Martin Schwidefskyd3a73ac2014-04-15 12:55:07 +020031
Heiko Carstenseb608fb2012-09-05 13:26:11 +020032#ifndef __ASSEMBLY__
33
Heiko Carstensedd53782008-12-25 13:39:16 +010034#include <linux/linkage.h>
David Howellsa0616cd2012-03-28 18:30:02 +010035#include <linux/irqflags.h>
Heiko Carstense86a6ed2009-09-11 10:29:04 +020036#include <asm/cpu.h>
Christian Ehrhardt25097bf2009-04-14 15:36:16 +020037#include <asm/page.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070038#include <asm/ptrace.h>
Christian Ehrhardt25097bf2009-04-14 15:36:16 +020039#include <asm/setup.h>
Jan Glaubere4b8b3f2012-07-31 10:52:05 +020040#include <asm/runtime_instr.h>
Hendrik Bruecknerb0753902015-10-06 12:25:59 +020041#include <asm/fpu/types.h>
42#include <asm/fpu/internal.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070043
Martin Schwidefskyd3a73ac2014-04-15 12:55:07 +020044static inline void set_cpu_flag(int flag)
45{
Heiko Carstensac25e792015-10-06 16:23:29 +020046 S390_lowcore.cpu_flags |= (1UL << flag);
Martin Schwidefskyd3a73ac2014-04-15 12:55:07 +020047}
48
49static inline void clear_cpu_flag(int flag)
50{
Heiko Carstensac25e792015-10-06 16:23:29 +020051 S390_lowcore.cpu_flags &= ~(1UL << flag);
Martin Schwidefskyd3a73ac2014-04-15 12:55:07 +020052}
53
54static inline int test_cpu_flag(int flag)
55{
Heiko Carstensac25e792015-10-06 16:23:29 +020056 return !!(S390_lowcore.cpu_flags & (1UL << flag));
Martin Schwidefskyd3a73ac2014-04-15 12:55:07 +020057}
58
Martin Schwidefsky419123f2015-11-19 11:09:45 +010059/*
60 * Test CIF flag of another CPU. The caller needs to ensure that
61 * CPU hotplug can not happen, e.g. by disabling preemption.
62 */
63static inline int test_cpu_flag_of(int flag, int cpu)
64{
Heiko Carstensc667aea2015-12-31 10:29:00 +010065 struct lowcore *lc = lowcore_ptr[cpu];
Martin Schwidefsky419123f2015-11-19 11:09:45 +010066 return !!(lc->cpu_flags & (1UL << flag));
67}
68
Martin Schwidefskyfe0f4972014-09-30 17:37:52 +020069#define arch_needs_cpu() test_cpu_flag(CIF_NOHZ_DELAY)
70
Linus Torvalds1da177e2005-04-16 15:20:36 -070071/*
72 * Default implementation of macro that returns current
73 * instruction pointer ("program counter").
74 */
Martin Schwidefsky94c12cc2006-09-28 16:56:43 +020075#define current_text_addr() ({ void *pc; asm("basr %0,0" : "=a" (pc)); pc; })
Linus Torvalds1da177e2005-04-16 15:20:36 -070076
Heiko Carstense86a6ed2009-09-11 10:29:04 +020077static inline void get_cpu_id(struct cpuid *ptr)
Michael Holzheu72960a02007-02-21 10:55:18 +010078{
Martin Schwidefsky987bcda2010-02-26 22:37:31 +010079 asm volatile("stidp %0" : "=Q" (*ptr));
Michael Holzheu72960a02007-02-21 10:55:18 +010080}
81
Heiko Carstens097a1162016-04-14 12:35:22 +020082void s390_adjust_jiffies(void);
83void s390_update_cpu_mhz(void);
84void cpu_detect_mhz_feature(void);
85
Martin Schwidefsky638ad342011-10-30 15:17:13 +010086extern const struct seq_operations cpuinfo_op;
87extern int sysctl_ieee_emulation_warnings;
Al Viro65f22a92012-09-06 15:48:11 -040088extern void execve_tail(void);
Linus Torvalds1da177e2005-04-16 15:20:36 -070089
Linus Torvalds1da177e2005-04-16 15:20:36 -070090/*
Martin Schwidefskyf481bfa2009-03-18 13:27:36 +010091 * User space process size: 2GB for 31 bit, 4TB or 8PT for 64 bit.
Linus Torvalds1da177e2005-04-16 15:20:36 -070092 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070093
Martin Schwidefskyf481bfa2009-03-18 13:27:36 +010094#define TASK_SIZE_OF(tsk) ((tsk)->mm->context.asce_limit)
Martin Schwidefsky5a216a22008-02-09 18:24:36 +010095#define TASK_UNMAPPED_BASE (test_thread_flag(TIF_31BIT) ? \
96 (1UL << 30) : (1UL << 41))
97#define TASK_SIZE TASK_SIZE_OF(current)
Martin Schwidefskyee6ee552013-07-26 15:04:03 +020098#define TASK_MAX_SIZE (1UL << 53)
Linus Torvalds1da177e2005-04-16 15:20:36 -070099
Martin Schwidefsky6252d702008-02-09 18:24:37 +0100100#define STACK_TOP (1UL << (test_thread_flag(TIF_31BIT) ? 31:42))
101#define STACK_TOP_MAX (1UL << 42)
David Howells922a70d2008-02-08 04:19:26 -0800102
Linus Torvalds1da177e2005-04-16 15:20:36 -0700103#define HAVE_ARCH_PICK_MMAP_LAYOUT
104
105typedef struct {
106 __u32 ar4;
107} mm_segment_t;
108
109/*
110 * Thread structure
111 */
112struct thread_struct {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700113 unsigned int acrs[NUM_ACRS];
114 unsigned long ksp; /* kernel stack pointer */
Martin Schwidefsky90c53e62016-11-08 12:15:59 +0100115 unsigned long user_timer; /* task cputime in user space */
Martin Schwidefskyb7394a52017-01-05 18:11:49 +0100116 unsigned long guest_timer; /* task cputime in kvm guest */
Martin Schwidefsky90c53e62016-11-08 12:15:59 +0100117 unsigned long system_timer; /* task cputime in kernel space */
Martin Schwidefskyb7394a52017-01-05 18:11:49 +0100118 unsigned long hardirq_timer; /* task cputime in hardirq context */
119 unsigned long softirq_timer; /* task cputime in softirq context */
Martin Schwidefskyef280c82016-11-08 12:33:38 +0100120 unsigned long sys_call_table; /* system call table address */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700121 mm_segment_t mm_segment;
Martin Schwidefskye5992f22011-07-24 10:48:20 +0200122 unsigned long gmap_addr; /* address of last gmap fault. */
Martin Schwidefsky4be130a2016-03-08 12:12:18 +0100123 unsigned int gmap_write_flag; /* gmap fault write indication */
David Hildenbrand4a494432016-03-08 12:31:52 +0100124 unsigned int gmap_int_code; /* int code of last gmap fault */
Dominik Dingel24eb3a82013-06-17 16:25:18 +0200125 unsigned int gmap_pfault; /* signal of a pending guest pfault */
Martin Schwidefskyf8fc82b2016-11-08 11:11:02 +0100126 /* Per-thread information related to debugging */
Martin Schwidefsky5e9a2692011-01-05 12:48:10 +0100127 struct per_regs per_user; /* User specified PER registers */
128 struct per_event per_event; /* Cause of the last PER trap */
Martin Schwidefskyd35339a2012-07-31 11:03:04 +0200129 unsigned long per_flags; /* Flags to control debug behavior */
Martin Schwidefskyf8fc82b2016-11-08 11:11:02 +0100130 unsigned int system_call; /* system call number in signal */
Martin Schwidefskyef280c82016-11-08 12:33:38 +0100131 unsigned long last_break; /* last breaking-event-address. */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700132 /* pfault_wait is used to block the process on a pfault event */
133 unsigned long pfault_wait;
Heiko Carstensf2db2e62011-05-23 10:24:34 +0200134 struct list_head list;
Jan Glaubere4b8b3f2012-07-31 10:52:05 +0200135 /* cpu runtime instrumentation */
136 struct runtime_instr_cb *ri_cb;
Martin Schwidefskyd35339a2012-07-31 11:03:04 +0200137 unsigned char trap_tdb[256]; /* Transaction abort diagnose block */
Martin Schwidefsky3f6813b2016-04-01 15:42:15 +0200138 /*
139 * Warning: 'fpu' is dynamically-sized. It *MUST* be at
140 * the end.
141 */
142 struct fpu fpu; /* FP and VX register save area */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700143};
144
Michael Mueller64597f92013-07-02 22:58:26 +0200145/* Flag to disable transactions. */
146#define PER_FLAG_NO_TE 1UL
147/* Flag to enable random transaction aborts. */
148#define PER_FLAG_TE_ABORT_RAND 2UL
149/* Flag to specify random transaction abort mode:
150 * - abort each transaction at a random instruction before TEND if set.
151 * - abort random transactions at a random instruction if cleared.
152 */
153#define PER_FLAG_TE_ABORT_RAND_TEND 4UL
Martin Schwidefskyd35339a2012-07-31 11:03:04 +0200154
Linus Torvalds1da177e2005-04-16 15:20:36 -0700155typedef struct thread_struct thread_struct;
156
157/*
158 * Stack layout of a C stack frame.
159 */
160#ifndef __PACK_STACK
161struct stack_frame {
162 unsigned long back_chain;
163 unsigned long empty1[5];
164 unsigned long gprs[10];
165 unsigned int empty2[8];
166};
167#else
168struct stack_frame {
169 unsigned long empty1[5];
170 unsigned int empty2[8];
171 unsigned long gprs[10];
172 unsigned long back_chain;
173};
174#endif
175
176#define ARCH_MIN_TASKALIGN 8
177
Martin Schwidefsky6f3fa3f2007-10-22 12:52:45 +0200178#define INIT_THREAD { \
179 .ksp = sizeof(init_stack) + (unsigned long) &init_stack, \
Martin Schwidefsky3f6813b2016-04-01 15:42:15 +0200180 .fpu.regs = (void *) init_task.thread.fpu.fprs, \
Martin Schwidefsky6f3fa3f2007-10-22 12:52:45 +0200181}
Linus Torvalds1da177e2005-04-16 15:20:36 -0700182
183/*
184 * Do necessary setup to start up a new thread.
185 */
Martin Schwidefskyb50511e2011-10-30 15:16:50 +0100186#define start_thread(regs, new_psw, new_stackp) do { \
Martin Schwidefskye258d712013-09-24 09:14:56 +0200187 regs->psw.mask = PSW_USER_BITS | PSW_MASK_EA | PSW_MASK_BA; \
Heiko Carstensfecc868a2016-01-18 12:49:44 +0100188 regs->psw.addr = new_psw; \
Martin Schwidefskyb50511e2011-10-30 15:16:50 +0100189 regs->gprs[15] = new_stackp; \
Al Viro65f22a92012-09-06 15:48:11 -0400190 execve_tail(); \
Martin Schwidefsky63506c42008-07-14 09:58:54 +0200191} while (0)
192
Martin Schwidefskyb50511e2011-10-30 15:16:50 +0100193#define start_thread31(regs, new_psw, new_stackp) do { \
Martin Schwidefskye258d712013-09-24 09:14:56 +0200194 regs->psw.mask = PSW_USER_BITS | PSW_MASK_BA; \
Heiko Carstensfecc868a2016-01-18 12:49:44 +0100195 regs->psw.addr = new_psw; \
Martin Schwidefskyb50511e2011-10-30 15:16:50 +0100196 regs->gprs[15] = new_stackp; \
Gerald Schaefer723cacb2016-04-15 16:38:40 +0200197 crst_table_downgrade(current->mm); \
Al Viro65f22a92012-09-06 15:48:11 -0400198 execve_tail(); \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700199} while (0)
200
Linus Torvalds1da177e2005-04-16 15:20:36 -0700201/* Forward declaration, a strange C thing */
202struct task_struct;
203struct mm_struct;
Eric W. Biedermandf5f8312008-02-08 04:18:33 -0800204struct seq_file;
Heiko Carstensb5a882f2017-02-17 08:13:28 +0100205struct pt_regs;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700206
Heiko Carstensd0208632016-10-17 11:08:31 +0200207typedef int (*dump_trace_func_t)(void *data, unsigned long address, int reliable);
Heiko Carstens758d39e2016-02-09 12:58:54 +0100208void dump_trace(dump_trace_func_t func, void *data,
209 struct task_struct *task, unsigned long sp);
Heiko Carstensb5a882f2017-02-17 08:13:28 +0100210void show_registers(struct pt_regs *regs);
Heiko Carstens758d39e2016-02-09 12:58:54 +0100211
Heiko Carstens5a798592015-02-12 13:08:27 +0100212void show_cacheinfo(struct seq_file *m);
Heiko Carstens66680222012-08-29 14:12:20 +0200213
Linus Torvalds1da177e2005-04-16 15:20:36 -0700214/* Free all resources held by a thread. */
215extern void release_thread(struct task_struct *);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700216
Linus Torvalds1da177e2005-04-16 15:20:36 -0700217/*
218 * Return saved PC of a blocked thread.
219 */
220extern unsigned long thread_saved_pc(struct task_struct *t);
221
Linus Torvalds1da177e2005-04-16 15:20:36 -0700222unsigned long get_wchan(struct task_struct *p);
Al Viroc7584fb2006-01-12 01:05:49 -0800223#define task_pt_regs(tsk) ((struct pt_regs *) \
Al Viro30af7122006-01-12 01:05:50 -0800224 (task_stack_page(tsk) + THREAD_SIZE) - 1)
Al Viroc7584fb2006-01-12 01:05:49 -0800225#define KSTK_EIP(tsk) (task_pt_regs(tsk)->psw.addr)
226#define KSTK_ESP(tsk) (task_pt_regs(tsk)->gprs[15])
Linus Torvalds1da177e2005-04-16 15:20:36 -0700227
Heiko Carstens5ebf2502013-10-16 09:58:01 +0200228/* Has task runtime instrumentation enabled ? */
229#define is_ri_task(tsk) (!!(tsk)->thread.ri_cb)
230
Heiko Carstens76737ce2016-01-31 17:06:16 +0100231static inline unsigned long current_stack_pointer(void)
232{
233 unsigned long sp;
234
235 asm volatile("la %0,0(15)" : "=a" (sp));
236 return sp;
237}
238
David Howellsa0616cd2012-03-28 18:30:02 +0100239static inline unsigned short stap(void)
240{
241 unsigned short cpu_address;
242
243 asm volatile("stap %0" : "=m" (cpu_address));
244 return cpu_address;
245}
246
Linus Torvalds1da177e2005-04-16 15:20:36 -0700247/*
248 * Give up the time slice of the virtual PU.
249 */
Christian Borntraeger6d0d2872016-11-16 13:23:05 +0100250#define cpu_relax_yield cpu_relax_yield
Christian Borntraeger79ab11c2016-10-25 11:03:11 +0200251void cpu_relax_yield(void);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700252
Christian Borntraeger22b64302016-10-25 11:03:13 +0200253#define cpu_relax() barrier()
Heiko Carstens083986e2013-09-28 11:23:59 +0200254
Heiko Carstens097a1162016-04-14 12:35:22 +0200255#define ECAG_CACHE_ATTRIBUTE 0
256#define ECAG_CPU_ATTRIBUTE 1
257
258static inline unsigned long __ecag(unsigned int asi, unsigned char parm)
259{
260 unsigned long val;
261
262 asm volatile(".insn rsy,0xeb000000004c,%0,0,0(%1)" /* ecag */
263 : "=d" (val) : "a" (asi << 8 | parm));
264 return val;
265}
266
Heiko Carstensdc74d7f2007-06-19 13:10:06 +0200267static inline void psw_set_key(unsigned int key)
268{
269 asm volatile("spka 0(%0)" : : "d" (key));
270}
271
Linus Torvalds1da177e2005-04-16 15:20:36 -0700272/*
Heiko Carstens77fa2242005-06-25 14:55:30 -0700273 * Set PSW to specified value.
274 */
275static inline void __load_psw(psw_t psw)
276{
Martin Schwidefsky987bcda2010-02-26 22:37:31 +0100277 asm volatile("lpswe %0" : : "Q" (psw) : "cc");
Heiko Carstens77fa2242005-06-25 14:55:30 -0700278}
279
280/*
Linus Torvalds1da177e2005-04-16 15:20:36 -0700281 * Set PSW mask to specified value, while leaving the
282 * PSW addr pointing to the next instruction.
283 */
Heiko Carstensecbafda2015-10-12 11:54:03 +0200284static inline void __load_psw_mask(unsigned long mask)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700285{
286 unsigned long addr;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700287 psw_t psw;
Heiko Carstens77fa2242005-06-25 14:55:30 -0700288
Linus Torvalds1da177e2005-04-16 15:20:36 -0700289 psw.mask = mask;
290
Martin Schwidefsky94c12cc2006-09-28 16:56:43 +0200291 asm volatile(
292 " larl %0,1f\n"
Martin Schwidefsky987bcda2010-02-26 22:37:31 +0100293 " stg %0,%O1+8(%R1)\n"
294 " lpswe %1\n"
Linus Torvalds1da177e2005-04-16 15:20:36 -0700295 "1:"
Martin Schwidefsky987bcda2010-02-26 22:37:31 +0100296 : "=&d" (addr), "=Q" (psw) : "Q" (psw) : "memory", "cc");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700297}
Martin Schwidefskyccf45ca2011-10-30 15:16:48 +0100298
299/*
Martin Schwidefsky22362a02015-07-08 10:20:04 +0200300 * Extract current PSW mask
301 */
302static inline unsigned long __extract_psw(void)
303{
304 unsigned int reg1, reg2;
305
306 asm volatile("epsw %0,%1" : "=d" (reg1), "=a" (reg2));
307 return (((unsigned long) reg1) << 32) | ((unsigned long) reg2);
308}
309
Heiko Carstensecbafda2015-10-12 11:54:03 +0200310static inline void local_mcck_enable(void)
311{
312 __load_psw_mask(__extract_psw() | PSW_MASK_MCHECK);
313}
314
315static inline void local_mcck_disable(void)
316{
317 __load_psw_mask(__extract_psw() & ~PSW_MASK_MCHECK);
318}
319
Martin Schwidefsky22362a02015-07-08 10:20:04 +0200320/*
Martin Schwidefskyccf45ca2011-10-30 15:16:48 +0100321 * Rewind PSW instruction address by specified number of bytes.
322 */
323static inline unsigned long __rewind_psw(psw_t psw, unsigned long ilc)
324{
Martin Schwidefskyccf45ca2011-10-30 15:16:48 +0100325 unsigned long mask;
326
327 mask = (psw.mask & PSW_MASK_EA) ? -1UL :
328 (psw.mask & PSW_MASK_BA) ? (1UL << 31) - 1 :
329 (1UL << 24) - 1;
330 return (psw.addr - ilc) & mask;
Martin Schwidefskyccf45ca2011-10-30 15:16:48 +0100331}
Martin Schwidefskyb5f87f12014-10-01 10:57:57 +0200332
333/*
334 * Function to stop a processor until the next interrupt occurs
335 */
336void enabled_wait(void);
337
Linus Torvalds1da177e2005-04-16 15:20:36 -0700338/*
Linus Torvalds1da177e2005-04-16 15:20:36 -0700339 * Function to drop a processor into disabled wait state
340 */
Joe Perchesff2d8b12012-01-12 17:17:21 -0800341static inline void __noreturn disabled_wait(unsigned long code)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700342{
Heiko Carstensf9e6edf2015-10-12 12:28:28 +0200343 psw_t psw;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700344
Heiko Carstensf9e6edf2015-10-12 12:28:28 +0200345 psw.mask = PSW_MASK_BASE | PSW_MASK_WAIT | PSW_MASK_BA | PSW_MASK_EA;
346 psw.addr = code;
347 __load_psw(psw);
Heiko Carstensedd53782008-12-25 13:39:16 +0100348 while (1);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700349}
350
351/*
Heiko Carstensab14de62007-02-05 21:18:37 +0100352 * Basic Machine Check/Program Check Handler.
353 */
354
355extern void s390_base_mcck_handler(void);
356extern void s390_base_pgm_handler(void);
357extern void s390_base_ext_handler(void);
358
359extern void (*s390_base_mcck_handler_fn)(void);
360extern void (*s390_base_pgm_handler_fn)(void);
361extern void (*s390_base_ext_handler_fn)(void);
362
Heiko Carstensdfd54cb2006-09-25 23:31:33 -0700363#define ARCH_LOW_ADDRESS_LIMIT 0x7fffffffUL
364
Heiko Carstensfbe76562012-06-05 09:59:52 +0200365extern int memcpy_real(void *, void *, size_t);
366extern void memcpy_absolute(void *, void *, size_t);
367
Heiko Carstens1228f7b2017-02-16 10:41:52 +0100368#define mem_assign_absolute(dest, val) do { \
Heiko Carstensfbe76562012-06-05 09:59:52 +0200369 __typeof__(dest) __tmp = (val); \
370 \
371 BUILD_BUG_ON(sizeof(__tmp) != sizeof(val)); \
372 memcpy_absolute(&(dest), &__tmp, sizeof(__tmp)); \
Heiko Carstens1228f7b2017-02-16 10:41:52 +0100373} while (0)
Heiko Carstensfbe76562012-06-05 09:59:52 +0200374
Heiko Carstenseb608fb2012-09-05 13:26:11 +0200375#endif /* __ASSEMBLY__ */
376
377#endif /* __ASM_S390_PROCESSOR_H */