aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/scsi_driver.h (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2009-10-02[SCSI] Fix protection scsi_data_buffer leakMartin K. Petersen1-4/+7
We would leak a scsi_data_buffer if the free_list command was of the protected variety. Reported-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Cc: Stable Tree <stable@kernel.org> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-02[SCSI] sd: Detach DIF from block integrity infrastructureMartin K. Petersen4-80/+53
So far we have only issued DIF commands if CONFIG_BLK_DEV_INTEGRITY is enabled. However, communication between initiator and target should be independent of protection information DMA. There are DIF-only host adapters coming out that will be able to take advantage of this. Move the relevant DIF bits to sd.c. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-02[SCSI] Deprecate SCSI_PROT_*_CONVERT operationsMartin K. Petersen3-32/+7
The checksum format is orthogonal to whether the protection information is being passed on beyond the HBA or not. It is perfectly valid to use a non-T10 CRC with WRITE_STRIP and READ_INSERT. Consequently it no longer makes sense to explicitly refer to the conversion in the protection operation. Update sd_dif and lpfc accordingly. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Acked-by: Ihab Hamadi <Ihab.Hamadi@Emulex.Com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-02[SCSI] Retry ADD_TO_MLQUEUE return value for EH commandsHannes Reinecke1-0/+3
A target reset when I/O is ongoing might result an eventual device offline, as scsi_eh_completed_normally() might return ADD_TO_MLQUEUE in addition to the advertised SUCCESS, FAILED, and NEEDS_RETRY. Which is unfortunate as scsi_send_eh_cmnd() will therefore map ADD_TO_MLQUEUE to FAILED instead of the more appropriate NEEDS_RETRY. Signed-off-by: Hannes Reinecke <hare@suse.de> Cc: Stable Tree <stable@kernel.org> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-02[SCSI] sg: Free data buffers after calling blk_rq_unmap_userChristof Schmitt1-5/+5
Running sg_luns on s390x with CONFIG_DEBUG_PAGEALLOC enabled fails with EFAULT from the SG_IO ioctl. The EFAULT is the result from copy_to_user failing in this call chain: sg_ioctl sg_new_read sg_finish_rem_req blk_rq_unmap_user __blk_rq_unmap_user bio_uncopy_user __bio_copy_iov copy_to_user The sg driver calls sg_remove_scat to free the memory pages before calling blk_rq_unmap_user that tries to copy the data back to userspace. Change the order to first call blk_rq_unmap_user before freeing the pages in sg_remove_scat. Acked-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: stable@kernel.org Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Acked-by: Douglas Gilbert <dgilbert@interlog.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-02[SCSI] sr: consider the last written sector when determining media sizeTejun Heo1-8/+14
On certain cases, UDF disc doesn't report capacity correctly via READ_CAPACITY but TOC or trackinfo contains valid information which can be obtained using cdrom_get_last_written(). ide-cd considers both values and uses the larger one. Do the same in sr. This fixes bko#9668. http://bugzilla.kernel.org/show_bug.cgi?id=9668 Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Milan Kocian <milan.kocian@wq.cz> Cc: Jan Kara <jack@suse.cz> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-02[SCSI] bnx2i: Fix context mapping issue for architectures with PAGE_SIZE != 4096Anil Veerabhadrappa2-1/+3
5706/5708/5709 devices allow driver/user to set page size. By default it is set to 4096. Current drivers do not program this register based on architecture type (e.g. x86 = 4K, IA64 = 16K) and by choice lets device use the defaults. So while mapping connection context memory (doorebll registers), driver has to match page size used by the device. Included change fixes the issue we uncovered during IA64 testing Signed-off-by: Anil Veerabhadrappa <anilgv@broadcom.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-02[SCSI] hptiop: Add RR44xx adapter supportHighPoint Linux Team3-13/+48
Most code changes were made to support RR44xx adapters. - add more PCI device ID. - using PCI BAR[2] to access RR44xx IOP. - using PCI BAR[0] to check and clear RR44xx IRQ. Signed-off-by: HighPoint Linux Team <linux@highpoint-tech.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-02[SCSI] scsi_dh_rdac: Fix for returning correct mode select cmd return infoMoger, Babu1-2/+0
The function mode_select_handle_sense returns SCSI_DH_OK even when there is a sense code which is incorrect. Removing it so that it returns SCSI_DH_IO when there is sense that is not handled by this function. Signed-off-by: Babu Moger <babu.moger@lsi.com> Reviewed-by: Vijay Chauhan <vijay.chauhan@lsi.com> Reviewed-by: Bob Stankey <Robert.stankey@lsi.com> Reviewed-by: Chandra Seetharaman <sekharan@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-02[SCSI] pmcraid: Changed driver prints to scmd/sdev_printkAnil Ravindranath1-27/+31
1.Changed driver prints to use scmd_printk, sdev_printk 2.Changed dev_err calls to scmd_printk for scsi related print messages Signed-off-by: Anil Ravindranath <anil_ravindranath@pmc-sierra.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-02[SCSI] mvsas: Support Areca SAS/SATA HBA, ARC-1300/1320Nick Cheng2-0/+8
This is support for Areca SAS/SATA HBA, ARC-1300/1320, which quipped with 88SE6440/88SE9480 respectively. Signed-off-by: Nick Cheng< nick.cheng@areca.com.tw > Cc: Ke Wei <kewei.mv@gmail.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-09-30MIPS: Avoid spurious make includecheck messageRalf Baechle1-2/+2
arch/mips/include/asm/unaligned.h: linux/unaligned/generic.h is included more than once. Entirely legitimate but just noise. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-30MIPS: VPE: Get rid of BKL.Ralf Baechle2-42/+50
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-30MIPS: VPE: Fix build after the credential changes a while ago.Ralf Baechle1-10/+23
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-30MIPS: Excite: Get rid of BKL.Ralf Baechle1-2/+0
It's not obvious what good it was supposed to do here anyway. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-30MIPS: Sibyte: Get rid of BKL.Ralf Baechle1-18/+15
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-30MIPS: BCM63xx: Add PCMCIA & Cardbus support.Maxime Bizon8-1/+763
Signed-off-by: Maxime Bizon <mbizon@freebox.fr> Reviewed-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-30MIPS: MSP71xx: request_irq() failure ignored in msp_pcibios_config_access()Roel Kluin1-1/+4
Produce an error if request_irq() fails. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: "Ithamar R. Adema" <ithamar.adema@team-embedded.nl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-30MIPS: Decrease size of au1xxx_dbdma_pm_regs[][]Roel Kluin1-5/+3
There are 16 individual channels (NUM_DBDMA_CHANS) to save/restore plus the global ddma block config (the +1). The last register in a channel can be skipped since it's read-only (at offset 0x18). Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: Manuel Lauss <manuel.lauss@googlemail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-30MIPS: SMP: Inline arch_send_call_function_{single_ipi,ipi_mask}Ralf Baechle2-15/+13
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-30MIPS: SMP: Fix build.Ralf Baechle2-2/+2
commit 48a048fed82a8e5fdd8618574f6d3de1a0d67a50 Author: Rusty Russell <rusty@rustcorp.com.au> Date: Thu Sep 24 09:34:44 2009 -0600 apparently only passed the "looks good" level of QA ;-) Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-30MIPS: MIPSxx SC: Avoid destructive invalidation on partial L2 cachelines.Kevin Cernekee1-0/+5
This extends commit a8ca8b64e3fdfec17679cba0ca5ce6e3ffed092d to cover MIPSxx-style board cache code. Signed-off-by: Kevin Cernekee <cernekee@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-30MIPS: Sibyte: Fix compilation error.Mark Mason1-1/+1
Build error introduced by d4f587c67fc39e0030ddd718675e252e208da4d7. Signed-off-by: Mark Mason <mmason@upwardaccess.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-30MIPS: BCM1480: Re-apply patch lost due to bad resolution of merge conflict.Ralf Baechle1-4/+0
Patch 14275ccdb1e4b487cca745aba994699c426a31ee and d5dedd4507d307eb3f35f21b6e16f336fdc0d82a are conflicting and the conflict was resolved badly in merge 92241940be501f798cb21db344bbb3d1ec3c4f1c resulting in the BCM1480 changes of 14275ccdb1e4b487cca745aba994699c426a31ee getting lost. Sort out the damage. Reported and initial patch by Mark Mason <mmason@upwardaccess.com>. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-30MIPS: BCM63xx: Add serial driver for bcm63xx integrated UART.Maxime Bizon8-1/+964
Signed-off-by: Maxime Bizon <mbizon@freebox.fr> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-30MIPS: Loongson2: Fix typo "enalbe" -> "enable"Uwe Kleine-König1-7/+7
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: Yanhua <yanh@lemote.com> Cc: Robert Richter <robert.richter@amd.com> Acked-by: Wu Zhangjin <wuzj@lemote.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-30MIPS: SMTC: Remove duplicate structure field initializationJulia Lawall1-3/+2
The definition of the irq_ipi structure has two initializations of the flags field. This combines them. [Ralf: The issue was originally introduced by commit be4894196d79455f420dd7bb78be7dc73bec115c (linux-mips.org) rsp. 033890b084adfa367c544864451d7730552ce8bf (kernel.org). The original intention of the code was to initialize .flags with both flags ored together. The broken C code as actually implemented will be compiled by an equally broken gcc to use only the last initialization, that is IRQF_PERCPU which means this turned into an SMTC bug for 2.6.23 and newer.] The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r@ identifier I, s, fld; position p0,p; expression E; @@ struct I s =@p0 { ... .fld@p = E, ...}; @s@ identifier I, s, r.fld; position r.p0,p; expression E; @@ struct I s =@p0 { ... .fld@p = E, ...}; @script:python@ p0 << r.p0; fld << r.fld; ps << s.p; pr << r.p; @@ if int(ps[0].line)!=int(pr[0].line) or int(ps[0].column)!=int(pr[0].column): cocci.print_main(fld,p0) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-30MIPS: Remove duplicated #includeHuang Weiyi1-1/+0
Remove duplicated #include in arch/mips/kernel/smp.c. Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-30MIPS: BCM63xx: Remove duplicated #includeHuang Weiyi1-1/+0
Remove duplicated #include in arch/mips/bcm63xx/boards/board_bcm963xx.c. Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-30pty: reconnect the BSD TIOCSPTLCK handling to legacy ptysLinus Torvalds1-21/+26
David Howells noticed (due to the compiler warning about an unused 'pty_ops_bsd' variable) that we haven't actually been using the code that implements TIOCSPTLCK for legacy pty handling. It's been that way since 2.6.26, commit 3e8e88ca053150efdbecb45d8f481cf560ec808d to be exact ("pty: prepare for tty->ops changes"). DavidH initially submitted a patch just removing the dead code entirely, and since nobody has apparently ever complained, I'm not entirely sure that wouldn't be the right thing to do. But since the whole and only point of the legacy pty code is to be compatible with legacy distros that don't use the new unix98 pty model, let's just wire it up again. And clean it up a bit while we're at it. Acked-by: David Howells <dhowells@redhat.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-30Revert "x86, mce: do not compile mcelog message on AMD"Linus Torvalds1-4/+1
This reverts commit 22223c9b417be5fd0ab2cf9ad17eb7bd1e19f7b9, as requested by Andi Kleen: "Obviously kernels compiled with AMD support can still run on non AMD systems, so messages like this can never be removed at compile time." Requsted-by: Andi Kleen <andi@firstfloor.org> Cc: Borislav Petkov <borislav.petkov@amd.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-30ext4: Fix time encoding with extra epoch bitsTheodore Ts'o1-3/+3
"Looking at ext4.h, I think the setting of extra time fields forgets to mask the epoch bits so the epoch part overwrites nsec part. The second change is only for coherency (2 -> EXT4_EPOCH_BITS)." Thanks to Damien Guibouret for pointing out this problem. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-09-30ext4: Add a stub for mpage_da_data in the trace headerJosh Stone1-0/+1
The tracepoint ext4_da_write_pages has a struct mpage_da_data* parameter, but that struct is only defined in fs/ext4/ext4.h. This patch adds a forward declaration for that struct, so this tracepoint header can still be used by tools like SystemTap. This is a continuation of the fix in commit 3661d286. http://sourceware.org/bugzilla/show_bug.cgi?id=10703 Signed-off-by: Josh Stone <jistone@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-09-30jbd2: Use tracepoints for history fileTheodore Ts'o5-228/+130
The /proc/fs/jbd2/<dev>/history was maintained manually; by using tracepoints, we can get all of the existing functionality of the /proc file plus extra capabilities thanks to the ftrace infrastructure. We save memory as a bonus. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-09-30ext4: Use tracepoints for mb_history trace fileTheodore Ts'o6-348/+182
The /proc/fs/ext4/<dev>/mb_history was maintained manually, and had a number of problems: it required a largish amount of memory to be allocated for each ext4 filesystem, and the s_mb_history_lock introduced a CPU contention problem. By ripping out the mb_history code and replacing it with ftrace tracepoints, and we get more functionality: timestamps, event filtering, the ability to correlate mballoc history with other ext4 tracepoints, etc. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-09-29ext4, jbd2: Drop unneeded printks at mount and unmount timeTheodore Ts'o5-22/+10
There are a number of kernel printk's which are printed when an ext4 filesystem is mounted and unmounted. Disable them to economize space in the system logs. In addition, disabling the mballoc stats by default saves a number of unneeded atomic operations for every block allocation or deallocation. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-09-29ext4: Handle nested ext4_journal_start/stop calls without a journalCurt Wohlgemuth3-13/+38
This patch fixes a problem with handling nested calls to ext4_journal_start/ext4_journal_stop, when there is no journal present. Signed-off-by: Curt Wohlgemuth <curtw@google.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-09-29ext4: Make sure ext4_dirty_inode() updates the inode in no journal modeCurt Wohlgemuth1-15/+4
This patch a problem that ext4_dirty_inode() was not calling ext4_mark_inode_dirty() if the current_handle is not valid, which it is the case in no journal mode. It also removes a test for non-matching transaction which can never happen. Signed-off-by: Curt Wohlgemuth <curtw@google.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-09-29ext4: Avoid updating the inode table bh twice in no journal modeFrank Mayhar1-21/+16
This is a cleanup of commit 91ac6f4. Since ext4_mark_inode_dirty() has already called ext4_mark_iloc_dirty(), which in turn calls ext4_do_update_inode(), it's not necessary to have ext4_write_inode() call ext4_do_update_inode() in no journal mode. Indeed, it would be duplicated work. Reviewed-by: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Frank Mayhar <fmayhar@google.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-09-29nilfs2: fix missing initialization of i_dir_start_lookup memberRyusuke Konishi1-0/+1
The i_dir_start_lookup field in nilfs_inode_info objects should be cleared when the objects are allocated, but the the initialization was missing in case of reading from disk. This adds the initialization. Since the variable just gives a start page on directory lookups, the bug was nonfatal until now. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
2009-09-29nilfs2: fix missing zero-fill initialization of btree node cacheRyusuke Konishi1-0/+1
This will fix file system corruption which infrequently happens after mount. The problem was reported from users with the title "[NILFS users] Fail to mount NILFS." (Message-ID: <200908211918.34720.yuri@itinteg.net>), and so forth. I've also experienced the corruption multiple times on kernel 2.6.30 and 2.6.31. The problem turned out to be caused due to discordance between mapping->nrpages of a btree node cache and the actual number of pages hung on the cache; if the mapping->nrpages becomes zero even as it has pages, truncate_inode_pages() returns without doing anything. Usually this is harmless except it may cause page leak, but garbage collection fairly infrequently sees a stale page remained in the btree node cache of DAT (i.e. disk address translation file of nilfs), and induces the corruption. I identified a missing initialization in btree node caches was the root cause. This corrects the bug. I've tested this for kernel 2.6.30 and 2.6.31. Reported-by: Yuri Chislov <yuri@itinteg.net> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Cc: stable <stable@kernel.org>
2009-09-29drm/radeon/kms: Convert R520 to new init path and associated cleanupJerome Glisse5-128/+376
Convert the r520 asic support to new init path, change are smaller than previous one as most of the architecture is now in place and more code sharing can happen btw various asics. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
2009-09-29drm/radeon/kms: Convert RV515 to new init path and associated cleanupJerome Glisse11-158/+712
Convert the rv515 asic support to new init path also add an explanation in radeon.h about the new init path. There is also few cleanups associated with this change (others asic calling rv515 helper functions). Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
2009-09-29drm: fix radeon DRM warnings when !CONFIG_DEBUG_FSMikael Pettersson1-4/+3
Compiling the radeon DRM driver with !CONFIG_DEBUG_FS throws the following warnings: drivers/gpu/drm/radeon/radeon_ttm.c: In function 'radeon_ttm_debugfs_init': drivers/gpu/drm/radeon/radeon_ttm.c:714: warning: unused variable 'i' drivers/gpu/drm/radeon/radeon_ttm.c: At top level: drivers/gpu/drm/radeon/radeon_ttm.c:692: warning: 'radeon_mem_types_list' defined but not used drivers/gpu/drm/radeon/radeon_ttm.c:693: warning: 'radeon_mem_types_names' defined but not used Fix: move these variables inside the #if defined(CONFIG_DEBUG_FS) block in radeon_ttm_debugsfs_init(), which is the only place using them. Signed-off-by: Mikael Pettersson <mikpe@it.uu.se> Signed-off-by: Dave Airlie <airlied@linux.ie>
2009-09-29drm: fix drm_fb_helper warning when !CONFIG_MAGIC_SYSRQMikael Pettersson1-0/+2
Compiling DRM throws the following warning if MAGIC_SYSRQ is disabled: drivers/gpu/drm/drm_fb_helper.c:101: warning: 'sysrq_drm_fb_helper_restore_op' defined but not used Fix: place sysrq_drm_fb_helper_restore_op and associated definitions inside #ifdef CONFIG_MAGIC_SYSRQ. Signed-off-by: Mikael Pettersson <mikpe@it.uu.se> Signed-off-by: Dave Airlie <airlied@linux.ie>
2009-09-29percpu: make allocation failures more verboseTejun Heo1-2/+18
Warn and dump stack when percpu allocation fails. percpu allocator is still young and unchecked NULL percpu pointer usage can result in random memory corruption when combined with the pointer shifting in access macros. Allocation failures should be rare and the warning message will be disabled after certain times. Signed-off-by: Tejun Heo <tj@kernel.org>
2009-09-29percpu: make pcpu_setup_first_chunk() failures more verboseTejun Heo1-11/+26
The parameters to pcpu_setup_first_chunk() come from different sources depending on architecture and can be quite complex. The function runs various sanity checks on the parameters and triggers BUG() if something isn't right. However, this is very early during the boot and not reporting exactly what the problem is makes debugging even harder. Add PCPU_SETUP_BUG() macro which prints out enough information about the parameters. As the macro still puts separate BUG() for each check, it won't lose any information even on the situations where only the program counter can be retrieved. While at it, also bump pcpu_dump_alloc_info() message to KERN_INFO so that it's visible on the console if boot fails to complete. Signed-off-by: Tejun Heo <tj@kernel.org>
2009-09-29percpu: make embedding first chunk allocator check vmalloc space sizeTejun Heo1-2/+18
Embedding first chunk allocator maintains the distances between units in the vmalloc area and thus needs vmalloc space to be larger than the maximum distances between units; otherwise, it wouldn't be able to create any dynamic chunks. This patch makes the embedding first chunk allocator check vmalloc space size and if the maximum distance between units is larger than 75% of it, print warning and, if page mapping allocator is available, fail initialization so that the system falls back onto it. This should work around percpu allocation failure problems on certain sparc64 configurations where distances between NUMA nodes are larger than the vmalloc area and makes percpu allocator more robust for future configurations. Signed-off-by: Tejun Heo <tj@kernel.org>
2009-09-29sparc64: implement page mapping percpu first chunk allocatorTejun Heo2-9/+47
Implement page mapping percpu first chunk allocator as a fallback to the embedding allocator. The next patch will make the embedding allocator check distances between units to determine whether it fits within the vmalloc area so that this fallback can be used on such cases. sparc64 currently has relatively small vmalloc area which makes it impossible to create any dynamic chunks on certain configurations leading to percpu allocation failures. This and the next patch should allow those configurations to keep working until proper solution is found. While at it, mark pcpu_cpu_distance() with __init. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: David S. Miller <davem@davemloft.net>
2009-09-29percpu: make pcpu_build_alloc_info() clear static buffersTejun Heo1-0/+4
pcpu_build_alloc_info() may be called multiple times when percpu is falling back to different first chunk allocator. Make it clear static buffers so that they don't contain values from previous runs. Signed-off-by: Tejun Heo <tj@kernel.org>