01 Nov, 2011
1 commit
-
These files will fail to compile if we dont clean them up in advance
and have them include the appropriate headers they need.Signed-off-by: Paul Gortmaker
16 Mar, 2011
1 commit
-
* 'for-2.6.39' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
workqueue: fix build failure introduced by s/freezeable/freezable/
workqueue: add system_freezeable_wq
rds/ib: use system_wq instead of rds_ib_fmr_wq
net/9p: replace p9_poll_task with a work
net/9p: use system_wq instead of p9_mux_wq
xfs: convert to alloc_workqueue()
reiserfs: make commit_wq use the default concurrency level
ocfs2: use system_wq instead of ocfs2_quota_wq
ext4: convert to alloc_workqueue()
scsi/scsi_tgt_lib: scsi_tgtd isn't used in memory reclaim path
scsi/be2iscsi,qla2xxx: convert to alloc_workqueue()
misc/iwmc3200top: use system_wq instead of dedicated workqueues
i2o: use alloc_workqueue() instead of create_workqueue()
acpi: kacpi*_wq don't need WQ_MEM_RECLAIM
fs/aio: aio_wq isn't used in memory reclaim path
input/tps6507x-ts: use system_wq instead of dedicated workqueue
cpufreq: use system_wq instead of dedicated workqueues
wireless/ipw2x00: use system_wq instead of dedicated workqueues
arm/omap: use system_wq in mailbox
workqueue: use WQ_MEM_RECLAIM instead of WQ_RESCUER
15 Feb, 2011
1 commit
-
The pointer math in omap_mbox_get() is not quite right, and leads to
passing NULL to strcmp() when searching for an mbox that is not first
in the list.Convert to using array indexing as is done in all the other functions
which walk the mbox list.Tested on OMAP2420/n810, OMAP3630/zoom3, OMAP4430/Blaze
Signed-off-by: Kevin Hilman
Signed-off-by: Tony Lindgren
26 Jan, 2011
1 commit
-
With cmwq, there's no reason to use a separate workqueue for mailbox.
Use the system_wq instead. mbox->rxq->work is sync flushed in
omap_mbox_fini() to make sure it's not running on any cpu, which makes
sure that no mbox work is running when omap_mbox_exit() is entered.Signed-off-by: Tejun Heo
Acked-by: Hari Kanigeri
Cc: Tony Lindgren
Cc: linux-omap@vger.kernel.org
02 Dec, 2010
4 commits
-
In the current mailbox driver, the mailbox internal pointer for
callback can be directly manipulated by the Users, so a second
User can easily corrupt the first user's callback pointer.
The initial effort to correct this issue can be referred here:
https://patchwork.kernel.org/patch/107520/Along with fixing the above stated issue, this patch adds the
flexibility option to register notifications from
multiple readers to the events received on a mailbox instance.
The discussion regarding this can be referred here.
http://www.mail-archive.com/linux-omap@vger.kernel.org/msg30671.htmlSigned-off-by: Hari Kanigeri
Signed-off-by: Fernando Guzman Lugo
Acked-by: Hiroshi Doyu -
Schedule the Tasklet to send only when mailbox fifo is full and there are
pending messages in kfifo, else send the message directly in the Process
context. This would avoid needless scheduling of Tasklet for every message
transferSigned-off-by: Hari Kanigeri
Acked-by: Hiroshi Doyu -
Fix the following checkpatch warnings observed in mailbox module.
WARNING: please, no space for starting a line,
excluding comments
+ fail_alloc_rxq:$WARNING: please, no space for starting a line,
excluding comments
+ fail_alloc_txq:$WARNING: please, no space for starting a line,
excluding comments
+ fail_request_irq:$WARNING: line over 80 characters
+ mbox_kfifo_size = max_t(unsigned int, mbox_kfifo_size, sizeof(mbox_msg_t));Signed-off-by: Hari Kanigeri
Acked-by: Hiroshi Doyu -
The variable rq_full flag is a global variable, so if there are multiple
mailbox users there will be conflicts. Now there is a full flag per
mailbox queue.Reported-by: Ohad Ben-Cohen
Signed-off-by: Fernando Guzman Lugo
Signed-off-by: Hari Kanigeri
Acked-by: Hiroshi Doyu
04 Aug, 2010
12 commits
-
Remove kernel.h and module.h since they are not used correctly anyway.
Also, remove device.h since it comes along with platform_device.h
(always will I guess).Signed-off-by: Felipe Contreras
Signed-off-by: Hiroshi DOYU -
No need to dynamically register mailboxes one by one.
Signed-off-by: Felipe Contreras
Signed-off-by: Hiroshi DOYU -
With this patch, you'll get the following sysfs directories. This
structure implies that a single platform device, "omap2-mailbox" holds
multiple logical mbox instances. This could be the base to add sysfs
files for each logical mboxes. Then userland application can access a
mbox through sysfs entries if necessary(ex: setting kfifo size
dynamically)~# tree -d -L 2 /sys/devices/platform/omap2-mailbox/
/sys/devices/platform/omap2-mailbox/
|-- driver -> ../../../bus/platform/drivers/omap2-mailbox
|-- mbox
| |-- dsp ../../../bus/platformThis was wrongly dropped by:
commit c7c158e57bce6220644f2bcd65d82e1468aa40ecSigned-off-by: Hiroshi DOYU
-
The underlying buffering implementation of mailbox
is converted from block API to kfifo due to the simplicity
and speed of kfifo.The default size of the kfifo buffer is set to 256 bytes.
This value is configurable at compile time (via
CONFIG_OMAP_MBOX_KFIFO_SIZE), and can be changed at
runtime (via the mbox_kfifo_size module parameter).Signed-off-by: Ohad Ben-Cohen
Signed-off-by: Hari Kanigeri
Signed-off-by: Hiroshi DOYU -
Signed-off-by: Ohad Ben-Cohen
Signed-off-by: Hiroshi DOYU -
use multiple MODULE_AUTHOR lines for multiple authors
Signed-off-by: Ohad Ben-Cohen
Signed-off-by: Hiroshi DOYU -
rwlocks are slower and have potential starvation issues
therefore spinlocks are generally preferred.see also: http://lwn.net/Articles/364583/
Signed-off-by: Ohad Ben-Cohen
Signed-off-by: Kanigeri Hari
Signed-off-by: Hiroshi DOYU -
when blk_get_request fails to get the request it is returning
without read the message from the mailbox fifo, then when it
leaves the isr and interruption is trigger again and again and
the workqueue which get elements from the request queue is never
executed and the kernel is stuck and shows a softlockup message.
Now the mailbox interrupt is disabled when request queue is full
and enabled when it pop a elememt form the request queue.Signed-off-by: Fernando Guzman Lugo
Signed-off-by: Hiroshi DOYU -
mailbox startup and shutdown are being executed against
a single H/W module, and a mailbox H/W module is totally
__independent__ of the registration of logical mailboxes.
So, an independent mutext should be used for startup and
shutdown.Signed-off-by: Fernando Guzman Lugo
Signed-off-by: Hiroshi DOYU -
This patch checks if the mailbox user has assinged a valid
callback fuction before calling it.Signed-off-by: Fernando Guzman Lugo
Signed-off-by: Hiroshi DOYU -
flush pending deferred works before freeing blk_queue to prevent
any attempt of access to blk_queue after it was freedSigned-off-by: Fernando Guzman Lugo
Signed-off-by: Hiroshi DOYU -
Free interrupt before freeing blk_queue to avoid
any attempt of access to blk_queue after it was freed.Signed-off-by: Fernando Guzman Lugo
Signed-off-by: Hiroshi DOYU
30 Mar, 2010
1 commit
-
…it slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.http://userweb.kernel.org/~tj/misc/slabh-sweep.py
The script does the followings.
* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.The conversion was done in the following steps.
1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.6. percpu.h was updated not to include slab.h.
7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
24 Feb, 2010
1 commit
-
keventd_wq is a shared work-queue, and should not be used when we
need fast deterministic response. Instead mailbox driver should
use it's own private work-queue, with it's own thread, to ensure
that handling of RX interrupts are not delayed by other drivers.The tasklet is still used for transmission of mbox messages.
Signed-off-by: Rob Clark
Signed-off-by: C A Subramaniam
Signed-off-by: Suman Anna
Acked-by: Hiroshi DOYU
Signed-off-by: Tony Lindgren
23 Nov, 2009
8 commits
-
This patch uses a tasklet implementation for
sending mailbox messages.Signed-off-by: C A Subramaniam
Signed-off-by: Ramesh Gupta G
Signed-off-by: Hiroshi DOYU
Signed-off-by: Tony Lindgren -
Currently, this facilitates both the tesla and ducati
sides to request for the same irq through an
omap_mbox_get() call.Signed-off-by: C A Subramaniam
Signed-off-by: Ramesh Gupta G
Acked-by: Hiroshi DOYU
Signed-off-by: Tony Lindgren -
This patch adds code changes in the mailbox driver module to
add support for OMAP4 mailbox.Signed-off-by: Hari Kanigeri
Signed-off-by: C A Subramaniam
Signed-off-by: Ramesh Gupta G
Signed-off-by: Hiroshi DOYU
Signed-off-by: Tony Lindgren -
Expose omap_mbox_enable()/disable_irq()
Signed-off-by: Hiroshi DOYU
-
Also removed from tx_data
Signed-off-by: C A Subramaniam
Acked-by: Hiroshi DOYU
Signed-off-by: Tony Lindgren -
No need to handle it in isr, since irq won't happen during isr.
Signed-off-by: Hiroshi DOYU
Signed-off-by: Tony Lindgren -
It's not used at present.
Signed-off-by: Hiroshi DOYU
Signed-off-by: Tony Lindgren -
Any protocol should be handled in the upper layer and mailbox driver
shouldn't care about the contents of messages.Signed-off-by: Hiroshi DOYU
Signed-off-by: Tony Lindgren
21 Oct, 2009
1 commit
-
Move the remaining headers under plat-omap/include/mach
to plat-omap/include/plat. Also search and replace the
files using these headers to include using the right path.This was done with:
#!/bin/bash
mach_dir_old="arch/arm/plat-omap/include/mach"
plat_dir_new="arch/arm/plat-omap/include/plat"
headers=$(cd $mach_dir_old && ls *.h)
omap_dirs="arch/arm/*omap*/ \
drivers/video/omap \
sound/soc/omap"
other_files="drivers/leds/leds-ams-delta.c \
drivers/mfd/menelaus.c \
drivers/mfd/twl4030-core.c \
drivers/mtd/nand/ams-delta.c"for header in $headers; do
old="#include
11 May, 2009
2 commits
-
Till now block layer allowed two separate modes of request execution.
A request is always acquired from the request queue via
elv_next_request(). After that, drivers are free to either dequeue it
or process it without dequeueing. Dequeue allows elv_next_request()
to return the next request so that multiple requests can be in flight.Executing requests without dequeueing has its merits mostly in
allowing drivers for simpler devices which can't do sg to deal with
segments only without considering request boundary. However, the
benefit this brings is dubious and declining while the cost of the API
ambiguity is increasing. Segment based drivers are usually for very
old or limited devices and as converting to dequeueing model isn't
difficult, it doesn't justify the API overhead it puts on block layer
and its more modern users.Previous patches converted all block low level drivers to dequeueing
model. This patch completes the API transition by...* renaming elv_next_request() to blk_peek_request()
* renaming blkdev_dequeue_request() to blk_start_request()
* adding blk_fetch_request() which is combination of peek and start
* disallowing completion of queued (not started) requests
* applying new API to all LLDs
Renamings are for consistency and to break out of tree code so that
it's apparent that out of tree drivers need updating.[ Impact: block request issue API cleanup, no functional change ]
Signed-off-by: Tejun Heo
Cc: Rusty Russell
Cc: James Bottomley
Cc: Mike Miller
Cc: unsik Kim
Cc: Paul Clements
Cc: Tim Waugh
Cc: Geert Uytterhoeven
Cc: David S. Miller
Cc: Laurent Vivier
Cc: Jeff Garzik
Cc: Jeremy Fitzhardinge
Cc: Grant Likely
Cc: Adrian McMenamin
Cc: Stephen Rothwell
Cc: Bartlomiej Zolnierkiewicz
Cc: Borislav Petkov
Cc: Sergei Shtylyov
Cc: Alex Dubov
Cc: Pierre Ossman
Cc: David Woodhouse
Cc: Markus Lidel
Cc: Stefan Weinhuber
Cc: Martin Schwidefsky
Cc: Pete Zaitcev
Cc: FUJITA Tomonori
Signed-off-by: Jens Axboe -
plat-omap/mailbox, floppy, viocd, mspro_block, i2o_block and
mmc/card/queue are already pretty close to dequeueing model and can be
converted with simple changes. Convert them.While at it,
* xen-blkfront: !fs check moved downwards to share dequeue call with
normal path.* mspro_block: __blk_end_request(..., blk_rq_cur_byte()) converted to
__blk_end_request_cur()* mmc/card/queue: loop of __blk_end_request() converted to
__blk_end_request_all()[ Impact: dequeue in-flight request ]
Signed-off-by: Tejun Heo
Cc: Rusty Russell
Cc: Jeremy Fitzhardinge
Cc: Stephen Rothwell
Cc: Alex Dubov
Cc: Markus Lidel
Cc: Pierre Ossman
Signed-off-by: Jens Axboe
28 Apr, 2009
2 commits
-
omap mailbox uses rq->data as the second opaque pointer to carry
mbox_msg_t and rq->special message argument which is needed only for
tx. Add and use omap_msg_tx_data struct for tx and use rq->special
for mbox_msg_t for rx such that only rq->special is used as opaque
pointer.[ Impact: cleanup rq->data usage, extra kmalloc in msg_send ]
Signed-off-by: Tejun Heo
Cc: Russell King -
There are many [__]blk_end_request() call sites which call it with
full request length and expect full completion. Many of them ensure
that the request actually completes by doing BUG_ON() the return
value, which is awkward and error-prone.This patch adds [__]blk_end_request_all() which takes @rq and @error
and fully completes the request. BUG_ON() is added to to ensure that
this actually happens.Most conversions are simple but there are a few noteworthy ones.
* cdrom/viocd: viocd_end_request() replaced with direct calls to
__blk_end_request_all().* s390/block/dasd: dasd_end_request() replaced with direct calls to
__blk_end_request_all().* s390/char/tape_block: tapeblock_end_request() replaced with direct
calls to blk_end_request_all().[ Impact: cleanup ]
Signed-off-by: Tejun Heo
Cc: Russell King
Cc: Stephen Rothwell
Cc: Mike Miller
Cc: Martin Schwidefsky
Cc: Jeff Garzik
Cc: Rusty Russell
Cc: Jeremy Fitzhardinge
Cc: Alex Dubov
Cc: James Bottomley
24 Mar, 2009
4 commits
-
Signed-off-by: Hiroshi DOYU
-
Signed-off-by: Hiroshi DOYU
-
no need to keep mailbox.h separately.
Signed-off-by: Hiroshi DOYU
-
Since "mbox->dev" doesn't exist and isn't created either at
registration, this patch will create "struct device", which belongs to
"omap-mailbox" class and set this pointer for the member of
"struct omap_mbox".Signed-off-by: Hiroshi DOYU
06 Sep, 2008
1 commit
-
Signed-off-by: Russell King