This is a s390 port of commit 548acf19234d ("x86/mm: Expand the exception table logic to allow new handling options"), which is needed for implementing BPF_PROBE_MEM on s390. The new handler field is made 64-bit in order to allow pointing from dynamically allocated entries to handlers in kernel text. Unlike on x86, NULL is used instead of ex_handler_default. This is because exception tables are used by boot/text_dma.S, and it would be a pain to preserve ex_handler_default. The new infrastructure is ignored in early_pgm_check_handler, since there is no pt_regs. Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
29 lines
721 B
C
29 lines
721 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __ASM_LINKAGE_H
|
|
#define __ASM_LINKAGE_H
|
|
|
|
#include <asm/asm-const.h>
|
|
#include <linux/stringify.h>
|
|
|
|
#define __ALIGN .align 4, 0x07
|
|
#define __ALIGN_STR __stringify(__ALIGN)
|
|
|
|
/*
|
|
* Helper macro for exception table entries
|
|
*/
|
|
|
|
#define __EX_TABLE(_section, _fault, _target) \
|
|
stringify_in_c(.section _section,"a";) \
|
|
stringify_in_c(.align 8;) \
|
|
stringify_in_c(.long (_fault) - .;) \
|
|
stringify_in_c(.long (_target) - .;) \
|
|
stringify_in_c(.quad 0;) \
|
|
stringify_in_c(.previous)
|
|
|
|
#define EX_TABLE(_fault, _target) \
|
|
__EX_TABLE(__ex_table, _fault, _target)
|
|
#define EX_TABLE_DMA(_fault, _target) \
|
|
__EX_TABLE(.dma.ex_table, _fault, _target)
|
|
|
|
#endif
|