From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EFBF9C43331 for ; Wed, 1 Apr 2020 22:53:52 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A0202206E9 for ; Wed, 1 Apr 2020 22:53:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (4096-bit key) header.d=d-silva.org header.i=@d-silva.org header.b="QYGtk3AH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A0202206E9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=d-silva.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 48t1hV42R0zDqpM for ; Thu, 2 Apr 2020 09:53:46 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=d-silva.org (client-ip=66.55.73.32; helo=ushosting.nmnhosting.com; envelope-from=alastair@d-silva.org; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=d-silva.org Authentication-Results: lists.ozlabs.org; dkim=pass (4096-bit key; unprotected) header.d=d-silva.org header.i=@d-silva.org header.a=rsa-sha256 header.s=201810a header.b=QYGtk3AH; dkim-atps=neutral Received: from ushosting.nmnhosting.com (ushosting.nmnhosting.com [66.55.73.32]) by lists.ozlabs.org (Postfix) with ESMTP id 48t1fF4c4nzDqZp for ; Thu, 2 Apr 2020 09:51:49 +1100 (AEDT) Received: from mail2.nmnhosting.com (unknown [202.169.106.97]) by ushosting.nmnhosting.com (Postfix) with ESMTPS id 563302DC3330; Thu, 2 Apr 2020 09:51:47 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=d-silva.org; s=201810a; t=1585781508; bh=FgXrMZd5jgFgYwvk1rKNQ23NCAQq9Sxrzfkt7yVUPjk=; h=From:To:Cc:References:In-Reply-To:Subject:Date:From; b=QYGtk3AH0W2GW3xDqwILT4tWdRvwfukt/wtJfKxP3GeMIkwOcvxi4+bFTLeK7yG+2 QK6xQdg24HsMsrO96pzQzp7thT9OnH+T4/yu3go19x9bxZsYO5NlJv0CgTU9pVxohW KQJ7ZDAHLWkxg0LJ1OqUPhVMKcRhKtqvaK49TPOa4J4swSpzhvwUlGWHpq8nMLY9Ly Vu3DiOuAL2gubxA9ZbFj1JqQ4K9IlkSRcenYLBtTXq75bzFD851m4uhGrpdiUVXn/C xYFvA/Rmp5IP5yiGKQYiTLklvSDRR5jvaZQIEyqlOE1mS5D0AvD28BhaUjAKTArCoN xLLK+baQf/RyPZIGfFrlZcSyldovGznoCpUkK/BkN4eWPPuv3B4poiPOfQgWwQSfQg sHkxPI/TVU4tfkhNhDZIguM19nktovwPOgel+sGFHwKc3FPYkVGpat3Dr1kExYM2vc JJoWJhUH+zFmC6FT0WZMRa1HPdgoqc9nDa26VkS6riRQurzPFP7TrD10cEg99H5sMs U2tRswqCKr3RZ+yNiF41Vk8wrSpOlJFKm/gwDUHJhB93pS3IQx3r0NyJOFU6P009EI 4HDOv8cMGWuycKRawzl/BzpGQYXFmELX9appWWgEVeqyT8RUVn5oEkkYgQzQdJlkgd jakKdOir6MI9bh8Dme2Lw/KY= Received: from Hawking (ntp.lan [10.0.1.1]) (authenticated bits=0) by mail2.nmnhosting.com (8.15.2/8.15.2) with ESMTPSA id 031Mpf9D088148 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 2 Apr 2020 09:51:41 +1100 (AEDT) (envelope-from alastair@d-silva.org) From: "Alastair D'Silva" To: "'Dan Williams'" References: <20200327071202.2159885-1-alastair@d-silva.org> <20200327071202.2159885-2-alastair@d-silva.org> In-Reply-To: Subject: RE: [PATCH v4 01/25] powerpc/powernv: Add OPAL calls for LPC memory alloc/release Date: Thu, 2 Apr 2020 09:51:40 +1100 Message-ID: <2d6d01d60878$1c8c68f0$55a53ad0$@d-silva.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Content-Language: en-au Thread-Index: AQJ5L4Hn/mp5p0p1jYAFWLJ+xmWSbgKnRjTFARH8J02nAMbrEA== X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2 (mail2.nmnhosting.com [10.0.1.20]); Thu, 02 Apr 2020 09:51:42 +1100 (AEDT) X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 'Madhavan Srinivasan' , 'Alexey Kardashevskiy' , 'Masahiro Yamada' , 'Oliver O'Halloran' , 'Mauro Carvalho Chehab' , 'Ira Weiny' , 'Rob Herring' , 'Dave Jiang' , 'linux-nvdimm' , "'Aneesh Kumar K . V'" , 'Krzysztof Kozlowski' , 'Anju T Sudhakar' , 'Mahesh Salgaonkar' , 'Andrew Donnellan' , 'Arnd Bergmann' , 'Greg Kurz' , 'Nicholas Piggin' , =?utf-8?Q?'C=C3=A9dric_Le_Goater'?= , 'Thomas Gleixner' , 'Hari Bathini' , 'Linux MM' , 'Greg Kroah-Hartman' , 'Linux Kernel Mailing List' , 'Vishal Verma' , 'Frederic Barrat' , 'Paul Mackerras' , 'Andrew Morton' , 'linuxppc-dev' , "'David S. Miller'" Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" > -----Original Message----- > From: Dan Williams > Sent: Wednesday, 1 April 2020 7:48 PM > To: Alastair D'Silva > Cc: Aneesh Kumar K . V ; Oliver O'Halloran > ; Benjamin Herrenschmidt > ; Paul Mackerras ; Michael > Ellerman ; Frederic Barrat = ; > Andrew Donnellan ; Arnd Bergmann > ; Greg Kroah-Hartman ; > Vishal Verma ; Dave Jiang > ; Ira Weiny ; Andrew Morton > ; Mauro Carvalho Chehab > ; David S. Miller ; > Rob Herring ; Anton Blanchard ; > Krzysztof Kozlowski ; Mahesh Salgaonkar > ; Madhavan Srinivasan > ; C=C3=A9dric Le Goater ; Anju = T > Sudhakar ; Hari Bathini > ; Thomas Gleixner ; Greg > Kurz ; Nicholas Piggin ; Masahiro > Yamada ; Alexey Kardashevskiy > ; Linux Kernel Mailing List = ; > linuxppc-dev ; linux-nvdimm nvdimm@lists.01.org>; Linux MM > Subject: Re: [PATCH v4 01/25] powerpc/powernv: Add OPAL calls for LPC > memory alloc/release >=20 > On Sun, Mar 29, 2020 at 10:23 PM Alastair D'Silva = > wrote: > > > > Add OPAL calls for LPC memory alloc/release > > >=20 > This seems to be referencing an existing api definition, can you = include a > pointer to the spec in case someone wanted to understand what these > routines do? I suspect this is not allocating memory in the = traditional sense as > much as it's allocating physical address space for a device to be = mapped? >=20 These API calls were introduced in the following skiboot commit: https://github.com/open-power/skiboot/commit/1a548857ce1f02f43585b326a891= eed18a7b43b3 I'll add it to the description. >=20 > > Signed-off-by: Alastair D'Silva > > Acked-by: Andrew Donnellan > > Acked-by: Frederic Barrat > > --- > > arch/powerpc/include/asm/opal-api.h | 2 ++ > > arch/powerpc/include/asm/opal.h | 2 ++ > > arch/powerpc/platforms/powernv/opal-call.c | 2 ++ > > 3 files changed, 6 insertions(+) > > > > diff --git a/arch/powerpc/include/asm/opal-api.h > > b/arch/powerpc/include/asm/opal-api.h > > index c1f25a760eb1..9298e603001b 100644 > > --- a/arch/powerpc/include/asm/opal-api.h > > +++ b/arch/powerpc/include/asm/opal-api.h > > @@ -208,6 +208,8 @@ > > #define OPAL_HANDLE_HMI2 166 > > #define OPAL_NX_COPROC_INIT 167 > > #define OPAL_XIVE_GET_VP_STATE 170 > > +#define OPAL_NPU_MEM_ALLOC 171 > > +#define OPAL_NPU_MEM_RELEASE 172 > > #define OPAL_MPIPL_UPDATE 173 > > #define OPAL_MPIPL_REGISTER_TAG 174 > > #define OPAL_MPIPL_QUERY_TAG 175 > > diff --git a/arch/powerpc/include/asm/opal.h > > b/arch/powerpc/include/asm/opal.h index 9986ac34b8e2..301fea46c7ca > > 100644 > > --- a/arch/powerpc/include/asm/opal.h > > +++ b/arch/powerpc/include/asm/opal.h > > @@ -39,6 +39,8 @@ int64_t opal_npu_spa_clear_cache(uint64_t phb_id, > uint32_t bdfn, > > uint64_t PE_handle); int64_t > > opal_npu_tl_set(uint64_t phb_id, uint32_t bdfn, long cap, > > uint64_t rate_phys, uint32_t size); > > +int64_t opal_npu_mem_alloc(u64 phb_id, u32 bdfn, u64 size, __be64 > > +*bar); int64_t opal_npu_mem_release(u64 phb_id, u32 bdfn); > > > > int64_t opal_console_write(int64_t term_number, __be64 *length, > > const uint8_t *buffer); diff --git > > a/arch/powerpc/platforms/powernv/opal-call.c > > b/arch/powerpc/platforms/powernv/opal-call.c > > index 5cd0f52d258f..f26e58b72c04 100644 > > --- a/arch/powerpc/platforms/powernv/opal-call.c > > +++ b/arch/powerpc/platforms/powernv/opal-call.c > > @@ -287,6 +287,8 @@ OPAL_CALL(opal_pci_set_pbcq_tunnel_bar, > OPAL_PCI_SET_PBCQ_TUNNEL_BAR); > > OPAL_CALL(opal_sensor_read_u64, > OPAL_SENSOR_READ_U64); > > OPAL_CALL(opal_sensor_group_enable, > OPAL_SENSOR_GROUP_ENABLE); > > OPAL_CALL(opal_nx_coproc_init, = OPAL_NX_COPROC_INIT); > > +OPAL_CALL(opal_npu_mem_alloc, OPAL_NPU_MEM_ALLOC); > > +OPAL_CALL(opal_npu_mem_release, > OPAL_NPU_MEM_RELEASE); > > OPAL_CALL(opal_mpipl_update, OPAL_MPIPL_UPDATE); > > OPAL_CALL(opal_mpipl_register_tag, > OPAL_MPIPL_REGISTER_TAG); > > OPAL_CALL(opal_mpipl_query_tag, > OPAL_MPIPL_QUERY_TAG); > > -- > > 2.24.1 > > >=20 >=20 > -- > This email has been checked for viruses by AVG. > https://www.avg.com --=20 Alastair D'Silva mob: 0423 762 819 skype: alastair_dsilva msn: alastair@d-silva.org blog: http://alastair.d-silva.org Twitter: @EvilDeece