mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 14:42:24 +00:00
arm64 fixes:
- 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) -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE5RElWfyWxS+3PLO2a9axLQDIXvEFAlnXpvoACgkQa9axLQDI XvFQmhAArl+ckCtEkroPlX1HVcf5CkOItv0bwzWDXcLMI3nW2mUKJ9tmd+U5uEvA 43FYfqdgbetEMvpaBBwH8oT8VrJ8o+ZaawWcZAwholXCd+aT3Uuku1eqL4dtGdPT HsgsmDb2ywkGA2kOHUNqbTZpOg3rq4Yyolr3UV4xv5xBlcqdWlIMFDAkDGggEGq4 5H/hQWcKON1d96mBfNh0wReQNggUXtWAxnb3RkLwevQcXPVq+KOG8tNsVIC/MbrS VrD+2x95IkNs+QycTuSAWY17Bl2VvxyeJeb+gmgw7J5coY+M/5tEcVTVhdwoNXYN KkOP9kO+n6K9tNBgpo5QU4htVcebcv+/mqh50t9nLWpLMV0Que+gigmyiCdYgJpg mnvy5g3rGiaGr0QTQSWDJdoD1fAEecdRyu4hxnSJJv2Ol0CVsPkOtIOgNTrnNVCc nB9zuhIIsDyhWVgmDPbVihWViTbs3W0EcOymiCC/5c/Dj36emtNfNSqqpJ+ZAPWx GQMH67UnYRD1Jy2dxS4AXpaXfuN4zQdm8zOmIEw3uQespF6TWm7Sn94X0KfnOZU7 5PFKnlufLgbisGCVPbwTiNtfIzstQ1uZu3yLoqxJTDQRqTlPZ14FePS6bb9HqKCB yCdSDUwwDzxnB4O5WkiDtshHGK8hFKjEpLHWmptpG5b56zpM3Bo= =Iu63 -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
275490680c
@ -95,16 +95,19 @@
|
|||||||
#define KERNEL_END _end
|
#define KERNEL_END _end
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The size of the KASAN shadow region. This should be 1/8th of the
|
* KASAN requires 1/8th of the kernel virtual address space for the shadow
|
||||||
* size of the entire kernel virtual address space.
|
* region. KASAN can bloat the stack significantly, so double the (minimum)
|
||||||
|
* stack size when KASAN is in use.
|
||||||
*/
|
*/
|
||||||
#ifdef CONFIG_KASAN
|
#ifdef CONFIG_KASAN
|
||||||
#define KASAN_SHADOW_SIZE (UL(1) << (VA_BITS - 3))
|
#define KASAN_SHADOW_SIZE (UL(1) << (VA_BITS - 3))
|
||||||
|
#define KASAN_THREAD_SHIFT 1
|
||||||
#else
|
#else
|
||||||
#define KASAN_SHADOW_SIZE (0)
|
#define KASAN_SHADOW_SIZE (0)
|
||||||
|
#define KASAN_THREAD_SHIFT 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define MIN_THREAD_SHIFT 14
|
#define MIN_THREAD_SHIFT (14 + KASAN_THREAD_SHIFT)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* VMAP'd stacks are allocated at page granularity, so we must ensure that such
|
* VMAP'd stacks are allocated at page granularity, so we must ensure that such
|
||||||
|
@ -649,4 +649,4 @@ static int __init armv8_deprecated_init(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
late_initcall(armv8_deprecated_init);
|
core_initcall(armv8_deprecated_init);
|
||||||
|
@ -1307,4 +1307,4 @@ static int __init enable_mrs_emulation(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
late_initcall(enable_mrs_emulation);
|
core_initcall(enable_mrs_emulation);
|
||||||
|
@ -444,4 +444,4 @@ static int __init fpsimd_init(void)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
late_initcall(fpsimd_init);
|
core_initcall(fpsimd_init);
|
||||||
|
@ -97,7 +97,7 @@ static void data_abort_decode(unsigned int esr)
|
|||||||
(esr & ESR_ELx_SF) >> ESR_ELx_SF_SHIFT,
|
(esr & ESR_ELx_SF) >> ESR_ELx_SF_SHIFT,
|
||||||
(esr & ESR_ELx_AR) >> ESR_ELx_AR_SHIFT);
|
(esr & ESR_ELx_AR) >> ESR_ELx_AR_SHIFT);
|
||||||
} else {
|
} else {
|
||||||
pr_alert(" ISV = 0, ISS = 0x%08lu\n", esr & ESR_ELx_ISS_MASK);
|
pr_alert(" ISV = 0, ISS = 0x%08lx\n", esr & ESR_ELx_ISS_MASK);
|
||||||
}
|
}
|
||||||
|
|
||||||
pr_alert(" CM = %lu, WnR = %lu\n",
|
pr_alert(" CM = %lu, WnR = %lu\n",
|
||||||
|
@ -1178,12 +1178,44 @@ dev_put:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool __init iort_enable_acs(struct acpi_iort_node *iort_node)
|
||||||
|
{
|
||||||
|
if (iort_node->type == ACPI_IORT_NODE_PCI_ROOT_COMPLEX) {
|
||||||
|
struct acpi_iort_node *parent;
|
||||||
|
struct acpi_iort_id_mapping *map;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
map = ACPI_ADD_PTR(struct acpi_iort_id_mapping, iort_node,
|
||||||
|
iort_node->mapping_offset);
|
||||||
|
|
||||||
|
for (i = 0; i < iort_node->mapping_count; i++, map++) {
|
||||||
|
if (!map->output_reference)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
parent = ACPI_ADD_PTR(struct acpi_iort_node,
|
||||||
|
iort_table, map->output_reference);
|
||||||
|
/*
|
||||||
|
* If we detect a RC->SMMU mapping, make sure
|
||||||
|
* we enable ACS on the system.
|
||||||
|
*/
|
||||||
|
if ((parent->type == ACPI_IORT_NODE_SMMU) ||
|
||||||
|
(parent->type == ACPI_IORT_NODE_SMMU_V3)) {
|
||||||
|
pci_request_acs();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
static void __init iort_init_platform_devices(void)
|
static void __init iort_init_platform_devices(void)
|
||||||
{
|
{
|
||||||
struct acpi_iort_node *iort_node, *iort_end;
|
struct acpi_iort_node *iort_node, *iort_end;
|
||||||
struct acpi_table_iort *iort;
|
struct acpi_table_iort *iort;
|
||||||
struct fwnode_handle *fwnode;
|
struct fwnode_handle *fwnode;
|
||||||
int i, ret;
|
int i, ret;
|
||||||
|
bool acs_enabled = false;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* iort_table and iort both point to the start of IORT table, but
|
* 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)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!acs_enabled)
|
||||||
|
acs_enabled = iort_enable_acs(iort_node);
|
||||||
|
|
||||||
if ((iort_node->type == ACPI_IORT_NODE_SMMU) ||
|
if ((iort_node->type == ACPI_IORT_NODE_SMMU) ||
|
||||||
(iort_node->type == ACPI_IORT_NODE_SMMU_V3)) {
|
(iort_node->type == ACPI_IORT_NODE_SMMU_V3)) {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user