Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1828135imm; Mon, 3 Sep 2018 10:28:46 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZgmq3KQjFMl+zU467g7sTq3BcSAhy5Ynu+9T0uEa0DRLNh1WV+2Ttut7WIbkv7MagwiTZh X-Received: by 2002:a63:5fc8:: with SMTP id t191-v6mr27418326pgb.183.1535995726354; Mon, 03 Sep 2018 10:28:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535995726; cv=none; d=google.com; s=arc-20160816; b=awWyX3kF29hrEdbw43jmms9vadChbTVHO8dSd6ddB2Yvs/FcEuv5odTGAhcAvub/Q7 RYmVv8NMmuvutuqL2pFC3kOzy2Y2DXKOhzmUw9yma3hfXtKGGICuZnmO/gG+bsMON/+k Fj3x8OlXaTSEBiuW1c7dM6jBqrA7+08wgpYRIh9obl+eoQLA74Ym/v0jmTwBL6OzMf4j y1FptTy8jxXDQJUjx7iI69uFSpqyCqOSJw5heqyS+E1QMTcSPt/9IMGSL5IqIA9grkrp 4/JIGzF8+2tSlcYZCphOkJlgLsETrtQs9iR3yxW0CfqFqotE1mkWvsOpgPDIxdXXnxRy VZig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=G+x34kssiINEgHAdpetzpWekTSdpBR7Rvd/7ZCjEJe4=; b=z/wH2xVJQwcEVf8iiZexSqG6A+KpOAB+ukN6I5hGyHpgUv2GNsilj5/lX5Jx3h1ExM PGjxA0z+UbYGYdaenVm43ArxDmUMp/x5jFQzZBQeueS1qZwZARhmZdxhr4l9UZ90V0m7 v2APgTclpBqsO8psCC/Qhn+eERuoZwE1AMuEHwy8/b9+CK+0LM2q7epcR8dqKx+rQ7hs Wi1dtaPxesHHV7lXYvbXRhCy5uICxC5wK0uIb3V6A5eV6Hw5zlYa9XFicy0wGsuWbjPd MtaMyVhEjRaWayD+/YtHM3hMCtvtBzadIVAiZOLrQ8alXxIjAm6PLTwdpySn7R6xv8SC AYiQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 184-v6si18408165pgj.421.2018.09.03.10.28.31; Mon, 03 Sep 2018 10:28:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730906AbeICVsN (ORCPT + 99 others); Mon, 3 Sep 2018 17:48:13 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:45978 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728731AbeICVsM (ORCPT ); Mon, 3 Sep 2018 17:48:12 -0400 Received: from localhost (ip-213-127-74-90.ip.prioritytelecom.net [213.127.74.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 5E921D24; Mon, 3 Sep 2018 17:27:04 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Martin Schwidefsky Subject: [PATCH 4.14 145/165] s390/numa: move initial setup of node_to_cpumask_map Date: Mon, 3 Sep 2018 18:57:11 +0200 Message-Id: <20180903165703.393198898@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180903165655.003605184@linuxfoundation.org> References: <20180903165655.003605184@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Martin Schwidefsky commit fb7d7518b0d65955f91c7b875c36eae7694c69bd upstream. The numa_init_early initcall sets the node_to_cpumask_map[0] to the full cpu_possible_mask. Unfortunately this early_initcall is too late, the NUMA setup for numa=emu is done even earlier. The order of calls is numa_setup() -> emu_update_cpu_topology(), then the early_initcalls(), followed by sched_init_domains(). Starting with git commit 051f3ca02e46432c0965e8948f00c07d8a2f09c0 "sched/topology: Introduce NUMA identity node sched domain" the incorrect node_to_cpumask_map[0] really screws up the domain setup and the kernel panics with the follow oops: Cc: # v4.15+ Signed-off-by: Martin Schwidefsky Signed-off-by: Greg Kroah-Hartman --- arch/s390/numa/numa.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) --- a/arch/s390/numa/numa.c +++ b/arch/s390/numa/numa.c @@ -134,6 +134,8 @@ void __init numa_setup(void) { pr_info("NUMA mode: %s\n", mode->name); nodes_clear(node_possible_map); + /* Initially attach all possible CPUs to node 0. */ + cpumask_copy(&node_to_cpumask_map[0], cpu_possible_mask); if (mode->setup) mode->setup(); numa_setup_memory(); @@ -141,20 +143,6 @@ void __init numa_setup(void) } /* - * numa_init_early() - Initialization initcall - * - * This runs when only one CPU is online and before the first - * topology update is called for by the scheduler. - */ -static int __init numa_init_early(void) -{ - /* Attach all possible CPUs to node 0 for now. */ - cpumask_copy(&node_to_cpumask_map[0], cpu_possible_mask); - return 0; -} -early_initcall(numa_init_early); - -/* * numa_init_late() - Initialization initcall * * Register NUMA nodes.