Lines Matching full:site
44 static inline void *static_call_addr(struct static_call_site *site) in static_call_addr() argument
46 return (void *)((long)site->addr + (long)&site->addr); in static_call_addr()
49 static inline unsigned long __static_call_key(const struct static_call_site *site) in __static_call_key() argument
51 return (long)site->key + (long)&site->key; in __static_call_key()
54 static inline struct static_call_key *static_call_key(const struct static_call_site *site) in static_call_key() argument
56 return (void *)(__static_call_key(site) & ~STATIC_CALL_SITE_FLAGS); in static_call_key()
60 static inline bool static_call_is_init(struct static_call_site *site) in static_call_is_init() argument
62 return __static_call_key(site) & STATIC_CALL_SITE_INIT; in static_call_is_init()
65 static inline bool static_call_is_tail(struct static_call_site *site) in static_call_is_tail() argument
67 return __static_call_key(site) & STATIC_CALL_SITE_TAIL; in static_call_is_tail()
70 static inline void static_call_set_init(struct static_call_site *site) in static_call_set_init() argument
72 site->key = (__static_call_key(site) | STATIC_CALL_SITE_INIT) - in static_call_set_init()
73 (long)&site->key; in static_call_set_init()
136 struct static_call_site *site, *stop; in __static_call_update() local
187 for (site = site_mod->sites; in __static_call_update()
188 site < stop && static_call_key(site) == key; site++) { in __static_call_update()
189 void *site_addr = static_call_addr(site); in __static_call_update()
191 if (!init && static_call_is_init(site)) in __static_call_update()
203 WARN_ONCE(!static_call_is_init(site), in __static_call_update()
204 "can't patch static call site at %pS", in __static_call_update()
210 static_call_is_tail(site)); in __static_call_update()
224 struct static_call_site *site; in __static_call_init() local
233 for (site = start; site < stop; site++) { in __static_call_init()
234 void *site_addr = static_call_addr(site); in __static_call_init()
238 static_call_set_init(site); in __static_call_init()
240 key = static_call_key(site); in __static_call_init()
253 key->sites = site; in __static_call_init()
280 site_mod->sites = site; in __static_call_init()
287 static_call_is_tail(site)); in __static_call_init()
293 static int addr_conflict(struct static_call_site *site, void *start, void *end) in addr_conflict() argument
295 unsigned long addr = (unsigned long)static_call_addr(site); in addr_conflict()
368 struct static_call_site *site; in static_call_add_module() local
370 for (site = start; site != stop; site++) { in static_call_add_module()
371 unsigned long s_key = __static_call_key(site); in static_call_add_module()
392 static_call_addr(site)); in static_call_add_module()
397 site->key = key - (long)&site->key; in static_call_add_module()
410 struct static_call_site *site; in static_call_del_module() local
412 for (site = start; site < stop; site++) { in static_call_del_module()
413 key = static_call_key(site); in static_call_del_module()