Lines Matching refs:hrm

67 #define	hrm_match(hrm, as, addr) \
68 (((hrm)->hrm_as == (as) && \
69 ((hrm)->hrm_base == ((uintptr_t)(addr) & HRM_BASEMASK))) ? 1 : 0)
151 struct hrmstat *hrm;
169 for (hrm = hrm_hashtab[h]; hrm; hrm = hrm->hrm_hnext) {
170 if (hrm_match(hrm, as, addr)) {
171 hrm_setbits(hrm, addr, rmbits);
172 vbits |= hrm->hrm_id;
186 hrm = (struct hrmstat *)hrm_balloc();
187 if (hrm == NULL) {
193 hrm->hrm_as = as;
194 hrm->hrm_base = (uintptr_t)addr & HRM_BASEMASK;
195 hrm->hrm_id = nb;
196 hrm_link(hrm);
197 hrm_setbits(hrm, addr, rmbits);
212 struct hrmstat *hrm;
224 if ((hrm = as->a_hrm) == NULL) {
232 for (prev_ahrm = NULL; hrm; hrm = hrm->hrm_anext) {
233 if ((id == hrm->hrm_id) || (id == NULL)) {
235 hrm_hashout(hrm);
236 hrm->hrm_hnext = hrm_blist;
237 hrm_blist = hrm;
241 as->a_hrm = hrm->hrm_anext;
243 prev_ahrm->hrm_anext = hrm->hrm_anext;
246 prev_ahrm = hrm;
283 struct hrmstat *hrm, *l;
307 hrm = kmem_zalloc(sizeof (struct hrmstat) * hrm_incr, KM_SLEEP);
308 hrm->hrm_base = sizeof (struct hrmstat) * hrm_incr;
316 hrm->hrm_hnext = hrm_memlist;
317 hrm_memlist = hrm;
321 l = &hrm[i];
331 hrm_hashin(struct hrmstat *hrm)
336 h = hrm_hash(hrm->hrm_as, hrm->hrm_base);
338 hrm->hrm_hnext = hrm_hashtab[h];
339 hrm_hashtab[h] = hrm;
343 hrm_hashout(struct hrmstat *hrm)
349 h = hrm_hash(hrm->hrm_as, hrm->hrm_base);
354 if (list == hrm) {
369 hrm_link(struct hrmstat *hrm)
371 struct as *as = hrm->hrm_as;
374 hrm->hrm_anext = as->a_hrm;
375 as->a_hrm = hrm;
376 hrm_hashin(hrm);
386 struct hrmstat *hrm;
390 hrm = hrm_blist;
391 if (hrm != NULL) {
392 hrm_blist = hrm->hrm_hnext;
394 hrm->hrm_hnext = NULL;
396 return (hrm);
400 * Set the ref and mod bits for addr within statistics block hrm.
403 hrm_setbits(struct hrmstat *hrm, caddr_t addr, uint_t bits)
412 hrm->hrm_bits[bo] |= nbits;
455 struct hrmstat *hrm;
467 for (hrm = hrm_hashtab[h]; hrm; hrm = hrm->hrm_hnext) {
468 if (hrm->hrm_as == as &&
469 hrm->hrm_base == ((uintptr_t)a & HRM_BASEMASK) &&
470 id == hrm->hrm_id) {
481 *dp++ |= (hrm->hrm_bits[bo] >> spb) & 3;
483 hrm->hrm_bits[bo] &= ~(3<<spb);
493 int bits = hrm->hrm_bits[bo];
499 hrm->hrm_bits[bo] = 0;
510 *dp++ |= (hrm->hrm_bits[bo] >> spb) & 3;
512 hrm->hrm_bits[bo] &= ~(3<<spb);
520 if (hrm == NULL)