From: Suzuki K Poulose <suzuki.poulose@arm.com> To: Leo Yan <leo.yan@linaro.org>, Mathieu Poirier <mathieu.poirier@linaro.org>, Alexander Shishkin <alexander.shishkin@linux.intel.com>, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Coresight ML <coresight@lists.linaro.org> Cc: Mike Leach <mike.leach@linaro.org>, Robert Walker <robert.walker@arm.com> Subject: Re: [PATCH] coresight: tmc: Fix bad register address for CLAIM Date: Fri, 19 Oct 2018 09:39:15 +0100 [thread overview] Message-ID: <9b6a508d-5c4b-ffd8-7f6b-3f4e6db26571@arm.com> (raw) In-Reply-To: <1539924983-18503-1-git-send-email-leo.yan@linaro.org> Hi Leo, On 10/19/2018 05:56 AM, Leo Yan wrote: > Commit 4d3ebd3658d8 ("coreisght: tmc: Claim device before use") uses > CLAIM tag to validate if the device is available, it needs to pass > the device base address to access related registers. > > In the function tmc_etb_disable_hw() it wrongly passes the driver data > pointer as register base address, thus it's easily to produce the kernel > warning info like below: > > [ 83.579898] WARNING: CPU: 4 PID: 2970 at drivers/hwtracing/coresight/coresight.c:207 coresight_disclaim_device_unlocked+0x44/0x80 > [ 83.591448] Modules linked in: > [ 83.594485] CPU: 4 PID: 2970 Comm: uname Not tainted 4.19.0-rc6-00417-g721b509 #110 Oops! Thanks for fixing ! > > This patch is to fix this bug by using 'drvdata->base' as the > register base address for CLAIM related operation. > > Fixes: 4d3ebd3658d8 ("coreisght: tmc: Claim device before use") > Cc: Suzuki Poulose <suzuki.poulose@arm.com> > Cc: Mathieu Poirier <mathieu.poirier@linaro.org> > Cc: Mike Leach <mike.leach@linaro.org> > Cc: Robert Walker <robert.walker@arm.com> > Signed-off-by: Leo Yan <leo.yan@linaro.org> Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com> > --- > drivers/hwtracing/coresight/coresight-tmc-etf.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/hwtracing/coresight/coresight-tmc-etf.c b/drivers/hwtracing/coresight/coresight-tmc-etf.c > index 53fc83b..5864ac5 100644 > --- a/drivers/hwtracing/coresight/coresight-tmc-etf.c > +++ b/drivers/hwtracing/coresight/coresight-tmc-etf.c > @@ -86,7 +86,7 @@ static void __tmc_etb_disable_hw(struct tmc_drvdata *drvdata) > > static void tmc_etb_disable_hw(struct tmc_drvdata *drvdata) > { > - coresight_disclaim_device(drvdata); > + coresight_disclaim_device(drvdata->base); > __tmc_etb_disable_hw(drvdata); > } > >
WARNING: multiple messages have this Message-ID (diff)
From: suzuki.poulose@arm.com (Suzuki K Poulose) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] coresight: tmc: Fix bad register address for CLAIM Date: Fri, 19 Oct 2018 09:39:15 +0100 [thread overview] Message-ID: <9b6a508d-5c4b-ffd8-7f6b-3f4e6db26571@arm.com> (raw) In-Reply-To: <1539924983-18503-1-git-send-email-leo.yan@linaro.org> Hi Leo, On 10/19/2018 05:56 AM, Leo Yan wrote: > Commit 4d3ebd3658d8 ("coreisght: tmc: Claim device before use") uses > CLAIM tag to validate if the device is available, it needs to pass > the device base address to access related registers. > > In the function tmc_etb_disable_hw() it wrongly passes the driver data > pointer as register base address, thus it's easily to produce the kernel > warning info like below: > > [ 83.579898] WARNING: CPU: 4 PID: 2970 at drivers/hwtracing/coresight/coresight.c:207 coresight_disclaim_device_unlocked+0x44/0x80 > [ 83.591448] Modules linked in: > [ 83.594485] CPU: 4 PID: 2970 Comm: uname Not tainted 4.19.0-rc6-00417-g721b509 #110 Oops! Thanks for fixing ! > > This patch is to fix this bug by using 'drvdata->base' as the > register base address for CLAIM related operation. > > Fixes: 4d3ebd3658d8 ("coreisght: tmc: Claim device before use") > Cc: Suzuki Poulose <suzuki.poulose@arm.com> > Cc: Mathieu Poirier <mathieu.poirier@linaro.org> > Cc: Mike Leach <mike.leach@linaro.org> > Cc: Robert Walker <robert.walker@arm.com> > Signed-off-by: Leo Yan <leo.yan@linaro.org> Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com> > --- > drivers/hwtracing/coresight/coresight-tmc-etf.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/hwtracing/coresight/coresight-tmc-etf.c b/drivers/hwtracing/coresight/coresight-tmc-etf.c > index 53fc83b..5864ac5 100644 > --- a/drivers/hwtracing/coresight/coresight-tmc-etf.c > +++ b/drivers/hwtracing/coresight/coresight-tmc-etf.c > @@ -86,7 +86,7 @@ static void __tmc_etb_disable_hw(struct tmc_drvdata *drvdata) > > static void tmc_etb_disable_hw(struct tmc_drvdata *drvdata) > { > - coresight_disclaim_device(drvdata); > + coresight_disclaim_device(drvdata->base); > __tmc_etb_disable_hw(drvdata); > } > >
next prev parent reply other threads:[~2018-10-19 8:38 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-10-19 4:56 [PATCH] coresight: tmc: Fix bad register address for CLAIM Leo Yan 2018-10-19 4:56 ` Leo Yan 2018-10-19 8:39 ` Suzuki K Poulose [this message] 2018-10-19 8:39 ` Suzuki K Poulose 2018-10-19 15:47 ` Mathieu Poirier 2018-10-19 15:47 ` Mathieu Poirier
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=9b6a508d-5c4b-ffd8-7f6b-3f4e6db26571@arm.com \ --to=suzuki.poulose@arm.com \ --cc=alexander.shishkin@linux.intel.com \ --cc=coresight@lists.linaro.org \ --cc=leo.yan@linaro.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=mathieu.poirier@linaro.org \ --cc=mike.leach@linaro.org \ --cc=robert.walker@arm.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.