* Re: [PATCH] PM / Runtime: make PCI traces quieter
[not found] ` <201109212029.38899.rjw@sisk.pl>
@ 2011-11-28 19:15 ` Vincent Palatin
2011-12-05 19:19 ` Jesse Barnes
0 siblings, 1 reply; 4+ messages in thread
From: Vincent Palatin @ 2011-11-28 19:15 UTC (permalink / raw)
To: Jesse Barnes
Cc: Alan Stern, Linux PCI, Olof Johansson, Sameer Nanda, Ming Lei,
linux-kernel, Rafael J. Wysocki
Hi Jesse,
Any comment on that patch ?
On Wed, Sep 21, 2011 at 11:29, Rafael J. Wysocki <rjw@sisk.pl> wrote:
>
> On Wednesday, September 21, 2011, Vincent Palatin wrote:
> > When the runtime PM is activated on PCI, if a device switches state frequently
> > (e.g. an EHCI controller with autosuspending USB devices connected)
> > the PCI configuration traces might be very verbose in the kernel log.
> > Let's guard those traces with DEBUG condition.
> >
> > Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
>
> Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
>
> > ---
> > arch/x86/pci/i386.c | 2 +-
> > drivers/acpi/pci_irq.c | 10 +++++-----
> > drivers/pci/pci.c | 5 ++---
> > drivers/pci/setup-res.c | 6 +++---
> > 4 files changed, 11 insertions(+), 12 deletions(-)
> >
> > diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c
> > index 494f2e7..eb5d20b 100644
> > --- a/arch/x86/pci/i386.c
> > +++ b/arch/x86/pci/i386.c
> > @@ -269,7 +269,7 @@ void pcibios_set_master(struct pci_dev *dev)
> > lat = pcibios_max_latency;
> > else
> > return;
> > - dev_printk(KERN_DEBUG, &dev->dev, "setting latency timer to %d\n", lat);
> > + dev_dbg(&dev->dev, "setting latency timer to %d\n", lat);
> > pci_write_config_byte(dev, PCI_LATENCY_TIMER, lat);
> > }
> >
> > diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c
> > index 7f9eba9..0eefa12 100644
> > --- a/drivers/acpi/pci_irq.c
> > +++ b/drivers/acpi/pci_irq.c
> > @@ -487,10 +487,10 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
> > else
> > link_desc[0] = '\0';
> >
> > - dev_info(&dev->dev, "PCI INT %c%s -> GSI %u (%s, %s) -> IRQ %d\n",
> > - pin_name(pin), link_desc, gsi,
> > - (triggering == ACPI_LEVEL_SENSITIVE) ? "level" : "edge",
> > - (polarity == ACPI_ACTIVE_LOW) ? "low" : "high", dev->irq);
> > + dev_dbg(&dev->dev, "PCI INT %c%s -> GSI %u (%s, %s) -> IRQ %d\n",
> > + pin_name(pin), link_desc, gsi,
> > + (triggering == ACPI_LEVEL_SENSITIVE) ? "level" : "edge",
> > + (polarity == ACPI_ACTIVE_LOW) ? "low" : "high", dev->irq);
> >
> > return 0;
> > }
> > @@ -524,6 +524,6 @@ void acpi_pci_irq_disable(struct pci_dev *dev)
> > * (e.g. PCI_UNDEFINED_IRQ).
> > */
> >
> > - dev_info(&dev->dev, "PCI INT %c disabled\n", pin_name(pin));
> > + dev_dbg(&dev->dev, "PCI INT %c disabled\n", pin_name(pin));
> > acpi_unregister_gsi(gsi);
> > }
> > diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> > index 0ce6742..d339c30 100644
> > --- a/drivers/pci/pci.c
> > +++ b/drivers/pci/pci.c
> > @@ -964,7 +964,7 @@ void pci_restore_state(struct pci_dev *dev)
> > for (i = 15; i >= 0; i--) {
> > pci_read_config_dword(dev, i * 4, &val);
> > if (val != dev->saved_config_space[i]) {
> > - dev_printk(KERN_DEBUG, &dev->dev, "restoring config "
> > + dev_dbg(&dev->dev, "restoring config "
> > "space at offset %#x (was %#x, writing %#x)\n",
> > i, val, (int)dev->saved_config_space[i]);
> > pci_write_config_dword(dev,i * 4,
> > @@ -1531,8 +1531,7 @@ void pci_pme_active(struct pci_dev *dev, bool enable)
> > }
> >
> > out:
> > - dev_printk(KERN_DEBUG, &dev->dev, "PME# %s\n",
> > - enable ? "enabled" : "disabled");
> > + dev_dbg(&dev->dev, "PME# %s\n", enable ? "enabled" : "disabled");
> > }
> >
> > /**
> > diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c
> > index 51a9095..3878fe9 100644
> > --- a/drivers/pci/setup-res.c
> > +++ b/drivers/pci/setup-res.c
> > @@ -84,9 +84,9 @@ void pci_update_resource(struct pci_dev *dev, int resno)
> > }
> > }
> > res->flags &= ~IORESOURCE_UNSET;
> > - dev_info(&dev->dev, "BAR %d: set to %pR (PCI address [%#llx-%#llx])\n",
> > - resno, res, (unsigned long long)region.start,
> > - (unsigned long long)region.end);
> > + dev_dbg(&dev->dev, "BAR %d: set to %pR (PCI address [%#llx-%#llx])\n",
> > + resno, res, (unsigned long long)region.start,
> > + (unsigned long long)region.end);
> > }
> >
> > int pci_claim_resource(struct pci_dev *dev, int resource)
> >
>
--
Vincent
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] PM / Runtime: make PCI traces quieter
2011-11-28 19:15 ` [PATCH] PM / Runtime: make PCI traces quieter Vincent Palatin
@ 2011-12-05 19:19 ` Jesse Barnes
2011-12-05 19:51 ` Vincent Palatin
0 siblings, 1 reply; 4+ messages in thread
From: Jesse Barnes @ 2011-12-05 19:19 UTC (permalink / raw)
To: Vincent Palatin
Cc: Alan Stern, Linux PCI, Olof Johansson, Sameer Nanda, Ming Lei,
linux-kernel, Rafael J. Wysocki
[-- Attachment #1: Type: text/plain, Size: 330 bytes --]
On Mon, 28 Nov 2011 11:15:43 -0800
Vincent Palatin <vpalatin@chromium.org> wrote:
> Hi Jesse,
> Any comment on that patch ?
Yeah making these into debug statements is ok with me, but I don't see
the original in my inbox. Bounce it over and I'll apply.
Thanks,
--
Jesse Barnes, Intel Open Source Technology Center
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] PM / Runtime: make PCI traces quieter
2011-12-05 19:19 ` Jesse Barnes
@ 2011-12-05 19:51 ` Vincent Palatin
2011-12-05 19:59 ` Jesse Barnes
0 siblings, 1 reply; 4+ messages in thread
From: Vincent Palatin @ 2011-12-05 19:51 UTC (permalink / raw)
To: Jesse Barnes
Cc: Alan Stern, Linux PCI, Olof Johansson, Sameer Nanda, Ming Lei,
linux-kernel, Rafael J. Wysocki, Vincent Palatin
When the runtime PM is activated on PCI, if a device switches state frequently
(e.g. an EHCI controller with autosuspending USB devices connected)
the PCI configuration traces might be very verbose in the kernel log.
Let's guard those traces with DEBUG condition.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
---
arch/x86/pci/i386.c | 2 +-
drivers/acpi/pci_irq.c | 10 +++++-----
drivers/pci/pci.c | 5 ++---
drivers/pci/setup-res.c | 6 +++---
4 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c
index 794b092..e215a9b 100644
--- a/arch/x86/pci/i386.c
+++ b/arch/x86/pci/i386.c
@@ -270,7 +270,7 @@ void pcibios_set_master(struct pci_dev *dev)
lat = pcibios_max_latency;
else
return;
- dev_printk(KERN_DEBUG, &dev->dev, "setting latency timer to %d\n", lat);
+ dev_dbg(&dev->dev, "setting latency timer to %d\n", lat);
pci_write_config_byte(dev, PCI_LATENCY_TIMER, lat);
}
diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c
index 7f9eba9..0eefa12 100644
--- a/drivers/acpi/pci_irq.c
+++ b/drivers/acpi/pci_irq.c
@@ -487,10 +487,10 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
else
link_desc[0] = '\0';
- dev_info(&dev->dev, "PCI INT %c%s -> GSI %u (%s, %s) -> IRQ %d\n",
- pin_name(pin), link_desc, gsi,
- (triggering == ACPI_LEVEL_SENSITIVE) ? "level" : "edge",
- (polarity == ACPI_ACTIVE_LOW) ? "low" : "high", dev->irq);
+ dev_dbg(&dev->dev, "PCI INT %c%s -> GSI %u (%s, %s) -> IRQ %d\n",
+ pin_name(pin), link_desc, gsi,
+ (triggering == ACPI_LEVEL_SENSITIVE) ? "level" : "edge",
+ (polarity == ACPI_ACTIVE_LOW) ? "low" : "high", dev->irq);
return 0;
}
@@ -524,6 +524,6 @@ void acpi_pci_irq_disable(struct pci_dev *dev)
* (e.g. PCI_UNDEFINED_IRQ).
*/
- dev_info(&dev->dev, "PCI INT %c disabled\n", pin_name(pin));
+ dev_dbg(&dev->dev, "PCI INT %c disabled\n", pin_name(pin));
acpi_unregister_gsi(gsi);
}
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 6f45a73..8119757 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -964,7 +964,7 @@ void pci_restore_state(struct pci_dev *dev)
for (i = 15; i >= 0; i--) {
pci_read_config_dword(dev, i * 4, &val);
if (val != dev->saved_config_space[i]) {
- dev_printk(KERN_DEBUG, &dev->dev, "restoring config "
+ dev_dbg(&dev->dev, "restoring config "
"space at offset %#x (was %#x, writing %#x)\n",
i, val, (int)dev->saved_config_space[i]);
pci_write_config_dword(dev,i * 4,
@@ -1529,8 +1529,7 @@ void pci_pme_active(struct pci_dev *dev, bool enable)
}
out:
- dev_printk(KERN_DEBUG, &dev->dev, "PME# %s\n",
- enable ? "enabled" : "disabled");
+ dev_dbg(&dev->dev, "PME# %s\n", enable ? "enabled" : "disabled");
}
/**
diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c
index 5717509b..b66bfdb 100644
--- a/drivers/pci/setup-res.c
+++ b/drivers/pci/setup-res.c
@@ -85,9 +85,9 @@ void pci_update_resource(struct pci_dev *dev, int resno)
}
}
res->flags &= ~IORESOURCE_UNSET;
- dev_info(&dev->dev, "BAR %d: set to %pR (PCI address [%#llx-%#llx])\n",
- resno, res, (unsigned long long)region.start,
- (unsigned long long)region.end);
+ dev_dbg(&dev->dev, "BAR %d: set to %pR (PCI address [%#llx-%#llx])\n",
+ resno, res, (unsigned long long)region.start,
+ (unsigned long long)region.end);
}
int pci_claim_resource(struct pci_dev *dev, int resource)
--
1.7.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] PM / Runtime: make PCI traces quieter
2011-12-05 19:51 ` Vincent Palatin
@ 2011-12-05 19:59 ` Jesse Barnes
0 siblings, 0 replies; 4+ messages in thread
From: Jesse Barnes @ 2011-12-05 19:59 UTC (permalink / raw)
To: Vincent Palatin
Cc: Alan Stern, Linux PCI, Olof Johansson, Sameer Nanda, Ming Lei,
linux-kernel, Rafael J. Wysocki
[-- Attachment #1: Type: text/plain, Size: 605 bytes --]
On Mon, 5 Dec 2011 11:51:18 -0800
Vincent Palatin <vpalatin@chromium.org> wrote:
> When the runtime PM is activated on PCI, if a device switches state frequently
> (e.g. an EHCI controller with autosuspending USB devices connected)
> the PCI configuration traces might be very verbose in the kernel log.
> Let's guard those traces with DEBUG condition.
>
> Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
> ---
Applied to linux-next, thanks. The latency timer message is gone now
though, so it didn't need to be fixed. :)
--
Jesse Barnes, Intel Open Source Technology Center
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-12-05 19:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CAP_ceTyXLO=mv1Ott=g3mG0y+Q+VUM3N8CA-Fqa-_=uj7LTbmw@mail.gmail.com>
[not found] ` <1316628308-32580-1-git-send-email-vpalatin@chromium.org>
[not found] ` <201109212029.38899.rjw@sisk.pl>
2011-11-28 19:15 ` [PATCH] PM / Runtime: make PCI traces quieter Vincent Palatin
2011-12-05 19:19 ` Jesse Barnes
2011-12-05 19:51 ` Vincent Palatin
2011-12-05 19:59 ` Jesse Barnes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).