From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751814AbeEDIRL (ORCPT ); Fri, 4 May 2018 04:17:11 -0400 Received: from mail-pf0-f179.google.com ([209.85.192.179]:36608 "EHLO mail-pf0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751646AbeEDIRH (ORCPT ); Fri, 4 May 2018 04:17:07 -0400 X-Google-Smtp-Source: AB8JxZrfrViOOpZrmQfaLHg+MN335PZ4j1U2RvCr8AbQmb3sQDfRCVtiw6f4Zq/nQqM3YT82TT32Ag== Subject: Re: [PATCH net] macmace: Set platform device coherent_dma_mask To: Geert Uytterhoeven References: <20180503085120.GA14574@lst.de> Cc: Christoph Hellwig , Finn Thain , "David S. Miller" , linux-m68k , netdev , Linux Kernel Mailing List From: Michael Schmitz X-Enigmail-Draft-Status: N1110 Message-ID: Date: Fri, 4 May 2018 20:16:58 +1200 User-Agent: Mozilla/5.0 (X11; Linux ppc; rv:45.0) Gecko/20100101 Icedove/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Geert, Am 04.05.2018 um 19:24 schrieb Geert Uytterhoeven: > Hi Michael, > >>> Yes, that would be useful. The other assumption could be that >>> platform devices always allow an all-0xff dma mask. >> >> That's not always true (Atari NCR5380 SCSI and floppy would use a 24 >> bit DMA mask). We use bounce buffers allocated from a dedicated lowmem >> pool there currently, and for all I know don't use the DMA API yet. >> >> I bet that is a rare exception though. Setting the default DMA mask >> for platform devices to all-0xff and letting the few odd drivers force >> a different setting seems the best way forward. > > I'd say that's usually a property of the platform, not of the device? Right - I was thinking 'm68k' as platform, not a particular machine like Mac or Falcon (the 24 bit mask only applies to that particular model anyway). > So IMHO it belongs in the platform code, not in the device driver code. OK - let's have a default mask of 64 bit, and allow machine specific platform_init() to override using a new helper function. Cheers, Michael > Gr{oetje,eeting}s, > > Geert >