From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bombadil.infradead.org ([198.137.202.133]:38344 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726519AbfHPG1H (ORCPT ); Fri, 16 Aug 2019 02:27:07 -0400 From: Christoph Hellwig Subject: next take at setting up a dma mask by default for platform devices v2 Date: Fri, 16 Aug 2019 08:24:29 +0200 Message-ID: <20190816062435.881-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-arch-owner@vger.kernel.org List-ID: To: Greg Kroah-Hartman , Maxime Chevallier Cc: Gavin Li , Laurentiu Tudor , Minas Harutyunyan , Alan Stern , Geoff Levand , Michal Simek , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Mathias Nyman , Bin Liu , linux-arm-kernel@lists.infradead.org, linux-usb@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-m68k@lists.linux-m68k.org, iommu@lists.linux-foundation.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Message-ID: <20190816062429.vefH3Srv8Ul81fau6s2jFbKtS1e5RLpbASumHiOgyMo@z> Hi all, this is another attempt to make sure the dma_mask pointer is always initialized for platform devices. Not doing so lead to lots of boilerplate code, and makes platform devices different from all our major busses like PCI where we always set up a dma_mask. In the long run this should also help to eventually make dma_mask a scalar value instead of a pointer and remove even more cruft. The bigger blocker for this last time was the fact that the usb subsystem uses the presence or lack of a dma_mask to check if the core should do dma mapping for the driver, which is highly unusual. So we fix this first. Note that this has some overlap with the pending desire to use the proper dma_mmap_coherent helper for mapping usb buffers. The first two patches have already been queued up by Greg and are only included for completeness. Changes since v1: - fix a compile error in the ppc of ohci driver - revamp the last patch to get rid of the archdata callout entirely.