From nobody Tue May 7 03:53:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1622815462; cv=none; d=zohomail.com; s=zohoarc; b=C3Z7i+2U8U7jew5YBtGJfhvSa+i2Hq0Toeq9+UF4pt01tdc8S4p58zsXcYjl/1ywGVcj6fsPsD7Ujn9DSIh9oUuKy6ybuYt7sroVhFCkQddFs3n5c/xcUAfXNE+hWnY1l0ISr6xA0nBeHsarvk3BleoccDS6xNd7ujb6ee6GomQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622815462; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=9vD7NkGDkc+IVLjUtVKL1KzFVVpDAskIEMoj4foPPh0=; b=R9rHndyxhL5XtMGZJ3r1BgAvcBWfJLSOF4TqpfXksiK6DLCRK0+1H4iFOczmLH/h9r64nVcWk3gGZCDSJT6vfm8AJiQctlUpS3pvHjmn3UXCtYoWM0C0TxEXb5fZHiBWwSHmr0XGVHBk4DwRBBWtFeblYwvCovmJDeRVHHdXYI8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1622815462898674.6552875881588; Fri, 4 Jun 2021 07:04:22 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.136861.253632 (Exim 4.92) (envelope-from ) id 1lpAQi-0005IG-T7; Fri, 04 Jun 2021 14:04:08 +0000 Received: by outflank-mailman (output) from mailman id 136861.253632; Fri, 04 Jun 2021 14:04:08 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lpAQi-0005I9-Ob; Fri, 04 Jun 2021 14:04:08 +0000 Received: by outflank-mailman (input) for mailman id 136861; Fri, 04 Jun 2021 14:04:08 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lpAQi-0004yR-09 for xen-devel@lists.xenproject.org; Fri, 04 Jun 2021 14:04:08 +0000 Received: from mail-wr1-x434.google.com (unknown [2a00:1450:4864:20::434]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 510db9ae-62bd-4175-9c5b-26835265215a; Fri, 04 Jun 2021 14:04:03 +0000 (UTC) Received: by mail-wr1-x434.google.com with SMTP id f2so9408605wri.11 for ; Fri, 04 Jun 2021 07:04:03 -0700 (PDT) Received: from dell.default ([91.110.221.214]) by smtp.gmail.com with ESMTPSA id m11sm5422559wmq.33.2021.06.04.07.04.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Jun 2021 07:04:01 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 510db9ae-62bd-4175-9c5b-26835265215a DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9vD7NkGDkc+IVLjUtVKL1KzFVVpDAskIEMoj4foPPh0=; b=akY05cjVG2u0Mf/Ur1k9G+ijD85MCVBcTS5cQxoMRHReBqD1UUr5+rTusPSJUjBFcQ xJ5eN+t/caaW7VWfSKfSEp9tAOxtYnT7wP4gt0PBctHI71FMDBhIJElbtcRHq0RZXIqj NxjnAOMorjqeNIdAFe72j34/dxhsIEZWYFc8liIEyolGby0H9wUp9V8daZmdeVX1FZ0B 5SeriQykexYzYAk2IbdrrdTOG9zKvdQJXFBJgXPKvzkZZrm/S0Ymv4tV6g+9IRQBLFvQ UPN+cQH55smlaQ153ZgRX0rZF83RKMv1yYNN5C6hN2iKku845JUpznvi7dzmQSIaEGCJ OzBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9vD7NkGDkc+IVLjUtVKL1KzFVVpDAskIEMoj4foPPh0=; b=EOQd5XlNE3Shcz5WfApF2JDw01RGvITNRDp1FAgBLCXhxkWZNc9qv79T8WUXw+x9s+ ngSUl51hHweDOS7P4YGZawLU6Yw5T2ytHjI8BllrlXfI1wIjsqyL2CReXcdzKVfBy+A8 b9eYo1ksgZIwf/XkFfb7lMrJjBIKVYcKrjqud5rUnjtAZC1ksrPWRJE/7ZGD5phbGEA/ b+WicZ9XM1m5oi9z9IG1/GC5r0WLB3VRCL3uWoOEiHBfelIfxvAAhztF5BH22LKKK5zQ LUvq94BOAWfbLMW3Wu5j1nNc2W4Dd47Um9XXm38qqpmDa006LoZW+vlxcx8hlMypuI62 ELNQ== X-Gm-Message-State: AOAM532Y3UNqqEhtsKzHjfBuVEy1jjR47Po02fk5T5PmJJg/Aun/gcnw xBAHwDzxmUIWlOvyUqiCx6dKlA== X-Google-Smtp-Source: ABdhPJyoc18GiAJJdLah52gbebIhTBv5cg91BFwDaX7X49x4F2VQ9HNUtagdypEOLgxeAr0vit0AsA== X-Received: by 2002:a05:6000:6:: with SMTP id h6mr4149822wrx.24.1622815442389; Fri, 04 Jun 2021 07:04:02 -0700 (PDT) From: Lee Jones To: lee.jones@linaro.org, linux@armlinux.org.uk, catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com, lorenzo.pieralisi@arm.com, sstabellini@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, wsa+renesas@sang-engineering.com, linux@roeck-us.net, treding@nvidia.com, arnd@arndb.de, xen-devel@lists.xenproject.org, patches@armlinux.org.uk, Stefano Stabellini Subject: [PATCH 1/5] ARM: xen: Register with kernel restart handler Date: Fri, 4 Jun 2021 15:03:53 +0100 Message-Id: <20210604140357.2602028-2-lee.jones@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210604140357.2602028-1-lee.jones@linaro.org> References: <20210604140357.2602028-1-lee.jones@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" From: Guenter Roeck Register with kernel restart handler instead of setting arm_pm_restart directly. Select a high priority of 192 to ensure that default restart handlers are replaced if Xen is running. Acked-by: Arnd Bergmann Reviewed-by: Wolfram Sang Reviewed-by: Stefano Stabellini Signed-off-by: Guenter Roeck Signed-off-by: Thierry Reding Signed-off-by: Lee Jones --- arch/arm/xen/enlighten.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c index 8ad576ecd0f1d..7f1c106b746f8 100644 --- a/arch/arm/xen/enlighten.c +++ b/arch/arm/xen/enlighten.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -181,11 +182,18 @@ void xen_reboot(int reason) BUG_ON(rc); } =20 -static void xen_restart(enum reboot_mode reboot_mode, const char *cmd) +static int xen_restart(struct notifier_block *nb, unsigned long action, + void *data) { xen_reboot(SHUTDOWN_reboot); + + return NOTIFY_DONE; } =20 +static struct notifier_block xen_restart_nb =3D { + .notifier_call =3D xen_restart, + .priority =3D 192, +}; =20 static void xen_power_off(void) { @@ -404,7 +412,7 @@ static int __init xen_pm_init(void) return -ENODEV; =20 pm_power_off =3D xen_power_off; - arm_pm_restart =3D xen_restart; + register_restart_handler(&xen_restart_nb); if (!xen_initial_domain()) { struct timespec64 ts; xen_read_wallclock(&ts); --=20 2.31.1 From nobody Tue May 7 03:53:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1622815473; cv=none; d=zohomail.com; s=zohoarc; b=S2rcNXBeiPGMokv0Xn/7C6VwI+OJFvvQfPV/DpzSBtEEh6MQ+GcY7LOXnrxwubJAtHPYpjA+jDTGOI7UkTPMtfb042Yn9q4cLfVnwPJUIhXvrSd0oBFggWnf0O9DHVdYhK/ra7FKMSKxApJEF4VYdrzjkYELSOjXlZuCR0KApKE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622815473; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=TEh1khdRrbKOISh67J2riVpfOYD6OGYoV3WdgW9rcJ0=; b=W1cwxtHC/pB8ONaZF4mWYEHUY684/wx7lP/mV651xlIhEYqKok3HTjaWPoeJxMx9Vo0BptaXH5dzw/SE6mxmV05PnjMvak4DuoG0QaPozmK3nIFb3DkNF/MLoT8H3jFDGJyTWQAnTfq1VDEMHW6HNvRz5wnlxxeGr6aUuKkM898= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 162281547384223.050774662885715; Fri, 4 Jun 2021 07:04:33 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.136862.253643 (Exim 4.92) (envelope-from ) id 1lpAQo-0005cy-52; Fri, 04 Jun 2021 14:04:14 +0000 Received: by outflank-mailman (output) from mailman id 136862.253643; Fri, 04 Jun 2021 14:04:14 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lpAQo-0005cp-1D; Fri, 04 Jun 2021 14:04:14 +0000 Received: by outflank-mailman (input) for mailman id 136862; Fri, 04 Jun 2021 14:04:13 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lpAQn-0004yR-0S for xen-devel@lists.xenproject.org; Fri, 04 Jun 2021 14:04:13 +0000 Received: from mail-wr1-x42c.google.com (unknown [2a00:1450:4864:20::42c]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 508581bd-cdd7-44cf-a786-69867cd0155c; Fri, 04 Jun 2021 14:04:04 +0000 (UTC) Received: by mail-wr1-x42c.google.com with SMTP id a11so7563099wrt.13 for ; Fri, 04 Jun 2021 07:04:04 -0700 (PDT) Received: from dell.default ([91.110.221.214]) by smtp.gmail.com with ESMTPSA id m11sm5422559wmq.33.2021.06.04.07.04.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Jun 2021 07:04:02 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 508581bd-cdd7-44cf-a786-69867cd0155c DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TEh1khdRrbKOISh67J2riVpfOYD6OGYoV3WdgW9rcJ0=; b=nbeaNWdBnTcP7bz1VBo8ORkE7GXcmZ9WULwc9d53BO3FJsVDxfvMLco7Jdi8xDopSW rFy3A0cnyioI9Du7UwC11so/a/emXg9SmX89XwsXCX5PaimX++OUSF1pmOmzDjPSJ563 7KFOmY8D3Adm6+/EaZXeJifRRsQf4TM1fcsM4mdfUuAE8wpGiEtPHYeK25qBDNx3FX1l FVS9pptxb5ACR0S1LvelYbp3SQvbYCD1/z9hRSFTg44QPcwlGsK3ziy22bSbbPIeLBwq 2RB1U4q1ThxkuhSrx8E1G/ve/dmSXoAlyAyj1BJwgzWp2AZfBYGVio/AYt62J9+48+g7 WH9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TEh1khdRrbKOISh67J2riVpfOYD6OGYoV3WdgW9rcJ0=; b=A8b5+y4h6zECFuB3MhGKNtGBw7Fps6K2Eb1/swJS2eO+lOD6jhVv5nPh663Dpy0h1r 5HPohO4mDXP7aCrSYb3HpUBwBkEQTTosyCb08r36etlTJKIQgYss59HqHLiRGrFJOxxH 39WnjAazWsoWzOtB3ve7G7gcCMwWAgcyfq2e0Z5EpfraIy5TmPZ2bf6YqInTVH49PnVa EFj3RLrr6mufmtcPTi+8OPT8jGskX2C/fE7jNJjD6IPer+6z6Hi4kV5o4pHLoP2v3rHT 2RxcAm8le0BcsOOI3SQDQDq1fG6xcoEpl3yTxRN9LSso77BbweKnh6MZ/AUOyUwhL10B XEXw== X-Gm-Message-State: AOAM532/oMuwOZBe8Rlf3wzWJxbQVKve2+uA6Ns1n0qitcP3JMMzgWrX WIXT+HzgyoMkQMb3H1g9KzdssA== X-Google-Smtp-Source: ABdhPJw1kAi2sfOb54fRB7u21L2rZpgLmTnYQGXWunLdqkzDvlsLaxCRGrc38uw/MzOLdLP3jwPQtw== X-Received: by 2002:a05:6000:18ac:: with SMTP id b12mr4005226wri.44.1622815443376; Fri, 04 Jun 2021 07:04:03 -0700 (PDT) From: Lee Jones To: lee.jones@linaro.org, linux@armlinux.org.uk, catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com, lorenzo.pieralisi@arm.com, sstabellini@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, wsa+renesas@sang-engineering.com, linux@roeck-us.net, treding@nvidia.com, arnd@arndb.de, xen-devel@lists.xenproject.org, patches@armlinux.org.uk Subject: [PATCH 2/5] drivers: firmware: psci: Register with kernel restart handler Date: Fri, 4 Jun 2021 15:03:54 +0100 Message-Id: <20210604140357.2602028-3-lee.jones@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210604140357.2602028-1-lee.jones@linaro.org> References: <20210604140357.2602028-1-lee.jones@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" From: Guenter Roeck Register with kernel restart handler instead of setting arm_pm_restart directly. This enables support for replacing the PSCI restart handler with a different handler if necessary for a specific board. Select a priority of 129 to indicate a higher than default priority, but keep it as low as possible since PSCI reset is known to fail on some boards. Acked-by: Arnd Bergmann Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Signed-off-by: Guenter Roeck Acked-by: Lorenzo Pieralisi Signed-off-by: Thierry Reding Signed-off-by: Lee Jones --- drivers/firmware/psci/psci.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c index 3c1c5daf6df2e..18a47c9d5b02b 100644 --- a/drivers/firmware/psci/psci.c +++ b/drivers/firmware/psci/psci.c @@ -296,7 +296,8 @@ static int get_set_conduit_method(struct device_node *n= p) return 0; } =20 -static void psci_sys_reset(enum reboot_mode reboot_mode, const char *cmd) +static int psci_sys_reset(struct notifier_block *nb, unsigned long action, + void *data) { if ((reboot_mode =3D=3D REBOOT_WARM || reboot_mode =3D=3D REBOOT_SOFT) && psci_system_reset2_supported) { @@ -309,8 +310,15 @@ static void psci_sys_reset(enum reboot_mode reboot_mod= e, const char *cmd) } else { invoke_psci_fn(PSCI_0_2_FN_SYSTEM_RESET, 0, 0, 0); } + + return NOTIFY_DONE; } =20 +static struct notifier_block psci_sys_reset_nb =3D { + .notifier_call =3D psci_sys_reset, + .priority =3D 129, +}; + static void psci_sys_poweroff(void) { invoke_psci_fn(PSCI_0_2_FN_SYSTEM_OFF, 0, 0, 0); @@ -472,7 +480,7 @@ static void __init psci_0_2_set_functions(void) .migrate_info_type =3D psci_migrate_info_type, }; =20 - arm_pm_restart =3D psci_sys_reset; + register_restart_handler(&psci_sys_reset_nb); =20 pm_power_off =3D psci_sys_poweroff; } --=20 2.31.1 From nobody Tue May 7 03:53:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1622815473; cv=none; d=zohomail.com; s=zohoarc; b=GYbV8eZt8iGeXEwmyYQ9IarO3q7BYgukliJolu5CaxPZbg3dNkVy7Yo1KJl1PDp67WdBN2rjtcAZMOE/Hw3CVcnayRNnYbbmkWAr3r1EFR6tNKHuhXXa5EZy691861waRZOEyGVzg0qqhrp5wOkkeV3bozz32RSztp44of0l6Zw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622815473; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=FXe7mUhRyV1V08UlHOUDRQa+cyJRl+BaTvqQGIK3jgo=; b=PgxPueSSYH/m2N4XqEmPx1Z6ZBHFdILh4DPG088wyiC95TKt7GwzkzGgzwsNJPFFfmxenCqPCltE4N6iXPHQtSGGvsdR+H/94kVJRoungYLGVyJYIRdBrdQjvqVfWYn2dgOTqAYsA+wYxI+Y2ZB7unPU5fOXvmOHuNJwk9eMQ5A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1622815473715391.0462107186521; Fri, 4 Jun 2021 07:04:33 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.136863.253654 (Exim 4.92) (envelope-from ) id 1lpAQt-00060w-Ju; Fri, 04 Jun 2021 14:04:19 +0000 Received: by outflank-mailman (output) from mailman id 136863.253654; Fri, 04 Jun 2021 14:04:19 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lpAQt-00060A-FC; Fri, 04 Jun 2021 14:04:19 +0000 Received: by outflank-mailman (input) for mailman id 136863; Fri, 04 Jun 2021 14:04:18 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lpAQs-0004yR-0e for xen-devel@lists.xenproject.org; Fri, 04 Jun 2021 14:04:18 +0000 Received: from mail-wr1-x430.google.com (unknown [2a00:1450:4864:20::430]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 8f622367-0396-4b05-8c3d-5a28572d58a6; Fri, 04 Jun 2021 14:04:05 +0000 (UTC) Received: by mail-wr1-x430.google.com with SMTP id z8so9414967wrp.12 for ; Fri, 04 Jun 2021 07:04:05 -0700 (PDT) Received: from dell.default ([91.110.221.214]) by smtp.gmail.com with ESMTPSA id m11sm5422559wmq.33.2021.06.04.07.04.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Jun 2021 07:04:03 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 8f622367-0396-4b05-8c3d-5a28572d58a6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FXe7mUhRyV1V08UlHOUDRQa+cyJRl+BaTvqQGIK3jgo=; b=IaVfsBBg8NR4RGlKN4FA+nCoNqfGwLzQsRsbwt5aa1iwj3NRfw/OtO7jrJTDUGqpMN 3nVAPuI71sUVJi45TyzxzM5TIPNalhlh3sfTDK715KHFO3Muc2MgflEbEV3Nafl6PD7R K+qgau2e3Q9PNbALT3x8rkGgs5+NTyXFUruUWqKYs8PKPFaUyYNz/HKev7bERNhBVieg WcZSeH3QkQgKxYNE6LmqUGyhqLYU6HKNSC5G/xK4cRvpuwTtkLy3tg7sD1fN+9iPma7r Ej4+LoVtLLElLl53YMXrWShGIRI39H4O94ZsmBzuWC7o70KQiESC9UArUgHuWBqvv5Pt e7lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FXe7mUhRyV1V08UlHOUDRQa+cyJRl+BaTvqQGIK3jgo=; b=bSe1JeLmvoOSR1os0RBjpqVA0SQnrvOBNS+AQH7oMSfM50GFRiWLcHdx8agOja+gGD O9bH9nDdpEUzGrhAwjTWOYGrLiEEA3cWI0+lW5+hIyikOv8I0bksggREXng3R8IAX9Vj PEW63hGp7GuAL43nDUSTNKUrMgq/CQ/mdtn7V13NInmVtx8lynWY9vI2dAPMnnmsE/4b aY/riymMpP/IgxaVL8z06zb80/WcxGqBAZ37Rw028EeXpcfTMzaFih7LvB1etvw0Fxr2 51pIeF9Q9GFRvEHCGz+IiU1NgXmPlRJP+3uFRIbM8eeOEKMcn7+LZ8CT637kedJNK+Hz PU8A== X-Gm-Message-State: AOAM532nD/wFvjF84CwagK5sKht1XMXjtWFFzirhiERVeMako+eo0D5C MWYSCodOvs0RgZsfz+MymnAm2g== X-Google-Smtp-Source: ABdhPJxEWeGElTopDkHbCuLC8qXXv/5amcTjzy0KQBVFAIdSm17ZnCj3j7C4vGyObQxH79cOOQtMIA== X-Received: by 2002:a5d:4610:: with SMTP id t16mr3942011wrq.324.1622815444460; Fri, 04 Jun 2021 07:04:04 -0700 (PDT) From: Lee Jones To: lee.jones@linaro.org, linux@armlinux.org.uk, catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com, lorenzo.pieralisi@arm.com, sstabellini@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, wsa+renesas@sang-engineering.com, linux@roeck-us.net, treding@nvidia.com, arnd@arndb.de, xen-devel@lists.xenproject.org, patches@armlinux.org.uk Subject: [PATCH 3/5] ARM: Register with kernel restart handler Date: Fri, 4 Jun 2021 15:03:55 +0100 Message-Id: <20210604140357.2602028-4-lee.jones@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210604140357.2602028-1-lee.jones@linaro.org> References: <20210604140357.2602028-1-lee.jones@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" From: Guenter Roeck By making use of the kernel restart handler, board specific restart handlers can be prioritized amongst available mechanisms for a particular board or system. Select the default priority of 128 to indicate that the restart callback in the machine description is the default restart mechanism. Acked-by: Arnd Bergmann Reviewed-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Thierry Reding Signed-off-by: Lee Jones --- arch/arm/kernel/setup.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 1a5edf562e85e..08c5676477d70 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -1081,6 +1081,20 @@ void __init hyp_mode_check(void) #endif } =20 +static void (*__arm_pm_restart)(enum reboot_mode reboot_mode, const char *= cmd); + +static int arm_restart(struct notifier_block *nb, unsigned long action, + void *data) +{ + __arm_pm_restart(action, data); + return NOTIFY_DONE; +} + +static struct notifier_block arm_restart_nb =3D { + .notifier_call =3D arm_restart, + .priority =3D 128, +}; + void __init setup_arch(char **cmdline_p) { const struct machine_desc *mdesc =3D NULL; @@ -1149,8 +1163,10 @@ void __init setup_arch(char **cmdline_p) kasan_init(); request_standard_resources(mdesc); =20 - if (mdesc->restart) - arm_pm_restart =3D mdesc->restart; + if (mdesc->restart) { + __arm_pm_restart =3D mdesc->restart; + register_restart_handler(&arm_restart_nb); + } =20 unflatten_device_tree(); =20 --=20 2.31.1 From nobody Tue May 7 03:53:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1622815476; cv=none; d=zohomail.com; s=zohoarc; b=cILxqDTazRvLx7EiSdQ+611e80R25O56htZTRvuMwXlKan78pbNTDMjxROLgMJPG09pUq1zVF1/a4Vf7UX2LPSEoI4belNK3AFo8QLoAbsv/YLDnT3zNXhnVUN1IQrgBzPAQ5kaEF5W6YpX8B5mm0p6byZT1yELqvQ3gojBpcl4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622815476; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=QaJICWaLVjdKyiczP8R7DVAA/JKj3/g1GzNXgU/ERjo=; b=Fd29ftcmDD+uW3LuWpcpPUkQYsu/PiZDl1A7Cs9ytvZoBg4yZcP0hx6ji+/sViO/hdF+bR+8yUUXmOBo1Qp5hdUNJHWKra7aEJFP+9UQpNpQwqyB2lUEsRQzoCIyS/9hUrXGw82+nNFWV6nZSj+hRWKSpJMrzniNIWWayLUoR0Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1622815476921145.7231954369928; Fri, 4 Jun 2021 07:04:36 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.136864.253665 (Exim 4.92) (envelope-from ) id 1lpAQx-0006Pt-Tk; Fri, 04 Jun 2021 14:04:23 +0000 Received: by outflank-mailman (output) from mailman id 136864.253665; Fri, 04 Jun 2021 14:04:23 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lpAQx-0006Pf-PB; Fri, 04 Jun 2021 14:04:23 +0000 Received: by outflank-mailman (input) for mailman id 136864; Fri, 04 Jun 2021 14:04:23 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lpAQx-0004yR-0q for xen-devel@lists.xenproject.org; Fri, 04 Jun 2021 14:04:23 +0000 Received: from mail-wm1-x329.google.com (unknown [2a00:1450:4864:20::329]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 2187f623-5ad3-49c0-8329-fb79e8419f1a; Fri, 04 Jun 2021 14:04:06 +0000 (UTC) Received: by mail-wm1-x329.google.com with SMTP id l11-20020a05600c4f0bb029017a7cd488f5so5724173wmq.0 for ; Fri, 04 Jun 2021 07:04:06 -0700 (PDT) Received: from dell.default ([91.110.221.214]) by smtp.gmail.com with ESMTPSA id m11sm5422559wmq.33.2021.06.04.07.04.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Jun 2021 07:04:05 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 2187f623-5ad3-49c0-8329-fb79e8419f1a DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QaJICWaLVjdKyiczP8R7DVAA/JKj3/g1GzNXgU/ERjo=; b=OtKIdFz91o6zSGDVTQZvGzg/E3WbsLPBQt+zn0ndJ5AES765uw0NRLSuW7BmM1XIIb KSmT00ThuHMEyNqcf0APky2O0X+Fz0wCuAj+ufEoElBLQgTbz+i02lN3/Zf1im09zpDW V7M1w+GKAjj8vX7fR+3Ffa8zGHIP9mnEFe/wg7tdUMuHD2MA56Co5BpmNTswwnhnzJZ3 9c7ENbHX2CdAaMwDB25ftfd7WDxFryEsXCCExLyCZAO6YcPG/2o+q800T9B4mz1KOZRv aTr3DUL+N94+eGQZxLu/MEdvv+3cWnjJfA40LNQyMNgeg0oJvNtkbZAD86ICk+f88Itg u7eA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QaJICWaLVjdKyiczP8R7DVAA/JKj3/g1GzNXgU/ERjo=; b=HgC7ZIaLn6mpcVm80S8G69AOrROHDIvzdL4XOfucjymHlP9IpGo6lA9LWmiDIejg6b omb6WL2LQSyeTnz5YSYQ6fA4W/kAWdDjpCnRQqEhsBaK0eO4/aipEL8ny+2WagL52M9I f8SHjCORpuqp0qREZjBvZwxkU54wxDiNrl5cNcL9C581X/i4YKV4Z8Q2fsINwky9xYpf jUWYZM67A2yDidOEIeqAgTLf75OwLT/+TieJoNDAW5GrqHte13+W9o+amOcXivtSkzwP t9TbQYhYfckQwEcPWpUwfaK8YQW+aTVjx09Oge+Y+5Nocx9FTcwLIh25wKNlxllc4zx/ ku2g== X-Gm-Message-State: AOAM530dnuECTrYcnnaOXQssNjz5OjXc+YYeUUw36IaMG75WqrUkle9R 8r25w1SEQCAtqRB7iU9QS7uXuQ== X-Google-Smtp-Source: ABdhPJxkeeHzpVP/eH19on7AKsxKyxYqA03gG6EEjmBqwHMSrKqjg6lHl/nEqHDgTjEVI8pTSN1dXw== X-Received: by 2002:a7b:c30f:: with SMTP id k15mr3940993wmj.128.1622815445465; Fri, 04 Jun 2021 07:04:05 -0700 (PDT) From: Lee Jones To: lee.jones@linaro.org, linux@armlinux.org.uk, catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com, lorenzo.pieralisi@arm.com, sstabellini@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, wsa+renesas@sang-engineering.com, linux@roeck-us.net, treding@nvidia.com, arnd@arndb.de, xen-devel@lists.xenproject.org, patches@armlinux.org.uk Subject: [PATCH 4/5] ARM64: Remove arm_pm_restart() Date: Fri, 4 Jun 2021 15:03:56 +0100 Message-Id: <20210604140357.2602028-5-lee.jones@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210604140357.2602028-1-lee.jones@linaro.org> References: <20210604140357.2602028-1-lee.jones@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" From: Guenter Roeck All users of arm_pm_restart() have been converted to use the kernel restart handler. Acked-by: Arnd Bergmann Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Acked-by: Catalin Marinas Signed-off-by: Guenter Roeck Signed-off-by: Thierry Reding Signed-off-by: Lee Jones --- arch/arm64/include/asm/system_misc.h | 2 -- arch/arm64/kernel/process.c | 7 +------ 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/arch/arm64/include/asm/system_misc.h b/arch/arm64/include/asm/= system_misc.h index 673be2d1263c4..305a7157c6a6a 100644 --- a/arch/arm64/include/asm/system_misc.h +++ b/arch/arm64/include/asm/system_misc.h @@ -32,8 +32,6 @@ void hook_debug_fault_code(int nr, int (*fn)(unsigned lon= g, unsigned int, struct mm_struct; extern void __show_regs(struct pt_regs *); =20 -extern void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cm= d); - #endif /* __ASSEMBLY__ */ =20 #endif /* __ASM_SYSTEM_MISC_H */ diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index b4bb67f17a2ca..5591725cebccc 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c @@ -72,8 +72,6 @@ EXPORT_SYMBOL(__stack_chk_guard); void (*pm_power_off)(void); EXPORT_SYMBOL_GPL(pm_power_off); =20 -void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd); - static void noinstr __cpu_do_idle(void) { dsb(sy); @@ -201,10 +199,7 @@ void machine_restart(char *cmd) efi_reboot(reboot_mode, NULL); =20 /* Now call the architecture specific reboot code. */ - if (arm_pm_restart) - arm_pm_restart(reboot_mode, cmd); - else - do_kernel_restart(cmd); + do_kernel_restart(cmd); =20 /* * Whoops - the architecture was unable to reboot. --=20 2.31.1 From nobody Tue May 7 03:53:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1622815483; cv=none; d=zohomail.com; s=zohoarc; b=aDiwSSP4mozcO80SMGvFt8FIYTdSQQQi9iD+ngssCP4WzbkfS03UN/UOZcMX/oXu11jSz1O0O9smed02XTFaDiUEQnDeV6h++rIdE+oFhk+bHxTEJnbhTRWZdafAlmDFE9UxPHvlnqx00DPHYeaP3wFFGvunAHsxbcwEF0DKamU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622815483; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=D6QyFvCrmM9/eKIfxG4Pm00YDFikRvR7iKb/WRsmrRM=; b=Dms3xRidzSatoDt+dGgWzo6FK5syDHh/vm9FfyEFu/nG1G04U9m2nLoAk9xlmSGZrxdfxKTTvEVp262E6LJSNOChiy9/KfZtJFUgZN7mL4Q89ZAEsWVfSfkpQRPY9onztji/uH8Cia0UgdUl4QibkJgr6KZgVtCvdFNfnfrTm9U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1622815483626739.8812084381428; Fri, 4 Jun 2021 07:04:43 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.136866.253675 (Exim 4.92) (envelope-from ) id 1lpAR3-0006zm-CA; Fri, 04 Jun 2021 14:04:29 +0000 Received: by outflank-mailman (output) from mailman id 136866.253675; Fri, 04 Jun 2021 14:04:29 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lpAR3-0006zS-7a; Fri, 04 Jun 2021 14:04:29 +0000 Received: by outflank-mailman (input) for mailman id 136866; Fri, 04 Jun 2021 14:04:28 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lpAR2-0004yR-0z for xen-devel@lists.xenproject.org; Fri, 04 Jun 2021 14:04:28 +0000 Received: from mail-wr1-x433.google.com (unknown [2a00:1450:4864:20::433]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 4a30cf7f-335f-42dc-a0af-7fe29a653ac5; Fri, 04 Jun 2021 14:04:07 +0000 (UTC) Received: by mail-wr1-x433.google.com with SMTP id u7so3998858wrs.10 for ; Fri, 04 Jun 2021 07:04:07 -0700 (PDT) Received: from dell.default ([91.110.221.214]) by smtp.gmail.com with ESMTPSA id m11sm5422559wmq.33.2021.06.04.07.04.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Jun 2021 07:04:06 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 4a30cf7f-335f-42dc-a0af-7fe29a653ac5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=D6QyFvCrmM9/eKIfxG4Pm00YDFikRvR7iKb/WRsmrRM=; b=rnXl1mp749C3drgrMS8qg9OrEpVG5gyjtC/beupAd1e0u7I2C0SA+eLYqiAZo4zOf1 q05qwrZm55jTi+ifKRg8eXWpkJEyVRxtH/IgUYGbEZ70EVHfHrPyla7TPIzoc3bF3HUY 38N+YHqp0zTbzFzoCmx/yOn7e0FImL+E1RzKDH7btVNuv4yY5751UVI1bLnrNl7scCoW LFc1Ih93JSdQok29RWgqRhCojCLYOg62P4bYX/nGU9EOEWtNNXBLPDIFNWoTmUP22sU3 JvGp1+ARt/xYZhTOdzb03Rb1/7Tbwwe1vK1CD+EZtoPQYOnPg1dx3h+YFx/bg1nj1AhS +DAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=D6QyFvCrmM9/eKIfxG4Pm00YDFikRvR7iKb/WRsmrRM=; b=RJfAxYxCOiJ8a+O5eYoO/1acQrZ5xlUo+H4d2GmXTcbyOzjidBpKbCs3ciSyBLNBk7 exV9mFxneljJrqEImXSD4J+LSDVHFRTLTzHL7acbTPIRK7OYnOhiPmh1rdU4JDZsSH5g CoXqnUF0VRllaeFbwljLN+5kDdvEqBUGaHZwneHFEzLI6smx1S0oRrKqvvw7I+pRH5hJ /p6ZKoRHoEPrAPiOdh9OH5Zr9fX5+JXRl0P/pC8g57r9BG3gAuS+KIxWw0vW4BJ9hMHE RAWai+xTCCbPJSUc62Y1lhyNorspIonlUV0b/znHQq1qU2Mk4fa0DqyKJvWm/CbTcE+d F4EA== X-Gm-Message-State: AOAM531bTbnMUGkz3F2tG0BtCvc1f2KRrTqxwxf4tj+HS7U+e+Y+ZzgN 4/ynJlgAGcUxQrqoox5fLPKqDQ== X-Google-Smtp-Source: ABdhPJy6Bn0tgDEaDDg7jaA3vOqPTriXmMlbNfufQjcNecRNKMp6REhDzJ4KHPqHqkOmLTOy8DweYw== X-Received: by 2002:adf:f7c3:: with SMTP id a3mr3659762wrq.253.1622815446460; Fri, 04 Jun 2021 07:04:06 -0700 (PDT) From: Lee Jones To: lee.jones@linaro.org, linux@armlinux.org.uk, catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com, lorenzo.pieralisi@arm.com, sstabellini@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, wsa+renesas@sang-engineering.com, linux@roeck-us.net, treding@nvidia.com, arnd@arndb.de, xen-devel@lists.xenproject.org, patches@armlinux.org.uk Subject: [PATCH 5/5] ARM: Remove arm_pm_restart() Date: Fri, 4 Jun 2021 15:03:57 +0100 Message-Id: <20210604140357.2602028-6-lee.jones@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210604140357.2602028-1-lee.jones@linaro.org> References: <20210604140357.2602028-1-lee.jones@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" From: Guenter Roeck All users of arm_pm_restart() have been converted to use the kernel restart handler. Acked-by: Arnd Bergmann Reviewed-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Thierry Reding Signed-off-by: Lee Jones --- arch/arm/include/asm/system_misc.h | 1 - arch/arm/kernel/reboot.c | 6 +----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/arm/include/asm/system_misc.h b/arch/arm/include/asm/syst= em_misc.h index 66f6a3ae68d27..98b37340376bc 100644 --- a/arch/arm/include/asm/system_misc.h +++ b/arch/arm/include/asm/system_misc.h @@ -13,7 +13,6 @@ extern void cpu_init(void); =20 void soft_restart(unsigned long); -extern void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cm= d); extern void (*arm_pm_idle)(void); =20 #ifdef CONFIG_HARDEN_BRANCH_PREDICTOR diff --git a/arch/arm/kernel/reboot.c b/arch/arm/kernel/reboot.c index 0ce388f154226..3044fcb8d0736 100644 --- a/arch/arm/kernel/reboot.c +++ b/arch/arm/kernel/reboot.c @@ -18,7 +18,6 @@ typedef void (*phys_reset_t)(unsigned long, bool); /* * Function pointers to optional machine specific functions */ -void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd); void (*pm_power_off)(void); EXPORT_SYMBOL(pm_power_off); =20 @@ -138,10 +137,7 @@ void machine_restart(char *cmd) local_irq_disable(); smp_send_stop(); =20 - if (arm_pm_restart) - arm_pm_restart(reboot_mode, cmd); - else - do_kernel_restart(cmd); + do_kernel_restart(cmd); =20 /* Give a grace period for failure to restart of 1s */ mdelay(1000); --=20 2.31.1