Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/524561/?format=api
{ "id": 524561, "url": "http://patchwork.ozlabs.org/api/patches/524561/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1443612402-3000775-4-git-send-email-arnd@arndb.de/", "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": "<1443612402-3000775-4-git-send-email-arnd@arndb.de>", "list_archive_url": null, "date": "2015-09-30T11:26:33", "name": "[03/12] net: igb: avoid using timespec", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "65a79477ab2a7e2a4f829d47d622a5b3af3c28d3", "submitter": { "id": 30, "url": "http://patchwork.ozlabs.org/api/people/30/?format=api", "name": "Arnd Bergmann", "email": "arnd@arndb.de" }, "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/1443612402-3000775-4-git-send-email-arnd@arndb.de/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/524561/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/524561/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 B0274140D6B\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 1 Oct 2015 06:42:20 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 037928AE39;\n\tWed, 30 Sep 2015 20:42:20 +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 ICXSTbS0UlNE; Wed, 30 Sep 2015 20:42:18 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 295238ABB7;\n\tWed, 30 Sep 2015 20:42:18 +0000 (UTC)", "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 732461C1FA6\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 30 Sep 2015 11:27:16 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 6CF0A8D5AA\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 30 Sep 2015 11:27:16 +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 QKwOVNLo0WlV for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 30 Sep 2015 11:27:15 +0000 (UTC)", "from mout.kundenserver.de (mout.kundenserver.de [212.227.126.131])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id 466DB8D784\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 30 Sep 2015 11:27:14 +0000 (UTC)", "from wuerfel.lan. ([149.172.15.242]) by mrelayeu.kundenserver.de\n\t(mreue003) with ESMTPSA (Nemesis) id 0LyQ4I-1aldRb05G2-015q2J;\n\tWed, 30 Sep 2015 13:27:01 +0200" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "from auto-whitelisted by SQLgrey-1.7.6", "From": "Arnd Bergmann <arnd@arndb.de>", "To": "netdev@vger.kernel.org", "Date": "Wed, 30 Sep 2015 13:26:33 +0200", "Message-Id": "<1443612402-3000775-4-git-send-email-arnd@arndb.de>", "X-Mailer": "git-send-email 2.1.0.rc2", "In-Reply-To": "<1443612402-3000775-1-git-send-email-arnd@arndb.de>", "References": "<1443612402-3000775-1-git-send-email-arnd@arndb.de>", "X-Provags-ID": "V03:K0:Nc03uAouRNavKEc84WcR4E7aoWX4VI9o0swGQG/jnWC6TTGRpz2\n\t/d6X4TMMSExIY+HrWizBnDPj2O4aVWHWsyKVi7bfW0/jjWiIrkPq5OljRKaxOyKYciiM34c\n\tE9250cSbPLrqgwETHxZbQCt/9LFzZ3zH1RqBXhVZ48L6w9x+NRxUtQwHvKEgrCuP7vIRfL7\n\tX8L4Z7S2oIOJAqllu7lnQ==", "X-UI-Out-Filterresults": "notjunk:1; V01:K0:5+wCC1Oj3hI=:pY7csowIaqH2rFdOKYyIio\n\tm9Und6bVKp/V2PN1fQtj3maJR/mCjovbZcagJeKq6dwNaoWqGc2pbDO+2B/UUs3F+eijbAig3\n\tXISf8J2ykZ6tN/Yn7trUj1SkTtiHMyPf/GPEIg4Zk945wqUj3N9qUqlm1DcQHCOtYyHnIJ/i1\n\tze3zvn0T+gTrYxrFtnapoSV/vIwTjHtvJ9oNy1zGztvZcVsbDp4vb9JZm58+LwXsT0SCZABCW\n\tg1q2k19dHSvF7bj6MNIYbzZ46Zwhj3SIQU44PThQfB23qkfAOpV8FxmSFbbv4sxd5WxkymOoH\n\tZSjVLduFfaNHFms/5RtogfHR8e3a7ysrXR+JAdGzAadC+DO8FruZHNaq12ZtHf/FMAU6l8Z3v\n\tM02tfoWH0VngWPDbkQH6TC4BiqxhF2LzWpWZl5eHuKN7jIxaGsq7P7dLcPQDXEHl/q54fcfjl\n\t9TSkCt86kvih8tEn3Ke/rLc2LeoYzmjbuPRzrFTsj2Tkdrzw6QMHqewV4R4zq40Zrx8OiW8AS\n\tIg1HyzZeHHwr/6LtbFnW6ysf7ab0uLvCLk/oF5E9+EVWip89xOfoXBExpUbvGojzscNAkFdQm\n\tUGiJk2Hi58fATySEuSD22hfqPICaCY/ov4wNUQjcPebITdFjTP61XxheauHSt6btt3TakfaLH\n\tyCocQxYtLy2hHcsjJR4GsspuY297liLUfYvZ9leJ/qEUincaAG98MN+LsqtacuVaREho=", "X-Mailman-Approved-At": "Wed, 30 Sep 2015 20:42:17 +0000", "Cc": "Arnd Bergmann <arnd@arndb.de>, y2038@lists.linaro.org,\n\tlinux-kernel@vger.kernel.org, intel-wired-lan@lists.osuosl.org,\n\t\"David S. Miller\" <davem@davemloft.net>", "Subject": "[Intel-wired-lan] [PATCH 03/12] net: igb: avoid using timespec", "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": "We want to deprecate the use of 'struct timespec' on 32-bit\narchitectures, as it is will overflow in 2038. The igb\ndriver uses it to read the current time, and can simply\nbe changed to use ktime_get_real_ts64() instead.\n\nBecause of hardware limitations, there is still an overflow\nin year 2106, which we cannot really avoid, but this documents\nthe overflow.\n\nSigned-off-by: Arnd Bergmann <arnd@arndb.de>\nCc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>\nCc: intel-wired-lan@lists.osuosl.org\n---\n drivers/net/ethernet/intel/igb/igb.h | 4 ++--\n drivers/net/ethernet/intel/igb/igb_main.c | 15 ++++++++-------\n drivers/net/ethernet/intel/igb/igb_ptp.c | 8 ++++----\n 3 files changed, 14 insertions(+), 13 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/igb/igb.h b/drivers/net/ethernet/intel/igb/igb.h\nindex 212d668dabb3..1a2f1cc44b28 100644\n--- a/drivers/net/ethernet/intel/igb/igb.h\n+++ b/drivers/net/ethernet/intel/igb/igb.h\n@@ -444,8 +444,8 @@ struct igb_adapter {\n \n \tstruct ptp_pin_desc sdp_config[IGB_N_SDP];\n \tstruct {\n-\t\tstruct timespec start;\n-\t\tstruct timespec period;\n+\t\tstruct timespec64 start;\n+\t\tstruct timespec64 period;\n \t} perout[IGB_N_PEROUT];\n \n \tchar fw_version[32];\ndiff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c\nindex e174fbbdba40..911bbadbb994 100644\n--- a/drivers/net/ethernet/intel/igb/igb_main.c\n+++ b/drivers/net/ethernet/intel/igb/igb_main.c\n@@ -5389,7 +5389,7 @@ static void igb_tsync_interrupt(struct igb_adapter *adapter)\n {\n \tstruct e1000_hw *hw = &adapter->hw;\n \tstruct ptp_clock_event event;\n-\tstruct timespec ts;\n+\tstruct timespec64 ts;\n \tu32 ack = 0, tsauxc, sec, nsec, tsicr = rd32(E1000_TSICR);\n \n \tif (tsicr & TSINTR_SYS_WRAP) {\n@@ -5409,10 +5409,11 @@ static void igb_tsync_interrupt(struct igb_adapter *adapter)\n \n \tif (tsicr & TSINTR_TT0) {\n \t\tspin_lock(&adapter->tmreg_lock);\n-\t\tts = timespec_add(adapter->perout[0].start,\n-\t\t\t\t adapter->perout[0].period);\n+\t\tts = timespec64_add(adapter->perout[0].start,\n+\t\t\t\t adapter->perout[0].period);\n+\t\t/* u32 conversion of tv_sec is safe until y2106 */\n \t\twr32(E1000_TRGTTIML0, ts.tv_nsec);\n-\t\twr32(E1000_TRGTTIMH0, ts.tv_sec);\n+\t\twr32(E1000_TRGTTIMH0, (u32)ts.tv_sec);\n \t\ttsauxc = rd32(E1000_TSAUXC);\n \t\ttsauxc |= TSAUXC_EN_TT0;\n \t\twr32(E1000_TSAUXC, tsauxc);\n@@ -5423,10 +5424,10 @@ static void igb_tsync_interrupt(struct igb_adapter *adapter)\n \n \tif (tsicr & TSINTR_TT1) {\n \t\tspin_lock(&adapter->tmreg_lock);\n-\t\tts = timespec_add(adapter->perout[1].start,\n-\t\t\t\t adapter->perout[1].period);\n+\t\tts = timespec64_add(adapter->perout[1].start,\n+\t\t\t\t adapter->perout[1].period);\n \t\twr32(E1000_TRGTTIML1, ts.tv_nsec);\n-\t\twr32(E1000_TRGTTIMH1, ts.tv_sec);\n+\t\twr32(E1000_TRGTTIMH1, (u32)ts.tv_sec);\n \t\ttsauxc = rd32(E1000_TSAUXC);\n \t\ttsauxc |= TSAUXC_EN_TT1;\n \t\twr32(E1000_TSAUXC, tsauxc);\ndiff --git a/drivers/net/ethernet/intel/igb/igb_ptp.c b/drivers/net/ethernet/intel/igb/igb_ptp.c\nindex 5982f28d521a..c44df87c38de 100644\n--- a/drivers/net/ethernet/intel/igb/igb_ptp.c\n+++ b/drivers/net/ethernet/intel/igb/igb_ptp.c\n@@ -143,7 +143,7 @@ static void igb_ptp_write_i210(struct igb_adapter *adapter,\n \t * sub-nanosecond resolution.\n \t */\n \twr32(E1000_SYSTIML, ts->tv_nsec);\n-\twr32(E1000_SYSTIMH, ts->tv_sec);\n+\twr32(E1000_SYSTIMH, (u32)ts->tv_sec);\n }\n \n /**\n@@ -479,7 +479,7 @@ static int igb_ptp_feature_enable_i210(struct ptp_clock_info *ptp,\n \tstruct e1000_hw *hw = &igb->hw;\n \tu32 tsauxc, tsim, tsauxc_mask, tsim_mask, trgttiml, trgttimh, freqout;\n \tunsigned long flags;\n-\tstruct timespec ts;\n+\tstruct timespec64 ts;\n \tint use_freq = 0, pin = -1;\n \ts64 ns;\n \n@@ -523,14 +523,14 @@ static int igb_ptp_feature_enable_i210(struct ptp_clock_info *ptp,\n \t\t}\n \t\tts.tv_sec = rq->perout.period.sec;\n \t\tts.tv_nsec = rq->perout.period.nsec;\n-\t\tns = timespec_to_ns(&ts);\n+\t\tns = timespec64_to_ns(&ts);\n \t\tns = ns >> 1;\n \t\tif (on && ns <= 70000000LL) {\n \t\t\tif (ns < 8LL)\n \t\t\t\treturn -EINVAL;\n \t\t\tuse_freq = 1;\n \t\t}\n-\t\tts = ns_to_timespec(ns);\n+\t\tts = ns_to_timespec64(ns);\n \t\tif (rq->perout.index == 1) {\n \t\t\tif (use_freq) {\n \t\t\t\ttsauxc_mask = TSAUXC_EN_CLK1 | TSAUXC_ST1;\n", "prefixes": [ "03/12" ] }