Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp291536ybt; Tue, 23 Jun 2020 22:34:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxLfrOpd0Qz6FWXFvP3gaVaPTz7I1EgQclznFnMxJ3AcXUO3RGGm61qv6DaO8utor8wxVw X-Received: by 2002:a17:906:5fc4:: with SMTP id k4mr13671403ejv.94.1592976879344; Tue, 23 Jun 2020 22:34:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592976879; cv=none; d=google.com; s=arc-20160816; b=bMe+QY/VeJ5zmYUc2/eaae3DBhJ+5trfa1I3A5S7PE6Y17hbN2UkyJ+kz1LjQFrRoG VjXFGPwfGmtb0xRYS1V/a6zg4XypwffPbU8tkxCkE8KXP/5EU3er1w7DtE2EWz39YQ8D V2GD+a2bB7z86M+2DD3IvM93mqys93ClK41O9uiZi+Z50zO47zKIYis21hI60lFEfCJZ FdMAwUC5HecjuaLgQMi3whOfrxAVdWjZ16cWSA9gSeqPNym2MTS4ctvvljC3V0LYmlDL GbWcrFE1wPK48x5TiQpqvRtUNY+QyU8IqsU21cXDTKHjIfbqEQ/LMqprztyOnvTa/zBf L56w== 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=AblS5WrjyJMgnznkFBkF2GKSBo5MmuL1G6F8BwHXeHU=; b=uf4ARXIORjNqZ3puH1TImSh1EfzcdcZnw4tQlNi9+MrT8qtSxWw/rmM0JT8CHQa10O 2zVr3q+fLQsckj6lu47gJd8qT3Yw69fue7YRRnUY+kHw+DkGuOijSML13WRmIReQVc6y I8bdRMOzGpMmj6z5HXQTMmn/R1Fw1ya6Tu9A87TRQOu8BGYvGHll76ZS4xyvaWEkz5Am 7eJvn482MdYsD3v0wglKJ7XoAED/QmrO6A+XI13me6CAbr9W+KsN+nU5LT322p9vxWi+ QREs/QP7HrWYnLkeW8W5sp4g0LsRg5ocDduWfkRA62F+hBI1rkLseOpQGREmMn0QWq6n AVKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oqtEbpKe; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n6si5569322ejc.328.2020.06.23.22.34.16; Tue, 23 Jun 2020 22:34:39 -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=@linaro.org header.s=google header.b=oqtEbpKe; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389025AbgFXFaq (ORCPT + 99 others); Wed, 24 Jun 2020 01:30:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389021AbgFXFap (ORCPT ); Wed, 24 Jun 2020 01:30:45 -0400 Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA92AC061573 for ; Tue, 23 Jun 2020 22:30:44 -0700 (PDT) Received: by mail-pl1-x641.google.com with SMTP id k6so561227pll.9 for ; Tue, 23 Jun 2020 22:30:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=AblS5WrjyJMgnznkFBkF2GKSBo5MmuL1G6F8BwHXeHU=; b=oqtEbpKemfXPO2FVCAZvOcjGa868wColw/w7N0/yn1PF29yObXn8tzs3OSrkgXiLpi LcPeGnm4YkEzRAFbHhKXwuU3ULzEVIicC/I+gMx0QzQ6amybRVLjmTgycXMnj1rFx3o7 LQ/DPmnuFeIwg4eTFAsMbrfmc7Oj3NjYk0K5qMkebCw838Eaz8Ba5GkENK87fJTZmm8x Y456j7fT9fg1TOA8hbMMBjcxXrjWa0C+n93sWs5LI9rk7UceWECyEGWoqDoWtADzHVjV r0IpBYbuuoUKn76+TBnwvw5OxXNXelrJaddFFC8T342w/At3WuVGLzu9tOgPX+zBXbr0 2a0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=AblS5WrjyJMgnznkFBkF2GKSBo5MmuL1G6F8BwHXeHU=; b=fgdpPreZcwcXPXS+1WO55F5PGBoX3AwThkGMKYYWVNTdzK1KrwZOkoe8DwVdEE6/mr K8zqzMxMgA++KnoXN/N2C+l/ZDMMt8CChwjSceAWugJWg33spsq5fBLyx6xZy53XfXvZ I2rpJumLiKi6KoXDPCMERNrocElQIp3WI1BFufIQT6L2lzg+h8H0lcQsVTFNO6kOHTJ8 xHTOdCmj4hAY8RAq2hBMMLBzZKG8atnlt57CxG7aDJKMXRl1kYsaNwBj7cgLPD9JpRo/ E9N+sxNRY7WJM6n2xmhe99QL5jIjAPq87cRAJjXIKbD7mvPBCEN0sDAFTmjYt9CPXy1A u/pQ== X-Gm-Message-State: AOAM532DM0ChnPoEM2DHEKHvet2glqUH6qOOY3OkOnUeUwJhyRHRP7el jl3AD8jTNiTZBa9ZbQNg3zdjgg== X-Received: by 2002:a17:90b:23c8:: with SMTP id md8mr28079444pjb.72.1592976644282; Tue, 23 Jun 2020 22:30:44 -0700 (PDT) Received: from builder.lan (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id d25sm15203124pgn.2.2020.06.23.22.30.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jun 2020 22:30:43 -0700 (PDT) Date: Tue, 23 Jun 2020 22:28:01 -0700 From: Bjorn Andersson To: rishabhb@codeaurora.org Cc: Alex Elder , linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, tsoni@codeaurora.org, psodagud@codeaurora.org, sidgup@codeaurora.org, linux-remoteproc-owner@vger.kernel.org Subject: Re: [PATCH v5 1/2] remoteproc: qcom: Add per subsystem SSR notification Message-ID: <20200624052801.GB407764@builder.lan> References: <1592874271-26697-1-git-send-email-rishabhb@codeaurora.org> <1592874271-26697-2-git-send-email-rishabhb@codeaurora.org> <8ed72321-6f6a-1083-9af9-a80aa945edeb@ieee.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 23 Jun 18:41 PDT 2020, rishabhb@codeaurora.org wrote: > On 2020-06-23 14:45, Alex Elder wrote: > > On 6/22/20 8:04 PM, Rishabh Bhatnagar wrote: > > > Currently there is a single notification chain which is called > > > whenever any > > > remoteproc shuts down. This leads to all the listeners being > > > notified, and > > > is not an optimal design as kernel drivers might only be interested in > > > listening to notifications from a particular remoteproc. Create a > > > global > > > list of remoteproc notification info data structures. This will hold > > > the > > > name and notifier_list information for a particular remoteproc. The > > > API > > > to register for notifications will use name argument to retrieve the > > > notification info data structure and the notifier block will be > > > added to > > > that data structure's notification chain. Also move from blocking > > > notifier > > > to srcu notifer based implementation to support dynamic notifier head > > > creation. > > > > > > Signed-off-by: Siddharth Gupta > > > Signed-off-by: Rishabh Bhatnagar > > > > Sorry, a few more comments, but I think your next one will > > likely be fine. > > > > General: > > - SSR subsystems are added but never removed. Note that > > "qcom_common.o" can be built as a module, and if that > > module were ever removed, memory allocated for these > > subsystems would be leaked. > Hi Alex, > Thank you for reviewing this patchset quickly. This point was > brought up by Bjorn and it was decided that I will push another patch on > top in which I'll do the cleanup during module exit. > > - Will a remoteproc subdev (and in particular, an SSR subdev) > > ever be removed? What happens to entities that have > > registered for SSR notifications in that case? > In practice it should never be removed. If it is clients will > never get notification about subsystem shutdown/powerup. Given that clients make direct function calls into qcom_common.ko, qcom_common.ko would not be possible to rmmod until all clients has been rmmod'ed. As such there shouldn't be any remaining listeners, or subdevices, when this happens. Regards, Bjorn