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 001FDC0015E for ; Tue, 15 Aug 2023 18:10:11 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc: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=vBiuVEwQd2UbIo8UexNfZ0bkp2AFj5kI5Q1AygowGkQ=; b=ks7OPqADnwwV+m bGgjo3gK2MSQqT+Pk2QMq+ojhGGz0fg8GETePFjhPG1zn8hWoVEXNGIResqG0R7exkuA2hdC+M0W+ td5arEgaLE4Pfv43GCSKHrvITfp9RK+XqGbEByt1JimKrMXOqz7/UwQXg6b3eFYR4SZk3+zkuOXQh E5BdfXQYYZH8xSVFBOv8OH5g+UvuYJc/AbtYtja5OFPkJ7Pkra+DJkccOxsXPKCwhj2zXU2phDDiq fjp5kELsZ/FKF3mRcUAkQl22pB4opHrk8OQRCUUYPRocZmFdj9bgRuKMsoKAtHntdCKb8KNdalu5T g0lru96tpwrHohMcJs0g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qVyUA-00284o-0C; Tue, 15 Aug 2023 18:09:42 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qVyU8-00284S-1q for linux-arm-kernel@bombadil.infradead.org; Tue, 15 Aug 2023 18:09:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=/2r1fctjhWqnsAUqgQPedNYlhiYJ0uCJ0rPiazPrb0g=; b=rzfg/nukOWHkT8Hi9r3nosJMfE dv8vobzmsH7F1AygLsWfuOR1rwiuSlOOtE0qc1dgk3kKNlg7wNDxwxWWxC5oHIa4VHbKXAth5lNOf L675UkSkvz0Bp34izmPcgAD7akdVtlpjWmC8MoTt+iw9QgXtVODevCip2LYsYOhXLFWo90YYgzqH0 2/zqaUAhuzeWyq7P8XNBHMSDEH8wnoWdiUO7duaKQvH50WLo2GZGqNA16jsYppdCPbKzk9FPHC+Zk 6KuZcQEd38UOWEVn9eG5qGEzzn8jDdqZWL9Ea46R5FUx17ojYHltUV37Yy9WSCOLMXOhCMmCmLZtT NtE0jC8Q==; Received: from [187.19.173.165] (helo=quaco.ghostprotocols.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1qVyU6-009eBf-PH; Tue, 15 Aug 2023 18:09:39 +0000 Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 0FB66404DF; Tue, 15 Aug 2023 15:09:36 -0300 (-03) Date: Tue, 15 Aug 2023 15:09:35 -0300 From: Arnaldo Carvalho de Melo To: James Clark Cc: linux-perf-users@vger.kernel.org, irogers@google.com, john.g.garry@oracle.com, renyu.zj@linux.alibaba.com, Will Deacon , Mike Leach , Leo Yan , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , Suzuki K Poulose , Kan Liang , Kajol Jain , Nick Forrington , Andrii Nakryiko , Eduard Zingerman , Sohom Datta , Rob Herring , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, coresight@lists.linaro.org Subject: Re: [PATCH v5 1/6] perf: cs-etm: Don't duplicate FIELD_GET() Message-ID: References: <20230811144017.491628-1-james.clark@arm.com> <20230811144017.491628-2-james.clark@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230811144017.491628-2-james.clark@arm.com> X-Url: http://acmel.wordpress.com 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 Em Fri, Aug 11, 2023 at 03:39:18PM +0100, James Clark escreveu: > linux/bitfield.h can be included as long as linux/kernel.h is included > first, so change the order of the includes and drop the duplicate macro. Applied this one, to reduce the patch series size. - Arnaldo > Reviewed-by: John Garry > Signed-off-by: James Clark > --- > tools/perf/util/cs-etm.c | 14 ++------------ > 1 file changed, 2 insertions(+), 12 deletions(-) > > diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c > index 1419b40dfbe8..9729d006550d 100644 > --- a/tools/perf/util/cs-etm.c > +++ b/tools/perf/util/cs-etm.c > @@ -6,10 +6,11 @@ > * Author: Mathieu Poirier > */ > > +#include > +#include > #include > #include > #include > -#include > #include > #include > #include > @@ -281,17 +282,6 @@ static int cs_etm__metadata_set_trace_id(u8 trace_chan_id, u64 *cpu_metadata) > return 0; > } > > -/* > - * FIELD_GET (linux/bitfield.h) not available outside kernel code, > - * and the header contains too many dependencies to just copy over, > - * so roll our own based on the original > - */ > -#define __bf_shf(x) (__builtin_ffsll(x) - 1) > -#define FIELD_GET(_mask, _reg) \ > - ({ \ > - (typeof(_mask))(((_reg) & (_mask)) >> __bf_shf(_mask)); \ > - }) > - > /* > * Get a metadata for a specific cpu from an array. > * > -- > 2.34.1 > -- - Arnaldo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel