Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp680260pxb; Thu, 30 Sep 2021 14:54:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzAiJLI6wG23nwUx7a0lHhckowl4h90cixqs9CWaWIG6PsuLOOdICcZhtX4Y0Hj8X82X+eh X-Received: by 2002:a17:90a:1d8:: with SMTP id 24mr15549869pjd.69.1633038859560; Thu, 30 Sep 2021 14:54:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633038859; cv=none; d=google.com; s=arc-20160816; b=pQ5BI10jw4ACmFHdwVZUp7aOtgJAWk6AUBue/2il/g9w2yZl3hO/+WJeWVu4CB9SnH m89NbAqNVYfdcETXifPHdE8HjYnKUewq+6Jqmk+2InCewpxNbQUmyzocbZcwvtxRNC8r zsllzGcqx9THjFmEg7vtpKGSvvmniBtnDiI0gh/qFnEG9RNwFdVKycCSqKjbJqL39Vd7 FShgSC5B5q9mMwVfac+LVBSlowAk2c8c/uqIk3oRA8aJbeDzK2UOPideledG4CG1zqhT OQxw+XoQGspdSaorjcr7UPjUYVHrAj9DFQ68ex+Z/tqE4K1/nwniVRbar/Wu4AbGYwp2 nr7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=g6bz22D6xwh6dY6ebf3YVMVwbapBNBp7nh6i3iRX4rg=; b=WVcqI/lPHIXEv3a9dTWdrf6Me4OXoHYV7S9HaDnYpG2WxVGYbNOXk1ovnFXbbJbB0r xr3BfGEVRHz5kvnCyE/pcMrxVfpkhTvRs6ff8+alufRTjl/pyTTKMSjAYeQzWXwzxNUs Zt7A8FoEgSSdq1tWoMFDE3sbTG81sCxImoUwl5KzSBcXmN6dB25T/RlCrDjc/WCxJHhP pKvK2MO37wfMMRL/GXL24uCUVRPpLrfYwXB6/hHa01XlU2eS6t3fMwS42ybOI9Q0cGJy eLJQz0eG7KKDuMlsC6mveAfUVRucbkj+kerbuhZm8hf7f6GfMXefuS0o4Gb9Is1VucMH MZ0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dOKiID32; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 4si6336287pjh.94.2021.09.30.14.54.06; Thu, 30 Sep 2021 14:54:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@linaro.org header.s=google header.b=dOKiID32; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352912AbhI3R7j (ORCPT + 99 others); Thu, 30 Sep 2021 13:59:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352882AbhI3R7h (ORCPT ); Thu, 30 Sep 2021 13:59:37 -0400 Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 123ABC06176A for ; Thu, 30 Sep 2021 10:57:55 -0700 (PDT) Received: by mail-pg1-x52f.google.com with SMTP id k24so7057577pgh.8 for ; Thu, 30 Sep 2021 10:57:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=g6bz22D6xwh6dY6ebf3YVMVwbapBNBp7nh6i3iRX4rg=; b=dOKiID32WTuG8C1FY2tDSCXxPTOcTSojqkYxtMXC81eBn/3A6Aez9SSrNtOe43/vqZ r14bP3+HhfILcH+mSy8qbeihv9hjIQXbOsvQAQoJGyCKi69gMmOvcfw3hK26OXgksxet 6+FGEby1cJgq/DR2sx0qdTMffsxJehFBI0/Jf/sVsQgmrcbIcBz6EdQNrgyPsTt1ZPgS ZCrOOjiBSKNIPp+/HCaTNKw6aPf7kK6fUNTW2E3WZsyf88X/+1OL9qKMSq5fRaxxt2F7 DIRuiz0ePqm6/qsgCz/Hfrbu/DHfLIfGouCHbrROrDb5RKPxOQPBaXqRmADH9pI1E8cY amAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=g6bz22D6xwh6dY6ebf3YVMVwbapBNBp7nh6i3iRX4rg=; b=x4UlrPbKqL1GtFcN2d2gKA8cIOOUythbmOU+/txTOOcjbbgE/sqJfsgIU12450tvJc Dt78uECTiWLlZJx0XGC+1CilO4zFR/tmIIeMvBgK2c4OdUU/wYHsO3tSnY2uzJkaoWJI +12i6C1WQ9h2mSbF2SBptJWQNtfyhG3cKO/m1XT8g3I3/IUhZItTU+QiyqZPbgakEp3A csfB2S+ziiA0SIF+Kma9CKhqi+YWW4why4oJCOhVDWL7+Lr7JhYr+pCSY0+EwDTD7qZq la40plvWfaRSmrBmVF3okWht4p5hTCL2atfByGPTTtDqGDnqGkW53ND5l87P05pHGDqZ lGLw== X-Gm-Message-State: AOAM530f8OAfyjpb8s7jEEC5VsEby4qQS49huIFxAwcFvbjpgqwozmQ+ 4bdifqCKo02/1fZt9douA+5LQg== X-Received: by 2002:aa7:8887:0:b0:43c:83fe:2c56 with SMTP id z7-20020aa78887000000b0043c83fe2c56mr5591779pfe.82.1633024674520; Thu, 30 Sep 2021 10:57:54 -0700 (PDT) Received: from p14s (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id s188sm3436085pfb.44.2021.09.30.10.57.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Sep 2021 10:57:53 -0700 (PDT) Date: Thu, 30 Sep 2021 11:57:51 -0600 From: Mathieu Poirier To: Suzuki K Poulose Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, maz@kernel.org, catalin.marinas@arm.com, mark.rutland@arm.com, james.morse@arm.com, anshuman.khandual@arm.com, leo.yan@linaro.org, mike.leach@linaro.org, will@kernel.org, lcherian@marvell.com, coresight@lists.linaro.org Subject: Re: [PATCH v2 01/17] coresight: trbe: Fix incorrect access of the sink specific data Message-ID: <20210930175751.GC3047827@p14s> References: <20210921134121.2423546-1-suzuki.poulose@arm.com> <20210921134121.2423546-2-suzuki.poulose@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210921134121.2423546-2-suzuki.poulose@arm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 21, 2021 at 02:41:05PM +0100, Suzuki K Poulose wrote: > The TRBE driver wrongly treats the aux private data as the TRBE driver > specific buffer for a given perf handle, while it is the ETM PMU's > event specific data. Fix this by correcting the instance to use > appropriate helper. > > Fixes: 3fbf7f011f242 ("coresight: sink: Add TRBE driver") > Signed-off-by: Suzuki K Poulose > --- > drivers/hwtracing/coresight/coresight-trbe.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/hwtracing/coresight/coresight-trbe.c b/drivers/hwtracing/coresight/coresight-trbe.c > index d4c57aed05e5..e3d73751d568 100644 > --- a/drivers/hwtracing/coresight/coresight-trbe.c > +++ b/drivers/hwtracing/coresight/coresight-trbe.c > @@ -363,7 +363,7 @@ static unsigned long __trbe_normal_offset(struct perf_output_handle *handle) > > static unsigned long trbe_normal_offset(struct perf_output_handle *handle) > { > - struct trbe_buf *buf = perf_get_aux(handle); > + struct trbe_buf *buf = etm_perf_sink_config(handle); I really wonder how things got to work before... I have fixed the 13-character SHA in the "Fixes" tag and added this patch to my local tree. More comments tomorrow. Thanks, Mathieu > u64 limit = __trbe_normal_offset(handle); > u64 head = PERF_IDX2OFF(handle->head, buf); > > -- > 2.24.1 >