get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 567102,
    "url": "http://patchwork.ozlabs.org/api/patches/567102/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1452687149-11281-2-git-send-email-christopher.s.hall@intel.com/",
    "project": {
        "id": 46,
        "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api",
        "name": "Intel Wired Ethernet development",
        "link_name": "intel-wired-lan",
        "list_id": "intel-wired-lan.osuosl.org",
        "list_email": "intel-wired-lan@osuosl.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<1452687149-11281-2-git-send-email-christopher.s.hall@intel.com>",
    "list_archive_url": null,
    "date": "2016-01-13T12:12:21",
    "name": "[v6,1/9] Add cycles to nanoseconds translation",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "03afef10425400d71eeeca8bd0192f108defd5e6",
    "submitter": {
        "id": 66720,
        "url": "http://patchwork.ozlabs.org/api/people/66720/?format=api",
        "name": "Hall, Christopher S",
        "email": "christopher.s.hall@intel.com"
    },
    "delegate": {
        "id": 68,
        "url": "http://patchwork.ozlabs.org/api/users/68/?format=api",
        "username": "jtkirshe",
        "first_name": "Jeff",
        "last_name": "Kirsher",
        "email": "jeffrey.t.kirsher@intel.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1452687149-11281-2-git-send-email-christopher.s.hall@intel.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/567102/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/567102/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<intel-wired-lan-bounces@lists.osuosl.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Received": [
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ozlabs.org (Postfix) with ESMTP id 5CEC31402C4\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 14 Jan 2016 06:18:38 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id A10C79493F;\n\tWed, 13 Jan 2016 19:18:37 +0000 (UTC)",
            "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 4bG6vrT-t3KQ; Wed, 13 Jan 2016 19:18:37 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 15EEB9477A;\n\tWed, 13 Jan 2016 19:18:37 +0000 (UTC)",
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id E632C1C0F8E\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 13 Jan 2016 19:18:35 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 1FCC78C942\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 13 Jan 2016 19:18:35 +0000 (UTC)",
            "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 3cPyKuigQuU1 for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 13 Jan 2016 19:18:34 +0000 (UTC)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 735AB8C949\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 13 Jan 2016 19:18:34 +0000 (UTC)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby fmsmga102.fm.intel.com with ESMTP; 13 Jan 2016 11:18:35 -0800",
            "from foofoo.jf.intel.com (HELO localhost.localdomain)\n\t([134.134.172.151])\n\tby FMSMGA003.fm.intel.com with ESMTP; 13 Jan 2016 11:18:34 -0800"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.22,290,1449561600\"; d=\"scan'208\";a=\"632939073\"",
        "From": "\"Christopher S. Hall\" <christopher.s.hall@intel.com>",
        "To": "tglx@linutronix.de, richardcochran@gmail.com, mingo@redhat.com,\n\tjohn.stultz@linaro.org, hpa@zytor.com, jeffrey.t.kirsher@intel.com",
        "Date": "Wed, 13 Jan 2016 04:12:21 -0800",
        "Message-Id": "<1452687149-11281-2-git-send-email-christopher.s.hall@intel.com>",
        "X-Mailer": "git-send-email 2.1.4",
        "In-Reply-To": "<1452687149-11281-1-git-send-email-christopher.s.hall@intel.com>",
        "References": "<1452687149-11281-1-git-send-email-christopher.s.hall@intel.com>",
        "Cc": "\"Christopher S. Hall\" <christopher.s.hall@intel.com>,\n\tkevin.b.stanton@intel.com, netdev@vger.kernel.org, x86@kernel.org,\n\tlinux-kernel@vger.kernel.org, intel-wired-lan@lists.osuosl.org",
        "Subject": "[Intel-wired-lan] [PATCH v6 1/9] Add cycles to nanoseconds\n\ttranslation",
        "X-BeenThere": "intel-wired-lan@lists.osuosl.org",
        "X-Mailman-Version": "2.1.18-1",
        "Precedence": "list",
        "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.lists.osuosl.org>",
        "List-Unsubscribe": "<http://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>",
        "List-Post": "<mailto:intel-wired-lan@lists.osuosl.org>",
        "List-Help": "<mailto:intel-wired-lan-request@lists.osuosl.org?subject=help>",
        "List-Subscribe": "<http://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=subscribe>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "intel-wired-lan-bounces@lists.osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@lists.osuosl.org>"
    },
    "content": "The timekeeping code does not currently provide a way to translate\nexternally provided clocksource cycles to system time. The cycle count\nis always provided by the result clocksource read() method internal to\nthe timekeeping code. The added function timekeeping_cycles_to_ns()\ncalculated a nanosecond value from a cycle count that can be added to\ntk_read_base.base value yielding the current system time. This allows\nclocksource cycle values external to the timekeeping code to provide a\ncycle count that can be transformed to system time.\n\nSigned-off-by: Christopher S. Hall <christopher.s.hall@intel.com>\n---\n kernel/time/timekeeping.c | 24 ++++++++++++++++++++----\n 1 file changed, 20 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c\nindex d563c19..3f127dd 100644\n--- a/kernel/time/timekeeping.c\n+++ b/kernel/time/timekeeping.c\n@@ -298,13 +298,11 @@ u32 (*arch_gettimeoffset)(void) = default_arch_gettimeoffset;\n static inline u32 arch_gettimeoffset(void) { return 0; }\n #endif\n \n-static inline s64 timekeeping_get_ns(struct tk_read_base *tkr)\n+static inline s64 timekeeping_delta_to_ns(struct tk_read_base *tkr,\n+\t\t\t\t\t  cycle_t delta)\n {\n-\tcycle_t delta;\n \ts64 nsec;\n \n-\tdelta = timekeeping_get_delta(tkr);\n-\n \tnsec = delta * tkr->mult + tkr->xtime_nsec;\n \tnsec >>= tkr->shift;\n \n@@ -312,6 +310,24 @@ static inline s64 timekeeping_get_ns(struct tk_read_base *tkr)\n \treturn nsec + arch_gettimeoffset();\n }\n \n+static inline s64 timekeeping_get_ns(struct tk_read_base *tkr)\n+{\n+\tcycle_t delta;\n+\n+\tdelta = timekeeping_get_delta(tkr);\n+\treturn timekeeping_delta_to_ns(tkr, delta);\n+}\n+\n+static inline s64 timekeeping_cycles_to_ns(struct tk_read_base *tkr,\n+\t\t\t\t\t    cycle_t cycles)\n+{\n+\tcycle_t delta;\n+\n+\t/* calculate the delta since the last update_wall_time */\n+\tdelta = clocksource_delta(cycles, tkr->cycle_last, tkr->mask);\n+\treturn timekeeping_delta_to_ns(tkr, delta);\n+}\n+\n /**\n  * update_fast_timekeeper - Update the fast and NMI safe monotonic timekeeper.\n  * @tkr: Timekeeping readout base from which we take the update\n",
    "prefixes": [
        "v6",
        "1/9"
    ]
}