From: Jesse Barnes <jbarnes@engr.sgi.com>
To: linux-ia64@vger.kernel.org
Subject: [PATCH] early console registration
Date: Thu, 03 Jun 2004 21:49:07 +0000 [thread overview]
Message-ID: <200406031449.07627.jbarnes@engr.sgi.com> (raw)
In-Reply-To: <200405141425.59867.jbarnes@engr.sgi.com>
[-- Attachment #1: Type: text/plain, Size: 482 bytes --]
Here's an updated early console registration patch, how does it look? There's
another piece to update the sn2 console driver with support for it, but I can
send that straight to Andrew. I think Bjorn has a similar patch for the zx1
console.
Allow consoles to be registered early if they support doing output very early
in the boot process. Consoles that allow this are subject to the limitations
outlined in the comments for the early_console_setup routine.
Thanks,
Jesse
[-- Attachment #2: early-printk-2.patch --]
[-- Type: text/plain, Size: 1479 bytes --]
===== arch/ia64/kernel/setup.c 1.71 vs edited =====
--- 1.71/arch/ia64/kernel/setup.c Fri May 14 19:00:11 2004
+++ edited/arch/ia64/kernel/setup.c Thu Jun 3 14:39:40 2004
@@ -280,6 +280,36 @@
}
#endif
+/**
+ * early_console_setup - setup debugging console
+ *
+ * Consoles started here require little enough setup that we can start using
+ * them very early in the boot process, either right after the machine
+ * vector initialization, or even before if the drivers can detect their hw.
+ *
+ * Since these drivers are initialized and called very early on in the boot
+ * process, some services are unavailable until the system is up:
+ * o memory allocation
+ * o per-cpu data
+ * o interrupts
+ * The driver is free to have an initcall that switches the console ops
+ * though, as is done in the sn2 console driver.
+ *
+ * Returns non-zero if a console couldn't be setup.
+ */
+static int __init early_console_setup(void)
+{
+#ifdef CONFIG_SGI_L1_SERIAL_CONSOLE
+ {
+ extern int sn_serial_console_early_setup(void);
+ if(!sn_serial_console_early_setup())
+ return 0;
+ }
+#endif
+
+ return -1;
+}
+
void __init
setup_arch (char **cmdline_p)
{
@@ -296,6 +326,10 @@
#ifdef CONFIG_IA64_GENERIC
machvec_init(acpi_get_sysname());
#endif
+
+ /* If we register an early console, allow CPU 0 to printk */
+ if (!early_console_setup())
+ cpu_set(smp_processor_id(), cpu_online_map);
#ifdef CONFIG_ACPI_BOOT
/* Initialize the ACPI boot-time table parser */
next prev parent reply other threads:[~2004-06-03 21:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-14 21:25 [PATCH] early console registration Jesse Barnes
2004-05-20 1:17 ` David Mosberger
2004-05-20 13:03 ` Jesse Barnes
2004-05-20 15:18 ` Bjorn Helgaas
2004-05-20 15:26 ` Jesse Barnes
2004-06-03 21:49 ` Jesse Barnes [this message]
2004-06-14 22:27 ` Bjorn Helgaas
2004-06-15 13:12 ` Jesse Barnes
2004-06-16 20:22 ` Bjorn Helgaas
2004-06-16 20:40 ` Jesse Barnes
2004-06-22 17:54 ` Jesse Barnes
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=200406031449.07627.jbarnes@engr.sgi.com \
--to=jbarnes@engr.sgi.com \
--cc=linux-ia64@vger.kernel.org \
/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