From patchwork Thu Jan 8 00:54:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Baker X-Patchwork-Id: 5589551 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 34B139F357 for ; Thu, 8 Jan 2015 00:59:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 420F320374 for ; Thu, 8 Jan 2015 00:59:20 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 58BFC2035B for ; Thu, 8 Jan 2015 00:59:19 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Y91Of-0005pn-RQ; Thu, 08 Jan 2015 00:56:21 +0000 Received: from mail-pd0-f169.google.com ([209.85.192.169]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Y91OW-0005ZB-3U for linux-arm-kernel@lists.infradead.org; Thu, 08 Jan 2015 00:56:13 +0000 Received: by mail-pd0-f169.google.com with SMTP id z10so7905099pdj.0 for ; Wed, 07 Jan 2015 16:55:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=vSniquDe5OqGELKv4rBbASGl7dd7Ze2dnXEhY+85E6c=; b=L5lUBN0lsPKhaQ7Cq+uB0iOK53mLRvkblNskVDMK4vDiplrf+vgGV1r0GkB93oYBfN G6M4E143Uw6XHWvXAalxIVbbsTMJwZgqEXHqL0vAcofgzTKC7I7H4g1YhvjqqE9LZ8vC KUgMFsO6FcVLmbWtSbCTxmhuk5FWMrWTGtkltDOIc9j+rPCFbB1WUOcop0r2zEOvF7eO YFXTiR79Mwiix4jU0BFthmbV+wUf9ptxK0//gQWKuMBr9iclRCRkiSn6CUwtlV0i+gZZ G6NsLYGTpZD9BwCurI8b70oAH6681Dgw87UM57Jc3rjmeFM4G5OG7eySrBmaYn1s5rLB 58tQ== X-Gm-Message-State: ALoCoQlM90h+lUXGKshdK0Xp1bpcvonJ+thndwvsIHi1Q1cdzz8kOmRqNKlqCZ1qV/3QZy9rz7F5 X-Received: by 10.68.194.106 with SMTP id hv10mr10233602pbc.50.1420678546023; Wed, 07 Jan 2015 16:55:46 -0800 (PST) Received: from localhost.localdomain ([173.14.250.228]) by mx.google.com with ESMTPSA id ak5sm2898467pad.44.2015.01.07.16.55.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 07 Jan 2015 16:55:45 -0800 (PST) From: Tyler Baker To: linux-arm-kernel@lists.infradead.org, arm@kernel.org Subject: [PATCH] reset: sunxi: fix spinlock initialization Date: Wed, 7 Jan 2015 16:54:39 -0800 Message-Id: <1420678479-630-1-git-send-email-tyler.baker@linaro.org> X-Mailer: git-send-email 2.1.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150107_165612_249046_AD57841F X-CRM114-Status: UNSURE ( 9.16 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) Cc: Maxime Ripard , Tyler Baker , Philipp Zabel X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Call spin_lock_init() before the spinlocks are used, preventing a lockdep splat. I have been observing lockdep complaining [1] during boot on my a80 optimus [2] when CONFIG_PROVE_LOCKING has been enabled. This patch resolves the splat, and has been tested on a few other sunxi platforms without issue. [1] http://storage.kernelci.org/next/next-20150107/arm-multi_v7_defconfig+CONFIG_PROVE_LOCKING=y/lab-tbaker/boot-sun9i-a80-optimus.html [2] http://kernelci.org/boot/?a80-optimus Signed-off-by: Tyler Baker --- This patch was tested on 3.19.0-rc3 drivers/reset/reset-sunxi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/reset/reset-sunxi.c b/drivers/reset/reset-sunxi.c index eebc52c..e37250c 100644 --- a/drivers/reset/reset-sunxi.c +++ b/drivers/reset/reset-sunxi.c @@ -157,6 +157,8 @@ static int sunxi_reset_probe(struct platform_device *pdev) if (IS_ERR(data->membase)) return PTR_ERR(data->membase); + spin_lock_init(&data->lock); + data->rcdev.owner = THIS_MODULE; data->rcdev.nr_resets = resource_size(res) * 32; data->rcdev.ops = &sunxi_reset_ops;