Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752149AbdFZVUM (ORCPT ); Mon, 26 Jun 2017 17:20:12 -0400 Received: from mail-pf0-f182.google.com ([209.85.192.182]:34722 "EHLO mail-pf0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751615AbdFZVUC (ORCPT ); Mon, 26 Jun 2017 17:20:02 -0400 Date: Mon, 26 Jun 2017 14:19:57 -0700 From: Bjorn Andersson To: Suman Anna Cc: Ohad Ben-Cohen , Rob Herring , Santosh Shilimkar , Mark Rutland , linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, "Andrew F. Davis" , Sam Nelson , Grygorii Strashko Subject: Re: [PATCH v3 2/3] remoteproc/keystone: Add a remoteproc driver for Keystone 2 DSPs Message-ID: <20170626211957.GH18666@tuxbook> References: <20170613234513.7624-1-s-anna@ti.com> <20170613234513.7624-3-s-anna@ti.com> <20170625201545.GA26155@builder> <1ccd9273-0fde-4241-6d99-1d03be2f5b57@ti.com> <20170626200608.GG18666@tuxbook> <1f8d65fc-0acc-499e-a98e-953dce60750f@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1f8d65fc-0acc-499e-a98e-953dce60750f@ti.com> User-Agent: Mutt/1.8.2 (2017-04-18) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1182 Lines: 31 On Mon 26 Jun 13:20 PDT 2017, Suman Anna wrote: > On 06/26/2017 03:06 PM, Bjorn Andersson wrote: > > On Mon 26 Jun 08:54 PDT 2017, Suman Anna wrote: > >> On 06/25/2017 03:15 PM, Bjorn Andersson wrote: [..] > > I still would like to have resources allocated at probe() time, so I > > would appreciate a follow up patch moving the request_irq()s to probe, > > per above comment (but we can take that after v4.13). > > OK thanks. This is a common theme across all the remoteproc drivers > supporting rpmsg, and I definitely need to disable them in probe since > the boot or the virtio/rpmsg devices are not guaranteed to be present in > the probe. > We have a consistent struct rproc after rproc_alloc(). So before the virtio device (rpmsg in your case) calls virtio_find_vqs() rvring->vq will be NULL and rproc_vq_interrupt() is a nop. So AFAICT it should be fine to register this at probe time and leave it enabled...but there's a lot of moving parts involved here, so it's possible that I'm missing something. But in for both interrupts it's important to disable them before calling rproc_free(), as this will free the memory passed to the interrupt handler. Regards, Bjorn