diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-05-05 15:11:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-05-05 15:11:37 -0400 |
commit | ab182e67ec99ea0c8d7435a32a4a1ed9bb02559a (patch) | |
tree | fa71bef0067a61952561552c6652d922060f5530 /drivers/firmware/efi/libstub/fdt.c | |
parent | 7246f60068840847bdcf595be5f0b5ca632736e0 (diff) | |
parent | 92f66f84d9695d07adf9bc987bbcce4bf9b8e87c (diff) |
Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Pull arm64 updates from Catalin Marinas:
- kdump support, including two necessary memblock additions:
memblock_clear_nomap() and memblock_cap_memory_range()
- ARMv8.3 HWCAP bits for JavaScript conversion instructions, complex
numbers and weaker release consistency
- arm64 ACPI platform MSI support
- arm perf updates: ACPI PMU support, L3 cache PMU in some Qualcomm
SoCs, Cortex-A53 L2 cache events and DTLB refills, MAINTAINERS update
for DT perf bindings
- architected timer errata framework (the arch/arm64 changes only)
- support for DMA_ATTR_FORCE_CONTIGUOUS in the arm64 iommu DMA API
- arm64 KVM refactoring to use common system register definitions
- remove support for ASID-tagged VIVT I-cache (no ARMv8 implementation
using it and deprecated in the architecture) together with some
I-cache handling clean-up
- PE/COFF EFI header clean-up/hardening
- define BUG() instruction without CONFIG_BUG
* tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (92 commits)
arm64: Fix the DMA mmap and get_sgtable API with DMA_ATTR_FORCE_CONTIGUOUS
arm64: Print DT machine model in setup_machine_fdt()
arm64: pmu: Wire-up Cortex A53 L2 cache events and DTLB refills
arm64: module: split core and init PLT sections
arm64: pmuv3: handle pmuv3+
arm64: Add CNTFRQ_EL0 trap handler
arm64: Silence spurious kbuild warning on menuconfig
arm64: pmuv3: use arm_pmu ACPI framework
arm64: pmuv3: handle !PMUv3 when probing
drivers/perf: arm_pmu: add ACPI framework
arm64: add function to get a cpu's MADT GICC table
drivers/perf: arm_pmu: split out platform device probe logic
drivers/perf: arm_pmu: move irq request/free into probe
drivers/perf: arm_pmu: split cpu-local irq request/free
drivers/perf: arm_pmu: rename irq request/free functions
drivers/perf: arm_pmu: handle no platform_device
drivers/perf: arm_pmu: simplify cpu_pmu_request_irqs()
drivers/perf: arm_pmu: factor out pmu registration
drivers/perf: arm_pmu: fold init into alloc
drivers/perf: arm_pmu: define armpmu_init_fn
...
Diffstat (limited to 'drivers/firmware/efi/libstub/fdt.c')
-rw-r--r-- | drivers/firmware/efi/libstub/fdt.c | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/drivers/firmware/efi/libstub/fdt.c b/drivers/firmware/efi/libstub/fdt.c index 41f457be64e8..8830fa601e45 100644 --- a/drivers/firmware/efi/libstub/fdt.c +++ b/drivers/firmware/efi/libstub/fdt.c | |||
@@ -16,6 +16,22 @@ | |||
16 | 16 | ||
17 | #include "efistub.h" | 17 | #include "efistub.h" |
18 | 18 | ||
19 | #define EFI_DT_ADDR_CELLS_DEFAULT 2 | ||
20 | #define EFI_DT_SIZE_CELLS_DEFAULT 2 | ||
21 | |||
22 | static void fdt_update_cell_size(efi_system_table_t *sys_table, void *fdt) | ||
23 | { | ||
24 | int offset; | ||
25 | |||
26 | offset = fdt_path_offset(fdt, "/"); | ||
27 | /* Set the #address-cells and #size-cells values for an empty tree */ | ||
28 | |||
29 | fdt_setprop_u32(fdt, offset, "#address-cells", | ||
30 | EFI_DT_ADDR_CELLS_DEFAULT); | ||
31 | |||
32 | fdt_setprop_u32(fdt, offset, "#size-cells", EFI_DT_SIZE_CELLS_DEFAULT); | ||
33 | } | ||
34 | |||
19 | static efi_status_t update_fdt(efi_system_table_t *sys_table, void *orig_fdt, | 35 | static efi_status_t update_fdt(efi_system_table_t *sys_table, void *orig_fdt, |
20 | unsigned long orig_fdt_size, | 36 | unsigned long orig_fdt_size, |
21 | void *fdt, int new_fdt_size, char *cmdline_ptr, | 37 | void *fdt, int new_fdt_size, char *cmdline_ptr, |
@@ -42,10 +58,18 @@ static efi_status_t update_fdt(efi_system_table_t *sys_table, void *orig_fdt, | |||
42 | } | 58 | } |
43 | } | 59 | } |
44 | 60 | ||
45 | if (orig_fdt) | 61 | if (orig_fdt) { |
46 | status = fdt_open_into(orig_fdt, fdt, new_fdt_size); | 62 | status = fdt_open_into(orig_fdt, fdt, new_fdt_size); |
47 | else | 63 | } else { |
48 | status = fdt_create_empty_tree(fdt, new_fdt_size); | 64 | status = fdt_create_empty_tree(fdt, new_fdt_size); |
65 | if (status == 0) { | ||
66 | /* | ||
67 | * Any failure from the following function is non | ||
68 | * critical | ||
69 | */ | ||
70 | fdt_update_cell_size(sys_table, fdt); | ||
71 | } | ||
72 | } | ||
49 | 73 | ||
50 | if (status != 0) | 74 | if (status != 0) |
51 | goto fdt_set_fail; | 75 | goto fdt_set_fail; |