* [PATCH 2/3] mips:powertv: Make kernel command line size configurable (resend)
@ 2009-05-04 22:57 David VomLehn
2009-05-06 16:35 ` Ralf Baechle
2009-05-08 15:25 ` Paul Gortmaker
0 siblings, 2 replies; 16+ messages in thread
From: David VomLehn @ 2009-05-04 22:57 UTC (permalink / raw)
To: linux-mips; +Cc: ralf
Most platforms can get by perfectly well with the default command line size,
but some platforms need more. This patch allows the command line size to
be configured for those platforms that need it. The default remains 256
characters.
Signed-off-by: David VomLehn <dvomlehn@cisco.com>
---
arch/mips/Kconfig | 7 +++++++
arch/mips/include/asm/setup.h | 2 +-
2 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 998e5db..99f7b6d 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -780,6 +780,13 @@ config EARLY_PRINTK
config SYS_HAS_EARLY_PRINTK
bool
+config COMMAND_LINE_SIZE
+ int "Maximum size of command line passed to kernel from bootloader"
+ default 256
+ help
+ Most systems work well with the default value, but some bootloaders pass more
+ information on the command line than others. A smaller value is good here.
+
config HOTPLUG_CPU
bool
default n
diff --git a/arch/mips/include/asm/setup.h b/arch/mips/include/asm/setup.h
index e600ced..132e397 100644
--- a/arch/mips/include/asm/setup.h
+++ b/arch/mips/include/asm/setup.h
@@ -1,7 +1,7 @@
#ifndef _MIPS_SETUP_H
#define _MIPS_SETUP_H
-#define COMMAND_LINE_SIZE 256
+#define COMMAND_LINE_SIZE CONFIG_COMMAND_LINE_SIZE
#ifdef __KERNEL__
extern void setup_early_printk(void);
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 2/3] mips:powertv: Make kernel command line size configurable (resend)
2009-05-04 22:57 [PATCH 2/3] mips:powertv: Make kernel command line size configurable (resend) David VomLehn
@ 2009-05-06 16:35 ` Ralf Baechle
2009-05-06 16:44 ` Jon Fraser
` (2 more replies)
2009-05-08 15:25 ` Paul Gortmaker
1 sibling, 3 replies; 16+ messages in thread
From: Ralf Baechle @ 2009-05-06 16:35 UTC (permalink / raw)
To: David VomLehn; +Cc: linux-mips
On Mon, May 04, 2009 at 03:57:19PM -0700, David VomLehn wrote:
> Most platforms can get by perfectly well with the default command line size,
> but some platforms need more. This patch allows the command line size to
> be configured for those platforms that need it. The default remains 256
> characters.
>
> Signed-off-by: David VomLehn <dvomlehn@cisco.com>
How big of a command line do you need? For no scientific reason other
than there not being any obvious need for a larger size MIPS is using 256
and I think unless you're asking for a huge number it will be better to
just raise that constant.
Ralf
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH 2/3] mips:powertv: Make kernel command line size configurable (resend)
@ 2009-05-06 16:44 ` Jon Fraser
0 siblings, 0 replies; 16+ messages in thread
From: Jon Fraser @ 2009-05-06 16:44 UTC (permalink / raw)
Cc: jfraser, David VomLehn, linux-mips@linux-mips.org
David,
We found huge command lines to be awkward. In our platform support
code, we can pass environment variables from our bootstrap (CFE) to the
kernel. Would something like this work for you?
I have no objection to making the command line buffer size bigger.
Jon
On Wed, 2009-05-06 at 09:35 -0700, Ralf Baechle wrote:
> On Mon, May 04, 2009 at 03:57:19PM -0700, David VomLehn wrote:
>
> > Most platforms can get by perfectly well with the default command line size,
> > but some platforms need more. This patch allows the command line size to
> > be configured for those platforms that need it. The default remains 256
> > characters.
> >
> > Signed-off-by: David VomLehn <dvomlehn@cisco.com>
>
> How big of a command line do you need? For no scientific reason other
> than there not being any obvious need for a larger size MIPS is using 256
> and I think unless you're asking for a huge number it will be better to
> just raise that constant.
>
> Ralf
>
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/3] mips:powertv: Make kernel command line size configurable (resend)
@ 2009-05-06 16:44 ` Jon Fraser
0 siblings, 0 replies; 16+ messages in thread
From: Jon Fraser @ 2009-05-06 16:44 UTC (permalink / raw)
Cc: jfraser, David VomLehn, linux-mips@linux-mips.org
David,
We found huge command lines to be awkward. In our platform support
code, we can pass environment variables from our bootstrap (CFE) to the
kernel. Would something like this work for you?
I have no objection to making the command line buffer size bigger.
Jon
On Wed, 2009-05-06 at 09:35 -0700, Ralf Baechle wrote:
> On Mon, May 04, 2009 at 03:57:19PM -0700, David VomLehn wrote:
>
> > Most platforms can get by perfectly well with the default command line size,
> > but some platforms need more. This patch allows the command line size to
> > be configured for those platforms that need it. The default remains 256
> > characters.
> >
> > Signed-off-by: David VomLehn <dvomlehn@cisco.com>
>
> How big of a command line do you need? For no scientific reason other
> than there not being any obvious need for a larger size MIPS is using 256
> and I think unless you're asking for a huge number it will be better to
> just raise that constant.
>
> Ralf
>
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/3] mips:powertv: Make kernel command line size configurable (resend)
2009-05-06 16:44 ` Jon Fraser
(?)
@ 2009-05-06 18:28 ` David VomLehn
-1 siblings, 0 replies; 16+ messages in thread
From: David VomLehn @ 2009-05-06 18:28 UTC (permalink / raw)
To: Jon Fraser; +Cc: linux-mips@linux-mips.org
On Wed, May 06, 2009 at 12:44:00PM -0400, Jon Fraser wrote:
> David,
>
> We found huge command lines to be awkward. In our platform support
> code, we can pass environment variables from our bootstrap (CFE) to the
> kernel. Would something like this work for you?
I agree that large command lines are awkward. Environment variables are
the standard Linux way to pass the bulk of what we pass on the command line.
Unfortunately, the kernel team does not own the bootloader and consideration
for making the bootloader/kernel interface look like other platforms does
not appear to have a high priority. So, I'm stuck with using the command
line for everything.
> Jon
David
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/3] mips:powertv: Make kernel command line size configurable (resend)
2009-05-06 16:35 ` Ralf Baechle
2009-05-06 16:44 ` Jon Fraser
@ 2009-05-06 17:13 ` Manuel Lauss
2009-05-06 18:19 ` David VomLehn
2 siblings, 0 replies; 16+ messages in thread
From: Manuel Lauss @ 2009-05-06 17:13 UTC (permalink / raw)
To: Ralf Baechle; +Cc: David VomLehn, linux-mips
On Wed, May 06, 2009 at 05:35:18PM +0100, Ralf Baechle wrote:
> On Mon, May 04, 2009 at 03:57:19PM -0700, David VomLehn wrote:
>
> > Most platforms can get by perfectly well with the default command line size,
> > but some platforms need more. This patch allows the command line size to
> > be configured for those platforms that need it. The default remains 256
> > characters.
> >
> > Signed-off-by: David VomLehn <dvomlehn@cisco.com>
>
> How big of a command line do you need? For no scientific reason other
> than there not being any obvious need for a larger size MIPS is using 256
> and I think unless you're asking for a huge number it will be better to
> just raise that constant.
FWIW, I like this change. For my uses, 512 has been enough for >2 years
now.
Manuel Lauss
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/3] mips:powertv: Make kernel command line size configurable (resend)
2009-05-06 16:35 ` Ralf Baechle
2009-05-06 16:44 ` Jon Fraser
2009-05-06 17:13 ` Manuel Lauss
@ 2009-05-06 18:19 ` David VomLehn
2009-05-06 18:24 ` David Daney
2 siblings, 1 reply; 16+ messages in thread
From: David VomLehn @ 2009-05-06 18:19 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-mips
On Wed, May 06, 2009 at 05:35:18PM +0100, Ralf Baechle wrote:
> On Mon, May 04, 2009 at 03:57:19PM -0700, David VomLehn wrote:
>
> > Most platforms can get by perfectly well with the default command line size,
> > but some platforms need more. This patch allows the command line size to
> > be configured for those platforms that need it. The default remains 256
> > characters.
> >
> > Signed-off-by: David VomLehn <dvomlehn@cisco.com>
>
> How big of a command line do you need? For no scientific reason other
> than there not being any obvious need for a larger size MIPS is using 256
> and I think unless you're asking for a huge number it will be better to
> just raise that constant.
The answer depends on the platform, but it's at 438 characters on a typical
platform. If I *had* to pick a number, I'd probably go for 512 characters; I
just hate to force others to use memory they aren't going to use.
> Ralf
David
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/3] mips:powertv: Make kernel command line size configurable (resend)
2009-05-06 18:19 ` David VomLehn
@ 2009-05-06 18:24 ` David Daney
2009-05-06 18:27 ` Jon Fraser
0 siblings, 1 reply; 16+ messages in thread
From: David Daney @ 2009-05-06 18:24 UTC (permalink / raw)
To: David VomLehn; +Cc: Ralf Baechle, linux-mips
David VomLehn wrote:
> On Wed, May 06, 2009 at 05:35:18PM +0100, Ralf Baechle wrote:
>> On Mon, May 04, 2009 at 03:57:19PM -0700, David VomLehn wrote:
>>
>>> Most platforms can get by perfectly well with the default command line size,
>>> but some platforms need more. This patch allows the command line size to
>>> be configured for those platforms that need it. The default remains 256
>>> characters.
>>>
>>> Signed-off-by: David VomLehn <dvomlehn@cisco.com>
>> How big of a command line do you need? For no scientific reason other
>> than there not being any obvious need for a larger size MIPS is using 256
>> and I think unless you're asking for a huge number it will be better to
>> just raise that constant.
>
> The answer depends on the platform, but it's at 438 characters on a typical
> platform. If I *had* to pick a number, I'd probably go for 512 characters; I
> just hate to force others to use memory they aren't going to use.
>
I wonder if the memory could be dynamically allocated. It would of
course be a much larger patch.
David Daney
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/3] mips:powertv: Make kernel command line size configurable (resend)
2009-05-06 18:24 ` David Daney
@ 2009-05-06 18:27 ` Jon Fraser
2009-05-06 18:29 ` David Daney
2009-05-06 18:33 ` David VomLehn
0 siblings, 2 replies; 16+ messages in thread
From: Jon Fraser @ 2009-05-06 18:27 UTC (permalink / raw)
To: David Daney
Cc: jfraser, David VomLehn, Ralf Baechle, linux-mips@linux-mips.org
On Wed, 2009-05-06 at 11:24 -0700, David Daney wrote:
> David VomLehn wrote:
> > On Wed, May 06, 2009 at 05:35:18PM +0100, Ralf Baechle wrote:
> >> On Mon, May 04, 2009 at 03:57:19PM -0700, David VomLehn wrote:
> >>
> >>> Most platforms can get by perfectly well with the default command line size,
> >>> but some platforms need more. This patch allows the command line size to
> >>> be configured for those platforms that need it. The default remains 256
> >>> characters.
> >>>
> >>> Signed-off-by: David VomLehn <dvomlehn@cisco.com>
> >> How big of a command line do you need? For no scientific reason other
> >> than there not being any obvious need for a larger size MIPS is using 256
> >> and I think unless you're asking for a huge number it will be better to
> >> just raise that constant.
> >
> > The answer depends on the platform, but it's at 438 characters on a typical
> > platform. If I *had* to pick a number, I'd probably go for 512 characters; I
> > just hate to force others to use memory they aren't going to use.
> >
>
> I wonder if the memory could be dynamically allocated. It would of
> course be a much larger patch.
>
> David Daney
>
A bit of a chicken and egg problem if your command line arguments
set the memory configuration.
Jon Fraser
Broadcom
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/3] mips:powertv: Make kernel command line size configurable (resend)
2009-05-06 18:27 ` Jon Fraser
@ 2009-05-06 18:29 ` David Daney
2009-05-06 18:33 ` David VomLehn
1 sibling, 0 replies; 16+ messages in thread
From: David Daney @ 2009-05-06 18:29 UTC (permalink / raw)
To: jfraser; +Cc: David VomLehn, Ralf Baechle, linux-mips@linux-mips.org
Jon Fraser wrote:
>
> On Wed, 2009-05-06 at 11:24 -0700, David Daney wrote:
>> David VomLehn wrote:
>>> On Wed, May 06, 2009 at 05:35:18PM +0100, Ralf Baechle wrote:
>>>> On Mon, May 04, 2009 at 03:57:19PM -0700, David VomLehn wrote:
>>>>
>>>>> Most platforms can get by perfectly well with the default command line size,
>>>>> but some platforms need more. This patch allows the command line size to
>>>>> be configured for those platforms that need it. The default remains 256
>>>>> characters.
>>>>>
>>>>> Signed-off-by: David VomLehn <dvomlehn@cisco.com>
>>>> How big of a command line do you need? For no scientific reason other
>>>> than there not being any obvious need for a larger size MIPS is using 256
>>>> and I think unless you're asking for a huge number it will be better to
>>>> just raise that constant.
>>> The answer depends on the platform, but it's at 438 characters on a typical
>>> platform. If I *had* to pick a number, I'd probably go for 512 characters; I
>>> just hate to force others to use memory they aren't going to use.
>>>
>> I wonder if the memory could be dynamically allocated. It would of
>> course be a much larger patch.
>>
>> David Daney
>>
>
>
>
> A bit of a chicken and egg problem if your command line arguments
> set the memory configuration.
>
I was thinking of putting it in __initdata memory, and then copying it
to dynamically allocated memory before freeing the init memory.
David Daney
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/3] mips:powertv: Make kernel command line size configurable (resend)
2009-05-06 18:27 ` Jon Fraser
2009-05-06 18:29 ` David Daney
@ 2009-05-06 18:33 ` David VomLehn
1 sibling, 0 replies; 16+ messages in thread
From: David VomLehn @ 2009-05-06 18:33 UTC (permalink / raw)
To: Jon Fraser; +Cc: David Daney, Ralf Baechle, linux-mips@linux-mips.org
On Wed, May 06, 2009 at 02:27:36PM -0400, Jon Fraser wrote:
>
>
> On Wed, 2009-05-06 at 11:24 -0700, David Daney wrote:
> > David VomLehn wrote:
> > > On Wed, May 06, 2009 at 05:35:18PM +0100, Ralf Baechle wrote:
> > >> On Mon, May 04, 2009 at 03:57:19PM -0700, David VomLehn wrote:
> > >>
> > >>> Most platforms can get by perfectly well with the default command line size,
> > >>> but some platforms need more. This patch allows the command line size to
> > >>> be configured for those platforms that need it. The default remains 256
> > >>> characters.
> > >>>
> > >>> Signed-off-by: David VomLehn <dvomlehn@cisco.com>
> > >> How big of a command line do you need? For no scientific reason other
> > >> than there not being any obvious need for a larger size MIPS is using 256
> > >> and I think unless you're asking for a huge number it will be better to
> > >> just raise that constant.
> > >
> > > The answer depends on the platform, but it's at 438 characters on a typical
> > > platform. If I *had* to pick a number, I'd probably go for 512 characters; I
> > > just hate to force others to use memory they aren't going to use.
> > >
> >
> > I wonder if the memory could be dynamically allocated. It would of
> > course be a much larger patch.
> >
> > David Daney
>
> A bit of a chicken and egg problem if your command line arguments
> set the memory configuration.
>
> Jon Fraser
You could wait for a final copy of the command line until *after* you have at
least the boot memory allocator working. Then other buffers used to hold
the command line would be __initdata. Sounds like a bit of work, though, and
it might be kind of fragile for such a small gain in memory.
David VomLehn
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/3] mips:powertv: Make kernel command line size configurable (resend)
@ 2009-05-08 15:25 ` Paul Gortmaker
0 siblings, 0 replies; 16+ messages in thread
From: Paul Gortmaker @ 2009-05-08 15:25 UTC (permalink / raw)
To: David VomLehn; +Cc: linux-mips, ralf
On Mon, May 4, 2009 at 6:57 PM, David VomLehn <dvomlehn@cisco.com> wrote:
> Most platforms can get by perfectly well with the default command line size,
> but some platforms need more. This patch allows the command line size to
> be configured for those platforms that need it. The default remains 256
> characters.
The one thing I see when I look at this patch, is that it lands in the
arch/mips/Kconfig -- but is there really anything fundamentally
architecture specific about the allowed length of the kernel command
line?. It probably belongs somewhere alongside the setting for
LOG_BUF_LEN or similar (and then add the other respective changes
to make all arch actually respect the setting.)
Paul.
>
> Signed-off-by: David VomLehn <dvomlehn@cisco.com>
> ---
> arch/mips/Kconfig | 7 +++++++
> arch/mips/include/asm/setup.h | 2 +-
> 2 files changed, 8 insertions(+), 1 deletions(-)
>
> diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
> index 998e5db..99f7b6d 100644
> --- a/arch/mips/Kconfig
> +++ b/arch/mips/Kconfig
> @@ -780,6 +780,13 @@ config EARLY_PRINTK
> config SYS_HAS_EARLY_PRINTK
> bool
>
> +config COMMAND_LINE_SIZE
> + int "Maximum size of command line passed to kernel from bootloader"
> + default 256
> + help
> + Most systems work well with the default value, but some bootloaders pass more
> + information on the command line than others. A smaller value is good here.
> +
> config HOTPLUG_CPU
> bool
> default n
> diff --git a/arch/mips/include/asm/setup.h b/arch/mips/include/asm/setup.h
> index e600ced..132e397 100644
> --- a/arch/mips/include/asm/setup.h
> +++ b/arch/mips/include/asm/setup.h
> @@ -1,7 +1,7 @@
> #ifndef _MIPS_SETUP_H
> #define _MIPS_SETUP_H
>
> -#define COMMAND_LINE_SIZE 256
> +#define COMMAND_LINE_SIZE CONFIG_COMMAND_LINE_SIZE
>
> #ifdef __KERNEL__
> extern void setup_early_printk(void);
>
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/3] mips:powertv: Make kernel command line size configurable (resend)
@ 2009-05-08 15:25 ` Paul Gortmaker
0 siblings, 0 replies; 16+ messages in thread
From: Paul Gortmaker @ 2009-05-08 15:25 UTC (permalink / raw)
To: David VomLehn; +Cc: linux-mips, ralf
On Mon, May 4, 2009 at 6:57 PM, David VomLehn <dvomlehn@cisco.com> wrote:
> Most platforms can get by perfectly well with the default command line size,
> but some platforms need more. This patch allows the command line size to
> be configured for those platforms that need it. The default remains 256
> characters.
The one thing I see when I look at this patch, is that it lands in the
arch/mips/Kconfig -- but is there really anything fundamentally
architecture specific about the allowed length of the kernel command
line?. It probably belongs somewhere alongside the setting for
LOG_BUF_LEN or similar (and then add the other respective changes
to make all arch actually respect the setting.)
Paul.
>
> Signed-off-by: David VomLehn <dvomlehn@cisco.com>
> ---
> arch/mips/Kconfig | 7 +++++++
> arch/mips/include/asm/setup.h | 2 +-
> 2 files changed, 8 insertions(+), 1 deletions(-)
>
> diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
> index 998e5db..99f7b6d 100644
> --- a/arch/mips/Kconfig
> +++ b/arch/mips/Kconfig
> @@ -780,6 +780,13 @@ config EARLY_PRINTK
> config SYS_HAS_EARLY_PRINTK
> bool
>
> +config COMMAND_LINE_SIZE
> + int "Maximum size of command line passed to kernel from bootloader"
> + default 256
> + help
> + Most systems work well with the default value, but some bootloaders pass more
> + information on the command line than others. A smaller value is good here.
> +
> config HOTPLUG_CPU
> bool
> default n
> diff --git a/arch/mips/include/asm/setup.h b/arch/mips/include/asm/setup.h
> index e600ced..132e397 100644
> --- a/arch/mips/include/asm/setup.h
> +++ b/arch/mips/include/asm/setup.h
> @@ -1,7 +1,7 @@
> #ifndef _MIPS_SETUP_H
> #define _MIPS_SETUP_H
>
> -#define COMMAND_LINE_SIZE 256
> +#define COMMAND_LINE_SIZE CONFIG_COMMAND_LINE_SIZE
>
> #ifdef __KERNEL__
> extern void setup_early_printk(void);
>
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/3] mips:powertv: Make kernel command line size configurable (resend)
2009-05-08 15:25 ` Paul Gortmaker
(?)
@ 2009-05-08 16:34 ` David VomLehn
2009-05-11 21:29 ` Paul Gortmaker
-1 siblings, 1 reply; 16+ messages in thread
From: David VomLehn @ 2009-05-08 16:34 UTC (permalink / raw)
To: Paul Gortmaker; +Cc: linux-mips, ralf
On Fri, May 08, 2009 at 11:25:35AM -0400, Paul Gortmaker wrote:
> On Mon, May 4, 2009 at 6:57 PM, David VomLehn <dvomlehn@cisco.com> wrote:
> > Most platforms can get by perfectly well with the default command line size,
> > but some platforms need more. This patch allows the command line size to
> > be configured for those platforms that need it. The default remains 256
> > characters.
>
> The one thing I see when I look at this patch, is that it lands in the
> arch/mips/Kconfig -- but is there really anything fundamentally
> architecture specific about the allowed length of the kernel command
> line?. It probably belongs somewhere alongside the setting for
> LOG_BUF_LEN or similar (and then add the other respective changes
> to make all arch actually respect the setting.)
>
> Paul.
>
> >
> > Signed-off-by: David VomLehn <dvomlehn@cisco.com>
> > ---
> > arch/mips/Kconfig | 7 +++++++
> > arch/mips/include/asm/setup.h | 2 +-
The reason I put this configuration configuration in the architecture-
specific Kconfig is because COMMAND_LINE_SIZE is defined in the
architecture-specific file arch/mips/include/asm/setup.h. I strongly
agree that this really should not be an architecture-specific definition,
but it's much more complex to get a patch to change COMMAND_LINE_SIZE
in every architecture. Fixing in the MIPS tree seems like a good
start.
David VomLehn
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/3] mips:powertv: Make kernel command line size configurable (resend)
2009-05-08 16:34 ` David VomLehn
@ 2009-05-11 21:29 ` Paul Gortmaker
0 siblings, 0 replies; 16+ messages in thread
From: Paul Gortmaker @ 2009-05-11 21:29 UTC (permalink / raw)
To: David VomLehn; +Cc: linux-mips, ralf
[Re: [PATCH 2/3] mips:powertv: Make kernel command line size configurable (resend)] On 08/05/2009 (Fri 09:34) David VomLehn wrote:
> On Fri, May 08, 2009 at 11:25:35AM -0400, Paul Gortmaker wrote:
> > On Mon, May 4, 2009 at 6:57 PM, David VomLehn <dvomlehn@cisco.com> wrote:
> > > Most platforms can get by perfectly well with the default command line size,
> > > but some platforms need more. This patch allows the command line size to
> > > be configured for those platforms that need it. The default remains 256
> > > characters.
> >
> > The one thing I see when I look at this patch, is that it lands in the
> > arch/mips/Kconfig -- but is there really anything fundamentally
> > architecture specific about the allowed length of the kernel command
> > line?. It probably belongs somewhere alongside the setting for
> > LOG_BUF_LEN or similar (and then add the other respective changes
> > to make all arch actually respect the setting.)
> >
> > Paul.
> >
> > >
> > > Signed-off-by: David VomLehn <dvomlehn@cisco.com>
> > > ---
> > > arch/mips/Kconfig | 7 +++++++
> > > arch/mips/include/asm/setup.h | 2 +-
>
> The reason I put this configuration configuration in the architecture-
> specific Kconfig is because COMMAND_LINE_SIZE is defined in the
> architecture-specific file arch/mips/include/asm/setup.h. I strongly
> agree that this really should not be an architecture-specific definition,
> but it's much more complex to get a patch to change COMMAND_LINE_SIZE
> in every architecture. Fixing in the MIPS tree seems like a good
> start.
It shouldn't be much more complex, at least from a purely technical
point of view (i.e assuming no arch maintainers have a problem with it).
Now, if we tried to get all arch to agree on the same default value,
then I agree that might be more complex/interesting.
All the arch use pretty much the same boilerplate, so something like
this untested patch should work. I thought about hiding it behind
CONFIG_EMBEDDED, but in theory a person could have some big server
blade with a long command line argument too....
Paul.
---------
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 2/3] mips:powertv: Make kernel command line size configurable (resend)
@ 2009-05-29 18:30 David VomLehn
0 siblings, 0 replies; 16+ messages in thread
From: David VomLehn @ 2009-05-29 18:30 UTC (permalink / raw)
To: linux-mips; +Cc: ralf
Most platforms can get by perfectly well with the default command line size,
but some platforms need more. This patch allows the command line size to
be configured for those platforms that need it. The default remains 256
characters.
Signed-off-by: David VomLehn <dvomlehn@cisco.com>
---
arch/mips/Kconfig | 7 +++++++
arch/mips/include/asm/setup.h | 2 +-
2 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 998e5db..99f7b6d 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -780,6 +780,13 @@ config EARLY_PRINTK
config SYS_HAS_EARLY_PRINTK
bool
+config COMMAND_LINE_SIZE
+ int "Maximum size of command line passed to kernel from bootloader"
+ default 256
+ help
+ Most systems work well with the default value, but some bootloaders pass more
+ information on the command line than others. A smaller value is good here.
+
config HOTPLUG_CPU
bool
default n
diff --git a/arch/mips/include/asm/setup.h b/arch/mips/include/asm/setup.h
index e600ced..132e397 100644
--- a/arch/mips/include/asm/setup.h
+++ b/arch/mips/include/asm/setup.h
@@ -1,7 +1,7 @@
#ifndef _MIPS_SETUP_H
#define _MIPS_SETUP_H
-#define COMMAND_LINE_SIZE 256
+#define COMMAND_LINE_SIZE CONFIG_COMMAND_LINE_SIZE
#ifdef __KERNEL__
extern void setup_early_printk(void);
^ permalink raw reply related [flat|nested] 16+ messages in thread
end of thread, other threads:[~2009-05-29 18:31 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-04 22:57 [PATCH 2/3] mips:powertv: Make kernel command line size configurable (resend) David VomLehn
2009-05-06 16:35 ` Ralf Baechle
2009-05-06 16:44 ` Jon Fraser
2009-05-06 16:44 ` Jon Fraser
2009-05-06 18:28 ` David VomLehn
2009-05-06 17:13 ` Manuel Lauss
2009-05-06 18:19 ` David VomLehn
2009-05-06 18:24 ` David Daney
2009-05-06 18:27 ` Jon Fraser
2009-05-06 18:29 ` David Daney
2009-05-06 18:33 ` David VomLehn
2009-05-08 15:25 ` Paul Gortmaker
2009-05-08 15:25 ` Paul Gortmaker
2009-05-08 16:34 ` David VomLehn
2009-05-11 21:29 ` Paul Gortmaker
-- strict thread matches above, loose matches on Subject: below --
2009-05-29 18:30 David VomLehn
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.