From patchwork Thu Oct 3 15:50:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "gregkh@linuxfoundation.org" X-Patchwork-Id: 175145 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp570497ill; Thu, 3 Oct 2019 09:40:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqzSUHc/5FEdByLrG1khcSaim5AqQvbbz1cPlnEFhcBOYqzGAtn4Z+BVZTEWPHrvNEfGHCWT X-Received: by 2002:a17:906:b804:: with SMTP id dv4mr8388259ejb.243.1570120832154; Thu, 03 Oct 2019 09:40:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570120832; cv=none; d=google.com; s=arc-20160816; b=LjRis9vIseZ2ZUwFJF8oVObfGeQLMhfY6bNTeBOo/h7C9ywrpxTXdAoha6P82u0a3N oqiuycmHxfEghUTC4FTutEQGiW22zyyM0wAj8jv10wSkDt8PJwD0FnyBBkZOTFp8h4lQ nj+fzJ23Y+beAuaz5E1yYbKM1K2MDhIbXr7obTKcK2SfiQCkaXRLt8kbSqVdqqaA19UO YHhEKRe5TXoqH+WwC5jFK3DTE+Z0nbLhOo4hZWvFjBbXcnT5yVR4vCkp3jZwupQe8vpE tT2R+er9uwxycqMC/5wACOBmnGqxxoeCx9BeUsZsqnWcfLtPkB11/vOxbSkATDfdjSuH FPtg== 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=QHVLwMC1p3AYP9xxLitC8cEk9nOs4UkOszNh6XmzQvo=; b=suM+k9Um5pVpC/Q9PoLx58ZFyvmDoquymX+7hOPVB7rm7RjGSODHCPPP0IMtJb9Ill 7Rc+GV/R+IIEv80u9KfjD4XEoW8Of+29QLuccCzPP9/HWF9ZhE1WP0L6UAWuh7Pbtfjt lUEOstIDew3wOItogV3yIviOM8EKWlEj5FCGE5JB2ij1tU7LBA/CUjldRGG2L0HMf4BP w8in3Pj9G3X+lcl26p54JhQd6D4Ff1B0cqgqHLNZ2W95IHTQ9vzpHO9kg5823wTA5ahR GnJOpbCQIC/JAW8sFqbWuJoABDlOQucu7F271gK/xoeza57Gk1uCIMWRyouq6Skcd08I bvLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=uA+N0BME; 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 t37si2018033edd.25.2019.10.03.09.40.31; Thu, 03 Oct 2019 09:40:32 -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=uA+N0BME; 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 S2404425AbfJCQk2 (ORCPT + 14 others); Thu, 3 Oct 2019 12:40:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:50650 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404204AbfJCQk1 (ORCPT ); Thu, 3 Oct 2019 12:40:27 -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 AD71A2070B; Thu, 3 Oct 2019 16:40:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570120827; bh=48xQrCMOZWQY0GMUtiT7ORhyY7JKh36Uou8DfkPsZ14=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uA+N0BMEI+oCWvxP7MxzRTBkzKKKIBPRDXrqvKOTdC/2W6ydojmeGAbVtpDT4eNk6 j57vyf2JF6/hnYbCkL52Q2LLZ5UjIWkjAM7GCuk87gXVuaN64dH1qoSNIcHvr/LYXz 9Pn8ZlVpKjlaQ3/vEXGgIUYU3Pk5yD5XwzDn7ngQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Sean Young , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.3 052/344] media: dib0700: fix link error for dibx000_i2c_set_speed Date: Thu, 3 Oct 2019 17:50:17 +0200 Message-Id: <20191003154545.281559676@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154540.062170222@linuxfoundation.org> References: <20191003154540.062170222@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: Arnd Bergmann [ Upstream commit 765bb8610d305ee488b35d07e2a04ae52fb2df9c ] When CONFIG_DVB_DIB9000 is disabled, we can still compile code that now fails to link against dibx000_i2c_set_speed: drivers/media/usb/dvb-usb/dib0700_devices.o: In function `dib01x0_pmu_update.constprop.7': dib0700_devices.c:(.text.unlikely+0x1c9c): undefined reference to `dibx000_i2c_set_speed' The call sites are both through dib01x0_pmu_update(), which gets passed an 'i2c' pointer from dib9000_get_i2c_master(), which has returned NULL. Checking this pointer seems to be a good idea anyway, and it avoids the link failure in most cases. Sean Young found another case that is not fixed by that, where certain gcc versions leave an unused function in place that causes the link error, but adding an explict IS_ENABLED() check also solves this. Fixes: b7f54910ce01 ("V4L/DVB (4647): Added module for DiB0700 based devices") Signed-off-by: Arnd Bergmann Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/usb/dvb-usb/dib0700_devices.c | 8 ++++++++ 1 file changed, 8 insertions(+) -- 2.20.1 diff --git a/drivers/media/usb/dvb-usb/dib0700_devices.c b/drivers/media/usb/dvb-usb/dib0700_devices.c index 66d685065e065..ab7a100ec84fe 100644 --- a/drivers/media/usb/dvb-usb/dib0700_devices.c +++ b/drivers/media/usb/dvb-usb/dib0700_devices.c @@ -2439,9 +2439,13 @@ static int dib9090_tuner_attach(struct dvb_usb_adapter *adap) 8, 0x0486, }; + if (!IS_ENABLED(CONFIG_DVB_DIB9000)) + return -ENODEV; if (dvb_attach(dib0090_fw_register, adap->fe_adap[0].fe, i2c, &dib9090_dib0090_config) == NULL) return -ENODEV; i2c = dib9000_get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_GPIO_1_2, 0); + if (!i2c) + return -ENODEV; if (dib01x0_pmu_update(i2c, data_dib190, 10) != 0) return -ENODEV; dib0700_set_i2c_speed(adap->dev, 1500); @@ -2517,10 +2521,14 @@ static int nim9090md_tuner_attach(struct dvb_usb_adapter *adap) 0, 0x00ef, 8, 0x0406, }; + if (!IS_ENABLED(CONFIG_DVB_DIB9000)) + return -ENODEV; i2c = dib9000_get_tuner_interface(adap->fe_adap[0].fe); if (dvb_attach(dib0090_fw_register, adap->fe_adap[0].fe, i2c, &nim9090md_dib0090_config[0]) == NULL) return -ENODEV; i2c = dib9000_get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_GPIO_1_2, 0); + if (!i2c) + return -ENODEV; if (dib01x0_pmu_update(i2c, data_dib190, 10) < 0) return -ENODEV; From patchwork Thu Oct 3 15:50:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "gregkh@linuxfoundation.org" X-Patchwork-Id: 175147 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp573351ill; Thu, 3 Oct 2019 09:43:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqwLkMfWtgIpHWI2iSfKMomkzWGHq7W5R46NnvVyqxQyun03eZO7KyymD9/oOzn27AyCbzeh X-Received: by 2002:a17:906:244a:: with SMTP id a10mr8559955ejb.137.1570120981566; Thu, 03 Oct 2019 09:43:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570120981; cv=none; d=google.com; s=arc-20160816; b=MomsZyNfY7SbAHodyDNjtwc3TT1OwBJvDeLOlgRx29ZSvyLVl3jvTXi1csNzmlGPYm VSlI9mCKgTOr5eUbh9ezdPqWYchtE/U78X35uUtVi5VHOvjA7lXjvncKeWxEcolMxxRJ nDOzUTXTzFnQx3TYY32PiZMuJmNEvQQQD7XZF/RtQFlSLKtR4rXIRlZ7iW3XqoD9Xd21 l2nucTE3IKEFa70E1aKuK1yZenTmOIkg5FQk+Jh71O5rPObcjZFJFWz9lTSm6ZSlojo6 B+BtGsqFspcghUJegixQhrmN6lReyzmJKnhK85FrEvblYaHl6KkCAi0HUqWGknfU/NKX UqfQ== 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=zV6NLSZp31BqJog2/3djubuHBBwyDCWf+zdP/R/Ab8M=; b=Mf1kyx5L2kWeoBqfaX+v8V5yDS+CAf4eW+aL18O3GQIJlng0jFd+zv/Qp3cn6CqaUU AXmAWY64HxFCMwTcu6KHnQ+/j8Hru5H/Za6WsG/McH6LDYVj4AGXmkKsnTIp549HGelh 4+eT3bCCzWaWGggC+kyfx2QBbXRhfqc1mFgL9NDD4m7gzW+UhE/V1LTdw0QlFEMcDUtZ lWOFbyLlVeDN03mJIaERLci6bocapU/Y+CaoRVbB404/gezWWyU2+3R3XIpGsS4C4FDl 8dvRZ8ZD0dD7spl3yrA9APRmkqVU3FFdDSNsSMct7CtHYyopVspdhuc9rcP/PwsjUYm3 ejnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hUC2Lde2; 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 k17si1562556ejz.227.2019.10.03.09.43.01; Thu, 03 Oct 2019 09:43:01 -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=hUC2Lde2; 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 S2392696AbfJCQnA (ORCPT + 14 others); Thu, 3 Oct 2019 12:43:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:54216 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405131AbfJCQm6 (ORCPT ); Thu, 3 Oct 2019 12:42:58 -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 80EFC206BB; Thu, 3 Oct 2019 16:42:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570120977; bh=5+4+EyeHu/Ui4dWZQbgh+L+4DfByRKwtCBXnWaSYN9Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hUC2Lde2urY667cK7p0sCULAvsUvRe3WD9YzSxwYfQptoOJbzvEYv5exJrkIfML2R Gtc96NTwhu0uiFzhPPhypgQ/1iQWGuh9L/PHBRCRbDOu1p6c5iv4TQi72F+TZc4fF7 BbDfMXZ6wasHjG6QYyPhpGVhb+c67lQLD1HNZ3Eo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Robert Richter , Borislav Petkov , "linux-edac@vger.kernel.org" , James Morse , Mauro Carvalho Chehab , Tony Luck , Sasha Levin Subject: [PATCH 5.3 072/344] EDAC/mc: Fix grain_bits calculation Date: Thu, 3 Oct 2019 17:50:37 +0200 Message-Id: <20191003154547.235446511@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154540.062170222@linuxfoundation.org> References: <20191003154540.062170222@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: Robert Richter [ Upstream commit 3724ace582d9f675134985727fd5e9811f23c059 ] The grain in EDAC is defined as "minimum granularity for an error report, in bytes". The following calculation of the grain_bits in edac_mc is wrong: grain_bits = fls_long(e->grain) + 1; Where grain_bits is defined as: grain = 1 << grain_bits Example: grain = 8 # 64 bit (8 bytes) grain_bits = fls_long(8) + 1 grain_bits = 4 + 1 = 5 grain = 1 << grain_bits grain = 1 << 5 = 32 Replace it with the correct calculation: grain_bits = fls_long(e->grain - 1); The example gives now: grain_bits = fls_long(8 - 1) grain_bits = fls_long(7) grain_bits = 3 grain = 1 << 3 = 8 Also, check if the hardware reports a reasonable grain != 0 and fallback with a warning to 1 byte granularity otherwise. [ bp: massage a bit. ] Signed-off-by: Robert Richter Signed-off-by: Borislav Petkov Cc: "linux-edac@vger.kernel.org" Cc: James Morse Cc: Mauro Carvalho Chehab Cc: Tony Luck Link: https://lkml.kernel.org/r/20190624150758.6695-2-rrichter@marvell.com Signed-off-by: Sasha Levin --- drivers/edac/edac_mc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- 2.20.1 diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c index 64922c8fa7e3b..d899d86897d06 100644 --- a/drivers/edac/edac_mc.c +++ b/drivers/edac/edac_mc.c @@ -1235,9 +1235,13 @@ void edac_mc_handle_error(const enum hw_event_mc_err_type type, if (p > e->location) *(p - 1) = '\0'; - /* Report the error via the trace interface */ - grain_bits = fls_long(e->grain) + 1; + /* Sanity-check driver-supplied grain value. */ + if (WARN_ON_ONCE(!e->grain)) + e->grain = 1; + + grain_bits = fls_long(e->grain - 1); + /* Report the error via the trace interface */ if (IS_ENABLED(CONFIG_RAS)) trace_mc_event(type, e->msg, e->label, e->error_count, mci->mc_idx, e->top_layer, e->mid_layer, From patchwork Thu Oct 3 15:51:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "gregkh@linuxfoundation.org" X-Patchwork-Id: 175149 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp573500ill; Thu, 3 Oct 2019 09:43:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqzeBXxq501lTJheyUJwQThOcBXSCcEjv08FdPOxbsTEhk3yHL1H/IOHzboMnAHXYj/Kn8o5 X-Received: by 2002:a17:906:8054:: with SMTP id x20mr1666702ejw.65.1570120990623; Thu, 03 Oct 2019 09:43:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570120990; cv=none; d=google.com; s=arc-20160816; b=iv6CeXsVRe5VPeCTRiQ4sI5i7NRIvo0JR+qjn3T/dlrRDNFaMhA0rTRSbT4OQON7Mk Et58gypPtm5qkQlTDjxiozZuh3G/w1RE2X5sDC7VEDm5cJBAqWCumVlkwGQwTDsoJlZd 0EnhprVHhUsAfM1kvZsY3JJO1InwiXMrIpCA8qkD8PwhH0PVi2uK6bQH0MfFgscDr/hA 37sUFOIjneKYJBn3KgNuCBg8CemygbiItexAin/s3oA4qRJy6D/vA2TIyR5NHuFTMlMT xh65Lv4TMnSh3kr7+wqVZ/sJqnDGzpNjhPRI1omva/4Y9A7y0kMmu1QYdZ7UhQD4dlJ5 E0jg== 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=819/zZRTh8U71bIwoAdqwT6T0Ho1f1Lq8jZd+HlLp/U=; b=jbyGVnAwafPT0pUSJ+kMCc82ebvWA/YxUlUTzg4DD0BJTbT1/y9f7K8X4/agaiaNMA GXDYQdfzYHXN1d1P8HszqwyON+lu639oHnibF0PMoeSiWUr3xEGdhQq04o5sqFkeR5n9 0cbfAfF+dWXA9RahgYOBUwQTcvsWgH3RjRb5CdPE16zR/VBMaoNkm89HB3KGmm7F/ojF SHSi96a/hp8y40+AC3beuNNIqkWWduV1EzABqdM1KSJpRJ6pDAyaBDEKlLWhO4dAcjV+ yIUk3KYHL/1cudquXBeKu7D3slnUVw1NZZ4m3KbfcJmzd8WYSMc1JynbBPNjpZ1r/9tf QEpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=OQ8vi4L4; 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 f2si1582235ejq.395.2019.10.03.09.43.10; Thu, 03 Oct 2019 09:43:10 -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=OQ8vi4L4; 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 S2391597AbfJCQnJ (ORCPT + 14 others); Thu, 3 Oct 2019 12:43:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:54422 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405111AbfJCQnI (ORCPT ); Thu, 3 Oct 2019 12:43:08 -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 1D7C32070B; Thu, 3 Oct 2019 16:43:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570120987; bh=dmdbnGlcQ67LSvX15BeOkemg/oVzkc782wV47LPJXig=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OQ8vi4L4Q3za7fyzVdZ8G868eigjkDhlDxL4s9klNb+R9wfLwbAVcPp3mXKAPBadX zHNN94E07VT/YlORpM9hs8YMlpni0O9Gl5w61RcTUOMYjIJfVCjcVWaj6Y4ChM/hdS F6/M94bTSgSOZPpKh4VMxHgjn31Y+GxdGJAsVtIs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Vinod Koul , Sasha Levin Subject: [PATCH 5.3 113/344] dmaengine: iop-adma: use correct printk format strings Date: Thu, 3 Oct 2019 17:51:18 +0200 Message-Id: <20191003154551.361789545@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154540.062170222@linuxfoundation.org> References: <20191003154540.062170222@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: Arnd Bergmann [ Upstream commit 00c9755524fbaa28117be774d7c92fddb5ca02f3 ] When compile-testing on other architectures, we get lots of warnings about incorrect format strings, like: drivers/dma/iop-adma.c: In function 'iop_adma_alloc_slots': drivers/dma/iop-adma.c:307:6: warning: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t {aka long long unsigned int}' [-Wformat=] drivers/dma/iop-adma.c: In function 'iop_adma_prep_dma_memcpy': >> drivers/dma/iop-adma.c:518:40: warning: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'size_t {aka long unsigned int}' [-Wformat=] Use %zu for printing size_t as required, and cast the dma_addr_t arguments to 'u64' for printing with %llx. Ideally this should use the %pad format string, but that requires an lvalue argument that doesn't work here. Link: https://lore.kernel.org/r/20190809163334.489360-3-arnd@arndb.de Signed-off-by: Arnd Bergmann Acked-by: Vinod Koul Signed-off-by: Arnd Bergmann Signed-off-by: Sasha Levin --- drivers/dma/iop-adma.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) -- 2.20.1 diff --git a/drivers/dma/iop-adma.c b/drivers/dma/iop-adma.c index c6c0143670d9d..a776857d89c8f 100644 --- a/drivers/dma/iop-adma.c +++ b/drivers/dma/iop-adma.c @@ -116,9 +116,9 @@ static void __iop_adma_slot_cleanup(struct iop_adma_chan *iop_chan) list_for_each_entry_safe(iter, _iter, &iop_chan->chain, chain_node) { pr_debug("\tcookie: %d slot: %d busy: %d " - "this_desc: %#x next_desc: %#x ack: %d\n", + "this_desc: %#x next_desc: %#llx ack: %d\n", iter->async_tx.cookie, iter->idx, busy, - iter->async_tx.phys, iop_desc_get_next_desc(iter), + iter->async_tx.phys, (u64)iop_desc_get_next_desc(iter), async_tx_test_ack(&iter->async_tx)); prefetch(_iter); prefetch(&_iter->async_tx); @@ -306,9 +306,9 @@ iop_adma_alloc_slots(struct iop_adma_chan *iop_chan, int num_slots, int i; dev_dbg(iop_chan->device->common.dev, "allocated slot: %d " - "(desc %p phys: %#x) slots_per_op %d\n", + "(desc %p phys: %#llx) slots_per_op %d\n", iter->idx, iter->hw_desc, - iter->async_tx.phys, slots_per_op); + (u64)iter->async_tx.phys, slots_per_op); /* pre-ack all but the last descriptor */ if (num_slots != slots_per_op) @@ -516,7 +516,7 @@ iop_adma_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dma_dest, return NULL; BUG_ON(len > IOP_ADMA_MAX_BYTE_COUNT); - dev_dbg(iop_chan->device->common.dev, "%s len: %u\n", + dev_dbg(iop_chan->device->common.dev, "%s len: %zu\n", __func__, len); spin_lock_bh(&iop_chan->lock); @@ -549,7 +549,7 @@ iop_adma_prep_dma_xor(struct dma_chan *chan, dma_addr_t dma_dest, BUG_ON(len > IOP_ADMA_XOR_MAX_BYTE_COUNT); dev_dbg(iop_chan->device->common.dev, - "%s src_cnt: %d len: %u flags: %lx\n", + "%s src_cnt: %d len: %zu flags: %lx\n", __func__, src_cnt, len, flags); spin_lock_bh(&iop_chan->lock); @@ -582,7 +582,7 @@ iop_adma_prep_dma_xor_val(struct dma_chan *chan, dma_addr_t *dma_src, if (unlikely(!len)) return NULL; - dev_dbg(iop_chan->device->common.dev, "%s src_cnt: %d len: %u\n", + dev_dbg(iop_chan->device->common.dev, "%s src_cnt: %d len: %zu\n", __func__, src_cnt, len); spin_lock_bh(&iop_chan->lock); @@ -620,7 +620,7 @@ iop_adma_prep_dma_pq(struct dma_chan *chan, dma_addr_t *dst, dma_addr_t *src, BUG_ON(len > IOP_ADMA_XOR_MAX_BYTE_COUNT); dev_dbg(iop_chan->device->common.dev, - "%s src_cnt: %d len: %u flags: %lx\n", + "%s src_cnt: %d len: %zu flags: %lx\n", __func__, src_cnt, len, flags); if (dmaf_p_disabled_continue(flags)) @@ -683,7 +683,7 @@ iop_adma_prep_dma_pq_val(struct dma_chan *chan, dma_addr_t *pq, dma_addr_t *src, return NULL; BUG_ON(len > IOP_ADMA_XOR_MAX_BYTE_COUNT); - dev_dbg(iop_chan->device->common.dev, "%s src_cnt: %d len: %u\n", + dev_dbg(iop_chan->device->common.dev, "%s src_cnt: %d len: %zu\n", __func__, src_cnt, len); spin_lock_bh(&iop_chan->lock); From patchwork Thu Oct 3 15:51:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "gregkh@linuxfoundation.org" X-Patchwork-Id: 175153 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp574084ill; Thu, 3 Oct 2019 09:43:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqwbi9PxU2iGty6TkWlG/vPF80MnvSGYQBpfCoaoSunWFbQPnOW9jQTxbiK7mqDd/SpXy91Y X-Received: by 2002:a17:906:c282:: with SMTP id r2mr8124040ejz.207.1570121023299; Thu, 03 Oct 2019 09:43:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570121023; cv=none; d=google.com; s=arc-20160816; b=ZNyKIsbf6/QzaL3CLy7KRPElP5axMJtDIy6W9iag0KTuY49SIuRQLnBtxd/745Sf6h C5vl9mOwduRHub2v7DX89HHS+eJA7MsjKAeIHJ2KFfwtvsXbwFfgaYmHci+juBp69min 55N+s10z0dIap6GXbPpysuy+wXpVGQZfgqRW2eXz60WgfB7FE5GB2TC8HcECOlJjfFBi dQM4Z4zePgqv+ToOP2ILZhy6D+VBdPP0tKrBLedpTKvDM0uvra9N1DKNPNxdCfwAviQ6 BSf4lPgG5WwDOO1j/Fca2IPzXUmUAePdOQZ5hMeUY0ZGaMnPhvfDLBqYoqiKpxyYZojH dqfg== 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=Q61foPR9T12GswBFWRUubUr475fb3uvVzJcifOvVvoY=; b=a/pXOOJZ7oBjO/7OMVf444EE/I8V5OaeP80eMWZzc18Qo8BumoWGdFLRArJajwuhe1 ZOpJIQF4ZSJLI0OSU8VQvwlLtjzIB14gH2PSgtfbMYAV7aSfqO/7mfxGa+1Uo/e6Bpxu AFze+x80NeOaBimvbcyu4JuBqnnH3PZm048oj/mhbxwo81mPCwZqArS5nJGO0WNEbf3z OxMUFCrJBz7SiV9xntNlA4LOmnmqp402FOdRpuohIsPfVnYygZW1g18chGu2Gvb+71d0 eB+ObOD8WJaK/jWKYcVlFa/4MqJ92R8OeELGI3hd95bEGbujv12HrEHerX3At7cHsQNd PgSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=StMOLy3X; 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 f14si1732366edt.92.2019.10.03.09.43.43; Thu, 03 Oct 2019 09:43:43 -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=StMOLy3X; 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 S2392721AbfJCQnl (ORCPT + 14 others); Thu, 3 Oct 2019 12:43:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:55214 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392151AbfJCQnk (ORCPT ); Thu, 3 Oct 2019 12:43:40 -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 5BEC92070B; Thu, 3 Oct 2019 16:43:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570121019; bh=laBXdjhEBj/+X/JVTuEkEsHnRzQeu89qrZqIqosxvkg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=StMOLy3XeTNfDattvj9vO7G6iX2S+8GXSbSQD5SS5IK98DmD0S9/5eesLSX4U/mcP smHpZwC195gY2Z1GS7l0tf58lKAHKyWsUxR0wUWSrV/luYHQDGV1lUREUvlnzZdMO2 30FoH2Zl2fIk0uzshgtI0lw4aeXzz5fdCPKbEdwc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Niklas Cassel , Mark Brown , Bjorn Andersson , Sasha Levin Subject: [PATCH 5.3 124/344] arm64: dts: qcom: qcs404-evb: Mark WCSS clocks protected Date: Thu, 3 Oct 2019 17:51:29 +0200 Message-Id: <20191003154552.443445773@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154540.062170222@linuxfoundation.org> References: <20191003154540.062170222@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: Bjorn Andersson [ Upstream commit 54d895bea43c94f31304d59f82d755b7f4b59e7c ] '7d0c76bdf227 ("clk: qcom: Add WCSS gcc clock control for QCS404")' introduces two new clocks to gcc. These are not used before clk_disable_unused() and as such the clock framework tries to disable them. But on the EVB these registers are only accessible through TrustZone, so these clocks must be marked as "protected" to prevent the clock code from touching them. Numerical values are used as the constants are not yet available in a common tree. Reviewed-by: Niklas Cassel Reported-by: Mark Brown Reported-by: Niklas Cassel Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin --- arch/arm64/boot/dts/qcom/qcs404-evb.dtsi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.20.1 diff --git a/arch/arm64/boot/dts/qcom/qcs404-evb.dtsi b/arch/arm64/boot/dts/qcom/qcs404-evb.dtsi index 11c0a7137823d..db6df76e97a1a 100644 --- a/arch/arm64/boot/dts/qcom/qcs404-evb.dtsi +++ b/arch/arm64/boot/dts/qcom/qcs404-evb.dtsi @@ -61,7 +61,9 @@ protected-clocks = , , , - ; + , + <141>, /* GCC_WCSS_Q6_AHB_CLK */ + <142>; /* GCC_WCSS_Q6_AXIM_CLK */ }; &pms405_spmi_regulators { From patchwork Thu Oct 3 15:51:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "gregkh@linuxfoundation.org" X-Patchwork-Id: 175156 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp575545ill; Thu, 3 Oct 2019 09:45:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqywOlT+RtBz1/mIXEoR/Ww7tb//5lpVDbE7CNQSdTWeUZ0FT2YB7X+hNX4ZxXwJpoywrlEq X-Received: by 2002:aa7:c616:: with SMTP id h22mr10426959edq.96.1570121102183; Thu, 03 Oct 2019 09:45:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570121102; cv=none; d=google.com; s=arc-20160816; b=OC3BBvrBc7qDvQYuTQLjYVrR94gIKYcQSM95MVzMNGF7anULSqChoTikiuCBf2i6yW 5dBJHcoN4DijIro/JwbjebsmdxuDvjanOiuLADisgZPWuAkIDFX/KbWkaGljLD2+FVwZ gTofzEWr8c4r0wUHUEqW3lp6R1TiveMKgK017oAQzoXjv27Iy4ik3g+rYd2R2azwFaPd 4kf3ADC4JfE2Zacy2IdKW2YqljFrM98fm2jzB0COkQ3HRX9NWBnfnFmbVqWIU4MR9tjn +Rn5VQnjHng3ThxZfIRAuBAfeAo5mx+NMjqQJQoVP5vPrnwC+ziVYhh2gBVMA9TFYkgr lGHA== 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=SYq5bHnqq/nrp+72ScMsEuHQ7AzAjnDVv2L9FaeBmEQ=; b=FOu8X93g1Zr/IaRw8d4KprAuO3j9Sl3uROThXzcjHdsM/JMhnuqt1AW07aj5AG3ng0 NK2P29WyUAgE+dGnRS98RLDRktSEs5W8iq2pAHqhWFXqqlDpH1KUt3HhI4DytmIK34s1 0ffV1MKQ7aEIpeMk9JFOUB3M+bOJDxWhHM/vqGwApF/N9c4KHIGJYvtV0/OupF4jMZ9V MU+b7KhQtfDNC1gjDXxi5mqR8g1MtRhM5JT0dE8bPiIyEbirxylyyz1gTjKLp85Teb5n PEdwepUfWdXc9vyPPkhEFqQtyi7BC7nxDMmoIeoQaeGGCdj9mfIcEi6o2IeJwybVhPes AdzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=G5Zl8MPL; 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 g31si1878870eda.399.2019.10.03.09.45.02; Thu, 03 Oct 2019 09:45:02 -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=G5Zl8MPL; 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 S2405457AbfJCQo6 (ORCPT + 14 others); Thu, 3 Oct 2019 12:44:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:57230 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405452AbfJCQo4 (ORCPT ); Thu, 3 Oct 2019 12:44:56 -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 0DF7E2070B; Thu, 3 Oct 2019 16:44:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570121095; bh=ewPq7fQ+Kpl7Nb7d8O0y/srjFnu8XZRUFHNrMK6wO+8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G5Zl8MPL+uroDcBGg+ntIMiTC4EDaswB2NTh3fEjQHK851wbkHh1RnXAIIkCq/xYE s2dpTMFh+MF85oxI5QfqR2teMAFUKMZxEsca1uhehtl2Q71X5npejtduminVGtCKrq nVgLQ7IN//zO2KpL43yrFs23Kuzc6YJslZsQ8cCI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Masahiro Yamada , Keerthy , Tony Lindgren , Sasha Levin Subject: [PATCH 5.3 153/344] ARM: OMAP2+: move platform-specific asm-offset.h to arch/arm/mach-omap2 Date: Thu, 3 Oct 2019 17:51:58 +0200 Message-Id: <20191003154555.342665181@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154540.062170222@linuxfoundation.org> References: <20191003154540.062170222@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: Masahiro Yamada [ Upstream commit ccf4975dca233b1d6a74752d6ab35c239edc0d58 ] is only generated and included by arch/arm/mach-omap2/, so it does not need to reside in the globally visible include/generated/. I renamed it to arch/arm/mach-omap2/pm-asm-offsets.h since the prefix 'ti-' is just redundant in mach-omap2/. My main motivation of this change is to avoid the race condition for the parallel build (-j) when CONFIG_IKHEADERS is enabled. When it is enabled, all the headers under include/ are archived into kernel/kheaders_data.tar.xz and exposed in the sysfs. In the parallel build, we have no idea in which order files are built. - If ti-pm-asm-offsets.h is built before kheaders_data.tar.xz, the header will be included in the archive. Probably nobody will use it, but it is harmless except that it will increase the archive size needlessly. - If kheaders_data.tar.xz is built before ti-pm-asm-offsets.h, the header will not be included in the archive. However, in the next build, the archive will be re-generated to include the newly-found ti-pm-asm-offsets.h. This is not nice from the build system point of view. - If ti-pm-asm-offsets.h and kheaders_data.tar.xz are built at the same time, the corrupted header might be included in the archive, which does not look nice either. This commit fixes the race. Signed-off-by: Masahiro Yamada Tested-by: Keerthy Signed-off-by: Tony Lindgren Signed-off-by: Sasha Levin --- arch/arm/mach-omap2/.gitignore | 1 + arch/arm/mach-omap2/Makefile | 5 +++-- arch/arm/mach-omap2/sleep33xx.S | 2 +- arch/arm/mach-omap2/sleep43xx.S | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 arch/arm/mach-omap2/.gitignore -- 2.20.1 diff --git a/arch/arm/mach-omap2/.gitignore b/arch/arm/mach-omap2/.gitignore new file mode 100644 index 0000000000000..79a8d6ea71520 --- /dev/null +++ b/arch/arm/mach-omap2/.gitignore @@ -0,0 +1 @@ +pm-asm-offsets.h diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 6006505516219..21c6d4bca3c0f 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile @@ -223,9 +223,10 @@ obj-y += omap_phy_internal.o obj-$(CONFIG_MACH_OMAP2_TUSB6010) += usb-tusb6010.o -include/generated/ti-pm-asm-offsets.h: arch/arm/mach-omap2/pm-asm-offsets.s FORCE +$(obj)/pm-asm-offsets.h: $(obj)/pm-asm-offsets.s FORCE $(call filechk,offsets,__TI_PM_ASM_OFFSETS_H__) -$(obj)/sleep33xx.o $(obj)/sleep43xx.o: include/generated/ti-pm-asm-offsets.h +$(obj)/sleep33xx.o $(obj)/sleep43xx.o: $(obj)/pm-asm-offsets.h targets += pm-asm-offsets.s +clean-files += pm-asm-offsets.h diff --git a/arch/arm/mach-omap2/sleep33xx.S b/arch/arm/mach-omap2/sleep33xx.S index 68fee339d3f12..dc221249bc22c 100644 --- a/arch/arm/mach-omap2/sleep33xx.S +++ b/arch/arm/mach-omap2/sleep33xx.S @@ -6,7 +6,6 @@ * Dave Gerlach, Vaibhav Bedia */ -#include #include #include #include @@ -15,6 +14,7 @@ #include "iomap.h" #include "cm33xx.h" +#include "pm-asm-offsets.h" #define AM33XX_CM_CLKCTRL_MODULESTATE_DISABLED 0x00030000 #define AM33XX_CM_CLKCTRL_MODULEMODE_DISABLE 0x0003 diff --git a/arch/arm/mach-omap2/sleep43xx.S b/arch/arm/mach-omap2/sleep43xx.S index c1f4e4852644e..90d2907a2eb27 100644 --- a/arch/arm/mach-omap2/sleep43xx.S +++ b/arch/arm/mach-omap2/sleep43xx.S @@ -6,7 +6,6 @@ * Dave Gerlach, Vaibhav Bedia */ -#include #include #include #include @@ -19,6 +18,7 @@ #include "iomap.h" #include "omap-secure.h" #include "omap44xx.h" +#include "pm-asm-offsets.h" #include "prm33xx.h" #include "prcm43xx.h" From patchwork Thu Oct 3 15:52:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "gregkh@linuxfoundation.org" X-Patchwork-Id: 175170 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp593378ill; Thu, 3 Oct 2019 10:00:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqxNwSIDF+eub8V6m8ZMzrUNwmghZsVkGKWK7oqlLZFkWz7TY4lWUWKFEqD4D9GTSXpRsEMG X-Received: by 2002:a17:906:d922:: with SMTP id rn2mr8611760ejb.124.1570122047969; Thu, 03 Oct 2019 10:00:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570122047; cv=none; d=google.com; s=arc-20160816; b=fuPVaQeLOcxXdvNoJ45L2p4WJihMmgU6kyRhqxaaXbf/c4K7Y59bOXqlN/5cP+1sFe CuYuAD3TF3B9ESaehiVRG+UYWdzJHvno7U5m/POZvgwyswE3pgXC6XY0JPT9yjYgWtxC 7BDc2HLotMQpfV4YggpHUe34yB70CM7JmfehsduR3JnrLNnbROPCr5V37tgtOfnQnB+g +o/FpYWJNpZbpSxZwzokp2daXUXilWQkQXbdx5rS+S1pU+YCQ336H1yHcJIPNyUL75LS G2bCEDeXfwYZDcSQRGdXYiDbHCZbBVuuFkxRw95ideP8HHKdDIiD2i4iHw1Zo4B0kuHi lGEA== 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=2E8mRGBWHQ0p2iBQgTkN82G24aoQ+hEFi1cI1hH+PSI=; b=PO5mvsjxaIgHM97a+93FJdWfQuC1HdEjdfBDdt7NlZTg7B9Al2RjuIcuNWzzAPWD21 B9F3GSEI547cq8yysdFeU/2V6kBYkr2wTiCuOkPkl/ectv16o0pI+PqF8j8dxNoZTSv2 DXgDSpVTy5xREnZ6cEuD239SV97Im+nPeZ89MYAbkOO1PlbIIiouaDrQ3bA05Ob4A4KZ 9J9z9E02hIj55u/ArLoEqt0eP0o1lEwjJxpf9bfPdDxyPAhe3oHMM8FwzmUAXCcKuYFo tMgpgvlsZTUgGLOJMtUMi7WqmQEpfWBE8qKPN4VzDWOtz9GafqpH1m2RK3VTyK2hVwcg S4Lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=UedKR3l6; 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 f4si1953436edf.6.2019.10.03.10.00.47; Thu, 03 Oct 2019 10:00:47 -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=UedKR3l6; 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 S2389286AbfJCRAq (ORCPT + 14 others); Thu, 3 Oct 2019 13:00:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:58038 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392807AbfJCQpa (ORCPT ); Thu, 3 Oct 2019 12:45:30 -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 CAD86215EA; Thu, 3 Oct 2019 16:45:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570121130; bh=aRnDWCac5Rp2zw7MueiQHhEBPV+CE2W1Bm3OSFT9eFw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UedKR3l6Y91uVjqxLjyWV2H9tiRm346q+Zyzj9J2kyLK3jNzuvsqf0THf8YSGwX2P yw2R62S5KB2jyx/WRdneoBHoDv5RuloSmFAhIfkZGSeTRWFfJlMFX+b7+9dYVmGdr9 zsSSYENfAXueMIZ0C2i8EKNtRo+AAJB6ijC58MJ8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pavel Machek , Dan Murphy , Jacek Anaszewski , Sasha Levin Subject: [PATCH 5.3 165/344] leds: lm3532: Fixes for the driver for stability Date: Thu, 3 Oct 2019 17:52:10 +0200 Message-Id: <20191003154556.527192344@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154540.062170222@linuxfoundation.org> References: <20191003154540.062170222@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: Dan Murphy [ Upstream commit 6559ac32998248182572e1ccae79dc2eb40ac7c6 ] Fixed misspelled words, added error check during probe on the init of the registers, and fixed ALS/I2C control mode. Fixes: bc1b8492c764 ("leds: lm3532: Introduce the lm3532 LED driver") Reported-by: Pavel Machek Signed-off-by: Dan Murphy Acked-by: Pavel Machek Signed-off-by: Jacek Anaszewski Signed-off-by: Sasha Levin --- drivers/leds/leds-lm3532.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) -- 2.20.1 diff --git a/drivers/leds/leds-lm3532.c b/drivers/leds/leds-lm3532.c index 180895b83b888..e55a64847fe2f 100644 --- a/drivers/leds/leds-lm3532.c +++ b/drivers/leds/leds-lm3532.c @@ -40,7 +40,7 @@ #define LM3532_REG_ZN_3_LO 0x67 #define LM3532_REG_MAX 0x7e -/* Contorl Enable */ +/* Control Enable */ #define LM3532_CTRL_A_ENABLE BIT(0) #define LM3532_CTRL_B_ENABLE BIT(1) #define LM3532_CTRL_C_ENABLE BIT(2) @@ -302,7 +302,7 @@ static int lm3532_led_disable(struct lm3532_led *led_data) int ret; ret = regmap_update_bits(led_data->priv->regmap, LM3532_REG_ENABLE, - ctrl_en_val, ~ctrl_en_val); + ctrl_en_val, 0); if (ret) { dev_err(led_data->priv->dev, "Failed to set ctrl:%d\n", ret); return ret; @@ -321,7 +321,7 @@ static int lm3532_brightness_set(struct led_classdev *led_cdev, mutex_lock(&led->priv->lock); - if (led->mode == LM3532_BL_MODE_ALS) { + if (led->mode == LM3532_ALS_CTRL) { if (brt_val > LED_OFF) ret = lm3532_led_enable(led); else @@ -542,11 +542,14 @@ static int lm3532_parse_node(struct lm3532_data *priv) } if (led->mode == LM3532_BL_MODE_ALS) { + led->mode = LM3532_ALS_CTRL; ret = lm3532_parse_als(priv); if (ret) dev_err(&priv->client->dev, "Failed to parse als\n"); else lm3532_als_configure(priv, led); + } else { + led->mode = LM3532_I2C_CTRL; } led->num_leds = fwnode_property_read_u32_array(child, @@ -590,7 +593,13 @@ static int lm3532_parse_node(struct lm3532_data *priv) goto child_out; } - lm3532_init_registers(led); + ret = lm3532_init_registers(led); + if (ret) { + dev_err(&priv->client->dev, "register init err: %d\n", + ret); + fwnode_handle_put(child); + goto child_out; + } i++; } From patchwork Thu Oct 3 15:52:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "gregkh@linuxfoundation.org" X-Patchwork-Id: 175157 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp576675ill; Thu, 3 Oct 2019 09:45:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqw/tyiFX4ryQiiNUI/fQSenOB9L60DkzAIg1WzEfcXlwYRAKoo3xmgxp/7Skhgo8vG8A3CF X-Received: by 2002:a17:906:e251:: with SMTP id gq17mr8576226ejb.85.1570121152778; Thu, 03 Oct 2019 09:45:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570121152; cv=none; d=google.com; s=arc-20160816; b=uzH4D37lHGF4K9xNMWSK59EaLOEN8zN5NOrjEAq/kyJWSgkn/QykdypJe/GBWMO8A5 kABYym9cr+oNurCys1xi/+sHbv+t0vBkgfhZF7/r3erVea7oWZ9H7SE9av8TsF9tppg+ ObZGob/cz4fZM/znvtK+JK4M6ij05tfkySMNx1APVRsTEaSe3VtlYlBvOsxzMIypYqUm aUK61ZNDLm0dbjk4C+Ur1K04TLx1CHFglLTilBQb+XaOtSjzKXgWeEHtOFS2EZvttYTz Y8fTkvvewJDa2EklT8DaKNuAvFXo/ISPC8vLAxjYp8q4AIf3jJ09FOYJ6DjEdeknOCWb EJtw== 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=DLqJJounhdfcftV6O9nHbeZhACqsm8NU7fqVE2mEU7g=; b=LegHnodo1MruqPWxAZ8Qdz1toRdOwYZZaeyQo5Y5eNcRDtbM2PGTPR5SBcHOxDGpdh 8FZcptfB/fE7GBbNYdospKhQTA+VyANbShmojEHswfetmL5pvH+xDo1OwrMjEywbhMUk pQzNLCQkjK7/DH2X6PaBbH2mHzVlvfDZ+c9Zfgt/zkfSCnIrJEEJmZX6M/4wixL7Ij/l uUfUSL+Os/KOCjjHGa8sDh6k5QaNUlffTCTjRkEE2uKEJgPcz4tGuNX0lvNT2ynaINm8 ARpm9SJ5rhqUIcxv853DXM2vFwWR/ER5s64Gp+6lOR7mZ35AwixfDS4WZ7oMyxo/8Zgg gEGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=aQbGvJoQ; 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 f6si1551969ejx.293.2019.10.03.09.45.52; Thu, 03 Oct 2019 09:45:52 -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=aQbGvJoQ; 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 S2392516AbfJCQpv (ORCPT + 14 others); Thu, 3 Oct 2019 12:45:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:58580 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404313AbfJCQpu (ORCPT ); Thu, 3 Oct 2019 12:45:50 -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 72E73215EA; Thu, 3 Oct 2019 16:45:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570121149; bh=jFyrjGVt0cRFDQk6Fgliyx+XUAerjBChFSMocGjBCxw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aQbGvJoQBp0CBs0FpYGDApykgiV4IqK5Z8H8JUC2M4vG5+rQBdnlQHdv+eWUBCoaA KM/AU2w1HU0Rnfvy4R7pkWFyQXOKxA8BWoSRdlPnCBqfh3Gew55sj3NSmJ3Y/7m2OL A7jHOa8zhPNCO6FnaDGIIt5yhTyySVrPkXIep3q0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mark Rutland , Catalin Marinas , James Morse , Will Deacon , Sasha Levin Subject: [PATCH 5.3 171/344] arm64: kpti: ensure patched kernel text is fetched from PoU Date: Thu, 3 Oct 2019 17:52:16 +0200 Message-Id: <20191003154557.091909530@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154540.062170222@linuxfoundation.org> References: <20191003154540.062170222@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: Mark Rutland [ Upstream commit f32c7a8e45105bd0af76872bf6eef0438ff12fb2 ] While the MMUs is disabled, I-cache speculation can result in instructions being fetched from the PoC. During boot we may patch instructions (e.g. for alternatives and jump labels), and these may be dirty at the PoU (and stale at the PoC). Thus, while the MMU is disabled in the KPTI pagetable fixup code we may load stale instructions into the I-cache, potentially leading to subsequent crashes when executing regions of code which have been modified at runtime. Similarly to commit: 8ec41987436d566f ("arm64: mm: ensure patched kernel text is fetched from PoU") ... we can invalidate the I-cache after enabling the MMU to prevent such issues. The KPTI pagetable fixup code itself should be clean to the PoC per the boot protocol, so no maintenance is required for this code. Signed-off-by: Mark Rutland Cc: Catalin Marinas Reviewed-by: James Morse Signed-off-by: Will Deacon Signed-off-by: Sasha Levin --- arch/arm64/mm/proc.S | 9 +++++++++ 1 file changed, 9 insertions(+) -- 2.20.1 diff --git a/arch/arm64/mm/proc.S b/arch/arm64/mm/proc.S index 7dbf2be470f6c..28a8f7b87ff06 100644 --- a/arch/arm64/mm/proc.S +++ b/arch/arm64/mm/proc.S @@ -286,6 +286,15 @@ skip_pgd: msr sctlr_el1, x18 isb + /* + * Invalidate the local I-cache so that any instructions fetched + * speculatively from the PoC are discarded, since they may have + * been dynamically patched at the PoU. + */ + ic iallu + dsb nsh + isb + /* Set the flag to zero to indicate that we're all done */ str wzr, [flag_ptr] ret From patchwork Thu Oct 3 15:52:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "gregkh@linuxfoundation.org" X-Patchwork-Id: 175158 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp576943ill; Thu, 3 Oct 2019 09:46:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqwsph66QBGj9Nj9DwmNxWvrbfnHN9f1y/oc7quzTUa/4hcjYTPQY/u1eM35cf9vlFRzKDZJ X-Received: by 2002:a17:906:2cc8:: with SMTP id r8mr8466160ejr.197.1570121165297; Thu, 03 Oct 2019 09:46:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570121165; cv=none; d=google.com; s=arc-20160816; b=uWg2M7hcjwlEKISJ0Wi4QdJc71TRm1s78kAC2p47LhhksOLMuTZhCkHthMtUjUPpEs Q4qqeBbjn5Bx34bzENfqgPo/US8QogsZ/Mxp1pZTjK/KLrD1OjHay8ZPsZVI8O7LqSoc 23r7fxaTfDHxNu2mYLCNMf4FziPjddwA0Jg3TUP30MXm3CO7Uz82yNy8T1pxRG3RMFVa KgNHo0oUKWIJ/5lYjwrRzN6TT0cNYnuhcmibxtMps41xGdWYZ72HfYBDGcJ3E6x+lb0+ oTY4IDOiY5iEfoQH/xjQTKY1/F7yBipwMcUxk5nHrtUxI19JQ9rmd/GlhcNPrraMfx7l eUSw== 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=8a2os4W1LPwm6IPEJ8Q/8Fy0oOs0Aj2zQJ74N/eqAiA=; b=SalSQcI9TeOBrjmaOQdoKJ1xDsNGSZQ8/Wd+p9aph2bqoFH7Dm9MxsdqozVCcI2rSi T7B0sV5RigM1YcgFCwvWCQEUgGLld91TqnYihZ2DbheJ48uM2txXCAtY530UkHZfv5hY 8dVn9xESKg3vKy65TnozVY/TwCkd1J6nlz9ZYum0jwUDnRO+Ryh2g4Ad+jRT716SpVvf JKctwdzD0OK+LK2c4PdN4oMOqDyXNRgnmi68kIW6jI/vqyJHF/L5JJqVyP2QrWg4K0wF kFAN4edgS9x+tFZNes8P/wcbLXMj6feE9vkz7eZL4Xqzu/p8i5qok6y9RmvYNSMDnagx mDJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=sld6ZMhS; 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 l22si1977039edb.241.2019.10.03.09.46.05; Thu, 03 Oct 2019 09:46:05 -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=sld6ZMhS; 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 S2392841AbfJCQqD (ORCPT + 14 others); Thu, 3 Oct 2019 12:46:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:58968 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732663AbfJCQqD (ORCPT ); Thu, 3 Oct 2019 12:46:03 -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 0119C20830; Thu, 3 Oct 2019 16:46:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570121162; bh=Dp16fsSU8hxNbAKOIIQ6JCkszM+DVXRU4bOKtGvh95U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sld6ZMhS4W+h2imD2DEuecQJYPYSs6ji76Mvov1oKeMZK5LTjpcQp/3Q5j/3kxZjb NN+vqyeoC/6PTtaLYyWLPFBE5jLgOgpfzFyJY8eamSgnw64+s8HLpGfsxOmrgGRkLK plyZ7Z6Ap677T6i24MZcFKF1K0x86IrHys13OzUI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shengjiu Wang , Mark Brown , Sasha Levin Subject: [PATCH 5.3 176/344] ASoC: fsl_ssi: Fix clock control issue in master mode Date: Thu, 3 Oct 2019 17:52:21 +0200 Message-Id: <20191003154557.605507644@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154540.062170222@linuxfoundation.org> References: <20191003154540.062170222@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: Shengjiu Wang [ Upstream commit 696d05225cebffd172008d212657be90e823eac0 ] The test case is arecord -Dhw:0 -d 10 -f S16_LE -r 48000 -c 2 temp.wav & aplay -Dhw:0 -d 30 -f S16_LE -r 48000 -c 2 test.wav There will be error after end of arecord: aplay: pcm_write:2051: write error: Input/output error Capture and Playback work in parallel in master mode, one substream stops, the other substream is impacted, the reason is that clock is disabled wrongly. The clock's reference count is not increased when second substream starts, the hw_param() function returns in the beginning because first substream is enabled, then in end of first substream, the hw_free() disables the clock. This patch is to move the clock enablement to the place before checking of the device enablement in hw_param(). Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1567012817-12625-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/fsl/fsl_ssi.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) -- 2.20.1 diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index fa862af25c1a3..085855f9b08d4 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -799,15 +799,6 @@ static int fsl_ssi_hw_params(struct snd_pcm_substream *substream, u32 wl = SSI_SxCCR_WL(sample_size); int ret; - /* - * SSI is properly configured if it is enabled and running in - * the synchronous mode; Note that AC97 mode is an exception - * that should set separate configurations for STCCR and SRCCR - * despite running in the synchronous mode. - */ - if (ssi->streams && ssi->synchronous) - return 0; - if (fsl_ssi_is_i2s_master(ssi)) { ret = fsl_ssi_set_bclk(substream, dai, hw_params); if (ret) @@ -823,6 +814,15 @@ static int fsl_ssi_hw_params(struct snd_pcm_substream *substream, } } + /* + * SSI is properly configured if it is enabled and running in + * the synchronous mode; Note that AC97 mode is an exception + * that should set separate configurations for STCCR and SRCCR + * despite running in the synchronous mode. + */ + if (ssi->streams && ssi->synchronous) + return 0; + if (!fsl_ssi_is_ac97(ssi)) { /* * Keep the ssi->i2s_net intact while having a local variable From patchwork Thu Oct 3 15:52:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "gregkh@linuxfoundation.org" X-Patchwork-Id: 175160 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp577857ill; Thu, 3 Oct 2019 09:46:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqz/RgbOnipqmYNpHfK/LdVMeF08HAhZhaKS+6fmeyMKO0EKvShLqbXRs99djPQHv7pxtW5T X-Received: by 2002:a17:906:6c8:: with SMTP id v8mr8711025ejb.40.1570121211745; Thu, 03 Oct 2019 09:46:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570121211; cv=none; d=google.com; s=arc-20160816; b=XZhh2gIsE+QXx1nSSROBuPA53Ll33WNbqRf9ZeuFm+mPwZnz0GKGJZZNSZbVOhkJ/r HuBE34nA1OEw3G9BAqM9mltg5jN015x7GBp0c2vdcxxEA+mR8dsq0/eF1sRnAsCdqu5L 4sR1qBA1bX0TLymoSBgMOTcV26vapSzMRg3TBna31FakIDt2o2lP9dKS0Wl+EYFemwNw JEepMNAFxN5ccUB/3fCRyIocynXHpzfmlYEirgUZ4kn7yGGvVzqiWLGmpyvTUUtHei0y 1mlvLFI8/8gkmPZbAoqyt3p2DL1QIsvxbk/AyUViylp7TcPmrukrzL8rDyandowCNNi2 tb9A== 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=O0sarBjX+FEYJUyNwY/bcxo5JxSF4Q5rmolAVKyREAY=; b=vUfCo6EATh9HVPhaL/yVBH4zOUCGDZe+WmIbcjte0A5raWsKALMUWAVGFaUTm9lBr9 dRXlsVKo5+g0UdeL9fnDfq91bx3wGQiZGRdmNNvArZBDA0PxRHc5q1hDJ8T2++RAiLOu vj8WAWGtSDCu6pB3jkdzsnobaJul/48pRuJFKmlXcjoJ4/p+KccDYsuscCvPuA9YS3Bt 7EIvGB2SWR6weWYDRMhtMI//WJ2J6SL2s1J38OPMdRbIDKgDC8N1xpSW9cNIl+1AaL1q 7ndY/25mIGYlN3b2oTr5oQYTxQJuubFG/yMPp6JsEJeZzpOQhKP6SXkqS4ToolMtEgA2 VeSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zVYqSXR2; 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 hh9si1478296ejb.313.2019.10.03.09.46.51; Thu, 03 Oct 2019 09:46:51 -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=zVYqSXR2; 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 S2389249AbfJCQqt (ORCPT + 14 others); Thu, 3 Oct 2019 12:46:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:60186 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392946AbfJCQqs (ORCPT ); Thu, 3 Oct 2019 12:46:48 -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 A28D5215EA; Thu, 3 Oct 2019 16:46:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570121208; bh=LHr0zQNTuWMvB8KfJDg2lp4+b/SuKXqID+v+rc6sg8g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zVYqSXR2uVCjbtsjahGoM52Q5/5TbG854kFRhWyvqC9UVQ7m6XSzpHjOO8+px8FJ/ RUNu5PkkVHyvcj1gm/uLIehdsWyR4AFYAMArSHDdkfLzEfa2NxtRxPqm2KckoJ54hf FKG/QBk5rcSWbG6BdPio4QdQ3JYyuiQ36MhjTf64= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Peter Ujfalusi , Vinod Koul , Sasha Levin Subject: [PATCH 5.3 195/344] dmaengine: ti: edma: Do not reset reserved paRAM slots Date: Thu, 3 Oct 2019 17:52:40 +0200 Message-Id: <20191003154559.443819896@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154540.062170222@linuxfoundation.org> References: <20191003154540.062170222@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: Peter Ujfalusi [ Upstream commit c5dbe60664b3660f5ac5854e21273ea2e7ff698f ] Skip resetting paRAM slots marked as reserved as they might be used by other cores. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20190823125618.8133-2-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/dma/ti/edma.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) -- 2.20.1 diff --git a/drivers/dma/ti/edma.c b/drivers/dma/ti/edma.c index ceabdea40ae0f..982631d4e1f8a 100644 --- a/drivers/dma/ti/edma.c +++ b/drivers/dma/ti/edma.c @@ -2273,9 +2273,6 @@ static int edma_probe(struct platform_device *pdev) ecc->default_queue = info->default_queue; - for (i = 0; i < ecc->num_slots; i++) - edma_write_slot(ecc, i, &dummy_paramset); - if (info->rsv) { /* Set the reserved slots in inuse list */ rsv_slots = info->rsv->rsv_slots; @@ -2288,6 +2285,12 @@ static int edma_probe(struct platform_device *pdev) } } + for (i = 0; i < ecc->num_slots; i++) { + /* Reset only unused - not reserved - paRAM slots */ + if (!test_bit(i, ecc->slot_inuse)) + edma_write_slot(ecc, i, &dummy_paramset); + } + /* Clear the xbar mapped channels in unused list */ xbar_chans = info->xbar_chans; if (xbar_chans) { From patchwork Thu Oct 3 15:52:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "gregkh@linuxfoundation.org" X-Patchwork-Id: 175161 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp578430ill; Thu, 3 Oct 2019 09:47:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqwFMxTaHVB8+78pLVFxWEvv4gWDs8OBhHdosXFtC+Dp6KuxaZQ2mMCku5LGBk0ovb9tjhPd X-Received: by 2002:a17:907:20c4:: with SMTP id qq4mr8625571ejb.161.1570121241135; Thu, 03 Oct 2019 09:47:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570121241; cv=none; d=google.com; s=arc-20160816; b=y5BGlBZF+KPLlyr3mXme25csYejDugvIS9jS5GE8CWoSmY7VpjoM6L+ocE3BBdf1wj 94xWo3wUdKXjdENoHjrMXbtN0Zt+eFnpruPBOrbw8dTUs2UQLUKBiIr4o0hvcHXRDu/j atUi3jZLWws5az6BmuL6mwyKKshl+iUKtQ9bFy3YufhZfBBkx1MRnfaHmN1ZjtjJfk5o R7NYxoCGxoCt/Qca27oNKxPv6KtVyWso/Y7KyVV+RoQeC/4S9/RoI2Q9Y4cY9nsYb+3x lGei3b46qplGwaBnf8/7SVRJtVjB0G7jEgPsnDG+aXJM5dJELAUJtj7vJMe+rpzVBZeP Kegg== 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=Pqcw339CMBrgFqnM2yiv3guprrWrgIh35kct79yMezU=; b=PPxr4pU33KqC36+XckK+gj213glZ4yoq/TDafSnZ7gXT2N4jiG3zacuFxKLaH9eoxo /JXEC8kADV2PxC9LS9ltvYXc0jk8tWesAewdrWLfq6P03/IHRmhMH3/TOgf0Fuqw9V6L /y6hm7gSekchrHPDIipceoIF7I9QMnosMzqyHQqEJfxJsZzLJ8fZ4izd0G1TaznnxszM yUFUuQTmspLX5behfng0Q5YNQMwBVhqWApXyVk05Lo1TUwYmG6P0wPSVMu+xsmT7r0c6 41U0AW1hpgkRTSRlrJtg3RMWCaMpeKnIgKFKmkFoDQCAH+zWMoFtZw4QGGXgqwoDLx19 PnAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YuUQJhDh; 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 v14si1926498ede.424.2019.10.03.09.47.20; Thu, 03 Oct 2019 09:47:21 -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=YuUQJhDh; 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 S2393022AbfJCQrT (ORCPT + 14 others); Thu, 3 Oct 2019 12:47:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:60832 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391908AbfJCQrS (ORCPT ); Thu, 3 Oct 2019 12:47:18 -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 5E83F20865; Thu, 3 Oct 2019 16:47:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570121237; bh=5eDikgOSaSe6iEg5YcefwyC0Wju1DF4Oj1szVWREBus=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YuUQJhDhGJFMf4KHgw1ZTdRVexGhwKo4LYug0ywSINCLrY9hIZOvhzjfGcixRf/9w fTOuRaUIDLVkKxakaSHMtLGaEky7+W5LWO0zV9CYCDbCTktmxacP8w96TypE5ZNkak YwYEDHHNn1g1cnMJJ3/RKWZMlmsPO9moaZAT9EtM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Peter Ujfalusi , Arthur She , Mark Brown , Sasha Levin Subject: [PATCH 5.3 205/344] ASoC: dmaengine: Make the pcm->name equal to pcm->id if the name is not set Date: Thu, 3 Oct 2019 17:52:50 +0200 Message-Id: <20191003154600.493014307@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154540.062170222@linuxfoundation.org> References: <20191003154540.062170222@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: Peter Ujfalusi [ Upstream commit 2ec42f3147e1610716f184b02e65d7f493eed925 ] Some tools use the snd_pcm_info_get_name() to try to identify PCMs or for other purposes. Currently it is left empty with the dmaengine-pcm, in this case copy the pcm->id string as pcm->name. For example IGT is using this to find the HDMI PCM for testing audio on it. Signed-off-by: Peter Ujfalusi Reported-by: Arthur She Link: https://lore.kernel.org/r/20190906055524.7393-1-peter.ujfalusi@ti.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/soc-generic-dmaengine-pcm.c | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.20.1 diff --git a/sound/soc/soc-generic-dmaengine-pcm.c b/sound/soc/soc-generic-dmaengine-pcm.c index 748f5f641002e..d93db2c2b5270 100644 --- a/sound/soc/soc-generic-dmaengine-pcm.c +++ b/sound/soc/soc-generic-dmaengine-pcm.c @@ -306,6 +306,12 @@ static int dmaengine_pcm_new(struct snd_soc_pcm_runtime *rtd) if (!dmaengine_pcm_can_report_residue(dev, pcm->chan[i])) pcm->flags |= SND_DMAENGINE_PCM_FLAG_NO_RESIDUE; + + if (rtd->pcm->streams[i].pcm->name[0] == '\0') { + strncpy(rtd->pcm->streams[i].pcm->name, + rtd->pcm->streams[i].pcm->id, + sizeof(rtd->pcm->streams[i].pcm->name)); + } } return 0; From patchwork Thu Oct 3 15:52:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "gregkh@linuxfoundation.org" X-Patchwork-Id: 175169 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp591291ill; Thu, 3 Oct 2019 09:59:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqwjjNRPn1YBlYIDUNR33k0u1QSzK2xM7JjFhvuBWpZEaL/Gr9Dp4xfDnFPCIA/Oq88s3rMi X-Received: by 2002:a17:906:d8c8:: with SMTP id re8mr8674778ejb.130.1570121943828; Thu, 03 Oct 2019 09:59:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570121943; cv=none; d=google.com; s=arc-20160816; b=Mv1/GKw4rlwEg57ex5Z7nrUdmwzdhuFNe85DjWZBbBZ6rhn+rvU8XcPjrh24RrkAC6 a+V6JsTfXn/wwWGtj724pdoFng6vA4qROteWAcl/1YWypk1lG1qfrR0B7z+cFP4BLH5T NUKmiiOXGcEXJlKVm/4+E1uKqIRGikqYgHsndPC4q88zRL6dd99r7dM9B/PYxSUcqsli 7Dhwrcs47kZNnFnI12IX/RiCfkOeC6gKYE6T+WDcM8XR4NNmd9QM1voXPweWLMMyYFY9 iD+POdWhLh7Z13K+wzktQS98fujV/8Vlei+8PRNE0XZqn53PB+NdSx3zZC1LljeZWzo1 xJiQ== 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=ohbaYWyHH7+ggwuundGiVHjcN4uF+QjslNgbf54Kp48=; b=uSKUb7D/cWs1G2vOrpmVJnXS+4QfZB6QgMsSbgK0C8dZ1CEiOylF7OqTBM1+MF8e8Z GIecNyTTTFGxBuU9llly4V81S4nhKFx/1QAuzISG1uJQTI0fozjWKi3mBjV+z0x1ajZF OOMWRnRkdnyxVltQC5TH7UepuaChXPdapqiiZ/QNy8LMDI+xUHjhtJPV+kxrW2/rSkFO r8tCfBOPcUkfFaDxFqpFJ3+AuWm9IoMHT6cOpOv/1x48hjl0Dm8Wx5sbyhoWsiEFCGWQ VhnQ0ruVhYF3bn99r3XFIMEXJjYSUklwRHdVkTvtUJPYRaXxiSfbHPwteT5R6Yos/w/K JBpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xcdGSCHP; 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 d14si1539848ejr.358.2019.10.03.09.59.03; Thu, 03 Oct 2019 09:59:03 -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=xcdGSCHP; 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 S2393000AbfJCQ7A (ORCPT + 14 others); Thu, 3 Oct 2019 12:59:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:33204 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405539AbfJCQrp (ORCPT ); Thu, 3 Oct 2019 12:47:45 -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 4FB9D20865; Thu, 3 Oct 2019 16:47:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570121264; bh=HiwsV5TpdnN+VgtHgx7ikNQaIghLwyuaB9/PgqbRLeY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xcdGSCHPPiPbVjNlKOczMHiCX9ZhQCuP3EnSq0khEV7AY1nZbjwJOSqvnsDkJHUBX dG09DkhRncupc9jIqrg5cTVEKoVP9mJJp2UUmOhjZBdZOtzWgm4RPln9RnYk89wQ+6 MNl73XkcfBvirVYP6f5X7ojqON74FiNB20ESq/q4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Matthias Kaehlcke , Ulf Hansson , Douglas Anderson , Sasha Levin Subject: [PATCH 5.3 214/344] mmc: core: Add helper function to indicate if SDIO IRQs is enabled Date: Thu, 3 Oct 2019 17:52:59 +0200 Message-Id: <20191003154601.403868995@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154540.062170222@linuxfoundation.org> References: <20191003154540.062170222@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: Ulf Hansson [ Upstream commit bd880b00697befb73eff7220ee20bdae4fdd487b ] To avoid each host driver supporting SDIO IRQs, from keeping track internally about if SDIO IRQs has been claimed, let's introduce a common helper function, sdio_irq_claimed(). The function returns true if SDIO IRQs are claimed, via using the information about the number of claimed irqs. This is safe, even without any locks, as long as the helper function is called only from runtime/system suspend callbacks of the host driver. Tested-by: Matthias Kaehlcke Signed-off-by: Ulf Hansson Reviewed-by: Douglas Anderson Signed-off-by: Ulf Hansson Signed-off-by: Sasha Levin --- include/linux/mmc/host.h | 9 +++++++++ 1 file changed, 9 insertions(+) -- 2.20.1 diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 4a351cb7f20fc..cf87c673cbb81 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -493,6 +493,15 @@ void mmc_command_done(struct mmc_host *host, struct mmc_request *mrq); void mmc_cqe_request_done(struct mmc_host *host, struct mmc_request *mrq); +/* + * May be called from host driver's system/runtime suspend/resume callbacks, + * to know if SDIO IRQs has been claimed. + */ +static inline bool sdio_irq_claimed(struct mmc_host *host) +{ + return host->sdio_irqs > 0; +} + static inline void mmc_signal_sdio_irq(struct mmc_host *host) { host->ops->enable_sdio_irq(host, 0); From patchwork Thu Oct 3 15:53:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "gregkh@linuxfoundation.org" X-Patchwork-Id: 175163 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp579041ill; Thu, 3 Oct 2019 09:47:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqxcV/T7NgusrHcpQjwua06dgUSZ2SE5Wc/4kt9zwprTytQlf76CznXwH8fUNopV3TFzDz/h X-Received: by 2002:a17:906:164d:: with SMTP id n13mr8569748ejd.75.1570121272019; Thu, 03 Oct 2019 09:47:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570121272; cv=none; d=google.com; s=arc-20160816; b=l5BI5AvJ6LYN4wxebocZxJKhMSzdFhO7JKEbuNe11+VGIWVoO3bElVHt6/c415aNPD epFbNZCRmx/4A5jtSn5WrXQ7T89SqtPVfiSXDL4cBudgSgYFCtri4y59i9sAsvbIf30+ 2YYbGdJAvQZT7OT+DqLsaxH+fHHVG/ncjRChywJxUISiS30hNt7mTURzNK7ggjRP9Thl J1ohWAE0UPgbqTC9Ds2RtAw18WxGcSxCYW93xxb5/TH6SjaR+Z2e0lz6gjrWmca9Ds5A cIjeqTgStx/Ie6v5Ya32W10hzaybKEoBYWkMhPFTuicL1H/OeNrx4ibifSFNApfEd/zB +p1Q== 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=dZ41bbHxLff5p0zCXST/a9g6Cmr6W9+L9hwnnBzBqxk=; b=0Ewy++wGgPMYxgNZwkiMD8E001ngyQUh2cwJL+EfCt2cH9nrB6TFCxJl4SYCVNSnJx 8gg98yPmKzxvw2K2LP4/w23124jqa1aEHtiJM8yjIs4rfsFz7ZqjUxQPOjKp4pLmJ1PR 6HD4LqMrsWiP0IX2XZTY46k5NTk3CxIIX8W+FXGzU0s7rBhilFktle1y3+1vq5chzssv drhEvBQ1oOtAp2DWpGEzYrtN36w8imwyqa5oulSsOb7z44CeBRTZoCvPSI5kv7jg+v12 3d0fi+TAPqDuD70hzhzpDuNHuSjLfnjr0CH/4+NqP9nCxojZMAWc5Qz1KMnPZZt6n//I EKGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="URh/Ae/u"; 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 96si1870300edq.24.2019.10.03.09.47.51; Thu, 03 Oct 2019 09:47:52 -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="URh/Ae/u"; 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 S2405549AbfJCQrt (ORCPT + 14 others); Thu, 3 Oct 2019 12:47:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:33284 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405551AbfJCQrs (ORCPT ); Thu, 3 Oct 2019 12:47:48 -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 0ECFC20865; Thu, 3 Oct 2019 16:47:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570121267; bh=seL4JwafJp8UZCv4oDKz5AUomDKOVrqUXEXpQSwlfAk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=URh/Ae/u69Hfg7sZKSAV9dZP9RNXyqPh7Abwb0QU2zWpZ8fEpL+B7j3ThG9hXvKLF 4wYA5OpFEoGNynmMeNicLBg6Qnbi3eqfEEMy2qDW5TGr2C1g+ZydzL1NTCj8LGKCJ8 ZEnfB+7Zd0w8SOFnTNaiPNc4AeFCs9ycxA4jOpRY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Matthias Kaehlcke , Ulf Hansson , Douglas Anderson , Sasha Levin Subject: [PATCH 5.3 215/344] mmc: dw_mmc: Re-store SDIO IRQs mask at system resume Date: Thu, 3 Oct 2019 17:53:00 +0200 Message-Id: <20191003154601.506214005@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154540.062170222@linuxfoundation.org> References: <20191003154540.062170222@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: Ulf Hansson [ Upstream commit 7c526608d5afb62cbc967225e2ccaacfdd142e9d ] In cases when SDIO IRQs have been enabled, runtime suspend is prevented by the driver. However, this still means dw_mci_runtime_suspend|resume() gets called during system suspend/resume, via pm_runtime_force_suspend|resume(). This means during system suspend/resume, the register context of the dw_mmc device most likely loses its register context, even in cases when SDIO IRQs have been enabled. To re-enable the SDIO IRQs during system resume, the dw_mmc driver currently relies on the mmc core to re-enable the SDIO IRQs when it resumes the SDIO card, but this isn't the recommended solution. Instead, it's better to deal with this locally in the dw_mmc driver, so let's do that. Tested-by: Matthias Kaehlcke Signed-off-by: Ulf Hansson Reviewed-by: Douglas Anderson Signed-off-by: Ulf Hansson Signed-off-by: Sasha Levin --- drivers/mmc/host/dw_mmc.c | 4 ++++ 1 file changed, 4 insertions(+) -- 2.20.1 diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index eea52e2c5a0ce..79c55c7b4afd9 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -3460,6 +3460,10 @@ int dw_mci_runtime_resume(struct device *dev) /* Force setup bus to guarantee available clock output */ dw_mci_setup_bus(host->slot, true); + /* Re-enable SDIO interrupts. */ + if (sdio_irq_claimed(host->slot->mmc)) + __dw_mci_enable_sdio_irq(host->slot, 1); + /* Now that slots are all setup, we can enable card detect */ dw_mci_enable_cd(host); From patchwork Thu Oct 3 15:53:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "gregkh@linuxfoundation.org" X-Patchwork-Id: 175165 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp581834ill; Thu, 3 Oct 2019 09:50:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqxB6gO5alAdbLl0JkO8be3PZ4jyG912vWGeiwq+dq/xQBkG2FYFdCJHSUz/4+C1krehAiSR X-Received: by 2002:a50:ab0f:: with SMTP id s15mr10517300edc.119.1570121422489; Thu, 03 Oct 2019 09:50:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570121422; cv=none; d=google.com; s=arc-20160816; b=b1vQd/asaw8rioyCz5OJZGUi8pVjjdPnN4CkpTtGFfCSkWFtPnsHHTvm9laU97VaKS /xZ7TRNIJvEkLc8o1qq+5rAqDhHHJdA5A1c9KSCIowFQZO/M3LU9U4rQO6W/1KZuqziT 1uIN7jwrk3lZibadEtHkX1XxaWj6mNBhGkK/S4SK1VaA5C6QmKr90RJrjMxZXBAmmAy9 0yPTpjBMFudyQHm25+EqR7x/x2+PNBkLMwey4wO9MN4g5qprVarPFSgH0FVlJhKUfwp1 sSzs1rSTwkc1Dnqan3Ru+ayaTA6yscT3VK2eyzU2C/nGRvV9KTTJfj+XO+pMG37IdWRp AwJA== 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=W3uzchdDUfkZ9gd1ywkf2DPg0es83fEdO0mu3YoqYBk=; b=ZZD2glRR5J8A8cWpz4H7+SY4cSgMNmIdcLgIGHcC1h3O2f4y44HhRIjRWLpMoximx3 BEQO7yuaG33lgRwvgG5uuBJniHmBZlR5Ki/0a3UvednUvD3pfxbr0OObcLPQqPlSr8i8 7D2IfyRjxBpvgNGzLgCw3tsy0FR5k1wyZvSKC0tIyLbqE27Tcr0QEpUvRoSaNsjmV9ev tOmkvjNpMZo6czEjkDJULpyn83+/aSwrqin02PV+c1DWC6ZSCC6kUl1I+na3O8PCoBzv r3ChQ71U0yN12Qom+8xucb2CHY2pO3VGqYT4/OtnnssEXWk++BBFFZC6y4NvaHbaMuAg E1Lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GtZggPUf; 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 v13si1734755edy.441.2019.10.03.09.50.21; Thu, 03 Oct 2019 09:50:22 -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=GtZggPUf; 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 S2405040AbfJCQuU (ORCPT + 14 others); Thu, 3 Oct 2019 12:50:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:37362 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404546AbfJCQuT (ORCPT ); Thu, 3 Oct 2019 12:50:19 -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 E42F8215EA; Thu, 3 Oct 2019 16:50:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570121418; bh=p4KhjG1+Btil1DJt/BXGtuxMmF2t2VXOhj88S3TeQ+0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GtZggPUfWu+YTwvBboMSKsQl30FqUCOxfjG7p1aJ+EbB0LsONY94Rq5DcCkn9ZPc5 L0i9dkjGdq8nAIGph7IfnEvx7ZTF0wYO2zuu6ox8gBFUD4P4Q0HhdYU6g43qKDXx7K 2uQmlQluGeZXiPMROq9+NTJemN4BEXQyuVuNxBzQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Guillaume Tucker , Hans Verkuil , Mauro Carvalho Chehab Subject: [PATCH 5.3 272/344] media: vivid: fix device init when no_error_inj=1 and fb disabled Date: Thu, 3 Oct 2019 17:53:57 +0200 Message-Id: <20191003154607.047447508@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154540.062170222@linuxfoundation.org> References: <20191003154540.062170222@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: Guillaume Tucker commit 79e85d1d2c16ba4907bb9d6a4381516b729ff341 upstream. Add an extra condition to add the video output control class when the device has some hdmi outputs defined. This is required to then always be able to add the display present control, which is enabled when there are some hdmi outputs. This fixes the corner case where no_error_inj is enabled and the device has no frame buffer but some hdmi outputs, as otherwise the video output control class would be added anyway. Without this fix, the sanity checks fail in v4l2_ctrl_new() as name is NULL. Fixes: c533435ffb91 ("media: vivid: add display present control") Cc: stable@vger.kernel.org # for 5.3 Signed-off-by: Guillaume Tucker Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- drivers/media/platform/vivid/vivid-ctrls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/media/platform/vivid/vivid-ctrls.c +++ b/drivers/media/platform/vivid/vivid-ctrls.c @@ -1473,7 +1473,7 @@ int vivid_create_controls(struct vivid_d v4l2_ctrl_handler_init(hdl_vid_cap, 55); v4l2_ctrl_new_custom(hdl_vid_cap, &vivid_ctrl_class, NULL); v4l2_ctrl_handler_init(hdl_vid_out, 26); - if (!no_error_inj || dev->has_fb) + if (!no_error_inj || dev->has_fb || dev->num_hdmi_outputs) v4l2_ctrl_new_custom(hdl_vid_out, &vivid_ctrl_class, NULL); v4l2_ctrl_handler_init(hdl_vbi_cap, 21); v4l2_ctrl_new_custom(hdl_vbi_cap, &vivid_ctrl_class, NULL);