Linus Torvalds has come out strong against proposed support for RISC-V big endian capabilities within the Linux kernel.

In response to a mailing list comment whether RISC-V big endian “BE” patches being worked on would be able to make it for this current Linux kernel cycle. Linus Torvalds initially wrote:

"Oh Christ. Is somebody seriously working on BE support in 2025?

WHY?

Seriously, that sounds like just stupid. Is there some actual real reason for this, or is it more of the “RISC-V is used in academic design classes and so people just want to do endianness for academic reasons”?

Because I’d be more than happy to just draw a line in the sand and say “New endianness problems are somebody ELSES problem”, and tell people to stop being silly.

Let’s not complicate things for no good reason. And there is NO reason to add new endianness.

RISC-V is enough of a mess with the millions of silly configuration issues already. Don’t make it even worse.

Tell people to just talk to their therapists instead. That’s much more productive."

  • UnfortunateShort@lemmy.world
    link
    fedilink
    English
    arrow-up
    33
    ·
    2 个月前

    I agree with him tbh. There is no reason for endianness except we used to not agree on a single one. And as far as I’m aware, pretty much everything is LE at this point (when it comes to processor architecture)

  • Cris@lemmy.world
    link
    fedilink
    English
    arrow-up
    13
    ·
    2 个月前

    Mmmmm I don’t understand any of that lol

    The mainline kernel is for mainline development. Not for random experiments that make the world a worse place.

    And yes, we’re open source, and that very much means that anybody is more than welcome to try to prove me wrong.

    If it turns out that BE RISC-V becomes a real thing that is relevant and actually finds a place in the RISC-V ecosystem, then of_course we should support it at that point in the mainline kernel.

    But I really do think that it actually makes RISC-V only worse, and that we should not actively help the fragmentation."

    I was worried this meant he was voicing disapproval for RISC-V in general, but he’s actually just taking about an implementation or maybe particular part instruction set or something?

    I’d be curious how other RISC-V knowledgeable folks feel, whether they agree or disagree

    • Eldritch@piefed.world
      link
      fedilink
      English
      arrow-up
      28
      ·
      2 个月前

      Big endian is a byte order scheme. For registers and memory. If I’m not mistaken, pretty much all modern systems these days are little endian. The differences can largely be mitigated at the operating system level. But it definitely invites new chaos back into the equation. If programs don’t get their bytes in the right order, it will be garbage in garbage out everywhere. Try playing an old PCM wave file from a 68k based Macintosh or Amiga on a PC.

      • calliope@retrolemmy.com
        link
        fedilink
        arrow-up
        13
        ·
        edit-2
        2 个月前

        Try playing an old PCM wave file from a 68k based Macintosh or Amiga on a PC.

        I really appreciate how specific this is. It sounds like it’s from experience.

        • Eldritch@piefed.world
          link
          fedilink
          English
          arrow-up
          17
          ·
          edit-2
          2 个月前

          It 100% is. I have distinct memories back in the 80s of getting a hold of files off of FidoNet, etc. and trying to play them only to find out they were big endian files. It sounded like a mildly uncomfortable shoggoth in a blender. It had nothing on the dulcet tones of dial up modems.

        • Eldritch@piefed.world
          link
          fedilink
          English
          arrow-up
          5
          ·
          2 个月前

          Some formats are designed around a particular endian-ness. But not all. Some only specify where a byte is to be stored and what it should represent. But not how it should be stored. PCM WAV files are ancient and uncompressed. with a few bytes in the headder telling you bit depth and sample rate. Followed by a stream of raw bytes representing the samples. Whether you store those bytes in LSB or MSB order. They’re both valid. But passing such a file to a system expecting the opposite. Your file will still play. It will just be squealing noise.

          Bitmap images can be similar as well. So arbitrary is the data in RAW Bitmap files. That you can open it in audio software like Audacity as a raw PCM. Perform Fourier transforms or other audio options on it. Save the raw byte stream back out as an image again. Bytes are bytes, and a lot of formats don’t care what order they’re in. Even if the user might.

        • teawrecks@sopuli.xyz
          link
          fedilink
          arrow-up
          5
          ·
          2 个月前

          If you have a file containing 4 bytes, where the first byte in the file is 0x01, second is 0x02, third is 0x03, and 4th is 0x04, and you keep that same order when you load them into the first 4 bytes of memory on an LE machine vs a BE machine, what value does the uint32 located at address 0 contain? On LE it’s 0x04030201, on BE it’s 0x01020304. So yes, it absolutely matters.

    • AnyOldName3@lemmy.world
      link
      fedilink
      arrow-up
      10
      ·
      2 个月前

      There aren’t currently any RISC-V hardware implementations that support big endian (although I guess someone must have tried it on a simulator), so supporting it in the Linux kernel is about as useful as supporting any other hypothetical CPU that only exists on paper. The mainline kernel is meant for computers that exist in the real world, so supporting BE RISC-V should only happen after such CPUs have actually been made. As things stand, there’s nothing to suggest that anyone will bother making them, so the Linux maintainers shouldn’t bother supporting them.

    • eleijeep@piefed.social
      link
      fedilink
      English
      arrow-up
      2
      ·
      2 个月前

      It began upon the following Occasion. It is allowed on all Hands, that the primitive way of breaking Eggs, before we eat them, was upon the larger End: But his present Majesty’s Grand-father, while he was a Boy, going to eat an Egg, and breaking it according to the ancient Practice, happened to cut one of his Fingers. Whereupon the Emperor his Father published an Edict, commanding all his Subjects, upon great Penaltys, to break the smaller End of their Eggs. The People so highly resented this Law, that our Histories tell us there have been six Rebellions raised on that account; wherein one Emperor lost his Life, and another his Crown. These civil Commotions were constantly fomented by the Monarchs of Blefuscu; and when they were quelled, the Exiles always fled for Refuge to that Empire. It is computed, that eleven thousand Persons have, at several times, suffered Death, rather than submit to break their Eggs at the smaller End.

  • James R Kirk@startrek.website
    link
    fedilink
    English
    arrow-up
    6
    ·
    2 个月前

    Tell people to just talk to their therapists instead. That’s much more productive.

    I’m just going to say it: 50% of foss projects wouldn’t exist if their devs could afford therapy