Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1163035imm; Wed, 1 Aug 2018 11:13:27 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcCI7wjV+h9prbruv8cCtvl0hqAMyJh1wj9Ytry6mLZRF2AuAVfKR4nFRCZNuBFToIv7QU4 X-Received: by 2002:a62:384:: with SMTP id 126-v6mr27783386pfd.11.1533147207722; Wed, 01 Aug 2018 11:13:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533147207; cv=none; d=google.com; s=arc-20160816; b=sqqqmrnEdm/0/AqvwFfrOnqzxwEYrQCv/BAzDw7I4cXmpPYN4jHAEnK8uPgJU5w7Jt 07otf77RQyKFK63x0ZrR1kMGhcryejN0YBpnkPJmjJr3UvfPz1g7yDlSfebxx4U0MIsG gdQg4329RhA6zRDJ1m5FTqoOeg38eMqu4GwAooif0XLjmNa5SCImx7p141jr/fgNb1pm Cnf/sbzL10CwYtQzKrQiIGGkAeFL3c1Y+ZZ0I/cFbaHtE1OesMwSZHDNwr4EUkuvZt1e TBxW/DJePzpcMOJXIgCC2uWWj6aKLzM1N33lHQNW4AUb8+61/Gkjd6iGNtc1QR9LpxFF tpFg== 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=pPDOR67E42A6isnAYRiHdWlN7/2ZuFIhiPtU82lMgvM=; b=K8XxLCak4V3qyzuuIS2uzRURRyT0Kp+CfseP1twye2nn0D/lPBcKB9FSRFdZRxwaxB svBMb6gla6p1+9rXlKoym2np5Boz3Hp9VQwj8JhNdl3qNYgp/kT+8mtS7ka163OtGNnK uExdRbGI29Y+tfjDzQHx6aG/TZR5g1CsKW9WVXi4D/vOBDdlPTnWVTSgoheGEhsZq5Ot AOyebafTgMenvI2ZfZc1Gy3T6kZ01sCLnkEkjL+9cEWwsWYPPbzB3SPx79umuUE6RJ7j 7uMKBu8rfxlAaJs9vcKN9QGJrorV2gY98BBlN6kmPYvYV/nvURsXhPnENxwSKoi6nChQ g4/g== 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 t19-v6si17974308plj.334.2018.08.01.11.13.12; Wed, 01 Aug 2018 11:13:27 -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 S1732323AbeHAT7X (ORCPT + 99 others); Wed, 1 Aug 2018 15:59:23 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:49926 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390328AbeHATIe (ORCPT ); Wed, 1 Aug 2018 15:08:34 -0400 Received: from localhost (D57E6652.static.ziggozakelijk.nl [213.126.102.82]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id BEBFC13D3; Wed, 1 Aug 2018 17:16:07 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Scott Wood , Borislav Petkov , Thomas Gleixner , Ashok Raj , Clark Williams , Pei Zhang , x86-ml , Sasha Levin Subject: [PATCH 4.14 086/246] x86/microcode: Make the late update update_lock a raw lock for RT Date: Wed, 1 Aug 2018 18:49:56 +0200 Message-Id: <20180801165015.837161149@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180801165011.700991984@linuxfoundation.org> References: <20180801165011.700991984@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: Scott Wood [ Upstream commit ff987fcf011d20c53b3a613edf6e2055ea48e26e ] __reload_late() is called from stop_machine context and thus cannot acquire a non-raw spinlock on PREEMPT_RT. Signed-off-by: Scott Wood Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Acked-by: Thomas Gleixner Cc: Ashok Raj Cc: Clark Williams Cc: Pei Zhang Cc: x86-ml Link: http://lkml.kernel.org/r/20180524154420.24455-1-swood@redhat.com Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- arch/x86/kernel/cpu/microcode/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/arch/x86/kernel/cpu/microcode/core.c +++ b/arch/x86/kernel/cpu/microcode/core.c @@ -70,7 +70,7 @@ static DEFINE_MUTEX(microcode_mutex); /* * Serialize late loading so that CPUs get updated one-by-one. */ -static DEFINE_SPINLOCK(update_lock); +static DEFINE_RAW_SPINLOCK(update_lock); struct ucode_cpu_info ucode_cpu_info[NR_CPUS]; @@ -560,9 +560,9 @@ static int __reload_late(void *info) if (__wait_for_cpus(&late_cpus_in, NSEC_PER_SEC)) return -1; - spin_lock(&update_lock); + raw_spin_lock(&update_lock); apply_microcode_local(&err); - spin_unlock(&update_lock); + raw_spin_unlock(&update_lock); /* siblings return UCODE_OK because their engine got updated already */ if (err > UCODE_NFOUND) {