Commit 7aa62645 authored by David S. Miller's avatar David S. Miller
Browse files

[SPARC64]: Do not try to write to %tick or %stick on SUN4V.



Writes by privileged code are disallowed.  The hypervisor manages
the non-privileged bit.

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b5a37e96
Loading
Loading
Loading
Loading
+16 −10
Original line number Diff line number Diff line
@@ -193,6 +193,11 @@ struct sparc64_tick_ops *tick_ops __read_mostly = &tick_operations;

static void stick_init_tick(unsigned long offset)
{
	/* Writes to the %tick and %stick register are not
	 * allowed on sun4v.  The Hypervisor controls that
	 * bit, per-strand.
	 */
	if (tlb_type != hypervisor) {
		tick_disable_protection();

		/* Let the user get at STICK too. */
@@ -203,6 +208,7 @@ static void stick_init_tick(unsigned long offset)
		: /* no outputs */
		: "r" (TICK_PRIV_BIT)
		: "g1", "g2");
	}

	__asm__ __volatile__(
	"	rd	%%asr24, %%g1\n"