Linux-Next Archive on lore.kernel.org
 help / color / Atom feed
* linux-next: manual merge of the tip tree with the drm tree
@ 2019-10-10  1:51 Stephen Rothwell
  2019-11-27 23:36 ` Stephen Rothwell
  0 siblings, 1 reply; 12+ messages in thread
From: Stephen Rothwell @ 2019-10-10  1:51 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
	Dave Airlie, DRI
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Qian Cai,
	Chris Wilson

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

Hi all,

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

  drivers/gpu/drm/i915/gem/i915_gem_shrinker.c

between commit:

  2850748ef876 ("drm/i915: Pull i915_vma_pin under the vm->mutex")

from the drm tree and commit:

  5facae4f3549 ("locking/lockdep: Remove unused @nested argument from lock_release()")

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.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
index fd3ce6da8497,1a51b3598d63..000000000000
--- a/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
@@@ -436,9 -497,22 +436,9 @@@ void i915_gem_shrinker_taints_mutex(str
  
  	fs_reclaim_acquire(GFP_KERNEL);
  
 -	/*
 -	 * As we invariably rely on the struct_mutex within the shrinker,
 -	 * but have a complicated recursion dance, taint all the mutexes used
 -	 * within the shrinker with the struct_mutex. For completeness, we
 -	 * taint with all subclass of struct_mutex, even though we should
 -	 * only need tainting by I915_MM_NORMAL to catch possible ABBA
 -	 * deadlocks from using struct_mutex inside @mutex.
 -	 */
 -	mutex_acquire(&i915->drm.struct_mutex.dep_map,
 -		      I915_MM_SHRINKER, 0, _RET_IP_);
 -
  	mutex_acquire(&mutex->dep_map, 0, 0, _RET_IP_);
- 	mutex_release(&mutex->dep_map, 0, _RET_IP_);
+ 	mutex_release(&mutex->dep_map, _RET_IP_);
  
 -	mutex_release(&i915->drm.struct_mutex.dep_map, _RET_IP_);
 -
  	fs_reclaim_release(GFP_KERNEL);
  
  	if (unlock)

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

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

* Re: linux-next: manual merge of the tip tree with the drm tree
  2019-10-10  1:51 linux-next: manual merge of the tip tree with the drm tree Stephen Rothwell
@ 2019-11-27 23:36 ` Stephen Rothwell
  0 siblings, 0 replies; 12+ messages in thread
From: Stephen Rothwell @ 2019-11-27 23:36 UTC (permalink / raw)
  To: Dave Airlie, DRI
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
	Linux Next Mailing List, Linux Kernel Mailing List, Qian Cai,
	Chris Wilson, Linus

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

Hi all,

On Thu, 10 Oct 2019 12:51:06 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the tip tree got a conflict in:
> 
>   drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
> 
> between commit:
> 
>   2850748ef876 ("drm/i915: Pull i915_vma_pin under the vm->mutex")
> 
> from the drm tree and commit:
> 
>   5facae4f3549 ("locking/lockdep: Remove unused @nested argument from lock_release()")
> 
> 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.
> 
> -- 
> Cheers,
> Stephen Rothwell
> 
> diff --cc drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
> index fd3ce6da8497,1a51b3598d63..000000000000
> --- a/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
> @@@ -436,9 -497,22 +436,9 @@@ void i915_gem_shrinker_taints_mutex(str
>   
>   	fs_reclaim_acquire(GFP_KERNEL);
>   
>  -	/*
>  -	 * As we invariably rely on the struct_mutex within the shrinker,
>  -	 * but have a complicated recursion dance, taint all the mutexes used
>  -	 * within the shrinker with the struct_mutex. For completeness, we
>  -	 * taint with all subclass of struct_mutex, even though we should
>  -	 * only need tainting by I915_MM_NORMAL to catch possible ABBA
>  -	 * deadlocks from using struct_mutex inside @mutex.
>  -	 */
>  -	mutex_acquire(&i915->drm.struct_mutex.dep_map,
>  -		      I915_MM_SHRINKER, 0, _RET_IP_);
>  -
>   	mutex_acquire(&mutex->dep_map, 0, 0, _RET_IP_);
> - 	mutex_release(&mutex->dep_map, 0, _RET_IP_);
> + 	mutex_release(&mutex->dep_map, _RET_IP_);
>   
>  -	mutex_release(&i915->drm.struct_mutex.dep_map, _RET_IP_);
>  -
>   	fs_reclaim_release(GFP_KERNEL);
>   
>   	if (unlock)

This is now a conflict between the drm tree and Linus' tree.

-- 
Cheers,
Stephen Rothwell

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

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

* linux-next: manual merge of the tip tree with the drm tree
@ 2019-11-27  0:18 Stephen Rothwell
  0 siblings, 0 replies; 12+ messages in thread
From: Stephen Rothwell @ 2019-11-27  0:18 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
	Dave Airlie, DRI
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Will Deacon,
	Krzysztof Kozlowski, Jani Nikula

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

Hi all,

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

  drivers/gpu/drm/i915/Kconfig.debug

between commit:

  d30213e533fa ("drm/i915: Fix Kconfig indentation")

from the drm tree and commit:

  fb041bb7c0a9 ("locking/refcount: Consolidate implementations of refcount_t")

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.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/i915/Kconfig.debug
index 5571cc73a9ce,1400fce39c58..000000000000
--- a/drivers/gpu/drm/i915/Kconfig.debug
+++ b/drivers/gpu/drm/i915/Kconfig.debug
@@@ -1,33 -1,33 +1,32 @@@
  # SPDX-License-Identifier: GPL-2.0-only
  config DRM_I915_WERROR
 -        bool "Force GCC to throw an error instead of a warning when compiling"
 -        # As this may inadvertently break the build, only allow the user
 -        # to shoot oneself in the foot iff they aim really hard
 -        depends on EXPERT
 -        # We use the dependency on !COMPILE_TEST to not be enabled in
 -        # allmodconfig or allyesconfig configurations
 -        depends on !COMPILE_TEST
 -	select HEADER_TEST
 -        default n
 -        help
 -          Add -Werror to the build flags for (and only for) i915.ko.
 -          Do not enable this unless you are writing code for the i915.ko module.
 -
 -          Recommended for driver developers only.
 -
 -          If in doubt, say "N".
 +	bool "Force GCC to throw an error instead of a warning when compiling"
 +	# As this may inadvertently break the build, only allow the user
 +	# to shoot oneself in the foot iff they aim really hard
 +	depends on EXPERT
 +	# We use the dependency on !COMPILE_TEST to not be enabled in
 +	# allmodconfig or allyesconfig configurations
 +	depends on !COMPILE_TEST
 +	default n
 +	help
 +	  Add -Werror to the build flags for (and only for) i915.ko.
 +	  Do not enable this unless you are writing code for the i915.ko module.
 +
 +	  Recommended for driver developers only.
 +
 +	  If in doubt, say "N".
  
  config DRM_I915_DEBUG
 -        bool "Enable additional driver debugging"
 -        depends on DRM_I915
 -        select DEBUG_FS
 -        select PREEMPT_COUNT
 -        select I2C_CHARDEV
 -        select STACKDEPOT
 -        select DRM_DP_AUX_CHARDEV
 -        select X86_MSR # used by igt/pm_rpm
 -        select DRM_VGEM # used by igt/prime_vgem (dmabuf interop checks)
 -        select DRM_DEBUG_MM if DRM=y
 +	bool "Enable additional driver debugging"
 +	depends on DRM_I915
 +	select DEBUG_FS
 +	select PREEMPT_COUNT
- 	select REFCOUNT_FULL
 +	select I2C_CHARDEV
 +	select STACKDEPOT
 +	select DRM_DP_AUX_CHARDEV
 +	select X86_MSR # used by igt/pm_rpm
 +	select DRM_VGEM # used by igt/prime_vgem (dmabuf interop checks)
 +	select DRM_DEBUG_MM if DRM=y
  	select DRM_DEBUG_SELFTEST
  	select DMABUF_SELFTESTS
  	select SW_SYNC # signaling validation framework (igt/syncobj*)

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

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

* linux-next: manual merge of the tip tree with the drm tree
@ 2017-02-17  1:56 Stephen Rothwell
  0 siblings, 0 replies; 12+ messages in thread
From: Stephen Rothwell @ 2017-02-17  1:56 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
	Dave Airlie
  Cc: linux-next, linux-kernel, Jason A. Donenfeld, Daniel Vetter

Hi all,

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

  include/linux/kref.h

between commit:

  56e3d1cd05cc ("kref: prefer atomic_inc_not_zero to atomic_add_unless")

from the drm tree and commit:

  10383aea2f44 ("kref: Implement 'struct kref' using refcount_t")

from the tip tree.

I fixed it up (I just used the tip tree version of kref_get_unless_zero())
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

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

* linux-next: manual merge of the tip tree with the drm tree
@ 2017-02-01  3:38 Stephen Rothwell
  0 siblings, 0 replies; 12+ messages in thread
From: Stephen Rothwell @ 2017-02-01  3:38 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
	Dave Airlie
  Cc: linux-next, linux-kernel, Michel Dänzer,
	Christian König, Alex Deucher

Hi all,

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

  drivers/gpu/drm/ttm/ttm_bo.c

between commit:

  239ac65fa5ff ("drm/ttm: Make sure BOs being swapped out are cacheable")

from the drm tree and commit:

  bdfafc4ffdd2 ("locking/atomic, kref: Kill kref_sub()")
  cf6c467d67d3 ("drm/ttm: add BO priorities for the LRUs")
  896d630d240e ("drm/ttm: revert "add optional LRU removal callback v2"")

from the tip 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 drivers/gpu/drm/ttm/ttm_bo.c
index 4562e53c8244,ffc6cb55c78c..000000000000
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@@ -184,37 -181,26 +184,26 @@@ void ttm_bo_add_to_lru(struct ttm_buffe
  }
  EXPORT_SYMBOL(ttm_bo_add_to_lru);
  
- int ttm_bo_del_from_lru(struct ttm_buffer_object *bo)
+ static void ttm_bo_ref_bug(struct kref *list_kref)
  {
- 	int put_count = 0;
+ 	BUG();
+ }
  
+ void ttm_bo_del_from_lru(struct ttm_buffer_object *bo)
+ {
 -	struct ttm_bo_device *bdev = bo->bdev;
 -
 -	if (bdev->driver->lru_removal)
 -		bdev->driver->lru_removal(bo);
 -
  	if (!list_empty(&bo->swap)) {
  		list_del_init(&bo->swap);
- 		++put_count;
+ 		kref_put(&bo->list_kref, ttm_bo_ref_bug);
  	}
  	if (!list_empty(&bo->lru)) {
  		list_del_init(&bo->lru);
- 		++put_count;
+ 		kref_put(&bo->list_kref, ttm_bo_ref_bug);
  	}
 +
 +	/*
 +	 * TODO: Add a driver hook to delete from
 +	 * driver-specific LRU's here.
 +	 */
- 
- 	return put_count;
- }
- 
- static void ttm_bo_ref_bug(struct kref *list_kref)
- {
- 	BUG();
- }
- 
- void ttm_bo_list_ref_sub(struct ttm_buffer_object *bo, int count,
- 			 bool never_free)
- {
- 	kref_sub(&bo->list_kref, count,
- 		 (never_free) ? ttm_bo_ref_bug : ttm_bo_release_list);
  }
  
  void ttm_bo_del_sub_from_lru(struct ttm_buffer_object *bo)
@@@ -230,12 -213,14 +216,9 @@@ EXPORT_SYMBOL(ttm_bo_del_sub_from_lru)
  
  void ttm_bo_move_to_lru_tail(struct ttm_buffer_object *bo)
  {
- 	int put_count = 0;
 -	struct ttm_bo_device *bdev = bo->bdev;
--
  	lockdep_assert_held(&bo->resv->lock.base);
  
- 	put_count = ttm_bo_del_from_lru(bo);
- 	ttm_bo_list_ref_sub(bo, put_count, true);
 -	if (bdev->driver->lru_removal)
 -		bdev->driver->lru_removal(bo);
 -
+ 	ttm_bo_del_from_lru(bo);
  	ttm_bo_add_to_lru(bo);
  }
  EXPORT_SYMBOL(ttm_bo_move_to_lru_tail);
@@@ -728,28 -718,21 +704,28 @@@ static int ttm_mem_evict_first(struct t
  	struct ttm_bo_global *glob = bdev->glob;
  	struct ttm_mem_type_manager *man = &bdev->man[mem_type];
  	struct ttm_buffer_object *bo;
- 	int ret = -EBUSY, put_count;
+ 	int ret = -EBUSY;
 +	unsigned i;
  
  	spin_lock(&glob->lru_lock);
 -	list_for_each_entry(bo, &man->lru, lru) {
 -		ret = __ttm_bo_reserve(bo, false, true, NULL);
 -		if (ret)
 -			continue;
 +	for (i = 0; i < TTM_MAX_BO_PRIORITY; ++i) {
 +		list_for_each_entry(bo, &man->lru[i], lru) {
 +			ret = __ttm_bo_reserve(bo, false, true, NULL);
 +			if (ret)
 +				continue;
  
 -		if (place && !bdev->driver->eviction_valuable(bo, place)) {
 -			__ttm_bo_unreserve(bo);
 -			ret = -EBUSY;
 -			continue;
 +			if (place && !bdev->driver->eviction_valuable(bo,
 +								      place)) {
 +				__ttm_bo_unreserve(bo);
 +				ret = -EBUSY;
 +				continue;
 +			}
 +
 +			break;
  		}
  
 -		break;
 +		if (!ret)
 +			break;
  	}
  
  	if (ret) {
@@@ -1667,16 -1645,11 +1641,15 @@@ static int ttm_bo_swapout(struct ttm_me
  	    container_of(shrink, struct ttm_bo_global, shrink);
  	struct ttm_buffer_object *bo;
  	int ret = -EBUSY;
- 	int put_count;
 -	uint32_t swap_placement = (TTM_PL_FLAG_CACHED | TTM_PL_FLAG_SYSTEM);
 +	unsigned i;
  
  	spin_lock(&glob->lru_lock);
 -	list_for_each_entry(bo, &glob->swap_lru, swap) {
 -		ret = __ttm_bo_reserve(bo, false, true, NULL);
 +	for (i = 0; i < TTM_MAX_BO_PRIORITY; ++i) {
 +		list_for_each_entry(bo, &glob->swap_lru[i], swap) {
 +			ret = __ttm_bo_reserve(bo, false, true, NULL);
 +			if (!ret)
 +				break;
 +		}
  		if (!ret)
  			break;
  	}

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

* linux-next: manual merge of the tip tree with the drm tree
@ 2016-11-17  2:59 Stephen Rothwell
  0 siblings, 0 replies; 12+ messages in thread
From: Stephen Rothwell @ 2016-11-17  2:59 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
	Dave Airlie
  Cc: linux-next, linux-kernel, Chris Wilson

Hi all,

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

  drivers/gpu/drm/i915/i915_gem_shrinker.c

between commit:

  1233e2db199d ("drm/i915: Move object backing storage manipulation to its own locking")

from the drm tree and commit:

  3ab7c086d5ec ("locking/drm: Kill mutex trickery")
  c7faee2109f9 ("locking/drm: Fix i915_gem_shrinker_lock() locking")
  0f5225b024d4 ("locking/mutex, drm: Introduce mutex_trylock_recursive()")

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.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/i915/i915_gem_shrinker.c
index a6fc1bdc48af,c450076d2f9b..000000000000
--- a/drivers/gpu/drm/i915/i915_gem_shrinker.c
+++ b/drivers/gpu/drm/i915/i915_gem_shrinker.c
@@@ -35,33 -35,6 +35,24 @@@
  #include "i915_drv.h"
  #include "i915_trace.h"
  
- static bool mutex_is_locked_by(struct mutex *mutex, struct task_struct *task)
++static bool i915_gem_shrinker_lock(struct drm_device *dev, bool *unlock)
 +{
- 	if (!mutex_is_locked(mutex))
++	switch (mutex_trylock_recursive(&dev->struct_mutex)) {
++	case MUTEX_TRYLOCK_FAILED:
 +		return false;
 +
- #if defined(CONFIG_DEBUG_MUTEXES) || defined(CONFIG_MUTEX_SPIN_ON_OWNER)
- 	return mutex->owner == task;
- #else
- 	/* Since UP may be pre-empted, we cannot assume that we own the lock */
- 	return false;
- #endif
- }
- 
- static bool i915_gem_shrinker_lock(struct drm_device *dev, bool *unlock)
- {
- 	if (!mutex_trylock(&dev->struct_mutex)) {
- 		if (!mutex_is_locked_by(&dev->struct_mutex, current))
- 			return false;
++	case MUTEX_TRYLOCK_SUCCESS:
++		*unlock = true;
++		return true;
 +
++	case MUTEX_TRYLOCK_RECURSIVE:
 +		*unlock = false;
- 	} else {
- 		*unlock = true;
++		return true;
 +	}
 +
- 	return true;
++	BUG();
 +}
 +
  static bool any_vma_pinned(struct drm_i915_gem_object *obj)
  {
  	struct i915_vma *vma;

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

* Re: linux-next: manual merge of the tip tree with the drm tree
  2016-03-17  9:00 ` Arnd Bergmann
  2016-03-17  9:39   ` Stephen Rothwell
@ 2016-03-17 16:52   ` Dave Hansen
  1 sibling, 0 replies; 12+ messages in thread
From: Dave Hansen @ 2016-03-17 16:52 UTC (permalink / raw)
  To: Arnd Bergmann, Stephen Rothwell
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
	Dave Airlie, linux-next, linux-kernel, Christian König,
	Alex Deucher

On 03/17/2016 02:00 AM, Arnd Bergmann wrote:
> On Thursday 17 March 2016 13:00:29 Stephen Rothwell wrote:
>> > -               r = get_user_pages(current, current->mm, userptr, num_pages,
>> > -                                  write, 0, p, NULL);
>> > +               r = get_user_pages(userptr, num_pages, write, 0, pages, NULL);
>> >  +
>> >  +              spin_lock(&gtt->guptasklock);
>> >  +              list_del(&guptask.list);
>> >  +              spin_unlock(&gtt->guptasklock);
>> >  +
>> >                 if (r < 0)
>> >                         goto release_pages;
...
> Your merge looks incorrect to me, and I got a build warning for it:
> 
> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c: In function 'amdgpu_ttm_tt_get_user_pages':
> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:535:17: error: unused variable 'p' [-Werror=unused-variable]
> 
> I think the one-line change below is what is needed here, but it's probably
> best for amdgpu maintainers to take a closer look.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> 
> index 8b9b245fd0c8..ab34190859a8 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> @@ -540,7 +540,7 @@ int amdgpu_ttm_tt_get_user_pages(struct ttm_tt *ttm, struct page **pages)
>  		list_add(&guptask.list, &gtt->guptasks);
>  		spin_unlock(&gtt->guptasklock);
>  
> -		r = get_user_pages(userptr, num_pages, write, 0, pages, NULL);
> +		r = get_user_pages(userptr, num_pages, write, 0, p, NULL);
>  
>  		spin_lock(&gtt->guptasklock);
>  		list_del(&guptask.list);

Yeah, Arnd's fix looks correct to me.  The loop variable "pages" got
renamed to "p" and another variable "pages" is now being passed into the
function.

The get_user_pages() call should be against 'p', the loop variable.

Also, this is obvious if you consider that the pkeys patch was always
just removing the first two arguments.  We can see in Stephen's patch
above that it both removes those arguments *and* replaces 'p' with 'pages'.

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

* Re: linux-next: manual merge of the tip tree with the drm tree
  2016-03-17  9:00 ` Arnd Bergmann
@ 2016-03-17  9:39   ` Stephen Rothwell
  2016-03-17 16:52   ` Dave Hansen
  1 sibling, 0 replies; 12+ messages in thread
From: Stephen Rothwell @ 2016-03-17  9:39 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
	Dave Airlie, linux-next, linux-kernel, Christian König,
	Alex Deucher, Dave Hansen

Hi Arnd,

On Thu, 17 Mar 2016 10:00:56 +0100 Arnd Bergmann <arnd@arndb.de> wrote:
>
> Your merge looks incorrect to me, and I got a build warning for it:
> 
> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c: In function 'amdgpu_ttm_tt_get_user_pages':
> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:535:17: error: unused variable 'p' [-Werror=unused-variable]
> 
> I think the one-line change below is what is needed here, but it's probably
> best for amdgpu maintainers to take a closer look.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> 
> index 8b9b245fd0c8..ab34190859a8 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> @@ -540,7 +540,7 @@ int amdgpu_ttm_tt_get_user_pages(struct ttm_tt *ttm, struct page **pages)
>  		list_add(&guptask.list, &gtt->guptasks);
>  		spin_unlock(&gtt->guptasklock);
>  
> -		r = get_user_pages(userptr, num_pages, write, 0, pages, NULL);
> +		r = get_user_pages(userptr, num_pages, write, 0, p, NULL);
>  
>  		spin_lock(&gtt->guptasklock);
>  		list_del(&guptask.list);
> 

Ah, there was another commit to this area (I stopped looking to soon):

  2f568dbd6b94 ("drm/amdgpu: move get_user_pages out of amdgpu_ttm_tt_pin_userptr v6")

Your resolution certainly looks better.  I'll do that tomorrow.

-- 
Cheers,
Stephen Rothwell

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

* Re: linux-next: manual merge of the tip tree with the drm tree
  2016-03-17  2:00 Stephen Rothwell
@ 2016-03-17  9:00 ` Arnd Bergmann
  2016-03-17  9:39   ` Stephen Rothwell
  2016-03-17 16:52   ` Dave Hansen
  0 siblings, 2 replies; 12+ messages in thread
From: Arnd Bergmann @ 2016-03-17  9:00 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
	Dave Airlie, linux-next, linux-kernel, Christian König,
	Alex Deucher, Dave Hansen

On Thursday 17 March 2016 13:00:29 Stephen Rothwell wrote:
> diff --cc drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> index 0f42b1a24446,7b82e57aa09c..000000000000
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> @@@ -532,21 -516,9 +532,20 @@@ int amdgpu_ttm_tt_get_user_pages(struc
>         do {
>                 unsigned num_pages = ttm->num_pages - pinned;
>                 uint64_t userptr = gtt->userptr + pinned * PAGE_SIZE;
>  -              struct page **pages = ttm->pages + pinned;
>  +              struct page **p = pages + pinned;
>  +              struct amdgpu_ttm_gup_task_list guptask;
>  +
>  +              guptask.task = current;
>  +              spin_lock(&gtt->guptasklock);
>  +              list_add(&guptask.list, &gtt->guptasks);
>  +              spin_unlock(&gtt->guptasklock);
>   
> -               r = get_user_pages(current, current->mm, userptr, num_pages,
> -                                  write, 0, p, NULL);
> +               r = get_user_pages(userptr, num_pages, write, 0, pages, NULL);
>  +
>  +              spin_lock(&gtt->guptasklock);
>  +              list_del(&guptask.list);
>  +              spin_unlock(&gtt->guptasklock);
>  +
>                 if (r < 0)
>                         goto release_pages;

Your merge looks incorrect to me, and I got a build warning for it:

drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c: In function 'amdgpu_ttm_tt_get_user_pages':
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:535:17: error: unused variable 'p' [-Werror=unused-variable]

I think the one-line change below is what is needed here, but it's probably
best for amdgpu maintainers to take a closer look.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

index 8b9b245fd0c8..ab34190859a8 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -540,7 +540,7 @@ int amdgpu_ttm_tt_get_user_pages(struct ttm_tt *ttm, struct page **pages)
 		list_add(&guptask.list, &gtt->guptasks);
 		spin_unlock(&gtt->guptasklock);
 
-		r = get_user_pages(userptr, num_pages, write, 0, pages, NULL);
+		r = get_user_pages(userptr, num_pages, write, 0, p, NULL);
 
 		spin_lock(&gtt->guptasklock);
 		list_del(&guptask.list);

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

* linux-next: manual merge of the tip tree with the drm tree
@ 2016-03-17  2:00 Stephen Rothwell
  2016-03-17  9:00 ` Arnd Bergmann
  0 siblings, 1 reply; 12+ messages in thread
From: Stephen Rothwell @ 2016-03-17  2:00 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
	Dave Airlie
  Cc: linux-next, linux-kernel, Christian König, Alex Deucher,
	Dave Hansen

Hi all,

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

  drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c

between commit:

  637dd3b5ca9e ("drm/amdgpu: prevent get_user_pages recursion")

from the drm tree and commit:

  d4edcf0d5695 ("mm/gup: Switch all callers of get_user_pages() to not pass tsk/mm")

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.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index 0f42b1a24446,7b82e57aa09c..000000000000
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@@ -532,21 -516,9 +532,20 @@@ int amdgpu_ttm_tt_get_user_pages(struc
  	do {
  		unsigned num_pages = ttm->num_pages - pinned;
  		uint64_t userptr = gtt->userptr + pinned * PAGE_SIZE;
 -		struct page **pages = ttm->pages + pinned;
 +		struct page **p = pages + pinned;
 +		struct amdgpu_ttm_gup_task_list guptask;
 +
 +		guptask.task = current;
 +		spin_lock(&gtt->guptasklock);
 +		list_add(&guptask.list, &gtt->guptasks);
 +		spin_unlock(&gtt->guptasklock);
  
- 		r = get_user_pages(current, current->mm, userptr, num_pages,
- 				   write, 0, p, NULL);
+ 		r = get_user_pages(userptr, num_pages, write, 0, pages, NULL);
 +
 +		spin_lock(&gtt->guptasklock);
 +		list_del(&guptask.list);
 +		spin_unlock(&gtt->guptasklock);
 +
  		if (r < 0)
  			goto release_pages;
  

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

* linux-next: manual merge of the tip tree with the drm tree
@ 2014-03-24  3:38 Stephen Rothwell
  0 siblings, 0 replies; 12+ messages in thread
From: Stephen Rothwell @ 2014-03-24  3:38 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
	Dave Airlie
  Cc: linux-next, linux-kernel, Patrik Jakobsson

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

Hi all,

Today's linux-next merge of the tip tree got a conflict in
drivers/gpu/drm/gma500/mmu.c between commit b219372dff81 ("drm/gma500:
Make SGX MMU driver actually do something") from the drm tree and commit
840d2830e6e5 ("x86, cpufeature: Rename X86_FEATURE_CLFLSH to
X86_FEATURE_CLFLUSH") from the tip tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc drivers/gpu/drm/gma500/mmu.c
index 3e14a9b35252,c3e67ba94446..000000000000
--- a/drivers/gpu/drm/gma500/mmu.c
+++ b/drivers/gpu/drm/gma500/mmu.c
@@@ -478,8 -520,7 +478,8 @@@ struct psb_mmu_driver *psb_mmu_driver_i
  
  	driver->has_clflush = 0;
  
 +#if defined(CONFIG_X86)
- 	if (boot_cpu_has(X86_FEATURE_CLFLSH)) {
+ 	if (boot_cpu_has(X86_FEATURE_CLFLUSH)) {
  		uint32_t tfms, misc, cap0, cap4, clflush_size;
  
  		/*

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* linux-next: manual merge of the tip tree with the drm tree
@ 2012-03-13  5:11 Stephen Rothwell
  0 siblings, 0 replies; 12+ messages in thread
From: Stephen Rothwell @ 2012-03-13  5:11 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra
  Cc: linux-next, linux-kernel, Kirill A. Shutemov, Alan Cox,
	Dave Airlie, Mika Westerberg

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

Hi all,

Today's linux-next merge of the tip tree got a conflict in
arch/x86/platform/mrst/mrst.c between commit 026abc333205 ("gma500:
initial medfield merge") from the drm tree and commit ecfdb0ac15ba
("x86/mrst: Add msic_thermal platform support") from the tip tree.

Just context changes.  I fixed it up (see below) and can carry the fix as
necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc arch/x86/platform/mrst/mrst.c
index b930cc4,721e652..0000000
--- a/arch/x86/platform/mrst/mrst.c
+++ b/arch/x86/platform/mrst/mrst.c
@@@ -688,19 -670,11 +672,24 @@@ static void *msic_ocd_platform_data(voi
  	return msic_generic_platform_data(info, INTEL_MSIC_BLOCK_OCD);
  }
  
 +/* tc35876x DSI-LVDS bridge chip and panel platform data */
 +static void *tc35876x_platform_data(void *data)
 +{
 +       static struct tc35876x_platform_data pdata;
 +
 +       /* gpio pins set to -1 will not be used by the driver */
 +       pdata.gpio_bridge_reset = get_gpio_by_name("LCMB_RXEN");
 +       pdata.gpio_panel_bl_en = get_gpio_by_name("6S6P_BL_EN");
 +       pdata.gpio_panel_vadd = get_gpio_by_name("EN_VREG_LCD_V3P3");
 +
 +       return &pdata;
 +}
 +
+ static void *msic_thermal_platform_data(void *info)
+ {
+ 	return msic_generic_platform_data(info, INTEL_MSIC_BLOCK_THERMAL);
+ }
+ 
  static const struct devs_id __initconst device_ids[] = {
  	{"bma023", SFI_DEV_TYPE_I2C, 1, &no_platform_data},
  	{"pmic_gpio", SFI_DEV_TYPE_SPI, 1, &pmic_gpio_platform_data},

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, back to index

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-10  1:51 linux-next: manual merge of the tip tree with the drm tree Stephen Rothwell
2019-11-27 23:36 ` Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2019-11-27  0:18 Stephen Rothwell
2017-02-17  1:56 Stephen Rothwell
2017-02-01  3:38 Stephen Rothwell
2016-11-17  2:59 Stephen Rothwell
2016-03-17  2:00 Stephen Rothwell
2016-03-17  9:00 ` Arnd Bergmann
2016-03-17  9:39   ` Stephen Rothwell
2016-03-17 16:52   ` Dave Hansen
2014-03-24  3:38 Stephen Rothwell
2012-03-13  5:11 Stephen Rothwell

Linux-Next Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-next/0 linux-next/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-next linux-next/ https://lore.kernel.org/linux-next \
		linux-next@vger.kernel.org
	public-inbox-index linux-next

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-next


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git