All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-next: manual merge of the tip tree with the sh tree
@ 2016-07-24  5:13 Stephen Rothwell
  2016-07-25  3:55 ` Rich Felker
  2016-07-25 22:30 ` Stephen Rothwell
  0 siblings, 2 replies; 6+ messages in thread
From: Stephen Rothwell @ 2016-07-24  5:13 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
	Rich Felker
  Cc: linux-next, linux-kernel

Hi all,

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

  arch/sh/include/asm/spinlock.h

between commit:

  2da83dfce7df ("sh: add J2 atomics using the cas.l instruction")

from the sh tree and commit:

  726328d92a42 ("locking/spinlock, arch: Update and fix spin_unlock_wait() implementations")

from the tip tree.

I fixed it up (I used this file from the sh tree and then added the merge
fix patch 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.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Sun, 24 Jul 2016 15:09:57 +1000
Subject: [PATCH] locking/spinlock, arch: merge fix for "sh: add J2 atomics
 using the cas.l instruction"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/sh/include/asm/spinlock-cas.h  | 10 ++++++++--
 arch/sh/include/asm/spinlock-llsc.h | 10 ++++++++--
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/arch/sh/include/asm/spinlock-cas.h b/arch/sh/include/asm/spinlock-cas.h
index a2a7c10b30d9..c46e8cc7b515 100644
--- a/arch/sh/include/asm/spinlock-cas.h
+++ b/arch/sh/include/asm/spinlock-cas.h
@@ -10,6 +10,9 @@
 #ifndef __ASM_SH_SPINLOCK_CAS_H
 #define __ASM_SH_SPINLOCK_CAS_H
 
+#include <asm/barrier.h>
+#include <asm/processor.h>
+
 static inline unsigned __sl_cas(volatile unsigned *p, unsigned old, unsigned new)
 {
 	__asm__ __volatile__("cas.l %1,%0,@r0"
@@ -25,8 +28,11 @@ static inline unsigned __sl_cas(volatile unsigned *p, unsigned old, unsigned new
 
 #define arch_spin_is_locked(x)		((x)->lock <= 0)
 #define arch_spin_lock_flags(lock, flags) arch_spin_lock(lock)
-#define arch_spin_unlock_wait(x) \
-	do { while (arch_spin_is_locked(x)) cpu_relax(); } while (0)
+
+static inline void arch_spin_unlock_wait(arch_spinlock_t *lock)
+{
+	smp_cond_load_acquire(&lock->lock, VAL > 0);
+}
 
 static inline void arch_spin_lock(arch_spinlock_t *lock)
 {
diff --git a/arch/sh/include/asm/spinlock-llsc.h b/arch/sh/include/asm/spinlock-llsc.h
index 238ef6f54dcc..cec78143fa83 100644
--- a/arch/sh/include/asm/spinlock-llsc.h
+++ b/arch/sh/include/asm/spinlock-llsc.h
@@ -11,14 +11,20 @@
 #ifndef __ASM_SH_SPINLOCK_LLSC_H
 #define __ASM_SH_SPINLOCK_LLSC_H
 
+#include <asm/barrier.h>
+#include <asm/processor.h>
+
 /*
  * Your basic SMP spinlocks, allowing only a single CPU anywhere
  */
 
 #define arch_spin_is_locked(x)		((x)->lock <= 0)
 #define arch_spin_lock_flags(lock, flags) arch_spin_lock(lock)
-#define arch_spin_unlock_wait(x) \
-	do { while (arch_spin_is_locked(x)) cpu_relax(); } while (0)
+
+static inline void arch_spin_unlock_wait(arch_spinlock_t *lock)
+{
+	smp_cond_load_acquire(&lock->lock, VAL > 0);
+}
 
 /*
  * Simple spin lock operations.  There are two variants, one clears IRQ's
-- 
2.8.1

-- 
Cheers,
Stephen Rothwell

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

* Re: linux-next: manual merge of the tip tree with the sh tree
  2016-07-24  5:13 linux-next: manual merge of the tip tree with the sh tree Stephen Rothwell
@ 2016-07-25  3:55 ` Rich Felker
  2016-07-25  4:16   ` Stephen Rothwell
  2016-07-25 22:30 ` Stephen Rothwell
  1 sibling, 1 reply; 6+ messages in thread
From: Rich Felker @ 2016-07-25  3:55 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
	linux-next, linux-kernel

On Sun, Jul 24, 2016 at 03:13:42PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> Today's linux-next merge of the tip tree got a conflict in:
> 
>   arch/sh/include/asm/spinlock.h
> 
> between commit:
> 
>   2da83dfce7df ("sh: add J2 atomics using the cas.l instruction")
> 
> from the sh tree and commit:
> 
>   726328d92a42 ("locking/spinlock, arch: Update and fix spin_unlock_wait() implementations")
> 
> from the tip tree.
> 
> I fixed it up (I used this file from the sh tree and then added the merge
> fix patch 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.

Assuming the J2 SMP changes go upstream this merge window, should I
simply cite this conflict and your patch when sending the pull request
to Linux, or include the merge fix patch myself?

Rich

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

* Re: linux-next: manual merge of the tip tree with the sh tree
  2016-07-25  3:55 ` Rich Felker
@ 2016-07-25  4:16   ` Stephen Rothwell
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2016-07-25  4:16 UTC (permalink / raw)
  To: Rich Felker
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
	linux-next, linux-kernel

Hi Rich,

On Sun, 24 Jul 2016 23:55:03 -0400 Rich Felker <dalias@libc.org> wrote:
>
> On Sun, Jul 24, 2016 at 03:13:42PM +1000, Stephen Rothwell wrote:
> > 
> > Today's linux-next merge of the tip tree got a conflict in:
> > 
> >   arch/sh/include/asm/spinlock.h
> > 
> > between commit:
> > 
> >   2da83dfce7df ("sh: add J2 atomics using the cas.l instruction")
> > 
> > from the sh tree and commit:
> > 
> >   726328d92a42 ("locking/spinlock, arch: Update and fix spin_unlock_wait() implementations")
> > 
> > from the tip tree.
> > 
> > I fixed it up (I used this file from the sh tree and then added the merge
> > fix patch 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.  
> 
> Assuming the J2 SMP changes go upstream this merge window, should I
> simply cite this conflict and your patch when sending the pull request
> to Linux, or include the merge fix patch myself?

Just mention it to Linus.
-- 
Cheers,
Stephen Rothwell

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

* Re: linux-next: manual merge of the tip tree with the sh tree
  2016-07-24  5:13 linux-next: manual merge of the tip tree with the sh tree Stephen Rothwell
  2016-07-25  3:55 ` Rich Felker
@ 2016-07-25 22:30 ` Stephen Rothwell
  1 sibling, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2016-07-25 22:30 UTC (permalink / raw)
  To: Rich Felker
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
	linux-next, linux-kernel, Linus

Hi all,

On Sun, 24 Jul 2016 15:13:42 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the tip tree got a conflict in:
> 
>   arch/sh/include/asm/spinlock.h
> 
> between commit:
> 
>   2da83dfce7df ("sh: add J2 atomics using the cas.l instruction")
> 
> from the sh tree and commit:
> 
>   726328d92a42 ("locking/spinlock, arch: Update and fix spin_unlock_wait() implementations")
> 
> from the tip tree.
> 
> I fixed it up (I used this file from the sh tree and then added the merge
> fix patch 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.
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Sun, 24 Jul 2016 15:09:57 +1000
> Subject: [PATCH] locking/spinlock, arch: merge fix for "sh: add J2 atomics
>  using the cas.l instruction"
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  arch/sh/include/asm/spinlock-cas.h  | 10 ++++++++--
>  arch/sh/include/asm/spinlock-llsc.h | 10 ++++++++--
>  2 files changed, 16 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/sh/include/asm/spinlock-cas.h b/arch/sh/include/asm/spinlock-cas.h
> index a2a7c10b30d9..c46e8cc7b515 100644
> --- a/arch/sh/include/asm/spinlock-cas.h
> +++ b/arch/sh/include/asm/spinlock-cas.h
> @@ -10,6 +10,9 @@
>  #ifndef __ASM_SH_SPINLOCK_CAS_H
>  #define __ASM_SH_SPINLOCK_CAS_H
>  
> +#include <asm/barrier.h>
> +#include <asm/processor.h>
> +
>  static inline unsigned __sl_cas(volatile unsigned *p, unsigned old, unsigned new)
>  {
>  	__asm__ __volatile__("cas.l %1,%0,@r0"
> @@ -25,8 +28,11 @@ static inline unsigned __sl_cas(volatile unsigned *p, unsigned old, unsigned new
>  
>  #define arch_spin_is_locked(x)		((x)->lock <= 0)
>  #define arch_spin_lock_flags(lock, flags) arch_spin_lock(lock)
> -#define arch_spin_unlock_wait(x) \
> -	do { while (arch_spin_is_locked(x)) cpu_relax(); } while (0)
> +
> +static inline void arch_spin_unlock_wait(arch_spinlock_t *lock)
> +{
> +	smp_cond_load_acquire(&lock->lock, VAL > 0);
> +}
>  
>  static inline void arch_spin_lock(arch_spinlock_t *lock)
>  {
> diff --git a/arch/sh/include/asm/spinlock-llsc.h b/arch/sh/include/asm/spinlock-llsc.h
> index 238ef6f54dcc..cec78143fa83 100644
> --- a/arch/sh/include/asm/spinlock-llsc.h
> +++ b/arch/sh/include/asm/spinlock-llsc.h
> @@ -11,14 +11,20 @@
>  #ifndef __ASM_SH_SPINLOCK_LLSC_H
>  #define __ASM_SH_SPINLOCK_LLSC_H
>  
> +#include <asm/barrier.h>
> +#include <asm/processor.h>
> +
>  /*
>   * Your basic SMP spinlocks, allowing only a single CPU anywhere
>   */
>  
>  #define arch_spin_is_locked(x)		((x)->lock <= 0)
>  #define arch_spin_lock_flags(lock, flags) arch_spin_lock(lock)
> -#define arch_spin_unlock_wait(x) \
> -	do { while (arch_spin_is_locked(x)) cpu_relax(); } while (0)
> +
> +static inline void arch_spin_unlock_wait(arch_spinlock_t *lock)
> +{
> +	smp_cond_load_acquire(&lock->lock, VAL > 0);
> +}
>  
>  /*
>   * Simple spin lock operations.  There are two variants, one clears IRQ's
> -- 
> 2.8.1

Since Linus has merged part of the tip tree, this conflict resolution
is now needed when the sh tree is merged with Linus' tree.

-- 
Cheers,
Stephen Rothwell

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

* linux-next: manual merge of the tip tree with the sh tree
@ 2010-10-14  2:19 Stephen Rothwell
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2010-10-14  2:19 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra
  Cc: linux-next, linux-kernel, Paul Mundt

Hi all,

Today's linux-next merge of the tip tree got a conflict in
arch/sh/kernel/perf_event.c between commit
51c6c9bb34fcd112d4ab8b8f5c1d1b6a10a00e71 ("sh: perf: Set up
perf_max_events") from the sh tree and commit
a4eaf7f14675cb512d69f0c928055e73d0c6d252 ("perf: Rework the PMU methods")
from the tip tree.

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

diff --cc arch/sh/kernel/perf_event.c
index ecef1fe,036f7a9..0000000
--- a/arch/sh/kernel/perf_event.c
+++ b/arch/sh/kernel/perf_event.c
@@@ -319,13 -365,13 +365,14 @@@ int __cpuinit register_sh_pmu(struct sh
  {
  	if (sh_pmu)
  		return -EBUSY;
- 	sh_pmu = pmu;
+ 	sh_pmu = _pmu;
  
- 	pr_info("Performance Events: %s support registered\n", pmu->name);
+ 	pr_info("Performance Events: %s support registered\n", _pmu->name);
  
- 	WARN_ON(pmu->num_events > MAX_HWEVENTS);
- 	perf_max_events = pmu->num_events;
+ 	WARN_ON(_pmu->num_events > MAX_HWEVENTS);
++	perf_max_events = _pmu->num_events;
  
+ 	perf_pmu_register(&pmu);
  	perf_cpu_notifier(sh_pmu_notifier);
  	return 0;
  }

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

* linux-next: manual merge of the tip tree with the sh tree
@ 2010-07-28  4:35 Stephen Rothwell
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2010-07-28  4:35 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra
  Cc: linux-next, linux-kernel, Guennadi Liakhovetski, Paul Mundt, John Stultz

Hi all,

Today's linux-next merge of the tip tree got a conflict in
drivers/Makefile between commit ae9b12c72f831a2f956a5b30fd999f3018c43a89
("dmaengine: initialise DMA engine before MMC") from the sh tree and
commit 592913ecb87a9e06f98ddb55b298f1a66bf94c6b ("time: Kill off
CONFIG_GENERIC_TIME") 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 drivers/Makefile
index 20dcced,ae47344..0000000
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@@ -102,7 -101,10 +102,9 @@@ obj-y				+= firmware
  obj-$(CONFIG_CRYPTO)		+= crypto/
  obj-$(CONFIG_SUPERH)		+= sh/
  obj-$(CONFIG_ARCH_SHMOBILE)	+= sh/
- obj-$(CONFIG_GENERIC_TIME)	+= clocksource/
+ ifndef CONFIG_ARCH_USES_GETTIMEOFFSET
+ obj-y				+= clocksource/
+ endif
 -obj-$(CONFIG_DMA_ENGINE)	+= dma/
  obj-$(CONFIG_DCA)		+= dca/
  obj-$(CONFIG_HID)		+= hid/
  obj-$(CONFIG_PPC_PS3)		+= ps3/

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

end of thread, other threads:[~2016-07-25 22:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-24  5:13 linux-next: manual merge of the tip tree with the sh tree Stephen Rothwell
2016-07-25  3:55 ` Rich Felker
2016-07-25  4:16   ` Stephen Rothwell
2016-07-25 22:30 ` Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2010-10-14  2:19 Stephen Rothwell
2010-07-28  4:35 Stephen Rothwell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.