Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp282307ybk; Tue, 19 May 2020 22:45:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwCCtRaGf48f8zNhLUIj7GIiCsyvt6/fvdt7ZeI4eM6r0glQiR0IY/uSdBIjH+HVCuRRQrI X-Received: by 2002:a17:906:37d9:: with SMTP id o25mr2409492ejc.15.1589953536654; Tue, 19 May 2020 22:45:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589953536; cv=none; d=google.com; s=arc-20160816; b=UBU3xBvdYHy0KsdF2djP8Bhx2eJ23ghVwoZp6O310vdiJWzLQX29jgWbrornT5dWAO sEX0nBYhvqQkacKK+OweAcWRpU7ptOQi/1fprYzFtL3rPwZF5gMuPleLWevbXbjbeb2J ySunp4BBQ0+rxt+Z+Ijklfc9eyu0pse6zMpe8ZaqJJ/JQzTMjlb958ejKJYW0vuqlaJY Mwvt4qi9LgLxEwY3LXVn6gmCSxMJYTBsTG0ZcIWlYtlX2SRPk9B8nbysc4z86/YV/9EH DpW9Mi4T/T5/pvJsv1sy4Frl/9NdyXUIZ39/6flpCu1kodnS3GbUJl2aVK0AqmTBv7ld yR6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=KoseUIttGjqgWX0UKF2Ag36P6TPhu9e78nBGakFukfc=; b=morZ6/Ks4A7eqdEXV2FKqLTWSc+c6J/oEoID4BMAT8GkspcBtnZbY06KPPlAy3QohG Ea4KRsjazFT7z612toCjo8kHWBqHTRNPeG5lZQVNREo6NdM82Zy2BNMsQLqGS8Mv0UpO 2wtE7fzZEyDCscOjIBo96WHbxr4DfwUpuUht7StuAzBpoMxBcs8j0fGEt0oAuuWAJ3Xf E/Iwt6Dlk+NJPoBQAx6OPLvS0rpwm/q7j/+OA5zEcuzVb99ifoCi7jO8s9MX7pMMjX+u 1Dpi3jyKLIn+sL+KBQhwnVNY7BC0Q6MRQpLt55xFppCPLjfu9VVC6A+R+01HeJHY/8OH L29w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MV9LOgk3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n19si1217142ejc.415.2020.05.19.22.45.14; Tue, 19 May 2020 22:45:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MV9LOgk3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726741AbgETFnx (ORCPT + 99 others); Wed, 20 May 2020 01:43:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:42430 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726309AbgETFnw (ORCPT ); Wed, 20 May 2020 01:43:52 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 B534C2075F; Wed, 20 May 2020 05:43:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589953432; bh=IEc+QC7akchK5eV7/ZYdgqsaG2z+ctbqijAK6mJ6Q98=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MV9LOgk3OXP5XC66veg+cLqTxXmgekS2F0K2Lx1avu81cXlkxReu1me2r75MMQ2b+ ZE/q6upLQs+FrqRHXAntfRYgsnkgOdGK7p4UiV+dhvyZ4PYwI5dyJMh3rzb1/w81wX vLFfMmab6HO3EzfJeRgK37kwsXkaZoBeGIY6dFJs= Date: Wed, 20 May 2020 07:43:49 +0200 From: Greg Kroah-Hartman To: Jim Quinlan Cc: Nicolas Saenz Julienne , Rob Herring , Frank Rowand , Christoph Hellwig , Marek Szyprowski , Robin Murphy , Suzuki K Poulose , Saravana Kannan , Heikki Krogerus , "Rafael J. Wysocki" , Dan Williams , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE" , open list , "open list:DMA MAPPING HELPERS" Subject: Re: [PATCH 09/15] device core: Add ability to handle multiple dma offsets Message-ID: <20200520054349.GB2180554@kroah.com> References: <20200519203419.12369-1-james.quinlan@broadcom.com> <20200519203419.12369-10-james.quinlan@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200519203419.12369-10-james.quinlan@broadcom.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 19, 2020 at 04:34:07PM -0400, Jim Quinlan wrote: > diff --git a/include/linux/device.h b/include/linux/device.h > index ac8e37cd716a..6cd916860b5f 100644 > --- a/include/linux/device.h > +++ b/include/linux/device.h > @@ -493,6 +493,8 @@ struct dev_links_info { > * @bus_dma_limit: Limit of an upstream bridge or bus which imposes a smaller > * DMA limit than the device itself supports. > * @dma_pfn_offset: offset of DMA memory range relatively of RAM > + * @dma_map: Like dma_pfn_offset but used when there are multiple > + * pfn offsets for multiple dma-ranges. > * @dma_parms: A low level driver may set these to teach IOMMU code about > * segment limitations. > * @dma_pools: Dma pools (if dma'ble device). > @@ -578,7 +580,12 @@ struct device { > allocations such descriptors. */ > u64 bus_dma_limit; /* upstream dma constraint */ > unsigned long dma_pfn_offset; > - > +#ifdef CONFIG_DMA_PFN_OFFSET_MAP > + const void *dma_offset_map; /* Like dma_pfn_offset, but for > + * the unlikely case of multiple > + * offsets. If non-null, dma_pfn_offset > + * will be 0. */ > +#endif > struct device_dma_parameters *dma_parms; > > struct list_head dma_pools; /* dma pools (if dma'ble) */ I'll defer to Christoph here, but I thought we were trying to get rid of stuff like this from struct device, not add new things to it for dma apis. And why is it a void *? thanks, greg k-h