Lines Matching refs:sc
93 unsigned long update_symbol_cache(struct symbol_cache *sc) in update_symbol_cache() argument
95 sc->addr = (unsigned long)kallsyms_lookup_name(sc->symbol); in update_symbol_cache()
97 if (sc->addr) in update_symbol_cache()
98 sc->addr += sc->offset; in update_symbol_cache()
100 return sc->addr; in update_symbol_cache()
103 void free_symbol_cache(struct symbol_cache *sc) in free_symbol_cache() argument
105 kfree(sc->symbol); in free_symbol_cache()
106 kfree(sc); in free_symbol_cache()
111 struct symbol_cache *sc; in alloc_symbol_cache() local
116 sc = kzalloc(sizeof(struct symbol_cache), GFP_KERNEL); in alloc_symbol_cache()
117 if (!sc) in alloc_symbol_cache()
120 sc->symbol = kstrdup(sym, GFP_KERNEL); in alloc_symbol_cache()
121 if (!sc->symbol) { in alloc_symbol_cache()
122 kfree(sc); in alloc_symbol_cache()
125 sc->offset = offset; in alloc_symbol_cache()
126 update_symbol_cache(sc); in alloc_symbol_cache()
128 return sc; in alloc_symbol_cache()
220 struct symbol_cache *sc = data; \
221 if (sc->addr) \
222 fetch_memory_##type(regs, (void *)sc->addr, dest); \