From c7754d465b1feade85b5f1c4492781a30f6652a2 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Tue, 15 May 2007 17:03:54 -0700 Subject: [SPARC64]: Add hypervisor API negotiation and fix console bugs. Hypervisor interfaces need to be negotiated in order to use some API calls reliably. So add a small set of interfaces to request API versions and query current settings. This allows us to fix some bugs in the hypervisor console: 1) If we can negotiate API group CORE of at least major 1 minor 1 we can use con_read and con_write which can improve console performance quite a bit. 2) When we do a console write request, we should hold the spinlock around the whole request, not a byte at a time. What would happen is that it's easy for output from different cpus to get mixed with each other. 3) Use consistent udelay() based polling, udelay(1) each loop with a limit of 1000 polls to handle stuck hypervisor console. Signed-off-by: David S. Miller --- arch/sparc64/kernel/setup.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch/sparc64/kernel/setup.c') diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c index 451028341c75..dea9c3c9ec5f 100644 --- a/arch/sparc64/kernel/setup.c +++ b/arch/sparc64/kernel/setup.c @@ -269,6 +269,7 @@ void __init per_cpu_patch(void) void __init sun4v_patch(void) { + extern void sun4v_hvapi_init(void); struct sun4v_1insn_patch_entry *p1; struct sun4v_2insn_patch_entry *p2; @@ -300,6 +301,8 @@ void __init sun4v_patch(void) p2++; } + + sun4v_hvapi_init(); } #ifdef CONFIG_SMP -- cgit v1.2.2