[ZESTY] [PATCH 02/33] Revert "powerpc/powernv: Initialise nest mmu"
Breno Leitao
leitao at debian.org
Tue Mar 28 16:54:14 UTC 2017
From: Breno Leitao <breno.leitao at gmail.com>
BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1675806
This reverts commit 4f8a759561214a906844708f65e868aed7b90d5a.
This is being reverted temporarily in order to cherry pick another
patchset. This patch will be added on top of this new patchset.
Signed-off-by: Breno Leitao <breno.leitao at gmail.com>
---
arch/powerpc/include/asm/opal-api.h | 3 +--
arch/powerpc/include/asm/opal.h | 1 -
arch/powerpc/include/asm/powernv.h | 19 -------------------
arch/powerpc/mm/pgtable-radix.c | 2 --
arch/powerpc/mm/pgtable_64.c | 6 +-----
arch/powerpc/platforms/powernv/opal-wrappers.S | 1 -
arch/powerpc/platforms/powernv/opal.c | 11 -----------
7 files changed, 2 insertions(+), 41 deletions(-)
delete mode 100644 arch/powerpc/include/asm/powernv.h
diff --git a/arch/powerpc/include/asm/opal-api.h b/arch/powerpc/include/asm/opal-api.h
index a0aa285869b5..0e2e57bcab50 100644
--- a/arch/powerpc/include/asm/opal-api.h
+++ b/arch/powerpc/include/asm/opal-api.h
@@ -167,8 +167,7 @@
#define OPAL_INT_EOI 124
#define OPAL_INT_SET_MFRR 125
#define OPAL_PCI_TCE_KILL 126
-#define OPAL_NMMU_SET_PTCR 127
-#define OPAL_LAST 127
+#define OPAL_LAST 126
/* Device tree flags */
diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm/opal.h
index 08ddea966601..5c7db0f1a708 100644
--- a/arch/powerpc/include/asm/opal.h
+++ b/arch/powerpc/include/asm/opal.h
@@ -232,7 +232,6 @@ int64_t opal_pci_tce_kill(uint64_t phb_id, uint32_t kill_type,
int64_t opal_rm_pci_tce_kill(uint64_t phb_id, uint32_t kill_type,
uint32_t pe_num, uint32_t tce_size,
uint64_t dma_addr, uint32_t npages);
-int64_t opal_nmmu_set_ptcr(uint64_t chip_id, uint64_t ptcr);
/* Internal functions */
extern int early_init_dt_scan_opal(unsigned long node, const char *uname,
diff --git a/arch/powerpc/include/asm/powernv.h b/arch/powerpc/include/asm/powernv.h
deleted file mode 100644
index 0e9c2402dd20..000000000000
--- a/arch/powerpc/include/asm/powernv.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Copyright 2017 IBM Corp.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- */
-
-#ifndef _ASM_POWERNV_H
-#define _ASM_POWERNV_H
-
-#ifdef CONFIG_PPC_POWERNV
-extern void powernv_set_nmmu_ptcr(unsigned long ptcr);
-#else
-static inline void powernv_set_nmmu_ptcr(unsigned long ptcr) { }
-#endif
-
-#endif /* _ASM_POWERNV_H */
diff --git a/arch/powerpc/mm/pgtable-radix.c b/arch/powerpc/mm/pgtable-radix.c
index feeda90cd06d..cb66c2ba469e 100644
--- a/arch/powerpc/mm/pgtable-radix.c
+++ b/arch/powerpc/mm/pgtable-radix.c
@@ -18,7 +18,6 @@
#include <asm/machdep.h>
#include <asm/mmu.h>
#include <asm/firmware.h>
-#include <asm/powernv.h>
#include <trace/events/thp.h>
@@ -453,7 +452,6 @@ void radix__mmu_cleanup_all(void)
lpcr = mfspr(SPRN_LPCR);
mtspr(SPRN_LPCR, lpcr & ~LPCR_UPRT);
mtspr(SPRN_PTCR, 0);
- powernv_set_nmmu_ptcr(0);
radix__flush_tlb_all();
}
}
diff --git a/arch/powerpc/mm/pgtable_64.c b/arch/powerpc/mm/pgtable_64.c
index 4ee9c9d18760..8bca7f58afc4 100644
--- a/arch/powerpc/mm/pgtable_64.c
+++ b/arch/powerpc/mm/pgtable_64.c
@@ -52,7 +52,6 @@
#include <asm/sections.h>
#include <asm/firmware.h>
#include <asm/dma.h>
-#include <asm/powernv.h>
#include "mmu_decl.h"
@@ -437,7 +436,6 @@ void pgtable_free_tlb(struct mmu_gather *tlb, void *table, int shift)
void __init mmu_partition_table_init(void)
{
unsigned long patb_size = 1UL << PATB_SIZE_SHIFT;
- unsigned long ptcr;
BUILD_BUG_ON_MSG((PATB_SIZE_SHIFT > 36), "Partition table size too large.");
partition_tb = __va(memblock_alloc_base(patb_size, patb_size,
@@ -450,9 +448,7 @@ void __init mmu_partition_table_init(void)
* update partition table control register,
* 64 K size.
*/
- ptcr = __pa(partition_tb) | (PATB_SIZE_SHIFT - 12);
- mtspr(SPRN_PTCR, ptcr);
- powernv_set_nmmu_ptcr(ptcr);
+ mtspr(SPRN_PTCR, __pa(partition_tb) | (PATB_SIZE_SHIFT - 12));
}
void mmu_partition_table_set_entry(unsigned int lpid, unsigned long dw0,
diff --git a/arch/powerpc/platforms/powernv/opal-wrappers.S b/arch/powerpc/platforms/powernv/opal-wrappers.S
index f7c19c9c57ed..3aa40f1b20f5 100644
--- a/arch/powerpc/platforms/powernv/opal-wrappers.S
+++ b/arch/powerpc/platforms/powernv/opal-wrappers.S
@@ -311,5 +311,4 @@ OPAL_CALL_REAL(opal_rm_int_eoi, OPAL_INT_EOI);
OPAL_CALL(opal_int_set_mfrr, OPAL_INT_SET_MFRR);
OPAL_CALL_REAL(opal_rm_int_set_mfrr, OPAL_INT_SET_MFRR);
OPAL_CALL(opal_pci_tce_kill, OPAL_PCI_TCE_KILL);
-OPAL_CALL(opal_nmmu_set_ptcr, OPAL_NMMU_SET_PTCR);
OPAL_CALL_REAL(opal_rm_pci_tce_kill, OPAL_PCI_TCE_KILL);
diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c
index e0f856bfbfe8..872df7580a05 100644
--- a/arch/powerpc/platforms/powernv/opal.c
+++ b/arch/powerpc/platforms/powernv/opal.c
@@ -866,17 +866,6 @@ int opal_error_code(int rc)
}
}
-void powernv_set_nmmu_ptcr(unsigned long ptcr)
-{
- int rc;
-
- if (firmware_has_feature(FW_FEATURE_OPAL)) {
- rc = opal_nmmu_set_ptcr(-1UL, ptcr);
- if (rc != OPAL_SUCCESS && rc != OPAL_UNSUPPORTED)
- pr_warn("%s: Unable to set nest mmu ptcr\n", __func__);
- }
-}
-
EXPORT_SYMBOL_GPL(opal_poll_events);
EXPORT_SYMBOL_GPL(opal_rtc_read);
EXPORT_SYMBOL_GPL(opal_rtc_write);
--
2.11.0
More information about the kernel-team
mailing list