mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@samba.org>
To: akpm@osdl.org, trini@kernel.crashing.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] further early_param fixes
Date: Sun, 28 Mar 2004 20:23:28 +1000	[thread overview]
Message-ID: <16486.42912.340325.522003@cargo.ozlabs.ibm.com> (raw)

Andrew & Tom,

Tom's patches to add early_param also added some code to read the
command line from nvram in setup_arch on PReP boxes.  This broke
powermacs, though, since init_prep_nvram() calls the
ppc_md.nvram_read_val pointer, which is initialized later on
powermac.  In any case we don't want to call the prep nvram code on
powermacs.  This patch fixes it, and also eliminates a compile warning
about early_adb_sync.

Paul.

diff -urN linux-2.6.5-rc2-mm4.orig/arch/ppc/kernel/setup.c linux-2.6.5-rc2-mm4/arch/ppc/kernel/setup.c
--- linux-2.6.5-rc2-mm4.orig/arch/ppc/kernel/setup.c	2004-03-28 15:46:22.621884568 +1000
+++ linux-2.6.5-rc2-mm4/arch/ppc/kernel/setup.c	2004-03-28 16:26:20.297905848 +1000
@@ -470,10 +470,11 @@
 
 #ifdef CONFIG_ADB
 /* Allow us to say that ADB probing will be done synchronously. */
-static void __init early_adb_sync(char **ign)
+static int __init early_adb_sync(char *ign)
 {
 	extern int __adb_probe_sync;
 	__adb_probe_sync = 1;
+	return 0;
 }
 __early_param("adb_sync", early_adb_sync);
 #endif /* CONFIG_ADB */
@@ -663,13 +664,15 @@
 
 	/* See if we need to grab the command line params from PPCBUG. */
 #ifdef CONFIG_PPCBUG_NVRAM
-	/* Read in NVRAM data */
-	init_prep_nvram();
-
-	if (cmd_line[0] == '\0') {
-		char *bootargs = prep_nvram_get_var("bootargs");
-		if (bootargs != NULL)
-			strlcpy(cmd_line, bootargs, sizeof(cmd_line));
+	if (_machine == _MACH_prep) {
+		/* Read in NVRAM data */
+		init_prep_nvram();
+
+		if (cmd_line[0] == '\0') {
+			char *bootargs = prep_nvram_get_var("bootargs");
+			if (bootargs != NULL)
+				strlcpy(cmd_line, bootargs, sizeof(cmd_line));
+		}
 	}
 #endif
 

             reply	other threads:[~2004-03-28 11:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-28 10:23 Paul Mackerras [this message]
2004-03-29 15:02 ` Tom Rini

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=16486.42912.340325.522003@cargo.ozlabs.ibm.com \
    --to=paulus@samba.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trini@kernel.crashing.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

all inboxes | Powered by JetHome®