Daniel Axtens <dja@xxxxxxxxxx> writes: > Raphael Moreira Zinsly <rzinsly@xxxxxxxxxxxxx> writes: > >> Add a compression testcase for the powerpc NX-GZIP engine. >> >> Signed-off-by: Bulent Abali <abali@xxxxxxxxxx> >> Signed-off-by: Raphael Moreira Zinsly <rzinsly@xxxxxxxxxxxxx> ... >> diff --git a/tools/testing/selftests/powerpc/nx-gzip/gzip_vas.c b/tools/testing/selftests/powerpc/nx-gzip/gzip_vas.c >> new file mode 100644 >> index 000000000000..d28e1efb527b >> --- /dev/null >> +++ b/tools/testing/selftests/powerpc/nx-gzip/gzip_vas.c >> @@ -0,0 +1,259 @@ >> +// SPDX-License-Identifier: GPL-2.0-or-later >> + >> +/* Copyright 2020 IBM Corp. >> + * >> + * Author: Bulent Abali <abali@xxxxxxxxxx> >> + * >> + */ >> +#include <stdio.h> >> +#include <stdlib.h> >> +#include <string.h> >> +#include <unistd.h> >> +#include <stdint.h> >> +#include <sys/types.h> >> +#include <sys/stat.h> >> +#include <sys/time.h> >> +#include <sys/fcntl.h> >> +#include <sys/mman.h> >> +#include <endian.h> >> +#include <bits/endian.h> >> +#include <sys/ioctl.h> >> +#include <assert.h> >> +#include <errno.h> >> +#include <signal.h> >> +#include "nx-gzip.h" >> +#include "nx.h" >> +#include "copy-paste.h" >> +#include "nxu.h" >> +#include "nx_dbg.h" >> +#include <sys/platform/ppc.h> >> + >> +#define barrier() >> +#define hwsync() ({ asm volatile("hwsync" ::: "memory"); }) > > This doesn't compile on the clang version I tried as it doesn't > recognise 'hwsync'. What assembler are you using? I guess the LLVM one? Can you try with -fno-integrated-as ? > Does asm volatile("sync" ::: "memory"); > do the same thing? That is recognised by clang, but I don't know if > dropping the hw prefix matters! It shouldn't matter. But you can just try it and look at the generated code to be sure, you should get 0x7c0004ac. cheers