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 8FA59C43334 for ; Tue, 14 Jun 2022 03:05:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F0FFF8D0201; Mon, 13 Jun 2022 23:05:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EBD9D8D01EE; Mon, 13 Jun 2022 23:05:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DAD838D0201; Mon, 13 Jun 2022 23:05:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id CB2158D01EE for ; Mon, 13 Jun 2022 23:05:57 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay12.hostedemail.com (Postfix) with ESMTP id A1AB01211C6 for ; Tue, 14 Jun 2022 03:05:57 +0000 (UTC) X-FDA: 79575351954.30.0FDB46C Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf27.hostedemail.com (Postfix) with ESMTP id 3543340082 for ; Tue, 14 Jun 2022 03:05:57 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8B6ED23A; Mon, 13 Jun 2022 20:05:56 -0700 (PDT) Received: from [10.162.40.17] (unknown [10.162.40.17]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 965623F792; Mon, 13 Jun 2022 20:05:54 -0700 (PDT) Message-ID: <94c9de11-8838-53db-5c1b-2e059d11282e@arm.com> Date: Tue, 14 Jun 2022 08:35:51 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH V2 2/2] mm/mmap: Drop generic protection_map[] array Content-Language: en-US To: kernel test robot , linux-mm@kvack.org Cc: kbuild-all@lists.01.org, Andrew Morton , linux-kernel@vger.kernel.org References: <20220613053354.553579-3-anshuman.khandual@arm.com> <202206131931.ZJuanaBo-lkp@intel.com> From: Anshuman Khandual In-Reply-To: <202206131931.ZJuanaBo-lkp@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1655175957; a=rsa-sha256; cv=none; b=sGbnxaapsphnIU4Qh0AQcilIuipLrp2v7x5hdeXw462IqFHQHPpFKQX3Brip5er+KSg99D TJLB2uz0AIqk3TLAbsHfImOsPFhXLUQIL8dxkP1VsUHEiTVyfc7jGAuIABB9/qsJcjcrtO hEvCmF71Mg/HCg7L9KO9vm0iWuXqNwk= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=none; spf=pass (imf27.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com; dmarc=pass (policy=none) header.from=arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1655175957; 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; bh=qtPDEexgY2+QNeDjHvg+eyrnXzPjZlcgk9Zf0UI4Ybg=; b=Ck44UFbzTvG7JuIX0kOVepUzVcF/+qCbbTFDxCZsz2li8UKl5kq6WMVvG+RkOWymBjatS7 9JQGZOvPLAMJ77pPFUjobBj1XmVve9WAUrKU6VPWjFYpI9e3yHoY6IG2a5Nyp8cGj+Weg7 33eNYKlB+14NJX0PsL089NP6F3tFJa4= Authentication-Results: imf27.hostedemail.com; dkim=none; spf=pass (imf27.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com; dmarc=pass (policy=none) header.from=arm.com X-Rspam-User: X-Stat-Signature: omz84w7si4jm5ye15m5nyindz1phfhjn X-Rspamd-Queue-Id: 3543340082 X-Rspamd-Server: rspam08 X-HE-Tag: 1655175957-101095 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 6/13/22 16:43, kernel test robot wrote: > Hi Anshuman, > > Thank you for the patch! Yet something to improve: > > [auto build test ERROR on akpm-mm/mm-everything] > > url: https://github.com/intel-lab-lkp/linux/commits/Anshuman-Khandual/mm-mmap-Drop-__SXXX-__PXXX-macros-from-across-platforms/20220613-133456 > base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything > config: powerpc64-randconfig-r016-20220613 (https://download.01.org/0day-ci/archive/20220613/202206131931.ZJuanaBo-lkp@intel.com/config) > compiler: powerpc64le-linux-gcc (GCC) 11.3.0 > reproduce (this is a W=1 build): > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # https://github.com/intel-lab-lkp/linux/commit/696f81b49f7b6316f652d795da4c0008efef4487 > git remote add linux-review https://github.com/intel-lab-lkp/linux > git fetch --no-tags linux-review Anshuman-Khandual/mm-mmap-Drop-__SXXX-__PXXX-macros-from-across-platforms/20220613-133456 > git checkout 696f81b49f7b6316f652d795da4c0008efef4487 > # save the config file > mkdir build_dir && cp config build_dir/.config > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash arch/powerpc/mm/book3s64/ > > If you fix the issue, kindly add following tag where applicable > Reported-by: kernel test robot > > All errors (new ones prefixed by >>): > > In file included from arch/powerpc/include/asm/page.h:306, > from arch/powerpc/include/asm/mmu.h:149, > from arch/powerpc/include/asm/lppaca.h:46, > from arch/powerpc/include/asm/paca.h:18, > from arch/powerpc/include/asm/current.h:13, > from include/linux/sched.h:12, > from arch/powerpc/mm/book3s64/pgtable.c:6: > arch/powerpc/mm/book3s64/pgtable.c: In function 'vm_get_page_prot': >>> arch/powerpc/mm/book3s64/pgtable.c:557:41: error: 'protection_map' undeclared (first use in this function) > 557 | unsigned long prot = pgprot_val(protection_map[vm_flags & > | ^~~~~~~~~~~~~~ Adding an extern declaration fixes the problem. The problem is generic declaration in include/linux/mm.h is not available for platforms with ARCH_HAS_VM_GET_PAGE_PROT. protection_map[] has to be moved into arch/powerpc/mm/pgtable.c to be used by both 32 bit and 64 bit platforms. diff --git a/arch/powerpc/mm/book3s64/pgtable.c b/arch/powerpc/mm/book3s64/pgtable.c index 260b0cc6d3a1..99c794ab253d 100644 --- a/arch/powerpc/mm/book3s64/pgtable.c +++ b/arch/powerpc/mm/book3s64/pgtable.c @@ -551,6 +551,8 @@ unsigned long memremap_compat_align(void) EXPORT_SYMBOL_GPL(memremap_compat_align); #endif +extern pgprot_t protection_map[16]; + /* Note due to the way vm flags are laid out, the bits are XWR */ pgprot_t vm_get_page_prot(unsigned long vm_flags) {