perf: riscv_pmu_sbi: Set SYSCTL_LEGACY by default 28/307828/2
authorJaehoon Chung <jh80.chung@samsung.com>
Tue, 12 Mar 2024 10:57:28 +0000 (19:57 +0900)
committerJaehoon Chung <jh80.chung@samsung.com>
Wed, 13 Mar 2024 11:20:37 +0000 (20:20 +0900)
This patch is workaround for LicheePi 4A.
During running ubrowser, SIGILL is occurred.
To prevent the SIGILL, sysctl_perf_user_acces is set SYSCTL_LEGACY by
default.

Change-Id: I0b33397bf7cc58c7390eccb5f6a5c7936eaec32c
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
drivers/perf/riscv_pmu_sbi.c

index cd8a2b9efd7874224a7dd34b4eeb87f58acf8b74..87716298553d08ed3ab629d54445e995489a1513 100644 (file)
@@ -51,8 +51,9 @@ static const struct attribute_group *riscv_pmu_attr_groups[] = {
        NULL,
 };
 
-/* Allow user mode access by default */
-static int sysctl_perf_user_access __read_mostly = SYSCTL_USER_ACCESS;
+/* WORKAROUND: Allow legacy mode by default when SOC is thead */
+static int sysctl_perf_user_access __read_mostly = SYSCTL_LEGACY;
+
 
 /*
  * RISC-V doesn't have heterogeneous harts yet. This need to be part of