• David Gibson's avatar
    [PATCH] ppc64: allow emulation of mfpvr on ppc64 kernel · d4bb2b8a
    David Gibson authored
    Allow userspace programs on ppc64 to use the (privileged) mfpvr instruction
    to determine the processor type.  At the moment it emulates the instruction
    to provide the real PVR value, though it could be made to lie in future if
    for some reason we wish to restrict what CPU features userspace uses.
    
    If nothing else this means that some existing ppc32 applications will now
    run on a 64-bit kernel (the 32-bit kernel has long supported this
    emulation).  It will also be necessary for ppc64 perfctr support, where
    userspace requires finer-grained cpu type information than the kernel in
    order to correctly program the performance monitor control registers.
    Signed-off-by: default avatarDavid Gibson <dwg@au1.ibm.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    d4bb2b8a
traps.c 13.1 KB