Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-33435

RISC-V RDCYCLE cannot be accessed from userland

    XMLWordPrintable

Details

    Description

      Starting with Linux kernel 6.6, the RDCYCLE instruction for RISC-V cannot be used with userland:

      https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cc4c07c89aada16229084eeb93895c95b7eabaa3

      We use this in `my_rdtsc.h` for RISC-V platforms, which means this code does not work any more.

      Instead we should use RDTIME, which while less accurate has the advantage of being synchronized between CPU (and thus monotonic) and of constant frequency. This exists in earlier kernel versions too, so will not break backwards compatibility.

      Attachments

        Issue Links

          Activity

            People

              TheLinuxJedi Andrew Hutchings
              TheLinuxJedi Andrew Hutchings
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.