From mboxrd@z Thu Jan 1 00:00:00 1970 From: s-anna@ti.com (Suman Anna) Date: Fri, 10 May 2013 11:41:42 -0500 Subject: [RFC 2/3] mailbox: Introduce a new common API In-Reply-To: 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> Message-ID: <518D2346.10805@ti.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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