Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp4210706pxv; Mon, 5 Jul 2021 17:12:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztuQhEa0wphyrE0zDA0Nc1coHwo5L6W0kZjH25hhF3fSC9KRHJYuNtMd2mCbSAT6OyXEs/ X-Received: by 2002:a17:906:9c84:: with SMTP id fj4mr12956898ejc.180.1625530346861; Mon, 05 Jul 2021 17:12:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625530346; cv=none; d=google.com; s=arc-20160816; b=Oim7jZ7Sp7k/apUYoxh+2jZFk9wITfKtmhCajEZHA85Z2GSyMLPpACmDsk8HvWP82U 1a2MskhrgmlxVqgChzp2NnwPNT2ZzEQTadn1SUEsEnjMQXHcygooYzcrl9rou5+bHHfZ OTMq0GI8wxLCI4XuGsygECWcbYd4WPqd/sVIsC8vsvVcBMms2mUMFv3ZAfOKi4iKfGwC lyPu47D84N3PDgIaIhDxXVXXxfmPFwNKttQ1apvcVfy+khKyDAdlXPKQRzG1fjwtuI/N W4H/gphjq0WBEOsebj31jEQ144Bemov6PcA09SSnaObnfgLhtR8j6yLfYSAbdJ1EIWRG nN8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=IidMXig3GHxA1F6BnnAD/JlrORgjyDJjK2S57+zITtk=; b=ZxRpXgdoOiw/uO1XwN1DJsTVw7g6G2xIs/NHFGXH70ljkDNMUNkZ9deIEzFWrAsx34 deikxn9QFZ7DGn4JMESGbbz0sWwlRO6LOdE6JkP3VzHBW8apTfiLRLIR9hockDxKRqKf F0u/9LKJ4Dham/8on/FpJr/y+iSvJnh81X0hkdkaAliDjE2x+WpP6+ROGWfaXTQ9Rs3N 3BF5yZH19czHblqBlw05iGIMMwMZGELX3A2ZzTaxYwWdOJwsJurYYCxHNX8QIkb1Fnty 75ZWs8Pwkb3uF6Xu8lJxGRduH+HJS5qUGRW6b1ACj9yP/nBOvso1eL3ju9r+hCERjjW8 C0Zw== 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gt41si3469842ejc.192.2021.07.05.17.12.03; Mon, 05 Jul 2021 17:12:26 -0700 (PDT) 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229734AbhGFANw (ORCPT + 99 others); Mon, 5 Jul 2021 20:13:52 -0400 Received: from mga17.intel.com ([192.55.52.151]:53278 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229722AbhGFANw (ORCPT ); Mon, 5 Jul 2021 20:13:52 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10036"; a="189412911" X-IronPort-AV: E=Sophos;i="5.83,327,1616482800"; d="scan'208";a="189412911" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jul 2021 17:11:11 -0700 X-IronPort-AV: E=Sophos;i="5.83,327,1616482800"; d="scan'208";a="496284935" Received: from shao2-debian.sh.intel.com (HELO [10.239.13.11]) ([10.239.13.11]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jul 2021 17:11:09 -0700 Subject: Re: [kbuild-all] Re: kernel/time/clocksource-wdtest.c:47:22: warning: signed shift result (0x27BC86B00) requires 35 bits to represent, but 'long' only has 32 bits To: paulmck@kernel.org Cc: kernel test robot , clang-built-linux@googlegroups.com, kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, Thomas Gleixner References: <202107040532.wqL30yFp-lkp@intel.com> <20210704174310.GR4397@paulmck-ThinkPad-P17-Gen-1> <254ab0ec-2c25-29fd-cbe1-eaf2bc135326@intel.com> <20210705152107.GV4397@paulmck-ThinkPad-P17-Gen-1> From: Rong Chen Message-ID: Date: Tue, 6 Jul 2021 08:11:07 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20210705152107.GV4397@paulmck-ThinkPad-P17-Gen-1> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/5/21 11:21 PM, Paul E. McKenney wrote: > On Mon, Jul 05, 2021 at 03:47:09PM +0800, Rong Chen wrote: >> >> On 7/5/21 1:43 AM, Paul E. McKenney wrote: >>> On Sun, Jul 04, 2021 at 05:42:36AM +0800, kernel test robot wrote: >>>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master >>>> head: 303392fd5c160822bf778270b28ec5ea50cab2b4 >>>> commit: 1253b9b87e42ab6a3d5c2cb27af2bdd67d7e50ff clocksource: Provide kernel module to test clocksource watchdog >>>> date: 11 days ago >>>> config: mips-randconfig-r015-20210702 (attached as .config) >>>> compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9eb613b2de3163686b1a4bd1160f15ac56a4b083) >>>> 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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1253b9b87e42ab6a3d5c2cb27af2bdd67d7e50ff >>>> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git >>>> git fetch --no-tags linus master >>>> git checkout 1253b9b87e42ab6a3d5c2cb27af2bdd67d7e50ff >>>> # save the attached .config to linux build tree >>>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips >>>> >>>> If you fix the issue, kindly add following tag as appropriate >>>> Reported-by: kernel test robot >>>> >>>> All warnings (new ones prefixed by >>): >>>> >>>>>> kernel/time/clocksource-wdtest.c:47:22: warning: signed shift result (0x27BC86B00) requires 35 bits to represent, but 'long' only has 32 bits [-Wshift-overflow] >>>> .mult = TICK_NSEC << JIFFIES_SHIFT, /* details above */ >>>> ~~~~~~~~~ ^ ~~~~~~~~~~~~~ >>>> 1 warning generated. >>> You have CONFIG_HZ_24=y and this test module assumes HZ > 100, as noted >>> just above the excerpt below: >>> >>> /* Assume HZ > 100. */ >>> #define JIFFIES_SHIFT 8 >>> >>> So this is expected behavior. >>> >>> Would it help if I gave that comment some teeth, for example, as >>> shown at the end of this email? >> Hi Paul, >> >> I have confirmed that the below change can avoid the warning. > Very good, and thank you! May I add your Tested-by? Yes, please. Best Regards, Rong Chen > > Thanx, Paul > >> Best Regards, >> Rong Chen >> >>> ------------------------------------------------------------------------ >>> >>> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug >>> index e1856030fa66..8f0ad6e4183c 100644 >>> --- a/lib/Kconfig.debug >>> +++ b/lib/Kconfig.debug >>> @@ -2573,6 +2573,7 @@ config TEST_FPU >>> config TEST_CLOCKSOURCE_WATCHDOG >>> tristate "Test clocksource watchdog in kernel space" >>> depends on CLOCKSOURCE_WATCHDOG >>> + depends on HZ >= 100 >>> help >>> Enable this option to create a kernel module that will trigger >>> a test of the clocksource watchdog. This module may be loaded >>> _______________________________________________ >>> kbuild-all mailing list -- kbuild-all@lists.01.org >>> To unsubscribe send an email to kbuild-all-leave@lists.01.org