From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1DF32C3A589 for ; Thu, 15 Aug 2019 13:38:46 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E5E25206C1 for ; Thu, 15 Aug 2019 13:38:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="iia9yPNr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E5E25206C1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pCdXqoQmJzhdl8F/ayQG/PN114vDwLzJctI5/nX1TmY=; b=iia9yPNr18Wb95 ld6BVvCUfGA17jaf09FuamPyGxbWrWuTfj6p+uklGwvNCy//xBZLhSKTe1Yc6Lma1BLyvHitZ1/Vw d2s2GtmRdqdLlxKXicovZ9sU6n7/3UINOVsvRH+kO9uFYU+n0khVLmgLcY62PRksCSVTSWK6VlMjA lpCkD9RQ6nHlqv5C8vKXVF4Sm0l3Xzo31a2Uet75RrX+XG5g9XlxE6a10MIZQUcec4+U5aOtBgWFO abPDwCH4YpA8tmUyhpeLoyQzNXfAjiRAo57jL6+6Sq6HmRQqhR2PFYRE2UkwlXtYq2SSQgG7xuR3I xrPt/ZNaAka9yY4QQ/nA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hyFxl-0000BA-G5; Thu, 15 Aug 2019 13:38:45 +0000 Received: from verein.lst.de ([213.95.11.211]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hyFxJ-0008U1-3u for linux-arm-kernel@lists.infradead.org; Thu, 15 Aug 2019 13:38:24 +0000 Received: by verein.lst.de (Postfix, from userid 2407) id 8BF0568AFE; Thu, 15 Aug 2019 15:38:12 +0200 (CEST) Date: Thu, 15 Aug 2019 15:38:12 +0200 From: Christoph Hellwig To: Greg Kroah-Hartman Subject: Re: [PATCH 6/6] driver core: initialize a default DMA mask for platform device Message-ID: <20190815133812.GF12036@lst.de> References: <20190811080520.21712-1-hch@lst.de> <20190811080520.21712-7-hch@lst.de> <20190815130325.GB17065@kroah.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190815130325.GB17065@kroah.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190815_063817_721381_6DC7F77C X-CRM114-Status: GOOD ( 11.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gavin Li , Fabio Estevam , Christoph Hellwig , linux-arch@vger.kernel.org, Michal Simek , Maxime Chevallier , Alan Stern , NXP Linux Team , Mathias Nyman , Sascha Hauer , Minas Harutyunyan , Olav Kongas , Bin Liu , linux-arm-kernel@lists.infradead.org, Laurentiu Tudor , Geoff Levand , Shawn Guo , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Tony Prisk , iommu@lists.linux-foundation.org, Pengutronix Kernel Team , linuxppc-dev@lists.ozlabs.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Aug 15, 2019 at 03:03:25PM +0200, Greg Kroah-Hartman wrote: > > --- a/include/linux/platform_device.h > > +++ b/include/linux/platform_device.h > > @@ -24,6 +24,7 @@ struct platform_device { > > int id; > > bool id_auto; > > struct device dev; > > + u64 dma_mask; > > Why is the dma_mask in 'struct device' which is part of this structure, > not sufficient here? Shouldn't the "platform" be setting that up > correctly already in the "archdata" type callback? Becaus the dma_mask in struct device is a pointer that needs to point to something, and this is the best space we can allocate for 'something'. m68k and powerpc currently do something roughly equivalent at the moment, while everyone else just has horrible, horrible hacks. As mentioned in the changelog the intent of this patch is that we treat platform devices like any other bus, where the bus allocates the space for the dma_mask. The long term plan is to eventually kill that weird pointer indirection that doesn't help anyone, but for that we need to sort out the basics first. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel