[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC 5/8] aie: add module for Atomic Instruction Emulat
From: |
Emilio G. Cota |
Subject: |
Re: [Qemu-devel] [RFC 5/8] aie: add module for Atomic Instruction Emulation |
Date: |
Fri, 8 May 2015 18:41:35 -0400 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Fri, May 08, 2015 at 17:02:11 -0400, Emilio G. Cota wrote:
> +++ b/aie.c
(snip)
> +static inline void *aie_entry_init(unsigned long index)
> +{
> + AIEEntry *entry;
> +
> + entry = qemu_memalign(64, sizeof(*entry));
> + tiny_set_init(&entry->ts);
> + qemu_mutex_init(&entry->lock);
> + return entry;
> +}
> +
> +AIEEntry *aie_entry_get_lock(hwaddr addr)
> +{
> + aie_addr_t laddr = to_aie(addr);
> + AIEEntry *e;
> +
> + e = qemu_radix_tree_find_alloc(&aie_rtree, laddr, aie_entry_init,
> g_free);
s/g_free/qemu_vfree/, since the allocation is done (above) with
qemu_memalign.
The tree doesn't support deletions, but still..
Emilio
- [Qemu-devel] [RFC 0/8] Helper-based Atomic Instruction Emulation (AIE), Emilio G. Cota, 2015/05/08
- [Qemu-devel] [RFC 1/8] cputlb: add physical address to CPUTLBEntry, Emilio G. Cota, 2015/05/08
- [Qemu-devel] [RFC 3/8] tiny_set: add module to test for membership in a tiny set of pointers, Emilio G. Cota, 2015/05/08
- [Qemu-devel] [RFC 2/8] softmmu: add helpers to get ld/st physical addresses, Emilio G. Cota, 2015/05/08
- [Qemu-devel] [RFC 4/8] radix-tree: add generic lockless radix tree module, Emilio G. Cota, 2015/05/08
- [Qemu-devel] [RFC 5/8] aie: add module for Atomic Instruction Emulation, Emilio G. Cota, 2015/05/08
- Re: [Qemu-devel] [RFC 5/8] aie: add module for Atomic Instruction Emulation,
Emilio G. Cota <=
- [Qemu-devel] [RFC 6/8] aie: add target helpers, Emilio G. Cota, 2015/05/08
- [Qemu-devel] [RFC 7/8] target-arm: emulate atomic instructions using AIE, Emilio G. Cota, 2015/05/08
- [Qemu-devel] [RFC 8/8] target-i386: emulate atomic instructions using AIE, Emilio G. Cota, 2015/05/08
- Re: [Qemu-devel] [RFC 0/8] Helper-based Atomic Instruction Emulation (AIE), Frederic Konrad, 2015/05/11