From: Marc Zyngier <maz@kernel.org>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: "Álvaro Fernández Rojas" <noltari@gmail.com>,
jonas.gorski@gmail.com, bcm-kernel-feedback-list@broadcom.com,
tglx@linutronix.de, linux-mips@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] irqchip/bcm-6345-l1: show MMIO address
Date: Thu, 16 Mar 2023 18:25:30 +0000 [thread overview]
Message-ID: <3950053c3e55fe89f61332c1b24fa0ed@kernel.org> (raw)
In-Reply-To: <aa72bcfb-b366-f373-60c5-99404109c482@gmail.com>
On 2023-03-16 18:13, Florian Fainelli wrote:
> On 3/16/23 11:07, Álvaro Fernández Rojas wrote:
>> It's safe to show MMIO address.
>>
>> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
>
> This is going to be the kernel virtual address, and while on MIPS it
> is easy to resolve to the physical address because these platforms map
> registers through KSEG0/1, on other platforms like ARM/ARM64 the
> kernel virtual addresses are pretty meaningless unless what you want
> to debug is how ioremap() mapped the address.
>
> I would rather do the following change:
>
> diff --git a/drivers/irqchip/irq-bcm6345-l1.c
> b/drivers/irqchip/irq-bcm6345-l1.c
> index 1bd0621c4ce2..832957d363a4 100644
> --- a/drivers/irqchip/irq-bcm6345-l1.c
> +++ b/drivers/irqchip/irq-bcm6345-l1.c
> @@ -261,6 +261,8 @@ static int __init bcm6345_l1_init_one(struct
> device_node *dn,
> if (!cpu->map_base)
> return -ENOMEM;
>
> + request_mem_region(res.start, sz, res.name);
> +
> for (i = 0; i < n_words; i++) {
> cpu->enable_cache[i] = 0;
> __raw_writel(0, cpu->map_base + reg_enable(intc, i));
>
> such that this shows up in /proc/iomem. WDYT?
That's certainly much more useful in general.
Also, the current pr_info() is probably pretty useless, given
that the OP was trying to circumvent the obfuscation. Either
printing the PA or removing the message altogether would be
good.
Thanks,
M.
--
Jazz is not dead. It just smells funny...
next prev parent reply other threads:[~2023-03-16 18:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-16 18:07 [PATCH] irqchip/bcm-6345-l1: show MMIO address Álvaro Fernández Rojas
2023-03-16 18:13 ` Florian Fainelli
2023-03-16 18:25 ` Marc Zyngier [this message]
2023-03-16 19:04 ` Álvaro Fernández Rojas
2023-03-16 19:10 ` Florian Fainelli
2023-03-16 19:34 ` Álvaro Fernández Rojas
2023-03-16 19:28 ` [PATCH v2] irqchip/bcm-6345-l1: request memory region Álvaro Fernández Rojas
2023-03-16 19:39 ` Florian Fainelli
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=3950053c3e55fe89f61332c1b24fa0ed@kernel.org \
--to=maz@kernel.org \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=f.fainelli@gmail.com \
--cc=jonas.gorski@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=noltari@gmail.com \
--cc=tglx@linutronix.de \
/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).