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 X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C1F1C4649B for ; Fri, 5 Jul 2019 14:54:47 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 0242321738 for ; Fri, 5 Jul 2019 14:54:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="hYq4EGE/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0242321738 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LiDtPbLwbnNKbR5v/qlElxb9/b3of+MlKHLbfnuXwp8=; b=hYq4EGE/4PORzV FDrD/ts24jncVpGrBCjajhIqOFd2rbm19Q7GRrJQpYSwb1/Yzfi0XBTk4k1cUzYdoKODl0KYsNZWp 93Y15qYyvemUOt0wl9GHkk7e3rc/0DHV3zHcdXFsIQGQwsHupN29WqmgcSikcmT3FsGFvMhUpavHQ RwVk/I7W8zZBxKesH7vqj/rjE9UDzQ6h618HCOQnu7ZzzYQ+bxLAnOTZDISbRBVigjMtStkZWHBCa W9FmeBoLWkZ+fFrii6gdCULKCl+8p1wmObkF+ueD3g8sazWezt9T8x/GF6fk0W8gj7Ffiz0k1WmJq 6XTzZT9lsWJFc46CIXYA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hjPbm-0007Dr-9W; Fri, 05 Jul 2019 14:54:42 +0000 Received: from [179.97.35.11] (helo=quaco.ghostprotocols.net) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hjPbk-0007DP-0D; Fri, 05 Jul 2019 14:54:40 +0000 Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 25F0540495; Fri, 5 Jul 2019 11:54:36 -0300 (-03) Date: Fri, 5 Jul 2019 11:54:36 -0300 From: Arnaldo Carvalho de Melo To: Raphael Gault Subject: Re: [PATCH v2 1/5] perf: arm64: Add test to check userspace access to hardware counters. Message-ID: <20190705145436.GA29396@kernel.org> References: <20190705085541.9356-1-raphael.gault@arm.com> <20190705085541.9356-2-raphael.gault@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190705085541.9356-2-raphael.gault@arm.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.12.0 (2019-05-25) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, peterz@infradead.org, catalin.marinas@arm.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, mingo@redhat.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Em Fri, Jul 05, 2019 at 09:55:37AM +0100, Raphael Gault escreveu: > This test relies on the fact that the PMU registers are accessible > from userspace. It then uses the perf_event_mmap_page to retrieve > the counter index and access the underlying register. > > This test uses sched_setaffinity(2) in order to run on all CPU and thus > check the behaviour of the PMU of all cpus in a big.LITTLE environment. > > Signed-off-by: Raphael Gault > --- > tools/perf/arch/arm64/include/arch-tests.h | 6 + > tools/perf/arch/arm64/tests/Build | 1 + > tools/perf/arch/arm64/tests/arch-tests.c | 4 + > tools/perf/arch/arm64/tests/user-events.c | 255 +++++++++++++++++++++ > 4 files changed, 266 insertions(+) > create mode 100644 tools/perf/arch/arm64/tests/user-events.c > > diff --git a/tools/perf/arch/arm64/include/arch-tests.h b/tools/perf/arch/arm64/include/arch-tests.h > index 90ec4c8cb880..a9b17ae0560b 100644 > --- a/tools/perf/arch/arm64/include/arch-tests.h > +++ b/tools/perf/arch/arm64/include/arch-tests.h > @@ -2,11 +2,17 @@ > #ifndef ARCH_TESTS_H > #define ARCH_TESTS_H > > +#define __maybe_unused __attribute__((unused)) What is wrong with using: #include ? [acme@quaco perf]$ find tools/perf/ -name "*.[ch]" | xargs grep __maybe_unused | wc -l 1115 [acme@quaco perf]$ grep __maybe_unused tools/include/linux/compiler.h #ifndef __maybe_unused # define __maybe_unused __attribute__((unused)) [acme@quaco perf]$ Also please don't break strings in multiple lines just to comply with the 80 column limit. That is ok when you have multiple lines ending with a newline, but otherwise just makes it look ugly. - Arnaldo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel