Skip to contentSkip to conversation

NTB: unify translation addresses

PATCH In review Dave Jiang 3 participants 3 messages Sep 24, 2015 – Oct 5, 2015

Subsystems (2)
lore
Share & tools
lore

Dave Jiang

author maintainer
#0 lore raw

PATCH 1/1 NTB: unify translation addresses

There is no need for the upstream and downstream addresses to be different for the NTB configs. Go to using a single set of address. It is still possible to configure them differently using module parameter override however.

---
 drivers/ntb/hw/intel/ntb_hw_intel.c |   16 ++++++++--------
 drivers/ntb/hw/intel/ntb_hw_intel.h |   15 +++++----------
 2 files changed, 13 insertions(+), 18 deletions(-)
drivers/ntb/hw/intel/ntb_hw_intel.c +8 -8
index 6e4f7be..c45850a 100644
@@ -2481,17 +2481,17 @@ static const struct intel_ntb_xlat_reg xeon_sec_xlat = {
 };
 
 static struct intel_b2b_addr xeon_b2b_usd_addr = {
-	.bar2_addr64		= XEON_B2B_BAR2_USD_ADDR64,
-	.bar4_addr64		= XEON_B2B_BAR4_USD_ADDR64,
-	.bar4_addr32		= XEON_B2B_BAR4_USD_ADDR32,
-	.bar5_addr32		= XEON_B2B_BAR5_USD_ADDR32,
+	.bar2_addr64		= XEON_B2B_BAR2_ADDR64,
+	.bar4_addr64		= XEON_B2B_BAR4_ADDR64,
+	.bar4_addr32		= XEON_B2B_BAR4_ADDR32,
+	.bar5_addr32		= XEON_B2B_BAR5_ADDR32,
 };
 
 static struct intel_b2b_addr xeon_b2b_dsd_addr = {
-	.bar2_addr64		= XEON_B2B_BAR2_DSD_ADDR64,
-	.bar4_addr64		= XEON_B2B_BAR4_DSD_ADDR64,
-	.bar4_addr32		= XEON_B2B_BAR4_DSD_ADDR32,
-	.bar5_addr32		= XEON_B2B_BAR5_DSD_ADDR32,
+	.bar2_addr64		= XEON_B2B_BAR2_ADDR64,
+	.bar4_addr64		= XEON_B2B_BAR4_ADDR64,
+	.bar4_addr32		= XEON_B2B_BAR4_ADDR32,
+	.bar5_addr32		= XEON_B2B_BAR5_ADDR32,
 };
 
 /* operations for primary side of local ntb */
drivers/ntb/hw/intel/ntb_hw_intel.h +5 -10
index e261a8b..0e9acd9 100644
@@ -228,16 +228,11 @@
 
 /* Use the following addresses for translation between b2b ntb devices in case
  * the hardware default values are not reliable. */
-#define XEON_B2B_BAR0_USD_ADDR		0x1000000000000000ull
-#define XEON_B2B_BAR2_USD_ADDR64	0x2000000000000000ull
-#define XEON_B2B_BAR4_USD_ADDR64	0x4000000000000000ull
-#define XEON_B2B_BAR4_USD_ADDR32	0x20000000u
-#define XEON_B2B_BAR5_USD_ADDR32	0x40000000u
-#define XEON_B2B_BAR0_DSD_ADDR		0x9000000000000000ull
-#define XEON_B2B_BAR2_DSD_ADDR64	0xa000000000000000ull
-#define XEON_B2B_BAR4_DSD_ADDR64	0xc000000000000000ull
-#define XEON_B2B_BAR4_DSD_ADDR32	0xa0000000u
-#define XEON_B2B_BAR5_DSD_ADDR32	0xc0000000u
+#define XEON_B2B_BAR0_ADDR	0x1000000000000000ull
+#define XEON_B2B_BAR2_ADDR64	0x2000000000000000ull
+#define XEON_B2B_BAR4_ADDR64	0x4000000000000000ull
+#define XEON_B2B_BAR4_ADDR32	0x20000000u
+#define XEON_B2B_BAR5_ADDR32	0x40000000u
 
 /* The peer ntb secondary config space is 32KB fixed size */
 #define XEON_B2B_MIN_SIZE		0x8000
Tested-by on v1 1/1
#1 lore raw

From: Dave Jiang [[email protected]]

Quoted 7 lines

There is no need for the upstream and downstream addresses to be different
for the NTB configs. Go to using a single set of address. It is still possible to configure them differently using module parameter override however.

Thanks for leaving in the separately configurable usd/dsd addrs, even though the defaults are now the same.

Acked and (pick one)

maintainer
#2 lore raw
Quoted 7 lines · Allen Hubbe

From: Dave Jiang [[email protected]]

Quoted 6 lines

There is no need for the upstream and downstream addresses to be different
for the NTB configs. Go to using a single set of address. It is still possible to configure them differently using module parameter override however.

Quoted 6 lines
Quoted 1 line

Thanks for leaving in the separately configurable usd/dsd addrs, even though the defaults are now the same.

Acked and (pick one)

Since this is changing existing behavior, I'm going to push this one into ntb-next (for 4.4).

Thanks,
Jon

Quoted 7 lines
Signature · 6 lines
-- 
You received this message because you are subscribed to the Google Groups "linux-ntb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/linux-ntb/00c401d0f706%24786a4800%24693ed800%24%40emc.com.
For more options, visit https://groups.google.com/d/optout.