summaryrefslogtreecommitdiffstats
path: root/drivers/dca
Commit message (Collapse)AuthorAgeFilesLines
* dca: convert to idr_alloc()Tejun Heo2013-02-271-13/+10
| | | | | | | | | | | Convert to the much saner new idr interface. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Maciej Sosnowski <maciej.sosnowski@intel.com> Cc: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* dca: check against empty dca_domains list before unregister providerMaciej Sosnowski2013-01-071-0/+5
| | | | | | | | | | | | When providers get blocked unregister_dca_providers() is called ending up with dca_providers and dca_domain lists emptied. Dca should be prevented from trying to unregister any provider if dca_domain list is found empty. Cc: <stable@vger.kernel.org> Reported-by: Jiang Liu <jiang.liu@huawei.com> Tested-by: Gaohuai Han <hangaohuai@huawei.com> Signed-off-by: Maciej Sosnowski <maciej.sosnowski@intel.com> Signed-off-by: Dan Williams <djbw@fb.com>
* drivers/dca: Add export.h for THIS_MODULE to dca-sysfs.cPaul Gortmaker2011-10-311-0/+1
| | | | | | | Ensure we have access to the THIS_MODLUE macro once we clean up the implicit module.h usage. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* drivers/dca: Add module.h to dca-core.cPaul Gortmaker2011-10-311-0/+1
| | | | | | | | This file really needs the full module.h header file present, but was just getting it implicitly before. Call it out in advance so that we don't get future build failures on this. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* locking, drivers/dca: Annotate dca_lock as rawMike Galbraith2011-09-131-34/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dca_lock can be taken in atomic context: [ 25.607536] Call Trace: [ 25.607557] [<ffffffff820078a1>] try_stack_unwind+0x151/0x1a0 [ 25.607566] [<ffffffff820062c2>] dump_trace+0x92/0x370 [ 25.607573] [<ffffffff8200731c>] show_trace_log_lvl+0x5c/0x80 [ 25.607578] [<ffffffff82007355>] show_trace+0x15/0x20 [ 25.607587] [<ffffffff823f4588>] dump_stack+0x77/0x8f [ 25.607595] [<ffffffff82043f2a>] __might_sleep+0x11a/0x130 [ 25.607602] [<ffffffff823f7b93>] rt_spin_lock+0x83/0x90 [ 25.607611] [<ffffffffa0209138>] dca_common_get_tag+0x28/0x80 [dca] [ 25.607622] [<ffffffffa02091c8>] dca3_get_tag+0x18/0x20 [dca] [ 25.607634] [<ffffffffa0244e71>] igb_update_dca+0xb1/0x1d0 [igb] [ 25.607649] [<ffffffffa0244ff5>] igb_setup_dca+0x65/0x80 [igb] [ 25.607663] [<ffffffffa02535a6>] igb_probe+0x946/0xe4d [igb] [ 25.607678] [<ffffffff82247517>] local_pci_probe+0x17/0x20 [ 25.607686] [<ffffffff82248661>] pci_device_probe+0x121/0x130 [ 25.607699] [<ffffffff822e4832>] driver_probe_device+0xd2/0x2e0 [ 25.607707] [<ffffffff822e4adb>] __driver_attach+0x9b/0xa0 [ 25.607714] [<ffffffff822e3d1b>] bus_for_each_dev+0x6b/0xa0 [ 25.607720] [<ffffffff822e4591>] driver_attach+0x21/0x30 [ 25.607727] [<ffffffff822e3425>] bus_add_driver+0x1e5/0x350 [ 25.607734] [<ffffffff822e4e41>] driver_register+0x81/0x160 [ 25.607742] [<ffffffff8224890f>] __pci_register_driver+0x6f/0xf0 [ 25.607752] [<ffffffffa011505b>] igb_init_module+0x5b/0x5d [igb] [ 25.607769] [<ffffffff820001dd>] do_one_initcall+0x3d/0x1a0 [ 25.607778] [<ffffffff820961f6>] sys_init_module+0xe6/0x270 [ 25.607786] [<ffffffff82003232>] system_call_fastpath+0x16/0x1b [ 25.607794] [<00007f84d6783f4a>] 0x7f84d6783f4a and thus must not be preempted on -rt. In mainline this change documents the low level nature of the lock - otherwise there's no functional difference. Lockdep and Sparse checking will work as usual. Signed-off-by: Mike Galbraith <efault@gmx.de> [ Fixed the domain allocation which was calling kzalloc from the irq disabled section ] Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* drivers/dca/dca-core.c: use list_move() instead of list_del()/list_add() ↵Kirill A. Shutemov2011-03-221-4/+2
| | | | | | | | | combination Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> Cc: Maciej Sosnowski <maciej.sosnowski@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* dca: remove unneeded NULL checkDan Carpenter2011-01-131-2/+0
| | | | | | | | | | | | | The return here doesn't release the locks or re-enable IRQs. But as Andrew Morton points out, domain is never NULL. list_first_entry() essentially never returns NULL and also we already verified that the list is not empty. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Maciej Sosnowski <maciej.sosnowski@intel.com> Cc: David Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* dca: disable dca on IOAT ver.3.0 multiple-IOH platformsSosnowski, Maciej2010-09-171-6/+79
| | | | | | | | Direct Cache Access is not supported on IOAT ver.3.0 multiple-IOH platforms. This patch blocks registering of dca providers when multiple IOH detected with IOAT ver.3.0. Signed-off-by: Maciej Sosnowski <maciej.sosnowski@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo2010-03-302-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implicit 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 allmodconfig 8. 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>
* dca: module load should not be an error messageStephen Hemminger2009-09-131-1/+1
| | | | | | | | The message (if it must exist) should not be an error message. IMHO such messages are useless. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* dca: registering requesters in multiple dca domainsMaciej Sosnowski2009-09-101-13/+109
| | | | | | | | | | | | | This patch enables DCA support on multiple-IOH/multiple-IIO architectures. It modifies dca module by replacing single dca_providers list with dca_domains list, each domain containing separate list of providers. This approach lets dca driver manage multiple domains, i.e. sets of providers and requesters mapped back to the same PCI root complex device. The driver takes care to register each requester to a provider from the same domain. Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Maciej Sosnowski <maciej.sosnowski@intel.com>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds2009-03-231-0/+21
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (32 commits) ucc_geth: Fix oops when using fixed-link support dm9000: locking bugfix net: update dnet.c for bus_id removal dnet: DNET should depend on HAS_IOMEM dca: add missing copyright/license headers nl80211: Check that function pointer != NULL before using it sungem: missing net_device_ops be2net: fix to restore vlan ids into BE2 during a IF DOWN->UP cycle be2net: replenish when posting to rx-queue is starved in out of mem conditions bas_gigaset: correctly allocate USB interrupt transfer buffer smsc911x: reset last known duplex and carrier on open sh_eth: Fix mistake of the address of SH7763 sh_eth: Change handling of IRQ netns: oops in ip[6]_frag_reasm incrementing stats net: kfree(napi->skb) => kfree_skb net: fix sctp breakage ipv6: fix display of local and remote sit endpoints net: Document /proc/sys/net/core/netdev_budget tulip: fix crash on iface up with shirq debug virtio_net: Make virtio_net support carrier detection ...
| * dca: add missing copyright/license headersMaciej Sosnowski2009-03-211-0/+21
| | | | | | | | | | | | | | | | In two dca files copyright and license headers are missing. This patch adds them there. Signed-off-by: Maciej Sosnowski <maciej.sosnowski@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | I/OAT: update driver version and copyright datesMaciej Sosnowski2009-03-041-1/+1
|/ | | | | | | | | | Together with new fixes update driver version and extend copyright dates ranges. Signed-off-by: Maciej Sosnowski <maciej.sosnowski@intel.com> Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* dca: redesign locks to fix deadlocksMaciej Sosnowski2009-02-021-18/+33
| | | | | | | | | | | Change spin_locks to irqsave to prevent dead-locks. Protect adding and deleting to/from dca_providers list. Drop the lock during dca_sysfs_add_req() and dca_sysfs_remove_req() calls as they might sleep (use GFP_KERNEL allocation). Signed-off-by: Maciej Sosnowski <maciej.sosnowski@intel.com> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* dmaengine: bump initcall level to arch_initcallDan Williams2009-01-061-1/+1
| | | | | | | | | | | | | | | There are dmaengine users that would like to register dma devices at subsys_initcall time to ensure channels are available by device_initcall time. Cc: Maciej Sosnowski <maciej.sosnowski@intel.com> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* [4/4] dca: fixup initialization dependencyDan Williams2008-11-101-1/+1
| | | | | | | | | | | Mark dca_init as a subsys_initcall since it needs to be ready to go before dependent drivers start registering themselves. Cc: <stable@kernel.org> Reported-and-tested-by: Mark Rustad <mark_rustad@Xiotech.com> Acked-by: Maciej Sosnowski <maciej.sosnowski@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* device create: misc: convert device_create_drvdata to device_createGreg Kroah-Hartman2008-10-161-5/+3
| | | | | | | | Now that device_create() has been audited, rename things back to the original call to be sane. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Merge branch 'for-linus' of ↵Linus Torvalds2008-07-232-29/+105
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx: (24 commits) I/OAT: I/OAT version 3.0 support I/OAT: tcp_dma_copybreak default value dependent on I/OAT version I/OAT: Add watchdog/reset functionality to ioatdma iop_adma: cleanup iop_chan_xor_slot_count iop_adma: document how to calculate the minimum descriptor pool size iop_adma: directly reclaim descriptors on allocation failure async_tx: make async_tx_test_ack a boolean routine async_tx: remove depend_tx from async_tx_sync_epilog async_tx: export async_tx_quiesce async_tx: fix handling of the "out of descriptor" condition in async_xor async_tx: ensure the xor destination buffer remains dma-mapped async_tx: list_for_each_entry_rcu() cleanup dmaengine: Driver for the Synopsys DesignWare DMA controller dmaengine: Add slave DMA interface dmaengine: add DMA_COMPL_SKIP_{SRC,DEST}_UNMAP flags to control dma unmap dmaengine: Add dma_client parameter to device_alloc_chan_resources dmatest: Simple DMA memcpy test client dmaengine: DMA engine driver for Marvell XOR engine iop-adma: fix platform driver hotplug/coldplug dmaengine: track the number of clients using a channel ... Fixed up conflict in drivers/dca/dca-sysfs.c manually
| * I/OAT: I/OAT version 3.0 supportMaciej Sosnowski2008-07-222-29/+105
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds to ioatdma and dca modules support for Intel I/OAT DMA engine ver.3 (aka CB3 device). The main features of I/OAT ver.3 are: * 8 single channel DMA devices (8 channels total) * 8 DCA providers, each can accept 2 requesters * 8-bit TAG values and 32-bit extended APIC IDs Signed-off-by: Maciej Sosnowski <maciej.sosnowski@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | device create: dca: convert device_create to device_create_drvdataGreg Kroah-Hartman2008-07-211-3/+5
|/ | | | | | | | device_create() is race-prone, so use the race-free device_create_drvdata() instead as device_create() is going away. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* DCA: convert struct class_device to struct device.Kay Sievers2008-02-081-8/+7
| | | | | | | | | | | Thanks to Kay for keeping us honest. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Cc: "Williams, Dan J" <dan.j.williams@intel.com> Acked-by: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* I/OAT: Add DCA servicesShannon Nelson2007-10-161-5/+1
| | | | | | | | | | | | | | Add code to connect to the DCA driver and provide cpu tags for use by drivers that would like to use Direct Cache Access hints. [Adrian Bunk] Several Kconfig cleanup items [Andrew Morten, Chris Leech] Fix for using cpu_physical_id() even when built for uni-processor Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* DCA: Add Direct Cache Access driverShannon Nelson2007-10-164-0/+301
Direct Cache Access (DCA) is a method for warming the CPU cache before data is used, with the intent of lessening the impact of cache misses. This patch adds a manager and interface for matching up client requests for DCA services with devices that offer DCA services. In order to use DCA, a module must do bus writes with the appropriate tag bits set to trigger a cache read for a specific CPU. However, different CPUs and chipsets can require different sets of tag bits, and the methods for determining the correct bits may be simple hardcoding or may be a hardware specific magic incantation. This interface is a way for DCA clients to find the correct tag bits for the targeted CPU without needing to know the specifics. [Dave Miller] use DEFINE_SPINLOCK() Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
OpenPOWER on IntegriCloud