Lines Matching refs:bdp

345 	sbdp_bd_t	*bdp;  member
360 mem.nodes = smdp->bdp->nodes; in sbdp_get_mem_dip()
361 mem.board = smdp->bdp->bd; in sbdp_get_mem_dip()
362 mem.nmem = smdp->bdp->nnum; in sbdp_get_mem_dip()
369 if (smdp->bdp->nnum == 0 && mem.nmem == 1) { in sbdp_get_mem_dip()
374 smdp->bdp->nnum = mem.nmem; in sbdp_get_mem_dip()
384 sbdp_update_bd_info(sbdp_bd_t *bdp) in sbdp_update_bd_info() argument
392 if (bdp == NULL) { in sbdp_update_bd_info()
398 mutex_enter(&bdp->bd_mutex); in sbdp_update_bd_info()
404 apktp->node = bdp->wnode; in sbdp_update_bd_info()
405 apktp->board = bdp->bd; in sbdp_update_bd_info()
415 bdp->nnum = 0; in sbdp_update_bd_info()
416 smd.bdp = bdp; in sbdp_update_bd_info()
427 hp->h_board = bdp->bd; in sbdp_update_bd_info()
428 hp->h_wnode = bdp->wnode; in sbdp_update_bd_info()
430 if (bdp->ml != NULL) { in sbdp_update_bd_info()
431 (void) sbdp_del_memlist(hp, bdp->ml); in sbdp_update_bd_info()
433 bdp->ml = sbdp_get_memlist(hp, (dev_info_t *)NULL); in sbdp_update_bd_info()
439 if (bdp->banks == NULL) { in sbdp_update_bd_info()
440 sbdp_init_bd_banks(bdp); in sbdp_update_bd_info()
443 sbdp_print_bd_banks(bdp); in sbdp_update_bd_info()
446 if (sbdphw_get_base_physaddr(hp, smd.dip, &bdp->bpa)) in sbdp_update_bd_info()
447 bdp->bpa = -1; in sbdp_update_bd_info()
452 mutex_exit(&bdp->bd_mutex); in sbdp_update_bd_info()
460 sbdp_bd_init(sbdp_bd_t *bdp, int bd, int wnode) in sbdp_bd_init() argument
466 bdp->bd = bd; in sbdp_bd_init()
467 bdp->wnode = wnode; in sbdp_bd_init()
469 SBDP_UNSET_ALL_CPUS_IN_RESET(bdp); in sbdp_bd_init()
471 bdp->cpus_present = 0; in sbdp_bd_init()
473 sbdp_update_bd_info(bdp); in sbdp_bd_init()
475 mutex_init(&bdp->bd_mutex, NULL, MUTEX_DRIVER, NULL); in sbdp_bd_init()
476 bdp->bd_sc = (show_board_t *)kmem_zalloc(sizeof (show_board_t), in sbdp_bd_init()
478 bdp->valid_cp = -1; in sbdp_bd_init()
485 sbdp_bd_fini(sbdp_bd_t *bdp) in sbdp_bd_fini() argument
491 sbdp_cleanup_bd(bdp->wnode, bdp->bd); in sbdp_bd_fini()
492 kmem_free(bdp->bd_sc, sizeof (show_board_t)); in sbdp_bd_fini()
493 bdp->bd_sc = NULL; in sbdp_bd_fini()
494 mutex_destroy(&bdp->bd_mutex); in sbdp_bd_fini()
570 sbdp_bd_t *bdp; in sbdp_cleanup_bd() local
584 bdp = &cur->bds[board]; in sbdp_cleanup_bd()
589 mutex_enter(&bdp->bd_mutex); in sbdp_cleanup_bd()
591 for (i = 0; i < bdp->nnum; i++) in sbdp_cleanup_bd()
592 bdp->nodes[i] = (pnode_t)0; in sbdp_cleanup_bd()
593 bdp->nnum = 0; in sbdp_cleanup_bd()
595 sbdp_fini_bd_banks(bdp); in sbdp_cleanup_bd()
598 hp->h_board = bdp->bd; in sbdp_cleanup_bd()
599 hp->h_wnode = bdp->wnode; in sbdp_cleanup_bd()
600 if (bdp->ml) { in sbdp_cleanup_bd()
601 (void) sbdp_del_memlist(hp, bdp->ml); in sbdp_cleanup_bd()
604 bdp->ml = NULL; in sbdp_cleanup_bd()
606 bdp->bpa = -1; in sbdp_cleanup_bd()
608 sbdp_cpu_in_reset(wnode, bdp->bd, SBDP_ALL_CPUS, 0); in sbdp_cleanup_bd()
610 bdp->cpus_present = 0; in sbdp_cleanup_bd()
612 mutex_exit(&bdp->bd_mutex); in sbdp_cleanup_bd()
892 sbdp_bd_t *bdp; in sbdp_get_bd_info() local
905 bdp = &wnodep->bds[board]; in sbdp_get_bd_info()
913 sbdp_update_bd_info(bdp); in sbdp_get_bd_info()
915 return (bdp); in sbdp_get_bd_info()
966 sbdp_bd_t *bdp; in sbdp_cpu_in_reset() local
984 bdp = &cur->bds[bd]; in sbdp_cpu_in_reset()
988 SBDP_SET_ALL_CPUS_IN_RESET(bdp); in sbdp_cpu_in_reset()
990 SBDP_UNSET_ALL_CPUS_IN_RESET(bdp); in sbdp_cpu_in_reset()
993 SBDP_SET_CPU_IN_RESET(bdp, unit); in sbdp_cpu_in_reset()
995 SBDP_UNSET_CPU_IN_RESET(bdp, unit); in sbdp_cpu_in_reset()
1002 sbdp_bd_t *bdp; in sbdp_set_cpu_present() local
1016 bdp = &cur->bds[bd]; in sbdp_set_cpu_present()
1018 SBDP_SET_CPU_PRESENT(bdp, unit); in sbdp_set_cpu_present()
1027 sbdp_bd_t *bdp; in sbdp_is_cpu_present() local
1041 bdp = &cur->bds[bd]; in sbdp_is_cpu_present()
1043 return (SBDP_IS_CPU_PRESENT(bdp, unit)); in sbdp_is_cpu_present()
1050 sbdp_bd_t *bdp; in sbdp_is_cpu_in_reset() local
1065 bdp = &cur->bds[bd]; in sbdp_is_cpu_in_reset()
1067 return (SBDP_IS_CPU_IN_RESET(bdp, unit)); in sbdp_is_cpu_in_reset()