From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from verein.lst.de ([213.95.11.211]:58297 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752433AbdIVNtS (ORCPT ); Fri, 22 Sep 2017 09:49:18 -0400 Date: Fri, 22 Sep 2017 15:49:16 +0200 From: Christoph Hellwig To: Robin Murphy Cc: =?utf-8?B?6ZmI5Y2O5omN?= , Christoph Hellwig , Marek Szyprowski , Andrew Morton , Fuxin Zhang , linux-kernel , "James E . J . Bottomley" , "Martin K . Petersen" , linux-scsi , stable Subject: Re: [PATCH V6 1/3] dma-mapping: Introduce device_is_coherent() as ahelper Message-ID: <20170922134916.GA20335@lst.de> References: <1505811161-25246-1-git-send-email-chenhc@lemote.com> <5e792b21-1d63-9200-b36a-c423385e2a2e@arm.com> <9213ab49-b6e6-d513-6d35-1fe2294aad68@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9213ab49-b6e6-d513-6d35-1fe2294aad68@arm.com> Sender: stable-owner@vger.kernel.org List-ID: On Fri, Sep 22, 2017 at 02:44:51PM +0100, Robin Murphy wrote: > Not quite - I mean instead of adding an ops->device_is_coherent callback > (which cannot really have a safe fallback value either way) and trying > to enforce that dma_get_cache_alignment() should be the only valid > caller, just add an ops->get_cache_alignment callback directly. Exactly - and then fall back to ARCH_DMA_MINALIGN/1 if the ops vector is not provided, to keep the existing behavior.