Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756883Ab3EJQrX (ORCPT ); Fri, 10 May 2013 12:47:23 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:54728 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754640Ab3EJQrW (ORCPT ); Fri, 10 May 2013 12:47:22 -0400 Message-ID: <518D2346.10805@ti.com> Date: Fri, 10 May 2013 11:41:42 -0500 From: Suman Anna User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: Jassi Brar CC: Jassi Brar , "Loic PALLARDY (loic.pallardy@st.com)" , Arnd Bergmann , lkml , "linux-arm-kernel@lists.infradead.org" , Andy Green Subject: Re: [RFC 2/3] mailbox: Introduce a new common API References: <1367086474-28614-1-git-send-email-jaswinder.singh@linaro.org> <51847070.8040400@ti.com> <518840A2.5000205@ti.com> <518976B9.2030605@ti.com> <518AFB1F.7010409@ti.com> <518C3CE9.1010603@ti.com> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1261 Lines: 35 Jassi, >>> See how mailbox_startup() tries to balance mbox->ops->startup() and >>> mailbox_fini() the mbox->ops->shutdown() That's very fragile and the >>> cause of imbalance between rpm enable/disable, unless your clients are >>> buggy. >> >> Yeah, it is kinda messed up in the existing code, the startup defined >> there is really for the controller and not the link, and that's why you >> see all the ref-counting balancing logic. The rpm enable/disable being >> called is on the controller's dev, not the link's dev - maybe that's >> what confused you. >> > I wrote the driver for this api, so I do realize the rpm is on > controller. Links are not devices anyways. > You might be missing the minor detail. The pm_runtime_enable is in startup, which is called for every link. So, I get an unbalanced warning, when I have ipc_request_channel(client1); -> link1.startup ipc_request_channel(clinet2); -> link2.startup Anyway, it is a non-issue since I understand the context and the fix. regards Suman -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/