linux_dsm_epyc7002/arch/mips/include/asm/mach-loongson64
Huacai Chen 1e820da3c9 MIPS: Loongson-3: Introduce CONFIG_LOONGSON3_ENHANCEMENT
New Loongson 3 CPU (since Loongson-3A R2, as opposed to Loongson-3A R1,
Loongson-3B R1 and Loongson-3B R2) has many enhancements, such as FTLB,
L1-VCache, EI/DI/Wait/Prefetch instruction, DSP/DSPv2 ASE, User Local
register, Read-Inhibit/Execute-Inhibit, SFB (Store Fill Buffer), Fast
TLB refill support, etc.

This patch introduce a config option, CONFIG_LOONGSON3_ENHANCEMENT, to
enable those enhancements which are not probed at run time. If you want
a generic kernel to run on all Loongson 3 machines, please say 'N'
here. If you want a high-performance kernel to run on new Loongson 3
machines only, please say 'Y' here.

Some additional explanations:
1) SFB locates between core and L1 cache, it causes memory access out
   of order, so writel/outl (and other similar functions) need a I/O
   reorder barrier.
2) Loongson 3 has a bug that di instruction can not save the irqflag,
   so arch_local_irq_save() is modified. Since CPU_MIPSR2 is selected
   by CONFIG_LOONGSON3_ENHANCEMENT, generic kernel doesn't use ei/di
   at all.
3) CPU_HAS_PREFETCH is selected by CONFIG_LOONGSON3_ENHANCEMENT, so
   MIPS_CPU_PREFETCH (used by uasm) probing is also put in this patch.

Signed-off-by: Huacai Chen <chenhc@lemote.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: Steven J . Hill <sjhill@realitydiluted.com>
Cc: Fuxin Zhang <zhangfx@lemote.com>
Cc: Zhangjin Wu <wuzhangjin@gmail.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/12755/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2016-05-13 14:02:15 +02:00
..
cs5536 MIPS: Loongson: Naming style cleanup and rework 2015-06-21 21:53:59 +02:00
boot_param.h MIPS: Loongson: Naming style cleanup and rework 2015-06-21 21:53:59 +02:00
cpu-feature-overrides.h MIPS: Loongson: Add Loongson-3A R2 basic support 2016-05-13 14:02:14 +02:00
dma-coherence.h MIPS: Loongson: Naming style cleanup and rework 2015-06-21 21:53:59 +02:00
irq.h MIPS: Loongson: Naming style cleanup and rework 2015-06-21 21:53:59 +02:00
kernel-entry-init.h MIPS: Loongson-3: Introduce CONFIG_LOONGSON3_ENHANCEMENT 2016-05-13 14:02:15 +02:00
loongson_hwmon.h MIPS: Loongson: Naming style cleanup and rework 2015-06-21 21:53:59 +02:00
loongson.h MIPS: Loongson: Naming style cleanup and rework 2015-06-21 21:53:59 +02:00
machine.h MIPS: Loongson: Naming style cleanup and rework 2015-06-21 21:53:59 +02:00
mc146818rtc.h MIPS: Loongson: Naming style cleanup and rework 2015-06-21 21:53:59 +02:00
mem.h MIPS: Loongson: Naming style cleanup and rework 2015-06-21 21:53:59 +02:00
mmzone.h MIPS, CPUFREQ: Fix spelling of Institute. 2015-07-07 20:59:42 +02:00
pci.h MIPS: Loongson: Naming style cleanup and rework 2015-06-21 21:53:59 +02:00
spaces.h MIPS: Loongson: Naming style cleanup and rework 2015-06-21 21:53:59 +02:00
topology.h MIPS: Loongson: Naming style cleanup and rework 2015-06-21 21:53:59 +02:00
workarounds.h MIPS: Loongson: Naming style cleanup and rework 2015-06-21 21:53:59 +02:00