From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DBCE5C433E0 for ; Thu, 30 Jul 2020 17:33:30 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AD0A020809 for ; Thu, 30 Jul 2020 17:33:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="OtyldYxs"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="sOsvyRva" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AD0A020809 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject: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=BFx16BQojk3n7WgbqHQArBor1sGnPbZu7K6dXieVly4=; b=OtyldYxsrC0yIqShH1YTKrnWe N6vqnqtcPDIYcaZtId7nIkcbSixIsVumGmKRKP4JFcOelEQ0fTKuegJEc8ObU/aNxu8nnn78551iE aNGoWJgdN4VW/Vyl+WNiL2sj8QCCKDW7PWQM2g9q987lR9B769megVY1pwoNJnt4nfabafrItdPf8 nSV/FsNzK/mHyGKTo//+rVILHYwk30hTwYDBDrMMdYQI2qVylbZL6ODT4K78l45skc6FRGhZ71hhH 0p38vWfi/8ZS1LBrjD2SHovo6ZTQQLAYkpJlGf4bRW5v+wBZEQqbC3nIEuHam9U5fKW7dKcNQ4LAG yzbMdGKSQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k1CP5-0003TT-8G; Thu, 30 Jul 2020 17:31:39 +0000 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k1CP3-0003Sw-4N for linux-arm-kernel@lists.infradead.org; Thu, 30 Jul 2020 17:31:38 +0000 Received: by mail-pl1-x644.google.com with SMTP id t10so9453197plz.10 for ; Thu, 30 Jul 2020 10:31:36 -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=ILNdye9cVLfdysjIxugrVuHxI0LQBaSoR5uAbKyBjbU=; b=sOsvyRvaznHQ+fEqmpRqRvNQvCyyJMs5Zdyi8i4QcjV26kJw+TP5C/yk1DPvirm6QY Q8yUykPfNHfaljFJlJBZIMEMqbZx3ZC7XY3o/GlBCX6TnLjWPpZaocnuQxu7S9DBj3xG Z83Lv9aplqTUs+ucikhhP5lxcFwOpq68hDPZkPCAqEiBbTk4YMBv2y5qWx5Ge+q55H6a yy4+wvMa+nKrtZgZ+O1yhThz/rLTAAzwQQ9oL0lg7qGS8MLBTtOCz4ChdOSPdqYxORu3 amrCjBYV4XunHfTSListkAe1VUQ/Uiy0geCVbIL2sMe1OeWZXU0tN3zwNHtpfaATWDUZ 7s3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ILNdye9cVLfdysjIxugrVuHxI0LQBaSoR5uAbKyBjbU=; b=ZYIw/wZTpHN+mG6qiPPxslUxD5KiELurOlRKmyQqpCG5Uoc6XeOIKhBANKj3C4rMwW sZmTGEkLAyTiapgBa1ylxB14j8k7liYhCZ4kHNydhRXKmMnBKwsy2No0tTgIQTH2ZWn8 A6BGjtiiEXUXPgYgBwSCex3IWaJj7qQFcyA3kO8W56tWv08k0swMEBQZ2mwN0Hcruo/I kyJNpltBFIY/IQ+9EoikWE1vdBma2O2PGJq85yFgqXmv5sdk4XrJ8ko45oJtZIQBWqHB IAKcN5fejisSVJZ1UPPKV3jqN7GiG59pmw54ARh6fgahQ5XMoKslGYUQnrDUCEIkna98 Ymhg== X-Gm-Message-State: AOAM533jZDHKIg7UjZTRO5/cT106kEsu6wfLNS82RlTl+QcXGZarsFN+ GoQ2ndImdJLHtjLzmPiMlvGhmJam+lo= X-Google-Smtp-Source: ABdhPJy4yB9ch9yzdH6jeNl8vHftgeKnzg7T5QjZqVQ83mo/HAsl0LCVdAkgUIKh+hfLtc3vpfjNkQ== X-Received: by 2002:a17:902:a511:: with SMTP id s17mr254117plq.334.1596130294696; Thu, 30 Jul 2020 10:31:34 -0700 (PDT) Received: from xps15 (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id y68sm6938528pfy.185.2020.07.30.10.31.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Jul 2020 10:31:33 -0700 (PDT) Date: Thu, 30 Jul 2020 11:31:31 -0600 From: Mathieu Poirier To: Suzuki K Poulose Subject: Re: [RFC PATCH 04/14] coresight: etm4x: Free up argument of etm4_init_arch_data Message-ID: <20200730173131.GA3155687@xps15> References: <20200722172040.1299289-1-suzuki.poulose@arm.com> <20200722172040.1299289-5-suzuki.poulose@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200722172040.1299289-5-suzuki.poulose@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200730_133137_474618_9234F136 X-CRM114-Status: GOOD ( 22.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: coresight@lists.linaro.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, mike.leach@linaro.org 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 On Wed, Jul 22, 2020 at 06:20:30PM +0100, Suzuki K Poulose wrote: > etm4_init_arch_data is called early during the device probe, > even before the coresight_device is registered. Since we are > about to replace the direct access via abstraction layer, we > need a way to pass in the csdev_access for the given device. > Towards this free up the argument, which is already available > via etmdrvdata[smp_processor_id()]. > > Cc: Mathieu Poirier > Cc: Mike Leach > Signed-off-by: Suzuki K Poulose > --- > drivers/hwtracing/coresight/coresight-etm4x.c | 15 +++++++++++---- > 1 file changed, 11 insertions(+), 4 deletions(-) > > diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c b/drivers/hwtracing/coresight/coresight-etm4x.c > index 7bb74c659c4f..67deb4a4e618 100644 > --- a/drivers/hwtracing/coresight/coresight-etm4x.c > +++ b/drivers/hwtracing/coresight/coresight-etm4x.c > @@ -614,7 +614,8 @@ static const struct coresight_ops etm4_cs_ops = { > .source_ops = &etm4_source_ops, > }; > > -static void etm4_init_arch_data(void *info) > + > +static void etm4_init_arch_data(void *__unused) > { > u32 etmidr0; > u32 etmidr1; > @@ -622,8 +623,14 @@ static void etm4_init_arch_data(void *info) > u32 etmidr3; > u32 etmidr4; > u32 etmidr5; > - struct etmv4_drvdata *drvdata = info; > - int i; > + struct etmv4_drvdata *drvdata; > + int i, cpu; > + > + cpu = raw_smp_processor_id(); Can you provide details on the motivation to use the raw_ version over the regular one? As far as I can see in linux/smp.h there is no difference between them unless DEBUB_PREEMPT is enabled. Even then the debug version won't complain since the task is CPU affined. > + drvdata = etmdrvdata[cpu]; > + > + if (WARN_ON(!etmdrvdata[cpu])) > + return; > > /* Make sure all registers are accessible */ > etm4_os_unlock(drvdata); > @@ -1517,7 +1524,7 @@ static int etm4_probe(struct amba_device *adev, const struct amba_id *id) > etmdrvdata[drvdata->cpu] = drvdata; > > if (smp_call_function_single(drvdata->cpu, > - etm4_init_arch_data, drvdata, 1)) > + etm4_init_arch_data, NULL, 1)) > dev_err(dev, "ETM arch init failed\n"); > > ret = etm4_pm_setup_cpuslocked(); > -- > 2.24.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel