pmu: define event validation in architecture dependent code.

Change-Id: Ia053af146ba3c89810892271cae93def6d9fd7c8
This commit is contained in:
TOIDA,Suguru
2019-07-09 13:38:26 +09:00
parent b6285c9aa9
commit 9c78d4d249
3 changed files with 3 additions and 2 deletions

2
ihk

Submodule ihk updated: 9a15ade2ab...7880d7786a

View File

@ -4103,7 +4103,7 @@ static int mc_perf_event_alloc(struct mc_perf_event **out,
goto out;
}
if (val == 0) {
if (!ihk_mc_validate_event(val)) {
ret = -ENOENT;
goto out;
}

View File

@ -87,6 +87,7 @@ unsigned long ihk_mc_hw_event_map(unsigned long hw_event);
unsigned long ihk_mc_hw_cache_event_map(unsigned long hw_cache_event);
unsigned long ihk_mc_hw_cache_extra_reg_map(unsigned long hw_cache_event);
unsigned long ihk_mc_raw_event_map(unsigned long raw_event);
int ihk_mc_validate_event(unsigned long hw_config);
/* returns the 'prev' argument of the call that caused the switch to the context returned. */
void *ihk_mc_switch_context(ihk_mc_kernel_context_t *old_ctx,