Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2122538ybl; Thu, 29 Aug 2019 04:00:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqxo3Xg/oPzMmJeQ8niJ23ZlqYw5i0z3l+adJo/SISaHnx+HiJxuu7yb0K7rxAvf0TJytWbj X-Received: by 2002:a17:90a:d58d:: with SMTP id v13mr9090591pju.7.1567076432374; Thu, 29 Aug 2019 04:00:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567076432; cv=none; d=google.com; s=arc-20160816; b=PMRr3T6HNqJCQOFe7gDsoe09c+uwvdXoPdEA7Nu26O6qYwZq/ymUywUpmw6Vj5sykU uhHzn/DvaLJaTbzlPcVjYgjiK3X5G2FiRigqbyHbzQ87KRyM+XXK7XRHMmGyKI+T4cFv Bbn2tuKke3BiWp4nXkfzmsRpmIQPIrQouOc55LyhRWScikhgQAATMbyQHQAXvnklcO88 N/IQXyF4ZQWjPvG0g1L4upDpm5Yp5HUhVvJ3Q9MqKzUF56yhRdovci3amUd+WIW8Oh2m 1gJNc4zLNjL6CSWfkfl8OEKRGbOTR5Bsd0to1t2tjrpQoU6Lw6/3uXx+al+v15rifryY mKug== 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=x0XZgx3t1UzfCJFBHVabtWw2MvCtyqf//s0QXH54R5M=; b=Nd+LGp4R3SN2jFqWS0JqTLKe95qJV3eAfDZ4r+/+izvch09jVPoHzWE5ShHNeW7Q2i 6ywM8X2KTq47xxivh25sbww8LLFGETVsPvfNF6IxDm7NuT8wY7fE9gIiYZtpvvOg7jSF h+np7tU9G+qMcoL3g4ZVSOkyS1a6OPTxP9QgjE6KPhjyZAGWsAiYTAh352F61kKFcbyM k4mxStwAo2S9ElyNBqczLZkicdjVouW34vEYt50TRHdv8tqdABlSxF7hsUU9ZqYX1gip DbU9v+cu1oDfb/sP5n9ctzEEERpy4k4KmV0MeA0zs1EBhyODsip1WwWZg2dRGplDPD/V 561A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=tOnffQYN; 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 s14si2267922pfc.35.2019.08.29.04.00.16; Thu, 29 Aug 2019 04:00:32 -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=tOnffQYN; 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 S1727362AbfH2K7X (ORCPT + 99 others); Thu, 29 Aug 2019 06:59:23 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:40792 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725782AbfH2K7X (ORCPT ); Thu, 29 Aug 2019 06:59:23 -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=x0XZgx3t1UzfCJFBHVabtWw2MvCtyqf//s0QXH54R5M=; b=tOnffQYNciYRiqyeAqE5jtn7c uAlj5rotHDwY8R7Mb4Z5UbWvoPZOlCTYdIwV04ObchSlBVue1FWGtnjtbQQgdyBP9pTlS2mtuTnVD T92n6hh8q9gQpLV5J6VOcsmC+C6qTB4ws1wJMCSdmEovc2PVjg6HamYApJBpByUXd8PxlVCHaaKlP xMVrHxpYYjl5alLD4cT4tz98Y1PEQ+3T8oti1KvBYNJ1NzgRLXAP2CT7Tznt9bn1i4DuYG/XUu4IN qOdE3GtKdzv9tUDjY4yf9XvLQO5ibDYhhg8V4D7jZDthxoDsGQSLKVU+fnTpUj5UX8B91DpqbLi2L nqeo/dYVw==; Received: from hch by bombadil.infradead.org with local (Exim 4.92 #3 (Red Hat Linux)) id 1i3I99-0002ot-RM; Thu, 29 Aug 2019 10:59:19 +0000 Date: Thu, 29 Aug 2019 03:59:19 -0700 From: "hch@infradead.org" To: Atish Patra Cc: "hch@infradead.org" , "aou@eecs.berkeley.edu" , "alankao@andestech.com" , "gregkh@linuxfoundation.org" , "anup@brainfault.org" , "palmer@sifive.com" , "linux-kernel@vger.kernel.org" , "rppt@linux.ibm.com" , "alexios.zavras@intel.com" , "gary@garyguo.net" , "paul.walmsley@sifive.com" , "linux-riscv@lists.infradead.org" , "tglx@linutronix.de" Subject: Re: [RFC PATCH 0/2] Add support for SBI version to 0.2 Message-ID: <20190829105919.GB8968@infradead.org> References: <20190826233256.32383-1-atish.patra@wdc.com> <20190827144624.GA18535@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) 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 Tue, Aug 27, 2019 at 10:19:42PM +0000, Atish Patra wrote: > I did not understand this part. All the legacy SBI calls are defined as > a separate extension ID not single extension. How did it break the > backward compatibility ? Yes, sorry I mistead this. The way is is defined is rather non-intuitive, but actually backwards compatible. > I think the confusion is because of legacy renaming. They are not > single legacy extension. They are all separate extensions. The spec > just called all those extensions as collectively as legacy. So I just > tried to make the patch sync with the spec. > > If that's the source of confusion, I can rename it to sbi_0.1_x in > stead of legacy. I think we actually need to fix the spec instead, even if it just the naming and not the mechanism. > > (1) actually board specific and have not place in a cpu abstraction > > layer: getchar/putchar, these should just never be advertised in > > a > > non-legacy setup, and the drivers using them should not probe > > on a sbi 0.2+ system > > In that case, we have to update the drivers(earlycon-riscv-sbi & > hvc_riscv_sbi) in kernel as well. Once these patches are merged, nobody > will be able to use earlycon=sbi feature in mainline kernel. > > Personally, I am fine with it. But there were some interest during > RISC-V workshop in keeping these for now for easy debugging and early > bringup. The getchar/putchar calls unfortunately are fundamentally flawed, as they mean the sbi can still access the console after the host has taken it over using its own drivers. Which will lead to bugs sooner or later. And if you can bring up a console driver in opensbi it should be just as trivial to bring up the kernel version.