Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1208045
| From | Christoph Hellwig <hch@lst.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH 4/7] mm: register_dev_memmap() |
| Date | 2015-08-15 11:10 +0200 |
| Message-ID | <pXFDr-5g2-9@gated-at.bofh.it> (permalink) |
| References | <pWRQl-8uz-3@gated-at.bofh.it> <pWRQm-8uz-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> #endif /* _LINUX_KMAP_PFN_H */
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index 8a4f24d7fdb0..07152a54b841 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -939,6 +939,7 @@ typedef struct {
> * PFN_SG_CHAIN - pfn is a pointer to the next scatterlist entry
> * PFN_SG_LAST - pfn references a page and is the last scatterlist entry
> * PFN_DEV - pfn is not covered by system memmap
> + * PFN_MAP - pfn is covered by a device specific memmap
> */
> enum {
> PFN_MASK = (1UL << PAGE_SHIFT) - 1,
> @@ -949,6 +950,7 @@ enum {
> #else
> PFN_DEV = 0,
> #endif
> + PFN_MAP = (1UL << 3),
> };
>
> static inline __pfn_t pfn_to_pfn_t(unsigned long pfn, unsigned long flags)
> @@ -965,7 +967,7 @@ static inline __pfn_t phys_to_pfn_t(dma_addr_t addr, unsigned long flags)
>
> static inline bool __pfn_t_has_page(__pfn_t pfn)
> {
> - return (pfn.val & PFN_DEV) == 0;
> + return (pfn.val & PFN_DEV) == 0 || (pfn.val & PFN_MAP) == PFN_MAP;
Shouldn't we simply not set the PFN_DEV flag instead of needing another
one to cancel it out?
I also wonder if it might be better to not require the __pfn_t and
SG rework patches before this series.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC PATCH 0/7] 'struct page' driver for persistent memory Dan Williams <dan.j.williams@intel.com> - 2015-08-13 06:00 +0200
[RFC PATCH 2/7] x86, mm: introduce struct vmem_altmap Dan Williams <dan.j.williams@intel.com> - 2015-08-13 06:00 +0200
[RFC PATCH 5/7] libnvdimm, e820: make CONFIG_X86_PMEM_LEGACY a tristate option Dan Williams <dan.j.williams@intel.com> - 2015-08-13 06:00 +0200
Re: [RFC PATCH 5/7] libnvdimm, e820: make CONFIG_X86_PMEM_LEGACY a tristate option Christoph Hellwig <hch@lst.de> - 2015-08-15 11:10 +0200
Re: [RFC PATCH 5/7] libnvdimm, e820: make CONFIG_X86_PMEM_LEGACY a tristate option Dan Williams <dan.j.williams@intel.com> - 2015-08-15 17:30 +0200
Re: [RFC PATCH 5/7] libnvdimm, e820: make CONFIG_X86_PMEM_LEGACY a tristate option Christoph Hellwig <hch@lst.de> - 2015-08-15 18:00 +0200
Re: [RFC PATCH 5/7] libnvdimm, e820: make CONFIG_X86_PMEM_LEGACY a tristate option Dan Williams <dan.j.williams@intel.com> - 2015-08-15 18:10 +0200
Re: [RFC PATCH 5/7] libnvdimm, e820: make CONFIG_X86_PMEM_LEGACY a tristate option Christoph Hellwig <hch@lst.de> - 2015-08-17 17:10 +0200
Re: [RFC PATCH 5/7] libnvdimm, e820: make CONFIG_X86_PMEM_LEGACY a tristate option Dan Williams <dan.j.williams@intel.com> - 2015-08-17 17:50 +0200
[RFC PATCH 3/7] x86, mm: arch_add_dev_memory() Dan Williams <dan.j.williams@intel.com> - 2015-08-13 06:00 +0200
[RFC PATCH 7/7] libnvdimm, pmem: 'struct page' for pmem Dan Williams <dan.j.williams@intel.com> - 2015-08-13 06:00 +0200
[RFC PATCH 4/7] mm: register_dev_memmap() Dan Williams <dan.j.williams@intel.com> - 2015-08-13 06:00 +0200
Re: [RFC PATCH 4/7] mm: register_dev_memmap() Christoph Hellwig <hch@lst.de> - 2015-08-15 11:10 +0200
[RFC PATCH 6/7] libnvdimm, pfn: 'struct page' provider infrastructure Dan Williams <dan.j.williams@intel.com> - 2015-08-13 06:00 +0200
Re: [RFC PATCH 0/7] 'struct page' driver for persistent memory Christoph Hellwig <hch@lst.de> - 2015-08-15 11:10 +0200
csiph-web