Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp810723iog; Mon, 13 Jun 2022 13:32:19 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vdZAXW9Dbvou/XEL0wKnoZPUpCcM1r+Wynt5pjtB10vOf57AlruAeCW0C8P5S5YNdEPhcH X-Received: by 2002:a05:6402:2789:b0:42d:ce10:1d6 with SMTP id b9-20020a056402278900b0042dce1001d6mr1797700ede.188.1655152339276; Mon, 13 Jun 2022 13:32:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655152339; cv=none; d=google.com; s=arc-20160816; b=cFrC9p1/wudMYdv2vf+MTirSZAcGmt1vO+Gjr1OxL8yxSFjlxrnhwiqWkk7NBmq43+ jc6kZrrLqkxKUTZ2nfZIaRUSGXswsLfffwx7/AuGX3d279xcR83MPVD/kNOjFFqCEYGe 0IEjX77TGCYj7A/roDgGhThbckC9hP2qVPr8jW0ypMBQQ0Upb7e27x9E6klg/WfaaWgh qDuzqu3E6tWBjTr9uWVxnC9tTSpCdu/MdHEvjz5TDISuL6GkNlFKbM113UPliRxyUz6U gt9T8vSmbLG+JZJr7/P/trTElDlNieLEsreTCYK8Lbqbbor+GONlg5uCtYC6Nv1Oq3JM rDnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=eBlGGSFimskYZhgUeQnDKxyOCnHz9HT2QVXMlyKypZU=; b=Inw5LUBiGfQsOyjYM5zzPCV/Xm5p0p0YSyjxDdxKUoCcAqqRXkWcmAtr7Ov3J0viUT thoKUDbUzFVBC92/C7NivoQSay/WpQIPD0gJ/NL/ETGJcr8kSx0ezedUFpm1wTM7OYZc nEu4Hb19GhcCCFVfKC3W35OabW4AnpNxLFdcJx0wgaahTQ8vNH6XGIP7pni9QOcY+5aL AhuNNrVTVdaSvzGXzYiCG+GAIErLIDoeRG8BErbO56rTKYgE3DWvpRripfI8U4shHeNj icTP7d6rySiNFbVO+5bVV2P+qjinNDfcrqtjKzXgLqWouzTJysM46JUCy86/Yd4nxXYm /yBQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c8-20020a05640227c800b0042dd34081d8si10775435ede.598.2022.06.13.13.31.53; Mon, 13 Jun 2022 13:32:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348753AbiFMUII (ORCPT + 99 others); Mon, 13 Jun 2022 16:08:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346727AbiFMUHO (ORCPT ); Mon, 13 Jun 2022 16:07:14 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87B213F30A; Mon, 13 Jun 2022 11:41:13 -0700 (PDT) Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 5.0.0) id 25f72b661c5a2edc; Mon, 13 Jun 2022 20:41:11 +0200 Received: from kreacher.localnet (unknown [213.134.187.64]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by v370.home.net.pl (Postfix) with ESMTPSA id 2035D66C81D; Mon, 13 Jun 2022 20:41:11 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Linux PM , Andy Shevchenko , Mika Westerberg , Hans de Goede , Sakari Ailus Subject: [PATCH v2 00/16] ACPI: Get rid of the list of children in struct acpi_device Date: Mon, 13 Jun 2022 20:03:25 +0200 Message-ID: <2653857.mvXUDI8C0e@kreacher> In-Reply-To: <1843211.tdWV9SEqCh@kreacher> References: <1843211.tdWV9SEqCh@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 213.134.187.64 X-CLIENT-HOSTNAME: 213.134.187.64 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvfedruddujedguddviecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfjqffogffrnfdpggftiffpkfenuceurghilhhouhhtmecuudehtdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefufffkjghfggfgtgesthfuredttddtjeenucfhrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqeenucggtffrrghtthgvrhhnpedvffeuiedtgfdvtddugeeujedtffetteegfeekffdvfedttddtuefhgeefvdejhfenucfkphepvddufedrudefgedrudekjedrieegnecuvehluhhsthgvrhfuihiivgepgeenucfrrghrrghmpehinhgvthepvddufedrudefgedrudekjedrieegpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeejpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqphhmsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprghnughrihihrdhshhgvvhgthhgvnhhkoheslhhinhhugidrihhn thgvlhdrtghomhdprhgtphhtthhopehmihhkrgdrfigvshhtvghrsggvrhhgsehlihhnuhigrdhinhhtvghlrdgtohhmpdhrtghpthhtohephhguvghgohgvuggvsehrvgguhhgrthdrtghomhdprhgtphhtthhopehsrghkrghrihdrrghilhhusheslhhinhhugidrihhnthgvlhdrtghomh X-DCC--Metrics: v370.home.net.pl 1024; Body=7 Fuz1=7 Fuz2=7 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday, June 9, 2022 3:44:27 PM CEST Rafael J. Wysocki wrote: > Hi All, > > Confusingly enough, the ACPI subsystem stores the information on the given ACPI > device's children in two places: as the list of children in struct acpi_device > and (as a result of device registration) in the list of children in the embedded > struct device. > > These two lists agree with each other most of the time, but not always (like in > error paths in some cases), and the list of children in struct acpi_device is > not generally safe to use without locking. In principle, it should always be > walked under acpi_device_lock, but in practice holding acpi_scan_lock is > sufficient for that too. However, its users may not know whether or not > they operate under acpi_scan_lock and at least in some cases it is not accessed > in a safe way (note that ACPI devices may go away as a result of hot-remove, > unlike OF nodes). > > For this reason, it is better to consolidate the code that needs to walk the > children of an ACPI device which is the purpose of this patch series. > > Overall, it switches over all of the users of the list of children in struct > acpi_device to using helpers based on the driver core's mechanics and finally > drops that list, but some extra cleanups are done on the way. > > Please refer to the patch changelogs for details. Here's a v2 of this series, mostly addressing review comments, but the subjects of the Thunderbolt and USB patches have been changed too. Thanks!