From patchwork Fri Dec 15 11:23:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 18117 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:3b04:b0:fb:cd0c:d3e with SMTP id c4csp9204158dys; Fri, 15 Dec 2023 03:35:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IGLn5xDw9lltzmM5wScRzEMvNCyTaxt2i7FnaKNAuLx8btHbmnVMQteHvOPb/PDrJNqFGcp X-Received: by 2002:a17:903:24e:b0:1d0:af63:2403 with SMTP id j14-20020a170903024e00b001d0af632403mr14692251plh.50.1702640131093; Fri, 15 Dec 2023 03:35:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702640131; cv=none; d=google.com; s=arc-20160816; b=HXTZmZchGHJeYjm0d5sHBluZULBzcPtRCbZvByamgHH3/KGRdrQkZcWH3dEerk2A1H nLrYUXMXgW3Dr2YBFvOQbzqKeQ5twgIK6qR2/JnQ/JKvGmgrQRGbdfqiK/s8CBmKgsRP 2P9EbLo4XawIcyJ3bqn89wGYQD4T9teb1FUgFkiR2e14lqAMpJPYX9XWTHDGT+++fGe4 AQJpR6KRWoXEYfz6Va6afsR6dXuq6pKvHVEQ1Zyq/wML1FXhzjHG9/47xgEDsSk8VqtT n9HEZpM0ScYoqLTLHjXoERKOz+Li/M+QZooymMYRRxDa6ZsW9TQ/XJnYz70hscUoAh5r 4wYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=DJiu/0vCOphpWYZscQ/lBnjGIveChWZE6LAz0VZqg3Q=; fh=onaXV/9tgv2VQNqWsV5miYD1muoRQWddouYPtnrp6Do=; b=a2SNZYsSHbEHb8yV/vqFm92+ePioErfUcOfCnb4RAL2CYl1L88zXwJfQAZCuz8Gl63 DKI2iVya4UFZ+ycU2GtLvCBBxyLjo83CNF/c88FuiXBmS0SCF0O//3olB++15Gv6zzy3 Kf+hLHgqVe1TIMLX4jwi/GeAR2YBiFfHYtPoK+nGL1R4xZbCl+ply7VA3jvj76vreC6i X9JhHgPUkst8Tyb5e5SYkHhGq140UDk6I47bZmCAK6fRC38PGCZTGUm0xQBO2WGcoL6H iSqoNm9BBuNnC9UCn3A9TIQUzU2SlXQ/xXjVU37c527exkhx91gIQSwI9GQ+ls0kQNfY CN1g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-850-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-850-ouuuleilei=gmail.com@vger.kernel.org" Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id h5-20020a170902f54500b001d05a432a3csi13512658plf.565.2023.12.15.03.35.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 03:35:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-850-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-850-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-850-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id C67DD281A4D for ; Fri, 15 Dec 2023 11:35:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 915342D046; Fri, 15 Dec 2023 11:34:35 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) (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 DCDD2250E8; Fri, 15 Dec 2023 11:34:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rjwysocki.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rjwysocki.net 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.4.0) id 2951e9a5c537d893; Fri, 15 Dec 2023 12:27:50 +0100 Received: from kreacher.localnet (unknown [195.136.19.94]) (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 cloudserver094114.home.pl (Postfix) with ESMTPSA id 36107668B1E; Fri, 15 Dec 2023 12:27:50 +0100 (CET) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Zhang Rui , Srinivas Pandruvada , Michal Wilczynski , Hans de Goede , Andy Shevchenko , Mika Westerberg , Heikki Krogerus , Mario Limonciello , Daniel Drake Subject: [PATCH v1 0/3] ACPI: OSL/EC: Use spin locks without disabling interrupts Date: Fri, 15 Dec 2023 12:23:54 +0100 Message-ID: <2330034.ElGaqSPkdT@kreacher> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-CLIENT-IP: 195.136.19.94 X-CLIENT-HOSTNAME: 195.136.19.94 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvkedrvddtvddgvdekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepgeffhfdujeelhfdtgeffkeetudfhtefhhfeiteethfekvefgvdfgfeeikeeigfehnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucfkphepudelhedrudefiedrudelrdelgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduleehrddufeeirdduledrleegpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeduuddprhgtphhtthhopehlihhnuhigqdgrtghpihesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehruhhirdiihhgrnhhgsehinhhtvghlrdgtohhmpdhrtghpthhtohepshhrihhnihhvrghsrdhprghnughruhhv rggurgeslhhinhhugidrihhnthgvlhdrtghomhdprhgtphhtthhopehmihgthhgrlhdrfihilhgtiiihnhhskhhisehinhhtvghlrdgtohhmpdhrtghpthhtohephhguvghgohgvuggvsehrvgguhhgrthdrtghomh X-DCC--Metrics: v370.home.net.pl 1024; Body=11 Fuz1=11 Fuz2=11 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785347578536136008 X-GMAIL-MSGID: 1785347578536136008 Hi Everyone, After https://patchwork.kernel.org/project/linux-acpi/patch/5745568.DvuYhMxLoT@kreacher/ the SCI interrupt handler is threaded, so ACPICA spin locks can be used without disabling interrupts, because they cannot be acquired from a hardirq handler running on the same CPU as any code already holding the spin lock. This patch [1/3] removes disabling interrupts from acpi_os_acquire_lock() and updates acpi_os_release_lock() accordingly. Patch [2/2] uses the observation that if acpi_handle_interrupt() can run in a threaded interrupt handler in the GPE case, it can also run in a threaded interrupt handler in the dedicated IRQ case, so it makes the EC driver use a threaded handler for the dedicated EC interrupt. Patch [3/3], in analogy with patch [1/3], uses the observation that after patch [2/2] all of the EC code runs in thread context, so it need not disable interrupts on the local CPU before acquiring a spin lock, so the EC driver is updated to operate its spin lock without disabling interrupts. Thanks!