1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 202afa9a8SChris Brandt #ifndef _ASM_ARM_SECTIONS_H 302afa9a8SChris Brandt #define _ASM_ARM_SECTIONS_H 402afa9a8SChris Brandt 502afa9a8SChris Brandt #include <asm-generic/sections.h> 602afa9a8SChris Brandt 702afa9a8SChris Brandt extern char _exiprom[]; 802afa9a8SChris Brandt 9c6089061SRussell King extern char __idmap_text_start[]; 10c6089061SRussell King extern char __idmap_text_end[]; 11c6089061SRussell King extern char __entry_text_start[]; 12c6089061SRussell King extern char __entry_text_end[]; 13c6089061SRussell King in_entry_text(unsigned long addr)14c6089061SRussell Kingstatic inline bool in_entry_text(unsigned long addr) 15c6089061SRussell King { 16c6089061SRussell King return memory_contains(__entry_text_start, __entry_text_end, 17c6089061SRussell King (void *)addr, 1); 18c6089061SRussell King } 19c6089061SRussell King in_idmap_text(unsigned long addr)20c6089061SRussell Kingstatic inline bool in_idmap_text(unsigned long addr) 21c6089061SRussell King { 22c6089061SRussell King void *a = (void *)addr; 23*3fbb96c0SMarc Zyngier return memory_contains(__idmap_text_start, __idmap_text_end, a, 1); 24c6089061SRussell King } 25c6089061SRussell King 2602afa9a8SChris Brandt #endif /* _ASM_ARM_SECTIONS_H */ 27