Lines Matching refs:iden

89 static int kvmppc_gsid_class(u16 iden)  in kvmppc_gsid_class()  argument
91 if ((iden >= KVMPPC_GSE_GUESTWIDE_START) && in kvmppc_gsid_class()
92 (iden <= KVMPPC_GSE_GUESTWIDE_END)) in kvmppc_gsid_class()
95 if ((iden >= KVMPPC_GSE_META_START) && (iden <= KVMPPC_GSE_META_END)) in kvmppc_gsid_class()
98 if ((iden >= KVMPPC_GSE_DW_REGS_START) && in kvmppc_gsid_class()
99 (iden <= KVMPPC_GSE_DW_REGS_END)) in kvmppc_gsid_class()
102 if ((iden >= KVMPPC_GSE_W_REGS_START) && in kvmppc_gsid_class()
103 (iden <= KVMPPC_GSE_W_REGS_END)) in kvmppc_gsid_class()
106 if ((iden >= KVMPPC_GSE_VSRS_START) && (iden <= KVMPPC_GSE_VSRS_END)) in kvmppc_gsid_class()
109 if ((iden >= KVMPPC_GSE_INTR_REGS_START) && in kvmppc_gsid_class()
110 (iden <= KVMPPC_GSE_INTR_REGS_END)) in kvmppc_gsid_class()
116 static int kvmppc_gsid_type(u16 iden) in kvmppc_gsid_type() argument
120 switch (kvmppc_gsid_class(iden)) { in kvmppc_gsid_type()
122 switch (iden) { in kvmppc_gsid_type()
140 switch (iden) { in kvmppc_gsid_type()
160 switch (iden) { in kvmppc_gsid_type()
182 unsigned long kvmppc_gsid_flags(u16 iden) in kvmppc_gsid_flags() argument
186 switch (kvmppc_gsid_class(iden)) { in kvmppc_gsid_flags()
208 u16 kvmppc_gsid_size(u16 iden) in kvmppc_gsid_size() argument
212 type = kvmppc_gsid_type(iden); in kvmppc_gsid_size()
229 u64 kvmppc_gsid_mask(u16 iden) in kvmppc_gsid_mask() argument
233 switch (iden) { in kvmppc_gsid_mask()
254 int __kvmppc_gse_put(struct kvmppc_gs_buff *gsb, u16 iden, u16 size, in __kvmppc_gse_put() argument
264 if (kvmppc_gsid_size(iden) != size) in __kvmppc_gse_put()
268 gse->iden = cpu_to_be16(iden); in __kvmppc_gse_put()
299 static inline int kvmppc_gse_flatten_iden(u16 iden) in kvmppc_gse_flatten_iden() argument
304 class = kvmppc_gsid_class(iden); in kvmppc_gse_flatten_iden()
307 bit += iden - KVMPPC_GSE_GUESTWIDE_START; in kvmppc_gse_flatten_iden()
314 bit += iden - KVMPPC_GSE_META_START; in kvmppc_gse_flatten_iden()
321 bit += iden - KVMPPC_GSE_DW_REGS_START; in kvmppc_gse_flatten_iden()
328 bit += iden - KVMPPC_GSE_W_REGS_START; in kvmppc_gse_flatten_iden()
335 bit += iden - KVMPPC_GSE_VSRS_START; in kvmppc_gse_flatten_iden()
342 bit += iden - KVMPPC_GSE_INTR_REGS_START; in kvmppc_gse_flatten_iden()
351 u16 iden; in kvmppc_gse_unflatten_iden() local
354 iden = KVMPPC_GSE_GUESTWIDE_START + bit; in kvmppc_gse_unflatten_iden()
355 return iden; in kvmppc_gse_unflatten_iden()
360 iden = KVMPPC_GSE_META_START + bit; in kvmppc_gse_unflatten_iden()
361 return iden; in kvmppc_gse_unflatten_iden()
366 iden = KVMPPC_GSE_DW_REGS_START + bit; in kvmppc_gse_unflatten_iden()
367 return iden; in kvmppc_gse_unflatten_iden()
372 iden = KVMPPC_GSE_W_REGS_START + bit; in kvmppc_gse_unflatten_iden()
373 return iden; in kvmppc_gse_unflatten_iden()
378 iden = KVMPPC_GSE_VSRS_START + bit; in kvmppc_gse_unflatten_iden()
379 return iden; in kvmppc_gse_unflatten_iden()
384 iden = KVMPPC_GSE_INTR_REGS_START + bit; in kvmppc_gse_unflatten_iden()
385 return iden; in kvmppc_gse_unflatten_iden()
397 void kvmppc_gsp_insert(struct kvmppc_gs_parser *gsp, u16 iden, in kvmppc_gsp_insert() argument
402 i = kvmppc_gse_flatten_iden(iden); in kvmppc_gsp_insert()
403 kvmppc_gsbm_set(&gsp->iterator, iden); in kvmppc_gsp_insert()
415 struct kvmppc_gs_elem *kvmppc_gsp_lookup(struct kvmppc_gs_parser *gsp, u16 iden) in kvmppc_gsp_lookup() argument
419 i = kvmppc_gse_flatten_iden(iden); in kvmppc_gsp_lookup()
429 void kvmppc_gsbm_set(struct kvmppc_gs_bitmap *gsbm, u16 iden) in kvmppc_gsbm_set() argument
431 set_bit(kvmppc_gse_flatten_iden(iden), gsbm->bitmap); in kvmppc_gsbm_set()
440 void kvmppc_gsbm_clear(struct kvmppc_gs_bitmap *gsbm, u16 iden) in kvmppc_gsbm_clear() argument
442 clear_bit(kvmppc_gse_flatten_iden(iden), gsbm->bitmap); in kvmppc_gsbm_clear()
451 bool kvmppc_gsbm_test(struct kvmppc_gs_bitmap *gsbm, u16 iden) in kvmppc_gsbm_test() argument
453 return test_bit(kvmppc_gse_flatten_iden(iden), gsbm->bitmap); in kvmppc_gsbm_test()