Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/777579/?format=api
{ "id": 777579, "url": "http://patchwork.ozlabs.org/api/patches/777579/?format=api", "web_url": "http://patchwork.ozlabs.org/project/skiboot/patch/20170619060138.5314-2-oohall@gmail.com/", "project": { "id": 44, "url": "http://patchwork.ozlabs.org/api/projects/44/?format=api", "name": "skiboot firmware development", "link_name": "skiboot", "list_id": "skiboot.lists.ozlabs.org", "list_email": "skiboot@lists.ozlabs.org", "web_url": "http://github.com/open-power/skiboot", "scm_url": "http://github.com/open-power/skiboot", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20170619060138.5314-2-oohall@gmail.com>", "list_archive_url": null, "date": "2017-06-19T06:01:34", "name": "[2/6] core/test: make cpu.h usable in tests", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "05ac382d560a143d362c6004d4dfcd300d38e172", "submitter": { "id": 68108, "url": "http://patchwork.ozlabs.org/api/people/68108/?format=api", "name": "Oliver O'Halloran", "email": "oohall@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/skiboot/patch/20170619060138.5314-2-oohall@gmail.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/777579/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/777579/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "skiboot@lists.ozlabs.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "skiboot@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 3wrgPZ0Fjnz9s7m\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 19 Jun 2017 16:02:58 +1000 (AEST)", "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3wrgPY6GVfzDqgt\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 19 Jun 2017 16:02:57 +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 3wrgPF03pwzDq7c\n\tfor <skiboot@lists.ozlabs.org>; Mon, 19 Jun 2017 16:02:41 +1000 (AEST)", "by mail-pf0-x243.google.com with SMTP id y7so15081053pfd.3\n\tfor <skiboot@lists.ozlabs.org>; Sun, 18 Jun 2017 23:02:40 -0700 (PDT)", "from flat-canetoad.ozlabs.ibm.com ([122.99.82.10])\n\tby smtp.gmail.com with ESMTPSA id\n\tx64sm19638626pff.123.2017.06.18.23.02.37\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tSun, 18 Jun 2017 23:02:38 -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=\"Ls+WcS/J\"; 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=\"Ls+WcS/J\"; dkim-atps=neutral", "lists.ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"Ls+WcS/J\"; 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=oDTjnv2IPfbPCcEUmMZyNyGPx1azD3Qaw2tbiQnyoBM=;\n\tb=Ls+WcS/JKNWqfQR4PV8JgQINk7HsfRgiJJrF/MBzva9/5N5ksEx46BDUNBSUMsdz66\n\tfiPGkhFY645XZoJQ4/4ID7TKk9aWXOiuOUaJgoJ8wJHWeF6ELsrxadxD3Q1Y+O/QI4bK\n\tWQ9T6URAmCXTTT/YkZKR1x9Vs5uXqqfPkabwi+6xy5qtOPOvsNzavN8HeLZx5y/vDC/Z\n\t5qChg1nofZPx358aALBC6mNOh4Zip1WW7arhF1vCjB6ls5IXdrvwzAry+PQxbfUa5Q/m\n\ttbeIZxsiuZBhJLWJsj0/HsVzXiVv37l8OMcob/+GR8gZnPpqEZ0vHpvu+VqOwU8A7Sg0\n\tOKgg==", "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=oDTjnv2IPfbPCcEUmMZyNyGPx1azD3Qaw2tbiQnyoBM=;\n\tb=GAZaaPsCoPXPpo6HaLAuuo1VxOBLkWSdnUDIeZWMRVRJz7G3cDR3EbgzqdB0OGiYGp\n\tbKxry5jM6q9NPLnylusgfwsfg0Hl9GByhUN5RKujqVWACbnXwgFP+YRrvjTDu4De8ctF\n\thgJMlmPcY56H4gxShqLu1rMQQ+4Oz3vKbKGIL5weNJt3SN2r/FKkVNL/L1eGoq+eIDO7\n\tO7oft2pHlUCVYxnduoALySlDTRewjfhc95l4YuKyD5W2ZW/2LWpEaac8qIWsjleNYCA+\n\t8OTWYeF7sDZD3NArjWyD8uWxj2MIvMicQkQdxp5QTYmmp47SuMbwR1453IKscbaEF6XO\n\tVJAQ==", "X-Gm-Message-State": "AKS2vOw62TPF5kdoh0fIcCsr9OZkkX59zXNvXmXHzfBM8TgjvKuclFKo\n\tRsk7byarZ3FtzAOJ", "X-Received": "by 10.98.66.147 with SMTP id h19mr20175549pfd.178.1497852159210; \n\tSun, 18 Jun 2017 23:02:39 -0700 (PDT)", "From": "Oliver O'Halloran <oohall@gmail.com>", "To": "skiboot@lists.ozlabs.org", "Date": "Mon, 19 Jun 2017 16:01:34 +1000", "Message-Id": "<20170619060138.5314-2-oohall@gmail.com>", "X-Mailer": "git-send-email 2.9.3", "In-Reply-To": "<20170619060138.5314-1-oohall@gmail.com>", "References": "<20170619060138.5314-1-oohall@gmail.com>", "Subject": "[Skiboot] [PATCH 2/6] core/test: make cpu.h usable in tests", "X-BeenThere": "skiboot@lists.ozlabs.org", "X-Mailman-Version": "2.1.23", "Precedence": "list", "List-Id": "Mailing list for skiboot development <skiboot.lists.ozlabs.org>", "List-Unsubscribe": "<https://lists.ozlabs.org/options/skiboot>,\n\t<mailto:skiboot-request@lists.ozlabs.org?subject=unsubscribe>", "List-Archive": "<http://lists.ozlabs.org/pipermail/skiboot/>", "List-Post": "<mailto:skiboot@lists.ozlabs.org>", "List-Help": "<mailto:skiboot-request@lists.ozlabs.org?subject=help>", "List-Subscribe": "<https://lists.ozlabs.org/listinfo/skiboot>,\n\t<mailto:skiboot-request@lists.ozlabs.org?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "Errors-To": "skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org", "Sender": "\"Skiboot\"\n\t<skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>" }, "content": "Adds an #ifdef around this_cpu() so that it can be used inside test\ncode and fakes out the inline assembly used for barrier instructions\nand setting the SMT priorities.\n\nSigned-off-by: Oliver O'Halloran <oohall@gmail.com>\n---\n include/cpu.h | 5 +++++\n include/processor.h | 20 ++++++++++++++++++++\n 2 files changed, 25 insertions(+)", "diff": "diff --git a/include/cpu.h b/include/cpu.h\nindex 2d6969948040..b1e887cceb01 100644\n--- a/include/cpu.h\n+++ b/include/cpu.h\n@@ -193,7 +193,12 @@ extern u8 get_available_nr_cores_in_chip(u32 chip_id);\n \t\tcore = next_available_core_in_chip(core, chip_id))\n \n /* Return the caller CPU (only after init_cpu_threads) */\n+#ifndef __TEST__\n register struct cpu_thread *__this_cpu asm(\"r13\");\n+#else\n+static struct cpu_thread fake_cpu;\n+static struct cpu_thread *__this_cpu = &fake_cpu;\n+#endif\n static inline __nomcount struct cpu_thread *this_cpu(void)\n {\n \treturn __this_cpu;\ndiff --git a/include/processor.h b/include/processor.h\nindex 5906b8657c1b..6f73aacd6872 100644\n--- a/include/processor.h\n+++ b/include/processor.h\n@@ -201,6 +201,8 @@\n \n #else /* __ASSEMBLY__ */\n \n+#ifndef __TEST__\n+\n #include <compiler.h>\n #include <stdint.h>\n \n@@ -320,6 +322,24 @@ static inline void st_le32(uint32_t *addr, uint32_t val)\n \tasm volatile(\"stwbrx %0,0,%1\" : : \"r\"(val), \"r\"(addr), \"m\"(*addr));\n }\n \n+#else /* __TEST__ */\n+\n+#define smt_lowest()\n+#define smt_low()\n+#define smt_medium()\n+#define smt_high()\n+#define smt_medium_high()\n+#define smt_medium_low()\n+#define smt_extra_high()\n+#define smt_very_low()\n+\n+#define eieio()\n+#define sync()\n+#define lwsync()\n+#define isync()\n+\n+#endif /* __TEST__ */\n+\n #endif /* __ASSEMBLY__ */\n \n #endif /* __PROCESSOR_H */\n", "prefixes": [ "2/6" ] }