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: 42859 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 814B920558 for ; Thu, 8 Jan 2015 00:58:22 +0000 (UTC) Received: by mail-la0-f70.google.com with SMTP id hs14sf3563647lab.1 for ; Wed, 07 Jan 2015 16:58:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id:cc :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list; bh=7sRNJbTNFotpWQDGiOohw9meWYRzmpOiFTcM/p9Xuek=; b=gtZYnEL/sHdF9uIL/zmQ9S9WUKX2XfsifFg1WQ43YVlzFNSpndcN+0OLqJp/dOIbhl VKzfo4x4NBmREqxU+EpedYKTBvYFvUzvIOxyUGa2gmkySVHez4dbDIs/Jeo4iXWg0nfD rrCpebwEJWYRnNR05ntcn0vZGf6sM8lzU4pZ0YBvm0WAeU6HvJouQqfV7HW89e9pE+2q 8IehILc6b2y2LJ0uxFco5sJ6hS+WRlFjmlxykbGNoufgf81rbxvJsRUIgHOmpPKYknHL a84L2RR2XwR1kJSfeIwEGZnrCKHnaeAIhy4gnFwe4hHi1rsx0OX5Iy/ewL4Tmeo782kt m1nQ== X-Gm-Message-State: ALoCoQkCY2kvNqGtCWiaz+fwRSGM7dUrZtKlR09ZJErg+YWuEZQenrFE1hzXPh/Fc+jhWQATyojw X-Received: by 10.112.141.98 with SMTP id rn2mr820492lbb.2.1420678701062; Wed, 07 Jan 2015 16:58:21 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.204.104 with SMTP id kx8ls248016lac.82.gmail; Wed, 07 Jan 2015 16:58:20 -0800 (PST) X-Received: by 10.153.11.170 with SMTP id ej10mr9484300lad.24.1420678700678; Wed, 07 Jan 2015 16:58:20 -0800 (PST) Received: from mail-lb0-f171.google.com (mail-lb0-f171.google.com. [209.85.217.171]) by mx.google.com with ESMTPS id ql3si5611838lbb.133.2015.01.07.16.58.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 07 Jan 2015 16:58:20 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.171 as permitted sender) client-ip=209.85.217.171; Received: by mail-lb0-f171.google.com with SMTP id w7so428330lbi.2 for ; Wed, 07 Jan 2015 16:58:20 -0800 (PST) X-Received: by 10.112.26.135 with SMTP id l7mr983380lbg.56.1420678700534; Wed, 07 Jan 2015 16:58:20 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.9.200 with SMTP id c8csp110762lbb; Wed, 7 Jan 2015 16:58:19 -0800 (PST) X-Received: by 10.68.255.131 with SMTP id aq3mr9926982pbd.161.1420678698882; Wed, 07 Jan 2015 16:58:18 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id hm9si5827160pdb.133.2015.01.07.16.58.18 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Jan 2015 16:58:18 -0800 (PST) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; 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-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 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.192.169 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.192.169 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 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+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: tyler.baker@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.171 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 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;