Received: by 2002:a25:1104:0:0:0:0:0 with SMTP id 4csp582775ybr; Fri, 22 May 2020 13:54:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw75MB1T8S48EyvprjC3hyh6RTWCTGR71PB9cisVryApUb+JvV1mWLLlWtY3yi8pSR7rbLI X-Received: by 2002:a17:906:3944:: with SMTP id g4mr9713379eje.55.1590180890007; Fri, 22 May 2020 13:54:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590180889; cv=none; d=google.com; s=arc-20160816; b=WcTlRlc0p/nHwrBSYROHGma+mO8UcuYMR6CttubcNlnFPllBH/6+hftwVbneNFBVxw egfIhemakcXByPOBNq2Dh2B5GAtcyQYkZuTU6XhbS8BNZCuBN2+Pkr+49G9SDROczNtL oOUg8DqQwNz0jwc/2vSW9Nv+kEy9K2iIOTMdTafoWuLOgDQSZmerI0/8JcypEbEiTru4 udjRiQz7D+k7ck7dKWBvuDMnKmUW6E9gLDOP/kKjedljPbKOq/ETsf41LCYLrq91wleq Ze+fmi/qW4uHqzLUZztP0pjgRKcacjETVGhZh8gHn2fl1Dr+r7zKXz4Erh3xiUd/0UJi 7DRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=C0w98WNrq8RwJa7xUXc0zE5qi1XnFGyGA8zuRJzv1+A=; b=Mr6jujbXoPRwGfOyMuEAtiZTFrRgsI04WUc2wt2oGmBKvqXMGL0LQzDvlKnfBl91tJ tue67r2VMgaySA3b3DWQawL1yirg57AHvC9nKmANEwFckGbKe/aLQSdrWS3ONO0hYZFm BvhQffaUoTm0PrAQsevBxKdZDXp0nQ4p4p8gqwxvKbEdnZWLO6/iCs9FMNXEUHemdOao t0dirXPHlIpHoe5BA7L5N/ZfCJ6lc7P3cB0mqb96sjfnjPo33I7xlFC3Q1jjlSa6O7W5 IYn9YYBMrEsd9l/tSultVlRfGma9lFajanqrh0q4SZyB/NDAspYuWKisXcFqsOgylkZm 1Nxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ieee.org header.s=google header.b=asSTQpz2; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ieee.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 92si5721243edk.74.2020.05.22.13.54.27; Fri, 22 May 2020 13:54:49 -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=@ieee.org header.s=google header.b=asSTQpz2; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ieee.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731068AbgEVUws (ORCPT + 99 others); Fri, 22 May 2020 16:52:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731000AbgEVUwr (ORCPT ); Fri, 22 May 2020 16:52:47 -0400 Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ACFD0C061A0E for ; Fri, 22 May 2020 13:52:47 -0700 (PDT) Received: by mail-io1-xd42.google.com with SMTP id h10so12783460iob.10 for ; Fri, 22 May 2020 13:52:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ieee.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=C0w98WNrq8RwJa7xUXc0zE5qi1XnFGyGA8zuRJzv1+A=; b=asSTQpz2RYbFcEsqJeFmmqKAhKE45IdJQkGhkHa4Fs6PX0Zt/OZ3+1UTl1AKx1cn8p bnLiEr97rwt5v4QnmemdE8NnRFnA62tER5n6TPE3gr1/TNcVyY84HZ0mnCyVvSG8MCxW uc7nKZLpkIyl8gjLYSdfkTevCkq7GTChKnVo8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=C0w98WNrq8RwJa7xUXc0zE5qi1XnFGyGA8zuRJzv1+A=; b=QwLJyld/FPrLQA4n5aAMx6sT7z8xoAXHGLf0aG7P9oQfZ7Wnn7bT+z2pq54K6EEtpT Ns5Jl9mJ6icQh3JYy/vH/bjGios4wdJ9PDoUX2TBFzCT1KcBaKAMw8yWyaovLSRilomm Rn+h+9lhXzzEy5GSfOdBKIiKzAMH8K5ewHpcuudCbEloNH6171JneoSC29JCwlpb2ODn yVMBZYCOF8dJZr9FLwt8ZY3Qo7GbbZ/0p+X09C3PlsNIhJGRnR+JTDj2BKnWQ4gnncFe xXdp8LCBn/0qo8q0bEyZDf3Cbu3XnboZ1bgGhwqWs0puzsiV/AfLbAekROcxeiyCEvmG 3w9Q== X-Gm-Message-State: AOAM531owY7BKOLGRyBa/vq7qDas7FHGc4Rwh76BCTIly3BJIcd4FF37 2l10JFT4MQrdHZo+41d5QS/g4A== X-Received: by 2002:a02:4446:: with SMTP id o67mr9770308jaa.25.1590180767044; Fri, 22 May 2020 13:52:47 -0700 (PDT) Received: from [172.22.22.4] (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.googlemail.com with ESMTPSA id 199sm2519230ilb.11.2020.05.22.13.52.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 22 May 2020 13:52:46 -0700 (PDT) Subject: Re: [PATCH v2 10/15] soc: qcom: ipa: use new module_firmware_crashed() To: Luis Chamberlain Cc: jeyu@kernel.org, akpm@linux-foundation.org, arnd@arndb.de, rostedt@goodmis.org, mingo@redhat.com, aquini@redhat.com, cai@lca.pw, dyoung@redhat.com, bhe@redhat.com, peterz@infradead.org, tglx@linutronix.de, gpiccoli@canonical.com, pmladek@suse.com, tiwai@suse.de, schlad@suse.de, andriy.shevchenko@linux.intel.com, keescook@chromium.org, daniel.vetter@ffwll.ch, will@kernel.org, mchehab+samsung@kernel.org, kvalo@codeaurora.org, davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Alex Elder References: <20200515212846.1347-1-mcgrof@kernel.org> <20200515212846.1347-11-mcgrof@kernel.org> <0b159c53-57a6-b771-04ab-2a76c45d0ef4@ieee.org> <20200522052834.GA11244@42.do-not-panic.com> From: Alex Elder Message-ID: Date: Fri, 22 May 2020 15:52:44 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200522052834.GA11244@42.do-not-panic.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/22/20 12:28 AM, Luis Chamberlain wrote: > On Tue, May 19, 2020 at 05:34:13PM -0500, Alex Elder wrote: >> On 5/15/20 4:28 PM, Luis Chamberlain wrote: >>> This makes use of the new module_firmware_crashed() to help >>> annotate when firmware for device drivers crash. When firmware >>> crashes devices can sometimes become unresponsive, and recovery >>> sometimes requires a driver unload / reload and in the worst cases >>> a reboot. >>> >>> Using a taint flag allows us to annotate when this happens clearly. >> >> I don't fully understand what this is meant to do, so I can't >> fully assess whether it's the right thing to do. > > It is meant to taint the kernel to ensure it is clear that something > critically bad has happened with the device firmware, it crashed, and > recovery may or may not happen, we are not 100% certain. >> >> But in this particular place in the IPA code, the *modem* has >> crashed. And the IPA driver is not responsible for modem >> firmware, remoteproc is. > > Oi vei. So the device it depends on has crashed. Yes, more or less. It could be considered a little more nuanced than even that, but I won't get into it here. >> The IPA driver *can* be responsible for loading some other >> firmware, but even in that case, it only happens on initial >> boot, and it's basically assumed to never crash. > > OK is this an issue which we can recover from? If for the slightest bit > this can affect users it is something we should inform them over. If the IPA driver successfully loads this firmware, it should be assumed to never crash. So in that respect, there is no recovery required. Again, the modem (with which the IPA hardware and driver interacts) can crash, or it can be shut down intentionally. And in either case it can recover, automatically or manually. But all of that (and the modem's firmware loading) is the responsibility of the remoteproc subsystem, not IPA. > This patch set is missing uevents for these issues, but I just added > support for this. > >> So regardless of whether this module_firmware_crashed() call is >> appropriate in some places, I believe it should not be used here. > > OK thanks. Can the user be affected by this crash? If so how? Can > we recover ? Is that always guaranteed? We can't guarantee anything about recovering from a crash of an independent entity. But by design, recovery from a modem crash is possible and is supposed to leave Linux in a consistent state. A modem crash is likely to be observable to the user. I'll repeat that I don't believe the new call you inserted in the IPA driver belongs there. -Alex > > Luis >