Lines Matching refs:align
93 return sprintf(buf, "%ld\n", nd_pfn->align); in align_show()
130 rc = nd_size_select_store(dev, buf, &nd_pfn->align, in align_store()
139 static DEVICE_ATTR_RW(align);
307 nd_pfn->align = nd_pfn_default_alignment(); in nd_pfn_devinit()
426 static bool nd_supported_alignment(unsigned long align) in nd_supported_alignment() argument
431 if (align == 0) in nd_supported_alignment()
436 if (align == supported[i]) in nd_supported_alignment()
457 unsigned long align, start_pad, end_trunc; in nd_pfn_validate() local
489 pfn_sb->align = 0; in nd_pfn_validate()
504 align = le32_to_cpu(pfn_sb->align); in nd_pfn_validate()
508 if (align == 0) in nd_pfn_validate()
509 align = 1UL << ilog2(offset); in nd_pfn_validate()
533 if (!nd_supported_alignment(align) && in nd_pfn_validate()
536 "%ld:%ld\n", nd_pfn->align, align); in nd_pfn_validate()
549 nd_pfn->align = align; in nd_pfn_validate()
565 if (nd_pfn->align != align || nd_pfn->mode != mode) { in nd_pfn_validate()
569 nd_pfn->align, align, nd_pfn->mode, in nd_pfn_validate()
575 if (align > nvdimm_namespace_capacity(ndns)) { in nd_pfn_validate()
577 align, nvdimm_namespace_capacity(ndns)); in nd_pfn_validate()
596 if ((align && !IS_ALIGNED(res->start + offset + start_pad, align)) in nd_pfn_validate()
600 offset, align); in nd_pfn_validate()
733 unsigned long npfns, align; in nd_pfn_init() local
771 align = max(nd_pfn->align, memremap_compat_align()); in nd_pfn_init()
784 end_trunc = start + size - ALIGN_DOWN(start + size, align); in nd_pfn_init()
812 offset = ALIGN(start + SZ_8K + page_map_size, align) - start; in nd_pfn_init()
814 offset = ALIGN(start + SZ_8K, align) - start; in nd_pfn_init()
835 pfn_sb->align = cpu_to_le32(nd_pfn->align); in nd_pfn_init()