Message ID | 1464576750-25160-4-git-send-email-shijie.huang@arm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> 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 4FA4660755 for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 30 May 2016 02:55:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 28B561FF6C for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 30 May 2016 02:55:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1DA0F20120; Mon, 30 May 2016 02:55:23 +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=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 96A4A1FF6C for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 30 May 2016 02:55:22 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b7DLD-0006uO-Qc; Mon, 30 May 2016 02:54:07 +0000 Received: from eu-smtp-delivery-143.mimecast.com ([207.82.80.143]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b7DL1-0006lN-SE for linux-arm-kernel@lists.infradead.org; Mon, 30 May 2016 02:53:57 +0000 Received: from emea01-am1-obe.outbound.protection.outlook.com (mail-am1lrp0014.outbound.protection.outlook.com [213.199.154.14]) (Using TLS) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-24-midCce3gQpmIuZRXZHTmGQ-1; Mon, 30 May 2016 03:53:33 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=4Kp1o5jqF6hqiu9MpXR5xckPUvHiMAYh0A/F0ldYu1k=; b=JJA2aMlqhoBS6LmAhn36x64dDpv9ALyz7+Ejbk5H87QaIoluQNzT7BQ7tMwsk4Foj1L2oYfyuFvjXZGkoWN8/tCR/ZLBbizFfYzrlE73v73N12TA3feeeqJfXWgCJVFmH/60Gh/+zWM4EC6VJ41nAOj17kbV8FBMEIegzpDmhKY= Received: from DB4PR08CA0002.eurprd08.prod.outlook.com (10.161.12.12) by AM4PR08MB0962.eurprd08.prod.outlook.com (10.166.133.148) with Microsoft SMTP Server (TLS) id 15.1.506.9; Mon, 30 May 2016 02:53:31 +0000 Received: from AM1FFO11FD021.protection.gbl (2a01:111:f400:7e00::130) by DB4PR08CA0002.outlook.office365.com (2a01:111:e400:9853::12) with Microsoft SMTP Server (TLS) id 15.1.506.9 via Frontend Transport; Mon, 30 May 2016 02:53:32 +0000 Received: from nebula.arm.com (217.140.96.140) by AM1FFO11FD021.mail.protection.outlook.com (10.174.64.210) with Microsoft SMTP Server (TLS) id 15.1.497.8 via Frontend Transport; Mon, 30 May 2016 02:53:31 +0000 Received: from sha-win-210.asiapac.arm.com (10.1.2.79) by mail.arm.com (10.1.106.66) with Microsoft SMTP Server id 14.3.279.2; Mon, 30 May 2016 03:53:01 +0100 From: Huang Shijie <shijie.huang@arm.com> To: <catalin.marinas@arm.com> Subject: [PATCH 3/9] arm64: entry: record the hardirq changes on the entry/exit code Date: Mon, 30 May 2016 10:52:24 +0800 Message-ID: <1464576750-25160-4-git-send-email-shijie.huang@arm.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1464576750-25160-1-git-send-email-shijie.huang@arm.com> References: <1464576750-25160-1-git-send-email-shijie.huang@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:217.140.96.140; IPV:CAL; SCL:-1; CTRY:GB; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(438002)(189002)(199003)(47776003)(76176999)(5008740100001)(50986999)(1220700001)(50226002)(8676002)(8936002)(77096005)(19580405001)(5003600100002)(33646002)(48376002)(106466001)(104016004)(4326007)(2950100001)(2906002)(19580395003)(229853001)(6806005)(189998001)(110136002)(92566002)(86362001)(586003)(36756003)(5003940100001)(87936001)(2351001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR08MB0962; H:nebula.arm.com; FPR:; SPF:Pass; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; AM1FFO11FD021; 1:tAY9JCAL8F8eyMkaXsVJDDUmM8XmglFEAaecHPY5NSbLY/wGqcDmUrBdhM+o3HXTs0+PBRjgtp8UG0MlYLEiO5V6sLzrv2EtYWDAtD/f2X2Bb7Z+aW4WLCF8kmaI958a90tSHDsM8viCD9uRcX4or82SD6Lpx+jDU8O+mRTncy48K1D0etttSi6KrVdebESPuiqWz2IvApCKOJyMeYdaz+yiozLv0mc7dtvD5NgVBKkxAL0O/d5UMQSJJRFeysNUCLR0/4Vu1fPIzhvgf4EbDh92GjjClDFGt1BpG0pF0MANUzjR+qhF3GjdqfVbJEztMPcMGDHaTAkTVYK9i6jFzQ5s9MOb4uij7Xbs2KObwcccwkyeQEwwRr6GeWgcT+Iue6iXFEOpOl3OwPrAgG26h3pfWKwRknmh9iFautJaeISuMcjgYDIJ3SNVLIF7/V+RrCUbrCYT7TtEWcFhdIu1TCVw7HZSKownQEd4syzUEl5VcCrsMsz4oQ9dIxbVTOytkEdv/8rAkI1PXtvwRKdsOOacM9GRox1x9dDZ8VNMFZ27pKZqR7L4R06FIxBbFRyV X-MS-Office365-Filtering-Correlation-Id: e9129763-e5b3-4062-8fd1-08d3883595f1 X-Microsoft-Exchange-Diagnostics: 1; AM4PR08MB0962; 2:rrWb6pQcrP20Ty+zAvtU2Ov7POpddYIZaNJZUM9RP+u4cQVNC4ApsCmqCsDBMLmrqToa8QGIZRtJ0PJDpRPNsdnAzKn58ck6FWGHK4RPHnCxXJqwIHvZRdgs0ZVPp5LwAUgbyEy20VWnTCkO6yS8z+yEz5FgjHl721hzOmd5Rq7qc0hieyKz8CPnp+NJ/ClR; 3:U2eBuYl2m7dY52ebcbmLliJvXEzkCYrK8ofIiEuDnjBH7zhGzckAgkAQoNwqb1m0gPi2JFqGFxZxkZaMJ2/kEg4yczJrBlDusxZNMp8phjalm1cYepuGH+v7ngTjV5KYV08lImENXFwAy2nPl+Uqun40PF7x4tBRkJSK70ky7p1eYh4ynOu5FQvuQ+hNlzf2mXfwQ31o6iqIT6jB+YIAd/mYsEdAGNvSCgUF5teLYe5HHFMynTr54DBrkYsvR6uSwk2ObFGCJPl20EQ2jud0Fg==; 25:S7maw5gV152gM0IwlXQwv2edgsoHuJsST4Z8OCii7VXgzEFEKu9qEBY8uJkp98l/eLVvFGLQn42gbMKXQuaPnBKeyfazUWkL7A2G2h/7Dzd10KcAdOsJUojAMRRu0aypJOCFIJ+sqiWHBwYPdYIpyLbMFDtCmXMTllGq1dT2NiaQ5SiBnHSXueNYqxYsQMrdrU+1CphdmBrUVF+MKdsDGGQDnXq7+8h14eTcBQ+fDn+yXqQTnQM2uQXXQp4sEjQ0kOlgVkDYGle47VvGlgIlHq/VKytfdSfXHK3ACVQ6tbVOQ4mWrBI0/lJueGSRfGNdcqEWwyw89hvEHe3fGhYmoKwQXIqVeu/VjVsJ/PMYT3pe+PuSsqklFcGDoDebA62aULlK9fkK25QN+7vdvE61WSw2sOcTMPWjHsN3IPHp3VY= X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501002); SRVR:AM4PR08MB0962; NoDisclaimer: True X-Microsoft-Exchange-Diagnostics: 1; AM4PR08MB0962; 20:F8D9O2mQr5XDYhq5WZqNHavrcURIFjdS2h0z1RrWL/d+3GLd5Qw/Y6Yqaxg3j8y6gnZPJWrLAlOGySVY9VRmtmuAC2Y5uhvLfkJNAXPvokQSr+s/8EBYInM1wWaLq3dxvZy8zt0BBUiFIpHvqr4z9lf5+o1lCkMB6hdbhJR+wODJoNA82x1TERQ1QkdBEj+NAltSJi/m/S415Ej8zTXtTEslqOYIFo2YJ/UY7qdK62n0RSaHmwWPcF51GTaqEOvq; 4:Dfz/cDDvNs6xotwQV5PBpOlm3E3HtPH/xSo2l698cg6obaF+W7iZHEXu0YWeCjqPZqe11ggiOr8jm6uJ6Gv/TdqoHycOVjCjg3vpBFI3DpAjYGsUvoFulkQ4o3Q5CNJ22g7WQbURCyDItLkIndu3JB2w+4Xw8rXjQQ81Bo04MeHVDtnZ4XYLzwuI9HK6bjEJuuWwvqaBfa7Y3Ohfnm/NuTKaKoh4XrZXB5+Pk314keN2x+dPjHz0utFEcJhNJxF/xl/UeSu5bb3rOfgoXZwX8B8pvXPO8vlRYWLncXbcmnEZJS3WtDTGl+yRhEq2rC2/bGHzuouaSMGq7qtpPuaBJF0wGMP1Kw53U4meOsWImxkbZ4xbAOYmsy0GxCcew6rgo1q838K78OT4NJ1q2zXne/Gk4kT2Xik6slEGC4Lbnp7cyMCD7+slMmOLcHPziBSHDsBUEKZl0K5k+eUGeLplM4RLk1JZLR60ebxwMSWeUe1AcGCrvLQeDoZ4v/5xg4bi X-Microsoft-Antispam-PRVS: <AM4PR08MB0962A5B4BF9AFC35B930BCFD84450@AM4PR08MB0962.eurprd08.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(180628864354917); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13013025)(13024025)(13023025)(8121501046)(5005006)(13020025)(3002001)(10201501046)(6055026); SRVR:AM4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Microsoft-Exchange-Diagnostics: 1; AM4PR08MB0962; 5:OvCqILyv5tX1xVRhO4VNIQWwPjr4KW7+5unrYWYDozhGMFnHJyrrW+BJLN9ep43w/jnuZZGU3qELnw4Io7yXgUU6t9e+Zn3Xdr5nCO0YW2dqRWnnwY8/OeYUJVaj5psE5VJkWyJVZwWGbfDcP7IDNg==; 24:yhMYAyVGwy0JmVRzsx62Gb+X4UEkRQdW2BnZz9dQKOEO8fWg3OOdqyj4vqvdrh4nTPcC6jMokqNC6ZYsYnMlWqfgWbyGOW8c7WazRHXjZJ4=; 7:cnifoyux4h+2+9fNVPRzIbs5ki6tqmdRJFNSpTGefZmjFwpEM7kHzvvLA9Q0eK8BAGqgZmRcQA7l/fiVOpZkqAk5Csh4JLVKYDe/lHFktF2oNmwgRMjMxnIjJvJ9oT402LdRbAOrjSG0+l6Y/qclVXozpZQuvwrELytDCWIGDcED9OSWGem0DH+y4UMHnd8P; 20:fG/KCHiAnM1EVw52AfKB/4e6viyb1b5vqRfeShow9Oqwyoc7x7Zln9AQgXW0Lnpqev3cPkku3yfUEFgg3qeg1HEydFfu/BHzUTVhAPiEKp2Y0tGvqBRUJc/MUUExuI0ALM59T/LNXssZGIPg9mogEBzmcB/OFY1SXJ/auhSkauQ= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 May 2016 02:53:31.7156 (UTC) X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[217.140.96.140]; Helo=[nebula.arm.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR08MB0962 X-MC-Unique: midCce3gQpmIuZRXZHTmGQ-1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160529_195356_262092_646BBB7B X-CRM114-Status: UNSURE ( 7.41 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: mark.rutland@arm.com, cmetcalf@mellanox.com, steve.capper@arm.com, marc.zyngier@arm.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, Huang Shijie <shijie.huang@arm.com>, nd@arm.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S index 21b6068..4c67c56 100644 --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S @@ -132,6 +132,15 @@ mov scno, x8 .endif +#ifdef CONFIG_TRACE_IRQFLAGS + /* + * The trace_hardirqs_off may changes some registers, so we should + * restore them back from the stack in the necessary place, such as + * el0_svc_naked. + */ + bl trace_hardirqs_off +#endif + /* * Registers that may be useful after this macro is invoked: * @@ -142,6 +151,9 @@ .endm .macro kernel_exit, el +#ifdef CONFIG_TRACE_IRQFLAGS + bl trace_hardirqs_on +#endif ldp x21, x22, [sp, #S_PC] // load ELR, SPSR .if \el == 0 ct_user_enter @@ -729,6 +741,9 @@ el0_svc: uxtw scno, w26 // syscall number in w8 mov sc_nr, #__NR_syscalls el0_svc_naked: // compat entry point +#ifdef CONFIG_TRACE_IRQFLAGS + restore_syscall_regs +#endif stp x19, scno, [sp, #S_ORIG_X0] // save the original x0 and syscall number enable_dbg_and_irq ct_user_exit 1
Just as the arm32 code does, record the hardirq changes at the entry/exit code. The trace code may changes some registers, but the syscall path needs the x0 ~ x7, we restore them in the el0_svc_naked. Signed-off-by: Huang Shijie <shijie.huang@arm.com> --- arch/arm64/kernel/entry.S | 15 +++++++++++++++ 1 file changed, 15 insertions(+)