aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-10-06 14:31:46 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-10-06 14:31:46 -0400
commit275490680c3dede8550f5ee3e59e2a618d2adb19 (patch)
treeab2bab676d67f2eac75eeda2d978a3f48bae7278 /drivers
parent8d473320eebf938e9c2e3ce569e524554006362c (diff)
parentae2e972dae3cea795e9f8f94eb1601213c2d49f0 (diff)
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Pull arm64 fixes from Catalin Marinas: - Bring initialisation of user space undefined instruction handling early (core_initcall) since late_initcall() happens after modprobe in initramfs is invoked. Similar fix for fpsimd initialisation - Increase the kernel stack when KASAN is enabled - Bring the PCI ACS enabling earlier via the iort_init_platform_devices() - Fix misleading data abort address printing (decimal vs hex) * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: Ensure fpsimd support is ready before userspace is active arm64: Ensure the instruction emulation is ready for userspace arm64: Use larger stacks when KASAN is selected ACPI/IORT: Fix PCI ACS enablement arm64: fix misleading data abort decoding
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/arm64/iort.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c
index 9565d572f8dd..de56394dd161 100644
--- a/drivers/acpi/arm64/iort.c
+++ b/drivers/acpi/arm64/iort.c
@@ -1178,12 +1178,44 @@ dev_put:
1178 return ret; 1178 return ret;
1179} 1179}
1180 1180
1181static bool __init iort_enable_acs(struct acpi_iort_node *iort_node)
1182{
1183 if (iort_node->type == ACPI_IORT_NODE_PCI_ROOT_COMPLEX) {
1184 struct acpi_iort_node *parent;
1185 struct acpi_iort_id_mapping *map;
1186 int i;
1187
1188 map = ACPI_ADD_PTR(struct acpi_iort_id_mapping, iort_node,
1189 iort_node->mapping_offset);
1190
1191 for (i = 0; i < iort_node->mapping_count; i++, map++) {
1192 if (!map->output_reference)
1193 continue;
1194
1195 parent = ACPI_ADD_PTR(struct acpi_iort_node,
1196 iort_table, map->output_reference);
1197 /*
1198 * If we detect a RC->SMMU mapping, make sure
1199 * we enable ACS on the system.
1200 */
1201 if ((parent->type == ACPI_IORT_NODE_SMMU) ||
1202 (parent->type == ACPI_IORT_NODE_SMMU_V3)) {
1203 pci_request_acs();
1204 return true;
1205 }
1206 }
1207 }
1208
1209 return false;
1210}
1211
1181static void __init iort_init_platform_devices(void) 1212static void __init iort_init_platform_devices(void)
1182{ 1213{
1183 struct acpi_iort_node *iort_node, *iort_end; 1214 struct acpi_iort_node *iort_node, *iort_end;
1184 struct acpi_table_iort *iort; 1215 struct acpi_table_iort *iort;
1185 struct fwnode_handle *fwnode; 1216 struct fwnode_handle *fwnode;
1186 int i, ret; 1217 int i, ret;
1218 bool acs_enabled = false;
1187 1219
1188 /* 1220 /*
1189 * iort_table and iort both point to the start of IORT table, but 1221 * iort_table and iort both point to the start of IORT table, but
@@ -1203,6 +1235,9 @@ static void __init iort_init_platform_devices(void)
1203 return; 1235 return;
1204 } 1236 }
1205 1237
1238 if (!acs_enabled)
1239 acs_enabled = iort_enable_acs(iort_node);
1240
1206 if ((iort_node->type == ACPI_IORT_NODE_SMMU) || 1241 if ((iort_node->type == ACPI_IORT_NODE_SMMU) ||
1207 (iort_node->type == ACPI_IORT_NODE_SMMU_V3)) { 1242 (iort_node->type == ACPI_IORT_NODE_SMMU_V3)) {
1208 1243