Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1182363imm; Wed, 22 Aug 2018 21:27:15 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaE1UqQMDvupYV4zAqfTL53M84aY+rhwWSTluIYiPQPRHIcjFrQ7vtLf5a2kKe3KcDDaNhk X-Received: by 2002:a62:7885:: with SMTP id t127-v6mr5518297pfc.6.1534998435945; Wed, 22 Aug 2018 21:27:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534998435; cv=none; d=google.com; s=arc-20160816; b=psyxcHEkPHiUK4I1h8N27VczGiM53XiGCuZ+Q5onyGvAQ4gaD6dIfST4OPy7Qz4hGa OIfFAwxuSGvQVBTQNsSXs3vzCuik5QrUQCvEWFAMdhidlsXuwxtuRoU257Do4WVVzufv GHbn3GBZFHPSi8QKVoE5Nlfj7f282E8posl2FHCPM3v787fhlodUxTMBNwrPJU5EPZY6 4nP8oCMQF3p7wNyaJgNuQBjff3RELUz7Xkzla3Qh4/v//ieBOsHyeDq5Q1AzCokD8b50 xLEZAKzxaTR/Fk8+1NStb0tyVd1XjYM2YbwQ5Ez9HknTCwb337q96mAagsahxzE23P3I DBgw== 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:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=sa2Ltys4WE2HQjHbUHKAFmj6we08lU1lm606RvoYdhs=; b=LyWO8N8jOqmdNUOd4+xdpigKURK2XOq7RIoqkPaVkLmGsi1bMFnEpywv7lVTmHhDvo H/f/lGj2VFaCg7wXZ4aC3pmmeEWXbh9koWjfN6/g6MTr/ooWzTT1GPaU3jFdsircByH+ cioleHK+c08GBApE0WHCOXgbD6jn+1GAWlEyUHwlK/W0zrLRUWSYxFpHZHuyY/YHhtbS SrDBqeLqu4oH/L/eIiNrtcYlb706zGlLwJ038w7jEtjeCxxr7iheraCtHR47GktJkxK3 UmuoHvb1RIaKzWgbXPXag/1+70aD98ha7bu91+uPbCs40aBsFt7GeQTxLCcoqQmWHmCn hb2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b="PPGCWpG/"; 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=wdc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w1-v6si3398377pgo.87.2018.08.22.21.26.57; Wed, 22 Aug 2018 21:27:15 -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=@wdc.com header.s=dkim.wdc.com header.b="PPGCWpG/"; 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=wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728261AbeHWHx3 (ORCPT + 99 others); Thu, 23 Aug 2018 03:53:29 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:32392 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726870AbeHWHx3 (ORCPT ); Thu, 23 Aug 2018 03:53:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1534998346; x=1566534346; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=KF7QyF6hqWf5lZJXqD5PIKFJaq5UV+tubKsVcz9gZWA=; b=PPGCWpG/JExqmf2mybp7N/jqcfIIcGNZQdgj/rxDHVvGEDpCMz9/7WhR bDTVCk5eHtnYkkTL2E71WQDRxegRWf4andqGOWt+FR1lEMvt3VwcCHTqG wkFawvGtdcM2uI5c4yQBT42xMuFQ6Dvgcs1j1XA3XhZW/rsM2+u/G7tVM f7UAYGQss/9QwBTFWKYuTRhPMGq8D9W+mkQ6NnzUcU/nQfZ7ysMb92S3V xcEQO47ddBqSU1FAAutKvSw6zZGW8wnbFQsol7WmQBTECIeWT8iWW2HRR RIWLwvcBVEu0uUmf6Dru61yhburrur3YlLVufMpXkYyDaxbSNV64pJirB A==; X-IronPort-AV: E=Sophos;i="5.53,276,1531756800"; d="scan'208";a="89121464" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 23 Aug 2018 12:25:46 +0800 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP; 22 Aug 2018 21:12:57 -0700 Received: from usa003209.ad.shared (HELO [10.86.60.90]) ([10.86.60.90]) by uls-op-cesaip01.wdc.com with ESMTP; 22 Aug 2018 21:25:46 -0700 Subject: Re: [RFC PATCH 3/5] RISC-V: Add cpu_operatios structure To: Anup Patel , Christoph Hellwig Cc: Mark Rutland , Damien Le Moal , "palmer@sifive.com" , "linux-kernel@vger.kernel.org List" , "linux-riscv@lists.infradead.org" , Thomas Gleixner 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> From: Atish Patra Message-ID: <2b317c0a-aa06-002a-a3f3-148a25e897ae@wdc.com> Date: Thu, 23 Aug 2018 09:55:45 +0530 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/22/18 8:54 PM, Anup Patel wrote: > On Wed, Aug 22, 2018 at 11:33 AM, Christoph Hellwig wrote: >> On Tue, Aug 21, 2018 at 10:34:38PM +0530, Anup Patel wrote: >>> The cpu_operations is certainly required because SOC vendors will add >>> vendor-specific mechanism to selectively bringing-up CPUs/HARTs instead >>> of all CPUs entering Linux kernel simultaneously. In fact, we might also end-up >>> having CPU ON/OFF operations in SBI. >> >> Your forgot an essential part in your analysis: Right now we only have >> one single way to deal with cpu on/offlining, and that is the dummy WFI >> kind. Once other ways show up we can build proper infrastructure, but >> until then this is just a white elephant as we have no idea how these >> abstractions will look like. >> >> And my hope is that we'll just see new SBI calls, in which case we'll >> just need SBI and dummy version and can avoid all the indirect calls. > > 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. > > 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 > > Regards, > Anup > I am fine with either keeping the cpu_ops infrastructure for now or reintroducing again along with better smp enablement methods. Anyways, there were concerns about all existing booting method (all cpu thrown to Linux at the same time). I was thinking to adopt spin table boot method for RISC-V as well. I can drop this patch now and reintroduce with spin table boot method. Any thoughts ? Regards, Atish