Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1835307imm; Mon, 3 Sep 2018 10:39:38 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda5JtsJVNpH/fnwZgUxUULzW1S39nlH+3EIDCssalZk3r+wP437vyJl+9B30nhyawnOwvgR X-Received: by 2002:a62:868b:: with SMTP id x133-v6mr27756358pfd.252.1535996378325; Mon, 03 Sep 2018 10:39:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535996378; cv=none; d=google.com; s=arc-20160816; b=gOfTwcVWT18eXeNPQnbV2+LRzHWPKcIO0O8FRjOVFpncpEDeBPjrb9sxuwmgPmpdoA jXnOaG5+dPGeygeo+8slE1YOzI95iR5BfpWg1tzZJF9fmbkF2NcVzP8OXXHhUsyNeLyH VyfiwkrkBN0H5cbGk36a/YZxLXgrYZP3sZ/lW8ChSUpg8evxndMDVR8rGwIiwZxUQZ71 gARkih+j0MnJRsRyn5T08vDXpHifSl/6TzBhMQmuFlE0vF7JS3rfOuHi+wK6a5RUXPzY 5JxPxYW8PVBlg019HeT4VqJDjWYxi7b1RI9OioODzQ9wyNUMY33F2iANpUSnBa6inA2c KQlQ== 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=4lm1ogeOc6MPqrykQ7gemXQrwNulfdDJaROHztAL/ys=; b=uN1gPKF4KHgJIPPNf3TnZaJcjmxHKpxmK2NgMfZdQtJTNIzJWMstddxJYqWDs83vuk o2zpcQNrtLt62t+IZnalD7Xzt+eNf1MaE7KcWxCeQEibAbtgaRTvj0ueBc7Hekfz+kn7 lhVBK/DUmeZxT/Ncn+grK2a8zoggm/VlaOAD/q6vOeUTAWFAgcqG+/g8KP8Z85ge4eNX eQc+8ahiBST1KZyN9lUFSbCmK1mjaPXMF3ED86k58iNzUUCib183eV5gY1oS6SiSDcQx fqeZhrbtuQeoOZSmvB2q21jQTl/+NkpmDEvLiX1j2olP5xkQ1//Sx7+BmBe16rjWwY3B QPrQ== 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 y63-v6si17690781pgd.435.2018.09.03.10.39.23; Mon, 03 Sep 2018 10:39:38 -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 S1731731AbeICV65 (ORCPT + 99 others); Mon, 3 Sep 2018 17:58:57 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:48750 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726384AbeICV64 (ORCPT ); Mon, 3 Sep 2018 17:58:56 -0400 Received: from localhost (ip-213-127-74-90.ip.prioritytelecom.net [213.127.74.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id DC2A3A95; Mon, 3 Sep 2018 17:37:44 +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.18 091/123] s390/numa: move initial setup of node_to_cpumask_map Date: Mon, 3 Sep 2018 18:57:15 +0200 Message-Id: <20180903165723.375178687@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180903165719.499675257@linuxfoundation.org> References: <20180903165719.499675257@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.18-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.