/xen/xen/include/asm-arm/arm32/ |
A D | cmpxchg.h | 59 unsigned long *old, \ 74 : "r" (ptr), "Ir" (*old), "r" (new) \ 81 *old = oldval; \ 98 return __cmpxchg_case_1(ptr, old, new, timeout, max_try); in __int_cmpxchg() 100 return __cmpxchg_case_2(ptr, old, new, timeout, max_try); in __int_cmpxchg() 111 unsigned long old, in __cmpxchg() argument 115 if (!__int_cmpxchg(ptr, &old, new, size, false, 0)) in __cmpxchg() 118 return old; in __cmpxchg() 128 ret = __cmpxchg(ptr, old, new, size); in __cmpxchg_mb() 145 unsigned long *old, in __cmpxchg_mb_timeout() argument [all …]
|
/xen/xen/include/asm-arm/arm64/ |
A D | cmpxchg.h | 68 unsigned long *old, \ 86 : "Ir" (*old), "r" (new) \ 93 *old = oldval; \ 109 return __cmpxchg_case_1(ptr, old, new, timeout, max_try); in __int_cmpxchg() 124 unsigned long old, in __cmpxchg() argument 128 if (!__int_cmpxchg(ptr, &old, new, size, false, 0)) in __cmpxchg() 131 return old; in __cmpxchg() 135 unsigned long old, in __cmpxchg_mb() argument 141 ret = __cmpxchg(ptr, old, new, size); in __cmpxchg_mb() 158 unsigned long *old, in __cmpxchg_mb_timeout() argument [all …]
|
A D | atomic.h | 108 static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new) in atomic_cmpxchg() argument 123 : "Ir" (old), "r" (new) in atomic_cmpxchg() 132 int c, old; in __atomic_add_unless() local 135 while (c != u && (old = atomic_cmpxchg((v), c, c + a)) != c) in __atomic_add_unless() 136 c = old; in __atomic_add_unless()
|
/xen/xen/include/asm-x86/ |
A D | system.h | 92 volatile void *ptr, unsigned long old, unsigned long new, int size) in __cmpxchg() argument 100 : [new] "q" (new), "a" (old) in __cmpxchg() 106 : [new] "r" (new), "a" (old) in __cmpxchg() 112 : [new] "r" (new), "a" (old) in __cmpxchg() 118 : [new] "r" (new), "a" (old) in __cmpxchg() 122 return old; in __cmpxchg() 128 unsigned long prev = ~old; in cmpxchg_local_() 135 : [new] "q" (new), "a" (old) ); in cmpxchg_local_() 140 : [new] "r" (new), "a" (old) ); in cmpxchg_local_() 145 : [new] "r" (new), "a" (old) ); in cmpxchg_local_() [all …]
|
A D | bitops.h | 167 : [old] ASM_FLAG_OUT("=@ccc", "=r") (oldbit), in test_and_set_bit() 192 : [old] ASM_FLAG_OUT("=@ccc", "=r") (oldbit), in __test_and_set_bit() 216 : [old] ASM_FLAG_OUT("=@ccc", "=r") (oldbit), in test_and_clear_bit() 241 : [old] ASM_FLAG_OUT("=@ccc", "=r") (oldbit), in __test_and_clear_bit() 258 : [old] ASM_FLAG_OUT("=@ccc", "=r") (oldbit), in __test_and_change_bit() 282 : [old] ASM_FLAG_OUT("=@ccc", "=r") (oldbit), in test_and_change_bit() 304 : [old] ASM_FLAG_OUT("=@ccc", "=r") (oldbit) in variable_test_bit()
|
A D | atomic.h | 110 static inline int atomic_cmpxchg(atomic_t *v, int old, int new) in atomic_cmpxchg() argument 112 return cmpxchg(&v->counter, old, new); in atomic_cmpxchg() 221 int c, old; in atomic_add_unless() local 224 while (c != u && (old = atomic_cmpxchg(v, c, c + a)) != c) in atomic_add_unless() 225 c = old; in atomic_add_unless()
|
/xen/xen/include/asm-arm/ |
A D | bitops.h | 91 unsigned int old = *p; in __test_and_set_bit() local 93 *p = old | mask; in __test_and_set_bit() 94 return (old & mask) != 0; in __test_and_set_bit() 111 unsigned int old = *p; in __test_and_clear_bit() local 113 *p = old & ~mask; in __test_and_clear_bit() 114 return (old & mask) != 0; in __test_and_clear_bit() 124 unsigned int old = *p; in __test_and_change_bit() local 126 *p = old ^ mask; in __test_and_change_bit() 127 return (old & mask) != 0; in __test_and_change_bit()
|
A D | guest_atomics.h | 91 unsigned long old, in __guest_cmpxchg() argument 95 unsigned long oldval = old; in __guest_cmpxchg() 106 oldval = __cmpxchg_mb(ptr, old, new, size); in __guest_cmpxchg()
|
/xen/xen/include/asm-x86/x86_64/ |
A D | system.h | 22 } new = { .raw = *newp }, old = { .raw = *oldp }, prev; in __cmpxchg16b() local 30 : "c" (new.hi), "b" (new.lo), "d" (old.hi), "a" (old.lo) ); in __cmpxchg16b() 41 } new = { .raw = *newp }, old = { .raw = *oldp }, prev; in cmpxchg16b_local_() local 49 : "c" (new.hi), "b" (new.lo), "d" (old.hi), "a" (old.lo) ); in cmpxchg16b_local_()
|
/xen/xen/arch/x86/pv/ |
A D | mm.h | 39 static inline bool update_intpte(intpte_t *p, intpte_t old, intpte_t new, in update_intpte() argument 52 intpte_t t = old; in update_intpte() 59 _new |= old & (_PAGE_ACCESSED | _PAGE_DIRTY); in update_intpte() 66 ": saw %" PRIpte "\n", old, _new, t); in update_intpte() 70 if ( t == old ) in update_intpte() 74 BUG_ON((t ^ old) & ~(intpte_t)(_PAGE_ACCESSED|_PAGE_DIRTY)); in update_intpte() 76 old = t; in update_intpte()
|
A D | ro-page-fault.c | 67 intpte_t old = p_old ? *p_old : 0; in ptwr_emulated_update() local 107 old &= (((intpte_t)1 << (bytes * 8)) - 1); in ptwr_emulated_update() 108 old <<= offset; in ptwr_emulated_update() 109 old |= full; in ptwr_emulated_update() 170 ol1e = l1e_from_intpte(old); in ptwr_emulated_update() 174 else if ( l1e_get_intpte(ol1e) == old ) in ptwr_emulated_update() 178 *p_old = old >> offset; in ptwr_emulated_update() 228 intpte_t old = 0, new = 0; in ptwr_emulated_cmpxchg() local 238 memcpy(&old, p_old, bytes); in ptwr_emulated_cmpxchg() 241 rc = ptwr_emulated_update(offset, &old, new, bytes, ctxt); in ptwr_emulated_cmpxchg() [all …]
|
/xen/xen/arch/x86/mm/shadow/ |
A D | pv.c | 52 sh_cmpxchg_guest_entry(struct vcpu *v, intpte_t *p, intpte_t *old, in sh_cmpxchg_guest_entry() argument 56 intpte_t t = *old; in sh_cmpxchg_guest_entry() 60 if ( t == *old ) in sh_cmpxchg_guest_entry() 62 *old = t; in sh_cmpxchg_guest_entry()
|
A D | hvm.c | 252 unsigned long addr, old, new, prev; in hvm_emulate_cmpxchg() local 272 old = new = 0; in hvm_emulate_cmpxchg() 273 memcpy(&old, p_old, bytes); in hvm_emulate_cmpxchg() 279 case 1: prev = cmpxchg((uint8_t *)ptr, old, new); break; in hvm_emulate_cmpxchg() 280 case 2: prev = cmpxchg((uint16_t *)ptr, old, new); break; in hvm_emulate_cmpxchg() 281 case 4: prev = cmpxchg((uint32_t *)ptr, old, new); break; in hvm_emulate_cmpxchg() 282 case 8: prev = cmpxchg((uint64_t *)ptr, old, new); break; in hvm_emulate_cmpxchg() 285 prev = ~old; in hvm_emulate_cmpxchg() 288 if ( prev != old ) in hvm_emulate_cmpxchg() 296 addr, prev, old, new, *(unsigned long *)ptr, bytes); in hvm_emulate_cmpxchg()
|
/xen/xen/include/asm-x86/hvm/ |
A D | monitor.h | 36 unsigned long old); 37 #define hvm_monitor_crX(cr, new, old) \ argument 38 hvm_monitor_cr(VM_EVENT_X86_##cr, new, old)
|
/xen/xen/include/xen/ |
A D | list.h | 223 static inline void list_replace(struct list_head *old, in list_replace() argument 226 new->next = old->next; in list_replace() 228 new->prev = old->prev; in list_replace() 235 list_replace(old, new); in list_replace_init() 236 INIT_LIST_HEAD(old); in list_replace_init() 250 new->next = old->next; in list_replace_rcu() 251 new->prev = old->prev; in list_replace_rcu() 255 old->prev = LIST_POISON2; in list_replace_rcu() 769 struct hlist_node *next = old->next; in hlist_replace_rcu() 772 new->pprev = old->pprev; in hlist_replace_rcu() [all …]
|
/xen/xen/common/libfdt/ |
A D | fdt_rw.c | 393 static void _fdt_packblocks(const char *old, char *new, in _fdt_packblocks() argument 402 memmove(new + mem_rsv_off, old + fdt_off_mem_rsvmap(old), mem_rsv_size); in _fdt_packblocks() 405 memmove(new + struct_off, old + fdt_off_dt_struct(old), struct_size); in _fdt_packblocks() 409 memmove(new + strings_off, old + fdt_off_dt_strings(old), in _fdt_packblocks() 410 fdt_size_dt_strings(old)); in _fdt_packblocks() 412 fdt_set_size_dt_strings(new, fdt_size_dt_strings(old)); in _fdt_packblocks()
|
/xen/xen/arch/x86/cpu/microcode/ |
A D | amd.c | 194 const struct microcode_patch *new, const struct microcode_patch *old) in compare_header() argument 196 if ( new->processor_rev_id != old->processor_rev_id ) in compare_header() 199 return new->patch_id > old->patch_id ? NEW_UCODE : OLD_UCODE; in compare_header() 203 const struct microcode_patch *new, const struct microcode_patch *old) in compare_patch() argument 207 ASSERT(microcode_fits(old) != MIS_UCODE); in compare_patch() 209 return compare_header(new, old); in compare_patch()
|
/xen/xen/common/ |
A D | domain.c | 989 old = prev; in vcpu_pause_by_systemcontroller() 990 new = old + 1; in vcpu_pause_by_systemcontroller() 996 } while ( prev != old ); in vcpu_pause_by_systemcontroller() 1009 old = prev; in vcpu_unpause_by_systemcontroller() 1010 new = old - 1; in vcpu_unpause_by_systemcontroller() 1016 } while ( prev != old ); in vcpu_unpause_by_systemcontroller() 1065 old = prev; in __domain_pause_by_systemcontroller() 1066 new = old + 1; in __domain_pause_by_systemcontroller() 1076 } while ( prev != old ); in __domain_pause_by_systemcontroller() 1089 old = prev; in domain_unpause_by_systemcontroller() [all …]
|
A D | rbtree.c | 81 __rb_change_child(struct rb_node *old, struct rb_node *new, in __rb_change_child() argument 85 if (parent->rb_left == old) in __rb_change_child() 99 __rb_rotate_set_parents(struct rb_node *old, struct rb_node *new, in __rb_rotate_set_parents() argument 102 struct rb_node *parent = rb_parent(old); in __rb_rotate_set_parents() 103 new->__rb_parent_color = old->__rb_parent_color; in __rb_rotate_set_parents() 104 rb_set_parent_color(old, new, color); in __rb_rotate_set_parents() 105 __rb_change_child(old, new, parent, root); in __rb_rotate_set_parents()
|
A D | spinlock.c | 237 spinlock_tickets_t old, new; in _spin_trylock() local 240 old = observe_lock(&lock->tickets); in _spin_trylock() 241 if ( old.head != old.tail ) in _spin_trylock() 243 new = old; in _spin_trylock() 247 old.head_tail, new.head_tail) != old.head_tail ) in _spin_trylock()
|
/xen/xen/drivers/passthrough/amd/ |
A D | iommu_map.c | 56 union amd_iommu_pte new = {}, old; in set_iommu_pde_present() local 71 old.raw = read_atomic(&pte->raw); in set_iommu_pde_present() 72 old.ign0 = 0; in set_iommu_pde_present() 73 old.ign1 = 0; in set_iommu_pde_present() 74 old.ign2 = 0; in set_iommu_pde_present() 76 if ( old.pr && old.raw != new.raw ) in set_iommu_pde_present()
|
/xen/stubdom/vtpmmgr/ |
A D | disk_tpm.h | 21 int TPM_disk_nvchange(be32_t nvram_slot, struct tpm_authdata old, struct tpm_authdata noo); 27 int TPM_disk_change_counter(be32_t slot, struct tpm_authdata old, struct tpm_authdata noo);
|
/xen/xen/arch/x86/cpu/mcheck/ |
A D | mctelem.c | 57 #define MCTE_TRANSITION_STATE(tep, old, new) do { \ argument 58 BUG_ON(MCTE_STATE(tep) != (MCTE_F_STATE_##old)); \ 139 struct mctelem_ent *old; in mctelem_xchg_head() local 141 *linkp = old = *headp; in mctelem_xchg_head() 142 if (cmpxchgptr(headp, old, new) == old) in mctelem_xchg_head()
|
/xen/xen/arch/arm/ |
A D | vgic.c | 254 bool vgic_migrate_irq(struct vcpu *old, struct vcpu *new, unsigned int irq) in vgic_migrate_irq() argument 262 spin_lock_irqsave(&old->arch.vgic.lock, flags); in vgic_migrate_irq() 264 p = irq_to_pending(old, irq); in vgic_migrate_irq() 269 spin_unlock_irqrestore(&old->arch.vgic.lock, flags); in vgic_migrate_irq() 277 spin_unlock_irqrestore(&old->arch.vgic.lock, flags); in vgic_migrate_irq() 286 spin_unlock_irqrestore(&old->arch.vgic.lock, flags); in vgic_migrate_irq() 292 vgic_remove_irq_from_queues(old, p); in vgic_migrate_irq() 294 spin_unlock_irqrestore(&old->arch.vgic.lock, flags); in vgic_migrate_irq() 303 spin_unlock_irqrestore(&old->arch.vgic.lock, flags); in vgic_migrate_irq()
|
/xen/tools/fuzz/x86_instruction_emulator/ |
A D | fuzz-emul.c | 355 void *old, in fuzz_cmpxchg() argument 441 struct segment_register old = c->segments[seg]; in fuzz_write_segment() local 447 c->segments[seg] = old; in fuzz_write_segment() 479 unsigned long old; in fuzz_write_cr() local 489 old = c->cr[reg]; in fuzz_write_cr() 494 c->cr[reg] = old; in fuzz_write_cr() 597 uint64_t old = c->msr[idx]; in fuzz_write_msr() local 603 c->msr[idx] = old; in fuzz_write_msr()
|