On Mon, Mar 6, 2023 at 4:56 PM David Matlack <dmatlack@xxxxxxxxxx> wrote: > > Mark the asm statement that generates the RDPID instruction volatile. > The compiler within its rights to drop subsequent RDPID asm statements > (after the first) since the inputs never change. > > This fixes the tsc test on hardware that supports rdpid when built with > the latest Clang compiler. > > Fixes: 10631a5bebd8 ("x86: tsc: add rdpid test") > Reported-by: Greg Thelen <gthelen@xxxxxxxxxx> > Suggested-by: Greg Thelen <gthelen@xxxxxxxxxx> > Signed-off-by: David Matlack <dmatlack@xxxxxxxxxx> Reviewed-by: Jim Mattson <jmattson@xxxxxxxxxx>