Commit 6ab80d4c authored by Dai Xin's avatar Dai Xin Committed by guzitao
Browse files

sw64: implement a new policy of power management

Sunway inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I5XTK7



--------------------------------

In the previous commit, we prefer to use efi runtime function hooks
as default power management ops, it may raise unexpected errors at
virtual machine application. So in this commit we make the legacy
power management module built in the kernel, which may be used by
some guest os kernel under some circumstances when running without
efi loader support.

Signed-off-by: default avatarDai Xin <daixin@wxiat.com>
Reviewed-by: default avatarHe Sheng <hesheng@wxiat.com>
Signed-off-by: default avatarGu Zitao <guzitao@wxiat.com>
parent f015f9a2
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -255,13 +255,6 @@ config PLATFORM_XUELANG

endchoice

config LEGACY_XUELANG
        bool "Xuelang Reset Interface"
        depends on SW64_CHIP3
        help
          This enables the legacy reset driver for SW64 chip3 CRBs. This interface
          as a temporary solution will be deprecated in the future.

config MIGHT_HAVE_PC_SERIO
	bool "Use PC serio device i8042"
	select ARCH_MIGHT_HAVE_PC_SERIO
+1 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@ struct sw64_platform_ops {
extern struct sw64_platform_ops *sw64_platform;

extern struct sw64_platform_ops xuelang_ops;
extern struct boot_params *sunway_boot_params;

extern void sw64_halt(void);
extern void sw64_poweroff(void);
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
#include <linux/smp.h>
#include <linux/spinlock.h>

#include <asm/chip3_io.h>
#include <asm/platform.h>
#include <asm/io.h>

#ifdef CONFIG_SW64_RRK
+1 −1
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
obj-$(CONFIG_LEGACY_XUELANG)	+= legacy_xuelang.o
obj-$(CONFIG_PLATFORM_XUELANG)	+= legacy_xuelang.o
+5 −3
Original line number Diff line number Diff line
@@ -51,9 +51,11 @@ void sw64_restart(void)

static int sw64_reset_init(void)
{
	if (!sunway_boot_params->efi_systab) {
		pm_restart = sw64_restart;
		pm_power_off = sw64_poweroff;
		pm_halt = sw64_halt;
	}

	return 0;
}