Received: by 10.192.165.148 with SMTP id m20csp497675imm; Fri, 4 May 2018 01:17:56 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoZE+raO4f13lztW4NCH4KidhzBopllteoGozKiglk3Wum8+pEvndyAqEPwFolmpMl6DtjM X-Received: by 2002:a17:902:680c:: with SMTP id h12-v6mr27477580plk.113.1525421876294; Fri, 04 May 2018 01:17:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525421876; cv=none; d=google.com; s=arc-20160816; b=UoLfbUGMOVNtx3TN4r5wWI/FVPJnA7vhhfDF4sgGXBlMRGDk2HhW9xnYxid3XA1p24 WEpBd6N/MldmqvyrmffoHH7UGOCPMhwBBKZgX/SUGn+p8+vr90C6oV5TiW/B84bYTIRm l/hIeOG1lMdZl17icQbfGnAYczNt5Y4Lo0uJR4XQKSZDGCHJVeH/DiFpOreacpl2Vx3u ikXEkVT6Udk7xDwZWMVoNd+RzKy3q5RQeXptr+dDxLJC/4NAQjUek+kbXZ+buHEcUsJd rnq7QiVme2HsRYQ0aUrMOIhxByfCOSGKBHugWPxMGD1XhY/oqoPWiBbdaVtEoVAL+beO JdVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:dkim-signature:arc-authentication-results; bh=w5DpWpfTSC7eqtsVg543inLzhnH5qi/Qu0/QtzEatK8=; b=a6tA6EfRiTLipyu33Kjt/y2S4uevsFFrdaqaUVVlnIvVaneK4jt8DZp/M+HNQKTHu+ F5PCaAFUoJvVcbPAq1+8QC8MxOJ4+mLv4HePtN6g5bxg473+w/ZAUOFPxvxMVtjMfXGh TQUuymbj0b47nxBgGzFCBwoj0K5YLJwK+zJj/q0pquelBVF0Z682Xf9fbJV48ZcqVXaW /OszaWavVkaKx+o+GrdZwAgNocbpNHrQij3VnZbvckAnmb/cZ2LyxuBpt130RU44PxJk vK2C6wQtZeREbT41+AF/Pz2qPPYd20gmNDyrlIy4jWUdtmsQFh2u/y3fv011wMiffDej QGQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=U0Ycvimd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z18-v6si12682512pgc.99.2018.05.04.01.17.41; Fri, 04 May 2018 01:17:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=U0Ycvimd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751807AbeEDIRL (ORCPT + 99 others); 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 Received: by mail-pf0-f179.google.com with SMTP id w129so11434063pfd.3; Fri, 04 May 2018 01:17:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=w5DpWpfTSC7eqtsVg543inLzhnH5qi/Qu0/QtzEatK8=; b=U0YcvimdheWhklm4cQgC2m3nfllEuH3O/Gv/yDEv3SK3Yddi/fQJqUe+ClL1SYuVwB diKYI/8vfc3PER5mnYLEUeYJWlQ8oNtY1mKXcLwHSzftBH1bp3Qe/b0Sh+J5uSdz/F91 8RF2B4uqP3ruilYBoW31G9SpD+IgSDt31QH3vuTT4bBun78YkLomEdFZCnt9iA/Oikp5 SjJRLmZlvjt7Vm5ZEvXitgysy7FwHlI8RT85zr+mk7We0kA17tGE8cR55E1CIaejlalH Nt6wflHERlB34fag7O2SffsuJ1n9vTWxf9pbVoEHuiLCfqy6ITSR7aYSyBl1WcuqroCW Kszw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=w5DpWpfTSC7eqtsVg543inLzhnH5qi/Qu0/QtzEatK8=; b=OwnRMNviavObgryz4/ecEYBkHCIWy6gH4vW74XEX04i1v+YDtV6GyQRDXWv/8jN2vo 50y/uvKWyb7tpL+WQaO3xFGFH1nQoOIbbet/Yp9cRrBG+o50KHgWs7/NeFiAedZxFAzz NXbLNshlgo5vIKFUxAfi6272zuwIzUFLIklrRcOCHkOptKp8Syd+2rrhsm5S7Rudb/db glgw/JwALiLi+CMeOUUva+Au8aoLN6D6TEc5D4mNd3n5XiZ8bR47E2EDt2h/hIwFzGtM Qmn6j7dnSBXxBuvS65eMcufOgPz4W90+6oXbJYZum0O0flgzp7ENzVt0AAKZpUxvF4fm cqfg== X-Gm-Message-State: ALQs6tAgR/HYP1ErCJZaDskCffajy9YyHqBjIlNxlsFaePcO5MCx9vai paYJCTchghzRP9JOmp6rXNBCpA== X-Received: by 2002:a17:902:2468:: with SMTP id m37-v6mr27464057plg.388.1525421827287; Fri, 04 May 2018 01:17:07 -0700 (PDT) Received: from [192.168.1.101] (222-154-41-72-adsl.bb.spark.co.nz. [222.154.41.72]) by smtp.gmail.com with ESMTPSA id b6-v6sm23038212pgr.52.2018.05.04.01.17.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 May 2018 01:17:06 -0700 (PDT) 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 Precedence: bulk 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 >