All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: "Zhu, Yi" <yi.zhu@intel.com>
Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>,
	Herbert Poetzl <herbert@13thfloor.at>,
	Auzanneau Gregory <mls@reolight.net>,
	Jeff Garzik <jgarzik@pobox.com>,
	lkml - Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>
Subject: RE: idebus setup problem (2.6.7-rc1)
Date: Mon, 07 Jun 2004 10:07:10 +1000	[thread overview]
Message-ID: <1086566829.18637.44.camel@bach> (raw)
In-Reply-To: <3ACA40606221794F80A5670F0AF15F8403BD550B@PDSMSX403.ccr.corp.intel.com>

On Sun, 2004-06-06 at 23:11, Zhu, Yi wrote:
> Bartlomiej Zolnierkiewicz wrote:
> > 
> > Why can't we apply this minimal fix from Yi for now?
> 
> Thanks, this is in 2.6.7-rc2-mm2.

OK, I've revisited this problem, with my thinking cap ON this time. 
Sorry for the delay.

Andrew, please revert kernel-parameter-parsing-fix.patch and 
kernel-parameter-parsing-fix-fix.patch in favor of this one-liner.

Yi, does this fix your ACPI problem?

Rusty.

Name: Handle __early_param and __setup Collision
Status: Trivial
Depends: EarlyParam/early_param.patch.gz
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

Yi Zhu (yi.zhu@intel.com) points out the following problem:

In arch/i386/kernel/setup.c:
	__early_param("acpi", early_acpi);

In drivers/acpi/osl.c:
	__setup("acpi_os_name=", acpi_os_name_setup);

The problem command line looks like:

	"acpi=force acpi_os_name=my_override_name"

For simplicity, we overload the __setup section to contain both
__early_param and __setup, so we can check that all options on the
command line are taken by at least one of them.  However,
__early_param have different semantics the __setup: in particular,
__early_param("acpi"), must not match anything but "acpi" and "acpi=",
which mirrors module_param(), whereas __setup("acpi") would match
anything which starts with "acpi".

Fix the obsolete_checksetup code to take this difference into account
correctly.
 
diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .22424-linux-2.6.7-rc2-bk7/init/main.c .22424-linux-2.6.7-rc2-bk7.updated/init/main.c
--- .22424-linux-2.6.7-rc2-bk7/init/main.c	2004-06-07 09:51:11.000000000 +1000
+++ .22424-linux-2.6.7-rc2-bk7.updated/init/main.c	2004-06-07 09:53:06.000000000 +1000
@@ -159,8 +159,9 @@ static int __init obsolete_checksetup(ch
 	do {
 		int n = strlen(p->str);
 		if (!strncmp(line, p->str, n)) {
-			/* Already done in parse_early_param? */
-			if (p->early)
+			/* Already done in parse_early_param?  (Needs
+			 * exact match on param part) */
+			if (p->early && (line[n] == '\0' || line[n] == '='))
 				return 1;
 			if (!p->setup_func) {
 				printk(KERN_WARNING "Parameter %s is obsolete, ignored\n", p->str);

-- 
Anyone who quotes me in their signature is an idiot -- Rusty Russell


  reply	other threads:[~2004-06-07  0:08 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-06 13:11 idebus setup problem (2.6.7-rc1) Zhu, Yi
2004-06-07  0:07 ` Rusty Russell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-06-07 11:04 Zhu, Yi
2004-06-07 23:00 ` Rusty Russell
2004-06-03 14:05 Zhu, Yi
2004-06-03 21:31 ` Herbert Poetzl
2004-06-03 21:44   ` Bartlomiej Zolnierkiewicz
2004-06-04  4:32     ` Rusty Russell
2004-06-04 22:58       ` Bartlomiej Zolnierkiewicz
     [not found] <3ACA40606221794F80A5670F0AF15F84047998B0@PDSMSX403.ccr.corp.intel.com>
2004-05-28  4:50 ` Zhu, Yi
2004-05-28  9:11   ` Auzanneau Gregory
2004-05-28 12:50     ` Bartlomiej Zolnierkiewicz
2004-05-28 12:52       ` Auzanneau Gregory
2004-05-28 13:10         ` Bartlomiej Zolnierkiewicz
2004-05-27 16:38 Zhu, Yi
2004-06-03  6:53 ` Rusty Russell
2004-05-27 16:16 Zhu, Yi
2004-05-27 15:21 Zhu, Yi
2004-05-27 15:51 ` Bartlomiej Zolnierkiewicz
2004-05-27 16:09 ` Jeff Garzik
2004-05-27 11:57 Auzanneau Gregory
2004-05-27 14:37 ` Bartlomiej Zolnierkiewicz

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=1086566829.18637.44.camel@bach \
    --to=rusty@rustcorp.com.au \
    --cc=B.Zolnierkiewicz@elka.pw.edu.pl \
    --cc=akpm@osdl.org \
    --cc=herbert@13thfloor.at \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mls@reolight.net \
    --cc=yi.zhu@intel.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.