25 Dec, 2016
1 commit
-
This was entirely automated, using the script by Al:
PATT='^[[:blank:]]*#[[:blank:]]*include[[:blank:]]*'
sed -i -e "s!$PATT!#include !" \
$(git grep -l "$PATT"|grep -v ^include/linux/uaccess.h)to do the replacement at the end of the merge window.
Requested-by: Al Viro
Signed-off-by: Linus Torvalds
01 Nov, 2016
1 commit
-
Signed-off-by: Christoph Hellwig
Signed-off-by: Jens Axboe
08 Aug, 2016
1 commit
-
Since commit 63a4cc24867d, bio->bi_rw contains flags in the lower
portion and the op code in the higher portions. This means that
old code that relies on manually setting bi_rw is most likely
going to be broken. Instead of letting that brokeness linger,
rename the member, to force old and out-of-tree code to break
at compile time instead of at runtime.No intended functional changes in this commit.
Signed-off-by: Jens Axboe
21 Jul, 2016
1 commit
-
These two are confusing leftover of the old world order, combining
values of the REQ_OP_ and REQ_ namespaces. For callers that don't
special case we mostly just replace bi_rw with bio_data_dir or
op_is_write, except for the few cases where a switch over the REQ_OP_
values makes more sense. Any check for READA is replaced with an
explicit check for REQ_RAHEAD. Also remove the READA alias for
REQ_RAHEAD.Signed-off-by: Christoph Hellwig
Reviewed-by: Johannes Thumshirn
Reviewed-by: Mike Christie
Signed-off-by: Jens Axboe
08 Jun, 2016
1 commit
-
We currently set REQ_WRITE/WRITE for all non READ IOs
like discard, flush, writesame, etc. In the next patches where we
no longer set up the op as a bitmap, we will not be able to
detect a operation direction like writesame by testing if REQ_WRITE is
set.This patch converts the drivers and cgroup to use the
op_is_write helper. This should just cover the simple
cases. I did dm, md and bcache in their own patches
because they were more involved.Signed-off-by: Mike Christie
Reviewed-by: Hannes Reinecke
Signed-off-by: Jens Axboe
08 Nov, 2015
1 commit
-
No functional changes in this patch, but it prepares us for returning
a more useful cookie related to the IO that was queued up.Signed-off-by: Jens Axboe
Acked-by: Christoph Hellwig
Acked-by: Keith Busch
14 Aug, 2015
1 commit
-
The way the block layer is currently written, it goes to great lengths
to avoid having to split bios; upper layer code (such as bio_add_page())
checks what the underlying device can handle and tries to always create
bios that don't need to be split.But this approach becomes unwieldy and eventually breaks down with
stacked devices and devices with dynamic limits, and it adds a lot of
complexity. If the block layer could split bios as needed, we could
eliminate a lot of complexity elsewhere - particularly in stacked
drivers. Code that creates bios can then create whatever size bios are
convenient, and more importantly stacked drivers don't have to deal with
both their own bio size limitations and the limitations of the
(potentially multiple) devices underneath them. In the future this will
let us delete merge_bvec_fn and a bunch of other code.We do this by adding calls to blk_queue_split() to the various
make_request functions that need it - a few can already handle arbitrary
size bios. Note that we add the call _after_ any call to
blk_queue_bounce(); this means that blk_queue_split() and
blk_recalc_rq_segments() don't need to be concerned with bouncing
affecting segment merging.Some make_request_fn() callbacks were simple enough to audit and verify
they don't need blk_queue_split() calls. The skipped ones are:* nfhd_make_request (arch/m68k/emu/nfblock.c)
* axon_ram_make_request (arch/powerpc/sysdev/axonram.c)
* simdisk_make_request (arch/xtensa/platforms/iss/simdisk.c)
* brd_make_request (ramdisk - drivers/block/brd.c)
* mtip_submit_request (drivers/block/mtip32xx/mtip32xx.c)
* loop_make_request
* null_queue_bio
* bcache's make_request fnsSome others are almost certainly safe to remove now, but will be left
for future patches.Cc: Jens Axboe
Cc: Christoph Hellwig
Cc: Al Viro
Cc: Ming Lei
Cc: Neil Brown
Cc: Alasdair Kergon
Cc: Mike Snitzer
Cc: dm-devel@redhat.com
Cc: Lars Ellenberg
Cc: drbd-user@lists.linbit.com
Cc: Jiri Kosina
Cc: Geoff Levand
Cc: Jim Paris
Cc: Philip Kelleher
Cc: Minchan Kim
Cc: Nitin Gupta
Cc: Oleg Drokin
Cc: Andreas Dilger
Acked-by: NeilBrown (for the 'md/md.c' bits)
Acked-by: Mike Snitzer
Reviewed-by: Martin K. Petersen
Signed-off-by: Kent Overstreet
[dpark: skip more mq-based drivers, resolve merge conflicts, etc.]
Signed-off-by: Dongsu Park
Signed-off-by: Ming Lin
Signed-off-by: Jens Axboe
29 Jul, 2015
1 commit
-
Currently we have two different ways to signal an I/O error on a BIO:
(1) by clearing the BIO_UPTODATE flag
(2) by returning a Linux errno value to the bi_end_io callbackThe first one has the drawback of only communicating a single possible
error (-EIO), and the second one has the drawback of not beeing persistent
when bios are queued up, and are not passed along from child to parent
bio in the ever more popular chaining scenario. Having both mechanisms
available has the additional drawback of utterly confusing driver authors
and introducing bugs where various I/O submitters only deal with one of
them, and the others have to add boilerplate code to deal with both kinds
of error returns.So add a new bi_error field to store an errno value directly in struct
bio and remove the existing mechanisms to clean all this up.Signed-off-by: Christoph Hellwig
Reviewed-by: Hannes Reinecke
Reviewed-by: NeilBrown
Signed-off-by: Jens Axboe
24 Nov, 2013
2 commits
-
Now that we've got a mechanism for immutable biovecs -
bi_iter.bi_bvec_done - we need to convert drivers to use primitives that
respect it instead of using the bvec array directly.Signed-off-by: Kent Overstreet
Cc: Jens Axboe
Cc: NeilBrown
Cc: Alasdair Kergon
Cc: dm-devel@redhat.com -
Immutable biovecs are going to require an explicit iterator. To
implement immutable bvecs, a later patch is going to add a bi_bvec_done
member to this struct; for now, this patch effectively just renames
things.Signed-off-by: Kent Overstreet
Cc: Jens Axboe
Cc: Geert Uytterhoeven
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: "Ed L. Cashin"
Cc: Nick Piggin
Cc: Lars Ellenberg
Cc: Jiri Kosina
Cc: Matthew Wilcox
Cc: Geoff Levand
Cc: Yehuda Sadeh
Cc: Sage Weil
Cc: Alex Elder
Cc: ceph-devel@vger.kernel.org
Cc: Joshua Morris
Cc: Philip Kelleher
Cc: Rusty Russell
Cc: "Michael S. Tsirkin"
Cc: Konrad Rzeszutek Wilk
Cc: Jeremy Fitzhardinge
Cc: Neil Brown
Cc: Alasdair Kergon
Cc: Mike Snitzer
Cc: dm-devel@redhat.com
Cc: Martin Schwidefsky
Cc: Heiko Carstens
Cc: linux390@de.ibm.com
Cc: Boaz Harrosh
Cc: Benny Halevy
Cc: "James E.J. Bottomley"
Cc: Greg Kroah-Hartman
Cc: "Nicholas A. Bellinger"
Cc: Alexander Viro
Cc: Chris Mason
Cc: "Theodore Ts'o"
Cc: Andreas Dilger
Cc: Jaegeuk Kim
Cc: Steven Whitehouse
Cc: Dave Kleikamp
Cc: Joern Engel
Cc: Prasad Joshi
Cc: Trond Myklebust
Cc: KONISHI Ryusuke
Cc: Mark Fasheh
Cc: Joel Becker
Cc: Ben Myers
Cc: xfs@oss.sgi.com
Cc: Steven Rostedt
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Len Brown
Cc: Pavel Machek
Cc: "Rafael J. Wysocki"
Cc: Herton Ronaldo Krzesinski
Cc: Ben Hutchings
Cc: Andrew Morton
Cc: Guo Chao
Cc: Tejun Heo
Cc: Asai Thambi S P
Cc: Selvan Mani
Cc: Sam Bradshaw
Cc: Wei Yongjun
Cc: "Roger Pau Monné"
Cc: Jan Beulich
Cc: Stefano Stabellini
Cc: Ian Campbell
Cc: Sebastian Ott
Cc: Christian Borntraeger
Cc: Minchan Kim
Cc: Jiang Liu
Cc: Nitin Gupta
Cc: Jerome Marchand
Cc: Joe Perches
Cc: Peng Tao
Cc: Andy Adamson
Cc: fanchaoting
Cc: Jie Liu
Cc: Sunil Mushran
Cc: "Martin K. Petersen"
Cc: Namjae Jeon
Cc: Pankaj Kumar
Cc: Dan Magenheimer
Cc: Mel Gorman 6
04 Jan, 2013
1 commit
-
CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
markings need to be removed.This change removes the use of __devinit, __devexit_p, __devinitdata,
__devinitconst, and __devexit from these drivers.Based on patches originally written by Bill Pemberton, but redone by me
in order to handle some of the coding style issues better, by hand.Cc: Bill Pemberton
Cc: Mike Miller
Cc: Chirag Kantharia
Cc: Geoff Levand
Cc: Jim Paris
Cc: Rusty Russell
Cc: "Michael S. Tsirkin"
Cc: Grant Likely
Cc: Matthew Wilcox
Cc: Keith Busch
Cc: "David S. Miller"
Cc: Benjamin Herrenschmidt
Cc: NeilBrown
Cc: Jens Axboe
Cc: Tao Guo
Signed-off-by: Greg Kroah-Hartman
31 Jul, 2012
2 commits
-
This will allow md/raid to know why the unplug was called,
and will be able to act according - if !from_schedule it
is safe to perform tasks which could themselves schedule.Signed-off-by: NeilBrown
Signed-off-by: Jens Axboe -
Both md and umem has similar code for getting notified on an
blk_finish_plug event.
Centralize this code in block/ and allow each driver to
provide its distinctive difference.Signed-off-by: NeilBrown
Signed-off-by: Jens Axboe
14 Jun, 2012
1 commit
-
Fix a regression introduced by 7eaceaccab5f40 ("block: remove per-queue
plugging"). In that patch, Jens removed the whole mm_unplug_device()
function, which used to be the trigger to make umem start to work.We need to implement unplugging to make umem start to work, or I/O will
never be triggered.Signed-off-by: Tao Guo
Cc: Neil Brown
Cc: Jens Axboe
Cc: Shaohua Li
Cc:
Acked-by: NeilBrown
Signed-off-by: Jens Axboe
12 Sep, 2011
1 commit
-
There is very little benefit in allowing to let a ->make_request
instance update the bios device and sector and loop around it in
__generic_make_request when we can archive the same through calling
generic_make_request from the driver and letting the loop in
generic_make_request handle it.Note that various drivers got the return value from ->make_request and
returned non-zero values for errors.Signed-off-by: Christoph Hellwig
Acked-by: NeilBrown
Signed-off-by: Jens Axboe
10 Mar, 2011
3 commits
-
Conflicts:
block/blk-core.c
block/blk-flush.c
drivers/md/raid1.c
drivers/md/raid10.c
drivers/md/raid5.c
fs/nilfs2/btnode.c
fs/nilfs2/mdt.cSigned-off-by: Jens Axboe
-
Code has been converted over to the new explicit on-stack plugging,
and delay users have been converted to use the new API for that.
So lets kill off the old plugging along with aops->sync_page().Signed-off-by: Jens Axboe
-
umem doesn't implement media changed detection and there's no need to
implement dummy callback anymore. Remove it.Signed-off-by: Tejun Heo
Cc: Jens Axboe
Cc: Kay Sievers
08 Aug, 2010
1 commit
-
Remove the current bio flags and reuse the request flags for the bio, too.
This allows to more easily trace the type of I/O from the filesystem
down to the block driver. There were two flags in the bio that were
missing in the requests: BIO_RW_UNPLUG and BIO_RW_AHEAD. Also I've
renamed two request flags that had a superflous RW in them.Note that the flags are in bio.h despite having the REQ_ name - as
blkdev.h includes bio.h that is the only way to go for now.Signed-off-by: Christoph Hellwig
Signed-off-by: Jens Axboe
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>
22 Sep, 2009
1 commit
-
Signed-off-by: Alexey Dobriyan
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
24 Apr, 2009
1 commit
-
The umem driver issues two warnings on boot, due to blk_plug_device() and
blk_remove_plug() being called without q->queue_lock held. Starting with
e48ec690 (block: extend queue_flag bitops), the queue_flag_* functions
warn if q->queue_lock doesn't appear to be locked. In fact, q->queue_lock
is NULL (though that apparently isn't otherwise a problem as the driver is
using card->lock for everything).Although blk_init_queue() with take a request_fn_proc and spinlock_t*,
there isn't a corresponding init helper that takes a make_request_fn.
Setting queue_lock to &card->lock explicitly seems to work fine for me.
The warning goes away and the device appears to behave.[ 1.531881] v2.3 : Micro Memory(tm) PCI memory board block driver
[ 1.538136] umem 0000:02:01.0: PCI INT A -> GSI 20 (level, low) -> IRQ 20
[ 1.545018] umem 0000:02:01.0: Micro Memory(tm) controller found (PCI Mem Module (Battery Backup))
[ 1.554176] umem 0000:02:01.0: CSR 0xfc9ffc00 -> 0xffffc200013d0c00 (0x100)
[ 1.561279] umem 0000:02:01.0: Size 1048576 KB, Battery 1 Disabled (FAILURE), Battery 2 Disabled (FAILURE)
[ 1.571114] umem 0000:02:01.0: Window size 16777216 bytes, IRQ 20
[ 1.577304] umem 0000:02:01.0: memory NOT initialized. Consider over-writing whole device.
[ 1.585989] umema:------------[ cut here ]------------
[ 1.591775] WARNING: at include/linux/blkdev.h:492 blk_plug_device+0x6d/0x106()
[ 1.592025] Hardware name: H8SSL
[ 1.592025] Modules linked in:
[ 1.592025] Pid: 1, comm: swapper Not tainted 2.6.29 #8
[ 1.592025] Call Trace:
[ 1.592025] [] warn_slowpath+0xd3/0xf2
[ 1.592025] [] ? save_trace+0x3f/0x9b
[ 1.592025] [] ? add_lock_to_list+0x7a/0xba
[ 1.592025] [] ? validate_chain+0xb3b/0xce8
[ 1.592025] [] ? mm_make_request+0x27/0x59
[ 1.592025] [] ? mm_make_request+0x27/0x59
[ 1.592025] [] ? __lock_acquire+0x74e/0x7b9
[ 1.592025] [] ? get_lock_stats+0x34/0x5e
[ 1.592025] [] ? put_lock_stats+0xe/0x27
[ 1.592025] [] ? mm_make_request+0x27/0x59
[ 1.592025] [] blk_plug_device+0x6d/0x106
[ 1.592025] [] mm_make_request+0x46/0x59
[ 1.592025] [] generic_make_request+0x335/0x3cf
[ 1.592025] [] ? mempool_alloc_slab+0x11/0x13
[ 1.592025] [] ? mempool_alloc+0x45/0x101
[ 1.592025] [] ? put_lock_stats+0xe/0x27
[ 1.592025] [] submit_bio+0x10a/0x119
[ 1.592025] [] submit_bh+0xe5/0x109
[ 1.592025] [] block_read_full_page+0x2aa/0x2cb
[ 1.592025] [] ? blkdev_get_block+0x0/0x4c
[ 1.592025] [] ? _spin_unlock_irq+0x36/0x51
[ 1.592025] [] ? __lru_cache_add+0x92/0xb2
[ 1.592025] [] blkdev_readpage+0x13/0x15
[ 1.592025] [] read_cache_page_async+0x90/0x134
[ 1.592025] [] ? blkdev_readpage+0x0/0x15
[ 1.592025] [] ? adfspart_check_ICS+0x0/0x16c
[ 1.592025] [] read_cache_page+0xe/0x45
[ 1.592025] [] read_dev_sector+0x2e/0x93
[ 1.592025] [] adfspart_check_ICS+0x28/0x16c
[ 1.592025] [] ? trace_hardirqs_on+0xd/0xf
[ 1.592025] [] ? adfspart_check_ICS+0x0/0x16c
[ 1.592025] [] rescan_partitions+0x168/0x2fb
[ 1.592025] [] __blkdev_get+0x259/0x336
[ 1.592025] [] ? kobject_put+0x47/0x4b
[ 1.592025] [] blkdev_get+0xb/0xd
[ 1.592025] [] register_disk+0xc4/0x12b
[ 1.592025] [] add_disk+0xc3/0x12d
[ 1.592025] [] ? mm_init+0x0/0x1a5
[ 1.592025] [] mm_init+0x129/0x1a5
[ 1.592025] [] ? mm_init+0x0/0x1a5
[ 1.592025] [] _stext+0x56/0x130
[ 1.592025] [] ? register_irq_proc+0xae/0xca
[ 1.592025] [] ? proc_pid_lookup+0xb4/0x18b
[ 1.592025] [] kernel_init+0x132/0x18b
[ 1.592025] [] child_rip+0xa/0x20
[ 1.592025] [] ? restore_args+0x0/0x30
[ 1.592025] [] ? kernel_init+0x0/0x18b
[ 1.592025] [] ? child_rip+0x0/0x20
[ 1.592025] ---[ end trace 7150b3b86da74e1e ]---
[ 1.889858] ------------[ cut here ]------------[ve_plug+0x5f/0x91()
[ 1.893848] Hardware name: H8SSL
[ 1.893848] Modules linked in:
[ 1.893848] Pid: 1, comm: swapper Tainted: G W 2.6.29 #8
[ 1.893848] Call Trace:
[ 1.893848] [] warn_slowpath+0xd3/0xf2
[ 1.893848] [] ? trace_hardirqs_on_thunk+0x3a/0x3f
[ 1.893848] [] ? restore_args+0x0/0x30
[ 1.893848] [] ? __atomic_notifier_call_chain+0x0/0xb2
[ 1.893848] [] ? _spin_unlock_irq+0x31/0x51
[ 1.893848] [] ? _spin_unlock_irq+0x4d/0x51
[ 1.893848] [] ? mm_make_request+0x4e/0x59
[ 1.893848] [] ? get_lock_stats+0x34/0x5e
[ 1.893848] [] ? put_lock_stats+0x25/0x27
[ 1.893848] [] ? mm_unplug_device+0x25/0x50
[ 1.893848] [] blk_remove_plug+0x5f/0x91
[ 1.893848] [] mm_unplug_device+0x30/0x50
[ 1.893848] [] blk_unplug+0x78/0x7d
[ 1.893848] [] blk_backing_dev_unplug+0xd/0xf
[ 1.893848] [] block_sync_page+0x4a/0x4c
[ 1.893848] [] sync_page+0x44/0x4d
[ 1.893848] [] __wait_on_bit_lock+0x42/0x8a
[ 1.893848] [] ? sync_page+0x0/0x4d
[ 1.893848] [] __lock_page+0x64/0x6b
[ 1.893848] [] ? wake_bit_function+0x0/0x2a
[ 1.893848] [] read_cache_page_async+0xd4/0x134
[ 1.893848] [] ? blkdev_readpage+0x0/0x15
[ 1.893848] [] ? adfspart_check_ICS+0x0/0x16c
[ 1.893848] [] read_cache_page+0xe/0x45
[ 1.893848] [] read_dev_sector+0x2e/0x93
[ 1.893848] [] adfspart_check_ICS+0x28/0x16c
[ 1.893848] [] ? trace_hardirqs_on+0xd/0xf
[ 1.893848] [] ? adfspart_check_ICS+0x0/0x16c
[ 1.893848] [] rescan_partitions+0x168/0x2fb
[ 1.893848] [] __blkdev_get+0x259/0x336
[ 1.893848] [] ? kobject_put+0x47/0x4b
[ 1.893848] [] blkdev_get+0xb/0xd
[ 1.893848] [] register_disk+0xc4/0x12b
[ 1.893848] [] add_disk+0xc3/0x12d
[ 1.893848] [] ? mm_init+0x0/0x1a5
[ 1.893848] [] mm_init+0x129/0x1a5
[ 1.893848] [] ? mm_init+0x0/0x1a5
[ 1.893848] [] _stext+0x56/0x130
[ 1.893848] [] ? register_irq_proc+0xae/0xca
[ 1.893848] [] ? proc_pid_lookup+0xb4/0x18b
[ 1.893848] [] kernel_init+0x132/0x18b
[ 1.893848] [] child_rip+0xa/0x20
[ 1.893848] [] ? restore_args+0x0/0x30
[ 1.893848] [] ? kernel_init+0x0/0x18b
[ 1.893848] [] ? child_rip+0x0/0x20
[ 1.893848] ---[ end trace 7150b3b86da74e1f ]---Signed-off-by: Sage Weil
Signed-off-by: Jens Axboe
07 Apr, 2009
2 commits
-
Replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)
Signed-off-by: Yang Hongyang
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Replace all DMA_64BIT_MASK macro with DMA_BIT_MASK(64)
Signed-off-by: Yang Hongyang
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
18 Dec, 2007
1 commit
-
coding style.
linux-2.6.24-rc5-git3> checkpatch.pl-next patches/block-umem-ckpatch.patch
total: 0 errors, 5 warnings, 530 lines checkedAll of these are line-length warnings.
Only change in generated object file is due to not initializing a
static global variable to 0.Signed-off-by: Randy Dunlap
Signed-off-by: Jens Axboe
11 Dec, 2007
1 commit
-
Fix NULL dereference in umem.c
Signed-off-by: Neil Brown
Tested-by: Dave Chinner
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
10 Oct, 2007
7 commits
-
Signed-off-by: Jeff Garzik
-
Signed-off-by: Jeff Garzik
-
* tab-align DRIVER_*, pci_driver entries
* reduced wasted memory by killing unused struct cardinfo members
* move free_irq() call above resource unmap, to fix tiny window where
irq handler may access recently-unmapped memory* propagate pci_enable_device() return value
* use pci_request_regions, pci_release_regions() for resource reservation
* call pci_disable_device() in pci_driver::remove()
Signed-off-by: Jeff Garzik
-
dev_printk() gives us a consistent prefix (driver name + PCI bus id),
which allows us to eliminate the hand-rolled one.Also allows us to eliminate card->card_number, which was used solely in
printk() calls.Signed-off-by: Jeff Garzik
-
Move include/linux/umem.h to drivers/block, as umem.c is the only user,
and its not an exported header.Move the PCI_{VENDOR,DEVICE}_ID_* constants to include/linux/pci_ids.h.
Signed-off-by: Jeff Garzik
-
As bi_end_io is only called once when the reqeust is complete,
the 'size' argument is now redundant. Remove it.Now there is no need for bio_endio to subtract the size completed
from bi_size. So don't do that either.While we are at it, change bi_end_io to return void.
Signed-off-by: Neil Brown
Signed-off-by: Jens Axboe -
umem.c:
advances bi_idx and bi_sector to track where it is up to.
But it is only ever doing this on one bio, so the updated
fields can easily be kept elsewhere (current_*).
updates bi_size, but never uses the updated values, so
this isn't needed.
reuses bi_phys_segments to count how many iovecs have been
completely. As the completion happens sequentiually, we
can store this information outside the bio too.Signed-off-by: Neil Brown
diff .prev/drivers/block/umem.c ./drivers/block/umem.c
Signed-off-by: Jens Axboe
24 Jul, 2007
1 commit
-
Some of the code has been gradually transitioned to using the proper
struct request_queue, but there's lots left. So do a full sweet of
the kernel and get rid of this typedef and replace its uses with
the proper type.Signed-off-by: Jens Axboe
16 Jul, 2007
2 commits
-
the pci device list for umem was not using PCI_DEVICE, so the
subvendor/subdevice fields were not set to ANY, so matching
didn't work properly.Change to use PCI_DEVICE.
Signed-off-by: Neil Brown
Signed-off-by: Jens Axboe -
Signed-off-by: Robert P. J. Day
Acked-by: NeilBrown
Signed-off-by: Jens Axboe
09 May, 2007
1 commit
-
Remove includes of where it is not used/needed.
Suggested by Al Viro.Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc,
sparc64, and arm (all 59 defconfigs).Signed-off-by: Randy Dunlap
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
02 Mar, 2007
1 commit
-
If register_blkdev() or alloc-disk fail in mm_init() after
pci_register_driver() succeeds, then mm_pci_driver is not unregistered
properly:Cc: Philip Guo
Signed-off-by: Neil Brown
Cc: Jens Axboe
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
15 Feb, 2007
1 commit
-
After Al Viro (finally) succeeded in removing the sched.h #include in module.h
recently, it makes sense again to remove other superfluous sched.h includes.
There are quite a lot of files which include it but don't actually need
anything defined in there. Presumably these includes were once needed for
macros that used to live in sched.h, but moved to other header files in the
course of cleaning it up.To ease the pain, this time I did not fiddle with any header files and only
removed #includes from .c-files, which tend to cause less trouble.Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
configs in arch/arm/configs on arm. I also checked that no new warnings were
introduced by the patch (actually, some warnings are removed that were emitted
by unnecessarily included header files).Signed-off-by: Tim Schmielau
Acked-by: Russell King
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
05 Oct, 2006
1 commit
-
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
of passing regs around manually through all ~1800 interrupt handlers in the
Linux kernel.The regs pointer is used in few places, but it potentially costs both stack
space and code to pass it around. On the FRV arch, removing the regs parameter
from all the genirq function results in a 20% speed up of the IRQ exit path
(ie: from leaving timer_interrupt() to leaving do_IRQ()).Where appropriate, an arch may override the generic storage facility and do
something different with the variable. On FRV, for instance, the address is
maintained in GR28 at all times inside the kernel as part of general exception
handling.Having looked over the code, it appears that the parameter may be handed down
through up to twenty or so layers of functions. Consider a USB character
device attached to a USB hub, attached to a USB controller that posts its
interrupts through a cascaded auxiliary interrupt controller. A character
device driver may want to pass regs to the sysrq handler through the input
layer which adds another few layers of parameter passing.I've build this code with allyesconfig for x86_64 and i386. I've runtested the
main part of the code on FRV and i386, though I can't test most of the drivers.
I've also done partial conversion for powerpc and MIPS - these at least compile
with minimal configurations.This will affect all archs. Mostly the changes should be relatively easy.
Take do_IRQ(), store the regs pointer at the beginning, saving the old one:struct pt_regs *old_regs = set_irq_regs(regs);
And put the old one back at the end:
set_irq_regs(old_regs);
Don't pass regs through to generic_handle_irq() or __do_IRQ().
In timer_interrupt(), this sort of change will be necessary:
- update_process_times(user_mode(regs));
- profile_tick(CPU_PROFILING, regs);
+ update_process_times(user_mode(get_irq_regs()));
+ profile_tick(CPU_PROFILING);I'd like to move update_process_times()'s use of get_irq_regs() into itself,
except that i386, alone of the archs, uses something other than user_mode().Some notes on the interrupt handling in the drivers:
(*) input_dev() is now gone entirely. The regs pointer is no longer stored in
the input_dev struct.(*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
something different depending on whether it's been supplied with a regs
pointer or not.(*) Various IRQ handler function pointers have been moved to type
irq_handler_t.Signed-Off-By: David Howells
(cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)