Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6605315rdb; Fri, 15 Dec 2023 03:35:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IFPgZGyEZL+hkG12lIBrF/FTyr0WdMphzzWrP6o5RM9EeQZpJTctdcQS8d+34HeCUayQzit X-Received: by 2002:a05:6358:281e:b0:170:3f39:266 with SMTP id k30-20020a056358281e00b001703f390266mr15052546rwb.14.1702640099755; Fri, 15 Dec 2023 03:34:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702640099; cv=none; d=google.com; s=arc-20160816; b=f7lutbaGYNKi3R4ZMaovaqYzRDJ04SwgX9d5HYEre6T3mkiod8jWkoE8TpsBx2Vxfy 3LXC85JVEcP40vLp2+l6szNU5Gf0xLZJ9Dg1cMnZBpnkus4iJ8yuWSEYZ6gw1G+FGWxX dqUH0/b7BdRUOxHlItErbfAk6rqvXakHcca49uwKUMJkNvoGSn+fTPB46De/FqloCgnw 4qDrECNF1n5jCIwG3VwrtCMzJVJMLnZ4vl1JOJVqqyN58qKTdj3xc7RzbZ8gSrugMpMo Yoh5pZ/CfV3xXGUVpEi3O85b9nnn8qxndvQo+++f/8HNQPwjN0dO+f3x2WuvtFeXp81o M5/w== 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=3VMnIZhauRJuZBPluOB/ZadWDwWu29lQyyz/2l4qLAE=; fh=onaXV/9tgv2VQNqWsV5miYD1muoRQWddouYPtnrp6Do=; b=XM4XP2CHprMw3whJmWwEKS5+UBFwb1wKmeDbxOVgEJ2vlsCyi2Rw0ISLV9AZEMe/Q9 FL7Mk+5LQejfHXffjQeFXUtgSPqDAVXUmgRDPe/hTdQn3xrhNkv1aOEwqYllDpqa+91H Y9k9LYx1JrGnY7AKntWqINU3FSDwkO9ynuRSYuN9WHE9DnBlaac50u0PiMCLcEBQrH7W 0nPTneaELt3X5FDRuIAI88m7Jyu6qtV8goR6zhY0EhTQjKjD0HbFbZSI5DGjPLUDqFSm Mdo0mKk0YVYU1XwsLT008FwOYesbAmKQG3fHH3QcseYHbDFyE/enhDM00ncChmHsorl8 OvNQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-851-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-851-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id e22-20020a17090ab39600b0028a2af4cdc4si12762109pjr.139.2023.12.15.03.34.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 03:34:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-851-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-851-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-851-linux.lists.archive=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 39698284CE5 for ; Fri, 15 Dec 2023 11:34:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8AA5725755; Fri, 15 Dec 2023 11:34:34 +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 DCD9A250E6; 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 452ee2495fde20ac; 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 754B3668B1E; Fri, 15 Dec 2023 12:27:49 +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 1/3] ACPI: OSL: Use spin locks without disabling interrupts Date: Fri, 15 Dec 2023 12:25:15 +0100 Message-ID: <1895035.tdWV9SEqCh@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 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" 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 From: Rafael J. Wysocki After commit 7a36b901a6eb ("ACPI: OSL: Use a threaded interrupt handler for SCI") any ACPICA code never runs in a hardirq handler, so it need not dissable interrupts on the local CPU when acquiring a spin lock. Make it use spin locks without disabling interrupts. Signed-off-by: Rafael J. Wysocki --- drivers/acpi/osl.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) Index: linux-pm/drivers/acpi/osl.c =================================================================== --- linux-pm.orig/drivers/acpi/osl.c +++ linux-pm/drivers/acpi/osl.c @@ -1515,20 +1515,18 @@ void acpi_os_delete_lock(acpi_spinlock h acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock lockp) __acquires(lockp) { - acpi_cpu_flags flags; - - spin_lock_irqsave(lockp, flags); - return flags; + spin_lock(lockp); + return 0; } /* * Release a spinlock. See above. */ -void acpi_os_release_lock(acpi_spinlock lockp, acpi_cpu_flags flags) +void acpi_os_release_lock(acpi_spinlock lockp, acpi_cpu_flags not_used) __releases(lockp) { - spin_unlock_irqrestore(lockp, flags); + spin_unlock(lockp); } #ifndef ACPI_USE_LOCAL_CACHE