From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg Kroah-Hartman Subject: Re: next take at setting up a dma mask by default for platform devices v2 Date: Thu, 22 Aug 2019 10:11:08 -0700 Message-ID: <20190822171108.GA17471@kroah.com> References: <20190816062435.881-1-hch@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20190816062435.881-1-hch@lst.de> Sender: linux-kernel-owner@vger.kernel.org To: Christoph Hellwig Cc: Maxime Chevallier , 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 List-Id: linux-arch.vger.kernel.org On Fri, Aug 16, 2019 at 08:24:29AM +0200, Christoph Hellwig wrote: > 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. Note to everyone. The first two patches in this series is already in 5.3-rc5. I've applied the rest of the series to my usb-next branch (with the 6th patch landing there later today.) They are scheduled to be merge to Linus in 5.4-rc1. Christoph, thanks so much for these cleanups. greg k-h 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.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 AD6D5C3A5A2 for ; Thu, 22 Aug 2019 17:11:10 +0000 (UTC) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (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 73F75233FC for ; Thu, 22 Aug 2019 17:11:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="YgpviCCu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 73F75233FC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 2E3D4B6D; Thu, 22 Aug 2019 17:11:10 +0000 (UTC) Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 8578FB50 for ; Thu, 22 Aug 2019 17:11:09 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id CB3D067F for ; Thu, 22 Aug 2019 17:11:08 +0000 (UTC) Received: from localhost (wsip-184-188-36-2.sd.sd.cox.net [184.188.36.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 821062089E; Thu, 22 Aug 2019 17:11:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566493868; bh=Eu5zYHsgZr/DzgkYZtrV8Xf3yPbZrB6F/5Aa3SVutiA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YgpviCCuEYOqne1wsEWgd6l+Gzkw+5xYBwggmYQtDll2PjCPqB1qmScWDXN1P/B5K B/RNg/icssWR6AjcDPdeqSlGGxWCAS2rl4YBtOQnalt5AVfZm3e4ze3if6d5gFRY2x +KvCpV/lo8jNDpZObQ1PLinLdtTKiva/GCEIEsL4= Date: Thu, 22 Aug 2019 10:11:08 -0700 From: Greg Kroah-Hartman To: Christoph Hellwig Subject: Re: next take at setting up a dma mask by default for platform devices v2 Message-ID: <20190822171108.GA17471@kroah.com> References: <20190816062435.881-1-hch@lst.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190816062435.881-1-hch@lst.de> User-Agent: Mutt/1.12.1 (2019-06-15) Cc: linux-arch@vger.kernel.org, Gavin Li , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Mathias Nyman , Geoff Levand , Fabio Estevam , Sascha Hauer , linux-usb@vger.kernel.org, Michal Simek , iommu@lists.linux-foundation.org, Maxime Chevallier , linux-m68k@lists.linux-m68k.org, Alan Stern , NXP Linux Team , Pengutronix Kernel Team , Minas Harutyunyan , Shawn Guo , Bin Liu , linux-arm-kernel@lists.infradead.org X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: iommu-bounces@lists.linux-foundation.org Errors-To: iommu-bounces@lists.linux-foundation.org On Fri, Aug 16, 2019 at 08:24:29AM +0200, Christoph Hellwig wrote: > 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. Note to everyone. The first two patches in this series is already in 5.3-rc5. I've applied the rest of the series to my usb-next branch (with the 6th patch landing there later today.) They are scheduled to be merge to Linus in 5.4-rc1. Christoph, thanks so much for these cleanups. greg k-h _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu 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.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, 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 4C699C3A5A1 for ; Thu, 22 Aug 2019 17:14:48 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (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 BE10F23402 for ; Thu, 22 Aug 2019 17:14:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="YgpviCCu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BE10F23402 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 46DrkF3KbjzDrJs for ; Fri, 23 Aug 2019 03:14:45 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linuxfoundation.org (client-ip=198.145.29.99; helo=mail.kernel.org; envelope-from=gregkh@linuxfoundation.org; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="YgpviCCu"; dkim-atps=neutral Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 46Drf729GqzDqtG for ; Fri, 23 Aug 2019 03:11:11 +1000 (AEST) Received: from localhost (wsip-184-188-36-2.sd.sd.cox.net [184.188.36.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 821062089E; Thu, 22 Aug 2019 17:11:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566493868; bh=Eu5zYHsgZr/DzgkYZtrV8Xf3yPbZrB6F/5Aa3SVutiA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YgpviCCuEYOqne1wsEWgd6l+Gzkw+5xYBwggmYQtDll2PjCPqB1qmScWDXN1P/B5K B/RNg/icssWR6AjcDPdeqSlGGxWCAS2rl4YBtOQnalt5AVfZm3e4ze3if6d5gFRY2x +KvCpV/lo8jNDpZObQ1PLinLdtTKiva/GCEIEsL4= Date: Thu, 22 Aug 2019 10:11:08 -0700 From: Greg Kroah-Hartman To: Christoph Hellwig Subject: Re: next take at setting up a dma mask by default for platform devices v2 Message-ID: <20190822171108.GA17471@kroah.com> References: <20190816062435.881-1-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190816062435.881-1-hch@lst.de> User-Agent: Mutt/1.12.1 (2019-06-15) X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, Gavin Li , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Mathias Nyman , Geoff Levand , Fabio Estevam , Sascha Hauer , linux-usb@vger.kernel.org, Michal Simek , iommu@lists.linux-foundation.org, Maxime Chevallier , linux-m68k@lists.linux-m68k.org, Alan Stern , NXP Linux Team , Pengutronix Kernel Team , Minas Harutyunyan , Shawn Guo , Bin Liu , linux-arm-kernel@lists.infradead.org, Laurentiu Tudor Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Fri, Aug 16, 2019 at 08:24:29AM +0200, Christoph Hellwig wrote: > 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. Note to everyone. The first two patches in this series is already in 5.3-rc5. I've applied the rest of the series to my usb-next branch (with the 6th patch landing there later today.) They are scheduled to be merge to Linus in 5.4-rc1. Christoph, thanks so much for these cleanups. greg k-h 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 86B65C3A5A3 for ; Thu, 22 Aug 2019 17:11:12 +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 5D1F4233FC for ; Thu, 22 Aug 2019 17:11:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Req5c2it"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="YgpviCCu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5D1F4233FC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org 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=DCraIHwxRpzWC+OX9K1QZ8WUqSmWL0bWmwdK6SuwK10=; b=Req5c2itFAWtzl 6jsulZtz+cjDh0rpfehRfHHDg9bQdCORwTY29/ilur14nbzMwJr7CkAPAAZjK1ap792py9IhU5qYj DzLEazPSLJPr+qj3hxHUowTiuieOMXfWTV7LLhxc+QfAWgfLDUXl0DdpfcMsqf7XhRZOznhCdq0Gk QjyHlbK6YSTqFOFaaW85xl2RFX4axp1n93o3qniqqrJCed08K7jW3p5a70iYmd8e3T67lIw9AJ2Bq oBocO+BXxGi8AZOUk2KVBpShAT+//LcJgxgXHTo7sk1nk8RRgrCWgFcaB6JvaFXIfBtgD44y2AMVb 8VFPYnOhuS49VlL/+jKg==; 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 1i0qcB-0007vI-Uf; Thu, 22 Aug 2019 17:11:11 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i0qc9-0007u5-PT for linux-arm-kernel@lists.infradead.org; Thu, 22 Aug 2019 17:11:10 +0000 Received: from localhost (wsip-184-188-36-2.sd.sd.cox.net [184.188.36.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 821062089E; Thu, 22 Aug 2019 17:11:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566493868; bh=Eu5zYHsgZr/DzgkYZtrV8Xf3yPbZrB6F/5Aa3SVutiA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YgpviCCuEYOqne1wsEWgd6l+Gzkw+5xYBwggmYQtDll2PjCPqB1qmScWDXN1P/B5K B/RNg/icssWR6AjcDPdeqSlGGxWCAS2rl4YBtOQnalt5AVfZm3e4ze3if6d5gFRY2x +KvCpV/lo8jNDpZObQ1PLinLdtTKiva/GCEIEsL4= Date: Thu, 22 Aug 2019 10:11:08 -0700 From: Greg Kroah-Hartman To: Christoph Hellwig Subject: Re: next take at setting up a dma mask by default for platform devices v2 Message-ID: <20190822171108.GA17471@kroah.com> References: <20190816062435.881-1-hch@lst.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190816062435.881-1-hch@lst.de> User-Agent: Mutt/1.12.1 (2019-06-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190822_101109_846583_9DCC24D9 X-CRM114-Status: GOOD ( 14.77 ) 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: linux-arch@vger.kernel.org, Gavin Li , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Mathias Nyman , Geoff Levand , Fabio Estevam , Sascha Hauer , linux-usb@vger.kernel.org, Michal Simek , iommu@lists.linux-foundation.org, Maxime Chevallier , linux-m68k@lists.linux-m68k.org, Alan Stern , NXP Linux Team , Pengutronix Kernel Team , Minas Harutyunyan , Shawn Guo , Bin Liu , linux-arm-kernel@lists.infradead.org, Laurentiu Tudor 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 Fri, Aug 16, 2019 at 08:24:29AM +0200, Christoph Hellwig wrote: > 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. Note to everyone. The first two patches in this series is already in 5.3-rc5. I've applied the rest of the series to my usb-next branch (with the 6th patch landing there later today.) They are scheduled to be merge to Linus in 5.4-rc1. Christoph, thanks so much for these cleanups. greg k-h _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel