Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp7935287ybn; Tue, 1 Oct 2019 00:04:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqwW4OvB4PbAT0NyneW+rzOkpgNuONBRb23kQqOoS5rCHS/DZtWCCmHvKBg5d834lB5aHoHF X-Received: by 2002:a50:a8c5:: with SMTP id k63mr23917001edc.122.1569913454630; Tue, 01 Oct 2019 00:04:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569913454; cv=none; d=google.com; s=arc-20160816; b=wJK7X80/T5pcBYQDvEkYdDlUWU/o3tqE5iIbPpIkf0qLWLc1E83/sBZG/2l5MtBgus otBPlkVHrdJ18R604m8WpOipo4c7azE6xK8x3ebyBPvE8PBZDYtpDhg2hpIDHgJks8q+ tSuzEgx3On4Fb3qkYKPwdjjl71MzeSzQe/DuyIMTsETGQgwldDNpS+rVdPGmeykC2bHY b1jfNNvm1oucvStvSBeHCpB+t08UEkCf2DROwQg2+GuhmC6SAU0oMWbhMUrXxVLFTtM6 K3V4kSydzN+UIqOC2ZMtMGwDPDtELthLDr/fE8f0OZftuqXfny9sXTW5T3hnlwHduplT uBnQ== 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=AGuzTjIA6zIwZLTAcZWukiKmrFjmZKO6ZmG1uh+vwww=; b=NlTL55CtA62Zt4s6fx9LN3bhdecz//0HL9EkKpPzHJpMcruFUUyBu08+/p1XmK7yes riAUWCej32QjcDCE5BRVULX7Y8JeRgThhvGM+cQ6B88euAP8UCKd0OR7+iy5f7N4gUix gmBPxuioN6t9rzUnYqtXn+WA4FKIllDGWACpqCzRdnBMTAzcn49VdY3G3lvGUeGY/hgp NkCS8gDCwQIRs0r56xUpV3qQTWiX8zK2bLx/O+UhOdsXXxhoU8tTzCvafE7essYt7k3E GhhtZitxQnN7njredqZ4I3dMAfZcg6rzFhoiEnsHddIvrLLERtOzGbaW46igFsHvQr8t P5aA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=m7a3cHIO; 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 p8si8469369ejf.58.2019.10.01.00.03.48; Tue, 01 Oct 2019 00:04:14 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=m7a3cHIO; 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 S1731685AbfJAHCi (ORCPT + 99 others); Tue, 1 Oct 2019 03:02:38 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:39482 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725777AbfJAHCi (ORCPT ); Tue, 1 Oct 2019 03:02:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=AGuzTjIA6zIwZLTAcZWukiKmrFjmZKO6ZmG1uh+vwww=; b=m7a3cHIO2AekiG8nMLX4/ITuc 85DytciWj/C0X/aKvjAWAHQqbE8eSoZSI9vfIcZWLEYDUgr6SaHbZ01ERw2Il+Z5oFdqPMub2xbIa II5V22h0o2+MZN0TQhpeNYNdWFiX7YSVeKVtfWwYab4262Q0imUFKbJj6pX/353y4yp3j/BWgCg4I TDrBvebmHPMLwO/hq+nxkxJaS3+4FaP+wkuTaTVl6bAQ+hfuH1U+aEze2nJjp0AnX1EdwNdpQI45R bT4w0mUhUQw86XAzau6iPGo7XmP7+hVcFtNzv1YwwsOlkAwk0nOg9UBVSu2RCCVWdFr5KV0HVFvRp dw9PXQRXQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.2 #3 (Red Hat Linux)) id 1iFCBA-0003O3-Fe; Tue, 01 Oct 2019 07:02:36 +0000 Date: Tue, 1 Oct 2019 00:02:36 -0700 From: Christoph Hellwig To: Atish Patra Cc: linux-kernel@vger.kernel.org, Albert Ou , Anup Patel , Palmer Dabbelt , Johan Hovold , hch@infradead.org, Paul Walmsley , linux-riscv@lists.infradead.org Subject: Re: [v6 PATCH] RISC-V: Remove unsupported isa string info print Message-ID: <20191001070236.GA7622@infradead.org> References: <20191001002318.7515-1-atish.patra@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191001002318.7515-1-atish.patra@wdc.com> User-Agent: Mutt/1.12.1 (2019-06-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 30, 2019 at 05:23:18PM -0700, Atish Patra wrote: > /proc/cpuinfo should just print all the isa string as an information > instead of determining what is supported or not. ELF hwcap can be > used by the userspace to figure out that. > > Simplify the isa string printing by removing the unsupported isa string > print and all related code. > > The relevant discussion can be found at > http://lists.infradead.org/pipermail/linux-riscv/2019-September/006702.html This looks good, but can you also rename the orig_isa argument to isa now that we never modify it? > /* > * Linux doesn't support rv32e or rv128i, and we only support booting > * kernels on harts with the same ISA that the kernel is compiled for. > */ > #if defined(CONFIG_32BIT) > - if (strncmp(isa, "rv32i", 5) != 0) > + if (strncmp(orig_isa, "rv32i", 5) != 0) > return; > #elif defined(CONFIG_64BIT) > - if (strncmp(isa, "rv64i", 5) != 0) > + if (strncmp(orig_isa, "rv64i", 5) != 0) > return; > #endif And I don't think having these checks here makes much sense. If we want to check this at all we should do it somewhere in the boot process.