Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1581062pxb; Mon, 8 Mar 2021 00:45:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJzhbqQNesP4OtgF5lvXiE+Tg0MfevCKe5TjjcWP41Hjqv8YBPxlx9mMIv0O6oy0PUYb21AB X-Received: by 2002:a17:906:2a8b:: with SMTP id l11mr14058747eje.1.1615193144265; Mon, 08 Mar 2021 00:45:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615193144; cv=none; d=google.com; s=arc-20160816; b=oKgAD0OaBc3zTbJJ4byPkvtBYJDh9e1jibeiKhWhyzNhrcQmh9ByoadWLGH3anOM58 r7mn2czi0J2NOnbLq60rwKP6IyDoGcKFuivJilrMhnxhR9VIeTLlbvYtUEc2SlSDi/hR X+tF65nb2428taDPRehEk6BCqmRzNzfBlP854mdTNT+/QFbbN0EUrQ+73IM7KDjsuQ4e keeYpSld/s4MWSVt0I5viryaRk9CZQYYywHf17B01tCYFxj5dXl10N2pz8t2jxd10C7M DizqjxX82F28AX5n9APzkdmLE9mWR7PoqHfUw82SmHDPE9LKDraxHnQM9kAV4js9t/Z5 5hgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=gth1gCIISQPIGjYHZ5BXNzBqWi8Mkfc8Kbu+mcOAfPE=; b=mRw14j9bWQtq6lIANMpoPTS/LcehGG2uJxx/CTlSqLTuNL/P2/cx0znqknI3cUQs8W RFHr4bd9Tr/4BaIwOYs4b1tRAanz3IvLcNC0oyoXoa8ceoLB4cp8h0NKnoTBGHhnnZg7 dbG3TJZFaghFRLcEspVpvh5jOu5nT+cyvqauhsSIDEpk1cgF9O+0J3BYSrvjdZtnyxyX cIhG5FL+cIpYxtj86ojm7x5jrxTGgQZBzQureC11q8YSwPsSlJv2BmLjAjFQiBgtBKHF J427QSULU5rGzJDBglbyaRIy8sg0Grz7OmaTPxNVnRDRhxeVp7ZbE5+DKPNXlxJ1p5Nl X8Ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@atishpatra.org header.s=google header.b=HfZFvF2X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q27si8385734edi.328.2021.03.08.00.45.22; Mon, 08 Mar 2021 00:45:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@atishpatra.org header.s=google header.b=HfZFvF2X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232206AbhCHHt4 (ORCPT + 99 others); Mon, 8 Mar 2021 02:49:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231195AbhCHHt0 (ORCPT ); Mon, 8 Mar 2021 02:49:26 -0500 Received: from mail-il1-x12d.google.com (mail-il1-x12d.google.com [IPv6:2607:f8b0:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB5B5C06174A for ; Sun, 7 Mar 2021 23:49:25 -0800 (PST) Received: by mail-il1-x12d.google.com with SMTP id h18so8028883ils.2 for ; Sun, 07 Mar 2021 23:49:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=atishpatra.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gth1gCIISQPIGjYHZ5BXNzBqWi8Mkfc8Kbu+mcOAfPE=; b=HfZFvF2XSNRVonufal1kc0DvF2p3Gh66nT+pbDsujddQ9p/g4kU2dSwCtpCX2/d6HL QlQcj/VchwYR2eeplb1yErSjR9ZwimwkyAmF7YqgoZlqi/UxkIlW1XqHMkRND6IfmdEJ mxCNs3S3xLYBPrhogpbQMxNnDAl63fiV7nJbY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gth1gCIISQPIGjYHZ5BXNzBqWi8Mkfc8Kbu+mcOAfPE=; b=ARe1TLY9kiGA3UChlNq23SHrtqsiQom91GEKZwwhB9iosOOImfPd3954yAMKYLCL6J LIajWXSqeVT3MO7hSoj7Q/AWgDd4a75vJ3W//mLIVQlSPAo2oqt9UQ0GGtLBeTp7/iuq sFLhHDZKr+XL5W+xSPpDrvGjngYmd5aOHkrzy+2CwpqY4QhtsmxurjDC1UBKc3jZZ5NC A04P+9v/5luVm0hFx7zFzKeX0V7fEXwRsaKDQXH//I5TLNowbApPjAfKj5YOxhCNKbVI I8XSRcls+ShJvb7wlTGvABeSDjxcgSQnkUmNdMhMB12wD/Xe4RN5Au2wAb59aeGWLRje wc0g== X-Gm-Message-State: AOAM5330Ct8e8rtpjxCZ8unoDlJEcftFQ0T7w+ArU0YtOStHe54yyne8 X+9jeMzK3EIFBX/kOh5xwbrVAh/qa256ivCCWOVN X-Received: by 2002:a92:b50e:: with SMTP id f14mr18173718ile.77.1615189764326; Sun, 07 Mar 2021 23:49:24 -0800 (PST) MIME-Version: 1.0 References: <20210306054801.18263-1-xypron.glpk@gmx.de> In-Reply-To: From: Atish Patra Date: Sun, 7 Mar 2021 23:49:13 -0800 Message-ID: Subject: Re: [PATCH 1/1] RISC-V: correct enum sbi_ext_rfence_fid To: Anup Patel Cc: Heinrich Schuchardt , Paul Walmsley , Palmer Dabbelt , Albert Ou , Atish Patra , Anup Patel , Kefeng Wang , linux-riscv , "linux-kernel@vger.kernel.org List" , Sean Anderson Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 6, 2021 at 4:12 AM Anup Patel wrote: > > On Sat, Mar 6, 2021 at 11:19 AM Heinrich Schuchardt wrote: > > > > The constants in enum sbi_ext_rfence_fid should match the SBI > > specification. See > > https://github.com/riscv/riscv-sbi-doc/blob/master/riscv-sbi.adoc#78-function-listing > > > > | Function Name | FID | EID > > | sbi_remote_fence_i | 0 | 0x52464E43 > > | sbi_remote_sfence_vma | 1 | 0x52464E43 > > | sbi_remote_sfence_vma_asid | 2 | 0x52464E43 > > | sbi_remote_hfence_gvma_vmid | 3 | 0x52464E43 > > | sbi_remote_hfence_gvma | 4 | 0x52464E43 > > | sbi_remote_hfence_vvma_asid | 5 | 0x52464E43 > > | sbi_remote_hfence_vvma | 6 | 0x52464E43 > > > > Fixes: ecbacc2a3efd ("RISC-V: Add SBI v0.2 extension definitions") > > Reported-by: Sean Anderson > > Signed-off-by: Heinrich Schuchardt > > Good catch. > > I guess we never saw any issues because these calls are only used by > KVM RISC-V which is not merged yet. Further for KVM RISC-V, the HFENCE > instruction is emulated as flush everything on FPGA, QEMU, and Spike so > we did not notice any issue with KVM RISC-V too. > OpenSBI & Xvisor also define the same order as Linux kernel. The existing order(in Linux kernel) makes more sense w.r.to Lexicographic order as well. Should we just fix the spec instead ? > Looks good to me. > > Reviewed-by: Anup Patel > > Regards, > Anup > > > --- > > arch/riscv/include/asm/sbi.h | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/arch/riscv/include/asm/sbi.h b/arch/riscv/include/asm/sbi.h > > index 99895d9c3bdd..d7027411dde8 100644 > > --- a/arch/riscv/include/asm/sbi.h > > +++ b/arch/riscv/include/asm/sbi.h > > @@ -51,10 +51,10 @@ enum sbi_ext_rfence_fid { > > SBI_EXT_RFENCE_REMOTE_FENCE_I = 0, > > SBI_EXT_RFENCE_REMOTE_SFENCE_VMA, > > SBI_EXT_RFENCE_REMOTE_SFENCE_VMA_ASID, > > - SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA, > > SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA_VMID, > > - SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA, > > + SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA, > > SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA_ASID, > > + SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA, > > }; > > > > enum sbi_ext_hsm_fid { > > -- > > 2.30.1 > > > > > > _______________________________________________ > > linux-riscv mailing list > > linux-riscv@lists.infradead.org > > http://lists.infradead.org/mailman/listinfo/linux-riscv > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv -- Regards, Atish