1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 08:42:12 +02:00

event: fix static events for CONFIG_NEEDS_MANUAL_RELOC

Static events do not currently work post-relocation for boards that enable
CONFIG_NEEDS_MANUAL_RELOC. Relocate event handler pointers for all event
spies to fix this.

Tested on Microblaze.

Signed-off-by: Ovidiu Panait <ovpanait@gmail.com>
This commit is contained in:
Ovidiu Panait
2022-05-15 21:40:29 +03:00
committed by Tom Rini
parent 12c90955a7
commit cebc816170
3 changed files with 28 additions and 0 deletions

View File

@@ -17,6 +17,7 @@
#include <malloc.h>
#include <asm/global_data.h>
#include <linux/list.h>
#include <relocate.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -148,6 +149,20 @@ void event_show_spy_list(void)
}
}
#if CONFIG_IS_ENABLED(NEEDS_MANUAL_RELOC)
int event_manual_reloc(void)
{
struct evspy_info *spy, *end;
spy = ll_entry_start(struct evspy_info, evspy_info);
end = ll_entry_end(struct evspy_info, evspy_info);
for (; spy < end; spy++)
MANUAL_RELOC(spy->func);
return 0;
}
#endif
#if CONFIG_IS_ENABLED(EVENT_DYNAMIC)
static void spy_free(struct event_spy *spy)
{