Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2527506ybb; Sun, 5 Apr 2020 09:42:08 -0700 (PDT) X-Google-Smtp-Source: APiQypK42I56zJWSXJYnagn4Oy/KSXr6nYZRRfbptqhCyg8jPBHVY2luMa1YvpydAzd0UaCSIAZd X-Received: by 2002:a9d:1786:: with SMTP id j6mr13920343otj.235.1586104928384; Sun, 05 Apr 2020 09:42:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586104928; cv=none; d=google.com; s=arc-20160816; b=U0DOXwgwn1VmBgWW47n6qS6sIeFS4XvB67tAPrMwUiFpjNbSRXlke5+ljh37h0PvxQ jQ9VgfRNNuZJiMjluZdrNQQtqJ2uIdcEZuncd2j4UfPBVH7ENlitgGqkA+407ms5pvOb FHroWnTx9vU7JxwnEu9zoXRU4mT4ejXOGFgqTQLUHfryjrQOMkhGJVY9eQiOsgaFSfJK E9g4fzwwa/kTaqvgK+Yol7FeystzI3p5fwIFT06QARdCo4GUU8Zr1eShABY4XgobDSgh m0JsA7S0WAzMb4mVBU5F79yCOmn0l+3AvwCcSfKjKJhRpgu9uzrVUX/14w9Ye0K2WwUs 2opQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature; bh=0tXJRElr7BDueItOzw3JF8FMO6DwZZ6S27H7eTNZmDY=; b=PGcIKt9lg52sax9RKvZTZf4yzmVJjGiLUORAKDTJ35tel9wbNy2wdWAVNDIp5c88qc sQWa6Ng1KH0sAd8NoQ87T2RIJeH5zuQx7buv1ysf4h+KT9zUEi2ZsxQOANZDRHuB0Q5T I37EsjB8qJv1aHB43hDtW/wW4HIao03w1x8y3ir1UNqmuRFtB+52aaZDnbs5a78OydCF Dkp5xNFxkr4+B2rJ1TZf7I8va8kCpv0EYKBSQf0X11lILAbxkAWN7Ziy/oPGfYJEYAO+ aWuu6y7xdt378Ada7fDoGwcJN+VtWxIHeIfo6peY3w/5PR4md7ilmYV5oRmbcrW+lYh8 vG5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kroah.com header.s=fm3 header.b=e6P4ik73; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=vl9myuJP; 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 l15si6606712otl.297.2020.04.05.09.41.55; Sun, 05 Apr 2020 09:42:08 -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=@kroah.com header.s=fm3 header.b=e6P4ik73; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=vl9myuJP; 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 S1727515AbgDEQlC (ORCPT + 99 others); Sun, 5 Apr 2020 12:41:02 -0400 Received: from new2-smtp.messagingengine.com ([66.111.4.224]:35235 "EHLO new2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727356AbgDEQlC (ORCPT ); Sun, 5 Apr 2020 12:41:02 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id C22A1580084; Sun, 5 Apr 2020 12:41:00 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sun, 05 Apr 2020 12:41:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=0tXJRElr7BDueItOzw3JF8FMO6D wZZ6S27H7eTNZmDY=; b=e6P4ik73A8ZRZCAWVa6AracLqG7LJeDADvOOw+rcCfa GXDXxPSXpf8fD+vnxt7SoG92lsTaMP6ZSLfSywL96k6/CIjG5KuEzUV4LS+xUqXm FS2BqhfZO1o1saeuTWVCJHye9PE/Ik6Mret8ollNa9MM6+8amYWLDCZlnXQFQrep 3ewjs6nm4mQ4yp1EjelVOBbT8tPcuywiqqgvRG1amzknQNrYiZCeNdPqhJLGC8G7 EMg2b/b5BoVQTn2Kjk75ioIVa+214jwajVFJEUw4zG9XCIOHn3TVNJaWxv/Vcpse 8HMXmo+LSPfT20eL2i6wW5J6P4HEmEdMoK1xv/+FKMg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=0tXJRE lr7BDueItOzw3JF8FMO6DwZZ6S27H7eTNZmDY=; b=vl9myuJPGhUgWZEpVDwaIn HoACoCLhv3zCeZv3PRcwF3JVJUbkDGl6JXBZ7VlJTqxpYOslIkPp5f0yJ7xJagpF JhjoI9ZzTP3JusW2QRkxKAvJPL3welgj00f1RyOUjQPNJyyDx2JnCUN+etDz/ZcL 0xsNGuJiYy2zhyAVypntd2PylHGcstqhHEc2GmVJixsaP0h7iJk27UEMJNlmXZJG 9NPT8ogSciCIwwdWNdgExP+AP5ssf4qPjUMsbAjrUkqRDrZ7J4fXQySeGv0s3Jxd ey9DVeVuRLXk+dAvT3s3ozmAfXUMqXeJbDgv5Eff2dB7Bz3I6P43KLzIK+MQMbiA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedruddugddutdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpefirhgvghcu mffjuceoghhrvghgsehkrhhorghhrdgtohhmqeenucffohhmrghinhepkhgvrhhnvghlrd horhhgnecukfhppeekfedrkeeirdekledruddtjeenucevlhhushhtvghrufhiiigvpedt necurfgrrhgrmhepmhgrihhlfhhrohhmpehgrhgvgheskhhrohgrhhdrtghomh X-ME-Proxy: Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id 68AEB328005D; Sun, 5 Apr 2020 12:40:56 -0400 (EDT) Date: Sun, 5 Apr 2020 18:40:53 +0200 From: Greg KH To: Alex Deucher Cc: Marek Szyprowski , Maling list - DRI developers , linux-samsung-soc@vger.kernel.org, LKML , Bartlomiej Zolnierkiewicz , David Airlie , Shane Francis , "Michael J . Ruhl" , "for 3.8" , Thomas Zimmermann , Alex Deucher Subject: Re: [PATCH v2] drm/prime: fix extracting of the DMA addresses from a scatterlist Message-ID: <20200405164053.GB1582475@kroah.com> References: <20200327162126.29705-1-m.szyprowski@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Apr 05, 2020 at 10:47:49AM -0400, Alex Deucher wrote: > On Fri, Mar 27, 2020 at 12:23 PM Marek Szyprowski > wrote: > > > > Scatterlist elements contains both pages and DMA addresses, but one > > should not assume 1:1 relation between them. The sg->length is the size > > of the physical memory chunk described by the sg->page, while > > sg_dma_len(sg) is the size of the DMA (IO virtual) chunk described by > > the sg_dma_address(sg). > > > > The proper way of extracting both: pages and DMA addresses of the whole > > buffer described by a scatterlist it to iterate independently over the > > sg->pages/sg->length and sg_dma_address(sg)/sg_dma_len(sg) entries. > > > > Fixes: 42e67b479eab ("drm/prime: use dma length macro when mapping sg") > > Signed-off-by: Marek Szyprowski > > Reviewed-by: Alex Deucher > > Applied. Thanks and sorry for the breakage. This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html for how to do this properly.