summaryrefslogtreecommitdiff
path: root/arch/sandbox/include/asm/state.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2024-09-01 16:26:27 -0600
committerTom Rini <trini@konsulko.com>2024-09-18 13:01:00 -0600
commitf452e8f092b3e500ac955e44b7a3f1680d62d8f7 (patch)
tree19f40f83ee123b09286180db8fb2c2246f0b5893 /arch/sandbox/include/asm/state.h
parent505b21b60720f00ef67d880fa7f176cbd207c1c3 (diff)
sandbox: Implement reference counting for address mapping
An address may be mapped twice and unmapped twice. Delete the mapping only when the last user unmaps it. Fix a missing comment while here. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/sandbox/include/asm/state.h')
-rw-r--r--arch/sandbox/include/asm/state.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/sandbox/include/asm/state.h b/arch/sandbox/include/asm/state.h
index 6b50473ed41..e7dc01759e8 100644
--- a/arch/sandbox/include/asm/state.h
+++ b/arch/sandbox/include/asm/state.h
@@ -53,10 +53,13 @@ struct sandbox_wdt_info {
* be returned, just as it would for a normal sandbox address.
*
* @tag: Address tag (a value which U-Boot uses to refer to the address)
+ * @refcnt: Number of references to this tag
* @ptr: Associated pointer for that tag
+ * @sibling_node: Next node
*/
struct sandbox_mapmem_entry {
ulong tag;
+ uint refcnt;
void *ptr;
struct list_head sibling_node;
};