Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp3065081pxm; Mon, 28 Feb 2022 11:17:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJyBiEi9psPe4p+iOvVZHAH6bV/l8u7sMAnjiJL9wVwap5PdaxFcDb1Wdh21wqEIw2huT8ud X-Received: by 2002:a17:902:7888:b0:148:adf2:9725 with SMTP id q8-20020a170902788800b00148adf29725mr22158826pll.136.1646075828086; Mon, 28 Feb 2022 11:17:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646075828; cv=none; d=google.com; s=arc-20160816; b=YLG7NhjkqUHqmRuEENi8IwC1FRbbmhvhLhuXtn+DmyeCpUcwm5Kk6Mscw2n4BNoK/6 vYxLH/Z1EQrOHf0v5UzbtDnw3eKskQijLyVnU2vEjUxyqjAWPyXvMy4tFFyX4hhgDOL/ CzEBFCta/3a+VaTU/JM4BBiuFU8bf/O5ZrLtDJpXlRmBZj8I/vpprwARasffhxgQt7AA 7kL50y00aHau2EhJ3+4ZC4s/T2zVggRB+V4zy4wMBfjrMlwE2nqfZI+tWzuvVe7ddspW /63WAwfe2vlQ3aWPaTfcCVYlOOMDII+VkPSZrwigjyPaOz5NfLVbgZIRaYyG5W+Qjkda vvLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=i5PibwMkqdIW2Cm2wCDyunmncZjNB+cnPJ9cFUKsINU=; b=bR/stimmQRKAKwX6pKG81Y7zHoRymV8vTpgfsopBTxFcCS71dKXLYI7nFTc9sJHHq5 C91G1LjeZ9XmImMtQzIGv4EqQRe85EJgbQ+W/SRw5bSTOQC+I2is/YxyjoJqxVbfCDEh xqjS12D3B3/seyBjrsmq+KUH5D060bvamHoDcDrPd5ZT5SEQueEyK+RH7Nfb0JYJqqqN m8/0k5CnMxt6mBtgVm/VbzPNnp2ywaOGlMy3maTVHHZACIEP3G62zyyLcE7naLx4rqkn c5KPTZc38piudQ4AwG4plC/raomR9mGqRu3hQKpLrDgKiEnKIEGehcnJD3+NalQ92yBh pTPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="e/anaTD2"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id b5-20020a633405000000b00378c36969d4si1829277pga.466.2022.02.28.11.17.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Feb 2022 11:17:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="e/anaTD2"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1336824088; Mon, 28 Feb 2022 11:08:31 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238794AbiB1RtF (ORCPT + 99 others); Mon, 28 Feb 2022 12:49:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239943AbiB1Roy (ORCPT ); Mon, 28 Feb 2022 12:44:54 -0500 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D719819C28; Mon, 28 Feb 2022 09:37:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646069843; x=1677605843; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=vXTL8dLX7viXJuGg2oI1j6Lgyk1Ewv5xNOTP7Tgfu/4=; b=e/anaTD22EDSuAss1/vBptNRBVh5a3EEDbjG0AXHstvKH875ksBTxDr4 XsfOn+Oqa/OeYq1q5xFa54dXY3KCEtRwVpYhhZnvUcjJRR0s0zNfoBpdz +kBqs65V50fg0MkXbNNXt4M3HDLH4vXdvPKr0N6KdzD8dzG2aRMsF4q6+ 7ujipAL9JTvp1SHmyKD3fSy3qSqt6moszwlsnr3m3U748eakdKuR2N4wi 2+lz9BZo8KSUGp5Db2Y6XqNY2h5m2/zgvI5oG5zFuGvOnZpiMG/b9PFK5 v6dpqiovC3VLWHOZrCse12upwScABh63gRgR6AHtY0OCSLLid9U1Z9J1y Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10272"; a="232912009" X-IronPort-AV: E=Sophos;i="5.90,144,1643702400"; d="scan'208";a="232912009" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Feb 2022 09:37:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,144,1643702400"; d="scan'208";a="708726454" Received: from lkp-server01.sh.intel.com (HELO 788b1cd46f0d) ([10.239.97.150]) by orsmga005.jf.intel.com with ESMTP; 28 Feb 2022 09:37:15 -0800 Received: from kbuild by 788b1cd46f0d with local (Exim 4.92) (envelope-from ) id 1nOjxS-0007cT-Lj; Mon, 28 Feb 2022 17:37:14 +0000 Date: Tue, 1 Mar 2022 01:36:47 +0800 From: kernel test robot To: Tiezhu Yang , Thomas Bogendoerfer , Mike Rapoport , Andrew Morton Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org, Linux Memory Management List , Xuefeng Li , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 3/4] MIPS: Refactor early_parse_memmap() to fix memmap= parameter Message-ID: <202203010025.PU3GDSWx-lkp@intel.com> References: <1646054617-16799-4-git-send-email-yangtiezhu@loongson.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1646054617-16799-4-git-send-email-yangtiezhu@loongson.cn> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Tiezhu, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on hnaz-mm/master] [also build test WARNING on linus/master v5.17-rc6 next-20220225] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Tiezhu-Yang/MIPS-Modify-mem-and-memmap-parameter/20220228-212554 base: https://github.com/hnaz/linux-mm master config: mips-randconfig-r025-20220228 (https://download.01.org/0day-ci/archive/20220301/202203010025.PU3GDSWx-lkp@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project d271fc04d5b97b12e6b797c6067d3c96a8d7470e) 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 # install mips cross compiling tool for clang build # apt-get install binutils-mips-linux-gnu # https://github.com/0day-ci/linux/commit/ab143b3c599254c414419565480fc01acb23452a git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Tiezhu-Yang/MIPS-Modify-mem-and-memmap-parameter/20220228-212554 git checkout ab143b3c599254c414419565480fc01acb23452a # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash arch/mips/kernel/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): arch/mips/kernel/setup.c:351:42: warning: format specifies type 'long long' but the argument has type 'phys_addr_t' (aka 'unsigned int') [-Wformat] pr_notice("Memory limited to %lldMB\n", memory_limit >> 20); ~~~~ ^~~~~~~~~~~~~~~~~~ %u include/linux/printk.h:509:36: note: expanded from macro 'pr_notice' printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) ~~~ ^~~~~~~~~~~ include/linux/printk.h:446:60: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ~~~ ^~~~~~~~~~~ include/linux/printk.h:418:19: note: expanded from macro 'printk_index_wrap' _p_func(_fmt, ##__VA_ARGS__); \ ~~~~ ^~~~~~~~~~~ arch/mips/kernel/setup.c:380:6: warning: format specifies type 'long long' but the argument has type 'phys_addr_t' (aka 'unsigned int') [-Wformat] memory_base >> 20, (memory_base + memory_limit) >> 20); ^~~~~~~~~~~~~~~~~ include/linux/printk.h:509:36: note: expanded from macro 'pr_notice' printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) ~~~ ^~~~~~~~~~~ include/linux/printk.h:446:60: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ~~~ ^~~~~~~~~~~ include/linux/printk.h:418:19: note: expanded from macro 'printk_index_wrap' _p_func(_fmt, ##__VA_ARGS__); \ ~~~~ ^~~~~~~~~~~ >> arch/mips/kernel/setup.c:380:25: warning: format specifies type 'long long' but the argument has type 'unsigned int' [-Wformat] memory_base >> 20, (memory_base + memory_limit) >> 20); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/printk.h:509:36: note: expanded from macro 'pr_notice' printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) ~~~ ^~~~~~~~~~~ include/linux/printk.h:446:60: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ~~~ ^~~~~~~~~~~ include/linux/printk.h:418:19: note: expanded from macro 'printk_index_wrap' _p_func(_fmt, ##__VA_ARGS__); \ ~~~~ ^~~~~~~~~~~ arch/mips/kernel/setup.c:399:5: warning: format specifies type 'long long' but the argument has type 'phys_addr_t' (aka 'unsigned int') [-Wformat] memory_base >> 20, (memory_base + memory_limit) >> 20); ^~~~~~~~~~~~~~~~~ include/linux/printk.h:509:36: note: expanded from macro 'pr_notice' printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) ~~~ ^~~~~~~~~~~ include/linux/printk.h:446:60: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ~~~ ^~~~~~~~~~~ include/linux/printk.h:418:19: note: expanded from macro 'printk_index_wrap' _p_func(_fmt, ##__VA_ARGS__); \ ~~~~ ^~~~~~~~~~~ arch/mips/kernel/setup.c:399:24: warning: format specifies type 'long long' but the argument has type 'unsigned int' [-Wformat] memory_base >> 20, (memory_base + memory_limit) >> 20); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/printk.h:509:36: note: expanded from macro 'pr_notice' printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) ~~~ ^~~~~~~~~~~ include/linux/printk.h:446:60: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ~~~ ^~~~~~~~~~~ include/linux/printk.h:418:19: note: expanded from macro 'printk_index_wrap' _p_func(_fmt, ##__VA_ARGS__); \ ~~~~ ^~~~~~~~~~~ 5 warnings generated. vim +380 arch/mips/kernel/setup.c 356 357 static int __init early_parse_memmap(char *p) 358 { 359 char *oldp; 360 361 if (!p) 362 return -EINVAL; 363 364 if (!strncmp(p, "exactmap", 8)) { 365 pr_err("\"memmap=exactmap\" invalid on MIPS\n"); 366 return 0; 367 } 368 369 oldp = p; 370 memory_limit = memparse(p, &p) & PAGE_MASK; 371 if (p == oldp) 372 return -EINVAL; 373 374 if (*p == '@') { 375 memory_base = memparse(p + 1, &p) & PAGE_MASK; 376 } else if (*p == '$') { 377 memory_base = memparse(p+1, &p) & PAGE_MASK; 378 memblock_reserve(memory_base, memory_limit); 379 pr_notice("Memory reserved to %lldMB-%lldMB\n", > 380 memory_base >> 20, (memory_base + memory_limit) >> 20); 381 memory_base = 0; 382 memory_limit = 0; 383 return 0; 384 } else if (*p == '#') { 385 pr_err("\"memmap=nn#ss\" invalid on MIPS\n"); 386 memory_limit = 0; 387 return -EINVAL; 388 } else if (*p == '!') { 389 pr_err("\"memmap=nn!ss\" invalid on MIPS\n"); 390 memory_limit = 0; 391 return -EINVAL; 392 } else { 393 pr_err("Unrecognized memmap syntax: %s\n", p); 394 memory_limit = 0; 395 return -EINVAL; 396 } 397 398 pr_notice("Memory limited to %lldMB-%lldMB\n", 399 memory_base >> 20, (memory_base + memory_limit) >> 20); 400 401 return *p == '\0' ? 0 : -EINVAL; 402 } 403 early_param("memmap", early_parse_memmap); 404 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org