/proc/cpuinfo makes false assumptions of uniformity on IP27

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The code in arch/mips/kernel/proc.c:show_cpuinfo() for showing
/proc/cpuinfo makes the assumption that all CPU:s are equal, and show
NR_CPUS copies of the information for whatever CPU we happen to be running
on. This leads to confusing output on SGI Origin 2000, since it can have
CPU:s of different types.

Here's a sample of what it looks like on my Origin 2000 with 16 R12000 and
16 R10000 CPU:s:

   creideiki@viggen ~ $ for i in `seq 0 2`; do echo -n "$i: "; grep ^cpu <
/proc/cpuinfo | uniq; done
   0: cpu model            : R12000 V2.3  FPU V0.0
   1: cpu model            : R10000 V3.4  FPU V0.0
   2: cpu model            : R12000 V2.3  FPU V0.0

The obvious fix would be to change "current_cpu_data" to "cpu_data[n]" in
arch/mips/kernel/proc.c:show_cpuinfo(), but two things remain:

0. I haven't actually tried it yet, since the only Origin 2000 I have is
in production. I should be able to reboot to a patched kernel sometime
during this weekend.

1. What about the CPU feature test macros in
include/asm-mips/cpu-features.h? They claim
  /*
   * SMP assumption: Options of CPU 0 are a superset of all processors.
   * This is true for all known MIPS systems.
   */
but is that really true, even on a mixed R12k/R10k system?

-- 
Karl-Johan Karlsson



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux