Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3641799imm; Thu, 17 May 2018 12:04:24 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpB5TkUdizxMs5umTbRWZPfY9mxal8hpUQWQ9XyUBxhhzmZCiZPscyYE5Q9bkZpE0vkKgUc X-Received: by 2002:a62:c987:: with SMTP id l7-v6mr6130997pfk.221.1526583864594; Thu, 17 May 2018 12:04:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526583864; cv=none; d=google.com; s=arc-20160816; b=vJrcLkkGsJ5OweiNL9ffTHg/XVBey46n8SBDuXEBCLxPLB+ghYnQ6Q1ArgyQFngSWP sh1UrSrMRWbF/KYQfwZclJ+6oBSPCXvv3vDTBIClf1XRU02+996uVTcZ0ojmg1VKynkU GvznN4lEqKlmAyHakaMYSjSt1NRigOdtwtU4+E2Sqxt+Y+iLMj0C7h5OnzHT0IFC6rmS jAJ5ntnUQY8QOyGmIY+0m1elc166xUzZ3wv7CYTfB/4PBoY9SP94KF+iogVVnHu2CLPP P4BlAOGdywajcx6Hg48VR1dwJeL5jDtrcG+hAlV8iYAfa6vF1pGnN+NhZSXrAHwf339c OIfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:arc-authentication-results; bh=yG4J6FqNgiD9VnF3rSNYg7ulHA5RV2IcqZCOGueJ1QM=; b=ddbRyRcwEbsTPjd3YYCn90CHEJQuF5GfrIzDpP2oVFtX//LgQh06CwKzTbIV4NrAtB qH/DFgxJXlMwXiD2rAZLp3r74/uidhxSeH3ctmW8chPSeaw3/O6mSNray6OYWKdsqn1G 8uEro89rek5D1SgZDqXvjrlO5pOi6A9dEdZZ9l5qfZchcCvhi3bbY8vj6Dti41yTxM6n jcPA+3hfoVoIVkubWnNWb4kQ7QFCCPTwl86MPufD9aneqRm78nb5y3Ngj31MTloXs2zl 23OoWIPXmQXZ3blO0tN9WadvP6j7+zGinfodmSQAgaouXUDEoxYd5RQRne48oMMVbiWg S7ng== 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 d20-v6si5487533pfn.213.2018.05.17.12.04.08; Thu, 17 May 2018 12:04:24 -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 S1751971AbeEQTD5 (ORCPT + 99 others); Thu, 17 May 2018 15:03:57 -0400 Received: from terminus.zytor.com ([198.137.202.136]:33207 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751695AbeEQTD4 (ORCPT ); Thu, 17 May 2018 15:03:56 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id w4HJ3k3m2132803 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 17 May 2018 12:03:46 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w4HJ3kZZ2132800; Thu, 17 May 2018 12:03:46 -0700 Date: Thu, 17 May 2018 12:03:46 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Thomas Gleixner Message-ID: Cc: hpa@zytor.com, rick@microway.com, mingo@kernel.org, tglx@linutronix.de, linux-kernel@vger.kernel.org Reply-To: rick@microway.com, hpa@zytor.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@kernel.org In-Reply-To: References: To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/urgent] x86/apic/x2apic: Initialize cluster ID properly Git-Commit-ID: fed71f7d98795ed0fa1d431910787f0f4a68324f X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, T_DATE_IN_FUTURE_96_Q autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: fed71f7d98795ed0fa1d431910787f0f4a68324f Gitweb: https://git.kernel.org/tip/fed71f7d98795ed0fa1d431910787f0f4a68324f Author: Thomas Gleixner AuthorDate: Thu, 17 May 2018 14:36:39 +0200 Committer: Thomas Gleixner CommitDate: Thu, 17 May 2018 21:00:12 +0200 x86/apic/x2apic: Initialize cluster ID properly Rick bisected a regression on large systems which use the x2apic cluster mode for interrupt delivery to the commit wich reworked the cluster management. The problem is caused by a missing initialization of the clusterid field in the shared cluster data structures. So all structures end up with cluster ID 0 which only allows sharing between all CPUs which belong to cluster 0. All other CPUs with a cluster ID > 0 cannot share the data structure because they cannot find existing data with their cluster ID. This causes malfunction with IPIs because IPIs are sent to the wrong cluster and the caller waits for ever that the target CPU handles the IPI. Add the missing initialization when a upcoming CPU is the first in a cluster so that the later booting CPUs can find the data and share it for proper operation. Fixes: 023a611748fd ("x86/apic/x2apic: Simplify cluster management") Reported-by: Rick Warner Bisected-by: Rick Warner Signed-off-by: Thomas Gleixner Tested-by: Rick Warner Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1805171418210.1947@nanos.tec.linutronix.de --- arch/x86/kernel/apic/x2apic_cluster.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kernel/apic/x2apic_cluster.c b/arch/x86/kernel/apic/x2apic_cluster.c index 8b04234e010b..7685444a106b 100644 --- a/arch/x86/kernel/apic/x2apic_cluster.c +++ b/arch/x86/kernel/apic/x2apic_cluster.c @@ -116,6 +116,7 @@ static void init_x2apic_ldr(void) goto update; } cmsk = cluster_hotplug_mask; + cmsk->clusterid = cluster; cluster_hotplug_mask = NULL; update: this_cpu_write(cluster_masks, cmsk);