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 1ABBCC43334 for ; Mon, 27 Jun 2022 05:55:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A66206B0071; Mon, 27 Jun 2022 01:55:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A16F18E0002; Mon, 27 Jun 2022 01:55:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 904F78E0001; Mon, 27 Jun 2022 01:55:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 7FECE6B0071 for ; Mon, 27 Jun 2022 01:55:39 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 4FE3B33DE8 for ; Mon, 27 Jun 2022 05:55:39 +0000 (UTC) X-FDA: 79622953998.11.0950A58 Received: from out30-131.freemail.mail.aliyun.com (out30-131.freemail.mail.aliyun.com [115.124.30.131]) by imf03.hostedemail.com (Postfix) with ESMTP id 091C72001C for ; Mon, 27 Jun 2022 05:55:37 +0000 (UTC) X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R141e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046049;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0VHTLlyx_1656309333; Received: from 30.97.48.150(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0VHTLlyx_1656309333) by smtp.aliyun-inc.com; Mon, 27 Jun 2022 13:55:33 +0800 Message-ID: Date: Mon, 27 Jun 2022 13:55:37 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [linux-next:master 5107/5720] arch/arm64/mm/hugetlbpage.c:380:9: error: duplicate case value To: kernel test robot Cc: kbuild-all@lists.01.org, Linux Memory Management List , Andrew Morton , Mike Kravetz References: <202206260802.ZqhIhrmv-lkp@intel.com> From: Baolin Wang In-Reply-To: <202206260802.ZqhIhrmv-lkp@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=alibaba.com; spf=pass (imf03.hostedemail.com: domain of baolin.wang@linux.alibaba.com designates 115.124.30.131 as permitted sender) smtp.mailfrom=baolin.wang@linux.alibaba.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656309339; a=rsa-sha256; cv=none; b=GZGE6REiH1KiBp20z5TgOMmWAG2CZ4NPF4xx46QnU+KkUK5S3Y9gQL9YEkJ0m3zzyO9jSB lwrvP2liHVdx9b6V2QkbXKZC1KsVGGCUzdGhQewtF2h2gs+8OrG5F7eE/dsanI64vwFe9Z 0toIoyRmZEzCQfB7aUV06Zhf+d1zil8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656309339; 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=zL/6RiDhBVjoIg+/xViJVXIagBk81bbHgBdP5t1UHsM=; b=SBo3VKMJKWrc0ocMkmsuvWjDOeqxoxtiMGkjcs7FRzlwvFVfBvOmbpzXRdb+S/VhWcdGj2 ctJ+O8AxyngLDLdy70qkq1SURX1DUHI6km8YZua9XfXQj4hqSrIbx0/V3I4Le/ALhjLcBC E8ycrOrZbxHgezo2QN+CqAmRGzDCWQw= X-Stat-Signature: fee9fnazx3itx9baw7ybrsu69itjiocu X-Rspamd-Server: rspam08 X-Rspam-User: X-Rspamd-Queue-Id: 091C72001C Authentication-Results: imf03.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=alibaba.com; spf=pass (imf03.hostedemail.com: domain of baolin.wang@linux.alibaba.com designates 115.124.30.131 as permitted sender) smtp.mailfrom=baolin.wang@linux.alibaba.com X-HE-Tag: 1656309337-941530 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/26/2022 8:03 AM, kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > head: 2f9cb3d3bd73fc2225d66aa8fcffb632ed3eb235 > commit: 8f32147e69adb8259faa07d8e28360ab782363d0 [5107/5720] arm64/hugetlb: implement arm64 specific hugetlb_mask_last_page > config: arm64-randconfig-s031-20220626 > compiler: aarch64-linux-gcc (GCC) 11.3.0 > reproduce: > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # apt-get install sparse > # sparse version: v0.6.4-31-g4880bd19-dirty > # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=8f32147e69adb8259faa07d8e28360ab782363d0 > git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git > git fetch --no-tags linux-next master > git checkout 8f32147e69adb8259faa07d8e28360ab782363d0 > # save the config file > mkdir build_dir && cp config build_dir/.config > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm64 SHELL=/bin/bash arch/arm64/mm/ > > If you fix the issue, kindly add following tag where applicable > Reported-by: kernel test robot Thanks for reporting. I missed the case that '__PAGETABLE_PMD_FOLDED', was defined, which PUD is same with PMD. Andrew, could you help to fold below changes into the original patch? Thanks. diff --git a/arch/arm64/mm/hugetlbpage.c b/arch/arm64/mm/hugetlbpage.c index c9e076683e5d..272dd30a26ce 100644 --- a/arch/arm64/mm/hugetlbpage.c +++ b/arch/arm64/mm/hugetlbpage.c @@ -373,8 +373,10 @@ unsigned long hugetlb_mask_last_page(struct hstate *h) unsigned long hp_size = huge_page_size(h); switch (hp_size) { +#ifndef __PAGETABLE_PMD_FOLDED case PUD_SIZE: return PGDIR_SIZE - PUD_SIZE; +#endif case CONT_PMD_SIZE: return PUD_SIZE - CONT_PMD_SIZE; case PMD_SIZE: > All errors (new ones prefixed by >>): > > arch/arm64/mm/hugetlbpage.c: In function 'hugetlb_mask_last_page': >>> arch/arm64/mm/hugetlbpage.c:380:9: error: duplicate case value > 380 | case PMD_SIZE: > | ^~~~ > arch/arm64/mm/hugetlbpage.c:376:9: note: previously used here > 376 | case PUD_SIZE: > | ^~~~ > > > vim +380 arch/arm64/mm/hugetlbpage.c > > 370 > 371 unsigned long hugetlb_mask_last_page(struct hstate *h) > 372 { > 373 unsigned long hp_size = huge_page_size(h); > 374 > 375 switch (hp_size) { > 376 case PUD_SIZE: > 377 return PGDIR_SIZE - PUD_SIZE; > 378 case CONT_PMD_SIZE: > 379 return PUD_SIZE - CONT_PMD_SIZE; > > 380 case PMD_SIZE: > 381 return PUD_SIZE - PMD_SIZE; > 382 case CONT_PTE_SIZE: > 383 return PMD_SIZE - CONT_PTE_SIZE; > 384 default: > 385 break; > 386 } > 387 > 388 return 0UL; > 389 } > 390 > From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============2442068353211997478==" MIME-Version: 1.0 From: Baolin Wang To: kbuild-all@lists.01.org Subject: Re: [linux-next:master 5107/5720] arch/arm64/mm/hugetlbpage.c:380:9: error: duplicate case value Date: Mon, 27 Jun 2022 13:55:37 +0800 Message-ID: In-Reply-To: <202206260802.ZqhIhrmv-lkp@intel.com> List-Id: --===============2442068353211997478== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On 6/26/2022 8:03 AM, kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.g= it master > head: 2f9cb3d3bd73fc2225d66aa8fcffb632ed3eb235 > commit: 8f32147e69adb8259faa07d8e28360ab782363d0 [5107/5720] arm64/hugetl= b: implement arm64 specific hugetlb_mask_last_page > config: arm64-randconfig-s031-20220626 > compiler: aarch64-linux-gcc (GCC) 11.3.0 > reproduce: > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sb= in/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # apt-get install sparse > # sparse version: v0.6.4-31-g4880bd19-dirty > # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-nex= t.git/commit/?id=3D8f32147e69adb8259faa07d8e28360ab782363d0 > git remote add linux-next https://git.kernel.org/pub/scm/linux/k= ernel/git/next/linux-next.git > git fetch --no-tags linux-next master > git checkout 8f32147e69adb8259faa07d8e28360ab782363d0 > # save the config file > mkdir build_dir && cp config build_dir/.config > COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-11.3.0 make.cr= oss C=3D1 CF=3D'-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=3Dbuild_dir ARCH= =3Darm64 SHELL=3D/bin/bash arch/arm64/mm/ > = > If you fix the issue, kindly add following tag where applicable > Reported-by: kernel test robot Thanks for reporting. I missed the case that '__PAGETABLE_PMD_FOLDED', = was defined, which PUD is same with PMD. Andrew, could you help to fold below changes into the original patch? = Thanks. diff --git a/arch/arm64/mm/hugetlbpage.c b/arch/arm64/mm/hugetlbpage.c index c9e076683e5d..272dd30a26ce 100644 --- a/arch/arm64/mm/hugetlbpage.c +++ b/arch/arm64/mm/hugetlbpage.c @@ -373,8 +373,10 @@ unsigned long hugetlb_mask_last_page(struct hstate *h) unsigned long hp_size =3D huge_page_size(h); switch (hp_size) { +#ifndef __PAGETABLE_PMD_FOLDED case PUD_SIZE: return PGDIR_SIZE - PUD_SIZE; +#endif case CONT_PMD_SIZE: return PUD_SIZE - CONT_PMD_SIZE; case PMD_SIZE: > All errors (new ones prefixed by >>): > = > arch/arm64/mm/hugetlbpage.c: In function 'hugetlb_mask_last_page': >>> arch/arm64/mm/hugetlbpage.c:380:9: error: duplicate case value > 380 | case PMD_SIZE: > | ^~~~ > arch/arm64/mm/hugetlbpage.c:376:9: note: previously used here > 376 | case PUD_SIZE: > | ^~~~ > = > = > vim +380 arch/arm64/mm/hugetlbpage.c > = > 370 = > 371 unsigned long hugetlb_mask_last_page(struct hstate *h) > 372 { > 373 unsigned long hp_size =3D huge_page_size(h); > 374 = > 375 switch (hp_size) { > 376 case PUD_SIZE: > 377 return PGDIR_SIZE - PUD_SIZE; > 378 case CONT_PMD_SIZE: > 379 return PUD_SIZE - CONT_PMD_SIZE; > > 380 case PMD_SIZE: > 381 return PUD_SIZE - PMD_SIZE; > 382 case CONT_PTE_SIZE: > 383 return PMD_SIZE - CONT_PTE_SIZE; > 384 default: > 385 break; > 386 } > 387 = > 388 return 0UL; > 389 } > 390 = >=20 --===============2442068353211997478==--