Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1466719 > unrolled thread
| Started by | Al Stone <ahs3@redhat.com> |
|---|---|
| First post | 2016-08-20 01:30 +0200 |
| Last post | 2016-08-20 01:30 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 2/2] ia64: fix compilation error when using struct before defining it Al Stone <ahs3@redhat.com> - 2016-08-20 01:30 +0200
| From | Al Stone <ahs3@redhat.com> |
|---|---|
| Date | 2016-08-20 01:30 +0200 |
| Subject | [PATCH 2/2] ia64: fix compilation error when using struct before defining it |
| Message-ID | <s81oC-3EB-19@gated-at.bofh.it> |
In sn2_smp.c, the struct ptc_stats was being used before it was defined.
Move the usage of the struct to after the definition.
Found during cross-compilation using ia64 defconfig.
Signed-off-by: Al Stone <ahs3@redhat.com>
---
arch/ia64/sn/kernel/sn2/sn2_smp.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/ia64/sn/kernel/sn2/sn2_smp.c b/arch/ia64/sn/kernel/sn2/sn2_smp.c
index 8701b2f..7316e9f 100644
--- a/arch/ia64/sn/kernel/sn2/sn2_smp.c
+++ b/arch/ia64/sn/kernel/sn2/sn2_smp.c
@@ -41,9 +41,6 @@
#include <asm/sn/rw_mmr.h>
#include <asm/sn/sn_feature_sets.h>
-DEFINE_PER_CPU(struct ptc_stats, ptcstats);
-DECLARE_PER_CPU(struct ptc_stats, ptcstats);
-
static __cacheline_aligned DEFINE_SPINLOCK(sn2_global_ptc_lock);
/* 0 = old algorithm (no IPI flushes), 1 = ipi deadlock flush, 2 = ipi instead of SHUB ptc, >2 = always ipi */
@@ -83,6 +80,9 @@ struct ptc_stats {
unsigned long shub_ipi_flushes_itc_clocks;
};
+DEFINE_PER_CPU(struct ptc_stats, ptcstats);
+DECLARE_PER_CPU(struct ptc_stats, ptcstats);
+
#define sn2_ptctest 0
static inline unsigned long wait_piowc(void)
--
2.7.4
Back to top | Article view | linux.kernel
csiph-web