Lines Matching defs:all

511  * discriminate opens of the full and read-only nodes.  If all of the instances
592 struct di_all *all;
750 all = DI_ALL_PTR(st);
753 all->devcnt = devcnt;
754 all->command = st->command;
755 all->version = DI_SNAPSHOT_VERSION;
756 all->top_vhci_devinfo = 0; /* filled by build_vhci_list. */
763 all->endianness = DI_LITTLE_ENDIAN;
765 all->endianness = DI_BIG_ENDIAN;
769 if (copyinstr((void *)arg, all->req_path,
775 (void) strcpy(all->root_path, all->req_path);
834 all->top_devinfo = DI_ALIGN(off);
838 * so the value of "all" is no longer valid.
840 all = NULL;
939 * Free all memory for the snapshot
1088 struct di_all *all = DI_ALL_PTR(st);
1107 all->pd_version = priv->version;
1108 all->n_ppdata = priv->n_parent;
1109 all->n_dpdata = priv->n_driver;
1114 if (all->n_ppdata) { /* parent private data format */
1118 size = all->n_ppdata * sizeof (struct di_priv_format);
1119 all->ppdata_format = off = di_checkmem(st, off, size);
1129 if (all->n_dpdata) { /* driver private data format */
1133 size = all->n_dpdata * sizeof (struct di_priv_format);
1134 all->dpdata_format = off = di_checkmem(st, off, size);
1302 struct di_all *all = DI_ALL_PTR(st);
1326 di_alias->next = all->aliases;
1327 all->aliases = off;
1343 struct di_all *all;
1351 all = DI_ALL_PTR(st);
1357 if (ddi_aliases_present == B_TRUE && strcmp(all->root_path, "/") != 0) {
1359 rootnode = ddi_alias_redirect(all->root_path);
1361 (void) ddi_pathname(rootnode, all->root_path);
1373 plen = strlen("devices/") + strlen(all->root_path) + 1;
1375 (void) snprintf(path, plen, "devices/%s", all->root_path);
1378 all->root_path));
1388 rootnode = e_ddi_hold_devi_by_path(all->root_path, 0);
1391 all->root_path));
1419 off = di_copytree(DEVI(rootnode), &all->top_devinfo, st);
1434 all->devnames = off;
1435 off = di_copydevnm(&all->devnames, st);
1446 all->aliases = 0;
1472 all->snapshot_time = ddi_get_time();
1473 all->cache_checksum = 0;
1475 ASSERT(all->snapshot_time != 0);
1518 struct di_all *all;
1538 all = DI_ALL_PTR(st);
1539 if (all->top_vhci_devinfo == 0) {
1540 all->top_vhci_devinfo = off;
1542 me = DI_NODE(di_mem_addr(st, all->top_vhci_devinfo));
1599 * Assumes all devinfo nodes in device tree have been snapshotted
1775 * This is the core function, which copies all data associated with a single
2077 * DONE with all nodes
2477 /* get a pointer to snapshot memory for all the di_lnodes */
2482 /* get a pointer to snapshot memory for all the di_links */
2514 * Copy all minor data nodes attached to a devinfo node into the snapshot.
3064 * old non-typed prop_op(9E) interface. Since not all types are
3311 struct di_all *all;
3339 all = DI_ALL_PTR(st);
3341 count = all->n_ppdata;
3342 form = DI_PRIV_FORMAT(di_mem_addr(st, all->ppdata_format));
3344 count = all->n_dpdata;
3345 form = DI_PRIV_FORMAT(di_mem_addr(st, all->dpdata_format));
3674 header_plus_one_ok(struct di_all *all)
3679 if (all->version != DI_SNAPSHOT_VERSION) {
3680 CACHE_DEBUG((DI_ERR, "bad version: 0x%x", all->version));
3684 if (all->cache_magic != DI_CACHE_MAGIC) {
3685 CACHE_DEBUG((DI_ERR, "bad magic #: 0x%x", all->cache_magic));
3689 if (all->snapshot_time == 0) {
3690 CACHE_DEBUG((DI_ERR, "bad timestamp: %ld", all->snapshot_time));
3694 if (all->top_devinfo == 0) {
3699 if (all->map_size < sizeof (*all) + 1) {
3700 CACHE_DEBUG((DI_ERR, "bad map size: %u", all->map_size));
3704 if (all->root_path[0] != '/' || all->root_path[1] != '\0') {
3706 all->root_path[0], all->root_path[1]));
3756 struct di_all *all;
3782 all = (struct di_all *)cache->cache_data;
3784 if (!header_plus_one_ok(all)) {
3789 ASSERT(strcmp(all->root_path, "/") == 0);
3797 if (all->map_size > cache->cache_size) {
3799 " Skipping write", all->map_size, cache->cache_size));
3843 map_size = all->map_size;
3915 struct di_all *all;
3938 all = kmem_zalloc(sizeof (*all) + 1, KM_SLEEP);
3939 n = kobj_read_file(file, (caddr_t)all, sizeof (*all) + 1, 0);
3941 if ((n != sizeof (*all) + 1) || !header_plus_one_ok(all)) {
3942 kmem_free(all, sizeof (*all) + 1);
3948 map_size = all->map_size;
3950 kmem_free(all, sizeof (*all) + 1);
3952 ASSERT(map_size >= sizeof (*all) + 1);
3981 all = (struct di_all *)di_cache.cache_data;
3982 if (!header_plus_one_ok(all)) {
3990 saved_crc = all->cache_checksum;
3991 all->cache_checksum = 0;
3993 all->cache_checksum = saved_crc;
3995 if (crc != all->cache_checksum) {
3998 DI_CACHE_FILE, all->cache_checksum, crc));
4002 if (all->map_size != map_size) {
4176 struct di_all *all;
4214 * Also, set all the fields (except checksum) before computing
4217 all = (struct di_all *)di_cache.cache_data;
4218 all->cache_magic = DI_CACHE_MAGIC;
4219 all->map_size = rval;
4221 ASSERT(all->cache_checksum == 0);
4222 CRC32(crc, di_cache.cache_data, all->map_size, -1U, crc32_table);
4223 all->cache_checksum = crc;