Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1458116ybe; Wed, 11 Sep 2019 15:29:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqy6oRZ/CJCCTzRLdUkknSsf2DV7ohM/dq1ewvUzPLU8SSLASUe4Pb9D58RPE3fcOsvb4EXY X-Received: by 2002:a05:6402:125a:: with SMTP id l26mr2329314edw.95.1568240997136; Wed, 11 Sep 2019 15:29:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568240997; cv=none; d=google.com; s=arc-20160816; b=npYOGeVj8QF1IAcmNdZoZN91m3zxvwTnwczhWnSacRmcqQHF1SiU27rUKWFGcGlZtl 8j5EZk4HKqDa0UCEaNaYZKsragSFqq/8Fs0a70atKKZABW7sjE+0R+DYNe2Ve/pOMIEz bludgnEnyJCeHnfn9mbeQPdrpprNYUCATJ6nVKXg2ridei5Q4UxGIZ5MQgskQT+r2rFp V78ZUVzjLr7mjNA6hMr5iTUwTb1NAI/vViOYSImLScLWrct7IkSEmsv3TtRayOLiRijB 58xXW/lXxTkzxxECdrikyDrCDH5MSHpdDye5Ns5PJ8e8lRCsAeI2aaf9xejk8WCkolCR GjAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject; bh=H8utH3ft23bK7udw92CmMtNjOgKZWvBJCVTpCmifOI4=; b=s0/Md4/hp/bfGgQquo0dpNBKKDkL/RO2VSo1X7VWzj5IeqG0CDYxX6pRHwzyTVuYIq lkx2fGsI2p2TMdpH8jBIu+iLVzH3F/yxD1jhj82WiaYofAu5z7nX6yFqovN9KPgC6V7N ZKz6jpNK3PHrSgE415QvaD9LxgYj52uwuXVoR0esaibdNJd398gJAjY2rKF7OeJApJXy DAK710T7Wg8GbgCeMtxo80cniJitTLS6v69RQ+bNB0vjU/PudJ17yQHrR4cl6KJ1kHwR ktdIo5rSnNmtuo+9Neu8eW+qmYuMdv9d+J6I2Ty/DvJMNw962Yd3WYR7+TfvAEu5vqp7 d/rA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=hpe.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g5si14006879edb.324.2019.09.11.15.29.34; Wed, 11 Sep 2019 15:29:57 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=hpe.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730644AbfIKU6h (ORCPT + 99 others); Wed, 11 Sep 2019 16:58:37 -0400 Received: from mx0b-002e3701.pphosted.com ([148.163.143.35]:46610 "EHLO mx0b-002e3701.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730545AbfIKU6g (ORCPT ); Wed, 11 Sep 2019 16:58:36 -0400 Received: from pps.filterd (m0150245.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x8BKuTwo030715; Wed, 11 Sep 2019 20:58:17 GMT Received: from g4t3425.houston.hpe.com (g4t3425.houston.hpe.com [15.241.140.78]) by mx0b-002e3701.pphosted.com with ESMTP id 2uxpwjgd84-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 11 Sep 2019 20:58:17 +0000 Received: from g4t3433.houston.hpecorp.net (g4t3433.houston.hpecorp.net [16.208.49.245]) by g4t3425.houston.hpe.com (Postfix) with ESMTP id 080C19A; Wed, 11 Sep 2019 20:58:17 +0000 (UTC) Received: from [16.116.129.27] (unknown [16.116.129.27]) by g4t3433.houston.hpecorp.net (Postfix) with ESMTP id C296A46; Wed, 11 Sep 2019 20:58:15 +0000 (UTC) Subject: Re: [PATCH 4/8] x86/platform/uv: Setup UV functions for Hubless UV Systems From: Mike Travis To: Ingo Molnar Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Andrew Morton , Borislav Petkov , Christoph Hellwig , Dimitri Sivanich , Russ Anderson , Hedi Berriche , Steve Wahl , Justin Ernst , x86@kernel.org, linux-kernel@vger.kernel.org References: <20190910145839.604369497@stormcage.eag.rdlabs.hpecorp.net> <20190910145839.975787119@stormcage.eag.rdlabs.hpecorp.net> <20190911060702.GD104115@gmail.com> Message-ID: Date: Wed, 11 Sep 2019 13:58:45 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.70,1.0.8 definitions=2019-09-11_10:2019-09-11,2019-09-11 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxscore=0 malwarescore=0 bulkscore=0 suspectscore=0 mlxlogscore=971 clxscore=1015 priorityscore=1501 spamscore=0 adultscore=0 lowpriorityscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1906280000 definitions=main-1909110187 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/11/2019 1:44 PM, Mike Travis wrote: > > > On 9/10/2019 11:07 PM, Ingo Molnar wrote: >> >> * Mike Travis wrote: >> >>> +/* Initialize UV hubless systems */ >>> +static __init int uv_system_init_hubless(void) >>> +{ >>> +??? int rc; >>> + >>> +??? /* Setup PCH NMI handler */ >>> +??? uv_nmi_setup_hubless(); >>> + >>> +??? /* Init kernel/BIOS interface */ >>> +??? rc = uv_bios_init(); >>> + >>> +??? return rc; >>> +} > > This looks like an excessive cleanup error by me.? The original was: > >> +static __init int uv_system_init_hubless(void) >> +{ >> +?????? int rc; >> + >> +?????? /* Setup PCH NMI handler */ >> +?????? uv_nmi_setup_hubless(); >> + >> +?????? /* Init kernel/BIOS interface */ >> +?????? rc = uv_bios_init(); >> + >> +?????? /* Create user access node if UVsystab available */ >> +?????? if (rc >= 0) >> +?????????????? uv_setup_proc_files(1); >> + >> +?????? return rc; >> +} >> + > > Hubbed UV's do not have a non-UV BIOS, but hubless systems in theory > can.?? So uv_bios_init can fail on hubless systems if it has some other > BIOS (unlikely but possible).? So I removed too much in this cleanup. > I'll send another patch set that puts this back. I discovered the problem... In a rearrangement of the patches this change does happen but in a later patch [5/8]: /* Initialize UV hubless systems */ static __init int uv_system_init_hubless(void) { @@ -1468,6 +1555,10 @@ static __init int uv_system_init_hubless /* Init kernel/BIOS interface */ rc = uv_bios_init(); + /* Create user access node if UVsystab available */ + if (rc >= 0) + uv_setup_proc_files(1); + return rc; } The mistake you saw [in patch 3/8] is very short lived... Hopefully no need for another patch set? > > Thanks, > Mike > >> >> Am I the only one who immediately sees the trivial C transformation >> through which this function could lose a local variable and become 4 >> lines shorter? >> >> And this function got two Reviewed-by tags... >> >> Thanks, >> >> ????Ingo >>