Re: [PATCH][RFC] parisc: Use local tlb purges only on UP machines

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

 



On 9/25/22 21:27, John David Anglin wrote:
On 2022-09-25 2:58 p.m., Helge Deller wrote:
On 9/25/22 20:44, John David Anglin wrote:
On 2022-09-25 2:19 p.m., John David Anglin wrote:
One goal of that patch was to drop the CONFIG_PA20 ifdef case,
because a 32-bit kernel could be compiled for PA8000 in which case
the "pdtlb,l" will burn the machine.
Don't think so.  "pdtlb,l" is available on all PA 2.0 machines. It's not 64-bit specific.
There is some difference in implementation between PA 1.1 and 2.0. 64-bit register
values are used in the PA 2.0 implementation.

That's right.
But if you build a 32-bit kernel and choose to optimize for PA8x00 CPUs,
the CONFIG_PA20 is set and the local-purge is used unconditionally.
That breaks e.g. when running such a kernel in qemu (which is 32-bit only).
I don't think that's a valid kernel configuration for qemu.

I agree - it's probably not the best choice if you want to run qemu...

It only supports the PA 1.1 instruction set.  PA8x00 CPUs always
support the PA 2.0 instruction set even when running in 32-bit mode.
The 32-bit kernel is built with the 32-bit compiler.
As far as I understand arch/parisc/Makefile, choosing the CPU type
just enables *tuning* for the selected CPU. See Makefile:

# select which processor to optimise for
cflags-$(CONFIG_PA7000)         += -march=1.1 -mschedule=7100
cflags-$(CONFIG_PA7200)         += -march=1.1 -mschedule=7200
cflags-$(CONFIG_PA7100LC)       += -march=1.1 -mschedule=7100LC
cflags-$(CONFIG_PA7300LC)       += -march=1.1 -mschedule=7300
cflags-$(CONFIG_PA8X00)         += -march=2.0 -mschedule=8000

The only assembler instructions which break qemu are our manually
added ones: "pdtlb,l" and "ldd" (for flushing - see my first patch).
The two patches I sent today allows to boot such a kernel, and
they still keep the PA2.0 support when run on PA2.0 machines.

Helge




[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux