Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp2952061pxy; Tue, 3 Aug 2021 21:13:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/8Ejemlq672w4IsEn5ohD0u5rvu+F+ZIUz37yuwtmI3Ii83xZGGvaf3HDq2G/iatHWxP3 X-Received: by 2002:a17:906:af77:: with SMTP id os23mr23272785ejb.427.1628050409994; Tue, 03 Aug 2021 21:13:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628050409; cv=none; d=google.com; s=arc-20160816; b=J7HUR6KOukKA5FLGe3fm+8pGNCTFFFTo43Q8S4pJSQdVzl5oyHUP8qGA5bf7I3djBE mOIrEpUGyXy6t9efhIV9I0Gk4R+2JrDzh67o9E6bZ5Djioq2IlhOVTQIn4iUF+8aTE2j fWbi8g4tsXaMvpTIP6XVI6d0LHJo5Hqeppbca8nXu11RuaYWOkjuCSkjrHUz017WCRac Qr0en3lm/sci5ohiEU+GtNwNitezcDJff2uwXiZoFZYy23V92uj3xleSq3AmH8SoCRFw PU/yqcjjJRYA7dxavGb61DIjzPJV43uMm7kSIlWapoFDvwTeJXoXHyoGRMAz1K3coDxX DIwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=zhqS3uONZN5n4HL/DQug9GqUIhjPXsIGOz3wxqAvewU=; b=JYX4AlIHoc1/u+wOF1P0+gdTpiuJ0dg2WOLJhWD3E6pxcTsLKwy6qn7QFeT7atUJoW IiUIapoC2HmgY719qXS5i1YnIZn2mP0SOY9dqLcIplzMpcd64Jh/igmvyOf/YobTs0Dm E8rqUyhMhFm5zfvuzGttFfqGsQaBnmWIP+D9BD5b25kI+V3AUKMAQropm2buDQGLRkx5 NHOjyJ5dQI1J2DRJpSxpI9lYxPzGpYw91nfD8dK8JdVOyERG4Nyx9f9WdpKhcuZLcSs4 +kaFQf+LpSVKYt+PFxg02CI33vHTXajzgvrhvyuz5BcrL2LsJDblgQLinnMYZ5egpscm KXyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=fUJzBzWR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id eb8si1083489edb.415.2021.08.03.21.13.05; Tue, 03 Aug 2021 21:13:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=fUJzBzWR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231346AbhHDEEu (ORCPT + 99 others); Wed, 4 Aug 2021 00:04:50 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:33541 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229562AbhHDEEu (ORCPT ); Wed, 4 Aug 2021 00:04:50 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id A363F5C0129; Wed, 4 Aug 2021 00:04:37 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 04 Aug 2021 00:04:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=zhqS3u ONZN5n4HL/DQug9GqUIhjPXsIGOz3wxqAvewU=; b=fUJzBzWRskYL9S60bfH0nN lHlT1WH1s47IjAf9RZHIzCY1EXzstC7mBp7xEdg2hXQTZLGw90c1MlHxo72NXrrJ 831Oxc7/1uSrsT/MEL8UqNhsAf/G3sW5UgSm3kgZbr7fY9dEzql41hsA8RDJ9E06 O4q+ccY+bXnKIuajuDKmuZMX2yrAoyJmL9pZIl0PI4UPOAsvcx4liFZhsh5Y/57Z tzNFdELHDY6ZU/2PxEoLem8Hdq+1P4Wk+sxzyjhh/hiNS5Dr94iYLvoqXnln4kE5 7jGtLCfMqqo0xO2rBpwn0iHyAMmy7dzET/dd8UuIWZN6nJFIPzxnAawfhxyPHU1w == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrieehgdejhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvufgjkfhfgggtsehttdertddttddvnecuhfhrohhmpefhihhnnhcuvfhh rghinhcuoehfthhhrghinheslhhinhhugidqmheikehkrdhorhhgqeenucggtffrrghtth gvrhhnpeffudfhgeefvdeitedugfelueegheekkeefveffhfeiveetledvhfdtveffteeu udenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehfth hhrghinheslhhinhhugidqmheikehkrdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 4 Aug 2021 00:04:33 -0400 (EDT) Date: Wed, 4 Aug 2021 14:04:28 +1000 (AEST) From: Finn Thain To: Christophe Leroy cc: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , userm57@yahoo.com, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH] powerpc/32s: Fix napping restore in data storage interrupt (DSI) In-Reply-To: <731694e0885271f6ee9ffc179eb4bcee78313682.1628003562.git.christophe.leroy@csgroup.eu> Message-ID: References: <731694e0885271f6ee9ffc179eb4bcee78313682.1628003562.git.christophe.leroy@csgroup.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 3 Aug 2021, Christophe Leroy wrote: > When a DSI (Data Storage Interrupt) is taken while in NAP mode, r11 > doesn't survive the call to power_save_ppc32_restore(). > > So use r1 instead of r11 as they both contain the virtual stack pointer > at that point. > > Reported-by: Finn Thain > Fixes: 4c0104a83fc3 ("powerpc/32: Dismantle EXC_XFER_STD/LITE/TEMPLATE") Regarding that 'Fixes' tag, this patch has not fixed the failure below, unfortunately. But there appears to be several bugs in play here. Can you tell us which failure mode is associated with the bug addressed by this patch? ------------[ cut here ]------------ kernel BUG at arch/powerpc/kernel/interrupt.c:49! Oops: Exception in kernel mode, sig: 5 [#1] BE PAGE_SIZE=4K MMU=Hash SMP NR_CPUS=2 PowerMac Modules linked in: CPU: 0 PID: 1859 Comm: xfce4-session Not tainted 5.13.0-pmac-VMAP #10 NIP: c0011474 LR: c0011464 CTR: 00000000 REGS: e2f75e40 TRAP: 0700 Not tainted (5.13.0-pmac-VMAP) MSR: 00021032 CR: 2400446c XER: 20000000 GPR00: c001604c e2f75f00 ca284a60 00000000 00000000 a5205eb0 00000008 00000020 GPR08: ffffffc0 00000001 501200d9 ce030005 ca285010 00c1f778 00000000 00000000 GPR16: 00945b20 009402f8 00000001 a6b87550 a51fd000 afb73220 a6b22c78 a6a6aecc GPR24: 00000000 ffffffc0 00000020 00000008 a5205eb0 00000000 e2f75f40 000000ae NIP [c0011474] system_call_exception+0x60/0x164 LR [c0011464] system_call_exception+0x50/0x164 Call Trace: [e2f75f00] [00009000] 0x9000 (unreliable) [e2f75f30] [c001604c] ret_from_syscall+0x0/0x28 --- interrupt: c00 at 0xa69d6cb0 NIP: a69d6cb0 LR: a69d6c3c CTR: 00000000 REGS: e2f75f40 TRAP: 0c00 Not tainted (5.13.0-pmac-VMAP) MSR: 0000d032 CR: 2400446c XER: 20000000 GPR00: 000000ae a5205de0 a5687ca0 00000000 00000000 a5205eb0 00000008 00000020 GPR08: ffffffc0 401201ea 401200d9 ffffffff c158f230 00c1f778 00000000 00000000 GPR16: 00945b20 009402f8 00000001 a6b87550 a51fd000 afb73220 a6b22c78 a6a6aecc GPR24: afb72fc8 00000000 00000001 a5205f30 afb733dc 00000000 a6b85ff4 a5205eb0 NIP [a69d6cb0] 0xa69d6cb0 LR [a69d6c3c] 0xa69d6c3c --- interrupt: c00 Instruction dump: 7cdb3378 93810020 7cbc2b78 93a10024 7c9d2378 93e1002c 7d3f4b78 4800d629 817e0084 931e0088 69690002 5529fffe <0f090000> 69694000 552997fe 0f090000 ---[ end trace c66c6c3c44806276 ]---