From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7B8F2C433F5 for ; Sat, 4 Dec 2021 14:25:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:References :In-Reply-To:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=t9jteb4KIikA74/EnEBJSdCVeZdw9Jwn1layF+WMW68=; b=EaeNDI9r6AxI7Y N1PAPpdLhPbw7E5npP+EIF6eMQ+ON9PBkIzWHXnqyrqfi84YJwYdXlIxL/niVxZjonL1QSpw4Fleg tN64ll7aBWGCQ6LXhzYAeHP15HbZlWvnlMjobl/I1mIja1KsWpH6/hXu6UiuFc94lojbLMu6QnQuB pe35DpbJY3T3fwQeN1I9pjJwpYXJD0KgkO+g0FPzX2VwKfTVaA6pig13A3lDnfeXqZd4On5Wl/m4q BcDIAcMROWSH32eoqQewY7ooPR/miXeBA41r8yVsd8qmHe2wvw5TSy/wwKbgvMesZCwkzvWGc5s6u lNp388MoG1/V+9McVWlA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mtVx5-000PJd-OV; Sat, 04 Dec 2021 14:23:47 +0000 Received: from galois.linutronix.de ([2a0a:51c0:0:12e:550::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mtVx2-000PIL-Ga for linux-arm-kernel@lists.infradead.org; Sat, 04 Dec 2021 14:23:45 +0000 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1638627820; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+5b2uriykKgPHTmlAG2P2NYmE9drKwdyejG/Ik80gAI=; b=VqEkpk2BgU6O+Y29MaX161OU2b9yWfNAz2iUaQOubA4FiYI7+iPJIKB3dD8MJ7Fe6QNgEp 5tYeFFc2azHcNvMAseXMzTGvxCkAobZBxeMlf2usJ3wpBFiuOxbgy+KmYSrnvbeWQzy7V4 YPtSZYoAbm+JGhBexbQnPh90Cd1q8Bfed7Isi8siUwjujmPCzgKjImp7UQw8UONUz4FGDC UeExIEKucbZ6rfPnEN4no3d3Jk/WwdQVUdY0VhveaYiwBdI2XdoTSrVPObCtq3rR8L6xtH V21tMU4govDAsN5oT/Jxnmufigw6H7u9kROUfLXpun3a2Bb4VKxqCa9n3eE+gg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1638627820; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+5b2uriykKgPHTmlAG2P2NYmE9drKwdyejG/Ik80gAI=; b=0mYQi0hLjkh5+1Gk0y47xn63zi1Sl239lQwP8uAeKzqHB/VVTlmmg+ceXlmtv8eFGxrht/ W8VMLZUqE0hMtLDw== To: Rob Herring Cc: Will Deacon , Mark Rutland , Peter Zijlstra , Jonathan Corbet , Catalin Marinas , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org Subject: Re: [PATCH v12 2/5] perf: Add a counter for number of user access events in context In-Reply-To: References: <20211027201641.2076427-1-robh@kernel.org> <20211027201641.2076427-3-robh@kernel.org> <87zgpl9rqq.ffs@tglx> Date: Sat, 04 Dec 2021 15:23:39 +0100 Message-ID: <87sfv84ff8.ffs@tglx> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211204_062344_742187_BFFA8BFB X-CRM114-Status: GOOD ( 15.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Dec 03 2021 at 09:58, Rob Herring wrote: > On Tue, Nov 30, 2021 at 4:57 PM Thomas Gleixner wrote: > I've rewritten it like this: > > On arm64, user space counter access will be controlled differently > compared to x86. On x86, access in the strictest mode is enabled for all > tasks in an MM when any event is mmap'ed. For arm64, access is > explicitly requested for an event and only enabled when the event's > context is active. This avoids hooks into the arch context switch code > and gives better control of when access is enabled. > > In order to configure user space access when the PMU is enabled, it is > necessary to know if any event (currently active or not) in the current > context has user space accessed enabled. Add a counter similar to other > counters in the context to avoid walking the event list every time. Reviewed-by: Thomas Gleixner _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel