summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* dm exception store: fix misordered writesMikulas Patocka2008-10-211-3/+8
| | | | | | | | | | We must zero the next chunk on disk *before* writing out the current chunk, not after. Otherwise if the machine crashes at the wrong time, the "end of metadata" marker may be missing. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Cc: stable@kernel.org
* dm exception store: refactor zero_areaAlasdair G Kergon2008-10-211-34/+68
| | | | | | | | | | | | Use a separate buffer for writing zeroes to the on-disk snapshot exception store, make the updating of ps->current_area explicit and refactor the code in preparation for the fix in the next patch. No functional change. Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Cc: stable@kernel.org
* dm snapshot: drop unused last_percentMikulas Patocka2008-10-212-4/+0
| | | | | | | | The last_percent field is unused - remove it. (It dates from when events were triggered as each X% filled up.) Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
* dm snapshot: fix primary_pe raceMikulas Patocka2008-10-211-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a race condition with primary_pe ref_count handling. put_pending_exception runs under dm_snapshot->lock, it does atomic_dec_and_test on primary_pe->ref_count, and later does atomic_read primary_pe->ref_count. __origin_write does atomic_dec_and_test on primary_pe->ref_count without holding dm_snapshot->lock. This opens the following race condition: Assume two CPUs, CPU1 is executing put_pending_exception (and holding dm_snapshot->lock). CPU2 is executing __origin_write in parallel. primary_pe->ref_count == 2. CPU1: if (primary_pe && atomic_dec_and_test(&primary_pe->ref_count)) origin_bios = bio_list_get(&primary_pe->origin_bios); ... decrements primary_pe->ref_count to 1. Doesn't load origin_bios CPU2: if (first && atomic_dec_and_test(&primary_pe->ref_count)) { flush_bios(bio_list_get(&primary_pe->origin_bios)); free_pending_exception(primary_pe); /* If we got here, pe_queue is necessarily empty. */ return r; } ... decrements primary_pe->ref_count to 0, submits pending bios, frees primary_pe. CPU1: if (!primary_pe || primary_pe != pe) free_pending_exception(pe); ... this has no effect. if (primary_pe && !atomic_read(&primary_pe->ref_count)) free_pending_exception(primary_pe); ... sees ref_count == 0 (written by CPU 2), does double free !! This bug can happen only if someone is simultaneously writing to both the origin and the snapshot. If someone is writing only to the origin, __origin_write will submit kcopyd request after it decrements primary_pe->ref_count (so it can't happen that the finished copy races with primary_pe->ref_count decrementation). If someone is writing only to the snapshot, __origin_write isn't invoked at all and the race can't happen. The race happens when someone writes to the snapshot --- this creates pending_exception with primary_pe == NULL and starts copying. Then, someone writes to the same chunk in the snapshot, and __origin_write races with termination of already submitted request in pending_complete (that calls put_pending_exception). This race may be reason for bugs: http://bugzilla.kernel.org/show_bug.cgi?id=11636 https://bugzilla.redhat.com/show_bug.cgi?id=465825 The patch fixes the code to make sure that: 1. If atomic_dec_and_test(&primary_pe->ref_count) returns false, the process must no longer dereference primary_pe (because someone else may free it under us). 2. If atomic_dec_and_test(&primary_pe->ref_count) returns true, the process is responsible for freeing primary_pe. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Cc: stable@kernel.org
* dm kcopyd: avoid queue shuffleKazuo Ito2008-10-211-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Write throughput to LVM snapshot origin volume is an order of magnitude slower than those to LV without snapshots or snapshot target volumes, especially in the case of sequential writes with O_SYNC on. The following patch originally written by Kevin Jamieson and Jan Blunck and slightly modified for the current RCs by myself tries to improve the performance by modifying the behaviour of kcopyd, so that it pushes back an I/O job to the head of the job queue instead of the tail as process_jobs() currently does when it has to wait for free pages. This way, write requests aren't shuffled to cause extra seeks. I tested the patch against 2.6.27-rc5 and got the following results. The test is a dd command writing to snapshot origin followed by fsync to the file just created/updated. A couple of filesystem benchmarks gave me similar results in case of sequential writes, while random writes didn't suffer much. dd if=/dev/zero of=<somewhere on snapshot origin> bs=4096 count=... [conv=notrunc when updating] 1) linux 2.6.27-rc5 without the patch, write to snapshot origin, average throughput (MB/s) 10M 100M 1000M create,dd 511.46 610.72 11.81 create,dd+fsync 7.10 6.77 8.13 update,dd 431.63 917.41 12.75 update,dd+fsync 7.79 7.43 8.12 compared with write throughput to LV without any snapshots, all dd+fsync and 1000 MiB writes perform very poorly. 10M 100M 1000M create,dd 555.03 608.98 123.29 create,dd+fsync 114.27 72.78 76.65 update,dd 152.34 1267.27 124.04 update,dd+fsync 130.56 77.81 77.84 2) linux 2.6.27-rc5 with the patch, write to snapshot origin, average throughput (MB/s) 10M 100M 1000M create,dd 537.06 589.44 46.21 create,dd+fsync 31.63 29.19 29.23 update,dd 487.59 897.65 37.76 update,dd+fsync 34.12 30.07 26.85 Although still not on par with plain LV performance - cannot be avoided because it's copy on write anyway - this simple patch successfully improves throughtput of dd+fsync while not affecting the rest. Signed-off-by: Jan Blunck <jblunck@suse.de> Signed-off-by: Kazuo Ito <ito.kazuo@oss.ntt.co.jp> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Cc: stable@kernel.org
* binfmt_elf_fdpic: Update for cputime changes.Paul Mundt2008-10-201-12/+7
| | | | | | | | | | | | | Commit f06febc96ba8e0af80bcc3eaec0a109e88275fac ("timers: fix itimer/ many thread hang") introduced a new task_cputime interface and subsequently only converted binfmt_elf over to it. This results in the build for binfmt_elf_fdpic blowing up given that p->signal->{u,s}time have disappeared from underneath us. Apply the same trivial fix from binfmt_elf to binfmt_elf_fdpic. Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* mm: remove duplicated #include'sHuang Weiyi2008-10-202-3/+0
| | | | | | | | Removed duplicated #include <linux/vmalloc.h> in mm/vmalloc.c and "internal.h" in mm/memory.c. Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Export tiny shmem_file_setup for DRM-GEMHugh Dickins2008-10-202-1/+2
| | | | | | | | | | | | | We're trying to keep the !CONFIG_SHMEM tiny-shmem.c (using ramfs without swap) in synch with CONFIG_SHMEM shmem.c (and mpm is preparing patches to combine them). I was glad to see EXPORT_SYMBOL_GPL(shmem_file_setup) go into shmem.c, but why not support DRM-GEM when !CONFIG_SHMEM too? But caution says still depend on MMU, since !CONFIG_MMU is.. different. Signed-off-by: Hugh Dickins <hugh@veritas.com> Acked-by: Matt Mackall <mpm@selenic.com> Acked-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* misc: replace remaining __FUNCTION__ with __func__Harvey Harrison2008-10-205-8/+8
| | | | | | | | __FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* fix CONFIG_HIGHMEM compile error in drivers/gpu/drm/i915/i915_gem.cThomas Gleixner2008-10-201-2/+3
| | | | | | | | | | | | | commit 9b7530cc329eb036cfa589930c270e85031f554c ("i915: cleanup coding horrors in i915_gem_gtt_pwrite()") broke the i386 build for CONFIG_HIGHMEM=y. Caught by automatic testing http://www.tglx.de/autoqa-logs/000137-0006-0001.log Signed-off-by: Thomas Gleixner <tglx@linutronix.de> [ My bad. It's the same patch I sent out earlier, nobody noticed then either.. ] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* fix WARN() for PPCArjan van de Ven2008-10-201-1/+1
| | | | | | | | | powerpc doesn't use the generic WARN_ON infrastructure. The newly introduced WARN() as a result didn't print the message, this patch adds the printk for this specific case. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* kexec: fix crash_save_vmcoreinfo_init build problemLuck, Tony2008-10-201-0/+1
| | | | | | | | | | | | | | This fixes kernel/kexec.c: In function 'crash_save_vmcoreinfo_init': kernel/kexec.c:1374: error: 'vmlist' undeclared (first use in this function) kernel/kexec.c:1374: error: (Each undeclared identifier is reported only once kernel/kexec.c:1374: error: for each function it appears in.) kernel/kexec.c:1410: error: invalid use of undefined type 'struct vm_struct' make[1]: *** [kernel/kexec.o] Error 1 Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6Linus Torvalds2008-10-20138-318/+457
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6: parisc: convert to generic compat_sys_ptrace parisc: add rtc platform driver parisc: initialize unwinder much earlier parisc: add new syscalls parisc: hijack jump to start_kernel parisc: add pdc_coproc_cfg_unlocked and set_firmware_width_unlocked parisc: move include/asm-parisc to arch/parisc/include/asm parisc: move pdc_result to real2.S parisc: unify CCIO_COLLECT_STATS implementation parisc: add arch/parisc/kernel/.gitignore parisc: ropes.h - fix <asm-parisc/*> -> <asm/*> parisc: parisc-agp - fix <asm-parisc/*> -> <asm/*> Resolve remove/rename conflict: include/asm-parisc/a.out.h is no longer relevant.
| * parisc: convert to generic compat_sys_ptraceHelge Deller2008-10-173-258/+183
| | | | | | | | | | | | | | | | | | This patch does the compat_sys_ptrace conversion for parisc. In addition it does convert the parisc ptrace code to use the architecture-independent ptrace infrastructure instead of own coding. Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
| * parisc: add rtc platform driverKyle McMartin2008-10-105-1/+141
| | | | | | | | Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
| * parisc: initialize unwinder much earlierJames Bottomley2008-10-103-3/+5
| | | | | | | | | | | | | | | | | | | | The unwinder was being initialized way too late to be any use debugging early boot crashes. Instead of relying on module_init initcalls to initialize it, let's do it explicitly as early as we can. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
| * parisc: add new syscallsKyle McMartin2008-10-102-2/+14
| | | | | | | | Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
| * parisc: hijack jump to start_kernelKyle McMartin2008-10-102-2/+27
| | | | | | | | | | | | | | | | | | | | | | | | Bang in our own start_parisc call, which initializes the PDC width, and turns on the FPU. Previously, if CONFIG_PRINTK_TIME was on, we'd attempt to use the FPU before we had enabled it, resulting in a difficult to diagnose panic. This patch causes init_per_cpu to redundantly set these for cpu0, but this is harmless.
| * parisc: add pdc_coproc_cfg_unlocked and set_firmware_width_unlockedKyle McMartin2008-10-102-21/+46
| | | | | | | | | | | | | | These functions are called only when bringing up the monarch cpu, so it is safe to call them without taking the pdc spinlock. In the future, this may become relevant for lockdep, since these functions were taking spinlocks before start_kernel called the lockdep initializers.
| * parisc: move include/asm-parisc to arch/parisc/include/asmKyle McMartin2008-10-10123-0/+0
| |
| * parisc: move pdc_result to real2.SKyle McMartin2008-10-104-2/+20
| |
| * parisc: unify CCIO_COLLECT_STATS implementationKyle McMartin2008-10-101-26/+17
| | | | | | | | | | Make it behave in the same manner as SBA_COLLECT_STATS, further clean ups pending.
| * parisc: add arch/parisc/kernel/.gitignoreKyle McMartin2008-10-101-0/+1
| |
| * parisc: ropes.h - fix <asm-parisc/*> -> <asm/*>Kyle McMartin2008-10-101-1/+1
| |
| * parisc: parisc-agp - fix <asm-parisc/*> -> <asm/*>Kyle McMartin2008-10-101-2/+2
| |
* | USB: Fix unused label warnings in drivers/usb/host/ehci-hcd.cLinus Torvalds2008-10-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This gets rid of an annoying warning in ehci-hcd.c when DEBUG isn't enabled: warning: label 'err_debug' defined but not used by moving it inside the already-existing #ifdef DEBUG, so that it matches the goto. And now my regular build is warning-free again. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | i915: cleanup coding horrors in i915_gem_gtt_pwrite()Linus Torvalds2008-10-201-23/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Yes, this will probably be switched over to a cleaner model anyway, but in the meantime I don't want to see the 'unused variable' warnings that come from the disgusting #ifdef code. Make the special case be a nice inlien function of its own, clean up the code, and make the warning go away. I wish people didn't write code that gets (valid) warnings from the compiler, but I'll limit my fixes to code that I actually care about (in this case just because I see the warning and it annoys me). Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | Fix sprintf format warnings in drm_proc.cLinus Torvalds2008-10-201-2/+2
| | | | | | | | | | | | | | | | | | Use "%zd" for size_t, and make sure to have a space between the numbers instead of depending on the field width. I don't like warnings in my default targeted build. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | Merge branch 'bkl-removal' of git://git.lwn.net/linux-2.6Linus Torvalds2008-10-201-6/+8
|\ \ | | | | | | | | | | | | * 'bkl-removal' of git://git.lwn.net/linux-2.6: UIO: BKL removal
| * | UIO: BKL removalJonathan Corbet2008-10-161-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fill in needed locking around idr accesses, then remove the big kernel lock from the UIO driver. Since there are no in-tree UIO drivers with open() methods, no further BKL pushdown is required. Acked-by: Hans J. Koch <hjk@linutronix.de> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
* | | Merge branch 'linux-next' of ↵Linus Torvalds2008-10-2047-679/+1024
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 * 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (41 commits) PCI: fix pci_ioremap_bar() on s390 PCI: fix AER capability check PCI: use pci_find_ext_capability everywhere PCI: remove #ifdef DEBUG around dev_dbg call PCI hotplug: fix get_##name return value problem PCI: document the pcie_aspm kernel parameter PCI: introduce an pci_ioremap(pdev, barnr) function powerpc/PCI: Add legacy PCI access via sysfs PCI: Add ability to mmap legacy_io on some platforms PCI: probing debug message uniformization PCI: support PCIe ARI capability PCI: centralize the capabilities code in probe.c PCI: centralize the capabilities code in pci-sysfs.c PCI: fix 64-vbit prefetchable memory resource BARs PCI: replace cfg space size (256/4096) by macros. PCI: use resource_size() everywhere. PCI: use same arg names in PCI_VDEVICE comment PCI hotplug: rpaphp: make debug var unique PCI: use %pF instead of print_fn_descriptor_symbol() in quirks.c PCI: fix hotplug get_##name return value problem ...
| * | | PCI: fix pci_ioremap_bar() on s390Heiko Carstens2008-10-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | s390 doesn't have ioremap_*, so protect the definition of the new pci_ioremap_bar function with CONFIG_HAS_IOMEM to avoid build breakage. Acked-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
| * | | PCI: fix AER capability checkYu Zhao2008-10-204-12/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'use pci_find_ext_capability everywhere' cleanup brought a new bug, which makes the AER stop working. Fix it by actually using find_ext_cap instead of just find_cap. Drop the unused config space size define while we're at it. Signed-off-by: Yu Zhao <yu.zhao@intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
| * | | PCI: use pci_find_ext_capability everywhereJesse Barnes2008-10-205-65/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove some open coded (and buggy) versions of pci_find_ext_capability in favor of the real routine in the PCI core. Tested-by: Tomasz Czernecki <czernecki@gmail.com> Acked-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Reviewed-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
| * | | PCI: remove #ifdef DEBUG around dev_dbg callJesse Barnes2008-10-201-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | No longer needed since we don't use the function symbol stuff anymore. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
| * | | PCI hotplug: fix get_##name return value problemKenji Kaneshige2008-10-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit 356a9d6f3dd283f83861adf1ac909879f0e66411 (PCI: fix hotplug get_##name return value problem) doesn't seem to be merged properly. Because of this, PCI hotplug no longer works (Read/Write PCI hotplug files always returns -ENODEV). This patch fixes wrong check of try_module_get() return value check in get_##name(). Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
| * | | PCI: document the pcie_aspm kernel parameterChuck Ebbert2008-10-201-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It can be handy so make sure people know about it. Signed-off-by: Chuck Ebbert <cebbert@redhat.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
| * | | PCI: introduce an pci_ioremap(pdev, barnr) functionArjan van de Ven2008-10-201-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A common thing in many PCI drivers is to ioremap() an entire bar. This is a slightly fragile thing right now, needing both an address and a size, and many driver writers do.. various things there. This patch introduces an pci_ioremap() function taking just a PCI device struct and the bar number as arguments, and figures this all out itself, in one place. In addition, we can add various sanity checks to this function (the patch already checks to make sure that the bar in question really is a MEM bar; few to no drivers do that sort of thing). Hopefully with this type of API we get less chance of mistakes in drivers with ioremap() operations. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
| * | | powerpc/PCI: Add legacy PCI access via sysfsBenjamin Herrenschmidt2008-10-203-1/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for legacy_io and legacy_mem files in bus class directories in sysfs for powerpc Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
| * | | PCI: Add ability to mmap legacy_io on some platformsBenjamin Herrenschmidt2008-10-205-82/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the ability to mmap legacy IO space to the legacy_io files in sysfs on platforms that support it. This will allow to clean up X to use this instead of /dev/mem for legacy IO accesses such as those performed by Int10. While at it I moved pci_create/remove_legacy_files() to pci-sysfs.c where I think they belong, thus making more things statis in there and cleaned up some spurrious prototypes in the ia64 pci.h file Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
| * | | PCI: probing debug message uniformizationVincent Legoll2008-10-202-16/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch uniformizes PCI probing debug boot messages with dev_printk() intead of manual printk() It changes adress range output from [%llx, %llx] to [%#llx-%#llx], like in pci_request_region(). For example, it goes from the mixed-style: PCI: 0000:00:1b.0 reg 10 64bit mmio: [f4280000, f4283fff] pci 0000:00:1b.0: PME# supported from D0 D3hot D3cold to uniform: pci 0000:00:1b.0: reg 10 64bit mmio: [0xf4280000-0xf4283fff] pci 0000:00:1b.0: PME# supported from D0 D3hot D3cold This patch has been runtime tested, boot log messages diffed, everything looks OK. Acked-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Vincent Legoll <vincent.legoll@gmail.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
| * | | PCI: support PCIe ARI capabilityYu Zhao2008-10-205-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for PCI Express Alternative Routing-ID Interpretation (ARI) capability. The ARI capability extends the Function Number field of the PCI Express Endpoint by reusing the Device Number which is otherwise hardwired to 0. With ARI, an Endpoint can have up to 256 functions. Signed-off-by: Yu Zhao <yu.zhao@intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
| * | | PCI: centralize the capabilities code in probe.cZhao, Yu2008-10-201-7/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch centralizes the initialization and release functions of various PCI capabilities in probe.c, which makes the introduction of new capability support functions cleaner in the future. Signed-off-by: Yu Zhao <yu.zhao@intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
| * | | PCI: centralize the capabilities code in pci-sysfs.cZhao, Yu2008-10-201-55/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch centralizes functions used to add and remove sysfs entries for various capabilities. With this cleanup, the code is more readable and easier for adding new capability related functions. Signed-off-by: Yu Zhao <yu.zhao@intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
| * | | PCI: fix 64-vbit prefetchable memory resource BARsPeter Chubb2008-10-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since patch 6ac665c63dcac8fcec534a1d224ecbb8b867ad59 my infiniband controller hasn't worked. This is because it has 64-bit prefetchable memory, which was mistakenly being taken to be 32-bit memory. The resource flags in this case are PCI_BASE_ADDRESS_MEM_TYPE_64 | PCI_BASE_ADDRESS_MEM_PREFETCH. This patch checks only for the PCI_BASE_ADDRESS_MEM_TYPE_64 bit; thus whether the region is prefetchable or not is ignored. This fixes my Infiniband. Reviewed-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: Peter Chubb <peterc@gelato.unsw.edu.au> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
| * | | PCI: replace cfg space size (256/4096) by macros.Zhao, Yu2008-10-204-12/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a cleanup that changes all PCI configuration space size representations to the macros (PCI_CFG_SPACE_SIZE and PCI_CFG_SPACE_EXP_SIZE). And the macros are also moved from drivers/pci/probe.c to drivers/pci/pci.h. Signed-off-by: Yu Zhao <yu.zhao@intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
| * | | PCI: use resource_size() everywhere.Zhao, Yu2008-10-202-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a cleanup that replaces the resource calculation formula with resource_size(). Signed-off-by: Yu Zhao <yu.zhao@intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
| * | | PCI: use same arg names in PCI_VDEVICE commentZhao, Yu2008-10-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This cleanup makes the argument names in PCI_VDEVICE comment consistent with those used in its definition. Signed-off-by: Yu Zhao <yu.zhao@intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
| * | | PCI hotplug: rpaphp: make debug var uniqueKristen Carlson Accardi2008-10-203-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change debug variable name to one more unique to this driver. Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
| * | | PCI: use %pF instead of print_fn_descriptor_symbol() in quirks.cYinghai Lu2008-10-201-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use %pF instead of print_fn_descriptor_symbol() in quirks.c to get the name of the hook we're calling. Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
OpenPOWER on IntegriCloud