From patchwork Sun Oct 27 21:01:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 177869 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp2543912ill; Sun, 27 Oct 2019 14:24:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqzlRerfU0xU3CQRC4w7lkRFu0h/G9wD+RgStitiOhvMHb4u7K6ZCPiPAvn9yVa21QwJ97WQ X-Received: by 2002:a50:d80c:: with SMTP id o12mr4905244edj.251.1572211478656; Sun, 27 Oct 2019 14:24:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572211478; cv=none; d=google.com; s=arc-20160816; b=rjFQ8gRBAKxxxe8ny1ffO8Q9KkperSn3ZwWuIAKshXgqvrfxkTZUbVNZSYlYt6XI0N G44y3wAH9tHm4K9RpsVi5i0qfg+RhVbQG6DUa3XNcDeqS/ERbl5EdpjUJFAgGMeG0exy ieOaSKkv5bWSRzzh16pLjCOlkFsEQFCBcCenyPNGQgwuUdXtGWFzsGRX8mtP7rpD/Hu4 fRJWb7NovgOR0TWK5npXZE9IB6xzX+bAEdqNUhOtJaS63PD8kqG4jQLl6Flo6qU+yUI3 rMb0DnJKRPI0NphDMkQaN1hND6CD32ZSl9ZXTyAdFcDrsKK2giURXr4q24PSHs5H5MHJ V7Dg== 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=wK1v8xsnajYa78vHlACUs2bIFlSDpib3EjjfYgwpFh4=; b=P3TyGI8//6K5SRpTEYZN0uFii6wAT4SFd7DfAZ0qI09KsxwM2qSGCNni0k4OFCxaPy 9pd9lPpq0XVbn97hj63yQyKx1kNvHvyIvwt8Ar5xIIhNDlWDLOjGaiDjXjHYiksBLcGF xD+lZcWHGFswA02ZUAnr17qM6kaxaJAvflwiL2gMV7IXu8QpQHof2GZSbzzhBvsw/2oC 7rHClLppgOz98r8cu8KC1uMP7XAKOk9KYM26CrVlrVFJd3o6sdOvlFm0Nhcmn5Nc6n/V 2TaKRKtLQL4jMPboQskE0THKZLzYasihsON2ETVa+gP4SuJBp07JIfVBUKj6FG1DteXm poHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MGNeh7UX; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 qx23si5291885ejb.217.2019.10.27.14.24.38; Sun, 27 Oct 2019 14:24:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=MGNeh7UX; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732549AbfJ0VYg (ORCPT + 14 others); Sun, 27 Oct 2019 17:24:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:46228 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732543AbfJ0VYf (ORCPT ); Sun, 27 Oct 2019 17:24:35 -0400 Received: from localhost (100.50.158.77.rev.sfr.net [77.158.50.100]) (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 7E9F421848; Sun, 27 Oct 2019 21:24:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572211474; bh=Xq9KU1AaD3YXp8m1yI2+LyCjoRIwmgbYZasbLkrCLEo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MGNeh7UXgA2MAWBbZBOU22/ctSdXWyf8hUQV9NA3iSjFaCLJ0loNHzg8Vfpki6S2D +AxKKRNppDmR/jZ8RpdPAKTCfn8/zPNEQKKm8/zFWremFbQ+4jetwvawFuEIpEKe92 OMdPJLQ3/yv/rSkn/TzZubTISeYB836GKFiUfU/o= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marc Zyngier , Will Deacon Subject: [PATCH 5.3 163/197] arm64: KVM: Trap VM ops when ARM64_WORKAROUND_CAVIUM_TX2_219_TVM is set Date: Sun, 27 Oct 2019 22:01:21 +0100 Message-Id: <20191027203402.719521287@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191027203351.684916567@linuxfoundation.org> References: <20191027203351.684916567@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Marc Zyngier commit d3ec3a08fa700c8b46abb137dce4e2514a6f9668 upstream. In order to workaround the TX2-219 erratum, it is necessary to trap TTBRx_EL1 accesses to EL2. This is done by setting HCR_EL2.TVM on guest entry, which has the side effect of trapping all the other VM-related sysregs as well. To minimize the overhead, a fast path is used so that we don't have to go all the way back to the main sysreg handling code, unless the rest of the hypervisor expects to see these accesses. Cc: Signed-off-by: Marc Zyngier Signed-off-by: Will Deacon Signed-off-by: Greg Kroah-Hartman --- arch/arm64/include/asm/cpucaps.h | 3 + arch/arm64/kvm/hyp/switch.c | 69 +++++++++++++++++++++++++++++++++++++-- 2 files changed, 69 insertions(+), 3 deletions(-) --- a/arch/arm64/include/asm/cpucaps.h +++ b/arch/arm64/include/asm/cpucaps.h @@ -52,7 +52,8 @@ #define ARM64_HAS_IRQ_PRIO_MASKING 42 #define ARM64_HAS_DCPODP 43 #define ARM64_WORKAROUND_1463225 44 +#define ARM64_WORKAROUND_CAVIUM_TX2_219_TVM 45 -#define ARM64_NCAPS 45 +#define ARM64_NCAPS 46 #endif /* __ASM_CPUCAPS_H */ --- a/arch/arm64/kvm/hyp/switch.c +++ b/arch/arm64/kvm/hyp/switch.c @@ -124,6 +124,9 @@ static void __hyp_text __activate_traps( { u64 hcr = vcpu->arch.hcr_el2; + if (cpus_have_const_cap(ARM64_WORKAROUND_CAVIUM_TX2_219_TVM)) + hcr |= HCR_TVM; + write_sysreg(hcr, hcr_el2); if (cpus_have_const_cap(ARM64_HAS_RAS_EXTN) && (hcr & HCR_VSE)) @@ -174,8 +177,10 @@ static void __hyp_text __deactivate_trap * the crucial bit is "On taking a vSError interrupt, * HCR_EL2.VSE is cleared to 0." */ - if (vcpu->arch.hcr_el2 & HCR_VSE) - vcpu->arch.hcr_el2 = read_sysreg(hcr_el2); + if (vcpu->arch.hcr_el2 & HCR_VSE) { + vcpu->arch.hcr_el2 &= ~HCR_VSE; + vcpu->arch.hcr_el2 |= read_sysreg(hcr_el2) & HCR_VSE; + } if (has_vhe()) deactivate_traps_vhe(); @@ -393,6 +398,61 @@ static bool __hyp_text __hyp_handle_fpsi return true; } +static bool __hyp_text handle_tx2_tvm(struct kvm_vcpu *vcpu) +{ + u32 sysreg = esr_sys64_to_sysreg(kvm_vcpu_get_hsr(vcpu)); + int rt = kvm_vcpu_sys_get_rt(vcpu); + u64 val = vcpu_get_reg(vcpu, rt); + + /* + * The normal sysreg handling code expects to see the traps, + * let's not do anything here. + */ + if (vcpu->arch.hcr_el2 & HCR_TVM) + return false; + + switch (sysreg) { + case SYS_SCTLR_EL1: + write_sysreg_el1(val, SYS_SCTLR); + break; + case SYS_TTBR0_EL1: + write_sysreg_el1(val, SYS_TTBR0); + break; + case SYS_TTBR1_EL1: + write_sysreg_el1(val, SYS_TTBR1); + break; + case SYS_TCR_EL1: + write_sysreg_el1(val, SYS_TCR); + break; + case SYS_ESR_EL1: + write_sysreg_el1(val, SYS_ESR); + break; + case SYS_FAR_EL1: + write_sysreg_el1(val, SYS_FAR); + break; + case SYS_AFSR0_EL1: + write_sysreg_el1(val, SYS_AFSR0); + break; + case SYS_AFSR1_EL1: + write_sysreg_el1(val, SYS_AFSR1); + break; + case SYS_MAIR_EL1: + write_sysreg_el1(val, SYS_MAIR); + break; + case SYS_AMAIR_EL1: + write_sysreg_el1(val, SYS_AMAIR); + break; + case SYS_CONTEXTIDR_EL1: + write_sysreg_el1(val, SYS_CONTEXTIDR); + break; + default: + return false; + } + + __kvm_skip_instr(vcpu); + return true; +} + /* * Return true when we were able to fixup the guest exit and should return to * the guest, false when we should restore the host state and return to the @@ -412,6 +472,11 @@ static bool __hyp_text fixup_guest_exit( if (*exit_code != ARM_EXCEPTION_TRAP) goto exit; + if (cpus_have_const_cap(ARM64_WORKAROUND_CAVIUM_TX2_219_TVM) && + kvm_vcpu_trap_get_class(vcpu) == ESR_ELx_EC_SYS64 && + handle_tx2_tvm(vcpu)) + return true; + /* * We trap the first access to the FP/SIMD to save the host context * and restore the guest context lazily. From patchwork Sun Oct 27 21:01:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 177871 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp2543982ill; Sun, 27 Oct 2019 14:24:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqwA4+jzASjvFQR1qEyZFJQXTetzYriCtKuo0bGCRhzdE8kRWaGzh8iRa9xwefmjfACxryBG X-Received: by 2002:aa7:d858:: with SMTP id f24mr14242543eds.142.1572211484526; Sun, 27 Oct 2019 14:24:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572211484; cv=none; d=google.com; s=arc-20160816; b=GWjSs0UikphBp9hJRzrWpbw+EppHUSujASG/Ntmp02OuB4HL3GWS+AdRJv/jHVvJdm YfXEGEudc6aCW/CPhShe4GIKoO2+6A0xTPIf4OW5+PwTj5NPHb1Khni+vYjDtdVxS+Jm Ic6Rw1NfhlKSmIIPWH5F2hZ6W+gY7EOpL4ltsmxQJT0MtSBlNRpNLKwqgZWTbn1Jn5GC V9Xh47PpOtmTLRJi95Jp01bNQc+NbxivpO+RW/T5p+ohAQUFRPm7IXMv7D2LgfFCSpTn wHQjY1XsadL6kDsXA0yr9b0S6cpbViysXgl3hKllt5M2fMG6UGPRa4y3JI1AvjCbZNgW EN0A== 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=dHkeSffgG/gq2XFtQenAAyxk0aW/bGOWr6qm/I/8JHU=; b=DQxRqTZj+xqPNhWtVFyzc2qHlRbXt5cKW4UWKmga+rfvKtm+VO2V/VuL+cecVQ9A82 dVzE4fOPAp6G/6+PTRa1S5ULaLxDlf6gA/vZs3e+O3gWvzpZQpuEVTXC1kdkaLq5p/9B FN8M86vEpKrqsY8K/C9JK4x/MJSKcZNvwQdzu1KLYn/hWOL3ZpZewkhWOIG9406duYw9 3kcbkJ93PE38ixxJxQWjf3/CLCHySKUTT/MhvOgdIIDqPIDOTLyrqriRM6WsWg1tTboV M/37m8alPvVTQWIvXZ2iuT2A8i5pQz2iPBkXgd0Atx65OOxZTsjqenuBqPvwTlkYQGxP KjOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fw1NjhcB; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 r15si5014787eji.5.2019.10.27.14.24.44; Sun, 27 Oct 2019 14:24:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=fw1NjhcB; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732578AbfJ0VYn (ORCPT + 14 others); Sun, 27 Oct 2019 17:24:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:46388 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732573AbfJ0VYn (ORCPT ); Sun, 27 Oct 2019 17:24:43 -0400 Received: from localhost (100.50.158.77.rev.sfr.net [77.158.50.100]) (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 DC64D21726; Sun, 27 Oct 2019 21:24:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572211482; bh=ZFe86N/EscxSwYeE7npBjjyYeCxyrwEyFWXFXK0cBM0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fw1NjhcBIaVbLPn8GQkBMnH8PBAbdR/hQHw+kAgnYNXZNiuNPrbrtE5sTjz1UpLzl dTb0l6RLUbh1Duq6Z+ZcSRYRpesfWA39A1j1zsqMIIAPiJ7X6Xm/aQ+gTt/Tvw02L4 blGiIxhp+Ln0RUmmSiUryQVRvcbNtfHtVDtgv+jU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marc Zyngier , Will Deacon Subject: [PATCH 5.3 166/197] arm64: Allow CAVIUM_TX2_ERRATUM_219 to be selected Date: Sun, 27 Oct 2019 22:01:24 +0100 Message-Id: <20191027203403.257696914@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191027203351.684916567@linuxfoundation.org> References: <20191027203351.684916567@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Marc Zyngier commit 603afdc9438ac546181e843f807253d75d3dbc45 upstream. Allow the user to select the workaround for TX2-219, and update the silicon-errata.rst file to reflect this. Cc: Signed-off-by: Marc Zyngier Signed-off-by: Will Deacon Signed-off-by: Greg Kroah-Hartman --- Documentation/arm64/silicon-errata.rst | 2 ++ arch/arm64/Kconfig | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) --- a/Documentation/arm64/silicon-errata.rst +++ b/Documentation/arm64/silicon-errata.rst @@ -107,6 +107,8 @@ stable kernels. +----------------+-----------------+-----------------+-----------------------------+ | Cavium | ThunderX2 SMMUv3| #126 | N/A | +----------------+-----------------+-----------------+-----------------------------+ +| Cavium | ThunderX2 Core | #219 | CAVIUM_TX2_ERRATUM_219 | ++----------------+-----------------+-----------------+-----------------------------+ +----------------+-----------------+-----------------+-----------------------------+ | Freescale/NXP | LS2080A/LS1043A | A-008585 | FSL_ERRATUM_A008585 | +----------------+-----------------+-----------------+-----------------------------+ --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -601,6 +601,23 @@ config CAVIUM_ERRATUM_30115 If unsure, say Y. +config CAVIUM_TX2_ERRATUM_219 + bool "Cavium ThunderX2 erratum 219: PRFM between TTBR change and ISB fails" + default y + help + On Cavium ThunderX2, a load, store or prefetch instruction between a + TTBR update and the corresponding context synchronizing operation can + cause a spurious Data Abort to be delivered to any hardware thread in + the CPU core. + + Work around the issue by avoiding the problematic code sequence and + trapping KVM guest TTBRx_EL1 writes to EL2 when SMT is enabled. The + trap handler performs the corresponding register access, skips the + instruction and ensures context synchronization by virtue of the + exception return. + + If unsure, say Y. + config QCOM_FALKOR_ERRATUM_1003 bool "Falkor E1003: Incorrect translation due to ASID change" default y From patchwork Sun Oct 27 21:01:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 177872 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp2544903ill; Sun, 27 Oct 2019 14:26:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqzAks/qpZ9822RfcjSCWtKigIeaZGhhW+e0NJSmr+8xVWlwHa2xlHC2oXFPLpEs2gbsmAuw X-Received: by 2002:a50:eb4d:: with SMTP id z13mr15869713edp.175.1572211560176; Sun, 27 Oct 2019 14:26:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572211560; cv=none; d=google.com; s=arc-20160816; b=Nk7E5lujqZVBgA/KHTgERd5yM74hsIt4WizQd7ZoEllYIw4KRzybD0fxraQszOBEcJ 49ZmWGjBEwHYdJlCFvJthrCGkX4qMyalJTnJgwyFwZV55eRQQ0Wxhq8iPMqtyp0DGXj9 XuDUo2ojnhatzvjYOLGUL3lh9/q1MKSH9CT5btc8pz7PjaSeXm2erGZIuHJah1ONIkGj Spz2mvi1FWuOI3Kg2NEJil6Q9+Q3ZIjs3FEUQjY7ydj9l0Lg1o4bTuiwkUfx5zwxyGnC rVQrM1eub1cXMnbtJ3cVPkqqJWg0iGgU46ToJeezajYa/LI9rugdEvHyakxkPXPdB4pR O97g== 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=rVMnNF7gZBLOgPYDVmBvMyBNhNr5tttq8vTYlmEAFXI=; b=sma1M1wRnO5LQbTZakNyTmZi++UJ/AXCoTCtB9ndcWH7F5/RnbwoN3fdWkst8duV2l Qw9ztA9p1kwzRiX6CVu0B1PM+vn6zLlGIvykSoxUv9Fs2JvIF2VzmMG/jXvEPfq2qB5y s9yD4T6IsVrm9fddjw7U5NaK49lGaDSDPuYEDMxrveOERMpcD9/02VhEEcSzL0VqYjlE xq7g0IUAZyABCJjFPDMeK+yd92S0deukkwXnfP9bys1DQ3YfFdzLAl/CRh+1w7DhuM0x Gq3PBwvdOZW5KGbEWtzQmTYPleYsOrEh9jx+F67TB8G1PVVw3AvEPmHELuSeGGiLXJV8 Ao4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GV3CVZIo; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 j5si6700795edc.195.2019.10.27.14.25.59; Sun, 27 Oct 2019 14:26:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=GV3CVZIo; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732833AbfJ0VZ6 (ORCPT + 14 others); Sun, 27 Oct 2019 17:25:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:47872 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732829AbfJ0VZ5 (ORCPT ); Sun, 27 Oct 2019 17:25:57 -0400 Received: from localhost (100.50.158.77.rev.sfr.net [77.158.50.100]) (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 EFBC821D80; Sun, 27 Oct 2019 21:25:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572211557; bh=Eof4RQ75s/RksPlJ6cpa2YwMVmYN29cmy7xpvAAcZqs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GV3CVZIo+2xgAEO5tTaHslDmsxhIeHK/ViAQWOclEpg0XaC9XgZmgAKVrzIRojJAx qu2UsR8XNZQlh7UrzbCLhso2R2jzWSAaD3CyT/lTXr+v6hKDBNY55tg+eOyYYqHuTZ tj12Vwf8Hq0OdJuVS0Wxdn+iuR1lCLKOmJSbH3ok= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Niklas Cassel , Viresh Kumar Subject: [PATCH 5.3 194/197] opp: of: drop incorrect lockdep_assert_held() Date: Sun, 27 Oct 2019 22:01:52 +0100 Message-Id: <20191027203406.961951101@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191027203351.684916567@linuxfoundation.org> References: <20191027203351.684916567@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Viresh Kumar commit f2edbb6699b0bc6e4f789846b99007200546c6c2 upstream. _find_opp_of_np() doesn't traverse the list of OPP tables but instead just the entries within an OPP table and so only requires to lock the OPP table itself. The lockdep_assert_held() was added there by mistake and isn't really required. Fixes: 5d6d106fa455 ("OPP: Populate required opp tables from "required-opps" property") Cc: v5.0+ # v5.0+ Reported-by: Niklas Cassel Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman --- drivers/opp/of.c | 2 -- 1 file changed, 2 deletions(-) --- a/drivers/opp/of.c +++ b/drivers/opp/of.c @@ -77,8 +77,6 @@ static struct dev_pm_opp *_find_opp_of_n { struct dev_pm_opp *opp; - lockdep_assert_held(&opp_table_lock); - mutex_lock(&opp_table->lock); list_for_each_entry(opp, &opp_table->opp_list, node) {