Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp598470rdb; Tue, 23 Jan 2024 08:50:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IHZkK+kLbUtHf7ghTo12Eac4LEHsZrbylNt7na0tveoQGuSvptMi9qIIP1GWhLl+FzgJ//0 X-Received: by 2002:a05:620a:4049:b0:783:6c6c:a154 with SMTP id i9-20020a05620a404900b007836c6ca154mr8637920qko.85.1706028642878; Tue, 23 Jan 2024 08:50:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706028642; cv=pass; d=google.com; s=arc-20160816; b=K592BE1VkeFgNZXTpwpJHLcDtY+HmL6eL2VCBsr9hqMYctBZTVu039hTKJ6SWsTy0U sMgVBIcYBnY6CiDv8y8BUIIin18G9P6zWhcCX0f9+U2N4dQCYOWEfA4TeujB8Q13Vvnz DV92j0JZyBiAmIyWmFhenoGo3rOa8qeLF/QFhdr+PLk09kj6z8FJ1Txijm9GdQt4oZel PxD6fXjX6EfkkoF93kH2J0pfyvzgphDbyQ8uLOjZGveUaMRDn51nS7hB+W7bbJG8Xifm bOA85yA1259tw3HS3DnCvY4aUGS+zhHac/PdIwlVm2ZI9Fxh9uu0zRKcOSxmI/Jr23wQ K1qA== ARC-Message-Signature: i=2; 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:dkim-signature; bh=oKxZn4Uy08vRh9Z4twvXFEfHH30BeCJ4RW0dN5sv5z8=; fh=ZNXiR1CgqXSElSE++n277vbYyA5ziWtgsjdBgmIqkL4=; b=ljJV8htcNDedbgD6pxtOkyYKIDbxUtoRVNt4FE38pT5P73qU8M+ECJgHWnqcL5ji5U hsOv3XfursEu5MdAY1V54P+TIXeddq3JCzbUG+QYqc6rhabWt8PrDhLyhrCxfC9c/677 pRiqiW6h/TIPkCmH1whCMlEFNMGEySZjUX5VGA8NBfkoeMByX+n5YFCLaVrmJV+AXEHl 7ZwQ+JL+GPD7Gv7SU7fzhIBv0GmF0YPGQQw+WOHM9jv4DoVGLA66uHu5sATIzDw/4X9m Z6s0kD/AcSaXAAvSKM2E0FxKcO4EbYJk3YXvOh9HCU+C+vqkfJN8laRLYDI78ZxXliXH pjdQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=XQ+TBGu7; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-35696-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35696-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id a21-20020a05620a103500b0078166224f27si8067507qkk.738.2024.01.23.08.50.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 08:50:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-35696-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=XQ+TBGu7; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-35696-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35696-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 5D2D01C20BC3 for ; Tue, 23 Jan 2024 16:50:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7DE2C8004D; Tue, 23 Jan 2024 16:45:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="XQ+TBGu7" Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (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 21FA78003C; Tue, 23 Jan 2024 16:45:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.249 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706028335; cv=none; b=vC3jzeOv6HOHQtWiV4I7WZWkcnquoytVhquJK547TEDJS9Y9IpfHYUrie3QTeYmD2lYeDotu/SGopO8o96ddZyqxOZ0j+ub+XPdQvUSPTiJ6U59YEH35DGmzsuOmnU2ZM06hlt8x9YjWc44bk8PCu10R01mv/pcpSmHBPLmF6t8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706028335; c=relaxed/simple; bh=ZglZxMe91KASK/v+IW0btwDbCnQ9sigjhDoQmmAsN6M=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Mq2x/jOUtAza2Khw/3zIQeV8RoFr5gBoTW4830ZMRueaqa4tb3nKNUcaxH1Hmf2M6ZfipNrkpZ1r+0jGkQN70lFPX6R9uUSSs8qmfYU6HHxR2D9S0hMG8zURKEt6V1a5Fw1HQ8SxhuFbTnfSO+kzA/xEtFmNRCbBEDjwr/f8ODc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=XQ+TBGu7; arc=none smtp.client-ip=198.47.23.249 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 40NGilni101831; Tue, 23 Jan 2024 10:44:47 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1706028287; bh=oKxZn4Uy08vRh9Z4twvXFEfHH30BeCJ4RW0dN5sv5z8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=XQ+TBGu7qpd8prpUtoiX4QquV6MDTGYJkGA99SBthNePlOtrETBsqqBYkjwRr5Z+7 GCrpHTHIp03tWeQXOuVYFiCBETiGlwmkIaID9YgM4lzjqgYyUR8g0trLctCvyhNz1j Et7+isys2JxBKFURnMNl5KMzSq6jduv09RPdz3mo= Received: from DFLE109.ent.ti.com (dfle109.ent.ti.com [10.64.6.30]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 40NGilFK041335 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 23 Jan 2024 10:44:47 -0600 Received: from DFLE101.ent.ti.com (10.64.6.22) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 23 Jan 2024 10:44:47 -0600 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Tue, 23 Jan 2024 10:44:47 -0600 Received: from lelvsmtp5.itg.ti.com ([10.249.42.149]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 40NGiiKI022038; Tue, 23 Jan 2024 10:44:46 -0600 From: Andrew Davis To: Mark Rutland , Lorenzo Pieralisi , Sebastian Reichel , Karol Gugala , Mateusz Holenko , Gabriel Somlo , Joel Stanley , Mark Brown , Orson Zhai , Baolin Wang , Chunyan Zhang , Lee Jones , Dmitry Osipenko CC: , , , , Andrew Davis Subject: [PATCH 3/4] firmware: psci: Use register_sys_off_handler(SYS_OFF_MODE_RESTART) Date: Tue, 23 Jan 2024 10:44:42 -0600 Message-ID: <20240123164443.394642-4-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240123164443.394642-1-afd@ti.com> References: <20240123164443.394642-1-afd@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Function register_restart_handler() is deprecated. Using this new API removes our need to keep and manage a struct notifier_block. Signed-off-by: Andrew Davis --- drivers/firmware/psci/psci.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c index d9629ff878619..767a5af5384b4 100644 --- a/drivers/firmware/psci/psci.c +++ b/drivers/firmware/psci/psci.c @@ -305,8 +305,7 @@ static int get_set_conduit_method(const struct device_node *np) return 0; } -static int psci_sys_reset(struct notifier_block *nb, unsigned long action, - void *data) +static int psci_sys_reset(struct sys_off_data *data) { if ((reboot_mode == REBOOT_WARM || reboot_mode == REBOOT_SOFT) && psci_system_reset2_supported) { @@ -323,11 +322,6 @@ static int psci_sys_reset(struct notifier_block *nb, unsigned long action, return NOTIFY_DONE; } -static struct notifier_block psci_sys_reset_nb = { - .notifier_call = psci_sys_reset, - .priority = 129, -}; - static void psci_sys_poweroff(void) { invoke_psci_fn(PSCI_0_2_FN_SYSTEM_OFF, 0, 0, 0); @@ -623,7 +617,7 @@ static void __init psci_0_2_set_functions(void) .migrate_info_type = psci_migrate_info_type, }; - register_restart_handler(&psci_sys_reset_nb); + register_sys_off_handler(SYS_OFF_MODE_RESTART, 129, psci_sys_reset, NULL); pm_power_off = psci_sys_poweroff; } -- 2.39.2