···58M: Mail patches to59L: Mailing list that is relevant to this area60W: Web-page with status/info61-T: SCM tree type and URL. Type is one of: git, hg, quilt.62S: Status, one of the following:6364 Supported: Someone is actually paid to look after this.···227P: Dave Jones228M: davej@codemonkey.org.uk229W: http://www.codemonkey.org.uk/projects/agp/0230S: Maintained231232AHA152X SCSI DRIVER···385M: dwmw2@infradead.org386L: linux-audit@redhat.com387W: http://people.redhat.com/sgrubb/audit/0388S: Maintained389390AX.25 NETWORK LAYER···434W: http://bluez.sf.net435W: http://www.bluez.org436W: http://www.holtmann.org/linux/bluetooth/0437S: Maintained438439BLUETOOTH RFCOMM LAYER···550M: sfrench@samba.org551L: samba-technical@lists.samba.org552W: http://us1.samba.org/samba/Linux_CIFS_client.html0553S: Supported 554555CIRRUS LOGIC GENERIC FBDEV DRIVER···612M: davej@codemonkey.org.uk613L: cpufreq@lists.linux.org.uk614W: http://www.codemonkey.org.uk/projects/cpufreq/0615S: Maintained616617CPUID/MSR DRIVER···646P: David S. Miller647M: davem@davemloft.net648L: linux-crypto@vger.kernel.org0649S: Maintained650651CYBERPRO FB DRIVER···1191M: B.Zolnierkiewicz@elka.pw.edu.pl1192L: linux-kernel@vger.kernel.org1193L: linux-ide@vger.kernel.org01194S: Maintained11951196IDE/ATAPI CDROM DRIVER···1286M: vojtech@suse.cz1287L: linux-input@atrey.karlin.mff.cuni.cz1288L: linux-joystick@atrey.karlin.mff.cuni.cz01289S: Maintained12901291INOTIFY···1400M: kai.germaschewski@gmx.de1401L: isdn4linux@listserv.isdn4linux.de1402W: http://www.isdn4linux.de01403S: Maintained14041405ISDN SUBSYSTEM (Eicon active card driver)···1429M: shaggy@austin.ibm.com1430L: jfs-discussion@lists.sourceforge.net1431W: http://jfs.sourceforge.net/01432S: Supported14331434KCONFIG···1544M: paulus@samba.org1545W: http://www.penguinppc.org/1546L: linuxppc-dev@ozlabs.org01547S: Supported15481549LINUX FOR POWER MACINTOSH···1612M: chrisw@osdl.org1613L: linux-security-module@wirex.com1614W: http://lsm.immunix.org01615S: Supported16161617LM83 HARDWARE MONITOR DRIVER···1707M: dwmw2@infradead.org1708W: http://www.linux-mtd.infradead.org/1709L: linux-mtd@lists.infradead.org01710S: Maintained17111712MICROTEK X6 SCANNER···1828P: Patrick McHardy1829M: kaber@coreworks.de1830L: netdev@vger.kernel.org01831S: Maintained18321833IPVS···1880L: linux-ntfs-dev@lists.sourceforge.net1881L: linux-kernel@vger.kernel.org1882W: http://linux-ntfs.sf.net/01883S: Maintained18841885NVIDIA (RIVA) FRAMEBUFFER DRIVER···2404M: anton@samba.org2405L: sparclinux@vger.kernel.org2406L: ultralinux@vger.kernel.org02407S: Maintained24082409SHARP LH SUPPORT (LH7952X & LH7A40X)···2543M: trivial@kernel.org2544L: linux-kernel@vger.kernel.org2545W: http://www.kernel.org/pub/linux/kernel/people/bunk/trivial/02546S: Maintained25472548TMS380 TOKEN-RING NETWORK DRIVER···2877M: lucho@ionkov.net2878L: v9fs-developer@lists.sourceforge.net2879W: http://v9fs.sf.net02880S: Maintained28812882VIDEO FOR LINUX
···58M: Mail patches to59L: Mailing list that is relevant to this area60W: Web-page with status/info61+T: SCM tree type and location. Type is one of: git, hg, quilt.62S: Status, one of the following:6364 Supported: Someone is actually paid to look after this.···227P: Dave Jones228M: davej@codemonkey.org.uk229W: http://www.codemonkey.org.uk/projects/agp/230+T: git kernel.org:/pub/scm/linux/kernel/git/davej/agpgart.git231S: Maintained232233AHA152X SCSI DRIVER···384M: dwmw2@infradead.org385L: linux-audit@redhat.com386W: http://people.redhat.com/sgrubb/audit/387+T: git kernel.org:/pub/scm/linux/kernel/git/dwmw2/audit-2.6.git388S: Maintained389390AX.25 NETWORK LAYER···432W: http://bluez.sf.net433W: http://www.bluez.org434W: http://www.holtmann.org/linux/bluetooth/435+T: git kernel.org:/pub/scm/linux/kernel/git/holtmann/bluetooth-2.6.git436S: Maintained437438BLUETOOTH RFCOMM LAYER···547M: sfrench@samba.org548L: samba-technical@lists.samba.org549W: http://us1.samba.org/samba/Linux_CIFS_client.html550+T: git kernel.org:/pub/scm/linux/kernel/git/sfrench/cifs-2.6.git551S: Supported 552553CIRRUS LOGIC GENERIC FBDEV DRIVER···608M: davej@codemonkey.org.uk609L: cpufreq@lists.linux.org.uk610W: http://www.codemonkey.org.uk/projects/cpufreq/611+T: git kernel.org/pub/scm/linux/kernel/davej/cpufreq.git612S: Maintained613614CPUID/MSR DRIVER···641P: David S. Miller642M: davem@davemloft.net643L: linux-crypto@vger.kernel.org644+T: git kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6.git645S: Maintained646647CYBERPRO FB DRIVER···1185M: B.Zolnierkiewicz@elka.pw.edu.pl1186L: linux-kernel@vger.kernel.org1187L: linux-ide@vger.kernel.org1188+T: git kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6.git1189S: Maintained11901191IDE/ATAPI CDROM DRIVER···1279M: vojtech@suse.cz1280L: linux-input@atrey.karlin.mff.cuni.cz1281L: linux-joystick@atrey.karlin.mff.cuni.cz1282+T: git kernel.org:/pub/scm/linux/kernel/git/dtor/input.git1283S: Maintained12841285INOTIFY···1392M: kai.germaschewski@gmx.de1393L: isdn4linux@listserv.isdn4linux.de1394W: http://www.isdn4linux.de1395+T: git kernel.org:/pub/scm/linux/kernel/kkeil/isdn-2.6.git1396S: Maintained13971398ISDN SUBSYSTEM (Eicon active card driver)···1420M: shaggy@austin.ibm.com1421L: jfs-discussion@lists.sourceforge.net1422W: http://jfs.sourceforge.net/1423+T: git kernel.org:/pub/scm/linux/kernel/git/shaggy/jfs-2.6.git1424S: Supported14251426KCONFIG···1534M: paulus@samba.org1535W: http://www.penguinppc.org/1536L: linuxppc-dev@ozlabs.org1537+T: git kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc.git1538S: Supported15391540LINUX FOR POWER MACINTOSH···1601M: chrisw@osdl.org1602L: linux-security-module@wirex.com1603W: http://lsm.immunix.org1604+T: git kernel.org:/pub/scm/linux/kernel/git/chrisw/lsm-2.6.git1605S: Supported16061607LM83 HARDWARE MONITOR DRIVER···1695M: dwmw2@infradead.org1696W: http://www.linux-mtd.infradead.org/1697L: linux-mtd@lists.infradead.org1698+T: git kernel.org:/pub/scm/linux/kernel/git/tglx/mtd-2.6.git1699S: Maintained17001701MICROTEK X6 SCANNER···1815P: Patrick McHardy1816M: kaber@coreworks.de1817L: netdev@vger.kernel.org1818+T: git kernel.org:/pub/scm/linux/kernel/davem/net-2.6.git1819S: Maintained18201821IPVS···1866L: linux-ntfs-dev@lists.sourceforge.net1867L: linux-kernel@vger.kernel.org1868W: http://linux-ntfs.sf.net/1869+T: git kernel.org:/pub/scm/linux/kernel/git/aia21/ntfs-2.6.git1870S: Maintained18711872NVIDIA (RIVA) FRAMEBUFFER DRIVER···2389M: anton@samba.org2390L: sparclinux@vger.kernel.org2391L: ultralinux@vger.kernel.org2392+T: git kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6.git2393S: Maintained23942395SHARP LH SUPPORT (LH7952X & LH7A40X)···2527M: trivial@kernel.org2528L: linux-kernel@vger.kernel.org2529W: http://www.kernel.org/pub/linux/kernel/people/bunk/trivial/2530+T: git kernel.org:/pub/scm/linux/kernel/git/bunk/trivial.git2531S: Maintained25322533TMS380 TOKEN-RING NETWORK DRIVER···2860M: lucho@ionkov.net2861L: v9fs-developer@lists.sourceforge.net2862W: http://v9fs.sf.net2863+T: git kernel.org:/pub/scm/linux/kernel/ericvh/v9fs-devel.git2864S: Maintained28652866VIDEO FOR LINUX
-7
arch/i386/kernel/process.c
···393{394 struct task_struct *tsk = current;395396- /*397- * Remove function-return probe instances associated with this task398- * and put them back on the free list. Do not insert an exit probe for399- * this function, it will be disabled by kprobe_flush_task if you do.400- */401- kprobe_flush_task(tsk);402-403 memset(tsk->thread.debugreg, 0, sizeof(unsigned long)*8);404 memset(tsk->thread.tls_array, 0, sizeof(tsk->thread.tls_array)); 405 /*
···221 continue;222223 r = &dev->resource[idx];00000224 if (!r->start && r->end) {225 printk(KERN_ERR "PCI: Device %s not available because of resource collisions\n", pci_name(dev));226 return -EINVAL;···235 if (r->flags & IORESOURCE_MEM)236 cmd |= PCI_COMMAND_MEMORY;237 }238- if (dev->resource[PCI_ROM_RESOURCE].start)239- cmd |= PCI_COMMAND_MEMORY;240 if (cmd != old_cmd) {241 printk("PCI: Enabling device %s (%04x -> %04x)\n", pci_name(dev), old_cmd, cmd);242 pci_write_config_word(dev, PCI_COMMAND, cmd);
···221 continue;222223 r = &dev->resource[idx];224+ if (!(r->flags & (IORESOURCE_IO | IORESOURCE_MEM)))225+ continue;226+ if ((idx == PCI_ROM_RESOURCE) &&227+ (!(r->flags & IORESOURCE_ROM_ENABLE)))228+ continue;229 if (!r->start && r->end) {230 printk(KERN_ERR "PCI: Device %s not available because of resource collisions\n", pci_name(dev));231 return -EINVAL;···230 if (r->flags & IORESOURCE_MEM)231 cmd |= PCI_COMMAND_MEMORY;232 }00233 if (cmd != old_cmd) {234 printk("PCI: Enabling device %s (%04x -> %04x)\n", pci_name(dev), old_cmd, cmd);235 pci_write_config_word(dev, PCI_COMMAND, cmd);
-7
arch/ia64/kernel/process.c
···718void719flush_thread (void)720{721- /*722- * Remove function-return probe instances associated with this task723- * and put them back on the free list. Do not insert an exit probe for724- * this function, it will be disabled by kprobe_flush_task if you do.725- */726- kprobe_flush_task(current);727-728 /* drop floating-point and debug-register state if it exists: */729 current->thread.flags &= ~(IA64_THREAD_FPH_VALID | IA64_THREAD_DBG_VALID);730 ia64_drop_fpu(current);
···718void719flush_thread (void)720{0000000721 /* drop floating-point and debug-register state if it exists: */722 current->thread.flags &= ~(IA64_THREAD_FPH_VALID | IA64_THREAD_DBG_VALID);723 ia64_drop_fpu(current);
-1
arch/powerpc/kernel/process.c
···457 if (t->flags & _TIF_ABI_PENDING)458 t->flags ^= (_TIF_ABI_PENDING | _TIF_32BIT);459#endif460- kprobe_flush_task(current);461462#ifndef CONFIG_SMP463 if (last_task_used_math == current)
···457 if (t->flags & _TIF_ABI_PENDING)458 t->flags ^= (_TIF_ABI_PENDING | _TIF_32BIT);459#endif0460461#ifndef CONFIG_SMP462 if (last_task_used_math == current)
-4
arch/powerpc/mm/4xx_mmu.c
···110 pmd_t *pmdp;111 unsigned long val = p | _PMD_SIZE_16M | _PAGE_HWEXEC | _PAGE_HWWRITE;112113- spin_lock(&init_mm.page_table_lock);114 pmdp = pmd_offset(pgd_offset_k(v), v);115 pmd_val(*pmdp++) = val;116 pmd_val(*pmdp++) = val;117 pmd_val(*pmdp++) = val;118 pmd_val(*pmdp++) = val;119- spin_unlock(&init_mm.page_table_lock);120121 v += LARGE_PAGE_SIZE_16M;122 p += LARGE_PAGE_SIZE_16M;···125 pmd_t *pmdp;126 unsigned long val = p | _PMD_SIZE_4M | _PAGE_HWEXEC | _PAGE_HWWRITE;127128- spin_lock(&init_mm.page_table_lock);129 pmdp = pmd_offset(pgd_offset_k(v), v);130 pmd_val(*pmdp) = val;131- spin_unlock(&init_mm.page_table_lock);132133 v += LARGE_PAGE_SIZE_4M;134 p += LARGE_PAGE_SIZE_4M;
···110 pmd_t *pmdp;111 unsigned long val = p | _PMD_SIZE_16M | _PAGE_HWEXEC | _PAGE_HWWRITE;1120113 pmdp = pmd_offset(pgd_offset_k(v), v);114 pmd_val(*pmdp++) = val;115 pmd_val(*pmdp++) = val;116 pmd_val(*pmdp++) = val;117 pmd_val(*pmdp++) = val;0118119 v += LARGE_PAGE_SIZE_16M;120 p += LARGE_PAGE_SIZE_16M;···127 pmd_t *pmdp;128 unsigned long val = p | _PMD_SIZE_4M | _PAGE_HWEXEC | _PAGE_HWWRITE;1290130 pmdp = pmd_offset(pgd_offset_k(v), v);131 pmd_val(*pmdp) = val;0132133 v += LARGE_PAGE_SIZE_4M;134 p += LARGE_PAGE_SIZE_4M;
+4-6
arch/powerpc/mm/hugetlbpage.c
···287288int prepare_hugepage_range(unsigned long addr, unsigned long len)289{290- int err;291292 if ( (addr+len) < addr )293 return -EINVAL;294295- if ((addr + len) < 0x100000000UL)296 err = open_low_hpage_areas(current->mm,297 LOW_ESID_MASK(addr, len));298- else299 err = open_high_hpage_areas(current->mm,300 HTLB_AREA_MASK(addr, len));301 if (err) {···754 }755756 /*757- * No need to use ldarx/stdcx here because all who758- * might be updating the pte will hold the759- * page_table_lock760 */761 *ptep = __pte(new_pte & ~_PAGE_BUSY);762
···287288int prepare_hugepage_range(unsigned long addr, unsigned long len)289{290+ int err = 0;291292 if ( (addr+len) < addr )293 return -EINVAL;294295+ if (addr < 0x100000000UL)296 err = open_low_hpage_areas(current->mm,297 LOW_ESID_MASK(addr, len));298+ if ((addr + len) >= 0x100000000UL)299 err = open_high_hpage_areas(current->mm,300 HTLB_AREA_MASK(addr, len));301 if (err) {···754 }755756 /*757+ * No need to use ldarx/stdcx here00758 */759 *ptep = __pte(new_pte & ~_PAGE_BUSY);760
+1-1
arch/powerpc/mm/mem.c
···495 * We use it to preload an HPTE into the hash table corresponding to496 * the updated linux PTE.497 * 498- * This must always be called with the mm->page_table_lock held499 */500void update_mmu_cache(struct vm_area_struct *vma, unsigned long address,501 pte_t pte)
···495 * We use it to preload an HPTE into the hash table corresponding to496 * the updated linux PTE.497 * 498+ * This must always be called with the pte lock held.499 */500void update_mmu_cache(struct vm_area_struct *vma, unsigned long address,501 pte_t pte)
···149 return;150 }151152+ /*153+ * It is safe to go down the mm's list of vmas when called154+ * from dup_mmap, holding mmap_sem. It would also be safe from155+ * unmap_region or exit_mmap, but not from vmtruncate on SMP -156+ * but it seems dup_mmap is the only SMP case which gets here.157+ */158 for (mp = mm->mmap; mp != NULL; mp = mp->vm_next)159 flush_range(mp->vm_mm, mp->vm_start, mp->vm_end);160 FINISH_FLUSH;
+2-2
arch/powerpc/mm/tlb_64.c
···9596void pgtable_free_tlb(struct mmu_gather *tlb, pgtable_free_t pgf)97{98- /* This is safe as we are holding page_table_lock */99 cpumask_t local_cpumask = cpumask_of_cpu(smp_processor_id());100 struct pte_freelist_batch **batchp = &__get_cpu_var(pte_freelist_cur);101···206207void pte_free_finish(void)208{209- /* This is safe as we are holding page_table_lock */210 struct pte_freelist_batch **batchp = &__get_cpu_var(pte_freelist_cur);211212 if (*batchp == NULL)
···9596void pgtable_free_tlb(struct mmu_gather *tlb, pgtable_free_t pgf)97{98+ /* This is safe since tlb_gather_mmu has disabled preemption */99 cpumask_t local_cpumask = cpumask_of_cpu(smp_processor_id());100 struct pte_freelist_batch **batchp = &__get_cpu_var(pte_freelist_cur);101···206207void pte_free_finish(void)208{209+ /* This is safe since tlb_gather_mmu has disabled preemption */210 struct pte_freelist_batch **batchp = &__get_cpu_var(pte_freelist_cur);211212 if (*batchp == NULL)
-7
arch/x86_64/kernel/process.c
···351 struct task_struct *tsk = current;352 struct thread_info *t = current_thread_info();353354- /*355- * Remove function-return probe instances associated with this task356- * and put them back on the free list. Do not insert an exit probe for357- * this function, it will be disabled by kprobe_flush_task if you do.358- */359- kprobe_flush_task(tsk);360-361 if (t->flags & _TIF_ABI_PENDING)362 t->flags ^= (_TIF_ABI_PENDING | _TIF_IA32);363
···133decl_subsys(bus, &ktype_bus, NULL);134135136-/* Manually detach a device from it's associated driver. */137static int driver_helper(struct device *dev, void *data)138{139 const char *name = data;···151 int err = -ENODEV;152153 dev = bus_find_device(bus, NULL, (void *)buf, driver_helper);154- if ((dev) &&155- (dev->driver == drv)) {156 device_release_driver(dev);157 err = count;158 }159- if (err)160- return err;161- return count;162}163static DRIVER_ATTR(unbind, S_IWUSR, NULL, driver_unbind);164···174 int err = -ENODEV;175176 dev = bus_find_device(bus, NULL, (void *)buf, driver_helper);177- if ((dev) &&178- (dev->driver == NULL)) {179 down(&dev->sem);180 err = driver_probe_device(drv, dev);181 up(&dev->sem);182- put_device(dev);183 }184- if (err)185- return err;186- return count;187}188static DRIVER_ATTR(bind, S_IWUSR, NULL, driver_bind);189
···133decl_subsys(bus, &ktype_bus, NULL);134135136+/* Manually detach a device from its associated driver. */137static int driver_helper(struct device *dev, void *data)138{139 const char *name = data;···151 int err = -ENODEV;152153 dev = bus_find_device(bus, NULL, (void *)buf, driver_helper);154+ if (dev && dev->driver == drv) {0155 device_release_driver(dev);156 err = count;157 }158+ put_device(dev);159+ put_bus(bus);160+ return err;161}162static DRIVER_ATTR(unbind, S_IWUSR, NULL, driver_unbind);163···175 int err = -ENODEV;176177 dev = bus_find_device(bus, NULL, (void *)buf, driver_helper);178+ if (dev && dev->driver == NULL) {0179 down(&dev->sem);180 err = driver_probe_device(drv, dev);181 up(&dev->sem);0182 }183+ put_device(dev);184+ put_bus(bus);185+ return err;186}187static DRIVER_ATTR(bind, S_IWUSR, NULL, driver_bind);188
+3-5
drivers/base/dd.c
···62 * because we don't know the format of the ID structures, nor what63 * is to be considered a match and what is not.64 *65- *66 * This function returns 1 if a match is found, an error if one67 * occurs (that is not -ENODEV or -ENXIO), and 0 otherwise.68 *···157 driver_probe_device(drv, dev);158 up(&dev->sem);159160-161 return 0;162}163···223 struct device * dev;224225 for (;;) {226- spin_lock_irq(&drv->klist_devices.k_lock);227 if (list_empty(&drv->klist_devices.k_list)) {228- spin_unlock_irq(&drv->klist_devices.k_lock);229 break;230 }231 dev = list_entry(drv->klist_devices.k_list.prev,232 struct device, knode_driver.n_node);233 get_device(dev);234- spin_unlock_irq(&drv->klist_devices.k_lock);235236 down(&dev->sem);237 if (dev->driver == drv)
···62 * because we don't know the format of the ID structures, nor what63 * is to be considered a match and what is not.64 *065 * This function returns 1 if a match is found, an error if one66 * occurs (that is not -ENODEV or -ENXIO), and 0 otherwise.67 *···158 driver_probe_device(drv, dev);159 up(&dev->sem);1600161 return 0;162}163···225 struct device * dev;226227 for (;;) {228+ spin_lock(&drv->klist_devices.k_lock);229 if (list_empty(&drv->klist_devices.k_list)) {230+ spin_unlock(&drv->klist_devices.k_lock);231 break;232 }233 dev = list_entry(drv->klist_devices.k_list.prev,234 struct device, knode_driver.n_node);235 get_device(dev);236+ spin_unlock(&drv->klist_devices.k_lock);237238 down(&dev->sem);239 if (dev->driver == drv)
-6
drivers/block/floppy.c
···3714 USETF(FD_VERIFY);3715 }37163717- /* set underlying gendisk policy to reflect real ro/rw status */3718- if (UTESTF(FD_DISK_WRITABLE))3719- inode->i_bdev->bd_disk->policy = 0;3720- else3721- inode->i_bdev->bd_disk->policy = 1;3722-3723 if (UDRS->fd_ref == -1 || (UDRS->fd_ref && (filp->f_flags & O_EXCL)))3724 goto out2;3725
···214215 int microcode_version;216217- int is_pci;218-219 struct {220 u32 boxes;221 int freelist_timeouts;···273274 /* starting from here on, data is preserved accross an open */275 uint32_t flags; /* see radeon_chip_flags */0276} drm_radeon_private_t;277278typedef struct drm_radeon_buf_priv {
···214215 int microcode_version;21600217 struct {218 u32 boxes;219 int freelist_timeouts;···275276 /* starting from here on, data is preserved accross an open */277 uint32_t flags; /* see radeon_chip_flags */278+ int is_pci;279} drm_radeon_private_t;280281typedef struct drm_radeon_buf_priv {
···750{751 struct php_ctlr_state_s *php_ctlr = slot->ctrl->hpc_ctlr_handle;752 u16 slot_cmd;753+ u16 slot_ctrl, slot_status;754755 int retval = 0;756···766 err("%s: Invalid HPC slot number!\n", __FUNCTION__);767 return -1;768 }769+770+ /* Clear sticky power-fault bit from previous power failures */771+ hp_register_read_word(php_ctlr->pci_dev,772+ SLOT_STATUS(slot->ctrl->cap_base), slot_status);773+ slot_status &= PWR_FAULT_DETECTED;774+ if (slot_status)775+ hp_register_write_word(php_ctlr->pci_dev,776+ SLOT_STATUS(slot->ctrl->cap_base), slot_status);777778 retval = hp_register_read_word(php_ctlr->pci_dev, SLOT_CTRL(slot->ctrl->cap_base), slot_ctrl);779
+1
drivers/pci/pci-acpi.c
···178179/**180 * pci_osc_control_set - commit requested control to Firmware0181 * @flags: driver's requested control bits182 *183 * Attempt to take control from Firmware on requested control bits.
···178179/**180 * pci_osc_control_set - commit requested control to Firmware181+ * @handle: acpi_handle for the target ACPI object182 * @flags: driver's requested control bits183 *184 * Attempt to take control from Firmware on requested control bits.
+36-2
drivers/usb/core/hcd-pci.c
···20#include <linux/kernel.h>21#include <linux/module.h>22#include <linux/pci.h>0023#include <asm/io.h>24#include <asm/irq.h>25-#include <linux/usb.h>0000002627#include "usb.h"28#include "hcd.h"···285 }286287done:288- if (retval == 0)289 dev->dev.power.power_state = PMSG_SUSPEND;00000000000000290 return retval;291}292EXPORT_SYMBOL (usb_hcd_pci_suspend);···322 "can't resume, not suspended!\n");323 return 0;324 }000000000000325326 /* NOTE: chip docs cover clean "real suspend" cases (what Linux327 * calls "standby", "suspend to RAM", and so on). There are also
···20#include <linux/kernel.h>21#include <linux/module.h>22#include <linux/pci.h>23+#include <linux/usb.h>24+25#include <asm/io.h>26#include <asm/irq.h>27+28+#ifdef CONFIG_PPC_PMAC29+#include <asm/machdep.h>30+#include <asm/pmac_feature.h>31+#include <asm/pci-bridge.h>32+#include <asm/prom.h>33+#endif3435#include "usb.h"36#include "hcd.h"···277 }278279done:280+ if (retval == 0) {281 dev->dev.power.power_state = PMSG_SUSPEND;282+283+#ifdef CONFIG_PPC_PMAC284+ /* Disable ASIC clocks for USB */285+ if (_machine == _MACH_Pmac) {286+ struct device_node *of_node;287+288+ of_node = pci_device_to_OF_node (dev);289+ if (of_node)290+ pmac_call_feature(PMAC_FTR_USB_ENABLE,291+ of_node, 0, 0);292+ }293+#endif294+ }295+296 return retval;297}298EXPORT_SYMBOL (usb_hcd_pci_suspend);···300 "can't resume, not suspended!\n");301 return 0;302 }303+304+#ifdef CONFIG_PPC_PMAC305+ /* Reenable ASIC clocks for USB */306+ if (_machine == _MACH_Pmac) {307+ struct device_node *of_node;308+309+ of_node = pci_device_to_OF_node (dev);310+ if (of_node)311+ pmac_call_feature (PMAC_FTR_USB_ENABLE,312+ of_node, 0, 1);313+ }314+#endif315316 /* NOTE: chip docs cover clean "real suspend" cases (what Linux317 * calls "standby", "suspend to RAM", and so on). There are also
-1
drivers/usb/core/hub.c
···1669 return 0;1670#endif1671}1672-EXPORT_SYMBOL_GPL(usb_suspend_device);16731674/*1675 * If the USB "suspend" state is in use (rather than "global suspend"),
···1669 return 0;1670#endif1671}016721673/*1674 * If the USB "suspend" state is in use (rather than "global suspend"),
+83-75
drivers/usb/host/ehci-hcd.c
···411 dbg_status (ehci, "ehci_stop completed", readl (&ehci->regs->status));412}413414-static int ehci_run (struct usb_hcd *hcd)0415{416- struct ehci_hcd *ehci = hcd_to_ehci (hcd);417 u32 temp;418 int retval;419 u32 hcc_params;420- int first;421422- /* skip some things on restart paths */423- first = (ehci->watchdog.data == 0);424- if (first) {425- init_timer (&ehci->watchdog);426- ehci->watchdog.function = ehci_watchdog;427- ehci->watchdog.data = (unsigned long) ehci;428- }429430 /*431 * hw default: 1K periodic list heads, one per frame.432 * periodic_size can shrink by USBCMD update if hcc_params allows.433 */434 ehci->periodic_size = DEFAULT_I_TDPS;435- if (first && (retval = ehci_mem_init (ehci, GFP_KERNEL)) < 0)436 return retval;437438 /* controllers may cache some of the periodic schedule ... */439- hcc_params = readl (&ehci->caps->hcc_params);440- if (HCC_ISOC_CACHE (hcc_params)) // full frame cache441 ehci->i_thresh = 8;442 else // N microframes cached443- ehci->i_thresh = 2 + HCC_ISOC_THRES (hcc_params);444445 ehci->reclaim = NULL;446 ehci->reclaim_ready = 0;447 ehci->next_uframe = -1;448-449- /* controller state: unknown --> reset */450-451- /* EHCI spec section 4.1 */452- if ((retval = ehci_reset (ehci)) != 0) {453- ehci_mem_cleanup (ehci);454- return retval;455- }456- writel (ehci->periodic_dma, &ehci->regs->frame_list);457458 /*459 * dedicate a qh for the async ring head, since we couldn't unlink···451 * its dummy is used in hw_alt_next of many tds, to prevent the qh452 * from automatically advancing to the next td after short reads.453 */454- if (first) {455- ehci->async->qh_next.qh = NULL;456- ehci->async->hw_next = QH_NEXT (ehci->async->qh_dma);457- ehci->async->hw_info1 = cpu_to_le32 (QH_HEAD);458- ehci->async->hw_token = cpu_to_le32 (QTD_STS_HALT);459- ehci->async->hw_qtd_next = EHCI_LIST_END;460- ehci->async->qh_state = QH_STATE_LINKED;461- ehci->async->hw_alt_next = QTD_NEXT (ehci->async->dummy->qtd_dma);462- }463- writel ((u32)ehci->async->qh_dma, &ehci->regs->async_next);464-465- /*466- * hcc_params controls whether ehci->regs->segment must (!!!)467- * be used; it constrains QH/ITD/SITD and QTD locations.468- * pci_pool consistent memory always uses segment zero.469- * streaming mappings for I/O buffers, like pci_map_single(),470- * can return segments above 4GB, if the device allows.471- *472- * NOTE: the dma mask is visible through dma_supported(), so473- * drivers can pass this info along ... like NETIF_F_HIGHDMA,474- * Scsi_Host.highmem_io, and so forth. It's readonly to all475- * host side drivers though.476- */477- if (HCC_64BIT_ADDR (hcc_params)) {478- writel (0, &ehci->regs->segment);479-#if 0480-// this is deeply broken on almost all architectures481- if (!dma_set_mask (hcd->self.controller, DMA_64BIT_MASK))482- ehci_info (ehci, "enabled 64bit DMA\n");483-#endif484- }485486 /* clear interrupt enables, set irq latency */487 if (log2_irq_thresh < 0 || log2_irq_thresh > 6)···472 * make problems: throughput reduction (!), data errors...473 */474 if (park) {475- park = min (park, (unsigned) 3);476 temp |= CMD_PARK;477 temp |= park << 8;478 }479- ehci_info (ehci, "park %d\n", park);480 }481- if (HCC_PGM_FRAMELISTLEN (hcc_params)) {482 /* periodic schedule size can be smaller than default */483 temp &= ~(3 << 2);484 temp |= (EHCI_TUNE_FLS << 2);···486 case 0: ehci->periodic_size = 1024; break;487 case 1: ehci->periodic_size = 512; break;488 case 2: ehci->periodic_size = 256; break;489- default: BUG ();490 }491 }000000000000000000000000000000000000000000000000492 // Philips, Intel, and maybe others need CMD_RUN before the493 // root hub will detect new devices (why?); NEC doesn't494- temp |= CMD_RUN;495- writel (temp, &ehci->regs->command);496- dbg_cmd (ehci, "init", temp);497-498- /* set async sleep time = 10 us ... ? */499500 /*501 * Start, enabling full USB 2.0 functionality ... usb 1.1 devices···550 * involved with the root hub. (Except where one is integrated,551 * and there's no companion controller unless maybe for USB OTG.)552 */553- if (first) {554- ehci->reboot_notifier.notifier_call = ehci_reboot;555- register_reboot_notifier (&ehci->reboot_notifier);556- }557-558 hcd->state = HC_STATE_RUNNING;559 writel (FLAG_CF, &ehci->regs->configured_flag);560- readl (&ehci->regs->command); /* unblock posted write */561562 temp = HC_VERSION(readl (&ehci->caps->hc_capbase));563 ehci_info (ehci,564- "USB %x.%x %s, EHCI %x.%02x, driver %s\n",565 ((ehci->sbrn & 0xf0)>>4), (ehci->sbrn & 0x0f),566- first ? "initialized" : "restarted",567 temp >> 8, temp & 0xff, DRIVER_VERSION);568569 writel (INTR_MASK, &ehci->regs->intr_enable); /* Turn On Interrupts */570571- if (first)572- create_debug_files (ehci);000573574 return 0;575}···645 * stop that signaling.646 */647 ehci->reset_done [i] = jiffies + msecs_to_jiffies (20);648- mod_timer (&hcd->rh_timer,649- ehci->reset_done [i] + 1);650 ehci_dbg (ehci, "port %d remote wakeup\n", i + 1);0651 }652 }653
···411 dbg_status (ehci, "ehci_stop completed", readl (&ehci->regs->status));412}413414+/* one-time init, only for memory state */415+static int ehci_init(struct usb_hcd *hcd)416{417+ struct ehci_hcd *ehci = hcd_to_ehci(hcd);418 u32 temp;419 int retval;420 u32 hcc_params;0421422+ spin_lock_init(&ehci->lock);423+424+ init_timer(&ehci->watchdog);425+ ehci->watchdog.function = ehci_watchdog;426+ ehci->watchdog.data = (unsigned long) ehci;00427428 /*429 * hw default: 1K periodic list heads, one per frame.430 * periodic_size can shrink by USBCMD update if hcc_params allows.431 */432 ehci->periodic_size = DEFAULT_I_TDPS;433+ if ((retval = ehci_mem_init(ehci, GFP_KERNEL)) < 0)434 return retval;435436 /* controllers may cache some of the periodic schedule ... */437+ hcc_params = readl(&ehci->caps->hcc_params);438+ if (HCC_ISOC_CACHE(hcc_params)) // full frame cache439 ehci->i_thresh = 8;440 else // N microframes cached441+ ehci->i_thresh = 2 + HCC_ISOC_THRES(hcc_params);442443 ehci->reclaim = NULL;444 ehci->reclaim_ready = 0;445 ehci->next_uframe = -1;000000000446447 /*448 * dedicate a qh for the async ring head, since we couldn't unlink···462 * its dummy is used in hw_alt_next of many tds, to prevent the qh463 * from automatically advancing to the next td after short reads.464 */465+ ehci->async->qh_next.qh = NULL;466+ ehci->async->hw_next = QH_NEXT(ehci->async->qh_dma);467+ ehci->async->hw_info1 = cpu_to_le32(QH_HEAD);468+ ehci->async->hw_token = cpu_to_le32(QTD_STS_HALT);469+ ehci->async->hw_qtd_next = EHCI_LIST_END;470+ ehci->async->qh_state = QH_STATE_LINKED;471+ ehci->async->hw_alt_next = QTD_NEXT(ehci->async->dummy->qtd_dma);000000000000000000000000472473 /* clear interrupt enables, set irq latency */474 if (log2_irq_thresh < 0 || log2_irq_thresh > 6)···507 * make problems: throughput reduction (!), data errors...508 */509 if (park) {510+ park = min(park, (unsigned) 3);511 temp |= CMD_PARK;512 temp |= park << 8;513 }514+ ehci_dbg(ehci, "park %d\n", park);515 }516+ if (HCC_PGM_FRAMELISTLEN(hcc_params)) {517 /* periodic schedule size can be smaller than default */518 temp &= ~(3 << 2);519 temp |= (EHCI_TUNE_FLS << 2);···521 case 0: ehci->periodic_size = 1024; break;522 case 1: ehci->periodic_size = 512; break;523 case 2: ehci->periodic_size = 256; break;524+ default: BUG();525 }526 }527+ ehci->command = temp;528+529+ ehci->reboot_notifier.notifier_call = ehci_reboot;530+ register_reboot_notifier(&ehci->reboot_notifier);531+532+ return 0;533+}534+535+/* start HC running; it's halted, ehci_init() has been run (once) */536+static int ehci_run (struct usb_hcd *hcd)537+{538+ struct ehci_hcd *ehci = hcd_to_ehci (hcd);539+ int retval;540+ u32 temp;541+ u32 hcc_params;542+543+ /* EHCI spec section 4.1 */544+ if ((retval = ehci_reset(ehci)) != 0) {545+ unregister_reboot_notifier(&ehci->reboot_notifier);546+ ehci_mem_cleanup(ehci);547+ return retval;548+ }549+ writel(ehci->periodic_dma, &ehci->regs->frame_list);550+ writel((u32)ehci->async->qh_dma, &ehci->regs->async_next);551+552+ /*553+ * hcc_params controls whether ehci->regs->segment must (!!!)554+ * be used; it constrains QH/ITD/SITD and QTD locations.555+ * pci_pool consistent memory always uses segment zero.556+ * streaming mappings for I/O buffers, like pci_map_single(),557+ * can return segments above 4GB, if the device allows.558+ *559+ * NOTE: the dma mask is visible through dma_supported(), so560+ * drivers can pass this info along ... like NETIF_F_HIGHDMA,561+ * Scsi_Host.highmem_io, and so forth. It's readonly to all562+ * host side drivers though.563+ */564+ hcc_params = readl(&ehci->caps->hcc_params);565+ if (HCC_64BIT_ADDR(hcc_params)) {566+ writel(0, &ehci->regs->segment);567+#if 0568+// this is deeply broken on almost all architectures569+ if (!dma_set_mask(hcd->self.controller, DMA_64BIT_MASK))570+ ehci_info(ehci, "enabled 64bit DMA\n");571+#endif572+ }573+574+575 // Philips, Intel, and maybe others need CMD_RUN before the576 // root hub will detect new devices (why?); NEC doesn't577+ ehci->command &= ~(CMD_LRESET|CMD_IAAD|CMD_PSE|CMD_ASE|CMD_RESET);578+ ehci->command |= CMD_RUN;579+ writel (ehci->command, &ehci->regs->command);580+ dbg_cmd (ehci, "init", ehci->command);0581582 /*583 * Start, enabling full USB 2.0 functionality ... usb 1.1 devices···538 * involved with the root hub. (Except where one is integrated,539 * and there's no companion controller unless maybe for USB OTG.)540 */00000541 hcd->state = HC_STATE_RUNNING;542 writel (FLAG_CF, &ehci->regs->configured_flag);543+ readl (&ehci->regs->command); /* unblock posted writes */544545 temp = HC_VERSION(readl (&ehci->caps->hc_capbase));546 ehci_info (ehci,547+ "USB %x.%x started, EHCI %x.%02x, driver %s\n",548 ((ehci->sbrn & 0xf0)>>4), (ehci->sbrn & 0x0f),0549 temp >> 8, temp & 0xff, DRIVER_VERSION);550551 writel (INTR_MASK, &ehci->regs->intr_enable); /* Turn On Interrupts */552553+ /* GRR this is run-once init(), being done every time the HC starts.554+ * So long as they're part of class devices, we can't do it init()555+ * since the class device isn't created that early.556+ */557+ create_debug_files(ehci);558559 return 0;560}···636 * stop that signaling.637 */638 ehci->reset_done [i] = jiffies + msecs_to_jiffies (20);00639 ehci_dbg (ehci, "port %d remote wakeup\n", i + 1);640+ usb_hcd_resume_root_hub(hcd);641 }642 }643
+7
drivers/usb/host/ehci-hub.c
···94 msleep(5);95 spin_lock_irq (&ehci->lock);96000000097 /* re-init operational registers in case we lost power */98 if (readl (&ehci->regs->intr_enable) == 0) {99 /* at least some APM implementations will try to deliver
···94 msleep(5);95 spin_lock_irq (&ehci->lock);9697+ /* Ideally and we've got a real resume here, and no port's power98+ * was lost. (For PCI, that means Vaux was maintained.) But we99+ * could instead be restoring a swsusp snapshot -- so that BIOS was100+ * the last user of the controller, not reset/pm hardware keeping101+ * state we gave to it.102+ */103+104 /* re-init operational registers in case we lost power */105 if (readl (&ehci->regs->intr_enable) == 0) {106 /* at least some APM implementations will try to deliver
+167-186
drivers/usb/host/ehci-pci.c
···27/* EHCI 0.96 (and later) section 5.1 says how to kick BIOS/SMM/...28 * off the controller (maybe it can boot from highspeed USB disks).29 */30-static int bios_handoff (struct ehci_hcd *ehci, int where, u32 cap)31{32 struct pci_dev *pdev = to_pci_dev(ehci_to_hcd(ehci)->self.controller);33···48 where, cap);49 // some BIOS versions seem buggy...50 // return 1;51- ehci_warn (ehci, "continuing after BIOS bug...\n");52 /* disable all SMIs, and clear "BIOS owns" flag */53 pci_write_config_dword(pdev, where + 4, 0);54 pci_write_config_byte(pdev, where + 2, 0);···58 return 0;59}6061-/* called by khubd or root hub init threads */62-static int ehci_pci_reset (struct usb_hcd *hcd)63{64- struct ehci_hcd *ehci = hcd_to_ehci (hcd);65 u32 temp;066 unsigned count = 256/4;6768- spin_lock_init (&ehci->lock);69-70- ehci->caps = hcd->regs;71- ehci->regs = hcd->regs + HC_LENGTH (readl (&ehci->caps->hc_capbase));72- dbg_hcs_params (ehci, "reset");73- dbg_hcc_params (ehci, "reset");74-75- /* cache this readonly data; minimize chip reads */76- ehci->hcs_params = readl (&ehci->caps->hcs_params);77-78- if (hcd->self.controller->bus == &pci_bus_type) {79- struct pci_dev *pdev = to_pci_dev(hcd->self.controller);80-81- switch (pdev->vendor) {82- case PCI_VENDOR_ID_TDI:83- if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) {84- ehci->is_tdi_rh_tt = 1;85- tdi_reset (ehci);86- }87- break;88- case PCI_VENDOR_ID_AMD:89- /* AMD8111 EHCI doesn't work, according to AMD errata */90- if (pdev->device == 0x7463) {91- ehci_info (ehci, "ignoring AMD8111 (errata)\n");92- return -EIO;93- }94- break;95- case PCI_VENDOR_ID_NVIDIA:96- /* NVidia reports that certain chips don't handle97- * QH, ITD, or SITD addresses above 2GB. (But TD,98- * data buffer, and periodic schedule are normal.)99- */100- switch (pdev->device) {101- case 0x003c: /* MCP04 */102- case 0x005b: /* CK804 */103- case 0x00d8: /* CK8 */104- case 0x00e8: /* CK8S */105- if (pci_set_consistent_dma_mask(pdev,106- DMA_31BIT_MASK) < 0)107- ehci_warn (ehci, "can't enable NVidia "108- "workaround for >2GB RAM\n");109- break;110- }111- break;112 }0113114- /* optional debug port, normally in the first BAR */115- temp = pci_find_capability (pdev, 0x0a);116- if (temp) {117- pci_read_config_dword(pdev, temp, &temp);118- temp >>= 16;119- if ((temp & (3 << 13)) == (1 << 13)) {120- temp &= 0x1fff;121- ehci->debug = hcd->regs + temp;122- temp = readl (&ehci->debug->control);123- ehci_info (ehci, "debug port %d%s\n",124- HCS_DEBUG_PORT(ehci->hcs_params),125- (temp & DBGP_ENABLED)126- ? " IN USE"127- : "");128- if (!(temp & DBGP_ENABLED))129- ehci->debug = NULL;130- }131- }132-133- temp = HCC_EXT_CAPS (readl (&ehci->caps->hcc_params));134- } else135- temp = 0;136137 /* EHCI 0.96 and later may have "extended capabilities" */138 while (temp && count--) {139 u32 cap;140141- pci_read_config_dword (to_pci_dev(hcd->self.controller),142- temp, &cap);143- ehci_dbg (ehci, "capability %04x at %02x\n", cap, temp);144 switch (cap & 0xff) {145 case 1: /* BIOS/SMM/... handoff */146- if (bios_handoff (ehci, temp, cap) != 0)147 return -EOPNOTSUPP;148 break;149 case 0: /* illegal reserved capability */150- ehci_warn (ehci, "illegal capability!\n");151 cap = 0;152 /* FALLTHROUGH */153 default: /* unknown */···107 temp = (cap >> 8) & 0xff;108 }109 if (!count) {110- ehci_err (ehci, "bogus capabilities ... PCI problems!\n");111 return -EIO;112 }113- if (ehci_is_TDI(ehci))114- ehci_reset (ehci);115116- ehci_port_power (ehci, 0);000000000000000000000000000000000000000000000000000000000000000000117118 /* at least the Genesys GL880S needs fixup here */119 temp = HCS_N_CC(ehci->hcs_params) * HCS_N_PCC(ehci->hcs_params);120 temp &= 0x0f;121 if (temp && HCS_N_PORTS(ehci->hcs_params) > temp) {122- ehci_dbg (ehci, "bogus port configuration: "123 "cc=%d x pcc=%d < ports=%d\n",124 HCS_N_CC(ehci->hcs_params),125 HCS_N_PCC(ehci->hcs_params),126 HCS_N_PORTS(ehci->hcs_params));127128- if (hcd->self.controller->bus == &pci_bus_type) {129- struct pci_dev *pdev;130-131- pdev = to_pci_dev(hcd->self.controller);132- switch (pdev->vendor) {133- case 0x17a0: /* GENESYS */134- /* GL880S: should be PORTS=2 */135- temp |= (ehci->hcs_params & ~0xf);136- ehci->hcs_params = temp;137- break;138- case PCI_VENDOR_ID_NVIDIA:139- /* NF4: should be PCC=10 */140- break;141- }142 }143 }144145- /* force HC to halt state */146- return ehci_halt (ehci);147-}148149-static int ehci_pci_start (struct usb_hcd *hcd)150-{151- struct ehci_hcd *ehci = hcd_to_ehci (hcd);152- int result = 0;153154- if (hcd->self.controller->bus == &pci_bus_type) {155- struct pci_dev *pdev;156- u16 port_wake;157158- pdev = to_pci_dev(hcd->self.controller);159-160- /* Serial Bus Release Number is at PCI 0x60 offset */161- pci_read_config_byte(pdev, 0x60, &ehci->sbrn);162-163- /* port wake capability, reported by boot firmware */164- pci_read_config_word(pdev, 0x62, &port_wake);165- hcd->can_wakeup = (port_wake & 1) != 0;166-167- /* help hc dma work well with cachelines */168- result = pci_set_mwi(pdev);169- if (result)170- ehci_dbg(ehci, "unable to enable MWI - not fatal.\n");171- }172-173- return ehci_run (hcd);174-}175-176-/* always called by thread; normally rmmod */177-178-static void ehci_pci_stop (struct usb_hcd *hcd)179-{180- ehci_stop (hcd);181}182183/*-------------------------------------------------------------------------*/···218219/* suspend/resume, section 4.3 */220221-/* These routines rely on the bus (pci, platform, etc)222 * to handle powerdown and wakeup, and currently also on223 * transceivers that don't need any software attention to set up224 * the right sort of wakeup.0225 */226227-static int ehci_pci_suspend (struct usb_hcd *hcd, pm_message_t message)228{229- struct ehci_hcd *ehci = hcd_to_ehci (hcd);230231- if (time_before (jiffies, ehci->next_statechange))232- msleep (100);233234-#ifdef CONFIG_USB_SUSPEND235- (void) usb_suspend_device (hcd->self.root_hub);236-#else237- usb_lock_device (hcd->self.root_hub);238- (void) ehci_bus_suspend (hcd);239- usb_unlock_device (hcd->self.root_hub);240-#endif241-242- // save (PCI) FLADJ in case of Vaux power loss243 // ... we'd only use it to handle clock skew244245 return 0;246}247248-static int ehci_pci_resume (struct usb_hcd *hcd)249{250- struct ehci_hcd *ehci = hcd_to_ehci (hcd);251 unsigned port;252 struct usb_device *root = hcd->self.root_hub;0253 int retval = -EINVAL;254255- // maybe restore (PCI) FLADJ256257- if (time_before (jiffies, ehci->next_statechange))258- msleep (100);0000259260 /* If any port is suspended (or owned by the companion),261 * we know we can/must resume the HC (and mustn't reset it).0262 */263- for (port = HCS_N_PORTS (ehci->hcs_params); port > 0; ) {264 u32 status;265 port--;266- status = readl (&ehci->regs->port_status [port]);267 if (!(status & PORT_POWER))268 continue;269- if (status & (PORT_SUSPEND | PORT_OWNER)) {270- down (&hcd->self.root_hub->serialize);271- retval = ehci_bus_resume (hcd);272- up (&hcd->self.root_hub->serialize);273- break;274 }000000275 if (!root->children [port])276 continue;277- dbg_port (ehci, __FUNCTION__, port + 1, status);278- usb_set_device_state (root->children[port],279 USB_STATE_NOTATTACHED);280 }281282 /* Else reset, to cope with power loss or flush-to-storage283- * style "resume" having activated BIOS during reboot.284 */285- if (port == 0) {286- (void) ehci_halt (ehci);287- (void) ehci_reset (ehci);288- (void) ehci_pci_reset (hcd);289290- /* emptying the schedule aborts any urbs */291- spin_lock_irq (&ehci->lock);292- if (ehci->reclaim)293- ehci->reclaim_ready = 1;294- ehci_work (ehci, NULL);295- spin_unlock_irq (&ehci->lock);296297- /* restart; khubd will disconnect devices */298- retval = ehci_run (hcd);299300- /* here we "know" root ports should always stay powered;301- * but some controllers may lose all power.302- */303- ehci_port_power (ehci, 1);304- }305306 return retval;307}···320 * basic lifecycle operations321 */322 .reset = ehci_pci_reset,323- .start = ehci_pci_start,324#ifdef CONFIG_PM325 .suspend = ehci_pci_suspend,326 .resume = ehci_pci_resume,327#endif328- .stop = ehci_pci_stop,329330 /*331 * managing i/o requests and associated device resources···358 },359 { /* end: all zeroes */ }360};361-MODULE_DEVICE_TABLE (pci, pci_ids);362363/* pci driver glue; this is a "new style" PCI driver module */364static struct pci_driver ehci_pci_driver = {···374#endif375};376377-static int __init ehci_hcd_pci_init (void)378{379 if (usb_disabled())380 return -ENODEV;381382- pr_debug ("%s: block sizes: qh %Zd qtd %Zd itd %Zd sitd %Zd\n",383 hcd_name,384- sizeof (struct ehci_qh), sizeof (struct ehci_qtd),385- sizeof (struct ehci_itd), sizeof (struct ehci_sitd));386387- return pci_register_driver (&ehci_pci_driver);388}389-module_init (ehci_hcd_pci_init);390391-static void __exit ehci_hcd_pci_cleanup (void)392{393- pci_unregister_driver (&ehci_pci_driver);394}395-module_exit (ehci_hcd_pci_cleanup);
···27/* EHCI 0.96 (and later) section 5.1 says how to kick BIOS/SMM/...28 * off the controller (maybe it can boot from highspeed USB disks).29 */30+static int bios_handoff(struct ehci_hcd *ehci, int where, u32 cap)31{32 struct pci_dev *pdev = to_pci_dev(ehci_to_hcd(ehci)->self.controller);33···48 where, cap);49 // some BIOS versions seem buggy...50 // return 1;51+ ehci_warn(ehci, "continuing after BIOS bug...\n");52 /* disable all SMIs, and clear "BIOS owns" flag */53 pci_write_config_dword(pdev, where + 4, 0);54 pci_write_config_byte(pdev, where + 2, 0);···58 return 0;59}6061+/* called after powerup, by probe or system-pm "wakeup" */62+static int ehci_pci_reinit(struct ehci_hcd *ehci, struct pci_dev *pdev)63{064 u32 temp;65+ int retval;66 unsigned count = 256/4;6768+ /* optional debug port, normally in the first BAR */69+ temp = pci_find_capability(pdev, 0x0a);70+ if (temp) {71+ pci_read_config_dword(pdev, temp, &temp);72+ temp >>= 16;73+ if ((temp & (3 << 13)) == (1 << 13)) {74+ temp &= 0x1fff;75+ ehci->debug = ehci_to_hcd(ehci)->regs + temp;76+ temp = readl(&ehci->debug->control);77+ ehci_info(ehci, "debug port %d%s\n",78+ HCS_DEBUG_PORT(ehci->hcs_params),79+ (temp & DBGP_ENABLED)80+ ? " IN USE"81+ : "");82+ if (!(temp & DBGP_ENABLED))83+ ehci->debug = NULL;000000000000000000000000000084 }85+ }8687+ temp = HCC_EXT_CAPS(readl(&ehci->caps->hcc_params));0000000000000000000008889 /* EHCI 0.96 and later may have "extended capabilities" */90 while (temp && count--) {91 u32 cap;9293+ pci_read_config_dword(pdev, temp, &cap);94+ ehci_dbg(ehci, "capability %04x at %02x\n", cap, temp);095 switch (cap & 0xff) {96 case 1: /* BIOS/SMM/... handoff */97+ if (bios_handoff(ehci, temp, cap) != 0)98 return -EOPNOTSUPP;99 break;100 case 0: /* illegal reserved capability */101+ ehci_dbg(ehci, "illegal capability!\n");102 cap = 0;103 /* FALLTHROUGH */104 default: /* unknown */···156 temp = (cap >> 8) & 0xff;157 }158 if (!count) {159+ ehci_err(ehci, "bogus capabilities ... PCI problems!\n");160 return -EIO;161 }00162163+ /* PCI Memory-Write-Invalidate cycle support is optional (uncommon) */164+ retval = pci_set_mwi(pdev);165+ if (!retval)166+ ehci_dbg(ehci, "MWI active\n");167+168+ ehci_port_power(ehci, 0);169+170+ return 0;171+}172+173+/* called by khubd or root hub (re)init threads; leaves HC in halt state */174+static int ehci_pci_reset(struct usb_hcd *hcd)175+{176+ struct ehci_hcd *ehci = hcd_to_ehci(hcd);177+ struct pci_dev *pdev = to_pci_dev(hcd->self.controller);178+ u32 temp;179+ int retval;180+181+ ehci->caps = hcd->regs;182+ ehci->regs = hcd->regs + HC_LENGTH(readl(&ehci->caps->hc_capbase));183+ dbg_hcs_params(ehci, "reset");184+ dbg_hcc_params(ehci, "reset");185+186+ /* cache this readonly data; minimize chip reads */187+ ehci->hcs_params = readl(&ehci->caps->hcs_params);188+189+ retval = ehci_halt(ehci);190+ if (retval)191+ return retval;192+193+ /* NOTE: only the parts below this line are PCI-specific */194+195+ switch (pdev->vendor) {196+ case PCI_VENDOR_ID_TDI:197+ if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) {198+ ehci->is_tdi_rh_tt = 1;199+ tdi_reset(ehci);200+ }201+ break;202+ case PCI_VENDOR_ID_AMD:203+ /* AMD8111 EHCI doesn't work, according to AMD errata */204+ if (pdev->device == 0x7463) {205+ ehci_info(ehci, "ignoring AMD8111 (errata)\n");206+ return -EIO;207+ }208+ break;209+ case PCI_VENDOR_ID_NVIDIA:210+ /* NVidia reports that certain chips don't handle211+ * QH, ITD, or SITD addresses above 2GB. (But TD,212+ * data buffer, and periodic schedule are normal.)213+ */214+ switch (pdev->device) {215+ case 0x003c: /* MCP04 */216+ case 0x005b: /* CK804 */217+ case 0x00d8: /* CK8 */218+ case 0x00e8: /* CK8S */219+ if (pci_set_consistent_dma_mask(pdev,220+ DMA_31BIT_MASK) < 0)221+ ehci_warn(ehci, "can't enable NVidia "222+ "workaround for >2GB RAM\n");223+ break;224+ }225+ break;226+ }227+228+ if (ehci_is_TDI(ehci))229+ ehci_reset(ehci);230231 /* at least the Genesys GL880S needs fixup here */232 temp = HCS_N_CC(ehci->hcs_params) * HCS_N_PCC(ehci->hcs_params);233 temp &= 0x0f;234 if (temp && HCS_N_PORTS(ehci->hcs_params) > temp) {235+ ehci_dbg(ehci, "bogus port configuration: "236 "cc=%d x pcc=%d < ports=%d\n",237 HCS_N_CC(ehci->hcs_params),238 HCS_N_PCC(ehci->hcs_params),239 HCS_N_PORTS(ehci->hcs_params));240241+ switch (pdev->vendor) {242+ case 0x17a0: /* GENESYS */243+ /* GL880S: should be PORTS=2 */244+ temp |= (ehci->hcs_params & ~0xf);245+ ehci->hcs_params = temp;246+ break;247+ case PCI_VENDOR_ID_NVIDIA:248+ /* NF4: should be PCC=10 */249+ break;00000250 }251 }252253+ /* Serial Bus Release Number is at PCI 0x60 offset */254+ pci_read_config_byte(pdev, 0x60, &ehci->sbrn);0255256+ /* REVISIT: per-port wake capability (PCI 0x62) currently unused */000257258+ retval = ehci_pci_reinit(ehci, pdev);00259260+ /* finish init */261+ return ehci_init(hcd);000000000000000000000262}263264/*-------------------------------------------------------------------------*/···235236/* suspend/resume, section 4.3 */237238+/* These routines rely on the PCI bus glue239 * to handle powerdown and wakeup, and currently also on240 * transceivers that don't need any software attention to set up241 * the right sort of wakeup.242+ * Also they depend on separate root hub suspend/resume.243 */244245+static int ehci_pci_suspend(struct usb_hcd *hcd, pm_message_t message)246{247+ struct ehci_hcd *ehci = hcd_to_ehci(hcd);248249+ if (time_before(jiffies, ehci->next_statechange))250+ msleep(10);251252+ // could save FLADJ in case of Vaux power loss00000000253 // ... we'd only use it to handle clock skew254255 return 0;256}257258+static int ehci_pci_resume(struct usb_hcd *hcd)259{260+ struct ehci_hcd *ehci = hcd_to_ehci(hcd);261 unsigned port;262 struct usb_device *root = hcd->self.root_hub;263+ struct pci_dev *pdev = to_pci_dev(hcd->self.controller);264 int retval = -EINVAL;265266+ // maybe restore FLADJ267268+ if (time_before(jiffies, ehci->next_statechange))269+ msleep(100);270+271+ /* If CF is clear, we lost PCI Vaux power and need to restart. */272+ if (readl(&ehci->regs->configured_flag) != FLAG_CF)273+ goto restart;274275 /* If any port is suspended (or owned by the companion),276 * we know we can/must resume the HC (and mustn't reset it).277+ * We just defer that to the root hub code.278 */279+ for (port = HCS_N_PORTS(ehci->hcs_params); port > 0; ) {280 u32 status;281 port--;282+ status = readl(&ehci->regs->port_status [port]);283 if (!(status & PORT_POWER))284 continue;285+ if (status & (PORT_SUSPEND | PORT_RESUME | PORT_OWNER)) {286+ usb_hcd_resume_root_hub(hcd);287+ return 0;00288 }289+ }290+291+restart:292+ ehci_dbg(ehci, "lost power, restarting\n");293+ for (port = HCS_N_PORTS(ehci->hcs_params); port > 0; ) {294+ port--;295 if (!root->children [port])296 continue;297+ usb_set_device_state(root->children[port],0298 USB_STATE_NOTATTACHED);299 }300301 /* Else reset, to cope with power loss or flush-to-storage302+ * style "resume" having let BIOS kick in during reboot.303 */304+ (void) ehci_halt(ehci);305+ (void) ehci_reset(ehci);306+ (void) ehci_pci_reinit(ehci, pdev);0307308+ /* emptying the schedule aborts any urbs */309+ spin_lock_irq(&ehci->lock);310+ if (ehci->reclaim)311+ ehci->reclaim_ready = 1;312+ ehci_work(ehci, NULL);313+ spin_unlock_irq(&ehci->lock);314315+ /* restart; khubd will disconnect devices */316+ retval = ehci_run(hcd);317318+ /* here we "know" root ports should always stay powered */319+ ehci_port_power(ehci, 1);000320321 return retval;322}···339 * basic lifecycle operations340 */341 .reset = ehci_pci_reset,342+ .start = ehci_run,343#ifdef CONFIG_PM344 .suspend = ehci_pci_suspend,345 .resume = ehci_pci_resume,346#endif347+ .stop = ehci_stop,348349 /*350 * managing i/o requests and associated device resources···377 },378 { /* end: all zeroes */ }379};380+MODULE_DEVICE_TABLE(pci, pci_ids);381382/* pci driver glue; this is a "new style" PCI driver module */383static struct pci_driver ehci_pci_driver = {···393#endif394};395396+static int __init ehci_hcd_pci_init(void)397{398 if (usb_disabled())399 return -ENODEV;400401+ pr_debug("%s: block sizes: qh %Zd qtd %Zd itd %Zd sitd %Zd\n",402 hcd_name,403+ sizeof(struct ehci_qh), sizeof(struct ehci_qtd),404+ sizeof(struct ehci_itd), sizeof(struct ehci_sitd));405406+ return pci_register_driver(&ehci_pci_driver);407}408+module_init(ehci_hcd_pci_init);409410+static void __exit ehci_hcd_pci_cleanup(void)411{412+ pci_unregister_driver(&ehci_pci_driver);413}414+module_exit(ehci_hcd_pci_cleanup);
-36
drivers/usb/host/ohci-pci.c
···14 * This file is licenced under the GPL.15 */1617-#include <linux/jiffies.h>18-19-#ifdef CONFIG_PPC_PMAC20-#include <asm/machdep.h>21-#include <asm/pmac_feature.h>22-#include <asm/pci-bridge.h>23-#include <asm/prom.h>24-#endif25-26#ifndef CONFIG_PCI27#error "This file is PCI bus glue. CONFIG_PCI must be defined."28#endif···106static int ohci_pci_suspend (struct usb_hcd *hcd, pm_message_t message)107{108 /* root hub was already suspended */109-110- /* FIXME these PMAC things get called in the wrong places. ASIC111- * clocks should be turned off AFTER entering D3, and on BEFORE112- * trying to enter D0. Evidently the PCI layer doesn't currently113- * provide the right sort of platform hooks for this ...114- */115-#ifdef CONFIG_PPC_PMAC116- if (_machine == _MACH_Pmac) {117- struct device_node *of_node;118-119- /* Disable USB PAD & cell clock */120- of_node = pci_device_to_OF_node (to_pci_dev(hcd->self.controller));121- if (of_node)122- pmac_call_feature(PMAC_FTR_USB_ENABLE, of_node, 0, 0);123- }124-#endif /* CONFIG_PPC_PMAC */125 return 0;126}127128129static int ohci_pci_resume (struct usb_hcd *hcd)130{131-#ifdef CONFIG_PPC_PMAC132- if (_machine == _MACH_Pmac) {133- struct device_node *of_node;134-135- /* Re-enable USB PAD & cell clock */136- of_node = pci_device_to_OF_node (to_pci_dev(hcd->self.controller));137- if (of_node)138- pmac_call_feature (PMAC_FTR_USB_ENABLE, of_node, 0, 1);139- }140-#endif /* CONFIG_PPC_PMAC */141-142 usb_hcd_resume_root_hub(hcd);143 return 0;144}
···14 * This file is licenced under the GPL.15 */1600000000017#ifndef CONFIG_PCI18#error "This file is PCI bus glue. CONFIG_PCI must be defined."19#endif···115static int ohci_pci_suspend (struct usb_hcd *hcd, pm_message_t message)116{117 /* root hub was already suspended */0000000000000000118 return 0;119}120121122static int ohci_pci_resume (struct usb_hcd *hcd)123{00000000000124 usb_hcd_resume_root_hub(hcd);125 return 0;126}
···128#define SEALEVEL_2803_8_PID 0X2883 /* SeaLINK+8 (2803) Port 8 */129130/*0000000131 * DSS-20 Sync Station for Sony Ericsson P800132 */133
···128#define SEALEVEL_2803_8_PID 0X2883 /* SeaLINK+8 (2803) Port 8 */129130/*131+ * The following are the values for two KOBIL chipcard terminals.132+ */133+#define KOBIL_VID 0x0d46 /* KOBIL Vendor ID */134+#define KOBIL_CONV_B1_PID 0x2020 /* KOBIL Konverter for B1 */135+#define KOBIL_CONV_KAAN_PID 0x2021 /* KOBIL_Konverter for KAAN */136+137+/*138 * DSS-20 Sync Station for Sony Ericsson P800139 */140
···160161/**162 * atomic_add_negative - add and test if negative163- * @v: pointer of type atomic_t164 * @i: integer value to add0165 * 166 * Atomically adds @i to @v and returns true167 * if the result is negative, or false when···177 :"ir" (i), "m" (v->counter) : "memory");178 return c;179}0000000000000000000000000180181/* An 64bit atomic type */182···345346/**347 * atomic64_add_negative - add and test if negative348- * @v: pointer to atomic64_t349 * @i: integer value to add0350 *351 * Atomically adds @i to @v and returns true352 * if the result is negative, or false when353 * result is greater than or equal to zero.354 */355-static __inline__ long atomic64_add_negative(long i, atomic64_t *v)356{357 unsigned char c;358···364}365366/**367- * atomic_add_return - add and return368- * @v: pointer of type atomic_t369 * @i: integer value to add0370 *371 * Atomically adds @i to @v and returns @i + @v372 */373-static __inline__ int atomic_add_return(int i, atomic_t *v)374{375- int __i = i;376 __asm__ __volatile__(377- LOCK "xaddl %0, %1;"378 :"=r"(i)379 :"m"(v->counter), "0"(i));380 return i + __i;381}382383-static __inline__ int atomic_sub_return(int i, atomic_t *v)384{385- return atomic_add_return(-i,v);386}000387388#define atomic_cmpxchg(v, old, new) ((int)cmpxchg(&((v)->counter), old, new))389···408 c != (u); \409})410#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)411-412-#define atomic_inc_return(v) (atomic_add_return(1,v))413-#define atomic_dec_return(v) (atomic_sub_return(1,v))414415/* These are x86-specific, used by some header files */416#define atomic_clear_mask(mask, addr) \
···160161/**162 * atomic_add_negative - add and test if negative0163 * @i: integer value to add164+ * @v: pointer of type atomic_t165 * 166 * Atomically adds @i to @v and returns true167 * if the result is negative, or false when···177 :"ir" (i), "m" (v->counter) : "memory");178 return c;179}180+181+/**182+ * atomic_add_return - add and return183+ * @i: integer value to add184+ * @v: pointer of type atomic_t185+ *186+ * Atomically adds @i to @v and returns @i + @v187+ */188+static __inline__ int atomic_add_return(int i, atomic_t *v)189+{190+ int __i = i;191+ __asm__ __volatile__(192+ LOCK "xaddl %0, %1;"193+ :"=r"(i)194+ :"m"(v->counter), "0"(i));195+ return i + __i;196+}197+198+static __inline__ int atomic_sub_return(int i, atomic_t *v)199+{200+ return atomic_add_return(-i,v);201+}202+203+#define atomic_inc_return(v) (atomic_add_return(1,v))204+#define atomic_dec_return(v) (atomic_sub_return(1,v))205206/* An 64bit atomic type */207···320321/**322 * atomic64_add_negative - add and test if negative0323 * @i: integer value to add324+ * @v: pointer to type atomic64_t325 *326 * Atomically adds @i to @v and returns true327 * if the result is negative, or false when328 * result is greater than or equal to zero.329 */330+static __inline__ int atomic64_add_negative(long i, atomic64_t *v)331{332 unsigned char c;333···339}340341/**342+ * atomic64_add_return - add and return0343 * @i: integer value to add344+ * @v: pointer to type atomic64_t345 *346 * Atomically adds @i to @v and returns @i + @v347 */348+static __inline__ long atomic64_add_return(long i, atomic64_t *v)349{350+ long __i = i;351 __asm__ __volatile__(352+ LOCK "xaddq %0, %1;"353 :"=r"(i)354 :"m"(v->counter), "0"(i));355 return i + __i;356}357358+static __inline__ long atomic64_sub_return(long i, atomic64_t *v)359{360+ return atomic64_add_return(-i,v);361}362+363+#define atomic64_inc_return(v) (atomic64_add_return(1,v))364+#define atomic64_dec_return(v) (atomic64_sub_return(1,v))365366#define atomic_cmpxchg(v, old, new) ((int)cmpxchg(&((v)->counter), old, new))367···380 c != (u); \381})382#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)000383384/* These are x86-specific, used by some header files */385#define atomic_clear_mask(mask, addr) \
···47 * @urb_list: urbs queued to this endpoint; maintained by usbcore48 * @hcpriv: for use by HCD; typically holds hardware dma queue head (QH)49 * with one or more transfer descriptors (TDs) per urb050 * @extra: descriptors following this endpoint in the configuration51 * @extralen: how many bytes of "extra" are valid52 *
···47 * @urb_list: urbs queued to this endpoint; maintained by usbcore48 * @hcpriv: for use by HCD; typically holds hardware dma queue head (QH)49 * with one or more transfer descriptors (TDs) per urb50+ * @kobj: kobject for sysfs info51 * @extra: descriptors following this endpoint in the configuration52 * @extralen: how many bytes of "extra" are valid53 *
-15
kernel/futex.c
···201 * from swap. But that's a lot of code to duplicate here202 * for a rare case, so we simply fetch the page.203 */204-205- /*206- * Do a quick atomic lookup first - this is the fastpath.207- */208- page = follow_page(mm, uaddr, FOLL_TOUCH|FOLL_GET);209- if (likely(page != NULL)) {210- key->shared.pgoff =211- page->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT);212- put_page(page);213- return 0;214- }215-216- /*217- * Do it the general way.218- */219 err = get_user_pages(current, mm, uaddr, 1, 0, 0, &page, NULL);220 if (err >= 0) {221 key->shared.pgoff =
···201 * from swap. But that's a lot of code to duplicate here202 * for a rare case, so we simply fetch the page.203 */000000000000000204 err = get_user_pages(current, mm, uaddr, 1, 0, 0, &page, NULL);205 if (err >= 0) {206 key->shared.pgoff =
+15
kernel/irq/manage.c
···36{37 struct irq_desc *desc = irq_desc + irq;3800039 while (desc->status & IRQ_INPROGRESS)40 cpu_relax();41}···62{63 irq_desc_t *desc = irq_desc + irq;64 unsigned long flags;0006566 spin_lock_irqsave(&desc->lock, flags);67 if (!desc->depth++) {···92{93 irq_desc_t *desc = irq_desc + irq;9400095 disable_irq_nosync(irq);96 if (desc->action)97 synchronize_irq(irq);···116{117 irq_desc_t *desc = irq_desc + irq;118 unsigned long flags;000119120 spin_lock_irqsave(&desc->lock, flags);121 switch (desc->depth) {···174 struct irqaction *old, **p;175 unsigned long flags;176 int shared = 0;000177178 if (desc->handler == &no_irq_type)179 return -ENOSYS;
···36{37 struct irq_desc *desc = irq_desc + irq;3839+ if (irq >= NR_IRQS)40+ return;41+42 while (desc->status & IRQ_INPROGRESS)43 cpu_relax();44}···59{60 irq_desc_t *desc = irq_desc + irq;61 unsigned long flags;62+63+ if (irq >= NR_IRQS)64+ return;6566 spin_lock_irqsave(&desc->lock, flags);67 if (!desc->depth++) {···86{87 irq_desc_t *desc = irq_desc + irq;8889+ if (irq >= NR_IRQS)90+ return;91+92 disable_irq_nosync(irq);93 if (desc->action)94 synchronize_irq(irq);···107{108 irq_desc_t *desc = irq_desc + irq;109 unsigned long flags;110+111+ if (irq >= NR_IRQS)112+ return;113114 spin_lock_irqsave(&desc->lock, flags);115 switch (desc->depth) {···162 struct irqaction *old, **p;163 unsigned long flags;164 int shared = 0;165+166+ if (irq >= NR_IRQS)167+ return -EINVAL;168169 if (desc->handler == &no_irq_type)170 return -ENOSYS;
+1-1
kernel/printk.c
···956 if (console_drivers == console) {957 console_drivers=console->next;958 res = 0;959- } else {960 for (a=console_drivers->next, b=console_drivers ;961 a; b=a, a=b->next) {962 if (a == console) {
···956 if (console_drivers == console) {957 console_drivers=console->next;958 res = 0;959+ } else if (console_drivers) {960 for (a=console_drivers->next, b=console_drivers ;961 a; b=a, a=b->next) {962 if (a == console) {
+2-4
mm/Kconfig
···125# space can be handled with less contention: split it at this NR_CPUS.126# Default to 4 for wider testing, though 8 might be more appropriate.127# ARM's adjust_pte (unused if VIPT) depends on mm-wide page_table_lock.128-# PA-RISC's debug spinlock_t is too large for the 32-bit struct page.129-# ARM26 and SPARC32 and PPC64 may use one page for multiple page tables.130#131config SPLIT_PTLOCK_CPUS132 int133 default "4096" if ARM && !CPU_CACHE_VIPT134- default "4096" if PARISC && DEBUG_SPINLOCK && !64BIT135- default "4096" if ARM26 || SPARC32 || PPC64136 default "4"
···125# space can be handled with less contention: split it at this NR_CPUS.126# Default to 4 for wider testing, though 8 might be more appropriate.127# ARM's adjust_pte (unused if VIPT) depends on mm-wide page_table_lock.128+# PA-RISC 7xxx's spinlock_t would enlarge struct page from 32 to 44 bytes.0129#130config SPLIT_PTLOCK_CPUS131 int132 default "4096" if ARM && !CPU_CACHE_VIPT133+ default "4096" if PARISC && !PA200134 default "4"
+3-3
mm/truncate.c
···282 * Zap the rest of the file in one hit.283 */284 unmap_mapping_range(mapping,285- page_index << PAGE_CACHE_SHIFT,286- (end - page_index + 1)287 << PAGE_CACHE_SHIFT,288 0);289 did_range_unmap = 1;···292 * Just zap this page293 */294 unmap_mapping_range(mapping,295- page_index << PAGE_CACHE_SHIFT,296 PAGE_CACHE_SIZE, 0);297 }298 }
···282 * Zap the rest of the file in one hit.283 */284 unmap_mapping_range(mapping,285+ (loff_t)page_index<<PAGE_CACHE_SHIFT,286+ (loff_t)(end - page_index + 1)287 << PAGE_CACHE_SHIFT,288 0);289 did_range_unmap = 1;···292 * Just zap this page293 */294 unmap_mapping_range(mapping,295+ (loff_t)page_index<<PAGE_CACHE_SHIFT,296 PAGE_CACHE_SIZE, 0);297 }298 }