Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 22d6a1cb authored by David S. Miller's avatar David S. Miller
Browse files

[SPARC64]: Report proper system soft state to the hypervisor.

parent 36b48973
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ obj-y := process.o setup.o cpu.o idprom.o \
		   irq.o ptrace.o time.o sys_sparc.o signal.o \
		   unaligned.o central.o pci.o starfire.o semaphore.o \
		   power.o sbus.o iommu_common.o sparc64_ksyms.o chmc.o \
		   visemul.o prom.o of_device.o hvapi.o
		   visemul.o prom.o of_device.o hvapi.o sstate.o

obj-$(CONFIG_STACKTRACE) += stacktrace.o
obj-$(CONFIG_PCI)	 += ebus.o isa.o pci_common.o pci_iommu.o \
+12 −0
Original line number Diff line number Diff line
@@ -1937,3 +1937,15 @@ sun4v_con_write:
	stx	%o1, [%o4]
	retl
	 nop

	/* %o0:	soft state
	 * %o1:	address of description string
	 *
	 * returns %o0: status
	 */
	.globl	sun4v_mach_set_soft_state
sun4v_mach_set_soft_state:
	mov	HV_FAST_MACH_SET_SOFT_STATE, %o5
	ta	HV_FAST_TRAP
	retl
	 nop
+3 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@

#include <asm/hypervisor.h>
#include <asm/oplib.h>
#include <asm/sstate.h>

/* If the hypervisor indicates that the API setting
 * calls are unsupported, by returning HV_EBADTRAP or
@@ -179,6 +180,8 @@ void __init sun4v_hvapi_init(void)
	if (sun4v_hvapi_register(group, major, &minor))
		goto bad;

	sun4v_sstate_init();

	return;

bad:
+2 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
#include <asm/prom.h>
#include <asm/of_device.h>
#include <asm/io.h>
#include <asm/sstate.h>

#include <linux/unistd.h>

@@ -53,6 +54,7 @@ static void (*poweroff_method)(void) = machine_alt_power_off;

void machine_power_off(void)
{
	sstate_poweroff();
	if (!serial_console || scons_pwroff) {
#ifdef CONFIG_PCI
		if (power_reg) {
+4 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@
#include <asm/mmu_context.h>
#include <asm/unistd.h>
#include <asm/hypervisor.h>
#include <asm/sstate.h>

/* #define VERBOSE_SHOWREGS */

@@ -106,6 +107,7 @@ extern void (*prom_keyboard)(void);

void machine_halt(void)
{
	sstate_halt();
	if (!serial_console && prom_palette)
		prom_palette (1);
	if (prom_keyboard)
@@ -116,6 +118,7 @@ void machine_halt(void)

void machine_alt_power_off(void)
{
	sstate_poweroff();
	if (!serial_console && prom_palette)
		prom_palette(1);
	if (prom_keyboard)
@@ -128,6 +131,7 @@ void machine_restart(char * cmd)
{
	char *p;
	
	sstate_reboot();
	p = strchr (reboot_command, '\n');
	if (p) *p = 0;
	if (!serial_console && prom_palette)
Loading