From: Borislav Petkov <bp@alien8.de>
To: Rob Herring <robh@kernel.org>
Cc: Tony Luck <tony.luck@intel.com>,
James Morse <james.morse@arm.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Robert Richter <rric@kernel.org>,
linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] edac: cpc925: Use of_get_cpu_hwid() to read CPU node 'reg'
Date: Tue, 18 Apr 2023 19:50:00 +0200 [thread overview]
Message-ID: <20230418175000.GLZD7YSNkIKk8ltGIw@fat_crate.local> (raw)
In-Reply-To: <20230319150141.67824-2-robh@kernel.org>
On Sun, Mar 19, 2023 at 10:01:41AM -0500, Rob Herring wrote:
> Replace open coded reading of CPU nodes' "reg" properties with
> of_get_cpu_hwid() dedicated for this purpose.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> drivers/edac/cpc925_edac.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/edac/cpc925_edac.c b/drivers/edac/cpc925_edac.c
> index ee193aae8e14..0182436c1b5a 100644
> --- a/drivers/edac/cpc925_edac.c
> +++ b/drivers/edac/cpc925_edac.c
> @@ -557,13 +557,13 @@ static u32 cpc925_cpu_mask_disabled(void)
> mask = APIMASK_ADI0 | APIMASK_ADI1;
>
> for_each_of_cpu_node(cpunode) {
> - const u32 *reg = of_get_property(cpunode, "reg", NULL);
> - if (reg == NULL || *reg > 2) {
> + int hwid = of_get_cpu_hwid(cpunode, 0);
> + if ((hwid < 0) || (hwid > 2)) {
> cpc925_printk(KERN_ERR, "Bad reg value at %pOF\n", cpunode);
> continue;
> }
>
> - mask &= ~APIMASK_ADI(*reg);
> + mask &= ~APIMASK_ADI(hwid);
> }
>
> if (mask != (APIMASK_ADI0 | APIMASK_ADI1)) {
> --
$ grep CPC925 .config
CONFIG_EDAC_CPC925=m
$ make ARCH=powerpc CROSS_COMPILE=/home/boris/src/crosstool/gcc-11.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux-
...
ERROR: modpost: ".of_get_cpu_hwid" [drivers/edac/cpc925_edac.ko] undefined!
make[1]: *** [scripts/Makefile.modpost:136: Module.symvers] Error 1
make: *** [Makefile:1980: modpost] Error 2
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
next prev parent reply other threads:[~2023-04-18 17:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-19 15:01 [PATCH 1/2] edac: cpc925: Drop unused memory size DT parsing Rob Herring
2023-03-19 15:01 ` [PATCH 2/2] edac: cpc925: Use of_get_cpu_hwid() to read CPU node 'reg' Rob Herring
2023-04-18 17:50 ` Borislav Petkov [this message]
2023-04-19 18:45 ` Rob Herring
2023-04-19 18:55 ` Borislav Petkov
2023-04-20 13:56 ` Rob Herring
2023-04-18 16:05 ` [PATCH 1/2] edac: cpc925: Drop unused memory size DT parsing Rob Herring
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=20230418175000.GLZD7YSNkIKk8ltGIw@fat_crate.local \
--to=bp@alien8.de \
--cc=james.morse@arm.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=robh@kernel.org \
--cc=rric@kernel.org \
--cc=tony.luck@intel.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;
as well as URLs for NNTP newsgroup(s).