Update of /cvsroot/linuxconsole/ruby/linux/arch/ia64/kernel
In directory sc8-pr-cvs1:/tmp/cvs-serv15026/linux/arch/ia64/kernel
Modified Files:
setup.c
Log Message:
Synced to 2.5.59
Index: setup.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/arch/ia64/kernel/setup.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- setup.c 23 Nov 2002 00:55:45 -0000 1.8
+++ setup.c 1 Feb 2003 18:57:12 -0000 1.9
@@ -363,11 +363,13 @@
#ifdef CONFIG_ACPI_BOOT
/* Initialize the ACPI boot-time table parser */
acpi_table_init(*cmdline_p);
-
-#ifdef CONFIG_ACPI_NUMA
+# ifdef CONFIG_ACPI_NUMA
acpi_numa_init();
-#endif
-
+# endif
+#else
+# ifdef CONFIG_SMP
+ smp_build_cpu_map(); /* happens, e.g., with the Ski simulator */
+# endif
#endif /* CONFIG_APCI_BOOT */
find_memory();
@@ -453,9 +455,18 @@
# define lpj loops_per_jiffy
# define cpunum 0
#endif
- char family[32], features[128], *cp;
+ static struct {
+ unsigned long mask;
+ const char *feature_name;
+ } feature_bits[] = {
+ { 1UL << 0, "branchlong" },
+ { 1UL << 1, "spontaneous deferral"},
+ { 1UL << 2, "16-byte atomic ops" }
+ };
+ char family[32], features[128], *cp, sep;
struct cpuinfo_ia64 *c = v;
unsigned long mask;
+ int i;
mask = c->features;
@@ -468,13 +479,24 @@
/* build the feature string: */
memcpy(features, " standard", 10);
cp = features;
- if (mask & 1) {
- strcpy(cp, " branchlong");
- cp = strchr(cp, '\0');
- mask &= ~1UL;
+ sep = 0;
+ for (i = 0; i < sizeof(feature_bits)/sizeof(feature_bits[0]); ++i) {
+ if (mask & feature_bits[i].mask) {
+ if (sep)
+ *cp++ = sep;
+ sep = ',';
+ *cp++ = ' ';
+ strcpy(cp, feature_bits[i].feature_name);
+ cp += strlen(feature_bits[i].feature_name);
+ mask &= ~feature_bits[i].mask;
+ }
}
- if (mask)
+ if (mask) {
+ /* print unknown features as a hex value: */
+ if (sep)
+ *cp++ = sep;
sprintf(cp, " 0x%lx", mask);
+ }
seq_printf(m,
"processor : %d\n"
@@ -614,9 +636,8 @@
* "NR_CPUS" pages for all CPUs to avoid that AP calls get_zeroed_page().
*/
if (smp_processor_id() == 0) {
- cpu_data = (unsigned long) __alloc_bootmem(PERCPU_PAGE_SIZE * NR_CPUS,
- PERCPU_PAGE_SIZE,
- __pa(MAX_DMA_ADDRESS));
+ cpu_data = __alloc_bootmem(PERCPU_PAGE_SIZE * NR_CPUS, PERCPU_PAGE_SIZE,
+ __pa(MAX_DMA_ADDRESS));
for (cpu = 0; cpu < NR_CPUS; cpu++) {
memcpy(cpu_data, __phys_per_cpu_start, __per_cpu_end - __per_cpu_start);
__per_cpu_offset[cpu] = (char *) cpu_data - __per_cpu_start;
|