From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Russell King <rmk+lkml@arm.linux.org.uk>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>,
linuxppc64-dev <linuxppc64-dev@ozlabs.org>
Subject: Re: [RFC][PATCH] Way for platforms to alter built-in serial ports
Date: Wed, 06 Oct 2004 18:15:11 +1000 [thread overview]
Message-ID: <1097050508.21132.15.camel@gaston> (raw)
In-Reply-To: <20041006082658.A18379@flint.arm.linux.org.uk>
On Wed, 2004-10-06 at 17:26, Russell King wrote:
> On Thu, Sep 30, 2004 at 06:50:48PM +1000, Benjamin Herrenschmidt wrote:
> > +#ifndef ARCH_HAS_GET_LEGACY_SERIAL_PORTS
> > static struct old_serial_port old_serial_port[] = {
> > SERIAL_PORT_DFNS /* defined in asm/serial.h */
> > };
> > -
> > +static inline struct old_serial_port *get_legacy_serial_ports(unsigned int *count)
> > +{
> > + *count = ARRAY_SIZE(old_serial_port);
> > + return old_serial_port;
> > +}
> > #define UART_NR (ARRAY_SIZE(old_serial_port) + CONFIG_SERIAL_8250_NR_UARTS)
> > +#endif /* ARCH_HAS_GET_LEGACY_SERIAL_PORTS */
> > +
>
> What happens if 8250.c is built as a module and
> ARCH_HAS_GET_LEGACY_SERIAL_PORTS is defined?
It well call get_legacy_serial_ports() which is hopefully exported by
the arch code.
> serial.h is used by userspace programs. We should not expose this
> structure to those programs. Instead, maybe creating an 8250.h
> header, or even moving the existing 8250.h header ?
Hrm... ok. Or adding a #ifdef __KERNEL__ (sic !) :)
I'll send you a new patch later today as I had to do another fix, we
tend to "force" register_console() apparently even when we have nothing
to register because we set the "ops" to all ports even those who were
never configured and we test "ops" to decide wether to succeed or fail
in the console setup() callback.
Ben.
next prev parent reply other threads:[~2004-10-06 8:21 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-30 8:50 [RFC][PATCH] Way for platforms to alter built-in serial ports Benjamin Herrenschmidt
2004-10-06 7:26 ` Russell King
2004-10-06 8:15 ` Benjamin Herrenschmidt [this message]
2004-10-06 9:07 ` Benjamin Herrenschmidt
-- strict thread matches above, loose matches on Subject: below --
2004-09-30 16:14 Bjorn Helgaas
2004-09-30 23:53 ` Benjamin Herrenschmidt
2004-10-01 14:58 ` Bjorn Helgaas
2004-10-02 6:45 ` Benjamin Herrenschmidt
2004-10-06 7:32 ` Russell King
2004-10-06 19:54 ` Bjorn Helgaas
2004-10-08 19:49 ` Bjorn Helgaas
2004-10-06 7:29 ` Russell King
2004-10-06 19:47 ` Bjorn Helgaas
2004-11-01 17:15 ` David Woodhouse
2004-11-02 16:39 ` Bjorn Helgaas
2004-11-03 7:43 ` Russell King
2004-11-03 12:07 ` David Woodhouse
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=1097050508.21132.15.camel@gaston \
--to=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc64-dev@ozlabs.org \
--cc=rmk+lkml@arm.linux.org.uk \
/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