On Thu, Jul 04, 2019 at 08:09:56PM +1000, Stephen Rothwell wrote: > Hi all, > > Today's linux-next merge of the akpm-current tree got a conflict in: > > include/linux/mm.h > > between commit: > > 25b2995a35b6 ("mm: remove MEMORY_DEVICE_PUBLIC support") > > from the hmm tree and commit: > > 0a470a2d114a ("mm: clean up is_device_*_page() definitions") > > from the akpm-current tree. > > I fixed it up (see below) and can carry the fix as necessary. This > is now fixed as far as linux-next is concerned, but any non trivial > conflicts should be mentioned to your upstream maintainer when your tree > is submitted for merging. You may also want to consider cooperating > with the maintainer of the conflicting tree to minimise any particularly > complex conflicts. > > -- > Cheers, > Stephen Rothwell > > diff --cc include/linux/mm.h > index d405a7cff62a,12980954daf9..000000000000 > --- a/include/linux/mm.h > +++ b/include/linux/mm.h > @@@ -950,27 -953,15 +950,7 @@@ static inline bool put_devmap_managed_p > } > return false; > } > - > - static inline bool is_device_private_page(const struct page *page) > - { > - return is_zone_device_page(page) && > - page->pgmap->type == MEMORY_DEVICE_PRIVATE; > - } > - > - #ifdef CONFIG_PCI_P2PDMA > - static inline bool is_pci_p2pdma_page(const struct page *page) > - { > - return is_zone_device_page(page) && > - page->pgmap->type == MEMORY_DEVICE_PCI_P2PDMA; > - } > - #else /* CONFIG_PCI_P2PDMA */ > - static inline bool is_pci_p2pdma_page(const struct page *page) > - { > - return false; > - } > - #endif /* CONFIG_PCI_P2PDMA */ > - > #else /* CONFIG_DEV_PAGEMAP_OPS */ > -static inline void dev_pagemap_get_ops(void) > -{ > -} > - > -static inline void dev_pagemap_put_ops(void) > -{ > -} > - > static inline bool put_devmap_managed_page(struct page *page) > { > return false; > @@@ -978,14 -970,27 +959,19 @@@ > > static inline bool is_device_private_page(const struct page *page) > { > - return false; > + return IS_ENABLED(CONFIG_DEV_PAGEMAP_OPS) && > + IS_ENABLED(CONFIG_DEVICE_PRIVATE) && > + is_zone_device_page(page) && > + page->pgmap->type == MEMORY_DEVICE_PRIVATE; > } > > -static inline bool is_device_public_page(const struct page *page) > -{ > - return IS_ENABLED(CONFIG_DEV_PAGEMAP_OPS) && > - IS_ENABLED(CONFIG_DEVICE_PUBLIC) && > - is_zone_device_page(page) && > - page->pgmap->type == MEMORY_DEVICE_PUBLIC; > -} > - > static inline bool is_pci_p2pdma_page(const struct page *page) > { > - return false; > + return IS_ENABLED(CONFIG_DEV_PAGEMAP_OPS) && > + IS_ENABLED(CONFIG_PCI_P2PDMA) && > + is_zone_device_page(page) && > + page->pgmap->type == MEMORY_DEVICE_PCI_P2PDMA; > } > - #endif /* CONFIG_DEV_PAGEMAP_OPS */ > > /* 127: arbitrary random number, small enough to assemble well */ > #define page_ref_zero_or_close_to_overflow(page) \ Yep, this new version is much nicer Jason