All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 06/20] of: Change logic to overwrite cmd_line with CONFIG_CMDLINE
Date: Tue, 20 Sep 2011 14:37:28 +1000	[thread overview]
Message-ID: <1316493448.7975.26.camel@pasglop> (raw)
In-Reply-To: <CACxGe6vxC4xq8OOVWfs2cMKzDe_R2ELu4WvVR9wxfft1RovQTg@mail.gmail.com>

On Mon, 2011-09-19 at 22:30 -0600, Grant Likely wrote:
> On Mon, Sep 19, 2011 at 9:44 PM, Benjamin Herrenschmidt
> <benh@kernel.crashing.org> wrote:
> > We used to overwrite with CONFIG_CMDLINE if we found a chosen
> > node but failed to get bootargs out of it or they were empty,
> > unless CONFIG_CMDLINE_FORCE is set.
> >
> > Instead change that to overwrite if cmd_line is non empty after
> > the bootargs check. It allows arch code to have other mechanisms
> > to retrieve the command line prior to parsing the device-tree.
> >
> > Note: CONFIG_CMDLINE_FORCE case should ideally be handled elsewhere
> > as it won't work as it-is if the device-tree has no /chosen node
> >
> > Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> 
> Acked-by: Grant Likely <grant.likely@secretlab.ca>
> 
> But while you're in there, you should comment what you described in
> the commit text.  Namely that CONFIG_CMDLINE is a last resort if
> nothing else managed to set the command line.

In the code as a comment rather than in the commit log sounds better,
let me fix that up and re-send that specific one.

Cheers,
Ben.

> g.
> 
> > ---
> >  drivers/of/fdt.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
> > index 65200af..d382163 100644
> > --- a/drivers/of/fdt.c
> > +++ b/drivers/of/fdt.c
> > @@ -683,7 +683,7 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname,
> >
> >  #ifdef CONFIG_CMDLINE
> >  #ifndef CONFIG_CMDLINE_FORCE
> > -       if (p == NULL || l == 0 || (l == 1 && (*p) == 0))
> > +       if (!cmd_line[0])
> >  #endif
> >                strlcpy(data, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
> >  #endif /* CONFIG_CMDLINE */
> > --
> > 1.7.4.1
> >
> > _______________________________________________
> > Linuxppc-dev mailing list
> > Linuxppc-dev@lists.ozlabs.org
> > https://lists.ozlabs.org/listinfo/linuxppc-dev
> >
> 
> 
> 

  reply	other threads:[~2011-09-20  4:37 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-20  3:44 [PATCH 01/20] powerpc/udbg: Fix Kconfig entry for avoiding 44x early debug with KVM Benjamin Herrenschmidt
2011-09-20  3:44 ` [PATCH 02/20] powerpc/smp: More generic support for "soft hotplug" Benjamin Herrenschmidt
2011-09-20  3:44 ` [PATCH 03/20] powerpc/pci: Call pcie_bus_configure_settings() Benjamin Herrenschmidt
2011-09-20  3:44 ` [PATCH 04/20] powerpc/powernv: Don't clobber r9 in relative_toc() Benjamin Herrenschmidt
2011-09-20  3:44 ` [PATCH 05/20] powerpc: Add skeleton PowerNV platform Benjamin Herrenschmidt
2011-09-20  3:44 ` [PATCH 06/20] of: Change logic to overwrite cmd_line with CONFIG_CMDLINE Benjamin Herrenschmidt
2011-09-20  4:30   ` Grant Likely
2011-09-20  4:37     ` Benjamin Herrenschmidt [this message]
2011-09-20  4:45     ` Grant Likely
2011-09-20  3:44 ` [PATCH 07/20] powerpc/powernv: Add CPU hotplug support Benjamin Herrenschmidt
2011-09-20  3:44 ` [PATCH 08/20] powerpc/powernv: Add OPAL takeover from PowerVM Benjamin Herrenschmidt
2011-09-20  3:44 ` [PATCH 09/20] powerpc/powernv: Get kernel command line accross OPAL takeover Benjamin Herrenschmidt
2011-09-20  3:44 ` [PATCH 10/20] powerpc/powernv: Basic support for OPAL Benjamin Herrenschmidt
2011-09-20  3:44 ` [PATCH 11/20] powerpc/powernv: Add support for instanciating OPAL v2 from Open Firmware Benjamin Herrenschmidt
2011-09-20  3:44 ` [PATCH 12/20] powerpc/powernv: Support for OPAL console Benjamin Herrenschmidt
2011-09-20  3:45 ` [PATCH 13/20] powerpc/powernv: Hookup reboot and poweroff functions Benjamin Herrenschmidt
2011-09-20  3:45 ` [PATCH 14/20] powerpc/powernv: Add RTC and NVRAM support plus RTAS fallbacks Benjamin Herrenschmidt
2011-09-20  3:45 ` [PATCH 15/20] powerpc/powernv: Add OPAL ICS backend Benjamin Herrenschmidt
2011-09-20  3:45 ` [PATCH 16/20] powerpc/powernv: Register and handle OPAL interrupts Benjamin Herrenschmidt
2011-09-20  3:45 ` [PATCH 17/20] powerpc/powernv: Machine check and other system interrupts Benjamin Herrenschmidt
2011-09-20  3:45 ` [PATCH 18/20] powerpc/powernv: Add support for p5ioc2 PCI-X and PCIe Benjamin Herrenschmidt
2011-09-20  3:45 ` [PATCH 19/20] powerpc/powernv: Implement MSI support for p5ioc2 PCIe Benjamin Herrenschmidt
2011-09-20  3:45 ` [PATCH 20/20] powerpc/powernv: Handle PCI-X/PCIe reset delay Benjamin Herrenschmidt

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=1316493448.7975.26.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=grant.likely@secretlab.ca \
    --cc=linuxppc-dev@ozlabs.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 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.