mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-19 18:53:52 +08:00
18280edafe
For para-virtualized guests running under KVM or other equivalent hypervisor. Signed-off-by: David Daney <david.daney@cavium.com> Signed-off-by: Andreas Herrmann <andreas.herrmann@caviumnetworks.com> Cc: linux-mips@linux-mips.org Cc: James Hogan <james.hogan@imgtec.com> Cc: kvm@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/7004/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
37 lines
950 B
C
37 lines
950 B
C
/*
|
|
* This file is subject to the terms and conditions of the GNU General Public
|
|
* License. See the file "COPYING" in the main directory of this archive
|
|
* for more details.
|
|
*
|
|
* Copyright (C) 2013 Cavium, Inc.
|
|
*/
|
|
#ifndef __ASM_MACH_PARAVIRT_CPU_FEATURE_OVERRIDES_H
|
|
#define __ASM_MACH_PARAVIRT_CPU_FEATURE_OVERRIDES_H
|
|
|
|
#define cpu_has_4kex 1
|
|
#define cpu_has_3k_cache 0
|
|
#define cpu_has_tx39_cache 0
|
|
#define cpu_has_counter 1
|
|
#define cpu_has_llsc 1
|
|
/*
|
|
* We Disable LL/SC on non SMP systems as it is faster to disable
|
|
* interrupts for atomic access than a LL/SC.
|
|
*/
|
|
#ifdef CONFIG_SMP
|
|
# define kernel_uses_llsc 1
|
|
#else
|
|
# define kernel_uses_llsc 0
|
|
#endif
|
|
|
|
#ifdef CONFIG_CPU_CAVIUM_OCTEON
|
|
#define cpu_dcache_line_size() 128
|
|
#define cpu_icache_line_size() 128
|
|
#define cpu_has_octeon_cache 1
|
|
#define cpu_has_4k_cache 0
|
|
#else
|
|
#define cpu_has_octeon_cache 0
|
|
#define cpu_has_4k_cache 1
|
|
#endif
|
|
|
|
#endif /* __ASM_MACH_PARAVIRT_CPU_FEATURE_OVERRIDES_H */
|