git: 04fc3fb8fcf6 - main - rman: Remove rman_set_start/end
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 27 Feb 2024 19:45:03 UTC
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=04fc3fb8fcf631889ec9a181504e6ae1daebd3cd commit 04fc3fb8fcf631889ec9a181504e6ae1daebd3cd Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2024-02-27 19:43:34 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2024-02-27 19:43:34 +0000 rman: Remove rman_set_start/end These functions are not safe as the rman implementation assumes that all regions (including allocated resources) are sorted by address in the internal linked-list. Differential Revision: https://reviews.freebsd.org/D43936 --- sys/kern/subr_rman.c | 14 -------------- sys/sys/rman.h | 2 -- 2 files changed, 16 deletions(-) diff --git a/sys/kern/subr_rman.c b/sys/kern/subr_rman.c index 90a35ef885bf..792d03726c74 100644 --- a/sys/kern/subr_rman.c +++ b/sys/kern/subr_rman.c @@ -808,13 +808,6 @@ rman_make_alignment_flags(uint32_t size) return(RF_ALIGNMENT_LOG2(i)); } -void -rman_set_start(struct resource *r, rman_res_t start) -{ - - r->__r_i->r_start = start; -} - rman_res_t rman_get_start(struct resource *r) { @@ -822,13 +815,6 @@ rman_get_start(struct resource *r) return (r->__r_i->r_start); } -void -rman_set_end(struct resource *r, rman_res_t end) -{ - - r->__r_i->r_end = end; -} - rman_res_t rman_get_end(struct resource *r) { diff --git a/sys/sys/rman.h b/sys/sys/rman.h index bb63c4dfb100..9e8e3b878c5a 100644 --- a/sys/sys/rman.h +++ b/sys/sys/rman.h @@ -153,11 +153,9 @@ struct resource *rman_reserve_resource_bound(struct rman *rm, rman_res_t start, void rman_set_bushandle(struct resource *_r, bus_space_handle_t _h); void rman_set_bustag(struct resource *_r, bus_space_tag_t _t); void rman_set_device(struct resource *_r, device_t _dev); -void rman_set_end(struct resource *_r, rman_res_t _end); void rman_set_irq_cookie(struct resource *_r, void *_c); void rman_set_mapping(struct resource *, struct resource_map *); void rman_set_rid(struct resource *_r, int _rid); -void rman_set_start(struct resource *_r, rman_res_t _start); void rman_set_virtual(struct resource *_r, void *_v); extern struct rman_head rman_head;