#define LIST_ENTRY_CORE() { .next = &core_init.list, .prev = &virtual_region_list }
#define LIST_ENTRY_INIT() { .next = &virtual_region_list, .prev = &core.list }
-static struct virtual_region core = {
+static struct virtual_region core __read_mostly = {
.list = LIST_ENTRY_CORE(),
.text_start = _stext,
.text_end = _etext,
{ __start_bug_frames_2, __stop_bug_frames_2 },
{ __start_bug_frames_3, __stop_bug_frames_3 },
},
+
+#ifdef CONFIG_HAS_EX_TABLE
+ .ex = __start___ex_table,
+ .ex_end = __stop___ex_table,
+#endif
};
/* Becomes irrelevant when __init sections are cleared. */
{ __start_bug_frames_2, __stop_bug_frames_2 },
{ __start_bug_frames_3, __stop_bug_frames_3 },
},
+
+#ifdef CONFIG_HAS_EX_TABLE
+ .ex = __start___ex_table,
+ .ex_end = __stop___ex_table,
+#endif
};
/*
remove_virtual_region(&core_init);
}
-void __init setup_virtual_regions(const struct exception_table_entry *start,
- const struct exception_table_entry *end)
-{
- core_init.ex = core.ex = start;
- core_init.ex_end = core.ex_end = end;
-}
-
/*
* Local variables:
* mode: C
const struct bug_frame *start, *stop; /* Pointers to array of bug frames. */
} frame[BUGFRAME_NR];
+#ifdef CONFIG_HAS_EX_TABLE
const struct exception_table_entry *ex;
const struct exception_table_entry *ex_end;
+#endif
};
const struct virtual_region *find_text_region(unsigned long addr);
-void setup_virtual_regions(const struct exception_table_entry *start,
- const struct exception_table_entry *end);
void unregister_init_virtual_region(void);
void register_virtual_region(struct virtual_region *r);
void unregister_virtual_region(struct virtual_region *r);