Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2710478pxb; Tue, 13 Apr 2021 08:23:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzoEJ0f2qeSzMD/BWPBTPfTbOMj/GJJZ1ehqUo6d3Cb4U3056iMEYR4tSuMpvIXLuKQ8HyK X-Received: by 2002:a05:6402:145:: with SMTP id s5mr35236388edu.221.1618327393565; Tue, 13 Apr 2021 08:23:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618327393; cv=none; d=google.com; s=arc-20160816; b=TgCQ4iCBPsSgfhAaoXvdLU1JVDjWLXIvZmhtWEfdIf2xcph3DM1kh/R2mjQSz5XeHz 78Zq4Ebvp1kE8Hblhhe97JfdrT6r5PNYEeqO323v/QVhOc3D8XGwpx8E/bcnDgcOaEAu /7ZHjH+OYHhxQkuo4B9vsB8gtVIPL7U2JOOAHsHfEFj5LwVOen1MqVuHrwR97mv5Uuw+ tS1mkefnLKLIT3FBz1sWo5U7PVFn0GdoICoIvztd22F+EFVn+ezpYB//zGM9yGmesGRD gNACQ1q3xz88HRJr1KWN1Evnr0w7GGlVZyNHqnrxKoSrOTXonPHDec7fkyAi/4kYfhUR lUKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=8bOcfFbTeWPwGxCnwWBsHOvJHY0A3caBb+xbCful69c=; b=GjB9POyqjw+Vr61tvVaW2tYj8/5pkpMdaUcLP1rKKKfLw4vmSVRf07K3OjnuvSLr4u O+soZZPyHCQj1WISKLoRRVDwCa3/J2FlhFJjSnHAZYkEpkreXgdKZr1QuuOMR3LnZ/el 6eU4oxXQLv+Uwi0rywjsyYOR6SdGr/gPl6tDquqWRU20NEpZRtCUyfGQz3+Hk7Ur+X0B 6TCqnNnNDTiq8Q0TLE1edhna2Py91/giEhFGOM5zMLdCfqnsAsjNuHRa+W0Wj6T7s1Bc 7T+ypJ9Bk9urUK6Emw30EH483NEONVGU0ljsa1AXq/4hnfIsZWCruteOgd1LI+OiRy9R 0zcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b="Vst/PGnL"; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b19si10098959ede.447.2021.04.13.08.22.36; Tue, 13 Apr 2021 08:23:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b="Vst/PGnL"; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244660AbhDMM7s (ORCPT + 99 others); Tue, 13 Apr 2021 08:59:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345923AbhDMM7q (ORCPT ); Tue, 13 Apr 2021 08:59:46 -0400 Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E9D9C061756 for ; Tue, 13 Apr 2021 05:59:24 -0700 (PDT) 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 4FKQfc2M6Cz9sTD; Tue, 13 Apr 2021 22:59:20 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1618318760; bh=PQMdde3Q/u/+DhIAdo157u2UL2FmxdhSw43wx/CBgoE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Vst/PGnLBUNUc5kbbYlpN8YQWiGIWYxaIpfuCEQDm+trkRMBUgupmRNnUG63/mTMk spK/Ee5FKey2HBkmXg950byJAz3daS1WCmbPDK8KJX9SPUjQ4wVvHK5aVwxWasmhg/ 3ko1rsWW5FQ5bMl5OZtAVyrlvlz/ttOJsMHIU9HJ6FWcdHaA7JohEDqY6XOTDp7MI5 DiG6JSNSAk0Gvg0Cgl2sWhH65GgPRK7MTwUtCUYPxMs/c+0P8drA/5kTwYdGZk+qqi KTiV6EoBRQmyprt8RdPCLXdoHjrtCzq/f2GSpOyITjqfODwqfxYmu131MavzQ70qH1 HzlbrSR5ZuesA== From: Michael Ellerman To: Christophe Leroy , Haren Myneni , linuxppc-dev@lists.ozlabs.org, linux-crypto@vger.kernel.org, herbert@gondor.apana.org.au, npiggin@gmail.com Cc: hbabu@us.ibm.com, haren@us.ibm.com Subject: Re: [PATCH 02/16] powerpc/vas: Make VAS API powerpc platform independent In-Reply-To: <1804692b-f9d4-964d-bbe4-cb809dad5ee8@csgroup.eu> References: <1804692b-f9d4-964d-bbe4-cb809dad5ee8@csgroup.eu> Date: Tue, 13 Apr 2021 22:59:15 +1000 Message-ID: <87k0p6s5lo.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Christophe Leroy writes: > Le 11/04/2021 =C3=A0 02:31, Haren Myneni a =C3=A9crit=C2=A0: >>=20 >> Using the same /dev/crypto/nx-gzip interface for both powerNV and >> pseries. So this patcb moves VAS API to powerpc platform indepedent >> directory. The actual functionality is not changed in this patch. > > This patch seems to do a lot more than moving VAS API to independent dire= ctory. A more detailed=20 > description would help. > > And it is not something defined in the powerpc architecture I think, so i= t should > remain in some common platform related directory. > >>=20 >> Signed-off-by: Haren Myneni >> --- >> arch/powerpc/Kconfig | 15 +++++ >> arch/powerpc/include/asm/vas.h | 22 ++++++- >> arch/powerpc/kernel/Makefile | 1 + >> .../{platforms/powernv =3D> kernel}/vas-api.c | 64 ++++++++++-------- >> arch/powerpc/platforms/powernv/Kconfig | 14 ---- >> arch/powerpc/platforms/powernv/Makefile | 2 +- >> arch/powerpc/platforms/powernv/vas-window.c | 66 +++++++++++++++++++ >> 7 files changed, 140 insertions(+), 44 deletions(-) >> rename arch/powerpc/{platforms/powernv =3D> kernel}/vas-api.c (83%) >>=20 >> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig >> index 386ae12d8523..7aa1fbf7c1dc 100644 >> --- a/arch/powerpc/Kconfig >> +++ b/arch/powerpc/Kconfig >> @@ -478,6 +478,21 @@ config PPC_UV >>=20=20=20 >> If unsure, say "N". >>=20=20=20 >> +config PPC_VAS >> + bool "IBM Virtual Accelerator Switchboard (VAS)" >> + depends on PPC_POWERNV && PPC_64K_PAGES >> + default y >> + help >> + This enables support for IBM Virtual Accelerator Switchboard (VAS). > > IIUC is a functionnality in a coprocessor of some IBM processors. Somethi= ng similar in principle to=20 > the communication coprocessors we find in Freescale processors. It's not a coprocessor, it's a way you talk to coprocessors. > It is not a generic functionnality part of the powerpc architecture, I do= n't think this belongs to=20 > arch/powerpc/Kconfig But you're right it's not part of the ISA. > I think it should go in arch/powerpc/platform/Kconfig The problem with that is it's shared between two existing platforms, ie. powernv and pseries. We don't want to put it in one or the other. In the past we have put code like that in arch/powerpc/sysdev, but I am not a big fan of it, because it's just a bit of a dumping ground. A while back I created arch/powerpc/platforms/4xx for 40x and 44x related things, even though there's no actual 4xx platform. I don't think that's caused any problems. So I'm inclined to say we should make a arch/powerpc/platforms/book3s and put VAS in there. The naming is a bit fishy, because not all book3s CPUs do or will have VAS. But we would expect any future CPU with VAS to be book3s. In contrast if we named it platforms/ibm, we could potentially have a future non-IBM CPU that contains VAS, which would then make the ibm name confusing. cheers