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
265 p = *conp->vc_uni_pagedir_loc; in inverse_translate()
266 if (!p) in inverse_translate()
269 if (!p->inverse_trans_unicode) in inverse_translate()
272 return p->inverse_trans_unicode[glyph]; in inverse_translate()
275 if (!p->inverse_translations[m]) in inverse_translate()
278 return p->inverse_translations[m][glyph]; in inverse_translate()
287 struct uni_pagedir *p, *q = NULL; in update_user_maps() local
292 p = *vc_cons[i].d->vc_uni_pagedir_loc; in update_user_maps()
293 if (p && p != q) { in update_user_maps()
294 set_inverse_transl(vc_cons[i].d, p, USER_MAP); in update_user_maps()
295 set_inverse_trans_unicode(vc_cons[i].d, p); in update_user_maps()
296 q = p; in update_user_maps()
312 unsigned short *p = translations[USER_MAP]; in con_set_trans_old() local
321 p[i] = UNI_DIRECT_BASE | uc; in con_set_trans_old()
332 unsigned short *p = translations[USER_MAP]; in con_get_trans_old() local
340 ch = conv_uni_to_pc(vc_cons[fg_console].d, p[i]); in con_get_trans_old()
350 unsigned short *p = translations[USER_MAP]; in con_set_trans_new() local
359 p[i] = us; in con_set_trans_new()
370 unsigned short *p = translations[USER_MAP]; in con_get_trans_new() local
377 __put_user(p[i], arg+i); in con_get_trans_new()
396 static void con_release_unimap(struct uni_pagedir *p) in con_release_unimap() argument
401 if (p == dflt) dflt = NULL; in con_release_unimap()
403 p1 = p->uni_pgdir[i]; in con_release_unimap()
409 p->uni_pgdir[i] = NULL; in con_release_unimap()
412 kfree(p->inverse_translations[i]); in con_release_unimap()
413 p->inverse_translations[i] = NULL; in con_release_unimap()
415 kfree(p->inverse_trans_unicode); in con_release_unimap()
416 p->inverse_trans_unicode = NULL; in con_release_unimap()
422 struct uni_pagedir *p; in con_free_unimap() local
424 p = *vc->vc_uni_pagedir_loc; in con_free_unimap()
425 if (!p) in con_free_unimap()
428 if (--p->refcount) in con_free_unimap()
430 con_release_unimap(p); in con_free_unimap()
431 kfree(p); in con_free_unimap()
434 static int con_unify_unimap(struct vc_data *conp, struct uni_pagedir *p) in con_unify_unimap() argument
443 if (!q || q == p || q->sum != p->sum) in con_unify_unimap()
447 p1 = p->uni_pgdir[j]; q1 = q->uni_pgdir[j]; in con_unify_unimap()
466 con_release_unimap(p); in con_unify_unimap()
467 kfree(p); in con_unify_unimap()
475 con_insert_unipair(struct uni_pagedir *p, u_short unicode, u_short fontpos) in con_insert_unipair() argument
480 p1 = p->uni_pgdir[n = unicode >> 11]; in con_insert_unipair()
482 p1 = p->uni_pgdir[n] = kmalloc(32*sizeof(u16 *), GFP_KERNEL); in con_insert_unipair()
497 p->sum += (fontpos << 20) + unicode; in con_insert_unipair()
506 struct uni_pagedir *p, *q; in con_do_clear_unimap() local
508 p = *vc->vc_uni_pagedir_loc; in con_do_clear_unimap()
509 if (!p || --p->refcount) { in con_do_clear_unimap()
510 q = kzalloc(sizeof(*p), GFP_KERNEL); in con_do_clear_unimap()
512 if (p) in con_do_clear_unimap()
513 p->refcount++; in con_do_clear_unimap()
519 if (p == dflt) dflt = NULL; in con_do_clear_unimap()
520 p->refcount++; in con_do_clear_unimap()
521 p->sum = 0; in con_do_clear_unimap()
522 con_release_unimap(p); in con_do_clear_unimap()
539 struct uni_pagedir *p, *q; in con_set_unimap() local
547 p = *vc->vc_uni_pagedir_loc; in con_set_unimap()
549 if (!p) { in con_set_unimap()
555 if (p->refcount > 1) { in con_set_unimap()
579 p1 = p->uni_pgdir[i]; in con_set_unimap()
592 p->refcount++; in con_set_unimap()
593 *vc->vc_uni_pagedir_loc = p; in con_set_unimap()
613 p = q; in con_set_unimap()
614 } else if (p == dflt) { in con_set_unimap()
625 if ((err1 = con_insert_unipair(p, unicode,fontpos)) != 0) in con_set_unimap()
633 if (con_unify_unimap(vc, p)) { in con_set_unimap()
639 set_inverse_transl(vc, p, i); /* Update inverse translations */ in con_set_unimap()
640 set_inverse_trans_unicode(vc, p); in con_set_unimap()
662 struct uni_pagedir *p; in con_set_default_unimap() local
665 p = *vc->vc_uni_pagedir_loc; in con_set_default_unimap()
666 if (p == dflt) in con_set_default_unimap()
671 if (p && !--p->refcount) { in con_set_default_unimap()
672 con_release_unimap(p); in con_set_default_unimap()
673 kfree(p); in con_set_default_unimap()
684 p = *vc->vc_uni_pagedir_loc; in con_set_default_unimap()
689 err1 = con_insert_unipair(p, *(q++), i); in con_set_default_unimap()
694 if (con_unify_unimap(vc, p)) { in con_set_default_unimap()
700 set_inverse_transl(vc, p, i); /* Update all inverse translations */ in con_set_default_unimap()
701 set_inverse_trans_unicode(vc, p); in con_set_default_unimap()
702 dflt = p; in con_set_default_unimap()
741 struct uni_pagedir *p; in con_get_unimap() local
747 p = *vc->vc_uni_pagedir_loc; in con_get_unimap()
749 p1 = p->uni_pgdir[i]; in con_get_unimap()
804 struct uni_pagedir *p; in conv_uni_to_pc() local
824 p = *conp->vc_uni_pagedir_loc; in conv_uni_to_pc()
825 if ((p1 = p->uni_pgdir[ucs >> 11]) && in conv_uni_to_pc()