Lines Matching refs:hep

328 	struct cmi_msri_hashent *hep;  in msri_addent()  local
332 for (hep = hbp->msrib_head; hep != NULL; hep = hep->msrie_next) { in msri_addent()
333 if (CMI_MSRI_MATCH(hep, hdl, msr)) in msri_addent()
337 if (hep != NULL) { in msri_addent()
338 hep->msrie_msrval = val; in msri_addent()
340 hep = kmem_alloc(sizeof (*hep), KM_SLEEP); in msri_addent()
341 hep->msrie_hdl = hdl; in msri_addent()
342 hep->msrie_msrnum = msr; in msri_addent()
343 hep->msrie_msrval = val; in msri_addent()
346 hbp->msrib_head->msrie_prev = hep; in msri_addent()
347 hep->msrie_next = hbp->msrib_head; in msri_addent()
348 hep->msrie_prev = NULL; in msri_addent()
349 hbp->msrib_head = hep; in msri_addent()
364 struct cmi_msri_hashent *hep; in msri_lookup() local
377 for (hep = hbp->msrib_head; hep != NULL; hep = hep->msrie_next) { in msri_lookup()
378 if (CMI_MSRI_MATCH(hep, hdl, msr)) { in msri_lookup()
379 *valp = hep->msrie_msrval; in msri_lookup()
386 return (hep != NULL); in msri_lookup()
398 struct cmi_msri_hashent *hep; in msri_rment() local
403 for (hep = hbp->msrib_head; hep != NULL; hep = hep->msrie_next) { in msri_rment()
404 if (CMI_MSRI_MATCH(hep, hdl, msr)) { in msri_rment()
405 if (hep->msrie_prev != NULL) in msri_rment()
406 hep->msrie_prev->msrie_next = hep->msrie_next; in msri_rment()
408 if (hep->msrie_next != NULL) in msri_rment()
409 hep->msrie_next->msrie_prev = hep->msrie_prev; in msri_rment()
411 if (hbp->msrib_head == hep) in msri_rment()
412 hbp->msrib_head = hep->msrie_next; in msri_rment()
414 kmem_free(hep, sizeof (*hep)); in msri_rment()
476 struct cmi_pcii_hashent *hep; in pcii_addent() local
482 for (hep = hbp->pciib_head; hep != NULL; hep = hep->pcii_next) { in pcii_addent()
483 if (CMI_PCII_MATCH(hep, bus, dev, func, reg, asz)) in pcii_addent()
487 if (hep != NULL) { in pcii_addent()
488 hep->pcii_val = val; in pcii_addent()
490 hep = kmem_alloc(sizeof (*hep), KM_SLEEP); in pcii_addent()
491 hep->pcii_bus = bus; in pcii_addent()
492 hep->pcii_dev = dev; in pcii_addent()
493 hep->pcii_func = func; in pcii_addent()
494 hep->pcii_reg = reg; in pcii_addent()
495 hep->pcii_asize = asz; in pcii_addent()
496 hep->pcii_val = val; in pcii_addent()
499 hbp->pciib_head->pcii_prev = hep; in pcii_addent()
500 hep->pcii_next = hbp->pciib_head; in pcii_addent()
501 hep->pcii_prev = NULL; in pcii_addent()
502 hbp->pciib_head = hep; in pcii_addent()
519 struct cmi_pcii_hashent *hep; in pcii_lookup() local
524 for (hep = hbp->pciib_head; hep != NULL; hep = hep->pcii_next) { in pcii_lookup()
525 if (CMI_PCII_MATCH(hep, bus, dev, func, reg, asz)) { in pcii_lookup()
526 *valp = hep->pcii_val; in pcii_lookup()
533 return (hep != NULL); in pcii_lookup()
541 struct cmi_pcii_hashent *hep; in pcii_rment() local
545 for (hep = hbp->pciib_head; hep != NULL; hep = hep->pcii_next) { in pcii_rment()
546 if (CMI_PCII_MATCH(hep, bus, dev, func, reg, asz)) { in pcii_rment()
547 if (hep->pcii_prev != NULL) in pcii_rment()
548 hep->pcii_prev->pcii_next = hep->pcii_next; in pcii_rment()
550 if (hep->pcii_next != NULL) in pcii_rment()
551 hep->pcii_next->pcii_prev = hep->pcii_prev; in pcii_rment()
553 if (hbp->pciib_head == hep) in pcii_rment()
554 hbp->pciib_head = hep->pcii_next; in pcii_rment()
556 kmem_free(hep, sizeof (*hep)); in pcii_rment()