From mboxrd@z Thu Jan 1 00:00:00 1970 From: ian.campbell@citrix.com (Ian Campbell) Date: Mon, 8 Feb 2016 15:59:32 +0000 Subject: [PATCH] xen/arm: correctly handle DMA mapping of compound pages In-Reply-To: References: <1454938450-26282-1-git-send-email-ian.campbell@citrix.com> Message-ID: <1454947172.17191.4.camel@citrix.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Mon, 2016-02-08 at 15:46 +0000, Stefano Stabellini wrote: > On Mon, 8 Feb 2016, Ian Campbell wrote: > > Currently xen_dma_map_page concludes that DMA to anything other than > > the head page of a compound page must be foreign, since the PFN of the > > page is that of the head. > > > > Fix the check to instead consider the whole of a compound page to be > > local if the PFN of the head passes the 1:1 check. > > > > We can never see a compound page which is a mixture of foreign and > > local sub-pages. > > > > The comment already correctly described the intention, but fixup the > > spelling and some grammar. > > > > This fixes the various SSH protocol errors which we have been seeing > > on the cubietrucks in our automated test infrastructure. > > > > This has been broken since "xen/arm: use hypercall to flush caches in > > map_page" (3567258d281b), which was in v3.19-rc1. > > checkpatch.pl reports a small style issue with this statement. Damn, I added that para after I'd already run checkpatch. > [...] > > To take care of 64k pages, this needs to be: > {...] > Since you are at it, it might be worth adding brackets. Will do on both counts. v2 on its way. Ian. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp02.citrix.com ([66.165.176.63]:55968 "EHLO SMTP02.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755041AbcBHP7f (ORCPT ); Mon, 8 Feb 2016 10:59:35 -0500 Message-ID: <1454947172.17191.4.camel@citrix.com> Subject: Re: [PATCH] xen/arm: correctly handle DMA mapping of compound pages From: Ian Campbell To: Stefano Stabellini CC: Catalin Marinas , Will Deacon , Russell King , , , Date: Mon, 8 Feb 2016 15:59:32 +0000 In-Reply-To: References: <1454938450-26282-1-git-send-email-ian.campbell@citrix.com> Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: stable-owner@vger.kernel.org List-ID: On Mon, 2016-02-08 at 15:46 +0000, Stefano Stabellini wrote: > On Mon, 8 Feb 2016, Ian Campbell wrote: > > Currently xen_dma_map_page concludes that DMA to anything other than > > the head page of a compound page must be foreign, since the PFN of the > > page is that of the head. > > > > Fix the check to instead consider the whole of a compound page to be > > local if the PFN of the head passes the 1:1 check. > > > > We can never see a compound page which is a mixture of foreign and > > local sub-pages. > > > > The comment already correctly described the intention, but fixup the > > spelling and some grammar. > > > > This fixes the various SSH protocol errors which we have been seeing > > on the cubietrucks in our automated test infrastructure. > > > > This has been broken since "xen/arm: use hypercall to flush caches in > > map_page" (3567258d281b), which was in v3.19-rc1. > > checkpatch.pl reports a small style issue with this statement. Damn, I added that para after I'd already run checkpatch. > [...] > > To take care of 64k pages, this needs to be: > {...] > Since you are at it, it might be worth adding brackets. Will do on both counts. v2 on its way. Ian.