Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp304915iog; Tue, 28 Jun 2022 23:59:11 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tygEBzKGpp31fWmEpbzCh27lihBOTw9mWQF3bQElrz1aWpN8hAH6OSUFMDOixsZvBY+0eF X-Received: by 2002:a17:907:1b03:b0:6ff:78d4:c140 with SMTP id mp3-20020a1709071b0300b006ff78d4c140mr1843953ejc.554.1656485951636; Tue, 28 Jun 2022 23:59:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656485951; cv=none; d=google.com; s=arc-20160816; b=TtSJFmKs/T2mhRXAL9bJdqhXNIa8ZOHnNBhDEnyFV+HQIzrGtjfFecofW5Vz2v6umd CLV1vHqKBDDOSGk5gFWkrOHrWIqUziza499ucbjyUXRIEfiXzuAgNBTWemv/Z6gClKmg RNyfX8/m0bHaTd/zjgt3OkI9O/J7OtD5E8qJKGIuph8ojDyKfUEedF4L/csVuPwbrp1F S6K6bxS/6si3mcXyHFk96mdvg/NwLFKhLxQMokem2DjsIwLtaoSS7GzVUXiam7tIvpHI NUBKkJq5D1t0ty8b13cbM/Wf9ohua7H3pYxZapT1PUqjI5AKH7Ax5lFBS7ouYSZkX9+8 xvdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=hGxicrNA0Ky21SHQ+zvPyQeSEbMbEJ671RYnbrPw0JA=; b=QGikCrjOwE9TC8vwBYN5qPwyh1erPoJA9TYeSR68jBRR96uy2hnUdLzsNTR1VIDpPY Q9Vqy43Vdl8Ha05DzxuLSNmU7JcogRqJkS/3Zx8Mq6TNIVj2IEkBHpDZIb0aTlleSrAd egzSvdHDx3uPfgS7ZYqCDbFU88tJqnFWU4ZY7yds2EyKRX8pH1EimGuGgCRLSJi9vzkV pnZU5gEjqEFdCfihwGVC3AOWL4eIAiS01rEok/x/yERUq9mQtm52tpGa/l80yZBgSS9r iFLe9Ga7fLr27ZoS41BC+yCb9iUxJwfGFUfCambEuT5zEmpglosHHPcj2Zfk9jvS6YWT hUFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=qbFJAtMX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ch11-20020a0564021bcb00b0041d76e18accsi2506289edb.548.2022.06.28.23.58.46; Tue, 28 Jun 2022 23:59:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=qbFJAtMX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231564AbiF2GZs (ORCPT + 99 others); Wed, 29 Jun 2022 02:25:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229972AbiF2GZr (ORCPT ); Wed, 29 Jun 2022 02:25:47 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FD3C23BF1; Tue, 28 Jun 2022 23:25:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=hGxicrNA0Ky21SHQ+zvPyQeSEbMbEJ671RYnbrPw0JA=; b=qbFJAtMX0xKPZ1ARuRDdID37q4 owWkofTOSGtlKKGTJhARtkYpPKzHltLGhkndQA87MkODaY6KyO3cK4q808MkXZcOU40psAis3jQba hIlFNsykvnaIIUvqvKn2j1RZrQIeveQo7JYMztumkKhMbvD1zMb+mAEHnE6ESPqZza5WuXR5gF7PV n41lGSXcUPlvzAaeQHQhfM7f39UWgRCFoNb11FKul4UW/Ow1CvhldL3c1YOUP0JDldI562o45tZwg o0wAWuANXSfL/2mp0QfYSlqVUMbLFqDf0nTTu2Vp3DOLQ3j8ak5hAwUNMCSyw4o2Ir79RVMA1BFMh i++X3W8g==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1o6R8w-009lUE-5F; Wed, 29 Jun 2022 06:25:42 +0000 Date: Tue, 28 Jun 2022 23:25:42 -0700 From: Christoph Hellwig To: Michael Schmitz Cc: Arnd Bergmann , Geert Uytterhoeven , scsi , Linux Kernel Mailing List , Arnd Bergmann , Jakub Kicinski , Christoph Hellwig , Marek Szyprowski , Robin Murphy , Linux IOMMU , Khalid Aziz , "Maciej W . Rozycki" , Matt Wang , Miquel van Smoorenburg , Mark Salyzyn , linuxppc-dev , Linux-Arch , alpha , linux-m68k , Parisc List , Denis Efremov , Michael Ellerman , John Paul Adrian Glaubitz Subject: Re: [PATCH v2 3/3] arch/*/: remove CONFIG_VIRT_TO_BUS Message-ID: References: <20220617125750.728590-1-arnd@kernel.org> <20220617125750.728590-4-arnd@kernel.org> <6ba86afe-bf9f-1aca-7af1-d0d348d75ffc@gmail.com> <9289fd82-285c-035f-5355-4d70ce4f87b0@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 29, 2022 at 09:38:00AM +1200, Michael Schmitz wrote: > That's one of the 'liberties' I alluded to. The reason I left these in is > that I'm none too certain what device feature the DMA API uses to decide a > device isn't cache-coherent. The DMA API does not look at device features at all. It needs to be told so by the platform code. Once an architecture implements the hooks to support non-coherent DMA all devices are treated as non-coherent by default unless overriden by the architecture either globally (using the global dma_default_coherent variable) or per-device (using the dev->dma_coherent field, usually set by arch_setup_dma_ops). > If it's dev->coherent_dma_mask, the way I set > up the device in the a3000 driver should leave the coherent mask unchanged. > For the Zorro drivers, devices are set up to use the same storage to store > normal and coherent masks - something we most likely want to change. I need > to think about the ramifications of that. No, the coherent mask is slightly misnamed amd not actually related.