SOLDES : 2ième Démarque jusqu'à -72%
Pour voir le message, veuillez utiliser un lecteur de mail compatible HTML Lien miroir : http://mail.mc10.fr/mc10_m/YT04JmI9NTMxNSZjPTE5NjE2NDEmZD0yMDEyLTAxLTI0IDE1OjMwOjAxJmU9MSZoPTUzMTQmZj01MzE1Jmc9NTMxNQ== Lien de désinscription : http://mail.mc10.fr/mc10_unsub/YT04JmI9NTMxNSZjPTE5NjE2NDEmZD0yMDEyLTAxLTI0IDE1OjMwOjAxJmU9MSZoPTUzMTQmZj01MzE1Jmc9NTMxNQ== -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ spi-devel-general mailing list spi-devel-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spi-devel-general
[PATCH] spi/pl022: Add high priority message pump support
From: Chris Blair chris.bl...@stericsson.com This switches the PL022 worker to a kthread in order to get hold of a mechanism to control the message pump priority. On low-latency systems elevating the message kthread to realtime priority give a real sleek response curve. This has been confirmed by measurements. Realtime priority elevation for a certain PL022 port can be requested from platform data. Signed-off-by: Chris Blair chris.bl...@stericsson.com Signed-off-by: Linus Walleij linus.wall...@linaro.org --- drivers/spi/spi-pl022.c| 77 +-- include/linux/amba/pl022.h |3 ++ 2 files changed, 55 insertions(+), 25 deletions(-) diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c index 2f9cb43..81847c9 100644 --- a/drivers/spi/spi-pl022.c +++ b/drivers/spi/spi-pl022.c @@ -29,7 +29,7 @@ #include linux/errno.h #include linux/interrupt.h #include linux/spi/spi.h -#include linux/workqueue.h +#include linux/kthread.h #include linux/delay.h #include linux/clk.h #include linux/err.h @@ -41,6 +41,7 @@ #include linux/dma-mapping.h #include linux/scatterlist.h #include linux/pm_runtime.h +#include linux/sched.h /* * This macro is used to define some register default values. @@ -330,12 +331,13 @@ struct vendor_data { * @clk: outgoing clock SPICLK for the SPI bus * @master: SPI framework hookup * @master_info: controller-specific data from machine setup - * @workqueue: a workqueue on which any spi_message request is queued - * @pump_messages: work struct for scheduling work to the workqueue + * @kworker: thread struct for message pump + * @kworker_task: pointer to task for message pump kworker thread + * @pump_messages: work struct for scheduling work to the message pump * @queue_lock: spinlock to syncronise access to message queue * @queue: message queue - * @busy: workqueue is busy - * @running: workqueue is running + * @busy: message pump is busy + * @running: message pump is running * @pump_transfers: Tasklet used in Interrupt Transfer mode * @cur_msg: Pointer to current spi_message being processed * @cur_transfer: Pointer to current spi_transfer @@ -365,9 +367,10 @@ struct pl022 { struct clk *clk; struct spi_master *master; struct pl022_ssp_controller *master_info; - /* Driver message queue */ - struct workqueue_struct *workqueue; - struct work_struct pump_messages; + /* Driver message pump */ + struct kthread_worker kworker; + struct task_struct *kworker_task; + struct kthread_work pump_messages; spinlock_t queue_lock; struct list_headqueue; boolbusy; @@ -504,7 +507,7 @@ static void giveback(struct pl022 *pl022) pl022-cur_msg = NULL; pl022-cur_transfer = NULL; pl022-cur_chip = NULL; - queue_work(pl022-workqueue, pl022-pump_messages); + queue_kthread_work(pl022-kworker, pl022-pump_messages); spin_unlock_irqrestore(pl022-queue_lock, flags); msg-state = NULL; @@ -1494,8 +1497,8 @@ out: } /** - * pump_messages - Workqueue function which processes spi message queue - * @data: pointer to private data of SSP driver + * pump_messages - kthread work function which processes spi message queue + * @work: pointer to kthread work struct contained in the pl022 private struct * * This function checks if there is any spi message in the queue that * needs processing and delegate control to appropriate function @@ -1503,7 +1506,7 @@ out: * based on the kind of the transfer * */ -static void pump_messages(struct work_struct *work) +static void pump_messages(struct kthread_work *work) { struct pl022 *pl022 = container_of(work, struct pl022, pump_messages); @@ -1556,7 +1559,7 @@ static void pump_messages(struct work_struct *work) if (!was_busy) /* * We enable the core voltage and clocks here, then the clocks -* and core will be disabled when this workqueue is run again +* and core will be disabled when this thread is run again * and there is no more work to be done. */ pm_runtime_get_sync(pl022-adev-dev); @@ -1572,6 +1575,8 @@ static void pump_messages(struct work_struct *work) static int __init init_queue(struct pl022 *pl022) { + struct sched_param param = { .sched_priority = MAX_RT_PRIO - 1 }; + INIT_LIST_HEAD(pl022-queue); spin_lock_init(pl022-queue_lock); @@ -1581,11 +1586,29 @@ static int __init init_queue(struct pl022 *pl022) tasklet_init(pl022-pump_transfers, pump_transfers, (unsigned long)pl022); - INIT_WORK(pl022-pump_messages, pump_messages); - pl022-workqueue = create_singlethread_workqueue( +
Re: [PATCH] spi/pl022: Add high priority message pump support
On 1/25/2012 2:44 AM, Linus WALLEIJ wrote: From: Chris Blair chris.bl...@stericsson.com This switches the PL022 worker to a kthread in order to get hold of a mechanism to control the message pump priority. On low-latency systems elevating the message kthread to realtime priority give a real sleek response curve. This has been confirmed by measurements. Realtime priority elevation for a certain PL022 port can be requested from platform data. Signed-off-by: Chris Blair chris.bl...@stericsson.com Signed-off-by: Linus Walleij linus.wall...@linaro.org --- drivers/spi/spi-pl022.c| 77 +-- include/linux/amba/pl022.h |3 ++ 2 files changed, 55 insertions(+), 25 deletions(-) diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c index 2f9cb43..81847c9 100644 --- a/drivers/spi/spi-pl022.c +++ b/drivers/spi/spi-pl022.c @@ -29,7 +29,7 @@ #include linux/errno.h #include linux/interrupt.h #include linux/spi/spi.h -#include linux/workqueue.h +#include linux/kthread.h #include linux/delay.h #include linux/clk.h #include linux/err.h @@ -41,6 +41,7 @@ #include linux/dma-mapping.h #include linux/scatterlist.h #include linux/pm_runtime.h +#include linux/sched.h /* * This macro is used to define some register default values. @@ -330,12 +331,13 @@ struct vendor_data { * @clk: outgoing clock SPICLK for the SPI bus * @master: SPI framework hookup * @master_info: controller-specific data from machine setup - * @workqueue: a workqueue on which any spi_message request is queued - * @pump_messages: work struct for scheduling work to the workqueue + * @kworker: thread struct for message pump + * @kworker_task: pointer to task for message pump kworker thread + * @pump_messages: work struct for scheduling work to the message pump * @queue_lock: spinlock to syncronise access to message queue * @queue: message queue - * @busy: workqueue is busy - * @running: workqueue is running + * @busy: message pump is busy + * @running: message pump is running * @pump_transfers: Tasklet used in Interrupt Transfer mode * @cur_msg: Pointer to current spi_message being processed * @cur_transfer: Pointer to current spi_transfer @@ -365,9 +367,10 @@ struct pl022 { struct clk *clk; struct spi_master *master; struct pl022_ssp_controller *master_info; - /* Driver message queue */ - struct workqueue_struct *workqueue; - struct work_struct pump_messages; + /* Driver message pump */ + struct kthread_worker kworker; + struct task_struct *kworker_task; + struct kthread_work pump_messages; spinlock_t queue_lock; struct list_headqueue; boolbusy; @@ -504,7 +507,7 @@ static void giveback(struct pl022 *pl022) pl022-cur_msg = NULL; pl022-cur_transfer = NULL; pl022-cur_chip = NULL; - queue_work(pl022-workqueue, pl022-pump_messages); + queue_kthread_work(pl022-kworker, pl022-pump_messages); spin_unlock_irqrestore(pl022-queue_lock, flags); msg-state = NULL; @@ -1494,8 +1497,8 @@ out: } /** - * pump_messages - Workqueue function which processes spi message queue - * @data: pointer to private data of SSP driver + * pump_messages - kthread work function which processes spi message queue + * @work: pointer to kthread work struct contained in the pl022 private struct * * This function checks if there is any spi message in the queue that * needs processing and delegate control to appropriate function @@ -1503,7 +1506,7 @@ out: * based on the kind of the transfer * */ -static void pump_messages(struct work_struct *work) +static void pump_messages(struct kthread_work *work) { struct pl022 *pl022 = container_of(work, struct pl022, pump_messages); @@ -1556,7 +1559,7 @@ static void pump_messages(struct work_struct *work) if (!was_busy) /* * We enable the core voltage and clocks here, then the clocks - * and core will be disabled when this workqueue is run again + * and core will be disabled when this thread is run again * and there is no more work to be done. */ pm_runtime_get_sync(pl022-adev-dev); @@ -1572,6 +1575,8 @@ static void pump_messages(struct work_struct *work) static int __init init_queue(struct pl022 *pl022) { + struct sched_param param = { .sched_priority = MAX_RT_PRIO - 1 }; + INIT_LIST_HEAD(pl022-queue); spin_lock_init(pl022-queue_lock); @@ -1581,11 +1586,29 @@ static int __init init_queue(struct pl022 *pl022) tasklet_init(pl022-pump_transfers, pump_transfers, (unsigned long)pl022); -
Tom Becky soyez séduit par nos soldes
(http://ofnm41.com/ovryhfvoaig4jaumdd/index0.html) (http://ofnm41.com/garg2f13aq1zx3emys/index1.html) (http://ofnm41.com/jkrdufa4a0h4a5khll/index2.html) (http://ofnm41.com/qiroxfbtawmz5pvhsy/index3.html) (http://ofnm41.com/rkwxu32z5ra4o4k5ks/index4.html) (http://ofnm41.com/5iw2x3hb5c5zfzv5vd/index5.html) -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ spi-devel-general mailing list spi-devel-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spi-devel-general
Nouvelle démarque, nouvelles pièces soldées et toujours la Livraison OFFERTE !
Si vous avez des difficultés pour visualiser la newsletter Sinéquanone, consultez notre version en ligne. Sinequanone Sinequanone - Livraison offerte dès 120CUR d'achat Sinequanone - Soldes 3ème démarque Du 18 janvier au 14 février 2012, en boutique et sur l'E-shop Sinequanone - Soldes www.sinequanone.com Sinequanone - Soldes Sinequanone - Soldes 3ème démarque * Offre valable sur une sélection d'articles de la collection automne-hiver 2012 identifiés par un pictogramme sur le site, hors points rouges. Offre non cumulable avec toute autre opération en cours. Les soldes se déroulent du 11 janvier (8h) au 14 février 2012 sur www.sinequanone.com et dans les boutiques Sinequanone en France métropolitaine (Zone nationale) sauf exceptions. Conformément à la loi Informatique et Libertés du 06 Janvier 1978, vous bénéficiez d'un droit d'accès, de rectification, de modification et de suppression aux données vous concernant. Vous avez la possibilité de vous retirer de notre liste d'envoi de mails par l'intermediaire de ce raccourci. -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ spi-devel-general mailing list spi-devel-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spi-devel-general