Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/8550/?format=api
https://patches.dpdk.org/api/patches/8550/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1446508048-16744-5-git-send-email-viktorin@rehivetech.com/", "project": { "id": 1, "url": "https://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<1446508048-16744-5-git-send-email-viktorin@rehivetech.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1446508048-16744-5-git-send-email-viktorin@rehivetech.com", "date": "2015-11-02T23:47:17", "name": "[dpdk-dev,v6,04/15] eal/arm: implement rdtsc by PMU or clock_gettime", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "5acb691ce24060b6025369b286768092f9f1e81a", "submitter": { "id": 292, "url": "https://patches.dpdk.org/api/people/292/?format=api", "name": "Jan Viktorin", "email": "viktorin@rehivetech.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1446508048-16744-5-git-send-email-viktorin@rehivetech.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/8550/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/8550/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 95A948E99;\n\tTue, 3 Nov 2015 00:50:26 +0100 (CET)", "from wes1-so1.wedos.net (wes1-so1.wedos.net [46.28.106.15])\n\tby dpdk.org (Postfix) with ESMTP id 4C7D03F9\n\tfor <dev@dpdk.org>; Tue, 3 Nov 2015 00:50:21 +0100 (CET)", "from pcviktorin.fit.vutbr.cz (pcviktorin.fit.vutbr.cz\n\t[147.229.13.147])\n\tby wes1-so1.wedos.net (Postfix) with ESMTPSA id 3nqWFm6MKxzhP;\n\tTue, 3 Nov 2015 00:50:20 +0100 (CET)" ], "From": "Jan Viktorin <viktorin@rehivetech.com>", "To": "david.marchand@6wind.com, David Hunt <david.hunt@intel.com>,\n\tThomas Monjalon <thomas.monjalon@6wind.com>,\n\tJerin Jacob <jerin.jacob@caviumnetworks.com>", "Date": "Tue, 3 Nov 2015 00:47:17 +0100", "Message-Id": "<1446508048-16744-5-git-send-email-viktorin@rehivetech.com>", "X-Mailer": "git-send-email 2.6.2", "In-Reply-To": "<1446508048-16744-1-git-send-email-viktorin@rehivetech.com>", "References": "<1446508048-16744-1-git-send-email-viktorin@rehivetech.com>", "Cc": "dev@dpdk.org", "Subject": "[dpdk-dev] [PATCH v6 04/15] eal/arm: implement rdtsc by PMU or\n\tclock_gettime", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "patches and discussions about DPDK <dev.dpdk.org>", "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Enable to choose a preferred way to read timer based on the\nconfiguration entry CONFIG_RTE_ARM_EAL_RDTSC_USE_PMU.\nIt requires a kernel module that is not included to work.\n\nBased on the patch by David Hunt and Armuta Zende:\n\n lib: added support for armv7 architecture\n\nSigned-off-by: Jan Viktorin <viktorin@rehivetech.com>\nSigned-off-by: Amruta Zende <amruta.zende@intel.com>\nSigned-off-by: David Hunt <david.hunt@intel.com>\n---\n .../common/include/arch/arm/rte_cycles_32.h | 38 +++++++++++++++++++++-\n 1 file changed, 37 insertions(+), 1 deletion(-)", "diff": "diff --git a/lib/librte_eal/common/include/arch/arm/rte_cycles_32.h b/lib/librte_eal/common/include/arch/arm/rte_cycles_32.h\nindex 755cc4a..6c6098e 100644\n--- a/lib/librte_eal/common/include/arch/arm/rte_cycles_32.h\n+++ b/lib/librte_eal/common/include/arch/arm/rte_cycles_32.h\n@@ -54,8 +54,14 @@ extern \"C\" {\n * @return\n * The time base for this lcore.\n */\n+#ifndef CONFIG_RTE_ARM_EAL_RDTSC_USE_PMU\n+\n+/**\n+ * This call is easily portable to any ARM architecture, however,\n+ * it may be damn slow and inprecise for some tasks.\n+ */\n static inline uint64_t\n-rte_rdtsc(void)\n+__rte_rdtsc_syscall(void)\n {\n \tstruct timespec val;\n \tuint64_t v;\n@@ -67,6 +73,36 @@ rte_rdtsc(void)\n \tv += (uint64_t) val.tv_nsec;\n \treturn v;\n }\n+#define rte_rdtsc __rte_rdtsc_syscall\n+\n+#else\n+\n+/**\n+ * This function requires to configure the PMCCNTR and enable\n+ * userspace access to it:\n+ *\n+ * asm volatile(\"mcr p15, 0, %0, c9, c14, 0\" : : \"r\"(1));\n+ * asm volatile(\"mcr p15, 0, %0, c9, c12, 0\" : : \"r\"(29));\n+ * asm volatile(\"mcr p15, 0, %0, c9, c12, 1\" : : \"r\"(0x8000000f));\n+ *\n+ * which is possible only from the priviledged mode (kernel space).\n+ */\n+static inline uint64_t\n+__rte_rdtsc_pmccntr(void)\n+{\n+\tunsigned tsc;\n+\tuint64_t final_tsc;\n+\n+\t/* Read PMCCNTR */\n+\tasm volatile(\"mrc p15, 0, %0, c9, c13, 0\" : \"=r\"(tsc));\n+\t/* 1 tick = 64 clocks */\n+\tfinal_tsc = ((uint64_t)tsc) << 6;\n+\n+\treturn (uint64_t)final_tsc;\n+}\n+#define rte_rdtsc __rte_rdtsc_pmccntr\n+\n+#endif /* RTE_ARM_EAL_RDTSC_USE_PMU */\n \n static inline uint64_t\n rte_rdtsc_precise(void)\n", "prefixes": [ "dpdk-dev", "v6", "04/15" ] }{ "id": 8550, "url": "