| xj | b04a402 | 2021-11-25 15:01:52 +0800 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0 |
| 2 | lib-y := clear_user.o delay.o copy_from_user.o \ |
| 3 | copy_to_user.o copy_in_user.o copy_page.o \ |
| 4 | clear_page.o memchr.o memcpy.o memmove.o memset.o \ |
| 5 | memcmp.o strcmp.o strncmp.o strlen.o strnlen.o \ |
| 6 | strchr.o strrchr.o tishift.o |
| 7 | |
| 8 | # Tell the compiler to treat all general purpose registers (with the |
| 9 | # exception of the IP registers, which are already handled by the caller |
| 10 | # in case of a PLT) as callee-saved, which allows for efficient runtime |
| 11 | # patching of the bl instruction in the caller with an atomic instruction |
| 12 | # when supported by the CPU. Result and argument registers are handled |
| 13 | # correctly, based on the function prototype. |
| 14 | ifeq ($(CONFIG_LD_IS_LLD), y) |
| 15 | # https://bugs.llvm.org/show_bug.cgi?id=35841 |
| 16 | obj-$(CONFIG_ARM64_LSE_ATOMICS) += atomic_ll_sc.o |
| 17 | else |
| 18 | lib-$(CONFIG_ARM64_LSE_ATOMICS) += atomic_ll_sc.o |
| 19 | endif |
| 20 | CFLAGS_atomic_ll_sc.o := -ffixed-x1 -ffixed-x2 \ |
| 21 | -ffixed-x3 -ffixed-x4 -ffixed-x5 -ffixed-x6 \ |
| 22 | -ffixed-x7 -fcall-saved-x8 -fcall-saved-x9 \ |
| 23 | -fcall-saved-x10 -fcall-saved-x11 -fcall-saved-x12 \ |
| 24 | -fcall-saved-x13 -fcall-saved-x14 -fcall-saved-x15 \ |
| 25 | -fcall-saved-x18 -fomit-frame-pointer |
| 26 | CFLAGS_REMOVE_atomic_ll_sc.o := -pg |
| 27 | GCOV_PROFILE_atomic_ll_sc.o := n |
| 28 | KASAN_SANITIZE_atomic_ll_sc.o := n |
| 29 | KCOV_INSTRUMENT_atomic_ll_sc.o := n |
| 30 | UBSAN_SANITIZE_atomic_ll_sc.o := n |
| 31 | |
| 32 | lib-$(CONFIG_ARCH_HAS_UACCESS_FLUSHCACHE) += uaccess_flushcache.o |