Received: by 10.213.65.68 with SMTP id h4csp13452imn; Tue, 27 Mar 2018 20:24:21 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+1YcqtaDQUzIMpyePzRa1MTdysSILN6onJnQgng82YPLMj4w6obF37HRe/KNboZ9o5UJ12 X-Received: by 10.98.70.199 with SMTP id o68mr1514423pfi.169.1522207461336; Tue, 27 Mar 2018 20:24:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522207461; cv=none; d=google.com; s=arc-20160816; b=p9i++Eo5jZqfnBAbtEKatSu6mlyXdspWRI1mwnkBy6qkmycEdO3Uu/cgyn4CGTqN7n x9vj02oxAG8AiOtdCgTqC8JuB+55FMemrjZ19XI+eCwLXZcYwjsyOTCsdAXm8erKhr0H 6D4VmYMik8vChh1A/KnkuyhhEZm53jodFHiRL8bG62fyP4rqsrXlkOHVAhra+h8/PQdZ VBD7qAaHHMFrgxVSzuWXASkfs5gTBSnSmogIycO97EdzOCKhgztyh3dLmUK97mYOQiEx CbeA8SXT1Y0h61R4aZVMUUceov1F/M6VnNgGTlX0qn+s9Htjr4dggd0v30+4MqtoCoEW J2MQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=qNqKPL1XKSPBMeWITR2P/d6kMDBoqrhynwU8hc5HY40=; b=fiuq5K+yKZi9Eew8PJBiBqJhNLoTK82g8m0ZIZ4lIEYz8LwbwGdYKQh8vm+CJcG7dI 4hQqwEabdMGtD2PpGpqME5qCsUi/Ba6BiLB+8SHdq/qpAnXwqCCSsFnYzl2Pup729+IC r6myFgzgdXSrY+c8moAswVY6R1lpiOKB2x/A0QY6TKj6H9SaFfaBrJSXHPFq7Fe9Y8BD BF/LLuFR39n1lUqiKD+yOvrFzkYtBBq/DI1XMZH5DP5ww0HzCWIQPRE/knvDyI3EX/QT tKcSwsG3IRlLjs7THFFu8tjY0oToZMFOEg6Decbj923VKn88nNt6+HEQaJvnfrMA9X1m N3wA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=mII3/SDt; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p3si1823467pgr.782.2018.03.27.20.24.06; Tue, 27 Mar 2018 20:24:21 -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=@google.com header.s=20161025 header.b=mII3/SDt; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752043AbeC1DWp (ORCPT + 99 others); Tue, 27 Mar 2018 23:22:45 -0400 Received: from mail-pl0-f67.google.com ([209.85.160.67]:44530 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750947AbeC1DWn (ORCPT ); Tue, 27 Mar 2018 23:22:43 -0400 Received: by mail-pl0-f67.google.com with SMTP id 9-v6so756821ple.11 for ; Tue, 27 Mar 2018 20:22:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=qNqKPL1XKSPBMeWITR2P/d6kMDBoqrhynwU8hc5HY40=; b=mII3/SDtdwN8zogyWeWMKwrJVZqmje9WHdNwZndRFo9E+qQcgs0yLbsV7p54ZSL6bL fIWNQ5TkAd9p4GTgWRjMaeU5xiYlFzv6KT40QSegYW7mnTsMB10gxl7MJug09PLF227r lrkAqgHXPFnI1UCMHhC5rgRRnrrBSH1zzleGgWLQREwUQSvoUokftJkGuFAzSzyfQrw1 jGplT/MVc/rT9g7faj6s70tjD3PgDDntB67HYR2nNYg7nFL/jcXjOHBYITR/mQ+Gkx86 d+7h86KEQDIEfo2VQtd7XZF7xfVtIJazaDbd6sarq+DiJGIuHgzRwrkHrQguCkSZUPak Sv1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=qNqKPL1XKSPBMeWITR2P/d6kMDBoqrhynwU8hc5HY40=; b=TjByCWmUhs33/iXhkrFhTA6DzxulNo5FDQbpFHDR3cAMHutrtHe707YrAgUWBqf0c8 rr1SUtMqRU7yYTS0wAecWE1tzEZ09bt/bxYTRLBdowLcbaCd8daAEEb1TyeNHF6Xsk8Y u/JIQqTM25/ZNl0S88/lqsYpkfAMaotRRMLFE1YmZUj1isYWPPD+jz1BYH/0QQ65pLFs IIQ+bgARBOgjp5N9r+M9wVpKwTBd7VkXmjw2KGyTigvcJRyJn1VJWnxOr12L9eUUQkNY HuPJ0OrhtM0cPTae/Qhm8URIESW+4o0JlG/xPznCmROG/ggsKmXjvk23dIGTCY8aipFk WvXg== X-Gm-Message-State: AElRT7E7CjSN58wpMKsx0hc9DqWni/uzxLXT8I4IeCgFXzaNiVDWVUNO PXwScgb+uzVhm6oRx+8b+ZeGDvuUY+c= X-Received: by 2002:a17:902:b10c:: with SMTP id q12-v6mr1925815plr.399.1522207362766; Tue, 27 Mar 2018 20:22:42 -0700 (PDT) Received: from localhost ([2620:15c:2c4:201:f5a:7eca:440a:3ead]) by smtp.gmail.com with ESMTPSA id f4sm5118002pfn.150.2018.03.27.20.22.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 27 Mar 2018 20:22:40 -0700 (PDT) From: Eric Dumazet To: x86 Cc: lkml , Eric Dumazet , Eric Dumazet , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , Borislav Petkov Subject: [PATCH] x86, msr: fix rdmsrl_safe_on_cpu() Date: Tue, 27 Mar 2018 20:22:33 -0700 Message-Id: <20180328032233.153055-1-edumazet@google.com> X-Mailer: git-send-email 2.17.0.rc1.321.gba9d0f2565-goog Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When changing rdmsr_safe_on_cpu() to schedule, I missed that __rdmsr_safe_on_cpu() was also used by rdmsrl_safe_on_cpu() Lets make rdmsrl_safe_on_cpu() a wrapper instead of copy/pasting the code I added for the completion handling. Fixes: 07cde313b2d2 ("x86/msr: Allow rdmsr_safe_on_cpu() to schedule") Signed-off-by: Eric Dumazet Reported-by: kbuild test robot Cc: "H. Peter Anvin" Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov --- arch/x86/lib/msr-smp.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/arch/x86/lib/msr-smp.c b/arch/x86/lib/msr-smp.c index 761ba062afdaf7f7d0603ed94ed6cc3e46b37f76..fee8b9c0520c9954e3cf9093332e1a9b53009b8b 100644 --- a/arch/x86/lib/msr-smp.c +++ b/arch/x86/lib/msr-smp.c @@ -225,16 +225,13 @@ EXPORT_SYMBOL(wrmsrl_safe_on_cpu); int rdmsrl_safe_on_cpu(unsigned int cpu, u32 msr_no, u64 *q) { + u32 low, high; int err; - struct msr_info rv; - memset(&rv, 0, sizeof(rv)); + err = rdmsr_safe_on_cpu(cpu, msr_no, &low, &high); + *q = (u64)high << 32 | low; - rv.msr_no = msr_no; - err = smp_call_function_single(cpu, __rdmsr_safe_on_cpu, &rv, 1); - *q = rv.reg.q; - - return err ? err : rv.err; + return err; } EXPORT_SYMBOL(rdmsrl_safe_on_cpu); -- 2.17.0.rc1.321.gba9d0f2565-goog