Lines Matching refs:p

186 static void set_inverse_transl(struct vc_data *conp, struct uni_pagedir *p, int i)  in set_inverse_transl()  argument
192 if (!p) return; in set_inverse_transl()
193 q = p->inverse_translations[i]; in set_inverse_transl()
196 q = p->inverse_translations[i] = kmalloc(MAX_GLYPH, GFP_KERNEL); in set_inverse_transl()
211 struct uni_pagedir *p) in set_inverse_trans_unicode() argument
217 if (!p) return; in set_inverse_trans_unicode()
218 q = p->inverse_trans_unicode; in set_inverse_trans_unicode()
220 q = p->inverse_trans_unicode = in set_inverse_trans_unicode()
228 p1 = p->uni_pgdir[i]; in set_inverse_trans_unicode()
260 struct uni_pagedir *p; in inverse_translate() local
264 else if (!(p = *conp->vc_uni_pagedir_loc)) in inverse_translate()
267 if (!p->inverse_trans_unicode) in inverse_translate()
270 return p->inverse_trans_unicode[glyph]; in inverse_translate()
273 if (!p->inverse_translations[m]) in inverse_translate()
276 return p->inverse_translations[m][glyph]; in inverse_translate()
284 struct uni_pagedir *p, *q = NULL; in update_user_maps() local
289 p = *vc_cons[i].d->vc_uni_pagedir_loc; in update_user_maps()
290 if (p && p != q) { in update_user_maps()
291 set_inverse_transl(vc_cons[i].d, p, USER_MAP); in update_user_maps()
292 set_inverse_trans_unicode(vc_cons[i].d, p); in update_user_maps()
293 q = p; in update_user_maps()
309 unsigned short *p = translations[USER_MAP]; in con_set_trans_old() local
318 p[i] = UNI_DIRECT_BASE | uc; in con_set_trans_old()
329 unsigned short *p = translations[USER_MAP]; in con_get_trans_old() local
337 ch = conv_uni_to_pc(vc_cons[fg_console].d, p[i]); in con_get_trans_old()
347 unsigned short *p = translations[USER_MAP]; in con_set_trans_new() local
356 p[i] = us; in con_set_trans_new()
367 unsigned short *p = translations[USER_MAP]; in con_get_trans_new() local
374 __put_user(p[i], arg+i); in con_get_trans_new()
393 static void con_release_unimap(struct uni_pagedir *p) in con_release_unimap() argument
398 if (p == dflt) dflt = NULL; in con_release_unimap()
400 if ((p1 = p->uni_pgdir[i]) != NULL) { in con_release_unimap()
405 p->uni_pgdir[i] = NULL; in con_release_unimap()
408 kfree(p->inverse_translations[i]); in con_release_unimap()
409 p->inverse_translations[i] = NULL; in con_release_unimap()
411 kfree(p->inverse_trans_unicode); in con_release_unimap()
412 p->inverse_trans_unicode = NULL; in con_release_unimap()
418 struct uni_pagedir *p; in con_free_unimap() local
420 p = *vc->vc_uni_pagedir_loc; in con_free_unimap()
421 if (!p) in con_free_unimap()
424 if (--p->refcount) in con_free_unimap()
426 con_release_unimap(p); in con_free_unimap()
427 kfree(p); in con_free_unimap()
430 static int con_unify_unimap(struct vc_data *conp, struct uni_pagedir *p) in con_unify_unimap() argument
439 if (!q || q == p || q->sum != p->sum) in con_unify_unimap()
443 p1 = p->uni_pgdir[j]; q1 = q->uni_pgdir[j]; in con_unify_unimap()
462 con_release_unimap(p); in con_unify_unimap()
463 kfree(p); in con_unify_unimap()
471 con_insert_unipair(struct uni_pagedir *p, u_short unicode, u_short fontpos) in con_insert_unipair() argument
476 if (!(p1 = p->uni_pgdir[n = unicode >> 11])) { in con_insert_unipair()
477 p1 = p->uni_pgdir[n] = kmalloc(32*sizeof(u16 *), GFP_KERNEL); in con_insert_unipair()
491 p->sum += (fontpos << 20) + unicode; in con_insert_unipair()
500 struct uni_pagedir *p, *q; in con_do_clear_unimap() local
502 p = *vc->vc_uni_pagedir_loc; in con_do_clear_unimap()
503 if (!p || --p->refcount) { in con_do_clear_unimap()
504 q = kzalloc(sizeof(*p), GFP_KERNEL); in con_do_clear_unimap()
506 if (p) in con_do_clear_unimap()
507 p->refcount++; in con_do_clear_unimap()
513 if (p == dflt) dflt = NULL; in con_do_clear_unimap()
514 p->refcount++; in con_do_clear_unimap()
515 p->sum = 0; in con_do_clear_unimap()
516 con_release_unimap(p); in con_do_clear_unimap()
533 struct uni_pagedir *p, *q; in con_set_unimap() local
541 p = *vc->vc_uni_pagedir_loc; in con_set_unimap()
543 if (!p) { in con_set_unimap()
549 if (p->refcount > 1) { in con_set_unimap()
573 if ((p1 = p->uni_pgdir[i])) in con_set_unimap()
584 p->refcount++; in con_set_unimap()
585 *vc->vc_uni_pagedir_loc = p; in con_set_unimap()
603 p = q; in con_set_unimap()
604 } else if (p == dflt) { in con_set_unimap()
615 if ((err1 = con_insert_unipair(p, unicode,fontpos)) != 0) in con_set_unimap()
623 if (con_unify_unimap(vc, p)) { in con_set_unimap()
629 set_inverse_transl(vc, p, i); /* Update inverse translations */ in con_set_unimap()
630 set_inverse_trans_unicode(vc, p); in con_set_unimap()
652 struct uni_pagedir *p; in con_set_default_unimap() local
655 p = *vc->vc_uni_pagedir_loc; in con_set_default_unimap()
656 if (p == dflt) in con_set_default_unimap()
661 if (p && !--p->refcount) { in con_set_default_unimap()
662 con_release_unimap(p); in con_set_default_unimap()
663 kfree(p); in con_set_default_unimap()
674 p = *vc->vc_uni_pagedir_loc; in con_set_default_unimap()
679 err1 = con_insert_unipair(p, *(q++), i); in con_set_default_unimap()
684 if (con_unify_unimap(vc, p)) { in con_set_default_unimap()
690 set_inverse_transl(vc, p, i); /* Update all inverse translations */ in con_set_default_unimap()
691 set_inverse_trans_unicode(vc, p); in con_set_default_unimap()
692 dflt = p; in con_set_default_unimap()
731 struct uni_pagedir *p; in con_get_unimap() local
737 p = *vc->vc_uni_pagedir_loc; in con_get_unimap()
739 if ((p1 = p->uni_pgdir[i])) in con_get_unimap()
790 struct uni_pagedir *p; in conv_uni_to_pc() local
810 p = *conp->vc_uni_pagedir_loc; in conv_uni_to_pc()
811 if ((p1 = p->uni_pgdir[ucs >> 11]) && in conv_uni_to_pc()