aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/arch/x86/platform/uv
diff options
context:
space:
mode:
authorAndrew Banman <abanman@sgi.com>2016-09-21 11:09:21 -0500
committerIngo Molnar <mingo@kernel.org>2016-09-22 11:16:15 +0200
commit4f059d514f7119a4fdd9934189ff31f2c26b2647 (patch)
tree1e46b692085edfcbc617cd7815a30ef375ecde21 /arch/x86/platform/uv
parentx86/platform/uv/BAU: Fix payload queue setup on UV4 hardware (diff)
downloadwireguard-linux-4f059d514f7119a4fdd9934189ff31f2c26b2647.tar.xz
wireguard-linux-4f059d514f7119a4fdd9934189ff31f2c26b2647.zip
x86/platform/uv/BAU: Add UV4-specific functions
Add the UV4-specific function definitions and define an operations struct to implement them in the BAU driver. Many BAU MMRs, although functionally the same, have new addresses on UV4 due to hardware changes. Each MMR requires new read/write functions, but their implementation in the driver does not change. Thus, it is enough to enumerate them in the operations struct for the changes to take effect. Signed-off-by: Andrew Banman <abanman@sgi.com> Acked-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Mike Travis <travis@sgi.com> Acked-by: Dimitri Sivanich <sivanich@sgi.com> Acked-by: Thomas Gleixner <tglx@linutronix.de> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: akpm@linux-foundation.org Cc: rja@sgi.com Link: http://lkml.kernel.org/r/1474474161-265604-11-git-send-email-abanman@sgi.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/platform/uv')
-rw-r--r--arch/x86/platform/uv/tlb_uv.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/arch/x86/platform/uv/tlb_uv.c b/arch/x86/platform/uv/tlb_uv.c
index 7ca0e5c31477..56c5a3a3884a 100644
--- a/arch/x86/platform/uv/tlb_uv.c
+++ b/arch/x86/platform/uv/tlb_uv.c
@@ -36,6 +36,17 @@ static struct bau_operations uv123_bau_ops = {
.write_payload_last = write_mmr_payload_last,
};
+static struct bau_operations uv4_bau_ops = {
+ .bau_gpa_to_offset = uv_gpa_to_soc_phys_ram,
+ .read_l_sw_ack = read_mmr_proc_sw_ack,
+ .read_g_sw_ack = read_gmmr_proc_sw_ack,
+ .write_l_sw_ack = write_mmr_proc_sw_ack,
+ .write_g_sw_ack = write_gmmr_proc_sw_ack,
+ .write_payload_first = write_mmr_proc_payload_first,
+ .write_payload_last = write_mmr_proc_payload_last,
+};
+
+
/* timeouts in nanoseconds (indexed by UVH_AGING_PRESCALE_SEL urgency7 30:28) */
static int timeout_base_ns[] = {
20,
@@ -2158,7 +2169,9 @@ static int __init uv_bau_init(void)
if (!is_uv_system())
return 0;
- if (is_uv3_hub())
+ if (is_uv4_hub())
+ ops = uv4_bau_ops;
+ else if (is_uv3_hub())
ops = uv123_bau_ops;
else if (is_uv2_hub())
ops = uv123_bau_ops;