From patchwork Fri Dec 15 11:26:33 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: 179200 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:3b04:b0:fb:cd0c:d3e with SMTP id c4csp9204137dys; Fri, 15 Dec 2023 03:35:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IE191wze9oNUoCdtXS35z/9I+eHaJI09iY/QLQGJChkLIE7tJd3CKPugkrtqc2jO15wWhPI X-Received: by 2002:a2e:a587:0:b0:2cc:3da2:1f2a with SMTP id m7-20020a2ea587000000b002cc3da21f2amr732285ljp.52.1702640128574; Fri, 15 Dec 2023 03:35:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702640128; cv=none; d=google.com; s=arc-20160816; b=v3h/ANJBmwaL8nsmF0vtCEoo3F5EbUQncWWx8g9UcPG8dtyRCQyqPA4tjufS4do992 C5pM0JM3XFpDPHpg8SAJa6V3hhs4IZB8PMtnqaT+6GLh0WgBn8mpjFrFHL9RDDVP8kzt C2sW5jRLzeRiZ9FcxpRyLVuS5yVWBqNgOfftEXDIJhllCevViw7zVjoa8c2rfGclNoWd s1Mzpo7fT+w+5hZK3Dc6NTfsdRFpsbOWe89Kja7o1Gkyg+VBIyfgK2m/JewRo2vIVFju 7mF+5Ru3Go2aubRSdpJcD3bbclZTXlQ+6jhZKXqlIHXCnAgDnJesu44vd02n2gGhGD7w TKGQ== 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:references:in-reply-to:message-id :date:subject:cc:to:from; bh=jBn9LB2QiTDNPP2pvgoiTTk1qrJrDnEDXG7BkWN+wV0=; fh=onaXV/9tgv2VQNqWsV5miYD1muoRQWddouYPtnrp6Do=; b=Xb+5YmgTyhpj3sCokXHP82NwU7vrPMaq0VydfM9ExG4Euk18DISd0d9OruT+AEb+0c QjxdW5rwZnYqd0Eslgm1+755iP3WWkUbXBHiPM2IZ11HUl4O0X9CC4WYnQaQqmW2KCvf 4CIqJy5p2PyM4OCdJ3EAxoYyLYqIvmS8KEjr8dzeqpAsYeOC9JQm5kkIPexnwIaSSAl/ K4KZnMNYtoizR2RhoV9nx3NtMwXERyfex5dveVlUafGzVE4BceDpsPJjPoMMn/eb2z36 iXOHKxuE1Or1X21Lv1NxoEz9IwdERhlP9ihCxI9zjyTZ7gYOYtCYoS2alRdb88Y8qWAU gThg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-848-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-848-ouuuleilei=gmail.com@vger.kernel.org" Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id hg22-20020a170906f35600b00a1f93956364si5057016ejb.928.2023.12.15.03.35.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 03:35:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-848-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-848-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-848-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 2D8F01F2167E for ; Fri, 15 Dec 2023 11:35:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 79D532CCD8; 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 6AF8F250E4; 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 e8ae3be8943d7841; Fri, 15 Dec 2023 12:27:49 +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 A2C69668B1E; Fri, 15 Dec 2023 12:27:48 +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 2/3] ACPI: EC: Use a threaded handler for dedicated IRQ Date: Fri, 15 Dec 2023 12:26:33 +0100 Message-ID: <13432667.uLZWGnKmhe@kreacher> In-Reply-To: <2330034.ElGaqSPkdT@kreacher> References: <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: gggruggvucftvghtrhhoucdtuddrgedvkedrvddtvddgvdekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepvdffueeitdfgvddtudegueejtdffteetgeefkeffvdeftddttdeuhfegfedvjefhnecukfhppeduleehrddufeeirdduledrleegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepudelhedrudefiedrudelrdelgedphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedpnhgspghrtghpthhtohepuddupdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhuihdriihhrghnghesihhnthgvlhdrtghomhdprhgtphhtthhopehsrhhinhhivhgrshdrphgrnhgurhhuvhgruggrsehlihhnuhigrdhinhhtvghlrdgt ohhmpdhrtghpthhtohepmhhitghhrghlrdifihhltgiihihnshhkihesihhnthgvlhdrtghomhdprhgtphhtthhopehhuggvghhovgguvgesrhgvughhrghtrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=11 Fuz1=11 Fuz2=11 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785347575533034847 X-GMAIL-MSGID: 1785347575533034847 From: Rafael J. Wysocki After commit 7a36b901a6eb ("ACPI: OSL: Use a threaded interrupt handler for SCI") all of the EC code runs in thread context on all systems where EC events are signaled through a GPE. It may as well run in thread context on systems using a dedicated IRQ for EC events signaling, so make it use a threaded handler for that IRQ. Signed-off-by: Rafael J. Wysocki --- drivers/acpi/ec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Index: linux-pm/drivers/acpi/ec.c =================================================================== --- linux-pm.orig/drivers/acpi/ec.c +++ linux-pm/drivers/acpi/ec.c @@ -1458,8 +1458,8 @@ static bool install_gpe_event_handler(st static bool install_gpio_irq_event_handler(struct acpi_ec *ec) { - return request_irq(ec->irq, acpi_ec_irq_handler, IRQF_SHARED, - "ACPI EC", ec) >= 0; + return request_threaded_irq(ec->irq, NULL, acpi_ec_irq_handler, + IRQF_SHARED | IRQF_ONESHOT, "ACPI EC", ec) >= 0; } /**