From patchwork Thu Oct 3 15:52:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 175092 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp516347ill; Thu, 3 Oct 2019 09:01:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqxV2TW9Es8zEWursedbMd6laJ0TMFAHgfrvCCK0tuQ2qc8f9wmZueBSOXb3QVDsUW8sJbCY X-Received: by 2002:aa7:c40c:: with SMTP id j12mr10498525edq.284.1570118489131; Thu, 03 Oct 2019 09:01:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570118489; cv=none; d=google.com; s=arc-20160816; b=iGbZ/ZfXpyeeN3X7hU9MJgukHlzaIbGhSXwmrQh46RDqdxibwLFyM0vlD52Qgf4+jU IL5+FnVo0ZDXMIU64wZKUaWHYLEmKn4iXzAUufiE7r2BwJAYiMMdosNs3lLO+Sa3SE4B SQKblF62YQ5ep0Aii60UdfaHRjtrsFjJa37UiFVAkc4AVT4yLbl2gQzFNeTh3tH8PuW8 VJQB28b61OI/GFnXiOcRaDBLelrkGOQ8/NDJlULks3IpDUVOkMsa3+XN5vU5XN0KH/yC O9m2lZuv6qKIQvERYwELhVqspr3FamtEJa+R0C3kjh0O6ACXGnwZzkWRdW3v7RX4scU+ xMpQ== 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=qJ+ZVaiYYeBgu3+2hwMv6GFj8mPfM7y+hDy4wxgiUDA=; b=I9DCRAwmw9Cj6YDAZF3LKyO55pWGFh+8iFYXxGwhWAiDHotUITP1wTmpjXalUOxOih mqXa6vqBZLU9i7fjIViHyOceeswUQRJrS2WXPYDie5S3yme0P14EYDT3jFakY1jODvLB zX1CnqotmOWNJ7laH+3fZgHyUfB4MQSiCdz/5miu0b2qc8vEcaFW+PjH/vaxAEwoW3GP gmAx2W4tAaoZYKZ8aFZZ+6j/7CLvrwwFV9ScPG31IquaOoKxJLl8OwJoAuxMELXwnjWt ZA6YvkjPwBd4Le9glV1+2OLSkkpItiIGqQbYWEhIksnyk0k3C+4VP7Kzc/uCrWJfd13h x6JA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=H1zf5+7C; 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 h12si1489710ejj.40.2019.10.03.09.01.28; Thu, 03 Oct 2019 09:01:29 -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=H1zf5+7C; 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 S1731794AbfJCQB1 (ORCPT + 14 others); Thu, 3 Oct 2019 12:01:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:45692 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730951AbfJCQB0 (ORCPT ); Thu, 3 Oct 2019 12:01: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 CBEDE21848; Thu, 3 Oct 2019 16:01:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570118485; bh=mSLDmx+iybjyvDtPw8sV0QEKfRQ/7mwleZH38IGkP24=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H1zf5+7CfGSEWlC+jDLGyusJQ8aXOZRW2MWkc5QJAUpFp/v6TwMMp3knhjnHD47Qf Bf5Wk8gs/IxFxWD8HhkkW0UXJM7vf48ahNbMsLWDc8Bu8aylVRxkGFFeE7JdcodCiv IWvKvSIjiNqd3FQ65YNXxUCnialrWAYfqWmPuPEQ= 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.9 027/129] net: qrtr: Stop rx_worker before freeing node Date: Thu, 3 Oct 2019 17:52:30 +0200 Message-Id: <20191003154331.480674156@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154318.081116689@linuxfoundation.org> References: <20191003154318.081116689@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 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 @@ -126,6 +126,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:52:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 175094 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp518435ill; Thu, 3 Oct 2019 09:02:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqyX2WBQ9CLbu9HyOjyxDBYyJWvh37cI+nTTH0jQQrhSC7PhmvmvsXR8RxeGvDlrm0aQ63v4 X-Received: by 2002:adf:f348:: with SMTP id e8mr1073069wrp.237.1570118570297; Thu, 03 Oct 2019 09:02:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570118570; cv=none; d=google.com; s=arc-20160816; b=Es+QJC3EButMSp+yfy7zukLNpaJHWbZMcvLGs/qLyZcwAUvIhq8TgjSalLm/UpxqFb ErKQ8f3y8LFyMi1pk/PCSjvhV93gvv4smv02T7IRqE6RH0+31li7MECKdvN/tKNl9qrx j2/BFc1tdt+uhL4MWOp+eifvE6vF2vr0zjXwFrBGg+2K7IP/ePeJmU/wDlQck0/Zbb5j 6Zv4HGKusDHYeLgOyOzVsw02wb1K7Afeod6pj2ZhjsM+iNFzyyFMAtiwsirfb/CBnbI5 gfaSZ83SnLb0kctA5TR91nfSk4S9f9N9pmlGBlhuehEroaNM13jFycb1SJKnM+K6AH27 PpkA== 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=GzA6Ae3D43HVaBXATxrXu1zbEy7noB/ly59f08OnrfE=; b=BpAQuTFCgXqsTiSkB2ejDqKI/OBTyPVJ28NH+LNlhwtuMIHC9I6gpoxXZije/ekCD1 DaMxNFsDH8u4KSS1tJ8FwgOmAN0hsAkqcumdhx4eaBiG27g2Ux/RXY5Uvj3gKbkN4tbv KOFTSsgM1X30ISthiRa5web8UM9o/xkDSg46joVET7e3xqR01GWaut4r0DZRMzvb2qQv BjpOlvbl6T/H8ih85JLMOPe/j38pCQ0AeehADt4v9Q3KFJ/YG5bXLOXqEY7ScVB/04Pz YHbthbUDOJXMxc9Tp1LNhH61oBOG6YtlGwbMBIWSFcr0nVueToltx4JobU3eGGdssRYp RWRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=yflUYnyT; 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 w2si1829515edc.386.2019.10.03.09.02.20; Thu, 03 Oct 2019 09:02:50 -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=yflUYnyT; 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 S1730342AbfJCQCS (ORCPT + 14 others); Thu, 3 Oct 2019 12:02:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:47100 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731980AbfJCQCR (ORCPT ); Thu, 3 Oct 2019 12:02:17 -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 CC68D21A4C; Thu, 3 Oct 2019 16:02:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570118537; bh=GvRqM0aQvpD+M+nkcgd7HWYCA8o19fhJZkvaV1up1PQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yflUYnyTgqnGa/Ogj8x+h6+3XsjiHsis9DeWeevIyUcpKtWTIxZzPZzlFaIgm5Kt4 re6HPxIwCZybWhlVIo0DdR2ccEMRS5Xo45BPhxYN4BdwAgh5Zv2YKd7ob0cGiJbBXo OnTHOgBXYQuQio5z9Jdx7qmDWtWZ1RgFiGMOXoz4= 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.9 047/129] sched/fair: Fix imbalance due to CPU affinity Date: Thu, 3 Oct 2019 17:52:50 +0200 Message-Id: <20191003154338.849946971@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154318.081116689@linuxfoundation.org> References: <20191003154318.081116689@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: 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 b314feaf91f46..d8afae1bd5c5e 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -7929,9 +7929,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:53:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 175096 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp518867ill; Thu, 3 Oct 2019 09:03:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqxg1eSFJas67EY3I+Q3VBjfSMbRDeSFJL5HPWYmTaoIRVAjNhDgn+vUbVaB/txc8CcMwoYY X-Received: by 2002:a17:906:7f05:: with SMTP id d5mr780662ejr.313.1570118584397; Thu, 03 Oct 2019 09:03:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570118584; cv=none; d=google.com; s=arc-20160816; b=x6YcBhN6OPJsAPm2j/tob3plOPHb8/zjgp4HtwXHje5KBacyBTJhllj84HZNxCjlTC 6vs6aux5JqiPdPGzrixrA70dm4ozNQklS8XhzSVIak44Ph9UetAUeFgqjfvGNyFhaG2e cXfnLHKMMFTJumuwktxisV5eZQ1evVaO7DraxmY8q7OQh675SrNco00hWqKCiGjw+ART DSYBl0mVj13tvcozkOwQ6Il5s5DzmK5CrH2RoDRa1FmbOzirkEgQ8vCOI+8zWk/9f4Cv J+6BeaLJSS96nAwUGV+iVlL+wJZfSFVRK7Spy6KwJ0iyJn/DOQYOVGSQwQWRBWiBjrnt B7OA== 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=BhAqCCpAqQrLaL7Apws2aaFIgvGx+h/Pr3C7OkMukjNJuRPJhhFPv4bK/FqTq/RLRU FkEt23TtH/7M/wZzPIbmuqykJJpq30ERG9NMg3+WFpACrY+fyfRVB7a7bUcVZq3OmSi6 eOq+OGDSfftHo1lOS5Vfz6J3jcBxJFME7H+w8rmiRcsML8g/bDz7QmhSwTo0ONW3Rq9n x/d1/9OT62do+U2YrqQWA5yN/83gi9NxJTvNq4YlxPcPNkZlG/b+Y/Nldgfr7FyfQN7d hASoLg6RBXZ6EYC4luOZ6f0yd3WP8QGFBjmc4JgehJj9uzSs2ZZCPUVQ6z0YJph1er7V LeuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=X5tqR+X1; 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 w2si1829515edc.386.2019.10.03.09.03.04; Thu, 03 Oct 2019 09:03:04 -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=X5tqR+X1; 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 S1730838AbfJCQDC (ORCPT + 14 others); Thu, 3 Oct 2019 12:03:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:48086 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732165AbfJCQDB (ORCPT ); Thu, 3 Oct 2019 12:03: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 AC888215EA; Thu, 3 Oct 2019 16:02:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570118580; bh=d4ncFyiCsd77a457JAwmaPtaDLK0wuqOVsHZty0nllA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X5tqR+X1m4e6bI6sVwTNdV/izS6M+OW9A7b/4Q6FqqUnkAhR6NJZIZaOGSMmGFyUC k9o6zWXroqpRznWUCPhaAVtdbk+0X6q8h5HVioq1DSkWdUNpy4ZAdnRSiNsGu+dl2t 2OD3Jon0VyURYg6fwX/JHVXVsv2JF5WBgn/tCHiI= 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.9 062/129] dmaengine: iop-adma: use correct printk format strings Date: Thu, 3 Oct 2019 17:53:05 +0200 Message-Id: <20191003154347.074640314@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154318.081116689@linuxfoundation.org> References: <20191003154318.081116689@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 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:53:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 175098 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp522870ill; Thu, 3 Oct 2019 09:05:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqxz7npUpGg965jl67cn7NTLapVAMfc/m53T4o8JHf9u8jlT6TgTf58YEUyiOLAVPNIEnj/p X-Received: by 2002:a50:b884:: with SMTP id l4mr10300593ede.295.1570118735513; Thu, 03 Oct 2019 09:05:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570118735; cv=none; d=google.com; s=arc-20160816; b=lQLFLeCk6YMhTfD0BqR/9BBhUuwYCo5rwsTjdma6XyskZtBvwK+jh4GAixaZD5Pkzk uI+XrGRksQJ/YskGbuDtJL8bKg+JwFsuh0NkyrlQxUKclqfbXcY9sHxii2vBp/94i8zB T17lRR/xrv5iyNgbKtJ5MqWywawqfVw17ilUeNycD8ZOcqqQPrLSacvNGFMmt4w5I4Qm K0HMR6wPW9yjxNik2rCMxlToRe8OAdTuO4r+HVYirZl6c7N+1u+rQ9mMjvfjyb55eFU5 cSNqJki+Df6PWmvJFn3KLsHb3FYjfa5HlqZaASkrbE6mfULx0oqbKUTny1BAYfVCHEM3 d75w== 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=zH7RTdjfq2BJVX5mwZDk3zVZqUbDaraRiyVe7bd03L4=; b=1Cw5WfcWIpl08q5ii1ZwgGehiZDE5tVFnSiIkhWMgkXnjnslW8XwpZlQ451A+hEOSa 1gNRQhYxKrK7JmAv6RGqrqWnT5/GqtiGo/ENK31TU0cYFYFGpArn+Tw3+twECdDSfUJa YW6DQQdnMFn9b/VCSlwNFYr0L8KunFVuq6FyjCA4XcOs1TeYoC5Haf1Uhtv0PkymfRX/ UThrBp3vZyX+zK4IJN9sKyItxSG9PHIj5z7pDYFbGe1wVX9cU9tmJEpUUuyyWKJfaslv gSnVlgu+LERFYYT45sK+s2nFNtMrFDIgr8IlBSRXVDB0/DuVAtG9YeuvIDMmPcOXwVnR /CuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=o2LOf0sE; 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 ga6si1492365ejb.309.2019.10.03.09.05.34; Thu, 03 Oct 2019 09:05:35 -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=o2LOf0sE; 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 S1732559AbfJCQFd (ORCPT + 14 others); Thu, 3 Oct 2019 12:05:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:52284 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731703AbfJCQFc (ORCPT ); Thu, 3 Oct 2019 12:05:32 -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 79BD321A4C; Thu, 3 Oct 2019 16:05:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570118731; bh=RjgmkSOMi2xT5X4blqGQ8ZeCdi9HMfHkXvSSXsfQvR0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o2LOf0sEeq7zDg2yv6eBGHUGuCtR5J8PViJSTLD1dRxmtZAJHsT8pVYVaWqdcbZhu 1PEcXQaG8Gm4vf1pu6u6T0Cu5rNuS5jqDjovQxw0DTxdXIh6mxwN/qAfp5lvifEyxt s+5SsTlRX30orQJZLaxOFaT4SaQV/bAfER8FWqRA= 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.9 080/129] ARM: dts: exynos: Mark LDO10 as always-on on Peach Pit/Pi Chromebooks Date: Thu, 3 Oct 2019 17:53:23 +0200 Message-Id: <20191003154355.384873192@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154318.081116689@linuxfoundation.org> References: <20191003154318.081116689@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: 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 ec4a00f1ce01e..8b754ae8c8f7d 100644 --- a/arch/arm/boot/dts/exynos5420-peach-pit.dts +++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts @@ -427,6 +427,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 01f466816fea7..1f90df2d7ecd8 100644 --- a/arch/arm/boot/dts/exynos5800-peach-pi.dts +++ b/arch/arm/boot/dts/exynos5800-peach-pi.dts @@ -427,6 +427,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:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 175191 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp640215ill; Thu, 3 Oct 2019 10:37:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqz+q/1VpwigYUhorxwBhZmOKPFXiisacTrzcaV0O3h/KlAMnPfsq5iOKxg0Tg1vYjNy3t0Z X-Received: by 2002:a05:6402:17eb:: with SMTP id t11mr10453598edy.97.1570124221787; Thu, 03 Oct 2019 10:37:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570124221; cv=none; d=google.com; s=arc-20160816; b=RY+iNGus4U1wVPyDoND1YZLvyEv/ruHmdg97kdxba9oQBlT6IpY9sXUJtb4wu5LBPA EjEXrgFB3/JSOTZeq3L3UKaQgRBZe/wDwBRCBrLisKTfbm/z8oCSolvywqYyZeBpyR5V SM5KwYElx2FXgkZuzwFAWs2ti12GZ3fG+cMtdYmM15R3uCgd+OpV0z2uHvCRvi8tUj+6 epbLss763x7rVHOt/QjJ+UOHYDzEysRzMlCiXwcVl0kpeqnUwy1kLjWEY5/KWtT4JtVN s/dL7+otsHW9OFk2ptrN6ddtB8iwslBKDVL4JCp/Lnxnh9Ykx1ZZQMnRhUx4gQIbTWxj wluw== 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=NsMiORjG5q7MrczAR7nCRX9QdVZlqbaIt9eQPO4lgyA=; b=vW1xGDiWE25+THESOAR0gKV53L1LUcGKCurjJYTXvLhh51gaxj2qxrH7FRB2wa4iUX CrwnebJWOBox7zci4DYB97kC/rZEXuaZiLoL7uV/AQ6mCTyLK8ZJBnQA4qQSSby0g3QZ auhTac+vzIMl4VTYgvZGhT4/eZ47R+JQz+bZ8wWU2KsEZ84WwhSvNtbg9aSsJIp1KpCP XzzbsorwLCS9R3hn5bg3x+zNoqkOFanqwQNf2z5fNp8/tvp9YZAcvObsM/pwvO5oJn2A wGFNzv8XphkV0rtL98//ChtygYNpysUY6Z1AEoItlOpOvS3p5pMt6S/hkBavW6WGU1C+ GS5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lhFmFXTR; 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 z7si1681793ejr.99.2019.10.03.10.37.01; Thu, 03 Oct 2019 10:37: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=lhFmFXTR; 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 S1732344AbfJCRg7 (ORCPT + 14 others); Thu, 3 Oct 2019 13:36:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:49682 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729985AbfJCQEB (ORCPT ); Thu, 3 Oct 2019 12:04: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 815B2207FF; Thu, 3 Oct 2019 16:03:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570118640; bh=iw2RiHJuQkS8MmiAI+Oheb6nqhnVOozxDjGK6U5Lmy8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lhFmFXTRChAt0n0ugtyXDva3bDhHU/nh5Z90VtFvyL5V9GH5HgG40ujRlmfNvVFzo Pzf4Y9eJKdDHuKOB1SwNKRZts67juPlXuBM1Cavw/TmzTkrBmV96ir/8EmpN156rJU 9tPGIz2f6SU5GYoWOq3+iChTfafRenmAYGx1g89Y= 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.9 085/129] dmaengine: ti: edma: Do not reset reserved paRAM slots Date: Thu, 3 Oct 2019 17:53:28 +0200 Message-Id: <20191003154357.581377596@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154318.081116689@linuxfoundation.org> References: <20191003154318.081116689@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/edma.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) -- 2.20.1 diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c index 57962bff75324..72f31e837b1d5 100644 --- a/drivers/dma/edma.c +++ b/drivers/dma/edma.c @@ -2268,9 +2268,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; @@ -2283,6 +2280,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) {