mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Jeremy Linton <jeremy.linton@arm.com>,
	John Garry <john.garry@huawei.com>
Cc: lenb@kernel.org, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org, linuxarm@huawei.com
Subject: Re: [PATCH] ACPI/PPTT: Add acpi_pptt_warn_missing() to consolidate logs
Date: Fri, 08 Feb 2019 12:33:54 +0100	[thread overview]
Message-ID: <2085072.OaQc2ZMdL6@aspire.rjw.lan> (raw)
In-Reply-To: <05990286-4b66-2879-f066-b4ab558f7385@arm.com>

On Thursday, February 7, 2019 5:21:35 PM CET Jeremy Linton wrote:
> Hi,
> 
> On 2/7/19 10:14 AM, John Garry wrote:
> > For a system using ACPI-based FW without a PPTT, we may get many warnings
> > about the lack of a PPTT, as shown:
> > 
> > root@(none)$ dmesg | grep -i pptt
> > [    0.010125] ACPI PPTT: No PPTT table found, cpu topology may be inaccurate
> > [    7.138339] ACPI PPTT: No PPTT table found, cache topology may be inaccurate
> > [    7.145368] ACPI PPTT: No PPTT table found, cache topology may be inaccurate
> > 
> > These logs are generated with pr_warn_once(), so the intention was for a
> > single log, but the logs overlap, so consolidate them.
> > 
> > Signed-off-by: John Garry <john.garry@huawei.com>
> > 
> > diff --git a/drivers/acpi/pptt.c b/drivers/acpi/pptt.c
> > index da031b1df6f5..ad31c50de3be 100644
> > --- a/drivers/acpi/pptt.c
> > +++ b/drivers/acpi/pptt.c
> > @@ -451,6 +451,11 @@ static struct acpi_pptt_processor *acpi_find_processor_package_id(struct acpi_ta
> >   	return cpu;
> >   }
> >   
> > +static void acpi_pptt_warn_missing(void)
> > +{
> > +	pr_warn_once("No PPTT table found, cpu and cache topology may be inaccurate\n");
> > +}
> > +
> >   /**
> >    * topology_get_acpi_cpu_tag() - Find a unique topology value for a feature
> >    * @table: Pointer to the head of the PPTT table
> > @@ -498,7 +503,7 @@ static int find_acpi_cpu_topology_tag(unsigned int cpu, int level, int flag)
> >   
> >   	status = acpi_get_table(ACPI_SIG_PPTT, 0, &table);
> >   	if (ACPI_FAILURE(status)) {
> > -		pr_warn_once("No PPTT table found, cpu topology may be inaccurate\n");
> > +		acpi_pptt_warn_missing();
> >   		return -ENOENT;
> >   	}
> >   	retval = topology_get_acpi_cpu_tag(table, cpu, level, flag);
> > @@ -531,7 +536,7 @@ int acpi_find_last_cache_level(unsigned int cpu)
> >   	acpi_cpu_id = get_acpi_id_for_cpu(cpu);
> >   	status = acpi_get_table(ACPI_SIG_PPTT, 0, &table);
> >   	if (ACPI_FAILURE(status)) {
> > -		pr_warn_once("No PPTT table found, cache topology may be inaccurate\n");
> > +		acpi_pptt_warn_missing();
> >   	} else {
> >   		number_of_levels = acpi_find_cache_levels(table, acpi_cpu_id);
> >   		acpi_put_table(table);
> > @@ -563,7 +568,7 @@ int cache_setup_acpi(unsigned int cpu)
> >   
> >   	status = acpi_get_table(ACPI_SIG_PPTT, 0, &table);
> >   	if (ACPI_FAILURE(status)) {
> > -		pr_warn_once("No PPTT table found, cache topology may be inaccurate\n");
> > +		acpi_pptt_warn_missing();
> >   		return -ENOENT;
> >   	}
> >   
> > @@ -617,7 +622,7 @@ int find_acpi_cpu_cache_topology(unsigned int cpu, int level)
> >   
> >   	status = acpi_get_table(ACPI_SIG_PPTT, 0, &table);
> >   	if (ACPI_FAILURE(status)) {
> > -		pr_warn_once("No PPTT table found, topology may be inaccurate\n");
> > +		acpi_pptt_warn_missing();
> >   		return -ENOENT;
> >   	}
> >   
> > 
> 
> This all looks fine to me,
> 
> Reviewed-by: Jeremy Linton <jeremy.linton@arm.com>
> 
> Thanks!
> 

Patch applied, thanks!



      reply	other threads:[~2019-02-08 11:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-07 16:14 John Garry
2019-02-07 16:21 ` Jeremy Linton
2019-02-08 11:33   ` Rafael J. Wysocki [this message]

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=2085072.OaQc2ZMdL6@aspire.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=jeremy.linton@arm.com \
    --cc=john.garry@huawei.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®