/* * Copyright (C) 2015, Wang Nan * Copyright (C) 2015, Huawei Inc. */ #ifndef __LLVM_UTILS_H #define __LLVM_UTILS_H #include "debug.h" struct llvm_param { /* Path of clang executable */ const char *clang_path; /* * Template of clang bpf compiling. 5 env variables * can be used: * $CLANG_EXEC: Path to clang. * $CLANG_OPTIONS: Extra options to clang. * $KERNEL_INC_OPTIONS: Kernel include directories. * $WORKING_DIR: Kernel source directory. * $CLANG_SOURCE: Source file to be compiled. */ const char *clang_bpf_cmd_template; /* Will be filled in $CLANG_OPTIONS */ const char *clang_opt; /* Where to find kbuild system */ const char *kbuild_dir; /* * Arguments passed to make, like 'ARCH=arm' if doing cross * compiling. Should not be used for dynamic compiling. */ const char *kbuild_opts; /* * Default is false. If set to true, write compiling result * to object file. */ bool dump_obj; /* * Default is false. If one of the above fields is set by user * explicitly then user_set_llvm is set to true. This is used * for perf test. If user doesn't set anything in .perfconfig * and clang is not found, don't trigger llvm test. */ bool user_set_param; }; extern struct llvm_param llvm_param; int perf_llvm_config(const char *var, const char *value); int llvm__compile_bpf(const char *path, void **p_obj_buf, size_t *p_obj_buf_sz); /* This function is for test__llvm() use only */ int llvm__search_clang(void); /* Following functions are reused by builtin clang support */ void llvm__get_kbuild_opts(char **kbuild_dir, char **kbuild_include_opts); int llvm__get_nr_cpus(void); void llvm__dump_obj(const char *path, void *obj_buf, size_t size); #endif und/soc/adi?h=nds-private-remove'>logtreecommitdiff
path: root/sound/soc/adi
ted='selected'>3
AgeCommit message (Expand)AuthorFilesLines
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2017-02-01 17:45:02 +0000
committerIngo Molnar <mingo@kernel.org>2017-02-01 21:17:49 +0100
commitc8f325a59cfc718d13a50fbc746ed9b415c25e92 (patch)
treed53fbdac9d0781e39a13b2ac6b2bd258cf3b4140 /include/trace/events/kmem.h
parentbf29bddf0417a4783da3b24e8c9e017ac649326f (diff)
efi/fdt: Avoid FDT manipulation after ExitBootServices()
Some AArch64 UEFI implementations disable the MMU in ExitBootServices(), after which unaligned accesses to RAM are no longer supported. Commit: abfb7b686a3e ("efi/libstub/arm*: Pass latest memory map to the kernel") fixed an issue in the memory map handling of the stub FDT code, but inadvertently created an issue with such firmware, by moving some of the FDT manipulation to after the invocation of ExitBootServices(). Given that the stub's libfdt implementation uses the ordinary, accelerated string functions, which rely on hardware handling of unaligned accesses, manipulating the FDT with the MMU off may result in alignment faults. So fix the situation by moving the update_fdt_memmap() call into the callback function invoked by efi_exit_boot_services() right before it calls the ExitBootServices() UEFI service (which is arguably a better place for it anyway) Note that disabling the MMU in ExitBootServices() is not compliant with the UEFI spec, and carries great risk due to the fact that switching from cached to uncached memory accesses halfway through compiler generated code (i.e., involving a stack) can never be done in a way that is architecturally safe. Fixes: abfb7b686a3e ("efi/libstub/arm*: Pass latest memory map to the kernel") Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Tested-by: Riku Voipio <riku.voipio@linaro.org> Cc: <stable@vger.kernel.org> Cc: mark.rutland@arm.com Cc: linux-efi@vger.kernel.org Cc: matt@codeblueprint.co.uk Cc: leif.lindholm@linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1485971102-23330-2-git-send-email-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/trace/events/kmem.h')