selftests/powerpc: Run per_event_excludes test on Power8 or later
The per_event_excludes test wants to run on Power8 or later. But currently it checks that AT_BASE_PLATFORM *equals* power8, which means it only runs on Power8. Fix it to check for the ISA 2.07 feature, which will be set on Power8 and later CPUs. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20200716122142.3776261-1-mpe@ellerman.id.au
This commit is contained in:
@@ -12,6 +12,8 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/prctl.h>
|
#include <sys/prctl.h>
|
||||||
|
|
||||||
|
#include <asm/cputable.h>
|
||||||
|
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
#include "lib.h"
|
#include "lib.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
@@ -23,12 +25,9 @@
|
|||||||
static int per_event_excludes(void)
|
static int per_event_excludes(void)
|
||||||
{
|
{
|
||||||
struct event *e, events[4];
|
struct event *e, events[4];
|
||||||
char *platform;
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
platform = (char *)get_auxv_entry(AT_BASE_PLATFORM);
|
SKIP_IF(!have_hwcap2(PPC_FEATURE2_ARCH_2_07));
|
||||||
FAIL_IF(!platform);
|
|
||||||
SKIP_IF(strcmp(platform, "power8") != 0);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We need to create the events disabled, otherwise the running/enabled
|
* We need to create the events disabled, otherwise the running/enabled
|
||||||
|
Reference in New Issue
Block a user