Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3247520yba; Mon, 8 Apr 2019 14:30:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqzPvE7X5nteem62wrnd/WADs7ebFDXhGMAE6cikNaf3BmUvgoH7/MLxVDyhD4LHm5aWZTDW X-Received: by 2002:aa7:884b:: with SMTP id k11mr32324188pfo.49.1554759016080; Mon, 08 Apr 2019 14:30:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554759016; cv=none; d=google.com; s=arc-20160816; b=Fl4stk5846DSQyBaEpXz/UIcIAA/KujEeNKjTWfJHBKVcLO7+i2FGFovqs+RLuL3Ig AWanIFqEVXAh5uu0vmmkrwQ5xHhjjonBcDW3FLM7oDKcqoi6IkkAoTe9USEoithl+zuT JVGHyNeFaeeHj06j2Jf4ypZF13ZJtK0H0Prv1T8pU49iz1pTw20O+jnpT1GsOab/eqNQ pBGB+/AxZMt91fXYStCCAiWKlxY0ohr1MX3IR+5YaIIO/jH0vvPBx41mUGh2bpPZoPBR lJGSgS1tQXuiZBL1u80qe9sT6XbO291Qk/7pNU1wIXfpSdHMtGWftoUDO7q1D9CNyKMW xwLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=W9F3mZ3I7PPAMth6rxuWjcq7V2LJMrFHmRGb+axTv8w=; b=BbIcMlqo6KXjV7Er9ZODO4a5R/JUmHoHW3dbsEaAr45MOFANwMLq8xYVVWlMMU8G1w +YGvaK0gJDJSFIBYo4ISs8GEUOgEH7yKoelki1SjDW+X9tUnbxaXjZ1TQPfXKfVnvOW8 Mtd0xvDJVhWvBFA02g2PhwC3jwABDu5Y9d8T3TQxtjcl4EYPj0SHZC8UWeD7HbHfvGZr QAuSXuHMYW3utAHQccJ89mmavU9qGz/H+X9P7Rmoiyfqw9t00WYgP/zijkg7suQo4JNB eXjMKm4JyH65TuF0Zrf/nNvYUY5V/TlR/jthXqNCl6h4NsiP+z3UjjpEEMUaDU/WhoKp 1wyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=GKbsnM9R; 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=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c15si9873914pls.358.2019.04.08.14.30.00; Mon, 08 Apr 2019 14:30:16 -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=@alien8.de header.s=dkim header.b=GKbsnM9R; 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=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728960AbfDHUu2 (ORCPT + 99 others); Mon, 8 Apr 2019 16:50:28 -0400 Received: from mail.skyhub.de ([5.9.137.197]:42054 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726240AbfDHUu2 (ORCPT ); Mon, 8 Apr 2019 16:50:28 -0400 Received: from zn.tnic (p200300EC2F07270055F9EC31A4C987AB.dip0.t-ipconnect.de [IPv6:2003:ec:2f07:2700:55f9:ec31:a4c9:87ab]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id B34BB1EC058A; Mon, 8 Apr 2019 22:50:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1554756626; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=W9F3mZ3I7PPAMth6rxuWjcq7V2LJMrFHmRGb+axTv8w=; b=GKbsnM9RtPkjpz9V+jFITpBOmSaOf9d4kUVKUvliU0kCs5MLW4ji2dXy9yJrAVYMJgzQYS 6khYyMwciebiMTh/XbzjHSjabYD94nAhPJGzO6yrSlpEuYkY2UZApGX3Okx6gmjtsCx/ha /oVWApyc6wOQWjND5+4Eeot2q8ymFec= Date: Mon, 8 Apr 2019 22:50:13 +0200 From: Borislav Petkov To: "Luck, Tony" Cc: "Ghannam, Yazen" , "linux-edac@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "x86@kernel.org" Subject: Re: [PATCH RESEND 4/5] x86/MCE: Make number of MCA banks per_cpu Message-ID: <20190408205013.GN15689@zn.tnic> References: <20190408141205.12376-1-Yazen.Ghannam@amd.com> <20190408141205.12376-5-Yazen.Ghannam@amd.com> <20190408202659.GA5232@agluck-desk> <20190408203431.GM15689@zn.tnic> <3908561D78D1C84285E8C5FCA982C28F7E8F6A61@ORSMSX104.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <3908561D78D1C84285E8C5FCA982C28F7E8F6A61@ORSMSX104.amr.corp.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 08, 2019 at 08:42:36PM +0000, Luck, Tony wrote: > > Actually, it should not be exported at all. A function returning the num > > banks is better instead. > > Are all the places it is used in non-pre-emptible sections of code? Looping > in the CMCI and #MC handlers should be fine. But do we need get_cpu()/put_cpu() > in any places? That export is needed only in the mce injector. Actually, it would be much cleaner if the injector would find out the count straight from the MSR as it does now, but be changed to do rdmsr_on_cpu() now, since can have different num_banks on a CPU. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.