f43f87d
From c03847b4a603846903ee72a5e1baab03e0591423 Mon Sep 17 00:00:00 2001
f43f87d
From: Ashok Kumar Sekar <asekar@redhat.com>
f43f87d
Date: Fri, 23 Sep 2016 04:16:19 -0700
f43f87d
Subject: [PATCH 1/8] PCI: Vulcan: AHCI PCI bar fix for Broadcom Vulcan early
f43f87d
 silicon
f43f87d
f43f87d
PCI BAR 5 is not setup correctly for the on-board AHCI
f43f87d
controller on Broadcom's Vulcan processor. Added a quirk to fix BAR 5
f43f87d
by using BAR 4's resources which are populated correctly but NOT used
f43f87d
by the AHCI controller actually.
f43f87d
f43f87d
Signed-off-by: Ashok Kumar Sekar <asekar@redhat.com>
f43f87d
Signed-off-by: Jayachandran C <jchandra@broadcom.com>
f43f87d
Signed-off-by: Robert Richter <rrichter@cavium.com>
f43f87d
---
f43f87d
 drivers/pci/quirks.c | 24 ++++++++++++++++++++++++
f43f87d
 1 file changed, 24 insertions(+)
f43f87d
f43f87d
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
f43f87d
index dc624fb34e72..94b7bdf63b19 100644
f43f87d
--- a/drivers/pci/quirks.c
f43f87d
+++ b/drivers/pci/quirks.c
f43f87d
@@ -3994,6 +3994,30 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM, 0x9084,
f43f87d
 				quirk_bridge_cavm_thrx2_pcie_root);
f43f87d
 
f43f87d
 /*
f43f87d
+ * PCI BAR 5 is not setup correctly for the on-board AHCI controller
f43f87d
+ * on Broadcom's Vulcan processor. Added a quirk to fix BAR 5 by
f43f87d
+ * using BAR 4's resources which are populated correctly and NOT
f43f87d
+ * actually used by the AHCI controller.
f43f87d
+ */
f43f87d
+static void quirk_fix_vulcan_ahci_bars(struct pci_dev *dev)
f43f87d
+{
f43f87d
+	struct resource *r =  &dev->resource[4];
f43f87d
+
f43f87d
+	if (!(r->flags & IORESOURCE_MEM) || (r->start == 0))
f43f87d
+		return;
f43f87d
+
f43f87d
+	/* Set BAR5 resource to BAR4 */
f43f87d
+	dev->resource[5] = *r;
f43f87d
+
f43f87d
+	/* Update BAR5 in pci config space */
f43f87d
+	pci_write_config_dword(dev, PCI_BASE_ADDRESS_5, r->start);
f43f87d
+
f43f87d
+	/* Clear BAR4's resource */
f43f87d
+	memset(r, 0, sizeof(*r));
f43f87d
+}
f43f87d
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM, 0x9027, quirk_fix_vulcan_ahci_bars);
f43f87d
+
f43f87d
+/*
f43f87d
  * Intersil/Techwell TW686[4589]-based video capture cards have an empty (zero)
f43f87d
  * class code.  Fix it.
f43f87d
  */
f43f87d
-- 
f43f87d
2.11.0
f43f87d
f43f87d
From c84892e4b6b671fda7e499a0bb0787bd026de015 Mon Sep 17 00:00:00 2001
f43f87d
From: Jayachandran C <jnair@caviumnetworks.com>
f43f87d
Date: Fri, 10 Mar 2017 10:04:52 +0000
f43f87d
Subject: [PATCH 2/8] ahci: thunderx2: Fix for errata that affects stop engine
f43f87d
f43f87d
Apply workaround for this errata:
f43f87d
  Synopsis: Resetting PxCMD.ST may hang the SATA device
f43f87d
f43f87d
  Description: An internal ping-pong buffer state is not reset
f43f87d
  correctly for an PxCMD.ST=0 command for a SATA channel. This
f43f87d
  may cause the SATA interface to hang when a PxCMD.ST=0 command
f43f87d
  is received.
f43f87d
f43f87d
  Workaround: A SATA_BIU_CORE_ENABLE.sw_init_bsi must be asserted
f43f87d
  by the driver whenever the PxCMD.ST needs to be de-asserted. This
f43f87d
  will reset both the ports. So, it may not always work in a 2
f43f87d
  channel SATA system.
f43f87d
f43f87d
  Resolution: Fix in B0.
f43f87d
f43f87d
Add the code to ahci_stop_engine() to do this. It is not easy to
f43f87d
stop the other "port" since it is associated with a different AHCI
f43f87d
interface. Please note that with this fix, SATA reset does not
f43f87d
hang any more, but it can cause failures on the other interface
f43f87d
if that is in active use.
f43f87d
f43f87d
Unfortunately, we have nothing other the the CPU ID to check if the
f43f87d
SATA block has this issue.
f43f87d
f43f87d
Signed-off-by: Jayachandran C <jnair@caviumnetworks.com>
f43f87d
[added check to restict to pci devs on the soc only]
f43f87d
Signed-off-by: Robert Richter <rrichter@cavium.com>
f43f87d
---
f43f87d
 drivers/ata/libahci.c | 17 +++++++++++++++++
f43f87d
 1 file changed, 17 insertions(+)
f43f87d
f43f87d
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
f43f87d
index 3e286d86ab42..9116bba1b07d 100644
f43f87d
--- a/drivers/ata/libahci.c
f43f87d
+++ b/drivers/ata/libahci.c
f43f87d
@@ -669,6 +669,23 @@ int ahci_stop_engine(struct ata_port *ap)
f43f87d
 	tmp &= ~PORT_CMD_START;
f43f87d
 	writel(tmp, port_mmio + PORT_CMD);
f43f87d
 
f43f87d
+#ifdef CONFIG_ARM64
f43f87d
+	/* Rev Ax of Cavium CN99XX needs a hack for port stop */
f43f87d
+	if (dev_is_pci(ap->host->dev) &&
f43f87d
+	    to_pci_dev(ap->host->dev)->vendor == 0x14e4 &&
f43f87d
+	    to_pci_dev(ap->host->dev)->device == 0x9027 &&
f43f87d
+	    MIDR_IS_CPU_MODEL_RANGE(read_cpuid_id(),
f43f87d
+			MIDR_CPU_MODEL(ARM_CPU_IMP_BRCM, BRCM_CPU_PART_VULCAN),
f43f87d
+			MIDR_CPU_VAR_REV(0, 0),
f43f87d
+			MIDR_CPU_VAR_REV(0, MIDR_REVISION_MASK))) {
f43f87d
+		tmp = readl(hpriv->mmio + 0x8000);
f43f87d
+		writel(tmp | (1 << 26), hpriv->mmio + 0x8000);
f43f87d
+		udelay(1);
f43f87d
+		writel(tmp & ~(1 << 26), hpriv->mmio + 0x8000);
f43f87d
+		dev_warn(ap->host->dev, "CN99XX stop engine fix applied!\n");
f43f87d
+	}
f43f87d
+#endif
f43f87d
+
f43f87d
 	/* wait for engine to stop. This could be as long as 500 msec */
f43f87d
 	tmp = ata_wait_register(ap, port_mmio + PORT_CMD,
f43f87d
 				PORT_CMD_LIST_ON, PORT_CMD_LIST_ON, 1, 500);
f43f87d
-- 
f43f87d
2.11.0
f43f87d
f43f87d
From 98a39621952f6a13c5198e79f1c080ea6fc1d092 Mon Sep 17 00:00:00 2001
f43f87d
From: Jayachandran C <jnair@caviumnetworks.com>
f43f87d
Date: Sun, 22 Feb 1998 18:42:42 -0800
f43f87d
Subject: [PATCH 3/8] ahci: thunderx2: stop engine fix update
f43f87d
f43f87d
The current reset fix fails during continuous reboot test. The failure
f43f87d
happens when both the on-board SATA slots are used and when one of the
f43f87d
controllers are reset.
f43f87d
f43f87d
The latest ThunderX2 firmware (3.1) enables hardware error interrupts and
f43f87d
when the reset fix fails, we get a hang with the print:
f43f87d
[   14.839308] sd 1:0:0:0: [sdb] 468862128 512-byte logical blocks: (240 GB/224 GiB)
f43f87d
[   14.846796] sd 1:0:0:0: [sdb] 4096-byte physical blocks
f43f87d
[   14.852036] sd 1:0:0:0: [sdb] Write Protect is off
f43f87d
[   14.856843] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
f43f87d
[   14.866022] ata2.00: Enabling discard_zeroes_data
f43f87d
f43f87d
        *** NBU BAR Error 0x1e25c ***
f43f87d
         AddrLo 0x1d80180 AddrHi 0x0
f43f87d
f43f87d
To fix this issue, update the SATA reset fix to increase the delays between register writes.
f43f87d
f43f87d
Signed-off-by: Jayachandran C <jnair@caviumnetworks.com>
f43f87d
Signed-off-by: Robert Richter <rrichter@cavium.com>
f43f87d
---
f43f87d
 drivers/ata/libahci.c | 5 +++--
f43f87d
 1 file changed, 3 insertions(+), 2 deletions(-)
f43f87d
f43f87d
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
f43f87d
index 9116bba1b07d..1d3e614bad2b 100644
f43f87d
--- a/drivers/ata/libahci.c
f43f87d
+++ b/drivers/ata/libahci.c
f43f87d
@@ -679,10 +679,11 @@ int ahci_stop_engine(struct ata_port *ap)
f43f87d
 			MIDR_CPU_VAR_REV(0, 0),
f43f87d
 			MIDR_CPU_VAR_REV(0, MIDR_REVISION_MASK))) {
f43f87d
 		tmp = readl(hpriv->mmio + 0x8000);
f43f87d
+		udelay(100);
f43f87d
 		writel(tmp | (1 << 26), hpriv->mmio + 0x8000);
f43f87d
-		udelay(1);
f43f87d
+		udelay(100);
f43f87d
 		writel(tmp & ~(1 << 26), hpriv->mmio + 0x8000);
f43f87d
-		dev_warn(ap->host->dev, "CN99XX stop engine fix applied!\n");
f43f87d
+		dev_warn(ap->host->dev, "CN99XX SATA reset workaround applied\n");
f43f87d
 	}
f43f87d
 #endif
f43f87d
 
f43f87d
-- 
f43f87d
2.11.0
f43f87d
f43f87d
From 33c107d2a2b570cd5246262108ad07cc102e9fcd Mon Sep 17 00:00:00 2001
f43f87d
From: Robert Richter <rrichter@cavium.com>
f43f87d
Date: Thu, 16 Mar 2017 18:01:59 +0100
f43f87d
Subject: [PATCH 4/8] iommu/arm-smmu, ACPI: Enable Cavium SMMU-v2
f43f87d
f43f87d
In next IORT spec release there will be a definition of a Cavium
f43f87d
specific model. Until then, enable the Cavium SMMU using cpu id
f43f87d
registers. All versions of Cavium's SMMUv2 implementation must be
f43f87d
enabled.
f43f87d
f43f87d
Signed-off-by: Robert Richter <rrichter@cavium.com>
f43f87d
---
f43f87d
 drivers/iommu/arm-smmu.c | 22 +++++++++++++++++++++-
f43f87d
 1 file changed, 21 insertions(+), 1 deletion(-)
f43f87d
f43f87d
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
f43f87d
index d42cad5a3d52..37aee96ccc0e 100644
f43f87d
--- a/drivers/iommu/arm-smmu.c
f43f87d
+++ b/drivers/iommu/arm-smmu.c
f43f87d
@@ -53,6 +53,8 @@
f43f87d
 
f43f87d
 #include <linux/amba/bus.h>
f43f87d
 
f43f87d
+#include <asm/cputype.h>
f43f87d
+
f43f87d
 #include "io-pgtable.h"
f43f87d
 #include "arm-smmu-regs.h"
f43f87d
 
f43f87d
@@ -1871,6 +1873,24 @@ static const struct of_device_id arm_smmu_of_match[] = {
f43f87d
 MODULE_DEVICE_TABLE(of, arm_smmu_of_match);
f43f87d
 
f43f87d
 #ifdef CONFIG_ACPI
f43f87d
+
f43f87d
+static int acpi_smmu_enable_cavium(struct arm_smmu_device *smmu, int ret)
f43f87d
+{
f43f87d
+	u32 cpu_model;
f43f87d
+
f43f87d
+	if (!IS_ENABLED(CONFIG_ARM64))
f43f87d
+		return ret;
f43f87d
+
f43f87d
+	cpu_model = read_cpuid_id() & MIDR_CPU_MODEL_MASK;
f43f87d
+	if (cpu_model != MIDR_THUNDERX)
f43f87d
+		return ret;
f43f87d
+
f43f87d
+	smmu->version = ARM_SMMU_V2;
f43f87d
+	smmu->model = CAVIUM_SMMUV2;
f43f87d
+
f43f87d
+	return 0;
f43f87d
+}
f43f87d
+
f43f87d
 static int acpi_smmu_get_data(u32 model, struct arm_smmu_device *smmu)
f43f87d
 {
f43f87d
 	int ret = 0;
f43f87d
@@ -1901,7 +1921,7 @@ static int acpi_smmu_get_data(u32 model, struct arm_smmu_device *smmu)
f43f87d
 		ret = -ENODEV;
f43f87d
 	}
f43f87d
 
f43f87d
-	return ret;
f43f87d
+	return acpi_smmu_enable_cavium(smmu, ret);
f43f87d
 }
f43f87d
 
f43f87d
 static int arm_smmu_device_acpi_probe(struct platform_device *pdev,
f43f87d
-- 
f43f87d
2.11.0
f43f87d
f43f87d
From 5523edb06c95d7ac9e81d94366e71d929c08ebd4 Mon Sep 17 00:00:00 2001
f43f87d
From: Robert Richter <rrichter@cavium.com>
f43f87d
Date: Wed, 12 Apr 2017 15:06:03 +0200
f43f87d
Subject: [PATCH 5/8] iommu: Print a message with the default domain type
f43f87d
 created
f43f87d
f43f87d
There are several ways the bypass mode can be enabled. With commit
f43f87d
f43f87d
 fccb4e3b8ab0 iommu: Allow default domain type to be set on the kernel command line
f43f87d
f43f87d
there is the option to switch into bypass mode. And, depending on
f43f87d
devicetree options, bypass mode can be also enabled. This makes it
f43f87d
hard to determine if direct mapping is enabled. Print message with the
f43f87d
default domain type case.
f43f87d
f43f87d
Signed-off-by: Robert Richter <rrichter@cavium.com>
f43f87d
---
f43f87d
 drivers/iommu/iommu.c | 4 +++-
f43f87d
 1 file changed, 3 insertions(+), 1 deletion(-)
f43f87d
f43f87d
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
f43f87d
index 3f6ea160afed..7aaafaca6baf 100644
f43f87d
--- a/drivers/iommu/iommu.c
f43f87d
+++ b/drivers/iommu/iommu.c
f43f87d
@@ -599,7 +599,9 @@ int iommu_group_add_device(struct iommu_group *group, struct device *dev)
f43f87d
 
f43f87d
 	trace_add_device_to_group(group->id, dev);
f43f87d
 
f43f87d
-	pr_info("Adding device %s to group %d\n", dev_name(dev), group->id);
f43f87d
+	pr_info("Adding device %s to group %d, default domain type %d\n",
f43f87d
+		dev_name(dev), group->id,
f43f87d
+		group->default_domain ? group->default_domain->type : -1);
f43f87d
 
f43f87d
 	return 0;
f43f87d
 
f43f87d
-- 
f43f87d
2.11.0
f43f87d
f43f87d
From 71e0ad5ab606077c24a96d69f4bfed58d7ef16c7 Mon Sep 17 00:00:00 2001
f43f87d
From: Robert Richter <rrichter@cavium.com>
f43f87d
Date: Thu, 4 May 2017 17:48:48 +0200
f43f87d
Subject: [PATCH 6/8] iommu, aarch64: Set bypass mode per default
f43f87d
f43f87d
We see a performance degradation if smmu is enabled in non-bypass mode.
f43f87d
This is a problem in the kernel's implememntation. Until that is solved,
f43f87d
enable smmu in bypass mode per default.
f43f87d
f43f87d
We have tested that SMMU passthrough mode doesn't effect VFIO on both
f43f87d
CN88xx and CN99xx and haven't found any issues.
f43f87d
f43f87d
Signed-off-by: Robert Richter <rrichter@cavium.com>
f43f87d
---
f43f87d
 drivers/iommu/iommu.c | 5 +++++
f43f87d
 1 file changed, 5 insertions(+)
f43f87d
f43f87d
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
f43f87d
index 7aaafaca6baf..24de0b934221 100644
f43f87d
--- a/drivers/iommu/iommu.c
f43f87d
+++ b/drivers/iommu/iommu.c
f43f87d
@@ -36,7 +36,12 @@
f43f87d
 
f43f87d
 static struct kset *iommu_group_kset;
f43f87d
 static DEFINE_IDA(iommu_group_ida);
f43f87d
+
f43f87d
+#ifdef CONFIG_ARM64
f43f87d
+static unsigned int iommu_def_domain_type = IOMMU_DOMAIN_IDENTITY;
f43f87d
+#else
f43f87d
 static unsigned int iommu_def_domain_type = IOMMU_DOMAIN_DMA;
f43f87d
+#endif
f43f87d
 
f43f87d
 struct iommu_callback_data {
f43f87d
 	const struct iommu_ops *ops;
f43f87d
-- 
f43f87d
2.11.0
f43f87d
f43f87d
From 27f103963f926d6a7a8adaad1ee227fd3b51f591 Mon Sep 17 00:00:00 2001
f43f87d
From: Robert Richter <rrichter@cavium.com>
f43f87d
Date: Wed, 12 Apr 2017 10:31:15 +0200
f43f87d
Subject: [PATCH 7/8] iommu/arm-smmu, ACPI: Enable Cavium SMMU-v3
f43f87d
f43f87d
In next IORT spec release there will be a definition of a Cavium
f43f87d
specific model. Until then, enable the Cavium SMMU using cpu id
f43f87d
registers. Early silicon versions (A1) of Cavium's CN99xx SMMUv3
f43f87d
implementation must be enabled. For later silicon versions (B0) the
f43f87d
iort change will be in place.
f43f87d
f43f87d
Signed-off-by: Robert Richter <rrichter@cavium.com>
f43f87d
---
f43f87d
 drivers/acpi/arm64/iort.c   | 16 ++++++++++++++--
f43f87d
 drivers/iommu/arm-smmu-v3.c | 19 +++++++++++++++++++
f43f87d
 2 files changed, 33 insertions(+), 2 deletions(-)
f43f87d
f43f87d
diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c
f43f87d
index a3215ee671c1..b603af92eec2 100644
f43f87d
--- a/drivers/acpi/arm64/iort.c
f43f87d
+++ b/drivers/acpi/arm64/iort.c
f43f87d
@@ -26,6 +26,8 @@
f43f87d
 #include <linux/platform_device.h>
f43f87d
 #include <linux/slab.h>
f43f87d
 
f43f87d
+#include <asm/cputype.h>
f43f87d
+
f43f87d
 #define IORT_TYPE_MASK(type)	(1 << (type))
f43f87d
 #define IORT_MSI_TYPE		(1 << ACPI_IORT_NODE_ITS_GROUP)
f43f87d
 #define IORT_IOMMU_TYPE		((1 << ACPI_IORT_NODE_SMMU) |	\
f43f87d
@@ -824,13 +826,22 @@ static int __init arm_smmu_v3_count_resources(struct acpi_iort_node *node)
f43f87d
 	return num_res;
f43f87d
 }
f43f87d
 
f43f87d
+static bool is_cavium_cn99xx_smmu_v3(void)
f43f87d
+{
f43f87d
+	u32 cpu_model = read_cpuid_id() & MIDR_CPU_MODEL_MASK;
f43f87d
+
f43f87d
+	return cpu_model == MIDR_CPU_MODEL(ARM_CPU_IMP_BRCM,
f43f87d
+					   BRCM_CPU_PART_VULCAN);
f43f87d
+}
f43f87d
+
f43f87d
 static bool arm_smmu_v3_is_combined_irq(struct acpi_iort_smmu_v3 *smmu)
f43f87d
 {
f43f87d
 	/*
f43f87d
 	 * Cavium ThunderX2 implementation doesn't not support unique
f43f87d
 	 * irq line. Use single irq line for all the SMMUv3 interrupts.
f43f87d
 	 */
f43f87d
-	if (smmu->model != ACPI_IORT_SMMU_V3_CAVIUM_CN99XX)
f43f87d
+	if (smmu->model != ACPI_IORT_SMMU_V3_CAVIUM_CN99XX
f43f87d
+	    && !is_cavium_cn99xx_smmu_v3())
f43f87d
 		return false;
f43f87d
 
f43f87d
 	/*
f43f87d
@@ -848,7 +859,8 @@ static unsigned long arm_smmu_v3_resource_size(struct acpi_iort_smmu_v3 *smmu)
f43f87d
 	 * Override the size, for Cavium ThunderX2 implementation
f43f87d
 	 * which doesn't support the page 1 SMMU register space.
f43f87d
 	 */
f43f87d
-	if (smmu->model == ACPI_IORT_SMMU_V3_CAVIUM_CN99XX)
f43f87d
+	if (smmu->model == ACPI_IORT_SMMU_V3_CAVIUM_CN99XX
f43f87d
+	    || is_cavium_cn99xx_smmu_v3())
f43f87d
 		return SZ_64K;
f43f87d
 
f43f87d
 	return SZ_128K;
f43f87d
diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c
f43f87d
index 568c400eeaed..d147cb5c7309 100644
f43f87d
--- a/drivers/iommu/arm-smmu-v3.c
f43f87d
+++ b/drivers/iommu/arm-smmu-v3.c
f43f87d
@@ -39,6 +39,8 @@
f43f87d
 
f43f87d
 #include <linux/amba/bus.h>
f43f87d
 
f43f87d
+#include <asm/cputype.h>
f43f87d
+
f43f87d
 #include "io-pgtable.h"
f43f87d
 
f43f87d
 /* MMIO registers */
f43f87d
@@ -2659,6 +2661,21 @@ static int arm_smmu_device_hw_probe(struct arm_smmu_device *smmu)
f43f87d
 }
f43f87d
 
f43f87d
 #ifdef CONFIG_ACPI
f43f87d
+
f43f87d
+static void acpi_smmu_enable_cavium(struct arm_smmu_device *smmu)
f43f87d
+{
f43f87d
+	u32 cpu_model;
f43f87d
+
f43f87d
+	if (!IS_ENABLED(CONFIG_ARM64))
f43f87d
+		return;
f43f87d
+
f43f87d
+	cpu_model = read_cpuid_id() & MIDR_CPU_MODEL_MASK;
f43f87d
+	if (cpu_model != MIDR_CPU_MODEL(ARM_CPU_IMP_BRCM, BRCM_CPU_PART_VULCAN))
f43f87d
+		return;
f43f87d
+
f43f87d
+	smmu->options |= ARM_SMMU_OPT_PAGE0_REGS_ONLY;
f43f87d
+}
f43f87d
+
f43f87d
 static void acpi_smmu_get_options(u32 model, struct arm_smmu_device *smmu)
f43f87d
 {
f43f87d
 	switch (model) {
f43f87d
@@ -2670,6 +2687,8 @@ static void acpi_smmu_get_options(u32 model, struct arm_smmu_device *smmu)
f43f87d
 		break;
f43f87d
 	}
f43f87d
 
f43f87d
+	acpi_smmu_enable_cavium(smmu);
f43f87d
+
f43f87d
 	dev_notice(smmu->dev, "option mask 0x%x\n", smmu->options);
f43f87d
 }
f43f87d
 
f43f87d
-- 
f43f87d
2.11.0
f43f87d
f43f87d
From ff677cc625b52b93351dd73d7881251067f0e976 Mon Sep 17 00:00:00 2001
f43f87d
From: Radha Mohan Chintakuntla <rchintakuntla@cavium.com>
f43f87d
Date: Wed, 20 Aug 2014 15:10:58 -0700
f43f87d
Subject: [PATCH 8/8] arm64: gicv3: its: Increase FORCE_MAX_ZONEORDER for
f43f87d
 Cavium ThunderX
f43f87d
f43f87d
In case of ARCH_THUNDER, there is a need to allocate the GICv3 ITS table
f43f87d
which is bigger than the allowed max order. So we are forcing it only in
f43f87d
case of 4KB page size.
f43f87d
f43f87d
Signed-off-by: Radha Mohan Chintakuntla <rchintakuntla@cavium.com>
f43f87d
[rric: use ARM64_4K_PAGES since we have now ARM64_16K_PAGES, change order]
f43f87d
Signed-off-by: Robert Richter <rrichter@cavium.com>
f43f87d
---
f43f87d
 arch/arm64/Kconfig | 1 +
f43f87d
 1 file changed, 1 insertion(+)
f43f87d
f43f87d
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
f43f87d
index 2c3e2d693d76..023867378f45 100644
f43f87d
--- a/arch/arm64/Kconfig
f43f87d
+++ b/arch/arm64/Kconfig
f43f87d
@@ -784,6 +784,7 @@ config FORCE_MAX_ZONEORDER
f43f87d
 	default "14" if (ARM64_64K_PAGES && TRANSPARENT_HUGEPAGE)
f43f87d
 	default "13" if (ARCH_THUNDER && !ARM64_64K_PAGES)
f43f87d
 	default "12" if (ARM64_16K_PAGES && TRANSPARENT_HUGEPAGE)
f43f87d
+	default "13" if (ARM64_4K_PAGES && ARCH_THUNDER)
f43f87d
 	default "11"
f43f87d
 	help
f43f87d
 	  The kernel memory allocator divides physically contiguous memory
f43f87d
-- 
f43f87d
2.11.0
f43f87d