lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 24 Sep 2014 12:14:19 -0400 From: Ashwin Chaugule <ashwin.chaugule@...aro.org> To: Sudeep Holla <sudeep.holla@....com> Cc: Jassi Brar <jaswinder.singh@...aro.org>, Devicetree List <devicetree@...r.kernel.org>, lkml <linux-kernel@...r.kernel.org>, "ks.giri@...sung.com" <ks.giri@...sung.com>, Arnd Bergmann <arnd@...db.de>, "ijc+devicetree@...lion.org.uk" <ijc+devicetree@...lion.org.uk>, Mark Rutland <Mark.Rutland@....com>, Rob Herring <robh+dt@...nel.org>, Pawel Moll <Pawel.Moll@....com>, Courtney Cavin <courtney.cavin@...ymobile.com>, Matt Porter <mporter@...aro.org>, Craig McGeachie <slapdau@...oo.com.au>, LeyFoon Tan <lftan.linux@...il.com>, Loic Pallardy <loic.pallardy@...com>, "Anna, Suman" <s-anna@...com>, Bjorn Andersson <bjorn@...o.se>, Patch Tracking <patches@...aro.org>, "mollie.wu@...aro.org" <mollie.wu@...aro.org>, Tetsuya Takinishi <t.takinishi@...fujitsu.com>, "broonie@...aro.org" <broonie@...aro.org>, Kevin Hilman <khilman@...aro.org>, "lee.jones@...aro.org" <lee.jones@...aro.org>, "andy.green@...aro.org" <andy.green@...aro.org> Subject: Re: [PATCHv10 2/4] mailbox: Introduce framework for mailbox On 22 September 2014 14:33, Sudeep Holla <sudeep.holla@....com> wrote: > On 22/09/14 19:15, Sudeep Holla wrote: >> On 22/09/14 19:01, Ashwin Chaugule wrote: >>> >>> Hi Jassi, >>> >>> On 1 August 2014 08:31, Jassi Brar <jaswinder.singh@...aro.org> wrote: >>>> >>>> Introduce common framework for client/protocol drivers and >>>> controller drivers of Inter-Processor-Communication (IPC). >>>> >>>> Client driver developers should have a look at >>>> include/linux/mailbox_client.h to understand the part of >>>> the API exposed to client drivers. >>>> Similarly controller driver developers should have a look >>>> at include/linux/mailbox_controller.h >>>> >>>> Signed-off-by: Jassi Brar <jaswinder.singh@...aro.org> >>>> --- >>>> MAINTAINERS | 8 + >>>> drivers/mailbox/Makefile | 4 + >>>> drivers/mailbox/mailbox.c | 466 >>>> +++++++++++++++++++++++++++++++++++++ >>>> include/linux/mailbox_client.h | 46 ++++ >>>> include/linux/mailbox_controller.h | 135 +++++++++++ >>>> 5 files changed, 659 insertions(+) >>>> create mode 100644 drivers/mailbox/mailbox.c >>>> create mode 100644 include/linux/mailbox_client.h >>>> create mode 100644 include/linux/mailbox_controller.h >>>> >>> >>> [..] >>> >>>> + >>>> +static void poll_txdone(unsigned long data) >>>> +{ >>>> + struct mbox_controller *mbox = (struct mbox_controller *)data; >>>> + bool txdone, resched = false; >>>> + int i; >>>> + >>>> + for (i = 0; i < mbox->num_chans; i++) { >>>> + struct mbox_chan *chan = &mbox->chans[i]; >>>> + >>>> + if (chan->active_req && chan->cl) { >>>> + resched = true; >>>> + txdone = chan->mbox->ops->last_tx_done(chan); >>>> + if (txdone) >>>> + tx_tick(chan, 0); >>>> + } >>>> + } >>>> + >>>> + if (resched) >>>> + mod_timer(&mbox->poll, jiffies + >>>> + msecs_to_jiffies(mbox->period)); >>> >>> >>> While preparing a different patch which uses the Mbox framework, I >>> noticed that mbox->period might not be initialized anywhere. Also, how >>> is mbox->txpoll_period to be used? It appears from the description of >>> txpoll_period in mbox_controller.h that you'd want to use that value >>> in the mod_timer above, or equate the two somewhere in the controller >>> registration or eliminate one of the two. FWIW I also looked at your >>> code in [1]. >>> >> >> IIUC the controller needs to set the txpoll_period if it sets >> txdone_poll, may be a sanity check for !0 would be good. >> > > Ah, sorry I confused mbox->period to txpoll_period. > You are right mbox->period is not set, the header claims it to be > private, and hence I assume it needs to be handled only in core mailbox > library. Not sure if we need both mbox->period and txpoll_period though. Right. I dont see the need for having both either. Unless the Mailbox maintainer wants to fix this in some other way, I can send a patch for replacing mbox->period with mbox->txpoll_period along with my PCC work. Thanks, Ashwin -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists