From: Gary Thomas <gary@mlbassoc.com>
To: michael@ellerman.id.au
Cc: linuxppc-dev@ozlabs.org, Paul Mackerras <paulus@samba.org>,
LKML <linux-kernel@vger.kernel.org>,
Marcin Slusarz <marcin.slusarz@gmail.com>
Subject: Re: [PATCH 03/14] powerpc: use printk_once
Date: Mon, 10 Aug 2009 05:56:56 -0600 [thread overview]
Message-ID: <4A800B08.4020708@mlbassoc.com> (raw)
In-Reply-To: <1249904809.4958.4.camel@concordia>
Michael Ellerman wrote:
> On Mon, 2009-08-10 at 10:00 +0200, Wolfram Sang wrote:
>> On Sun, Aug 09, 2009 at 09:53:58PM +0200, Marcin Slusarz wrote:
>>> Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
>>> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>>> Cc: Paul Mackerras <paulus@samba.org>
>>> Cc: linuxppc-dev@ozlabs.org
>>> ---
>>> arch/powerpc/kernel/iommu.c | 6 +-----
>>> arch/powerpc/kernel/irq.c | 5 ++---
>>> arch/powerpc/sysdev/ppc4xx_pci.c | 9 ++-------
>>> 3 files changed, 5 insertions(+), 15 deletions(-)
>>>
>>> diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c
>>> index fd51578..c7fa258 100644
>>> --- a/arch/powerpc/kernel/iommu.c
>>> +++ b/arch/powerpc/kernel/iommu.c
>>> @@ -502,7 +502,6 @@ static void iommu_table_clear(struct iommu_table *tbl)
>>> struct iommu_table *iommu_init_table(struct iommu_table *tbl, int nid)
>>> {
>>> unsigned long sz;
>>> - static int welcomed = 0;
>>> struct page *page;
>>>
>>> /* Set aside 1/4 of the table for large allocations. */
>>> @@ -523,11 +522,8 @@ struct iommu_table *iommu_init_table(struct iommu_table *tbl, int nid)
>>>
>>> iommu_table_clear(tbl);
>>>
>>> - if (!welcomed) {
>>> - printk(KERN_INFO "IOMMU table initialized, virtual merging %s\n",
>>> + printk_once(KERN_INFO "IOMMU table initialized, virtual merging %s\n",
>>> novmerge ? "disabled" : "enabled");
>>> - welcomed = 1;
>>> - }
>>>
>>> return tbl;
>>> }
>>> diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
>>> index f7f376e..05ebd21 100644
>>> --- a/arch/powerpc/kernel/irq.c
>>> +++ b/arch/powerpc/kernel/irq.c
>>> @@ -231,7 +231,6 @@ skip:
>>> void fixup_irqs(cpumask_t map)
>>> {
>>> unsigned int irq;
>>> - static int warned;
>>>
>>> for_each_irq(irq) {
>>> cpumask_t mask;
>>> @@ -246,8 +245,8 @@ void fixup_irqs(cpumask_t map)
>>> }
>>> if (irq_desc[irq].chip->set_affinity)
>>> irq_desc[irq].chip->set_affinity(irq, &mask);
>>> - else if (irq_desc[irq].action && !(warned++))
>>> - printk("Cannot set affinity for irq %i\n", irq);
>>> + else if (irq_desc[irq].action)
>>> + printk_once("Cannot set affinity for irq %i\n", irq);
>> Maybe we should add a loglevel to this printk (and the other one in fix_irqs)
>> while we are here?
>
> I think you should drop it, it's stupid. If we actually care about irqs
> that don't have a set affinity we should keep a count and report that at
> the end of the loop.
In addition, this change would prevent reporting missing
affinity on more than one IRQ if there were such.
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
WARNING: multiple messages have this Message-ID (diff)
From: Gary Thomas <gary@mlbassoc.com>
To: michael@ellerman.id.au
Cc: Wolfram Sang <w.sang@pengutronix.de>,
linuxppc-dev@ozlabs.org, Paul Mackerras <paulus@samba.org>,
Marcin Slusarz <marcin.slusarz@gmail.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 03/14] powerpc: use printk_once
Date: Mon, 10 Aug 2009 05:56:56 -0600 [thread overview]
Message-ID: <4A800B08.4020708@mlbassoc.com> (raw)
In-Reply-To: <1249904809.4958.4.camel@concordia>
Michael Ellerman wrote:
> On Mon, 2009-08-10 at 10:00 +0200, Wolfram Sang wrote:
>> On Sun, Aug 09, 2009 at 09:53:58PM +0200, Marcin Slusarz wrote:
>>> Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
>>> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>>> Cc: Paul Mackerras <paulus@samba.org>
>>> Cc: linuxppc-dev@ozlabs.org
>>> ---
>>> arch/powerpc/kernel/iommu.c | 6 +-----
>>> arch/powerpc/kernel/irq.c | 5 ++---
>>> arch/powerpc/sysdev/ppc4xx_pci.c | 9 ++-------
>>> 3 files changed, 5 insertions(+), 15 deletions(-)
>>>
>>> diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c
>>> index fd51578..c7fa258 100644
>>> --- a/arch/powerpc/kernel/iommu.c
>>> +++ b/arch/powerpc/kernel/iommu.c
>>> @@ -502,7 +502,6 @@ static void iommu_table_clear(struct iommu_table *tbl)
>>> struct iommu_table *iommu_init_table(struct iommu_table *tbl, int nid)
>>> {
>>> unsigned long sz;
>>> - static int welcomed = 0;
>>> struct page *page;
>>>
>>> /* Set aside 1/4 of the table for large allocations. */
>>> @@ -523,11 +522,8 @@ struct iommu_table *iommu_init_table(struct iommu_table *tbl, int nid)
>>>
>>> iommu_table_clear(tbl);
>>>
>>> - if (!welcomed) {
>>> - printk(KERN_INFO "IOMMU table initialized, virtual merging %s\n",
>>> + printk_once(KERN_INFO "IOMMU table initialized, virtual merging %s\n",
>>> novmerge ? "disabled" : "enabled");
>>> - welcomed = 1;
>>> - }
>>>
>>> return tbl;
>>> }
>>> diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
>>> index f7f376e..05ebd21 100644
>>> --- a/arch/powerpc/kernel/irq.c
>>> +++ b/arch/powerpc/kernel/irq.c
>>> @@ -231,7 +231,6 @@ skip:
>>> void fixup_irqs(cpumask_t map)
>>> {
>>> unsigned int irq;
>>> - static int warned;
>>>
>>> for_each_irq(irq) {
>>> cpumask_t mask;
>>> @@ -246,8 +245,8 @@ void fixup_irqs(cpumask_t map)
>>> }
>>> if (irq_desc[irq].chip->set_affinity)
>>> irq_desc[irq].chip->set_affinity(irq, &mask);
>>> - else if (irq_desc[irq].action && !(warned++))
>>> - printk("Cannot set affinity for irq %i\n", irq);
>>> + else if (irq_desc[irq].action)
>>> + printk_once("Cannot set affinity for irq %i\n", irq);
>> Maybe we should add a loglevel to this printk (and the other one in fix_irqs)
>> while we are here?
>
> I think you should drop it, it's stupid. If we actually care about irqs
> that don't have a set affinity we should keep a count and report that at
> the end of the loop.
In addition, this change would prevent reporting missing
affinity on more than one IRQ if there were such.
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
next prev parent reply other threads:[~2009-08-10 12:07 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-09 19:53 [PATCH 00/14] use printk_once Marcin Slusarz
2009-08-09 19:53 ` [PATCH 01/14] alpha: " Marcin Slusarz
2009-08-09 19:53 ` [PATCH 02/14] ia64: " Marcin Slusarz
2009-08-09 19:53 ` Marcin Slusarz
2009-08-09 19:53 ` [PATCH 03/14] powerpc: " Marcin Slusarz
2009-08-09 19:53 ` Marcin Slusarz
2009-08-10 8:00 ` Wolfram Sang
2009-08-10 8:00 ` Wolfram Sang
2009-08-10 11:46 ` Michael Ellerman
2009-08-10 11:46 ` Michael Ellerman
2009-08-10 11:56 ` Gary Thomas [this message]
2009-08-10 11:56 ` Gary Thomas
2009-08-09 19:53 ` [PATCH 04/14] sh: " Marcin Slusarz
2009-08-09 19:53 ` Marcin Slusarz
2009-08-13 3:04 ` Paul Mundt
2009-08-13 3:04 ` Paul Mundt
2009-08-09 19:54 ` [PATCH 05/14] x86: " Marcin Slusarz
2009-08-09 20:30 ` [tip:x86/cleanups] x86: Use printk_once() tip-bot for Marcin Slusarz
2009-08-09 19:54 ` [PATCH 06/14] ata: use printk_once Marcin Slusarz
2009-08-09 19:54 ` [PATCH 07/14] block: " Marcin Slusarz
2009-08-09 19:54 ` [PATCH 08/14] tty/vt: " Marcin Slusarz
2009-08-09 19:54 ` [PATCH 09/14] ide: " Marcin Slusarz
2009-08-10 2:52 ` David Miller
2009-08-09 19:54 ` [PATCH 10/14] infiniband: " Marcin Slusarz
2009-08-10 5:00 ` Roland Dreier
2009-08-10 6:36 ` [ofa-general] " Jack Morgenstein
2009-08-10 7:36 ` Jiri Slaby
2009-08-10 17:42 ` Roland Dreier
2009-08-11 7:17 ` Jack Morgenstein
2009-08-10 16:07 ` Marcin Slusarz
2009-08-11 16:40 ` Roland Dreier
2009-08-09 19:54 ` [PATCH 11/14] drivers/net: " Marcin Slusarz
2009-08-10 2:52 ` David Miller
2009-08-09 19:54 ` [PATCH 12/14] scsi: " Marcin Slusarz
2009-08-11 16:40 ` James Bottomley
2009-08-11 16:46 ` Roland Dreier
2009-08-11 16:50 ` James Bottomley
2009-08-11 16:49 ` Joe Perches
2009-08-09 19:54 ` [PATCH 13/14] vsprintf: use WARN_ON_ONCE Marcin Slusarz
2009-08-09 19:54 ` [PATCH 14/14] net: use printk_once Marcin Slusarz
2009-08-10 2:52 ` David Miller
2009-08-09 20:36 ` [PATCH 00/14] " Joe Perches
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=4A800B08.4020708@mlbassoc.com \
--to=gary@mlbassoc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=marcin.slusarz@gmail.com \
--cc=michael@ellerman.id.au \
--cc=paulus@samba.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.