get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/817324/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 817324,
    "url": "http://patchwork.ozlabs.org/api/patches/817324/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/1505950480-14830-4-git-send-email-wei.guo.simon@gmail.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": "<1505950480-14830-4-git-send-email-wei.guo.simon@gmail.com>",
    "list_archive_url": "https://lore.kernel.org/linuxppc-dev/1505950480-14830-4-git-send-email-wei.guo.simon@gmail.com/",
    "date": "2017-09-20T23:34:40",
    "name": "[v2,3/3] powerpc:selftest update memcmp_64 selftest for VMX implementation",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "9235a7b4e63e6a2db9cd8ca239f087be95d06d5e",
    "submitter": {
        "id": 68632,
        "url": "http://patchwork.ozlabs.org/api/people/68632/?format=api",
        "name": "Simon Guo",
        "email": "wei.guo.simon@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/1505950480-14830-4-git-send-email-wei.guo.simon@gmail.com/mbox/",
    "series": [
        {
            "id": 4540,
            "url": "http://patchwork.ozlabs.org/api/series/4540/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=4540",
            "date": "2017-09-20T23:34:38",
            "name": "powerpc/64: memcmp() optimization",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/4540/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/817324/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/817324/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"
        ],
        "Received": [
            "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\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 3xz2Z8062lz9sRV\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 22 Sep 2017 15:47:44 +1000 (AEST)",
            "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xz2Z7646KzDsN0\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 22 Sep 2017 15:47:43 +1000 (AEST)",
            "from mail-pf0-x243.google.com (mail-pf0-x243.google.com\n\t[IPv6:2607:f8b0:400e:c00::243])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xz2N056mrzDsMT\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tFri, 22 Sep 2017 15:38:56 +1000 (AEST)",
            "by mail-pf0-x243.google.com with SMTP id f84so57959pfj.3\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tThu, 21 Sep 2017 22:38:56 -0700 (PDT)",
            "from simonLocalRHEL7.x64 ([112.73.6.48])\n\tby smtp.gmail.com with ESMTPSA id\n\tr12sm6234639pfd.187.2017.09.21.22.38.51\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 21 Sep 2017 22:38:54 -0700 (PDT)"
        ],
        "Authentication-Results": [
            "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"VJlNTa9b\"; dkim-atps=neutral",
            "lists.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"VJlNTa9b\"; dkim-atps=neutral",
            "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=gmail.com\n\t(client-ip=2607:f8b0:400e:c00::243; helo=mail-pf0-x243.google.com;\n\tenvelope-from=wei.guo.simon@gmail.com; receiver=<UNKNOWN>)",
            "lists.ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"VJlNTa9b\"; dkim-atps=neutral"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=IIMdcqfqqprjRQ7WpR7A0fRiSlZcHQCzPwrvH0Y1o5k=;\n\tb=VJlNTa9bqjX1I5UYXJZ4OiyvlFT80OSkTDzor+PUWmlEmILg4+GwaFG+O6dzcZiy6l\n\t0EZB9TGBamLeeH60yTP4Bl3xgCHhh6L8piF87T5aBC4P/mTr2yytWfuETHmNFxjqf+kr\n\tkk44CbIaFWMhzcHbrkRHuqWAMQynOkPB2IlZa8mjPENQoSO/sxnEl/PajwIOEjE4f6/A\n\tU9NSios+ywUVuIn90llMHQUURZ+bB2rYvlYHANUuZNzLo+8uZCObPbcY/oyvZF8H0Zj6\n\tKbJbq8UyHI4HV/Q/BoCxl2Nuy09pHrkdx9Q9YAAFhhIMsZIDpp6MYv7i6geLfrIQbxV2\n\te89w==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=IIMdcqfqqprjRQ7WpR7A0fRiSlZcHQCzPwrvH0Y1o5k=;\n\tb=dDcQU1WUP+GK8f5h5k11Z+tFJ3tfhQeI6cYqXXCp33KCeYa06rQi/wkFxRFTNw1V1Y\n\t/W3nzZoUrHdgia7oouHNz933RRoFCvqybKVKpg+2rTojfFfu3R79U7QKuLHDHJ0++XXq\n\to1aGQn6g2GADSssPNcA4HMDK+LEbw5AGt1aoMW0VfxD2fz6uJ07lYaGaaF2AuBH14Jea\n\tz+wMvmZz5jpTnEcbNvdf6bZcAjkHEAGBPC7gs3xetXmcuch0Bhf456rITd103k/19mVm\n\tZCotpZTF2CA9kkToLBIAOdZ6IfVcKDriyT14NGveubJc/kYnZ6N1YajGO8u48rTc7A2X\n\tVe2g==",
        "X-Gm-Message-State": "AHPjjUiHJSat40M/WiVQLiZQWN5lIh9AHmxf8UIR309sj0kT0Hx5XEkL\n\tKOyerg0ZUKu87efEw6EK9NDjVg==",
        "X-Google-Smtp-Source": "AOwi7QB0axqBCTqq81MGo2SqLUUZ+vnp7cBgPSNqUeIuKjsNE8A4HYP68d39uJCQ4lx4uvoCU0iKOg==",
        "X-Received": "by 10.99.110.69 with SMTP id j66mr8325988pgc.323.1506058734746; \n\tThu, 21 Sep 2017 22:38:54 -0700 (PDT)",
        "From": "wei.guo.simon@gmail.com",
        "To": "linuxppc-dev@lists.ozlabs.org",
        "Subject": "[PATCH v2 3/3] powerpc:selftest update memcmp_64 selftest for VMX\n\timplementation",
        "Date": "Thu, 21 Sep 2017 07:34:40 +0800",
        "Message-Id": "<1505950480-14830-4-git-send-email-wei.guo.simon@gmail.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1505950480-14830-1-git-send-email-wei.guo.simon@gmail.com>",
        "References": "<1505950480-14830-1-git-send-email-wei.guo.simon@gmail.com>",
        "X-BeenThere": "linuxppc-dev@lists.ozlabs.org",
        "X-Mailman-Version": "2.1.24",
        "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": "Simon Guo <wei.guo.simon@gmail.com>,\n\tDavid Laight <David.Laight@ACULAB.COM>, \n\t\"Naveen N.  Rao\" <naveen.n.rao@linux.vnet.ibm.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": "From: Simon Guo <wei.guo.simon@gmail.com>\n\nThis patch adjust selftest memcmp_64 so that memcmp selftest can be\ncompiled successfully.\n\nIt also adds testcases for memcmp over 4K bytes size.\n\nSigned-off-by: Simon Guo <wei.guo.simon@gmail.com>\n---\n .../selftests/powerpc/copyloops/asm/ppc_asm.h      |  2 +-\n .../selftests/powerpc/stringloops/asm/ppc_asm.h    | 31 +++++++++++\n .../testing/selftests/powerpc/stringloops/memcmp.c | 63 +++++++++++++++-------\n 3 files changed, 75 insertions(+), 21 deletions(-)",
    "diff": "diff --git a/tools/testing/selftests/powerpc/copyloops/asm/ppc_asm.h b/tools/testing/selftests/powerpc/copyloops/asm/ppc_asm.h\nindex 80d34a9..a9da02d 100644\n--- a/tools/testing/selftests/powerpc/copyloops/asm/ppc_asm.h\n+++ b/tools/testing/selftests/powerpc/copyloops/asm/ppc_asm.h\n@@ -35,7 +35,7 @@\n \tli\tr3,0\n \tblr\n \n-FUNC_START(enter_vmx_copy)\n+FUNC_START(enter_vmx_ops)\n \tli\tr3,1\n \tblr\n \ndiff --git a/tools/testing/selftests/powerpc/stringloops/asm/ppc_asm.h b/tools/testing/selftests/powerpc/stringloops/asm/ppc_asm.h\nindex 11bece8..c8bb360 100644\n--- a/tools/testing/selftests/powerpc/stringloops/asm/ppc_asm.h\n+++ b/tools/testing/selftests/powerpc/stringloops/asm/ppc_asm.h\n@@ -1,3 +1,5 @@\n+#ifndef _PPC_ASM_H\n+#define __PPC_ASM_H\n #include <ppc-asm.h>\n \n #ifndef r1\n@@ -5,3 +7,32 @@\n #endif\n \n #define _GLOBAL(A) FUNC_START(test_ ## A)\n+\n+#define CONFIG_ALTIVEC\n+\n+#define R14 r14\n+#define R15 r15\n+#define R16 r16\n+#define R17 r17\n+#define R18 r18\n+#define R19 r19\n+#define R20 r20\n+#define R21 r21\n+#define R22 r22\n+#define R29 r29\n+#define R30 r30\n+#define R31 r31\n+\n+#define STACKFRAMESIZE\t256\n+#define STK_REG(i)\t(112 + ((i)-14)*8)\n+\n+#define _GLOBAL(A) FUNC_START(test_ ## A)\n+#define _GLOBAL_TOC(A) _GLOBAL(A)\n+\n+#define PPC_MTOCRF(A, B)\tmtocrf A, B\n+\n+FUNC_START(enter_vmx_ops)\n+\tli      r3, 1\n+\tblr\n+\n+#endif\ndiff --git a/tools/testing/selftests/powerpc/stringloops/memcmp.c b/tools/testing/selftests/powerpc/stringloops/memcmp.c\nindex 30b1222..4826669 100644\n--- a/tools/testing/selftests/powerpc/stringloops/memcmp.c\n+++ b/tools/testing/selftests/powerpc/stringloops/memcmp.c\n@@ -1,20 +1,27 @@\n #include <malloc.h>\n #include <stdlib.h>\n #include <string.h>\n+#include <time.h>\n #include \"utils.h\"\n \n #define SIZE 256\n #define ITERATIONS 10000\n \n+#define LARGE_SIZE (5 * 1024)\n+#define LARGE_ITERATIONS 1000\n+#define LARGE_MAX_OFFSET 16\n+#define LARGE_SIZE_START 4096\n+\n int test_memcmp(const void *s1, const void *s2, size_t n);\n \n /* test all offsets and lengths */\n-static void test_one(char *s1, char *s2)\n+static void test_one(char *s1, char *s2, unsigned long max_offset,\n+\t\tunsigned long size_start)\n {\n \tunsigned long offset, size;\n \n-\tfor (offset = 0; offset < SIZE; offset++) {\n-\t\tfor (size = 0; size < (SIZE-offset); size++) {\n+\tfor (offset = 0; offset < max_offset; offset++) {\n+\t\tfor (size = size_start; size < (SIZE-offset); size++) {\n \t\t\tint x, y;\n \t\t\tunsigned long i;\n \n@@ -38,66 +45,82 @@ static void test_one(char *s1, char *s2)\n \t}\n }\n \n-static int testcase(void)\n+static int testcase(bool islarge)\n {\n \tchar *s1;\n \tchar *s2;\n \tunsigned long i;\n \n-\ts1 = memalign(128, SIZE);\n+\tunsigned long alloc_size = islarge ? LARGE_SIZE : SIZE;\n+\tint iterations = islarge ? LARGE_ITERATIONS : ITERATIONS;\n+\n+\ts1 = memalign(128, alloc_size);\n \tif (!s1) {\n \t\tperror(\"memalign\");\n \t\texit(1);\n \t}\n \n-\ts2 = memalign(128, SIZE);\n+\ts2 = memalign(128, alloc_size);\n \tif (!s2) {\n \t\tperror(\"memalign\");\n \t\texit(1);\n \t}\n \n-\tsrandom(1);\n+\tsrandom(time(0));\n \n-\tfor (i = 0; i < ITERATIONS; i++) {\n+\tfor (i = 0; i < iterations; i++) {\n \t\tunsigned long j;\n \t\tunsigned long change;\n \n-\t\tfor (j = 0; j < SIZE; j++)\n+\t\tfor (j = 0; j < alloc_size; j++)\n \t\t\ts1[j] = random();\n \n-\t\tmemcpy(s2, s1, SIZE);\n+\t\tmemcpy(s2, s1, alloc_size);\n \n \t\t/* change one byte */\n-\t\tchange = random() % SIZE;\n+\t\tchange = random() % alloc_size;\n \t\ts2[change] = random() & 0xff;\n \n-\t\ttest_one(s1, s2);\n+\t\tif (islarge)\n+\t\t\ttest_one(s1, s2, LARGE_MAX_OFFSET, LARGE_SIZE_START);\n+\t\telse\n+\t\t\ttest_one(s1, s2, SIZE, 0);\n \t}\n \n-\tsrandom(1);\n+\tsrandom(time(0));\n \n-\tfor (i = 0; i < ITERATIONS; i++) {\n+\tfor (i = 0; i < iterations; i++) {\n \t\tunsigned long j;\n \t\tunsigned long change;\n \n-\t\tfor (j = 0; j < SIZE; j++)\n+\t\tfor (j = 0; j < alloc_size; j++)\n \t\t\ts1[j] = random();\n \n-\t\tmemcpy(s2, s1, SIZE);\n+\t\tmemcpy(s2, s1, alloc_size);\n \n \t\t/* change multiple bytes, 1/8 of total */\n-\t\tfor (j = 0; j < SIZE / 8; j++) {\n-\t\t\tchange = random() % SIZE;\n+\t\tfor (j = 0; j < alloc_size / 8; j++) {\n+\t\t\tchange = random() % alloc_size;\n \t\t\ts2[change] = random() & 0xff;\n \t\t}\n \n-\t\ttest_one(s1, s2);\n+\t\tif (islarge)\n+\t\t\ttest_one(s1, s2, LARGE_MAX_OFFSET, LARGE_SIZE_START);\n+\t\telse\n+\t\t\ttest_one(s1, s2, SIZE, 0);\n \t}\n \n \treturn 0;\n }\n \n+static int testcases(void)\n+{\n+\ttestcase(0);\n+\ttestcase(1);\n+\treturn 0;\n+}\n+\n int main(void)\n {\n-\treturn test_harness(testcase, \"memcmp\");\n+\treturn test_harness(testcases, \"memcmp\");\n }\n",
    "prefixes": [
        "v2",
        "3/3"
    ]
}