Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp15815902rwd; Mon, 26 Jun 2023 01:31:34 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7mch1gAYTUlHm6j/+R11ZBjYbpIeOLBgncWwixst2/FfvdB8Lf5VdYb+3e7X+2aXFBPu0S X-Received: by 2002:a05:6402:7cc:b0:51b:ec90:cf10 with SMTP id u12-20020a05640207cc00b0051bec90cf10mr7465162edy.29.1687768294161; Mon, 26 Jun 2023 01:31:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687768294; cv=none; d=google.com; s=arc-20160816; b=RpUFp5cie3o1F6aAESHXymjd7OwDWMrAjBo/r8sJPDdtGdA06v1zYcVBAQzCFXFkta K+tC3DDFePWixSIEv5zUpv4NVyFCEIGxvQltLeO42FWlQS1XvypDjrmLA7jthZb/ilMo Msx62ETbiCJpY612X9STVFNgDfNuCyW6fIqaZF7V9F3nr4wI6bx2KxeFAHVvfhScZsEr V0pGwJWfs/ZQRJ+xILnVSnFZC8Vg8vun3lQxILpriR95SXHA99cbjsw8ueSGrl/IBRUm Gfsn37V9zit5NHQ2CH3hCRDNkDund2tfHWids4ADb6pZvO14sXeoKMHnbSowTectVrAj Ub2Q== 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=7B6okcQX5DvR+o2sW8uBe3UYiOMl6OT7JIHNly8h6yU=; fh=rLAqiZyf08r2dmszksMym9ipkKd1uh2tXBsMcr9oYLk=; b=wjybV5Vpy83r3DZ0Qsb+xDu1GuUwSMlABNqKvk3Pac+rJA0hHtWipOFL6avE6ljdTy haegjMFo62PH1KdOePAzK0rM6pZU9pKUfLuM2oWaKmh2BavhSq7nZn/yfRHGfURVAJ4b 9+h0wbeXjSuBevNqcng6Zrz7vg0og73CdAeVBpv971np+0ReynxbKqjmf1FX6oI2Vkok G/DqusmEbCKHyLLDyHr6v1deoZDtDuvy3TCURFGKPCcidTMhvbF+/9xl0rHOQgQGwgld QyrJXRCVujxOgrYBNj4kkds0pCOlWvQ1ChXcpexY/T058q9NuUARiqAJsIHcLNyuCR2M WVaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=ZncGQtQh; 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 k10-20020aa7c38a000000b0051d9db1a578si547125edq.671.2023.06.26.01.31.08; Mon, 26 Jun 2023 01:31:34 -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=ZncGQtQh; 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 S229667AbjFZH6f (ORCPT + 99 others); Mon, 26 Jun 2023 03:58:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229579AbjFZH6e (ORCPT ); Mon, 26 Jun 2023 03:58:34 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C468583 for ; Mon, 26 Jun 2023 00:58:33 -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=7B6okcQX5DvR+o2sW8uBe3UYiOMl6OT7JIHNly8h6yU=; b=ZncGQtQhxUTzraJizW2ZrM+rSH Oz9z05YQewLNQpl1p4Js2qLMCkQxx/UTTg+cx+4U1uPZ4bo0V9jG9kXpYPzEPU1Bp3hTWSPTR88as TH/GgG1LtSwD4kWXymNNtZVEY2Cr9F1/pVEXGiuj96gyUL0+w25/DkHKeWff438DvraVBjIKQneeA Ft2LuzTJshBYS3PKL+vcwbI2swwzmkK0FVmgZH89mG89ESUBXOMBc2JcLTi32/+al8ULN7UeWudFu UjKm9xK8JDnMatC9MBhhyMiabIHBrEvDfWPfqI9OwVGJHOJmHtZ5Ud3dSj5HGirhB8gbs3jlW40Om uB2zETDQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1qDh78-009bXc-1k; Mon, 26 Jun 2023 07:58:22 +0000 Date: Mon, 26 Jun 2023 00:58:22 -0700 From: Christoph Hellwig To: Arnd Bergmann Cc: Mark Brown , Yingkun Meng , Arnd Bergmann , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ASoC: loongson: fix address space confusion Message-ID: References: <20230622101235.3230941-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230622101235.3230941-1-arnd@kernel.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 Thu, Jun 22, 2023 at 12:12:22PM +0200, Arnd Bergmann wrote: > Change the driver to instead use the physical address as stored in the > PCI BAR resource directly. Since 'dev_addr' is a 32-bit address, I think > this results in the same truncated address on loongarch but is otherwise > closer to portable code and avoids the warning. This gets rid of the warning, but is still broken. pci_resource_start retuns a resource_size_t, which really is a phys_addr_t, but certainly no DMA address. To map PCI(e) resources for DMA the driver needs to call dma_map_resource.