From patchwork Tue Mar 8 20:49:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Leach X-Patchwork-Id: 12774375 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 5FECCC433EF for ; Tue, 8 Mar 2022 20:53:55 +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:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To: Message-Id:Date: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=kXbpcKTjto+C2GLJvMvVrqfg+biedi5b8/vjgJTu5O8=; b=0Bzu3jArKCNsIY /fJCKOqAD4n9DFKYMI7zrmZ3aWFvNITAMTNHtinUGYB3hmh28RmskpdkJ/XM/+OW4oxZtLUoQhmOS PEm1L46TzDx57VXGY2/n82A4qyukcuvmTcxNirfMZdezjUQLyoNY+yJQjVPzmj/DAH7+MNlZ0wg03 a8aggPy88AVONCfoauhCgCwrtXqbBdRtZeSHdki9PfvKzdczugxFx/Gqzqr2ITIWLvaMOXuTmMrPg XyUejTkhFZl0kubtHr/Qx8U2Ng9hGx1hUq9QqEemsRu7xzbR5nhZbv0uiW1H30LjXNYJJFw/P9FCG GzlliNp7e/NA8dsOa0nw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nRgon-006Crt-0U; Tue, 08 Mar 2022 20:52:29 +0000 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nRgmc-006BrD-IY for linux-arm-kernel@lists.infradead.org; Tue, 08 Mar 2022 20:50:16 +0000 Received: by mail-wr1-x42e.google.com with SMTP id u1so30391066wrg.11 for ; Tue, 08 Mar 2022 12:50:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Sw4xwZRTTjBJM4wcsTZt554bc360dKae0Yk+cjG+3LM=; b=VovctRatE/Hh/GbXDnfGoZ7kGZelTUslgwp4Sr6q2UrJWHkCaO6RSfDfl4AMzv13JX tpRiLWLlhDDJ4PRVMp5J3dj/yvSuyaHxdzAoEX9qHPlVAyQsGnltVOxnjroBs91k9Y0H SfZgQm5YTJVvrJfij2goljk0j4JVm+BpUKq+d8VTuCd4ZDdPVqJ/0RIWJSATf29tKmAC bfSy+KN0am/pKhXgICoe9gGBanbaSd6Y3WlQGFslO7tCwEm/sU79DQiV6c9l9hWd9RmO FE4CRw57GkoAn2UysKML38x61E22SMbG2iUVlXa5jnNTyTRoUYgByjQxVIemEEa6c9MK sSGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Sw4xwZRTTjBJM4wcsTZt554bc360dKae0Yk+cjG+3LM=; b=P/lDvElYa1XzJhLVBFPe5r6HRJ91RyBtgBIsva1zu3YeVpCPvFNx3GqQvP7mN9y07l TNN5v+RuX3ghcbOSruU/Wlb1mBQ5UKemIPkEfF2odV0L82VpAa0h+ycVqAhmbxo6STb1 HtmuHKl8meKwd8BpylYt8r3bQ9AFb2xill9M84KNKIT2lmW3g7uq1bEmtvlYS/WifD+F LY80vNZ26DQafb9FEFE9s49p82dIIiYi0njqSqgTkF8lsO+cVEdJFeokmU+GvRnXlcK8 PXWIKhqyrKL7fcVA+2Bia2o3wOdN2+L15pSW0dy5d/gnzXm6TrRb9+5sRfFwhKcBndQa Nsag== X-Gm-Message-State: AOAM531EvKn7B/JBjtiJZCzayRMKN5mCJxgZ09ed5InBTzdszQXsF0gh GmGkKJOz/+dbSOUtqjkI85cWcg== X-Google-Smtp-Source: ABdhPJxXSIbBxcT9dt3sJvdZKh8iPGJdFd/p52e4WRJecsc9Nrorp/W6kWWMjyBtM1B3Y6peeKsZgg== X-Received: by 2002:a5d:4892:0:b0:1ed:beaa:778a with SMTP id g18-20020a5d4892000000b001edbeaa778amr13409236wrq.35.1646772611303; Tue, 08 Mar 2022 12:50:11 -0800 (PST) Received: from linaro.org ([2a00:23c5:6809:2201:546d:7d59:1703:bf96]) by smtp.gmail.com with ESMTPSA id p26-20020a1c741a000000b00389ab9a53c8sm3245758wmc.36.2022.03.08.12.50.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 12:50:11 -0800 (PST) From: Mike Leach To: suzuki.poulose@arm.com, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: mathieu.poirier@linaro.org, peterz@infradead.org, mingo@redhat.com, acme@kernel.org, linux-perf-users@vger.kernel.org, leo.yan@linaro.org, Mike Leach Subject: [PATCH 08/10] coresight: Remove legacy Trace ID allocation mechanism Date: Tue, 8 Mar 2022 20:49:58 +0000 Message-Id: <20220308205000.27646-9-mike.leach@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220308205000.27646-1-mike.leach@linaro.org> References: <20220308205000.27646-1-mike.leach@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220308_125014_679727_DFB1DF9E X-CRM114-Status: GOOD ( 12.63 ) 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: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This static 'cpu * 2 + seed' was outdated and broken for systems with high core counts (>46). This has been replaced by a dynamic allocation system. Signed-off-by: Mike Leach --- include/linux/coresight-pmu.h | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/include/linux/coresight-pmu.h b/include/linux/coresight-pmu.h index 4ac5c081af93..bb4eb4de3c77 100644 --- a/include/linux/coresight-pmu.h +++ b/include/linux/coresight-pmu.h @@ -8,7 +8,6 @@ #define _LINUX_CORESIGHT_PMU_H #define CORESIGHT_ETM_PMU_NAME "cs_etm" -#define CORESIGHT_ETM_PMU_SEED 0x10 /* * Below are the definition of bit offsets for perf option, and works as @@ -32,15 +31,4 @@ #define ETM4_CFG_BIT_RETSTK 12 #define ETM4_CFG_BIT_VMID_OPT 15 -static inline int coresight_get_trace_id(int cpu) -{ - /* - * A trace ID of value 0 is invalid, so let's start at some - * random value that fits in 7 bits and go from there. Since - * the common convention is to have data trace IDs be I(N) + 1, - * set instruction trace IDs as a function of the CPU number. - */ - return (CORESIGHT_ETM_PMU_SEED + (cpu * 2)); -} - #endif