[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250528095722.11a4bb16@canb.auug.org.au>
Date: Wed, 28 May 2025 09:57:22 +1000
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...nel.org>,
"H. Peter Anvin" <hpa@...or.com>, Peter Zijlstra <peterz@...radead.org>,
Dan Williams <dan.j.williams@...el.com>, Dave Hansen
<dave.hansen@...ux.intel.com>, David Hildenbrand <david@...hat.com>, Linux
Kernel Mailing List <linux-kernel@...r.kernel.org>, Linux Next Mailing List
<linux-next@...r.kernel.org>
Subject: Re: linux-next: manual merge of the tip tree with the mm-unstable
tree
Hi all,
On Thu, 15 May 2025 15:11:02 +1000 Stephen Rothwell <sfr@...b.auug.org.au> wrote:
>
> Today's linux-next merge of the tip tree got a conflict in:
>
> arch/x86/mm/pat/memtype.c
>
> between commit:
>
> f387f960a89a ("x86/mm/pat: factor out setting cachemode into pgprot_set_cachemode()")
>
> from the mm-unstable tree and commit:
>
> 1b3f2bd04d90 ("x86/devmem: Remove duplicate range_is_allowed() definition")
>
> from the tip 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.
>
>
> diff --cc arch/x86/mm/pat/memtype.c
> index ccc55c00b4c8,c97b527c66fe..000000000000
> --- a/arch/x86/mm/pat/memtype.c
> +++ b/arch/x86/mm/pat/memtype.c
> @@@ -773,39 -775,6 +775,12 @@@ pgprot_t phys_mem_access_prot(struct fi
> return vma_prot;
> }
>
> - #ifdef CONFIG_STRICT_DEVMEM
> - /* This check is done in drivers/char/mem.c in case of STRICT_DEVMEM */
> - static inline int range_is_allowed(unsigned long pfn, unsigned long size)
> - {
> - return 1;
> - }
> - #else
> - /* This check is needed to avoid cache aliasing when PAT is enabled */
> - static inline int range_is_allowed(unsigned long pfn, unsigned long size)
> - {
> - u64 from = ((u64)pfn) << PAGE_SHIFT;
> - u64 to = from + size;
> - u64 cursor = from;
> -
> - if (!pat_enabled())
> - return 1;
> -
> - while (cursor < to) {
> - if (!devmem_is_allowed(pfn))
> - return 0;
> - cursor += PAGE_SIZE;
> - pfn++;
> - }
> - return 1;
> - }
> - #endif /* CONFIG_STRICT_DEVMEM */
> -
> +static inline void pgprot_set_cachemode(pgprot_t *prot, enum page_cache_mode pcm)
> +{
> + *prot = __pgprot((pgprot_val(*prot) & ~_PAGE_CACHE_MASK) |
> + cachemode2protval(pcm));
> +}
> +
> int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn,
> unsigned long size, pgprot_t *vma_prot)
> {
This is now a conflict between the mm-stable tree and Linus' tree.
--
Cheers,
Stephen Rothwell
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists