* [PATCH 03/34] ia64: rename nop->iosapic_nop
[not found] <1451473761-30019-1-git-send-email-mst@redhat.com>
@ 2015-12-30 13:24 ` Michael S. Tsirkin
2015-12-30 16:39 ` Luck, Tony
2015-12-30 13:24 ` [PATCH 04/34] ia64: reuse asm-generic/barrier.h Michael S. Tsirkin
2015-12-30 13:25 ` [PATCH 20/34] ia64: define __smp_xxx Michael S. Tsirkin
2 siblings, 1 reply; 5+ messages in thread
From: Michael S. Tsirkin @ 2015-12-30 13:24 UTC (permalink / raw)
To: linux-kernel
Cc: Peter Zijlstra, Arnd Bergmann, linux-arch, Andrew Cooper,
virtualization, Stefano Stabellini, Tony Luck, Fenghua Yu,
Thomas Gleixner, Rusty Russell, Jiang Liu, linux-ia64
asm-generic/barrier.h defines a nop() macro.
To be able to use this header on ia64, we shouldn't
call local functions/variables nop().
There's one instance where this breaks on ia64:
rename the function to iosapic_nop to avoid the conflict.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
arch/ia64/kernel/iosapic.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c
index d2fae05..90fde5b 100644
--- a/arch/ia64/kernel/iosapic.c
+++ b/arch/ia64/kernel/iosapic.c
@@ -256,7 +256,7 @@ set_rte (unsigned int gsi, unsigned int irq, unsigned int dest, int mask)
}
static void
-nop (struct irq_data *data)
+iosapic_nop (struct irq_data *data)
{
/* do nothing... */
}
@@ -415,7 +415,7 @@ iosapic_unmask_level_irq (struct irq_data *data)
#define iosapic_shutdown_level_irq mask_irq
#define iosapic_enable_level_irq unmask_irq
#define iosapic_disable_level_irq mask_irq
-#define iosapic_ack_level_irq nop
+#define iosapic_ack_level_irq iosapic_nop
static struct irq_chip irq_type_iosapic_level = {
.name = "IO-SAPIC-level",
@@ -453,7 +453,7 @@ iosapic_ack_edge_irq (struct irq_data *data)
}
#define iosapic_enable_edge_irq unmask_irq
-#define iosapic_disable_edge_irq nop
+#define iosapic_disable_edge_irq iosapic_nop
static struct irq_chip irq_type_iosapic_edge = {
.name = "IO-SAPIC-edge",
--
MST
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 04/34] ia64: reuse asm-generic/barrier.h
[not found] <1451473761-30019-1-git-send-email-mst@redhat.com>
2015-12-30 13:24 ` [PATCH 03/34] ia64: rename nop->iosapic_nop Michael S. Tsirkin
@ 2015-12-30 13:24 ` Michael S. Tsirkin
2015-12-30 16:41 ` Luck, Tony
2015-12-30 13:25 ` [PATCH 20/34] ia64: define __smp_xxx Michael S. Tsirkin
2 siblings, 1 reply; 5+ messages in thread
From: Michael S. Tsirkin @ 2015-12-30 13:24 UTC (permalink / raw)
To: linux-kernel
Cc: Peter Zijlstra, Arnd Bergmann, linux-arch, Andrew Cooper,
virtualization, Stefano Stabellini, Tony Luck, Fenghua Yu,
Ingo Molnar, Michael Ellerman, Andrey Konovalov, linux-ia64
On ia64 smp_rmb, smp_wmb, read_barrier_depends, smp_read_barrier_depends
and smp_store_mb() match the asm-generic variants exactly. Drop the
local definitions and pull in asm-generic/barrier.h instead.
This is in preparation to refactoring this code area.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
arch/ia64/include/asm/barrier.h | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/arch/ia64/include/asm/barrier.h b/arch/ia64/include/asm/barrier.h
index df896a1..2f93348 100644
--- a/arch/ia64/include/asm/barrier.h
+++ b/arch/ia64/include/asm/barrier.h
@@ -48,12 +48,6 @@
# define smp_mb() barrier()
#endif
-#define smp_rmb() smp_mb()
-#define smp_wmb() smp_mb()
-
-#define read_barrier_depends() do { } while (0)
-#define smp_read_barrier_depends() do { } while (0)
-
#define smp_mb__before_atomic() barrier()
#define smp_mb__after_atomic() barrier()
@@ -77,12 +71,12 @@ do { \
___p1; \
})
-#define smp_store_mb(var, value) do { WRITE_ONCE(var, value); mb(); } while (0)
-
/*
* The group barrier in front of the rsm & ssm are necessary to ensure
* that none of the previous instructions in the same group are
* affected by the rsm/ssm.
*/
+#include <asm-generic/barrier.h>
+
#endif /* _ASM_IA64_BARRIER_H */
--
MST
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 20/34] ia64: define __smp_xxx
[not found] <1451473761-30019-1-git-send-email-mst@redhat.com>
2015-12-30 13:24 ` [PATCH 03/34] ia64: rename nop->iosapic_nop Michael S. Tsirkin
2015-12-30 13:24 ` [PATCH 04/34] ia64: reuse asm-generic/barrier.h Michael S. Tsirkin
@ 2015-12-30 13:25 ` Michael S. Tsirkin
2 siblings, 0 replies; 5+ messages in thread
From: Michael S. Tsirkin @ 2015-12-30 13:25 UTC (permalink / raw)
To: linux-kernel
Cc: Peter Zijlstra, Arnd Bergmann, linux-arch, Andrew Cooper,
virtualization, Stefano Stabellini, Tony Luck, Fenghua Yu,
Ingo Molnar, Davidlohr Bueso, Andrey Konovalov, linux-ia64
This defines __smp_XXX barriers for ia64,
for use by virtualization.
smp_XXX barriers are removed as they are
defined correctly by asm-generic/barriers.h
This reduces the amount of arch-specific boiler-plate code.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
arch/ia64/include/asm/barrier.h | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/arch/ia64/include/asm/barrier.h b/arch/ia64/include/asm/barrier.h
index 2f93348..588f161 100644
--- a/arch/ia64/include/asm/barrier.h
+++ b/arch/ia64/include/asm/barrier.h
@@ -42,28 +42,24 @@
#define dma_rmb() mb()
#define dma_wmb() mb()
-#ifdef CONFIG_SMP
-# define smp_mb() mb()
-#else
-# define smp_mb() barrier()
-#endif
+# define __smp_mb() mb()
-#define smp_mb__before_atomic() barrier()
-#define smp_mb__after_atomic() barrier()
+#define __smp_mb__before_atomic() barrier()
+#define __smp_mb__after_atomic() barrier()
/*
* IA64 GCC turns volatile stores into st.rel and volatile loads into ld.acq no
* need for asm trickery!
*/
-#define smp_store_release(p, v) \
+#define __smp_store_release(p, v) \
do { \
compiletime_assert_atomic_type(*p); \
barrier(); \
WRITE_ONCE(*p, v); \
} while (0)
-#define smp_load_acquire(p) \
+#define __smp_load_acquire(p) \
({ \
typeof(*p) ___p1 = READ_ONCE(*p); \
compiletime_assert_atomic_type(*p); \
--
MST
^ permalink raw reply related [flat|nested] 5+ messages in thread
* RE: [PATCH 03/34] ia64: rename nop->iosapic_nop
2015-12-30 13:24 ` [PATCH 03/34] ia64: rename nop->iosapic_nop Michael S. Tsirkin
@ 2015-12-30 16:39 ` Luck, Tony
0 siblings, 0 replies; 5+ messages in thread
From: Luck, Tony @ 2015-12-30 16:39 UTC (permalink / raw)
To: Michael S. Tsirkin, linux-kernel@vger.kernel.org
Cc: Peter Zijlstra, Arnd Bergmann, linux-arch@vger.kernel.org,
Andrew Cooper, virtualization@lists.linux-foundation.org,
Stefano Stabellini, Yu, Fenghua, Thomas Gleixner, Rusty Russell,
Jiang Liu, linux-ia64@vger.kernel.org
> asm-generic/barrier.h defines a nop() macro.
> To be able to use this header on ia64, we shouldn't
> call local functions/variables nop().
>
> There's one instance where this breaks on ia64:
> rename the function to iosapic_nop to avoid the conflict.
Acked-by: Tony Luck <tony.luck@intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH 04/34] ia64: reuse asm-generic/barrier.h
2015-12-30 13:24 ` [PATCH 04/34] ia64: reuse asm-generic/barrier.h Michael S. Tsirkin
@ 2015-12-30 16:41 ` Luck, Tony
0 siblings, 0 replies; 5+ messages in thread
From: Luck, Tony @ 2015-12-30 16:41 UTC (permalink / raw)
To: Michael S. Tsirkin, linux-kernel@vger.kernel.org
Cc: Peter Zijlstra, Arnd Bergmann, linux-arch@vger.kernel.org,
Andrew Cooper, virtualization@lists.linux-foundation.org,
Stefano Stabellini, Yu, Fenghua, Ingo Molnar, Michael Ellerman,
Andrey Konovalov, linux-ia64@vger.kernel.org
> On ia64 smp_rmb, smp_wmb, read_barrier_depends, smp_read_barrier_depends
> and smp_store_mb() match the asm-generic variants exactly. Drop the
> local definitions and pull in asm-generic/barrier.h instead.
>
> This is in preparation to refactoring this code area.
Acked-by: Tony Luck <tony.luck@intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-12-30 16:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1451473761-30019-1-git-send-email-mst@redhat.com>
2015-12-30 13:24 ` [PATCH 03/34] ia64: rename nop->iosapic_nop Michael S. Tsirkin
2015-12-30 16:39 ` Luck, Tony
2015-12-30 13:24 ` [PATCH 04/34] ia64: reuse asm-generic/barrier.h Michael S. Tsirkin
2015-12-30 16:41 ` Luck, Tony
2015-12-30 13:25 ` [PATCH 20/34] ia64: define __smp_xxx Michael S. Tsirkin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).