From: Greg Kroah-Hartman <gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>
To: Hiroshi DOYU <hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Grant Likely
<grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>,
Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>,
Rob Landley <rob-VoJi6FS/r0vR7s880joybQ@public.gmane.org>,
Colin Cross <ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>,
Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>,
Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
Russell King <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
Santosh Shilimkar
<santosh.shilimkar-l0cyMroinI0@public.gmane.org>,
Benoit Cousson <b-cousson-l0cyMroinI0@public.gmane.org>,
Aneesh V <aneesh-l0cyMroinI0@public.gmane.org>,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH 3/4] ARM: tegra30: Add Tegra Memory Controller(MC) driver
Date: Thu, 10 May 2012 14:46:04 -0700 [thread overview]
Message-ID: <20120510214604.GA3525@kroah.com> (raw)
In-Reply-To: <1336635764-30597-3-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
On Thu, May 10, 2012 at 10:42:32AM +0300, Hiroshi DOYU wrote:
> Tegra Memory Controller(MC) driver for Tegra30
> Added to support MC General interrupts, mainly for IOMMU(SMMU).
I'll apply this, but:
> +static inline u32 mc_readl(struct tegra30_mc *mc, u32 offs)
> +{
> + if (offs < 0x10)
> + return readl(mc->regs[0] + offs);
> + BUG_ON(offs < 0x3c);
> + if (offs < 0x1f0)
> + return readl(mc->regs[1] + offs - 0x3c);
> + BUG_ON(offs < 0x200);
> + if (offs < 0x228)
> + return readl(mc->regs[2] + offs - 0x200);
> + BUG_ON(offs < 0x284);
> + if (offs < 0x400)
> + return readl(mc->regs[3] + offs - 0x284);
> + BUG();
> +}
That's a lot of BUG* calls. Same thing with the 1/4 patch in this
series.
We really should not have a BUG call in any driver, as you just stopped
the whole system. I can understand this being there for debugging when
you create the code originally, but as these are things no one should
ever be able to hit now, you should remove them, right?
Care to write a follow-on patch removing all of these BUG_ON and BUG
calls in this and the drivers/memory/tegra20-mc.c driver?
thanks,
greg k-h
WARNING: multiple messages have this Message-ID (diff)
From: gregkh@linuxfoundation.org (Greg Kroah-Hartman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/4] ARM: tegra30: Add Tegra Memory Controller(MC) driver
Date: Thu, 10 May 2012 14:46:04 -0700 [thread overview]
Message-ID: <20120510214604.GA3525@kroah.com> (raw)
In-Reply-To: <1336635764-30597-3-git-send-email-hdoyu@nvidia.com>
On Thu, May 10, 2012 at 10:42:32AM +0300, Hiroshi DOYU wrote:
> Tegra Memory Controller(MC) driver for Tegra30
> Added to support MC General interrupts, mainly for IOMMU(SMMU).
I'll apply this, but:
> +static inline u32 mc_readl(struct tegra30_mc *mc, u32 offs)
> +{
> + if (offs < 0x10)
> + return readl(mc->regs[0] + offs);
> + BUG_ON(offs < 0x3c);
> + if (offs < 0x1f0)
> + return readl(mc->regs[1] + offs - 0x3c);
> + BUG_ON(offs < 0x200);
> + if (offs < 0x228)
> + return readl(mc->regs[2] + offs - 0x200);
> + BUG_ON(offs < 0x284);
> + if (offs < 0x400)
> + return readl(mc->regs[3] + offs - 0x284);
> + BUG();
> +}
That's a lot of BUG* calls. Same thing with the 1/4 patch in this
series.
We really should not have a BUG call in any driver, as you just stopped
the whole system. I can understand this being there for debugging when
you create the code originally, but as these are things no one should
ever be able to hit now, you should remove them, right?
Care to write a follow-on patch removing all of these BUG_ON and BUG
calls in this and the drivers/memory/tegra20-mc.c driver?
thanks,
greg k-h
WARNING: multiple messages have this Message-ID (diff)
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Hiroshi DOYU <hdoyu@nvidia.com>
Cc: linux-tegra@vger.kernel.org,
Grant Likely <grant.likely@secretlab.ca>,
Rob Herring <rob.herring@calxeda.com>,
Rob Landley <rob@landley.net>, Colin Cross <ccross@android.com>,
Olof Johansson <olof@lixom.net>,
Stephen Warren <swarren@wwwdotorg.org>,
Russell King <linux@arm.linux.org.uk>,
Santosh Shilimkar <santosh.shilimkar@ti.com>,
Benoit Cousson <b-cousson@ti.com>, Aneesh V <aneesh@ti.com>,
devicetree-discuss@lists.ozlabs.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 3/4] ARM: tegra30: Add Tegra Memory Controller(MC) driver
Date: Thu, 10 May 2012 14:46:04 -0700 [thread overview]
Message-ID: <20120510214604.GA3525@kroah.com> (raw)
In-Reply-To: <1336635764-30597-3-git-send-email-hdoyu@nvidia.com>
On Thu, May 10, 2012 at 10:42:32AM +0300, Hiroshi DOYU wrote:
> Tegra Memory Controller(MC) driver for Tegra30
> Added to support MC General interrupts, mainly for IOMMU(SMMU).
I'll apply this, but:
> +static inline u32 mc_readl(struct tegra30_mc *mc, u32 offs)
> +{
> + if (offs < 0x10)
> + return readl(mc->regs[0] + offs);
> + BUG_ON(offs < 0x3c);
> + if (offs < 0x1f0)
> + return readl(mc->regs[1] + offs - 0x3c);
> + BUG_ON(offs < 0x200);
> + if (offs < 0x228)
> + return readl(mc->regs[2] + offs - 0x200);
> + BUG_ON(offs < 0x284);
> + if (offs < 0x400)
> + return readl(mc->regs[3] + offs - 0x284);
> + BUG();
> +}
That's a lot of BUG* calls. Same thing with the 1/4 patch in this
series.
We really should not have a BUG call in any driver, as you just stopped
the whole system. I can understand this being there for debugging when
you create the code originally, but as these are things no one should
ever be able to hit now, you should remove them, right?
Care to write a follow-on patch removing all of these BUG_ON and BUG
calls in this and the drivers/memory/tegra20-mc.c driver?
thanks,
greg k-h
next prev parent reply other threads:[~2012-05-10 21:46 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-10 7:42 [PATCH 1/4] ARM: tegra20: Add Tegra Memory Controller(MC) driver Hiroshi DOYU
2012-05-10 7:42 ` Hiroshi DOYU
2012-05-10 7:42 ` Hiroshi DOYU
[not found] ` <1336635764-30597-1-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-05-10 7:42 ` [PATCH 2/4] ARM: dt: tegra20.dtsi: Add Memory Controller(MC) nodes Hiroshi DOYU
2012-05-10 7:42 ` Hiroshi DOYU
2012-05-10 7:42 ` Hiroshi DOYU
[not found] ` <1336635764-30597-2-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-05-16 6:35 ` Olof Johansson
2012-05-16 6:35 ` Olof Johansson
2012-05-16 6:35 ` Olof Johansson
2012-05-16 6:51 ` Hiroshi Doyu
2012-05-16 6:51 ` Hiroshi Doyu
2012-05-16 6:51 ` Hiroshi Doyu
[not found] ` <20120516095107.3510cb39d0f9cd2527e0bf1e-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-05-16 6:53 ` [PATCH 1/2] ARM: dt: tegra{20,30}.dtsi: Rename "MC" to "Memory Controller" Hiroshi DOYU
[not found] ` <1337151226-7266-1-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-05-16 6:53 ` [PATCH 2/2] ARM: tegra{20,30}: " Hiroshi DOYU
2012-05-16 12:44 ` [v2 1/1] ARM: dt: tegra{20,30}.dtsi: " Hiroshi DOYU
[not found] ` <1337172241-28677-1-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-05-16 15:49 ` Stephen Warren
[not found] ` <4FB3CC87.4030505-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-05-16 17:15 ` Hiroshi Doyu
[not found] ` <20120516.201540.1972877673672045065.hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-05-16 17:20 ` Stephen Warren
[not found] ` <4FB3E1E8.1050408-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-05-16 21:51 ` Olof Johansson
[not found] ` <CAOesGMhw5hJSF96FBuENnwx2=ACyAYwX6uny9zQeTsimcebF8A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-05-17 5:47 ` [PATCH 1/4] ARM: dt: tegra{20,30}.dtsi: Rename "mc" to "memory-controller" Hiroshi DOYU
[not found] ` <1337233667-23770-1-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-05-17 5:47 ` [PATCH 2/4] ARM: tegra{20,30}: " Hiroshi DOYU
2012-05-17 5:47 ` [PATCH 3/4] ARM: dt: tegra20.dtsi: Rename "emc" " Hiroshi DOYU
2012-05-17 5:47 ` [PATCH 4/4] ARM: tegra20: " Hiroshi DOYU
2012-05-17 16:34 ` [PATCH 1/4] ARM: dt: tegra{20,30}.dtsi: Rename "mc" " Stephen Warren
2012-06-04 17:28 ` Stephen Warren
[not found] ` <4FCCF02A.7060704-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-06-04 18:20 ` Stephen Warren
2012-05-10 7:42 ` [PATCH 3/4] ARM: tegra30: Add Tegra Memory Controller(MC) driver Hiroshi DOYU
2012-05-10 7:42 ` Hiroshi DOYU
2012-05-10 7:42 ` Hiroshi DOYU
[not found] ` <1336635764-30597-3-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-05-10 21:46 ` Greg Kroah-Hartman [this message]
2012-05-10 21:46 ` Greg Kroah-Hartman
2012-05-10 21:46 ` Greg Kroah-Hartman
2012-05-11 6:16 ` Hiroshi Doyu
2012-05-11 6:16 ` Hiroshi Doyu
[not found] ` <20120511.091655.1764445721704382888.hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-05-11 6:22 ` [PATCH 1/2] ARM: tegra20: MC: Remove unnecessary BUG*() Hiroshi DOYU
2012-05-11 6:22 ` Hiroshi DOYU
2012-05-11 6:22 ` [PATCH 2/2] ARM: tegra30: " Hiroshi DOYU
2012-05-11 6:22 ` Hiroshi DOYU
[not found] ` <1336717334-23276-2-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-05-11 10:04 ` [v2 1/2] ARM: tegra20: " Hiroshi DOYU
2012-05-11 10:04 ` Hiroshi DOYU
2012-05-11 10:04 ` [v2 2/2] ARM: tegra30: " Hiroshi DOYU
2012-05-11 10:04 ` Hiroshi DOYU
2012-05-10 7:42 ` [PATCH 4/4] ARM: dt: tegra30.dtsi: Add Memory Controller(MC) nodes Hiroshi DOYU
2012-05-10 7:42 ` Hiroshi DOYU
2012-05-10 7:42 ` Hiroshi DOYU
2012-05-10 17:23 ` [PATCH 1/4] ARM: tegra20: Add Tegra Memory Controller(MC) driver Stephen Warren
2012-05-10 17:23 ` Stephen Warren
[not found] ` <4FABF9AB.6020902-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-05-10 18:18 ` Greg Kroah-Hartman
2012-05-10 18:18 ` Greg Kroah-Hartman
2012-05-10 18:18 ` Greg Kroah-Hartman
2012-05-11 6:50 ` Hiroshi Doyu
2012-05-11 6:50 ` Hiroshi Doyu
[not found] ` <20120511095012.57f737d1b0d2536e0d367a9b-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-05-11 6:56 ` [PATCH 1/3] ARM: tegra20: Make MC optional in Kconfig Hiroshi DOYU
2012-05-11 6:56 ` Hiroshi DOYU
2012-05-11 6:56 ` Hiroshi DOYU
2012-05-11 6:56 ` [PATCH 2/3] ARM: tegra30: " Hiroshi DOYU
2012-05-11 6:56 ` Hiroshi DOYU
2012-05-11 6:56 ` Hiroshi DOYU
[not found] ` <1336719389-28506-1-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-05-11 6:56 ` [PATCH 3/3] ARM: tegra: Make TEGRA{20,30}_MC selectable in defconfig Hiroshi DOYU
2012-05-11 6:56 ` Hiroshi DOYU
2012-05-11 6:56 ` Hiroshi DOYU
2012-05-11 17:54 ` [PATCH 1/3] ARM: tegra20: Make MC optional in Kconfig Stephen Warren
2012-05-11 17:54 ` Stephen Warren
[not found] ` <4FAD5255.1020908-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-05-11 22:25 ` Greg KH
2012-05-11 22:25 ` Greg KH
2012-05-11 22:25 ` Greg KH
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=20120510214604.GA3525@kroah.com \
--to=gregkh-hqyy1w1ycw8ekmwlsbkhg0b+6bgklq7r@public.gmane.org \
--cc=aneesh-l0cyMroinI0@public.gmane.org \
--cc=b-cousson-l0cyMroinI0@public.gmane.org \
--cc=ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
--cc=hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org \
--cc=rob-VoJi6FS/r0vR7s880joybQ@public.gmane.org \
--cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org \
--cc=santosh.shilimkar-l0cyMroinI0@public.gmane.org \
--cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
/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: link
Be 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.