From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5871AC433ED for ; Tue, 27 Apr 2021 07:24:22 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EC8EC6112F for ; Tue, 27 Apr 2021 07:24:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EC8EC6112F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:References: CC:To:From:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=VgBrHsf4ggDNlpFpfOKjyxLuft6zG/UMjMrN9ubwReo=; b=QNsjKnMZo4XRHIoDOJbVr68OZ bY5T9ZBpwtZ6zccSFhrJkWZeY8lNUgwAKBfhZia6gG7svKM2+1eYQIaQzCpWJLon9TK+XS4NO/Cfw MPr/V6mt5YrufX8NXPJLVe7IzaA1l9zM/Upl/mj4jXU1+JTTk/N1m4LVJTIP2ahZeT7z6pJgPfTog llAUfMFwIjNGtalPuyS6h/vhhlkpBOm4yf5vuxxAx3CEO4A3ub5lCbW6a5Wei1Ec78j5vHi9I6YaQ naV8F7wjJfysE0itC3aMdo1jQ+INyGflRWwSiUnNZTLo3rLxKX29QL93M4rX1dgYTzLQ+nrIW4JhC MNwfuGa+g==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lbI3B-000xGX-Fm; Tue, 27 Apr 2021 07:22:30 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lbHwn-000wPo-Rr for linux-arm-kernel@desiato.infradead.org; Tue, 27 Apr 2021 07:15:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:References:CC:To:From: Subject:Sender:Reply-To:Content-ID:Content-Description; bh=eVpk+jdAJwZBBVRHDK88Tv9V3JOcnSuo3/aSj+jllPI=; b=HNIjVlntCWwkthU3XtjmRUl+HE ocGWBZXyiwauFUS4tF9ar2Dilm+V6mfifgLyc1qiemKlUy3Ylf+Fvs9LyWBIrCtCLbxLcM/e2hLYB Es2Hd89eAfa9O4iwusjXjyh4ePTt4L7QpaLY/idYy0XmJu2W0n2sDlRdBEMvkXpGLrWPwS8pMP9Vl E25NXj/le2fOCVmrYHFXtXMZQCyudEDHhuA+9PVnnDrlTntQJflHAVo5vRMUMll+1rsZAzlEAxMfq LwIQqjNcKR+5ZcFplXDoiWSsQbkBhCJLIf7XtDKxdSUldIwVksAKZbActNbpOyT2PvkixGHztz6Qd iSS/55lQ==; Received: from szxga01-in.huawei.com ([45.249.212.187]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lbHwk-00GV1I-JX for linux-arm-kernel@lists.infradead.org; Tue, 27 Apr 2021 07:15:52 +0000 Received: from dggeml706-chm.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4FTtH90xnyzWcBg; Tue, 27 Apr 2021 15:11:49 +0800 (CST) Received: from dggema764-chm.china.huawei.com (10.1.198.206) by dggeml706-chm.china.huawei.com (10.3.17.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Tue, 27 Apr 2021 15:15:44 +0800 Received: from [10.174.185.179] (10.174.185.179) by dggema764-chm.china.huawei.com (10.1.198.206) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Tue, 27 Apr 2021 15:15:39 +0800 Subject: Re: [PATCHv2 09/11] arm64: entry: fix non-NMI kernel<->kernel transitions From: Zenghui Yu To: Mark Rutland CC: , , , , , , , , References: <20201130115950.22492-1-mark.rutland@arm.com> <20201130115950.22492-10-mark.rutland@arm.com> <20210426092139.GA16287@C02TD0UTHF1T.local> <0e1143a5-8e1a-c04e-e4fd-5c57f8354f61@huawei.com> Message-ID: Date: Tue, 27 Apr 2021 15:15:39 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <0e1143a5-8e1a-c04e-e4fd-5c57f8354f61@huawei.com> Content-Language: en-US X-Originating-IP: [10.174.185.179] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggema764-chm.china.huawei.com (10.1.198.206) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210427_001550_833144_A5158B55 X-CRM114-Status: UNSURE ( 9.05 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2021/4/26 21:39, Zenghui Yu wrote: > Hi Mark, > > On 2021/4/26 17:21, Mark Rutland wrote: > >> diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S >> index 6acfc5e6b5e0..7d46c74a8706 100644 >> --- a/arch/arm64/kernel/entry.S >> +++ b/arch/arm64/kernel/entry.S >> @@ -292,6 +292,8 @@ alternative_else_nop_endif >> alternative_if ARM64_HAS_IRQ_PRIO_MASKING >> mrs_s x20, SYS_ICC_PMR_EL1 >> str x20, [sp, #S_PMR_SAVE] >> + orr x20, x20, #GIC_PRIO_PSR_I_SET >> + msr_s SYS_ICC_PMR_EL1, x20 >> alternative_else_nop_endif > > While this does fix the lockdep part, it breaks something else. The > sleep-in-atomic one stands out (which says, I've seen other splats > triggered with this diff), where irqs_disabled() in do_mem_abort() now > gets confused by the updated PMR (GIC_PRIO_IRQON | GIC_PRIO_PSR_I_SET). Seem that this can be addressed by restoring pt_regs->pmr_save into PMR in local_daif_inherit() (before we restore the DAIF bits)? Thanks, Zenghui _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel