Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4450616imw; Tue, 19 Jul 2022 06:54:08 -0700 (PDT) X-Google-Smtp-Source: AGRyM1saIX9/EfROTUMzDkduQPwhbCdtl1TcVEJVGipGjbcjcvfwZZSpOKL+0XltipecMT/zi9q0 X-Received: by 2002:aa7:de91:0:b0:43a:d5b0:e0bb with SMTP id j17-20020aa7de91000000b0043ad5b0e0bbmr44043039edv.165.1658238848154; Tue, 19 Jul 2022 06:54:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658238848; cv=none; d=google.com; s=arc-20160816; b=gtd+hLgXbxijK55szdBJGqLPI7Ecv4HhuBbWP3+yNPnoZHJT9ePY2NTZqBX60Re/bf 0dlWTAxPK1cEwV2gwmk+tHyz7bRWzjPfRGeZh05IfrtdU+jJBpQTAhvkiN5iSj8A/C6T 8lNbp0nxjkVt1m9T9wpKNEUSaMI5JZr/oABMnJ0ACP/XZ+gJgtCBChr/V50MwoQoPg9j iBIZTXS87rlrXp7fXY8KzweJYZCGv5qcGdirdzlRaR5VeSQyGLqa1BMwN7EyrUEjfT+c ND0E5UEU3hESJjMaWr02oFjJlkPDoCHr73IsmThgbtq2xDyMqrny/X6edMCA0tNoAeHF gB9g== 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=kIYV5VQPGWT9n+zj1ToFYouxX7n+Y2qnPZPLUj/fcdA=; b=tUc9RfSTQP4DBVM7GXCDq8zFleFrorJbY6cHRMJOIyqBMs3mAfrPyoegwHUcMdeqQn ZLTEFCTZ0nBpXcGY/Sy5Wzm2ki/Z7iRNSMOpC1VEFyGXpzbIEx13o7/xGMtSOWowbosW ACZbGINgEIwHm3E6weFguNKhBHiqHQcRkxiQrNjGzkoJsjXg3OdblPtuDJwA89r4iN/B qb0OzU39s/CiiM09xma+tJkVBQG0vem9ZlHI9gCIhwudweYkxDdxBxXOaEV0CQss85CR wwl5ZBMzgh/mUaNSTJ6ekoGfQ1qpowOBYxqdxvrZif0JvCsLyccCAkMYAbYMV0yk+mKi vjwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="NKy5nlv/"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t3-20020a50ab43000000b0043a91cd3039si17548506edc.628.2022.07.19.06.53.43; Tue, 19 Jul 2022 06:54:08 -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=@gmail.com header.s=20210112 header.b="NKy5nlv/"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242531AbiGSM7M (ORCPT + 99 others); Tue, 19 Jul 2022 08:59:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242521AbiGSM6d (ORCPT ); Tue, 19 Jul 2022 08:58:33 -0400 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9EC525F12B; Tue, 19 Jul 2022 05:23:38 -0700 (PDT) Received: by mail-pj1-x102f.google.com with SMTP id b7-20020a17090a12c700b001f20eb82a08so597617pjg.3; Tue, 19 Jul 2022 05:23:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=kIYV5VQPGWT9n+zj1ToFYouxX7n+Y2qnPZPLUj/fcdA=; b=NKy5nlv/FgYWq5UB602U/dYy8pXGBSA/jwkZtdtOKtDZ4vPJ/6EEjuzkkAzArMrwN3 FuQlR0H4BF/mtLJNlyQaig3CLYvbQeeAqr2FGyTUh7s77maURmahcOE/pizZU1PMAPrA DA4prFvpVk+1ECNLWdiC8Ge3GseJM+xz8nqjXk4bk4wvfAlQQoVSmGSGdGVIbN4JBQfY Odz7jQVRqsxY9dfuWtS6ADjjOJb/iZq6d7B4oaw9B/tgdW55wluuTmosyHe/YrSBWxes hK5Dj19eLFoffro358zde7A0JTdg2Tk5Zg7ncOqlrsMEbldY48cHS5bO06Rd1EUyEx+5 Ldhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=kIYV5VQPGWT9n+zj1ToFYouxX7n+Y2qnPZPLUj/fcdA=; b=6CMAPZd/6SgeB6kwYCEZ5XoWXyM5ubDLTr1GLHBnf46fBcAnIcPqnuiuA/2Xg+k5fd yZTQ+F8YOrUOEdJdD7SCEniBZPcFtobiBYNDYuMTRhvbsVs6MCduLkaj04WMrahh611F 0IWm9RIZ0CG56DSlZk9T2bDulDl+v6XmrXEfLoQ2nHpFtPBVkxEe46dualjRKP3xfqSj IQwa+KSwpVjD0NSzFKBCMYbzflgHIVyHJVXqFuE0NOg/N9RwsBEQ72+QPGw72lLuhss4 dpnzoKkrYF1aKfHIGIK4TVdxpln18beUkQqVt3hw+fvTZHhW14GkfmFaEjywVCefG6AH v2Bw== X-Gm-Message-State: AJIora95c0D3Juz3u7nV2xbPcQniVexC3zSDfx9GuaoqJ7ZPlo8oN60E j5BmtbmmvKVFGpv5/cpe8nU= X-Received: by 2002:a17:903:18c:b0:16c:51c6:675d with SMTP id z12-20020a170903018c00b0016c51c6675dmr32808811plg.153.1658233418097; Tue, 19 Jul 2022 05:23:38 -0700 (PDT) Received: from localhost ([2409:10:24a0:4700:e8ad:216a:2a9d:6d0c]) by smtp.gmail.com with ESMTPSA id cp16-20020a170902e79000b0016397da033csm11416832plb.62.2022.07.19.05.23.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Jul 2022 05:23:37 -0700 (PDT) Date: Tue, 19 Jul 2022 21:23:36 +0900 From: Stafford Horne To: Arnd Bergmann Cc: Christoph Hellwig , LKML , Catalin Marinas , Will Deacon , Guo Ren , Paul Walmsley , Palmer Dabbelt , Albert Ou , Richard Weinberger , Anton Ivanov , Johannes Berg , Bjorn Helgaas , Linux ARM , linux-csky@vger.kernel.org, linux-riscv , linux-um , linux-pci , linux-arch Subject: Re: [PATCH v2 2/2] asm-generic: Add new pci.h and use it Message-ID: References: <20220717033453.2896843-1-shorne@gmail.com> <20220717033453.2896843-3-shorne@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 Tue, Jul 19, 2022 at 01:55:03PM +0200, Arnd Bergmann wrote: > On Tue, Jul 19, 2022 at 12:55 PM Stafford Horne wrote: > > > diff --git a/drivers/comedi/drivers/comedi_isadma.c b/drivers/comedi/drivers/comedi_isadma.c > > index 700982464c53..508421809128 100644 > > --- a/drivers/comedi/drivers/comedi_isadma.c > > +++ b/drivers/comedi/drivers/comedi_isadma.c > > @@ -104,8 +104,10 @@ unsigned int comedi_isadma_poll(struct comedi_isadma *dma) > > > > flags = claim_dma_lock(); > > clear_dma_ff(desc->chan); > > +#ifdef CONFIG_X86_32 > > if (!isa_dma_bridge_buggy) > > disable_dma(desc->chan); > > +#endif > > There is a logic mistake here: if we are on something other than x86-32, > this always needs to call the disable_dma()/enable_dma(). Oops, thats right. Sorry, I should have noticed that. > Not sure how to best express this in a readable way, something like this > would work: Option 1: > #ifdef CONFIG_X86_32 > if (!isa_dma_bridge_buggy) > #endif > disable_dma(desc->chan); > > > or possibly at the start of this file, a Option 2: > #ifndef CONFIG_X86_32 > #define isa_dma_bridge_buggy 0 > #endif Option 3: > Or we could try to keep the generic definition in a global header > like linux/isa-dma.h. Perhaps option 3 makes the whole patch the most clean. -Stafford