1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /* 3 * Copyright (c) 2017 Red Hat Inc 4 * 5 * Authors: 6 * David Hildenbrand <david@redhat.com> 7 */ 8 #ifndef _ASMS390X_IRQ_H_ 9 #define _ASMS390X_IRQ_H_ 10 #include <asm/arch_def.h> 11 12 #define EXT_IRQ_EMERGENCY_SIG 0x1201 13 #define EXT_IRQ_EXTERNAL_CALL 0x1202 14 #define EXT_IRQ_SERVICE_SIG 0x2401 15 16 void register_pgm_cleanup_func(void (*f)(void)); 17 void handle_pgm_int(struct stack_frame_int *stack); 18 void handle_ext_int(struct stack_frame_int *stack); 19 void handle_mcck_int(void); 20 void handle_io_int(void); 21 void handle_svc_int(void); 22 void expect_pgm_int(void); 23 void expect_ext_int(void); 24 uint16_t clear_pgm_int(void); 25 void check_pgm_int_code(uint16_t code); 26 27 /* Activate low-address protection */ 28 static inline void low_prot_enable(void) 29 { 30 ctl_set_bit(0, 63 - 35); 31 } 32 33 /* Disable low-address protection */ 34 static inline void low_prot_disable(void) 35 { 36 ctl_clear_bit(0, 63 - 35); 37 } 38 39 #endif 40