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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8D7A5CD5BCC for ; Thu, 5 Sep 2024 15:38:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ABA3410E90F; Thu, 5 Sep 2024 15:38:26 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="KUVnyjnQ"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5504D10E909; Thu, 5 Sep 2024 15:38:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725550705; x=1757086705; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=WqFaPHVKKRJUrSjh96WSLvDVpyIouu48maZXtKVDdA8=; b=KUVnyjnQGxdQea3woI03s3r4ejpvpmu8xG+yGk50e6TB7q3aG1FLXqVR ayaGzp6n0o7nFzTnHHQmttelZkWy5148rWzHB1wdww5VacUHPQNiMzjF/ fxDLAnCbR7dwHU79Eeflb98whNr4OSN+l4PdAip3DB3Rz0nnaMZBuZsqz l4eAkOpKjAXUGwzIoK8HVfz9dtI+wiIYf19F9+LA1YFvMf2p719Xi2fyA bC2yC0ldchJaKtFZVmi1IDXq852VYRlZXa4nDobjPPiIOs1NnYbopFAmL kWXjaWqcgpKB/pRL6pvmwdZpw5hqHkAn4+r38kmAeOitqOryZ3g15b1CU Q==; X-CSE-ConnectionGUID: m2icqAuJQPWlIjRJFhVGgQ== X-CSE-MsgGUID: 7rd5IxDMT2mFEh5S0s/sKQ== X-IronPort-AV: E=McAfee;i="6700,10204,11186"; a="35634030" X-IronPort-AV: E=Sophos;i="6.10,205,1719903600"; d="scan'208";a="35634030" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Sep 2024 08:38:24 -0700 X-CSE-ConnectionGUID: u6pWWqheTeempRaYMfBO/g== X-CSE-MsgGUID: pKR7g3A+S6q/KP0BCfW6iQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,205,1719903600"; d="scan'208";a="65652927" Received: from smile.fi.intel.com ([10.237.72.54]) by orviesa009.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Sep 2024 08:38:09 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.98) (envelope-from ) id 1smEWm-00000005Rhy-32CS; Thu, 05 Sep 2024 18:36:08 +0300 Date: Thu, 5 Sep 2024 18:36:08 +0300 From: Andy Shevchenko To: Uros Bizjak Cc: linux-kernel@vger.kernel.org, Dave Hansen , Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Hans Verkuil , Mauro Carvalho Chehab , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Eric Biggers , "Theodore Y. Ts'o" , Jaegeuk Kim , "Jason A. Donenfeld" , Linus Torvalds , Hannes Reinecke , "James E.J. Bottomley" , "Martin K. Petersen" , Alexei Starovoitov , Daniel Borkmann , John Fastabend , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Andrew Morton , Brendan Higgins , David Gow , Rae Moar , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jiri Pirko , Petr Mladek , Steven Rostedt , Rasmus Villemoes , Sergey Senozhatsky , Stephen Hemminger , Jamal Hadi Salim , Cong Wang , Kent Overstreet , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, linux-mtd@lists.infradead.org, linux-fscrypt@vger.kernel.org, linux-scsi@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com Subject: Re: [PATCH 00/18] random: Include and resolve circular include dependency Message-ID: References: <20240905122020.872466-1-ubizjak@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Thu, Sep 05, 2024 at 03:03:24PM +0200, Uros Bizjak wrote: > On Thu, Sep 5, 2024 at 2:41 PM Andy Shevchenko > wrote: > > > > On Thu, Sep 05, 2024 at 02:17:08PM +0200, Uros Bizjak wrote: > > > There were several attempts to resolve circular include dependency > > > after the addition of percpu.h: 1c9df907da83 ("random: fix circular > > > include dependency on arm64 after addition of percpu.h"), c0842fbc1b18 > > > ("random32: move the pseudo-random 32-bit definitions to prandom.h") and > > > finally d9f29deb7fe8 ("prandom: Remove unused include") that completely > > > removes inclusion of . > > > > > > Due to legacy reasons, includes , but > > > with the commit entry remark: > > > > > > --quote-- > > > A further cleanup step would be to remove this from > > > entirely, and make people who use the prandom infrastructure include > > > just the new header file. That's a bit of a churn patch, but grepping > > > for "prandom_" and "next_pseudo_random32" "struct rnd_state" should > > > catch most users. > > > > > > But it turns out that that nice cleanup step is fairly painful, because > > > a _lot_ of code currently seems to depend on the implicit include of > > > , which can currently come in a lot of ways, including > > > such fairly core headfers as . > > > > > > So the "nice cleanup" part may or may never happen. > > > --/quote-- > > > > > > __percpu tag is currently defined in include/linux/compiler_types.h, > > > so there is no direct need for the inclusion of . > > > However, in [1] we would like to repurpose __percpu tag as a named > > > address space qualifier, where __percpu macro uses defines from > > > . > > > > > > This patch series is the "nice cleanup" part, and allows us to finally > > > include in prandom.h. > > > > > > The whole series was tested by compiling the kernel for x86_64 allconfig > > > and some popular architectures, namely arm64 defconfig, powerpc defconfig > > > and loongarch defconfig. > > > > Obvious question(s) is(are): > > 1) have you seen the Ingo's gigantic patch series towards resolving issues with > > the headers? > > 2) if not, please look at the preliminary work and take something from there, I > > believe there are many useful changes already waiting for a couple of years to > > be applied. > > > > Because I haven't found any references nor mentions of that in the cover letter > > here and explanation why it was not taking into consideration. > > I am aware of the series, but the patch takes only a small bite of it > and specifically resolves the inclusion of from > linux/random.h. The series fixes the missing inclusion of > in files that use pseudo-random function and it was > not meant to be a general header cleanup. The end goal is to allow us > to include in linux/prandom.h - which uses __percpu > tag without the correct include. Thank you for elaboration, it's all clear now. > Thus, the patch series is only tangentially connected to Ingo's patch series. -- With Best Regards, Andy Shevchenko