From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [PATCH v5 2/7] mailbox: arm_mhu: add driver for ARM MHU controller Date: Wed, 04 Feb 2015 15:48:37 +0100 Message-ID: <3593142.nVgVfPmW1o@wuerfel> References: <1422955310-6542-1-git-send-email-Vincent.Yang@tw.fujitsu.com> <4418090.U8XOXMKsEU@wuerfel> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Return-path: In-Reply-To: Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org Cc: Jassi Brar , Mark Rutland , Devicetree List , Andy Green , Russell King - ARM Linux , =?utf-8?B?UGF3ZcWC?= Moll , "ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org" , Vincent Yang , Sudeep Holla , Vincent Yang , Rob Herring , arm-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, Patch Tracking , Kumar Gala , Olof Johansson , Tetsuya Nuriya List-Id: devicetree@vger.kernel.org On Wednesday 04 February 2015 20:04:21 Jassi Brar wrote: > > > Using the bits of the pointer as the message instead of pointing > > to the message feels like an abuse of the API. > > > I can see your POV. > Now consider a client, like mine, that sends a u32 value as the data. > But unlike me, the client uses the mailbox api in 'async' mode i.e, > register a callback function, submit a 32bit message and move on. It > is perfectly doable, but doesn't kalloc'ing a u32 for each submission, > seem overkill? That could easily be done by dereferencing the message data in the function that queues the asynchronous message: instead of queuing the pointer, you queue the data in the driver. Arnd -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html