From patchwork Fri Mar 25 14:38:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12791643 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 36667C4332F for ; Fri, 25 Mar 2022 14:38:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359346AbiCYOkT (ORCPT ); Fri, 25 Mar 2022 10:40:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359344AbiCYOkR (ORCPT ); Fri, 25 Mar 2022 10:40:17 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A441972F3 for ; Fri, 25 Mar 2022 07:38:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1648219114; bh=laixUKfNbIs4VhFbXyzNyI0y4Hju3cFq5IT3/sxGdgk=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=ZHyab8MqlWyqH1yuz/LkEzYyY2ilcYQ4a3zUQJ3UYhf7e+qIYPeXglhAQMSrBfnst m62ZR1azObufOwy9tWoqP/Vg2r4nAzoTBv8yKOHMXWN6INmYXztOSoxf2bX70/LHPP CWf8DHnu0+YjwxlAXCz6YIpnU+HnCB1njlsdbWCU= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.164.212]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MVN6t-1nfhPh1zUt-00SKtc; Fri, 25 Mar 2022 15:38:34 +0100 From: Helge Deller To: linux-parisc@vger.kernel.org Cc: James Bottomley , John David Anglin Subject: [PATCH 01/12] parisc: Switch from GENERIC_CPU_DEVICES to GENERIC_ARCH_TOPOLOGY Date: Fri, 25 Mar 2022 15:38:22 +0100 Message-Id: <20220325143833.402631-1-deller@gmx.de> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-Provags-ID: V03:K1:Ni75TFiqLQ65YFV0OldjzS9jDANmnXC6Za/yjqS3nuvdb9ZUo2T 9oli9CoCKE9hCzgFxaJBQFDIuCPqr6yJUKjRniHd5OEDGbQjjtujQaGjQKKPSJjbFAfHuV5 rYp8lH3654SSSABjVuJUGgdmwi3B7cP6NJ5jYZbnwAG/sHz8mrwe/khnl//FLA6Zyq345Lc bwfH+xjfLq3mjT/sOoVQg== X-UI-Out-Filterresults: notjunk:1;V03:K0:8ygvNR4shMo=:pl6aR6Fofz9im/4thk+eSP Hb/7qJtzz/6yYY5k0M57W8rD6nKjz3CErWlJG7i+xCXIrvTO59d8w2SbjCSS5s7/kKTKTB8Dg naRhuajTesmqcU7ARTHngqtX3VxH49U0XbNLNViYXUc6oHT1ECqxnkk8x3LYOWPcg6su3HHI8 9CbZoJe1rOXcoafx4IX8vjc7D97XDxpYlzUs8EjTHxThG7zYDHADfE74IJEzTiuyLCm1DONVG oYw8hJ91s+aqTPCGbpwXYYF5YtdQ2Z80pwkzEAOMWPPBEXi4xbf1XP82wq7xLTu7YTJZoIM8z 1SFvuBCNONVCClwK2xrCtYzPJzP2oOY6ctvta6BCimo2XGWLVH7N1XUUo1dMuIBYa5fi4/kIg kspSUDqQ7niksuoJjvRjSZuYxIkXHRWd5GRNUNWj4Y1tcqUYY1BH32uNqtJu1+y9Uk3EqybZF 8/NuLsV68vpNxmZxnRm+/30kZA+lJJmb7Y5VVIhE85cBXCPcaiqsAV+IespfvibRiJwkiXPXF WcvIqtaMjF0uccH4nYyIo4cvN1IWqXb0xCxUhDUbJGudswDxH8HXTk6a642pkJqucAyJA+SIx CYh/ZOIm6PojJlyRGESPDDV7nT15Ut4UCEyAwvC6gsCgZVjHDnXes57RXLuQCQntSNqBsPKYO 3NdSBrjko+QYNkkJXJqagL551mYOsGzAC0BOXwcVm2+K553TzOK9eKmtcLdMftEYrKFa9BCWB iTsF+DYNJ3Q5IoHLdqPP+vDbiaGBHIhh99ri3ZC4UEMcs7ZjSXDDgZr2Ku6TzBOGktWTWSym4 oz7cYvTJ0uq1c0JlHJjxKyTR6ZmMki5/Khlw4gSrnlEmu5FjpOYP+mnjGHFXrmPIrMLzj293T RxxY9xCEt4h6n8c1WoU/M9cFtac6ibjJDLJXOqvexPT2vlyfpC8SREgRJV6m9Sc4eCpxFrkl7 EehKuqZD2ISs0z7pVRmj7diKw3QwKTrXEQfnPGVSQeS3MzjLrwXTZr3OgSscaq384hajPkTcb m5ERv/sawfgr0bQdegC1PTJRnWcDRogpLmm4Jggek9XbLbup5uOuusYi8U7WXNpdNBndOhM/e 8Q9Uf3+S1wKJi8= Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org Switch away from the own cpu topology code to common code which is used by ARM64 and RISCV. That allows us to enable hotplug later on too. Signed-off-by: Helge Deller --- arch/parisc/Kconfig | 2 +- arch/parisc/include/asm/topology.h | 20 +-------- arch/parisc/kernel/processor.c | 2 + arch/parisc/kernel/topology.c | 72 +++++++----------------------- 4 files changed, 19 insertions(+), 77 deletions(-) -- 2.35.1 diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index 00cb889bd9a6..6bd42c82a019 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig @@ -37,7 +37,7 @@ config PARISC select GENERIC_PCI_IOMAP select ARCH_HAVE_NMI_SAFE_CMPXCHG select GENERIC_SMP_IDLE_THREAD - select GENERIC_CPU_DEVICES + select GENERIC_ARCH_TOPOLOGY select GENERIC_LIB_DEVMEM_IS_ALLOWED select SYSCTL_ARCH_UNALIGN_ALLOW select SYSCTL_EXCEPTION_TRACE diff --git a/arch/parisc/include/asm/topology.h b/arch/parisc/include/asm/topology.h index 6f0750c74e47..734eddf096f7 100644 --- a/arch/parisc/include/asm/topology.h +++ b/arch/parisc/include/asm/topology.h @@ -4,25 +4,7 @@ #ifdef CONFIG_PARISC_CPU_TOPOLOGY #include - -struct cputopo_parisc { - int thread_id; - int core_id; - int socket_id; - cpumask_t thread_sibling; - cpumask_t core_sibling; -}; - -extern struct cputopo_parisc cpu_topology[NR_CPUS]; - -#define topology_physical_package_id(cpu) (cpu_topology[cpu].socket_id) -#define topology_core_id(cpu) (cpu_topology[cpu].core_id) -#define topology_core_cpumask(cpu) (&cpu_topology[cpu].core_sibling) -#define topology_sibling_cpumask(cpu) (&cpu_topology[cpu].thread_sibling) - -void init_cpu_topology(void); -void store_cpu_topology(unsigned int cpuid); -const struct cpumask *cpu_coregroup_mask(int cpu); +#include #else diff --git a/arch/parisc/kernel/processor.c b/arch/parisc/kernel/processor.c index ccaf075d0750..d0bfd61a4623 100644 --- a/arch/parisc/kernel/processor.c +++ b/arch/parisc/kernel/processor.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include /* for register_parisc_driver() stuff */ @@ -459,5 +460,6 @@ static struct parisc_driver cpu_driver __refdata = { */ void __init processor_init(void) { + reset_cpu_topology(); register_parisc_driver(&cpu_driver); } diff --git a/arch/parisc/kernel/topology.c b/arch/parisc/kernel/topology.c index e88a6ce7c96d..72d9aeb54fbe 100644 --- a/arch/parisc/kernel/topology.c +++ b/arch/parisc/kernel/topology.c @@ -13,45 +13,11 @@ #include #include #include +#include #include - /* - * cpu topology table - */ -struct cputopo_parisc cpu_topology[NR_CPUS] __read_mostly; -EXPORT_SYMBOL_GPL(cpu_topology); - -const struct cpumask *cpu_coregroup_mask(int cpu) -{ - return &cpu_topology[cpu].core_sibling; -} - -static void update_siblings_masks(unsigned int cpuid) -{ - struct cputopo_parisc *cpu_topo, *cpuid_topo = &cpu_topology[cpuid]; - int cpu; - - /* update core and thread sibling masks */ - for_each_possible_cpu(cpu) { - cpu_topo = &cpu_topology[cpu]; - - if (cpuid_topo->socket_id != cpu_topo->socket_id) - continue; - - cpumask_set_cpu(cpuid, &cpu_topo->core_sibling); - if (cpu != cpuid) - cpumask_set_cpu(cpu, &cpuid_topo->core_sibling); - - if (cpuid_topo->core_id != cpu_topo->core_id) - continue; - - cpumask_set_cpu(cpuid, &cpu_topo->thread_sibling); - if (cpu != cpuid) - cpumask_set_cpu(cpu, &cpuid_topo->thread_sibling); - } - smp_wmb(); -} +static DEFINE_PER_CPU(struct cpu, cpu_devices); static int dualcores_found __initdata; @@ -62,7 +28,7 @@ static int dualcores_found __initdata; */ void __init store_cpu_topology(unsigned int cpuid) { - struct cputopo_parisc *cpuid_topo = &cpu_topology[cpuid]; + struct cpu_topology *cpuid_topo = &cpu_topology[cpuid]; struct cpuinfo_parisc *p; int max_socket = -1; unsigned long cpu; @@ -71,6 +37,12 @@ void __init store_cpu_topology(unsigned int cpuid) if (cpuid_topo->core_id != -1) return; +#ifdef CONFIG_HOTPLUG_CPU + per_cpu(cpu_devices, cpuid).hotpluggable = 1; +#endif + if (register_cpu(&per_cpu(cpu_devices, cpuid), cpuid)) + printk("Failed to register CPU device"); + /* create cpu topology mapping */ cpuid_topo->thread_id = -1; cpuid_topo->core_id = 0; @@ -86,25 +58,25 @@ void __init store_cpu_topology(unsigned int cpuid) cpuid_topo->core_id = cpu_topology[cpu].core_id; if (p->cpu_loc) { cpuid_topo->core_id++; - cpuid_topo->socket_id = cpu_topology[cpu].socket_id; + cpuid_topo->package_id = cpu_topology[cpu].package_id; dualcores_found = 1; continue; } } - if (cpuid_topo->socket_id == -1) - max_socket = max(max_socket, cpu_topology[cpu].socket_id); + if (cpuid_topo->package_id == -1) + max_socket = max(max_socket, cpu_topology[cpu].package_id); } - if (cpuid_topo->socket_id == -1) - cpuid_topo->socket_id = max_socket + 1; + if (cpuid_topo->package_id == -1) + cpuid_topo->package_id = max_socket + 1; update_siblings_masks(cpuid); pr_info("CPU%u: cpu core %d of socket %d\n", cpuid, cpu_topology[cpuid].core_id, - cpu_topology[cpuid].socket_id); + cpu_topology[cpuid].package_id); } static struct sched_domain_topology_level parisc_mc_topology[] = { @@ -122,20 +94,6 @@ static struct sched_domain_topology_level parisc_mc_topology[] = { */ void __init init_cpu_topology(void) { - unsigned int cpu; - - /* init core mask and capacity */ - for_each_possible_cpu(cpu) { - struct cputopo_parisc *cpu_topo = &(cpu_topology[cpu]); - - cpu_topo->thread_id = -1; - cpu_topo->core_id = -1; - cpu_topo->socket_id = -1; - cpumask_clear(&cpu_topo->core_sibling); - cpumask_clear(&cpu_topo->thread_sibling); - } - smp_wmb(); - /* Set scheduler topology descriptor */ if (dualcores_found) set_sched_topology(parisc_mc_topology); From patchwork Fri Mar 25 14:38:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12791647 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 295B7C433F5 for ; Fri, 25 Mar 2022 14:38:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359343AbiCYOkV (ORCPT ); Fri, 25 Mar 2022 10:40:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359349AbiCYOkS (ORCPT ); Fri, 25 Mar 2022 10:40:18 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C376B97299 for ; Fri, 25 Mar 2022 07:38:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1648219114; bh=u4qnli1WWVwxR0RiJIaaYGpYmOLyDM057kihqzKtpsU=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=id9qwhm3heFK0yBt7zDB6LntyxlLoivoq1T1DhCaFsrey+VD3JJkNxcw9UvEp9Bbv 77WWrmTWgSfKDHezciKQyRphjZJH78Ebt+mINlmzgR/mrkuyAaEuDxTo0fEYtZ1+aO uAAsaZXksPGQ8/8y7aZ4cGsTF0XpANKjS6prZs7Q= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.164.212]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MMXQF-1noSr72TWZ-00JZSC; Fri, 25 Mar 2022 15:38:34 +0100 From: Helge Deller To: linux-parisc@vger.kernel.org Cc: James Bottomley , John David Anglin Subject: [PATCH 02/12] parisc: Add __cpuinit section for HOTPLUG_CPU Date: Fri, 25 Mar 2022 15:38:23 +0100 Message-Id: <20220325143833.402631-2-deller@gmx.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220325143833.402631-1-deller@gmx.de> References: <20220325143833.402631-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:MBBV1qNjMo6rULsrlVh4hZ4WFQTTngRNVYrgdw356TXY+Aor2WX t8vLHfLesxvP1OEUlO1A5CyVdnDJRfwRQ5ZFkIphS4UutNQpG42AJuQoulw6pPJASgdWrrW gNIlLy+4q7uUjyv/kXaDoYgjDWneeCbZfPT1U70KCRPXkKC9yzfYWRr6A+lxf9ornED2L0C jD+uiySZDHoECrP3fOLvw== X-UI-Out-Filterresults: notjunk:1;V03:K0:0GsB8cOhUoM=:11t4NF9qyYKVmubyIPPzLk z/49mhdYjlfjyg34OcoorvIz+WzvYM6/3dqXJcwVMVSO8Rq/MlcL5/nEBOcBpa0wlSOunnZ3u u6c/Q6FWjaqOopjmDIPHitMjA1WncTbaIhHRzFUQZGL9YtO4NpdwzH1rXnp6ncY9ZatGS6BDg uigdPYGyQNLvJdAeJt7Xd/GXFsV4swtnsbHn21Gr/hMOXyl+pvj7vqiOQ6SUAM98Jiysw/emB 2Vqb5ziVeEf4va4Ig37CVuJ/NC3CtULEd8p/Cfzc8iHkQcnVVNX5l6y0yCL1f+a+DCnRAry6E QHTqcR6UtiAujNWNF0ClH3fgm9z7CVaIlyO9TcFyCSDkCAG+Ye/INvrBSfBsLII57SuujVCqc Iu4bNWNT3Q/aTrbQNtypTRwKxPumBNZQ45XovM+uI3rDjd2UxajAU0ikR1lQWcDBGK4gkZ56I 8QAaSdoqzN/dsaMXOeZbJ5hVYsj0A1ihqU2lVyUIqxHunmd77Lm78wJ1RsJjpfch3ZWK7kCZB 8UXm9s1+IXNo5uLHskKrAuE+q3mmdihbBLHo6TrIarUiXl3qjK+cbiQ2xQ2875LhV7Rgu5tIK Tc8EJo4dXuooA6cz4yGclsE13XrKY7riCfNhJ43f/wuXEMNsfr6mDCtWPK8ImJJgRae8e+2ly EMvG339enBCv+Z58LVDleiI9qL10mXRj5PjsQRqlquYUvEarmhJoIS46BJFzoqHXbxZUmXOMk b5mtFbLQBe14cZZuhakfQRrWIhbm6m+iE/gXgcEPy+aqJnBeEH3QuMbHmR/AaWWW9nsCPv+1A RYqHAbVRCe5jp2E/+EyuKtUs+H6CM54QuXKwpgquclq/ipcpMKnNJQgbj1ecJN83aUoQ7W3ON FhJx9lB6xXqnA1TAyL2bT4++0425zUSO92DQCAD9cd8+3hzx6zke7ckqNb8ssVdheeRGuH3QH t3wFyJc6dt5s2s4//RCNs52kncT2XUkyzxapxnQZhW8UDJNExCjlYEPodCQiH5/aj1L+9ug4e AMOpmIIx4/MlaZBljuYeJiA0uwb7eZhBbSaFAeaxy5w+kApPONVRHO+jDz2H2cpsvg== Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org Provide a __cpuinit section which needs to be used instead of __init when CPU hotplugging is enabled. Signed-off-by: Helge Deller --- arch/parisc/include/asm/sections.h | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.35.1 diff --git a/arch/parisc/include/asm/sections.h b/arch/parisc/include/asm/sections.h index bb52aea0cb21..4c28c7adaf5f 100644 --- a/arch/parisc/include/asm/sections.h +++ b/arch/parisc/include/asm/sections.h @@ -7,6 +7,12 @@ extern char __alt_instructions[], __alt_instructions_end[]; +#ifdef CONFIG_HOTPLUG_CPU +#define __cpuinit +#else +#define __cpuinit __init +#endif + #ifdef CONFIG_64BIT #define HAVE_DEREFERENCE_FUNCTION_DESCRIPTOR 1 From patchwork Fri Mar 25 14:38:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12791649 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C8A6C4332F for ; Fri, 25 Mar 2022 14:38:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359347AbiCYOkY (ORCPT ); Fri, 25 Mar 2022 10:40:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359348AbiCYOkS (ORCPT ); Fri, 25 Mar 2022 10:40:18 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FF9B97284 for ; Fri, 25 Mar 2022 07:38:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1648219114; bh=aiF5NcAtwR8oBoe7A06WL/K55rvwjMxWdm5rqjfDrI0=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=JnAzITPAbnC/MJeBNw0xd3+kZeCRQ8GJzIn0RzMjulsr7yPFg1DfnA66ZgdTLkqZD v6frpcA06arD8zny5vgxzcNxvAoIIabcFGYIJePIg6x3M4MltEryTNSSPZIhIGxp3v MgtM8mUfaf+bPOgOH9rhIxxRLE3KVZU/2lzZXyiA= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.164.212]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MKKUp-1nmGzl39Y7-00LlJI; Fri, 25 Mar 2022 15:38:34 +0100 From: Helge Deller To: linux-parisc@vger.kernel.org Cc: James Bottomley , John David Anglin Subject: [PATCH 03/12] parisc: Move store_cpu_topology() into __cpuinit section Date: Fri, 25 Mar 2022 15:38:24 +0100 Message-Id: <20220325143833.402631-3-deller@gmx.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220325143833.402631-1-deller@gmx.de> References: <20220325143833.402631-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:a/jau4IvwTTMogFIhK3hLVTWJcVnE63wK1KV7W9+tfuDD9ydDm+ JjRbMvOk9BJ9GuHENWZiWHoyANEchDeipyLQW0aVyZGftkm7to99RAc7G87hIwTSWmc5ydk vffVEC9KXZHP+JQw8xatCoLCKUCKJZknBKii3wOUtNSL5jWhOBM/N7nR6fubYcbpIYt02rM UaxEhCGg6W8OCPqJx+qsQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:MPbL0tszTgk=:f241JD85xKA80YhsEsjRel vYhpUoNfMBTec9guhIt5FIPI4n4sAEZHj2JHWbnvCbthFfx/iiSwA17p8/EEmbeI0WKEGKT9e 6k67EZB225ASIgFdPtz50t71kniIePGsnilsMJbYUYnvr+k+E60XO24SblQCn4+DFz5FC7NJR ccJqljClf8WLqicedXwntXWbzvNi9k0deFvVlT4vAzs54KhW27nqEoGA5R6pa9LD1UaxLWDcI 8asiyyCOOXtktmuVCvpSfWOOqfGd+1iTQKe76UZ2d/T58CUr4d7xsrItit2Tzv646U5FGGz8+ jRxFhrV4gfj9BcLBY86mUoFesZ5fN3+iU/4QwS+skyhKSUTOHbuaXuSqtVsmKBw/GGGxfTKXB YJOuzeP6zVgeYuAC1nn9g5PjvvzirBWcCEdPobupLfP6Xwi2pXKHqftBTxD9OIV4HAqjcyCid zymow0y+b6khFVhx8WJQXiFV19LdLjdth5VuGnAqYcbXRzJ9ebMuc58QorZjGvVwF0y9JtWJa N6QnHw0tdOhtM9IM6w6n18XoGzqC4pnQRgnzEyOSzevpHShyo5QPWjiLfKt3mX5w8Vff+i1lq IvVcl/VuBQ9GQBxQngGUZ+EqNGfMO76ql8IN9rbhWh4+n5483JxYZlDv5t2FegjUZCHOr2V3o Qu1FhpAJ7gmPzZya+FC5FqbhzE8jZc6JrWJ/LPjvaNoz9gYR+ysI5p19rC5nhNsrV6pZsIhC9 Z/bmHFTygErVcGhAsSTNEvUj26F/gXbuvSepouThZ6FE7uhaMIXOvtudTqg128+KO2jfu0j3L VMdFlTNBG6RV8FdCd/9e3QTLKoJq7wyppREvT3Mftm4sSK3hgmfius1gNeXTqdxdejeTDOJ+S 9rO6/m/fRAsIq9q89TgBLbDgzWwbkFuxeUcQw26EUYjn0BNQbX69SGyh8uiIckYto8cRND2iu SnEqC3wPOB+MpQtMMd03DdL3sDsiEXO86DiJdoWophdvuSA71SVEewfGFhPV1P3mPXU1BNcvN cg7WALNqDFb3VOuT3U672qshxXWciusWShsEU2xWsJTDcHCU6+1Q0Ainx025Ixn8Hw== Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org Signed-off-by: Helge Deller --- arch/parisc/kernel/topology.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.35.1 diff --git a/arch/parisc/kernel/topology.c b/arch/parisc/kernel/topology.c index 72d9aeb54fbe..dc766fb55491 100644 --- a/arch/parisc/kernel/topology.c +++ b/arch/parisc/kernel/topology.c @@ -16,17 +16,18 @@ #include #include +#include static DEFINE_PER_CPU(struct cpu, cpu_devices); -static int dualcores_found __initdata; +static int dualcores_found; /* * store_cpu_topology is called at boot when only one cpu is running * and with the mutex cpu_hotplug.lock locked, when several cpus have booted, * which prevents simultaneous write access to cpu_topology array */ -void __init store_cpu_topology(unsigned int cpuid) +void __cpuinit store_cpu_topology(unsigned int cpuid) { struct cpu_topology *cpuid_topo = &cpu_topology[cpuid]; struct cpuinfo_parisc *p; From patchwork Fri Mar 25 14:38:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12791650 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15F3AC433FE for ; Fri, 25 Mar 2022 14:38:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350856AbiCYOkX (ORCPT ); Fri, 25 Mar 2022 10:40:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359347AbiCYOkS (ORCPT ); Fri, 25 Mar 2022 10:40:18 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA5CF97B86 for ; Fri, 25 Mar 2022 07:38:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1648219115; bh=rbe7gJ6eCnQ57vZAV9Lr+L2It33KwFigfTexI1h0I0A=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=RWMjhuDp73aJvshkG6YLlwXkUzt+nR6k7GjN0WmnUZzpFCpZlnMZ04slawcixxd1w aD/LAv2FhiN8YYeRxTXwBrERNYBdOURqFyhMAbS4xhWjtkt68oKl+YQ4+yocJ6L+gC BmDh2GnV5ftH/QgQ09/e2W815wU+dGfVfYPILEPc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.164.212]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MEV3C-1nIvtw3g2k-00G2HF; Fri, 25 Mar 2022 15:38:34 +0100 From: Helge Deller To: linux-parisc@vger.kernel.org Cc: James Bottomley , John David Anglin Subject: [PATCH 04/12] parisc: Move start_cpu_itimer() into __cpuinit section Date: Fri, 25 Mar 2022 15:38:25 +0100 Message-Id: <20220325143833.402631-4-deller@gmx.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220325143833.402631-1-deller@gmx.de> References: <20220325143833.402631-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:lp+XTO6GnIScy8rzHcyNHFHF+FlZhXv39a2xlcJIaENwrVHmqC9 Ny6i4L+4Nb2JX1PtJURiOSmo8gD+jq+G5S/F7ZDmzRFLpczoGuctxXJlu2MLaZN+fqNkcYg /n49R/Gwv6tbaBJZiy+iUbWzP8ptGg/+7lrrIhlZRCPgSycZENZ5MmtVOkOdlWi0uPJE928 qNCsvrCJZB9Jnv51G75ZQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:hU393pN70mc=:YWaXpCg4QDeaPB+xLDslEy HaAtWIqLQwMkDcF+EEQpqsfya2z6WXgFh5+OcCo7i+q9AjSvC8weKa9GCpA50rP+/y60ZzmBC zCxuNPMpwX4ixvo4ttYUJqyqEw/1UEnmJFFSBJ2kBwtuR9GEnM6+Wn/eAAgmMvgZcmurDMock zW+j29y4PZWPLGiHzUMxrkK/azTTSg7TDxLaFNbZza25x+zY1uVbk3QFnkf7wplJp1DYasNoU maBm5pIjdFq41g3PAcBliodOF4lCg1tmok5JCigZ8fHg5pob32gd18z+CTdWtHpXKOX/X/vO7 f82s9LU3uxJNPXDGiPF5d7DFhv1F3gofRcSxhHsyzDNkIun4DDqUWm9X+YkojORhmvzeWwBaN xUrveg24WW+d91euOH4xLsk1DejzKItrwzW71pQolR73i3CSXp/SkyX9E4eVVRBD/o0/zEL6G RxCqW4/Imalz+8+ukJOW7jxlMs14KA+PCwtoEH+RORB4587hjYric7QKKJa1ZBoxLLTCyXZ3h Zsmobq+kbsjAanZts0UNyZ7xQGJi7VpMYhOnklZ9lLFUtl5L5B3SL6PSE/W1I3bxEysM8cQ9F 3ORyvGX+rajYs+t9i2JnKZKaAJhkwbSrDxl6YyI3LDB+nEZhNBRczBAsC0M0uG7fAWtWOxXiV o3hNhSRRsPOHDu/Rt8Q1CKOkKVV1Cbw6clRSYpsKV0PlwXftqzAnYYx8r6kMJt2ZIHJL+CIgB UPV/3pxQWOXNHCvWF9z+x4YJICLshu6GB94nef1Pp0W/MXGMGE235fP+vWgV39i/ui7p6Fz60 c0jlztbrGdZ6C4Izj5xsrIB2XIXh+Qn/pf1lyrzldzCE8i6YaZ+JqdTd5t6v/fsMKySkqyolo 9daTdZUDiD1MuZP6BczqFKLi3BLAsCz+MxKUKf9l2oYWpmmCSiIzRo60R6XIvlysu6r0CAN6+ ngQdsBZFQEyiBefG8lQjpSLsHYW1kMw0jGO5gv+7j6bOiofFd+xwehUt9LzoufbPtpDiIiIEg P1NeaJzTjcW6vFJiAJVuZHgBmA7HF05DrttHhAMlG3Yo/acNzcb7uiyi9ueqBvqeIYpEexnUP jiqWesbYhUO4+Q= Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org Signed-off-by: Helge Deller --- arch/parisc/kernel/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.35.1 diff --git a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c index 061119a56fbe..4101392bf74d 100644 --- a/arch/parisc/kernel/time.c +++ b/arch/parisc/kernel/time.c @@ -150,7 +150,7 @@ static struct clocksource clocksource_cr16 = { .flags = CLOCK_SOURCE_IS_CONTINUOUS, }; -void __init start_cpu_itimer(void) +void __cpuinit start_cpu_itimer(void) { unsigned int cpu = smp_processor_id(); unsigned long next_tick = mfctl(16) + clocktick; From patchwork Fri Mar 25 14:38:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12791651 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7CD30C433F5 for ; Fri, 25 Mar 2022 14:38:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359348AbiCYOkY (ORCPT ); Fri, 25 Mar 2022 10:40:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359350AbiCYOkS (ORCPT ); Fri, 25 Mar 2022 10:40:18 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB450972E5 for ; Fri, 25 Mar 2022 07:38:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1648219115; bh=VR8qPK9Dzn3QdAzeiNPmyam7q5XtGtB0PRh6/8eqJa4=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=bIS6KjVKIfnRXDHd3wSMCjknpoXy3G54AtYdsaxqEc6V0+i/VPeDPMciClWhVIT6d oC60R02tyvnIcRaNtPgDX6TX/4z5sujtCt6Ep5vSj4AgjkUSyTpPhVRgOQi4FMlD3o p61JzHQQRMvO9sfY5GWmZBbBYhFpQQ/P5jErvdno= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.164.212]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MuUnK-1oOtbN09q6-00rWlJ; Fri, 25 Mar 2022 15:38:35 +0100 From: Helge Deller To: linux-parisc@vger.kernel.org Cc: James Bottomley , John David Anglin Subject: [PATCH 05/12] parisc: Move init_per_cpu() init __cpuinit section Date: Fri, 25 Mar 2022 15:38:26 +0100 Message-Id: <20220325143833.402631-5-deller@gmx.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220325143833.402631-1-deller@gmx.de> References: <20220325143833.402631-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:fbniOUFFkqxoKtvZYuGOTBo2ZtZgYaHk2eH6T1HZpRzzpI2pTVJ SyYhPZW1/pQ1nXH6CiSfsn4KtYLCqbJEHjmFrLU+l25KunUVMAGe0g0JJXcFkISB+BoIHlg 194xewr3k+OtzDRpNHK9mDMWoK01lF9LPlTvFzTQORH14lOFmezI8pdoWa3stHJAyDCnrJi V8h2EfOQhET2fvhOBKqsQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:YTuxLA3dqZM=:genPiE53xFoLcQKGK11+vR SOE+pYBAXycpSssV6t0OuzljUU9KBA6ilSDrXTw234EuGFn/Ym0DQuv8U4qDsQOvS8RsnovTf AtX41QXd17JSrc8/NgtfB81kpWNAx9zxwGTZoBGcoy7H0ArSL6omHW+mziyf+FMsPKCf3vJNx b1GMt9yS48IwR9KG1mqqcwHUHVEKD5wFBElUyApeZ6CblYFdWGa0n3zjqMT4aUZU0jcDbn4yH 9gOzHDNP97XINL5Ry8MGXKxW7YqKPiNE2NnI6JBsoWcz6zbFhtOHlXn5UmQXgQVRuLsxONyRv QTrTmm+8lzIn2NlPNzEdrdIoAKm/tvalEH8eryeFKNCWF5iNG2xumqK3L+m2tIiue4LurZctL MBC1VWWGyuaqfsGs44mNya2ofktmCe97obg97Mu/wC1bSb3wQ//rSyPUL4a6x8SuzWmcxZgPj 65CwWjKYehYNLo9zNBAN13V0K48zK7kwPRXLv8GGgMaAg1LGdA5Hosja1pj4GmwWnRB5tSomz GJv6cWKGJJSth7e1lshqNe70aozh67N8z21vptkYoTq3rPX9oy7gcNaMkilb6co3Vp80Y1dIh 97Ras14Yv7aHaX36JvY2Rfv30LLy/l+Pev08ZrGp/UhZMsSE1B8QboHXODZ60qM4sPpbFsPnC f1b4aZiKgP9bllZNWdjx/wY9vkNQyr1nKEXP4/sTv3NZhLgyYM8y6NKbVX2elO4diKxYi6Lz+ eI0Mwr23DrCoYfdlxPH0ZfUlQozK4PyVmggjZi06pBf6WUMFPrBaBj8ll8SXBFb+9lvncmHZF Wz6eFGA17+twB6AwUaalVjHQ22o40kCgzcHjPan9TSEx66sCQLSi7iwbn4ZosSrmtkXgn9Ct0 /5hGkk2FGxl6IkY4DSjSmM7DzZtAwY5mMfhxUFCIMxKFGURFvsMx5ilqWfRsKDMAELtcxm/4A 5DrVW2cEP6ZFZGx5Rxm1CGnXa5Jz15ESOoI8H/7JWzFNWfsTTafRaZ8+iLPIWP30eB6voFzMq EQDcHTALzohkATGMJC45YeCiFTEaKGmUQVrTdg1KNX4Fos/oBjmpQLrkJ8HdPMpZhfOKS3P2+ cWW00PawlL0G8Q= Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org Signed-off-by: Helge Deller --- arch/parisc/kernel/processor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.35.1 diff --git a/arch/parisc/kernel/processor.c b/arch/parisc/kernel/processor.c index d0bfd61a4623..89284e79c159 100644 --- a/arch/parisc/kernel/processor.c +++ b/arch/parisc/kernel/processor.c @@ -29,6 +29,7 @@ #include #include /* for struct irq_region */ #include +#include struct system_cpuinfo_parisc boot_cpu_data __ro_after_init; EXPORT_SYMBOL(boot_cpu_data); @@ -317,7 +318,7 @@ void __init collect_boot_cpu_data(void) * * o Enable CPU profiling hooks. */ -int __init init_per_cpu(int cpunum) +int __cpuinit init_per_cpu(int cpunum) { int ret; struct pdc_coproc_cfg coproc_cfg; From patchwork Fri Mar 25 14:38:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12791641 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D191CC433F5 for ; Fri, 25 Mar 2022 14:38:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359341AbiCYOkR (ORCPT ); Fri, 25 Mar 2022 10:40:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359344AbiCYOkQ (ORCPT ); Fri, 25 Mar 2022 10:40:16 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AB71972E6 for ; Fri, 25 Mar 2022 07:38:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1648219115; bh=LI10puTNNK6tskId7IFHg8uCclJ7ZBfeS9cwtacOLc8=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=OIuOPBWaTqb3aSfRG6dC3vA5A/qKd3iF3X+OqPwMM2Z4LaIw4i7Z69x04RTWOkZfB P2YgijyNFX1UFcw2nlyZKPD5RoxFRxNZG3aWSFVH2OH93WqHrLJyeo9+FS/u31ODdM LnhHPg6dpyLu1OR0daFQXNiAbO0Yq4eD0kHodKhw= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.164.212]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MUXtY-1ngWUd0fmS-00QPUN; Fri, 25 Mar 2022 15:38:35 +0100 From: Helge Deller To: linux-parisc@vger.kernel.org Cc: James Bottomley , John David Anglin Subject: [PATCH 06/12] parisc: Move disable_sr_hashing_asm() into __cpuinit section Date: Fri, 25 Mar 2022 15:38:27 +0100 Message-Id: <20220325143833.402631-6-deller@gmx.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220325143833.402631-1-deller@gmx.de> References: <20220325143833.402631-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:Z2jHBRXDy93YXknke44d1qGJaZNjA31kgbhzqQPrvz0wdLlw5/R LFwc2XfEmOnMOE5iShrC035jOUZoCU3KGtoFoBCpr/wmvIOLfRRnPk66x9OZPGZvUxC4avZ sclE30ssYIQS/YaisPHPMl3UWCakeyi5Zmm6HniB1shbOjkoTjUwUXWKSlapbKAq0PUdJ1B nho7HRZLd/AQavIB26lQw== X-UI-Out-Filterresults: notjunk:1;V03:K0:nogc3zvYWbQ=:gJTdKuHpeHaNzUJ8VaZMqR VjnDMnRETRZKkYMZUSHa+CGRovjb3qo4dE+GDPozrcPWpM9p3bMT1Bpst1jCEXwPQF7cQJHCq tGLBvRoBYFKviDRSnuuOB6PBWMUc+6Jy9yRsgzSv6E+8ClFiweYvsLGf4VxSS44ENW+hnz4Ez Y8WyqGShrzna/Pp4LqIv9KBMYHUQqm3UgTDa5gcHCiX2ee6pi89XZZBR1jFZZq9l7/B3iBBRJ RCpV0Xyu+TC5Kj1SKiTX6ZBT/LqOIRGhN4A1SqvYcScBHT4Eat7z+LZNEtyKr6QW8EJG97iJf +YdGja2jayUmXGFsozLFLbMxeNlu2g5+TuN/Uy+Ub2DyhupQTNlvMkMh5hsfmqGXG6/zAHx7E DlPQqy+Yhxc8Nru8ErvEqYGQIXZSikvEYgK8h0b9E+xOvfEgrjasnbunJtSz7Xw9Hfc5JULv9 rVihxmMMaorrxvkyYc6+JNEX5hufMH6By8Fz8N2bQ3g5RoUjMl5xdcl+vFqMfBtAaq9b2PDKW RO4/veVDmTEnjnN8u1alVEypmUTM1mlW6dCutNokY0LEqv2WUToeNbH064mFfYQIJY6RytHyf C+w+KjvGt2Ay4uKUzYbmmMBE+Hx4HDhqT/ZKxv1TA2V3qEHhlp+H/MJUNkbHUvAWmRwqSFMNC jGmE5gZec3/T5aKuL9W+kMn9vC5IQj0L0Zw3QUWS73yv1nmPERUymXQD93EuWY6zEWr4MNovv dhNrBKv824bgoYuPKebkXmpu67J4JLPJMpWxWvrr7z0m77Dhlyizb+hJNdxrQkM94m+xXlRv5 6UoQVULd84PPA0pcnfbqvY+UgONo+Ps+TrtNTpsXxL9gHNEEfCMuQEl/fs1+PWgmL7hqcEc2G Czxb7FK0Fst/KQbghZ3NEvNFby9B6mG3lLBL+FCkT8+cZXR0EGTUHFEs2bA2YJLG88jX0utz/ zwoOnToYO7H8aSp9Yv+qYWpSlsUqaSnEQK2+Kqo5IOr5fBkREdx98MVQbYfbgd1oy1+t2gj0B OrqgM2n1bmp3nZnNnlAOy8HMlPZvTNZqns1RGm6advBdO2+G38AWMjpXIPNzsUlG/vQ+kgDaG PP9q9hF9o68id8= Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org Signed-off-by: Helge Deller --- arch/parisc/kernel/pacache.S | 4 ++++ 1 file changed, 4 insertions(+) -- 2.35.1 diff --git a/arch/parisc/kernel/pacache.S b/arch/parisc/kernel/pacache.S index b2ba6d633065..661b1834ac94 100644 --- a/arch/parisc/kernel/pacache.S +++ b/arch/parisc/kernel/pacache.S @@ -1264,7 +1264,11 @@ ENTRY_CFI(flush_kernel_icache_range_asm) nop ENDPROC_CFI(flush_kernel_icache_range_asm) +#ifdef CONFIG_HOTPLUG_CPU + .text +#else __INIT +#endif /* align should cover use of rfi in disable_sr_hashing_asm and * srdis_done. From patchwork Fri Mar 25 14:38:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12791652 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C955DC43219 for ; Fri, 25 Mar 2022 14:38:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359349AbiCYOkZ (ORCPT ); Fri, 25 Mar 2022 10:40:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359353AbiCYOkS (ORCPT ); Fri, 25 Mar 2022 10:40:18 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB787972E6 for ; Fri, 25 Mar 2022 07:38:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1648219115; bh=xFElwm2kmiOd3h2E96YL1yU97EVr6RYbsoZsRdaJNwc=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=Kulck9KECXWBptNj1HzpMyjuc4ZzKmf2mNrib/HW9nKKAEWz/px0C+JGO9D6hhgkD jh1IMuncNrQfQy1/DNKGztb1KuD0INeDoN4AaKcD/n9suNBndzfVQ1ye9GIL656zjc zHD/uLoDxrLfid2dTdGf7pFI+2HtjOfd9E+6RGBQ= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.164.212]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mqb1c-1ntdV51QQ4-00mdCx; Fri, 25 Mar 2022 15:38:35 +0100 From: Helge Deller To: linux-parisc@vger.kernel.org Cc: James Bottomley , John David Anglin Subject: [PATCH 07/12] parisc: Move disable_sr_hashing() into __cpuinit section Date: Fri, 25 Mar 2022 15:38:28 +0100 Message-Id: <20220325143833.402631-7-deller@gmx.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220325143833.402631-1-deller@gmx.de> References: <20220325143833.402631-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:Q2QcQDM2S/MVL9O1Rvrz42gtITugvJh8YxKmJpDrZLi3HISAWUd hkfSub1KlC5T1bP/icELaxfvAicW4hJY7DolyvU1mID4omRO1mp1CmDhn61nswq4elftmf5 IJfvnYeaW0QKytovsVdFfjikoYpmfnn88hcEXFRH4HX2FnzhvNOppKRctYODd0wAyfrR86M 2KIjUhRiYs+nft7ApX+UQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:jI1BTUql7go=:F8BqFz/4J5xAcNVYxaeI2t g0iSrva1Dc5IIGAjZR5tvcy1a5xVr5MsTyVt0PGmQowD0ssNjSKv/AJCREuSIzUMoH8fkn0Db oa8aSfaYbllSjKKP3nUzr1LMx9lRBfImgf0uqzEioFv4+/I64E13dfeao/4ZKOgevwJsSfeJg t+5zni0ecTFHh+HnNMaMnGTIsVPkMlxrYlTZYMc3kVeXovmtj9Sou5k9IIfwW6kq0/9yJlz3C Jpft2aY/nICjcN8YW+AJ4ul4/ebMZmuTX40V/jTUrB+kAXGzNWYek4AMKsa42L4sAZFE7Pp+A APljpOTtQvoAcZOTSNp7X8svn6XI03jtu5TvTvbQL3q0saW5vAWpTpxrnljpLMRN4lkohvCdA vSATkbjR+J2SnwFL5+2QsMaY3gXerv9blwBImz7ZrCE4pKdHJh4OPZWrb+NreR2eh5gF3o1Nm w+L8Z/M6XlPD9TwvcWnK1aHDu6PUyMkTGIYIgUEowq6JBcWCgs7DdR/cUvWPPC6SuJHQPW6yZ 41mHEiPrXtSH0slMFTNfL90PayC1u2xH0xIto0TBiGI7ciL6Q8+F/BwabWT3lXkYEBjTyCwNX 7Kxj20/wVQoldvq9ZGreLgfFniMTIY9pQ9zQCuJx5YjO7Stjd1n7sSEr13g1j3WKKOtEjNmUO jys1AM5lW3t9spRNdqSny20o5kOQwhOVurrlZyYfPUHIpjF7SqH9jPuYAOeLTZWe4ubjsIiok +ObCZluPslQYgY3UF2ztQdl9wAJXgbJHdUDuPCXI09t8wm/cD+pHwyMCQiEpjLVL9DcEhF3JE 91JgjAQpaqlTVOYiKxJHvZVjG0RgFg0IiLulRNce1kojUjIdh9AgK0VjGU0W227rbt/bqV3vg iutuFQwsVpZG2uOHxCWmd/bfitpL+0I74t1l5xx105JG2y6fR2kHi5tdTAvh8atp/o0du8809 fmSPhGBl8D8b8RW/NcQAdzayM3G4B0kdbXszeoGSCylh3sifnEaCjErEAkmPDSzNJAKXnk+7C +0BhsJwVWI7okWC2xVZoRZK/Qo33NhXGXWxBi7lR9A5WPt9EaGcwqAuQFDqeRl8EIzhTkzKc0 dCGv8P3HcFpXnU= Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org Signed-off-by: Helge Deller --- arch/parisc/kernel/cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.35.1 diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c index 456e879d34a8..6be03d3a2382 100644 --- a/arch/parisc/kernel/cache.c +++ b/arch/parisc/kernel/cache.c @@ -273,7 +273,7 @@ parisc_cache_init(void) } } -void __init disable_sr_hashing(void) +void __cpuinit disable_sr_hashing(void) { int srhash_type, retval; unsigned long space_bits; From patchwork Fri Mar 25 14:38:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12791648 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B8911C433EF for ; Fri, 25 Mar 2022 14:38:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359345AbiCYOkX (ORCPT ); Fri, 25 Mar 2022 10:40:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359351AbiCYOkS (ORCPT ); Fri, 25 Mar 2022 10:40:18 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA9EB972DB for ; Fri, 25 Mar 2022 07:38:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1648219115; bh=OxcoQczI/0Cr52qdPAjGZ9CUMYyrPLyk9TUFyHKkrZQ=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=OBr6JJnz4It2eGkCeZNUPDBpTV7vlHfxo08x7lwcQC18n2RpR2wPZMdcSL4calBWC ZOzlshuUttecWeAs4106QYJ6h+NsTj7zbD6hJiZ/26BpxVrlsJG6urg71+yiEeb3pV hJhEYv2aL/cPQXGP17BEjahZI9FYU1SWoAIUs90c= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.164.212]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mw9UK-1oNFi324BQ-00s5G7; Fri, 25 Mar 2022 15:38:35 +0100 From: Helge Deller To: linux-parisc@vger.kernel.org Cc: James Bottomley , John David Anglin Subject: [PATCH 08/12] parisc: Move init_IRQ() into __cpuinit section Date: Fri, 25 Mar 2022 15:38:29 +0100 Message-Id: <20220325143833.402631-8-deller@gmx.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220325143833.402631-1-deller@gmx.de> References: <20220325143833.402631-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:qTJtg3u8q366DI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6L7s Fwi0qpWxelj9gsrJAcahF47rnQq4Sm7+u1rBdFHOpaz+MH9YkYt14SqnxGxi8b203dxZXY9yN nCyE0sfD40GRPEKSEgOLisPdge6vS/IY7alng4XLl1B6DiZT7H37FJkfpttehlUX1B0XnqkKh UUFVk+XhPpLF/G8vQYl6SS5bsYGcBaJ3FDn8xcbJFgVxS8SrWncxmWE9zAfVXf+HHUkYGsDZ9 2Q0SPgtTjmsorl75qG8KxP54GgnpnOkjXi3AYI0/7jFLwcdhAyPuyH/OaWOihsgMCGSemP6id iKckr5tUkj2nBs= Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org Signed-off-by: Helge Deller --- arch/parisc/kernel/irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.35.1 diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c index eb18e16362f6..a8372db32492 100644 --- a/arch/parisc/kernel/irq.c +++ b/arch/parisc/kernel/irq.c @@ -582,7 +582,7 @@ static void claim_cpu_irqs(void) #endif } -void __init init_IRQ(void) +void __cpuinit init_IRQ(void) { local_irq_disable(); /* PARANOID - should already be disabled */ mtctl(~0UL, 23); /* EIRR : clear all pending external intr */ From patchwork Fri Mar 25 14:38:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12791644 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 28EC0C433EF for ; Fri, 25 Mar 2022 14:38:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359342AbiCYOkU (ORCPT ); Fri, 25 Mar 2022 10:40:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359343AbiCYOkR (ORCPT ); Fri, 25 Mar 2022 10:40:17 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4C40972F8 for ; Fri, 25 Mar 2022 07:38:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1648219115; bh=amQlvFNtU9AFkPjlzd46qn7EpfFJNkEFb6lZBKoWs+k=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=LnALhSrBkr0iQei0P6QyUYx4mh9ltLbmZSjCt1oibITl3EqNMo7Hv3k79VL4CgUFE obY4oi1DbXCr/EW3dLIodo01HnJSxZI6//IlM7kxZqCWvKAqyS2ynT7Nn2tGz5Pffh mPC7LU5WagAY2X8i8lvw5lQvCisJAeFQ0ePKGMfY= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.164.212]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MxDou-1oHjvv2ic4-00xaVT; Fri, 25 Mar 2022 15:38:35 +0100 From: Helge Deller To: linux-parisc@vger.kernel.org Cc: James Bottomley , John David Anglin Subject: [PATCH 09/12] parisc: Ensure set_firmware_width() is called only once Date: Fri, 25 Mar 2022 15:38:30 +0100 Message-Id: <20220325143833.402631-9-deller@gmx.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220325143833.402631-1-deller@gmx.de> References: <20220325143833.402631-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:ajP7ANnLAq5kkJ2G9YaooKPrUrhjHF0ouxAFGYLdGQ7LUfQIkX/ xvN442FkWY9GuC4+AcFakFCI7R4KBtqc7fYZf9tvq5Ts4xHyjXMp74wu8mHmLwH6Qu9nMqa ba5W805CJcz/M1KqV9j6h0vrOI5DSsGgkR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O 86Jen3FBR8dJOQQQoXKn71NvEaBs1KzCFdksclkHqhzN86Pqxx3gT2z5S/HiNX7v/tlmj5Xa7 bmnAbY53U6Vqtw8nFW91+S736F7chCo2Pm2Wn10CT9Q9c1NQPh7GHXzbnljjHeN+2MXUWeS0e /5H8xxbOSOW3nY= Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org Make sure, that set_firmware_width() is only called once at runtime. This prevents that if secondary CPUs are started later get stuck in spinlocks. Signed-off-by: Helge Deller --- arch/parisc/kernel/firmware.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) -- 2.35.1 diff --git a/arch/parisc/kernel/firmware.c b/arch/parisc/kernel/firmware.c index 3370e347dde3..c6b11bdb8602 100644 --- a/arch/parisc/kernel/firmware.c +++ b/arch/parisc/kernel/firmware.c @@ -83,7 +83,7 @@ extern unsigned long pdc_result2[NUM_PDC_RESULT]; /* Firmware needs to be initially set to narrow to determine the * actual firmware width. */ -int parisc_narrow_firmware __ro_after_init = 1; +int parisc_narrow_firmware __ro_after_init = 2; #endif /* On most currently-supported platforms, IODC I/O calls are 32-bit calls @@ -174,6 +174,11 @@ void set_firmware_width_unlocked(void) void set_firmware_width(void) { unsigned long flags; + + /* already initialized? */ + if (parisc_narrow_firmware != 2) + return; + spin_lock_irqsave(&pdc_lock, flags); set_firmware_width_unlocked(); spin_unlock_irqrestore(&pdc_lock, flags); From patchwork Fri Mar 25 14:38:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12791645 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 995BFC433F5 for ; Fri, 25 Mar 2022 14:38:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359344AbiCYOkU (ORCPT ); Fri, 25 Mar 2022 10:40:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359342AbiCYOkR (ORCPT ); Fri, 25 Mar 2022 10:40:17 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D82EB97B83 for ; Fri, 25 Mar 2022 07:38:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1648219115; bh=eFe6kw2jmtf31i+lCOQ25HgYFMe7RRq72KEe4pK9ycA=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=Pwuv+bCnT5fTiEASOHRNu7h4GhOGHxvbpeKRL2kJQS3KOMMTgmBD138pInKpBnZ6l zEHNR7J4eWzOPJlGFI458OpCB1I9yGUWkylJlxuL/q0QaXAgM3dOOW9hpAeSgU/ERv ZUzo9+wwUQrBcU4tpI2/hsIhRQSa/HzZkOg8ntXU= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.164.212]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MAwXh-1nMWfK3Bw9-00BLRW; Fri, 25 Mar 2022 15:38:35 +0100 From: Helge Deller To: linux-parisc@vger.kernel.org Cc: James Bottomley , John David Anglin Subject: [PATCH 10/12] parisc: Move common_stext into text section when CONFIG_HOTPLUG_CPU=y Date: Fri, 25 Mar 2022 15:38:31 +0100 Message-Id: <20220325143833.402631-10-deller@gmx.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220325143833.402631-1-deller@gmx.de> References: <20220325143833.402631-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:YdQUrKLVdkQURAPAypVl5qiQvERZZR60FPBa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edvsIKPEUaNgm+wZoCwsdZSYbJPhmvLFetMCQ9cTRpu9E8XHDQisEvvhkE8 kEbDA5gwFfrljA7komfX2SZfHF23eavJ5PlVG21587Zi3nkhDUwQmWqPcNE+E545hTKfWbxl7 JXFPHRg61wfPHHh63Q+JAILwYt/cnyUAuk5Jb1muyLoF7lDFpzpolXWA8a5Y3FD3xNakD/W+f v8fucoEs6LAPx4awQKrf+SEzG45SRpYgp1VImG6kzQOYlaVOOTdA1ax8STOL4Td+hoMz0D4P2 cDVLqiKUTQukB4= Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org Move the common_stext function into the non-init text section if hotplug is enabled. This function is called from the firmware when secondary CPUS are brought up when CPU hotplug is enabled. Signed-off-by: Helge Deller --- arch/parisc/kernel/head.S | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) -- 2.35.1 diff --git a/arch/parisc/kernel/head.S b/arch/parisc/kernel/head.S index b24f77748c22..e0a9e9657622 100644 --- a/arch/parisc/kernel/head.S +++ b/arch/parisc/kernel/head.S @@ -162,6 +162,15 @@ $pgt_fill_loop: /* FALLTHROUGH */ .procend +#ifdef CONFIG_HOTPLUG_CPU + /* common_stext is far away in another section... jump there */ + load32 PA(common_stext), %rp + bv,n (%rp) + + /* common_stext and smp_slave_stext needs to be in text section */ + .text +#endif + /* ** Code Common to both Monarch and Slave processors. ** Entry: @@ -371,8 +380,6 @@ smp_slave_stext: .procend #endif /* CONFIG_SMP */ -ENDPROC(parisc_kernel_start) - #ifndef CONFIG_64BIT .section .data..ro_after_init From patchwork Fri Mar 25 14:38:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12791642 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51048C433FE for ; Fri, 25 Mar 2022 14:38:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359354AbiCYOkT (ORCPT ); Fri, 25 Mar 2022 10:40:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359346AbiCYOkR (ORCPT ); Fri, 25 Mar 2022 10:40:17 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4EA4972FF for ; Fri, 25 Mar 2022 07:38:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1648219116; bh=lXyzy3GOxyMDK40biUVP97KgTYN+dTugnTrUHzWDMnE=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=MqHfZe+JMmtvH0QJNSdsoqSv1sp+OFwrD6PFGZcbXK7PlFEOJ0gNqX5/yfbFt6Fs1 d4vW9PeEcCPE91u5yFvOC8xOOpIP9Z0JjD0T1kClgxzyI8FL6Rwix70bNu07vcNSzX Gdugo/TK8oiSEqmQDDyllufn9fcWEgSaAdH0XueI= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.164.212]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MAfYm-1nMnmV3ihc-00B4Sd; Fri, 25 Mar 2022 15:38:35 +0100 From: Helge Deller To: linux-parisc@vger.kernel.org Cc: James Bottomley , John David Anglin Subject: [PATCH 11/12] parisc: Rewrite arch_cpu_idle_dead() for CPU hotplugging Date: Fri, 25 Mar 2022 15:38:32 +0100 Message-Id: <20220325143833.402631-11-deller@gmx.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220325143833.402631-1-deller@gmx.de> References: <20220325143833.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qfkGYRQY84vhTsxkx79aVaqeHkhaf2c1bcD7NFub9n4QnpshRGESAdrxLPjkQ2ko4YUpBW hJLLUg9zZsvIfz8uLTaOJMUn0gVLemuHpFvI8E4uIFWLjiyGM/by6x705GGL+oxGh6EMAzlpe 0D1VhNVzRm+//OGav78cY7p9khN25wr3NaL9s7S4K//6nsiUItZWZ3Clm+yrcNml5wL9rpX8Q oB8HK/xmL3A+plCKoKdE/dzrTJjvd4wj0CKZjx2TPEvw8YIyrhwbeBm3XPpFsLULJOPFXT9sY jipWUQMaeLlc7xT/XR93Ppdmz/6cmZW+hpetJUwPD3/2HsrSwaWKNIhPvMOzHajVsuThOJkC+ KL/scwd0dOiNYM= Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org Let the PDC firmware put the CPU into firmware idle loop with pdc_cpu_rendezvous() function. Signed-off-by: Helge Deller --- arch/parisc/kernel/process.c | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) -- 2.35.1 diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index ea3d83b6fb62..44fa89fbb280 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -46,6 +47,7 @@ #include #include #include +#include #define COMMAND_GLOBAL F_EXTEND(0xfffe0030) #define CMD_RESET 5 /* reset any module */ @@ -158,10 +160,35 @@ void release_thread(struct task_struct *dead_task) int running_on_qemu __ro_after_init; EXPORT_SYMBOL(running_on_qemu); -void __cpuidle arch_cpu_idle_dead(void) +/* + * Called from the idle thread for the CPU which has been shutdown. + */ +void arch_cpu_idle_dead(void) { - /* nop on real hardware, qemu will offline CPU. */ - asm volatile("or %%r31,%%r31,%%r31\n":::); +#ifdef CONFIG_HOTPLUG_CPU + idle_task_exit(); + + local_irq_disable(); + + /* + * Tell __cpu_die() that this CPU is now safe to dispose of. + */ + (void)cpu_report_death(); + + /* + * Ensure that the cache lines are written out. + */ + flush_cache_all_local(); + flush_tlb_all_local(NULL); + + /* + * Let PDC firmware put CPU into firmware idle loop. + */ + __pdc_cpu_rendezvous(); + + pr_warn("PDC does not provide rendezvous function.\n"); +#endif + while (1); } void __cpuidle arch_cpu_idle(void) From patchwork Fri Mar 25 14:38:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12791646 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1B5DC43219 for ; Fri, 25 Mar 2022 14:38:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353013AbiCYOkU (ORCPT ); Fri, 25 Mar 2022 10:40:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359345AbiCYOkR (ORCPT ); Fri, 25 Mar 2022 10:40:17 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A2F5972ED for ; Fri, 25 Mar 2022 07:38:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1648219116; bh=VeXH08U6o9RgNfldRtp2u1AmoHAErZ1QgI99hc7Lxd4=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=ixBkg8a01Qa8QJcF8zqDVFnZ3b2DYB+Q5HCI2omTIKmPhKDDdYAryQyPaykaFg6EL D5KlSx8Z4QHlJRoLbMK3GSRr231DESMPFUd5VC6SV5waxHPzO0igLQ9ZjGXjjM6OgD b0MuwASLnkw3EnLlKJ0dqfhaA0ZKRcV6rRmay6RI= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.164.212]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MRTNF-1njV2v079B-00NRLG; Fri, 25 Mar 2022 15:38:36 +0100 From: Helge Deller To: linux-parisc@vger.kernel.org Cc: James Bottomley , John David Anglin Subject: [PATCH 12/12] parisc: Implement __cpu_die() and __cpu_disable() for CPU hotplugging Date: Fri, 25 Mar 2022 15:38:33 +0100 Message-Id: <20220325143833.402631-12-deller@gmx.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220325143833.402631-1-deller@gmx.de> References: <20220325143833.402631-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:XDywusJ0V1cHWLP1BMVEsjCYvhcfaOEq1Yq4YBninT++W1r6dMG BScOzHo0G9BHFYTx3sCxveZyMkUCTgokKWvbGsjjoMNW8rwBTxBQLYrFzSChpFvXU6tpHA/ TG0GReI0Ls8vJSptxm/9i2uTx7YcdQGHrJCWfPWwhLQlLunwgs027rRC/D/zIX0bgiMP/Ql Zqqu5xEEVaBvbRnoMcn0w== X-UI-Out-Filterresults: notjunk:1;V03:K0:FeNlkaIqG9c=:3Y+5rLGqtPq9Wyf7C1lG1F HBwB/d1Wgh9KpRNLJifCj9VHSfJgQ83e1QmSZanSIOLcEFyKRGQ0R7r9W1P2BEwJ6DAfL5U/w 9pWy3t1uYmmFbbECCHWkV7ssXCb94y+1lOmN7SUBVLmA/X1Bb1raTiLAKygfDvHFC82K3Qo4V 9joLYB4Uu9ZdLonYGS4g1B9QomwwMNYdfy1UVz3DclV+5rjFyiFElIsf/syExh3t/2ExcidXk JRDiMeSbtUW1SdBW7EXcFRPf0nurbwFVQiUzdNad8QMFoRTYVBv1UBVmvmZYkBgERrJe/xmyF 5qadufwGUmpTHa9tUyvtOBYKsdjWbffgcLIwqwC9k7d9JHeDTdO3WmA+DKarrnPZgejzlMFjU FKvM06g19ws91F/zX9h7ARsBVcIY6gaRQkpdCGwXcvgyBMWq1dKHHQYwAhLg6fT3W7bQ/VY2W dSKMB1VTO+Axcbf8tH2pUmpndwbvdEUIeLBv5jlks8EoOXlRBXm7bZy6Dfxon1JwGYXX3EvCG HE7BEPecYbBLFPrmya6y5HrjNp5RnigaUXIxbkGEIGaX6czWAofzm/Jiwerau+TuOaXk1trTz 8m8M+EyCyFZVUG9yVhSy6v4dPqgXTuqH2YKBwkEnTFgubCxmFXnJVST+/nD5+VR8PcevijKHm sOMJbuN9Kb9wdH3S8CYDqGQsZCXBCLCo6QxVMYpzQrEK29M+myjODLSGod3wLDSTo+PZ1+Tgz R608cHE4B06XrjOdR3HrVHKVwfAyiV6djSIZGRH1CIhEuy8C1TJAU3RyRpEKmUPDlA5AmupRR IaaPCkf2lzxlxAjF9PXkyxCQWb0FHntC3vXzsd05KOsNF0z+m6WxLkSCy40oVT36ON0gnwYAy 5TUGpOmwY+QT/kVGMfnLl7FuAkYuep008L4zrSroTLrt5zwsaIcLmHzhBPuEe40eqoK08g0Tt LmvtwSthoi2e0dSntayLJZudOdb3hIcKO1A7QbF05gQw7UIiuTWG6nMujGpqUNwstdG8gs3VV 95zAboBH6AD65c9SwkagfYVaR7cylWDIlKA5EiVfaLvS0EYysrJmbEV/WQmT2D6G3H1SYnQJk 8Cvy+fI0mc7qFo= Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org Add relevant code to __cpu_die() and __cpu_disable() to finally enable the CPU hotplugging features. Reset the irq count values in smp_callin() to zero before bringing up the CPU. Use "chcpu -d 1" to bring CPU1 down, and "chcpu -e 1" to bring it up. Signed-off-by: Helge Deller --- arch/parisc/Kconfig | 1 + arch/parisc/include/asm/smp.h | 9 +--- arch/parisc/kernel/smp.c | 80 +++++++++++++++++++++++++++++++++-- 3 files changed, 79 insertions(+), 11 deletions(-) -- 2.35.1 diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index 6bd42c82a019..ec5bb9626d06 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig @@ -56,6 +56,7 @@ config PARISC select HAVE_ARCH_TRACEHOOK select HAVE_REGS_AND_STACK_ACCESS_API select GENERIC_SCHED_CLOCK + select GENERIC_IRQ_MIGRATION select HAVE_UNSTABLE_SCHED_CLOCK if SMP select LEGACY_TIMER_TICK select CPU_NO_EFFICIENT_FFS diff --git a/arch/parisc/include/asm/smp.h b/arch/parisc/include/asm/smp.h index 2279ebe5e2da..94d1f21ce99a 100644 --- a/arch/parisc/include/asm/smp.h +++ b/arch/parisc/include/asm/smp.h @@ -44,12 +44,7 @@ static inline void smp_send_all_nop(void) { return; } #define NO_PROC_ID 0xFF /* No processor magic marker */ #define ANY_PROC_ID 0xFF /* Any processor magic marker */ -static inline int __cpu_disable (void) { - return 0; -} -static inline void __cpu_die (unsigned int cpu) { - while(1) - ; -} +int __cpu_disable(void); +void __cpu_die(unsigned int cpu); #endif /* __ASM_SMP_H */ diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c index a32a882a2d58..60cc33fd345c 100644 --- a/arch/parisc/kernel/smp.c +++ b/arch/parisc/kernel/smp.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -309,7 +310,7 @@ smp_cpu_init(int cpunum) * Slaves start using C here. Indirectly called from smp_slave_stext. * Do what start_kernel() and main() do for boot strap processor (aka monarch) */ -void __init smp_callin(unsigned long pdce_proc) +void __cpuinit smp_callin(unsigned long pdce_proc) { int slave_id = cpu_now_booting; @@ -339,6 +340,19 @@ int smp_boot_one_cpu(int cpuid, struct task_struct *idle) const struct cpuinfo_parisc *p = &per_cpu(cpu_data, cpuid); long timeout; +#ifdef CONFIG_HOTPLUG_CPU + int i; + + /* reset irq statistics for this CPU */ + memset(&per_cpu(irq_stat, cpuid), 0, sizeof(irq_cpustat_t)); + for (i = 0; i < NR_IRQS; i++) { + struct irq_desc *desc = irq_to_desc(i); + + if (desc && desc->kstat_irqs) + *per_cpu_ptr(desc->kstat_irqs, cpuid) = 0; + } +#endif + /* Let _start know what logical CPU we're booting ** (offset into init_tasks[],cpu_data[]) */ @@ -430,10 +444,68 @@ void smp_cpus_done(unsigned int cpu_max) int __cpu_up(unsigned int cpu, struct task_struct *tidle) { - if (cpu != 0 && cpu < parisc_max_cpus && smp_boot_one_cpu(cpu, tidle)) - return -ENOSYS; + if (cpu_online(cpu)) + return 0; + + if (num_online_cpus() < parisc_max_cpus && smp_boot_one_cpu(cpu, tidle)) + return -EIO; + + return cpu_online(cpu) ? 0 : -EIO; +} + +/* + * __cpu_disable runs on the processor to be shutdown. + */ +int __cpu_disable(void) +{ +#ifdef CONFIG_HOTPLUG_CPU + unsigned int cpu = smp_processor_id(); + + remove_cpu_topology(cpu); + + /* + * Take this CPU offline. Once we clear this, we can't return, + * and we must not schedule until we're ready to give up the cpu. + */ + set_cpu_online(cpu, false); + + /* + * disable IPI interrupt + */ + disable_percpu_irq(IPI_IRQ); + + /* + * migrate IRQs away from this CPU + */ + irq_migrate_all_off_this_cpu(); + + /* + * Flush user cache and TLB mappings, and then remove this CPU + * from the vm mask set of all processes. + * + * Caches are flushed to the Level of Unification Inner Shareable + * to write-back dirty lines to unified caches shared by all CPUs. + */ + flush_cache_all_local(); + flush_tlb_all_local(NULL); - return cpu_online(cpu) ? 0 : -ENOSYS; + /* disable all irqs, including timer irq */ + local_irq_disable(); +#endif + return 0; +} + +/* + * called on the thread which is asking for a CPU to be shutdown - + * waits until shutdown has completed, or it is timed out. + */ +void __cpu_die(unsigned int cpu) +{ + if (!cpu_wait_death(cpu, 5)) { + pr_crit("CPU%u: cpu didn't die\n", cpu); + return; + } + pr_debug("CPU%u: shutdown\n", cpu); } #ifdef CONFIG_PROC_FS