Skip to contentSkip to conversation

Request: increase in PCI bus limit

PATCH Christopher Neufeld 6 participants 6 messages Jan 31, 2001

lore
Share & tools
lore
#0 lore raw

Hello,

I'm working at a customer site with custom hardware. The 2.4.0 series
kernel almost works out of the box, but the machine has 52 PCI busses. Plans are to produce a 4-way box which would have over 80 PCI busses. The file include/asm-i386/mpspec.h allocates space for 32 busses in the definition of the macro MAX_MP_BUSSES. When 52 busses are probed, some arrays are filled out past their ends (there is no bounds checking performed on the array filling), and the kernel oopses out. The only patch which has to be applied to make Linux run stably on these systems is to increase that limit. Would it be possible to bump it up to 128, or even 256, in later 2.4.* kernel releases? That would allow this customer to work with an unpatched kernel, at the cost of an additional 3.5 kB of variables in the kernel.

Thank you for any help.
For completeness, here's the patch (against 2.4.0):

include/asm-i386/mpspec.h Tue Jan 30 16:06:21 2001 renamed from include/asm-i386/mpspec.h.orig Tue Jan 30 16:06:08 2001 +1 -1
@@ -157,7 +157,7 @@
  */
 
 #define MAX_IRQ_SOURCES 128
-#define MAX_MP_BUSSES 32
+#define MAX_MP_BUSSES 256
 enum mp_bustype {
        MP_BUS_ISA = 1,
        MP_BUS_EISA,
Signature · 7 lines
 Christopher Neufeld		 		 [email protected]
 Home page:  http://caliban.physics.utoronto.ca/neufeld/Intro.html
 "Don't edit reality for the sake of simplicity"
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
#1 lore raw

** Reply to message from Christopher Neufeld <[email protected]> on Tue, 30 Jan 2001 16:08:32 -0800

Quoted 4 lines

Would it be possible to bump it up to 128, or even
256, in later 2.4.* kernel releases? That would allow this customer to work with an unpatched kernel, at the cost of an additional 3.5 kB of variables in the kernel.

I don't think that's going to happen. If we did this for your obscure system, then we'd have to do it for every obscure system, and before you know it, the kernel is 200KB larger.

Besides, why is your client afraid of patched kernels? It sounds like a very odd request from someone with a linuxcare.com email address. I would think that you'd WANT to provide patched kernels so that the customer can keep paying you (until they learn how to use a text editor, at which point they can patch the kernel themselves!!!)

Signature · 9 lines
Timur Tabi - [email protected]
Interactive Silicon - http://www.interactivesi.com

When replying to a mailing-list message, please direct the reply to the mailing list only.  Don't send another copy to me.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
#2 lore raw

He's probably sending it to the list the same reason why most in tech circles do.
To cut down on the amount of work required. Personally I would love to have all my custom changes put into a 'standard' distribution that way I wouldn't need
to keep as many custom notes for x,y,z platforms or what-else. Also for the fact that it gives something back (generally if I run into a situation there is a good
chance that someone else will run into it as well, so if I can make _his_ life
easier if he doesn't have the same knowledge it's worth it).

Steve
----- Original Message -----
From: "Timur Tabi" <[email protected]>
To: <[email protected]>
Sent: Tuesday, January 30, 2001 18:36
Subject: Re: Request: increase in PCI bus limit

Quoted 1 line

** Reply to message from Christopher Neufeld <[email protected]> on

Tue, 30

Quoted 9 lines

Jan 2001 16:08:32 -0800

Quoted 4 lines

Would it be possible to bump it up to 128, or even
256, in later 2.4.* kernel releases? That would allow this customer to work with an unpatched kernel, at the cost of an additional 3.5 kB of variables in the kernel.

I don't think that's going to happen. If we did this for your obscure

system,

Quoted 1 line

then we'd have to do it for every obscure system, and before you know it,

the

Quoted 3 lines

kernel is 200KB larger.

Besides, why is your client afraid of patched kernels? It sounds like a

very

Quoted 1 line

odd request from someone with a linuxcare.com email address. I would

think that

Quoted 1 line

you'd WANT to provide patched kernels so that the customer can keep paying

you

Quoted 1 line

(until they learn how to use a text editor, at which point they can patch

the

Quoted 8 lines

kernel themselves!!!)

--
Timur Tabi - [email protected] Interactive Silicon - http://www.interactivesi.com

When replying to a mailing-list message, please direct the reply to the

mailing list only. Don't send another copy to me.

Quoted 6 lines

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#3 lore raw
In reply to Timur Tabi
Quoted 13 lines · Timur Tabi

** Reply to message from Christopher Neufeld <[email protected]> on Tue, 30 Jan 2001 16:08:32 -0800

Quoted 4 lines

Would it be possible to bump it up to 128, or even
256, in later 2.4.* kernel releases? That would allow this customer to work with an unpatched kernel, at the cost of an additional 3.5 kB of variables in the kernel.

I don't think that's going to happen. If we did this for your obscure system, then we'd have to do it for every obscure system, and before you know it, the kernel is 200KB larger.

Quoted 5 lines

Besides, why is your client afraid of patched kernels? It sounds like a very odd request from someone with a linuxcare.com email address. I would think that you'd WANT to provide patched kernels so that the customer can keep paying you (until they learn how to use a text editor, at which point they can patch the kernel themselves!!!)

Should there not at least be some bounds checking on this table, though?!

If it's only built at boot time, it's not performance critical. Maybe at a later date it could even expand (or shrink, on small PCs??) the table as needed?

James.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#4 lore raw
In reply to Christopher Neufeld
Quoted 6 lines · Christopher Neufeld

The only patch
which has to be applied to make Linux run stably on these systems is to increase that limit. Would it be possible to bump it up to 128, or even 256, in later 2.4.* kernel releases? That would allow this customer to work with an unpatched kernel, at the cost of an additional 3.5 kB of variables in the kernel.

I guess the cleanest solution would be to allow variable setting of the maximum number of PCI busses in the config file, similar to the CONFIG_UNIX98_PTY_COUNT setting, so that "exotic" users with 32+ PCI busses can boost the standard value according to their needs, without having to increase kernel size for the normal users.

Regards,
Udo.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#5 lore raw
In reply to Christopher Neufeld
Quoted 10 lines · Udo A. Steinberg
Quoted 6 lines · Christopher Neufeld

The only patch
which has to be applied to make Linux run stably on these systems is to increase that limit. Would it be possible to bump it up to 128, or even 256, in later 2.4.* kernel releases? That would allow this customer to work with an unpatched kernel, at the cost of an additional 3.5 kB of variables in the kernel.

Quoted 6 lines

I guess the cleanest solution would be to allow variable setting of the maximum number of PCI busses in the config file, similar to the CONFIG_UNIX98_PTY_COUNT setting, so that "exotic" users with 32+ PCI busses can boost the standard value according to their needs, without having to increase kernel size for the normal users.

Wouldn't autodetection be the better solution? Seems to me the kernel has
no problem detecting all the buses, so why not break the probing into a two-
pass thing - first pass simply counts buses, second pass allocate memory and fills in the arrays.
(One-pass is possible too, if dynamic allocation is possible at this time.)
No config option to worry about, no excess room for 32 buses on ordinary pc's, no worry for the 100-bus user.

Helge Hafting
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/