From patchwork Thu Oct 3 15:51:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 175111 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp538057ill; Thu, 3 Oct 2019 09:15:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqwpT/IbWEKW4F5ESiktLiR1Uo0NiT8H1tdeErf/z7CXY5BzR/nfMNijzM3nzfBDjAgex79c X-Received: by 2002:a50:9eac:: with SMTP id a41mr10590590edf.193.1570119349240; Thu, 03 Oct 2019 09:15:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570119349; cv=none; d=google.com; s=arc-20160816; b=sfVR/AQaYcpepx5ZqxWDiu+hoVSMuC9gq/oGghLO2/NNVTqIphOUzOL9Wqw/tqf71g cDIn6SyrnukqcuqwG8DU6BuiXnuyPLH8n/3WrL+QXLPYvmWCERlVpGLGZpsqcwbCyiRk edir8aMLwoigY34RO4QUxktxRffeF33rMrj2Hji0rzwRJb0TyJvZjQVsKq7tccl3fyO1 MIORuNBUxe9JgibHXxfhsWkXAyQf6goojJ3bVVOk58epieT5cD4+O73d3vOOMkMIwvyP 8XEzZu4mei+fGanFSmYRdLokChfjVcbERSBUlRnPXbzkaEOWEKqnQpx5ccRuF6grjR1V WioQ== 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=87fRxmIUs5e3V5a82jMkk4zv83ahVA5y1pastdJYZd4=; b=ietL6EYPobgiIzHOVCQIfRv8hzUC/Xfiy48ppZzBAQeLaKVDYClQwJlgrisCPmKPYv TCtRUCN4iZVnP7nG8Tcw4QmAHR1U1Uws7e0O+Dv0YKbPCkmirqsd2R+81IGiHIBL+R8b OkGTor+RnlpED5CmT1Zpw5wlO83dSmgajLu0EkgKxA+fxCLWVmCYjjPsw3L7xqlGHPuT UR8u5CJJ1xJZkvwtMz+PldWwj0IeXy9F/ZffPNlxhHy+eLwPPlRuxpOU4Wsq4BQsOKm0 1/Do0I712b+E2HrimKMiXRPS7e4RATdnzQbh1wKMFyg8wt4vwCKn3ryz7ELqBvYFvyLU cC1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=aVo+SH95; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id os5si1413952ejb.61.2019.10.03.09.15.49; Thu, 03 Oct 2019 09:15:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=aVo+SH95; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387509AbfJCQPq (ORCPT + 27 others); Thu, 3 Oct 2019 12:15:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:40070 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732566AbfJCQPo (ORCPT ); Thu, 3 Oct 2019 12:15:44 -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 996AF20700; Thu, 3 Oct 2019 16:15:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570119344; bh=wzC2i8rWj55dG81tZm2kN6D/gSngbg12o66ItecxI1k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aVo+SH951+aKYddvjpIW8qQtuE6VcUfwAOqOwycnt5UD6lLDRgy3AicxxnztGoR/w vlvElBy8c7NSA7HGACu/4MGMh0X2dzWfW6Ym8Z6PUActhIJLCCIvj2upKpZ9g2maUS VpWL9GNynjOG14EJSJ0RDUTSSSu+yETf5e5Etz6k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Bjorn Andersson , Jakub Kicinski Subject: [PATCH 4.19 005/211] net: qrtr: Stop rx_worker before freeing node Date: Thu, 3 Oct 2019 17:51:11 +0200 Message-Id: <20191003154448.374654811@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154447.010950442@linuxfoundation.org> References: <20191003154447.010950442@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bjorn Andersson [ Upstream commit 73f0c11d11329a0d6d205d4312b6e5d2512af7c5 ] As the endpoint is unregistered there might still be work pending to handle incoming messages, which will result in a use after free scenario. The plan is to remove the rx_worker, but until then (and for stable@) ensure that the work is stopped before the node is freed. Fixes: bdabad3e363d ("net: Add Qualcomm IPC router") Cc: stable@vger.kernel.org Signed-off-by: Bjorn Andersson Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- net/qrtr/qrtr.c | 1 + 1 file changed, 1 insertion(+) --- a/net/qrtr/qrtr.c +++ b/net/qrtr/qrtr.c @@ -157,6 +157,7 @@ static void __qrtr_node_release(struct k list_del(&node->item); mutex_unlock(&qrtr_node_lock); + cancel_work_sync(&node->work); skb_queue_purge(&node->rx_queue); kfree(node); } From patchwork Thu Oct 3 15:51:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 175113 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp540654ill; Thu, 3 Oct 2019 09:17:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqz9b6fDGKVFwN1LJ0Zn0XKnqNocBXYttRn/D+YbukuTn5vU7iPF/A5RXcm1IOUsXMlqq4QZ X-Received: by 2002:aa7:c1d4:: with SMTP id d20mr10223928edp.223.1570119457827; Thu, 03 Oct 2019 09:17:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570119457; cv=none; d=google.com; s=arc-20160816; b=sAjtnh3CMw4B9+mB98tUC6VHFn9UqTMM1JQWHrvY5DE1sjguR41mM1hu0TKXow06jX Et3dvOey/xNK06XFyYnHB4E2qMb0lQTId2Vin23n8C/0+kWbndenQ5SsCnxtQhF5J60X mbnpndXXIgj9lSTU62vPNb17dBJJjdcTtIn9gb8Tal73hFn0ud1mtx6Tij4H8sNGH4iv otxhjdE0s5Clv5kkbOo2bBmRGwtKQrNY9yNfv2MyA09OzKttB4pdgUuRKUrl+Uiccxhg svrdAZ/jjvP/c9H7Ib/1+QK2CnFtJ4uYvcz/sZZKvp6lNBNZctaYTFl9r/Wh0sPIDE9U GxNw== 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=upB8/aCGRQZCEn6iu75OIl7TeO2ImUo0jpXV4tAqlSc=; b=Xj5nzn096GVN/9+lYp/w8PBrwfDJ8s/arh869tr+Utxuw7w+ZBxY2TCOgx8uJpCzLC E8hXhOO+0jYuDTfBRS1BRNgiqEPKJQ6e6EIcuHG7Hh+22tChgl8b2vJefrWVDkH7Spxg Blr43wDJSJJZ25V5C/JbGwv2JaEhvlA8pY9/gCijCmhb6m70SWRXeAG6B7Npeqwddtcv vONlGyXCrjEH6rkKRUVfwh5YyTHjRFF5flTrhQb2N0kOYE3XKLHzMUuLm1F+k05Vod0k VKpWZSiLRY874MK+w1iEzV/NRZbSkV1HLQb1qkKmxkX4DSZOo9fx8265nY1Ak1I4liBc PmYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iIFWplLG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b56si1782064edb.418.2019.10.03.09.17.37; Thu, 03 Oct 2019 09:17:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iIFWplLG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388196AbfJCQRe (ORCPT + 27 others); Thu, 3 Oct 2019 12:17:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:43368 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389259AbfJCQRb (ORCPT ); Thu, 3 Oct 2019 12:17:31 -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 6E32E215EA; Thu, 3 Oct 2019 16:17:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570119450; bh=IdPVXuf60uazzp9fR+CWv/TnPQCSTaI5VKp7xvYvocI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iIFWplLGq+ICmB99bmos7DoUX4Yn9eFMtKxauxX/t97qQH05h5W09Efc+CrS9IhO/ U7Ud9AV18hHZbwqTVlthZhzTud/t9uUsi96Sb4lZOsmX/W64fzdiya4/65juXyd1ai raiOJMMx1gNFCAP1nJaG2tQzv39YU4hrFB1G3ytI= 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 4.19 032/211] media: dib0700: fix link error for dibx000_i2c_set_speed Date: Thu, 3 Oct 2019 17:51:38 +0200 Message-Id: <20191003154454.531445479@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154447.010950442@linuxfoundation.org> References: <20191003154447.010950442@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 091389fdf89ee..c8d79502827b7 100644 --- a/drivers/media/usb/dvb-usb/dib0700_devices.c +++ b/drivers/media/usb/dvb-usb/dib0700_devices.c @@ -2442,9 +2442,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); @@ -2520,10 +2524,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:51:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 175185 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp627388ill; Thu, 3 Oct 2019 10:26:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqzjvXeCcOE3gq6qUx7M3CYeC5AJdKIYU+Y+YEYrsuwzuIQQ44X+Hx2lkrU/yPFvzDpbz0XL X-Received: by 2002:a50:f603:: with SMTP id c3mr10469804edn.208.1570123586715; Thu, 03 Oct 2019 10:26:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570123586; cv=none; d=google.com; s=arc-20160816; b=OTLmNQvTcExLuieN6b0hUBczaGBKdrtI8y1DuDj4Hiv08xAibMNDbfNUlZvIQQ7zpy SMq2h9DVBww02Ah16aMr43QCr8LEAmBgKKtdUHFa+f5dDCiCvaitDOwAwVpdCshQhLvX PWSny4H2+E7eEQYn3KignxZXAcQWYUxOQxADXJFJdY36BqAjEKculm2/dOuAzbCbfBZd 0gb+awS62gPusPbNUDJ6ixM4olBSGDGbif2+KF5VTB213ZLWrLf3WRh8cW+5FI8Gcnyr 6HgO+uMyu8FSb2SMuwwyDsRAft3BVOurD9mAF5nc2eX6fsw4Dial9c7RBDI/odhz4uDR A86g== 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=2cBVT5dic84Wu3NU2ZZaXR6q44Id+GDnuiDO5mib/20=; b=al66nfgIxYZaNYOQyj9ysioDSoiIW50suBsVPE0RXBfGJ5M3bu1NES7vRSacYOOD8L k2t/58XOzKTevWKpgFOom4JENc5hEhA2VfnendTlhhflhS95FaRxs5z0r6LP6d1a3/kU w1zM8gltGet44PbmC9ZVOSPDzvv8bUn6ASYezXWCWIy7wOarIS6UnrRTzL6NF8ADT0gZ v4RGkoI6AAohhQlgN+fQmi+9cexUgNVU7KbdoMQOjtVxwurhRCO/1OnwJDUJzpeJvRO8 /OCFTh869gnLIwnFLoC5P0tnzEJ0xpNnsac45ZauYyRqNoMp6Fl73nBswpr71BXhD56f vKbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zZkIU0fy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e31si1983577ede.199.2019.10.03.10.26.26; Thu, 03 Oct 2019 10:26:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zZkIU0fy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388914AbfJCQQG (ORCPT + 27 others); Thu, 3 Oct 2019 12:16:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:40708 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729580AbfJCQQD (ORCPT ); Thu, 3 Oct 2019 12:16: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 A624721848; Thu, 3 Oct 2019 16:16:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570119363; bh=U4nLDZyW+12AR45NjmA0NOq24LJ8YnQZNzJGzVI+V4I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zZkIU0fyxo3hUgEbLuKPtEkoomA8+Vp/NesV8rE7f4RgcK38zyrTtKVrWiXnnU+Wz 3HnyJ6BqfLz5Zv2HeLAm7OcbAZ1lAG3N7Denv4HwOcLcAkHlrNTQqxdIF8zLvyEtAd JtxT7CoYcZ3fKiCim4++78J1xSRvCRSYEWaAbHis= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vincent Guittot , "Peter Zijlstra (Intel)" , Linus Torvalds , Thomas Gleixner , Ingo Molnar , Sasha Levin Subject: [PATCH 4.19 038/211] sched/fair: Fix imbalance due to CPU affinity Date: Thu, 3 Oct 2019 17:51:44 +0200 Message-Id: <20191003154456.085032239@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154447.010950442@linuxfoundation.org> References: <20191003154447.010950442@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vincent Guittot [ Upstream commit f6cad8df6b30a5d2bbbd2e698f74b4cafb9fb82b ] The load_balance() has a dedicated mecanism to detect when an imbalance is due to CPU affinity and must be handled at parent level. In this case, the imbalance field of the parent's sched_group is set. The description of sg_imbalanced() gives a typical example of two groups of 4 CPUs each and 4 tasks each with a cpumask covering 1 CPU of the first group and 3 CPUs of the second group. Something like: { 0 1 2 3 } { 4 5 6 7 } * * * * But the load_balance fails to fix this UC on my octo cores system made of 2 clusters of quad cores. Whereas the load_balance is able to detect that the imbalanced is due to CPU affinity, it fails to fix it because the imbalance field is cleared before letting parent level a chance to run. In fact, when the imbalance is detected, the load_balance reruns without the CPU with pinned tasks. But there is no other running tasks in the situation described above and everything looks balanced this time so the imbalance field is immediately cleared. The imbalance field should not be cleared if there is no other task to move when the imbalance is detected. Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/1561996022-28829-1-git-send-email-vincent.guittot@linaro.org Signed-off-by: Ingo Molnar Signed-off-by: Sasha Levin --- kernel/sched/fair.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.20.1 diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 49ed38914669b..ad78a15bd5677 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -8863,9 +8863,10 @@ static int load_balance(int this_cpu, struct rq *this_rq, out_balanced: /* * We reach balance although we may have faced some affinity - * constraints. Clear the imbalance flag if it was set. + * constraints. Clear the imbalance flag only if other tasks got + * a chance to move and fix the imbalance. */ - if (sd_parent) { + if (sd_parent && !(env.flags & LBF_ALL_PINNED)) { int *group_imbalance = &sd_parent->groups->sgc->imbalance; if (*group_imbalance) From patchwork Thu Oct 3 15:51:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 175183 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp626676ill; Thu, 3 Oct 2019 10:25:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqwsCK/Za9JARZIKXhEPJzfA9OiLUhY66GsmWVybKeZQLCIsTmipaO6q3UFSY2xn8l/R7K/O X-Received: by 2002:a50:f0dd:: with SMTP id a29mr10740368edm.219.1570123551482; Thu, 03 Oct 2019 10:25:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570123551; cv=none; d=google.com; s=arc-20160816; b=lqk9RtqiGX75A0ELNPEwoD80WR++FSyrzxe8m+e+xLE62yk8SeqZkmy12IWYsS1MUG ZNrrDWFY64zPbcyQVDrS0XAypNnEQlLLHZiwVQKpuI4Vb2L4HaHNSDsEr4hqLrk9xZea GyGf6OXKzEpVy7H41Q9BNq1vvRW8ygIsFRwinxIyk1gj6r2THYFXTnLsXM4KG6Mu7zdv jeBH4zUWH3d6lQBAlkYratWC8PMwCsKPxgjwSgbHyAalhb+YZeLzygs6qslORxi6FJGe l2S3STt6kEmUIF9zSyiglmc4guVcYWSuVjsXTqIT/YYOLVnO9h+m+BDH/MglYXcnBrDz HqhA== 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=z7SMPKqk6SPxfkVw6ffCpHp1FQu2jB4Ozv6D257BEjY=; b=qR0E7nCYVhSqn/hW3Mf/yod592nKxQApJxJLBGGzw2qiRxWW3Acz9825RpwxyKbHy0 kKeDcZ14xRhbwFpRhc9bXsPBjfTxy2PwlQuqn42PQxgPIm73PY6MgC2HOpyfesbTPZE4 z0U+qTFB/L/myTVkg2DVBMj+XxXqGnHmxmDBxQ66BJ76oiN0fxbCtVMjds9nFfGjoalw eMMS4c9e4hnqF8Di8E1UdysWk875MTdaCkumy1cQZlT2GmPEpFcKxoES+rL/+58lhDYA jQ40CU+D5Ya+B55b+en5K2qFsMQO5yAuhib2GQ4c/tK/fNQF388uKPN3FLbEcwAwmtS4 sbvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pe4NTrju; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z6si1827261edx.139.2019.10.03.10.25.51; Thu, 03 Oct 2019 10:25:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pe4NTrju; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389035AbfJCQQh (ORCPT + 27 others); Thu, 3 Oct 2019 12:16:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:41604 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389013AbfJCQQd (ORCPT ); Thu, 3 Oct 2019 12:16:33 -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 0937D2054F; Thu, 3 Oct 2019 16:16:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570119392; bh=xKTppu/GDfJLMQWpfzwwiblwXnUW9uwticGihbh1hF8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pe4NTrjuXVzmX6QmPq3lfp8gNsJ5O6QLK1wUA7jRL23cQV4iYstawmgQ0msn1dL6F kf7TT6Oz5/8GOCTJmbKKQdvxlFvQwneynazc2vfHiB2y7BUOvIRsm35Iibzz4AocMJ 6W4njwH1DdEp3j8yBL00x0rP8h3lYAp0DWaVqdtw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vinod Koul , Vaishali Thakkar , Stephen Boyd , Bjorn Andersson , Sasha Levin Subject: [PATCH 4.19 048/211] base: soc: Export soc_device_register/unregister APIs Date: Thu, 3 Oct 2019 17:51:54 +0200 Message-Id: <20191003154458.978461649@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154447.010950442@linuxfoundation.org> References: <20191003154447.010950442@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vinod Koul [ Upstream commit f7ccc7a397cf2ef64aebb2f726970b93203858d2 ] Qcom Socinfo driver can be built as a module, so export these two APIs. Tested-by: Vinod Koul Signed-off-by: Vinod Koul Signed-off-by: Vaishali Thakkar Reviewed-by: Greg Kroah-Hartman Reviewed-by: Stephen Boyd Reviewed-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin --- drivers/base/soc.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.20.1 diff --git a/drivers/base/soc.c b/drivers/base/soc.c index 10b280f30217b..7e91894a380b5 100644 --- a/drivers/base/soc.c +++ b/drivers/base/soc.c @@ -157,6 +157,7 @@ struct soc_device *soc_device_register(struct soc_device_attribute *soc_dev_attr out1: return ERR_PTR(ret); } +EXPORT_SYMBOL_GPL(soc_device_register); /* Ensure soc_dev->attr is freed prior to calling soc_device_unregister. */ void soc_device_unregister(struct soc_device *soc_dev) @@ -166,6 +167,7 @@ void soc_device_unregister(struct soc_device *soc_dev) device_unregister(&soc_dev->dev); early_soc_dev_attr = NULL; } +EXPORT_SYMBOL_GPL(soc_device_unregister); static int __init soc_bus_register(void) { From patchwork Thu Oct 3 15:52:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 175181 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp620127ill; Thu, 3 Oct 2019 10:20:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqy8OxTjxRlDEJDjYaZq7hVoPPNR/bzwTzfczWpLj7oboYhhLDlF9h4QvNb3hyk92gfRo8Xv X-Received: by 2002:aa7:df14:: with SMTP id c20mr10732831edy.133.1570123212862; Thu, 03 Oct 2019 10:20:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570123212; cv=none; d=google.com; s=arc-20160816; b=USU2oneGTSIEJ6Hhix/uvwOc4BwmtJn9PbmGnoVids+pQxa5xFTM5GmmYP/6/AXiDM GsNjvId7YRBCyIgebs4+GIUxy3PYYfTnOYKK/xk7qdFO6y+g2ZtnxznMsvBUeWrG/teH y+RP5uuPit0nlc9ano2W5LOTOzBwdDVgX9X2/+YjvjMdEURQC/dP2HtnXiH6Y7NRmKB7 nyzJYZvrm5BBxEPU6UrvHsuhzIt7sWJKLxUg8nNFl9L4tUvIwz7waeDvGynwX6M3SxzC oU/KX87z21NYtYbqetXQX8hzJzUJktDYl6RKbFokEQsjeI7jfupuDuvOGCOD768m78k2 yvZA== 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=5R13D3I3AaMwlb+m81wivDuZHa5HsF2F5a1qRkuyBvg=; b=o9ZVjhqyrF2on5hrdzwLgbMPRVVM5nQh4J8d+8TtpW+rnr5wBS1ZZ3P1S9X4GTAWT8 4I7gx7l8GRRsA34bygIf5fuX6+Y20m9+WSJ0yZYwuY7uOaNHTZ9YCWIiyx+EFnSdlGGX BozbRSGzASAPRVNIAmxh8UWY2lJvBkXCDkor5Nz4Lb9BnQ2MsUMsa59G7hy1R/2Q8rjK QS4GHMpwvkLTptSlrG2jSnA92G628cwpTpA0Yz7WtE+uPk9I/QUILCnqrktMNx8VKSSu PNy9Sc2eWEMHXBtfoq2sVNorNdVr5n29uATHJeRP4uJ/24xakwnWS692Pj/fX36bRkyz br8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cl3iIDIP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i17si1602939ejy.374.2019.10.03.10.20.12; Thu, 03 Oct 2019 10:20:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cl3iIDIP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391008AbfJCRUK (ORCPT + 27 others); Thu, 3 Oct 2019 13:20:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:45652 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388806AbfJCQSy (ORCPT ); Thu, 3 Oct 2019 12:18:54 -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 3F66D215EA; Thu, 3 Oct 2019 16:18:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570119533; bh=d4ncFyiCsd77a457JAwmaPtaDLK0wuqOVsHZty0nllA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cl3iIDIPzWye/+hBgRNcbeDGIbey5WPY1IpVDqseQdnH2swkTGHNtjlNDt7zxtVrY XfNOfvecHs/BosCu5K5zqITLJzT2G2UPqjYTpghtxyP66RzZn6SdCJswp2C+2VaJph ePexUnVBNnAA9GacgCKUNyjg8iwhTHlCRgfJttX4= 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 4.19 073/211] dmaengine: iop-adma: use correct printk format strings Date: Thu, 3 Oct 2019 17:52:19 +0200 Message-Id: <20191003154504.592616869@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154447.010950442@linuxfoundation.org> References: <20191003154447.010950442@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 a410657f7bcd6..012584cf3c17b 100644 --- a/drivers/dma/iop-adma.c +++ b/drivers/dma/iop-adma.c @@ -125,9 +125,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); @@ -315,9 +315,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) @@ -525,7 +525,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); @@ -558,7 +558,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); @@ -591,7 +591,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); @@ -629,7 +629,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)) @@ -692,7 +692,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:52:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 175180 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp619021ill; Thu, 3 Oct 2019 10:19:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqxmC7P/rYlypqSgXW+2OE19v5ATHn6l6UZ9OQjQXkx3gbSkQTYWZFlu1Kkk16kGAxGNu47u X-Received: by 2002:a50:ee10:: with SMTP id g16mr10691341eds.267.1570123166376; Thu, 03 Oct 2019 10:19:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570123166; cv=none; d=google.com; s=arc-20160816; b=sNrzbbqc4m9sMnmxJj1epMoQUy5uhV0IIbBdwaR6u0HTId85w5J62HT75nHi4aN3su YMKklhQIBW0664XTXLqnLJLM7Z+1dsu7iYRGj/UAbQwqQtq1EVlPQrZ8lmq+to/DApmV RSSaWJNPN4HKMr8l0buzlDq6PzemiWY7DziiSt/HIVCfqS6gfhY7W7ELZyd9/Yke0p/7 20h6O7SDEOCGv+lEOeJV/AFGSvxWnfPJI73n92agX1gLd6PHhAQ0ARqMcQfniwQ56I6h 6tAzyBtuRxw0YUSyfwk/U5RxTqv4V2tkZiE6YlIdRA8ItnQOX12Qyo6ORUKKtrEkK03a Ph8Q== 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=+Ykyth3w6e1UJf8EoVG4DsuklbFrgVLfob+veYDTh9U=; b=ZA+o9kta+Ip9GuRP8E/E9rddGrqWBOS9eQQsqd+tBJpPJ1rD58/PAsON3Knacb+JHx /dc7yXCIZLh0yPVx51VfSFejpdyqDhcnx88hlyIb3wIEipK2a0BTdND7QrvDnbnDu85H rDM0pKNe1fSGkpJMV9pXQSjWaIwfp8LfXbIdNpoqMjgNJwW4YB7NSewq7r+ldB7OlJ8c i421TxatCg4f8jxE8erx+0PNzwe/RciUtYZwuL8Ghc1im4VOTUkrXxNeWQtvVll6K0Tx 7w+fVPiqOUK85bCjWEbLay9mMnek3Lhh8Y7txRlxqgUIkOCnn7Ih97/IsosbuDa/oy52 0/RQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=OSmchad4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l18si1871601edb.155.2019.10.03.10.19.26; Thu, 03 Oct 2019 10:19:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=OSmchad4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389760AbfJCQTt (ORCPT + 27 others); Thu, 3 Oct 2019 12:19:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:46830 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388864AbfJCQTk (ORCPT ); Thu, 3 Oct 2019 12:19: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 4C4DA215EA; Thu, 3 Oct 2019 16:19:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570119579; bh=++ww0M8FldhONH/sKfUkcOspcDTMgTrhuVQH5MzsDWA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OSmchad4Um6hy+Pr83Aklb0rBHJYqLcxWNmXN4Yw5BVezrWTUnEma2MJhalXpAJs7 +5n1n7eTsa7ukAcshdaBis/zJ7vGB0t53nyGeMhGdZpFFYu0goOfaZZhwaH+0YLcv1 w5djtKWRPffgTGOz5jRlI/9ewqICjwyYD8hj+CBg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kbuild test robot , Arnd Bergmann , Sasha Levin Subject: [PATCH 4.19 079/211] net: lpc-enet: fix printk format strings Date: Thu, 3 Oct 2019 17:52:25 +0200 Message-Id: <20191003154505.453039402@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154447.010950442@linuxfoundation.org> References: <20191003154447.010950442@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann [ Upstream commit de6f97b2bace0e2eb6c3a86e124d1e652a587b56 ] compile-testing this driver on other architectures showed multiple warnings: drivers/net/ethernet/nxp/lpc_eth.c: In function 'lpc_eth_drv_probe': drivers/net/ethernet/nxp/lpc_eth.c:1337:19: warning: format '%d' expects argument of type 'int', but argument 4 has type 'resource_size_t {aka long long unsigned int}' [-Wformat=] drivers/net/ethernet/nxp/lpc_eth.c:1342:19: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'dma_addr_t {aka long long unsigned int}' [-Wformat=] Use format strings that work on all architectures. Link: https://lore.kernel.org/r/20190809144043.476786-10-arnd@arndb.de Reported-by: kbuild test robot Signed-off-by: Arnd Bergmann Signed-off-by: Sasha Levin --- drivers/net/ethernet/nxp/lpc_eth.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) -- 2.20.1 diff --git a/drivers/net/ethernet/nxp/lpc_eth.c b/drivers/net/ethernet/nxp/lpc_eth.c index 08381ef8bdb48..41d30f55c946b 100644 --- a/drivers/net/ethernet/nxp/lpc_eth.c +++ b/drivers/net/ethernet/nxp/lpc_eth.c @@ -1371,13 +1371,14 @@ static int lpc_eth_drv_probe(struct platform_device *pdev) pldat->dma_buff_base_p = dma_handle; netdev_dbg(ndev, "IO address space :%pR\n", res); - netdev_dbg(ndev, "IO address size :%d\n", resource_size(res)); + netdev_dbg(ndev, "IO address size :%zd\n", + (size_t)resource_size(res)); netdev_dbg(ndev, "IO address (mapped) :0x%p\n", pldat->net_base); netdev_dbg(ndev, "IRQ number :%d\n", ndev->irq); - netdev_dbg(ndev, "DMA buffer size :%d\n", pldat->dma_buff_size); - netdev_dbg(ndev, "DMA buffer P address :0x%08x\n", - pldat->dma_buff_base_p); + netdev_dbg(ndev, "DMA buffer size :%zd\n", pldat->dma_buff_size); + netdev_dbg(ndev, "DMA buffer P address :%pad\n", + &pldat->dma_buff_base_p); netdev_dbg(ndev, "DMA buffer V address :0x%p\n", pldat->dma_buff_base_v); @@ -1424,8 +1425,8 @@ static int lpc_eth_drv_probe(struct platform_device *pdev) if (ret) goto err_out_unregister_netdev; - netdev_info(ndev, "LPC mac at 0x%08x irq %d\n", - res->start, ndev->irq); + netdev_info(ndev, "LPC mac at 0x%08lx irq %d\n", + (unsigned long)res->start, ndev->irq); phydev = ndev->phydev; From patchwork Thu Oct 3 15:52:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 175122 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp548826ill; Thu, 3 Oct 2019 09:23:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqx4XFInlnvqkvlRo1Qdp0P4IKYQoeTxJEzGw1f+gXL49mDMdUEoBs8CTZyup43m09k7VtBt X-Received: by 2002:aa7:dc55:: with SMTP id g21mr10349122edu.210.1570119705375; Thu, 03 Oct 2019 09:21:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570119705; cv=none; d=google.com; s=arc-20160816; b=DLVLpzysI+6DfE0EZwhGoGvM2GzIOaBB2oq1Qf0vNcTJocz5O2O6cJhHxqiPaWcFxs yXQUycjKk7RbcxNuwkYwlwIc2roLfo4F7KbPAL/Ev3eFQ99R8dYAcmVO0bcm2mlSx/k3 w7N4bAz1LtxLddauI+oriOK6yxPHQkainjqZdYoK7IC0zei93pkMoYjysqm9X/XbZreQ gVYX8q2NcJkbwZ48tk71xlr0/xpwmy/UV6q8dU90Y6W3Ge+YpIc43TkRXMgYnxvQbr21 IO0KDR0DC0FBpXMUy2Rk/paLZG/zCB7zqjM6bmkzykTnIpVbxpbl3L3nupkKCpnoL1TH f7Yg== 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=YOWuqtAz6zfw5sLwjKHmhMjJpip81hPamPrzqU55Jaw=; b=Q8eFUCDGkzIk5OVQyBKDO4tKwWSvEYyCUC9V3BVABVm8kjN4L/EhsgUh/naF5Lp9rR tahg/uzk4USf6PpwGGfv7xJY7u/GjqU9KKiWJtkTiSr5kgj+odptRk5cQFZn9c6jV6QC TyLrovmUs/LqZ+HOQZ1/QtltxNat7Gt/uf8I+p6/An40fnYuXFC4tGn6SWLRsCkt0Mdy HEw8FsfAC2yQVH9dSDBc/R6DC/xxxhPlDNdCa0wJLSK2SDmJgKY71hm5a5GMKmPnOFey 5LPs6Wc4D/ptMLe/eQhfemlAsRO8bQzlZYVPrZ/e86K3DsvPVUrBSmYA11onX6ke+tZL a3WQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fHy1CKFp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z42si1802789edz.23.2019.10.03.09.21.45; Thu, 03 Oct 2019 09:21:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fHy1CKFp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390186AbfJCQVn (ORCPT + 27 others); Thu, 3 Oct 2019 12:21:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:49980 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390178AbfJCQVk (ORCPT ); Thu, 3 Oct 2019 12:21: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 D4FAE21783; Thu, 3 Oct 2019 16:21:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570119698; bh=kfvdiciDmqZ1VtqoBpuDh3Z6dlpATwLZE7GsvgO6uLo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fHy1CKFpfxYeXOuYiPAN9W8N8ZVW32IgqV4OHMigoY6NJlLb69cv+4ek2NaHypWvm dFLfF2Dm3G5ANkbGNyS/ZOwCilCns8HYFEZ+sp4bId/10gWOD4dNTWpYCfBfIM+zBB xyKHWeugmhCK6lcKwb/8t+l01JHDYRlAdTh1qoig= 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 4.19 111/211] ASoC: fsl_ssi: Fix clock control issue in master mode Date: Thu, 3 Oct 2019 17:52:57 +0200 Message-Id: <20191003154512.786799494@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154447.010950442@linuxfoundation.org> References: <20191003154447.010950442@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 09b2967befd96..d83be26d64467 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:53:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 175119 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp546197ill; Thu, 3 Oct 2019 09:21:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqzOYrwnFFQWtC582QrTE2G0GaRvlV7KsT3K4tUcbU2T5fBiikKaFwZ3QWHNa3O18nM6kF/4 X-Received: by 2002:a50:f391:: with SMTP id g17mr10259641edm.163.1570119702707; Thu, 03 Oct 2019 09:21:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570119702; cv=none; d=google.com; s=arc-20160816; b=kmoxsvXKpuythddadGGO5B64RS7sPNx6f7gIsYEQHGExRZBHFjZQNtAMuSqR50K0es jqqGHuiMCWMf57hlxIwXUjcTdDVkUcotXLFT0VLK0Z30/U/G0tBBTBE6GmUBiKLrJnKh 4USqqcwyNji0RKot8jIPBA149FfSn15FtViz4eUAn9dkWurkhIfcG7ZA9YLdzAHsLv6j hYdKFPoxKgR6dK+k4VMHWQNb1eHQLlW7+jp3MEuYrYUyVAd06cVSfm6hdBvgCaObxHiO bDULWBk6t3y2ynZSf5dxc7VsHuzNnqxchwFTvSOP0+hBgHDnNmsha+2rsoZ7Kia+rru1 oWuA== 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=SGHII7qbAb1qN9p+qykbwY439YYsMKZefJb17SdqEqw=; b=qJUOjvxWp7T2vPJdfP1tNrFZbiubh3HMJbTy5lPwa0L9QrS1a5zfHbEt8ExWIc5cOS NZu6ZI8J4p1MVDDQckHFNKQXVe/nNKS/LSTQ9xLt0VEM0x73x8FRX6fRpscO9cIsM8yX qajtaACJC+3rYqdfuuvkaafNTV8jKUQeozoy5e++xqb/T/4J6LPhRR0OlwpButMuXGi3 MDMzgnTdXhckh4RpfSOrRRWRi648AtMwIN1/PQg+MZWmBhA1saEi8qdIABjBZNiIwFb+ QWEKosIlSyqq0A0I2idQLcGvJKwj3F04Yy0a0HbeaKi5JVkc1tnA5HbFOZeqNYctWyHt sVUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DaDfyAqe; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z10si1517685ejp.397.2019.10.03.09.21.42; Thu, 03 Oct 2019 09:21:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DaDfyAqe; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390180AbfJCQVk (ORCPT + 27 others); Thu, 3 Oct 2019 12:21:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:49940 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390160AbfJCQVg (ORCPT ); Thu, 3 Oct 2019 12:21:36 -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 3425821783; Thu, 3 Oct 2019 16:21:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570119695; bh=ynYx037q2k8foXoI60jbKLN69/59PWUHOAgkDPUJ1Ok=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DaDfyAqe0GAfFudHZqOAcpTLJsehblxP3qd722v6568sMXNEC2CPiPbcr6E48MD4Q hwnngyPBzkrXlk3umhAIKup/F7dghwM+9c7o0ZYiSpxH0L93aB0zuP9O9EdYzM7g5z ewdb9xtvV4G5kBpfY0G/uEsNcL44antCHkqxJOFs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marek Szyprowski , Krzysztof Kozlowski , Sasha Levin Subject: [PATCH 4.19 120/211] ARM: dts: exynos: Mark LDO10 as always-on on Peach Pit/Pi Chromebooks Date: Thu, 3 Oct 2019 17:53:06 +0200 Message-Id: <20191003154514.603976927@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154447.010950442@linuxfoundation.org> References: <20191003154447.010950442@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Marek Szyprowski [ Upstream commit 5b0eeeaa37615df37a9a30929b73e9defe61ca84 ] Commit aff138bf8e37 ("ARM: dts: exynos: Add TMU nodes regulator supply for Peach boards") assigned LDO10 to Exynos Thermal Measurement Unit, but it turned out that it supplies also some other critical parts and board freezes/crashes when it is turned off. The mentioned commit made Exynos TMU a consumer of that regulator and in typical case Exynos TMU driver keeps it enabled from early boot. However there are such configurations (example is multi_v7_defconfig), in which some of the regulators are compiled as modules and are not available from early boot. In such case it may happen that LDO10 is turned off by regulator core, because it has no consumers yet (in this case consumer drivers cannot get it, because the supply regulators for it are not yet available). This in turn causes the board to crash. This patch restores 'always-on' property for the LDO10 regulator. Fixes: aff138bf8e37 ("ARM: dts: exynos: Add TMU nodes regulator supply for Peach boards") Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sasha Levin --- arch/arm/boot/dts/exynos5420-peach-pit.dts | 1 + arch/arm/boot/dts/exynos5800-peach-pi.dts | 1 + 2 files changed, 2 insertions(+) -- 2.20.1 diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts index 57c2332bf2824..25bdc9d97a4df 100644 --- a/arch/arm/boot/dts/exynos5420-peach-pit.dts +++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts @@ -437,6 +437,7 @@ regulator-name = "vdd_ldo10"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; + regulator-always-on; regulator-state-mem { regulator-off-in-suspend; }; diff --git a/arch/arm/boot/dts/exynos5800-peach-pi.dts b/arch/arm/boot/dts/exynos5800-peach-pi.dts index d80ab9085da19..7989631b39ccf 100644 --- a/arch/arm/boot/dts/exynos5800-peach-pi.dts +++ b/arch/arm/boot/dts/exynos5800-peach-pi.dts @@ -437,6 +437,7 @@ regulator-name = "vdd_ldo10"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; + regulator-always-on; regulator-state-mem { regulator-off-in-suspend; }; From patchwork Thu Oct 3 15:53:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 175115 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp544116ill; Thu, 3 Oct 2019 09:20:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqwJVCpZiUU5dsgim/i1FJCncqhpiw3y1x2On/h2EZQ7+es6Xw1ypl9NM1eNV8eM1IioTxIV X-Received: by 2002:a17:906:7294:: with SMTP id b20mr8385674ejl.216.1570119610207; Thu, 03 Oct 2019 09:20:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570119610; cv=none; d=google.com; s=arc-20160816; b=QgD7Z8IzYYwolWngvNQwMqBNSNUM/UUnICQX32E02NySn860vY1wblJNdb5ZQ2o7xg h1nHvQidjB8+ypYZDhCASj0TtAR9T7yMcGxgcOVnhyR79p/IkN/7FrmhbrFjLnhYbhGu z2tkj+ItRZ126twQiNNh5M5jI/vN2QuHYKB6DSoG5vb4Dm623zrAI8KsfRL6AWYsndB6 Ovz8xpCm5IZ2yPv0jPzmzrvzHALBVTQEWxM+Upj0el/etyzFSeJ26jYjvd/WPjxxp9LY Jhb+FFYLhIooileg/E2pIqkSWUtGWa+9njmPTxtSO+wa7ErycvTHRxBVeTVl/Fv8SZND Ea5A== 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=TngP3fnIK1Z6W1U1UVxfZzFDFQziVUeMik3CePENUBnJral8Ws8osykSEO4/wXmxwF 54VICy/50wkuL8nkUhZRxKvbSU6QJ2oAX+GaxJP7MYKbcFrkCG2gYK69O+VVdUPsC4X7 3H4f4z01dmBpw+ts9YZGSUVcnTVU7yFNTa2ZE3fNdUZOp8Bp1KO7Bv921PQ/b4uY5ZEz dWnaHAZ1isKGfquaJd4Oe7jPkl7YC8eiYKWQaK+bLoWMvkzHuRH2CLsKQVFhdGi45wMS XBp7w4mCg/8C7vEWfZ+1O83a3/GKTgmAJiNlLMTfLzGUB0wbyrvrKrbvI1ILWCwHwd4O 2hmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SbhfTtUV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ni5si1589144ejb.184.2019.10.03.09.20.09; Thu, 03 Oct 2019 09:20:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SbhfTtUV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389825AbfJCQUF (ORCPT + 27 others); Thu, 3 Oct 2019 12:20:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:47342 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389813AbfJCQUC (ORCPT ); Thu, 3 Oct 2019 12:20:02 -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 F0F1B21848; Thu, 3 Oct 2019 16:20:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570119601; bh=LHr0zQNTuWMvB8KfJDg2lp4+b/SuKXqID+v+rc6sg8g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SbhfTtUVr45RA8YEBSx9mJosWvAtDbmAxlobTW/xdXFILQ5c26dchFp8zRIYvbqru z6gBPp5T5rVH61Gssx4Wg78CN8XKIrqD63PUw+Vi/sM9XD7imWTO+gJQ1hw2OCQJwC VFVr+wTM+POdRqmlzJl5hGOaumwV0N3PfyBr793M= 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 4.19 126/211] dmaengine: ti: edma: Do not reset reserved paRAM slots Date: Thu, 3 Oct 2019 17:53:12 +0200 Message-Id: <20191003154515.588298715@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154447.010950442@linuxfoundation.org> References: <20191003154447.010950442@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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:53:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 175121 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp547155ill; Thu, 3 Oct 2019 09:22:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqzk9exjJ/QaLiwtL8q7skMhKMf/alpbi9nXynC0PrNdEFJ6sIVSSTva8Y5rxu95kSovxvEx X-Received: by 2002:a50:a7e4:: with SMTP id i91mr10751589edc.9.1570119627367; Thu, 03 Oct 2019 09:20:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570119627; cv=none; d=google.com; s=arc-20160816; b=VBkwmN7ODUnhMe8iYCTtlRcfIx2nzGYIjOcmnpnD2AGqbUTZqbsfCFq+m2v45etfnM SpDtLv4aYsLTaV3obpyEEKuWvcNr5d6m4ZNut247wS8vGw7OFmnSrbbSg2zJsgpK9EYt X9faqz9ZeeYpi3jtSCCdIedmcBQqm5M4G3aqnfhJDnl/Xp10dgTFaJjEuOHzSx1Ok5Vq jMITQoL0OK1HjzdKQTaqUDJRKSe7WhW+DW/l2Bow1S38hxmW80ivsGXEgWTKnxl9MpJm w0e9gHAM9qgIZGqLwV/Zq1Y87vMe0bVazIeCmnFzdeZ+EzROM4X9INpLFlryN8CODHRh njQQ== 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=nTEUTzKCYKHQ//W/2PmIV/t05oIW+b8KM7NKmQA0r4k=; b=S0vmDPYX88ndSx6USWdV+E0SZRJ2N8Mg/OrBOa3fy1D9MHpxKgMCVA4WrYOu0dXtn9 l78AZGy0B3fjZpwoF8eWswUBpoIwfLl1T2+4nuw7HXBG+L4XipGI6uk2cCCHDGltXWF6 R3mqOy/N/1TruH+622T5+YT/RdGZWQhQwaLVNRnYHi+G1jHiAHSAzMDkTuTOuY/Ktcix nDVXz8mP+WP6flqW9ZHs16qdhvv7lAmi/yK3q8trytF6Kb2Bl3sKDBBxxqmcknAPzTch XnuWKbim89N2bSYgFuK5/YpOwKhxp5LGrX7Qsk282X5kaKV92aY/W6sR1IA3OFQbMl1P LZ0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GdSdZcWr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y64si1851409edy.434.2019.10.03.09.20.27; Thu, 03 Oct 2019 09:20:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GdSdZcWr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389892AbfJCQUW (ORCPT + 27 others); Thu, 3 Oct 2019 12:20:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:47868 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388650AbfJCQUT (ORCPT ); Thu, 3 Oct 2019 12:20: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 034A9215EA; Thu, 3 Oct 2019 16:20:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570119618; bh=fLXXfy+8DeSWD+W67ibSeRkxDybWu5Ovr0GanZ2/0q4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GdSdZcWr61nFHw6zbUi2lQIr/xgLALYVaisaww+k7aXo+MJsFydDBWYdY23+kCxrk BufK8hS2LyN1pT5u7mF/U3RP1hA9ZmLp/osr0gZunmHj4v2AQfvzIZIn9Sh9gOGrk5 Jk8Q3BMX57rwbHQKlL66lH40iAuBJygIzTC0NFS8= 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 4.19 131/211] ASoC: dmaengine: Make the pcm->name equal to pcm->id if the name is not set Date: Thu, 3 Oct 2019 17:53:17 +0200 Message-Id: <20191003154516.761460881@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154447.010950442@linuxfoundation.org> References: <20191003154447.010950442@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 30e791a533528..232df04ca5866 100644 --- a/sound/soc/soc-generic-dmaengine-pcm.c +++ b/sound/soc/soc-generic-dmaengine-pcm.c @@ -313,6 +313,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:53:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 175116 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp544679ill; Thu, 3 Oct 2019 09:20:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqyolyCQqAGRur9OdORxkYc3cm64+2Jtpgp+o+rZCTRSh2uIgjYO8YQWIZ3gvIv/ZykYPJ51 X-Received: by 2002:a50:9fce:: with SMTP id c72mr10665802edf.166.1570119633008; Thu, 03 Oct 2019 09:20:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570119633; cv=none; d=google.com; s=arc-20160816; b=Lf+FMPestJHTc0l8vQ9MshzfwSrTMTV5xRcZYqzHwVZs56EAWCc3s5QUPSDb9Ls6H1 7AB+0v96KbFA8H3De7f0PWeqd9r4QfY9Mz2vqhjvmCT6LgSyy6XXwVqRFNp3ngGirUby c1uNopJ74lEB53BY6Lve+ALzpli3ieh6xauUv7tEdQm86r5TuzXkTXptpSh1OThGIL1A 1P3KR2A2nsef0MLS5rTOVwYa1408kwHpp/x/UMKfNKupaQjbMWg5VQzpt9X6LHsiFkTd wx+NU1CjAOAHZuzbidpePDEqrvgZsbRyh/Ui2VSOmiGdu+YvVC/nNytxwD9MDcCQ32lT H/rA== 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=tIpYS8oFUA2r2nmu5RaoTXSFHGgZywp98OPMpXQ5Wko=; b=j0QB6PelGV6ihki3dAt83d+JzsVYADEnGJPDpHxONZiTy8S3LA+NGfruTo3W343o+C JJ5z0u+vIekYWYHWkOHweL+Gv5GfQTKZuSHKD7m8V48aVgpAemAtjppfqpYLEzrB9Fd7 yZp/W49e9EdATj2Hl5P/b5nPpHUiqPR/S3hrfbbB6Jt7yz4mEkcpaU+r2a6eDsr5PZI0 EbX1pYvsXVgDCBGkuKekhKz1kfF+bxo39LmJKVk2WFNO7Y4ghVqo8gFtqRrRt8mUxh15 /N8SsMNkfr5K/s4nhhe3EJJWpNF0U0OdoupN66JSTvq6zHUj7XVyf+8DO/drOk6gSBiV Yz+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zYinNjf8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g90si1919517edd.329.2019.10.03.09.20.32; Thu, 03 Oct 2019 09:20:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zYinNjf8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389915AbfJCQUa (ORCPT + 27 others); Thu, 3 Oct 2019 12:20:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:48048 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389026AbfJCQU0 (ORCPT ); Thu, 3 Oct 2019 12:20:26 -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 92A3D20865; Thu, 3 Oct 2019 16:20:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570119624; bh=0GFOoDInj2NDrOs7OhI/W94/e6GgCtYWf1x+GXG+MOA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zYinNjf8H9+yLJvqGkwzZ89e8phSwqEYzQc2iesy4daTxQDtKIjPOIopoJsk6S/ss 4fH3iYxJc9L1cvfPlO7YPi9xL1dWiXeNYVgF/D8TXoIWgyYNjt23nsIRCJmD+nquAZ nJ0gUyKp15z1STP19olMn0ZsV6XPpxMI0B4qYfeI= 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 4.19 133/211] mmc: core: Clarify sdio_irq_pending flag for MMC_CAP2_SDIO_IRQ_NOTHREAD Date: Thu, 3 Oct 2019 17:53:19 +0200 Message-Id: <20191003154517.209084508@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154447.010950442@linuxfoundation.org> References: <20191003154447.010950442@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ulf Hansson [ Upstream commit 36d57efb4af534dd6b442ea0b9a04aa6dfa37abe ] The sdio_irq_pending flag is used to let host drivers indicate that it has signaled an IRQ. If that is the case and we only have a single SDIO func that have claimed an SDIO IRQ, our assumption is that we can avoid reading the SDIO_CCCR_INTx register and just call the SDIO func irq handler immediately. This makes sense, but the flag is set/cleared in a somewhat messy order, let's fix that up according to below. First, the flag is currently set in sdio_run_irqs(), which is executed as a work that was scheduled from sdio_signal_irq(). To make it more implicit that the host have signaled an IRQ, let's instead immediately set the flag in sdio_signal_irq(). This also makes the behavior consistent with host drivers that uses the legacy, mmc_signal_sdio_irq() API. This have no functional impact, because we don't expect host drivers to call sdio_signal_irq() until after the work (sdio_run_irqs()) have been executed anyways. Second, currently we never clears the flag when using the sdio_run_irqs() work, but only when using the sdio_irq_thread(). Let make the behavior consistent, by moving the flag to be cleared inside the common process_sdio_pending_irqs() function. Additionally, tweak the behavior of the flag slightly, by avoiding to clear it unless we processed the SDIO IRQ. The purpose with this at this point, is to keep the information about whether there have been an SDIO IRQ signaled by the host, so at system resume we can decide to process it without reading the SDIO_CCCR_INTx register. Tested-by: Matthias Kaehlcke Reviewed-by: Matthias Kaehlcke Signed-off-by: Ulf Hansson Reviewed-by: Douglas Anderson Signed-off-by: Ulf Hansson Signed-off-by: Sasha Levin --- drivers/mmc/core/sdio_irq.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) -- 2.20.1 diff --git a/drivers/mmc/core/sdio_irq.c b/drivers/mmc/core/sdio_irq.c index b299a24d33f96..d206f2de80d23 100644 --- a/drivers/mmc/core/sdio_irq.c +++ b/drivers/mmc/core/sdio_irq.c @@ -35,6 +35,7 @@ static int process_sdio_pending_irqs(struct mmc_host *host) { struct mmc_card *card = host->card; int i, ret, count; + bool sdio_irq_pending = host->sdio_irq_pending; unsigned char pending; struct sdio_func *func; @@ -42,13 +43,16 @@ static int process_sdio_pending_irqs(struct mmc_host *host) if (mmc_card_suspended(card)) return 0; + /* Clear the flag to indicate that we have processed the IRQ. */ + host->sdio_irq_pending = false; + /* * Optimization, if there is only 1 function interrupt registered * and we know an IRQ was signaled then call irq handler directly. * Otherwise do the full probe. */ func = card->sdio_single_irq; - if (func && host->sdio_irq_pending) { + if (func && sdio_irq_pending) { func->irq_handler(func); return 1; } @@ -100,7 +104,6 @@ void sdio_run_irqs(struct mmc_host *host) { mmc_claim_host(host); if (host->sdio_irqs) { - host->sdio_irq_pending = true; process_sdio_pending_irqs(host); if (host->ops->ack_sdio_irq) host->ops->ack_sdio_irq(host); @@ -119,6 +122,7 @@ void sdio_irq_work(struct work_struct *work) void sdio_signal_irq(struct mmc_host *host) { + host->sdio_irq_pending = true; queue_delayed_work(system_wq, &host->sdio_irq_work, 0); } EXPORT_SYMBOL_GPL(sdio_signal_irq); @@ -164,7 +168,6 @@ static int sdio_irq_thread(void *_host) if (ret) break; ret = process_sdio_pending_irqs(host); - host->sdio_irq_pending = false; mmc_release_host(host); /* From patchwork Thu Oct 3 15:53:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 175118 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp544813ill; Thu, 3 Oct 2019 09:20:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqzlzzHDRJZawrGexKnRG/qZNkyMhiXzw0mfPtoDbpSAXYUzi09KYDt8i6lbA1q5yiPDjeAe X-Received: by 2002:a05:6402:13c9:: with SMTP id a9mr10277640edx.25.1570119638451; Thu, 03 Oct 2019 09:20:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570119638; cv=none; d=google.com; s=arc-20160816; b=kZy0zQXvsBvd7sa1q/aGCBb2aszmMo4HIsI7/DDKG2IWcZnXIJ2QdY1R6ikhKiv1OG I9VnuxJdd859Tl95lBBbzQld9cU6sEd4ScBc0lBi/rCGgToZb9fjrxQIBIoAmLrAczMk uMhbl/2Fj3GxJQVgaYP+3scTvZF4DuzB+R5w/oxdUjzAiZZkYmN9dKHEb4WFO2IVUHsj lG1ns8P/7aQJHKeGim43vOSdThrYEMsKLGNDsCOEDuFp0He6enyj2HNVVbZ+bB5X59bD R/BTzSjU9CVP4YGIggSuK3CJFDat9SQli7dp7zvkKyYYKE6wgSvQWaYfIuEsUBjKLuwb U1ZA== 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=WxYTIK4VNzcOWbonVackn9Yu9lqCtEHBB3gEA30/Aa0=; b=FvJkdojzpIp7G3cy9K257r3lrju3rhoPYTzCq3qQC6wEveZYUOEudF1pC5UF0nO6N0 x7DZHEF4Ye+Wvk3HDQ9KtsJyz6mNf8s/ARGRfZ5svBW2RsA95BcXuHSSI5ZazElXWlXd 5iQGHhLMQSaGPF1ZiFvUGjvrIDavfty4uVJqFRxZs177DvzGs8aFxfoSniKiYL22NDUH ABDce6ZPb1E9xnf4Zstzk+ilYUX9Gofxfn2V3wcXd9jm3Wfn+NkIrLkKQnHYEVUm3kGX 5AdCyTGC/whyv9uNnT69WIuQTRZmfPruKO13Gu1hCfhXan0XVHZv4lE8MYZuUleC+rj5 vfTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VRMzGFRN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g90si1919517edd.329.2019.10.03.09.20.37; Thu, 03 Oct 2019 09:20:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VRMzGFRN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389949AbfJCQUg (ORCPT + 27 others); Thu, 3 Oct 2019 12:20:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:48228 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732597AbfJCQUb (ORCPT ); Thu, 3 Oct 2019 12:20:31 -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 C9E6720865; Thu, 3 Oct 2019 16:20:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570119630; bh=DWNzfLJ61MFerPbmG0E1WG/O8uncf6ZwntcksS8TIQI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VRMzGFRN5mYsANSMvD3kQr2jiOK/uNlSlrT9HrsjDYLM4kdvnQm9XpXSEk9QhX1bP 8/qceJmtVZqm+tdYyJUUeBUJYA8zDbXtLy9CvW9RkZylY7eZAXShNdT0zi4R3rXWex Hk7Q9kE/2jFlOcYmH7E6OZfqUBCs2NHwNkBEy2Vw= 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 4.19 135/211] mmc: core: Add helper function to indicate if SDIO IRQs is enabled Date: Thu, 3 Oct 2019 17:53:21 +0200 Message-Id: <20191003154517.961917276@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154447.010950442@linuxfoundation.org> References: <20191003154447.010950442@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 2ff52de1c2b89..840462ed1ec7e 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -488,6 +488,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:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 175120 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp547287ill; Thu, 3 Oct 2019 09:22:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqzYd5H+5udil08rb6NQ/N/8oL5vAey+kCtnC6kNqFbGp0r3QLoxapOPXGRm/GWttES0+YNT X-Received: by 2002:a17:906:134b:: with SMTP id x11mr8342265ejb.272.1570119753585; Thu, 03 Oct 2019 09:22:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570119753; cv=none; d=google.com; s=arc-20160816; b=c51zCGawuy+L66fjouX99mTv/+vX69UQfM/YRBI4qkNbZuccAi+jEReJu7p3T4v2DZ e1F3vc6auLzSuuPeEbCmHXnCTypBfiLtEiBq0pjhxcaQ6i7EOwdG1hDvGwBXFEmlouep Tm4uSeBmB1pzvjeAp3mGs/BaeJjvjd/rYwoFAKYYzShec01UyC9kfs+RSUh/uX5tgtxo XQuwkp3Sbk7SGm2yPdFv4Z/0st65Tj/BGOK5YnSlafdXh9/LyMqYMalmVaRMjFXy9kIG doQkrKZe7TdJyRvzY5tbfIKZcoXCtQwayPaIAzbi71exYO5x+vUQrRe6UQkYxQc0HDYM NeUQ== 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=DyP8hsKscWzg1pYydjcE7twgJHOMiPSUXKozvohJTSw=; b=YEaXON6T+K4IDL2xyH0bK7YEWyR+4I7jNyg7rJslW7MPwTC4owkZRmfwylqj1gF6CL wYQKpYrRBmEWB3pld8T59zZ6UaBRNL8tH7/Z+s3SzIrwT2snpibRl/1nSgTiAOPZqdJT tqxN7uBdinbSKzcGzx0M3QwjG1Q7wFPsWutpDKqcxRdxHd52XuKiB1Bis/VJ51oedFbo d34io3WZ7xqFPXcZk7N4DqxQq+VcZk9XidnPDR1L7bAKp5DiMEzGP6acYZWWvP3CfCb+ ywdd7gTZaFKaPnD5Nyq7OJIMwPesLz8B4Ti3Njmfffj0EIg6ps/A2SPdFIcdn19nmOZU Ymeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=md8Odipt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r9si1466232eju.10.2019.10.03.09.22.33; Thu, 03 Oct 2019 09:22:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=md8Odipt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390242AbfJCQWE (ORCPT + 27 others); Thu, 3 Oct 2019 12:22:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:50528 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390229AbfJCQWB (ORCPT ); Thu, 3 Oct 2019 12:22:01 -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 BCAF120865; Thu, 3 Oct 2019 16:21:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570119720; bh=zrdNoSnOeNZj5QJjLU3IpZ0WHzz72+SQAhpLfEHBe8A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=md8OdiptVzGPkWvj9vlzb7RLUcXHabwCg0MIB706oF+JaM0pfXnQE5G1z/QOB3G9L C/IgPZLbBgzofazObLIroBYDrLbXq2Znswk3d6OuIQjB1VyCHYrW4ia8jcIgjcrzW3 387I1WreIaZ+EGPWmjZ3hxgSOp8SECsulKMxP7xI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Max Kellermann , Wolfgang Rohdewald , Arnd Bergmann , Sean Young , Mauro Carvalho Chehab Subject: [PATCH 4.19 169/211] media: dont drop front-end reference count for ->detach Date: Thu, 3 Oct 2019 17:53:55 +0200 Message-Id: <20191003154526.075951948@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154447.010950442@linuxfoundation.org> References: <20191003154447.010950442@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann commit 14e3cdbb00a885eedc95c0cf8eda8fe28d26d6b4 upstream. A bugfix introduce a link failure in configurations without CONFIG_MODULES: In file included from drivers/media/usb/dvb-usb/pctv452e.c:20:0: drivers/media/usb/dvb-usb/pctv452e.c: In function 'pctv452e_frontend_attach': drivers/media/dvb-frontends/stb0899_drv.h:151:36: error: weak declaration of 'stb0899_attach' being applied to a already existing, static definition The problem is that the !IS_REACHABLE() declaration of stb0899_attach() is a 'static inline' definition that clashes with the weak definition. I further observed that the bugfix was only done for one of the five users of stb0899_attach(), the other four still have the problem. This reverts the bugfix and instead addresses the problem by not dropping the reference count when calling '->detach()', instead we call this function directly in dvb_frontend_put() before dropping the kref on the front-end. I first submitted this in early 2018, and after some discussion it was apparently discarded. While there is a long-term plan in place, that plan is obviously not nearing completion yet, and the current kernel is still broken unless this patch is applied. Link: https://patchwork.kernel.org/patch/10140175/ Link: https://patchwork.linuxtv.org/patch/54831/ Cc: Max Kellermann Cc: Wolfgang Rohdewald Cc: stable@vger.kernel.org Fixes: f686c14364ad ("[media] stb0899: move code to "detach" callback") Fixes: 6cdeaed3b142 ("media: dvb_usb_pctv452e: module refcount changes were unbalanced") Signed-off-by: Arnd Bergmann Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- drivers/media/dvb-core/dvb_frontend.c | 4 +++- drivers/media/usb/dvb-usb/pctv452e.c | 8 -------- 2 files changed, 3 insertions(+), 9 deletions(-) --- a/drivers/media/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb-core/dvb_frontend.c @@ -164,6 +164,9 @@ static void dvb_frontend_free(struct kre static void dvb_frontend_put(struct dvb_frontend *fe) { + /* call detach before dropping the reference count */ + if (fe->ops.detach) + fe->ops.detach(fe); /* * Check if the frontend was registered, as otherwise * kref was not initialized yet. @@ -3035,7 +3038,6 @@ void dvb_frontend_detach(struct dvb_fron dvb_frontend_invoke_release(fe, fe->ops.release_sec); dvb_frontend_invoke_release(fe, fe->ops.tuner_ops.release); dvb_frontend_invoke_release(fe, fe->ops.analog_ops.release); - dvb_frontend_invoke_release(fe, fe->ops.detach); dvb_frontend_put(fe); } EXPORT_SYMBOL(dvb_frontend_detach); --- a/drivers/media/usb/dvb-usb/pctv452e.c +++ b/drivers/media/usb/dvb-usb/pctv452e.c @@ -913,14 +913,6 @@ static int pctv452e_frontend_attach(stru &a->dev->i2c_adap); if (!a->fe_adap[0].fe) return -ENODEV; - - /* - * dvb_frontend will call dvb_detach for both stb0899_detach - * and stb0899_release but we only do dvb_attach(stb0899_attach). - * Increment the module refcount instead. - */ - symbol_get(stb0899_attach); - if ((dvb_attach(lnbp22_attach, a->fe_adap[0].fe, &a->dev->i2c_adap)) == NULL) err("Cannot attach lnbp22\n");