parisc: expose 32/64-bit capabilities in cpuinfo
authorColin Watson <cjwatson@canonical.com>
Fri, 30 Jan 2009 01:03:50 +0000 (01:03 +0000)
committerKyle McMartin <kyle@mcmartin.ca>
Tue, 31 Mar 2009 02:51:33 +0000 (02:51 +0000)
commit445c088f88d63db49598390be3525252d211688f
tree4cd637fde20c72cd9ca7612b6e8404366790c274
parent1152a68c4226ce48c95241b6ffc543850b4b3a97
parisc: expose 32/64-bit capabilities in cpuinfo

It'd be rather useful for debian-installer if we could get hold of
accurate firmware information on whether only 32-bit kernels are
supported, only 64-bit kernels, or both; this would allow us to present
an accurate menu of kernel packages if more than one is available,
rather than the user having to guess. This patch attempts to expose it
in cpuinfo.

I adjusted pdc_model_capabilities to cope with a potential
PDC_INVALID_ARG return as the firmware manual instructs, by assuming
32-bit only. This may be the wrong place for it.

I made up user-visible capability names by total fiat and for the moment
ignored the other bits that may appear in the capabilities word.

I have no PA-RISC machine myself to test on, and no PA experience
either, so I rather hope that somebody will kind-heartedly take this and
fix it up if needed. I ran it past Dann Frazier on IRC and he said
"looks good to me", but I think without testing.

Also, this is against the Ubuntu 2.6.28 kernel tree since that's what I
had handy and I was a bit tight on disk space to slurp down another
tree. Sorry if it's skewed in any relevant way; I'll be happy to adjust
if necessary.

Thanks in advance!

Signed-off-by: Colin Watson <cjwatson@canonical.com>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
arch/parisc/include/asm/pdc.h
arch/parisc/kernel/firmware.c
arch/parisc/kernel/processor.c