From: Dave Jiang <dave.jiang@intel.com>
To: "Fabio M. De Francesco" <fabio.m.de.francesco@linux.intel.com>,
linux-cxl@vger.kernel.org, kernel test robot <lkp@intel.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Davidlohr Bueso <dave@stgolabs.net>,
Jonathan Cameron <jonathan.cameron@huawei.com>,
Alison Schofield <alison.schofield@intel.com>,
Vishal Verma <vishal.l.verma@intel.com>,
Ira Weiny <ira.weiny@intel.com>,
Dan Williams <dan.j.williams@intel.com>,
Jonathan Corbet <corbet@lwn.net>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
Gregory Price <gourry@gourry.net>,
Robert Richter <rrichter@amd.com>,
Cheatham Benjamin <benjamin.cheatham@amd.com>
Subject: Re: [PATCH 2/4 v5] cxl/core: Add helpers to detect Low Memory Holes on x86
Date: Wed, 5 Nov 2025 11:51:54 -0700 [thread overview]
Message-ID: <d3d1757a-20b1-49e4-90fe-8a1751c40c59@intel.com> (raw)
In-Reply-To: <2093111.UnXabflUDm@fdefranc-mobl3>
On 11/5/25 11:20 AM, Fabio M. De Francesco wrote:
> On Friday, October 10, 2025 4:49:01 PM Central European Standard Time kernel test robot wrote:
>> Hi Fabio,
>>
>> kernel test robot noticed the following build warnings:
>>
>> [auto build test WARNING on 46037455cbb748c5e85071c95f2244e81986eb58]
>>
>> url: https://github.com/intel-lab-lkp/linux/commits/Fabio-M-De-Francesco/cxl-core-Change-match_-_by_range-signatures/20251010-111627
>> base: 46037455cbb748c5e85071c95f2244e81986eb58
>> patch link: https://lore.kernel.org/r/20251006155836.791418-3-fabio.m.de.francesco%40linux.intel.com
>> patch subject: [PATCH 2/4 v5] cxl/core: Add helpers to detect Low Memory Holes on x86
>> config: i386-randconfig-011-20251010 (https://download.01.org/0day-ci/archive/20251010/202510102229.iFcGqbMH-lkp@intel.com/config)
>> compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
>> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251010/202510102229.iFcGqbMH-lkp@intel.com/reproduce)
>>
>> If you fix the issue in a separate patch/commit (i.e. not just a new version of
>> the same patch/commit), kindly add following tags
>> | Reported-by: kernel test robot <lkp@intel.com>
>> | Closes: https://lore.kernel.org/oe-kbuild-all/202510102229.iFcGqbMH-lkp@intel.com/
>>
>> All warnings (new ones prefixed by >>):
>>
>>>> drivers/cxl/core/platform_quirks.c:70:36: warning: result of comparison of constant 4294967296 with expression of type 'const resource_size_t' (aka 'const unsigned int') is always true [-Wtautological-constant-out-of-range-compare]
>> 70 | res->end < r->end && res->end < (LMH_CFMWS_RANGE_START + SZ_4G) &&
>> | ~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> 1 warning generated.
>>
> Unavoidable warning wherever res->end is an u32 variable:
>
> /* include/linux/types.h */
>
> #ifdef CONFIG_PHYS_ADDR_T_64BIT
> typedef u64 phys_addr_t;
> #else
> typedef u32 phys_addr_t;
> #endif
>
> typedef phys_addr_t resource_size_t;
>
> /* include/linux/ioport.h */
>
> struct resource {
> resource_size_t start;
> resource_size_t end;
> };
>
> I think we should ignore this report.
Maybe try casting res->end to (u64) and see if it shuts the warning up?
DJ
>
> Fabio
>>
>> vim +70 drivers/cxl/core/platform_quirks.c
>>
>> 50
>> 51 /**
>> 52 * platform_region_matches_cxld() - Platform quirk to match a CXL Region and a
>> 53 * Switch or Endpoint Decoder. It allows matching on platforms with LMH's.
>> 54 * @p: Region Params against which @cxled is matched.
>> 55 * @cxld: Switch or Endpoint Decoder to be tested for matching @p.
>> 56 *
>> 57 * Similar to platform_cxlrd_matches_cxled(), it matches regions and
>> 58 * decoders on platforms with LMH's.
>> 59 *
>> 60 * Return: true if a Decoder matches a Region, else false.
>> 61 */
>> 62 bool platform_region_matches_cxld(const struct cxl_region_params *p,
>> 63 const struct cxl_decoder *cxld)
>> 64 {
>> 65 const struct range *r = &cxld->hpa_range;
>> 66 const struct resource *res = p->res;
>> 67 int align = cxld->interleave_ways * SZ_256M;
>> 68
>> 69 if (res->start == LMH_CFMWS_RANGE_START && res->start == r->start &&
>> > 70 res->end < r->end && res->end < (LMH_CFMWS_RANGE_START + SZ_4G) &&
>> 71 IS_ALIGNED(range_len(r), align))
>> 72 return true;
>> 73
>> 74 return false;
>> 75 }
>> 76
>>
>> --
>> 0-DAY CI Kernel Test Service
>> https://github.com/intel/lkp-tests/wiki
>>
>>
>
>
>
>
next prev parent reply other threads:[~2025-11-05 18:51 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-06 15:58 [PATCH 0/4 v5] cxl/core: Enable Region creation/attach on x86 with LMH Fabio M. De Francesco
2025-10-06 15:58 ` [PATCH 1/4 v5] cxl/core: Change match_*_by_range() signatures Fabio M. De Francesco
2025-10-06 17:35 ` Gregory Price
2025-10-06 23:30 ` Dave Jiang
2025-10-06 15:58 ` [PATCH 2/4 v5] cxl/core: Add helpers to detect Low Memory Holes on x86 Fabio M. De Francesco
2025-10-06 17:40 ` Gregory Price
2025-10-07 0:00 ` Dave Jiang
2025-10-09 3:16 ` Alison Schofield
2025-11-05 18:02 ` Fabio M. De Francesco
2025-10-10 7:38 ` kernel test robot
2025-11-05 18:11 ` Fabio M. De Francesco
2025-10-10 14:49 ` kernel test robot
2025-11-05 18:20 ` Fabio M. De Francesco
2025-11-05 18:51 ` Dave Jiang [this message]
2025-10-28 15:58 ` Jonathan Cameron
2025-10-06 15:58 ` [PATCH 3/4 v5] cxl/core: Enable Region creation on x86 with LMH Fabio M. De Francesco
2025-10-06 17:46 ` Gregory Price
2025-10-07 20:25 ` Dave Jiang
2025-10-09 14:30 ` Gregory Price
2025-10-09 3:29 ` Alison Schofield
2025-10-06 15:58 ` [PATCH 4/4 v5] cxl/test: Simulate an x86 Low Memory Hole for tests Fabio M. De Francesco
2025-10-07 20:37 ` Dave Jiang
2025-10-09 3:34 ` Alison Schofield
2025-10-09 3:52 ` Alison Schofield
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d3d1757a-20b1-49e4-90fe-8a1751c40c59@intel.com \
--to=dave.jiang@intel.com \
--cc=alison.schofield@intel.com \
--cc=benjamin.cheatham@amd.com \
--cc=corbet@lwn.net \
--cc=dan.j.williams@intel.com \
--cc=dave@stgolabs.net \
--cc=fabio.m.de.francesco@linux.intel.com \
--cc=gourry@gourry.net \
--cc=ira.weiny@intel.com \
--cc=jonathan.cameron@huawei.com \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=rrichter@amd.com \
--cc=vishal.l.verma@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®