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 32015C02185 for ; Sat, 18 Jan 2025 21:18:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4A4376B0082; Sat, 18 Jan 2025 16:18:29 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 454076B0083; Sat, 18 Jan 2025 16:18:29 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2F43B6B0085; Sat, 18 Jan 2025 16:18:29 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 11C936B0082 for ; Sat, 18 Jan 2025 16:18:29 -0500 (EST) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 2D3F2A161E for ; Sat, 18 Jan 2025 21:18:28 +0000 (UTC) X-FDA: 83021836296.22.E245C46 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by imf23.hostedemail.com (Postfix) with ESMTP id 35995140004 for ; Sat, 18 Jan 2025 21:18:25 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=gLjWyrUZ; spf=pass (imf23.hostedemail.com: domain of david.laight.linux@gmail.com designates 209.85.128.49 as permitted sender) smtp.mailfrom=david.laight.linux@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1737235106; 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:dkim-signature; bh=mpf4SfqnD25J/YTWoixYifvlss+fNguqHz/eTGg6pfY=; b=WzEZALvv+8AKbL9vlkMRLCfbRAChTjaFwGt0g4FC+BxNDmcqAmJVMvnasMQATlYIZsYaqb Bo8mAmKHCw0s5ShVlOOJ1GJzrQ4lT2gnCi2jXKhkNJL9K+OsI1K44sKBeV9Z7IAXYt6aqs TvW+xZZHtcMGH0IVNRCXsZPJ1S+t4Jk= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1737235106; a=rsa-sha256; cv=none; b=rR9WgRvn4TaS2K3jLpycHY8oSTvGV3rjMfnr4qIcLi9Gw7tqUO2KorBc3DIZZNafmo4Bmz 8XHB1HmzsXO/ccQyc4xEn26rYDmD9kpf+q6gUtVE8/RoHo6c1mV6i9PBe/NNc1qDSoP/Z+ AQu4HdY8qmWw8c9mPnf1YjK9QucIAWA= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=gLjWyrUZ; spf=pass (imf23.hostedemail.com: domain of david.laight.linux@gmail.com designates 209.85.128.49 as permitted sender) smtp.mailfrom=david.laight.linux@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-43675b1155bso36191545e9.2 for ; Sat, 18 Jan 2025 13:18:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737235104; x=1737839904; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=mpf4SfqnD25J/YTWoixYifvlss+fNguqHz/eTGg6pfY=; b=gLjWyrUZNQEqwqKYk7pyu74ZslUhxpJ1wHYFXsvSPri0csHSGfx62JwMqbLUY1gg2m onJ2yeeF6h4xdpIpKdEGDVhblTob75Cd70um/7YKdyhwff2pXHq4rWrKOA9Ln0KGBwd7 VcXXPqK6oQcjt4GbYxWPeXnduBg7s9/y3C3n318+VL/zCOEjJxmZEGDnvhMZE0YPS/TC kah1seGkduqShPq3/seyTWuVLOXDkBMhZzBtbYoI4tiFhPXhrBMh9+aDIC77CluH1qrk jzrG3je+So3vg+E6rcdU4KOaCcu5AiTyAJxCQCMUlKM8d8QtatB3LFArURsCMivrrQOz c7ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737235104; x=1737839904; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mpf4SfqnD25J/YTWoixYifvlss+fNguqHz/eTGg6pfY=; b=TY0ttfhK3MEDtgbTTjXDp4bvwLhmedwGyxyswC43ZeAWnMoYvNxzh1g4xHKH8wBkvq SDELhVmZ6CMQCnlt2fYeXdcBe2YxNhSBhHUr9ixgGaEBV6Y8Mchi9yME/UCt1Iom5yL4 E5GRpbQUQsy3XhPz2+Mi+73OkxO2n7D6mpKICcgNKtQec9apNb63eJZTBLL9YZ8FJyz8 gvYMoCALGaAm/Ku6TVpfkOHnd8j2SCWHybpwhtla9ZY+0dux8Ip3yhuC149g5t527/Vt M8V+UU2zzl2sQSuopOqSgJOEjpuSE2jetj+bdWH8GPWLzSXISo72FiQc95F6XLnkx28c nt9Q== X-Forwarded-Encrypted: i=1; AJvYcCX/6hmdAuHWBBrWgkExE/VnPvy1aaamBfXwRmbEfbxamH1f9W5YrUyURDhD6yiGk4a+cCzll4Tq1g==@kvack.org X-Gm-Message-State: AOJu0YzHqry5yQzbXjf8xV4Odx//Rz+Wm9BjnxDVYZhfUO6V4vlcrJ8J LICyQw/ehZs3ct3p31aYZlRcySQFuq0mEwTZ2Yol3HWye9fYRXhC X-Gm-Gg: ASbGncuOxSHSkIy7efFiYtEDKBDsO3UOF53Q1elb6NOrmaAyAgXQKQx3m0gW0QVlG4A 8h0dlb4aEvtzoBY9jG2KZ3FBuGrD7VPqCINU+TdggqlT9BNKwKOwXeIlOgEfzNHrjfNCaMlAIfU YEuTVzg5YJ98yjiP2LUPFup61YWToHyX0oponVLt5nqSsWqUezYggXOXuWnGtzIn+Nhqfl3CZuj CdwIPVJCNW6bwHaM1Uzd1DziCjQjs0DK2HDk7THpoMUH9Yjoq7AJTHlGcLq5AXadSKvrZ3t0Cyi y82l7R9m/w04dDjkBOtCDHqiAwc2f2sJ X-Google-Smtp-Source: AGHT+IHzC49qJigI15jYyMO47UhxKy6QnmDwTiLc/s5hoO6z29BxgyRIOihRyPzxw9V9nFo/UtDyAg== X-Received: by 2002:adf:e84a:0:b0:385:f0c9:4b66 with SMTP id ffacd0b85a97d-38bf5686090mr5730089f8f.33.1737235104085; Sat, 18 Jan 2025 13:18:24 -0800 (PST) Received: from pumpkin (82-69-66-36.dsl.in-addr.zen.co.uk. [82.69.66.36]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38bf32754dcsm6106637f8f.77.2025.01.18.13.18.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Jan 2025 13:18:23 -0800 (PST) Date: Sat, 18 Jan 2025 21:18:21 +0000 From: David Laight To: Guenter Roeck Cc: David Laight , Linus Torvalds , 'Arnd Bergmann' , "'linux-kernel@vger.kernel.org'" , 'Jens Axboe' , 'Matthew Wilcox' , 'Christoph Hellwig' , 'Andrew Morton' , 'Andy Shevchenko' , 'Dan Carpenter' , "'Jason A . Donenfeld'" , "'pedro.falcato@gmail.com'" , 'Mateusz Guzik' , "'linux-mm@kvack.org'" , 'Lorenzo Stoakes' , intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, David Airlie , Simona Vetter , Jani Nikula , Rodrigo Vivi Subject: Re: Buiild error in i915/xe Message-ID: <20250118211821.7cb5140f@pumpkin> In-Reply-To: References: <34d53778977747f19cce2abb287bb3e6@AcuMS.aculab.com> <20250118170959.3aa56f4d@pumpkin> <29ef57a1-e4dd-4d5d-8726-f1f79c698b66@roeck-us.net> <20250118180916.433bb73c@pumpkin> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; arm-unknown-linux-gnueabihf) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Stat-Signature: smpj13apyyux3whztfwh88ay6nsgp5rz X-Rspam-User: X-Rspamd-Queue-Id: 35995140004 X-Rspamd-Server: rspam03 X-HE-Tag: 1737235105-86546 X-HE-Meta: U2FsdGVkX1/0bmS99XU2Ia5hk1i3OooHuBlWl9bQQlulufFJzgRR2zMnTR2Q8qRLB+EnyWPoia2kMjwcbvv19i/eURRZSTxns2QZRMkzaBfY1EgZQRhhiP089yKEiFxIh+v9tGp96nloFUSOs7G84aH2lW3ly1QIDGxEsLu+0kVDClIaW1nRdmJvEWwzWVhSuHBlnEjVcWrXLnV4iavpZTkqRifeKT7foevYYzGISBuuSxhPfov99gWiZHDwWaYzGaho+OO8GMUdXxEYR2qdWG9hPxeuYAamFUDGCza/G1O0dIMTg0dOJN1qD+NFx9zMEDpbqrXwf8evp1H65GKVkct+hjanzZEaNPV3V6obkfNaY+qXl0e8B885nBDnnnonmLN+QFY6/waUws9it5GNHBaAb/yNnZRNp8+0upCbd6hpmFJ4xRFQCz9pQcDQkRDm1EvmDgzf3PEA+maV5sYvJg4BEtNxKuIR/65Q2MdBxrXDsC+flzW6Xcg9ebkjM0emM98v5LZF+KtnPjs/LsbKsBuyfZfutAXEPTHgsIpJLtQmAhrtBo285P7qgi6/AZPWHZmKtRPt6pmUjgsksI9DADAH/JUncJT5hXkE0mSHFiezCCgb9cJRghX69aywEYPG7MQlkrC1/mP3lEW9NO0Byk8SrZAR2TFIpMMqzoE1Ug7xua+FhXXTkCC4PQYeYFDFzUpDhluY1SfZdx9DIgdTEdFC1mk0JQWJ5iJYIHFl9WtlSehkavWfCi8RZcglXMrXNRNGkYbx4Af4dHuIzVtj7s690HtS+vyYZeO2q/RS2sXDr6/k0PWFzzRrg4YbHRVDEmWxovfIkslSVaSffUFLUzOf5vQGImkkKhiaz2xao7LLWhMQ5RZa1F812+DPOOQHzl5mGWHQAUjnIipImm9sn4TQ0Vcq9yzX7JfirZcWnv/d8NS7U08ZlXd4zjodAN5JqLsjo0aMBXVpn9Qwr0q erROKHzV elqQYMChyrSWxJRP6w2NxgWlS6Kwv4I2AE2rNe7quQE7J92BXNWdxQ4VRgWTASF19jwb8WowHE4R3zznLyVIc/njKJOYKNOsKeDjBiI23P2fpYYvEUATXNl/Lq4SvMiaDasImFe/b0vO+Dnilx31LdfWd3B/HC9twQ/iGW+5hIcmFLgJqanmZ0e+I5ICMIg75wK7tEd8wfzWUTqvEwu6SmCVI9glMKIFZMMIOLm0SjM69XG6oaRFlKaWLFg2Qbr7O/3z3iNtR51cQ6eAIERY61zXAsjtUtwXRcpaZqW7pOks+8Hwz2cz/CbJLpEkh3xOojYYRNpIpzr2rRuckRMEx63UFnOnqALonxK/Br13eV9quruJQPpZcI6b4h2yrDtV+/ZJuhDj6XoL6l2i9Xl/IchbVWHIO4hu64fHn9uebPP9Fn+8ZjXG68IMMEujD0pD5MiE5C8RISw3OoO/nP1cVIaHxFWwzgSSNwUQrRBB0l3ieFpHc7DtSLSBgOdtADPN78mZABRZpH/ZBMj+K4/7UswjfWyFPEnGQMGNWVNCNqj9bqpgxQyEOSgU+Menz8fTkuS/nJ53hHsZ1Pro= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000009, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Sat, 18 Jan 2025 10:36:11 -0800 Guenter Roeck wrote: > On 1/18/25 10:09, David Laight wrote: > > On Sat, 18 Jan 2025 09:49:21 -0800 > > Guenter Roeck wrote: > > > >> On Sat, Jan 18, 2025 at 05:09:59PM +0000, David Laight wrote: > >>> On Sat, 18 Jan 2025 08:13:06 -0800 > >>> Guenter Roeck wrote: > >>> > >>>> Hi, > >>>> > >>>> On Mon, Nov 18, 2024 at 07:13:31PM +0000, David Laight wrote: > >>>>> Use BUILD_BUG_ON_MSG(statically_true(ulo > uhi), ...) for the sanity > >>>>> check of the bounds in clamp(). > >>>>> Gives better error coverage and one less expansion of the arguments. > >>>>> > >>>>> Signed-off-by: David Laight > >>>> > >>>> This patch triggers a build error when trying to build parisc:allmodconfig. > >>>> See error message and bisect log below. > >>>> > >>>> I don't think there is anything wrong with the patch. The underlying > >>>> problem seems to be that parisc:allmodconfig enables CONFIG_DRM_XE which > >>>> tries to build the affected file even though CONFIG_DRM_I915 is not > >>>> enabled/supported on parisc. > >>> > >>> This has appeared before. > >>> Any idea which inlined copy of scale() is causing the problem. > >>> On the face of it they all look ok. > >>> > >>> If you can reproduce it maybe try commenting out some of the calls. > >>> > >> > >> See diff below. All three changes are needed. > >> No idea why the compiler would know that the values are invalid. > > > > Maybe it isn't even an inlining issue. > > Perhaps that compiler just doesn't like the function ? > > What happens without the 'static' (and an extra prototype)? > > > > > You mean like that ? > > -static u32 scale(u32 source_val, > + > +u32 scale(u32 source_val, > + u32 source_min, u32 source_max, > + u32 target_min, u32 target_max); > + > +u32 scale(u32 source_val, > u32 source_min, u32 source_max, > u32 target_min, u32 target_max) > > It doesn't help. Worse, after that change the error is still reported > even with the #if 0 elsewhere. Yes - that means the compiler is 'objecting' to the scale() function itself. (Without any regard for its callers.) Which should make it easy to reproduce outside the kernel build. I think Mat had a successful build with a different (older?) version of gcc for parisc. There must be something odd causing the problem - there will be other clamp() calls in the build that don't generate the error. Remember that lack of the error messages requires the compiler optimise away some code - so if the optimisation is skipped the call could be generated and the warning output (even if the call is optimised away later). Perhaps there is some obscure interaction with the WARN() statements? I don't have the required compiler (neither does godbolt). David > > Guenter >