From patchwork Tue Jun 5 21:06:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kim Phillips X-Patchwork-Id: 10449227 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6FEE360234 for ; Tue, 5 Jun 2018 21:09:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6010D29CAF for ; Tue, 5 Jun 2018 21:09:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5470029CB7; Tue, 5 Jun 2018 21:09:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B5DF829CAF for ; Tue, 5 Jun 2018 21:09:11 +0000 (UTC) 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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=h1qxshL9/GhqJV0Uu4NkBIN8c35hfOaW+mbW7uV+bJY=; b=d5Fr10jxUYGfuKafyjtHAnomYH AcX+tFtXHxQorO7A/FLMISj7b0qPlhXN1nRWjmSHII6md14sF2CtBFV/xrIvJSLR3VLCbMHRh1R74 iDe2qtnotW4w7V0dnIj2zZ2uEVSgfvXYo8BrXBEO85hYjtLOVfdlqXZh3BUHqAkWR2Mj8kdHNrtuL iQ3IetkGqFDisWmxJWp7p1v2LoIe7V3Nvv+eVLkgXU2D+2wMDGl0h1hdVmWHrQKF5gNs0rs+V4JI+ SE3VQq1BLZQ/cbRZWYQpxGduGNI/RRD7otgKwAvKU5eKIo6JQyxQHIQTwaTQEzW/StZXKMD3uJZ7P U7bSTmqA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fQJCO-0008UU-Go; Tue, 05 Jun 2018 21:09:00 +0000 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fQJBE-0007pE-0F for linux-arm-kernel@lists.infradead.org; Tue, 05 Jun 2018 21:07:52 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DC90415AB; Tue, 5 Jun 2018 14:07:36 -0700 (PDT) Received: from localhost.localdomain (unknown [10.118.17.245]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id C4A653F59D; Tue, 5 Jun 2018 14:07:35 -0700 (PDT) From: Kim Phillips To: Mathieu Poirier Subject: [PATCH v4 03/14] coresight: move shared barrier_pkt[] to coresight_priv.h Date: Tue, 5 Jun 2018 16:06:59 -0500 Message-Id: <20180605210710.22227-4-kim.phillips@arm.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180605210710.22227-1-kim.phillips@arm.com> References: <20180605210710.22227-1-kim.phillips@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180605_140748_115875_90BD3C1C X-CRM114-Status: GOOD ( 15.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kefeng Wang , Kim Phillips , Geert Uytterhoeven , Alexander Shishkin , Gargi Sharma , David Howells , Russell King , Pavel Tatashin , Thierry Reding , Rik van Riel , Suzuki K Poulose , Eric Auger , Alex Williamson , Mike Rapoport , linux-arm-kernel , Greg Kroah-Hartman , Randy Dunlap , Oleg Nesterov , Linux Kernel Mailing List , Kirill Tkhai , Eric Biederman , Leo Yan , Andrew Morton , Robin Murphy , Todd Kjos MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP barrier_pkt[] is used in the etb and tmc-etf coresight components. Change barrier_pkt[] to a static definition, so as to allow them to be built as modules. Cc: Mathieu Poirier Cc: Leo Yan Cc: Alexander Shishkin Cc: Randy Dunlap Cc: Suzuki K Poulose Cc: Greg Kroah-Hartman Cc: Russell King Signed-off-by: Kim Phillips --- drivers/hwtracing/coresight/coresight-priv.h | 8 +++++++- drivers/hwtracing/coresight/coresight.c | 7 ------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-priv.h b/drivers/hwtracing/coresight/coresight-priv.h index 158c720119dd..e76f19ca9e04 100644 --- a/drivers/hwtracing/coresight/coresight-priv.h +++ b/drivers/hwtracing/coresight/coresight-priv.h @@ -57,7 +57,13 @@ static DEVICE_ATTR_RO(name) #define coresight_simple_reg64(type, name, lo_off, hi_off) \ __coresight_simple_func(type, NULL, name, lo_off, hi_off) -extern const u32 barrier_pkt[4]; +/* + * When losing synchronisation a new barrier packet needs to be inserted at the + * beginning of the data collected in a buffer. That way the decoder knows that + * it needs to look for another sync sequence. + */ +static const u32 barrier_pkt[4] = { 0x7fffffff, 0x7fffffff, + 0x7fffffff, 0x7fffffff }; #define CORESIGHT_BARRIER_PKT_SIZE (sizeof(barrier_pkt)) enum etm_addr_type { diff --git a/drivers/hwtracing/coresight/coresight.c b/drivers/hwtracing/coresight/coresight.c index 4969b329511c..0cbc2948defc 100644 --- a/drivers/hwtracing/coresight/coresight.c +++ b/drivers/hwtracing/coresight/coresight.c @@ -46,13 +46,6 @@ static DEFINE_PER_CPU(struct list_head *, tracer_path); */ static struct list_head *stm_path; -/* - * When losing synchronisation a new barrier packet needs to be inserted at the - * beginning of the data collected in a buffer. That way the decoder knows that - * it needs to look for another sync sequence. - */ -const u32 barrier_pkt[4] = {0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff}; - static int coresight_id_match(struct device *dev, void *data) { int trace_id, i_trace_id;