Lines Matching refs:gsp
58 struct g_slicer *gsp; in g_slice_alloc() local
60 gsp = g_malloc(sizeof *gsp, M_WAITOK | M_ZERO); in g_slice_alloc()
62 gsp->softc = g_malloc(scsize, M_WAITOK | M_ZERO); in g_slice_alloc()
64 gsp->softc = NULL; in g_slice_alloc()
65 gsp->slices = g_malloc(nslice * sizeof(struct g_slice), in g_slice_alloc()
67 gsp->nslice = nslice; in g_slice_alloc()
68 return (gsp); in g_slice_alloc()
74 struct g_slicer *gsp; in g_slice_free() local
76 gsp = gp->softc; in g_slice_free()
84 if (gsp == NULL) in g_slice_free()
86 g_free(gsp->slices); in g_slice_free()
87 g_free(gsp->hotspot); in g_slice_free()
88 g_free(gsp->softc); in g_slice_free()
89 g_free(gsp); in g_slice_free()
100 struct g_slicer *gsp; in g_slice_access() local
106 gsp = gp->softc; in g_slice_access()
108 gsl = &gsp->slices[pp->index]; in g_slice_access()
109 for (u = 0; u < gsp->nslice; u++) { in g_slice_access()
110 gsl2 = &gsp->slices[u]; in g_slice_access()
159 struct g_slicer *gsp; in g_slice_finish_hot() local
168 gsp = gp->softc; in g_slice_finish_hot()
172 gsl = &gsp->slices[idx]; in g_slice_finish_hot()
216 struct g_slicer *gsp; in g_slice_start() local
225 gsp = gp->softc; in g_slice_start()
228 gsl = &gsp->slices[idx]; in g_slice_start()
242 for (m_index = 0; m_index < gsp->nhotspot; m_index++) { in g_slice_start()
243 ghp = &gsp->hotspot[m_index]; in g_slice_start()
261 error = gsp->start(bp); in g_slice_start()
266 error = g_post_event(gsp->hot, bp, M_NOWAIT, in g_slice_start()
287 if (gsp->start != NULL && gsp->start(bp)) in g_slice_start()
303 gkd->offset += gsp->slices[idx].offset; in g_slice_start()
304 if (gkd->length > gsp->slices[idx].length) in g_slice_start()
305 gkd->length = gsp->slices[idx].length; in g_slice_start()
328 struct g_slicer *gsp; in g_slice_dumpconf() local
330 gsp = gp->softc; in g_slice_dumpconf()
334 (uintmax_t)gsp->slices[pp->index].offset); in g_slice_dumpconf()
340 indent, (uintmax_t)gsp->slices[pp->index].length); in g_slice_dumpconf()
342 (uintmax_t)gsp->slices[pp->index].length / 512); in g_slice_dumpconf()
344 (uintmax_t)gsp->slices[pp->index].offset); in g_slice_dumpconf()
346 (uintmax_t)gsp->slices[pp->index].offset / 512); in g_slice_dumpconf()
354 struct g_slicer *gsp; in g_slice_config() local
363 gsp = gp->softc; in g_slice_config()
364 if (idx >= gsp->nslice) in g_slice_config()
366 gsl = &gsp->slices[idx]; in g_slice_config()
391 gsp->nprovider--; in g_slice_config()
413 if (gsp->nhotspot == 0) { in g_slice_config()
425 gsp->nprovider++; in g_slice_config()
447 struct g_slicer *gsp; in g_slice_conf_hot() local
455 gsp = gp->softc; in g_slice_conf_hot()
457 if (gsp->nhotspot == 0) { in g_slice_conf_hot()
464 gsl = gsp->hotspot; in g_slice_conf_hot()
465 if(idx >= gsp->nhotspot) { in g_slice_conf_hot()
467 if (gsp->hotspot != NULL) in g_slice_conf_hot()
468 bcopy(gsp->hotspot, gsl2, gsp->nhotspot * sizeof *gsl2); in g_slice_conf_hot()
469 gsp->hotspot = gsl2; in g_slice_conf_hot()
470 if (gsp->hotspot != NULL) in g_slice_conf_hot()
473 gsp->nhotspot = idx + 1; in g_slice_conf_hot()
478 || gsp->start != NULL, ("G_SLICE_HOT_START but no slice->start")); in g_slice_conf_hot()
525 struct g_slicer *gsp; in g_slice_new() local
533 gsp = g_slice_alloc(slices, extra); in g_slice_new()
534 gsp->start = start; in g_slice_new()
535 gp->softc = gsp; in g_slice_new()
554 *vp = gsp->softc; in g_slice_new()