Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3716214iog; Tue, 28 Jun 2022 00:49:17 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sDbGiGrvmVwvRErnLdp8NPPb0r1hlRShmBbuNpndL6tYX1C207xOVXOUZYBcrbzNnsFIFM X-Received: by 2002:a17:906:794f:b0:722:e857:1a8f with SMTP id l15-20020a170906794f00b00722e8571a8fmr16428483ejo.494.1656402557485; Tue, 28 Jun 2022 00:49:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656402557; cv=none; d=google.com; s=arc-20160816; b=kXCRcS2GJbU3L9TraIss+4W/vv53Y7NiQQC7t78ySQC8bhDxCmv4gBGsqf7QpqHuvJ nqljdvv6OaHRfh/AXoFCdnPTvoguJknsDjNAGUnRynlO+b+3cWDbYcn8ZLfe/MBOBxLB RwBUIJY15K5dR/TYwDYHvz+Wzel0iFsjtynW18/AKrFxSSIJzLscZnSq3b/F6QShaJlD m2Ge0jO095tH+VSJYWOnf2YPC4k294SamgGeN5WeS71MA2GPGEln3kVN9gqO0FKHBT8M CDFprZl1OZfuU99r79Hmv2dqHXYA6xXus1cGJMcNrMhphIWt4P2hITro3DoDz5oz5xjd LvJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=oUnjhZMiGNi6v7nsbqYIrss5xtOvLOvLOLR2zcKJEss=; b=Dib0fRTCcYHLT54cIkXxoilsed1ATLWWMVRnWHBv2QaBpBoNxscGKrmN5FMxCmL9eZ RG/hkToG8s+MkvSU9vcGwFJbcNx53nOWaiKJt0WFKu7dtL4Y/D3veimAHtNtsiMk8Kt8 nGofnphfZqme11aheTF6Xw0bZVm9z76Ia/qLXWDJ4LeiVKbyNnKpbcWyvLOlK0mBWPus XL8tst7u+ARpuLZmflaZ9CZRBAsVQgQBV3HsDRg4rNTca6ViI0rMfZeQvi2imztOJfIy +yPsNOUtJ+HyAy2N4ZpcN+ejDFVETSqpmfPMxo2+kkPgKK22TQhDPo6enHnuqVZZAR9K h1Fg== ARC-Authentication-Results: i=1; mx.google.com; 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 w8-20020a50d788000000b00435738f4569si16354234edi.195.2022.06.28.00.48.53; Tue, 28 Jun 2022 00:49:17 -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; 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 S241044AbiF1HMb (ORCPT + 99 others); Tue, 28 Jun 2022 03:12:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238792AbiF1HMY (ORCPT ); Tue, 28 Jun 2022 03:12:24 -0400 Received: from mail-ot1-f45.google.com (mail-ot1-f45.google.com [209.85.210.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD7F3275ED; Tue, 28 Jun 2022 00:12:23 -0700 (PDT) Received: by mail-ot1-f45.google.com with SMTP id 72-20020a9d064e000000b00616c2a174bcso4959937otn.8; Tue, 28 Jun 2022 00:12:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=oUnjhZMiGNi6v7nsbqYIrss5xtOvLOvLOLR2zcKJEss=; b=pwgXE9ASW272OrQ+E7wc+SE/zdC/UVcnYBxOBu2c8vdTxqdsrKMf5etatU5rN3LqV6 ZTQ6kzJK9wLPj1yQ4YJqXr1lb3LfK2vG9Ulp12Edv/QbzCBd26BalTzHQHCdZqLkAahp Fyrpaeb7PU+m+vb9uAwwA8e2T7MENtwY9bwVeFTedGdOjftdyV/f8KCW5ZtyBUjkSA7g 3MHNcw+JonBdn+oXwBfbufs6tT/FrYbEA25gMxj5awJvYteFd8+DdOpuUAKi0dE/xhg/ Jkg6qWYGio08y2L0eYGd9VlgYahjZ5EZcs5S8IYVP0a2j5PhSryccgHUlq/LUXuq/fff VZuA== X-Gm-Message-State: AJIora8c9gX1J9zXRtsQgKi6+TqlKZ776WBgEZHA+dS1wAADNOIu1SQO ZE6bsbds/9lyBfmFzrSwyjzn+FU9f1oItg== X-Received: by 2002:a9d:4808:0:b0:616:b002:4516 with SMTP id c8-20020a9d4808000000b00616b0024516mr7571527otf.13.1656400343039; Tue, 28 Jun 2022 00:12:23 -0700 (PDT) Received: from mail-ot1-f49.google.com (mail-ot1-f49.google.com. [209.85.210.49]) by smtp.gmail.com with ESMTPSA id m8-20020a4aab88000000b0041ea640396csm7302713oon.41.2022.06.28.00.12.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Jun 2022 00:12:22 -0700 (PDT) Received: by mail-ot1-f49.google.com with SMTP id w2-20020a056830110200b00616ce0dfcb2so3828822otq.1; Tue, 28 Jun 2022 00:12:22 -0700 (PDT) X-Received: by 2002:a05:6902:905:b0:64a:2089:f487 with SMTP id bu5-20020a056902090500b0064a2089f487mr18678075ybb.202.1656399845934; Tue, 28 Jun 2022 00:04:05 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: <9289fd82-285c-035f-5355-4d70ce4f87b0@gmail.com> From: Geert Uytterhoeven Date: Tue, 28 Jun 2022 09:03:53 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 3/3] arch/*/: remove CONFIG_VIRT_TO_BUS To: Michael Schmitz Cc: Arnd Bergmann , 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 Hi Michael, On Tue, Jun 28, 2022 at 5:26 AM Michael Schmitz wrote: > Am 28.06.2022 um 09:12 schrieb Michael Schmitz: > > On 27/06/22 20:26, Geert Uytterhoeven wrote: > >> On Sat, Jun 18, 2022 at 3:06 AM Michael Schmitz > >> wrote: > >>> Am 18.06.2022 um 00:57 schrieb Arnd Bergmann: > >>>> From: Arnd Bergmann > >>>> > >>>> All architecture-independent users of virt_to_bus() and bus_to_virt() > >>>> have been fixed to use the dma mapping interfaces or have been > >>>> removed now. This means the definitions on most architectures, and the > >>>> CONFIG_VIRT_TO_BUS symbol are now obsolete and can be removed. > >>>> > >>>> The only exceptions to this are a few network and scsi drivers for m68k > >>>> Amiga and VME machines and ppc32 Macintosh. These drivers work > >>>> correctly > >>>> with the old interfaces and are probably not worth changing. > >>> The Amiga SCSI drivers are all old WD33C93 ones, and replacing > >>> virt_to_bus by virt_to_phys in the dma_setup() function there would > >>> cause no functional change at all. > >> FTR, the sgiwd93 driver use dma_map_single(). > > > > Thanks! From what I see, it doesn't have to deal with bounce buffers > > though? > > Leaving the bounce buffer handling in place, and taking a few other > liberties - this is what converting the easiest case (a3000 SCSI) might > look like. Any obvious mistakes? The mvme147 driver would be very > similar to handle (after conversion to a platform device). Thanks, looks reasonable. > The driver allocates bounce buffers using kmalloc if it hits an > unaligned data buffer - can such buffers still even happen these days? No idea. > If I understand dma_map_single() correctly, the resulting dma handle > would be equally misaligned? > > To allocate a bounce buffer, would it be OK to use dma_alloc_coherent() > even though AFAIU memory used for DMA buffers generally isn't consistent > on m68k? > > Thinking ahead to the other two Amiga drivers - I wonder whether > allocating a static bounce buffer or a DMA pool at driver init is likely > to succeed if the kernel runs from the low 16 MB RAM chunk? It certainly > won't succeed if the kernel runs from a higher memory address, so the > present bounce buffer logic around amiga_chip_alloc() might still need > to be used here. > > Leaves the question whether converting the gvp11 and a2091 drivers is > actually worth it, if bounce buffers still have to be handled explicitly. A2091 should be straight-forward, as A3000 is basically A2091 on the motherboard (comparing the two drivers, looks like someone's been sprinkling mb()s over the A3000 driver). I don't have any of these SCSI host adapters (not counting the A590 (~A2091) expansion of the old A500, which is not Linux-capable, and hasn't been powered on for 20 years). Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds