get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 567107,
    "url": "http://patchwork.ozlabs.org/api/patches/567107/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1452687149-11281-8-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-8-git-send-email-christopher.s.hall@intel.com>",
    "list_archive_url": null,
    "date": "2016-01-13T12:12:27",
    "name": "[v6,7/9] Remove duplicated code in ktime_get_raw_and_real()",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "4d332497c65a2e3d02ccbab86bbf68ba26d00f5c",
    "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-8-git-send-email-christopher.s.hall@intel.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/567107/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/567107/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 F3CD9140297\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 14 Jan 2016 06:18:44 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 47E6294660;\n\tWed, 13 Jan 2016 19:18:44 +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 7yLb7Jxkqv+o; Wed, 13 Jan 2016 19:18:43 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 3871494629;\n\tWed, 13 Jan 2016 19:18:43 +0000 (UTC)",
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id D277E1C0F8E\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 13 Jan 2016 19:18:40 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 0F21B8C841\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 13 Jan 2016 19:18:40 +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 8wVpTk09pLY5 for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 13 Jan 2016 19:18:39 +0000 (UTC)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 7B5A98C965\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 13 Jan 2016 19:18:39 +0000 (UTC)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby fmsmga102.fm.intel.com with ESMTP; 13 Jan 2016 11:18:40 -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:39 -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=\"632939112\"",
        "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:27 -0800",
        "Message-Id": "<1452687149-11281-8-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 7/9] Remove duplicated code in\n\tktime_get_raw_and_real()",
        "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 code in ktime_get_snapshot() is a superset of the code in\nktime_get_raw_and_real() code. Further, ktime_get_raw_and_real() is\ncalled only by the PPS code, pps_get_ts(). Consolidate the\npps_get_ts() code into a single function calling ktime_get_snapshot()\nand eliminate ktime_get_raw_and_real(). A side effect of this is that\nthe raw and real results of pps_get_ts() correspond to exactly the\nsame clock cycle. Previously these values represented separate reads\nof the system clock.\n\nSigned-off-by: Christopher S. Hall <christopher.s.hall@intel.com>\n---\n include/linux/pps_kernel.h | 17 ++++++-----------\n kernel/time/timekeeping.c  | 40 ++--------------------------------------\n 2 files changed, 8 insertions(+), 49 deletions(-)",
    "diff": "diff --git a/include/linux/pps_kernel.h b/include/linux/pps_kernel.h\nindex 54bf148..35ac903 100644\n--- a/include/linux/pps_kernel.h\n+++ b/include/linux/pps_kernel.h\n@@ -111,22 +111,17 @@ static inline void timespec_to_pps_ktime(struct pps_ktime *kt,\n \tkt->nsec = ts.tv_nsec;\n }\n \n-#ifdef CONFIG_NTP_PPS\n-\n static inline void pps_get_ts(struct pps_event_time *ts)\n {\n-\tktime_get_raw_and_real_ts64(&ts->ts_raw, &ts->ts_real);\n-}\n+\tstruct system_time_snapshot snap;\n \n-#else /* CONFIG_NTP_PPS */\n-\n-static inline void pps_get_ts(struct pps_event_time *ts)\n-{\n-\tktime_get_real_ts64(&ts->ts_real);\n+\tktime_get_snapshot(&snap);\n+\tts->ts_real = ktime_to_timespec64(snap.real);\n+#ifdef CONFIG_NTP_PPS\n+\tts->ts_raw = ktime_to_timespec64(snap.raw);\n+#endif\n }\n \n-#endif /* CONFIG_NTP_PPS */\n-\n /* Subtract known time delay from PPS event time(s) */\n static inline void pps_sub_ts(struct pps_event_time *ts, struct timespec64 delta)\n {\ndiff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c\nindex 54554ac..9975ca4 100644\n--- a/kernel/time/timekeeping.c\n+++ b/kernel/time/timekeeping.c\n@@ -877,6 +877,8 @@ void ktime_get_snapshot(struct system_time_snapshot *systime_snapshot)\n \ts64 nsec_real;\n \tcycle_t now;\n \n+\tWARN_ON(timekeeping_suspended);\n+\n \tdo {\n \t\tseq = read_seqcount_begin(&tk_core.seq);\n \n@@ -896,44 +898,6 @@ void ktime_get_snapshot(struct system_time_snapshot *systime_snapshot)\n }\n EXPORT_SYMBOL_GPL(ktime_get_snapshot);\n \n-#ifdef CONFIG_NTP_PPS\n-\n-/**\n- * ktime_get_raw_and_real_ts64 - get day and raw monotonic time in timespec format\n- * @ts_raw:\tpointer to the timespec to be set to raw monotonic time\n- * @ts_real:\tpointer to the timespec to be set to the time of day\n- *\n- * This function reads both the time of day and raw monotonic time at the\n- * same time atomically and stores the resulting timestamps in timespec\n- * format.\n- */\n-void ktime_get_raw_and_real_ts64(struct timespec64 *ts_raw, struct timespec64 *ts_real)\n-{\n-\tstruct timekeeper *tk = &tk_core.timekeeper;\n-\tunsigned long seq;\n-\ts64 nsecs_raw, nsecs_real;\n-\n-\tWARN_ON_ONCE(timekeeping_suspended);\n-\n-\tdo {\n-\t\tseq = read_seqcount_begin(&tk_core.seq);\n-\n-\t\t*ts_raw = tk->raw_time;\n-\t\tts_real->tv_sec = tk->xtime_sec;\n-\t\tts_real->tv_nsec = 0;\n-\n-\t\tnsecs_raw  = timekeeping_get_ns(&tk->tkr_raw);\n-\t\tnsecs_real = timekeeping_get_ns(&tk->tkr_mono);\n-\n-\t} while (read_seqcount_retry(&tk_core.seq, seq));\n-\n-\ttimespec64_add_ns(ts_raw, nsecs_raw);\n-\ttimespec64_add_ns(ts_real, nsecs_real);\n-}\n-EXPORT_SYMBOL(ktime_get_raw_and_real_ts64);\n-\n-#endif /* CONFIG_NTP_PPS */\n-\n /**\n  * adjust_historical_crosststamp - adjust crosstimestamp previous to current interval\n  * @total_history_cycles:\tTotal history length in cycles\n",
    "prefixes": [
        "v6",
        "7/9"
    ]
}