From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0D23BC43334 for ; Sat, 2 Jul 2022 20:26:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4D1516B0074; Sat, 2 Jul 2022 16:26:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 45A526B0075; Sat, 2 Jul 2022 16:26:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2F9E86B0078; Sat, 2 Jul 2022 16:26:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 1BF766B0074 for ; Sat, 2 Jul 2022 16:26:42 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id DB57534CB9 for ; Sat, 2 Jul 2022 20:26:41 +0000 (UTC) X-FDA: 79643293002.23.E644539 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf18.hostedemail.com (Postfix) with ESMTP id 0FE291C004C for ; Sat, 2 Jul 2022 20:26:38 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id D062CCE0DE1; Sat, 2 Jul 2022 20:26:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 04FF2C34114; Sat, 2 Jul 2022 20:26:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1656793593; bh=3OoY7Srww1hi9JObmYGCZE+0AZQRIiLLqeNFDNJh9WY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=n/bWNW802Y6Mg7webWqE6J7lFup5McRn6EQ16CX898CrVVN3Z+AvE4wTciuGXZHMJ VJjhoBCd5fCshrXhWVFvlxECvmMkixh/McorVqjtCzJNWcinEZARuUens4taZT1eFo /oJt9qG4a7AuJNOUAku/HBc+oi8i3rQptmHlJezE= Date: Sat, 2 Jul 2022 13:26:32 -0700 From: Andrew Morton To: kernel test robot Cc: Anshuman Khandual , kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, Linux Memory Management List , Christoph Hellwig Subject: Re: [akpm-mm:mm-unstable 302/323] arch/x86/mm/pgprot.c:26:6: warning: no previous prototype for 'add_encrypt_protection_map' Message-Id: <20220702132632.5df1965aa1aec0318c9f90ff@linux-foundation.org> In-Reply-To: <202207021647.Jb0wNWF5-lkp@intel.com> References: <202207021647.Jb0wNWF5-lkp@intel.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656793599; a=rsa-sha256; cv=none; b=hMiQ2htWJz4upnwb5TqXO5UHnRz30fLyV7ztCsp4ud59xKmC1/GTeEkdXMTO/LT7jte9F6 6APbeqUbD+4MWAPENgkb92lhXBnaf52KKzGK5bpkRUQT06XjWBRkXG8qlrp8+Qi5jufvTB kr8QCWnUvALWzbf+eEACs+Kvakzaw/8= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b="n/bWNW80"; dmarc=none; spf=pass (imf18.hostedemail.com: domain of akpm@linux-foundation.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656793599; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=lHT7+4rB1aGxwH1coxMkOFp6TT4htcGOa887lD6LVes=; b=KmXvBx91Azk8p3BuhY6ZNpSV/JvkTiGKjXBNMvH9+IuMLD2Aov4ieg8rTD6lTHlksGj9VJ 0yTsi2gNis0N/Fo5jYTKRYfDfuvD5qez/pI/8/BebCfyiIQuMdejFj7HMWMxkbtz1R4g3Q ZrujFjbc1LSpmO++eqJGxp9GrmeNRMw= Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b="n/bWNW80"; dmarc=none; spf=pass (imf18.hostedemail.com: domain of akpm@linux-foundation.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 0FE291C004C X-Stat-Signature: rt56955o3sg7tjdb8cdo7tmhoqud7gyr X-Rspam-User: X-HE-Tag: 1656793598-605467 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Sat, 2 Jul 2022 16:32:52 +0800 kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable > head: 706370e5c2ea7bb4544eee6e1172c4d68117a526 > commit: d845587c05fd4ae52aaa0cd5c8939e8f4793301f [302/323] x86/mm: move protection_map[] inside the platform > config: x86_64-defconfig (https://download.01.org/0day-ci/archive/20220702/202207021647.Jb0wNWF5-lkp@intel.com/config) > compiler: gcc-11 (Debian 11.3.0-3) 11.3.0 > reproduce (this is a W=1 build): > # https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git/commit/?id=d845587c05fd4ae52aaa0cd5c8939e8f4793301f > git remote add akpm-mm https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git > git fetch --no-tags akpm-mm mm-unstable > git checkout d845587c05fd4ae52aaa0cd5c8939e8f4793301f > # save the config file > mkdir build_dir && cp config build_dir/.config > make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/mm/ > > If you fix the issue, kindly add following tag where applicable > Reported-by: kernel test robot > > All warnings (new ones prefixed by >>): > > >> arch/x86/mm/pgprot.c:26:6: warning: no previous prototype for 'add_encrypt_protection_map' [-Wmissing-prototypes] > 26 | void add_encrypt_protection_map(void) > | ^~~~~~~~~~~~~~~~~~~~~~~~~~ > > > vim +/add_encrypt_protection_map +26 arch/x86/mm/pgprot.c > > 25 > > 26 void add_encrypt_protection_map(void) > 27 { > 28 unsigned int i; > 29 > 30 for (i = 0; i < ARRAY_SIZE(protection_map); i++) > 31 protection_map[i] = pgprot_encrypted(protection_map[i]); > 32 } > 33 Something like this? arch/x86/include/asm/mem_encrypt.h | 2 ++ arch/x86/mm/mem_encrypt_amd.c | 3 +-- arch/x86/mm/pgprot.c | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) --- a/arch/x86/include/asm/mem_encrypt.h~x86-mm-move-protection_map-inside-the-platform-fix +++ a/arch/x86/include/asm/mem_encrypt.h @@ -89,6 +89,8 @@ static inline void mem_encrypt_free_decr /* Architecture __weak replacement functions */ void __init mem_encrypt_init(void); +void add_encrypt_protection_map(void); + /* * The __sme_pa() and __sme_pa_nodebug() macros are meant for use when * writing to or comparing values from the cr3 register. Having the --- a/arch/x86/mm/mem_encrypt_amd.c~x86-mm-move-protection_map-inside-the-platform-fix +++ a/arch/x86/mm/mem_encrypt_amd.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -484,8 +485,6 @@ void __init early_set_mem_enc_dec_hyperc enc_dec_hypercall(vaddr, npages, enc); } -void add_encrypt_protection_map(void); - void __init sme_early_init(void) { if (!sme_me_mask) --- a/arch/x86/mm/pgprot.c~x86-mm-move-protection_map-inside-the-platform-fix +++ a/arch/x86/mm/pgprot.c @@ -3,6 +3,7 @@ #include #include #include +#include static pgprot_t protection_map[16] __ro_after_init = { [VM_NONE] = PAGE_NONE, _