pmu: define event validation in architecture dependent code.
Change-Id: Ia053af146ba3c89810892271cae93def6d9fd7c8
This commit is contained in:
2
ihk
2
ihk
Submodule ihk updated: 9a15ade2ab...7880d7786a
@@ -4103,7 +4103,7 @@ static int mc_perf_event_alloc(struct mc_perf_event **out,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (val == 0) {
|
if (!ihk_mc_validate_event(val)) {
|
||||||
ret = -ENOENT;
|
ret = -ENOENT;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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_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_hw_cache_extra_reg_map(unsigned long hw_cache_event);
|
||||||
unsigned long ihk_mc_raw_event_map(unsigned long raw_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. */
|
/* 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,
|
void *ihk_mc_switch_context(ihk_mc_kernel_context_t *old_ctx,
|
||||||
|
|||||||
Reference in New Issue
Block a user