Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1593233ybb; Thu, 2 Apr 2020 03:55:44 -0700 (PDT) X-Google-Smtp-Source: APiQypKFxsOPtKfCTlolKRwb0mKFh6yrU64F6xiZVbZN2YbRAKzdAtA4dxZtTl4adRfn8Ic7KWpE X-Received: by 2002:a4a:d44c:: with SMTP id p12mr2225917oos.91.1585824944327; Thu, 02 Apr 2020 03:55:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585824944; cv=none; d=google.com; s=arc-20160816; b=bKoF7rfE3bxToOtDZWX5QBUHRfbVjgdOcUmm6HHLQ0KvkF1RdkCykfxYBgNdUr4ztj MLCIxEDk/sQGM+2i8xDKXpBrIijet4wr8SWNuP8ZpjwRbDKX67fxJz4jLJrBrYNnR5Gh YK6cFBgZYw8KsrrykntEHi7rn0rez6NY1OuOM8cOBw3YzILCHuRTA8a/Bo6CnPOkODPU gM6Z/TD0nG8Fu0bzQInfzKVLST8ZPLvcMzl3Kl1Gw4MtiMp2Pw+83ndOTIN65eNj0lok EJCqPv9DirG9n6COe3Hjg2INy1yjS/VuudcfCbY9v1FLvuD2zbX45YF8yMFUZGjL0/w0 KO1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=iMI9Qp2lvY1zn1KkO9DLlFrPBAbqN1EIEZ/qEtlhSyg=; b=ny8eQ3KG3aT2nNh8LNuHsY2/JvK9EoqOGzHnTusqHZP04gKqjninr6KBN0w+82aEX5 voyfg3UhYyLHhwca2o7Te5/A5XvMNoy3qcP0HixV7hCqxZoYjBpGjxvPCIwTnp+xFkm7 LDM/XvJvqt6X1FviWYNfohdiMdq8oeno8eSB/t4BtULnce3m8FkDiZV1H4mP8NTOfFlB /9hqiBW2nl7Ld0evYJhIo9Knguxjj8DNIZCutTyym28CUBPT/TgNKLnc8dzPo6skB+ha ZBQhwUMcK2FjU0R33DhSUR4ig6o+bZw7dIQbgFA7w0/HZvPVjBBjYnPJKK0QgGQ6b7S8 12eQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=gA+0yFMo; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f18si2245650ooj.15.2020.04.02.03.55.19; Thu, 02 Apr 2020 03:55:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=gA+0yFMo; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387865AbgDBKy5 (ORCPT + 99 others); Thu, 2 Apr 2020 06:54:57 -0400 Received: from bilbo.ozlabs.org ([203.11.71.1]:37587 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728803AbgDBKy5 (ORCPT ); Thu, 2 Apr 2020 06:54:57 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 48tKhb4hmdz9sRN; Thu, 2 Apr 2020 21:54:55 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1585824895; bh=k1eckHiRYcUlA+oiJEV2L/x/tm7pSdUROFgylzAgvQU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=gA+0yFMo3UD0GnfCfq46uR33SrXx1FsexzcNqB3CXDFCYHE59cFy2VnnS1bQIvdrf 0zTKrYmKBFNayJsUsasr49Wfm552UUbCi4XJ9KdDCiLJUwbK0RW278t4WMtymrG+Vn Nfs/6qtq/kygTgiloASV3SuZ+WnMMzJ+xQEPe1w/NG86zeJcjx/BHdkUXB8KR4GJJW sc5yYICTiIakePYPx29WodTJNujWgSSjUsfuXU9DHZgsHRbCLGSti6FJPgwOKU6JFb M9+pDGIV/lU7gjeGLdJKOyDPuJtRubxCVidHxuru4HV/ga173tPOXo/lZxkGEWrtxw t7QeDuLD7nYcw== From: Michael Ellerman To: Daniel Axtens , Raphael Moreira Zinsly , linuxppc-dev@lists.ozlabs.org, linux-crypto@vger.kernel.org Cc: herbert@gondor.apana.org.au, haren@linux.ibm.com, abali@us.ibm.com, Raphael Moreira Zinsly Subject: Re: [PATCH V2 3/5] selftests/powerpc: Add NX-GZIP engine compress testcase In-Reply-To: <87369mwgwy.fsf@dja-thinkpad.axtens.net> References: <20200327181610.13762-1-rzinsly@linux.ibm.com> <20200327181610.13762-4-rzinsly@linux.ibm.com> <87369mwgwy.fsf@dja-thinkpad.axtens.net> Date: Thu, 02 Apr 2020 21:55:03 +1100 Message-ID: <875zeitawo.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Daniel Axtens writes: > Raphael Moreira Zinsly writes: > >> Add a compression testcase for the powerpc NX-GZIP engine. >> >> Signed-off-by: Bulent Abali >> Signed-off-by: Raphael Moreira Zinsly ... >> 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 >> + * >> + */ >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include "nx-gzip.h" >> +#include "nx.h" >> +#include "copy-paste.h" >> +#include "nxu.h" >> +#include "nx_dbg.h" >> +#include >> + >> +#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