16c9f99dfSJanosch Frank /* SPDX-License-Identifier: GPL-2.0-only */ 24da93626SDavid Hildenbrand /* 34da93626SDavid Hildenbrand * Copyright (c) 2017 Red Hat Inc 44da93626SDavid Hildenbrand * 54da93626SDavid Hildenbrand * Authors: 64da93626SDavid Hildenbrand * David Hildenbrand <david@redhat.com> 74da93626SDavid Hildenbrand */ 84da93626SDavid Hildenbrand #ifndef _ASMS390X_IRQ_H_ 94da93626SDavid Hildenbrand #define _ASMS390X_IRQ_H_ 104da93626SDavid Hildenbrand #include <asm/arch_def.h> 114da93626SDavid Hildenbrand 12df121a0cSJanosch Frank #define EXT_IRQ_EMERGENCY_SIG 0x1201 13df121a0cSJanosch Frank #define EXT_IRQ_EXTERNAL_CALL 0x1202 148ead801eSJanosch Frank #define EXT_IRQ_SERVICE_SIG 0x2401 158ead801eSJanosch Frank 16cc7bed1bSJanosch Frank void register_pgm_cleanup_func(void (*f)(void)); 1736cfc0b7SJanosch Frank void handle_pgm_int(struct stack_frame_int *stack); 1836cfc0b7SJanosch Frank void handle_ext_int(struct stack_frame_int *stack); 190f87a91aSJanosch Frank void handle_mcck_int(void); 200f87a91aSJanosch Frank void handle_io_int(void); 210f87a91aSJanosch Frank void handle_svc_int(void); 224da93626SDavid Hildenbrand void expect_pgm_int(void); 23df121a0cSJanosch Frank void expect_ext_int(void); 243db880b6SDavid Hildenbrand uint16_t clear_pgm_int(void); 254da93626SDavid Hildenbrand void check_pgm_int_code(uint16_t code); 264da93626SDavid Hildenbrand 272667b05eSThomas Huth /* Activate low-address protection */ 282667b05eSThomas Huth static inline void low_prot_enable(void) 292667b05eSThomas Huth { 30*1b2c0437SClaudio Imbrenda ctl_set_bit(0, CTL0_LOW_ADDR_PROT); 312667b05eSThomas Huth } 322667b05eSThomas Huth 332667b05eSThomas Huth /* Disable low-address protection */ 342667b05eSThomas Huth static inline void low_prot_disable(void) 352667b05eSThomas Huth { 36*1b2c0437SClaudio Imbrenda ctl_clear_bit(0, CTL0_LOW_ADDR_PROT); 372667b05eSThomas Huth } 382667b05eSThomas Huth 394da93626SDavid Hildenbrand #endif 40