Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1931040pxu; Sun, 13 Dec 2020 07:59:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJyxxtoFXHYYjiHBCfldL3wgd/gZeWXOSj4zrL+F64VlBwdJSdIIJp7fVMhqWroei1MLJ4qC X-Received: by 2002:aa7:d297:: with SMTP id w23mr7410015edq.374.1607875146538; Sun, 13 Dec 2020 07:59:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607875146; cv=none; d=google.com; s=arc-20160816; b=xKfhJuRViPy3ipuXrHy8F0xLw2owrxoaB55BfsOY68ZbK/V9YfFk7jQD4KIHQTABXe aGO7zSZZxwP3wws/TRh97aaiHlLDE91bEOwJvz/a9a2PvsAvQulLyYnwp4Utlc0f+7Pw sKT2QBogveu8PI3wadfCTStFPb1HAox91quWMciYZIZcJRQ/0no/6lGcCDzPXM4PQIw6 7s6ZDTdgsrF4kEUXCD14yUScXEVVwSGq2TsKDfVwLLnK5tds55eFey/Ukkltrzdf43gU hqWjLHK96fLpHPheBKgpGXuQvVcDkuz1fxAftMZG6CvuTvjYj4lFjVLB9vaUL+FOjfJf 8zOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=mIXnPIImKsL8Gve1yMKhQXuflvlGzR6s4Y5m8TxNKdU=; b=aWoiglD/9B6SIoOSXrbV6EFfGdg2REBzgfIwposkKwG50zQPkeIFou7/Nnme9PmMTB x+EQPrLf/tmNv21A2JVUljnJO0KADVPjrF/KD6afZlEpPegU0RKWnAI5xMoHakWtDynA m4oS3p3b8y7HE4642VpBOrom58cYnehohRw8IxVAS5b4ExeXPhfOuCUYXenRdAO09PyF //zNYZ7zjuE4VMziY5ZNed7CtQIbvJmgVjCWYgcRdWNPnes+XcbQbaccjFWXhewbemfV j6WceizJJH87RlBVMIGej6cpkDxk6nqyabgWhA/xSRFUDxfzdeMVkAzCRHy9OoJfmsa4 qpjA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i8si9191430ejj.700.2020.12.13.07.58.44; Sun, 13 Dec 2020 07:59:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407464AbgLLQLy (ORCPT + 99 others); Sat, 12 Dec 2020 11:11:54 -0500 Received: from mail.kernel.org ([198.145.29.99]:57712 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2439401AbgLLQJ4 (ORCPT ); Sat, 12 Dec 2020 11:09:56 -0500 From: Sasha Levin Authentication-Results: mail.kernel.org; dkim=permerror (bad message/signature format) To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Xingxing Su , Andrew Morton , Shuah Khan , Sandipan Das , John Hubbard , Dave Hansen , "Kirill A. Shutemov" , Brian Geffon , Mina Almasry , Linus Torvalds , Sasha Levin , linux-api@vger.kernel.org Subject: [PATCH AUTOSEL 5.9 23/23] tools/testing/selftests/vm: fix build error Date: Sat, 12 Dec 2020 11:08:04 -0500 Message-Id: <20201212160804.2334982-23-sashal@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201212160804.2334982-1-sashal@kernel.org> References: <20201212160804.2334982-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xingxing Su [ Upstream commit d8cbe8bfa7df3c680ddfd5e1eee3a5c86d8dc764 ] Only x86 and PowerPC implement the pkey-xxx.h, and an error was reported when compiling protection_keys.c. Add a Arch judgment to compile "protection_keys" in the Makefile. If other arch implement this, add the arch name to the Makefile. eg: ifneq (,$(findstring $(ARCH),powerpc mips ... )) Following build errors: pkey-helpers.h:93:2: error: #error Architecture not supported #error Architecture not supported pkey-helpers.h:96:20: error: `PKEY_DISABLE_ACCESS' undeclared #define PKEY_MASK (PKEY_DISABLE_ACCESS | PKEY_DISABLE_WRITE) ^ protection_keys.c:218:45: error: `PKEY_DISABLE_WRITE' undeclared pkey_assert(flags & (PKEY_DISABLE_ACCESS | PKEY_DISABLE_WRITE)); ^ Signed-off-by: Xingxing Su Signed-off-by: Andrew Morton Cc: Shuah Khan Cc: Sandipan Das Cc: John Hubbard Cc: Dave Hansen Cc: "Kirill A. Shutemov" Cc: Brian Geffon Cc: Mina Almasry Link: https://lkml.kernel.org/r/1606826876-30656-1-git-send-email-suxingxing@loongson.cn Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- tools/testing/selftests/vm/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/vm/Makefile b/tools/testing/selftests/vm/Makefile index a9026706d597d..ac76a78249739 100644 --- a/tools/testing/selftests/vm/Makefile +++ b/tools/testing/selftests/vm/Makefile @@ -43,9 +43,13 @@ ifeq ($(CAN_BUILD_X86_64),1) TEST_GEN_FILES += $(BINARIES_64) endif else + +ifneq (,$(findstring $(ARCH),powerpc)) TEST_GEN_FILES += protection_keys endif +endif + ifneq (,$(filter $(MACHINE),arm64 ia64 mips64 parisc64 ppc64 ppc64le riscv64 s390x sh64 sparc64 x86_64)) TEST_GEN_FILES += va_128TBswitch TEST_GEN_FILES += virtual_address_range -- 2.27.0