From 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5 Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Tue, 22 Oct 2024 10:36:11 +0000 Subject: [PATCH] 修改4g拨号为QMI,需要在系统里后台执行quectel-CM --- kernel/tools/testing/selftests/powerpc/mm/prot_sao.c | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/kernel/tools/testing/selftests/powerpc/mm/prot_sao.c b/kernel/tools/testing/selftests/powerpc/mm/prot_sao.c index 611530d..30b71b1 100644 --- a/kernel/tools/testing/selftests/powerpc/mm/prot_sao.c +++ b/kernel/tools/testing/selftests/powerpc/mm/prot_sao.c @@ -1,12 +1,13 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright 2016, Michael Ellerman, IBM Corp. - * Licensed under GPLv2. */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/mman.h> +#include <unistd.h> #include <asm/cputable.h> @@ -18,8 +19,13 @@ { char *p; - /* 2.06 or later should support SAO */ - SKIP_IF(!have_hwcap(PPC_FEATURE_ARCH_2_06)); + /* + * SAO was introduced in 2.06 and removed in 3.1. It's disabled in + * guests/LPARs by default, so also skip if we are running in a guest. + */ + SKIP_IF(!have_hwcap(PPC_FEATURE_ARCH_2_06) || + have_hwcap2(PPC_FEATURE2_ARCH_3_1) || + access("/proc/device-tree/rtas/ibm,hypertas-functions", F_OK) == 0); /* * Ensure we can ask for PROT_SAO. -- Gitblit v1.6.2