From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4B8041E00A6 for ; Fri, 8 Nov 2024 12:48:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731070096; cv=none; b=kSXhUXcjB9OzS5iyJsaVigYtyrchOFDZ9KTA2yeRk3cCfgZM+DogyOxV4SY6BPecjhWo5ZbwUplOOzq3r7F4YLmlfrIBgXNYJYqOtxemPrzSM5nP/YLgOifczi+BhYajCv7SiT1kOteFj6gLV8slBXCklKomucD5coef/jTmtnw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731070096; c=relaxed/simple; bh=AD8jJcdDP/sbSzXuaWn942hLnQm9QFhXa3EwbSQ26e0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DrD/nH/VrqpscZ08Fc9O6QwqND81b6a6qUldICxUwTGhL9raL4VSo2yuRu9i7T/q+N2rUKwSNJpaNlO5ZRDtshgf/wU6lVJ8ggp1Y8yJRORo9yGTEruLiTvkWh9/DTcY4oRuBbrb4wdUXgfOsI/CUJW/HhzUENWzIaF3S0m2uDo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=WhkIDTxa; arc=none smtp.client-ip=192.198.163.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="WhkIDTxa" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1731070095; x=1762606095; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=AD8jJcdDP/sbSzXuaWn942hLnQm9QFhXa3EwbSQ26e0=; b=WhkIDTxaF8LffXCDXbR+dUMxFBM7tn15dkYJboYi6dSTLp1Hb7bVMOpp GGPU6u9w3Bkr2ox8EVWbQZB+D/JrF/Ueb4SKhx8psNG1Qo7HTxI2TVES5 yJw09BvX0mkMB1Hv3sUuEVcUY/XWrNVo3k4FY+hEzJPjBN1Mf2zRZx8xq bzwj9KAD+Hsy2kpzn7A+8Ld0rEykFXGwUySdxk6KDZvt/UOcbiX6D42Z7 lLRP+sbRuaPR1HGM4MC/QLgKBePIFQ4FCqvfFYqW88NaQ2/CwUpX+tcrK rOyB6Qd3b+auUL3FW5RZuX2lxczgzBiOkJkxOZ20WYVRpq1HPDs47+q5J w==; X-CSE-ConnectionGUID: Bg7VI8FUQ7GOcGsU9dvMbA== X-CSE-MsgGUID: 6W9gkctoSkq7Fs2UF4l9CQ== X-IronPort-AV: E=McAfee;i="6700,10204,11250"; a="30367771" X-IronPort-AV: E=Sophos;i="6.12,137,1728975600"; d="scan'208";a="30367771" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Nov 2024 04:48:14 -0800 X-CSE-ConnectionGUID: FRYjcacnQ0iFl1HKhPgHXQ== X-CSE-MsgGUID: 1izRAXw7Sa2ZyNaOnFfqKg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,137,1728975600"; d="scan'208";a="90411249" Received: from smile.fi.intel.com ([10.237.72.154]) by orviesa005.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Nov 2024 04:48:11 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.98) (envelope-from ) id 1t9OPH-0000000Cc4T-3siz; Fri, 08 Nov 2024 14:48:07 +0200 Date: Fri, 8 Nov 2024 14:48:07 +0200 From: Andy Shevchenko To: "H. Peter Anvin" Cc: Thomas Gleixner , linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Dave Hansen Subject: Re: [PATCH v3 1/1] x86/cpu: Make sure flag_is_changeable_p() is always being used Message-ID: References: <20240910084356.1518209-1-andriy.shevchenko@linux.intel.com> <52362D81-CE7E-4F06-AA1E-B8C55933B4B4@zytor.com> Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52362D81-CE7E-4F06-AA1E-B8C55933B4B4@zytor.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Fri, Nov 08, 2024 at 12:50:49PM +0100, H. Peter Anvin wrote: > On November 8, 2024 10:29:02 AM GMT+01:00, Andy Shevchenko wrote: > >On Tue, Sep 10, 2024 at 11:42:42AM +0300, Andy Shevchenko wrote: > >> When flag_is_changeable_p() is unused, it prevents kernel builds > >> with clang, `make W=1` and CONFIG_WERROR=y: > >> > >> arch/x86/kernel/cpu/common.c:351:19: error: unused function 'flag_is_changeable_p' [-Werror,-Wunused-function] > >> 351 | static inline int flag_is_changeable_p(u32 flag) > >> | ^~~~~~~~~~~~~~~~~~~~ > >> > >> Fix this by moving core around to make sure flag_is_changeable_p() is > >> always being used. > >> > >> See also commit 6863f5643dd7 ("kbuild: allow Clang to find unused static > >> inline functions for W=1 build"). > > > >Any comments on this? Can it be applied? > > Incidentally, this really should be "unsigned long" rather than u32, although > I believe it is only used on 32 bits. I can fix this in v4, does it warrant your Rb / Ack? -- With Best Regards, Andy Shevchenko