Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756253AbdDROVe (ORCPT ); Tue, 18 Apr 2017 10:21:34 -0400 Received: from foss.arm.com ([217.140.101.70]:57372 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753430AbdDROVb (ORCPT ); Tue, 18 Apr 2017 10:21:31 -0400 Date: Tue, 18 Apr 2017 15:21:26 +0100 From: Catalin Marinas To: Stefano Stabellini Cc: xen-devel@lists.xen.org, jgross@suse.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, linux@armlinux.org.uk, Julien Grall , boris.ostrovsky@oracle.com, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 1/2] xen/arm, arm64: fix xen_dma_ops after 815dd18 "Consolidate get_dma_ops..." Message-ID: <20170418142126.GE27592@e104818-lin.cambridge.arm.com> References: <1492117462-19886-1-git-send-email-sstabellini@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1492117462-19886-1-git-send-email-sstabellini@kernel.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1281 Lines: 31 On Thu, Apr 13, 2017 at 02:04:21PM -0700, Stefano Stabellini wrote: > The following commit: > > commit 815dd18788fe0d41899f51b91d0560279cf16b0d > Author: Bart Van Assche > Date: Fri Jan 20 13:04:04 2017 -0800 > > treewide: Consolidate get_dma_ops() implementations > > rearranges get_dma_ops in a way that xen_dma_ops are not returned when > running on Xen anymore, dev->dma_ops is returned instead (see > arch/arm/include/asm/dma-mapping.h:get_arch_dma_ops and > include/linux/dma-mapping.h:get_dma_ops). > > Fix the problem by storing dev->dma_ops in dev_archdata, and setting > dev->dma_ops to xen_dma_ops. This way, xen_dma_ops is returned naturally > by get_dma_ops. The Xen code can retrieve the original dev->dma_ops from > dev_archdata when needed. It also allows us to remove __generic_dma_ops > from common headers. > > Signed-off-by: Stefano Stabellini > Tested-by: Julien Grall > Suggested-by: Catalin Marinas > CC: linux@armlinux.org.uk > CC: catalin.marinas@arm.com > CC: will.deacon@arm.com > CC: boris.ostrovsky@oracle.com > CC: jgross@suse.com > CC: Julien Grall Reviewed-by: Catalin Marinas