/arch/arm64/kvm/hyp/ |
D | exception.c | 97 u64 new = 0; in get_except64_cpsr() local 99 new |= (old & PSR_N_BIT); in get_except64_cpsr() 100 new |= (old & PSR_Z_BIT); in get_except64_cpsr() 101 new |= (old & PSR_C_BIT); in get_except64_cpsr() 102 new |= (old & PSR_V_BIT); in get_except64_cpsr() 105 new |= PSR_TCO_BIT; in get_except64_cpsr() 107 new |= (old & PSR_DIT_BIT); in get_except64_cpsr() 115 new |= (old & PSR_PAN_BIT); in get_except64_cpsr() 117 new |= PSR_PAN_BIT; in get_except64_cpsr() 128 new |= PSR_SSBS_BIT; in get_except64_cpsr() [all …]
|
/arch/sparc/kernel/ |
D | ftrace.c | 26 static int ftrace_modify_code(unsigned long ip, u32 old, u32 new) in ftrace_modify_code() argument 47 : [new] "0" (new), [old] "r" (old), [ip] "r" (ip) in ftrace_modify_code() 50 if (replaced != old && replaced != new) in ftrace_modify_code() 59 u32 old, new; in ftrace_make_nop() local 62 new = ftrace_nop; in ftrace_make_nop() 63 return ftrace_modify_code(ip, old, new); in ftrace_make_nop() 69 u32 old, new; in ftrace_make_call() local 72 new = ftrace_call_replace(ip, addr); in ftrace_make_call() 73 return ftrace_modify_code(ip, old, new); in ftrace_make_call() 79 u32 old, new; in ftrace_update_ftrace_func() local [all …]
|
/arch/powerpc/include/asm/ |
D | cmpxchg.h | 42 u32 __cmpxchg_##type##sfx(volatile void *p, u32 old, u32 new) \ 50 new <<= bitoff; \ 67 : "r" (p), "r" (old), "r" (new), "r" (prev_mask) \ 216 __cmpxchg_u32(volatile unsigned int *p, unsigned long old, unsigned long new) in __cmpxchg_u32() argument 231 : "r" (p), "r" (old), "r" (new) in __cmpxchg_u32() 239 unsigned long new) in __cmpxchg_u32_local() argument 252 : "r" (p), "r" (old), "r" (new) in __cmpxchg_u32_local() 259 __cmpxchg_u32_relaxed(u32 *p, unsigned long old, unsigned long new) in __cmpxchg_u32_relaxed() argument 271 : "r" (p), "r" (old), "r" (new) in __cmpxchg_u32_relaxed() 286 __cmpxchg_u32_acquire(u32 *p, unsigned long old, unsigned long new) in __cmpxchg_u32_acquire() argument [all …]
|
/arch/s390/mm/ |
D | pageattr.c | 57 static void pgt_set(unsigned long *old, unsigned long new, unsigned long addr, in pgt_set() argument 76 crdte(*old, new, table, dtt, addr, S390_lowcore.kernel_asce); in pgt_set() 78 cspg(old, *old, new); in pgt_set() 80 csp((unsigned int *)old + 1, *old, new); in pgt_set() 87 pte_t *ptep, new; in walk_pte_level() local 93 new = *ptep; in walk_pte_level() 94 if (pte_none(new)) in walk_pte_level() 97 new = pte_wrprotect(new); in walk_pte_level() 99 new = pte_mkwrite(pte_mkdirty(new)); in walk_pte_level() 101 pte_val(new) |= _PAGE_NOEXEC; in walk_pte_level() [all …]
|
/arch/arm/kernel/ |
D | ftrace.c | 78 unsigned long new, bool validate) in ftrace_modify_code() argument 96 __patch_text((void *)pc, new); in ftrace_modify_code() 104 unsigned long new; in ftrace_update_ftrace_func() local 108 new = ftrace_call_replace(pc, (unsigned long)func, true); in ftrace_update_ftrace_func() 110 ret = ftrace_modify_code(pc, 0, new, false); in ftrace_update_ftrace_func() 115 new = ftrace_call_replace(pc, (unsigned long)func, true); in ftrace_update_ftrace_func() 117 ret = ftrace_modify_code(pc, 0, new, false); in ftrace_update_ftrace_func() 126 unsigned long new, old; in ftrace_make_call() local 137 new = ftrace_call_replace(ip, aaddr, !mod); in ftrace_make_call() 139 if (!new && mod) { in ftrace_make_call() [all …]
|
/arch/alpha/include/asm/ |
D | xchg.h | 129 ____cmpxchg(_u8, volatile char *m, unsigned char old, unsigned char new) in ____cmpxchg() argument 148 : "=&r" (prev), "=&r" (new), "=&r" (tmp), "=&r" (cmp), "=&r" (addr64) in ____cmpxchg() 149 : "r" ((long)m), "Ir" (old), "1" (new) : "memory"); in ____cmpxchg() 155 ____cmpxchg(_u16, volatile short *m, unsigned short old, unsigned short new) in ____cmpxchg() argument 174 : "=&r" (prev), "=&r" (new), "=&r" (tmp), "=&r" (cmp), "=&r" (addr64) in ____cmpxchg() 175 : "r" ((long)m), "Ir" (old), "1" (new) : "memory"); in ____cmpxchg() 181 ____cmpxchg(_u32, volatile int *m, int old, int new) in ____cmpxchg() argument 197 : "r"((long) old), "r"(new), "m"(*m) : "memory"); in ____cmpxchg() 203 ____cmpxchg(_u64, volatile long *m, unsigned long old, unsigned long new) in ____cmpxchg() argument 219 : "r"((long) old), "r"(new), "m"(*m) : "memory"); in ____cmpxchg() [all …]
|
/arch/sparc/include/asm/ |
D | cmpxchg_64.h | 11 __cmpxchg_u32(volatile int *m, int old, int new) in __cmpxchg_u32() argument 14 : "=&r" (new) in __cmpxchg_u32() 15 : "0" (new), "r" (m), "r" (old) in __cmpxchg_u32() 18 return new; in __cmpxchg_u32() 115 __cmpxchg_u64(volatile long *m, unsigned long old, unsigned long new) in __cmpxchg_u64() argument 118 : "=&r" (new) in __cmpxchg_u64() 119 : "0" (new), "r" (m), "r" (old) in __cmpxchg_u64() 122 return new; in __cmpxchg_u64() 131 __cmpxchg_u8(volatile unsigned char *m, unsigned char old, unsigned char new) in __cmpxchg_u8() argument 141 new32 = (load32 & ~mask) | (new << bit_shift); in __cmpxchg_u8() [all …]
|
/arch/arm64/kernel/ |
D | ftrace.c | 25 static int ftrace_modify_code(unsigned long pc, u32 old, u32 new, in ftrace_modify_code() argument 45 if (aarch64_insn_patch_text_nosync((void *)pc, new)) in ftrace_modify_code() 57 u32 new; in ftrace_update_ftrace_func() local 60 new = aarch64_insn_gen_branch_imm(pc, (unsigned long)func, in ftrace_update_ftrace_func() 63 return ftrace_modify_code(pc, 0, new, false); in ftrace_update_ftrace_func() 146 u32 old, new; in ftrace_make_call() local 152 new = aarch64_insn_gen_branch_imm(pc, addr, AARCH64_INSN_BRANCH_LINK); in ftrace_make_call() 154 return ftrace_modify_code(pc, old, new, true); in ftrace_make_call() 162 u32 old, new; in ftrace_modify_call() local 171 new = aarch64_insn_gen_branch_imm(pc, addr, AARCH64_INSN_BRANCH_LINK); in ftrace_modify_call() [all …]
|
/arch/s390/include/asm/ |
D | atomic_ops.h | 101 int old, new; \ 108 : [old] "=d" (old), [new] "=&d" (new), [ptr] "+Q" (*ptr)\ 127 long old, new; \ 134 : [old] "=d" (old), [new] "=&d" (new), [ptr] "+QS" (*ptr)\ 157 static inline int __atomic_cmpxchg(int *ptr, int old, int new) in __atomic_cmpxchg() argument 162 : [new] "d" (new) in __atomic_cmpxchg() 167 static inline bool __atomic_cmpxchg_bool(int *ptr, int old, int new) in __atomic_cmpxchg_bool() argument 174 : [new] "d" (new) in __atomic_cmpxchg_bool() 179 static inline long __atomic64_cmpxchg(long *ptr, long old, long new) in __atomic64_cmpxchg() argument 184 : [new] "d" (new) in __atomic64_cmpxchg() [all …]
|
/arch/x86/include/asm/ |
D | cmpxchg.h | 85 #define __raw_cmpxchg(ptr, old, new, size, lock) \ argument 89 __typeof__(*(ptr)) __new = (new); \ 133 #define __cmpxchg(ptr, old, new, size) \ argument 134 __raw_cmpxchg((ptr), (old), (new), (size), LOCK_PREFIX) 136 #define __sync_cmpxchg(ptr, old, new, size) \ argument 137 __raw_cmpxchg((ptr), (old), (new), (size), "lock; ") 139 #define __cmpxchg_local(ptr, old, new, size) \ argument 140 __raw_cmpxchg((ptr), (old), (new), (size), "") 148 #define arch_cmpxchg(ptr, old, new) \ argument 149 __cmpxchg(ptr, old, new, sizeof(*(ptr))) [all …]
|
/arch/ia64/include/asm/ |
D | bitops.h | 42 __u32 bit, old, new; in set_bit() local 51 new = old | bit; in set_bit() 52 } while (cmpxchg_acq(m, old, new) != old); in set_bit() 83 __u32 mask, old, new; in clear_bit() local 92 new = old & mask; in clear_bit() 93 } while (cmpxchg_acq(m, old, new) != old); in clear_bit() 107 __u32 mask, old, new; in clear_bit_unlock() local 116 new = old & mask; in clear_bit_unlock() 117 } while (cmpxchg_rel(m, old, new) != old); in clear_bit_unlock() 132 __u32 const new = *m & ~(1 << (nr & 31)); in __clear_bit_unlock() local [all …]
|
D | atomic.h | 34 __s32 old, new; \ 40 new = old c_op i; \ 41 } while (ia64_cmpxchg(acq, v, old, new, sizeof(atomic_t)) != old); \ 42 return new; \ 49 __s32 old, new; \ 55 new = old c_op i; \ 56 } while (ia64_cmpxchg(acq, v, old, new, sizeof(atomic_t)) != old); \ 129 s64 old, new; \ 135 new = old c_op i; \ 136 } while (ia64_cmpxchg(acq, v, old, new, sizeof(atomic64_t)) != old); \ [all …]
|
D | acenv.h | 22 unsigned int old, new, val; in ia64_acpi_acquire_global_lock() local 25 new = (((old & ~0x3) + 2) + ((old >> 1) & 0x1)); in ia64_acpi_acquire_global_lock() 26 val = ia64_cmpxchg4_acq(lock, new, old); in ia64_acpi_acquire_global_lock() 28 return (new < 3) ? -1 : 0; in ia64_acpi_acquire_global_lock() 34 unsigned int old, new, val; in ia64_acpi_release_global_lock() local 37 new = old & ~0x3; in ia64_acpi_release_global_lock() 38 val = ia64_cmpxchg4_acq(lock, new, old); in ia64_acpi_release_global_lock()
|
/arch/xtensa/include/asm/ |
D | cmpxchg.h | 24 __cmpxchg_u32(volatile int *p, int old, int new) in __cmpxchg_u32() argument 38 : [new] "a" (new), [addr] "a" (p), [cmp] "a" (old) in __cmpxchg_u32() 47 : [new] "+a" (new), [mem] "+m" (*p) in __cmpxchg_u32() 52 return new; in __cmpxchg_u32() 63 : [cmp] "a" (old), [new] "r" (new) in __cmpxchg_u32() 74 __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) in __cmpxchg() argument 77 case 4: return __cmpxchg_u32(ptr, old, new); in __cmpxchg() 94 unsigned long new, int size) in __cmpxchg_local() argument 98 return __cmpxchg_u32(ptr, old, new); in __cmpxchg_local() 100 return __generic_cmpxchg_local(ptr, old, new, size); in __cmpxchg_local()
|
/arch/s390/kernel/ |
D | jump_label.c | 33 struct insn *new) in jump_label_bug() argument 37 unsigned char *ipn = (unsigned char *)new; in jump_label_bug() 56 struct insn old, new; in __jump_label_transform() local 60 jump_label_make_branch(entry, &new); in __jump_label_transform() 63 jump_label_make_nop(entry, &new); in __jump_label_transform() 67 jump_label_bug(entry, &orignop, &new); in __jump_label_transform() 70 jump_label_bug(entry, &old, &new); in __jump_label_transform() 72 s390_kernel_write(code, &new, sizeof(new)); in __jump_label_transform()
|
/arch/riscv/include/asm/ |
D | cmpxchg.h | 14 #define __xchg_relaxed(ptr, new, size) \ argument 17 __typeof__(new) __new = (new); \ 47 #define __xchg_acquire(ptr, new, size) \ argument 50 __typeof__(new) __new = (new); \ 82 #define __xchg_release(ptr, new, size) \ argument 85 __typeof__(new) __new = (new); \ 117 #define __xchg(ptr, new, size) \ argument 120 __typeof__(new) __new = (new); \ 166 #define __cmpxchg_relaxed(ptr, old, new, size) \ argument 170 __typeof__(*(ptr)) __new = (new); \ [all …]
|
/arch/mips/include/asm/ |
D | cmpxchg.h | 113 #define __cmpxchg_asm(ld, st, m, old, new) \ argument 134 : GCC_OFF_SMALL_ASM() (*m), "Jr" (old), "Jr" (new) \ 142 *m = new; \ 150 unsigned long new, unsigned int size); 154 unsigned long new, unsigned int size) in __cmpxchg() argument 159 return __cmpxchg_small(ptr, old, new, size); in __cmpxchg() 163 (u32)old, new); in __cmpxchg() 171 (u64)old, new); in __cmpxchg() 178 #define arch_cmpxchg_local(ptr, old, new) \ argument 182 (unsigned long)(__typeof__(*(ptr)))(new), \ [all …]
|
/arch/sh/drivers/ |
D | heartbeat.c | 35 unsigned int new; in heartbeat_toggle_bit() local 37 new = (1 << hd->bit_pos[bit]); in heartbeat_toggle_bit() 39 new = ~new; in heartbeat_toggle_bit() 41 new &= hd->mask; in heartbeat_toggle_bit() 45 new |= ioread32(hd->base) & ~hd->mask; in heartbeat_toggle_bit() 46 iowrite32(new, hd->base); in heartbeat_toggle_bit() 49 new |= ioread16(hd->base) & ~hd->mask; in heartbeat_toggle_bit() 50 iowrite16(new, hd->base); in heartbeat_toggle_bit() 53 new |= ioread8(hd->base) & ~hd->mask; in heartbeat_toggle_bit() 54 iowrite8(new, hd->base); in heartbeat_toggle_bit()
|
/arch/x86/kvm/vmx/ |
D | posted_intr.c | 28 struct pi_desc old, new; in vmx_vcpu_pi_load() local 54 old.control = new.control = READ_ONCE(pi_desc->control); in vmx_vcpu_pi_load() 59 new.ndst = dest; in vmx_vcpu_pi_load() 61 new.ndst = (dest << 8) & 0xFF00; in vmx_vcpu_pi_load() 63 new.sn = 0; in vmx_vcpu_pi_load() 65 new.control) != old.control); in vmx_vcpu_pi_load() 103 struct pi_desc old, new; in __pi_post_block() local 107 old.control = new.control = READ_ONCE(pi_desc->control); in __pi_post_block() 114 new.ndst = dest; in __pi_post_block() 116 new.ndst = (dest << 8) & 0xFF00; in __pi_post_block() [all …]
|
/arch/csky/include/asm/ |
D | cmpxchg.h | 11 #define __xchg_relaxed(new, ptr, size) \ argument 14 __typeof__(new) __new = (new); \ 37 #define __cmpxchg_relaxed(ptr, old, new, size) \ argument 40 __typeof__(new) __new = (new); \ 41 __typeof__(new) __tmp; \
|
/arch/sh/kernel/ |
D | ftrace.c | 105 int new = old & ~MOD_CODE_WRITE_FLAG; in clear_mod_flag() local 107 if (old == new) in clear_mod_flag() 110 old = atomic_cmpxchg(&nmi_running, old, new); in clear_mod_flag() 225 unsigned char old[MCOUNT_INSN_SIZE], *new; in ftrace_update_ftrace_func() local 228 new = ftrace_call_replace(ip, (unsigned long)func); in ftrace_update_ftrace_func() 230 return ftrace_modify_code(ip, old, new); in ftrace_update_ftrace_func() 236 unsigned char *new, *old; in ftrace_make_nop() local 240 new = ftrace_nop_replace(ip); in ftrace_make_nop() 242 return ftrace_modify_code(rec->ip, old, new); in ftrace_make_nop() 247 unsigned char *new, *old; in ftrace_make_call() local [all …]
|
/arch/arm64/include/asm/ |
D | atomic.h | 145 #define arch_atomic_xchg_relaxed(v, new) \ argument 146 arch_xchg_relaxed(&((v)->counter), (new)) 147 #define arch_atomic_xchg_acquire(v, new) \ argument 148 arch_xchg_acquire(&((v)->counter), (new)) 149 #define arch_atomic_xchg_release(v, new) \ argument 150 arch_xchg_release(&((v)->counter), (new)) 151 #define arch_atomic_xchg(v, new) \ argument 152 arch_xchg(&((v)->counter), (new)) 154 #define arch_atomic_cmpxchg_relaxed(v, old, new) \ argument 155 arch_cmpxchg_relaxed(&((v)->counter), (old), (new)) [all …]
|
/arch/x86/um/ |
D | bugs_32.c | 24 struct sigaction old, new; in arch_check_bugs() local 27 new.sa_handler = cmov_sigill_test_handler; in arch_check_bugs() 30 new.sa_flags = SA_NODEFER; in arch_check_bugs() 31 sigemptyset(&new.sa_mask); in arch_check_bugs() 32 sigaction(SIGILL, &new, &old); in arch_check_bugs() 41 sigaction(SIGILL, &old, &new); in arch_check_bugs()
|
/arch/um/drivers/ |
D | xterm.c | 90 int pid, fd, new, err; in xterm_open() local 155 new = xterm_fd(fd, &data->helper_pid); in xterm_open() 156 if (new < 0) { in xterm_open() 157 err = new; in xterm_open() 163 err = os_set_fd_block(new, 0); in xterm_open() 170 CATCH_EINTR(err = tcgetattr(new, &data->tt)); in xterm_open() 172 new = err; in xterm_open() 177 err = raw(new); in xterm_open() 179 new = err; in xterm_open() 188 return new; in xterm_open() [all …]
|
/arch/powerpc/platforms/pseries/ |
D | vphn.c | 42 u16 new = be16_to_cpup(field++); in vphn_unpack_associativity() local 50 cpu_to_be32(last << 16 | new); in vphn_unpack_associativity() 52 } else if (new == VPHN_FIELD_UNUSED) in vphn_unpack_associativity() 55 else if (new & VPHN_FIELD_MSB) { in vphn_unpack_associativity() 58 cpu_to_be32(new & VPHN_FIELD_MASK); in vphn_unpack_associativity() 64 last = new; in vphn_unpack_associativity()
|