Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp495191iol; Thu, 9 Jun 2022 07:53:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxhLJpWvULU9BgTkWzxSJFGeCRWlhcy8TXiEzPgIbkFdyqRxLWcp9NJd64kX+0TbRyVwsoy X-Received: by 2002:a65:5601:0:b0:3fd:af27:6e68 with SMTP id l1-20020a655601000000b003fdaf276e68mr19849769pgs.494.1654786398225; Thu, 09 Jun 2022 07:53:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654786398; cv=none; d=google.com; s=arc-20160816; b=SmYcwXj3HSMsBkchskymcqshpreCE+jgs3WeNV+RE/JZ2l2ntYuAP7oVRsulxmrE1A wye5B2i+23Uf1y85pmhBHpm0jUkR0gv+2vsEwfhF4QAKj9syXNfnh7vP1ufYn1pkrzkC fwvHzFAT36Pyt3FWi5qE4NSNapMhqDNwrUfjM9d/NaKnjoRw4KwKsvScU7xx5FGj2hKL oIA/hyZ6PrmKhlfP2Sced4UefS4+6oXWAjR9DKbLBLFcFAk920IQqaGjZX3jzhsVoPZv 6PXE0oMGxWTOgGBpdN5T4SXbE2u2Wnfgk7VtSEenH7RNgX8FSl1Ley3o9GlyfYT8JySK B/8w== 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 :message-id:date:subject:cc:to:from; bh=5yeyz8YoguqNrq8m28UIdmgNiiuiXOnoTwEDj5KMvPs=; b=ynImtTeY44oosxKOMqiNs0wVehmwE9SDsZub//oqHZPahtuxcXJSApjY+U+LJvPQwF uJbpPwdv4eIg7fn8BO24Ura1q01FdZettMyoDQ06B/Xgi2+kCYFdVTd1w0mkLMRKoR+B pdYJ7bTXruwwNbjpjip+lLIOm9ctOSImPBxHD+WaleC41uMZvxHkiHXtE8rcBltpvzfD Pa6/tTOBcZWobff+uiSYZU6+n8H0t0sxTmlTZy/4bVmj1G6CrQ2tCfYxnLpQynPckkLb hbCA/vBI9iOAwWSAs8PEBJNk7mSXBqVrgigPsBH/xbY7aI6y6RMEUjXPpD4gSyxgsN0/ ieYA== 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 d22-20020a170902b71600b001619539fd82si29654881pls.59.2022.06.09.07.53.03; Thu, 09 Jun 2022 07:53:18 -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 S1343514AbiFIOWM (ORCPT + 99 others); Thu, 9 Jun 2022 10:22:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343525AbiFIOVH (ORCPT ); Thu, 9 Jun 2022 10:21:07 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44C522E4C80; Thu, 9 Jun 2022 07:21:05 -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 7d9b4b6816eab90d; Thu, 9 Jun 2022 16:21:03 +0200 Received: from kreacher.localnet (unknown [213.134.186.232]) (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 C296966C7D8; Thu, 9 Jun 2022 16:21:02 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Linux PM , Andy Shevchenko , Mika Westerberg , Hans de Goede , Sakari Ailus Subject: [PATCH v1 00/16] ACPI: Get rid of the list of children in struct acpi_device Date: Thu, 09 Jun 2022 15:44:27 +0200 Message-ID: <1843211.tdWV9SEqCh@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 213.134.186.232 X-CLIENT-HOSTNAME: 213.134.186.232 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvfedruddtledgjedtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepffffffekgfehheffleetieevfeefvefhleetjedvvdeijeejledvieehueevueffnecukfhppedvudefrddufeegrddukeeirddvfedvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvddufedrudefgedrudekiedrvdefvddphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedpnhgspghrtghpthhtohepjedprhgtphhtthhopehlihhnuhigqdgrtghpihesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhpmhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopegrnhgurhhihidrshhhvghvtghhvghnkhhosehlihhnuhigrdhinhht vghlrdgtohhmpdhrtghpthhtohepmhhikhgrrdifvghsthgvrhgsvghrgheslhhinhhugidrihhnthgvlhdrtghomhdprhgtphhtthhopehhuggvghhovgguvgesrhgvughhrghtrdgtohhmpdhrtghpthhtohepshgrkhgrrhhirdgrihhluhhssehlihhnuhigrdhinhhtvghlrdgtohhm 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 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. Thanks!