Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4687408imu; Tue, 8 Jan 2019 04:40:55 -0800 (PST) X-Google-Smtp-Source: ALg8bN6gPL/GLlTMCAwD1fssMNzE+sGqZJCXFwPTFSi0D1LCWiOfaxkOKySpxMYodRaZ3VmOXqfm X-Received: by 2002:a17:902:aa82:: with SMTP id d2mr1626972plr.153.1546951255813; Tue, 08 Jan 2019 04:40:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546951255; cv=none; d=google.com; s=arc-20160816; b=cY1FAaQQANG7uzYrwaxMU2/hfGauXYFw0xs47qaOe8+cL000O1Aj0cPFrepAlW5VYz +mWC0mjVzwUtklZWx+ZSW75uXwyYj/WxIyJd1XeVDLvfuMwL4hg15kkbqS+UARkGpJ7T MkYPYAVdHxN7fB8wdNpFyGnTc1jMnenZ5FpyTTjpde+eSN1KN9boWDK8LVHMq8+KEPY0 GEpDIOMAXVUfHyCEbyUDkiR6/oxvt5oyTaMTJR5U/sY14DCbKNqVpVF6edoIqP5ZCyyo PdIgy/KHRL5nMvTUUVSmP0Z83n/FRrpAYpNzgwQjCSHCzlTp9ykig7Eh8/EM3ru/kT3I 4GWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=fihLDeBdBCv7UmpGapUichtBalNpltWbM/T1LuHnn1E=; b=k5kNLLYDd+rGqVx2hNRAKUDFPZePbiaSiM84sD9q9eYa7VAekJ7C+9bG40jNHOiprd C3MGA4gvdX1suBrEgt19Dn1WZ83I/+OA5QFV9EORpFIk+2u9dLSX7knPwI5AK7hliIME jvZGHDt4mt9xsxQhu4kK6vWxh84csSJFCOev/Safgpfr3Kowy9dxkC1Glkl3MMrIcIoW mGUm5m9CALhnZ5B5DkCN586C5/ymn9uZqiYgADVdMuVIjNcsh7fF+L8E+uShPKFJxvA+ t1F4pMnGBKYQUdEFHpngUiZW0hjYMq2f1PA1jTUC30Cm6ujzTC6jOfKMVserzdtUI2Cz LzYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=SUvjF5QT; 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 i6si23080803plt.290.2019.01.08.04.40.37; Tue, 08 Jan 2019 04:40:55 -0800 (PST) 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=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=SUvjF5QT; 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 S1728525AbfAHLsh (ORCPT + 99 others); Tue, 8 Jan 2019 06:48:37 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:33559 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727587AbfAHLsh (ORCPT ); Tue, 8 Jan 2019 06:48:37 -0500 Received: by mail-wm1-f68.google.com with SMTP id r24so8265704wmh.0 for ; Tue, 08 Jan 2019 03:48:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fihLDeBdBCv7UmpGapUichtBalNpltWbM/T1LuHnn1E=; b=SUvjF5QTE/q99kJO/QO9AadOOOqQJy0OsaAQvr0dXzDYTrM/rDxyxXc/D1pzpLDiss RPiTeQKe8HNfCPbasdq3muPc+uJJz1i4HSbJY/EtIUMyh9sWPpwXPp6vuI4pJMbnZQKt A1sN75oTC4HgufmnLk0LedxaFnjIMebh1PUmq8LIx6Dem5qMeVsj8ZaNx2v22fu6Kk92 8WIym4S1nSQ6OoyCWRgK8HhdWKPt+McV+PkLz6ONEZZCzpQH44lYSDZxFErXa245h4yv zAODo284aAsJwLhVDdZpezsZulyiAw/U7Dhm2ecWp8dQz5K8v400aoYdvMXXMT3B2BRr Gv/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fihLDeBdBCv7UmpGapUichtBalNpltWbM/T1LuHnn1E=; b=J1IVYNKEZy3PM2YGMWSOg5068CQqyKYHoDN/eyT+nJUzOUqAwDtVy1BfHYSP9WACi8 r8poAaz6pZfp7ND4wo4RjjlJaQqj5SzxrJpw/LMvo50jACDkcH+ylyGR1jWYg/kcymnh XmwPR25/gPjDvAWihxE2x/YTTmHGsxVNkLTcwGfjCyt3yCRPr9uWneOZ+LjdGsQo8E1I lYrRFSCVEdsGuJdh8I3RfZZs2XMviNCBR4d7n8DbWyxqWjtG2V+nmoDtYjiwj8paBvQs 994Csp7dlNTVSuJ4kIlfjDBAsVSp2zIgtW5zPfr90ea2SIZYY4584NJAyZgsjYmvosFE 9N0A== X-Gm-Message-State: AJcUukdKdmiKpmGA/+kUBuYWleay19pMuy5XjtSCaHqQVETx97AIRBBb 6+1pqkebekVR8seB8Zh85f2tQUSUNg3mT2JfGtgUbg== X-Received: by 2002:a1c:a3c3:: with SMTP id m186mr1543468wme.16.1546948114765; Tue, 08 Jan 2019 03:48:34 -0800 (PST) MIME-Version: 1.0 References: <1546940318-9752-1-git-send-email-atish.patra@wdc.com> <1546940318-9752-4-git-send-email-atish.patra@wdc.com> In-Reply-To: <1546940318-9752-4-git-send-email-atish.patra@wdc.com> From: Anup Patel Date: Tue, 8 Jan 2019 17:18:23 +0530 Message-ID: Subject: Re: [PATCH v2 3/8] RISC-V: Remove NR_CPUs check during hartid search from DT To: Atish Patra Cc: linux-riscv@lists.infradead.org, Alan Kao , Albert Ou , Andreas Schwab , Daniel Lezcano , Dmitriy Cherkasov , Jason Cooper , "linux-kernel@vger.kernel.org List" , Marc Zyngier , Michael Clark , Palmer Dabbelt , =?UTF-8?Q?Patrick_St=C3=A4hlin?= , Thomas Gleixner , Zong Li 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 On Tue, Jan 8, 2019 at 3:08 PM Atish Patra wrote: > > In non-smp configuration, hartid can be higher that NR_CPUS. > riscv_of_processor_hartid should not be compared to hartid to > NR_CPUS in that case. Moreover, this function checks all the > DT properties of a hart node. NR_CPUS comparison seems out of > place. > > Signed-off-by: Atish Patra > --- > arch/riscv/kernel/cpu.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/arch/riscv/kernel/cpu.c b/arch/riscv/kernel/cpu.c > index f8fa2c63..19edaeae 100644 > --- a/arch/riscv/kernel/cpu.c > +++ b/arch/riscv/kernel/cpu.c > @@ -34,10 +34,6 @@ int riscv_of_processor_hartid(struct device_node *node) > pr_warn("Found CPU without hart ID\n"); > return -(ENODEV); > } > - if (hart >= NR_CPUS) { > - pr_info("Found hart ID %d, which is above NR_CPUs. Disabling this hart\n", hart); > - return -(ENODEV); > - } > > if (of_property_read_string(node, "status", &status)) { > pr_warn("CPU with hartid=%d has no \"status\" property\n", hart); > -- > 2.7.4 > Looks good to me. Reviewed-by: Anup Patel Regards, Anup