Message ID | 20180404074658.28288-1-l.stelmach@samsung.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 B8E1660318 for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 4 Apr 2018 07:47:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A093F20950 for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 4 Apr 2018 07:47:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 93C2424603; Wed, 4 Apr 2018 07:47:33 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BD5BE20950 for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 4 Apr 2018 07:47:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:References:Message-id:Date:Subject:To: From:MIME-version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: List-Owner; bh=wm9CCpXuSopAPKr4qFm/VZiDaaKgYWSpbtvom+jAWvA=; b=PoEoF5kBlqU4io TCb++gxUvQhhtHOgnApFyYgcnnTB9TOPA/Ueu3XmLgNod3OUAmINc6GylC8q5/Y3smyH0WcT7xJBu 1li73nuYMy4vh2Wk5MmXx+QNxop+4FUuEG5kn/9FxNKjx05NEMYWCUcAmIl0fLaXKJq+cwqcsUKaP Qtz0x5rSNZH/5eLeWJGKT1dNJTVxWlBidHaToKfTTdrOBVKP3f4K10pfDImnVl8h3dlbwrfB7JxJw 4yUYgyAAD3/WM5yuig8AsPWXHqy1czNpFEuECB0pRbKvpmh2L+TnmTolYs5VZz/aYN4+RYmuggE0c 9Cvu3vZzMGK+NJqmDBtg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f3d8j-0000D9-Gh; Wed, 04 Apr 2018 07:47:29 +0000 Received: from mailout1.w1.samsung.com ([210.118.77.11]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f3d8f-0000BT-5A for linux-arm-kernel@lists.infradead.org; Wed, 04 Apr 2018 07:47:27 +0000 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20180404074702euoutp012f973f62c5b8c7495b8365434c728a30~iLASmr7sq0960709607euoutp01R; Wed, 4 Apr 2018 07:47:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180404074702euoutp012f973f62c5b8c7495b8365434c728a30~iLASmr7sq0960709607euoutp01R DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1522828022; bh=wg7LP8dpzwW/cfNrahqyseIDMEeeZw68827VPpuWbT4=; h=From:To:Cc:Subject:Date:References:From; b=PgrKHXMg0MdyKaufZ6l1Ts8fUBaZwm8dRKjRdN1UA+S0nmFgcwGvDENNRwsJIqGcD t66x5Q9gjX/bfwTpixAai/yELbWn3kdOzcMXT2SqP6KixnbyGh6E5D6ukvwmyADdYT YCCkgeAzzZKhbRhCvx9Z7Sg6kzGtKxsB7mRgi8BQ= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180404074701eucas1p1899acf8aa0d195d4999964e71922f6dd~iLARfBw_b2356323563eucas1p1G; Wed, 4 Apr 2018 07:47:01 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 8E.B5.10409.4F284CA5; Wed, 4 Apr 2018 08:47:00 +0100 (BST) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180404074700eucas1p12cdb8b0de3da46c433e505555129c7e6~iLAQmundb2427224272eucas1p1B; Wed, 4 Apr 2018 07:47:00 +0000 (GMT) X-AuditID: cbfec7f5-b5fff700000028a9-dc-5ac482f428f8 Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 69.82.04178.4F284CA5; Wed, 4 Apr 2018 08:47:00 +0100 (BST) MIME-version: 1.0 Received: from localhost ([106.116.147.110]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P6N00EZ5HMC4160@eusync1.samsung.com>; Wed, 04 Apr 2018 08:47:00 +0100 (BST) From: =?UTF-8?q?=C5=81ukasz=20Stelmach?= <l.stelmach@samsung.com> To: Russell King <linux@armlinux.org.uk>, linux-arm-kernel@lists.infradead.org Subject: [PATCH] ARM: decompressor: restore r1 and r2 just before jumping to the kernel Date: Wed, 04 Apr 2018 09:46:58 +0200 Message-id: <20180404074658.28288-1-l.stelmach@samsung.com> X-Mailer: git-send-email 2.11.0 Organization: Samsung R&D Institute Poland X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrKIsWRmVeSWpSXmKPExsWy7djP87pfmo5EGXzpNLPYOGM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g4JAROJy6cvsoLYQgJLGCUm3KsHsXkF BCV+TL7H0sXIwcEsIC9x5FI2SJhZQF1i0rxFzF2MXEDl3xglVnzdwwiSYBNwlOhfegJsjoiA n8TdPweYIBq+MEp8XukHYgsLREos/fgYrIZFQFXi1J0ZbBC7rCWmXWhmgbhHXmJXG8Q9/AJa EmuarrNMYOSbheSkWQgnzUJy0gJG5lWMIqmlxbnpucWGesWJucWleel6yfm5mxiBIbrt2M/N OxgvbQw+xCjAwajEw7ti0eEoIdbEsuLK3EOMEhzMSiK8O5SORAnxpiRWVqUW5ccXleakFh9i lOZgURLnPW9QGSUkkJ5YkpqdmlqQWgSTZeLglGpgdPoetn/RJb4qtekd7y4eTp6md+C8UuSx Hwc0brv0PGex3McsU6G06sl7hvD3Tj2TA5z/pf9fm9S5bf5b05V29hbewet0E494fLlbW7/u Xda6hiC7jLppcUc3c/peKnuSu4Oh62uAAJu3zIMH5wNU+c4I3VJIzP6htPtg67MO3ocb11/Y NrHQTomlOCPRUIu5qDgRAE1KiHZNAgAA X-CMS-MailID: 20180404074700eucas1p12cdb8b0de3da46c433e505555129c7e6 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180404074700eucas1p12cdb8b0de3da46c433e505555129c7e6 X-RootMTR: 20180404074700eucas1p12cdb8b0de3da46c433e505555129c7e6 References: <CGME20180404074700eucas1p12cdb8b0de3da46c433e505555129c7e6@eucas1p1.samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180404_004725_337914_6595466F X-CRM114-Status: GOOD ( 14.04 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 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: Karol Lewandowski <k.lewandowsk@samsung.com>, Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>, =?UTF-8?q?=C5=81ukasz=20Stelmach?= <l.stelmach@samsung.com>, linux-kernel@vger.kernel.org, Marek Szyprowski <m.szyprowski@samsung.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 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/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index 182bf6add0b9..517e0e18f0b8 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S @@ -561,8 +561,6 @@ not_relocated: mov r0, #0 bl decompress_kernel bl cache_clean_flush bl cache_off - mov r1, r7 @ restore architecture number - mov r2, r8 @ restore atags pointer #ifdef CONFIG_ARM_VIRT_EXT mrs r0, spsr @ Get saved CPU boot mode @@ -1365,6 +1363,8 @@ __hyp_reentry_vectors: __enter_kernel: mov r0, #0 @ must be 0 + mov r1, r7 @ restore architecture number + mov r2, r8 @ restore atags pointer ARM( mov pc, r4 ) @ call kernel M_CLASS( add r4, r4, #1 ) @ enter in Thumb mode for M class THUMB( bx r4 ) @ entry point is always ARM for A/R classes
Hypervisor setup before __enter_kernel destroys the value sotred in r1. The value needs to be restored just before the jump. Signed-off-by: Ćukasz Stelmach <l.stelmach@samsung.com> --- arch/arm/boot/compressed/head.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)