Skip to contentSkip to conversation

minor ia64 source code changes

PATCH New Al Stone 1 participant 3 messages Aug 19, 2016

lore
Share & tools
lore

Al Stone

author
#0 lore raw

cover minor ia64 source code changes

Really trivial changes: one for whitespace, and a second for a compilation error that can occur due to a use before a definition without a forward declaration.

Al Stone (2):
ia64: remove extraneous white space
ia64: fix compilation error when using struct before defining it

 arch/ia64/sn/kernel/sn2/sn2_smp.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH 1/2 ia64: remove extraneous white space

---
 arch/ia64/sn/kernel/sn2/sn2_smp.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/ia64/sn/kernel/sn2/sn2_smp.c +4 -4
index c98dc96..8701b2f 100644
@@ -234,11 +234,11 @@ sn2_global_tlb_purge(struct mm_struct *mm, unsigned long start,
 		data0 = (1UL << SH2_PTC_A_SHFT) |
 			(nbits << SH2_PTC_PS_SHFT) |
 		    	(1UL << SH2_PTC_START_SHFT);
-		ptc0 = (long *)GLOBAL_MMR_PHYS_ADDR(0, SH2_PTC + 
+		ptc0 = (long *)GLOBAL_MMR_PHYS_ADDR(0, SH2_PTC +
 			(rr_value << SH2_PTC_RID_SHFT));
 		ptc1 = NULL;
 	}
-	
+
 
 	mynasid = get_nasid();
 	use_cpu_ptcga = local_node_uses_ptc_ga(shub1);
@@ -322,7 +322,7 @@ done:
 /*
  * sn2_ptc_deadlock_recovery
  *
- * Recover from PTC deadlocks conditions. Recovery requires stepping thru each 
+ * Recover from PTC deadlocks conditions. Recovery requires stepping thru each
  * TLB flush transaction.  The recovery sequence is somewhat tricky & is
  * coded in assembly language.
  */
@@ -417,7 +417,7 @@ EXPORT_SYMBOL(sn_send_IPI_phys);
  * @redirect: redirect the IPI?
  *
  * Sends an IPI (InterProcessor Interrupt) to the processor specified by
- * @cpuid.  @vector specifies the command to send, while @delivery_mode can 
+ * @cpuid.  @vector specifies the command to send, while @delivery_mode can
  * be one of the following
  *
  * %IA64_IPI_DM_INT - pend an interrupt
Signature · 1 line
2.7.4
author
#2 lore raw

PATCH 2/2 ia64: fix compilation error when using struct before defining it

In reply to Al Stone

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.

---
 arch/ia64/sn/kernel/sn2/sn2_smp.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/ia64/sn/kernel/sn2/sn2_smp.c +3 -3
index 8701b2f..7316e9f 100644
@@ -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)
Signature · 1 line
2.7.4