Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1283846pxp; Thu, 10 Mar 2022 02:25:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJx5F+I2VSEo/JfJHik7fhnmPhQzYB4TdpUZaVdcpHZwOGJrwKMXap8Nq2+fNsOzcwxsieN1 X-Received: by 2002:a17:906:1ece:b0:6ce:e14:6d92 with SMTP id m14-20020a1709061ece00b006ce0e146d92mr3614493ejj.408.1646907918895; Thu, 10 Mar 2022 02:25:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646907918; cv=none; d=google.com; s=arc-20160816; b=l3Zig0GuK2epGH97Fwl/LfvyKGrzrN82cTc97w6El8wpJ1U22DZzoL6xyE4+IcdNQ8 DiO/RN0W/mSHWK4c8aSs/eDk/QHJLRXuccyq5j/kYVEtt/DhiFWAhM2PiVqqczEDL+xT mw6EmskCpqSBaRS7Xr8sr7BwKpAuBWIC4jwi0qxQqILih1+PAUXEZRMi804yvbXBJmoL 2njh4Mvvi9e9VTnz0tCejcVw6Vqq6kSuvKzeSZc3u4vxTJglk0ysr1gTR7Zlo5WzFxcn VudcoY6K0wTqDTB1QyKih/+kjzeQksXQ9sgciXxveutvKoAC+YCCHnmxxPCVtnz6VKcd do6g== 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; bh=lAVWOReJuJLbjFqCoduGHE878j2Zt/8elajtbbktBfg=; b=IcZ4/t5J4iMda1xUkXq363yc4AqGhILmfnoI3+BDH6PHB5FlyyUpTnoE7kwtXSCPia e824MwjgJ4+XSSczJ+wsXc1yW0K2aZK1IXkQAvsuY72Wu8bb9oZx/XbK7vrJn7E7wrJP bty2hvNdDy2Pq7FLYh/6tndA8H+Tu5rnXYvxaYqZkyJ/ccRugEmGbvZbFdZU5im+batl uFWveOfbtrpVvsj3fCCOZwBBRUA3kG6piC5numhtER+znAlQ8lVnf/KoKM8klq6gIS9l RcgUkLk9Mj0T7xNWj+PdwuNrOC8IHXuWzy4HIKUBqn1brMoPaXBNRm6j8RTCDqPWEKvv MKjg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t7-20020a50d907000000b00413477de85bsi3271478edj.565.2022.03.10.02.24.54; Thu, 10 Mar 2022 02:25:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239896AbiCJHzj (ORCPT + 99 others); Thu, 10 Mar 2022 02:55:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232086AbiCJHzi (ORCPT ); Thu, 10 Mar 2022 02:55:38 -0500 Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78F5C5F93 for ; Wed, 9 Mar 2022 23:54:36 -0800 (PST) Received: from mail-wm1-f54.google.com ([209.85.128.54]) by mrelayeu.kundenserver.de (mreue106 [213.165.67.113]) with ESMTPSA (Nemesis) id 1MD9Gh-1nJ6wV3OFt-00973Q for ; Thu, 10 Mar 2022 08:54:34 +0100 Received: by mail-wm1-f54.google.com with SMTP id r65so2721646wma.2 for ; Wed, 09 Mar 2022 23:54:34 -0800 (PST) X-Gm-Message-State: AOAM533bEJL6IXZSyx2ARZWCByMgZ9I9GlGqQEDLUJ4mCjtfH5kVzUv0 vVIXqzMoIdY5zJBoFB/PpB/l0aTr1R3lMBIMduM= X-Received: by 2002:a05:600c:384a:b0:37c:2d14:a2d3 with SMTP id s10-20020a05600c384a00b0037c2d14a2d3mr2468122wmr.20.1646898874485; Wed, 09 Mar 2022 23:54:34 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Arnd Bergmann Date: Thu, 10 Mar 2022 08:54:17 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] riscv: Work to remove kernel dependence on the M-extension To: Palmer Dabbelt Cc: Arnd Bergmann , "Michael T. Kloos" , Paul Walmsley , Albert Ou , linux-riscv , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:EGx1efBcBh/A8oOM/qe2evQUV2FvjpV51SlloJaZTJHq9PM6X8G 1RaWjEv2DseT1aXNfUYlLnI11Sd/AS/jVjIP+p+LEfVP4q99gqxsbUyOQ70Z7hDA7a80Q5A LUMy3V90bDPhq/HelI+Jcd+M6NM+bgD90QTCUy18RwjWuE+Frw66+Rumi/biyfduKjF81tq XkV5pX8YaAr+T3Lch2N9g== X-UI-Out-Filterresults: notjunk:1;V03:K0:nYOxPSgJKZA=:hNyXsoBVQAbq76/BIwtxws B9OVBcUjzCOEQfEsOMrtio9DjoBz0GOPkoqO5517pCaN75vpAcM6qDyfaBepEMhXzuZGzRW6p nU1sRaNnJyg7kv18c/Fn2vztCT+gRk19JS0kEzEijnLss/Rdsn1GT+Sdb/KzQhXOFxsLHWYwc m+a4IZzO9GnEAPGtCepcisNzMCPCc1wK2Okw6vTm3K+4TDCFjtnooGEGes3EZ9mAOk2/CX7h0 Zpz01dfTsT1AIbf5NDE8dIxYugW4JXmC6gJ3/yRRwZVexXVidJBk5VL/Bl/CGS8xad6cQhY/s wBMguNnPGft305AEgY9BK3D338eOyXPxB2UgXoRDHV2zKGXQPmcsTaI46y763cGpY+TkNKhca jlVru6x9ARJGxSMgrvEY8cTeku2Ue56NHhgBr6th4QBWVlAL0dzy9lJYhhMNS5djpqSbh9+JP vv3KVxxZ7gcsUvkEwVQa7EM+iaf1XyAEoq0B4upHySG9YTaZy5NH9vI/KN7zEBLS8HHL86RkD o3K/OE2TP0r7ARUQJm7wiGc9vew67IHrW8lJ7XnFE0HtUaeEc8qz4sFKOaOqbojtohoAx/kZy OZHexYr5+9uYdE0n7hey1yTF3Ft4J2bxWOXN0n1YI/twVELpsezlyIEZi8VvtrvU7CX0z/fGW VHcaSnUj7WqElgDhKgMIytkOchrkyjTxqkDhJgyDxUZ9Ioobwt83J6+ULPMz8o7+Yoa4tz74s TsgOcVemG6XpJwNdht4GAYcC0JzgARj4BX1tdtyGdGIMiZks7dWq5oWbngnBHJGmgRh0RbN7H +h1tKdfrE8mXaq/7qheGjl6u/1oijWaa4N5yomK9eYYPXIL5OQ= X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 10, 2022 at 8:34 AM Palmer Dabbelt wrote: > On Wed, 09 Mar 2022 02:02:27 PST (-0800), Arnd Bergmann wrote: > > On Wed, Mar 9, 2022 at 6:28 AM Michael T. Kloos wrote: > > That'd be wonderful, but unfortunately we're trending the other way -- > we're at the point where "words in the specification have meaning" is > controversial, so trying to talk about which flavors of the > specification are standard is just meaningless. I obviously hope that > gets sorted out, as we've clearly been pointed straight off a cliff for > a while now, but LMKL isn't the place to have that discussion. We've > all seen this before, nobody needs to be convinced this leads to a mess. > > Until we get to the point where "I wrote 'RISC-V' on that potato I found > in my couch" can be conclusively determined not compliant with the spec, > it's just silly to try and talk about what is. I would argue that codifying the required extensions through kernel source code is much stronger than interpreting a specification. Ideally the specification would match what the kernel requires, but it's not the end of the world if the kernel ends up making decisions that are different: If Linux can do runtime detection of non-M, non-A or pre-standard extensions and handle them correctly without a notable performance impact, it can do that. Or Linux could end up requiring things that are normally there but not in the scope of the spec. Regardless of who determines what the compatible subset is, I think there is value in splitting out Kconfig options that prevent booting on normal RV64GC machines (XIP, NOMMU, 32-bit, ...). This would probably not include the non-M option, as long as a non-M kernel works as expected on CPUs with the M instructions. Arnd