Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1833534imm; Thu, 23 Aug 2018 09:28:59 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYtT8wo3cPdIZQ4s4wzPhJI2wg7ejsPZ7jzrl6L3IGNldOTb+X+G6ekMf3ZOFjTz7K5lyFE X-Received: by 2002:a63:6106:: with SMTP id v6-v6mr4667580pgb.100.1535041739282; Thu, 23 Aug 2018 09:28:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535041739; cv=none; d=google.com; s=arc-20160816; b=VjbDASq12a8qlI2TOIWAI0NWpzjrRBo26Ei/QwkT+RrjY/TMEN2GFKeXltN4WTC77B D6HgK6KoNOTFJJN9Q6WuHUGku16yQA5Yk6icz8YmqjeFUGgNN3QnfmE8ZLxCNAjgi7UQ FbVfBdfg5sPndRKZA/7wsQCZD/hVLwUHQb7OCD7XqGDf+wUO0YwAuEOnmOFbXGYWgwSh cvMYsWoX5Ur2dsCVes3AeUvFUkfxyGrIUT9mrbdEIH7X6DANijoz4cKnh2JKsQjloc9N 516AZ+m9otqSUpAhYpkv1WpLgTUD60fyV2q8Q5kxzedvvhVYJoTla28SVR1hRaNsb45K k4dA== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=3TeAnwXfujL0Gk6s0esGlWEKYk9Er2NDH2kjMP4I6w4=; b=B4l/dd0N/bPa2aArjKJ/qIhAVxt/VeweQ3nhovoC2zhtAe9byXFRTn1MVPlzmq9wik P6o/slkMxhc9TOMs7RkB8S5/MjLuVjnlkr1BzKtXt9eDSRr+iIdpKy/E4yYBk9g21tB0 DZcrs5CpqAFTmZ1vD/q8geoaJWi4fdpFfgi6QZLsSpfvTQ6EHsOpySudGugLqNCR6DbZ pY53/zws3baBnH1I1mu45kZuVvJZc3jnnvHXXBMP7KHxDhby9gcdFZ/xPnahCyHvflRE TizUE4szxZfXa6QnS0D5hLRponinc/AMJ1cayCI5zLsGNiwdF3ukIQSMLX0bc4YKcz8N Pz7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=ADGaPtb1; 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 w4-v6si5265089pfb.52.2018.08.23.09.28.44; Thu, 23 Aug 2018 09:28:59 -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=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=ADGaPtb1; 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 S1732345AbeHWSpi (ORCPT + 99 others); Thu, 23 Aug 2018 14:45:38 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:36777 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730597AbeHWSph (ORCPT ); Thu, 23 Aug 2018 14:45:37 -0400 Received: by mail-wm0-f66.google.com with SMTP id j192-v6so5935712wmj.1 for ; Thu, 23 Aug 2018 08:15:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=3TeAnwXfujL0Gk6s0esGlWEKYk9Er2NDH2kjMP4I6w4=; b=ADGaPtb1awwAVWFioLTwdGASBDhN+pPvvS4PwGaxqMN5V7EotT9jsR4u9KqW5AZhdS 0DaWhM3EyuPhpWDUCnFp9+gmmhwnCRCo+Ea5Z45d5tzyGPH9VzxTqRg3o8qzZbB4+iwB xtRXEr6JUbylLY2Sgh2+eHuztqmSu5ayLTjz7i2JaDByxxUEoJgOLfiEjkLIyro581i/ l7cmZiEqu1tDeGUARAxYEYUWsuZ7qZuRNZAlOXT6fUglrt9Ko50Z5Wp3XdbQBCUyd2Uk GDPwQdRQwI8bffR+QZtRDZeRCPybAhUXnotAWGyrVf6bR4RmUNO1jyV7EGKyyf5hyJrx gyqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=3TeAnwXfujL0Gk6s0esGlWEKYk9Er2NDH2kjMP4I6w4=; b=pjR5vnzOk1UnC5hwqMu3/ms99X2RD/OuRD2Jgf172djpeBudn+mfLSH2jy0ltCByeE CuR2OrtdIhZCq9l41tsyoLlQ9b8mgt8J4Qj8lFR418xv33eSfJwCAyWpgcjw51hmuHYU 8nl7E2wOOIXvfgn7XzWrqbutfqhEnYJv4jtlic6MF1CdqY/gZM2y8XyNc5VcaKxfzoNW km9suD30n53Nw4dAiQp/8mT2jHqop952ZL9AJvXNpTFM3Y9HcTKqpvndOirdVn9rsBFW rp7iU1ueHhZXcywu9VhNA6/Bb9betXCFqjY06jvHui/KxT+SwBw9EeaHJF72qxOh6+tF GxfQ== X-Gm-Message-State: APzg51ChVspyAOrjXM56oFJBSdnLcaF2wcFJFUQyTCuQSBhx2W2FJpMD YH7/Ow6mf83Ya0RJIBkJtIScYZlmaaGRMd3rIFDFGA== X-Received: by 2002:a1c:6f4f:: with SMTP id k76-v6mr2167806wmc.107.1535037330235; Thu, 23 Aug 2018 08:15:30 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:adf:9dcb:0:0:0:0:0 with HTTP; Thu, 23 Aug 2018 08:15:29 -0700 (PDT) In-Reply-To: <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> <20180823133726.GA28059@infradead.org> From: Anup Patel Date: Thu, 23 Aug 2018 11:15:29 -0400 Message-ID: Subject: Re: [RFC PATCH 3/5] RISC-V: Add cpu_operatios structure To: Christoph Hellwig Cc: Mark Rutland , Damien Le Moal , "palmer@sifive.com" , "linux-kernel@vger.kernel.org List" , Atish Patra , "linux-riscv@lists.infradead.org" , Thomas Gleixner 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 Thu, Aug 23, 2018 at 9:37 AM, Christoph Hellwig wrote: > 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. Like Atish mentioned, there is a possibility of existing HW going for spin-table method instead of lottery based spinning. This means in future we will have three or more CPU ON/OFF methods: 1. Existing lottery based spinning 2. spin-table 3. New SBI calls I am fine dropping cpu_operations now but I am sure we will end-up adding it back eventually. Regards, Anup