From patchwork Mon Dec 28 12:46:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 352743 Delivered-To: patch@linaro.org Received: by 2002:a17:906:4755:0:0:0:0 with SMTP id j21csp10017540ejs; Mon, 28 Dec 2020 08:13:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJzOCVxoHp+rHjZYRmsRCaIEussyJ4AUGgk1RKdmpqw+6F7UzStuLsw0osSKatI7GfcarcoU X-Received: by 2002:a17:906:e15:: with SMTP id l21mr42396953eji.509.1609171988000; Mon, 28 Dec 2020 08:13:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609171987; cv=none; d=google.com; s=arc-20160816; b=tcLTpCsvqwBSgQHdCSUgOX4LIULL+cHl/lmbBs3PSdsB0Htvc8oHsFZAZQ2sTD84h9 A9PUOHwIRiUjghU2JSilAs+HlqSq5ri+PqljGSTFD1TFMfaQxzCtA2gbIJJFBncTfJoi E1JsLTsQeJruqpPvzKKceZtDj1w8oFJRLrS1Hev6i5VS1qOYAwuu8v+suayUWEqEhi9P 7KareUCBScW+gtlSGBxmRA5YZrulgYa+X455FnWeSWfzwd0fb301FbFlB3Mji4dxpv2P hse1kbEXWd/dafBIYK1sAtcGEECxue/AqWeaxPa5DXlsXIbBbMPSktZxlyI+/am8yRCm KIKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=NjqtsZYcqD507xBW2BXcGMJfAX/JSSyzuWVv+b+GV3I=; b=DKOYX0unJKGhQoL7qgfcS7orHwkhELwARCLX0PsNa79lKiuiGQ67+1YKc1dpVv+BDr peddwYLM6YyZsgV+uzyVgJVZJnQDOZb2/tyXp67XZlJP5ZflsYR5isb94AWGrfkRBcKP RJFj8RO8eVGxnNp4k4Xsrgl2wGe2DXHx5VPxqWdnKpZsiROzfiNNtOojmC9JnDnGqDuV Vw+sNsylwwUo5d83F3/53yHGMM8C2VET+0z8Vclyq7gtBIXCS8xZ0bOGwOYyQq9usoWL NxXEhHzw8LF7wCuDC73wJPI9H4TgvqMU6b6mvZCd4YSY6TVV9pG40LjPrnXjLWen13um pHKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0eprnP3H; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m7si20973349eji.682.2020.12.28.08.13.07; Mon, 28 Dec 2020 08:13:07 -0800 (PST) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0eprnP3H; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393555AbgL1QJg (ORCPT + 14 others); Mon, 28 Dec 2020 11:09:36 -0500 Received: from mail.kernel.org ([198.145.29.99]:53080 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388732AbgL1NYb (ORCPT ); Mon, 28 Dec 2020 08:24:31 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id A23EC205CB; Mon, 28 Dec 2020 13:23:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609161830; bh=H33UDjfOYPvhO9+xi+pxBnDvqxBOs2w6c22Uii5l59g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0eprnP3HngeJ2dizjqdpUxukEufywRYnlHR9dGc58Ot9QBdj0acZs58c1mCL+cERa vq2G7fP58fAYY4qJrJR8cTmuVRfVJM27qKxg4FVCDGUqQSN6Ci/VCq6ca7tgKqp1zT pwQPa46r8skPNfPStHJbsdyPunD3fI2t1qozCmpM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thomas Backlund , Leo Yan , Mathieu Poirier , Mike Leach , Alexander Shishkin , Jiri Olsa , Mark Rutland , Namhyung Kim , Peter Zijlstra , Suzuki Poulouse , Tor Jeremiassen , linux-arm-kernel@lists.infradead.org, Arnaldo Carvalho de Melo , Salvatore Bonaccorso Subject: [PATCH 4.19 097/346] perf cs-etm: Move definition of traceid_list global variable from header file Date: Mon, 28 Dec 2020 13:46:56 +0100 Message-Id: <20201228124924.471691181@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124919.745526410@linuxfoundation.org> References: <20201228124919.745526410@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Leo Yan commit 168200b6d6ea0cb5765943ec5da5b8149701f36a upstream. The variable 'traceid_list' is defined in the header file cs-etm.h, if multiple C files include cs-etm.h the compiler might complaint for multiple definition of 'traceid_list'. To fix multiple definition error, move the definition of 'traceid_list' into cs-etm.c. Fixes: cd8bfd8c973e ("perf tools: Add processing of coresight metadata") Reported-by: Thomas Backlund Signed-off-by: Leo Yan Reviewed-by: Mathieu Poirier Reviewed-by: Mike Leach Tested-by: Mike Leach Tested-by: Thomas Backlund Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: Tor Jeremiassen Cc: linux-arm-kernel@lists.infradead.org Link: http://lore.kernel.org/lkml/20200505133642.4756-1-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Salvatore Bonaccorso Signed-off-by: Greg Kroah-Hartman --- tools/perf/util/cs-etm.c | 3 +++ tools/perf/util/cs-etm.h | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) --- a/tools/perf/util/cs-etm.c +++ b/tools/perf/util/cs-etm.c @@ -87,6 +87,9 @@ struct cs_etm_queue { struct cs_etm_packet *packet; }; +/* RB tree for quick conversion between traceID and metadata pointers */ +static struct intlist *traceid_list; + static int cs_etm__update_queues(struct cs_etm_auxtrace *etm); static int cs_etm__process_timeless_queues(struct cs_etm_auxtrace *etm, pid_t tid, u64 time_); --- a/tools/perf/util/cs-etm.h +++ b/tools/perf/util/cs-etm.h @@ -53,9 +53,6 @@ enum { CS_ETMV4_PRIV_MAX, }; -/* RB tree for quick conversion between traceID and metadata pointers */ -struct intlist *traceid_list; - #define KiB(x) ((x) * 1024) #define MiB(x) ((x) * 1024 * 1024)