From patchwork Wed Nov 15 15:24:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulrich Hecht X-Patchwork-Id: 10059739 Return-Path: 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 9A4886019D for ; Wed, 15 Nov 2017 15:25:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8996629C0B for ; Wed, 15 Nov 2017 15:25:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7E14D2A01A; Wed, 15 Nov 2017 15:25:19 +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=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=ham 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 CFDF729C0B for ; Wed, 15 Nov 2017 15:25:18 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=hGRnnxQ79iu6HDL8ZuJH7qhvZSHfahPHel3CpLth/Vo=; b=KyfhsdEHUC3xSNFl/SKOfgLHnc S9u1DWdW2X0PYVIfV2RtVaJ3phiRVOtyuU/4hVnCnr5B7DoxEcDDELpCkxlNcqxavKuHjQbuMruk7 TZsE6cdbXR6K6QCPIsAPh7Q1qDBeCIXUaHU8t3A69Gf8JA7gthNDMMKA50dNyMocdVofGKS4CwREK 0fihUuFydvn2htMmKo653jx5IKa8HfSwV0fCy6MZt9+VDKt8+VC2K/AsD/eE4GWI5wMgxLA73HWec 4oxhGDnEmko6uikiYAzqyhFXkrtB9Ifkf+1Pyx43sng4TW6vodgt6OzJWcAUuEf2DPQVsP1su7dRV 7fsTzUUA==; 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 1eEzYz-0004hC-Sn; Wed, 15 Nov 2017 15:25:17 +0000 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eEzYq-0003JT-GK for linux-mediatek@lists.infradead.org; Wed, 15 Nov 2017 15:25:15 +0000 Received: by mail-wm0-x241.google.com with SMTP id r68so3756005wmr.1 for ; Wed, 15 Nov 2017 07:24:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=zzPGIc4p6MgCLxtBSRR5yIJy03VESPF37PCvRMEqqnA=; b=UUNJjGEzMB3KYQvDjNjwKNk4pV+51JliCLbyA2g6bIFZDPb75onhL7zR9JbZm7unMy /IuAYM3m8Daqi8tuc8oCGgGYECyDUh8lObdEIcFmNlPSIRy2akfsOLiEauejnBiHkHBT RAERGvEzuN8Vi4YLPq/gUJXt+bDxyFU6liNXLV303XrqUFL/D1vLLWFxwCeiNqeyb6XM br+2mUusuQ0l/Sa8HwTZtOeF4BGdVzR6MLYTzq2oNRlu7YSaxqERe4WooPNc+bswUTTE LfQCBYXk30tHM2mjjPEpcoeLfglcsMrKqF1dQW/2ke0vstkDlI86SOo3g+xyrXmxWpr6 T2Vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=zzPGIc4p6MgCLxtBSRR5yIJy03VESPF37PCvRMEqqnA=; b=f9EXi1xvRSpMPcJwxpbuCtUg7jtGgoxj+ratJ8I6xXIZN2eSS0QlYWGozqdpriykTt fK48iaGOVBzakl2NwbublvtAfDD7bUDB3aA8tp4NeXn9zUWwNT0SttYoXidKgTDQhXJA XCxIqAViQpoQ2XTtFzEminmW2mz83sYBbSriNZyx1DifAnPhXyzYk3U7Q56UgqKPEPKd nvbjDUJMnDf8U/UeexS4s+A3M7W2m8zAF9hYgT/JkbuyO4LpkcO3GbSGJ8MycP5kJ+Xc 2kvMo6HQTo7XFDdRRjgaDG4WCFGIeVfF6mBVqvSxP8II6ed8HHGq/xoNXvnZ8yrkPPgz YApw== X-Gm-Message-State: AJaThX5DkBJrh27RXZ8w/r85bmyq+aIG8sWtzWxIZFryY2xj79hXojre aO7kaonHzXpUnGRbHR8+UYzQU7c= X-Google-Smtp-Source: AGs4zMa2U5OaryiZdTeb1eaiRQo2pZXf9vHynsevuoVnhu6SZ2WHxMRNzQxJOS+wczpUqc+uyhKa+A== X-Received: by 10.28.209.77 with SMTP id i74mr1497207wmg.53.1510759491522; Wed, 15 Nov 2017 07:24:51 -0800 (PST) Received: from groucho.site (ipbcc0ce42.dynamic.kabel-deutschland.de. [188.192.206.66]) by smtp.gmail.com with ESMTPSA id s12sm51547104wrc.89.2017.11.15.07.24.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 15 Nov 2017 07:24:50 -0800 (PST) From: Ulrich Hecht To: linux-mediatek@lists.infradead.org Subject: [POC 12/16] drm/img-rogue: remove locking around devfreq opp functions Date: Wed, 15 Nov 2017 16:24:19 +0100 Message-Id: <1510759463-30201-13-git-send-email-ulrich.hecht+renesas@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1510759463-30201-1-git-send-email-ulrich.hecht+renesas@gmail.com> References: <1510759463-30201-1-git-send-email-ulrich.hecht+renesas@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171115_072508_797519_28A5A87A X-CRM114-Status: UNSURE ( 7.54 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ulrich Hecht , mbrugger@suse.com, magnus.damm@gmail.com, laurent.pinchart@ideasonboard.com, dri-devel@lists.freedesktop.org MIME-Version: 1.0 Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Fixes "BUG: sleeping function called from invalid context". Signed-off-by: Ulrich Hecht --- drivers/gpu/drm/img-rogue/1.6/pvr_dvfs_device.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/gpu/drm/img-rogue/1.6/pvr_dvfs_device.c b/drivers/gpu/drm/img-rogue/1.6/pvr_dvfs_device.c index be1919e..cadda55 100644 --- a/drivers/gpu/drm/img-rogue/1.6/pvr_dvfs_device.c +++ b/drivers/gpu/drm/img-rogue/1.6/pvr_dvfs_device.c @@ -94,7 +94,6 @@ static IMG_INT32 devfreq_target(struct device *dev, long unsigned *requested_fre IMG_UINT32 ui32Freq, ui32CurFreq, ui32Volt; struct OPP_STRUCT *opp; - rcu_read_lock(); opp = devfreq_recommended_opp(dev, requested_freq, flags); if (IS_ERR(opp)) { rcu_read_unlock(); @@ -104,7 +103,6 @@ static IMG_INT32 devfreq_target(struct device *dev, long unsigned *requested_fre ui32Freq = OPP_GET_FREQ(opp); ui32Volt = OPP_GET_VOLTAGE(opp); - rcu_read_unlock(); ui32CurFreq = psRGXTimingInfo->ui32CoreClockSpeed; @@ -230,11 +228,9 @@ static int GetOPPValues(struct device *dev, struct dev_pm_opp *opp; /* Start RCU read-side critical section to access device opp_list. */ - rcu_read_lock(); count = OPP_GET_OPP_COUNT(dev); if (count < 0) { dev_err(dev, "Could not fetch OPP count, %d\n", count); - rcu_read_unlock(); return count; } @@ -245,7 +241,6 @@ static int GetOPPValues(struct device *dev, #endif if (!freq_table) { - rcu_read_unlock(); return -ENOMEM; } @@ -287,8 +282,6 @@ static int GetOPPValues(struct device *dev, exit: - rcu_read_unlock(); - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)) if (!err) {