public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
* linux-next: manual merge of the net-next tree with the dma-mapping tree
@ 2024-05-09  1:53 Stephen Rothwell
  2024-05-15 23:24 ` Stephen Rothwell
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Rothwell @ 2024-05-09  1:53 UTC (permalink / raw)
  To: David Miller, Jakub Kicinski, Paolo Abeni, Christoph Hellwig
  Cc: Alexander Lobakin, Tony Nguyen, Networking,
	Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

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

  net/core/page_pool.c

between commit:

  4321de4497b2 ("page_pool: check for DMA sync shortcut earlier")

from the dma-mapping tree and commit:

  ef9226cd56b7 ("page_pool: constify some read-only function arguments")

from the net-next 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 net/core/page_pool.c
index 4f9d1bd7f4d1,8bcc7014a61a..000000000000
--- a/net/core/page_pool.c
+++ b/net/core/page_pool.c
@@@ -398,26 -384,16 +399,26 @@@ static struct page *__page_pool_get_cac
  	return page;
  }
  
 -static void page_pool_dma_sync_for_device(const struct page_pool *pool,
 -					  const struct page *page,
 -					  unsigned int dma_sync_size)
 +static void __page_pool_dma_sync_for_device(const struct page_pool *pool,
- 					    struct page *page,
++					    const struct page *page,
 +					    u32 dma_sync_size)
  {
 +#if defined(CONFIG_HAS_DMA) && defined(CONFIG_DMA_NEED_SYNC)
  	dma_addr_t dma_addr = page_pool_get_dma_addr(page);
  
  	dma_sync_size = min(dma_sync_size, pool->p.max_len);
 -	dma_sync_single_range_for_device(pool->p.dev, dma_addr,
 -					 pool->p.offset, dma_sync_size,
 -					 pool->p.dma_dir);
 +	__dma_sync_single_for_device(pool->p.dev, dma_addr + pool->p.offset,
 +				     dma_sync_size, pool->p.dma_dir);
 +#endif
 +}
 +
 +static __always_inline void
 +page_pool_dma_sync_for_device(const struct page_pool *pool,
- 			      struct page *page,
++			      const struct page *page,
 +			      u32 dma_sync_size)
 +{
 +	if (pool->dma_sync && dma_dev_need_sync(pool->p.dev))
 +		__page_pool_dma_sync_for_device(pool, page, dma_sync_size);
  }
  
  static bool page_pool_dma_map(struct page_pool *pool, struct page *page)
@@@ -708,10 -688,11 +710,9 @@@ __page_pool_put_page(struct page_pool *
  	if (likely(__page_pool_page_can_be_recycled(page))) {
  		/* Read barrier done in page_ref_count / READ_ONCE */
  
 -		if (pool->p.flags & PP_FLAG_DMA_SYNC_DEV)
 -			page_pool_dma_sync_for_device(pool, page,
 -						      dma_sync_size);
 +		page_pool_dma_sync_for_device(pool, page, dma_sync_size);
  
- 		if (allow_direct && in_softirq() &&
- 		    page_pool_recycle_in_cache(page, pool))
+ 		if (allow_direct && page_pool_recycle_in_cache(page, pool))
  			return NULL;
  
  		/* Page found as candidate for recycling */

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

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

* Re: linux-next: manual merge of the net-next tree with the dma-mapping tree
  2024-05-09  1:53 linux-next: manual merge of the net-next tree with the dma-mapping tree Stephen Rothwell
@ 2024-05-15 23:24 ` Stephen Rothwell
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Rothwell @ 2024-05-15 23:24 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: David Miller, Jakub Kicinski, Paolo Abeni, Alexander Lobakin,
	Tony Nguyen, Networking, Linux Kernel Mailing List,
	Linux Next Mailing List

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

Hi all,

On Thu, 9 May 2024 11:53:07 +1000 Stephen Rothwell <sfr@canb•auug.org.au> wrote:
>
> Today's linux-next merge of the net-next tree got a conflict in:
> 
>   net/core/page_pool.c
> 
> between commit:
> 
>   4321de4497b2 ("page_pool: check for DMA sync shortcut earlier")
> 
> from the dma-mapping tree and commit:
> 
>   ef9226cd56b7 ("page_pool: constify some read-only function arguments")
> 
> from the net-next 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 net/core/page_pool.c
> index 4f9d1bd7f4d1,8bcc7014a61a..000000000000
> --- a/net/core/page_pool.c
> +++ b/net/core/page_pool.c
> @@@ -398,26 -384,16 +399,26 @@@ static struct page *__page_pool_get_cac
>   	return page;
>   }
>   
>  -static void page_pool_dma_sync_for_device(const struct page_pool *pool,
>  -					  const struct page *page,
>  -					  unsigned int dma_sync_size)
>  +static void __page_pool_dma_sync_for_device(const struct page_pool *pool,
> - 					    struct page *page,
> ++					    const struct page *page,
>  +					    u32 dma_sync_size)
>   {
>  +#if defined(CONFIG_HAS_DMA) && defined(CONFIG_DMA_NEED_SYNC)
>   	dma_addr_t dma_addr = page_pool_get_dma_addr(page);
>   
>   	dma_sync_size = min(dma_sync_size, pool->p.max_len);
>  -	dma_sync_single_range_for_device(pool->p.dev, dma_addr,
>  -					 pool->p.offset, dma_sync_size,
>  -					 pool->p.dma_dir);
>  +	__dma_sync_single_for_device(pool->p.dev, dma_addr + pool->p.offset,
>  +				     dma_sync_size, pool->p.dma_dir);
>  +#endif
>  +}
>  +
>  +static __always_inline void
>  +page_pool_dma_sync_for_device(const struct page_pool *pool,
> - 			      struct page *page,
> ++			      const struct page *page,
>  +			      u32 dma_sync_size)
>  +{
>  +	if (pool->dma_sync && dma_dev_need_sync(pool->p.dev))
>  +		__page_pool_dma_sync_for_device(pool, page, dma_sync_size);
>   }
>   
>   static bool page_pool_dma_map(struct page_pool *pool, struct page *page)
> @@@ -708,10 -688,11 +710,9 @@@ __page_pool_put_page(struct page_pool *
>   	if (likely(__page_pool_page_can_be_recycled(page))) {
>   		/* Read barrier done in page_ref_count / READ_ONCE */
>   
>  -		if (pool->p.flags & PP_FLAG_DMA_SYNC_DEV)
>  -			page_pool_dma_sync_for_device(pool, page,
>  -						      dma_sync_size);
>  +		page_pool_dma_sync_for_device(pool, page, dma_sync_size);
>   
> - 		if (allow_direct && in_softirq() &&
> - 		    page_pool_recycle_in_cache(page, pool))
> + 		if (allow_direct && page_pool_recycle_in_cache(page, pool))
>   			return NULL;
>   
>   		/* Page found as candidate for recycling */

This is now a conflict between the dma-mapping tree and Linus' tree.

-- 
Cheers,
Stephen Rothwell

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

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

end of thread, other threads:[~2024-05-15 23:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-09  1:53 linux-next: manual merge of the net-next tree with the dma-mapping tree Stephen Rothwell
2024-05-15 23:24 ` Stephen Rothwell

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