Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp468281imu; Mon, 26 Nov 2018 13:30:31 -0800 (PST) X-Google-Smtp-Source: AJdET5cWLheHOSyY+W+Px5+1czEfSCB/+eJvIwNTN/wq+2q5AzQ57GztIfxZNAcoo7UBNSBms96N X-Received: by 2002:a62:7796:: with SMTP id s144mr29750533pfc.26.1543267831354; Mon, 26 Nov 2018 13:30:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543267831; cv=none; d=google.com; s=arc-20160816; b=bMBoTRQksOwSDkf3ft+PcBU4jZrrd4O6T8diwwWHQyttYSPwhrLwKHqfaZlMxMVZir cCr3SB2XTZ4QHJIiW5OeMsk5g2H+O+Gx9OQfXTyDaD5e9gQ0GajE4T/4ONbIQTT0tgCw bBhLhrCMdy6Pr1SBL+JZtJewpQtaYCAoc3GW9X4Pc229AhudhHBOjt5iCMfHOEi5BrY8 mReAbe0Wfzt0za8S0ipIAEbmOV9duywp3YcqOCRSkX7kgO2tSVUvaD7LrSeEnRuK8Y8O qmfv+7509pH8V5K/2KwcUXXb6DaUNTQWDfye+zCDERNPfmmE8UsT1eRbtrZfmQ5ewYQa 7wCw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=RvR6pAArK8NvftxKodtKo1/o51yA7eQ0VTz739e6vKA=; b=Sd9anAvcNyu67hj3k2Tf3U4k2Qbsfh/vYWCw7R+SbjMbVTeQCF2k71ErN+tc/fGCuI US5zXEIkJ6oWoAw1BbqYpKiDBHdwks7nWsFgLhdI+DDMOG/sqtd+Cu+jtUDpMymVUm0Z as2ayx53OqDOtgxivU4h9q6qTzp8nax9gh0h1hqS/TGcAUhWNshWa/3IEMl234TTkWKx 53oCILIJ9Nq2ob0x3P/zMvVIt35f623qY5dH1b6JwzBKpautKq52ASPAD5lwEETg9a9a SKZZnNUiqhUsFSl0ZFsPv1P5bSBB0XELxFheANH5wdtqitB5RNkb5MoNdiVzF4ieF1Yp 71Qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b="nVJ1o/DX"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d9si1414081pgb.105.2018.11.26.13.30.07; Mon, 26 Nov 2018 13:30:31 -0800 (PST) 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=fail header.i=@lechnology.com header.s=default header.b="nVJ1o/DX"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727062AbeK0IYt (ORCPT + 99 others); Tue, 27 Nov 2018 03:24:49 -0500 Received: from vern.gendns.com ([98.142.107.122]:45850 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726367AbeK0IYt (ORCPT ); Tue, 27 Nov 2018 03:24:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lechnology.com; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=RvR6pAArK8NvftxKodtKo1/o51yA7eQ0VTz739e6vKA=; b=nVJ1o/DXJDccdVqqD1iIdXfdOh AdW8wZIad9PUc/pFC74D31KUgb9AM2cCF9IUrSZd9S5YUJHvOr4tJLT2XJ4dTDSYak2XoIZ9qUz9X 3vSbuLzPsoefJOm3eEFh02bVyeRr0SkUrpGpWvK8xS1lSJT9n7JH/nFruVhRsC1J2CJUgmjSXCSJQ EmjJ0nEqaLZee9Ru8sXwLHK+99Atf9ym4DNxbuY7d6eAAlBjRmeiWYcopeqVhEOGP7JAspqtDXEHg EPqyBhoQkIbMpVLOB9dVppRkF7sywp3feY72wYVzQFzBVM0moPuM6mPXrEZ5RDvoB9Jm3QtB+Jrke rDtmqYVw==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:44928 helo=[192.168.0.134]) by vern.gendns.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1gROQd-0003mz-N2; Mon, 26 Nov 2018 16:28:27 -0500 Subject: Re: [PATCH 01/16] remoteproc: Extend rproc_da_to_va() API with a flags parameter To: Roger Quadros , ohad@wizery.com, bjorn.andersson@linaro.org Cc: tony@atomide.com, robh+dt@kernel.org, bcousson@baylibre.com, ssantosh@kernel.org, s-anna@ti.com, nsekhar@ti.com, t-kristo@ti.com, nsaulnier@ti.com, jreeder@ti.com, m-karicheri2@ti.com, woods.technical@gmail.com, linux-omap@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org References: <1543218769-5507-1-git-send-email-rogerq@ti.com> <1543218769-5507-2-git-send-email-rogerq@ti.com> From: David Lechner Message-ID: Date: Mon, 26 Nov 2018 15:29:16 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <1543218769-5507-2-git-send-email-rogerq@ti.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/26/18 1:52 AM, Roger Quadros wrote: > From: Suman Anna > > The rproc_da_to_va() API is currently used to perform any device > to kernel address translations to meet the different needs of the > remoteproc core/platform drivers (eg: loading). The function also > invokes the da_to_va ops, if present, to allow the remoteproc > platform drivers to provide address translation. However, not all > platform implementations have linear address spaces, and may need > an additional parameter to be able to perform proper translations. > > The rproc_da_to_va() API and the rproc .da_to_va ops have therefore > been expanded to take in an additional flags field enabling some > remoteproc implementations (like the TI PRUSS remoteproc driver) > to use these flags. Also, define some semantics for this flags > argument as this can vary from one implementation to another. A > new flags type is encoded into the upper 16 bits along side the > actual value in the lower 16-bits for the flags argument, to > allow different individual implementations to have better > flexibility in interpreting the flags as per their needs. This seems like an overly complex solution for a rather simple problem. Instead of passing all sorts of flags, could we just add a parameter named "page" to da_to_va() that indicates the memory page of the address in the remote processor? Or perhaps there is some other use for all of these flags that I am not aware of?