From patchwork Tue Aug 8 20:08:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Volodymyr Babchuk X-Patchwork-Id: 9889027 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BEABD60352 for ; Tue, 8 Aug 2017 20:11:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AF005287D5 for ; Tue, 8 Aug 2017 20:11:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A130B288EA; Tue, 8 Aug 2017 20:11:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2443D287D5 for ; Tue, 8 Aug 2017 20:11:54 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dfAoM-0000Zb-Py; Tue, 08 Aug 2017 20:09:06 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dfAoL-0000ZP-6s for xen-devel@lists.xen.org; Tue, 08 Aug 2017 20:09:05 +0000 Received: from [193.109.254.147] by server-9.bemta-6.messagelabs.com id 3F/ED-03406-06A1A895; Tue, 08 Aug 2017 20:09:04 +0000 X-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.com X-Msg-Ref: server-12.tower-27.messagelabs.com!1502222943!109466571!1 X-Originating-IP: [40.107.0.83] X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50 X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 51236 invoked from network); 8 Aug 2017 20:09:03 -0000 Received: from mail-eopbgr00083.outbound.protection.outlook.com (HELO EUR02-AM5-obe.outbound.protection.outlook.com) (40.107.0.83) by server-12.tower-27.messagelabs.com with AES256-SHA256 encrypted SMTP; 8 Aug 2017 20:09:03 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=EPAM.onmicrosoft.com; s=selector1-epam-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=LG3hmvjsx3H6aSBY2JIbZTG9tbWf1yQa0Z8gECVgbY0=; b=Y6+nV06x3UkM6Vb36uMB0o0LWYBA0ldPxqEq2kiSm0Uc+IPydSf2LWaQ5tgSSaUbVGKMS3EAdtBwIslcQQzOJhv+gGpI+s76jA/IK21Jyy2svgFDQft/XOP7/3gnunNULJ9ZHJGGrCGtkUvYiOZ7GRzGZQmIlb0zLjSAD+4gSRA= Received: from EPUAKYIW2556.kyiv.epam.com (85.223.209.58) by DB6PR0301MB2134.eurprd03.prod.outlook.com (2603:10a6:4:46::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1304.22; Tue, 8 Aug 2017 20:09:00 +0000 Received: by EPUAKYIW2556.kyiv.epam.com (sSMTP sendmail emulation); Tue, 08 Aug 2017 23:08:56 +0300 From: Volodymyr Babchuk To: xen-devel@lists.xen.org Date: Tue, 8 Aug 2017 23:08:36 +0300 Message-Id: <1502222922-25821-2-git-send-email-volodymyr_babchuk@epam.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1502222922-25821-1-git-send-email-volodymyr_babchuk@epam.com> References: <1502222922-25821-1-git-send-email-volodymyr_babchuk@epam.com> MIME-Version: 1.0 X-Originating-IP: [85.223.209.58] X-ClientProxiedBy: AM5PR0602CA0014.eurprd06.prod.outlook.com (2603:10a6:203:a3::24) To DB6PR0301MB2134.eurprd03.prod.outlook.com (2603:10a6:4:46::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a872ff01-a696-412d-e311-08d4de994f99 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:DB6PR0301MB2134; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0301MB2134; 3:ZTapiEVsugFZvFISP/q/pnBT3xZIxbDZCXT09Rv3ec0hZYVsyufwikhL+E6HxO/E7hRiznoFshzlZQWSpKQ44F+bGfAYuUW9oJeJfvsq3ft5WWUwO/2uaFCT4lILn14YJKD7ZQ5yQLuanYpp/mfa/iVH/mgYrVyZHsVBxzZCi8/m4q7X6gM+3TH4IM07vM5m5p3T58ripdYiP3Kp1XoTiot93Qm1JjjqdWnmrociVTm0XhCHn59aAyE50wvtcIhT; 25:sOMPD/+pMMMmL38IXeKUznsem3ZBONG+4FVmC8NYmC2kDERt6FRAprbtrkH0uGbDStrxO7iFDDINLPi1okUV8Kbskm8v2xmMrRi1szdNqx+32AEmfTlolFzlOWvU0SH6dAO0I4VilYCZyj0Uy+RxDSpZ2k3ScYdrrOakxS7+a4wHlHsyZKM07FbFnUvyNjwwhgtlpnCl9aEW1JJN5Fu1caPrdzB5Y0p3yQjbFSsRVHFwJCP8/tS+PPyKBEn/piTu1C3BrTwtaNHFyqHgxFPend4kFFYjVMSWbTWKED1xpMnIfM8+DhA9/Tfi2eMHY1LgMpl0wD5LMCPT5NH3QChnjQ==; 31:b8hjCqYu/lCqFpgFQuqPYIpQg+sm0W6OvoPzb+1jF/4COSG8AkspxWTllvSwrO5ZmdebHUeFwB6rtkBEp0T22YXhB9YhqJcYe5/md9JgU/IbVWRpiuV9eKWrhmgDlJloiXVX0qCHYGzSgb8Y6AWmvbgQLBJCKLRFj36RoS4ro6VAXEDJzlpRct++uJj4LRsDPH0lbMBuhwM0y2TigdbYkTfBdJfxp/t17FfjFVIoJsU= X-MS-TrafficTypeDiagnostic: DB6PR0301MB2134: X-Microsoft-Exchange-Diagnostics: 1; DB6PR0301MB2134; 20:/eXcc+xKlpC26SPBTvNOXNGa8/CZTLzOjxnC+o2wL55BBZcZAs5cmIxPl8iX6eyOVfNP2JVQE2RsNPV9vGpvXpsoO3YWJjDXz97+V2fUg8vSvtURRfxaBa3QrV+J/jPV5mA7lWfgx6ru3D9LGIRbWRGRFxuZc3PhGCUEvz/PZ6Map48bGSxhWNFLphZ3Rf4FRDyjt1oXjxc/odsNd7RuaTR5CIG8bwggowvT22720fu6aOwR7ul14jRLki8Ayc/ptvhljhzoh/rrDrqpZaIqxd1ixIb/muBwbYJiyHZAC/jzdq1nozw4GYIQFj8j3iYnvLogfw4RsJ5z8thu2x0FiLD6QlWeUr3Ppl6AE0+uC7Yt8U4REVKn/jOKls0fmqjgebPxc1ImBAer0EBgXe2jqJqHLkkIEb/fnwaNa+eZ26zodnTspMK705QFvZ9303gKW93vQFSWB1FLQmnCYFT+n3XJyJKWmqKqyuvWZp3sOrxlHrsi6KrXubyeZEOKh1W2; 4:Nj8Oe2uttDHNDEh8MpVNBJOicqjkNZCZO74tZW1SOvhMohqFdu7W/gqYXiIvOoGXFkrh/DdygkgK0BuAaClfgRRzCEH4+9YS1evPgAzU+47fwyyUynWHKn2YJY5BFJDtNKkeTOVjarWtPGXyboCkO76JGqfK7RX3KOTIL72dPbwdhmq+z+Sls+82qObC1F94Gp3zNFatWKnp7uPU83quLBLKfflzfPt70sEpiE6a80zBifP6tSDx9N8ughKyfViP X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(3002001)(10201501046)(93006095)(93001095)(6041248)(20161123560025)(20161123555025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DB6PR0301MB2134; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DB6PR0301MB2134; X-Forefront-PRVS: 03932714EB X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(7370300001)(6009001)(39450400003)(39840400002)(39400400002)(39850400002)(39410400002)(199003)(189002)(5660300001)(105586002)(4326008)(101416001)(50986999)(5003940100001)(76176999)(50466002)(122856001)(48376002)(81166006)(66066001)(6116002)(80792005)(106356001)(2351001)(36756003)(42186005)(33646002)(68736007)(81156014)(7736002)(305945005)(189998001)(47776003)(2361001)(86362001)(50226002)(97736004)(6666003)(38730400002)(8666007)(110136004)(2950100002)(478600001)(2906002)(8676002)(72206003)(6916009)(7350300001)(8656003)(53936002)(3846002)(54906002)(41533002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR0301MB2134; H:EPUAKYIW2556.kyiv.epam.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: epam.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB6PR0301MB2134; 23:vpMDnDg1r3nnsfpu6y4Wakia2fsctXR5Jew4B1Y?= =?us-ascii?Q?ot2wWLZfpdEjZnua5lW7QIodR427hZPET1lvHgOlHo0fwGHVh1LVTKJilGjl?= =?us-ascii?Q?Z14ST8MYmA5AjmWSZwXUE/Ib01xyB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vP7ZxqxJnDQPYHFi/HYgOk=; 7:VI7WuN9ETIdTCuRZotbgWLLuxmnRcutYOiEIKW+qksHOyUUWlavy+UGMczfqBLtgTmdGEHNslg6i4XTIQfqz3oPLtbfZLPI5ccqpAlX2YJlBFVMvV0rL7V3WF4zpDtKS0hESkxGUCQe9ZDgLCci7G2lvHWWHlv3CuehcHgqnUIzJks4XQtpAPP0mmAYEwNYH9w9jYV8x21sQGwqR0ObQISPn0AT4S99fvWn8LVSlrl0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: epam.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Aug 2017 20:09:00.8399 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0301MB2134 Cc: "Edgar E . Iglesias" , Volodymyr Babchuk , Julien Grall , Stefano Stabellini Subject: [Xen-devel] [PATCH 1/7] arm: traps: psci: use generic register accessors X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Volodymyr Babchuk There are standard functions set_user_reg() and get_user_reg(). We can use them in PSCI_SET_RESULT()/PSCI_ARG() macroses instead of relying on CONFIG_ARM_64 definition. Signed-off-by: Volodymyr Babchuk --- xen/arch/arm/traps.c | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index 6cf9ee7..ed78b36 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -1449,13 +1449,12 @@ static void do_debug_trap(struct cpu_user_regs *regs, unsigned int code) } #endif +#define PSCI_SET_RESULT(reg, val) set_user_reg(reg, 0, val) +#define PSCI_ARG(reg,n) get_user_reg(reg, n) + #ifdef CONFIG_ARM_64 -#define PSCI_RESULT_REG(reg) (reg)->x0 -#define PSCI_ARG(reg,n) (reg)->x##n -#define PSCI_ARG32(reg,n) (uint32_t)( (reg)->x##n & 0x00000000FFFFFFFF ) +#define PSCI_ARG32(reg,n) (uint32_t)(get_user_reg(reg, n) & 0x00000000FFFFFFFF) #else -#define PSCI_RESULT_REG(reg) (reg)->r0 -#define PSCI_ARG(reg,n) (reg)->r##n #define PSCI_ARG32(reg,n) PSCI_ARG(reg,n) #endif @@ -1470,14 +1469,14 @@ static void do_trap_psci(struct cpu_user_regs *regs) register_t fid = PSCI_ARG(regs,0); /* preloading in case psci_mode_check fails */ - PSCI_RESULT_REG(regs) = PSCI_INVALID_PARAMETERS; + PSCI_SET_RESULT(regs, PSCI_INVALID_PARAMETERS); switch( fid ) { case PSCI_cpu_off: { uint32_t pstate = PSCI_ARG32(regs,1); perfc_incr(vpsci_cpu_off); - PSCI_RESULT_REG(regs) = do_psci_cpu_off(pstate); + PSCI_SET_RESULT(regs, do_psci_cpu_off(pstate)); } break; case PSCI_cpu_on: @@ -1485,36 +1484,36 @@ static void do_trap_psci(struct cpu_user_regs *regs) uint32_t vcpuid = PSCI_ARG32(regs,1); register_t epoint = PSCI_ARG(regs,2); perfc_incr(vpsci_cpu_on); - PSCI_RESULT_REG(regs) = do_psci_cpu_on(vcpuid, epoint); + PSCI_SET_RESULT(regs, do_psci_cpu_on(vcpuid, epoint)); } break; case PSCI_0_2_FN_PSCI_VERSION: perfc_incr(vpsci_version); - PSCI_RESULT_REG(regs) = do_psci_0_2_version(); + PSCI_SET_RESULT(regs, do_psci_0_2_version()); break; case PSCI_0_2_FN_CPU_OFF: perfc_incr(vpsci_cpu_off); - PSCI_RESULT_REG(regs) = do_psci_0_2_cpu_off(); + PSCI_SET_RESULT(regs, do_psci_0_2_cpu_off()); break; case PSCI_0_2_FN_MIGRATE_INFO_TYPE: perfc_incr(vpsci_migrate_info_type); - PSCI_RESULT_REG(regs) = do_psci_0_2_migrate_info_type(); + PSCI_SET_RESULT(regs, do_psci_0_2_migrate_info_type()); break; case PSCI_0_2_FN_MIGRATE_INFO_UP_CPU: case PSCI_0_2_FN64_MIGRATE_INFO_UP_CPU: perfc_incr(vpsci_migrate_info_up_cpu); if ( psci_mode_check(current->domain, fid) ) - PSCI_RESULT_REG(regs) = do_psci_0_2_migrate_info_up_cpu(); + PSCI_SET_RESULT(regs, do_psci_0_2_migrate_info_up_cpu()); break; case PSCI_0_2_FN_SYSTEM_OFF: perfc_incr(vpsci_system_off); do_psci_0_2_system_off(); - PSCI_RESULT_REG(regs) = PSCI_INTERNAL_FAILURE; + PSCI_SET_RESULT(regs, PSCI_INTERNAL_FAILURE); break; case PSCI_0_2_FN_SYSTEM_RESET: perfc_incr(vpsci_system_reset); do_psci_0_2_system_reset(); - PSCI_RESULT_REG(regs) = PSCI_INTERNAL_FAILURE; + PSCI_SET_RESULT(regs, PSCI_INTERNAL_FAILURE); break; case PSCI_0_2_FN_CPU_ON: case PSCI_0_2_FN64_CPU_ON: @@ -1524,8 +1523,7 @@ static void do_trap_psci(struct cpu_user_regs *regs) register_t vcpuid = PSCI_ARG(regs,1); register_t epoint = PSCI_ARG(regs,2); register_t cid = PSCI_ARG(regs,3); - PSCI_RESULT_REG(regs) = - do_psci_0_2_cpu_on(vcpuid, epoint, cid); + PSCI_SET_RESULT(regs, do_psci_0_2_cpu_on(vcpuid, epoint, cid)); } break; case PSCI_0_2_FN_CPU_SUSPEND: @@ -1536,8 +1534,7 @@ static void do_trap_psci(struct cpu_user_regs *regs) uint32_t pstate = PSCI_ARG32(regs,1); register_t epoint = PSCI_ARG(regs,2); register_t cid = PSCI_ARG(regs,3); - PSCI_RESULT_REG(regs) = - do_psci_0_2_cpu_suspend(pstate, epoint, cid); + PSCI_SET_RESULT(regs, do_psci_0_2_cpu_suspend(pstate, epoint, cid)); } break; case PSCI_0_2_FN_AFFINITY_INFO: @@ -1547,8 +1544,7 @@ static void do_trap_psci(struct cpu_user_regs *regs) { register_t taff = PSCI_ARG(regs,1); uint32_t laff = PSCI_ARG32(regs,2); - PSCI_RESULT_REG(regs) = - do_psci_0_2_affinity_info(taff, laff); + PSCI_SET_RESULT(regs, do_psci_0_2_affinity_info(taff, laff)); } break; case PSCI_0_2_FN_MIGRATE: @@ -1557,7 +1553,7 @@ static void do_trap_psci(struct cpu_user_regs *regs) if ( psci_mode_check(current->domain, fid) ) { uint32_t tcpu = PSCI_ARG32(regs,1); - PSCI_RESULT_REG(regs) = do_psci_0_2_migrate(tcpu); + PSCI_SET_RESULT(regs, do_psci_0_2_migrate(tcpu)); } break; default: