Search
SailfishOS Open Build Service
>
Projects
>
home:sledge
:
beagle
>
kernel-adaptation-dm3730
> 0026-pmon-enabled-userspace-access-to-performance-counter.patch
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File 0026-pmon-enabled-userspace-access-to-performance-counter.patch of Package kernel-adaptation-dm3730
From b616d3833446804f7f5e4c3c2676e33bd835e2ac Mon Sep 17 00:00:00 2001 From: MediStream-Devel-VM <info@berlinux-solutions.de> Date: Mon, 18 Mar 2013 10:37:26 +0100 Subject: [PATCH] pmon: -enabled userspace access to performance counters --- arch/arm/mm/Kconfig | 7 +++++++ arch/arm/mm/proc-v7.S | 4 ++++ 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index 7c8a7d8..e7fe599 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig @@ -918,3 +918,10 @@ config ARCH_HAS_BARRIERS help This option allows the use of custom mandatory barriers included via the mach/barriers.h file. + +config USER_PMON + bool "Enable userspace access to performance counters" + depends on CPU_V7 + default n + help + Enable userpsace access to the performance monitor registers. diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index c2e2b66..18317cb 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S @@ -255,6 +255,10 @@ __v7_setup: mcr p15, 0, r5, c10, c2, 0 @ write PRRR mcr p15, 0, r6, c10, c2, 1 @ write NMRR #endif +#ifdef CONFIG_USER_PMON + mov r0, #1 + mcr p15, 0, r0, c9, c14, 0 +#endif #ifndef CONFIG_ARM_THUMBEE mrc p15, 0, r0, c0, c1, 0 @ read ID_PFR0 for ThumbEE and r0, r0, #(0xf << 12) @ ThumbEE enabled field -- 1.7.5.4