From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755444AbbBLJKR (ORCPT ); Thu, 12 Feb 2015 04:10:17 -0500 Received: from mail-lb0-f172.google.com ([209.85.217.172]:55618 "EHLO mail-lb0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755174AbbBLJKM (ORCPT ); Thu, 12 Feb 2015 04:10:12 -0500 MIME-Version: 1.0 X-Originating-IP: [85.250.22.86] In-Reply-To: <20150211205757.GI2531@atomide.com> References: <1420838519-15669-1-git-send-email-s-anna@ti.com> <1420838519-15669-3-git-send-email-s-anna@ti.com> <20150211205757.GI2531@atomide.com> From: Ohad Ben-Cohen Date: Thu, 12 Feb 2015 11:09:50 +0200 Message-ID: Subject: Re: [PATCH v3 2/2] remoteproc: add support to handle internal memories To: Tony Lindgren Cc: Suman Anna , Kevin Hilman , Dave Gerlach , Robert Tivy , "linux-kernel@vger.kernel.org" , "linux-omap@vger.kernel.org" , linux-arm Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 11, 2015 at 10:57 PM, Tony Lindgren wrote: >> > +static int rproc_handle_intmem(struct rproc *rproc, struct fw_rsc_intmem *rsc, >> > + int offset, int avail) >> > +{ >> ... >> > + va = (__force void *)ioremap_nocache(rsc->pa, rsc->len); >> >> Back in the days when we developed remoteproc there was a tremendous >> effort to move away from ioremap when not strictly needed. > > The use of ioremap in general is just fine for drivers as long > as they access a dedicated area to the specific device. Accessing > random registers and memory in the SoC is what I'm worried about. Yes, the proposed interface essentially allows exactly this random access, since the parameters to ioremap would be provided from the user space (specifically from the resource table contained within the firmware of the remote processor). Thanks, Ohad. From mboxrd@z Thu Jan 1 00:00:00 1970 From: ohad@wizery.com (Ohad Ben-Cohen) Date: Thu, 12 Feb 2015 11:09:50 +0200 Subject: [PATCH v3 2/2] remoteproc: add support to handle internal memories In-Reply-To: <20150211205757.GI2531@atomide.com> References: <1420838519-15669-1-git-send-email-s-anna@ti.com> <1420838519-15669-3-git-send-email-s-anna@ti.com> <20150211205757.GI2531@atomide.com> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Wed, Feb 11, 2015 at 10:57 PM, Tony Lindgren wrote: >> > +static int rproc_handle_intmem(struct rproc *rproc, struct fw_rsc_intmem *rsc, >> > + int offset, int avail) >> > +{ >> ... >> > + va = (__force void *)ioremap_nocache(rsc->pa, rsc->len); >> >> Back in the days when we developed remoteproc there was a tremendous >> effort to move away from ioremap when not strictly needed. > > The use of ioremap in general is just fine for drivers as long > as they access a dedicated area to the specific device. Accessing > random registers and memory in the SoC is what I'm worried about. Yes, the proposed interface essentially allows exactly this random access, since the parameters to ioremap would be provided from the user space (specifically from the resource table contained within the firmware of the remote processor). Thanks, Ohad.