* Re: [PATCH 14/15] misc: Configurable number of supported IDE interfaces
@ 2005-11-11 15:33 Nick Warne
2005-11-11 17:11 ` Matt Mackall
0 siblings, 1 reply; 9+ messages in thread
From: Nick Warne @ 2005-11-11 15:33 UTC (permalink / raw)
To: Matt Mackall; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel
Bartlomiej Zolnierkiewicz wrote:
> You are duplicating functionality of CONFIG_IDE_MAX_HWIFS,
> please find a way to use it for EMBEDDED.
>
> Also please cc: linux-ide on IDE related patches.
>
> On 11/11/05, Matt Mackall <mpm@selenic.com> wrote:
>> Configurable number of supported IDE interfaces
>>
>> This overrides the default limit (which may be set per arch with
>> CONFIG_IDE_MAX_HWIFS). This is the result of setting interfaces to 1:
This is very similar to my unaccepted patch a few months ago:
http://lkml.org/lkml/2005/6/25/69
Nick
--
http://sourceforge.net/projects/quake2plus
"Person who say it cannot be done should not interrupt person doing it."
-Chinese Proverb
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 14/15] misc: Configurable number of supported IDE interfaces
2005-11-11 15:33 [PATCH 14/15] misc: Configurable number of supported IDE interfaces Nick Warne
@ 2005-11-11 17:11 ` Matt Mackall
0 siblings, 0 replies; 9+ messages in thread
From: Matt Mackall @ 2005-11-11 17:11 UTC (permalink / raw)
To: Nick Warne; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel
On Fri, Nov 11, 2005 at 03:33:13PM +0000, Nick Warne wrote:
> Bartlomiej Zolnierkiewicz wrote:
>
> > You are duplicating functionality of CONFIG_IDE_MAX_HWIFS,
> > please find a way to use it for EMBEDDED.
> >
> > Also please cc: linux-ide on IDE related patches.
> >
> > On 11/11/05, Matt Mackall <mpm@selenic.com> wrote:
> >> Configurable number of supported IDE interfaces
> >>
> >> This overrides the default limit (which may be set per arch with
> >> CONFIG_IDE_MAX_HWIFS). This is the result of setting interfaces to 1:
>
> This is very similar to my unaccepted patch a few months ago:
>
> http://lkml.org/lkml/2005/6/25/69
And it's practically identical to the one that's been in my -tiny tree
for two years.
I agree with Alan's complaint that this should in fact be done with
dynamic allocation. However, when I last set out to do that, it
appeared to be an _extremely_ invasive change so I quickly abandoned
it.
Meanwhile, this is currently the largest static allocation in a
typical kernel. Something has to be done.
--
Mathematics is the supreme nostalgia of our time.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 13/15] misc: Configure ELF core dump support
@ 2005-11-11 8:35 Matt Mackall
2005-11-11 8:35 ` [PATCH 14/15] misc: Configurable number of supported IDE interfaces Matt Mackall
0 siblings, 1 reply; 9+ messages in thread
From: Matt Mackall @ 2005-11-11 8:35 UTC (permalink / raw)
To: Andrew Morton, linux-kernel
configurable support for ELF core dumps
text data bss dec hex filename
3330172 529036 190556 4049764 3dcb64 vmlinux-baseline
3325552 528912 190556 4045020 3db8dc vmlinux-no-elf
add/remove: 0/8 grow/shrink: 0/0 up/down: 0/-4424 (-4424)
function old new delta
fill_note 32 - -32
maydump 58 - -58
dump_seek 67 - -67
writenote 180 - -180
elf_dump_thread_status 274 - -274
fill_psinfo 308 - -308
fill_prstatus 466 - -466
elf_core_dump 3039 - -3039
Signed-off-by: Matt Mackall <mpm@selenic.com>
Index: 2.6.14-misc/fs/binfmt_elf.c
===================================================================
--- 2.6.14-misc.orig/fs/binfmt_elf.c 2005-11-09 11:27:14.000000000 -0800
+++ 2.6.14-misc/fs/binfmt_elf.c 2005-11-09 11:27:20.000000000 -0800
@@ -58,7 +58,7 @@ extern int dump_fpu (struct pt_regs *, e
* If we don't support core dumping, then supply a NULL so we
* don't even try.
*/
-#ifdef USE_ELF_CORE_DUMP
+#if defined(USE_ELF_CORE_DUMP) && defined(CONFIG_ELF_CORE)
static int elf_core_dump(long signr, struct pt_regs * regs, struct file * file);
#else
#define elf_core_dump NULL
@@ -1108,7 +1108,7 @@ out:
* Note that some platforms still use traditional core dumps and not
* the ELF core dump. Each platform can select it as appropriate.
*/
-#ifdef USE_ELF_CORE_DUMP
+#if defined(USE_ELF_CORE_DUMP) && defined(CONFIG_ELF_CORE)
/*
* ELF core dumper
Index: 2.6.14-misc/init/Kconfig
===================================================================
--- 2.6.14-misc.orig/init/Kconfig 2005-11-09 11:27:18.000000000 -0800
+++ 2.6.14-misc/init/Kconfig 2005-11-09 11:27:20.000000000 -0800
@@ -341,6 +341,12 @@ config FULL_PANIC
Disabling compiles out the explanations for panics, saving
string space. Use with caution.
+config ELF_CORE
+ default y
+ bool "Enable ELF core dumps" if EMBEDDED
+ help
+ Enable support for generating core dumps. Disabling saves about 4k.
+
config BASE_FULL
default y
bool "Enable full-sized data structures for core" if EMBEDDED
^ permalink raw reply [flat|nested] 9+ messages in thread* [PATCH 14/15] misc: Configurable number of supported IDE interfaces
2005-11-11 8:35 [PATCH 13/15] misc: Configure ELF core dump support Matt Mackall
@ 2005-11-11 8:35 ` Matt Mackall
2005-11-11 10:14 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 9+ messages in thread
From: Matt Mackall @ 2005-11-11 8:35 UTC (permalink / raw)
To: Andrew Morton, linux-kernel
Configurable number of supported IDE interfaces
This overrides the default limit (which may be set per arch with
CONFIG_IDE_MAX_HWIFS). This is the result of setting interfaces to 1:
text data bss dec hex filename
3330172 529036 190556 4049764 3dcb64 vmlinux-baseline
3329352 528928 172124 4030404 3d7fc4 vmlinux
Signed-off-by: Matt Mackall <mpm@selenic.com>
Index: 2.6.14-misc/drivers/ide/setup-pci.c
===================================================================
--- 2.6.14-misc.orig/drivers/ide/setup-pci.c 2005-10-27 17:02:08.000000000 -0700
+++ 2.6.14-misc/drivers/ide/setup-pci.c 2005-11-09 11:27:23.000000000 -0800
@@ -102,7 +102,7 @@ static ide_hwif_t *ide_match_hwif(unsign
return hwif; /* pick an unused entry */
}
}
- for (h = 0; h < 2; ++h) {
+ for (h = 0; h < 2 && h < MAX_HWIFS; ++h) {
hwif = ide_hwifs + h;
if (hwif->chipset == ide_unknown)
return hwif; /* pick an unused entry */
Index: 2.6.14-misc/include/linux/ide.h
===================================================================
--- 2.6.14-misc.orig/include/linux/ide.h 2005-11-01 10:54:33.000000000 -0800
+++ 2.6.14-misc/include/linux/ide.h 2005-11-09 11:27:23.000000000 -0800
@@ -309,6 +309,11 @@ static inline void ide_init_hwif_ports(h
}
#endif /* IDE_ARCH_OBSOLETE_INIT */
+#if defined(CONFIG_IDE_HWIFS) && CONFIG_IDE_HWIFS > 0
+#undef MAX_HWIFS
+#define MAX_HWIFS CONFIG_IDE_HWIFS
+#endif
+
/* Currently only m68k, apus and m8xx need it */
#ifndef IDE_ARCH_ACK_INTR
# define ide_ack_intr(hwif) (1)
Index: 2.6.14-misc/init/Kconfig
===================================================================
--- 2.6.14-misc.orig/init/Kconfig 2005-11-09 11:27:20.000000000 -0800
+++ 2.6.14-misc/init/Kconfig 2005-11-09 11:27:23.000000000 -0800
@@ -457,6 +457,15 @@ config CC_ALIGN_JUMPS
no dummy operations need be executed.
Zero means use compiler's default.
+config IDE_HWIFS
+ depends IDE
+ int "Number of IDE hardware interfaces (0 for default)" if EMBEDDED
+ range 0 20
+ default 0
+ help
+ Select the maximum number of IDE interfaces (0 for default).
+ Saves up to 14k.
+
endmenu # General setup
config TINY_SHMEM
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH 14/15] misc: Configurable number of supported IDE interfaces
2005-11-11 8:35 ` [PATCH 14/15] misc: Configurable number of supported IDE interfaces Matt Mackall
@ 2005-11-11 10:14 ` Bartlomiej Zolnierkiewicz
2005-11-11 17:18 ` Matt Mackall
0 siblings, 1 reply; 9+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2005-11-11 10:14 UTC (permalink / raw)
To: Matt Mackall; +Cc: Andrew Morton, linux-kernel
You are duplicating functionality of CONFIG_IDE_MAX_HWIFS,
please find a way to use it for EMBEDDED.
Also please cc: linux-ide on IDE related patches.
On 11/11/05, Matt Mackall <mpm@selenic.com> wrote:
> Configurable number of supported IDE interfaces
>
> This overrides the default limit (which may be set per arch with
> CONFIG_IDE_MAX_HWIFS). This is the result of setting interfaces to 1:
>
> text data bss dec hex filename
> 3330172 529036 190556 4049764 3dcb64 vmlinux-baseline
> 3329352 528928 172124 4030404 3d7fc4 vmlinux
>
> Signed-off-by: Matt Mackall <mpm@selenic.com>
>
> Index: 2.6.14-misc/drivers/ide/setup-pci.c
> ===================================================================
> --- 2.6.14-misc.orig/drivers/ide/setup-pci.c 2005-10-27 17:02:08.000000000 -0700
> +++ 2.6.14-misc/drivers/ide/setup-pci.c 2005-11-09 11:27:23.000000000 -0800
> @@ -102,7 +102,7 @@ static ide_hwif_t *ide_match_hwif(unsign
> return hwif; /* pick an unused entry */
> }
> }
> - for (h = 0; h < 2; ++h) {
> + for (h = 0; h < 2 && h < MAX_HWIFS; ++h) {
> hwif = ide_hwifs + h;
> if (hwif->chipset == ide_unknown)
> return hwif; /* pick an unused entry */
> Index: 2.6.14-misc/include/linux/ide.h
> ===================================================================
> --- 2.6.14-misc.orig/include/linux/ide.h 2005-11-01 10:54:33.000000000 -0800
> +++ 2.6.14-misc/include/linux/ide.h 2005-11-09 11:27:23.000000000 -0800
> @@ -309,6 +309,11 @@ static inline void ide_init_hwif_ports(h
> }
> #endif /* IDE_ARCH_OBSOLETE_INIT */
>
> +#if defined(CONFIG_IDE_HWIFS) && CONFIG_IDE_HWIFS > 0
> +#undef MAX_HWIFS
> +#define MAX_HWIFS CONFIG_IDE_HWIFS
> +#endif
> +
> /* Currently only m68k, apus and m8xx need it */
> #ifndef IDE_ARCH_ACK_INTR
> # define ide_ack_intr(hwif) (1)
> Index: 2.6.14-misc/init/Kconfig
> ===================================================================
> --- 2.6.14-misc.orig/init/Kconfig 2005-11-09 11:27:20.000000000 -0800
> +++ 2.6.14-misc/init/Kconfig 2005-11-09 11:27:23.000000000 -0800
> @@ -457,6 +457,15 @@ config CC_ALIGN_JUMPS
> no dummy operations need be executed.
> Zero means use compiler's default.
>
> +config IDE_HWIFS
> + depends IDE
> + int "Number of IDE hardware interfaces (0 for default)" if EMBEDDED
> + range 0 20
> + default 0
> + help
> + Select the maximum number of IDE interfaces (0 for default).
> + Saves up to 14k.
> +
> endmenu # General setup
>
> config TINY_SHMEM
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH 14/15] misc: Configurable number of supported IDE interfaces
2005-11-11 10:14 ` Bartlomiej Zolnierkiewicz
@ 2005-11-11 17:18 ` Matt Mackall
2005-11-11 17:34 ` Roman Zippel
0 siblings, 1 reply; 9+ messages in thread
From: Matt Mackall @ 2005-11-11 17:18 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: Andrew Morton, linux-kernel
On Fri, Nov 11, 2005 at 11:14:08AM +0100, Bartlomiej Zolnierkiewicz wrote:
[top-posting adjusted]
> > This overrides the default limit (which may be set per arch with
> > CONFIG_IDE_MAX_HWIFS). This is the result of setting interfaces to 1:
>
> You are duplicating functionality of CONFIG_IDE_MAX_HWIFS,
> please find a way to use it for EMBEDDED.
It's intentional. The current CONFIG_IDE_MAX_HWIFS is a hidden
variable that sets a per architecture maximum. To the best of my
knowledge, there's no way to do, say:
default 4 if ARCH_FOO
default 1 if ARCH_BAR
..so I'm stuck with using two config symbols anyway.
I've thought about it, this is the best I could come up with. If you
can come up with something cleaner, I'm all ears.
--
Mathematics is the supreme nostalgia of our time.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 14/15] misc: Configurable number of supported IDE interfaces
2005-11-11 17:18 ` Matt Mackall
@ 2005-11-11 17:34 ` Roman Zippel
2005-11-11 17:37 ` Matt Mackall
0 siblings, 1 reply; 9+ messages in thread
From: Roman Zippel @ 2005-11-11 17:34 UTC (permalink / raw)
To: Matt Mackall; +Cc: Bartlomiej Zolnierkiewicz, Andrew Morton, linux-kernel
Hi,
On Fri, 11 Nov 2005, Matt Mackall wrote:
> It's intentional. The current CONFIG_IDE_MAX_HWIFS is a hidden
> variable that sets a per architecture maximum. To the best of my
> knowledge, there's no way to do, say:
>
> default 4 if ARCH_FOO
> default 1 if ARCH_BAR
>
> ..so I'm stuck with using two config symbols anyway.
Where is the problem? This should work fine.
With the latest kernel you can even use a dynamic range:
config IDE_HWIFS
int "..."
range 1 IDE_MAX_HWIFS
bye, Roman
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 14/15] misc: Configurable number of supported IDE interfaces
2005-11-11 17:34 ` Roman Zippel
@ 2005-11-11 17:37 ` Matt Mackall
2005-11-11 17:47 ` Matt Mackall
2005-11-11 17:49 ` Roman Zippel
0 siblings, 2 replies; 9+ messages in thread
From: Matt Mackall @ 2005-11-11 17:37 UTC (permalink / raw)
To: Roman Zippel; +Cc: Bartlomiej Zolnierkiewicz, Andrew Morton, linux-kernel
On Fri, Nov 11, 2005 at 06:34:27PM +0100, Roman Zippel wrote:
> Hi,
>
> On Fri, 11 Nov 2005, Matt Mackall wrote:
>
> > It's intentional. The current CONFIG_IDE_MAX_HWIFS is a hidden
> > variable that sets a per architecture maximum. To the best of my
> > knowledge, there's no way to do, say:
> >
> > default 4 if ARCH_FOO
> > default 1 if ARCH_BAR
> >
> > ..so I'm stuck with using two config symbols anyway.
>
> Where is the problem? This should work fine.
Does it? Didn't work when last I checked (which was a while ago).
> With the latest kernel you can even use a dynamic range:
>
> config IDE_HWIFS
> int "..."
> range 1 IDE_MAX_HWIFS
But this suggests a good reason to hold on to both variables.
--
Mathematics is the supreme nostalgia of our time.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 14/15] misc: Configurable number of supported IDE interfaces
2005-11-11 17:37 ` Matt Mackall
@ 2005-11-11 17:47 ` Matt Mackall
2005-11-11 17:49 ` Roman Zippel
1 sibling, 0 replies; 9+ messages in thread
From: Matt Mackall @ 2005-11-11 17:47 UTC (permalink / raw)
To: Roman Zippel; +Cc: Bartlomiej Zolnierkiewicz, Andrew Morton, linux-kernel
On Fri, Nov 11, 2005 at 09:37:37AM -0800, Matt Mackall wrote:
> > With the latest kernel you can even use a dynamic range:
> >
> > config IDE_HWIFS
> > int "..."
> > range 1 IDE_MAX_HWIFS
>
> But this suggests a good reason to hold on to both variables.
..except that not all arches define it. In fact, only sh and Alpha do.
--
Mathematics is the supreme nostalgia of our time.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 14/15] misc: Configurable number of supported IDE interfaces
2005-11-11 17:37 ` Matt Mackall
2005-11-11 17:47 ` Matt Mackall
@ 2005-11-11 17:49 ` Roman Zippel
1 sibling, 0 replies; 9+ messages in thread
From: Roman Zippel @ 2005-11-11 17:49 UTC (permalink / raw)
To: Matt Mackall; +Cc: Bartlomiej Zolnierkiewicz, Andrew Morton, linux-kernel
Hi,
On Fri, 11 Nov 2005, Matt Mackall wrote:
> > > It's intentional. The current CONFIG_IDE_MAX_HWIFS is a hidden
> > > variable that sets a per architecture maximum. To the best of my
> > > knowledge, there's no way to do, say:
> > >
> > > default 4 if ARCH_FOO
> > > default 1 if ARCH_BAR
> > >
> > > ..so I'm stuck with using two config symbols anyway.
> >
> > Where is the problem? This should work fine.
>
> Does it? Didn't work when last I checked (which was a while ago).
I don't know what you tried, for me it does.
> > With the latest kernel you can even use a dynamic range:
> >
> > config IDE_HWIFS
> > int "..."
> > range 1 IDE_MAX_HWIFS
>
> But this suggests a good reason to hold on to both variables.
You _can_ use it, I didn't say you have to use it.
bye, Roman
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2005-11-11 17:49 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-11 15:33 [PATCH 14/15] misc: Configurable number of supported IDE interfaces Nick Warne
2005-11-11 17:11 ` Matt Mackall
-- strict thread matches above, loose matches on Subject: below --
2005-11-11 8:35 [PATCH 13/15] misc: Configure ELF core dump support Matt Mackall
2005-11-11 8:35 ` [PATCH 14/15] misc: Configurable number of supported IDE interfaces Matt Mackall
2005-11-11 10:14 ` Bartlomiej Zolnierkiewicz
2005-11-11 17:18 ` Matt Mackall
2005-11-11 17:34 ` Roman Zippel
2005-11-11 17:37 ` Matt Mackall
2005-11-11 17:47 ` Matt Mackall
2005-11-11 17:49 ` Roman Zippel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox