From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Arnd Bergmann <arnd@kernel.org>
Cc: "Guenter Roeck" <linux@roeck-us.net>,
"Niklas Schnelle" <schnelle@linux.ibm.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Jiri Slaby" <jirislaby@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
linux-serial@vger.kernel.org,
"Heiko Carstens" <hca@linux.ibm.com>,
linux-kernel@vger.kernel.org,
"Yang Yingliang" <yangyingliang@huawei.com>
Subject: Re: [PATCH 1/1] tty: serial: handle HAS_IOPORT dependencies
Date: Thu, 16 Jan 2025 14:26:35 +0200 [thread overview]
Message-ID: <Z4j6-ysRfyThWq6R@smile.fi.intel.com> (raw)
In-Reply-To: <e855900a-28d2-424b-8b3e-63c3c10c2848@app.fastmail.com>
On Fri, Dec 06, 2024 at 05:02:04PM +0100, Arnd Bergmann wrote:
> On Fri, Dec 6, 2024, at 16:44, Andy Shevchenko wrote:
> > On Wed, Dec 04, 2024 at 11:17:56PM +0100, Arnd Bergmann wrote:
> >> On Wed, Dec 4, 2024, at 22:09, Guenter Roeck wrote:
> >
> >> I got stuck in this rabbit hole of running into more issues
> >> with the 8250 driver. Any time you touch something, it breaks
> >> elsewhere.
> >>
> >> I've uploaded what I have here now:
> >
> > FWIW, I have briefly looked at it, some patches I appreciate very much, some of
> > them I think need more testing and one thing I don't really like is putting
> > code back to 8250_core. Thinking about that, perhaps we need to restore 8250.c
> > (or alike) for collecting non-library / non-_particular_-driver-leaf?
>
> Thanks for taking a look!
>
> I thought you might have different ideas on where some of the
> code needs to go, as you were the one who moved it out
> previously.
>
> However, I think the two bits that I ended up moving back
> really belong in the core:
>
> - serial8250_setup_ports() is needed to get the
> serial8250_ports[] into a sane state. Ideally this
> array would just be statically initialized, but I don't
> think we can actually express that in C code.
>
> - serial8250_init()/serial8250_exit() are required for
> registering the driver itself (serial8250_reg) Having
> that part in the ISA driver made no sense to me.
>
> The bit that is definitely ugly is how serial8250_isa_init()
> gets called from serial8250_init() and univ8250_console_init(),
> and I would prefer to remove that, but any attempt to do
> that made it worse.
>
> The problem here is that we can't just rely on link order:
> For the console initcall and serial8250_isa_init_ports(),
> we have to call this before the core driver initialization,
> but the serial8250-isa platform device has to be registered
> after the core driver does. If we link both files into
> a loadable module, there is an additional problem of
> not being able to have more than one module_init() call.
So, that's what I meant under resurrecting 8250.c or so, we can leave platform
driver to be still platform driver and call the respective init and exit
routines from the (newly) created module that will have the main
module_init/module_exit calls along with non-library common code.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2025-01-16 12:26 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-05 15:29 [PATCH 0/1] tty: Handle HAS_IOPORT dependencies Niklas Schnelle
2024-04-05 15:29 ` [PATCH 1/1] tty: serial: handle " Niklas Schnelle
2024-04-08 9:54 ` Ilpo Järvinen
2024-04-08 10:17 ` Arnd Bergmann
2024-04-08 10:25 ` Ilpo Järvinen
2024-10-01 9:04 ` Niklas Schnelle
2024-04-08 15:35 ` Niklas Schnelle
2024-04-08 15:41 ` Ilpo Järvinen
2024-04-08 15:50 ` Arnd Bergmann
2024-05-23 2:11 ` Maciej W. Rozycki
2024-10-01 11:21 ` Niklas Schnelle
2024-10-01 15:31 ` Arnd Bergmann
2024-10-01 16:41 ` Maciej W. Rozycki
2024-10-02 12:44 ` Niklas Schnelle
2024-10-02 18:12 ` Maciej W. Rozycki
2024-10-02 22:00 ` Arnd Bergmann
2024-10-02 22:59 ` Maciej W. Rozycki
2024-10-04 6:53 ` Arnd Bergmann
2024-10-04 16:24 ` Maciej W. Rozycki
2024-10-04 16:57 ` Arnd Bergmann
2024-10-04 10:09 ` Niklas Schnelle
2024-10-04 12:48 ` Arnd Bergmann
2024-10-04 16:03 ` Niklas Schnelle
2024-10-04 14:44 ` Niklas Schnelle
2024-10-04 16:34 ` Maciej W. Rozycki
2024-11-22 15:18 ` Guenter Roeck
2024-11-22 15:35 ` Niklas Schnelle
2024-11-22 16:31 ` Arnd Bergmann
2024-11-22 17:22 ` Guenter Roeck
2024-11-22 19:24 ` Arnd Bergmann
2024-11-22 20:44 ` Guenter Roeck
2024-11-22 22:51 ` Arnd Bergmann
2024-11-23 2:14 ` Guenter Roeck
2024-11-25 7:55 ` Andy Shevchenko
2024-11-25 9:53 ` Arnd Bergmann
2024-11-25 10:33 ` Andy Shevchenko
2024-11-25 11:06 ` Arnd Bergmann
2024-11-25 11:26 ` Andy Shevchenko
2024-11-25 13:50 ` Arnd Bergmann
2024-11-25 15:42 ` Andy Shevchenko
2024-11-25 16:54 ` Maciej W. Rozycki
2024-11-25 17:54 ` Arnd Bergmann
2024-11-25 18:42 ` Maciej W. Rozycki
2024-12-04 18:51 ` Guenter Roeck
2024-11-25 15:59 ` Arnd Bergmann
2024-12-04 21:09 ` Guenter Roeck
2024-12-04 22:17 ` Arnd Bergmann
2024-12-04 22:44 ` Guenter Roeck
2024-12-05 7:08 ` Arnd Bergmann
2024-12-05 14:31 ` Guenter Roeck
2024-12-06 15:44 ` Andy Shevchenko
2024-12-06 16:02 ` Arnd Bergmann
2025-01-16 12:26 ` Andy Shevchenko [this message]
2024-11-22 17:07 ` Guenter Roeck
2024-11-22 23:27 ` Niklas Schnelle
2024-11-22 23:34 ` Niklas Schnelle
2024-11-23 9:21 ` Arnd Bergmann
2024-04-05 22:33 ` [PATCH 0/1] tty: Handle " Andy Shevchenko
2024-04-06 8:06 ` Arnd Bergmann
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=Z4j6-ysRfyThWq6R@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=arnd@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=hca@linux.ibm.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=schnelle@linux.ibm.com \
--cc=yangyingliang@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