From patchwork Fri Nov 22 10:26:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 180006 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp40764ilf; Fri, 22 Nov 2019 02:57:15 -0800 (PST) X-Google-Smtp-Source: APXvYqwhj3LEt1m+JKnn6rtbGBZ8dfIZktykUFKDqoa84zW7Hf3qMdU4uPf4tNi6D2ZjouRa14GD X-Received: by 2002:aa7:cf8b:: with SMTP id z11mr277405edx.294.1574420234988; Fri, 22 Nov 2019 02:57:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574420234; cv=none; d=google.com; s=arc-20160816; b=ZYa7zADXJg5pYpt65wnx/DiMKX7+2k2yq1nLmsOSYzq6mn1976z+bAQdjjn/2pPEkj R4DtvYDrbRd3MOjfyyJam6pce1y2YbWEV1ORquPvIwWbx+xV8yqXx+7GLMmHagqLoLue Iwb3JaXN7U26REUmNqqxTQHfK2sJMVWhcSNskauScTlVeJ1kf6gXf9T79pbRZww1k7P/ w+JSuLU8MPEqVSoh3gqOGVafHscVQQLudHOoALd5d8DAVBJlav3tcGuBCt2SGHOnpzld qVVgP7V7QTWpU7yF5Z69+yBg/4qIdeTkbDaikCskm1pHfvEA6vyKsi2ptepNXv18xAJ9 s0Lg== 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=nJgYtyClJ9TWtYdN/zSRsEKpFauF9tYonnjISmxwz5o=; b=GC+koEG1MM3ZTqYNF7ybYmBVKoEwhzDnhplTPJG360OBAAKf9wXwsSL2rj22QBsa0I q1PLsW9QKmL7NrhLhqJs/ETlCxv7IlxC1FiH9d+V5BFFuzWf0KfHDzXyHV0ZcSDAsHLo /8zGp6k1P8jiWuCc3/bO36CG4KVb+lZrVeZSS2XyGUlkYIJy+SnVDBDnZd8SKM/q7+Fv iW11XWub27D3NaInZQXzQ4vYpPjPGZs1RMXcz0LvFySBXQPEO/9dYuyDPYJsmsOb2KZu 8i/vc9xp58kwYd9sIQEGN/6CRRxYb9S/Zs/+YN2UyQTQ33RmVd6Dfp4FltA1hyp1OLAJ W3uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qvnTW3rV; 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 v9si4799408edf.36.2019.11.22.02.57.14; Fri, 22 Nov 2019 02:57:14 -0800 (PST) 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=qvnTW3rV; 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 S1729982AbfKVK5N (ORCPT + 15 others); Fri, 22 Nov 2019 05:57:13 -0500 Received: from mail.kernel.org ([198.145.29.99]:45774 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730405AbfKVK5I (ORCPT ); Fri, 22 Nov 2019 05:57:08 -0500 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 7E0BB2072E; Fri, 22 Nov 2019 10:57:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574420228; bh=5MH6Ax/vtJQFiVkOpwSaJoxC1Gi53ZAWxPTk71j1TkI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qvnTW3rVsN8K3gTCFIV4Ou7Vfpdb0/aeE/5HYqfyuIN359esmjaTYm6FoDyduMQWv XLrESa3F4NYHQRmYlyWBubUtvGKjcSsDDPMn1nltOOUra2KiQsoTtK4auqoJK/Hk3u 4FwYdEpbTmeRNVMyhYj8UL8MsLIDP4HIYhoWoRVQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christoffer Dall , Marc Zyngier , Eric Auger , Suzuki K Poulose , Sasha Levin Subject: [PATCH 4.19 036/220] kvm: arm/arm64: Fix stage2_flush_memslot for 4 level page table Date: Fri, 22 Nov 2019 11:26:41 +0100 Message-Id: <20191122100914.936074739@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122100912.732983531@linuxfoundation.org> References: <20191122100912.732983531@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: Suzuki K Poulose [ Upstream commit d2db7773ba864df6b4e19643dfc54838550d8049 ] So far we have only supported 3 level page table with fixed IPA of 40bits, where PUD is folded. With 4 level page tables, we need to check if the PUD entry is valid or not. Fix stage2_flush_memslot() to do this check, before walking down the table. Acked-by: Christoffer Dall Acked-by: Marc Zyngier Reviewed-by: Eric Auger Signed-off-by: Suzuki K Poulose Signed-off-by: Marc Zyngier Signed-off-by: Sasha Levin --- virt/kvm/arm/mmu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.20.1 diff --git a/virt/kvm/arm/mmu.c b/virt/kvm/arm/mmu.c index 1344557a70852..bf330b493c1e7 100644 --- a/virt/kvm/arm/mmu.c +++ b/virt/kvm/arm/mmu.c @@ -412,7 +412,8 @@ static void stage2_flush_memslot(struct kvm *kvm, pgd = kvm->arch.pgd + stage2_pgd_index(addr); do { next = stage2_pgd_addr_end(addr, end); - stage2_flush_puds(kvm, pgd, addr, next); + if (!stage2_pgd_none(*pgd)) + stage2_flush_puds(kvm, pgd, addr, next); } while (pgd++, addr = next, addr != end); } From patchwork Fri Nov 22 10:27:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 180008 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp42112ilf; Fri, 22 Nov 2019 02:58:33 -0800 (PST) X-Google-Smtp-Source: APXvYqxhHkO9VDR/6OvWfMObJk9PzlciTLctp03u438eUNOoHDYN7F4+ZiMxIwhp5vk5E8TQVhQZ X-Received: by 2002:aa7:d4c6:: with SMTP id t6mr275707edr.228.1574420313388; Fri, 22 Nov 2019 02:58:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574420313; cv=none; d=google.com; s=arc-20160816; b=GuEDoYijReqqHl11l+I1dZYrutQq0jl8SwQsk9ejE3KxNvQEPV2iXrmYa7yl4RdAru z3VRRvcnrw7utO5a0XMrtkipXJulxMvTfseO/hCfvPsZqD6CTs9LXhzUA9zB5D+8MD86 p5VVCdcm6AmL9sk6t/UpVD22mzaVa8wtKqzvajkj1ocmXcga2c+14IoxIBOEOWcp1AUa NXAvKh1SML2JyxsKmJq8vY926xUyDU7Blb86OLkxLwDYmlp9Fj6AgpDdaOrNDUM0KSBZ iG2hVCt7MxfTztuKLWtqkhy0oyOpU9Cu34J7J257SAUphVoj0HRVGv4u5kuTOcpLiutH deGw== 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=fTFJVwsAQiGnsqfQWMvBsSaWEM9oPWMCtmIxjeVInXw=; b=bNfbxFa2XwyAPl5OQ2ssGEGidNLiOkaGbs1C4XFMS7mCPMfM2O6bmwmRGBJbseaYHh ZPHBCi0i5C6SHAZ7Wx8uZI6J9OX3YnZ0rKAH6RLzuXNPYe8CRJqzR8J/1q8Yw5+RGdmY 8s31mY1bpj/gLcaqoxMqN4tyqNupUbyxINBsIBMGWIiVWP1JdbTF+eHiHFH7w0Tr8Jy+ X1rfH32S67FdG8DmXbC6a8/jnsAXzW5LvRMqLtDZdET510iTOKFIkengw2KmTUVT6CFu 1kxpncMS8FefAobZqqmkoZbl6jjsUEZz2k2vBkFKv1PaH1ghRBr65x8W8h4qKVKfOKz8 iuGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="BGZrGv/3"; 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 s13si3864319eju.83.2019.11.22.02.58.33; Fri, 22 Nov 2019 02:58:33 -0800 (PST) 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="BGZrGv/3"; 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 S1730807AbfKVK6c (ORCPT + 15 others); Fri, 22 Nov 2019 05:58:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:48424 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730796AbfKVK61 (ORCPT ); Fri, 22 Nov 2019 05:58:27 -0500 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 4A66E20706; Fri, 22 Nov 2019 10:58:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574420306; bh=FK6rddTPTwK/CMpUf7Wy6HlR4JUMAdjtf1wQY9MQNek=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BGZrGv/3TCIHDw0PhTYp35AoMWdnun9bUHAlgrVBoj+XyV5yRtuhQLUdP6ECxEvsr VZoN1SeBw7GShwf1AZc/oWR8kCrp4EI/r5ieWTmLxmMac9rHcHtW7XFzHbOUU1OnYy eu8uWzAgA0t5YOGVh+SVGU9ZOlFMog9HAsNAMHeI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nishanth Menon , Santosh Shilimkar , Stephen Boyd , Sasha Levin Subject: [PATCH 4.19 061/220] clk: keystone: Enable TISCI clocks if K3_ARCH Date: Fri, 22 Nov 2019 11:27:06 +0100 Message-Id: <20191122100916.481097690@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122100912.732983531@linuxfoundation.org> References: <20191122100912.732983531@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: Nishanth Menon [ Upstream commit 2f149e6e14bcb5e581e49307b54aafcd6f74a74f ] K3_ARCH uses TISCI for clocks as well. Enable the same for the driver support. Signed-off-by: Nishanth Menon Acked-by: Santosh Shilimkar Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin --- drivers/clk/Makefile | 1 + drivers/clk/keystone/Kconfig | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- 2.20.1 diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile index a84c5573cabea..ed344eb717cc4 100644 --- a/drivers/clk/Makefile +++ b/drivers/clk/Makefile @@ -73,6 +73,7 @@ obj-$(CONFIG_ARCH_HISI) += hisilicon/ obj-y += imgtec/ obj-$(CONFIG_ARCH_MXC) += imx/ obj-$(CONFIG_MACH_INGENIC) += ingenic/ +obj-$(CONFIG_ARCH_K3) += keystone/ obj-$(CONFIG_ARCH_KEYSTONE) += keystone/ obj-$(CONFIG_MACH_LOONGSON32) += loongson1/ obj-y += mediatek/ diff --git a/drivers/clk/keystone/Kconfig b/drivers/clk/keystone/Kconfig index 7e9f0176578a6..b04927d06cd10 100644 --- a/drivers/clk/keystone/Kconfig +++ b/drivers/clk/keystone/Kconfig @@ -7,7 +7,7 @@ config COMMON_CLK_KEYSTONE config TI_SCI_CLK tristate "TI System Control Interface clock drivers" - depends on (ARCH_KEYSTONE || COMPILE_TEST) && OF + depends on (ARCH_KEYSTONE || ARCH_K3 || COMPILE_TEST) && OF depends on TI_SCI_PROTOCOL default ARCH_KEYSTONE ---help--- From patchwork Fri Nov 22 10:27:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 180018 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp62331ilf; Fri, 22 Nov 2019 03:13:02 -0800 (PST) X-Google-Smtp-Source: APXvYqwwO6/30M57+j6je4J0Kw06tc4oGLPldmYJ3eYXBbGnfMqyPmCyaNvPc/Jj9y0IWLK2/l1Z X-Received: by 2002:a17:906:6006:: with SMTP id o6mr21217770ejj.51.1574421084685; Fri, 22 Nov 2019 03:11:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574421084; cv=none; d=google.com; s=arc-20160816; b=tQ+ly4jM9Ja+iv8F2njUHsC65QFaGICfl3MUMUD2AIcErc0dCmpb6/DQOZDdut+qFg tNutKLhW02FBDbNdTKsu9ayp6bTwFz3YvwCfWmIqsqVd0AIlZuePl9B4md3y0HYZ8dFu nBxMKl7xtWs94pk+4Dy2sdwkCf8c72Nl89q784WMIIk7nwahSD+uesmcEGARfNHz7O06 dnH/L3kzjrRNAjV7vskWSmxPoV01ASfdcxLNTQsIz7Fvn103zhJAD/8JnHQ5yCdwYVWA vFHaAChv7FaMZtoV9pzq868pZWhajCQUIWT9HebtNAFY1g2ir95hwkMVMKDZx76wVTwB 7DjA== 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=9tw/U3lscs48Y8qlV6AlFm4jR10vWHSZ46J42qbLuZ4=; b=j0PMCrI+CVVCvRsxalilCGI4dGPOVu/YzoKsFCx9WVPDYoJeBst4DGqyQTcHnKrq/d XC4y5TnnVPInfjivyHh2KvvqqAdim82jmpsdbPZnDd0NH8p+VaTZZH2zHg8lcOTaVyYE R6SCgzTDhLcSTdl3IFG0kqEjlG7ONYryYApl3oRO6+ErWDJuRuPI61oAyHMDlqns1cTE GI9+rGedrA5S+Vl9iOwbzujTT4cIPnZkE5m1/shvz8ZdB7McUbavLlWIRefbDD/bfoRy txcQY84YSlhE/KtTFIwn2Z5pjU1/knEiHc16HN5BtdWvo2fRTH706ec82ufjc5aE5vzy gXmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Ht4d1YEx; 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 c24si3924123ejs.366.2019.11.22.03.11.24; Fri, 22 Nov 2019 03:11:24 -0800 (PST) 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=Ht4d1YEx; 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 S1726852AbfKVLLU (ORCPT + 15 others); Fri, 22 Nov 2019 06:11:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:51382 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730195AbfKVK7w (ORCPT ); Fri, 22 Nov 2019 05:59:52 -0500 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 A3CA220706; Fri, 22 Nov 2019 10:59:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574420392; bh=0+tj+ChrT6Rg6cUA04EqBppN5Cmg4xlFOYO8ZyoCzEE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ht4d1YExvPlc3338FQDu2/ZBMfW5mRydT3xsPW4o4pj7qS+6DkcS0eT0hqeL1T18p BVB2fwaO7Npz/IP39LBWvx2rj/YFaEDlWBZNQwim8J8lLoblAZIL2dSIR5h1GFQfwp RSejNR8gfkCQxytNIPfZS0WC/ajYJ78+chZ/YuEU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Viresh Kumar , Sasha Levin Subject: [PATCH 4.19 092/220] OPP: Return error on error from dev_pm_opp_get_opp_count() Date: Fri, 22 Nov 2019 11:27:37 +0100 Message-Id: <20191122100919.284328583@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122100912.732983531@linuxfoundation.org> References: <20191122100912.732983531@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 [ Upstream commit 09f662f95306f3e3d47ab6842bc4b0bb868a80ad ] Return error number instead of 0 on failures. Fixes: a1e8c13600bf ("PM / OPP: "opp-hz" is optional for power domains") Signed-off-by: Viresh Kumar Signed-off-by: Sasha Levin --- drivers/opp/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 diff --git a/drivers/opp/core.c b/drivers/opp/core.c index f3433bf47b100..1e80f9ec1aa6a 100644 --- a/drivers/opp/core.c +++ b/drivers/opp/core.c @@ -313,7 +313,7 @@ int dev_pm_opp_get_opp_count(struct device *dev) count = PTR_ERR(opp_table); dev_dbg(dev, "%s: OPP table not found (%d)\n", __func__, count); - return 0; + return count; } count = _get_opp_count(opp_table); From patchwork Fri Nov 22 10:28: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: 180011 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp46937ilf; Fri, 22 Nov 2019 03:02:07 -0800 (PST) X-Google-Smtp-Source: APXvYqyzc3zEoDYwxj314YikDSHUnSmF3g4k/01qu4YE3XFtXmZBCgO9cqtnlBiMZ9WEf+uOyu8g X-Received: by 2002:aa7:c9c7:: with SMTP id i7mr296073edt.270.1574420527742; Fri, 22 Nov 2019 03:02:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574420527; cv=none; d=google.com; s=arc-20160816; b=NfCo/ZhEpM0M8IIeB6/L8N/dD2Bp/GRlDZABdqEh11dyw2XsAeASJ2l3MMzed2J5Tq GpSEzlqPmJGIpLaA6IsoHCFO0qoyyyhylDd0zlb7NzqG1IjheEOpURSG6Ifdkh75ke+6 3YjQEaZZMTIv7ibzkHq4LKXoscIGJg/QF3khcJl9fvB+5fD4qYqAEldVgLh5/XiFfpqg 01aO06vlZNkIOPsw128yfBGYYr+wvuiChCT1BBrPvRjvcAI/ldAFli/cZIfDa3w8jJoY dELflAwTTitUVlhlgFHoqw5ReqLh1sG4TlNA5nsMZWLzn/53PfrbA0y0nzPblRVgaC8m 8x3g== 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=HJ/Ap/Ol1QfVwHAO8Wnda4Cb2aGLIq3ld34sORxjTeQ=; b=HbJZ/eSluNnUPbx3wIog+khWfpOTQxQ5M8Fd5Igz0Znf9bwioSL97usroaxcRZqhQ8 RzOs0TUYRq4xfTtPMUrBv7vGG+3Ev5RmqWTcNOZoI7dAMn+4J3kPze/ovGt6zC2ING8A sIqrWXjJGrlDJXdp9cl0CTJ4GeH9yhQDgXMinU6Huhl1zXg6D+yMEyJHcftfh9XkDmQ/ x6DkSaPKmPyG8WplO/xN35TiNUr8bZUgS22rHp7shiA86c5zDVRHmigt8dE+QrZ3/yVa tEH08tvWenc7hZNtdia+QcCtDcWwgk0JCHDpup72J1z+a6hqX/tOdtTPKiVaz1HnQSSA Pjqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GcsgfTUg; 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 ce3si4978402edb.441.2019.11.22.03.02.07; Fri, 22 Nov 2019 03:02:07 -0800 (PST) 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=GcsgfTUg; 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 S1731254AbfKVLCE (ORCPT + 15 others); Fri, 22 Nov 2019 06:02:04 -0500 Received: from mail.kernel.org ([198.145.29.99]:55380 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731241AbfKVLCD (ORCPT ); Fri, 22 Nov 2019 06:02:03 -0500 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 245032075B; Fri, 22 Nov 2019 11:02:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574420522; bh=GTMVDaXzuzU2Vu00XLlOwXvvEsFSRCcG11kDpNM1lzw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GcsgfTUgtCiBfmAOtsrhR8N5XHfap5gBMTiFgf+kpWLXIwqpDSqrAIeBqPDazeLKU 5Wuq1DMWgBHjMZfAdH4d6ZtKE3RnOug/pbbGCGTOpNAqvLqPnG6X75cvkKkBnH0aGL 1wxWFCWWBbZhrT00CfoB/Kql+Pv8KGAxJelt86PY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnaud Pouliquen , Suman Anna , Bjorn Andersson , Sasha Levin Subject: [PATCH 4.19 136/220] remoteproc: Check for NULL firmwares in sysfs interface Date: Fri, 22 Nov 2019 11:28:21 +0100 Message-Id: <20191122100922.594417540@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122100912.732983531@linuxfoundation.org> References: <20191122100912.732983531@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: Suman Anna [ Upstream commit faeadbb64094757150a8c2a3175ca418dbdd472c ] The remoteproc framework provides a sysfs file 'firmware' for modifying the firmware image name from userspace. Add an additional check to ensure NULL firmwares are errored out right away, rather than getting a delayed error while requesting a firmware during the start of a remoteproc later on. Tested-by: Arnaud Pouliquen Signed-off-by: Suman Anna Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin --- drivers/remoteproc/remoteproc_sysfs.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.20.1 diff --git a/drivers/remoteproc/remoteproc_sysfs.c b/drivers/remoteproc/remoteproc_sysfs.c index 47be411400e56..3a4c3d7cafca3 100644 --- a/drivers/remoteproc/remoteproc_sysfs.c +++ b/drivers/remoteproc/remoteproc_sysfs.c @@ -48,6 +48,11 @@ static ssize_t firmware_store(struct device *dev, } len = strcspn(buf, "\n"); + if (!len) { + dev_err(dev, "can't provide a NULL firmware\n"); + err = -EINVAL; + goto out; + } p = kstrndup(buf, len, GFP_KERNEL); if (!p) { From patchwork Fri Nov 22 10:29:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 180012 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp50849ilf; Fri, 22 Nov 2019 03:04:50 -0800 (PST) X-Google-Smtp-Source: APXvYqxvEwcf8HfmKUWB81iAuYvl/i2GmwV64Je5/kDBdQAzPUV3Y/TNu4Vx3L3Sortokjx+RAPe X-Received: by 2002:aa7:c987:: with SMTP id c7mr316596edt.232.1574420690674; Fri, 22 Nov 2019 03:04:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574420690; cv=none; d=google.com; s=arc-20160816; b=bH9aUBUkmMF6OWaJWwKySSiCPllXAaT+14LCY6UNqnbDpNzMrgkKxDRnO8KJRVaad+ +iRdLC4wHERdZdteyoFEMhtkpatqb4K1HtRaQmPkIcEGEMUEmM0o6+YOQdNgdp19s+BT 7vZri8bou1FRsnVpscupDZT/ibf/YfSG1PqtXyigJyo/TCuWlDbfpEgSWvHIj2k32XWb /I7nfNbV/Rju3shqtXnLbtzzgXz0/kSVA2FOryu2f7YyJGEOG42MASs48TvJhzM0aBMO JFTWLyDVALImSBTvNqDo0mIgCocxfMRoVvPKXjrjC73amLJUDQTJOJLGDB4/Mql0F8Hd tEeg== 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=m9Kclga+T70M5NXjAzYOQb+s+nsLgsuzSHAo98PFJdE=; b=KHFp5uhp69Vq0n4z3tqqG2j7L5qlsaTd4LECkIJmmljjOAc+lHBz0Xp1TfGS18UVEf kbCVSDrwKkiOPWGiuRMUr/yzRg2iskEN/nmvqs0YoYH4a2/9S8smQ2wU5ac/frU65Zvf 4P79E5fLdlKkUYN5aOar3Q8LuMTUQrq3ObuW0ZBZMFC2cVJlvXvE02KhlMymIW+A/OKl zLwufrGnHQHSfn2QweAxiH4l7qUUMZnvkJNVZmVKtLmwgwmGjcEMPWg8IXjhxDfD93vT T0d1eYga4b6NslSuSFGYwzcnckp8PoqrffoUbl0sQOARRvX1fJw+wqDVDfk2v/PEvkYq k4cA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=c0xnZ6Nd; 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 oj24si650841ejb.177.2019.11.22.03.04.50; Fri, 22 Nov 2019 03:04:50 -0800 (PST) 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=c0xnZ6Nd; 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 S1731614AbfKVLEt (ORCPT + 15 others); Fri, 22 Nov 2019 06:04:49 -0500 Received: from mail.kernel.org ([198.145.29.99]:60022 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731592AbfKVLEs (ORCPT ); Fri, 22 Nov 2019 06:04:48 -0500 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 91E7A207FC; Fri, 22 Nov 2019 11:04:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574420688; bh=B9AoKmD1xmcv4P7KtG1+SP2sJt/qlkpf6OAJSMxaA8E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c0xnZ6Nd1JBitPGNQwRr1EWtD2d59mw+1i/trRhj3VjX3QWltGKXPSsQbhYYfZo1N 7tZxrZv1GwZYWLnbnGzzK59P+8PAj3/4fFYpBB8isvvUC/I3oXPUQwsnSay8DwGNQh QugeZlkGkzp2qsZeM3lzn738CHJCOtJFyOdkjBns= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Linus Walleij , Sasha Levin Subject: [PATCH 4.19 192/220] pinctrl: gemini: Mask and set properly Date: Fri, 22 Nov 2019 11:29:17 +0100 Message-Id: <20191122100927.895075849@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122100912.732983531@linuxfoundation.org> References: <20191122100912.732983531@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: Linus Walleij [ Upstream commit d17f477c5bc6b4a5dd9f51ae263870da132a8e89 ] The code was written under the assumption that the regmap_update_bits() would mask the bits in the mask and set the bits in the value. It missed the points that it will not set bits in the value unless these are also masked in the mask. Set value bits that are not in the mask will simply be ignored. Fixes: 06351d133dea ("pinctrl: add a Gemini SoC pin controller") Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- drivers/pinctrl/pinctrl-gemini.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.20.1 diff --git a/drivers/pinctrl/pinctrl-gemini.c b/drivers/pinctrl/pinctrl-gemini.c index fa7d998e1d5a8..1e484a36ff07e 100644 --- a/drivers/pinctrl/pinctrl-gemini.c +++ b/drivers/pinctrl/pinctrl-gemini.c @@ -2184,7 +2184,8 @@ static int gemini_pmx_set_mux(struct pinctrl_dev *pctldev, func->name, grp->name); regmap_read(pmx->map, GLOBAL_MISC_CTRL, &before); - regmap_update_bits(pmx->map, GLOBAL_MISC_CTRL, grp->mask, + regmap_update_bits(pmx->map, GLOBAL_MISC_CTRL, + grp->mask | grp->value, grp->value); regmap_read(pmx->map, GLOBAL_MISC_CTRL, &after); From patchwork Fri Nov 22 10:29:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 180013 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp51012ilf; Fri, 22 Nov 2019 03:04:57 -0800 (PST) X-Google-Smtp-Source: APXvYqw1o1xB0MhjuEtIg9In5cI7p2qoMsie54LPidy2FnEfs0Dmg30wAlXBGK1IR36Nu3rC9ocg X-Received: by 2002:a05:6402:3cf:: with SMTP id t15mr312802edw.21.1574420697587; Fri, 22 Nov 2019 03:04:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574420697; cv=none; d=google.com; s=arc-20160816; b=rtB6Vm7nVQgg5dcliO+Gyw0W4YJpAZTAvu+r8HZ2vMrbTCekmA2SBQTl2shdS++N7p MgdrHqKGZ7N9ZMjhgBrhsQ16J028H0jRqaVPnV3XQ9h5akPKFJStP9mSriKpcxdufpH8 qZ5rvw4EYOTtsYHCkK8MrMU8L1ibfJB1Pb+iJQJDYtrRqx/gGqLzGcu6uAWPJ5b4Tro5 F3CgTdB8+s16kKyPFxfOnw5Qq8EDFpdz9yHRhHLaJFy9A3JNpeiV5hxJ14sLTXFyhQNG LzvhrL9ku7JMscciRpnQJRsPCGc7nPQF2sjJR6x65zauH6vJuV56vytVGpoJZkJzI1RP ekhQ== 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=QtHw2OKiLuScLgg45ofsvz8NLHuarOWvZ0R7KLBZk8w=; b=nKFjo7GuThQu72dpNStlsEKJBEBTfEu8JsNVOURepRAgp4KZHUHPeiwgPpaHpuEHy0 bYsQeMiQxCpMjFDel+IUNM5Frt17RMMdu5VspwbVCCMYZFsyOfYKvUmIOqo9yw2UGpFN nK5f6rVYjp/wtUZPE9TFJHDMmVpItPXlE/IFkiYH+4Ry/HbwqryTMyn2IaYtKBFtC+yW mNrj8HBl2XZFYeai3IlgT+EhzevH1+Pc9cmikX/zrUnhVa4thHkyPb+NcUYeZJVTpA/N V4tDNW1zIfhD/b8S908B+ahWo3KYWkhd+TVVEGSoFtF8wCNd3O7McOcyBLM+1KJxOahK wQGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=j5YJmY1A; 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 v11si672188eja.168.2019.11.22.03.04.57; Fri, 22 Nov 2019 03:04:57 -0800 (PST) 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=j5YJmY1A; 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 S1730850AbfKVLEz (ORCPT + 15 others); Fri, 22 Nov 2019 06:04:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:60236 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731623AbfKVLEy (ORCPT ); Fri, 22 Nov 2019 06:04:54 -0500 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 551F12075E; Fri, 22 Nov 2019 11:04:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574420693; bh=3vv9mKqjlqzcNlPk2/3YHwP3R4O5k91q1kEKE6OVLRc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=j5YJmY1ACCrAbzYe6IOfpJxaiRxNsiEKYbN/7Q7uRAgTGklB7EtFBQVGQiIEhZXiX ViB/lkjP/xaQRMSkp6D6yVlLPrs2V9Ht26Htu+MTaoNn5kguh9j9uKFtWDQrZ1NaBU /0vEpdGdk7RkVojlaGQsW9vDraZFZbFOfhsvHX9s= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Timothy E Baldwin , Eugene Syromyatnikov , Kees Cook , Russell King , Sasha Levin Subject: [PATCH 4.19 194/220] ARM: 8802/1: Call syscall_trace_exit even when system call skipped Date: Fri, 22 Nov 2019 11:29:19 +0100 Message-Id: <20191122100927.998475274@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122100912.732983531@linuxfoundation.org> References: <20191122100912.732983531@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: Timothy E Baldwin [ Upstream commit f18aef742c8fbd68e280dff0a63ba0ca6ee8ad85 ] On at least x86 and ARM64, and as documented in the ptrace man page a skipped system call will still cause a syscall exit ptrace stop. Previous to this commit 32-bit ARM did not, resulting in strace being confused when seccomp skips system calls. This change also impacts programs that use ptrace to skip system calls. Fixes: ad75b51459ae ("ARM: 7579/1: arch/allow a scno of -1 to not cause a SIGILL") Signed-off-by: Timothy E Baldwin Signed-off-by: Eugene Syromyatnikov Reviewed-by: Kees Cook Tested-by: Kees Cook Tested-by: Eugene Syromyatnikov Signed-off-by: Russell King Signed-off-by: Sasha Levin --- arch/arm/kernel/entry-common.S | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) -- 2.20.1 diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S index 746565a876dcd..0465d65d23de5 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S @@ -296,16 +296,15 @@ __sys_trace: cmp scno, #-1 @ skip the syscall? bne 2b add sp, sp, #S_OFF @ restore stack - b ret_slow_syscall -__sys_trace_return: - str r0, [sp, #S_R0 + S_OFF]! @ save returned r0 +__sys_trace_return_nosave: + enable_irq_notrace mov r0, sp bl syscall_trace_exit b ret_slow_syscall -__sys_trace_return_nosave: - enable_irq_notrace +__sys_trace_return: + str r0, [sp, #S_R0 + S_OFF]! @ save returned r0 mov r0, sp bl syscall_trace_exit b ret_slow_syscall From patchwork Fri Nov 22 10:29:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 180014 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp51309ilf; Fri, 22 Nov 2019 03:05:09 -0800 (PST) X-Google-Smtp-Source: APXvYqxGp4KD9H3wJgMx+CFEajae6hqGaUoT4tEjRF0awVFtA9/1TokGFt6xi8ceIL5PbqUeLZtr X-Received: by 2002:aa7:d4d8:: with SMTP id t24mr321098edr.40.1574420709370; Fri, 22 Nov 2019 03:05:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574420709; cv=none; d=google.com; s=arc-20160816; b=p6x5bb+0UJXDhGJwi+zj5Z2fV6QsAoCoIEAJfpdY/6E2nNznBvJsYLD5APu93ZnTtS nNL6O/4BKhCZ5BMmaQg2Cd9ujzJ2aTUU6/J3kT0VmGUdoeP+JzLcXbHcgw5kIJeOrszr OZq8YlVhe+aZv2kuO5LgAaYoRWm+mqu7TvPnYx2yv9FjBS3zogqIGivM+4/M2RULqIX8 VgDwPpG3XK/c+j+6EbnE4kKagK7Cccej7A9UufkBQUL2zLEhd206loBj8hgYqJ0ivNtZ 3ru5C53QG7cukiVfxLUAimC7WxN1I7WtFHCPFcnPRjR4X+RaTZxwP0M8HKS6FWue4UxK I3lQ== 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=z9wOy+m8aLBgqztb3pYVxIcK2OKHsHEepjqhgQk3MQA=; b=Tva+hO++WSdNdag8j6aL4QW97bPnRRLOep4fRe9aPOy/tQZYgFyI73tadRxAlt4rwn pT4r3deMXTUmqmCkLiF5wysi+OJ5rq4gniLS9/uKXQ5osWBScPZ5hAI2EF5OGoiqzflm 0S4/WUd5S3oM26a+Qzl/85+01YYFWQ4sVddtVZWb074A9DL0peZ+4+g/hiDB7SqkbXEV QoiXMwHTTEg0vaIuOmQaKuqHWt2Sqcxt9rE3FYoRmLbXP6zDXXVakn1idwwwVaaCFAvE xx5+YGCVtnKxYEzDg9YAD0fCif1CgsAh/aVgdm3KF87mO9tGAFsiuyUopoiyHppsJ5+6 r2MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QUo1x5A+; 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 m1si4609426ejl.61.2019.11.22.03.05.09; Fri, 22 Nov 2019 03:05:09 -0800 (PST) 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=QUo1x5A+; 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 S1730764AbfKVLFH (ORCPT + 15 others); Fri, 22 Nov 2019 06:05:07 -0500 Received: from mail.kernel.org ([198.145.29.99]:60594 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731182AbfKVLFH (ORCPT ); Fri, 22 Nov 2019 06:05:07 -0500 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 4AB4E2070E; Fri, 22 Nov 2019 11:05:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574420705; bh=0heLWYa1fdiA1uuMdun/a5Epn3QCmKknV7kBb7keeDo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QUo1x5A+zpBUzBP/B5Hbk2SxdAnR2noKgmxVnYzbMib8Oif7M3UzE2UaHXCVB1Qgw V8BX5QsVw9TdArQ9GsTMZUe/6AMoMsGrJrmFSqhLUq5yLkP3ue0Yykm6Iy8IB9jA0S VO4/YQsIdPoZPgH5JkroP4/bWK25eTZHeKGu9go8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Linus Walleij , Sasha Levin Subject: [PATCH 4.19 197/220] pinctrl: gemini: Fix up TVC clock group Date: Fri, 22 Nov 2019 11:29:22 +0100 Message-Id: <20191122100928.153411963@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122100912.732983531@linuxfoundation.org> References: <20191122100912.732983531@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: Linus Walleij [ Upstream commit a85c928f6a7856a09e47d9b37faa3407c7ac6a8e ] The previous fix made the TVC clock get muxed in on the D-Link DIR-685 instead of giving nagging warnings of this not working. Not good. We didn't want that, as it breaks video. Create a specific group for the TVC CLK, and break out a specific GPIO group for it on the SL3516 so we can use that line as GPIO if we don't need the TVC CLK. Fixes: d17f477c5bc6 ("pinctrl: gemini: Mask and set properly") Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- drivers/pinctrl/pinctrl-gemini.c | 44 ++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 8 deletions(-) -- 2.20.1 diff --git a/drivers/pinctrl/pinctrl-gemini.c b/drivers/pinctrl/pinctrl-gemini.c index 1e484a36ff07e..3535f98418615 100644 --- a/drivers/pinctrl/pinctrl-gemini.c +++ b/drivers/pinctrl/pinctrl-gemini.c @@ -591,13 +591,16 @@ static const unsigned int tvc_3512_pins[] = { 319, /* TVC_DATA[1] */ 301, /* TVC_DATA[2] */ 283, /* TVC_DATA[3] */ - 265, /* TVC_CLK */ 320, /* TVC_DATA[4] */ 302, /* TVC_DATA[5] */ 284, /* TVC_DATA[6] */ 266, /* TVC_DATA[7] */ }; +static const unsigned int tvc_clk_3512_pins[] = { + 265, /* TVC_CLK */ +}; + /* NAND flash pins */ static const unsigned int nflash_3512_pins[] = { 199, 200, 201, 202, 216, 217, 218, 219, 220, 234, 235, 236, 237, 252, @@ -629,7 +632,7 @@ static const unsigned int pflash_3512_pins_extended[] = { /* Serial flash pins CE0, CE1, DI, DO, CK */ static const unsigned int sflash_3512_pins[] = { 230, 231, 232, 233, 211 }; -/* The GPIO0A (0) pin overlap with TVC and extended parallel flash */ +/* The GPIO0A (0) pin overlap with TVC CLK and extended parallel flash */ static const unsigned int gpio0a_3512_pins[] = { 265 }; /* The GPIO0B (1-4) pins overlap with TVC and ICE */ @@ -823,7 +826,13 @@ static const struct gemini_pin_group gemini_3512_pin_groups[] = { .num_pins = ARRAY_SIZE(tvc_3512_pins), /* Conflict with character LCD and ICE */ .mask = LCD_PADS_ENABLE, - .value = TVC_PADS_ENABLE | TVC_CLK_PAD_ENABLE, + .value = TVC_PADS_ENABLE, + }, + { + .name = "tvcclkgrp", + .pins = tvc_clk_3512_pins, + .num_pins = ARRAY_SIZE(tvc_clk_3512_pins), + .value = TVC_CLK_PAD_ENABLE, }, /* * The construction is done such that it is possible to use a serial @@ -860,8 +869,8 @@ static const struct gemini_pin_group gemini_3512_pin_groups[] = { .name = "gpio0agrp", .pins = gpio0a_3512_pins, .num_pins = ARRAY_SIZE(gpio0a_3512_pins), - /* Conflict with TVC */ - .mask = TVC_PADS_ENABLE, + /* Conflict with TVC CLK */ + .mask = TVC_CLK_PAD_ENABLE, }, { .name = "gpio0bgrp", @@ -1531,13 +1540,16 @@ static const unsigned int tvc_3516_pins[] = { 311, /* TVC_DATA[1] */ 394, /* TVC_DATA[2] */ 374, /* TVC_DATA[3] */ - 333, /* TVC_CLK */ 354, /* TVC_DATA[4] */ 395, /* TVC_DATA[5] */ 312, /* TVC_DATA[6] */ 334, /* TVC_DATA[7] */ }; +static const unsigned int tvc_clk_3516_pins[] = { + 333, /* TVC_CLK */ +}; + /* NAND flash pins */ static const unsigned int nflash_3516_pins[] = { 243, 260, 261, 224, 280, 262, 281, 264, 300, 263, 282, 301, 320, 283, @@ -1570,7 +1582,7 @@ static const unsigned int pflash_3516_pins_extended[] = { static const unsigned int sflash_3516_pins[] = { 296, 338, 295, 359, 339 }; /* The GPIO0A (0-4) pins overlap with TVC and extended parallel flash */ -static const unsigned int gpio0a_3516_pins[] = { 333, 354, 395, 312, 334 }; +static const unsigned int gpio0a_3516_pins[] = { 354, 395, 312, 334 }; /* The GPIO0B (5-7) pins overlap with ICE */ static const unsigned int gpio0b_3516_pins[] = { 375, 396, 376 }; @@ -1602,6 +1614,9 @@ static const unsigned int gpio0j_3516_pins[] = { 359, 339 }; /* The GPIO0K (30,31) pins overlap with NAND flash */ static const unsigned int gpio0k_3516_pins[] = { 275, 298 }; +/* The GPIO0L (0) pins overlap with TVC_CLK */ +static const unsigned int gpio0l_3516_pins[] = { 333 }; + /* The GPIO1A (0-4) pins that overlap with IDE and parallel flash */ static const unsigned int gpio1a_3516_pins[] = { 221, 200, 222, 201, 220 }; @@ -1761,7 +1776,13 @@ static const struct gemini_pin_group gemini_3516_pin_groups[] = { .num_pins = ARRAY_SIZE(tvc_3516_pins), /* Conflict with character LCD */ .mask = LCD_PADS_ENABLE, - .value = TVC_PADS_ENABLE | TVC_CLK_PAD_ENABLE, + .value = TVC_PADS_ENABLE, + }, + { + .name = "tvcclkgrp", + .pins = tvc_clk_3516_pins, + .num_pins = ARRAY_SIZE(tvc_clk_3516_pins), + .value = TVC_CLK_PAD_ENABLE, }, /* * The construction is done such that it is possible to use a serial @@ -1872,6 +1893,13 @@ static const struct gemini_pin_group gemini_3516_pin_groups[] = { /* Conflict with parallel and NAND flash */ .value = PFLASH_PADS_DISABLE | NAND_PADS_DISABLE, }, + { + .name = "gpio0lgrp", + .pins = gpio0l_3516_pins, + .num_pins = ARRAY_SIZE(gpio0l_3516_pins), + /* Conflict with TVE CLK */ + .mask = TVC_CLK_PAD_ENABLE, + }, { .name = "gpio1agrp", .pins = gpio1a_3516_pins,