]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Make sure we copy all cpu_spec features except PMC related ones
authorMichael Ellerman <michael@ellerman.id.au>
Sun, 22 Feb 2009 16:25:45 +0000 (16:25 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 11 Mar 2009 06:10:14 +0000 (17:10 +1100)
commite31c0be29cbb551f3f03bc3ff5978e35a7de984e
treecdf74a90364690fbf1daa71fbe5f09c07c6f5cb3
parent43e51d6bf34880e14cd28cdce7fd760247be2e7c
powerpc: Make sure we copy all cpu_spec features except PMC related ones

When identify_cpu() is called a second time with a logical PVR, it
only copies a subset of the cpu_spec fields so as to avoid overwriting
the performance monitor fields that were initialized based on the
real PVR.

However some of the other, non performance monitor related fields are
also not copied:
 * pvr_mask
 * pvr_value
 * mmu_features
 * machine_check

The fact that pvr_mask is not copied can result in show_cpuinfo()
showing the cpu as "unknown", if we override an unknown PVR with a
logical one - as reported by Shaggy.

So change the logic to copy all fields, and then put back the PMC
related ones in the case that we're overwriting a real PVR with a
logical one.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/cputable.c