Lines Matching refs:th

167 	struct sfi_table_header *th;  in sfi_map_table()  local
171 th = sfi_map_memory(pa, sizeof(struct sfi_table_header)); in sfi_map_table()
173 th = (void *)syst_va + (pa - syst_pa); in sfi_map_table()
176 if (TABLE_ON_PAGE(th, th, th->len)) in sfi_map_table()
177 return th; in sfi_map_table()
180 length = th->len; in sfi_map_table()
182 sfi_unmap_memory(th, sizeof(struct sfi_table_header)); in sfi_map_table()
193 static void sfi_unmap_table(struct sfi_table_header *th) in sfi_unmap_table() argument
195 if (!TABLE_ON_PAGE(syst_va, th, th->len)) in sfi_unmap_table()
196 sfi_unmap_memory(th, TABLE_ON_PAGE(th, th, th->len) ? in sfi_unmap_table()
197 sizeof(*th) : th->len); in sfi_unmap_table()
200 static int sfi_table_check_key(struct sfi_table_header *th, in sfi_table_check_key() argument
204 if (strncmp(th->sig, key->sig, SFI_SIGNATURE_SIZE) in sfi_table_check_key()
205 || (key->oem_id && strncmp(th->oem_id, in sfi_table_check_key()
207 || (key->oem_table_id && strncmp(th->oem_table_id, in sfi_table_check_key()
234 struct sfi_table_header *th; in sfi_check_table() local
237 th = sfi_map_table(pa); in sfi_check_table()
238 if (!th) in sfi_check_table()
242 sfi_print_table_header(pa, th); in sfi_check_table()
243 if (sfi_verify_table(th)) in sfi_check_table()
246 if (!sfi_table_check_key(th, key)) in sfi_check_table()
247 return th; /* Success */ in sfi_check_table()
250 sfi_unmap_table(th); in sfi_check_table()
262 struct sfi_table_header *th; in sfi_get_table() local
267 th = sfi_check_table(syst_va->pentry[i], key); in sfi_get_table()
268 if (!IS_ERR(th) && th) in sfi_get_table()
269 return th; in sfi_get_table()
275 void sfi_put_table(struct sfi_table_header *th) in sfi_put_table() argument
277 sfi_unmap_table(th); in sfi_put_table()
396 struct sfi_table_header *th = NULL; in sfi_table_show() local
405 th = sfi_get_table(&key); in sfi_table_show()
406 if (!th) in sfi_table_show()
410 th, th->len); in sfi_table_show()
411 sfi_put_table(th); in sfi_table_show()
422 struct sfi_table_header *th; in sfi_sysfs_install_table() local
429 th = sfi_map_table(pa); in sfi_sysfs_install_table()
430 if (!th || !th->sig[0]) { in sfi_sysfs_install_table()
436 memcpy(tbl_attr->name, th->sig, SFI_SIGNATURE_SIZE); in sfi_sysfs_install_table()
450 sfi_unmap_table(th); in sfi_sysfs_install_table()