Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1830440imm; Thu, 23 Aug 2018 09:25:39 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbESxIKLuVncPVM4ivyQPNdc40F+Z81l1zpqEKlQaMvlUz7VsyDzhkPbdlq8eHA4okK46NT X-Received: by 2002:a62:8c8c:: with SMTP id m134-v6mr12823180pfd.130.1535041539610; Thu, 23 Aug 2018 09:25:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535041539; cv=none; d=google.com; s=arc-20160816; b=pkdDJzX41rhxvhC3XSfrw7zZwSdhyc490qHlp7VF8wp6lh3zwYRGecor/nQvB4nJai iGDBA13LpxpB+VNSeYB7soru/26ou435zySKEcBRcA8hZ42O77bxjZpj9TQ1tIGewj6A VeUyA5jmYO52lu6oN9/yR8M7f+vO/qJHWPuRyKKIiDV1feH3M6wqD8YLdqiNeWB0ZPGf op8GMwTIKqWuPvYQ9uhlGDcjN+iIOmSUeV9RzwwvPAg1IlwochZ3yPC1VNQUoNSBBfrG mUaSkIXC1ZAFvkA66QmKXDshSg278pDLUzAcRWyWIAxBHnwsYC1B2PrUIVQZFHuiYNXg Hi1w== 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:arc-authentication-results; bh=dMwBTZSDkUaUSoGf+xtrmRVPsoiGs+kT8Ckx2W2nAn4=; b=biOFTkhYRHVdnF0SYB9hsyAC6hMVH6BbDIXlzcxE4KqOgTmEe3oOHddaF+hFBb+K2E IgN4H6PF63DiMNjRQ10D9NWXy5axR8UAhoEJsaPPiqU2fINVPGe/jU9PTBFPMlqfl1m5 PL3btAt/u2W2IQPTXqVQrdkHlrXyPzJ52yY3irV31Hd3Z5Nk4vtP6Fz2hUAzenMuRvD4 E1ujBhpiXLwL1jVvknnxqlQwFjuy47I0EHECutDMDap43Cs9/cMjLqXPsicz/mzqeDua cpsgytcD8N0iC7xdeOYK8dXGK7LsfoZZhDZ44DwNT6VNB4l77VD9sCal1zNEDbeqYi0K kVCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=mGPe14Bq; 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 f10-v6si4879601pfn.85.2018.08.23.09.25.24; Thu, 23 Aug 2018 09:25:39 -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=mGPe14Bq; 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 S1730976AbeHWRHP (ORCPT + 99 others); Thu, 23 Aug 2018 13:07:15 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:37594 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730125AbeHWRHP (ORCPT ); Thu, 23 Aug 2018 13:07:15 -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=dMwBTZSDkUaUSoGf+xtrmRVPsoiGs+kT8Ckx2W2nAn4=; b=mGPe14BqKO51UPAnVNSZC9AYs Ixpp/VbsjJ9lod8g3G1Rn4Bn4ZCoeEBn8+0l31GAWL9shGSxYo1xb0w1/rOo16Eeu7qXjV9ig/CUX uis14uhAIB9ypV7RATNrVhRcfjYZGRkqYVrb5u/83rf4o6n18lwX38Wz1vx7KWt7jBCE8Q2kkPpJ/ j779vTj+PtDaKFsUQeKGPckLnAXAN9zl+iGy4SX85ueM9UQy8VI0JAOuYSfM8uFvEGEALDKaDStPW IC2oIMahlVezWlh0uj8rCxwjV8+fbWO6xk4fIP+PA8Ei4ksVQzOhfG6k97yRBsZ2tUp6xo0uAZGAZ ekT6PiVTw==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fspni-0000Gg-LR; Thu, 23 Aug 2018 13:37:26 +0000 Date: Thu, 23 Aug 2018 06:37:26 -0700 From: Christoph Hellwig To: Anup Patel Cc: Christoph Hellwig , Mark Rutland , Damien Le Moal , "palmer@sifive.com" , "linux-kernel@vger.kernel.org List" , Atish Patra , "linux-riscv@lists.infradead.org" , Thomas Gleixner Subject: Re: [RFC PATCH 3/5] RISC-V: Add cpu_operatios structure Message-ID: <20180823133726.GA28059@infradead.org> References: <1534377377-70108-1-git-send-email-atish.patra@wdc.com> <1534377377-70108-4-git-send-email-atish.patra@wdc.com> <20180821074826.GA28079@infradead.org> <20180822060353.GA27106@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-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 Wed, Aug 22, 2018 at 08:54:51PM +0530, Anup Patel wrote: > IMHO, rather than waiting for new CPU ON/OFF methods to come-up we > can keep the cpu_operations ready. Also, we are not re-inventing anything > here which we might have to discard later because cpu_operations are > already tried and hardened for Linux ARM64. Which is a different cpu architecture, and has shown to actually need it. IFF we end up needing it on riscv we can still copy and paste it from AMD64. > I agree with you that in long-term SBI-based CPU ON/OFF will be widely > used. Most likely we will have at-least two CPU ON/OFF methods: > 1. Existing lottery based spinning > 2. New SBI calls And in this most likely case there is no need for an ops vector, a simple if/else will be much simpler and cleaner.