public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
* linux-next: manual merge of the csky tree with the mm tree
@ 2023-08-15  0:46 Stephen Rothwell
  2023-08-15  3:11 ` Guo Ren
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Rothwell @ 2023-08-15  0:46 UTC (permalink / raw)
  To: Guo Ren, Andrew Morton
  Cc: Guo Ren, Linux Kernel Mailing List, Linux Next Mailing List,
	Matthew Wilcox (Oracle)

[-- Attachment #1: Type: text/plain, Size: 1981 bytes --]

Hi all,

Today's linux-next merge of the csky tree got a conflict in:

  arch/csky/abiv2/cacheflush.c

between commit:

  1222e1310d64 ("csky: implement the new page table range API")

from the mm tree and commit:

  1362d15ffb59 ("csky: pgtable: Invalidate stale I-cache lines in update_mmu_cache")

from the csky tree.

I fixed it up (I think - 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 arch/csky/abiv2/cacheflush.c
index d05a551af5d5,500eb8f69397..000000000000
--- a/arch/csky/abiv2/cacheflush.c
+++ b/arch/csky/abiv2/cacheflush.c
@@@ -16,23 -15,22 +16,22 @@@ void update_mmu_cache_range(struct vm_f
  
  	flush_tlb_page(vma, address);
  
 -	if (!pfn_valid(pte_pfn(*pte)))
 +	if (!pfn_valid(pfn))
  		return;
  
 -	page = pfn_to_page(pte_pfn(*pte));
 -	if (page == ZERO_PAGE(0))
 +	folio = page_folio(pfn_to_page(pfn));
 +
 +	if (test_and_set_bit(PG_dcache_clean, &folio->flags))
  		return;
  
 -	if (test_and_set_bit(PG_dcache_clean, &page->flags))
 -		return;
 +	for (i = 0; i < folio_nr_pages(folio); i++) {
 +		unsigned long addr = (unsigned long) kmap_local_folio(folio,
 +								i * PAGE_SIZE);
  
 -	addr = (unsigned long) kmap_atomic(page);
 -
 -	icache_inv_range(address, address + PAGE_SIZE);
 -	dcache_wb_range(addr, addr + PAGE_SIZE);
 -
 -	kunmap_atomic((void *) addr);
++		icache_inv_range(address, address + PAGE_SIZE);
 +		dcache_wb_range(addr, addr + PAGE_SIZE);
- 		if (vma->vm_flags & VM_EXEC)
- 			icache_inv_range(addr, addr + PAGE_SIZE);
 +		kunmap_local((void *) addr);
 +	}
  }
  
  void flush_icache_deferred(struct mm_struct *mm)

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: linux-next: manual merge of the csky tree with the mm tree
  2023-08-15  0:46 linux-next: manual merge of the csky tree with the mm tree Stephen Rothwell
@ 2023-08-15  3:11 ` Guo Ren
  2023-08-15  3:18   ` Matthew Wilcox
  0 siblings, 1 reply; 3+ messages in thread
From: Guo Ren @ 2023-08-15  3:11 UTC (permalink / raw)
  To: Andrew Morton, Matthew Wilcox (Oracle)
  Cc: Guo Ren, Linux Kernel Mailing List, Linux Next Mailing List,
	Stephen Rothwell

On Tue, Aug 15, 2023 at 8:46 AM Stephen Rothwell <sfr@canb•auug.org.au> wrote:
>
> Hi all,
>
> Today's linux-next merge of the csky tree got a conflict in:
>
>   arch/csky/abiv2/cacheflush.c
>
> between commit:
>
>   1222e1310d64 ("csky: implement the new page table range API")
Could I take this patch into csky next tree to solve the conflict.

>
> from the mm tree and commit:
>
>   1362d15ffb59 ("csky: pgtable: Invalidate stale I-cache lines in update_mmu_cache")
>
> from the csky tree.
>
> I fixed it up (I think - 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 arch/csky/abiv2/cacheflush.c
> index d05a551af5d5,500eb8f69397..000000000000
> --- a/arch/csky/abiv2/cacheflush.c
> +++ b/arch/csky/abiv2/cacheflush.c
> @@@ -16,23 -15,22 +16,22 @@@ void update_mmu_cache_range(struct vm_f
>
>         flush_tlb_page(vma, address);
>
>  -      if (!pfn_valid(pte_pfn(*pte)))
>  +      if (!pfn_valid(pfn))
>                 return;
>
>  -      page = pfn_to_page(pte_pfn(*pte));
>  -      if (page == ZERO_PAGE(0))
>  +      folio = page_folio(pfn_to_page(pfn));
>  +
>  +      if (test_and_set_bit(PG_dcache_clean, &folio->flags))
>                 return;
>
>  -      if (test_and_set_bit(PG_dcache_clean, &page->flags))
>  -              return;
>  +      for (i = 0; i < folio_nr_pages(folio); i++) {
>  +              unsigned long addr = (unsigned long) kmap_local_folio(folio,
>  +                                                              i * PAGE_SIZE);
>
>  -      addr = (unsigned long) kmap_atomic(page);
>  -
>  -      icache_inv_range(address, address + PAGE_SIZE);
>  -      dcache_wb_range(addr, addr + PAGE_SIZE);
>  -
>  -      kunmap_atomic((void *) addr);
> ++              icache_inv_range(address, address + PAGE_SIZE);
>  +              dcache_wb_range(addr, addr + PAGE_SIZE);
> -               if (vma->vm_flags & VM_EXEC)
> -                       icache_inv_range(addr, addr + PAGE_SIZE);
>  +              kunmap_local((void *) addr);
>  +      }
>   }
>
>   void flush_icache_deferred(struct mm_struct *mm)



-- 
Best Regards
 Guo Ren

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: linux-next: manual merge of the csky tree with the mm tree
  2023-08-15  3:11 ` Guo Ren
@ 2023-08-15  3:18   ` Matthew Wilcox
  0 siblings, 0 replies; 3+ messages in thread
From: Matthew Wilcox @ 2023-08-15  3:18 UTC (permalink / raw)
  To: Guo Ren
  Cc: Andrew Morton, Guo Ren, Linux Kernel Mailing List,
	Linux Next Mailing List, Stephen Rothwell

On Tue, Aug 15, 2023 at 11:11:52AM +0800, Guo Ren wrote:
> On Tue, Aug 15, 2023 at 8:46 AM Stephen Rothwell <sfr@canb•auug.org.au> wrote:
> >
> > Hi all,
> >
> > Today's linux-next merge of the csky tree got a conflict in:
> >
> >   arch/csky/abiv2/cacheflush.c
> >
> > between commit:
> >
> >   1222e1310d64 ("csky: implement the new page table range API")
> Could I take this patch into csky next tree to solve the conflict.

No.  It depends on the predecessor patches in that series.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-08-15  3:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-15  0:46 linux-next: manual merge of the csky tree with the mm tree Stephen Rothwell
2023-08-15  3:11 ` Guo Ren
2023-08-15  3:18   ` Matthew Wilcox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox