From: Cliff Wickman <cpw@sgi.com>
To: mingo@elte.hu
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] SGI UV: TLB shootdown extended apic mode
Date: Tue, 08 Jul 2008 15:01:39 -0500 [thread overview]
Message-ID: <E1KGJNb-0003qF-5E@eag09.americas.sgi.com> (raw)
From: Cliff Wickman <cpw@sgi.com>
Set or clear the UV hub's extended apic mode based on the kernel's setting.
This cannot be done safely in the prom, as the kernel may set the mode.
The kernel's setting of extended apic mode is indicated by global "x2apic".
Diffed against 2.6.26-rc9 (Ingo's tip-latest)
Signed-off-by: Cliff Wickman <cpw@sgi.com>
---
arch/x86/kernel/tlb_uv.c | 12 ++++++++++++
include/asm-x86/uv/uv_bau.h | 1 +
include/asm-x86/uv/uv_mmrs.h | 5 +++++
3 files changed, 18 insertions(+)
Index: linux/arch/x86/kernel/tlb_uv.c
===================================================================
--- linux.orig/arch/x86/kernel/tlb_uv.c
+++ linux/arch/x86/kernel/tlb_uv.c
@@ -741,6 +741,18 @@ static int __init uv_init_blade(int blad
uv_write_global_mmr64(pnode, UVH_BAU_DATA_CONFIG,
((apicid << 32) | UV_BAU_MESSAGE));
}
+
+ /*
+ * The hub's extended apic mode must agree with the kernel's setting,
+ * which is indicated by global "x2apic".
+ */
+ pa = uv_read_global_mmr64(pnode, UVH_LB_BAU_MISC_CONTROL);
+ if (!x2apic && (pa & UVH_LB_BAU_MISC_CONTROL_APIC_MODE_MASK))
+ pa &= ~UVH_LB_BAU_MISC_CONTROL_APIC_MODE_MASK;
+ else if (x2apic && (!(pa & UVH_LB_BAU_MISC_CONTROL_APIC_MODE_MASK)))
+ pa |= UVH_LB_BAU_MISC_CONTROL_APIC_MODE_MASK;
+ uv_write_global_mmr64(pnode, UVH_LB_BAU_MISC_CONTROL, pa);
+
return 0;
}
Index: linux/include/asm-x86/uv/uv_bau.h
===================================================================
--- linux.orig/include/asm-x86/uv/uv_bau.h
+++ linux/include/asm-x86/uv/uv_bau.h
@@ -333,5 +333,6 @@ static inline void bau_cpubits_clear(str
extern int uv_flush_tlb_others(cpumask_t *, struct mm_struct *, unsigned long);
extern void uv_bau_message_intr1(void);
extern void uv_bau_timeout_intr1(void);
+extern int x2apic;
#endif /* __ASM_X86_UV_BAU__ */
Index: linux/include/asm-x86/uv/uv_mmrs.h
===================================================================
--- linux.orig/include/asm-x86/uv/uv_mmrs.h
+++ linux/include/asm-x86/uv/uv_mmrs.h
@@ -1291,5 +1291,10 @@ union uvh_si_alias2_overlay_config_u {
} s;
};
+/* ========================================================================= */
+/* UVH_LB_BAU_MISC_CONTROL */
+/* ========================================================================= */
+#define UVH_LB_BAU_MISC_CONTROL 0x320170UL
+#define UVH_LB_BAU_MISC_CONTROL_APIC_MODE_MASK 0x0000000000000100UL
#endif /* __ASM_X86_UV_MMRS__ */
next reply other threads:[~2008-07-08 20:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-08 20:01 Cliff Wickman [this message]
2008-07-18 16:45 ` Ingo Molnar
2008-07-18 16:53 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1KGJNb-0003qF-5E@eag09.americas.sgi.com \
--to=cpw@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®