kernel-fxtec-pro1x/arch
Will Deacon dfbf8c981f arm64: Fix minor issues with the dcache_by_line_op macro
[ Upstream commit 33309ecda0070506c49182530abe7728850ebe78 ]

The dcache_by_line_op macro suffers from a couple of small problems:

First, the GAS directives that are currently being used rely on
assembler behavior that is not documented, and probably not guaranteed
to produce the correct behavior going forward. As a result, we end up
with some undefined symbols in cache.o:

$ nm arch/arm64/mm/cache.o
         ...
         U civac
         ...
         U cvac
         U cvap
         U cvau

This is due to the fact that the comparisons used to select the
operation type in the dcache_by_line_op macro are comparing symbols
not strings, and even though it seems that GAS is doing the right
thing here (undefined symbols by the same name are equal to each
other), it seems unwise to rely on this.

Second, when patching in a DC CVAP instruction on CPUs that support it,
the fallback path consists of a DC CVAU instruction which may be
affected by CPU errata that require ARM64_WORKAROUND_CLEAN_CACHE.

Solve these issues by unrolling the various maintenance routines and
using the conditional directives that are documented as operating on
strings. To avoid the complexity of nested alternatives, we move the
DC CVAP patching to __clean_dcache_area_pop, falling back to a branch
to __clean_dcache_area_poc if DCPOP is not supported by the CPU.

Reported-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Suggested-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-01-26 09:32:39 +01:00
..
alpha arch/alpha, termios: implement BOTHER, IBSHIFT and termios2 2018-11-21 09:19:20 +01:00
arc clocksource/drivers/arc_timer: Utilize generic sched_clock 2019-01-09 17:38:42 +01:00
arm ARM: dts: imx7d-nitrogen7: Fix the description of the Wifi clock 2019-01-13 09:50:56 +01:00
arm64 arm64: Fix minor issues with the dcache_by_line_op macro 2019-01-26 09:32:39 +01:00
c6x kbuild: rename LDFLAGS to KBUILD_LDFLAGS 2018-08-24 08:22:08 +09:00
h8300 Kbuild updates for v4.19 (2nd) 2018-08-25 13:40:38 -07:00
hexagon hexagon: modify ffs() and fls() to return int 2018-09-10 19:42:15 -05:00
ia64 ia64: Fix allnoconfig section mismatch for ioc_init/ioc_iommu_info 2018-08-22 14:12:47 -07:00
m68k m68k: Fix memblock-related crashes 2019-01-13 09:51:02 +01:00
microblaze mm: make the __PAGETABLE_PxD_FOLDED defines non-empty 2018-12-29 13:37:57 +01:00
mips MIPS: SiByte: Enable swiotlb for SWARM, LittleSur and BigSur 2019-01-26 09:32:35 +01:00
nds32 mm: make the __PAGETABLE_PxD_FOLDED defines non-empty 2018-12-29 13:37:57 +01:00
nios2 nios2: kconfig: remove duplicate DEBUG_STACK_USAGE symbol defintions 2018-08-27 09:47:20 +08:00
openrisc OpenRISC updates for 4.19 2018-08-23 14:09:37 -07:00
parisc mm: make the __PAGETABLE_PxD_FOLDED defines non-empty 2018-12-29 13:37:57 +01:00
powerpc powerpc/xmon: Fix invocation inside lock region 2019-01-26 09:32:37 +01:00
riscv riscv: fix warning in arch/riscv/include/asm/module.h 2018-12-13 09:16:14 +01:00
s390 s390/pci: fix sleeping in atomic during hotplug 2019-01-09 17:38:41 +01:00
sh sh/function_graph: Simplify with function_graph_enter() 2018-12-05 19:32:09 +01:00
sparc sparc/function_graph: Simplify with function_graph_enter() 2018-12-05 19:32:10 +01:00
um um: Give start_idle_thread() a return code 2018-11-27 16:12:59 +01:00
unicore32 mm: convert return type of handle_mm_fault() caller to vm_fault_t 2018-08-17 16:20:28 -07:00
x86 x86/mce: Fix -Wmissing-prototypes warnings 2019-01-26 09:32:35 +01:00
xtensa xtensa: fix coprocessor part of ptrace_{get,set}xregs 2018-12-05 19:32:06 +01:00
.gitignore
Kconfig Merge branch 'tlb-fixes' 2018-08-23 14:55:01 -07:00