From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: next take at setting up a dma mask by default for platform devices Date: Sun, 11 Aug 2019 10:05:14 +0200 Message-ID: <20190811080520.21712-1-hch@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Greg Kroah-Hartman , Maxime Chevallier Cc: linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Olav Kongas , Gavin Li , linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, Mathias Nyman , Geoff Levand , Fabio Estevam , Sascha Hauer , linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Michal Simek , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Tony Prisk , iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, Alan Stern , NXP Linux Team , Pengutronix Kernel Team , Minas Harutyunyan , Shawn Guo , Bin Liu , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: linux-arch.vger.kernel.org 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 from this series should probably go into 5.3 and then uses as the basis for the decision to use dma_mmap_coherent. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bombadil.infradead.org ([198.137.202.133]:33280 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725810AbfHKIFy (ORCPT ); Sun, 11 Aug 2019 04:05:54 -0400 From: Christoph Hellwig Subject: next take at setting up a dma mask by default for platform devices Date: Sun, 11 Aug 2019 10:05:14 +0200 Message-ID: <20190811080520.21712-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 , Olav Kongas , Tony Prisk , Mathias Nyman , Bin Liu , linux-arm-kernel@lists.infradead.org, linux-usb@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, iommu@lists.linux-foundation.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Message-ID: <20190811080514.oTy2Gf1Rg_O1rP2-fhzb_gwSOxffjvCPNVEzV3FCZ1I@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 from this series should probably go into 5.3 and then uses as the basis for the decision to use dma_mmap_coherent.