Message ID | 0a0600cdbcc9a71134105043c3e2ace84bab7c5a.1500510157.git.mirq-linux@rere.qmqm.pl (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 B8647600F5 for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 20 Jul 2017 00:32:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BCD46286FB for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 20 Jul 2017 00:32:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B05A228709; Thu, 20 Jul 2017 00:32:55 +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.1 required=2.0 tests=BAYES_00,DKIM_ADSP_ALL, DKIM_SIGNED,DKIM_VALID autolearn=no version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 30CD7286FB for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 20 Jul 2017 00:32:55 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:MIME-Version:Subject:From:References :In-Reply-To:Message-Id:Date:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cgvKBQeSIqR/C06jlUaa4oxktBInEJk008mbFhp8xgc=; b=IZuJ1mPN4vkltj n3iwPRvXIJzjjmaOJbW2Tkva5ZP2fHYHx3iIl8+eBksQQjs8zUJ1mbyGJIPeOlIz6HAi33N27pPJk i+HBuD37qJNJgN/D3nzS4PrXY0PYaI1AvS4w0RSNcqmdVI3CSx6VKGXyPjk8P66UOcfl+4U9mEVDI yIhQeXPQnqkiKoCkh9uxIeQRKRs6bxfQz2W+uhjoktfvkyF2wDr+i+yd7sdSV4bVfpA3BBUegHGng JR9KOY7oO73pKeT99Hq5ZglxMZnxEA7FwQPNt0qpmAm9W49RaRVpEFM2oyWPQ8PCx0W6qIau2ENHT qgFEiwpk/2Q+sVPKFtxg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dXzOc-0005yI-C5; Thu, 20 Jul 2017 00:32:50 +0000 Received: from rere.qmqm.pl ([91.227.64.183]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dXzM9-0002Ru-3S for linux-arm-kernel@lists.infradead.org; Thu, 20 Jul 2017 00:30:31 +0000 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 844BF330; Thu, 20 Jul 2017 02:29:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1500510566; bh=GTmIT3LncdhDg/kIictom6aGgFHuHclG8OJzfNFjdeI=; h=Date:In-Reply-To:References:From:Subject:To:From; b=iMaml0fVEmmPRJS8Vcinfh9ZJWKD2T5/9rbavwV7Zqh+U8+pt7GsQEdAkZ9Q4wpR7 QJew7Mk7IAipj11Ii53vCZGdjjzape6Vn8vvzElJN+ITfl7h02dnzw63z0ABgbZ70j FbHHZvwjEpSyPEBls0uXibkXA6xHPGRLM0YV3pXeGbBgPswX5cF/+jJmmzZoAkx8L2 iO9ecMQU8cTBjOvMjhB681LuPQYflsMqa3u+po41/NRK5BJwcb9lo+NDV3O/JzY5i3 1rUuWT7KJHFFJ0aGKMGcWw5cCkb5F/uhS1jSyivg9bhYAYkTuz0c6bQU29/zkeQFEj uCjpIgvZ8xkXg== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.99.2 at rere Date: Thu, 20 Jul 2017 02:29:26 +0200 Message-Id: <0a0600cdbcc9a71134105043c3e2ace84bab7c5a.1500510157.git.mirq-linux@rere.qmqm.pl> In-Reply-To: <cover.1500510157.git.mirq-linux@rere.qmqm.pl> References: <cover.1500510157.git.mirq-linux@rere.qmqm.pl> From: =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= <mirq-linux@rere.qmqm.pl> Subject: [PATCH 9/9] ARM: tegra: fix sleeping while atomic in CPU idle MIME-Version: 1.0 To: linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170719_173018_133878_FA23AD42 X-CRM114-Status: UNSURE ( 6.83 ) X-CRM114-Notice: Please train this message. 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> 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/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c index e233dd5dcab3..3e6ec9fdba41 100644 --- a/drivers/soc/tegra/pmc.c +++ b/drivers/soc/tegra/pmc.c @@ -526,9 +526,7 @@ int tegra_powergate_is_powered(unsigned int id) if (!tegra_powergate_is_valid(id)) return -EINVAL; - mutex_lock(&pmc->powergates_lock); status = tegra_powergate_state(id); - mutex_unlock(&pmc->powergates_lock); return status; }
This removes unnecessary lock causing following BUG splat: BUG: sleeping function called from invalid context at /linux/kernel/locking/mutex.c:747 in_atomic(): 1, irqs_disabled(): 128, pid: 0, name: swapper/0 no locks held by swapper/0/0. CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W 4.13.0-rc1mq-00016-gbf3f627c6b2b #1 Hardware name: NVIDIA Tegra SoC (Flattened Device Tree) [<b0110a14>] (unwind_backtrace) from [<b010c710>] (show_stack+0x18/0x1c) [<b010c710>] (show_stack) from [<b068ada8>] (dump_stack+0x84/0x98) [<b068ada8>] (dump_stack) from [<b014ff54>] (___might_sleep+0x158/0x17c) [<b014ff54>] (___might_sleep) from [<b06a15c4>] (__mutex_lock+0x34/0x9a0) [<b06a15c4>] (__mutex_lock) from [<b06a30dc>] (mutex_lock_nested+0x24/0x2c) [<b06a30dc>] (mutex_lock_nested) from [<b041f6d8>] (tegra_powergate_is_powered+0x40/0xa4) [<b041f6d8>] (tegra_powergate_is_powered) from [<b04197e8>] (tegra30_cpu_rail_off_ready+0x28/0x6c) [<b04197e8>] (tegra30_cpu_rail_off_ready) from [<b011c73c>] (tegra30_idle_lp2+0x70/0x114) [<b011c73c>] (tegra30_idle_lp2) from [<b0516080>] (cpuidle_enter_state+0x12c/0x47c) [<b0516080>] (cpuidle_enter_state) from [<b0163394>] (do_idle+0x1b4/0x204) [<b0163394>] (do_idle) from [<b016368c>] (cpu_startup_entry+0x20/0x24) [<b016368c>] (cpu_startup_entry) from [<b0900dd8>] (start_kernel+0x39c/0x3a8) Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> --- drivers/soc/tegra/pmc.c | 2 -- 1 file changed, 2 deletions(-)