18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * S390 version 48c2ecf20Sopenharmony_ci * Copyright IBM Corp. 1999 58c2ecf20Sopenharmony_ci * Author(s): Hartmut Penner (hp@de.ibm.com), 68c2ecf20Sopenharmony_ci * Martin Schwidefsky (schwidefsky@de.ibm.com) 78c2ecf20Sopenharmony_ci * 88c2ecf20Sopenharmony_ci * Derived from "include/asm-i386/processor.h" 98c2ecf20Sopenharmony_ci * Copyright (C) 1994, Linus Torvalds 108c2ecf20Sopenharmony_ci */ 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#ifndef __ASM_S390_PROCESSOR_H 138c2ecf20Sopenharmony_ci#define __ASM_S390_PROCESSOR_H 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci#include <linux/bits.h> 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci#define CIF_ASCE_PRIMARY 0 /* primary asce needs fixup / uaccess */ 188c2ecf20Sopenharmony_ci#define CIF_ASCE_SECONDARY 1 /* secondary asce needs fixup / uaccess */ 198c2ecf20Sopenharmony_ci#define CIF_NOHZ_DELAY 2 /* delay HZ disable for a tick */ 208c2ecf20Sopenharmony_ci#define CIF_FPU 3 /* restore FPU registers */ 218c2ecf20Sopenharmony_ci#define CIF_IGNORE_IRQ 4 /* ignore interrupt (for udelay) */ 228c2ecf20Sopenharmony_ci#define CIF_ENABLED_WAIT 5 /* in enabled wait state */ 238c2ecf20Sopenharmony_ci#define CIF_MCCK_GUEST 6 /* machine check happening in guest */ 248c2ecf20Sopenharmony_ci#define CIF_DEDICATED_CPU 7 /* this CPU is dedicated */ 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci#define _CIF_ASCE_PRIMARY BIT(CIF_ASCE_PRIMARY) 278c2ecf20Sopenharmony_ci#define _CIF_ASCE_SECONDARY BIT(CIF_ASCE_SECONDARY) 288c2ecf20Sopenharmony_ci#define _CIF_NOHZ_DELAY BIT(CIF_NOHZ_DELAY) 298c2ecf20Sopenharmony_ci#define _CIF_FPU BIT(CIF_FPU) 308c2ecf20Sopenharmony_ci#define _CIF_IGNORE_IRQ BIT(CIF_IGNORE_IRQ) 318c2ecf20Sopenharmony_ci#define _CIF_ENABLED_WAIT BIT(CIF_ENABLED_WAIT) 328c2ecf20Sopenharmony_ci#define _CIF_MCCK_GUEST BIT(CIF_MCCK_GUEST) 338c2ecf20Sopenharmony_ci#define _CIF_DEDICATED_CPU BIT(CIF_DEDICATED_CPU) 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ci#ifndef __ASSEMBLY__ 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci#include <linux/cpumask.h> 388c2ecf20Sopenharmony_ci#include <linux/linkage.h> 398c2ecf20Sopenharmony_ci#include <linux/irqflags.h> 408c2ecf20Sopenharmony_ci#include <asm/cpu.h> 418c2ecf20Sopenharmony_ci#include <asm/page.h> 428c2ecf20Sopenharmony_ci#include <asm/ptrace.h> 438c2ecf20Sopenharmony_ci#include <asm/setup.h> 448c2ecf20Sopenharmony_ci#include <asm/runtime_instr.h> 458c2ecf20Sopenharmony_ci#include <asm/fpu/types.h> 468c2ecf20Sopenharmony_ci#include <asm/fpu/internal.h> 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_cistatic inline void set_cpu_flag(int flag) 498c2ecf20Sopenharmony_ci{ 508c2ecf20Sopenharmony_ci S390_lowcore.cpu_flags |= (1UL << flag); 518c2ecf20Sopenharmony_ci} 528c2ecf20Sopenharmony_ci 538c2ecf20Sopenharmony_cistatic inline void clear_cpu_flag(int flag) 548c2ecf20Sopenharmony_ci{ 558c2ecf20Sopenharmony_ci S390_lowcore.cpu_flags &= ~(1UL << flag); 568c2ecf20Sopenharmony_ci} 578c2ecf20Sopenharmony_ci 588c2ecf20Sopenharmony_cistatic inline int test_cpu_flag(int flag) 598c2ecf20Sopenharmony_ci{ 608c2ecf20Sopenharmony_ci return !!(S390_lowcore.cpu_flags & (1UL << flag)); 618c2ecf20Sopenharmony_ci} 628c2ecf20Sopenharmony_ci 638c2ecf20Sopenharmony_ci/* 648c2ecf20Sopenharmony_ci * Test CIF flag of another CPU. The caller needs to ensure that 658c2ecf20Sopenharmony_ci * CPU hotplug can not happen, e.g. by disabling preemption. 668c2ecf20Sopenharmony_ci */ 678c2ecf20Sopenharmony_cistatic inline int test_cpu_flag_of(int flag, int cpu) 688c2ecf20Sopenharmony_ci{ 698c2ecf20Sopenharmony_ci struct lowcore *lc = lowcore_ptr[cpu]; 708c2ecf20Sopenharmony_ci return !!(lc->cpu_flags & (1UL << flag)); 718c2ecf20Sopenharmony_ci} 728c2ecf20Sopenharmony_ci 738c2ecf20Sopenharmony_ci#define arch_needs_cpu() test_cpu_flag(CIF_NOHZ_DELAY) 748c2ecf20Sopenharmony_ci 758c2ecf20Sopenharmony_cistatic inline void get_cpu_id(struct cpuid *ptr) 768c2ecf20Sopenharmony_ci{ 778c2ecf20Sopenharmony_ci asm volatile("stidp %0" : "=Q" (*ptr)); 788c2ecf20Sopenharmony_ci} 798c2ecf20Sopenharmony_ci 808c2ecf20Sopenharmony_civoid s390_adjust_jiffies(void); 818c2ecf20Sopenharmony_civoid s390_update_cpu_mhz(void); 828c2ecf20Sopenharmony_civoid cpu_detect_mhz_feature(void); 838c2ecf20Sopenharmony_ci 848c2ecf20Sopenharmony_ciextern const struct seq_operations cpuinfo_op; 858c2ecf20Sopenharmony_ciextern void execve_tail(void); 868c2ecf20Sopenharmony_ciextern void __bpon(void); 878c2ecf20Sopenharmony_ci 888c2ecf20Sopenharmony_ci/* 898c2ecf20Sopenharmony_ci * User space process size: 2GB for 31 bit, 4TB or 8PT for 64 bit. 908c2ecf20Sopenharmony_ci */ 918c2ecf20Sopenharmony_ci 928c2ecf20Sopenharmony_ci#define TASK_SIZE_OF(tsk) (test_tsk_thread_flag(tsk, TIF_31BIT) ? \ 938c2ecf20Sopenharmony_ci _REGION3_SIZE : TASK_SIZE_MAX) 948c2ecf20Sopenharmony_ci#define TASK_UNMAPPED_BASE (test_thread_flag(TIF_31BIT) ? \ 958c2ecf20Sopenharmony_ci (_REGION3_SIZE >> 1) : (_REGION2_SIZE >> 1)) 968c2ecf20Sopenharmony_ci#define TASK_SIZE TASK_SIZE_OF(current) 978c2ecf20Sopenharmony_ci#define TASK_SIZE_MAX (-PAGE_SIZE) 988c2ecf20Sopenharmony_ci 998c2ecf20Sopenharmony_ci#define STACK_TOP (test_thread_flag(TIF_31BIT) ? \ 1008c2ecf20Sopenharmony_ci _REGION3_SIZE : _REGION2_SIZE) 1018c2ecf20Sopenharmony_ci#define STACK_TOP_MAX _REGION2_SIZE 1028c2ecf20Sopenharmony_ci 1038c2ecf20Sopenharmony_ci#define HAVE_ARCH_PICK_MMAP_LAYOUT 1048c2ecf20Sopenharmony_ci 1058c2ecf20Sopenharmony_citypedef unsigned int mm_segment_t; 1068c2ecf20Sopenharmony_ci 1078c2ecf20Sopenharmony_ci/* 1088c2ecf20Sopenharmony_ci * Thread structure 1098c2ecf20Sopenharmony_ci */ 1108c2ecf20Sopenharmony_cistruct thread_struct { 1118c2ecf20Sopenharmony_ci unsigned int acrs[NUM_ACRS]; 1128c2ecf20Sopenharmony_ci unsigned long ksp; /* kernel stack pointer */ 1138c2ecf20Sopenharmony_ci unsigned long user_timer; /* task cputime in user space */ 1148c2ecf20Sopenharmony_ci unsigned long guest_timer; /* task cputime in kvm guest */ 1158c2ecf20Sopenharmony_ci unsigned long system_timer; /* task cputime in kernel space */ 1168c2ecf20Sopenharmony_ci unsigned long hardirq_timer; /* task cputime in hardirq context */ 1178c2ecf20Sopenharmony_ci unsigned long softirq_timer; /* task cputime in softirq context */ 1188c2ecf20Sopenharmony_ci unsigned long sys_call_table; /* system call table address */ 1198c2ecf20Sopenharmony_ci mm_segment_t mm_segment; 1208c2ecf20Sopenharmony_ci unsigned long gmap_addr; /* address of last gmap fault. */ 1218c2ecf20Sopenharmony_ci unsigned int gmap_write_flag; /* gmap fault write indication */ 1228c2ecf20Sopenharmony_ci unsigned int gmap_int_code; /* int code of last gmap fault */ 1238c2ecf20Sopenharmony_ci unsigned int gmap_pfault; /* signal of a pending guest pfault */ 1248c2ecf20Sopenharmony_ci /* Per-thread information related to debugging */ 1258c2ecf20Sopenharmony_ci struct per_regs per_user; /* User specified PER registers */ 1268c2ecf20Sopenharmony_ci struct per_event per_event; /* Cause of the last PER trap */ 1278c2ecf20Sopenharmony_ci unsigned long per_flags; /* Flags to control debug behavior */ 1288c2ecf20Sopenharmony_ci unsigned int system_call; /* system call number in signal */ 1298c2ecf20Sopenharmony_ci unsigned long last_break; /* last breaking-event-address. */ 1308c2ecf20Sopenharmony_ci /* pfault_wait is used to block the process on a pfault event */ 1318c2ecf20Sopenharmony_ci unsigned long pfault_wait; 1328c2ecf20Sopenharmony_ci struct list_head list; 1338c2ecf20Sopenharmony_ci /* cpu runtime instrumentation */ 1348c2ecf20Sopenharmony_ci struct runtime_instr_cb *ri_cb; 1358c2ecf20Sopenharmony_ci struct gs_cb *gs_cb; /* Current guarded storage cb */ 1368c2ecf20Sopenharmony_ci struct gs_cb *gs_bc_cb; /* Broadcast guarded storage cb */ 1378c2ecf20Sopenharmony_ci unsigned char trap_tdb[256]; /* Transaction abort diagnose block */ 1388c2ecf20Sopenharmony_ci /* 1398c2ecf20Sopenharmony_ci * Warning: 'fpu' is dynamically-sized. It *MUST* be at 1408c2ecf20Sopenharmony_ci * the end. 1418c2ecf20Sopenharmony_ci */ 1428c2ecf20Sopenharmony_ci struct fpu fpu; /* FP and VX register save area */ 1438c2ecf20Sopenharmony_ci}; 1448c2ecf20Sopenharmony_ci 1458c2ecf20Sopenharmony_ci/* Flag to disable transactions. */ 1468c2ecf20Sopenharmony_ci#define PER_FLAG_NO_TE 1UL 1478c2ecf20Sopenharmony_ci/* Flag to enable random transaction aborts. */ 1488c2ecf20Sopenharmony_ci#define PER_FLAG_TE_ABORT_RAND 2UL 1498c2ecf20Sopenharmony_ci/* Flag to specify random transaction abort mode: 1508c2ecf20Sopenharmony_ci * - abort each transaction at a random instruction before TEND if set. 1518c2ecf20Sopenharmony_ci * - abort random transactions at a random instruction if cleared. 1528c2ecf20Sopenharmony_ci */ 1538c2ecf20Sopenharmony_ci#define PER_FLAG_TE_ABORT_RAND_TEND 4UL 1548c2ecf20Sopenharmony_ci 1558c2ecf20Sopenharmony_citypedef struct thread_struct thread_struct; 1568c2ecf20Sopenharmony_ci 1578c2ecf20Sopenharmony_ci#define ARCH_MIN_TASKALIGN 8 1588c2ecf20Sopenharmony_ci 1598c2ecf20Sopenharmony_ci#define INIT_THREAD { \ 1608c2ecf20Sopenharmony_ci .ksp = sizeof(init_stack) + (unsigned long) &init_stack, \ 1618c2ecf20Sopenharmony_ci .fpu.regs = (void *) init_task.thread.fpu.fprs, \ 1628c2ecf20Sopenharmony_ci .last_break = 1, \ 1638c2ecf20Sopenharmony_ci} 1648c2ecf20Sopenharmony_ci 1658c2ecf20Sopenharmony_ci/* 1668c2ecf20Sopenharmony_ci * Do necessary setup to start up a new thread. 1678c2ecf20Sopenharmony_ci */ 1688c2ecf20Sopenharmony_ci#define start_thread(regs, new_psw, new_stackp) do { \ 1698c2ecf20Sopenharmony_ci regs->psw.mask = PSW_USER_BITS | PSW_MASK_EA | PSW_MASK_BA; \ 1708c2ecf20Sopenharmony_ci regs->psw.addr = new_psw; \ 1718c2ecf20Sopenharmony_ci regs->gprs[15] = new_stackp; \ 1728c2ecf20Sopenharmony_ci execve_tail(); \ 1738c2ecf20Sopenharmony_ci} while (0) 1748c2ecf20Sopenharmony_ci 1758c2ecf20Sopenharmony_ci#define start_thread31(regs, new_psw, new_stackp) do { \ 1768c2ecf20Sopenharmony_ci regs->psw.mask = PSW_USER_BITS | PSW_MASK_BA; \ 1778c2ecf20Sopenharmony_ci regs->psw.addr = new_psw; \ 1788c2ecf20Sopenharmony_ci regs->gprs[15] = new_stackp; \ 1798c2ecf20Sopenharmony_ci execve_tail(); \ 1808c2ecf20Sopenharmony_ci} while (0) 1818c2ecf20Sopenharmony_ci 1828c2ecf20Sopenharmony_ci/* Forward declaration, a strange C thing */ 1838c2ecf20Sopenharmony_cistruct task_struct; 1848c2ecf20Sopenharmony_cistruct mm_struct; 1858c2ecf20Sopenharmony_cistruct seq_file; 1868c2ecf20Sopenharmony_cistruct pt_regs; 1878c2ecf20Sopenharmony_ci 1888c2ecf20Sopenharmony_civoid show_registers(struct pt_regs *regs); 1898c2ecf20Sopenharmony_civoid show_cacheinfo(struct seq_file *m); 1908c2ecf20Sopenharmony_ci 1918c2ecf20Sopenharmony_ci/* Free all resources held by a thread. */ 1928c2ecf20Sopenharmony_cistatic inline void release_thread(struct task_struct *tsk) { } 1938c2ecf20Sopenharmony_ci 1948c2ecf20Sopenharmony_ci/* Free guarded storage control block */ 1958c2ecf20Sopenharmony_civoid guarded_storage_release(struct task_struct *tsk); 1968c2ecf20Sopenharmony_ci 1978c2ecf20Sopenharmony_ciunsigned long get_wchan(struct task_struct *p); 1988c2ecf20Sopenharmony_ci#define task_pt_regs(tsk) ((struct pt_regs *) \ 1998c2ecf20Sopenharmony_ci (task_stack_page(tsk) + THREAD_SIZE) - 1) 2008c2ecf20Sopenharmony_ci#define KSTK_EIP(tsk) (task_pt_regs(tsk)->psw.addr) 2018c2ecf20Sopenharmony_ci#define KSTK_ESP(tsk) (task_pt_regs(tsk)->gprs[15]) 2028c2ecf20Sopenharmony_ci 2038c2ecf20Sopenharmony_ci/* Has task runtime instrumentation enabled ? */ 2048c2ecf20Sopenharmony_ci#define is_ri_task(tsk) (!!(tsk)->thread.ri_cb) 2058c2ecf20Sopenharmony_ci 2068c2ecf20Sopenharmony_cistatic __always_inline unsigned long current_stack_pointer(void) 2078c2ecf20Sopenharmony_ci{ 2088c2ecf20Sopenharmony_ci unsigned long sp; 2098c2ecf20Sopenharmony_ci 2108c2ecf20Sopenharmony_ci asm volatile("la %0,0(15)" : "=a" (sp)); 2118c2ecf20Sopenharmony_ci return sp; 2128c2ecf20Sopenharmony_ci} 2138c2ecf20Sopenharmony_ci 2148c2ecf20Sopenharmony_cistatic __always_inline unsigned short stap(void) 2158c2ecf20Sopenharmony_ci{ 2168c2ecf20Sopenharmony_ci unsigned short cpu_address; 2178c2ecf20Sopenharmony_ci 2188c2ecf20Sopenharmony_ci asm volatile("stap %0" : "=Q" (cpu_address)); 2198c2ecf20Sopenharmony_ci return cpu_address; 2208c2ecf20Sopenharmony_ci} 2218c2ecf20Sopenharmony_ci 2228c2ecf20Sopenharmony_ci#define cpu_relax() barrier() 2238c2ecf20Sopenharmony_ci 2248c2ecf20Sopenharmony_ci#define ECAG_CACHE_ATTRIBUTE 0 2258c2ecf20Sopenharmony_ci#define ECAG_CPU_ATTRIBUTE 1 2268c2ecf20Sopenharmony_ci 2278c2ecf20Sopenharmony_cistatic inline unsigned long __ecag(unsigned int asi, unsigned char parm) 2288c2ecf20Sopenharmony_ci{ 2298c2ecf20Sopenharmony_ci unsigned long val; 2308c2ecf20Sopenharmony_ci 2318c2ecf20Sopenharmony_ci asm volatile(".insn rsy,0xeb000000004c,%0,0,0(%1)" /* ecag */ 2328c2ecf20Sopenharmony_ci : "=d" (val) : "a" (asi << 8 | parm)); 2338c2ecf20Sopenharmony_ci return val; 2348c2ecf20Sopenharmony_ci} 2358c2ecf20Sopenharmony_ci 2368c2ecf20Sopenharmony_cistatic inline void psw_set_key(unsigned int key) 2378c2ecf20Sopenharmony_ci{ 2388c2ecf20Sopenharmony_ci asm volatile("spka 0(%0)" : : "d" (key)); 2398c2ecf20Sopenharmony_ci} 2408c2ecf20Sopenharmony_ci 2418c2ecf20Sopenharmony_ci/* 2428c2ecf20Sopenharmony_ci * Set PSW to specified value. 2438c2ecf20Sopenharmony_ci */ 2448c2ecf20Sopenharmony_cistatic inline void __load_psw(psw_t psw) 2458c2ecf20Sopenharmony_ci{ 2468c2ecf20Sopenharmony_ci asm volatile("lpswe %0" : : "Q" (psw) : "cc"); 2478c2ecf20Sopenharmony_ci} 2488c2ecf20Sopenharmony_ci 2498c2ecf20Sopenharmony_ci/* 2508c2ecf20Sopenharmony_ci * Set PSW mask to specified value, while leaving the 2518c2ecf20Sopenharmony_ci * PSW addr pointing to the next instruction. 2528c2ecf20Sopenharmony_ci */ 2538c2ecf20Sopenharmony_cistatic __always_inline void __load_psw_mask(unsigned long mask) 2548c2ecf20Sopenharmony_ci{ 2558c2ecf20Sopenharmony_ci unsigned long addr; 2568c2ecf20Sopenharmony_ci psw_t psw; 2578c2ecf20Sopenharmony_ci 2588c2ecf20Sopenharmony_ci psw.mask = mask; 2598c2ecf20Sopenharmony_ci 2608c2ecf20Sopenharmony_ci asm volatile( 2618c2ecf20Sopenharmony_ci " larl %0,1f\n" 2628c2ecf20Sopenharmony_ci " stg %0,%1\n" 2638c2ecf20Sopenharmony_ci " lpswe %2\n" 2648c2ecf20Sopenharmony_ci "1:" 2658c2ecf20Sopenharmony_ci : "=&d" (addr), "=Q" (psw.addr) : "Q" (psw) : "memory", "cc"); 2668c2ecf20Sopenharmony_ci} 2678c2ecf20Sopenharmony_ci 2688c2ecf20Sopenharmony_ci/* 2698c2ecf20Sopenharmony_ci * Extract current PSW mask 2708c2ecf20Sopenharmony_ci */ 2718c2ecf20Sopenharmony_cistatic inline unsigned long __extract_psw(void) 2728c2ecf20Sopenharmony_ci{ 2738c2ecf20Sopenharmony_ci unsigned int reg1, reg2; 2748c2ecf20Sopenharmony_ci 2758c2ecf20Sopenharmony_ci asm volatile("epsw %0,%1" : "=d" (reg1), "=a" (reg2)); 2768c2ecf20Sopenharmony_ci return (((unsigned long) reg1) << 32) | ((unsigned long) reg2); 2778c2ecf20Sopenharmony_ci} 2788c2ecf20Sopenharmony_ci 2798c2ecf20Sopenharmony_cistatic inline void local_mcck_enable(void) 2808c2ecf20Sopenharmony_ci{ 2818c2ecf20Sopenharmony_ci __load_psw_mask(__extract_psw() | PSW_MASK_MCHECK); 2828c2ecf20Sopenharmony_ci} 2838c2ecf20Sopenharmony_ci 2848c2ecf20Sopenharmony_cistatic inline void local_mcck_disable(void) 2858c2ecf20Sopenharmony_ci{ 2868c2ecf20Sopenharmony_ci __load_psw_mask(__extract_psw() & ~PSW_MASK_MCHECK); 2878c2ecf20Sopenharmony_ci} 2888c2ecf20Sopenharmony_ci 2898c2ecf20Sopenharmony_ci/* 2908c2ecf20Sopenharmony_ci * Rewind PSW instruction address by specified number of bytes. 2918c2ecf20Sopenharmony_ci */ 2928c2ecf20Sopenharmony_cistatic inline unsigned long __rewind_psw(psw_t psw, unsigned long ilc) 2938c2ecf20Sopenharmony_ci{ 2948c2ecf20Sopenharmony_ci unsigned long mask; 2958c2ecf20Sopenharmony_ci 2968c2ecf20Sopenharmony_ci mask = (psw.mask & PSW_MASK_EA) ? -1UL : 2978c2ecf20Sopenharmony_ci (psw.mask & PSW_MASK_BA) ? (1UL << 31) - 1 : 2988c2ecf20Sopenharmony_ci (1UL << 24) - 1; 2998c2ecf20Sopenharmony_ci return (psw.addr - ilc) & mask; 3008c2ecf20Sopenharmony_ci} 3018c2ecf20Sopenharmony_ci 3028c2ecf20Sopenharmony_ci/* 3038c2ecf20Sopenharmony_ci * Function to stop a processor until the next interrupt occurs 3048c2ecf20Sopenharmony_ci */ 3058c2ecf20Sopenharmony_civoid enabled_wait(void); 3068c2ecf20Sopenharmony_ci 3078c2ecf20Sopenharmony_ci/* 3088c2ecf20Sopenharmony_ci * Function to drop a processor into disabled wait state 3098c2ecf20Sopenharmony_ci */ 3108c2ecf20Sopenharmony_cistatic __always_inline void __noreturn disabled_wait(void) 3118c2ecf20Sopenharmony_ci{ 3128c2ecf20Sopenharmony_ci psw_t psw; 3138c2ecf20Sopenharmony_ci 3148c2ecf20Sopenharmony_ci psw.mask = PSW_MASK_BASE | PSW_MASK_WAIT | PSW_MASK_BA | PSW_MASK_EA; 3158c2ecf20Sopenharmony_ci psw.addr = _THIS_IP_; 3168c2ecf20Sopenharmony_ci __load_psw(psw); 3178c2ecf20Sopenharmony_ci while (1); 3188c2ecf20Sopenharmony_ci} 3198c2ecf20Sopenharmony_ci 3208c2ecf20Sopenharmony_ci/* 3218c2ecf20Sopenharmony_ci * Basic Machine Check/Program Check Handler. 3228c2ecf20Sopenharmony_ci */ 3238c2ecf20Sopenharmony_ci 3248c2ecf20Sopenharmony_ciextern void s390_base_pgm_handler(void); 3258c2ecf20Sopenharmony_ciextern void s390_base_ext_handler(void); 3268c2ecf20Sopenharmony_ci 3278c2ecf20Sopenharmony_ciextern void (*s390_base_pgm_handler_fn)(void); 3288c2ecf20Sopenharmony_ciextern void (*s390_base_ext_handler_fn)(void); 3298c2ecf20Sopenharmony_ci 3308c2ecf20Sopenharmony_ci#define ARCH_LOW_ADDRESS_LIMIT 0x7fffffffUL 3318c2ecf20Sopenharmony_ci 3328c2ecf20Sopenharmony_ciextern int memcpy_real(void *, void *, size_t); 3338c2ecf20Sopenharmony_ciextern void memcpy_absolute(void *, void *, size_t); 3348c2ecf20Sopenharmony_ci 3358c2ecf20Sopenharmony_ci#define mem_assign_absolute(dest, val) do { \ 3368c2ecf20Sopenharmony_ci __typeof__(dest) __tmp = (val); \ 3378c2ecf20Sopenharmony_ci \ 3388c2ecf20Sopenharmony_ci BUILD_BUG_ON(sizeof(__tmp) != sizeof(val)); \ 3398c2ecf20Sopenharmony_ci memcpy_absolute(&(dest), &__tmp, sizeof(__tmp)); \ 3408c2ecf20Sopenharmony_ci} while (0) 3418c2ecf20Sopenharmony_ci 3428c2ecf20Sopenharmony_ciextern int s390_isolate_bp(void); 3438c2ecf20Sopenharmony_ciextern int s390_isolate_bp_guest(void); 3448c2ecf20Sopenharmony_ci 3458c2ecf20Sopenharmony_ci#endif /* __ASSEMBLY__ */ 3468c2ecf20Sopenharmony_ci 3478c2ecf20Sopenharmony_ci#endif /* __ASM_S390_PROCESSOR_H */ 348