Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp801280imm; Mon, 21 May 2018 14:44:45 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpxX1Rlc3CS/ULt/y3CCwmx197Q5Fnu2LP/v7QR7IhHIBBbAUOTCe4OtGSsWS8SN7fOlnqH X-Received: by 2002:a62:6105:: with SMTP id v5-v6mr21490388pfb.197.1526939085636; Mon, 21 May 2018 14:44:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526939085; cv=none; d=google.com; s=arc-20160816; b=Kje0pqWLGXwenPhpw/MovL/k24GYv+b3lBpBMPTLXT0Vw9mto62xppu/pHMyaHkqCK NVtYrJ2oxU9/GTJVg2JtmA49aQFu8C4BV9DojOqzl5IYkTzTMjq5vP6D0YfsPV+ZMEFR P6IczDqh2RmasrMH1Xdsln4s93VHqxH4b1A69GB9TfBnbZW8QYcbdiSXtLoqyd5rz8S5 RGgA0C2jPe2ncPhWW/9dAVctt36MYud5aV9cNhgDkc7Ptdx+YwwT/bjHoBf4q0DaN+K+ QUCO4tuV92aVdSfSlKhGIDZ+b85/s6RQDJsyZTI93AHK28MXbJeZQPMt2ChL3BCU6NGY ZGAQ== 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:dkim-signature :arc-authentication-results; bh=FDJXtTpBParWypUTTBavFRqJjM3TpsxlMoDnHT4iyBA=; b=tvTWV6E7PaZT48YEAMxjvNJJ4HXvrLUVWlD9pgwS6zC7TsR1tN9oBrWIR6cLnW6V3r d7QCViHrU4Qil9DOxuEUm6R+CLwfnD7wm8+p6a9x2BQnvKGaDiVhQD/K3E7YyeIJEAaP ypQTfHFZGLqlNMCyOEi/75ytq/8j6WK8g0pKsqCDY/cpbLQm9YQFJeLu6/PBB93DsSKb mogqrOpzm6km0cohbY2B72rB1U1EzVfb26nKS32FXwjxYXnD5ciuIIRW5pwbfjYEUIWW dq47gkIyYEKv6MDJseteOWuYXlC0dOZFjHQaYP4YuAOLHhYIUsE9TD5VGZBErsYAXpY7 GtOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Ja+DpWCC; 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 t71-v6si11899683pgd.7.2018.05.21.14.44.31; Mon, 21 May 2018 14:44:45 -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; dkim=pass header.i=@kernel.org header.s=default header.b=Ja+DpWCC; 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 S1754518AbeEUVoM (ORCPT + 99 others); Mon, 21 May 2018 17:44:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:39122 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932223AbeEUVYN (ORCPT ); Mon, 21 May 2018 17:24:13 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 29C2B20875; Mon, 21 May 2018 21:24:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1526937852; bh=vM7roPDc8m5+0ELFEUQHqHa484uCObls2K2ygF/wkZk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ja+DpWCCdg3hvjd39BG2oRZy7ulupt6XYIWwqisKCi6Z+ZzFuWVyk6pAbPAVZ5K+x Z9Ebdt6qu8CvTdHRqZQTyA5pRV5R1MJb448raLpfphGs0o2QdGQSORXoBwscVZbnmr YDcOVnvg0caskD86TO7JX1j/3/F8J2C8AXHNs0GI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Rick Warner , Thomas Gleixner Subject: [PATCH 4.16 049/110] x86/apic/x2apic: Initialize cluster ID properly Date: Mon, 21 May 2018 23:11:46 +0200 Message-Id: <20180521210509.104011988@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180521210503.823249477@linuxfoundation.org> References: <20180521210503.823249477@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.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Thomas Gleixner commit fed71f7d98795ed0fa1d431910787f0f4a68324f upstream. 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 Signed-off-by: Greg Kroah-Hartman --- arch/x86/kernel/apic/x2apic_cluster.c | 1 + 1 file changed, 1 insertion(+) --- 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);