Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7075537ybi; Thu, 13 Jun 2019 09:09:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqwXTiXnO99YRPdTbcjXN0tUs/HCOcDwYyeqvp0cHdNGmw4AyvTWEpzj+wGPU/Kc2q3kqlVh X-Received: by 2002:a63:c09:: with SMTP id b9mr31038934pgl.241.1560442161252; Thu, 13 Jun 2019 09:09:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560442161; cv=none; d=google.com; s=arc-20160816; b=DZ0ul4xZ9vpxUTco9HpHOb4hjdyxrIoTMpCE9+15ILkM9GEzZe+oisK/LORzdbyYs/ oB83HTNsxKwQktHXZ+UMlz1PZEO+VTqx8waB8th81/QAF7HNTXMmhlVprU3GquzvGLgY ho5K4S4GmnbM2qnh6pnL2ad/WRgq5Qj9CpKJRZXie1iYLgTRkuUPsmF41goLG5/FZcTq zHLjlT0Umiihx3qkNHK5DYfa2A9ehWJJmME4IBwVhAFHE3lvlmB6HwOj9MdZ4YGV+Ujo fWeyfbH55AUGtsgY1B8MSBBNPj51H+NtUGFK2xSnDKt+cuV1ICCi85IWx4OYnPslJjhr rYMg== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=RE5eG9kpB0OK7Jm11HNaRS2L3fl5ZkVNQVzawDBXJ+0=; b=rcyOaWM/u9E4cQ0cjH/SPkQhRdyDDWoLvI9hexj/Z5rrybyeDjbZV/bSP0qAidFdBU TxYcq9wsf0Y9SIMvn5hAm5GKi2NSq4uK09eev8Y1nQhOKixWY24tS86d2o6RvbH8Mncq GLZSnvRLpZONaUYcqhRS3wGhyVCnZyoUnPrTfO0ZFZwbv7mHYmMxsyzjQ+SIIMuokWNV rvBzjCHsn3CN+DP69yPSVIllGGUtOEAbYAHY9NJhRwRjCcXI6VOLt27qK8kJ3P12UCri o8yajZMa0NfRAvh0tdk3MJ79HeIvTjZmajyx7ycucwd0I4KPvWFS+VHixNWcQhLT68JG q4/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ID8YxHt9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w7si110222pgr.399.2019.06.13.09.09.06; Thu, 13 Jun 2019 09:09:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ID8YxHt9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391250AbfFMQJC (ORCPT + 99 others); Thu, 13 Jun 2019 12:09:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:33592 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731268AbfFMIot (ORCPT ); Thu, 13 Jun 2019 04:44:49 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A60342147A; Thu, 13 Jun 2019 08:44:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560415488; bh=GSTTpigTR+QKB1kZBNgiJYTC8qGHTEziFPt1bj0+VAI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ID8YxHt9B+31S+P7Bk6D56XgSkh2X/2tg1EIPIbUytOy3nz+QUMErgcjjLp1Sjiwr yjlo3ogocYHGoe1aGF8649hUp+7orVrTV3xStLK4J/4GBvqL9xhMzgfKRi8vu+9Wgt d6emFVtmpSnQeLiV1ILUmmjvq7CWAwkz+y5bP64g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Linus Walleij , Guenter Roeck , Sasha Levin Subject: [PATCH 5.1 009/155] drm/pl111: Initialize clock spinlock early Date: Thu, 13 Jun 2019 10:32:01 +0200 Message-Id: <20190613075653.263419369@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190613075652.691765927@linuxfoundation.org> References: <20190613075652.691765927@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 3e01ae2612bdd7975c74ec7123d7f8f5e6eed795 ] The following warning is seen on systems with broken clock divider. INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. CPU: 0 PID: 1 Comm: swapper Not tainted 5.1.0-09698-g1fb3b52 #1 Hardware name: ARM Integrator/CP (Device Tree) [] (unwind_backtrace) from [] (show_stack+0x10/0x18) [] (show_stack) from [] (dump_stack+0x18/0x24) [] (dump_stack) from [] (register_lock_class+0x674/0x6f8) [] (register_lock_class) from [] (__lock_acquire+0x68/0x2128) [] (__lock_acquire) from [] (lock_acquire+0x110/0x21c) [] (lock_acquire) from [] (_raw_spin_lock+0x34/0x48) [] (_raw_spin_lock) from [] (pl111_display_enable+0xf8/0x5fc) [] (pl111_display_enable) from [] (drm_atomic_helper_commit_modeset_enables+0x1ec/0x244) Since commit eedd6033b4c8 ("drm/pl111: Support variants with broken clock divider"), the spinlock is not initialized if the clock divider is broken. Initialize it earlier to fix the problem. Fixes: eedd6033b4c8 ("drm/pl111: Support variants with broken clock divider") Cc: Linus Walleij Signed-off-by: Guenter Roeck Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/1557758781-23586-1-git-send-email-linux@roeck-us.net Signed-off-by: Sasha Levin --- drivers/gpu/drm/pl111/pl111_display.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/pl111/pl111_display.c b/drivers/gpu/drm/pl111/pl111_display.c index 754f6b25f265..6d9f78612dee 100644 --- a/drivers/gpu/drm/pl111/pl111_display.c +++ b/drivers/gpu/drm/pl111/pl111_display.c @@ -531,14 +531,15 @@ pl111_init_clock_divider(struct drm_device *drm) dev_err(drm->dev, "CLCD: unable to get clcdclk.\n"); return PTR_ERR(parent); } + + spin_lock_init(&priv->tim2_lock); + /* If the clock divider is broken, use the parent directly */ if (priv->variant->broken_clockdivider) { priv->clk = parent; return 0; } parent_name = __clk_get_name(parent); - - spin_lock_init(&priv->tim2_lock); div->init = &init; ret = devm_clk_hw_register(drm->dev, div); -- 2.20.1