From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8057DC433F5 for ; Sat, 23 Apr 2022 16:33:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ylW5Mtgx17pOfVRcCfrZMDzsk3eIdaOsN8/3nmR/1tU=; b=jCYFEpXVBh2Clt b2BC9lfWlFkIXuew0/52A+K+WAlntgbq/JI4HXF4HLnzWwvtPbQIY3S8CIszWNLd6c/yRi1naf1FO EK51iNxRbvRA555qa3A1GCnVq5nv1s9AQSRCmJsgXdlGOiTiWwujFhQhKga9Alii4ingjmntPsog3 d2rUESNmohR6UE1jkuziNZ5k/p+NvYpuD0bviLthqxxqM0NucQ4yle8Kb2HnTeuYzcDYRAdoRL1dZ AZGmzyS5fzoLPEe5PIy6ii4NrJrNzRMjpaNMk6dLQPrsaIz2/dACSZU1W1kG+p0MOJpcwQVzdVmB9 aPUxkVdoEW4JMNm5muDA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1niIgP-004dm5-1I; Sat, 23 Apr 2022 16:32:29 +0000 Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1niIgK-004dlm-8q; Sat, 23 Apr 2022 16:32:24 +0000 Date: Sat, 23 Apr 2022 09:32:24 -0700 From: Christoph Hellwig To: Oleksandr Tyshchenko Cc: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Oleksandr Tyshchenko , Stefano Stabellini , Russell King , Catalin Marinas , Will Deacon , Boris Ostrovsky , Juergen Gross , Logan Gunthorpe , David Hildenbrand , Martin Oliveira , Kees Cook , Jean-Philippe Brucker , Julien Grall , "Michael S. Tsirkin" , Christoph Hellwig Subject: Re: [PATCH V1 1/6] arm/xen: Introduce xen_setup_dma_ops() Message-ID: References: <1650646263-22047-1-git-send-email-olekstysh@gmail.com> <1650646263-22047-2-git-send-email-olekstysh@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1650646263-22047-2-git-send-email-olekstysh@gmail.com> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Apr 22, 2022 at 07:50:58PM +0300, Oleksandr Tyshchenko wrote: > +#ifndef _ASM_ARM_XEN_OPS_H > +#define _ASM_ARM_XEN_OPS_H > + > +#include > + > +static inline void xen_setup_dma_ops(struct device *dev) > +{ > +#ifdef CONFIG_XEN > + if (xen_swiotlb_detect()) > + dev->dma_ops = &xen_swiotlb_dma_ops; > +#endif Maybe create a proper !CONFIG_XEN stub for xen_swiotlb_detect instead of the ifdef here, but otherwise this looks good to me. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel