1/* SPDX-License-Identifier: GPL-2.0-only */ 2/* 3 * Commonly used assembly macros 4 * 5 * Copyright (c) 2022 IBM Corp 6 * 7 * Authors: 8 * Janosch Frank <frankja@linux.ibm.com> 9 */ 10#include <asm/asm-offsets.h> 11 12/* 13 * Writes a PSW to addr_psw, useful for exception PSWs in lowcore 14 * 15 * reg is the scratch register used for temporary storage, it's NOT restored 16 * The psw address part is defined via psw_new_addr 17 * The psw mask part is always 64 bit 18 */ 19.macro SET_PSW_NEW_ADDR reg, psw_new_addr, addr_psw 20larl \reg, psw_mask_64 21mvc \addr_psw(8,%r0), 0(\reg) 22larl \reg, \psw_new_addr 23stg \reg, \addr_psw + 8 24.endm 25 26.section .rodata 27psw_mask_64: 28 .quad 0x0000000180000000 29