From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
Cc: Rosen Penev <rosenp@gmail.com>,
netdev@vger.kernel.org, Kurt Kanzenbach <kurt@linutronix.de>,
Andrew Lunn <andrew@lunn.ch>, Vladimir Oltean <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Chris Snook <chris.snook@gmail.com>,
Marcin Wojtas <marcin.s.wojtas@gmail.com>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
Richard Cochran <richardcochran@gmail.com>,
open list <linux-kernel@vger.kernel.org>,
"open list:RENESAS ETHERNET SWITCH DRIVER"
<linux-renesas-soc@vger.kernel.org>
Subject: Re: [PATCHv3 net-next] net: modernize ioremap in probe
Date: Tue, 19 Nov 2024 23:40:18 +0000 [thread overview]
Message-ID: <Zz0h4pMXn6KzRViL@shell.armlinux.org.uk> (raw)
In-Reply-To: <20241119203916.GP5315@ragnatech.se>
On Tue, Nov 19, 2024 at 09:39:16PM +0100, Niklas Söderlund wrote:
> On 2024-11-17 15:07:53 -0800, Rosen Penev wrote:
> > devm_platform_ioremap_resource_byname has no res parameter, which is a
> > problem as there's this lovely line below it.
> >
> > ndev->base_addr = res->start;
>
> I see, maybe we can refactor that too? I see not all drivers set
> base_addr, and some even set it to the remapped memory returned by
> devm_platform_ioremap_resource_byname() or such.
base_addr carries with it an issue that setting it on every driver is
likely not a good idea.
Namely, that it's "unsigned long", it's reported to userspace, and
on PAE systems, unsigned long is 32-bit but the device address may
be >32-bit.
I haven't checked the user APIs, whether that restricts it to 32-bit
on 32-bit systems.
In any case, whether base_addr is set or not is probably best left
as-is and not have some "we must always / never set base_addr" rule
applied to it.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2024-11-19 23:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-17 21:27 [PATCHv3 net-next] net: modernize ioremap in probe Rosen Penev
2024-11-17 22:38 ` Niklas Söderlund
2024-11-17 23:07 ` Rosen Penev
2024-11-19 20:39 ` Niklas Söderlund
2024-11-19 23:40 ` Russell King (Oracle) [this message]
2024-11-19 20:02 ` Sergey Shtylyov
2024-11-20 19:29 ` Rosen Penev
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=Zz0h4pMXn6KzRViL@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=andrew@lunn.ch \
--cc=chris.snook@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=kurt@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=marcin.s.wojtas@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=niklas.soderlund@ragnatech.se \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=rosenp@gmail.com \
--cc=yoshihiro.shimoda.uh@renesas.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.