You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
powerpc/64s: Remove POWER4 support
POWER4 has been broken since at least the change 49d09bf2a6
("powerpc/64s: Optimise MSR handling in exception handling"), which
requires mtmsrd L=1 support. This was introduced in ISA v2.01, and
POWER4 supports ISA v2.00.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
committed by
Michael Ellerman
parent
3735eb850e
commit
471d7ff8b5
@@ -146,8 +146,8 @@ CFLAGS-$(CONFIG_PPC32) := -ffixed-r2 $(MULTIPLEWORD)
|
||||
CFLAGS-$(CONFIG_PPC32) += $(call cc-option,-mno-readonly-in-sdata)
|
||||
|
||||
ifeq ($(CONFIG_PPC_BOOK3S_64),y)
|
||||
CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=power7,-mtune=power4)
|
||||
CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=power4
|
||||
CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=power7,$(call cc-option,-mtune=power5))
|
||||
CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mcpu=power5,-mcpu=power4)
|
||||
else
|
||||
CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=powerpc64
|
||||
endif
|
||||
@@ -168,7 +168,6 @@ ifdef CONFIG_MPROFILE_KERNEL
|
||||
endif
|
||||
|
||||
CFLAGS-$(CONFIG_CELL_CPU) += $(call cc-option,-mcpu=cell)
|
||||
CFLAGS-$(CONFIG_POWER4_CPU) += $(call cc-option,-mcpu=power4)
|
||||
CFLAGS-$(CONFIG_POWER5_CPU) += $(call cc-option,-mcpu=power5)
|
||||
CFLAGS-$(CONFIG_POWER6_CPU) += $(call cc-option,-mcpu=power6)
|
||||
CFLAGS-$(CONFIG_POWER7_CPU) += $(call cc-option,-mcpu=power7)
|
||||
|
||||
@@ -413,10 +413,6 @@ static inline void cpu_feature_keys_init(void) { }
|
||||
#define CPU_FTRS_GENERIC_32 (CPU_FTR_COMMON | CPU_FTR_NODSISRALIGN)
|
||||
|
||||
/* 64-bit CPUs */
|
||||
#define CPU_FTRS_POWER4 (CPU_FTR_LWSYNC | \
|
||||
CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \
|
||||
CPU_FTR_MMCRA | CPU_FTR_CP_USE_DCBTZ | \
|
||||
CPU_FTR_STCX_CHECKS_ADDRESS)
|
||||
#define CPU_FTRS_PPC970 (CPU_FTR_LWSYNC | \
|
||||
CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \
|
||||
CPU_FTR_ALTIVEC_COMP | CPU_FTR_CAN_NAP | CPU_FTR_MMCRA | \
|
||||
@@ -488,7 +484,7 @@ static inline void cpu_feature_keys_init(void) { }
|
||||
#define CPU_FTRS_POSSIBLE (CPU_FTRS_E6500 | CPU_FTRS_E5500)
|
||||
#else
|
||||
#define CPU_FTRS_POSSIBLE \
|
||||
(CPU_FTRS_POWER4 | CPU_FTRS_PPC970 | CPU_FTRS_POWER5 | \
|
||||
(CPU_FTRS_PPC970 | CPU_FTRS_POWER5 | \
|
||||
CPU_FTRS_POWER6 | CPU_FTRS_POWER7 | CPU_FTRS_POWER8E | \
|
||||
CPU_FTRS_POWER8 | CPU_FTRS_POWER8_DD1 | CPU_FTRS_CELL | \
|
||||
CPU_FTRS_PA6T | CPU_FTR_VSX_COMP | CPU_FTR_ALTIVEC_COMP | \
|
||||
@@ -541,7 +537,7 @@ enum {
|
||||
#define CPU_FTRS_ALWAYS (CPU_FTRS_E6500 & CPU_FTRS_E5500)
|
||||
#else
|
||||
#define CPU_FTRS_ALWAYS \
|
||||
(CPU_FTRS_POWER4 & CPU_FTRS_PPC970 & CPU_FTRS_POWER5 & \
|
||||
(CPU_FTRS_PPC970 & CPU_FTRS_POWER5 & \
|
||||
CPU_FTRS_POWER6 & CPU_FTRS_POWER7 & CPU_FTRS_CELL & \
|
||||
CPU_FTRS_PA6T & CPU_FTRS_POWER8 & CPU_FTRS_POWER8E & \
|
||||
CPU_FTRS_POWER8_DD1 & ~CPU_FTR_HVMODE & CPU_FTRS_POSSIBLE & \
|
||||
|
||||
@@ -111,9 +111,9 @@
|
||||
/* MMU feature bit sets for various CPUs */
|
||||
#define MMU_FTRS_DEFAULT_HPTE_ARCH_V2 \
|
||||
MMU_FTR_HPTE_TABLE | MMU_FTR_PPCAS_ARCH_V2
|
||||
#define MMU_FTRS_POWER4 MMU_FTRS_DEFAULT_HPTE_ARCH_V2
|
||||
#define MMU_FTRS_PPC970 MMU_FTRS_POWER4 | MMU_FTR_TLBIE_CROP_VA
|
||||
#define MMU_FTRS_POWER5 MMU_FTRS_POWER4 | MMU_FTR_LOCKLESS_TLBIE
|
||||
#define MMU_FTRS_POWER MMU_FTRS_DEFAULT_HPTE_ARCH_V2
|
||||
#define MMU_FTRS_PPC970 MMU_FTRS_POWER | MMU_FTR_TLBIE_CROP_VA
|
||||
#define MMU_FTRS_POWER5 MMU_FTRS_POWER | MMU_FTR_LOCKLESS_TLBIE
|
||||
#define MMU_FTRS_POWER6 MMU_FTRS_POWER5 | MMU_FTR_KERNEL_RO | MMU_FTR_68_BIT_VA
|
||||
#define MMU_FTRS_POWER7 MMU_FTRS_POWER6
|
||||
#define MMU_FTRS_POWER8 MMU_FTRS_POWER6
|
||||
|
||||
@@ -133,36 +133,6 @@ extern void __restore_cpu_e6500(void);
|
||||
|
||||
static struct cpu_spec __initdata cpu_specs[] = {
|
||||
#ifdef CONFIG_PPC_BOOK3S_64
|
||||
{ /* Power4 */
|
||||
.pvr_mask = 0xffff0000,
|
||||
.pvr_value = 0x00350000,
|
||||
.cpu_name = "POWER4 (gp)",
|
||||
.cpu_features = CPU_FTRS_POWER4,
|
||||
.cpu_user_features = COMMON_USER_POWER4,
|
||||
.mmu_features = MMU_FTRS_POWER4 | MMU_FTR_TLBIE_CROP_VA,
|
||||
.icache_bsize = 128,
|
||||
.dcache_bsize = 128,
|
||||
.num_pmcs = 8,
|
||||
.pmc_type = PPC_PMC_IBM,
|
||||
.oprofile_cpu_type = "ppc64/power4",
|
||||
.oprofile_type = PPC_OPROFILE_POWER4,
|
||||
.platform = "power4",
|
||||
},
|
||||
{ /* Power4+ */
|
||||
.pvr_mask = 0xffff0000,
|
||||
.pvr_value = 0x00380000,
|
||||
.cpu_name = "POWER4+ (gq)",
|
||||
.cpu_features = CPU_FTRS_POWER4,
|
||||
.cpu_user_features = COMMON_USER_POWER4,
|
||||
.mmu_features = MMU_FTRS_POWER4 | MMU_FTR_TLBIE_CROP_VA,
|
||||
.icache_bsize = 128,
|
||||
.dcache_bsize = 128,
|
||||
.num_pmcs = 8,
|
||||
.pmc_type = PPC_PMC_IBM,
|
||||
.oprofile_cpu_type = "ppc64/power4",
|
||||
.oprofile_type = PPC_OPROFILE_POWER4,
|
||||
.platform = "power4",
|
||||
},
|
||||
{ /* PPC970 */
|
||||
.pvr_mask = 0xffff0000,
|
||||
.pvr_value = 0x00390000,
|
||||
@@ -628,15 +598,15 @@ static struct cpu_spec __initdata cpu_specs[] = {
|
||||
{ /* default match */
|
||||
.pvr_mask = 0x00000000,
|
||||
.pvr_value = 0x00000000,
|
||||
.cpu_name = "POWER4 (compatible)",
|
||||
.cpu_name = "POWER5 (compatible)",
|
||||
.cpu_features = CPU_FTRS_COMPATIBLE,
|
||||
.cpu_user_features = COMMON_USER_PPC64,
|
||||
.mmu_features = MMU_FTRS_DEFAULT_HPTE_ARCH_V2,
|
||||
.mmu_features = MMU_FTRS_POWER,
|
||||
.icache_bsize = 128,
|
||||
.dcache_bsize = 128,
|
||||
.num_pmcs = 6,
|
||||
.pmc_type = PPC_PMC_IBM,
|
||||
.platform = "power4",
|
||||
.platform = "power5",
|
||||
}
|
||||
#endif /* CONFIG_PPC_BOOK3S_64 */
|
||||
|
||||
|
||||
@@ -1810,16 +1810,8 @@ static void __init prom_initialize_tce_table(void)
|
||||
* size to 4 MB. This is enough to map 2GB of PCI DMA space.
|
||||
* By doing this, we avoid the pitfalls of trying to DMA to
|
||||
* MMIO space and the DMA alias hole.
|
||||
*
|
||||
* On POWER4, firmware sets the TCE region by assuming
|
||||
* each TCE table is 8MB. Using this memory for anything
|
||||
* else will impact performance, so we always allocate 8MB.
|
||||
* Anton
|
||||
*/
|
||||
if (pvr_version_is(PVR_POWER4) || pvr_version_is(PVR_POWER4p))
|
||||
minsize = 8UL << 20;
|
||||
else
|
||||
minsize = 4UL << 20;
|
||||
minsize = 4UL << 20;
|
||||
|
||||
/* Align to the greater of the align or size */
|
||||
align = max(minalign, minsize);
|
||||
|
||||
@@ -45,12 +45,6 @@ void kvmppc_emulate_dec(struct kvm_vcpu *vcpu)
|
||||
#ifdef CONFIG_PPC_BOOK3S
|
||||
/* mtdec lowers the interrupt line when positive. */
|
||||
kvmppc_core_dequeue_dec(vcpu);
|
||||
|
||||
/* POWER4+ triggers a dec interrupt if the value is < 0 */
|
||||
if (vcpu->arch.dec & 0x80000000) {
|
||||
kvmppc_core_queue_dec(vcpu);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BOOKE
|
||||
|
||||
@@ -132,9 +132,10 @@ EXPORT_SYMBOL(mmu_hash_ops);
|
||||
* is provided by the firmware.
|
||||
*/
|
||||
|
||||
/* Pre-POWER4 CPUs (4k pages only)
|
||||
/*
|
||||
* Fallback (4k pages only)
|
||||
*/
|
||||
static struct mmu_psize_def mmu_psize_defaults_old[] = {
|
||||
static struct mmu_psize_def mmu_psize_defaults[] = {
|
||||
[MMU_PAGE_4K] = {
|
||||
.shift = 12,
|
||||
.sllp = 0,
|
||||
@@ -554,8 +555,8 @@ static void __init htab_scan_page_sizes(void)
|
||||
mmu_psize_set_default_penc();
|
||||
|
||||
/* Default to 4K pages only */
|
||||
memcpy(mmu_psize_defs, mmu_psize_defaults_old,
|
||||
sizeof(mmu_psize_defaults_old));
|
||||
memcpy(mmu_psize_defs, mmu_psize_defaults,
|
||||
sizeof(mmu_psize_defaults));
|
||||
|
||||
/*
|
||||
* Try to find the available page sizes in the device-tree
|
||||
|
||||
@@ -4,7 +4,7 @@ subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
|
||||
obj-$(CONFIG_PERF_EVENTS) += callchain.o perf_regs.o
|
||||
|
||||
obj-$(CONFIG_PPC_PERF_CTRS) += core-book3s.o bhrb.o
|
||||
obj64-$(CONFIG_PPC_PERF_CTRS) += power4-pmu.o ppc970-pmu.o power5-pmu.o \
|
||||
obj64-$(CONFIG_PPC_PERF_CTRS) += ppc970-pmu.o power5-pmu.o \
|
||||
power5+-pmu.o power6-pmu.o power7-pmu.o \
|
||||
isa207-common.o power8-pmu.o power9-pmu.o
|
||||
obj32-$(CONFIG_PPC_PERF_CTRS) += mpc7450-pmu.o
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -61,7 +61,7 @@ choice
|
||||
help
|
||||
There are two families of 64 bit PowerPC chips supported.
|
||||
The most common ones are the desktop and server CPUs
|
||||
(POWER4, POWER5, 970, POWER5+, POWER6, POWER7, POWER8 ...)
|
||||
(POWER5, 970, POWER5+, POWER6, POWER7, POWER8, POWER9 ...)
|
||||
|
||||
The other are the "embedded" processors compliant with the
|
||||
"Book 3E" variant of the architecture
|
||||
@@ -103,10 +103,6 @@ config CELL_CPU
|
||||
bool "Cell Broadband Engine"
|
||||
depends on PPC_BOOK3S_64 && !CPU_LITTLE_ENDIAN
|
||||
|
||||
config POWER4_CPU
|
||||
bool "POWER4"
|
||||
depends on PPC_BOOK3S_64 && !CPU_LITTLE_ENDIAN
|
||||
|
||||
config POWER5_CPU
|
||||
bool "POWER5"
|
||||
depends on PPC_BOOK3S_64 && !CPU_LITTLE_ENDIAN
|
||||
|
||||
Reference in New Issue
Block a user