From: Jaehoon Chung Date: Tue, 12 Mar 2024 10:57:28 +0000 (+0900) Subject: perf: riscv_pmu_sbi: Set SYSCTL_LEGACY by default X-Git-Tag: accepted/tizen/unified/x/20240313.092112^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F16%2F307716%2F1;p=platform%2Fkernel%2Flinux-starfive.git perf: riscv_pmu_sbi: Set SYSCTL_LEGACY by default This patch is workaround for VisionFive2. During running ubrowser, SIGILL is occurred. To prevent the SIGILL, sysctl_perf_user_acces is set SYSCTL_LEGACY by default. Change-Id: Idbfcbfd27a9286c8e23529fd793b99c4023a449f Signed-off-by: Jaehoon Chung --- diff --git a/drivers/perf/riscv_pmu_sbi.c b/drivers/perf/riscv_pmu_sbi.c index cd8a2b9..5e29226 100644 --- a/drivers/perf/riscv_pmu_sbi.c +++ b/drivers/perf/riscv_pmu_sbi.c @@ -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 starfive */ +static int sysctl_perf_user_access __read_mostly = SYSCTL_LEGACY; + /* * RISC-V doesn't have heterogeneous harts yet. This need to be part of