arm64: update Work around Ampere Altra erratum #82288 PCIE_65
This patch from ampere, update 'commit 6a5c2354b0
("arm64: Work
around Ampere Altra erratum #82288 PCIE_65")'.
Pls note the update about arch/arm64/include/asm/pci.h.
Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
This commit is contained in:
parent
e58c4b9c16
commit
61799f13af
|
@ -54,7 +54,6 @@ stable kernels.
|
|||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
| Ampere | Altra | #82288 | ALTRA_ERRATUM_82288 |
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
| Ampere | AmpereOne | AC03_CPU_38 | AMPERE_ERRATUM_AC03_CPU_38 |
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
|
|
|
@ -18,9 +18,10 @@
|
|||
|
||||
#ifdef CONFIG_ALTRA_ERRATUM_82288
|
||||
extern bool __read_mostly have_altra_erratum_82288;
|
||||
#endif
|
||||
|
||||
#define arch_can_pci_mmap_wc() (!have_altra_erratum_82288)
|
||||
#else
|
||||
#define arch_can_pci_mmap_wc() 1
|
||||
#endif
|
||||
|
||||
/* Generic PCI */
|
||||
#include <asm-generic/pci.h>
|
||||
|
|
|
@ -587,14 +587,14 @@ static inline pte_t pte_mkspecial(pte_t pte)
|
|||
pgprot_t prot = __pgprot(pte_val(pte) & ~PTE_ADDR_MASK);
|
||||
|
||||
if (unlikely(have_altra_erratum_82288) &&
|
||||
(phys < 0x80000000 ||
|
||||
(phys >= 0x200000000000 && phys < 0x400000000000) ||
|
||||
(phys >= 0x600000000000 && phys < 0x800000000000))) {
|
||||
(phys < 0x80000000 ||
|
||||
(phys >= 0x200000000000 && phys < 0x400000000000) ||
|
||||
(phys >= 0x600000000000 && phys < 0x800000000000))) {
|
||||
pte = __pte(__phys_to_pte_val(phys) | pgprot_val(pgprot_device(prot)));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return set_pte_bit(pte, __pgprot(PTE_SPECIAL));
|
||||
return set_pte_bit(pte, __pgprot(PTE_SPECIAL));
|
||||
}
|
||||
|
||||
#define __HAVE_PHYS_MEM_ACCESS_PROT
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#include <linux/io.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/ioremap.h>
|
||||
#include <linux/pgtable.h>
|
||||
|
||||
#ifdef CONFIG_ALTRA_ERRATUM_82288
|
||||
bool have_altra_erratum_82288 __read_mostly;
|
||||
|
@ -20,7 +19,6 @@ EXPORT_SYMBOL(have_altra_erratum_82288);
|
|||
static bool is_altra_pci(phys_addr_t phys_addr, size_t size)
|
||||
{
|
||||
phys_addr_t end = phys_addr + size;
|
||||
|
||||
return (phys_addr < 0x80000000 ||
|
||||
(end > 0x200000000000 && phys_addr < 0x400000000000) ||
|
||||
(end > 0x600000000000 && phys_addr < 0x800000000000));
|
||||
|
@ -54,7 +52,6 @@ void __iomem *generic_ioremap_prot(phys_addr_t phys_addr, size_t size,
|
|||
return NULL;
|
||||
vaddr = (unsigned long)area->addr;
|
||||
area->phys_addr = phys_addr;
|
||||
|
||||
#ifdef CONFIG_ALTRA_ERRATUM_82288
|
||||
if (unlikely(have_altra_erratum_82288 && is_altra_pci(phys_addr, size)))
|
||||
prot = pgprot_device(prot);
|
||||
|
|
Loading…
Reference in New Issue