We ran into a problem with the current ACPI NUMA code overflowing anarray if the number of CPUs found in the SRAT was greater than NR_CPUS.

Looking at the acpi_table_parse_madt() I noticed that it doesn't doanything to handle overflows, instead it relies on hacks in thecall-back functions to come up with a check instead, the various checksin place are somewhat inconsistent in their implementation.

I could just hack the NUMA srat_num_cpus handling code to have a limitas IMHO it is a lot cleaner to improve the acpi_table_parse_madt() APIby adding a max_entries argument and then have acpi_table_parse_madtspit out a warning if it found too many entries.

Patch attached, it was generated against 2.6.0-test11 but applies finewith a little fuzz to 2.6.1-rc2 (my apologies for not having fixedx86_64 yet, it should be trivial to apply the i386 changes to the x86_64tree as well).