Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/805266/?format=api
{ "id": 805266, "url": "http://patchwork.ozlabs.org/api/patches/805266/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/1503556688-15412-9-git-send-email-sukadev@linux.vnet.ibm.com/", "project": { "id": 2, "url": "http://patchwork.ozlabs.org/api/projects/2/?format=api", "name": "Linux PPC development", "link_name": "linuxppc-dev", "list_id": "linuxppc-dev.lists.ozlabs.org", "list_email": "linuxppc-dev@lists.ozlabs.org", "web_url": "https://github.com/linuxppc/wiki/wiki", "scm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git", "webscm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/", "list_archive_url_format": "https://lore.kernel.org/linuxppc-dev/{}/", "commit_url_format": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}" }, "msgid": "<1503556688-15412-9-git-send-email-sukadev@linux.vnet.ibm.com>", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/1503556688-15412-9-git-send-email-sukadev@linux.vnet.ibm.com/", "date": "2017-08-24T06:38:04", "name": "[v7,08/12] powerpc/vas: Define vas_win_id()", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "c2dbe7111fb8acef0c2cb1df8378cf8703430cd9", "submitter": { "id": 984, "url": "http://patchwork.ozlabs.org/api/people/984/?format=api", "name": "Sukadev Bhattiprolu", "email": "sukadev@linux.vnet.ibm.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/1503556688-15412-9-git-send-email-sukadev@linux.vnet.ibm.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/805266/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/805266/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>", "X-Original-To": [ "patchwork-incoming@ozlabs.org", "linuxppc-dev@lists.ozlabs.org" ], "Delivered-To": [ "patchwork-incoming@ozlabs.org", "linuxppc-dev@lists.ozlabs.org", "linuxppc-dev@ozlabs.org" ], "Received": [ "from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xdFNK07Wxz9ryk\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 24 Aug 2017 16:52:33 +1000 (AEST)", "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xdFNJ6L79zDrJv\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 24 Aug 2017 16:52:32 +1000 (AEST)", "from ozlabs.org (bilbo.ozlabs.org [103.22.144.67])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xdF4K41yqzDrK0\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tThu, 24 Aug 2017 16:38:41 +1000 (AEST)", "from ozlabs.org (bilbo.ozlabs.org [103.22.144.67])\n\tby bilbo.ozlabs.org (Postfix) with ESMTP id 3xdF4K222vz8w2V\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tThu, 24 Aug 2017 16:38:41 +1000 (AEST)", "by ozlabs.org (Postfix)\n\tid 3xdF4J6R8kz9t5C; Thu, 24 Aug 2017 16:38:40 +1000 (AEST)", "from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com\n\t[148.163.158.5])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xdF4H64xqz9t2l\n\tfor <linuxppc-dev@ozlabs.org>; Thu, 24 Aug 2017 16:38:39 +1000 (AEST)", "from pps.filterd (m0098413.ppops.net [127.0.0.1])\n\tby mx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv7O6ZWwS094371\n\tfor <linuxppc-dev@ozlabs.org>; Thu, 24 Aug 2017 02:38:36 -0400", "from e18.ny.us.ibm.com (e18.ny.us.ibm.com [129.33.205.208])\n\tby mx0b-001b2d01.pphosted.com with ESMTP id 2chm6sqr0b-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <linuxppc-dev@ozlabs.org>; Thu, 24 Aug 2017 02:38:36 -0400", "from localhost\n\tby e18.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <linuxppc-dev@ozlabs.org> from <sukadev@linux.vnet.ibm.com>;\n\tThu, 24 Aug 2017 02:38:36 -0400", "from b01cxnp23034.gho.pok.ibm.com (9.57.198.29)\n\tby e18.ny.us.ibm.com (146.89.104.205) with IBM ESMTP SMTP Gateway:\n\tAuthorized Use Only! Violators will be prosecuted; \n\tThu, 24 Aug 2017 02:38:31 -0400", "from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com\n\t[9.57.199.107])\n\tby b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP\n\tid v7O6cUTP26149024; Thu, 24 Aug 2017 06:38:30 GMT", "from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id AE51812403D;\n\tThu, 24 Aug 2017 02:35:51 -0400 (EDT)", "from suka-w540.usor.ibm.com (unknown [9.70.94.25])\n\tby b01ledav002.gho.pok.ibm.com (Postfix) with ESMTP id D4B78124035;\n\tThu, 24 Aug 2017 02:35:50 -0400 (EDT)" ], "Authentication-Results": "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=linux.vnet.ibm.com\n\t(client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com;\n\tenvelope-from=sukadev@linux.vnet.ibm.com; receiver=<UNKNOWN>)", "From": "Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>", "To": "Michael Ellerman <mpe@ellerman.id.au>", "Subject": "[PATCH v7 08/12] powerpc/vas: Define vas_win_id()", "Date": "Wed, 23 Aug 2017 23:38:04 -0700", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1503556688-15412-1-git-send-email-sukadev@linux.vnet.ibm.com>", "References": "<1503556688-15412-1-git-send-email-sukadev@linux.vnet.ibm.com>", "X-TM-AS-GCONF": "00", "x-cbid": "17082406-0044-0000-0000-000003822BD1", "X-IBM-SpamModules-Scores": "", "X-IBM-SpamModules-Versions": "BY=3.00007601; HX=3.00000241; KW=3.00000007;\n\tPH=3.00000004; SC=3.00000224; SDB=6.00906836; UDB=6.00454554;\n\tIPR=6.00687033; \n\tBA=6.00005550; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009;\n\tZB=6.00000000; \n\tZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00016840;\n\tXFM=3.00000015; UTC=2017-08-24 06:38:34", "X-IBM-AV-DETECTION": "SAVI=unused REMOTE=unused XFE=unused", "x-cbparentid": "17082406-0045-0000-0000-000007B0437D", "Message-Id": "<1503556688-15412-9-git-send-email-sukadev@linux.vnet.ibm.com>", "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-08-24_03:, , signatures=0", "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=0\n\tmalwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam\n\tadjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000\n\tdefinitions=main-1708240106", "X-BeenThere": "linuxppc-dev@lists.ozlabs.org", "X-Mailman-Version": "2.1.23", "Precedence": "list", "List-Id": "Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>", "List-Unsubscribe": "<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>", "List-Archive": "<http://lists.ozlabs.org/pipermail/linuxppc-dev/>", "List-Post": "<mailto:linuxppc-dev@lists.ozlabs.org>", "List-Help": "<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>", "List-Subscribe": "<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>", "Cc": "stewart@linux.vnet.ibm.com, mikey@neuling.org, linuxppc-dev@ozlabs.org, \n\tlinux-kernel@vger.kernel.org, apopple@au1.ibm.com, oohall@gmail.com", "Errors-To": "linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org", "Sender": "\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>" }, "content": "Define an interface to return a system-wide unique id for a given VAS\nwindow.\n\nThe vas_win_id() will be used in a follow-on patch to generate an unique\nhandle for a user space receive window. Applications can use this handle\nto pair send and receive windows for fast thread-wakeup.\n\nThe hardware refers to this system-wide unique id as a Partition Send\nWindow ID which is expected to be used during fault handling. Hence the\n\"pswid\" in the function names.\n\nSigned-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>\n---\n arch/powerpc/include/asm/vas.h | 5 +++++\n arch/powerpc/platforms/powernv/vas-window.c | 9 +++++++++\n arch/powerpc/platforms/powernv/vas.h | 28 ++++++++++++++++++++++++++++\n 3 files changed, 42 insertions(+)", "diff": "diff --git a/arch/powerpc/include/asm/vas.h b/arch/powerpc/include/asm/vas.h\nindex 2f1c168..6c126f3 100644\n--- a/arch/powerpc/include/asm/vas.h\n+++ b/arch/powerpc/include/asm/vas.h\n@@ -53,6 +53,11 @@ enum vas_cop_type {\n };\n \n /*\n+ * Return a system-wide unique id for the VAS window @win.\n+ */\n+extern uint32_t vas_win_id(struct vas_window *win);\n+\n+/*\n * Return the power bus paste address associated with @win so the caller\n * can map that address into their address space.\n */\ndiff --git a/arch/powerpc/platforms/powernv/vas-window.c b/arch/powerpc/platforms/powernv/vas-window.c\nindex 3a4599f..42c1d4f 100644\n--- a/arch/powerpc/platforms/powernv/vas-window.c\n+++ b/arch/powerpc/platforms/powernv/vas-window.c\n@@ -575,3 +575,12 @@ int vas_win_close(struct vas_window *window)\n {\n \treturn -1;\n }\n+\n+/*\n+ * Return a system-wide unique window id for the window @win.\n+ */\n+uint32_t vas_win_id(struct vas_window *win)\n+{\n+\treturn encode_pswid(win->vinst->vas_id, win->winid);\n+}\n+EXPORT_SYMBOL_GPL(vas_win_id);\ndiff --git a/arch/powerpc/platforms/powernv/vas.h b/arch/powerpc/platforms/powernv/vas.h\nindex 7b2bcd0..3eadf90 100644\n--- a/arch/powerpc/platforms/powernv/vas.h\n+++ b/arch/powerpc/platforms/powernv/vas.h\n@@ -440,4 +440,32 @@ static inline uint64_t read_hvwc_reg(struct vas_window *win,\n \treturn in_be64(win->hvwc_map+reg);\n }\n \n+/*\n+ * Encode/decode the Partition Send Window ID (PSWID) for a window in\n+ * a way that we can uniquely identify any window in the system. i.e.\n+ * we should be able to locate the 'struct vas_window' given the PSWID.\n+ *\n+ *\tBits\tUsage\n+ *\t0:7\tVAS id (8 bits)\n+ *\t8:15\tUnused, 0 (3 bits)\n+ *\t16:31\tWindow id (16 bits)\n+ */\n+static inline u32 encode_pswid(int vasid, int winid)\n+{\n+\tu32 pswid = 0;\n+\n+\tpswid |= vasid << (31 - 7);\n+\tpswid |= winid;\n+\n+\treturn pswid;\n+}\n+\n+static inline void decode_pswid(u32 pswid, int *vasid, int *winid)\n+{\n+\tif (vasid)\n+\t\t*vasid = pswid >> (31 - 7) & 0xFF;\n+\n+\tif (winid)\n+\t\t*winid = pswid & 0xFFFF;\n+}\n #endif /* _VAS_H */\n", "prefixes": [ "v7", "08/12" ] }