From patchwork Fri Jun 4 14:03:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 454036 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp448410jae; Fri, 4 Jun 2021 07:06:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHfQ5piFklOjQyQfILySHCV8dI5AY2Q61wLnmAsuaazNGZW0Tf8zwXbhiFsRYR8+xGTBSM X-Received: by 2002:adf:efca:: with SMTP id i10mr4142842wrp.139.1622815564204; Fri, 04 Jun 2021 07:06:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622815564; cv=none; d=google.com; s=arc-20160816; b=jIWNBHjedCOiRJKPkXR6huTsf5kahtmQEofY98jEqm/bXfDv3JSqZt+Sp3i1QXOEjj oIo98fYNg6/7OmN0zhWCcZcjAqvuRmupO1d5/Fkr0pt33SWIouJNs9yhK9hqibNdj0r1 DjZkyvnSSg78YoLgbqc2um5soO7HAjtPUnukJYVF/rRcNB5tdXKLVnngbuIz1/xb+D4K vbnnjXvhjzQd0CFD07AzTs7a4v6/Ij9HXENcbgDeQ0t0Uav+UZnKLImf6pL/jz7fIGL1 Yq2cUiTADpyxe1+HY8TiFX3V7PrLLsW1vdbF3RBeU9tnyhpHtUW04FwpcNbRsRXhodta lXwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:sender:precedence :errors-to:list-subscribe:list-help:list-post:list-unsubscribe :list-id; bh=9vD7NkGDkc+IVLjUtVKL1KzFVVpDAskIEMoj4foPPh0=; b=R7z0f7OT3s7T8Hi2SVJazQ9y4eiu/WqsMkSVf34cC08up/EaN13AyTW1ZzFf9L5XVv ZrX384lDsBr3PjcgtqElPVhY8eivDEWVNBclL+I3+vVJE5XF7VULZ4GRU49GIFG0gxMY StI5+AkGIFxdOcqVNF/5nEcEX9tanoU8TH38flmUObYuqf0s+iA0vMuHYFO2nIAH2FeA UGIlloTRnSWjuQRnLMFKWiPl84nmMcQhWCjhOy1QyWHFZdt0J2WsF1Mftf1oYF7h154c 4AsSNEBfVx+mtoY5+g3+kFi0G9d+fwVdkoedGXyGueVFdoFx6p1+KuYvpG8s+50J9K6d 3l7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=akY05cjV; spf=pass (google.com: domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id n2si5988498ejl.693.2021.06.04.07.06.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Jun 2021 07:06:04 -0700 (PDT) Received-SPF: pass (google.com: domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=akY05cjV; spf=pass (google.com: domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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-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 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(-) -- 2.31.1 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); } -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; } +static struct notifier_block xen_restart_nb = { + .notifier_call = xen_restart, + .priority = 192, +}; static void xen_power_off(void) { @@ -404,7 +412,7 @@ static int __init xen_pm_init(void) return -ENODEV; pm_power_off = xen_power_off; - arm_pm_restart = xen_restart; + register_restart_handler(&xen_restart_nb); if (!xen_initial_domain()) { struct timespec64 ts; xen_read_wallclock(&ts); From patchwork Fri Jun 4 14:03:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 454037 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp448489jae; Fri, 4 Jun 2021 07:06:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyR5Iotuu9Kmbus0kyYJ7IS+t964LVioq9UoGymwAv3OsTCyxOFAmsz0rtcmrtkTPYVGy3g X-Received: by 2002:a05:6402:16db:: with SMTP id r27mr4659798edx.375.1622815569159; Fri, 04 Jun 2021 07:06:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622815569; cv=none; d=google.com; s=arc-20160816; b=eGC2TJ8dA9KhzStO1Xl4YBib1Oa7oNGG3rLbT4wetqs/bvFjc3Dv+rWZAFPm8RoR8K dQ+RTde5TwlwwDUz58SfnJWSo0A88KtECD9DQPGXjOLwBORixf93sMBeJZdvub0qQMwc 6wHXY1RBDDdxE36e95YD9q/KzlmFRK+Q73k1E6kerRboPnaTvhIqjToQhNQ/HUBCdBPr e4wJaTUV6DKGxpsAFvevQCc6LgDdJuWsd9te2UFaLO9BMTuRSAN866bE10i7ugjahwZ9 1l+HwxUoaOhFNKkYwWPFW5MCDFgpeRMuBfZgiASjCdJJyAAKacW/AyQx7JeycsNnC+kU hYhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:sender:precedence :errors-to:list-subscribe:list-help:list-post:list-unsubscribe :list-id; bh=TEh1khdRrbKOISh67J2riVpfOYD6OGYoV3WdgW9rcJ0=; b=ENVLgNu25QpDe7XT9Ya9Hnq2S6+8xR6t1i5+a2hFRca1LVDVdvwaiB0HIV2v5bv6+5 hc71yp8C8KO4pb6W61VsCiCoOYUFxlR0sBezJrDfyrnc6r0ZBb10rZo5WvJS4kyVsm1t LdGB3Za8jb++Uj0EoqkTLwQF9tkVfMZ+TirY/hmeGOPSQ9DVria3tVMxkQNQuwJ57mYO g4puOO6G5n+kCgj+zD9swX5NIY5EX8SOGVzPX60NN1o4EJzrI8L8OWuhaj8T12Iaw0Qk +R+vo+eRb19EyfZP0P4k1c7ATR7ilsAkqchAcERBf2cq9KqfmCYJJrgCzUeS9uYtewNn F1fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nbeaNWdB; spf=pass (google.com: domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id n6si4981977edo.119.2021.06.04.07.06.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Jun 2021 07:06:09 -0700 (PDT) Received-SPF: pass (google.com: domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nbeaNWdB; spf=pass (google.com: domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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-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 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(-) -- 2.31.1 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 *np) return 0; } -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 == REBOOT_WARM || reboot_mode == REBOOT_SOFT) && psci_system_reset2_supported) { @@ -309,8 +310,15 @@ static void psci_sys_reset(enum reboot_mode reboot_mode, const char *cmd) } else { invoke_psci_fn(PSCI_0_2_FN_SYSTEM_RESET, 0, 0, 0); } + + 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); @@ -472,7 +480,7 @@ static void __init psci_0_2_set_functions(void) .migrate_info_type = psci_migrate_info_type, }; - arm_pm_restart = psci_sys_reset; + register_restart_handler(&psci_sys_reset_nb); pm_power_off = psci_sys_poweroff; } From patchwork Fri Jun 4 14:03:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 454033 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp448206jae; Fri, 4 Jun 2021 07:05:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+rckB7Uo7qHembYXt2W5Cop9/8WE9Q+AljeuR7iknV1UifaRwbUYsqGxB6wbNGdr3hHe4 X-Received: by 2002:a5d:6d8b:: with SMTP id l11mr33726wrs.21.1622815550413; Fri, 04 Jun 2021 07:05:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622815550; cv=none; d=google.com; s=arc-20160816; b=yCqdhJysqLv/uvNAyI2BepbQ1wD9cCZb6UxfNy/4NrGXNFQmA9ntPZGgM5E6aNfWiu 3sOcIkXnMQcQjckqhMnI6hoGLcRAZgdzDZnylmymZHPYPFr2ZPJ5uv4MOXxqQFfj6yVd ftidGWU/qFtLFXabCQ3VXfdj/b2p+v/RWZY6nYJEYnHNy2ggmPixji5YHkpvdYm0SddP UZTjmuJQ8UkfYUYIptGnwmxCqo9aedETRtv/+0rkndmO9b22AyOiTZ2cD1ROGvQG3B9P sK5FpJ6rJ0Wju5VFLyI2spcO8PTf7ALPS7ojfEHqK4kYZVCR40Q9Meeu7bXDPOHO7y8M QMzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:sender:precedence :errors-to:list-subscribe:list-help:list-post:list-unsubscribe :list-id; bh=FXe7mUhRyV1V08UlHOUDRQa+cyJRl+BaTvqQGIK3jgo=; b=t1ud1+e0KHKACp8ErZC45uFgxJIonaE6mRGDZ4m/dEKEVTbpKet02DG1I+1V5nX0lN CPdGrcqfE0CMr7V4hBWVf9xWMJCZWZ7wpiyOOycUBFMXRXITYbvc6KlL24guwfBjfMel vP3a5rfz3pNRfQxdqF3EtnDU7JkvjpXU7d054QGsgSUcxQirzNdbQWJyWpGFlPfW4/6J 8bJ4BcAk2VSCSgjzYIFzcOHEKTLi6rPO5acZYRnspfnVFG8styxsGsXp+v98F4bD9DKa VYp5tIR4TNIdg0Ua69FkhZUZB2EPn2vx8irKN4Y1cQYg0rgk12Q61wpc2lORhZHXbhfB Fa5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IaVfsBBg; spf=pass (google.com: domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id q13si4644065ejd.76.2021.06.04.07.05.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Jun 2021 07:05:50 -0700 (PDT) Received-SPF: pass (google.com: domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IaVfsBBg; spf=pass (google.com: domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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-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 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(-) -- 2.31.1 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 } +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 = { + .notifier_call = arm_restart, + .priority = 128, +}; + void __init setup_arch(char **cmdline_p) { const struct machine_desc *mdesc = NULL; @@ -1149,8 +1163,10 @@ void __init setup_arch(char **cmdline_p) kasan_init(); request_standard_resources(mdesc); - if (mdesc->restart) - arm_pm_restart = mdesc->restart; + if (mdesc->restart) { + __arm_pm_restart = mdesc->restart; + register_restart_handler(&arm_restart_nb); + } unflatten_device_tree(); From patchwork Fri Jun 4 14:03:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 454038 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp448739jae; Fri, 4 Jun 2021 07:06:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOdHFMUukjl52PPn6RKGKtX3CgD/33sT5+Hv9dYdDfUbNsnVveiqHatPT8Jh5A7PezY5DO X-Received: by 2002:a05:6402:17d9:: with SMTP id s25mr4761610edy.337.1622815584483; Fri, 04 Jun 2021 07:06:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622815584; cv=none; d=google.com; s=arc-20160816; b=NfrVxmGD97FHHKjrbm5dDIKQd/Xs19wgGdlXmzjLRXL0xB5JHuifFTWzhUXIXxy/0E 4ByGoYbTGM5jfyzHduS996NO3JUMjlqRItn0P9cKQP73aTSctMk2ytw4GgIXBGYW/E9N G5hNFKr2YX+VwXWusJglVbGe1OdnpVf23osibEme6sTJXI0LN5xuznrBwqzifigqg1wy Ji/Ym+3AnDgjpGw52pgG0DIQwSSPC8X3FJJ8fUy/MF6st6V1MiEeQHynN9OITT45Lyh+ LJZmDYpCrHbQxM4sEGslTj1cKDcDZE96jWoiI9bZy/3CbDnC+SO4eOeuUVYITTY7BmKr XRKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:sender:precedence :errors-to:list-subscribe:list-help:list-post:list-unsubscribe :list-id; bh=QaJICWaLVjdKyiczP8R7DVAA/JKj3/g1GzNXgU/ERjo=; b=IeWLp7bd6lt0RkI03ZhixvgcilfzybopsDSP/R/ZoaU02HnX+OCpsLT8Jim1gqZuDi PYSULejHie+yuMP1f1UK30h6mk0IIcrdfj92LsWTu5inhMUjPW9uUz2gSFbxCbEXfkI3 keB4B6bkJpjlGGRlhS8HSizd5Fj9E45DTofLzkkr27zP5z8LZDy839WHRd5bgT+sZN4d Le2l96TdPjpUcz/Id3arzh8OkPpBQkvSdMLE3Hs0BTSvxnLSxvhrdQ/PLZ5Hg7vyJlUD /FcrvpuCuX+ZegTrznho+wG2SU2gmsIf1g30IFLSw+yJHl3OGS5Yi2BebKMteWz10+tS FtmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OtKIdFz9; spf=pass (google.com: domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id f10si4754762ejt.614.2021.06.04.07.06.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Jun 2021 07:06:24 -0700 (PDT) Received-SPF: pass (google.com: domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OtKIdFz9; spf=pass (google.com: domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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-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 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(-) -- 2.31.1 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 long, unsigned int, struct mm_struct; extern void __show_regs(struct pt_regs *); -extern void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd); - #endif /* __ASSEMBLY__ */ #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); -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); /* 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); /* * Whoops - the architecture was unable to reboot. From patchwork Fri Jun 4 14:03:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 454035 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp448385jae; Fri, 4 Jun 2021 07:06:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIWwYdbPHbZQTLRjtBNcHBMyuFZfB480rgBULpupp3MtqCzUIGB1OC+ghAq9vwWWgQipGM X-Received: by 2002:a17:906:2b85:: with SMTP id m5mr4415218ejg.141.1622815563053; Fri, 04 Jun 2021 07:06:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622815563; cv=none; d=google.com; s=arc-20160816; b=uJrzjOqSMF/kJWetF4uBhBBE9pKkO3N3oPQkCBaI6/HrmkL0ibjX0gXFR7OOS1MofS 7dpu46L2XeZYWYEFdIvTo8vpE4ezMlGPsabDFdWYIRb5e9Brobz+ERMt7UZLaLCQp2u0 NpSSC/HSmesCubn3tB4mencwNnqrhcXwHaSaaS1oRRCIo0NANwbNOBXOtCPEvMSqfgu0 BbCcJ+UTXlXeaiRs9V/dFbA5JAAroqAZn7dcioXpJXovD4bbQ4vJYvaKI0AgSiUgPYkU qeJ9vy+8CI+orev2uJzBWU4BUufKJrDNTreoqvUCxf6s1XgZRlnV8/36MivIvYXlY660 QUgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:sender:precedence :errors-to:list-subscribe:list-help:list-post:list-unsubscribe :list-id; bh=D6QyFvCrmM9/eKIfxG4Pm00YDFikRvR7iKb/WRsmrRM=; b=BfuheQXMl4QxKnLiQch88wsGbA/7sOvfjkMnT991IJFZoXeHJtuSEJdW3smywDN+AN z3s4q2ruZ5SgaV7edP3WgmpY8KhPUm2otrm5gQvN81vVWZKqOpLD6Pspyn/8TZo4qxaX +e5jfr0yJs8eBSFVR0ZU3F+nwE4PiJjUsA6kKdag69Vn3YPUueFhkXvhz/u1jmdMS/4f e+NQVuL1wMpu9hSjBEe+UCylpavMUSHMEF29nF/hqyCv0luuvBAQWYNTemrg+xH3syTl KsExDV7/OSlRpNATu0BS40oyrf9E3nCU+RrdNRD1Ry9+4ItfPK2knOcapqmizCgXfRjt 0erw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rnXl1mp7; spf=pass (google.com: domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id t12si5689712edc.333.2021.06.04.07.06.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Jun 2021 07:06:03 -0700 (PDT) Received-SPF: pass (google.com: domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rnXl1mp7; spf=pass (google.com: domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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-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 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(-) -- 2.31.1 diff --git a/arch/arm/include/asm/system_misc.h b/arch/arm/include/asm/system_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); void soft_restart(unsigned long); -extern void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd); extern void (*arm_pm_idle)(void); #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); @@ -138,10 +137,7 @@ void machine_restart(char *cmd) local_irq_disable(); smp_send_stop(); - if (arm_pm_restart) - arm_pm_restart(reboot_mode, cmd); - else - do_kernel_restart(cmd); + do_kernel_restart(cmd); /* Give a grace period for failure to restart of 1s */ mdelay(1000);