pfn_sb 15 drivers/dax/pmem/core.c struct nd_pfn_sb *pfn_sb; pfn_sb 40 drivers/dax/pmem/core.c pfn_sb = nd_pfn->pfn_sb; pfn_sb 41 drivers/dax/pmem/core.c offset = le64_to_cpu(pfn_sb->dataoff); pfn_sb 56 drivers/dax/pmem/core.c nd_region->target_node, le32_to_cpu(pfn_sb->align), pfn_sb 100 drivers/nvdimm/dax_devs.c struct nd_pfn_sb *pfn_sb; pfn_sb 121 drivers/nvdimm/dax_devs.c pfn_sb = devm_kmalloc(dev, sizeof(*pfn_sb), GFP_KERNEL); pfn_sb 122 drivers/nvdimm/dax_devs.c nd_pfn->pfn_sb = pfn_sb; pfn_sb 207 drivers/nvdimm/nd.h struct nd_pfn_sb *pfn_sb; pfn_sb 216 drivers/nvdimm/pfn_devs.c struct nd_pfn_sb *pfn_sb = nd_pfn->pfn_sb; pfn_sb 217 drivers/nvdimm/pfn_devs.c u64 offset = __le64_to_cpu(pfn_sb->dataoff); pfn_sb 219 drivers/nvdimm/pfn_devs.c u32 start_pad = __le32_to_cpu(pfn_sb->start_pad); pfn_sb 242 drivers/nvdimm/pfn_devs.c struct nd_pfn_sb *pfn_sb = nd_pfn->pfn_sb; pfn_sb 243 drivers/nvdimm/pfn_devs.c u64 offset = __le64_to_cpu(pfn_sb->dataoff); pfn_sb 245 drivers/nvdimm/pfn_devs.c u32 start_pad = __le32_to_cpu(pfn_sb->start_pad); pfn_sb 246 drivers/nvdimm/pfn_devs.c u32 end_trunc = __le32_to_cpu(pfn_sb->end_trunc); pfn_sb 373 drivers/nvdimm/pfn_devs.c struct nd_pfn_sb *pfn_sb = nd_pfn->pfn_sb; pfn_sb 382 drivers/nvdimm/pfn_devs.c meta_start = (SZ_4K + sizeof(*pfn_sb)) >> 9; pfn_sb 383 drivers/nvdimm/pfn_devs.c meta_num = (le64_to_cpu(pfn_sb->dataoff) >> 9) - meta_start; pfn_sb 451 drivers/nvdimm/pfn_devs.c struct nd_pfn_sb *pfn_sb = nd_pfn->pfn_sb; pfn_sb 455 drivers/nvdimm/pfn_devs.c if (!pfn_sb || !ndns) pfn_sb 461 drivers/nvdimm/pfn_devs.c if (nvdimm_read_bytes(ndns, SZ_4K, pfn_sb, sizeof(*pfn_sb), 0)) pfn_sb 464 drivers/nvdimm/pfn_devs.c if (memcmp(pfn_sb->signature, sig, PFN_SIG_LEN) != 0) pfn_sb 467 drivers/nvdimm/pfn_devs.c checksum = le64_to_cpu(pfn_sb->checksum); pfn_sb 468 drivers/nvdimm/pfn_devs.c pfn_sb->checksum = 0; pfn_sb 469 drivers/nvdimm/pfn_devs.c if (checksum != nd_sb_checksum((struct nd_gen_sb *) pfn_sb)) pfn_sb 471 drivers/nvdimm/pfn_devs.c pfn_sb->checksum = cpu_to_le64(checksum); pfn_sb 473 drivers/nvdimm/pfn_devs.c if (memcmp(pfn_sb->parent_uuid, parent_uuid, 16) != 0) pfn_sb 476 drivers/nvdimm/pfn_devs.c if (__le16_to_cpu(pfn_sb->version_minor) < 1) { pfn_sb 477 drivers/nvdimm/pfn_devs.c pfn_sb->start_pad = 0; pfn_sb 478 drivers/nvdimm/pfn_devs.c pfn_sb->end_trunc = 0; pfn_sb 481 drivers/nvdimm/pfn_devs.c if (__le16_to_cpu(pfn_sb->version_minor) < 2) pfn_sb 482 drivers/nvdimm/pfn_devs.c pfn_sb->align = 0; pfn_sb 484 drivers/nvdimm/pfn_devs.c if (__le16_to_cpu(pfn_sb->version_minor) < 4) { pfn_sb 485 drivers/nvdimm/pfn_devs.c pfn_sb->page_struct_size = cpu_to_le16(64); pfn_sb 486 drivers/nvdimm/pfn_devs.c pfn_sb->page_size = cpu_to_le32(PAGE_SIZE); pfn_sb 489 drivers/nvdimm/pfn_devs.c switch (le32_to_cpu(pfn_sb->mode)) { pfn_sb 497 drivers/nvdimm/pfn_devs.c align = le32_to_cpu(pfn_sb->align); pfn_sb 498 drivers/nvdimm/pfn_devs.c offset = le64_to_cpu(pfn_sb->dataoff); pfn_sb 499 drivers/nvdimm/pfn_devs.c start_pad = le32_to_cpu(pfn_sb->start_pad); pfn_sb 502 drivers/nvdimm/pfn_devs.c mode = le32_to_cpu(pfn_sb->mode); pfn_sb 504 drivers/nvdimm/pfn_devs.c if ((le32_to_cpu(pfn_sb->page_size) > PAGE_SIZE) && pfn_sb 508 drivers/nvdimm/pfn_devs.c le32_to_cpu(pfn_sb->page_size)); pfn_sb 512 drivers/nvdimm/pfn_devs.c if ((le16_to_cpu(pfn_sb->page_struct_size) < sizeof(struct page)) && pfn_sb 516 drivers/nvdimm/pfn_devs.c le16_to_cpu(pfn_sb->page_struct_size)); pfn_sb 526 drivers/nvdimm/pfn_devs.c !memcmp(pfn_sb->signature, DAX_SIG, PFN_SIG_LEN)) { pfn_sb 538 drivers/nvdimm/pfn_devs.c nd_pfn->uuid = kmemdup(pfn_sb->uuid, 16, GFP_KERNEL); pfn_sb 548 drivers/nvdimm/pfn_devs.c if (memcmp(nd_pfn->uuid, pfn_sb->uuid, 16) != 0) pfn_sb 603 drivers/nvdimm/pfn_devs.c struct nd_pfn_sb *pfn_sb; pfn_sb 623 drivers/nvdimm/pfn_devs.c pfn_sb = devm_kmalloc(dev, sizeof(*pfn_sb), GFP_KERNEL); pfn_sb 625 drivers/nvdimm/pfn_devs.c nd_pfn->pfn_sb = pfn_sb; pfn_sb 667 drivers/nvdimm/pfn_devs.c struct nd_pfn_sb *pfn_sb = nd_pfn->pfn_sb; pfn_sb 668 drivers/nvdimm/pfn_devs.c u64 offset = le64_to_cpu(pfn_sb->dataoff); pfn_sb 669 drivers/nvdimm/pfn_devs.c u32 start_pad = __le32_to_cpu(pfn_sb->start_pad); pfn_sb 670 drivers/nvdimm/pfn_devs.c u32 end_trunc = __le32_to_cpu(pfn_sb->end_trunc); pfn_sb 689 drivers/nvdimm/pfn_devs.c nd_pfn->npfns = le64_to_cpu(pfn_sb->npfns); pfn_sb 692 drivers/nvdimm/pfn_devs.c if (le64_to_cpu(nd_pfn->pfn_sb->npfns) > nd_pfn->npfns) pfn_sb 695 drivers/nvdimm/pfn_devs.c le64_to_cpu(nd_pfn->pfn_sb->npfns), pfn_sb 715 drivers/nvdimm/pfn_devs.c struct nd_pfn_sb *pfn_sb; pfn_sb 721 drivers/nvdimm/pfn_devs.c pfn_sb = devm_kmalloc(&nd_pfn->dev, sizeof(*pfn_sb), GFP_KERNEL); pfn_sb 722 drivers/nvdimm/pfn_devs.c if (!pfn_sb) pfn_sb 725 drivers/nvdimm/pfn_devs.c nd_pfn->pfn_sb = pfn_sb; pfn_sb 736 drivers/nvdimm/pfn_devs.c memset(pfn_sb, 0, sizeof(*pfn_sb)); pfn_sb 784 drivers/nvdimm/pfn_devs.c pfn_sb->mode = cpu_to_le32(nd_pfn->mode); pfn_sb 785 drivers/nvdimm/pfn_devs.c pfn_sb->dataoff = cpu_to_le64(offset); pfn_sb 786 drivers/nvdimm/pfn_devs.c pfn_sb->npfns = cpu_to_le64(npfns); pfn_sb 787 drivers/nvdimm/pfn_devs.c memcpy(pfn_sb->signature, sig, PFN_SIG_LEN); pfn_sb 788 drivers/nvdimm/pfn_devs.c memcpy(pfn_sb->uuid, nd_pfn->uuid, 16); pfn_sb 789 drivers/nvdimm/pfn_devs.c memcpy(pfn_sb->parent_uuid, nd_dev_to_uuid(&ndns->dev), 16); pfn_sb 790 drivers/nvdimm/pfn_devs.c pfn_sb->version_major = cpu_to_le16(1); pfn_sb 791 drivers/nvdimm/pfn_devs.c pfn_sb->version_minor = cpu_to_le16(4); pfn_sb 792 drivers/nvdimm/pfn_devs.c pfn_sb->end_trunc = cpu_to_le32(end_trunc); pfn_sb 793 drivers/nvdimm/pfn_devs.c pfn_sb->align = cpu_to_le32(nd_pfn->align); pfn_sb 794 drivers/nvdimm/pfn_devs.c pfn_sb->page_struct_size = cpu_to_le16(MAX_STRUCT_PAGE_SIZE); pfn_sb 795 drivers/nvdimm/pfn_devs.c pfn_sb->page_size = cpu_to_le32(PAGE_SIZE); pfn_sb 796 drivers/nvdimm/pfn_devs.c checksum = nd_sb_checksum((struct nd_gen_sb *) pfn_sb); pfn_sb 797 drivers/nvdimm/pfn_devs.c pfn_sb->checksum = cpu_to_le64(checksum); pfn_sb 799 drivers/nvdimm/pfn_devs.c return nvdimm_write_bytes(ndns, SZ_4K, pfn_sb, sizeof(*pfn_sb), 0); pfn_sb 362 drivers/nvdimm/pmem.c struct nd_pfn_sb *pfn_sb; pfn_sb 411 drivers/nvdimm/pmem.c pfn_sb = nd_pfn->pfn_sb; pfn_sb 412 drivers/nvdimm/pmem.c pmem->data_offset = le64_to_cpu(pfn_sb->dataoff); pfn_sb 592 drivers/nvdimm/pmem.c struct nd_pfn_sb *pfn_sb = nd_pfn->pfn_sb; pfn_sb 596 drivers/nvdimm/pmem.c __le32_to_cpu(pfn_sb->start_pad); pfn_sb 597 drivers/nvdimm/pmem.c end_trunc = __le32_to_cpu(pfn_sb->end_trunc);