Home
last modified time | relevance | path

Searched refs:ptr (Results 1 – 25 of 29) sorted by relevance

12

/kvm-unit-tests/lib/asm-generic/
H A Datomic.h5 #define atomic_fetch_inc(ptr) __sync_fetch_and_add(ptr, 1) argument
6 #define atomic_fetch_dec(ptr) __sync_fetch_and_add(ptr, -1) argument
7 #define atomic_fetch_add(ptr, n) __sync_fetch_and_add(ptr, n) argument
8 #define atomic_fetch_sub(ptr, n) __sync_fetch_and_sub(ptr, n) argument
9 #define atomic_fetch_and(ptr, n) __sync_fetch_and_and(ptr, n) argument
10 #define atomic_fetch_or(ptr, n) __sync_fetch_and_or(ptr, n) argument
11 #define atomic_fetch_xor(ptr, n) __sync_fetch_and_xor(ptr, n) argument
13 #define atomic_inc_fetch(ptr) __sync_add_and_fetch(ptr, 1) argument
14 #define atomic_dec_fetch(ptr) __sync_add_and_fetch(ptr, -1) argument
15 #define atomic_add_fetch(ptr, n) __sync_add_and_fetch(ptr, n) argument
[all …]
/kvm-unit-tests/lib/
H A Dalloc.c14 void *ptr; in calloc() local
17 ptr = malloc(nmemb * size); in calloc()
18 if (ptr) in calloc()
19 memset(ptr, 0, nmemb * size); in calloc()
20 return ptr; in calloc()
23 void free(void *ptr) in free() argument
26 alloc_ops->free(ptr); in free()
H A Dvmalloc.c47 uintptr_t ptr; in do_alloc_vpages() local
50 ptr = (uintptr_t)vfree_top; in do_alloc_vpages()
51 ptr -= PAGE_SIZE * nr; in do_alloc_vpages()
52 ptr &= GENMASK_ULL(63, PAGE_SHIFT + align_order); in do_alloc_vpages()
54 ptr -= PAGE_SIZE; in do_alloc_vpages()
55 vfree_top = (void *)ptr; in do_alloc_vpages()
59 return (void *)ptr; in do_alloc_vpages()
165 uintptr_t ptr, page, i; in vm_free() local
184 ptr = (uintptr_t)m & PAGE_MASK; in vm_free()
185 for (i = 0 ; i < m->npages + 1; i++, ptr += PAGE_SIZE) { in vm_free()
[all …]
H A Dalloc.h27 void (*free)(void *ptr);
34 void free(void *ptr);
H A Dlibcflat.h83 extern long atol(const char *ptr);
127 #define container_of(ptr, type, member) ({ \ argument
128 const typeof( ((type *)0)->member ) *__mptr = (ptr); \
H A Dstring.c278 long atol(const char *ptr) in atol() argument
280 return strtol(ptr, NULL, 10); in atol()
H A Defi.c56 static void efi_free_pool(void *ptr) in efi_free_pool() argument
58 efi_bs_call(free_pool, ptr); in efi_free_pool()
/kvm-unit-tests/lib/arm/
H A Dgic-v3.c17 void *ptr = gicv3_data.redist_bases[i]; in gicv3_set_redist_base() local
19 typer = gicv3_read_typer(ptr + GICR_TYPER); in gicv3_set_redist_base()
21 gicv3_redist_base() = ptr; in gicv3_set_redist_base()
24 ptr += stride; /* skip RD_base, SGI_base, etc. */ in gicv3_set_redist_base()
181 void *ptr; in gicv3_lpi_alloc_tables() local
185 ptr = gicv3_data.redist_base[cpu]; in gicv3_lpi_alloc_tables()
187 writeq(prop_val, ptr + GICR_PROPBASER); in gicv3_lpi_alloc_tables()
191 writeq(pend_val, ptr + GICR_PENDBASER); in gicv3_lpi_alloc_tables()
197 u8 *ptr = gicv3_data.lpi_pend[rdist]; in gicv3_lpi_set_clr_pending() local
200 ptr += (n / 8); in gicv3_lpi_set_clr_pending()
[all …]
/kvm-unit-tests/lib/s390x/asm/
H A Dbitops.h21 const volatile unsigned long *ptr) in test_bit() argument
25 addr = ((const volatile unsigned char *)ptr); in test_bit()
31 const volatile unsigned long *ptr) in test_bit_inv() argument
33 return test_bit(nr ^ (BITS_PER_LONG - 1), ptr); in test_bit_inv()
/kvm-unit-tests/x86/
H A Dlam.c83 static void test_ptr(u64* ptr, bool is_mmio) in test_ptr() argument
88 lam_active = get_lam_mask((u64)ptr, &lam_mask); in test_ptr()
90 fault = test_for_exception(GP_VECTOR, do_mov, ptr); in test_ptr()
94 ptr = (u64 *)get_non_canonical((u64)ptr, lam_mask); in test_ptr()
95 fault = test_for_exception(GP_VECTOR, do_mov, ptr); in test_ptr()
105 ptr = (u64 *)get_non_canonical((u64)ptr, LAM48_MASK); in test_ptr()
106 fault = test_for_exception(GP_VECTOR, do_mov, ptr); in test_ptr()
116 u64 *ptr; in test_invlpg() local
123 ptr = (u64 *)get_non_canonical((u64)va, lam_mask); in test_invlpg()
125 asm volatile(KVM_FEP "invlpg (%0)" ::"r" (ptr) : "memory"); in test_invlpg()
[all …]
H A Deventinj.c46 struct descriptor_table_ptr ptr; in flush_idt_page() local
47 sidt(&ptr); in flush_idt_page()
48 flush_phys_addr(virt_to_phys((void*)ptr.base)); in flush_idt_page()
/kvm-unit-tests/lib/s390x/
H A Dmmu.c198 void *ptr; in dat_get_and_invalidate() local
200 ptr = get_dat_entry(pgtable, vaddr, level); in dat_get_and_invalidate()
202 *old = *(unsigned long *)ptr; in dat_get_and_invalidate()
203 if ((level == pgtable_level_pgd) && !pgd_none(*(pgd_t *)ptr)) in dat_get_and_invalidate()
204 idte_pgdp(va, ptr); in dat_get_and_invalidate()
205 else if ((level == pgtable_level_p4d) && !p4d_none(*(p4d_t *)ptr)) in dat_get_and_invalidate()
206 idte_p4dp(va, ptr); in dat_get_and_invalidate()
207 else if ((level == pgtable_level_pud) && !pud_none(*(pud_t *)ptr)) in dat_get_and_invalidate()
208 idte_pudp(va, ptr); in dat_get_and_invalidate()
209 else if ((level == pgtable_level_pmd) && !pmd_none(*(pmd_t *)ptr)) in dat_get_and_invalidate()
[all …]
H A Dsclp-console.c172 unsigned char *ptr, *end, ch; in lm_print() local
183 ptr = (unsigned char *) &sccb->msg.mdb.mto; in lm_print()
188 if (ch == 0x0a || ptr + count > end) in lm_print()
190 ptr[count] = _ascebc[ch]; in lm_print()
192 mto = (struct mto *) ptr; in lm_print()
196 ptr += count; in lm_print()
197 } while (offset < len && ptr + sizeof(*mto) <= end); in lm_print()
198 len = ptr - (unsigned char *) sccb; in lm_print()
/kvm-unit-tests/riscv/
H A Dsbi-fwft.c232 unsigned long *ptr = malloc(sizeof(unsigned long)); in adue_check() local
233 pte_t *ptep = get_pte(current_pgtable(), (uintptr_t)ptr); in adue_check()
241 local_flush_tlb_page((uintptr_t)ptr); in adue_check()
246 writel(0xdeadbeef, ptr); in adue_check()
250 readl(ptr); in adue_check()
257 free(ptr); in adue_check()
H A Disa-dbltrp.c25 void *ptr = NULL; \
32 : : "r" (value), "r" (ptr) : "memory"); \
/kvm-unit-tests/lib/x86/
H A Datomic.h73 static inline u64 atomic64_read(atomic64_t *ptr) in atomic64_read() argument
88 : "m" (*ptr) in atomic64_read()
H A Dprocessor.h766 static inline void lgdt(const struct descriptor_table_ptr *ptr) in lgdt() argument
768 asm volatile ("lgdt %0" : : "m"(*ptr)); in lgdt()
771 static inline int lgdt_safe(const struct descriptor_table_ptr *ptr) in lgdt_safe() argument
773 return asm_safe("lgdt %0", "m"(*ptr)); in lgdt_safe()
776 static inline int lgdt_fep_safe(const struct descriptor_table_ptr *ptr) in lgdt_fep_safe() argument
778 return asm_fep_safe("lgdt %0", "m"(*ptr)); in lgdt_fep_safe()
781 static inline void sgdt(struct descriptor_table_ptr *ptr) in sgdt() argument
783 asm volatile ("sgdt %0" : "=m"(*ptr)); in sgdt()
786 static inline void lidt(const struct descriptor_table_ptr *ptr) in lidt() argument
788 asm volatile ("lidt %0" : : "m"(*ptr)); in lidt()
[all …]
/kvm-unit-tests/powerpc/
H A Dtm.c18 static void cpu_has_tm(int fdtnode, u64 regval __unused, void *ptr) in cpu_has_tm() argument
36 *(int *)ptr += 1; in cpu_has_tm()
/kvm-unit-tests/arm/
H A Dmte.c160 for (unsigned long ptr = start; ptr < end; ptr += 16) { in mte_set_tag() local
164 : "r"(tagged(ptr, tag)) in mte_set_tag()
H A Dgic.c880 void *ptr; in test_its_pending_migration() local
918 ptr = gicv3_data.redist_base[pe0] + GICR_PENDBASER; in test_its_pending_migration()
919 pendbaser = readq(ptr); in test_its_pending_migration()
920 writeq(pendbaser & ~GICR_PENDBASER_PTZ, ptr); in test_its_pending_migration()
922 ptr = gicv3_data.redist_base[pe1] + GICR_PENDBASER; in test_its_pending_migration()
923 pendbaser = readq(ptr); in test_its_pending_migration()
924 writeq(pendbaser & ~GICR_PENDBASER_PTZ, ptr); in test_its_pending_migration()
H A Dfpu.c30 [ptr] "=r" (*random) in arch_collect_entropy()
/kvm-unit-tests/s390x/
H A Dpv-icptcode.c282 uint32_t *ptr = 0; in run_icpt_122_tests_prefix() local
299 ptr = (uint32_t *)prefix; in run_icpt_122_tests_prefix()
300 WRITE_ONCE(ptr, 0); in run_icpt_122_tests_prefix()
301 ptr = (uint32_t *)(prefix + offsetof(struct lowcore, ars_sa[0])); in run_icpt_122_tests_prefix()
302 WRITE_ONCE(ptr, 0); in run_icpt_122_tests_prefix()
H A Dedat.c31 static bool check_pgm_prot(void *ptr) in check_pgm_prot() argument
52 (teid.addr == ((unsigned long)ptr >> PAGE_SHIFT))); in check_pgm_prot()
/kvm-unit-tests/lib/libfdt/
H A Dfdt_sw.c327 void *ptr; in fdt_property() local
330 ret = fdt_property_placeholder(fdt, name, len, &ptr); in fdt_property()
333 memcpy(ptr, val, len); in fdt_property()
/kvm-unit-tests/lib/arm64/
H A Dgic-v3-its-cmd.c150 static u64 its_cmd_ptr_to_offset(struct its_cmd_block *ptr) in its_cmd_ptr_to_offset() argument
152 return (ptr - its_data.cmd_base) * sizeof(*ptr); in its_cmd_ptr_to_offset()

12