linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/1] PCI/EDR: Change ACPI event message log level
@ 2020-04-16  0:38 sathyanarayanan.kuppuswamy
  2020-04-24 23:10 ` Bjorn Helgaas
  2020-04-24 23:36 ` Bjorn Helgaas
  0 siblings, 2 replies; 4+ messages in thread
From: sathyanarayanan.kuppuswamy @ 2020-04-16  0:38 UTC (permalink / raw)
  To: bhelgaas; +Cc: linux-pci, linux-kernel, ashok.raj, sathyanarayanan.kuppuswamy

From: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>

Currently we have pci_info() message in the beginning of
edr_handle_event() function, which will be printing
notification details every-time firmware sends ACPI SYSTEM
level events. This will pollute the dmesg logs for systems
that has lot for ACPI system level notifications. So change
the log-level to pci_dbg, and add a new info log for EDR
events.

Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
---
 drivers/pci/pcie/edr.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/pcie/edr.c b/drivers/pci/pcie/edr.c
index 594622a6cb16..e346c82559fa 100644
--- a/drivers/pci/pcie/edr.c
+++ b/drivers/pci/pcie/edr.c
@@ -148,11 +148,13 @@ static void edr_handle_event(acpi_handle handle, u32 event, void *data)
 	pci_ers_result_t estate = PCI_ERS_RESULT_DISCONNECT;
 	u16 status;
 
-	pci_info(pdev, "ACPI event %#x received\n", event);
+	pci_dbg(pdev, "ACPI event %#x received\n", event);
 
 	if (event != ACPI_NOTIFY_DISCONNECT_RECOVER)
 		return;
 
+	pci_info(pdev, "EDR event received\n");
+
 	/* Locate the port which issued EDR event */
 	edev = acpi_dpc_port_get(pdev);
 	if (!edev) {
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v1 1/1] PCI/EDR: Change ACPI event message log level
  2020-04-16  0:38 [PATCH v1 1/1] PCI/EDR: Change ACPI event message log level sathyanarayanan.kuppuswamy
@ 2020-04-24 23:10 ` Bjorn Helgaas
  2020-04-24 23:15   ` Kuppuswamy, Sathyanarayanan
  2020-04-24 23:36 ` Bjorn Helgaas
  1 sibling, 1 reply; 4+ messages in thread
From: Bjorn Helgaas @ 2020-04-24 23:10 UTC (permalink / raw)
  To: sathyanarayanan.kuppuswamy; +Cc: linux-pci, linux-kernel, ashok.raj

On Wed, Apr 15, 2020 at 05:38:32PM -0700, sathyanarayanan.kuppuswamy@linux.intel.com wrote:
> From: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
> 
> Currently we have pci_info() message in the beginning of
> edr_handle_event() function, which will be printing
> notification details every-time firmware sends ACPI SYSTEM
> level events. This will pollute the dmesg logs for systems
> that has lot for ACPI system level notifications. So change
> the log-level to pci_dbg, and add a new info log for EDR
> events.
> 
> Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
> ---
>  drivers/pci/pcie/edr.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/pcie/edr.c b/drivers/pci/pcie/edr.c
> index 594622a6cb16..e346c82559fa 100644
> --- a/drivers/pci/pcie/edr.c
> +++ b/drivers/pci/pcie/edr.c
> @@ -148,11 +148,13 @@ static void edr_handle_event(acpi_handle handle, u32 event, void *data)
>  	pci_ers_result_t estate = PCI_ERS_RESULT_DISCONNECT;
>  	u16 status;
>  
> -	pci_info(pdev, "ACPI event %#x received\n", event);
> +	pci_dbg(pdev, "ACPI event %#x received\n", event);

I agree this looks excessively verbose.  Do we even need a pci_dbg()
message here?  Maybe a message like that would belong in ACPI?
There is already an ACPI_DEBUG_PRINT() in
acpi_ev_queue_notify_request() that would serve a similar purpose.

>  	if (event != ACPI_NOTIFY_DISCONNECT_RECOVER)
>  		return;
>  
> +	pci_info(pdev, "EDR event received\n");
> +
>  	/* Locate the port which issued EDR event */
>  	edev = acpi_dpc_port_get(pdev);
>  	if (!edev) {
> -- 
> 2.17.1
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1 1/1] PCI/EDR: Change ACPI event message log level
  2020-04-24 23:10 ` Bjorn Helgaas
@ 2020-04-24 23:15   ` Kuppuswamy, Sathyanarayanan
  0 siblings, 0 replies; 4+ messages in thread
From: Kuppuswamy, Sathyanarayanan @ 2020-04-24 23:15 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-pci, linux-kernel, ashok.raj

Hi Bjorn,

On 4/24/20 4:10 PM, Bjorn Helgaas wrote:
> On Wed, Apr 15, 2020 at 05:38:32PM -0700, sathyanarayanan.kuppuswamy@linux.intel.com wrote:
>> From: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
>>
>> Currently we have pci_info() message in the beginning of
>> edr_handle_event() function, which will be printing
>> notification details every-time firmware sends ACPI SYSTEM
>> level events. This will pollute the dmesg logs for systems
>> that has lot for ACPI system level notifications. So change
>> the log-level to pci_dbg, and add a new info log for EDR
>> events.
>>
>> Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
>> ---
>>   drivers/pci/pcie/edr.c | 4 +++-
>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/pci/pcie/edr.c b/drivers/pci/pcie/edr.c
>> index 594622a6cb16..e346c82559fa 100644
>> --- a/drivers/pci/pcie/edr.c
>> +++ b/drivers/pci/pcie/edr.c
>> @@ -148,11 +148,13 @@ static void edr_handle_event(acpi_handle handle, u32 event, void *data)
>>   	pci_ers_result_t estate = PCI_ERS_RESULT_DISCONNECT;
>>   	u16 status;
>>   
>> -	pci_info(pdev, "ACPI event %#x received\n", event);
>> +	pci_dbg(pdev, "ACPI event %#x received\n", event);
> 
> I agree this looks excessively verbose.  Do we even need a pci_dbg()
> message here?  Maybe a message like that would belong in ACPI?
> There is already an ACPI_DEBUG_PRINT() in
> acpi_ev_queue_notify_request() that would serve a similar purpose.
I tried to keep it here to simplify enabling debug logs  related to
EDR. But as you have mentioned we could get similar message from
ACPI. If you think its excessive we can remove it. You want me to
send next version with this change ?
> 
>>   	if (event != ACPI_NOTIFY_DISCONNECT_RECOVER)
>>   		return;
>>   
>> +	pci_info(pdev, "EDR event received\n");
>> +
>>   	/* Locate the port which issued EDR event */
>>   	edev = acpi_dpc_port_get(pdev);
>>   	if (!edev) {
>> -- 
>> 2.17.1
>>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1 1/1] PCI/EDR: Change ACPI event message log level
  2020-04-16  0:38 [PATCH v1 1/1] PCI/EDR: Change ACPI event message log level sathyanarayanan.kuppuswamy
  2020-04-24 23:10 ` Bjorn Helgaas
@ 2020-04-24 23:36 ` Bjorn Helgaas
  1 sibling, 0 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2020-04-24 23:36 UTC (permalink / raw)
  To: sathyanarayanan.kuppuswamy; +Cc: linux-pci, linux-kernel, ashok.raj

On Wed, Apr 15, 2020 at 05:38:32PM -0700, sathyanarayanan.kuppuswamy@linux.intel.com wrote:
> From: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
> 
> Currently we have pci_info() message in the beginning of
> edr_handle_event() function, which will be printing
> notification details every-time firmware sends ACPI SYSTEM
> level events. This will pollute the dmesg logs for systems
> that has lot for ACPI system level notifications. So change
> the log-level to pci_dbg, and add a new info log for EDR
> events.
> 
> Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>

I dropped the pci_dbg() of all events, since there's a way to get
those logs from ACPI already (see acpi_ev_queue_notify_request(); I
didn't say it was *easy* :)) and applied this to pci/error for v5.8,
thanks!

> ---
>  drivers/pci/pcie/edr.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/pcie/edr.c b/drivers/pci/pcie/edr.c
> index 594622a6cb16..e346c82559fa 100644
> --- a/drivers/pci/pcie/edr.c
> +++ b/drivers/pci/pcie/edr.c
> @@ -148,11 +148,13 @@ static void edr_handle_event(acpi_handle handle, u32 event, void *data)
>  	pci_ers_result_t estate = PCI_ERS_RESULT_DISCONNECT;
>  	u16 status;
>  
> -	pci_info(pdev, "ACPI event %#x received\n", event);
> +	pci_dbg(pdev, "ACPI event %#x received\n", event);
>  
>  	if (event != ACPI_NOTIFY_DISCONNECT_RECOVER)
>  		return;
>  
> +	pci_info(pdev, "EDR event received\n");
> +
>  	/* Locate the port which issued EDR event */
>  	edev = acpi_dpc_port_get(pdev);
>  	if (!edev) {
> -- 
> 2.17.1
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-04-24 23:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-16  0:38 [PATCH v1 1/1] PCI/EDR: Change ACPI event message log level sathyanarayanan.kuppuswamy
2020-04-24 23:10 ` Bjorn Helgaas
2020-04-24 23:15   ` Kuppuswamy, Sathyanarayanan
2020-04-24 23:36 ` Bjorn Helgaas

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).