162306a36Sopenharmony_ci.. SPDX-License-Identifier: GPL-2.0 262306a36Sopenharmony_ci 362306a36Sopenharmony_ciarch/riscv maintenance guidelines for developers 462306a36Sopenharmony_ci================================================ 562306a36Sopenharmony_ci 662306a36Sopenharmony_ciOverview 762306a36Sopenharmony_ci-------- 862306a36Sopenharmony_ciThe RISC-V instruction set architecture is developed in the open: 962306a36Sopenharmony_ciin-progress drafts are available for all to review and to experiment 1062306a36Sopenharmony_ciwith implementations. New module or extension drafts can change 1162306a36Sopenharmony_ciduring the development process - sometimes in ways that are 1262306a36Sopenharmony_ciincompatible with previous drafts. This flexibility can present a 1362306a36Sopenharmony_cichallenge for RISC-V Linux maintenance. Linux maintainers disapprove 1462306a36Sopenharmony_ciof churn, and the Linux development process prefers well-reviewed and 1562306a36Sopenharmony_citested code over experimental code. We wish to extend these same 1662306a36Sopenharmony_ciprinciples to the RISC-V-related code that will be accepted for 1762306a36Sopenharmony_ciinclusion in the kernel. 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_ciPatchwork 2062306a36Sopenharmony_ci--------- 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_ciRISC-V has a patchwork instance, where the status of patches can be checked: 2362306a36Sopenharmony_ci 2462306a36Sopenharmony_ci https://patchwork.kernel.org/project/linux-riscv/list/ 2562306a36Sopenharmony_ci 2662306a36Sopenharmony_ciIf your patch does not appear in the default view, the RISC-V maintainers have 2762306a36Sopenharmony_cilikely either requested changes, or expect it to be applied to another tree. 2862306a36Sopenharmony_ci 2962306a36Sopenharmony_ciAutomation runs against this patchwork instance, building/testing patches as 3062306a36Sopenharmony_cithey arrive. The automation applies patches against the current HEAD of the 3162306a36Sopenharmony_ciRISC-V `for-next` and `fixes` branches, depending on whether the patch has been 3262306a36Sopenharmony_cidetected as a fix. Failing those, it will use the RISC-V `master` branch. 3362306a36Sopenharmony_ciThe exact commit to which a series has been applied will be noted on patchwork. 3462306a36Sopenharmony_ciPatches for which any of the checks fail are unlikely to be applied and in most 3562306a36Sopenharmony_cicases will need to be resubmitted. 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ciSubmit Checklist Addendum 3862306a36Sopenharmony_ci------------------------- 3962306a36Sopenharmony_ciWe'll only accept patches for new modules or extensions if the 4062306a36Sopenharmony_cispecifications for those modules or extensions are listed as being 4162306a36Sopenharmony_ciunlikely to be incompatibly changed in the future. For 4262306a36Sopenharmony_cispecifications from the RISC-V foundation this means "Frozen" or 4362306a36Sopenharmony_ci"Ratified", for the UEFI forum specifications this means a published 4462306a36Sopenharmony_ciECR. (Developers may, of course, maintain their own Linux kernel trees 4562306a36Sopenharmony_cithat contain code for any draft extensions that they wish.) 4662306a36Sopenharmony_ci 4762306a36Sopenharmony_ciAdditionally, the RISC-V specification allows implementers to create 4862306a36Sopenharmony_citheir own custom extensions. These custom extensions aren't required 4962306a36Sopenharmony_cito go through any review or ratification process by the RISC-V 5062306a36Sopenharmony_ciFoundation. To avoid the maintenance complexity and potential 5162306a36Sopenharmony_ciperformance impact of adding kernel code for implementor-specific 5262306a36Sopenharmony_ciRISC-V extensions, we'll only consider patches for extensions that either: 5362306a36Sopenharmony_ci 5462306a36Sopenharmony_ci- Have been officially frozen or ratified by the RISC-V Foundation, or 5562306a36Sopenharmony_ci- Have been implemented in hardware that is widely available, per standard 5662306a36Sopenharmony_ci Linux practice. 5762306a36Sopenharmony_ci 5862306a36Sopenharmony_ci(Implementers, may, of course, maintain their own Linux kernel trees containing 5962306a36Sopenharmony_cicode for any custom extensions that they wish.) 60