···1616 - Empeg documentation1717mem_alignment1818 - alignment abort handler documentation1919+memory.txt2020+ - description of the virtual memory layout1921nwfpe2022 - NWFPE floating point emulator documentation
+25-25
Documentation/dvb/README.dvb-usb
···50500. History & News:5151 2005-06-30 - added support for WideView WT-220U (Thanks to Steve Chang)5252 2005-05-30 - added basic isochronous support to the dvb-usb-framework5353- added support for Conexant Hybrid reference design and Nebula DigiTV USB5353+ added support for Conexant Hybrid reference design and Nebula DigiTV USB5454 2005-04-17 - all dibusb devices ported to make use of the dvb-usb-framework5555 2005-04-02 - re-enabled and improved remote control code.5656 2005-03-31 - ported the Yakumo/Hama/Typhoon DVB-T USB2.0 device to dvb-usb.5757 2005-03-30 - first commit of the dvb-usb-module based on the dibusb-source. First device is a new driver for the5858- TwinhanDTV Alpha / MagicBox II USB2.0-only DVB-T device.5858+ TwinhanDTV Alpha / MagicBox II USB2.0-only DVB-T device.59596060 (change from dvb-dibusb to dvb-usb)6161 2005-03-28 - added support for the AVerMedia AverTV DVB-T USB2.0 device (Thanks to Glen Harris and Jiun-Kuei Jung, AVerMedia)···6464 2005-02-02 - added support for the Hauppauge Win-TV Nova-T USB26565 2005-01-31 - distorted streaming is gone for USB1.1 devices6666 2005-01-13 - moved the mirrored pid_filter_table back to dvb-dibusb6767- - first almost working version for HanfTek UMT-0106868- - found out, that Yakumo/HAMA/Typhoon are predecessors of the HanfTek UMT-0106767+ - first almost working version for HanfTek UMT-0106868+ - found out, that Yakumo/HAMA/Typhoon are predecessors of the HanfTek UMT-0106969 2005-01-10 - refactoring completed, now everything is very delightful7070- - tuner quirks for some weird devices (Artec T1 AN2235 device has sometimes a7171- Panasonic Tuner assembled). Tunerprobing implemented. Thanks a lot to Gunnar Wittich.7070+ - tuner quirks for some weird devices (Artec T1 AN2235 device has sometimes a7171+ Panasonic Tuner assembled). Tunerprobing implemented. Thanks a lot to Gunnar Wittich.7272 2004-12-29 - after several days of struggling around bug of no returning URBs fixed.7373 2004-12-26 - refactored the dibusb-driver, splitted into separate files7474- - i2c-probing enabled7474+ - i2c-probing enabled7575 2004-12-06 - possibility for demod i2c-address probing7676- - new usb IDs (Compro, Artec)7676+ - new usb IDs (Compro, Artec)7777 2004-11-23 - merged changes from DiB3000MC_ver2.17878- - revised the debugging7979- - possibility to deliver the complete TS for USB2.07878+ - revised the debugging7979+ - possibility to deliver the complete TS for USB2.08080 2004-11-21 - first working version of the dib3000mc/p frontend driver.8181 2004-11-12 - added additional remote control keys. Thanks to Uwe Hanke.8282 2004-11-07 - added remote control support. Thanks to David Matthews.8383 2004-11-05 - added support for a new devices (Grandtec/Avermedia/Artec)8484- - merged my changes (for dib3000mb/dibusb) to the FE_REFACTORING, because it became HEAD8585- - moved transfer control (pid filter, fifo control) from usb driver to frontend, it seems8686- better settled there (added xfer_ops-struct)8787- - created a common files for frontends (mc/p/mb)8484+ - merged my changes (for dib3000mb/dibusb) to the FE_REFACTORING, because it became HEAD8585+ - moved transfer control (pid filter, fifo control) from usb driver to frontend, it seems8686+ better settled there (added xfer_ops-struct)8787+ - created a common files for frontends (mc/p/mb)8888 2004-09-28 - added support for a new device (Unkown, vendor ID is Hyper-Paltek)8989 2004-09-20 - added support for a new device (Compro DVB-U2000), thanks9090- to Amaury Demol for reporting9191- - changed usb TS transfer method (several urbs, stopping transfer9292- before setting a new pid)9090+ to Amaury Demol for reporting9191+ - changed usb TS transfer method (several urbs, stopping transfer9292+ before setting a new pid)9393 2004-09-13 - added support for a new device (Artec T1 USB TVBOX), thanks9494- to Christian Motschke for reporting9494+ to Christian Motschke for reporting9595 2004-09-05 - released the dibusb device and dib3000mb-frontend driver96969797 (old news for vp7041.c)9898 2004-07-15 - found out, by accident, that the device has a TUA6010XS for9999- PLL9999+ PLL100100 2004-07-12 - figured out, that the driver should also work with the101101- CTS Portable (Chinese Television System)101101+ CTS Portable (Chinese Television System)102102 2004-07-08 - firmware-extraction-2.422-problem solved, driver is now working103103- properly with firmware extracted from 2.422104104- - #if for 2.6.4 (dvb), compile issue105105- - changed firmware handling, see vp7041.txt sec 1.1103103+ properly with firmware extracted from 2.422104104+ - #if for 2.6.4 (dvb), compile issue105105+ - changed firmware handling, see vp7041.txt sec 1.1106106 2004-07-02 - some tuner modifications, v0.1, cleanups, first public107107 2004-06-28 - now using the dvb_dmx_swfilter_packets, everything108108- runs fine now108108+ runs fine now109109 2004-06-27 - able to watch and switching channels (pre-alpha)110110- - no section filtering yet110110+ - no section filtering yet111111 2004-06-06 - first TS received, but kernel oops :/112112 2004-05-14 - firmware loader is working113113 2004-05-11 - start writing the driver
+1-1
Documentation/dvb/README.flexcop
···174174Everything which is identical in the following table, can be put into a common175175flexcop-module.176176177177- PCI USB177177+ PCI USB178178-------------------------------------------------------------------------------179179Different:180180Register access: accessing IO memory USB control message
+1-1
Documentation/dvb/avermedia.txt
···1122HOWTO: Get An Avermedia DVB-T working under Linux33- ______________________________________________33+ ______________________________________________4455 Table of Contents66 Assumptions and Introduction
+4-4
Documentation/dvb/cards.txt
···1616 shielding, and the whole metal box has its own part number.171718181919-o Frontends drivers: 1919+o Frontends drivers:2020 - dvb_dummy_fe: for testing...2121 DVB-S:2222 - ves1x93 : Alps BSRV2 (ves1893 demodulator) and dbox2 (ves1993)···2424 - grundig_29504-491 : Grundig 29504-491 (Philips TDA8083 demodulator), tsa5522 PLL2525 - mt312 : Zarlink mt312 or Mitel vp310 demodulator, sl1935 or tsa5059 PLL2626 - stv0299 : Alps BSRU6 (tsa5059 PLL), LG TDQB-S00x (tsa5059 PLL),2727- LG TDQF-S001F (sl1935 PLL), Philips SU1278 (tua6100 PLL), 2727+ LG TDQF-S001F (sl1935 PLL), Philips SU1278 (tua6100 PLL),2828 Philips SU1278SH (tsa5059 PLL), Samsung TBMU24112IMB2929 DVB-C:3030 - ves1820 : various (ves1820 demodulator, sp5659c or spXXXX PLL)···3535 - grundig_29504-401 : Grundig 29504-401 (LSI L64781 demodulator), tsa5060 PLL3636 - tda1004x : Philips tda10045h (td1344 or tdm1316l PLL)3737 - nxt6000 : Alps TDME7 (MITEL SP5659 PLL), Alps TDED4 (TI ALP510 PLL),3838- Comtech DVBT-6k07 (SP5730 PLL)3939- (NxtWave Communications NXT6000 demodulator)3838+ Comtech DVBT-6k07 (SP5730 PLL)3939+ (NxtWave Communications NXT6000 demodulator)4040 - sp887x : Microtune 7202D4141 - dib3000mb : DiBcom 3000-MB demodulator4242 DVB-S/C/T:
+2-2
Documentation/dvb/contributors.txt
···15151616Diego Picciani <d.picciani@novacomp.it>1717 for CyberLogin for Linux which allows logging onto EON1818- (in case you are wondering where CyberLogin is, EON changed its login 1818+ (in case you are wondering where CyberLogin is, EON changed its login1919 procedure and CyberLogin is no longer used.)20202121Martin Schaller <martin@smurf.franken.de>···5757Davor Emard <emard@softhome.net>5858 for his work on the budget drivers, the demux code,5959 the module unloading problems, ...6060-6060+6161Hans-Frieder Vogt <hfvogt@arcor.de>6262 for his work on calculating and checking the crc's for the6363 TechnoTrend/Hauppauge DEC driver firmware
+2-2
Documentation/dvb/readme.txt
···20202121What's inside this directory:22222323-"cards.txt" 2323+"cards.txt"2424contains a list of supported hardware.25252626"contributors.txt"···3737contains detailed informations about the3838TT DEC2000/DEC3000 USB DVB hardware.39394040-"bt8xx.txt" 4040+"bt8xx.txt"4141contains detailed installation instructions for the4242various bt8xx based "budget" DVB cards4343(Nebula, Pinnacle PCTV, Twinhan DST)
+11-11
Documentation/filesystems/ext3.txt
···5757 we'd like to get some feedback if it's the contrary for5858 you.59596060-user_xattr (*) Enables POSIX Extended Attributes. It's enabled by6161- default, however you need to confifure its support6262- (CONFIG_EXT3_FS_XATTR). This is neccesary if you want6363- to use POSIX Acces Control Lists support. You can visit6464- http://acl.bestbits.at to know more about POSIX Extended6565- attributes.6060+user_xattr Enables Extended User Attributes. Additionally, you need6161+ to have extended attribute support enabled in the kernel6262+ configuration (CONFIG_EXT3_FS_XATTR). See the attr(5)6363+ manual page and http://acl.bestbits.at to learn more6464+ about extended attributes.66656767-nouser_xattr Disables POSIX Extended Attributes.6666+nouser_xattr Disables Extended User Attributes.68676969-acl (*) Enables POSIX Access Control Lists support. This is7070- enabled by default, however you need to configure7171- its support (CONFIG_EXT3_FS_POSIX_ACL). If you want7272- to know more about ACLs visit http://acl.bestbits.at6868+acl Enables POSIX Access Control Lists support. Additionally,6969+ you need to have ACL support enabled in the kernel7070+ configuration (CONFIG_EXT3_FS_POSIX_ACL). See the acl(5)7171+ manual page and http://acl.bestbits.at for more7272+ information.73737474noacl This option disables POSIX Access Control List support.7575
···408408# of make so .config is not included in this case either (for *config).409409410410no-dot-config-targets := clean mrproper distclean \411411- cscope TAGS tags help %docs check% kernelrelease411411+ cscope TAGS tags help %docs check%412412413413config-targets := 0414414mixed-targets := 0
+9
arch/arm/kernel/ptrace.c
···242242 */243243 long aluop1, aluop2, ccbit;244244245245+ if ((insn & 0x0fffffd0) == 0x012fff10) {246246+ /*247247+ * bx or blx248248+ */249249+ alt = get_user_reg(child, insn & 15);250250+ break;251251+ }252252+253253+245254 if ((insn & 0xf000) != 0xf000)246255 break;247256
···13381338 if (cpu == 0)13391339 return -EBUSY;1340134013411341- /* We enable the timer again on the exit path of the death loop */13421342- disable_APIC_timer();13411341+ clear_local_APIC();13431342 /* Allow any queued timer interrupts to get serviced */13441343 local_irq_enable();13451344 mdelay(1);
-7
arch/i386/kernel/traps.c
···650650651651 cpu = smp_processor_id();652652653653-#ifdef CONFIG_HOTPLUG_CPU654654- if (!cpu_online(cpu)) {655655- nmi_exit();656656- return;657657- }658658-#endif659659-660653 ++nmi_count(cpu);661654662655 if (!rcu_dereference(nmi_callback)(regs, cpu))
+29-8
arch/i386/mm/ioremap.c
···223223}224224EXPORT_SYMBOL(ioremap_nocache);225225226226+/**227227+ * iounmap - Free a IO remapping228228+ * @addr: virtual address from ioremap_*229229+ *230230+ * Caller must ensure there is only one unmapping for the same pointer.231231+ */226232void iounmap(volatile void __iomem *addr)227233{228228- struct vm_struct *p;234234+ struct vm_struct *p, *o;229235230236 if ((void __force *)addr <= high_memory)231237 return;···245239 addr < phys_to_virt(ISA_END_ADDRESS))246240 return;247241248248- write_lock(&vmlist_lock);249249- p = __remove_vm_area((void *)(PAGE_MASK & (unsigned long __force)addr));250250- if (!p) { 251251- printk(KERN_WARNING "iounmap: bad address %p\n", addr);242242+ addr = (volatile void *)(PAGE_MASK & (unsigned long __force)addr);243243+244244+ /* Use the vm area unlocked, assuming the caller245245+ ensures there isn't another iounmap for the same address246246+ in parallel. Reuse of the virtual address is prevented by247247+ leaving it in the global lists until we're done with it.248248+ cpa takes care of the direct mappings. */249249+ read_lock(&vmlist_lock);250250+ for (p = vmlist; p; p = p->next) {251251+ if (p->addr == addr)252252+ break;253253+ }254254+ read_unlock(&vmlist_lock);255255+256256+ if (!p) {257257+ printk("iounmap: bad address %p\n", addr);252258 dump_stack();253253- goto out_unlock;259259+ return;254260 }255261262262+ /* Reset the direct mapping. Can block */256263 if ((p->flags >> 20) && p->phys_addr < virt_to_phys(high_memory) - 1) {257264 change_page_attr(virt_to_page(__va(p->phys_addr)),258265 p->size >> PAGE_SHIFT,259266 PAGE_KERNEL);260267 global_flush_tlb();261268 } 262262-out_unlock:263263- write_unlock(&vmlist_lock);269269+270270+ /* Finally remove it */271271+ o = remove_vm_area((void *)addr);272272+ BUG_ON(p != o || o == NULL);264273 kfree(p); 265274}266275EXPORT_SYMBOL(iounmap);
+2-2
arch/i386/pci/direct.c
···1313#define PCI_CONF1_ADDRESS(bus, devfn, reg) \1414 (0x80000000 | (bus << 16) | (devfn << 8) | (reg & ~3))15151616-static int pci_conf1_read(unsigned int seg, unsigned int bus,1616+int pci_conf1_read(unsigned int seg, unsigned int bus,1717 unsigned int devfn, int reg, int len, u32 *value)1818{1919 unsigned long flags;···4242 return 0;4343}44444545-static int pci_conf1_write(unsigned int seg, unsigned int bus,4545+int pci_conf1_write(unsigned int seg, unsigned int bus,4646 unsigned int devfn, int reg, int len, u32 value)4747{4848 unsigned long flags;
+56-9
arch/i386/pci/mmconfig.c
···1919/* The base address of the last MMCONFIG device accessed */2020static u32 mmcfg_last_accessed_device;21212222+static DECLARE_BITMAP(fallback_slots, 32);2323+2224/*2325 * Functions for accessing PCI configuration space with MMCONFIG accesses2426 */2525-static u32 get_base_addr(unsigned int seg, int bus)2727+static u32 get_base_addr(unsigned int seg, int bus, unsigned devfn)2628{2729 int cfg_num = -1;2830 struct acpi_table_mcfg_config *cfg;29313232+ if (seg == 0 && bus == 0 &&3333+ test_bit(PCI_SLOT(devfn), fallback_slots))3434+ return 0;3535+3036 while (1) {3137 ++cfg_num;3238 if (cfg_num >= pci_mmcfg_config_num) {3333- /* something bad is going on, no cfg table is found. */3434- /* so we fall back to the old way we used to do this */3535- /* and just rely on the first entry to be correct. */3636- return pci_mmcfg_config[0].base_address;3939+ /* Not found - fallback to type 1 */4040+ return 0;3741 }3842 cfg = &pci_mmcfg_config[cfg_num];3943 if (cfg->pci_segment_group_number != seg)···4844 }4945}50465151-static inline void pci_exp_set_dev_base(unsigned int seg, int bus, int devfn)4747+static inline void pci_exp_set_dev_base(unsigned int base, int bus, int devfn)5248{5353- u32 dev_base = get_base_addr(seg, bus) | (bus << 20) | (devfn << 12);4949+ u32 dev_base = base | (bus << 20) | (devfn << 12);5450 if (dev_base != mmcfg_last_accessed_device) {5551 mmcfg_last_accessed_device = dev_base;5652 set_fixmap_nocache(FIX_PCIE_MCFG, dev_base);···6157 unsigned int devfn, int reg, int len, u32 *value)6258{6359 unsigned long flags;6060+ u32 base;64616562 if (!value || (bus > 255) || (devfn > 255) || (reg > 4095))6663 return -EINVAL;67646565+ base = get_base_addr(seg, bus, devfn);6666+ if (!base)6767+ return pci_conf1_read(seg,bus,devfn,reg,len,value);6868+6869 spin_lock_irqsave(&pci_config_lock, flags);69707070- pci_exp_set_dev_base(seg, bus, devfn);7171+ pci_exp_set_dev_base(base, bus, devfn);71727273 switch (len) {7374 case 1:···9586 unsigned int devfn, int reg, int len, u32 value)9687{9788 unsigned long flags;8989+ u32 base;98909991 if ((bus > 255) || (devfn > 255) || (reg > 4095)) 10092 return -EINVAL;101939494+ base = get_base_addr(seg, bus, devfn);9595+ if (!base)9696+ return pci_conf1_write(seg,bus,devfn,reg,len,value);9797+10298 spin_lock_irqsave(&pci_config_lock, flags);10399104104- pci_exp_set_dev_base(seg, bus, devfn);100100+ pci_exp_set_dev_base(base, bus, devfn);105101106102 switch (len) {107103 case 1:···130116 .write = pci_mmcfg_write,131117};132118119119+/* K8 systems have some devices (typically in the builtin northbridge)120120+ that are only accessible using type1121121+ Normally this can be expressed in the MCFG by not listing them122122+ and assigning suitable _SEGs, but this isn't implemented in some BIOS.123123+ Instead try to discover all devices on bus 0 that are unreachable using MM124124+ and fallback for them.125125+ We only do this for bus 0/seg 0 */126126+static __init void unreachable_devices(void)127127+{128128+ int i;129129+ unsigned long flags;130130+131131+ for (i = 0; i < 32; i++) {132132+ u32 val1;133133+ u32 addr;134134+135135+ pci_conf1_read(0, 0, PCI_DEVFN(i, 0), 0, 4, &val1);136136+ if (val1 == 0xffffffff)137137+ continue;138138+139139+ /* Locking probably not needed, but safer */140140+ spin_lock_irqsave(&pci_config_lock, flags);141141+ addr = get_base_addr(0, 0, PCI_DEVFN(i, 0));142142+ if (addr != 0)143143+ pci_exp_set_dev_base(addr, 0, PCI_DEVFN(i, 0));144144+ if (addr == 0 || readl((u32 *)addr) != val1)145145+ set_bit(i, fallback_slots);146146+ spin_unlock_irqrestore(&pci_config_lock, flags);147147+ }148148+}149149+133150static int __init pci_mmcfg_init(void)134151{135152 if ((pci_probe & PCI_PROBE_MMCONF) == 0)···175130 printk(KERN_INFO "PCI: Using MMCONFIG\n");176131 raw_pci_ops = &pci_mmcfg;177132 pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF;133133+134134+ unreachable_devices();178135179136 out:180137 return 0;
+7
arch/i386/pci/pci.h
···74747575extern int (*pcibios_enable_irq)(struct pci_dev *dev);7676extern void (*pcibios_disable_irq)(struct pci_dev *dev);7777+7878+extern int pci_conf1_write(unsigned int seg, unsigned int bus,7979+ unsigned int devfn, int reg, int len, u32 value);8080+extern int pci_conf1_read(unsigned int seg, unsigned int bus,8181+ unsigned int devfn, int reg, int len, u32 *value);8282+8383+
···11#22# Automatically generated make config: don't edit33-# Linux kernel version: 2.6.13-rc644-# Tue Aug 16 14:40:41 200533+# Linux kernel version: 2.6.15-rc444+# Fri Dec 2 10:33:48 200555#6677#···1616# General setup1717#1818CONFIG_LOCALVERSION=""1919+# CONFIG_LOCALVERSION_AUTO is not set1920CONFIG_SWAP=y2021CONFIG_SYSVIPC=y2122CONFIG_POSIX_MQUEUE=y···2726CONFIG_KOBJECT_UEVENT=y2827# CONFIG_IKCONFIG is not set2928CONFIG_CPUSETS=y2929+CONFIG_INITRAMFS_SOURCE=""3030# CONFIG_EMBEDDED is not set3131CONFIG_KALLSYMS=y3232CONFIG_KALLSYMS_ALL=y···5856CONFIG_STOP_MACHINE=y59576058#5959+# Block layer6060+#6161+6262+#6363+# IO Schedulers6464+#6565+CONFIG_IOSCHED_NOOP=y6666+CONFIG_IOSCHED_AS=y6767+CONFIG_IOSCHED_DEADLINE=y6868+CONFIG_IOSCHED_CFQ=y6969+CONFIG_DEFAULT_AS=y7070+# CONFIG_DEFAULT_DEADLINE is not set7171+# CONFIG_DEFAULT_CFQ is not set7272+# CONFIG_DEFAULT_NOOP is not set7373+CONFIG_DEFAULT_IOSCHED="anticipatory"7474+7575+#6176# Processor type and features6277#6378CONFIG_IA64=y6479CONFIG_64BIT=y6580CONFIG_MMU=y8181+CONFIG_SWIOTLB=y6682CONFIG_RWSEM_XCHGADD_ALGORITHM=y6783CONFIG_GENERIC_CALIBRATE_DELAY=y6884CONFIG_TIME_INTERPOLATION=y···8868CONFIG_GENERIC_IOMAP=y8969CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y9070CONFIG_IA64_UNCACHED_ALLOCATOR=y7171+CONFIG_ZONE_DMA_IS_DMA32=y9172# CONFIG_IA64_GENERIC is not set9273# CONFIG_IA64_DIG is not set9374# CONFIG_IA64_HP_ZX1 is not set···10887# CONFIG_HZ_1000 is not set10988CONFIG_HZ=25011089CONFIG_IA64_L1_CACHE_SHIFT=7111111-CONFIG_NUMA=y112112-CONFIG_VIRTUAL_MEM_MAP=y113113-CONFIG_HOLES_IN_ZONE=y114114-CONFIG_ARCH_DISCONTIGMEM_ENABLE=y11590# CONFIG_IA64_CYCLONE is not set11691CONFIG_IOSAPIC=y11792CONFIG_IA64_SGI_SN_XP=m118118-CONFIG_FORCE_MAX_ZONEORDER=189393+CONFIG_FORCE_MAX_ZONEORDER=1711994CONFIG_SMP=y12095CONFIG_NR_CPUS=51212196# CONFIG_HOTPLUG_CPU is not set···124107CONFIG_DISCONTIGMEM=y125108CONFIG_FLAT_NODE_MEM_MAP=y126109CONFIG_NEED_MULTIPLE_NODES=y127127-CONFIG_HAVE_DEC_LOCK=y110110+# CONFIG_SPARSEMEM_STATIC is not set111111+CONFIG_SPLIT_PTLOCK_CPUS=4112112+CONFIG_ARCH_SELECT_MEMORY_MODEL=y113113+CONFIG_ARCH_DISCONTIGMEM_ENABLE=y114114+CONFIG_ARCH_FLATMEM_ENABLE=y115115+CONFIG_ARCH_SPARSEMEM_ENABLE=y116116+CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y117117+CONFIG_NUMA=y118118+CONFIG_VIRTUAL_MEM_MAP=y119119+CONFIG_HOLES_IN_ZONE=y120120+CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y128121CONFIG_IA32_SUPPORT=y129122CONFIG_COMPAT=y130123CONFIG_IA64_MCA_RECOVERY=y···153126# Power management and ACPI154127#155128CONFIG_PM=y156156-CONFIG_ACPI=y129129+# CONFIG_PM_LEGACY is not set130130+# CONFIG_PM_DEBUG is not set157131158132#159133# ACPI (Advanced Configuration and Power Interface) Support160134#135135+CONFIG_ACPI=y161136# CONFIG_ACPI_BUTTON is not set162137# CONFIG_ACPI_FAN is not set163138# CONFIG_ACPI_PROCESSOR is not set164139CONFIG_ACPI_NUMA=y140140+CONFIG_ACPI_BLACKLIST_YEAR=0165141# CONFIG_ACPI_DEBUG is not set166142CONFIG_ACPI_POWER=y167143CONFIG_ACPI_SYSTEM=y168144# CONFIG_ACPI_CONTAINER is not set145145+146146+#147147+# CPU Frequency scaling148148+#149149+# CONFIG_CPU_FREQ is not set169150170151#171152# Bus options (PCI, PCMCIA)···182147CONFIG_PCI_DOMAINS=y183148# CONFIG_PCI_MSI is not set184149CONFIG_PCI_LEGACY_PROC=y185185-CONFIG_PCI_NAMES=y186150# CONFIG_PCI_DEBUG is not set187151188152#···225191# CONFIG_INET_ESP is not set226192# CONFIG_INET_IPCOMP is not set227193# CONFIG_INET_TUNNEL is not set228228-CONFIG_IP_TCPDIAG=y229229-# CONFIG_IP_TCPDIAG_IPV6 is not set194194+CONFIG_INET_DIAG=m195195+CONFIG_INET_TCP_DIAG=m230196# CONFIG_TCP_CONG_ADVANCED is not set231197CONFIG_TCP_CONG_BIC=y232198CONFIG_IPV6=m···237203# CONFIG_INET6_TUNNEL is not set238204# CONFIG_IPV6_TUNNEL is not set239205# CONFIG_NETFILTER is not set206206+207207+#208208+# DCCP Configuration (EXPERIMENTAL)209209+#210210+# CONFIG_IP_DCCP is not set240211241212#242213# SCTP Configuration (EXPERIMENTAL)···259220# CONFIG_NET_DIVERT is not set260221# CONFIG_ECONET is not set261222# CONFIG_WAN_ROUTER is not set223223+224224+#225225+# QoS and/or fair queueing226226+#262227# CONFIG_NET_SCHED is not set263263-# CONFIG_NET_CLS_ROUTE is not set264228265229#266230# Network testing···272230# CONFIG_HAMRADIO is not set273231# CONFIG_IRDA is not set274232# CONFIG_BT is not set233233+# CONFIG_IEEE80211 is not set275234276235#277236# Device Drivers···285242CONFIG_PREVENT_FIRMWARE_BUILD=y286243CONFIG_FW_LOADER=y287244# CONFIG_DEBUG_DRIVER is not set245245+246246+#247247+# Connector - unified userspace <-> kernelspace linker248248+#249249+# CONFIG_CONNECTOR is not set288250289251#290252# Memory Technology Devices (MTD)···323275CONFIG_BLK_DEV_RAM_COUNT=16324276CONFIG_BLK_DEV_RAM_SIZE=4096325277CONFIG_BLK_DEV_INITRD=y326326-CONFIG_INITRAMFS_SOURCE=""327278# CONFIG_CDROM_PKTCDVD is not set328328-329329-#330330-# IO Schedulers331331-#332332-CONFIG_IOSCHED_NOOP=y333333-CONFIG_IOSCHED_AS=y334334-CONFIG_IOSCHED_DEADLINE=y335335-CONFIG_IOSCHED_CFQ=y336279CONFIG_ATA_OVER_ETH=m337280338281#···388349#389350# SCSI device support390351#352352+# CONFIG_RAID_ATTRS is not set391353CONFIG_SCSI=y392354CONFIG_SCSI_PROC_FS=y393355···415375#416376CONFIG_SCSI_SPI_ATTRS=y417377CONFIG_SCSI_FC_ATTRS=y418418-# CONFIG_SCSI_ISCSI_ATTRS is not set378378+CONFIG_SCSI_ISCSI_ATTRS=m379379+CONFIG_SCSI_SAS_ATTRS=y419380420381#421382# SCSI low-level drivers422383#384384+CONFIG_ISCSI_TCP=m423385# CONFIG_BLK_DEV_3W_XXXX_RAID is not set424386# CONFIG_SCSI_3W_9XXX is not set425387# CONFIG_SCSI_ACARD is not set···431389# CONFIG_SCSI_AIC79XX is not set432390# CONFIG_MEGARAID_NEWGEN is not set433391# CONFIG_MEGARAID_LEGACY is not set392392+# CONFIG_MEGARAID_SAS is not set434393CONFIG_SCSI_SATA=y435394# CONFIG_SCSI_SATA_AHCI is not set436395# CONFIG_SCSI_SATA_SVW is not set437396# CONFIG_SCSI_ATA_PIIX is not set397397+# CONFIG_SCSI_SATA_MV is not set438398# CONFIG_SCSI_SATA_NV is not set439439-# CONFIG_SCSI_SATA_PROMISE is not set399399+# CONFIG_SCSI_PDC_ADMA is not set440400# CONFIG_SCSI_SATA_QSTOR is not set401401+# CONFIG_SCSI_SATA_PROMISE is not set441402# CONFIG_SCSI_SATA_SX4 is not set442403# CONFIG_SCSI_SATA_SIL is not set404404+# CONFIG_SCSI_SATA_SIL24 is not set443405# CONFIG_SCSI_SATA_SIS is not set444406# CONFIG_SCSI_SATA_ULI is not set445407# CONFIG_SCSI_SATA_VIA is not set···457411# CONFIG_SCSI_IPR is not set458412# CONFIG_SCSI_QLOGIC_FC is not set459413CONFIG_SCSI_QLOGIC_1280=y460460-# CONFIG_SCSI_QLOGIC_1280_1040 is not set461414CONFIG_SCSI_QLA2XXX=y462415# CONFIG_SCSI_QLA21XX is not set463416CONFIG_SCSI_QLA22XX=y···496451CONFIG_FUSION=y497452CONFIG_FUSION_SPI=y498453CONFIG_FUSION_FC=y454454+CONFIG_FUSION_SAS=y499455CONFIG_FUSION_MAX_SGE=128500456CONFIG_FUSION_CTL=m501457···525479# CONFIG_ARCNET is not set526480527481#482482+# PHY device support483483+#484484+485485+#528486# Ethernet (10 or 100Mbit)529487#530488# CONFIG_NET_ETHERNET is not set···543493# CONFIG_HAMACHI is not set544494# CONFIG_YELLOWFIN is not set545495# CONFIG_R8169 is not set496496+# CONFIG_SIS190 is not set546497# CONFIG_SKGE is not set547498# CONFIG_SK98LIN is not set548499CONFIG_TIGON3=y···552501#553502# Ethernet (10000 Mbit)554503#504504+CONFIG_CHELSIO_T1=m555505# CONFIG_IXGB is not set556506CONFIG_S2IO=m557507# CONFIG_S2IO_NAPI is not set558558-# CONFIG_2BUFF_MODE is not set559508560509#561510# Token Ring devices···634583CONFIG_SERIAL_NONSTANDARD=y635584# CONFIG_ROCKETPORT is not set636585# CONFIG_CYCLADES is not set586586+# CONFIG_DIGIEPCA is not set637587# CONFIG_MOXA_SMARTIO is not set638588# CONFIG_ISI is not set639589# CONFIG_SYNCLINKMP is not set···681629#682630# Ftape, the floppy tape device driver683631#684684-# CONFIG_AGP is not set632632+CONFIG_AGP=y633633+CONFIG_AGP_SGI_TIOCA=y685634# CONFIG_DRM is not set686635CONFIG_RAW_DRIVER=m687636# CONFIG_HPET is not set···694641# TPM devices695642#696643# CONFIG_TCG_TPM is not set644644+# CONFIG_TELCLOCK is not set697645698646#699647# I2C support700648#701649# CONFIG_I2C is not set702702-# CONFIG_I2C_SENSOR is not set703650704651#705652# Dallas's 1-wire bus···710657# Hardware Monitoring support711658#712659# CONFIG_HWMON is not set660660+# CONFIG_HWMON_VID is not set713661714662#715663# Misc devices664664+#665665+666666+#667667+# Multimedia Capabilities Port drivers716668#717669718670#···779721#780722# USB Device Class drivers781723#782782-# CONFIG_USB_BLUETOOTH_TTY is not set783724# CONFIG_USB_ACM is not set784725# CONFIG_USB_PRINTER is not set785726786727#787787-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information728728+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'729729+#730730+731731+#732732+# may also be needed; see USB_STORAGE Help for more information788733#789734# CONFIG_USB_STORAGE is not set790735···812751# CONFIG_USB_MTOUCH is not set813752# CONFIG_USB_ITMTOUCH is not set814753# CONFIG_USB_EGALAX is not set754754+# CONFIG_USB_YEALINK is not set815755# CONFIG_USB_XPAD is not set816756# CONFIG_USB_ATI_REMOTE is not set817757# CONFIG_USB_KEYSPAN_REMOTE is not set758758+# CONFIG_USB_APPLETOUCH is not set818759819760#820761# USB Imaging devices···887824# InfiniBand support888825#889826CONFIG_INFINIBAND=m890890-CONFIG_INFINIBAND_USER_VERBS=m827827+# CONFIG_INFINIBAND_USER_MAD is not set828828+CONFIG_INFINIBAND_USER_ACCESS=m891829CONFIG_INFINIBAND_MTHCA=m892830# CONFIG_INFINIBAND_MTHCA_DEBUG is not set893831CONFIG_INFINIBAND_IPOIB=m894832# CONFIG_INFINIBAND_IPOIB_DEBUG is not set833833+CONFIG_INFINIBAND_SRP=m895834896835#897836# SN Devices···923858CONFIG_REISERFS_FS_SECURITY=y924859# CONFIG_JFS_FS is not set925860CONFIG_FS_POSIX_ACL=y926926-927927-#928928-# XFS support929929-#930861CONFIG_XFS_FS=y931862CONFIG_XFS_EXPORT=y932932-CONFIG_XFS_RT=y933863CONFIG_XFS_QUOTA=y934864# CONFIG_XFS_SECURITY is not set935865CONFIG_XFS_POSIX_ACL=y866866+CONFIG_XFS_RT=y936867# CONFIG_MINIX_FS is not set937868# CONFIG_ROMFS_FS is not set938869CONFIG_INOTIFY=y···939878CONFIG_DNOTIFY=y940879CONFIG_AUTOFS_FS=m941880CONFIG_AUTOFS4_FS=m881881+CONFIG_FUSE_FS=m942882943883#944884# CD-ROM/DVD Filesystems···966904CONFIG_PROC_FS=y967905CONFIG_PROC_KCORE=y968906CONFIG_SYSFS=y969969-# CONFIG_DEVPTS_FS_XATTR is not set970907CONFIG_TMPFS=y971971-CONFIG_TMPFS_XATTR=y972972-CONFIG_TMPFS_SECURITY=y973908CONFIG_HUGETLBFS=y974909CONFIG_HUGETLB_PAGE=y975910CONFIG_RAMFS=y911911+CONFIG_RELAYFS_FS=m976912977913#978914# Miscellaneous filesystems···1019959# CONFIG_NCP_FS is not set1020960# CONFIG_CODA_FS is not set1021961# CONFIG_AFS_FS is not set962962+# CONFIG_9P_FS is not set10229631023964#1024965# Partition Types···10891028# Library routines10901029#10911030# CONFIG_CRC_CCITT is not set10311031+CONFIG_CRC16=m10921032CONFIG_CRC32=y10931093-# CONFIG_LIBCRC32C is not set10331033+CONFIG_LIBCRC32C=m10941034CONFIG_ZLIB_INFLATE=m10951035CONFIG_ZLIB_DEFLATE=m10961036CONFIG_GENERIC_ALLOCATOR=y10971037CONFIG_GENERIC_HARDIRQS=y10981038CONFIG_GENERIC_IRQ_PROBE=y10391039+CONFIG_GENERIC_PENDING_IRQ=y1099104011001041#11011101-# Profiling support10421042+# Instrumentation Support11021043#11031044# CONFIG_PROFILING is not set10451045+# CONFIG_KPROBES is not set1104104611051047#11061048# Kernel hacking···11121048CONFIG_DEBUG_KERNEL=y11131049CONFIG_MAGIC_SYSRQ=y11141050CONFIG_LOG_BUF_SHIFT=2010511051+CONFIG_DETECT_SOFTLOCKUP=y11151052# CONFIG_SCHEDSTATS is not set11161053# CONFIG_DEBUG_SLAB is not set11171054CONFIG_DEBUG_PREEMPT=y···11211056# CONFIG_DEBUG_KOBJECT is not set11221057CONFIG_DEBUG_INFO=y11231058# CONFIG_DEBUG_FS is not set11241124-# CONFIG_KPROBES is not set10591059+# CONFIG_DEBUG_VM is not set10601060+# CONFIG_RCU_TORTURE_TEST is not set11251061CONFIG_IA64_GRANULE_16MB=y11261062# CONFIG_IA64_GRANULE_64MB is not set11271063# CONFIG_IA64_PRINT_HAZARDS is not set···11631097# CONFIG_CRYPTO_ANUBIS is not set11641098CONFIG_CRYPTO_DEFLATE=m11651099# CONFIG_CRYPTO_MICHAEL_MIC is not set11661166-# CONFIG_CRYPTO_CRC32C is not set11001100+CONFIG_CRYPTO_CRC32C=m11671101# CONFIG_CRYPTO_TEST is not set1168110211691103#
+50-24
arch/ia64/configs/tiger_defconfig
···11#22# Automatically generated make config: don't edit33-# Linux kernel version: 2.6.14-rc144-# Wed Sep 14 15:17:57 200533+# Linux kernel version: 2.6.15-rc444+# Fri Dec 2 16:06:32 200555#6677#···5959CONFIG_STOP_MACHINE=y60606161#6262+# Block layer6363+#6464+6565+#6666+# IO Schedulers6767+#6868+CONFIG_IOSCHED_NOOP=y6969+CONFIG_IOSCHED_AS=y7070+CONFIG_IOSCHED_DEADLINE=y7171+CONFIG_IOSCHED_CFQ=y7272+CONFIG_DEFAULT_AS=y7373+# CONFIG_DEFAULT_DEADLINE is not set7474+# CONFIG_DEFAULT_CFQ is not set7575+# CONFIG_DEFAULT_NOOP is not set7676+CONFIG_DEFAULT_IOSCHED="anticipatory"7777+7878+#6279# Processor type and features6380#6481CONFIG_IA64=y6582CONFIG_64BIT=y6683CONFIG_MMU=y8484+CONFIG_SWIOTLB=y6785CONFIG_RWSEM_XCHGADD_ALGORITHM=y6886CONFIG_GENERIC_CALIBRATE_DELAY=y6987CONFIG_TIME_INTERPOLATION=y7088CONFIG_EFI=y7189CONFIG_GENERIC_IOMAP=y7290CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y9191+CONFIG_ZONE_DMA_IS_DMA32=y7392# CONFIG_IA64_GENERIC is not set7493CONFIG_IA64_DIG=y7594# CONFIG_IA64_HP_ZX1 is not set···10182# CONFIG_IA64_PAGE_SIZE_8KB is not set10283CONFIG_IA64_PAGE_SIZE_16KB=y10384# CONFIG_IA64_PAGE_SIZE_64KB is not set8585+CONFIG_PGTABLE_3=y8686+# CONFIG_PGTABLE_4 is not set10487# CONFIG_HZ_100 is not set10588CONFIG_HZ_250=y10689# CONFIG_HZ_1000 is not set10790CONFIG_HZ=25010891CONFIG_IA64_L1_CACHE_SHIFT=7109109-# CONFIG_NUMA is not set110110-CONFIG_VIRTUAL_MEM_MAP=y111111-CONFIG_HOLES_IN_ZONE=y11292CONFIG_IA64_CYCLONE=y11393CONFIG_IOSAPIC=y114114-# CONFIG_IA64_SGI_SN_XP is not set115115-CONFIG_FORCE_MAX_ZONEORDER=189494+CONFIG_FORCE_MAX_ZONEORDER=1711695CONFIG_SMP=y11796CONFIG_NR_CPUS=411897CONFIG_HOTPLUG_CPU=y···123106CONFIG_FLATMEM=y124107CONFIG_FLAT_NODE_MEM_MAP=y125108# CONFIG_SPARSEMEM_STATIC is not set126126-CONFIG_HAVE_DEC_LOCK=y109109+CONFIG_SPLIT_PTLOCK_CPUS=4110110+CONFIG_ARCH_SELECT_MEMORY_MODEL=y111111+CONFIG_ARCH_DISCONTIGMEM_ENABLE=y112112+CONFIG_ARCH_FLATMEM_ENABLE=y113113+CONFIG_ARCH_SPARSEMEM_ENABLE=y114114+CONFIG_VIRTUAL_MEM_MAP=y115115+CONFIG_HOLES_IN_ZONE=y127116CONFIG_IA32_SUPPORT=y128117CONFIG_COMPAT=y129118CONFIG_IA64_MCA_RECOVERY=y···141118#142119CONFIG_EFI_VARS=y143120CONFIG_EFI_PCDP=y144144-# CONFIG_DELL_RBU is not set145121CONFIG_BINFMT_ELF=y146122CONFIG_BINFMT_MISC=m147123···148126# Power management and ACPI149127#150128CONFIG_PM=y129129+CONFIG_PM_LEGACY=y151130# CONFIG_PM_DEBUG is not set152131153132#···249226# CONFIG_NET_DIVERT is not set250227# CONFIG_ECONET is not set251228# CONFIG_WAN_ROUTER is not set229229+230230+#231231+# QoS and/or fair queueing232232+#252233# CONFIG_NET_SCHED is not set253253-# CONFIG_NET_CLS_ROUTE is not set254234255235#256236# Network testing257237#258238# CONFIG_NET_PKTGEN is not set259259-# CONFIG_NETFILTER_NETLINK is not set260239# CONFIG_HAMRADIO is not set261240# CONFIG_IRDA is not set262241# CONFIG_BT is not set···320295CONFIG_BLK_DEV_RAM_SIZE=4096321296CONFIG_BLK_DEV_INITRD=y322297# CONFIG_CDROM_PKTCDVD is not set323323-324324-#325325-# IO Schedulers326326-#327327-CONFIG_IOSCHED_NOOP=y328328-CONFIG_IOSCHED_AS=y329329-CONFIG_IOSCHED_DEADLINE=y330330-CONFIG_IOSCHED_CFQ=y331298# CONFIG_ATA_OVER_ETH is not set332299333300#···417400#418401# SCSI low-level drivers419402#403403+# CONFIG_ISCSI_TCP is not set420404# CONFIG_BLK_DEV_3W_XXXX_RAID is not set421405# CONFIG_SCSI_3W_9XXX is not set422406# CONFIG_SCSI_ACARD is not set···427409# CONFIG_SCSI_AIC79XX is not set428410# CONFIG_MEGARAID_NEWGEN is not set429411# CONFIG_MEGARAID_LEGACY is not set412412+# CONFIG_MEGARAID_SAS is not set430413# CONFIG_SCSI_SATA is not set431414# CONFIG_SCSI_DMX3191D is not set432415# CONFIG_SCSI_FUTURE_DOMAIN is not set···443424CONFIG_SCSI_QLOGIC_FC=y444425# CONFIG_SCSI_QLOGIC_FC_FIRMWARE is not set445426CONFIG_SCSI_QLOGIC_1280=y446446-# CONFIG_SCSI_QLOGIC_1280_1040 is not set447427CONFIG_SCSI_QLA2XXX=y448428CONFIG_SCSI_QLA21XX=m449429CONFIG_SCSI_QLA22XX=m···481463CONFIG_FUSION=y482464CONFIG_FUSION_SPI=y483465CONFIG_FUSION_FC=y466466+# CONFIG_FUSION_SAS is not set484467CONFIG_FUSION_MAX_SGE=128485468CONFIG_FUSION_CTL=y486469···522503CONFIG_MII=m523504# CONFIG_HAPPYMEAL is not set524505# CONFIG_SUNGEM is not set506506+# CONFIG_CASSINI is not set525507# CONFIG_NET_VENDOR_3COM is not set526508527509#···747727# TPM devices748728#749729# CONFIG_TCG_TPM is not set730730+# CONFIG_TELCLOCK is not set750731751732#752733# I2C support···833812#834813# USB Device Class drivers835814#836836-# CONFIG_USB_BLUETOOTH_TTY is not set837815# CONFIG_USB_ACM is not set838816# CONFIG_USB_PRINTER is not set839817840818#841841-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information819819+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'820820+#821821+822822+#823823+# may also be needed; see USB_STORAGE Help for more information842824#843825CONFIG_USB_STORAGE=m844826# CONFIG_USB_STORAGE_DEBUG is not set···11471123CONFIG_GENERIC_PENDING_IRQ=y1148112411491125#11501150-# Profiling support11261126+# Instrumentation Support11511127#11521128# CONFIG_PROFILING is not set11291129+# CONFIG_KPROBES is not set1153113011541131#11551132# Kernel hacking···11671142# CONFIG_DEBUG_KOBJECT is not set11681143# CONFIG_DEBUG_INFO is not set11691144# CONFIG_DEBUG_FS is not set11701170-# CONFIG_KPROBES is not set11451145+# CONFIG_DEBUG_VM is not set11461146+# CONFIG_RCU_TORTURE_TEST is not set11711147CONFIG_IA64_GRANULE_16MB=y11721148# CONFIG_IA64_GRANULE_64MB is not set11731149# CONFIG_IA64_PRINT_HAZARDS is not set
-2
arch/ia64/ia32/binfmt_elf32.c
···261261{262262 set_personality(PER_LINUX32);263263 current->thread.map_base = IA32_PAGE_OFFSET/3;264264- current->thread.task_size = IA32_PAGE_OFFSET; /* use what Linux/x86 uses... */265265- set_fs(USER_DS); /* set addr limit for new TASK_SIZE */266264}267265268266static unsigned long
···721721 /* drop floating-point and debug-register state if it exists: */722722 current->thread.flags &= ~(IA64_THREAD_FPH_VALID | IA64_THREAD_DBG_VALID);723723 ia64_drop_fpu(current);724724- if (IS_IA32_PROCESS(ia64_task_regs(current)))724724+ if (IS_IA32_PROCESS(ia64_task_regs(current))) {725725 ia32_drop_partial_page_list(current);726726+ current->thread.task_size = IA32_PAGE_OFFSET;727727+ set_fs(USER_DS);728728+ }726729}727730728731/*
+1-1
arch/ia64/kernel/salinfo.c
···293293 if (file->f_flags & O_NONBLOCK)294294 return -EAGAIN;295295 if (down_interruptible(&data->sem))296296- return -ERESTARTSYS;296296+ return -EINTR;297297 }298298299299 n = data->cpu_check;
+3-1
arch/ia64/mm/discontig.c
···5050 * To prevent cache aliasing effects, align per-node structures so that they5151 * start at addresses that are strided by node number.5252 */5353+#define MAX_NODE_ALIGN_OFFSET (32 * 1024 * 1024)5354#define NODEDATA_ALIGN(addr, node) \5454- ((((addr) + 1024*1024-1) & ~(1024*1024-1)) + (node)*PERCPU_PAGE_SIZE)5555+ ((((addr) + 1024*1024-1) & ~(1024*1024-1)) + \5656+ (((node)*PERCPU_PAGE_SIZE) & (MAX_NODE_ALIGN_OFFSET - 1)))55575658/**5759 * build_node_maps - callback to setup bootmem structs for each node
+131-22
arch/ia64/sn/kernel/io_init.c
···33 * License. See the file "COPYING" in the main directory of this archive44 * for more details.55 *66- * Copyright (C) 1992 - 1997, 2000-2004 Silicon Graphics, Inc. All rights reserved.66+ * Copyright (C) 1992 - 1997, 2000-2005 Silicon Graphics, Inc. All rights reserved.77 */8899#include <linux/bootmem.h>···147147}148148149149/*150150+ * sn_pcidev_info_get() - Retrieve the pcidev_info struct for the specified151151+ * device.152152+ */153153+inline struct pcidev_info *154154+sn_pcidev_info_get(struct pci_dev *dev)155155+{156156+ struct pcidev_info *pcidev;157157+158158+ list_for_each_entry(pcidev,159159+ &(SN_PCI_CONTROLLER(dev)->pcidev_info), pdi_list) {160160+ if (pcidev->pdi_linux_pcidev == dev) {161161+ return pcidev;162162+ }163163+ }164164+ return NULL;165165+}166166+167167+/*150168 * sn_fixup_ionodes() - This routine initializes the HUB data strcuture for 151169 * each node in the system.152170 */···247229248230}249231232232+/*233233+ * sn_pci_window_fixup() - Create a pci_window for each device resource.234234+ * Until ACPI support is added, we need this code235235+ * to setup pci_windows for use by236236+ * pcibios_bus_to_resource(),237237+ * pcibios_resource_to_bus(), etc.238238+ */239239+static void240240+sn_pci_window_fixup(struct pci_dev *dev, unsigned int count,241241+ int64_t * pci_addrs)242242+{243243+ struct pci_controller *controller = PCI_CONTROLLER(dev->bus);244244+ unsigned int i;245245+ unsigned int idx;246246+ unsigned int new_count;247247+ struct pci_window *new_window;248248+249249+ if (count == 0)250250+ return;251251+ idx = controller->windows;252252+ new_count = controller->windows + count;253253+ new_window = kcalloc(new_count, sizeof(struct pci_window), GFP_KERNEL);254254+ if (new_window == NULL)255255+ BUG();256256+ if (controller->window) {257257+ memcpy(new_window, controller->window,258258+ sizeof(struct pci_window) * controller->windows);259259+ kfree(controller->window);260260+ }261261+262262+ /* Setup a pci_window for each device resource. */263263+ for (i = 0; i <= PCI_ROM_RESOURCE; i++) {264264+ if (pci_addrs[i] == -1)265265+ continue;266266+267267+ new_window[idx].offset = dev->resource[i].start - pci_addrs[i];268268+ new_window[idx].resource = dev->resource[i];269269+ idx++;270270+ }271271+272272+ controller->windows = new_count;273273+ controller->window = new_window;274274+}275275+250276void sn_pci_unfixup_slot(struct pci_dev *dev)251277{252278 struct pci_dev *host_pci_dev = SN_PCIDEV_INFO(dev)->host_pci_dev;···308246 */309247void sn_pci_fixup_slot(struct pci_dev *dev)310248{249249+ unsigned int count = 0;311250 int idx;312251 int segment = pci_domain_nr(dev->bus);313252 int status = 0;314253 struct pcibus_bussoft *bs;315254 struct pci_bus *host_pci_bus;316255 struct pci_dev *host_pci_dev;256256+ struct pcidev_info *pcidev_info;257257+ int64_t pci_addrs[PCI_ROM_RESOURCE + 1];317258 struct sn_irq_info *sn_irq_info;318259 unsigned long size;319260 unsigned int bus_no, devfn;320261321262 pci_dev_get(dev); /* for the sysdata pointer */322322- dev->sysdata = kmalloc(sizeof(struct pcidev_info), GFP_KERNEL);323323- if (SN_PCIDEV_INFO(dev) <= 0)263263+ pcidev_info = kzalloc(sizeof(struct pcidev_info), GFP_KERNEL);264264+ if (pcidev_info <= 0)324265 BUG(); /* Cannot afford to run out of memory */325325- memset(SN_PCIDEV_INFO(dev), 0, sizeof(struct pcidev_info));326266327267 sn_irq_info = kmalloc(sizeof(struct sn_irq_info), GFP_KERNEL);328268 if (sn_irq_info <= 0)···334270 /* Call to retrieve pci device information needed by kernel. */335271 status = sal_get_pcidev_info((u64) segment, (u64) dev->bus->number, 336272 dev->devfn,337337- (u64) __pa(SN_PCIDEV_INFO(dev)),273273+ (u64) __pa(pcidev_info),338274 (u64) __pa(sn_irq_info));339275 if (status)340276 BUG(); /* Cannot get platform pci device information */277277+278278+ /* Add pcidev_info to list in sn_pci_controller struct */279279+ list_add_tail(&pcidev_info->pdi_list,280280+ &(SN_PCI_CONTROLLER(dev->bus)->pcidev_info));341281342282 /* Copy over PIO Mapped Addresses */343283 for (idx = 0; idx <= PCI_ROM_RESOURCE; idx++) {344284 unsigned long start, end, addr;345285346346- if (!SN_PCIDEV_INFO(dev)->pdi_pio_mapped_addr[idx])286286+ if (!pcidev_info->pdi_pio_mapped_addr[idx]) {287287+ pci_addrs[idx] = -1;347288 continue;289289+ }348290349291 start = dev->resource[idx].start;350292 end = dev->resource[idx].end;351293 size = end - start;352352- addr = SN_PCIDEV_INFO(dev)->pdi_pio_mapped_addr[idx];294294+ if (size == 0) {295295+ pci_addrs[idx] = -1;296296+ continue;297297+ }298298+ pci_addrs[idx] = start;299299+ count++;300300+ addr = pcidev_info->pdi_pio_mapped_addr[idx];353301 addr = ((addr << 4) >> 4) | __IA64_UNCACHED_OFFSET;354302 dev->resource[idx].start = addr;355303 dev->resource[idx].end = addr + size;···370294 else371295 dev->resource[idx].parent = &iomem_resource;372296 }297297+ /* Create a pci_window in the pci_controller struct for298298+ * each device resource.299299+ */300300+ if (count > 0)301301+ sn_pci_window_fixup(dev, count, pci_addrs);373302374303 /*375304 * Using the PROMs values for the PCI host bus, get the Linux376305 * PCI host_pci_dev struct and set up host bus linkages377306 */378307379379- bus_no = (SN_PCIDEV_INFO(dev)->pdi_slot_host_handle >> 32) & 0xff;380380- devfn = SN_PCIDEV_INFO(dev)->pdi_slot_host_handle & 0xffffffff;308308+ bus_no = (pcidev_info->pdi_slot_host_handle >> 32) & 0xff;309309+ devfn = pcidev_info->pdi_slot_host_handle & 0xffffffff;381310 host_pci_bus = pci_find_bus(segment, bus_no);382311 host_pci_dev = pci_get_slot(host_pci_bus, devfn);383312384384- SN_PCIDEV_INFO(dev)->host_pci_dev = host_pci_dev;385385- SN_PCIDEV_INFO(dev)->pdi_host_pcidev_info =386386- SN_PCIDEV_INFO(host_pci_dev);387387- SN_PCIDEV_INFO(dev)->pdi_linux_pcidev = dev;313313+ pcidev_info->host_pci_dev = host_pci_dev;314314+ pcidev_info->pdi_linux_pcidev = dev;315315+ pcidev_info->pdi_host_pcidev_info = SN_PCIDEV_INFO(host_pci_dev);388316 bs = SN_PCIBUS_BUSSOFT(dev->bus);389389- SN_PCIDEV_INFO(dev)->pdi_pcibus_info = bs;317317+ pcidev_info->pdi_pcibus_info = bs;390318391319 if (bs && bs->bs_asic_type < PCIIO_ASIC_MAX_TYPES) {392320 SN_PCIDEV_BUSPROVIDER(dev) = sn_pci_provider[bs->bs_asic_type];···400320401321 /* Only set up IRQ stuff if this device has a host bus context */402322 if (bs && sn_irq_info->irq_irq) {403403- SN_PCIDEV_INFO(dev)->pdi_sn_irq_info = sn_irq_info;404404- dev->irq = SN_PCIDEV_INFO(dev)->pdi_sn_irq_info->irq_irq;323323+ pcidev_info->pdi_sn_irq_info = sn_irq_info;324324+ dev->irq = pcidev_info->pdi_sn_irq_info->irq_irq;405325 sn_irq_fixup(dev, sn_irq_info);406326 } else {407407- SN_PCIDEV_INFO(dev)->pdi_sn_irq_info = NULL;327327+ pcidev_info->pdi_sn_irq_info = NULL;408328 kfree(sn_irq_info);409329 }410330}···418338 int status = 0;419339 int nasid, cnode;420340 struct pci_controller *controller;341341+ struct sn_pci_controller *sn_controller;421342 struct pcibus_bussoft *prom_bussoft_ptr;422343 struct hubdev_info *hubdev_info;423344 void *provider_soft = NULL;···430349 return; /*bus # does not exist */431350 prom_bussoft_ptr = __va(prom_bussoft_ptr);432351433433- controller = kzalloc(sizeof(struct pci_controller), GFP_KERNEL);352352+ /* Allocate a sn_pci_controller, which has a pci_controller struct353353+ * as the first member.354354+ */355355+ sn_controller = kzalloc(sizeof(struct sn_pci_controller), GFP_KERNEL);356356+ if (!sn_controller)357357+ BUG();358358+ INIT_LIST_HEAD(&sn_controller->pcidev_info);359359+ controller = &sn_controller->pci_controller;434360 controller->segment = segment;435435- if (!controller)436436- BUG();437361438362 if (bus == NULL) {439363 bus = pci_scan_bus(busnum, &pci_root_ops, controller);···476390 }477391478392 /*393393+ * Setup pci_windows for legacy IO and MEM space.394394+ * (Temporary until ACPI support is in place.)395395+ */396396+ controller->window = kcalloc(2, sizeof(struct pci_window), GFP_KERNEL);397397+ if (controller->window == NULL)398398+ BUG();399399+ controller->window[0].offset = prom_bussoft_ptr->bs_legacy_io;400400+ controller->window[0].resource.name = "legacy_io";401401+ controller->window[0].resource.flags = IORESOURCE_IO;402402+ controller->window[0].resource.start = prom_bussoft_ptr->bs_legacy_io;403403+ controller->window[0].resource.end =404404+ controller->window[0].resource.start + 0xffff;405405+ controller->window[0].resource.parent = &ioport_resource;406406+ controller->window[1].offset = prom_bussoft_ptr->bs_legacy_mem;407407+ controller->window[1].resource.name = "legacy_mem";408408+ controller->window[1].resource.flags = IORESOURCE_MEM;409409+ controller->window[1].resource.start = prom_bussoft_ptr->bs_legacy_mem;410410+ controller->window[1].resource.end =411411+ controller->window[1].resource.start + (1024 * 1024) - 1;412412+ controller->window[1].resource.parent = &iomem_resource;413413+ controller->windows = 2;414414+415415+ /*479416 * Generic bus fixup goes here. Don't reference prom_bussoft_ptr480417 * after this point.481418 */···530421531422error_return:532423533533- kfree(controller);424424+ kfree(sn_controller);534425 return;535426}536427···543434 dev_dbg(dev, "%s: out of memory!\n", __FUNCTION__);544435 return;545436 }546546- element->sysdata = dev->sysdata;437437+ element->sysdata = SN_PCIDEV_INFO(dev);547438 list_add(&element->entry, &sn_sysdata_list);548439}549440
+6-2
arch/ia64/sn/kernel/sn2/ptc_deadlock.S
···3939 mov r8=r0404041411:4242+ cmp.ne p8,p9=r0,ptc1 // Test for shub type (ptc1 non-null on shub1)4343+ // p8 = 1 if shub1, p9 = 1 if shub24444+4245 add scr2=ALIAS_OFFSET,piowc // Address of WRITE_STATUS alias register 4343- ;;4444- ld8.acq scr1=[scr2];;4646+ mov scr1=7;; // Clear DEADLOCK, WRITE_ERROR, MULTI_WRITE_ERROR4747+(p8) st8.rel [scr2]=scr1;;4848+(p9) ld8.acq scr1=[scr2];;454946505: ld8.acq scr1=[piowc];; // Wait for PIOs to complete.4751 hint @pause
···227227 If you don't know what to do here, say N.228228229229config NR_CPUS230230- int "Maximum number of CPUs (2-32)"230230+ int "Maximum number of CPUs (2-128)"231231 range 2 128232232 depends on SMP233233 default "32" if PPC64
···102102dev_t boot_dev;103103u64 ppc64_pft_size;104104105105-struct ppc64_caches ppc64_caches;105105+/* Pick defaults since we might want to patch instructions106106+ * before we've read this from the device tree.107107+ */108108+struct ppc64_caches ppc64_caches = {109109+ .dline_size = 0x80,110110+ .log_dline_size = 7,111111+ .iline_size = 0x80,112112+ .log_iline_size = 7113113+};106114EXPORT_SYMBOL_GPL(ppc64_caches);107115108116/*
+1-1
arch/powerpc/mm/hash_utils_64.c
···601601 /* Handle hugepage regions */602602 if (unlikely(in_hugepage_area(mm->context, ea))) {603603 DBG_LOW(" -> huge page !\n");604604- return hash_huge_page(mm, access, ea, vsid, local);604604+ return hash_huge_page(mm, access, ea, vsid, local, trap);605605 }606606607607 /* Get PTE and page size from page tables */
+79-20
arch/powerpc/mm/hugetlbpage.c
···148148 return 0;149149}150150151151+struct slb_flush_info {152152+ struct mm_struct *mm;153153+ u16 newareas;154154+};155155+151156static void flush_low_segments(void *parm)152157{153153- u16 areas = (unsigned long) parm;158158+ struct slb_flush_info *fi = parm;154159 unsigned long i;155160161161+ BUILD_BUG_ON((sizeof(fi->newareas)*8) != NUM_LOW_AREAS);162162+163163+ if (current->active_mm != fi->mm)164164+ return;165165+166166+ /* Only need to do anything if this CPU is working in the same167167+ * mm as the one which has changed */168168+169169+ /* update the paca copy of the context struct */170170+ get_paca()->context = current->active_mm->context;171171+156172 asm volatile("isync" : : : "memory");157157-158158- BUILD_BUG_ON((sizeof(areas)*8) != NUM_LOW_AREAS);159159-160173 for (i = 0; i < NUM_LOW_AREAS; i++) {161161- if (! (areas & (1U << i)))174174+ if (! (fi->newareas & (1U << i)))162175 continue;163176 asm volatile("slbie %0"164177 : : "r" ((i << SID_SHIFT) | SLBIE_C));165178 }166166-167179 asm volatile("isync" : : : "memory");168180}169181170182static void flush_high_segments(void *parm)171183{172172- u16 areas = (unsigned long) parm;184184+ struct slb_flush_info *fi = parm;173185 unsigned long i, j;174186187187+188188+ BUILD_BUG_ON((sizeof(fi->newareas)*8) != NUM_HIGH_AREAS);189189+190190+ if (current->active_mm != fi->mm)191191+ return;192192+193193+ /* Only need to do anything if this CPU is working in the same194194+ * mm as the one which has changed */195195+196196+ /* update the paca copy of the context struct */197197+ get_paca()->context = current->active_mm->context;198198+175199 asm volatile("isync" : : : "memory");176176-177177- BUILD_BUG_ON((sizeof(areas)*8) != NUM_HIGH_AREAS);178178-179200 for (i = 0; i < NUM_HIGH_AREAS; i++) {180180- if (! (areas & (1U << i)))201201+ if (! (fi->newareas & (1U << i)))181202 continue;182203 for (j = 0; j < (1UL << (HTLB_AREA_SHIFT-SID_SHIFT)); j++)183204 asm volatile("slbie %0"184205 :: "r" (((i << HTLB_AREA_SHIFT)185185- + (j << SID_SHIFT)) | SLBIE_C));206206+ + (j << SID_SHIFT)) | SLBIE_C));186207 }187187-188208 asm volatile("isync" : : : "memory");189209}190210···249229static int open_low_hpage_areas(struct mm_struct *mm, u16 newareas)250230{251231 unsigned long i;232232+ struct slb_flush_info fi;252233253234 BUILD_BUG_ON((sizeof(newareas)*8) != NUM_LOW_AREAS);254235 BUILD_BUG_ON((sizeof(mm->context.low_htlb_areas)*8) != NUM_LOW_AREAS);···265244266245 mm->context.low_htlb_areas |= newareas;267246268268- /* update the paca copy of the context struct */269269- get_paca()->context = mm->context;270270-271247 /* the context change must make it to memory before the flush,272248 * so that further SLB misses do the right thing. */273249 mb();274274- on_each_cpu(flush_low_segments, (void *)(unsigned long)newareas, 0, 1);250250+251251+ fi.mm = mm;252252+ fi.newareas = newareas;253253+ on_each_cpu(flush_low_segments, &fi, 0, 1);275254276255 return 0;277256}278257279258static int open_high_hpage_areas(struct mm_struct *mm, u16 newareas)280259{260260+ struct slb_flush_info fi;281261 unsigned long i;282262283263 BUILD_BUG_ON((sizeof(newareas)*8) != NUM_HIGH_AREAS);···302280 /* the context change must make it to memory before the flush,303281 * so that further SLB misses do the right thing. */304282 mb();305305- on_each_cpu(flush_high_segments, (void *)(unsigned long)newareas, 0, 1);283283+284284+ fi.mm = mm;285285+ fi.newareas = newareas;286286+ on_each_cpu(flush_high_segments, &fi, 0, 1);306287307288 return 0;308289}···664639 return -ENOMEM;665640}666641642642+/*643643+ * Called by asm hashtable.S for doing lazy icache flush644644+ */645645+static unsigned int hash_huge_page_do_lazy_icache(unsigned long rflags,646646+ pte_t pte, int trap)647647+{648648+ struct page *page;649649+ int i;650650+651651+ if (!pfn_valid(pte_pfn(pte)))652652+ return rflags;653653+654654+ page = pte_page(pte);655655+656656+ /* page is dirty */657657+ if (!test_bit(PG_arch_1, &page->flags) && !PageReserved(page)) {658658+ if (trap == 0x400) {659659+ for (i = 0; i < (HPAGE_SIZE / PAGE_SIZE); i++)660660+ __flush_dcache_icache(page_address(page+i));661661+ set_bit(PG_arch_1, &page->flags);662662+ } else {663663+ rflags |= HPTE_R_N;664664+ }665665+ }666666+ return rflags;667667+}668668+667669int hash_huge_page(struct mm_struct *mm, unsigned long access,668668- unsigned long ea, unsigned long vsid, int local)670670+ unsigned long ea, unsigned long vsid, int local,671671+ unsigned long trap)669672{670673 pte_t *ptep;671674 unsigned long old_pte, new_pte;···744691 rflags = 0x2 | (!(new_pte & _PAGE_RW));745692 /* _PAGE_EXEC -> HW_NO_EXEC since it's inverted */746693 rflags |= ((new_pte & _PAGE_EXEC) ? 0 : HPTE_R_N);694694+ if (!cpu_has_feature(CPU_FTR_COHERENT_ICACHE))695695+ /* No CPU has hugepages but lacks no execute, so we696696+ * don't need to worry about that case */697697+ rflags = hash_huge_page_do_lazy_icache(rflags, __pte(old_pte),698698+ trap);747699748700 /* Check if pte already has an hpte (case 2) */749701 if (unlikely(old_pte & _PAGE_HASHPTE)) {···761703 slot = (hash & htab_hash_mask) * HPTES_PER_GROUP;762704 slot += (old_pte & _PAGE_F_GIX) >> 12;763705764764- if (ppc_md.hpte_updatepp(slot, rflags, va, 1, local) == -1)706706+ if (ppc_md.hpte_updatepp(slot, rflags, va, mmu_huge_psize,707707+ local) == -1)765708 old_pte &= ~_PAGE_HPTEFLAGS;766709 }767710
+1-1
arch/powerpc/mm/numa.c
···125125126126 /* We didnt find a matching region, return start/end as 0 */127127 if (*start_pfn == -1UL)128128- start_pfn = 0;128128+ *start_pfn = 0;129129}130130131131static inline void map_cpu_to_node(int cpu, int node)
···298298 if (!(vflags & HPTE_V_BOLTED))299299 DBG_LOW(" hpte_v=%016lx, hpte_r=%016lx\n", hpte_v, hpte_r);300300301301-#if 1302302- {303303- int i;304304- for (i=0;i<8;i++) {305305- unsigned long w0, w1;306306- plpar_pte_read(0, hpte_group, &w0, &w1);307307- BUG_ON (HPTE_V_COMPARE(hpte_v, w0)308308- && (w0 & HPTE_V_VALID));309309- }310310- }311311-#endif312312-313301 /* Now fill in the actual HPTE */314302 /* Set CEC cookie to 0 */315303 /* Zero page = 0 */
+3-3
arch/ppc/Kconfig
···767767 on it (826x, 827x, 8560).768768769769config PPC_CHRP770770- bool " Common Hardware Reference Platform (CHRP) based machines"770770+ bool771771 depends on PPC_MULTIPLATFORM772772 select PPC_I8259773773 select PPC_INDIRECT_PCI774774 default y775775776776config PPC_PMAC777777- bool " Apple PowerMac based machines"777777+ bool778778 depends on PPC_MULTIPLATFORM779779 select PPC_INDIRECT_PCI780780 default y···785785 default y786786787787config PPC_PREP788788- bool " PowerPC Reference Platform (PReP) based machines"788788+ bool789789 depends on PPC_MULTIPLATFORM790790 select PPC_I8259791791 select PPC_INDIRECT_PCI
+4
arch/ppc/kernel/smp.c
···301301302302 /* Probe platform for CPUs: always linear. */303303 num_cpus = smp_ops->probe();304304+305305+ if (num_cpus < 2)306306+ smp_tb_synchronized = 1;307307+304308 for (i = 0; i < num_cpus; ++i)305309 cpu_set(i, cpu_possible_map);306310
···6666 return ret != u;6767}68686969-static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)7069/* Atomic operations are already serializing */7170void atomic_set(atomic_t *v, int i)7271{
···5959unsigned int cpu_khz; /* TSC clocks / usec, not used here */6060static unsigned long hpet_period; /* fsecs / HPET clock */6161unsigned long hpet_tick; /* HPET clocks / interrupt */6262-static int hpet_use_timer;6262+static int hpet_use_timer; /* Use counter of hpet for time keeping, otherwise PIT */6363unsigned long vxtime_hz = PIT_TICK_RATE;6464int report_lost_ticks; /* command line option */6565unsigned long long monotonic_base;···908908 if (!hpet_init())909909 vxtime_hz = (1000000000000000L + hpet_period / 2) /910910 hpet_period;911911+ else912912+ vxtime.hpet_address = 0;911913912914 if (hpet_use_timer) {913915 cpu_khz = hpet_calibrate_tsc();914916 timename = "HPET";915917#ifdef CONFIG_X86_PM_TIMER916916- } else if (pmtmr_ioport) {918918+ } else if (pmtmr_ioport && !vxtime.hpet_address) {917919 vxtime_hz = PM_TIMER_FREQUENCY;918920 timename = "PM";919921 pit_init();
+31-6
arch/x86_64/mm/ioremap.c
···247247 return __ioremap(phys_addr, size, _PAGE_PCD);248248}249249250250+/**251251+ * iounmap - Free a IO remapping252252+ * @addr: virtual address from ioremap_*253253+ *254254+ * Caller must ensure there is only one unmapping for the same pointer.255255+ */250256void iounmap(volatile void __iomem *addr)251257{252252- struct vm_struct *p;258258+ struct vm_struct *p, *o;253259254260 if (addr <= high_memory) 255261 return; ···263257 addr < phys_to_virt(ISA_END_ADDRESS))264258 return;265259266266- write_lock(&vmlist_lock);267267- p = __remove_vm_area((void *)((unsigned long)addr & PAGE_MASK));268268- if (!p)260260+ addr = (volatile void *)(PAGE_MASK & (unsigned long __force)addr);261261+ /* Use the vm area unlocked, assuming the caller262262+ ensures there isn't another iounmap for the same address263263+ in parallel. Reuse of the virtual address is prevented by264264+ leaving it in the global lists until we're done with it.265265+ cpa takes care of the direct mappings. */266266+ read_lock(&vmlist_lock);267267+ for (p = vmlist; p; p = p->next) {268268+ if (p->addr == addr)269269+ break;270270+ }271271+ read_unlock(&vmlist_lock);272272+273273+ if (!p) {269274 printk("iounmap: bad address %p\n", addr);270270- else if (p->flags >> 20)275275+ dump_stack();276276+ return;277277+ }278278+279279+ /* Reset the direct mapping. Can block */280280+ if (p->flags >> 20)271281 ioremap_change_attr(p->phys_addr, p->size, 0);272272- write_unlock(&vmlist_lock);282282+283283+ /* Finally remove it */284284+ o = remove_vm_area((void *)addr);285285+ BUG_ON(p != o || o == NULL);273286 kfree(p); 274287}
+3-1
arch/x86_64/mm/numa.c
···5353 int res = -1;5454 unsigned long addr, end;55555656+ if (shift >= 64)5757+ return -1;5658 memset(memnodemap, 0xff, sizeof(memnodemap));5759 for (i = 0; i < numnodes; i++) {5860 addr = nodes[i].start;···6765 if (memnodemap[addr >> shift] != 0xff)6866 return -1;6967 memnodemap[addr >> shift] = i;7070- addr += (1 << shift);6868+ addr += (1UL << shift);7169 } while (addr < end);7270 res = 1;7371 }
+53-10
arch/x86_64/pci/mmconfig.c
···88#include <linux/pci.h>99#include <linux/init.h>1010#include <linux/acpi.h>1111+#include <linux/bitmap.h>1112#include "pci.h"12131314#define MMCONFIG_APER_SIZE (256*1024*1024)1515+1616+static DECLARE_BITMAP(fallback_slots, 32);14171518/* Static virtual mapping of the MMCONFIG aperture */1619struct mmcfg_virt {···2219};2320static struct mmcfg_virt *pci_mmcfg_virt;24212525-static char *get_virt(unsigned int seg, int bus)2222+static char *get_virt(unsigned int seg, unsigned bus)2623{2724 int cfg_num = -1;2825 struct acpi_table_mcfg_config *cfg;···3027 while (1) {3128 ++cfg_num;3229 if (cfg_num >= pci_mmcfg_config_num) {3333- /* something bad is going on, no cfg table is found. */3434- /* so we fall back to the old way we used to do this */3535- /* and just rely on the first entry to be correct. */3636- return pci_mmcfg_virt[0].virt;3030+ /* Not found - fall back to type 1. This happens3131+ e.g. on the internal devices of a K8 northbridge. */3232+ return NULL;3733 }3834 cfg = pci_mmcfg_virt[cfg_num].cfg;3935 if (cfg->pci_segment_group_number != seg)···4341 }4442}45434646-static inline char *pci_dev_base(unsigned int seg, unsigned int bus, unsigned int devfn)4444+static char *pci_dev_base(unsigned int seg, unsigned int bus, unsigned int devfn)4745{4848-4949- return get_virt(seg, bus) + ((bus << 20) | (devfn << 12));4646+ char *addr;4747+ if (seg == 0 && bus == 0 && test_bit(PCI_SLOT(devfn), &fallback_slots))4848+ return NULL;4949+ addr = get_virt(seg, bus);5050+ if (!addr)5151+ return NULL;5252+ return addr + ((bus << 20) | (devfn << 12));5053}51545255static int pci_mmcfg_read(unsigned int seg, unsigned int bus,5356 unsigned int devfn, int reg, int len, u32 *value)5457{5555- char *addr = pci_dev_base(seg, bus, devfn);5858+ char *addr;56596060+ /* Why do we have this when nobody checks it. How about a BUG()!? -AK */5761 if (unlikely(!value || (bus > 255) || (devfn > 255) || (reg > 4095)))5862 return -EINVAL;6363+6464+ addr = pci_dev_base(seg, bus, devfn);6565+ if (!addr)6666+ return pci_conf1_read(seg,bus,devfn,reg,len,value);59676068 switch (len) {6169 case 1:···8573static int pci_mmcfg_write(unsigned int seg, unsigned int bus,8674 unsigned int devfn, int reg, int len, u32 value)8775{8888- char *addr = pci_dev_base(seg, bus, devfn);7676+ char *addr;89777878+ /* Why do we have this when nobody checks it. How about a BUG()!? -AK */9079 if (unlikely((bus > 255) || (devfn > 255) || (reg > 4095)))9180 return -EINVAL;8181+8282+ addr = pci_dev_base(seg, bus, devfn);8383+ if (!addr)8484+ return pci_conf1_write(seg,bus,devfn,reg,len,value);92859386 switch (len) {9487 case 1:···11497 .read = pci_mmcfg_read,11598 .write = pci_mmcfg_write,11699};100100+101101+/* K8 systems have some devices (typically in the builtin northbridge)102102+ that are only accessible using type1103103+ Normally this can be expressed in the MCFG by not listing them104104+ and assigning suitable _SEGs, but this isn't implemented in some BIOS.105105+ Instead try to discover all devices on bus 0 that are unreachable using MM106106+ and fallback for them.107107+ We only do this for bus 0/seg 0 */108108+static __init void unreachable_devices(void)109109+{110110+ int i;111111+ for (i = 0; i < 32; i++) {112112+ u32 val1;113113+ char *addr;114114+115115+ pci_conf1_read(0, 0, PCI_DEVFN(i,0), 0, 4, &val1);116116+ if (val1 == 0xffffffff)117117+ continue;118118+ addr = pci_dev_base(0, 0, PCI_DEVFN(i, 0));119119+ if (addr == NULL|| readl(addr) != val1) {120120+ set_bit(i, &fallback_slots);121121+ }122122+ }123123+}117124118125static int __init pci_mmcfg_init(void)119126{···168127 }169128 printk(KERN_INFO "PCI: Using MMCONFIG at %x\n", pci_mmcfg_config[i].base_address);170129 }130130+131131+ unreachable_devices();171132172133 raw_pci_ops = &pci_mmcfg;173134 pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF;
···943943 Applications should simply open the device (eg /dev/hda1)944944 with the O_DIRECT flag.945945946946+config MAX_RAW_DEVS947947+ int "Maximum number of RAW devices to support (1-8192)"948948+ depends on RAW_DRIVER949949+ default "256"950950+ help951951+ The maximum number of RAW devices that are supported.952952+ Default is 256. Increase this number in case you need lots of953953+ raw devices.954954+946955config HPET947956 bool "HPET - High Precision Event Timer" if (X86 || IA64)948957 default n···982973 registers may also contain other things that shouldn't be983974 exposed to the user. If this applies to your hardware,984975 say N here.985985-986986-config MAX_RAW_DEVS987987- int "Maximum number of RAW devices to support (1-8192)"988988- depends on RAW_DRIVER989989- default "256"990990- help991991- The maximum number of RAW devices that are supported.992992- Default is 256. Increase this number in case you need lots of993993- raw devices.994976995977config HANGCHECK_TIMER996978 tristate "Hangcheck timer"
···320320 * this branch is our 'one mirror IO has finished' event handler:321321 */322322 r1_bio->bios[mirror] = NULL;323323- bio_put(bio);324323 if (!uptodate) {325324 md_error(r1_bio->mddev, conf->mirrors[mirror].rdev);326325 /* an I/O failed, we can't clear the bitmap */···376377 }377378 if (test_bit(R1BIO_BehindIO, &r1_bio->state)) {378379 /* free extra copy of the data pages */379379-/* FIXME bio has been freed!!! */380380 int i = bio->bi_vcnt;381381 while (i--)382382 __free_page(bio->bi_io_vec[i].bv_page);···388390 md_write_end(r1_bio->mddev);389391 raid_end_bio_io(r1_bio);390392 }393393+394394+ if (r1_bio->bios[mirror]==NULL)395395+ bio_put(bio);391396392397 rdev_dec_pending(conf->mirrors[mirror].rdev, conf->mddev);393398 return 0;
···276276 int i = 0, count = 0;277277 u32* buffer = dev->d_i2c.cpu_addr;278278 int err = 0;279279- int address_err = 0;280280- int short_delay = 0;279279+ int address_err = 0;280280+ int short_delay = 0;281281282282 if (down_interruptible (&dev->i2c_lock))283283 return -ERESTARTSYS;···325325 if( 0 != (SAA7146_USE_I2C_IRQ & dev->ext->flags)) {326326 goto out;327327 }328328- address_err++;328328+ address_err++;329329 }330330 DEB_I2C(("error while sending message(s). starting again.\n"));331331 break;···336336 break;337337 }338338339339- /* delay a bit before retrying */340340- msleep(10);339339+ /* delay a bit before retrying */340340+ msleep(10);341341342342 } while (err != num && retries--);343343344344- /* if every retry had an address error, exit right away */345345- if (address_err == retries) {346346- goto out;344344+ /* if every retry had an address error, exit right away */345345+ if (address_err == retries) {346346+ goto out;347347 }348348349349 /* if any things had to be read, get the results */
+2-2
drivers/media/common/saa7146_vbi.c
···66{77 struct saa7146_vv *vv = dev->vv_data;8899- u32 *cpu;1010- dma_addr_t dma_addr;99+ u32 *cpu;1010+ dma_addr_t dma_addr;11111212 int count = 0;1313 int i;
+23-23
drivers/media/common/saa7146_video.c
···150150 maxh = vv->standard->v_max_out;151151152152 if (V4L2_FIELD_ANY == field) {153153- field = (win->w.height > maxh/2)154154- ? V4L2_FIELD_INTERLACED155155- : V4L2_FIELD_TOP;156156- }157157- switch (field) {158158- case V4L2_FIELD_TOP:159159- case V4L2_FIELD_BOTTOM:160160- case V4L2_FIELD_ALTERNATE:161161- maxh = maxh / 2;162162- break;163163- case V4L2_FIELD_INTERLACED:164164- break;165165- default: {153153+ field = (win->w.height > maxh/2)154154+ ? V4L2_FIELD_INTERLACED155155+ : V4L2_FIELD_TOP;156156+ }157157+ switch (field) {158158+ case V4L2_FIELD_TOP:159159+ case V4L2_FIELD_BOTTOM:160160+ case V4L2_FIELD_ALTERNATE:161161+ maxh = maxh / 2;162162+ break;163163+ case V4L2_FIELD_INTERLACED:164164+ break;165165+ default: {166166 DEB_D(("no known field mode '%d'.\n",field));167167- return -EINVAL;167167+ return -EINVAL;168168 }169169- }169169+ }170170171171 win->field = field;172172 if (win->w.width > maxw)···887887888888 DEB_EE(("VIDIOC_QUERYCAP\n"));889889890890- strcpy(cap->driver, "saa7146 v4l2");890890+ strcpy(cap->driver, "saa7146 v4l2");891891 strlcpy(cap->card, dev->ext->name, sizeof(cap->card));892892 sprintf(cap->bus_info,"PCI:%s", pci_name(dev->pci));893893 cap->version = SAA7146_VERSION_CODE;···10111011 err = set_control(fh,arg);10121012 return err;10131013 }10141014- case VIDIOC_G_PARM:10151015- {10161016- struct v4l2_streamparm *parm = arg;10141014+ case VIDIOC_G_PARM:10151015+ {10161016+ struct v4l2_streamparm *parm = arg;10171017 if( parm->type != V4L2_BUF_TYPE_VIDEO_CAPTURE ) {10181018 return -EINVAL;10191019 }10201020- memset(&parm->parm.capture,0,sizeof(struct v4l2_captureparm));10201020+ memset(&parm->parm.capture,0,sizeof(struct v4l2_captureparm));10211021 parm->parm.capture.readbuffers = 1;10221022 // fixme: only for PAL!10231023 parm->parm.capture.timeperframe.numerator = 1;10241024 parm->parm.capture.timeperframe.denominator = 25;10251025- return 0;10261026- }10251025+ return 0;10261026+ }10271027 case VIDIOC_G_FMT:10281028 {10291029 struct v4l2_format *f = arg;···1383138313841384static void video_init(struct saa7146_dev *dev, struct saa7146_vv *vv)13851385{13861386- INIT_LIST_HEAD(&vv->video_q.queue);13861386+ INIT_LIST_HEAD(&vv->video_q.queue);1387138713881388 init_timer(&vv->video_q.timeout);13891389 vv->video_q.timeout.function = saa7146_buffer_timeout;
···86868787enum dmx_ts_pes8888{ /* also send packets to decoder (if it exists) */8989- DMX_TS_PES_AUDIO0,8989+ DMX_TS_PES_AUDIO0,9090 DMX_TS_PES_VIDEO0,9191 DMX_TS_PES_TELETEXT0,9292 DMX_TS_PES_SUBTITLE0,9393 DMX_TS_PES_PCR0,94949595- DMX_TS_PES_AUDIO1,9595+ DMX_TS_PES_AUDIO1,9696 DMX_TS_PES_VIDEO1,9797 DMX_TS_PES_TELETEXT1,9898 DMX_TS_PES_SUBTITLE1,9999 DMX_TS_PES_PCR1,100100101101- DMX_TS_PES_AUDIO2,101101+ DMX_TS_PES_AUDIO2,102102 DMX_TS_PES_VIDEO2,103103 DMX_TS_PES_TELETEXT2,104104 DMX_TS_PES_SUBTITLE2,105105 DMX_TS_PES_PCR2,106106107107- DMX_TS_PES_AUDIO3,107107+ DMX_TS_PES_AUDIO3,108108 DMX_TS_PES_VIDEO3,109109 DMX_TS_PES_TELETEXT3,110110 DMX_TS_PES_SUBTITLE3,···121121122122123123struct dmx_ts_feed {124124- int is_filtering; /* Set to non-zero when filtering in progress */125125- struct dmx_demux *parent; /* Back-pointer */126126- void *priv; /* Pointer to private data of the API client */127127- int (*set) (struct dmx_ts_feed *feed,124124+ int is_filtering; /* Set to non-zero when filtering in progress */125125+ struct dmx_demux *parent; /* Back-pointer */126126+ void *priv; /* Pointer to private data of the API client */127127+ int (*set) (struct dmx_ts_feed *feed,128128 u16 pid,129129 int type,130130 enum dmx_ts_pes pes_type,131131 size_t circular_buffer_size,132132 struct timespec timeout);133133- int (*start_filtering) (struct dmx_ts_feed* feed);134134- int (*stop_filtering) (struct dmx_ts_feed* feed);133133+ int (*start_filtering) (struct dmx_ts_feed* feed);134134+ int (*stop_filtering) (struct dmx_ts_feed* feed);135135};136136137137/*--------------------------------------------------------------------------*/···139139/*--------------------------------------------------------------------------*/140140141141struct dmx_section_filter {142142- u8 filter_value [DMX_MAX_FILTER_SIZE];143143- u8 filter_mask [DMX_MAX_FILTER_SIZE];144144- u8 filter_mode [DMX_MAX_FILTER_SIZE];145145- struct dmx_section_feed* parent; /* Back-pointer */146146- void* priv; /* Pointer to private data of the API client */142142+ u8 filter_value [DMX_MAX_FILTER_SIZE];143143+ u8 filter_mask [DMX_MAX_FILTER_SIZE];144144+ u8 filter_mode [DMX_MAX_FILTER_SIZE];145145+ struct dmx_section_feed* parent; /* Back-pointer */146146+ void* priv; /* Pointer to private data of the API client */147147};148148149149struct dmx_section_feed {150150- int is_filtering; /* Set to non-zero when filtering in progress */151151- struct dmx_demux* parent; /* Back-pointer */152152- void* priv; /* Pointer to private data of the API client */150150+ int is_filtering; /* Set to non-zero when filtering in progress */151151+ struct dmx_demux* parent; /* Back-pointer */152152+ void* priv; /* Pointer to private data of the API client */153153154154- int check_crc;154154+ int check_crc;155155 u32 crc_val;156156157157- u8 *secbuf;158158- u8 secbuf_base[DMX_MAX_SECFEED_SIZE];159159- u16 secbufp, seclen, tsfeedp;157157+ u8 *secbuf;158158+ u8 secbuf_base[DMX_MAX_SECFEED_SIZE];159159+ u16 secbufp, seclen, tsfeedp;160160161161- int (*set) (struct dmx_section_feed* feed,161161+ int (*set) (struct dmx_section_feed* feed,162162 u16 pid,163163 size_t circular_buffer_size,164164 int check_crc);165165- int (*allocate_filter) (struct dmx_section_feed* feed,165165+ int (*allocate_filter) (struct dmx_section_feed* feed,166166 struct dmx_section_filter** filter);167167- int (*release_filter) (struct dmx_section_feed* feed,167167+ int (*release_filter) (struct dmx_section_feed* feed,168168 struct dmx_section_filter* filter);169169- int (*start_filtering) (struct dmx_section_feed* feed);170170- int (*stop_filtering) (struct dmx_section_feed* feed);169169+ int (*start_filtering) (struct dmx_section_feed* feed);170170+ int (*stop_filtering) (struct dmx_section_feed* feed);171171};172172173173/*--------------------------------------------------------------------------*/···205205};206206207207struct dmx_frontend {208208- struct list_head connectivity_list; /* List of front-ends that can208208+ struct list_head connectivity_list; /* List of front-ends that can209209 be connected to a particular210210 demux */211211- enum dmx_frontend_source source;211211+ enum dmx_frontend_source source;212212};213213214214/*--------------------------------------------------------------------------*/···240240#define DMX_FE_ENTRY(list) list_entry(list, struct dmx_frontend, connectivity_list)241241242242struct dmx_demux {243243- u32 capabilities; /* Bitfield of capability flags */244244- struct dmx_frontend* frontend; /* Front-end connected to the demux */245245- void* priv; /* Pointer to private data of the API client */246246- int (*open) (struct dmx_demux* demux);247247- int (*close) (struct dmx_demux* demux);248248- int (*write) (struct dmx_demux* demux, const char* buf, size_t count);249249- int (*allocate_ts_feed) (struct dmx_demux* demux,243243+ u32 capabilities; /* Bitfield of capability flags */244244+ struct dmx_frontend* frontend; /* Front-end connected to the demux */245245+ void* priv; /* Pointer to private data of the API client */246246+ int (*open) (struct dmx_demux* demux);247247+ int (*close) (struct dmx_demux* demux);248248+ int (*write) (struct dmx_demux* demux, const char* buf, size_t count);249249+ int (*allocate_ts_feed) (struct dmx_demux* demux,250250 struct dmx_ts_feed** feed,251251 dmx_ts_cb callback);252252- int (*release_ts_feed) (struct dmx_demux* demux,252252+ int (*release_ts_feed) (struct dmx_demux* demux,253253 struct dmx_ts_feed* feed);254254- int (*allocate_section_feed) (struct dmx_demux* demux,254254+ int (*allocate_section_feed) (struct dmx_demux* demux,255255 struct dmx_section_feed** feed,256256 dmx_section_cb callback);257257- int (*release_section_feed) (struct dmx_demux* demux,257257+ int (*release_section_feed) (struct dmx_demux* demux,258258 struct dmx_section_feed* feed);259259- int (*add_frontend) (struct dmx_demux* demux,259259+ int (*add_frontend) (struct dmx_demux* demux,260260 struct dmx_frontend* frontend);261261- int (*remove_frontend) (struct dmx_demux* demux,261261+ int (*remove_frontend) (struct dmx_demux* demux,262262 struct dmx_frontend* frontend);263263- struct list_head* (*get_frontends) (struct dmx_demux* demux);264264- int (*connect_frontend) (struct dmx_demux* demux,263263+ struct list_head* (*get_frontends) (struct dmx_demux* demux);264264+ int (*connect_frontend) (struct dmx_demux* demux,265265 struct dmx_frontend* frontend);266266- int (*disconnect_frontend) (struct dmx_demux* demux);266266+ int (*disconnect_frontend) (struct dmx_demux* demux);267267268268- int (*get_pes_pids) (struct dmx_demux* demux, u16 *pids);268268+ int (*get_pes_pids) (struct dmx_demux* demux, u16 *pids);269269270270 int (*get_caps) (struct dmx_demux* demux, struct dmx_caps *caps);271271272272 int (*set_source) (struct dmx_demux* demux, const dmx_source_t *src);273273274274- int (*get_stc) (struct dmx_demux* demux, unsigned int num,274274+ int (*get_stc) (struct dmx_demux* demux, unsigned int num,275275 u64 *stc, unsigned int *base);276276};277277
+1-1
drivers/media/dvb/dvb-core/dmxdev.c
···947947948948 case DMX_GET_STC:949949 if (!dmxdev->demux->get_stc) {950950- ret=-EINVAL;950950+ ret=-EINVAL;951951 break;952952 }953953 ret = dmxdev->demux->get_stc(dmxdev->demux,
+32-32
drivers/media/dvb/dvb-core/dmxdev.h
···5353};54545555struct dmxdev_buffer {5656- u8 *data;5757- int size;5858- int pread;5959- int pwrite;5656+ u8 *data;5757+ int size;5858+ int pread;5959+ int pwrite;6060 wait_queue_head_t queue;6161- int error;6161+ int error;6262};63636464struct dmxdev_filter {6565 struct dvb_device *dvbdev;66666767- union {6868- struct dmx_section_filter *sec;6767+ union {6868+ struct dmx_section_filter *sec;6969 } filter;70707171- union {7272- struct dmx_ts_feed *ts;7373- struct dmx_section_feed *sec;7171+ union {7272+ struct dmx_ts_feed *ts;7373+ struct dmx_section_feed *sec;7474 } feed;75757676- union {7777- struct dmx_sct_filter_params sec;7878- struct dmx_pes_filter_params pes;7676+ union {7777+ struct dmx_sct_filter_params sec;7878+ struct dmx_pes_filter_params pes;7979 } params;80808181- int type;8282- enum dmxdev_state state;8383- struct dmxdev *dev;8484- struct dmxdev_buffer buffer;8181+ int type;8282+ enum dmxdev_state state;8383+ struct dmxdev *dev;8484+ struct dmxdev_buffer buffer;85858686 struct semaphore mutex;87878888- /* only for sections */8989- struct timer_list timer;9090- int todo;9191- u8 secheader[3];8888+ /* only for sections */8989+ struct timer_list timer;9090+ int todo;9191+ u8 secheader[3];92929393- u16 pid;9393+ u16 pid;9494};959596969797struct dmxdev_dvr {9898- int state;9999- struct dmxdev *dev;100100- struct dmxdev_buffer buffer;9898+ int state;9999+ struct dmxdev *dev;100100+ struct dmxdev_buffer buffer;101101};102102103103···105105 struct dvb_device *dvbdev;106106 struct dvb_device *dvr_dvbdev;107107108108- struct dmxdev_filter *filter;109109- struct dmxdev_dvr *dvr;110110- struct dmx_demux *demux;108108+ struct dmxdev_filter *filter;109109+ struct dmxdev_dvr *dvr;110110+ struct dmx_demux *demux;111111112112- int filternum;113113- int capabilities;112112+ int filternum;113113+ int capabilities;114114#define DMXDEV_CAP_DUPLEX 1115115- struct dmx_frontend *dvr_orig_fe;115115+ struct dmx_frontend *dvr_orig_fe;116116117117- struct dmxdev_buffer dvr_buffer;117117+ struct dmxdev_buffer dvr_buffer;118118#define DVR_BUFFER_SIZE (10*188*1024)119119120120 struct semaphore mutex;
+1-1
drivers/media/dvb/dvb-core/dvb_ca_en50221.c
···498498 /* process the CFTABLE_ENTRY tuples, and any after those */499499 while ((!end_chain) && (address < 0x1000)) {500500 if ((status = dvb_ca_en50221_read_tuple(ca, slot, &address, &tupleType,501501- &tupleLength, tuple)) < 0)501501+ &tupleLength, tuple)) < 0)502502 return status;503503 switch (tupleType) {504504 case 0x1B: // CISTPL_CFTABLE_ENTRY
···4141#include "dvbdev.h"42424343struct dvb_frontend_tune_settings {4444- int min_delay_ms;4545- int step_size;4646- int max_drift;4747- struct dvb_frontend_parameters parameters;4444+ int min_delay_ms;4545+ int step_size;4646+ int max_drift;4747+ struct dvb_frontend_parameters parameters;4848};49495050struct dvb_frontend;
···3131#include <linux/wait.h>32323333struct dvb_ringbuffer {3434- u8 *data;3535- ssize_t size;3636- ssize_t pread;3737- ssize_t pwrite;3434+ u8 *data;3535+ ssize_t size;3636+ ssize_t pread;3737+ ssize_t pwrite;38383939- wait_queue_head_t queue;4040- spinlock_t lock;3939+ wait_queue_head_t queue;4040+ spinlock_t lock;4141};42424343#define DVB_RINGBUFFER_PKTHDRSIZE 3···106106** returns number of bytes transferred or -EFAULT107107*/108108extern ssize_t dvb_ringbuffer_read(struct dvb_ringbuffer *rbuf, u8 *buf,109109- size_t len, int usermem);109109+ size_t len, int usermem);110110111111112112/* write routines & macros */···121121** returns number of bytes transferred or -EFAULT122122*/123123extern ssize_t dvb_ringbuffer_write(struct dvb_ringbuffer *rbuf, const u8 *buf,124124- size_t len);124124+ size_t len);125125126126127127/**···133133 * returns Number of bytes written, or -EFAULT, -ENOMEM, -EVINAL.134134 */135135extern ssize_t dvb_ringbuffer_pkt_write(struct dvb_ringbuffer *rbuf, u8* buf,136136- size_t len);136136+ size_t len);137137138138/**139139 * Read from a packet in the ringbuffer. Note: unlike dvb_ringbuffer_read(), this···149149 * returns Number of bytes read, or -EFAULT.150150 */151151extern ssize_t dvb_ringbuffer_pkt_read(struct dvb_ringbuffer *rbuf, size_t idx,152152- int offset, u8* buf, size_t len, int usermem);152152+ int offset, u8* buf, size_t len, int usermem);153153154154/**155155 * Dispose of a packet in the ring buffer.
+66-66
drivers/media/dvb/dvb-core/dvbdev.c
···4747static DECLARE_MUTEX(dvbdev_register_lock);48484949static const char * const dnames[] = {5050- "video", "audio", "sec", "frontend", "demux", "dvr", "ca",5050+ "video", "audio", "sec", "frontend", "demux", "dvr", "ca",5151 "net", "osd"5252};5353···90909191 file->private_data = dvbdev;9292 old_fops = file->f_op;9393- file->f_op = fops_get(dvbdev->fops);9494- if(file->f_op->open)9595- err = file->f_op->open(inode,file);9696- if (err) {9797- fops_put(file->f_op);9898- file->f_op = fops_get(old_fops);9999- }100100- fops_put(old_fops);101101- return err;9393+ file->f_op = fops_get(dvbdev->fops);9494+ if(file->f_op->open)9595+ err = file->f_op->open(inode,file);9696+ if (err) {9797+ fops_put(file->f_op);9898+ file->f_op = fops_get(old_fops);9999+ }100100+ fops_put(old_fops);101101+ return err;102102 }103103 return -ENODEV;104104}···117117118118int dvb_generic_open(struct inode *inode, struct file *file)119119{120120- struct dvb_device *dvbdev = file->private_data;120120+ struct dvb_device *dvbdev = file->private_data;121121122122- if (!dvbdev)123123- return -ENODEV;122122+ if (!dvbdev)123123+ return -ENODEV;124124125125 if (!dvbdev->users)126126- return -EBUSY;126126+ return -EBUSY;127127128128 if ((file->f_flags & O_ACCMODE) == O_RDONLY) {129129- if (!dvbdev->readers)130130- return -EBUSY;129129+ if (!dvbdev->readers)130130+ return -EBUSY;131131 dvbdev->readers--;132132 } else {133133- if (!dvbdev->writers)134134- return -EBUSY;133133+ if (!dvbdev->writers)134134+ return -EBUSY;135135 dvbdev->writers--;136136 }137137···143143144144int dvb_generic_release(struct inode *inode, struct file *file)145145{146146- struct dvb_device *dvbdev = file->private_data;146146+ struct dvb_device *dvbdev = file->private_data;147147148148 if (!dvbdev)149149- return -ENODEV;149149+ return -ENODEV;150150151151 if ((file->f_flags & O_ACCMODE) == O_RDONLY) {152152 dvbdev->readers++;···163163int dvb_generic_ioctl(struct inode *inode, struct file *file,164164 unsigned int cmd, unsigned long arg)165165{166166- struct dvb_device *dvbdev = file->private_data;166166+ struct dvb_device *dvbdev = file->private_data;167167168168- if (!dvbdev)169169- return -ENODEV;168168+ if (!dvbdev)169169+ return -ENODEV;170170171171 if (!dvbdev->kernel_ioctl)172172 return -EINVAL;···334334 to the v4l "videodev.o" module, which is unnecessary for some335335 cards (ie. the budget dvb-cards don't need the v4l module...) */336336int dvb_usercopy(struct inode *inode, struct file *file,337337- unsigned int cmd, unsigned long arg,337337+ unsigned int cmd, unsigned long arg,338338 int (*func)(struct inode *inode, struct file *file,339339 unsigned int cmd, void *arg))340340{341341- char sbuf[128];342342- void *mbuf = NULL;343343- void *parg = NULL;344344- int err = -EINVAL;341341+ char sbuf[128];342342+ void *mbuf = NULL;343343+ void *parg = NULL;344344+ int err = -EINVAL;345345346346- /* Copy arguments into temp kernel buffer */347347- switch (_IOC_DIR(cmd)) {348348- case _IOC_NONE:346346+ /* Copy arguments into temp kernel buffer */347347+ switch (_IOC_DIR(cmd)) {348348+ case _IOC_NONE:349349 /*350350 * For this command, the pointer is actually an integer351351 * argument.352352 */353353 parg = (void *) arg;354354 break;355355- case _IOC_READ: /* some v4l ioctls are marked wrong ... */356356- case _IOC_WRITE:357357- case (_IOC_WRITE | _IOC_READ):358358- if (_IOC_SIZE(cmd) <= sizeof(sbuf)) {359359- parg = sbuf;360360- } else {361361- /* too big to allocate from stack */362362- mbuf = kmalloc(_IOC_SIZE(cmd),GFP_KERNEL);363363- if (NULL == mbuf)364364- return -ENOMEM;365365- parg = mbuf;366366- }355355+ case _IOC_READ: /* some v4l ioctls are marked wrong ... */356356+ case _IOC_WRITE:357357+ case (_IOC_WRITE | _IOC_READ):358358+ if (_IOC_SIZE(cmd) <= sizeof(sbuf)) {359359+ parg = sbuf;360360+ } else {361361+ /* too big to allocate from stack */362362+ mbuf = kmalloc(_IOC_SIZE(cmd),GFP_KERNEL);363363+ if (NULL == mbuf)364364+ return -ENOMEM;365365+ parg = mbuf;366366+ }367367368368- err = -EFAULT;369369- if (copy_from_user(parg, (void __user *)arg, _IOC_SIZE(cmd)))370370- goto out;371371- break;372372- }368368+ err = -EFAULT;369369+ if (copy_from_user(parg, (void __user *)arg, _IOC_SIZE(cmd)))370370+ goto out;371371+ break;372372+ }373373374374- /* call driver */375375- if ((err = func(inode, file, cmd, parg)) == -ENOIOCTLCMD)376376- err = -EINVAL;374374+ /* call driver */375375+ if ((err = func(inode, file, cmd, parg)) == -ENOIOCTLCMD)376376+ err = -EINVAL;377377378378- if (err < 0)379379- goto out;378378+ if (err < 0)379379+ goto out;380380381381- /* Copy results into user buffer */382382- switch (_IOC_DIR(cmd))383383- {384384- case _IOC_READ:385385- case (_IOC_WRITE | _IOC_READ):386386- if (copy_to_user((void __user *)arg, parg, _IOC_SIZE(cmd)))387387- err = -EFAULT;388388- break;389389- }381381+ /* Copy results into user buffer */382382+ switch (_IOC_DIR(cmd))383383+ {384384+ case _IOC_READ:385385+ case (_IOC_WRITE | _IOC_READ):386386+ if (copy_to_user((void __user *)arg, parg, _IOC_SIZE(cmd)))387387+ err = -EFAULT;388388+ break;389389+ }390390391391out:392392- kfree(mbuf);393393- return err;392392+ kfree(mbuf);393393+ return err;394394}395395396396static int __init init_dvbdev(void)···427427428428static void __exit exit_dvbdev(void)429429{430430- devfs_remove("dvb");430430+ devfs_remove("dvb");431431 class_destroy(dvb_class);432432 cdev_del(&dvb_device_cdev);433433- unregister_chrdev_region(MKDEV(DVB_MAJOR, 0), MAX_DVB_MINORS);433433+ unregister_chrdev_region(MKDEV(DVB_MAJOR, 0), MAX_DVB_MINORS);434434}435435436436module_init(init_dvbdev);
+3-3
drivers/media/dvb/dvb-core/dvbdev.h
···6868 int writers;6969 int users;70707171- /* don't really need those !? -- FIXME: use video_usercopy */7272- int (*kernel_ioctl)(struct inode *inode, struct file *file,7171+ /* don't really need those !? -- FIXME: use video_usercopy */7272+ int (*kernel_ioctl)(struct inode *inode, struct file *file,7373 unsigned int cmd, void *arg);74747575 void *priv;···9797generic_usercopy() someday... */98989999extern int dvb_usercopy(struct inode *inode, struct file *file,100100- unsigned int cmd, unsigned long arg,100100+ unsigned int cmd, unsigned long arg,101101 int (*func)(struct inode *inode, struct file *file,102102 unsigned int cmd, void *arg));103103
···5555 } while (0)56565757static struct {u8 reg; u8 data;} cx24110_regdata[]=5858- /* Comments beginning with @ denote this value should5959- be the default */6060- {{0x09,0x01}, /* SoftResetAll */6161- {0x09,0x00}, /* release reset */6262- {0x01,0xe8}, /* MSB of code rate 27.5MS/s */6363- {0x02,0x17}, /* middle byte " */6464- {0x03,0x29}, /* LSB " */6565- {0x05,0x03}, /* @ DVB mode, standard code rate 3/4 */6666- {0x06,0xa5}, /* @ PLL 60MHz */6767- {0x07,0x01}, /* @ Fclk, i.e. sampling clock, 60MHz */6868- {0x0a,0x00}, /* @ partial chip disables, do not set */6969- {0x0b,0x01}, /* set output clock in gapped mode, start signal low7070- active for first byte */7171- {0x0c,0x11}, /* no parity bytes, large hold time, serial data out */7272- {0x0d,0x6f}, /* @ RS Sync/Unsync thresholds */7373- {0x10,0x40}, /* chip doc is misleading here: write bit 6 as 17474- to avoid starting the BER counter. Reset the7575- CRC test bit. Finite counting selected */7676- {0x15,0xff}, /* @ size of the limited time window for RS BER7777- estimation. It is <value>*256 RS blocks, this7878- gives approx. 2.6 sec at 27.5MS/s, rate 3/4 */7979- {0x16,0x00}, /* @ enable all RS output ports */8080- {0x17,0x04}, /* @ time window allowed for the RS to sync */8181- {0x18,0xae}, /* @ allow all standard DVB code rates to be scanned8282- for automatically */8383- /* leave the current code rate and normalization8484- registers as they are after reset... */8585- {0x21,0x10}, /* @ during AutoAcq, search each viterbi setting8686- only once */8787- {0x23,0x18}, /* @ size of the limited time window for Viterbi BER8888- estimation. It is <value>*65536 channel bits, i.e.8989- approx. 38ms at 27.5MS/s, rate 3/4 */9090- {0x24,0x24}, /* do not trigger Viterbi CRC test. Finite count window */9191- /* leave front-end AGC parameters at default values */9292- /* leave decimation AGC parameters at default values */9393- {0x35,0x40}, /* disable all interrupts. They are not connected anyway */9494- {0x36,0xff}, /* clear all interrupt pending flags */9595- {0x37,0x00}, /* @ fully enable AutoAcqq state machine */9696- {0x38,0x07}, /* @ enable fade recovery, but not autostart AutoAcq */9797- /* leave the equalizer parameters on their default values */9898- /* leave the final AGC parameters on their default values */9999- {0x41,0x00}, /* @ MSB of front-end derotator frequency */100100- {0x42,0x00}, /* @ middle bytes " */101101- {0x43,0x00}, /* @ LSB " */102102- /* leave the carrier tracking loop parameters on default */103103- /* leave the bit timing loop parameters at gefault */104104- {0x56,0x4d}, /* set the filtune voltage to 2.7V, as recommended by */105105- /* the cx24108 data sheet for symbol rates above 15MS/s */106106- {0x57,0x00}, /* @ Filter sigma delta enabled, positive */107107- {0x61,0x95}, /* GPIO pins 1-4 have special function */108108- {0x62,0x05}, /* GPIO pin 5 has special function, pin 6 is GPIO */109109- {0x63,0x00}, /* All GPIO pins use CMOS output characteristics */110110- {0x64,0x20}, /* GPIO 6 is input, all others are outputs */111111- {0x6d,0x30}, /* tuner auto mode clock freq 62kHz */112112- {0x70,0x15}, /* use auto mode, tuner word is 21 bits long */113113- {0x73,0x00}, /* @ disable several demod bypasses */114114- {0x74,0x00}, /* @ " */115115- {0x75,0x00} /* @ " */116116- /* the remaining registers are for SEC */5858+ /* Comments beginning with @ denote this value should5959+ be the default */6060+ {{0x09,0x01}, /* SoftResetAll */6161+ {0x09,0x00}, /* release reset */6262+ {0x01,0xe8}, /* MSB of code rate 27.5MS/s */6363+ {0x02,0x17}, /* middle byte " */6464+ {0x03,0x29}, /* LSB " */6565+ {0x05,0x03}, /* @ DVB mode, standard code rate 3/4 */6666+ {0x06,0xa5}, /* @ PLL 60MHz */6767+ {0x07,0x01}, /* @ Fclk, i.e. sampling clock, 60MHz */6868+ {0x0a,0x00}, /* @ partial chip disables, do not set */6969+ {0x0b,0x01}, /* set output clock in gapped mode, start signal low7070+ active for first byte */7171+ {0x0c,0x11}, /* no parity bytes, large hold time, serial data out */7272+ {0x0d,0x6f}, /* @ RS Sync/Unsync thresholds */7373+ {0x10,0x40}, /* chip doc is misleading here: write bit 6 as 17474+ to avoid starting the BER counter. Reset the7575+ CRC test bit. Finite counting selected */7676+ {0x15,0xff}, /* @ size of the limited time window for RS BER7777+ estimation. It is <value>*256 RS blocks, this7878+ gives approx. 2.6 sec at 27.5MS/s, rate 3/4 */7979+ {0x16,0x00}, /* @ enable all RS output ports */8080+ {0x17,0x04}, /* @ time window allowed for the RS to sync */8181+ {0x18,0xae}, /* @ allow all standard DVB code rates to be scanned8282+ for automatically */8383+ /* leave the current code rate and normalization8484+ registers as they are after reset... */8585+ {0x21,0x10}, /* @ during AutoAcq, search each viterbi setting8686+ only once */8787+ {0x23,0x18}, /* @ size of the limited time window for Viterbi BER8888+ estimation. It is <value>*65536 channel bits, i.e.8989+ approx. 38ms at 27.5MS/s, rate 3/4 */9090+ {0x24,0x24}, /* do not trigger Viterbi CRC test. Finite count window */9191+ /* leave front-end AGC parameters at default values */9292+ /* leave decimation AGC parameters at default values */9393+ {0x35,0x40}, /* disable all interrupts. They are not connected anyway */9494+ {0x36,0xff}, /* clear all interrupt pending flags */9595+ {0x37,0x00}, /* @ fully enable AutoAcqq state machine */9696+ {0x38,0x07}, /* @ enable fade recovery, but not autostart AutoAcq */9797+ /* leave the equalizer parameters on their default values */9898+ /* leave the final AGC parameters on their default values */9999+ {0x41,0x00}, /* @ MSB of front-end derotator frequency */100100+ {0x42,0x00}, /* @ middle bytes " */101101+ {0x43,0x00}, /* @ LSB " */102102+ /* leave the carrier tracking loop parameters on default */103103+ /* leave the bit timing loop parameters at gefault */104104+ {0x56,0x4d}, /* set the filtune voltage to 2.7V, as recommended by */105105+ /* the cx24108 data sheet for symbol rates above 15MS/s */106106+ {0x57,0x00}, /* @ Filter sigma delta enabled, positive */107107+ {0x61,0x95}, /* GPIO pins 1-4 have special function */108108+ {0x62,0x05}, /* GPIO pin 5 has special function, pin 6 is GPIO */109109+ {0x63,0x00}, /* All GPIO pins use CMOS output characteristics */110110+ {0x64,0x20}, /* GPIO 6 is input, all others are outputs */111111+ {0x6d,0x30}, /* tuner auto mode clock freq 62kHz */112112+ {0x70,0x15}, /* use auto mode, tuner word is 21 bits long */113113+ {0x73,0x00}, /* @ disable several demod bypasses */114114+ {0x74,0x00}, /* @ " */115115+ {0x75,0x00} /* @ " */116116+ /* the remaining registers are for SEC */117117 };118118119119120120static int cx24110_writereg (struct cx24110_state* state, int reg, int data)121121{122122- u8 buf [] = { reg, data };122122+ u8 buf [] = { reg, data };123123 struct i2c_msg msg = { .addr = state->config->demod_address, .flags = 0, .buf = buf, .len = 2 };124124 int err;125125126126- if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1) {126126+ if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1) {127127 dprintk ("%s: writereg error (err == %i, reg == 0x%02x,"128128 " data == 0x%02x)\n", __FUNCTION__, err, reg, data);129129 return -EREMOTEIO;130130 }131131132132- return 0;132132+ return 0;133133}134134135135static int cx24110_readreg (struct cx24110_state* state, u8 reg)···153153154154 switch (inversion) {155155 case INVERSION_OFF:156156- cx24110_writereg(state,0x37,cx24110_readreg(state,0x37)|0x1);157157- /* AcqSpectrInvDis on. No idea why someone should want this */158158- cx24110_writereg(state,0x5,cx24110_readreg(state,0x5)&0xf7);159159- /* Initial value 0 at start of acq */160160- cx24110_writereg(state,0x22,cx24110_readreg(state,0x22)&0xef);161161- /* current value 0 */162162- /* The cx24110 manual tells us this reg is read-only.163163- But what the heck... set it ayways */164164- break;156156+ cx24110_writereg(state,0x37,cx24110_readreg(state,0x37)|0x1);157157+ /* AcqSpectrInvDis on. No idea why someone should want this */158158+ cx24110_writereg(state,0x5,cx24110_readreg(state,0x5)&0xf7);159159+ /* Initial value 0 at start of acq */160160+ cx24110_writereg(state,0x22,cx24110_readreg(state,0x22)&0xef);161161+ /* current value 0 */162162+ /* The cx24110 manual tells us this reg is read-only.163163+ But what the heck... set it ayways */164164+ break;165165 case INVERSION_ON:166166- cx24110_writereg(state,0x37,cx24110_readreg(state,0x37)|0x1);167167- /* AcqSpectrInvDis on. No idea why someone should want this */168168- cx24110_writereg(state,0x5,cx24110_readreg(state,0x5)|0x08);169169- /* Initial value 1 at start of acq */170170- cx24110_writereg(state,0x22,cx24110_readreg(state,0x22)|0x10);171171- /* current value 1 */172172- break;166166+ cx24110_writereg(state,0x37,cx24110_readreg(state,0x37)|0x1);167167+ /* AcqSpectrInvDis on. No idea why someone should want this */168168+ cx24110_writereg(state,0x5,cx24110_readreg(state,0x5)|0x08);169169+ /* Initial value 1 at start of acq */170170+ cx24110_writereg(state,0x22,cx24110_readreg(state,0x22)|0x10);171171+ /* current value 1 */172172+ break;173173 case INVERSION_AUTO:174174- cx24110_writereg(state,0x37,cx24110_readreg(state,0x37)&0xfe);175175- /* AcqSpectrInvDis off. Leave initial & current states as is */176176- break;174174+ cx24110_writereg(state,0x37,cx24110_readreg(state,0x37)&0xfe);175175+ /* AcqSpectrInvDis off. Leave initial & current states as is */176176+ break;177177 default:178178 return -EINVAL;179179 }···185185{186186/* fixme (low): error handling */187187188188- static const int rate[]={-1,1,2,3,5,7,-1};189189- static const int g1[]={-1,0x01,0x02,0x05,0x15,0x45,-1};190190- static const int g2[]={-1,0x01,0x03,0x06,0x1a,0x7a,-1};188188+ static const int rate[]={-1,1,2,3,5,7,-1};189189+ static const int g1[]={-1,0x01,0x02,0x05,0x15,0x45,-1};190190+ static const int g2[]={-1,0x01,0x03,0x06,0x1a,0x7a,-1};191191192192- /* Well, the AutoAcq engine of the cx24106 and 24110 automatically193193- searches all enabled viterbi rates, and can handle non-standard194194- rates as well. */192192+ /* Well, the AutoAcq engine of the cx24106 and 24110 automatically193193+ searches all enabled viterbi rates, and can handle non-standard194194+ rates as well. */195195196196- if (fec>FEC_AUTO)197197- fec=FEC_AUTO;196196+ if (fec>FEC_AUTO)197197+ fec=FEC_AUTO;198198199199- if (fec==FEC_AUTO) { /* (re-)establish AutoAcq behaviour */199199+ if (fec==FEC_AUTO) { /* (re-)establish AutoAcq behaviour */200200 cx24110_writereg(state,0x37,cx24110_readreg(state,0x37)&0xdf);201201 /* clear AcqVitDis bit */202202 cx24110_writereg(state,0x18,0xae);···208208 cx24110_writereg(state,0x1a,0x05); cx24110_writereg(state,0x1b,0x06);209209 /* set the puncture registers for code rate 3/4 */210210 return 0;211211- } else {211211+ } else {212212 cx24110_writereg(state,0x37,cx24110_readreg(state,0x37)|0x20);213213 /* set AcqVitDis bit */214214 if(rate[fec]>0) {···219219 cx24110_writereg(state,0x1a,g1[fec]);220220 cx24110_writereg(state,0x1b,g2[fec]);221221 /* not sure if this is the right way: I always used AutoAcq mode */222222- } else222222+ } else223223 return -EOPNOTSUPP;224224/* fixme (low): which is the correct return code? */225225- };225225+ };226226 return 0;227227}228228···245245static int cx24110_set_symbolrate (struct cx24110_state* state, u32 srate)246246{247247/* fixme (low): add error handling */248248- u32 ratio;249249- u32 tmp, fclk, BDRI;248248+ u32 ratio;249249+ u32 tmp, fclk, BDRI;250250251251- static const u32 bands[]={5000000UL,15000000UL,90999000UL/2};252252- int i;251251+ static const u32 bands[]={5000000UL,15000000UL,90999000UL/2};252252+ int i;253253254254dprintk("cx24110 debug: entering %s(%d)\n",__FUNCTION__,srate);255255- if (srate>90999000UL/2)256256- srate=90999000UL/2;257257- if (srate<500000)258258- srate=500000;255255+ if (srate>90999000UL/2)256256+ srate=90999000UL/2;257257+ if (srate<500000)258258+ srate=500000;259259260260- for(i=0;(i<sizeof(bands)/sizeof(bands[0]))&&(srate>bands[i]);i++)260260+ for(i=0;(i<sizeof(bands)/sizeof(bands[0]))&&(srate>bands[i]);i++)261261 ;262262- /* first, check which sample rate is appropriate: 45, 60 80 or 90 MHz,263263- and set the PLL accordingly (R07[1:0] Fclk, R06[7:4] PLLmult,264264- R06[3:0] PLLphaseDetGain */265265- tmp=cx24110_readreg(state,0x07)&0xfc;266266- if(srate<90999000UL/4) { /* sample rate 45MHz*/262262+ /* first, check which sample rate is appropriate: 45, 60 80 or 90 MHz,263263+ and set the PLL accordingly (R07[1:0] Fclk, R06[7:4] PLLmult,264264+ R06[3:0] PLLphaseDetGain */265265+ tmp=cx24110_readreg(state,0x07)&0xfc;266266+ if(srate<90999000UL/4) { /* sample rate 45MHz*/267267 cx24110_writereg(state,0x07,tmp);268268 cx24110_writereg(state,0x06,0x78);269269 fclk=90999000UL/2;270270- } else if(srate<60666000UL/2) { /* sample rate 60MHz */270270+ } else if(srate<60666000UL/2) { /* sample rate 60MHz */271271 cx24110_writereg(state,0x07,tmp|0x1);272272 cx24110_writereg(state,0x06,0xa5);273273 fclk=60666000UL;274274- } else if(srate<80888000UL/2) { /* sample rate 80MHz */274274+ } else if(srate<80888000UL/2) { /* sample rate 80MHz */275275 cx24110_writereg(state,0x07,tmp|0x2);276276 cx24110_writereg(state,0x06,0x87);277277 fclk=80888000UL;278278- } else { /* sample rate 90MHz */278278+ } else { /* sample rate 90MHz */279279 cx24110_writereg(state,0x07,tmp|0x3);280280 cx24110_writereg(state,0x06,0x78);281281 fclk=90999000UL;282282- };283283- dprintk("cx24110 debug: fclk %d Hz\n",fclk);284284- /* we need to divide two integers with approx. 27 bits in 32 bit285285- arithmetic giving a 25 bit result */286286- /* the maximum dividend is 90999000/2, 0x02b6446c, this number is287287- also the most complex divisor. Hence, the dividend has,288288- assuming 32bit unsigned arithmetic, 6 clear bits on top, the289289- divisor 2 unused bits at the bottom. Also, the quotient is290290- always less than 1/2. Borrowed from VES1893.c, of course */282282+ };283283+ dprintk("cx24110 debug: fclk %d Hz\n",fclk);284284+ /* we need to divide two integers with approx. 27 bits in 32 bit285285+ arithmetic giving a 25 bit result */286286+ /* the maximum dividend is 90999000/2, 0x02b6446c, this number is287287+ also the most complex divisor. Hence, the dividend has,288288+ assuming 32bit unsigned arithmetic, 6 clear bits on top, the289289+ divisor 2 unused bits at the bottom. Also, the quotient is290290+ always less than 1/2. Borrowed from VES1893.c, of course */291291292292- tmp=srate<<6;293293- BDRI=fclk>>2;294294- ratio=(tmp/BDRI);292292+ tmp=srate<<6;293293+ BDRI=fclk>>2;294294+ ratio=(tmp/BDRI);295295296296- tmp=(tmp%BDRI)<<8;297297- ratio=(ratio<<8)+(tmp/BDRI);296296+ tmp=(tmp%BDRI)<<8;297297+ ratio=(ratio<<8)+(tmp/BDRI);298298299299- tmp=(tmp%BDRI)<<8;300300- ratio=(ratio<<8)+(tmp/BDRI);299299+ tmp=(tmp%BDRI)<<8;300300+ ratio=(ratio<<8)+(tmp/BDRI);301301302302- tmp=(tmp%BDRI)<<1;303303- ratio=(ratio<<1)+(tmp/BDRI);302302+ tmp=(tmp%BDRI)<<1;303303+ ratio=(ratio<<1)+(tmp/BDRI);304304305305- dprintk("srate= %d (range %d, up to %d)\n", srate,i,bands[i]);306306- dprintk("fclk = %d\n", fclk);307307- dprintk("ratio= %08x\n", ratio);305305+ dprintk("srate= %d (range %d, up to %d)\n", srate,i,bands[i]);306306+ dprintk("fclk = %d\n", fclk);307307+ dprintk("ratio= %08x\n", ratio);308308309309- cx24110_writereg(state, 0x1, (ratio>>16)&0xff);310310- cx24110_writereg(state, 0x2, (ratio>>8)&0xff);311311- cx24110_writereg(state, 0x3, (ratio)&0xff);309309+ cx24110_writereg(state, 0x1, (ratio>>16)&0xff);310310+ cx24110_writereg(state, 0x2, (ratio>>8)&0xff);311311+ cx24110_writereg(state, 0x3, (ratio)&0xff);312312313313- return 0;313313+ return 0;314314315315}316316···324324325325 dprintk("cx24110 debug: cx24108_write(%8.8x)\n",data);326326327327- cx24110_writereg(state,0x6d,0x30); /* auto mode at 62kHz */328328- cx24110_writereg(state,0x70,0x15); /* auto mode 21 bits */327327+ cx24110_writereg(state,0x6d,0x30); /* auto mode at 62kHz */328328+ cx24110_writereg(state,0x70,0x15); /* auto mode 21 bits */329329330330- /* if the auto tuner writer is still busy, clear it out */331331- while (cx24110_readreg(state,0x6d)&0x80)330330+ /* if the auto tuner writer is still busy, clear it out */331331+ while (cx24110_readreg(state,0x6d)&0x80)332332 cx24110_writereg(state,0x72,0);333333334334- /* write the topmost 8 bits */335335- cx24110_writereg(state,0x72,(data>>24)&0xff);334334+ /* write the topmost 8 bits */335335+ cx24110_writereg(state,0x72,(data>>24)&0xff);336336337337- /* wait for the send to be completed */338338- while ((cx24110_readreg(state,0x6d)&0xc0)==0x80)337337+ /* wait for the send to be completed */338338+ while ((cx24110_readreg(state,0x6d)&0xc0)==0x80)339339 ;340340341341- /* send another 8 bytes */342342- cx24110_writereg(state,0x72,(data>>16)&0xff);343343- while ((cx24110_readreg(state,0x6d)&0xc0)==0x80)341341+ /* send another 8 bytes */342342+ cx24110_writereg(state,0x72,(data>>16)&0xff);343343+ while ((cx24110_readreg(state,0x6d)&0xc0)==0x80)344344 ;345345346346- /* and the topmost 5 bits of this byte */347347- cx24110_writereg(state,0x72,(data>>8)&0xff);348348- while ((cx24110_readreg(state,0x6d)&0xc0)==0x80)346346+ /* and the topmost 5 bits of this byte */347347+ cx24110_writereg(state,0x72,(data>>8)&0xff);348348+ while ((cx24110_readreg(state,0x6d)&0xc0)==0x80)349349 ;350350351351- /* now strobe the enable line once */352352- cx24110_writereg(state,0x6d,0x32);353353- cx24110_writereg(state,0x6d,0x30);351351+ /* now strobe the enable line once */352352+ cx24110_writereg(state,0x6d,0x32);353353+ cx24110_writereg(state,0x6d,0x30);354354355355- return 0;355355+ return 0;356356}357357358358static int cx24110_initfe(struct dvb_frontend* fe)359359{360360 struct cx24110_state *state = fe->demodulator_priv;361361/* fixme (low): error handling */362362- int i;362362+ int i;363363364364 dprintk("%s: init chip\n", __FUNCTION__);365365366366- for(i=0;i<sizeof(cx24110_regdata)/sizeof(cx24110_regdata[0]);i++) {366366+ for(i=0;i<sizeof(cx24110_regdata)/sizeof(cx24110_regdata[0]);i++) {367367 cx24110_writereg(state, cx24110_regdata[i].reg, cx24110_regdata[i].data);368368- };368368+ };369369370370 if (state->config->pll_init) state->config->pll_init(fe);371371
+13-13
drivers/media/dvb/frontends/l64781.c
···22 driver for LSI L64781 COFDM demodulator3344 Copyright (C) 2001 Holger Waechtler for Convergence Integrated Media GmbH55- Marko Kohtala <marko.kohtala@luukku.com>55+ Marko Kohtala <marko.kohtala@luukku.com>6677 This program is free software; you can redistribute it and/or modify88 it under the terms of the GNU General Public License as published by···433433{434434 struct l64781_state* state = fe->demodulator_priv;435435436436- reset_and_configure (state);436436+ reset_and_configure (state);437437438438 /* Power up */439439 l64781_writereg (state, 0x3e, 0xa5);···456456 l64781_writereg (state, 0x0d, 0x8c);457457458458 /* With ppm=8000, it seems the DTR_SENSITIVITY will result in459459- value of 2 with all possible bandwidths and guard460460- intervals, which is the initial value anyway. */461461- /*l64781_writereg (state, 0x19, 0x92);*/459459+ value of 2 with all possible bandwidths and guard460460+ intervals, which is the initial value anyway. */461461+ /*l64781_writereg (state, 0x19, 0x92);*/462462463463 /* Everything is two's complement, soft bit and CSI_OUT too */464464 l64781_writereg (state, 0x1e, 0x09);···477477static int l64781_get_tune_settings(struct dvb_frontend* fe,478478 struct dvb_frontend_tune_settings* fesettings)479479{480480- fesettings->min_delay_ms = 4000;481481- fesettings->step_size = 0;482482- fesettings->max_drift = 0;483483- return 0;480480+ fesettings->min_delay_ms = 4000;481481+ fesettings->step_size = 0;482482+ fesettings->max_drift = 0;483483+ return 0;484484}485485486486static void l64781_release(struct dvb_frontend* fe)···522522523523 /* The chip always responds to reads */524524 if (i2c_transfer(state->i2c, msg, 2) != 2) {525525- dprintk("No response to read on I2C bus\n");525525+ dprintk("No response to read on I2C bus\n");526526 goto error;527527 }528528···531531532532 /* Reading the POWER_DOWN register always returns 0 */533533 if (reg0x3e != 0) {534534- dprintk("Device doesn't look like L64781\n");534534+ dprintk("Device doesn't look like L64781\n");535535 goto error;536536 }537537···540540541541 /* Responds to all reads with 0 */542542 if (l64781_readreg(state, 0x1a) != 0) {543543- dprintk("Read 1 returned unexpcted value\n");543543+ dprintk("Read 1 returned unexpcted value\n");544544 goto error;545545 }546546···549549550550 /* Responds with register default value */551551 if (l64781_readreg(state, 0x1a) != 0xa1) {552552- dprintk("Read 2 returned unexpcted value\n");552552+ dprintk("Read 2 returned unexpcted value\n");553553 goto error;554554 }555555
+1-1
drivers/media/dvb/frontends/l64781.h
···22 driver for LSI L64781 COFDM demodulator3344 Copyright (C) 2001 Holger Waechtler for Convergence Integrated Media GmbH55- Marko Kohtala <marko.kohtala@luukku.com>55+ Marko Kohtala <marko.kohtala@luukku.com>6677 This program is free software; you can redistribute it and/or modify88 it under the terms of the GNU General Public License as published by
···527527 else528528 snrdb = 1000*0 + ( 1000*(12-0) * ( temp2 - 0 ) / ( 0x7C00 - 0 ) );529529530530- /* the value reported back from the frontend will be FFFF=32db 0000=0db */530530+ /* the value reported back from the frontend will be FFFF=32db 0000=0db */531531532532 *snr = snrdb * (0xFFFF/32000);533533···646646 memcpy(&state->ops, &nxt2002_ops, sizeof(struct dvb_frontend_ops));647647 state->initialised = 0;648648649649- /* Check the first 5 registers to ensure this a revision we can handle */649649+ /* Check the first 5 registers to ensure this a revision we can handle */650650651651 i2c_readbytes(state, 0x00, buf, 5);652652 if (buf[0] != 0x04) goto error; /* device id */···672672 .type = FE_ATSC,673673 .frequency_min = 54000000,674674 .frequency_max = 860000000,675675- /* stepsize is just a guess */675675+ /* stepsize is just a guess */676676 .frequency_stepsize = 166666,677677 .caps = FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |678678 FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO |
+2-2
drivers/media/dvb/frontends/nxt200x.c
···339339 switch (state->demod_chip) {340340 case NXT2004:341341 if (i2c_writebytes(state, state->config->pll_address, data, 4))342342- printk(KERN_WARNING "nxt200x: error writing to tuner\n");342342+ printk(KERN_WARNING "nxt200x: error writing to tuner\n");343343 /* wait until we have a lock */344344 while (count < 20) {345345 i2c_readbytes(state, state->config->pll_address, &buf, 1);···497497498498 /* calculate firmware CRC */499499 for (position = 0; position < fw->size; position++) {500500- crc = nxt200x_crc(crc, fw->data[position]);500500+ crc = nxt200x_crc(crc, fw->data[position]);501501 }502502503503 buf[0] = rambase >> 8;
···503503 rcvr_stat = rec_buf[1];504504 usK = (rcvr_stat & 0x10) ? 3 : 0;505505506506- /* The value reported back from the frontend will be FFFF=100% 0000=0% */506506+ /* The value reported back from the frontend will be FFFF=100% 0000=0% */507507 signal_strength = (((8952 - i20Log10(snr_equ) - usK*100)/3+5)*65535)/1000;508508 if (signal_strength > 0xffff)509509 *strength = 0xffff;
···95959696int stv0299_writereg (struct dvb_frontend* fe, u8 reg, u8 data)9797{9898- struct stv0299_state* state = fe->demodulator_priv;9898+ struct stv0299_state* state = fe->demodulator_priv;9999100100 return stv0299_writeregI(state, reg, data);101101}···220220221221static int stv0299_set_symbolrate (struct dvb_frontend* fe, u32 srate)222222{223223- struct stv0299_state* state = fe->demodulator_priv;223223+ struct stv0299_state* state = fe->demodulator_priv;224224 u64 big = srate;225225 u32 ratio;226226···271271static int stv0299_send_diseqc_msg (struct dvb_frontend* fe,272272 struct dvb_diseqc_master_cmd *m)273273{274274- struct stv0299_state* state = fe->demodulator_priv;274274+ struct stv0299_state* state = fe->demodulator_priv;275275 u8 val;276276 int i;277277···301301302302static int stv0299_send_diseqc_burst (struct dvb_frontend* fe, fe_sec_mini_cmd_t burst)303303{304304- struct stv0299_state* state = fe->demodulator_priv;304304+ struct stv0299_state* state = fe->demodulator_priv;305305 u8 val;306306307307 dprintk ("%s\n", __FUNCTION__);···328328329329static int stv0299_set_tone (struct dvb_frontend* fe, fe_sec_tone_mode_t tone)330330{331331- struct stv0299_state* state = fe->demodulator_priv;331331+ struct stv0299_state* state = fe->demodulator_priv;332332 u8 val;333333334334 if (stv0299_wait_diseqc_idle (state, 100) < 0)···350350351351static int stv0299_set_voltage (struct dvb_frontend* fe, fe_sec_voltage_t voltage)352352{353353- struct stv0299_state* state = fe->demodulator_priv;353353+ struct stv0299_state* state = fe->demodulator_priv;354354 u8 reg0x08;355355 u8 reg0x0c;356356···442442443443static int stv0299_init (struct dvb_frontend* fe)444444{445445- struct stv0299_state* state = fe->demodulator_priv;445445+ struct stv0299_state* state = fe->demodulator_priv;446446 int i;447447448448 dprintk("stv0299: init chip\n");···461461462462static int stv0299_read_status(struct dvb_frontend* fe, fe_status_t* status)463463{464464- struct stv0299_state* state = fe->demodulator_priv;464464+ struct stv0299_state* state = fe->demodulator_priv;465465466466 u8 signal = 0xff - stv0299_readreg (state, 0x18);467467 u8 sync = stv0299_readreg (state, 0x1b);···489489490490static int stv0299_read_ber(struct dvb_frontend* fe, u32* ber)491491{492492- struct stv0299_state* state = fe->demodulator_priv;492492+ struct stv0299_state* state = fe->demodulator_priv;493493494494 if (state->errmode != STATUS_BER) return 0;495495 *ber = (stv0299_readreg (state, 0x1d) << 8) | stv0299_readreg (state, 0x1e);···499499500500static int stv0299_read_signal_strength(struct dvb_frontend* fe, u16* strength)501501{502502- struct stv0299_state* state = fe->demodulator_priv;502502+ struct stv0299_state* state = fe->demodulator_priv;503503504504 s32 signal = 0xffff - ((stv0299_readreg (state, 0x18) << 8)505505 | stv0299_readreg (state, 0x19));···516516517517static int stv0299_read_snr(struct dvb_frontend* fe, u16* snr)518518{519519- struct stv0299_state* state = fe->demodulator_priv;519519+ struct stv0299_state* state = fe->demodulator_priv;520520521521 s32 xsnr = 0xffff - ((stv0299_readreg (state, 0x24) << 8)522522 | stv0299_readreg (state, 0x25));···528528529529static int stv0299_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks)530530{531531- struct stv0299_state* state = fe->demodulator_priv;531531+ struct stv0299_state* state = fe->demodulator_priv;532532533533 if (state->errmode != STATUS_UCBLOCKS) *ucblocks = 0;534534 else *ucblocks = (stv0299_readreg (state, 0x1d) << 8) | stv0299_readreg (state, 0x1e);···538538539539static int stv0299_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters * p)540540{541541- struct stv0299_state* state = fe->demodulator_priv;541541+ struct stv0299_state* state = fe->demodulator_priv;542542 int invval = 0;543543544544 dprintk ("%s : FE_SET_FRONTEND\n", __FUNCTION__);···571571572572static int stv0299_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters * p)573573{574574- struct stv0299_state* state = fe->demodulator_priv;574574+ struct stv0299_state* state = fe->demodulator_priv;575575 s32 derot_freq;576576 int invval;577577···596596597597static int stv0299_sleep(struct dvb_frontend* fe)598598{599599- struct stv0299_state* state = fe->demodulator_priv;599599+ struct stv0299_state* state = fe->demodulator_priv;600600601601 stv0299_writeregI(state, 0x02, 0x80);602602 state->initialised = 0;···606606607607static int stv0299_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* fesettings)608608{609609- struct stv0299_state* state = fe->demodulator_priv;609609+ struct stv0299_state* state = fe->demodulator_priv;610610611611 fesettings->min_delay_ms = state->config->min_delay_ms;612612 if (fesettings->parameters.u.qpsk.symbol_rate < 10000000) {···658658659659 /* create dvb_frontend */660660 state->frontend.ops = &state->ops;661661- state->frontend.demodulator_priv = state;661661+ state->frontend.demodulator_priv = state;662662 return &state->frontend;663663664664error:···714714715715MODULE_DESCRIPTION("ST STV0299 DVB Demodulator driver");716716MODULE_AUTHOR("Ralph Metzler, Holger Waechtler, Peter Schildmann, Felix Domke, "717717- "Andreas Oberritter, Andrew de Quincey, Kenneth Aafl�y");717717+ "Andreas Oberritter, Andrew de Quincey, Kenneth Aafl�y");718718MODULE_LICENSE("GPL");719719720720EXPORT_SYMBOL(stv0299_writereg);
+5-5
drivers/media/dvb/frontends/tda10021.c
···11/*22 TDA10021 - Single Chip Cable Channel Receiver driver module33- used on the the Siemens DVB-C cards33+ used on the the Siemens DVB-C cards4455 Copyright (C) 1999 Convergence Integrated Media GmbH <ralph@convergence.de>66 Copyright (C) 2004 Markus Schulz <msc@antzsystem.de>77- Support for TDA1002177+ Support for TDA100218899 This program is free software; you can redistribute it and/or modify1010 it under the terms of the GNU General Public License as published by···76767777static int tda10021_writereg (struct tda10021_state* state, u8 reg, u8 data)7878{7979- u8 buf[] = { reg, data };7979+ u8 buf[] = { reg, data };8080 struct i2c_msg msg = { .addr = state->config->demod_address, .flags = 0, .buf = buf, .len = 2 };8181- int ret;8181+ int ret;82828383 ret = i2c_transfer (state->i2c, &msg, 1);8484 if (ret != 1)···9595 u8 b0 [] = { reg };9696 u8 b1 [] = { 0 };9797 struct i2c_msg msg [] = { { .addr = state->config->demod_address, .flags = 0, .buf = b0, .len = 1 },9898- { .addr = state->config->demod_address, .flags = I2C_M_RD, .buf = b1, .len = 1 } };9898+ { .addr = state->config->demod_address, .flags = I2C_M_RD, .buf = b1, .len = 1 } };9999 int ret;100100101101 ret = i2c_transfer (state->i2c, msg, 2);
+2-2
drivers/media/dvb/frontends/tda10021.h
···11/*22 TDA10021 - Single Chip Cable Channel Receiver driver module33- used on the the Siemens DVB-C cards33+ used on the the Siemens DVB-C cards4455 Copyright (C) 1999 Convergence Integrated Media GmbH <ralph@convergence.de>66 Copyright (C) 2004 Markus Schulz <msc@antzsystem.de>77- Support for TDA1002177+ Support for TDA100218899 This program is free software; you can redistribute it and/or modify1010 it under the terms of the GNU General Public License as published by
+1-1
drivers/media/dvb/frontends/tda1004x.c
···475475 ret = state->config->request_firmware(fe, &fw, TDA10046_DEFAULT_FIRMWARE);476476 if (ret) {477477 printk(KERN_ERR "tda1004x: no firmware upload (timeout or file not found?)\n");478478- return ret;478478+ return ret;479479 }480480 tda1004x_write_mask(state, TDA1004X_CONFC4, 8, 8); // going to boot from HOST481481 ret = tda1004x_do_upload(state, fw->data, fw->size, TDA10046H_CODE_CPT, TDA10046H_CODE_IN);
···12031203 input_dev->keycode = rc_keys;1204120412051205 for (i = 0; i < ARRAY_SIZE(rc_keys); i++)12061206- set_bit(rc_keys[i], input_dev->keybit);12061206+ set_bit(rc_keys[i], input_dev->keybit);1207120712081208 input_register_device(input_dev);12091209···15291529 usb_free_urb(dec->irq_urb);1530153015311531 usb_buffer_free(dec->udev,IRQ_PACKET_SIZE,15321532- dec->irq_buffer, dec->irq_dma_handle);15321532+ dec->irq_buffer, dec->irq_dma_handle);1533153315341534 if (dec->rc_input_dev) {15351535 input_unregister_device(dec->rc_input_dev);
+7-7
drivers/media/video/Kconfig
···188188189189 To compile this driver as a module, choose M here: the190190 module will be called zr36067.191191-191191+192192config VIDEO_ZORAN_BUZ193193 tristate "Iomega Buz support"194194 depends on VIDEO_ZORAN···204204205205config VIDEO_ZORAN_DC30206206 tristate "Pinnacle/Miro DC30(+) support"207207- depends on VIDEO_ZORAN208208- help207207+ depends on VIDEO_ZORAN208208+ help209209 Support for the Pinnacle/Miro DC30(+) MJPEG capture/playback210210 card. This also supports really old DC10 cards based on the211211 zr36050 MJPEG codec and zr36016 VFE.···260260 ---help---261261 This is a video4linux driver for the 'Multimedia eXtension Board'262262 TV card by Siemens-Nixdorf.263263-263263+264264 To compile this driver as a module, choose M here: the265265 module will be called mxb.266266···274274 for SAA7146 bases boards, so if you have some unsupported275275 saa7146 based, analog video card, chances are good that it276276 will work with this skeleton driver.277277-277277+278278 To compile this driver as a module, choose M here: the279279 module will be called dpc7146.280280···285285 ---help---286286 This is a video4linux driver for the Hexium HV-PCI6 and287287 Orion frame grabber cards by Hexium.288288-288288+289289 To compile this driver as a module, choose M here: the290290 module will be called hexium_orion.291291···297297 This is a video4linux driver for the Hexium Gemini frame298298 grabber card by Hexium. Please note that the Gemini Dual299299 card is *not* fully supported.300300-300300+301301 To compile this driver as a module, choose M here: the302302 module will be called hexium_gemini.303303
···22802280 }2281228122822282 if (unlikely(skge->tx_avail < skb_shinfo(skb)->nr_frags +1)) {22832283- netif_stop_queue(dev);22842284- spin_unlock_irqrestore(&skge->tx_lock, flags);22832283+ if (!netif_queue_stopped(dev)) {22842284+ netif_stop_queue(dev);2285228522862286- printk(KERN_WARNING PFX "%s: ring full when queue awake!\n",22872287- dev->name);22862286+ printk(KERN_WARNING PFX "%s: ring full when queue awake!\n",22872287+ dev->name);22882288+ }22892289+ spin_unlock_irqrestore(&skge->tx_lock, flags);22882290 return NETDEV_TX_BUSY;22892291 }22902292
+64-13
drivers/net/tg3.c
···68686969#define DRV_MODULE_NAME "tg3"7070#define PFX DRV_MODULE_NAME ": "7171-#define DRV_MODULE_VERSION "3.43"7272-#define DRV_MODULE_RELDATE "Oct 24, 2005"7171+#define DRV_MODULE_VERSION "3.45"7272+#define DRV_MODULE_RELDATE "Dec 13, 2005"73737474#define TG3_DEF_MAC_MODE 07575#define TG3_DEF_RX_MODE 0···102510251026102610271027 if ((tp->tg3_flags & TG3_FLAG_WOL_ENABLE) != 0 ||10281028- (tp_peer->tg3_flags & TG3_FLAG_WOL_ENABLE) != 0) {10281028+ (tp->tg3_flags & TG3_FLAG_ENABLE_ASF) != 0 ||10291029+ (tp_peer->tg3_flags & TG3_FLAG_WOL_ENABLE) != 0 ||10301030+ (tp_peer->tg3_flags & TG3_FLAG_ENABLE_ASF) != 0) {10291031 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700 ||10301032 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701) {10311033 tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl |···1107110511081106static void tg3_write_sig_post_reset(struct tg3 *, int);11091107static int tg3_halt_cpu(struct tg3 *, u32);11081108+static int tg3_nvram_lock(struct tg3 *);11091109+static void tg3_nvram_unlock(struct tg3 *);1110111011111111static int tg3_set_power_state(struct tg3 *tp, int state)11121112{···11821178 tp->link_config.autoneg = AUTONEG_ENABLE;11831179 tg3_setup_phy(tp, 0);11841180 }11811181+11821182+ if (!(tp->tg3_flags & TG3_FLAG_ENABLE_ASF)) {11831183+ int i;11841184+ u32 val;11851185+11861186+ for (i = 0; i < 200; i++) {11871187+ tg3_read_mem(tp, NIC_SRAM_FW_ASF_STATUS_MBOX, &val);11881188+ if (val == ~NIC_SRAM_FIRMWARE_MBOX_MAGIC1)11891189+ break;11901190+ msleep(1);11911191+ }11921192+ }11931193+ tg3_write_mem(tp, NIC_SRAM_WOL_MBOX, WOL_SIGNATURE |11941194+ WOL_DRV_STATE_SHUTDOWN |11951195+ WOL_DRV_WOL | WOL_SET_MAGIC_PKT);1185119611861197 pci_read_config_word(tp->pdev, pm + PCI_PM_PMC, &power_caps);11871198···12871268 }12881269 }1289127012711271+ if (!(tp->tg3_flags & TG3_FLAG_WOL_ENABLE) &&12721272+ !(tp->tg3_flags & TG3_FLAG_ENABLE_ASF)) {12731273+ /* Turn off the PHY */12741274+ if (!(tp->tg3_flags2 & TG3_FLG2_PHY_SERDES)) {12751275+ tg3_writephy(tp, MII_TG3_EXT_CTRL,12761276+ MII_TG3_EXT_CTRL_FORCE_LED_OFF);12771277+ tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x01b2);12781278+ tg3_writephy(tp, MII_BMCR, BMCR_PDOWN);12791279+ }12801280+ }12811281+12901282 tg3_frob_aux_power(tp);1291128312921284 /* Workaround for unstable PLL clock */···1307127713081278 val &= ~((1 << 16) | (1 << 4) | (1 << 2) | (1 << 1) | 1);13091279 tw32(0x7d00, val);13101310- if (!(tp->tg3_flags & TG3_FLAG_ENABLE_ASF))12801280+ if (!(tp->tg3_flags & TG3_FLAG_ENABLE_ASF)) {12811281+ tg3_nvram_lock(tp);13111282 tg3_halt_cpu(tp, RX_CPU_BASE);12831283+ tw32_f(NVRAM_SWARB, SWARB_REQ_CLR0);12841284+ tg3_nvram_unlock(tp);12851285+ }13121286 }1313128713141288 /* Finally, set the new power state. */···18461812 }18471813 }18481814relink:18491849- if (current_link_up == 0) {18151815+ if (current_link_up == 0 || tp->link_config.phy_is_low_power) {18501816 u32 tmp;1851181718521818 tg3_phy_copper_begin(tp);···35993565 if (!spin_trylock(&tp->tx_lock))36003566 return NETDEV_TX_LOCKED; 3601356736023602- /* This is a hard error, log it. */36033568 if (unlikely(TX_BUFFS_AVAIL(tp) <= (skb_shinfo(skb)->nr_frags + 1))) {36043604- netif_stop_queue(dev);35693569+ if (!netif_queue_stopped(dev)) {35703570+ netif_stop_queue(dev);35713571+35723572+ /* This is a hard error, log it. */35733573+ printk(KERN_ERR PFX "%s: BUG! Tx Ring full when "35743574+ "queue awake!\n", dev->name);35753575+ }36053576 spin_unlock(&tp->tx_lock);36063606- printk(KERN_ERR PFX "%s: BUG! Tx Ring full when queue awake!\n",36073607- dev->name);36083577 return NETDEV_TX_BUSY;36093578 }36103579···85678530 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5701) {85688531 tp->tg3_flags |= TG3_FLAG_NVRAM;8569853285338533+ tg3_nvram_lock(tp);85708534 tg3_enable_nvram_access(tp);8571853585728536 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5752)···85788540 tg3_get_nvram_size(tp);8579854185808542 tg3_disable_nvram_access(tp);85438543+ tg3_nvram_unlock(tp);8581854485828545 } else {85838546 tp->tg3_flags &= ~(TG3_FLAG_NVRAM | TG3_FLAG_NVRAM_BUFFERED);···86768637 if (ret == 0)86778638 *val = swab32(tr32(NVRAM_RDDATA));8678863986798679- tg3_nvram_unlock(tp);86808680-86818640 tg3_disable_nvram_access(tp);86418641+86428642+ tg3_nvram_unlock(tp);8682864386838644 return ret;86848645}···8764872587658726 offset = offset + (pagesize - page_off);8766872787288728+ /* Nvram lock released by tg3_nvram_read() above,87298729+ * so need to get it again.87308730+ */87318731+ tg3_nvram_lock(tp);87678732 tg3_enable_nvram_access(tp);8768873387698734 /*···1047710434 break;1047810435 pci_dev_put(peer);1047910436 }1048010480- if (!peer || peer == tp->pdev)1048110481- BUG();1043710437+ /* 5704 can be configured in single-port mode, set peer to1043810438+ * tp->pdev in that case.1043910439+ */1044010440+ if (!peer) {1044110441+ peer = tp->pdev;1044210442+ return peer;1044310443+ }10482104441048310445 /*1048410446 * We don't need to keep the refcount elevated; there's no way···10865108171086610818 tg3_full_lock(tp, 0);1086710819 tg3_halt(tp, RESET_KIND_SHUTDOWN, 1);1082010820+ tp->tg3_flags &= ~TG3_FLAG_INIT_COMPLETE;1086810821 tg3_full_unlock(tp);10869108221087010823 err = tg3_set_power_state(tp, pci_choose_state(pdev, state));1087110824 if (err) {1087210825 tg3_full_lock(tp, 0);10873108261082710827+ tp->tg3_flags |= TG3_FLAG_INIT_COMPLETE;1087410828 tg3_init_hw(tp);10875108291087610830 tp->timer.expires = jiffies + tp->timer_offset;···10906108561090710857 tg3_full_lock(tp, 0);10908108581085910859+ tp->tg3_flags |= TG3_FLAG_INIT_COMPLETE;1090910860 tg3_init_hw(tp);10910108611091110862 tp->timer.expires = jiffies + tp->timer_offset;
···542542543543void scsi_next_command(struct scsi_cmnd *cmd)544544{545545- struct request_queue *q = cmd->device->request_queue;545545+ struct scsi_device *sdev = cmd->device;546546+ struct request_queue *q = sdev->request_queue;547547+548548+ /* need to hold a reference on the device before we let go of the cmd */549549+ get_device(&sdev->sdev_gendev);546550547551 scsi_put_command(cmd);548552 scsi_run_queue(q);553553+554554+ /* ok to remove device now */555555+ put_device(&sdev->sdev_gendev);549556}550557551558void scsi_run_host_queues(struct Scsi_Host *shost)
-3
drivers/scsi/scsi_scan.c
···266266 /*267267 * if LLDD reports slave not present, don't clutter268268 * console with alloc failure messages269269-270270-271269 */272270 if (ret == -ENXIO)273271 display_failure_msg = 0;···277279278280out_device_destroy:279281 transport_destroy_device(&sdev->sdev_gendev);280280- scsi_free_queue(sdev->request_queue);281282 put_device(&sdev->sdev_gendev);282283out:283284 if (display_failure_msg)
+1-1
drivers/serial/8250_pci.c
···516516 break;517517 case 3:518518 offset = board->uart_offset;519519- bar = 1;519519+ /* FALLTHROUGH */520520 case 4: /* BAR 2 */521521 case 5: /* BAR 3 */522522 case 6: /* BAR 4 */
+3-1
drivers/usb/input/hid-core.c
···893893894894 size = ((report->size - 1) >> 3) + 1;895895896896- if (len < size)896896+ if (len < size) {897897 dbg("report %d is too short, (%d < %d)", report->id, len, size);898898+ memset(data + len, 0, size - len);899899+ }898900899901 if (hid->claimed & HID_CLAIMED_HIDDEV)900902 hiddev_report_event(hid, report);
···6464 int const shift = dst_idx-src_idx;6565 int left, right;66666767- first = ~0UL >> dst_idx;6868- last = ~(~0UL >> ((dst_idx+n) % bits));6767+ first = FB_SHIFT_HIGH(~0UL, dst_idx);6868+ last = ~(FB_SHIFT_HIGH(~0UL, (dst_idx+n) % bits));69697070 if (!shift) {7171 // Same alignment for source and dest···216216217217 shift = dst_idx-src_idx;218218219219- first = ~0UL << (bits - 1 - dst_idx);220220- last = ~(~0UL << (bits - 1 - ((dst_idx-n) % bits)));219219+ first = FB_SHIFT_LOW(~0UL, bits - 1 - dst_idx);220220+ last = ~(FB_SHIFT_LOW(~0UL, bits - 1 - ((dst_idx-n) % bits)));221221222222 if (!shift) {223223 // Same alignment for source and dest
+8-8
drivers/video/cfbfillrect.c
···110110 if (!n)111111 return;112112113113- first = ~0UL >> dst_idx;114114- last = ~(~0UL >> ((dst_idx+n) % bits));113113+ first = FB_SHIFT_HIGH(~0UL, dst_idx);114114+ last = ~(FB_SHIFT_HIGH(~0UL, (dst_idx+n) % bits));115115116116 if (dst_idx+n <= bits) {117117 // Single word···167167 if (!n)168168 return;169169170170- first = ~0UL >> dst_idx;171171- last = ~(~0UL >> ((dst_idx+n) % bits));170170+ first = FB_SHIFT_HIGH(~0UL, dst_idx);171171+ last = ~(FB_SHIFT_HIGH(~0UL, (dst_idx+n) % bits));172172173173 if (dst_idx+n <= bits) {174174 // Single word···221221 if (!n)222222 return;223223224224- first = ~0UL >> dst_idx;225225- last = ~(~0UL >> ((dst_idx+n) % bits));224224+ first = FB_SHIFT_HIGH(~0UL, dst_idx);225225+ last = ~(FB_SHIFT_HIGH(~0UL, (dst_idx+n) % bits));226226227227 if (dst_idx+n <= bits) {228228 // Single word···290290 if (!n)291291 return;292292293293- first = ~0UL >> dst_idx;294294- last = ~(~0UL >> ((dst_idx+n) % bits));293293+ first = FB_SHIFT_HIGH(~0UL, dst_idx);294294+ last = ~(FB_SHIFT_HIGH(~0UL, (dst_idx+n) % bits));295295296296 if (dst_idx+n <= bits) {297297 // Single word
+12-23
drivers/video/cfbimgblt.c
···7676#define FB_WRITEL fb_writel7777#define FB_READL fb_readl78787979-#if defined (__BIG_ENDIAN)8080-#define LEFT_POS(bpp) (32 - bpp)8181-#define SHIFT_HIGH(val, bits) ((val) >> (bits))8282-#define SHIFT_LOW(val, bits) ((val) << (bits))8383-#define BIT_NR(b) (7 - (b))8484-#else8585-#define LEFT_POS(bpp) (0)8686-#define SHIFT_HIGH(val, bits) ((val) << (bits))8787-#define SHIFT_LOW(val, bits) ((val) >> (bits))8888-#define BIT_NR(b) (b)8989-#endif9090-9179static inline void color_imageblit(const struct fb_image *image, 9280 struct fb_info *p, u8 __iomem *dst1, 9381 u32 start_index,···97109 val = 0;9811099111 if (start_index) {100100- u32 start_mask = ~(SHIFT_HIGH(~(u32)0, start_index));112112+ u32 start_mask = ~(FB_SHIFT_HIGH(~(u32)0, start_index));101113 val = FB_READL(dst) & start_mask;102114 shift = start_index;103115 }···107119 color = palette[*src];108120 else109121 color = *src;110110- color <<= LEFT_POS(bpp);111111- val |= SHIFT_HIGH(color, shift);122122+ color <<= FB_LEFT_POS(bpp);123123+ val |= FB_SHIFT_HIGH(color, shift);112124 if (shift >= null_bits) {113125 FB_WRITEL(val, dst++);114126115127 val = (shift == null_bits) ? 0 : 116116- SHIFT_LOW(color, 32 - shift);128128+ FB_SHIFT_LOW(color, 32 - shift);117129 }118130 shift += bpp;119131 shift &= (32 - 1);120132 src++;121133 }122134 if (shift) {123123- u32 end_mask = SHIFT_HIGH(~(u32)0, shift);135135+ u32 end_mask = FB_SHIFT_HIGH(~(u32)0, shift);124136125137 FB_WRITEL((FB_READL(dst) & end_mask) | val, dst);126138 }···150162 u32 i, j, l;151163152164 dst2 = (u32 __iomem *) dst1;165165+ fgcolor <<= FB_LEFT_POS(bpp);166166+ bgcolor <<= FB_LEFT_POS(bpp);153167154168 for (i = image->height; i--; ) {155169 shift = val = 0;···162172163173 /* write leading bits */164174 if (start_index) {165165- u32 start_mask = ~(SHIFT_HIGH(~(u32)0, start_index));175175+ u32 start_mask = ~(FB_SHIFT_HIGH(~(u32)0,start_index));166176 val = FB_READL(dst) & start_mask;167177 shift = start_index;168178 }169179170180 while (j--) {171181 l--;172172- color = (*s & 1 << (BIT_NR(l))) ? fgcolor : bgcolor;173173- color <<= LEFT_POS(bpp);174174- val |= SHIFT_HIGH(color, shift);182182+ color = (*s & 1 << (FB_BIT_NR(l))) ? fgcolor : bgcolor;183183+ val |= FB_SHIFT_HIGH(color, shift);175184176185 /* Did the bitshift spill bits to the next long? */177186 if (shift >= null_bits) {178187 FB_WRITEL(val, dst++);179188 val = (shift == null_bits) ? 0 :180180- SHIFT_LOW(color,32 - shift);189189+ FB_SHIFT_LOW(color,32 - shift);181190 }182191 shift += bpp;183192 shift &= (32 - 1);···185196186197 /* write trailing bits */187198 if (shift) {188188- u32 end_mask = SHIFT_HIGH(~(u32)0, shift);199199+ u32 end_mask = FB_SHIFT_HIGH(~(u32)0, shift);189200190201 FB_WRITEL((FB_READL(dst) & end_mask) | val, dst);191202 }
-1
drivers/video/cg14.c
···206206 int mode;207207 int ramsize;208208 struct sbus_dev *sdev;209209- struct list_head list;210209};211210212211static void __cg14_reset(struct cg14_par *par)
···359359 int prom_parent_node;360360 int dac_rev;361361 int board_type;362362- struct list_head list;363362};364363365364static void FFBFifo(struct ffb_par *par, int n)
···125125 int lowdepth;126126127127 struct sbus_dev *sdev;128128- struct list_head list;129128};130129131130/* Reset control plane so that WID is 8-bit plane. */···443444444445 tcx_reset(&all->info);445446446446- tcx_blank(0, &all->info);447447+ tcx_blank(FB_BLANK_UNBLANK, &all->info);447448448449 if (fb_alloc_cmap(&all->info.cmap, 256, 0)) {449450 printk(KERN_ERR "tcx: Could not allocate color map.\n");
+10-3
fs/inotify.c
···364364/*365365 * find_inode - resolve a user-given path to a specific inode and return a nd366366 */367367-static int find_inode(const char __user *dirname, struct nameidata *nd)367367+static int find_inode(const char __user *dirname, struct nameidata *nd,368368+ unsigned flags)368369{369370 int error;370371371371- error = __user_walk(dirname, LOOKUP_FOLLOW, nd);372372+ error = __user_walk(dirname, flags, nd);372373 if (error)373374 return error;374375 /* you can only watch an inode if you have read permissions on it */···934933 struct file *filp;935934 int ret, fput_needed;936935 int mask_add = 0;936936+ unsigned flags = 0;937937938938 filp = fget_light(fd, &fput_needed);939939 if (unlikely(!filp))···946944 goto fput_and_out;947945 }948946949949- ret = find_inode(path, &nd);947947+ if (!(mask & IN_DONT_FOLLOW))948948+ flags |= LOOKUP_FOLLOW;949949+ if (mask & IN_ONLYDIR)950950+ flags |= LOOKUP_DIRECTORY;951951+952952+ ret = find_inode(path, &nd, flags);950953 if (unlikely(ret))951954 goto fput_and_out;952955
···12121313#define fixup_irq(x) (x)14141515-/*1616- * This prototype is required for cascading of multiplexed interrupts.1717- * Since it doesn't exist elsewhere, we'll put it here for now.1818- */1919-extern void do_IRQ(int irq, struct pt_regs *regs);
+3-3
include/asm-arm/io.h
···4242extern void __raw_writesw(void __iomem *addr, const void *data, int wordlen);4343extern void __raw_writesl(void __iomem *addr, const void *data, int longlen);44444545-extern void __raw_readsb(void __iomem *addr, void *data, int bytelen);4646-extern void __raw_readsw(void __iomem *addr, void *data, int wordlen);4747-extern void __raw_readsl(void __iomem *addr, void *data, int longlen);4545+extern void __raw_readsb(const void __iomem *addr, void *data, int bytelen);4646+extern void __raw_readsw(const void __iomem *addr, void *data, int wordlen);4747+extern void __raw_readsl(const void __iomem *addr, void *data, int longlen);48484949#define __raw_writeb(v,a) (__chk_io_ptr(a), *(volatile unsigned char __force *)(a) = (v))5050#define __raw_writew(v,a) (__chk_io_ptr(a), *(volatile unsigned short __force *)(a) = (v))
···1717#define local_set(l, i) atomic64_set(&(l)->val, i)1818#define local_inc(l) atomic64_inc(&(l)->val)1919#define local_dec(l) atomic64_dec(&(l)->val)2020-#define local_add(l) atomic64_add(&(l)->val)2121-#define local_sub(l) atomic64_sub(&(l)->val)2020+#define local_add(i, l) atomic64_add((i), &(l)->val)2121+#define local_sub(i, l) atomic64_sub((i), &(l)->val)22222323/* Non-atomic variants, i.e., preemption disabled and won't be touched in interrupt, etc. */2424
+2-1
include/asm-ia64/sal.h
···320320typedef struct sal_log_record_header {321321 u64 id; /* Unique monotonically increasing ID */322322 sal_log_revision_t revision; /* Major and Minor revision of header */323323- u16 severity; /* Error Severity */323323+ u8 severity; /* Error Severity */324324+ u8 validation_bits; /* 0: platform_guid, 1: !timestamp */324325 u32 len; /* Length of this error log in bytes */325326 sal_log_timestamp_t timestamp; /* Timestamp */326327 efi_guid_t platform_guid; /* Unique OEM Platform ID */
+17-3
include/asm-ia64/sn/pcidev.h
···33 * License. See the file "COPYING" in the main directory of this archive44 * for more details.55 *66- * Copyright (C) 1992 - 1997, 2000-2004 Silicon Graphics, Inc. All rights reserved.66+ * Copyright (C) 1992 - 1997, 2000-2005 Silicon Graphics, Inc. All rights reserved.77 */88#ifndef _ASM_IA64_SN_PCI_PCIDEV_H99#define _ASM_IA64_SN_PCI_PCIDEV_H10101111#include <linux/pci.h>12121313-#define SN_PCIDEV_INFO(pci_dev) \1414- ((struct pcidev_info *)(pci_dev)->sysdata)1313+/*1414+ * In ia64, pci_dev->sysdata must be a *pci_controller. To provide access to1515+ * the pcidev_info structs for all devices under a controller, we extend the1616+ * definition of pci_controller, via sn_pci_controller, to include a list1717+ * of pcidev_info.1818+ */1919+struct sn_pci_controller {2020+ struct pci_controller pci_controller;2121+ struct list_head pcidev_info;2222+};2323+2424+#define SN_PCI_CONTROLLER(dev) ((struct sn_pci_controller *) dev->sysdata)2525+2626+#define SN_PCIDEV_INFO(dev) sn_pcidev_info_get(dev)15271628#define SN_PCIBUS_BUSSOFT_INFO(pci_bus) \1729 (struct pcibus_info *)((struct pcibus_bussoft *)(PCI_CONTROLLER((pci_bus))->platform_data))···6553 struct sn_irq_info *pdi_sn_irq_info;6654 struct sn_pcibus_provider *pdi_provider; /* sn pci ops */6755 struct pci_dev *host_pci_dev; /* host bus link */5656+ struct list_head pdi_list; /* List of pcidev_info */6857};69587059extern void sn_irq_fixup(struct pci_dev *pci_dev,7160 struct sn_irq_info *sn_irq_info);7261extern void sn_irq_unfixup(struct pci_dev *pci_dev);6262+extern struct pcidev_info * sn_pcidev_info_get(struct pci_dev *);7363extern void sn_pci_controller_fixup(int segment, int busnum,7464 struct pci_bus *bus);7565extern void sn_bus_store_sysdata(struct pci_dev *dev);
···220220 unsigned int local);221221struct mm_struct;222222extern int hash_huge_page(struct mm_struct *mm, unsigned long access,223223- unsigned long ea, unsigned long vsid, int local);223223+ unsigned long ea, unsigned long vsid, int local,224224+ unsigned long trap);224225225226extern void htab_finish_init(void);226227extern int htab_bolt_mapping(unsigned long vstart, unsigned long vend,
+2
include/linux/cn_proc.h
···2626#define CN_PROC_H27272828#include <linux/types.h>2929+#include <linux/time.h>2930#include <linux/connector.h>30313132/*···6665 PROC_EVENT_EXIT = 0x800000006766 } what;6867 __u32 cpu;6868+ struct timespec timestamp;6969 union { /* must be last field of proc_event struct */7070 struct {7171 __u32 err;
+14-14
include/linux/dvb/audio.h
···323233333434typedef enum {3535- AUDIO_SOURCE_DEMUX, /* Select the demux as the main source */3535+ AUDIO_SOURCE_DEMUX, /* Select the demux as the main source */3636 AUDIO_SOURCE_MEMORY /* Select internal memory as the main source */3737} audio_stream_source_t;383839394040typedef enum {4141 AUDIO_STOPPED, /* Device is stopped */4242- AUDIO_PLAYING, /* Device is currently playing */4242+ AUDIO_PLAYING, /* Device is currently playing */4343 AUDIO_PAUSED /* Device is paused */4444} audio_play_state_t;454546464747typedef enum {4848- AUDIO_STEREO,4949- AUDIO_MONO_LEFT,4848+ AUDIO_STEREO,4949+ AUDIO_MONO_LEFT,5050 AUDIO_MONO_RIGHT5151} audio_channel_select_t;525253535454typedef struct audio_mixer {5555- unsigned int volume_left;5656- unsigned int volume_right;5555+ unsigned int volume_left;5656+ unsigned int volume_right;5757 // what else do we need? bass, pass-through, ...5858} audio_mixer_t;595960606161typedef struct audio_status {6262- int AV_sync_state; /* sync audio and video? */6363- int mute_state; /* audio is muted */6464- audio_play_state_t play_state; /* current playback state */6565- audio_stream_source_t stream_source; /* current stream source */6666- audio_channel_select_t channel_select; /* currently selected channel */6767- int bypass_mode; /* pass on audio data to */6262+ int AV_sync_state; /* sync audio and video? */6363+ int mute_state; /* audio is muted */6464+ audio_play_state_t play_state; /* current playback state */6565+ audio_stream_source_t stream_source; /* current stream source */6666+ audio_channel_select_t channel_select; /* currently selected channel */6767+ int bypass_mode; /* pass on audio data to */6868 audio_mixer_t mixer_state; /* current mixer state */6969} audio_status_t; /* separate decoder hardware */7070···7474 int vocal1; /* into left and right t at 70% each */7575 int vocal2; /* if both, Vocal1 and Vocal2 are non-zero, Vocal1 gets*/7676 int melody; /* mixed into the left channel and */7777- /* Vocal2 into the right channel at 100% each. */7878- /* if Melody is non-zero, the melody channel gets mixed*/7777+ /* Vocal2 into the right channel at 100% each. */7878+ /* if Melody is non-zero, the melody channel gets mixed*/7979} audio_karaoke_t; /* into left and right */80808181
+18-18
include/linux/dvb/ca.h
···2727/* slot interface types and info */28282929typedef struct ca_slot_info {3030- int num; /* slot number */3030+ int num; /* slot number */31313232- int type; /* CA interface this slot supports */3232+ int type; /* CA interface this slot supports */3333#define CA_CI 1 /* CI high level interface */3434#define CA_CI_LINK 2 /* CI link layer level interface */3535#define CA_CI_PHYS 4 /* CI physical layer level interface */3636#define CA_DESCR 8 /* built-in descrambler */3737#define CA_SC 128 /* simple smart card interface */38383939- unsigned int flags;3939+ unsigned int flags;4040#define CA_CI_MODULE_PRESENT 1 /* module (or card) inserted */4141#define CA_CI_MODULE_READY 24242} ca_slot_info_t;···4545/* descrambler types and info */46464747typedef struct ca_descr_info {4848- unsigned int num; /* number of available descramblers (keys) */4949- unsigned int type; /* type of supported scrambling system */4848+ unsigned int num; /* number of available descramblers (keys) */4949+ unsigned int type; /* type of supported scrambling system */5050#define CA_ECD 15151#define CA_NDS 25252#define CA_DSS 45353} ca_descr_info_t;54545555typedef struct ca_caps {5656- unsigned int slot_num; /* total number of CA card and module slots */5757- unsigned int slot_type; /* OR of all supported types */5858- unsigned int descr_num; /* total number of descrambler slots (keys) */5959- unsigned int descr_type; /* OR of all supported types */5656+ unsigned int slot_num; /* total number of CA card and module slots */5757+ unsigned int slot_type; /* OR of all supported types */5858+ unsigned int descr_num; /* total number of descrambler slots (keys) */5959+ unsigned int descr_type; /* OR of all supported types */6060} ca_caps_t;61616262/* a message to/from a CI-CAM */6363typedef struct ca_msg {6464- unsigned int index;6565- unsigned int type;6666- unsigned int length;6767- unsigned char msg[256];6464+ unsigned int index;6565+ unsigned int type;6666+ unsigned int length;6767+ unsigned char msg[256];6868} ca_msg_t;69697070typedef struct ca_descr {7171- unsigned int index;7272- unsigned int parity; /* 0 == even, 1 == odd */7373- unsigned char cw[8];7171+ unsigned int index;7272+ unsigned int parity; /* 0 == even, 1 == odd */7373+ unsigned char cw[8];7474} ca_descr_t;75757676typedef struct ca_pid {7777- unsigned int pid;7878- int index; /* -1 == disable*/7777+ unsigned int pid;7878+ int index; /* -1 == disable*/7979} ca_pid_t;80808181#define CA_RESET _IO('o', 128)
+10-10
include/linux/dvb/dmx.h
···11-/* 11+/*22 * dmx.h33 *44 * Copyright (C) 2000 Marcus Metzler <marcus@convergence.de>···3838{3939 DMX_OUT_DECODER, /* Streaming directly to decoder. */4040 DMX_OUT_TAP, /* Output going to a memory buffer */4141- /* (to be retrieved via the read command).*/4141+ /* (to be retrieved via the read command).*/4242 DMX_OUT_TS_TAP /* Output multiplexed into a new TS */4343- /* (to be retrieved by reading from the */4444- /* logical DVR device). */4343+ /* (to be retrieved by reading from the */4444+ /* logical DVR device). */4545} dmx_output_t;46464747···54545555typedef enum5656{5757- DMX_PES_AUDIO0,5757+ DMX_PES_AUDIO0,5858 DMX_PES_VIDEO0,5959 DMX_PES_TELETEXT0,6060 DMX_PES_SUBTITLE0,6161 DMX_PES_PCR0,62626363- DMX_PES_AUDIO1,6363+ DMX_PES_AUDIO1,6464 DMX_PES_VIDEO1,6565 DMX_PES_TELETEXT1,6666 DMX_PES_SUBTITLE1,6767 DMX_PES_PCR1,68686969- DMX_PES_AUDIO2,6969+ DMX_PES_AUDIO2,7070 DMX_PES_VIDEO2,7171 DMX_PES_TELETEXT2,7272 DMX_PES_SUBTITLE2,7373 DMX_PES_PCR2,74747575- DMX_PES_AUDIO3,7575+ DMX_PES_AUDIO3,7676 DMX_PES_VIDEO3,7777 DMX_PES_TELETEXT3,7878 DMX_PES_SUBTITLE3,···90909191typedef enum9292{9393- DMX_SCRAMBLING_EV,9494- DMX_FRONTEND_EV9393+ DMX_SCRAMBLING_EV,9494+ DMX_FRONTEND_EV9595} dmx_event_t;96969797
+29-29
include/linux/dvb/osd.h
···9898} OSD_Command;9999100100typedef struct osd_cmd_s {101101- OSD_Command cmd;102102- int x0;103103- int y0;104104- int x1;105105- int y1;106106- int color;107107- void __user *data;101101+ OSD_Command cmd;102102+ int x0;103103+ int y0;104104+ int x1;105105+ int y1;106106+ int color;107107+ void __user *data;108108} osd_cmd_t;109109110110/* OSD_OpenRaw: set 'color' to desired window type */111111typedef enum {112112- OSD_BITMAP1, /* 1 bit bitmap */113113- OSD_BITMAP2, /* 2 bit bitmap */114114- OSD_BITMAP4, /* 4 bit bitmap */115115- OSD_BITMAP8, /* 8 bit bitmap */116116- OSD_BITMAP1HR, /* 1 Bit bitmap half resolution */117117- OSD_BITMAP2HR, /* 2 bit bitmap half resolution */118118- OSD_BITMAP4HR, /* 4 bit bitmap half resolution */119119- OSD_BITMAP8HR, /* 8 bit bitmap half resolution */120120- OSD_YCRCB422, /* 4:2:2 YCRCB Graphic Display */121121- OSD_YCRCB444, /* 4:4:4 YCRCB Graphic Display */122122- OSD_YCRCB444HR, /* 4:4:4 YCRCB graphic half resolution */123123- OSD_VIDEOTSIZE, /* True Size Normal MPEG Video Display */124124- OSD_VIDEOHSIZE, /* MPEG Video Display Half Resolution */125125- OSD_VIDEOQSIZE, /* MPEG Video Display Quarter Resolution */126126- OSD_VIDEODSIZE, /* MPEG Video Display Double Resolution */127127- OSD_VIDEOTHSIZE, /* True Size MPEG Video Display Half Resolution */128128- OSD_VIDEOTQSIZE, /* True Size MPEG Video Display Quarter Resolution*/129129- OSD_VIDEOTDSIZE, /* True Size MPEG Video Display Double Resolution */130130- OSD_VIDEONSIZE, /* Full Size MPEG Video Display */131131- OSD_CURSOR /* Cursor */112112+ OSD_BITMAP1, /* 1 bit bitmap */113113+ OSD_BITMAP2, /* 2 bit bitmap */114114+ OSD_BITMAP4, /* 4 bit bitmap */115115+ OSD_BITMAP8, /* 8 bit bitmap */116116+ OSD_BITMAP1HR, /* 1 Bit bitmap half resolution */117117+ OSD_BITMAP2HR, /* 2 bit bitmap half resolution */118118+ OSD_BITMAP4HR, /* 4 bit bitmap half resolution */119119+ OSD_BITMAP8HR, /* 8 bit bitmap half resolution */120120+ OSD_YCRCB422, /* 4:2:2 YCRCB Graphic Display */121121+ OSD_YCRCB444, /* 4:4:4 YCRCB Graphic Display */122122+ OSD_YCRCB444HR, /* 4:4:4 YCRCB graphic half resolution */123123+ OSD_VIDEOTSIZE, /* True Size Normal MPEG Video Display */124124+ OSD_VIDEOHSIZE, /* MPEG Video Display Half Resolution */125125+ OSD_VIDEOQSIZE, /* MPEG Video Display Quarter Resolution */126126+ OSD_VIDEODSIZE, /* MPEG Video Display Double Resolution */127127+ OSD_VIDEOTHSIZE, /* True Size MPEG Video Display Half Resolution */128128+ OSD_VIDEOTQSIZE, /* True Size MPEG Video Display Quarter Resolution*/129129+ OSD_VIDEOTDSIZE, /* True Size MPEG Video Display Double Resolution */130130+ OSD_VIDEONSIZE, /* Full Size MPEG Video Display */131131+ OSD_CURSOR /* Cursor */132132} osd_raw_window_t;133133134134typedef struct osd_cap_s {135135- int cmd;135135+ int cmd;136136#define OSD_CAP_MEMSIZE 1 /* memory size */137137- long val;137137+ long val;138138} osd_cap_t;139139140140
+22-22
include/linux/dvb/video.h
···36363737typedef enum {3838 VIDEO_FORMAT_4_3, /* Select 4:3 format */3939- VIDEO_FORMAT_16_9, /* Select 16:9 format. */3939+ VIDEO_FORMAT_16_9, /* Select 16:9 format. */4040 VIDEO_FORMAT_221_1 /* 2.21:1 */4141} video_format_t;4242···545455555656typedef enum {5757- VIDEO_PAN_SCAN, /* use pan and scan format */5757+ VIDEO_PAN_SCAN, /* use pan and scan format */5858 VIDEO_LETTER_BOX, /* use letterbox format */5959 VIDEO_CENTER_CUT_OUT /* use center cut out format */6060} video_displayformat_t;···6666} video_size_t;67676868typedef enum {6969- VIDEO_SOURCE_DEMUX, /* Select the demux as the main source */6969+ VIDEO_SOURCE_DEMUX, /* Select the demux as the main source */7070 VIDEO_SOURCE_MEMORY /* If this source is selected, the stream7171 comes from the user through the write7272 system call */···75757676typedef enum {7777 VIDEO_STOPPED, /* Video is stopped */7878- VIDEO_PLAYING, /* Video is currently playing */7878+ VIDEO_PLAYING, /* Video is currently playing */7979 VIDEO_FREEZED /* Video is freezed */8080} video_play_state_t;818182828383struct video_event {8484- int32_t type;8484+ int32_t type;8585#define VIDEO_EVENT_SIZE_CHANGED 18686#define VIDEO_EVENT_FRAME_RATE_CHANGED 28787- time_t timestamp;8787+ time_t timestamp;8888 union {8989- video_size_t size;8989+ video_size_t size;9090 unsigned int frame_rate; /* in frames per 1000sec */9191 } u;9292};939394949595struct video_status {9696- int video_blank; /* blank video on freeze? */9797- video_play_state_t play_state; /* current state of playback */9898- video_stream_source_t stream_source; /* current source (demux/memory) */9999- video_format_t video_format; /* current aspect ratio of stream*/100100- video_displayformat_t display_format;/* selected cropping mode */9696+ int video_blank; /* blank video on freeze? */9797+ video_play_state_t play_state; /* current state of playback */9898+ video_stream_source_t stream_source; /* current source (demux/memory) */9999+ video_format_t video_format; /* current aspect ratio of stream*/100100+ video_displayformat_t display_format;/* selected cropping mode */101101};102102103103104104struct video_still_picture {105105- char __user *iFrame; /* pointer to a single iframe in memory */106106- int32_t size;105105+ char __user *iFrame; /* pointer to a single iframe in memory */106106+ int32_t size;107107};108108109109···111111struct video_highlight {112112 int active; /* 1=show highlight, 0=hide highlight */113113 uint8_t contrast1; /* 7- 4 Pattern pixel contrast */114114- /* 3- 0 Background pixel contrast */114114+ /* 3- 0 Background pixel contrast */115115 uint8_t contrast2; /* 7- 4 Emphasis pixel-2 contrast */116116- /* 3- 0 Emphasis pixel-1 contrast */116116+ /* 3- 0 Emphasis pixel-1 contrast */117117 uint8_t color1; /* 7- 4 Pattern pixel color */118118- /* 3- 0 Background pixel color */118118+ /* 3- 0 Background pixel color */119119 uint8_t color2; /* 7- 4 Emphasis pixel-2 color */120120- /* 3- 0 Emphasis pixel-1 color */120120+ /* 3- 0 Emphasis pixel-1 color */121121 uint32_t ypos; /* 23-22 auto action mode */122122- /* 21-12 start y */123123- /* 9- 0 end y */122122+ /* 21-12 start y */123123+ /* 9- 0 end y */124124 uint32_t xpos; /* 23-22 button color number */125125- /* 21-12 start x */126126- /* 9- 0 end x */125125+ /* 21-12 start x */126126+ /* 9- 0 end x */127127} video_highlight_t;128128129129
+30
include/linux/fb.h
···617617618618 /* perform fb specific mmap */619619 int (*fb_mmap)(struct fb_info *info, struct file *file, struct vm_area_struct *vma);620620+621621+ /* save current hardware state */622622+ void (*fb_save_state)(struct fb_info *info);623623+624624+ /* restore saved state */625625+ void (*fb_restore_state)(struct fb_info *info);620626};621627622628#ifdef CONFIG_FB_TILEBLITTING···732726 from userspace */733727#define FBINFO_MISC_TILEBLITTING 0x20000 /* use tile blitting */734728729729+/* A driver may set this flag to indicate that it does want a set_par to be730730+ * called every time when fbcon_switch is executed. The advantage is that with731731+ * this flag set you can really be shure that set_par is always called before732732+ * any of the functions dependant on the correct hardware state or altering733733+ * that state, even if you are using some broken X releases. The disadvantage734734+ * is that it introduces unwanted delays to every console switch if set_par735735+ * is slow. It is a good idea to try this flag in the drivers initialization736736+ * code whenever there is a bug report related to switching between X and the737737+ * framebuffer console.738738+ */739739+#define FBINFO_MISC_ALWAYS_SETPAR 0x40000740740+735741struct fb_info {736742 int node;737743 int flags;···833815#define fb_writeq(b,addr) (*(volatile u64 *) (addr) = (b))834816#define fb_memset memset835817818818+#endif819819+820820+#if defined (__BIG_ENDIAN)821821+#define FB_LEFT_POS(bpp) (32 - bpp)822822+#define FB_SHIFT_HIGH(val, bits) ((val) >> (bits))823823+#define FB_SHIFT_LOW(val, bits) ((val) << (bits))824824+#define FB_BIT_NR(b) (7 - (b))825825+#else826826+#define FB_LEFT_POS(bpp) (0)827827+#define FB_SHIFT_HIGH(val, bits) ((val) << (bits))828828+#define FB_SHIFT_LOW(val, bits) ((val) >> (bits))829829+#define FB_BIT_NR(b) (b)836830#endif837831838832 /*
+1-1
include/linux/i2c-id.h
···108108#define I2C_DRIVERID_SAA7127 72 /* saa7124 video encoder */109109#define I2C_DRIVERID_SAA711X 73 /* saa711x video encoders */110110#define I2C_DRIVERID_AKITAIOEXP 74 /* IO Expander on Sharp SL-C1000 */111111-#define I2C_DRIVERID_I2C_IR 75 /* I2C InfraRed on Video boards */111111+#define I2C_DRIVERID_INFRARED 75 /* I2C InfraRed on Video boards */112112113113#define I2C_DRIVERID_EXP0 0xF0 /* experimental use id's */114114#define I2C_DRIVERID_EXP1 0xF1
+2
include/linux/inotify.h
···4747#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* moves */48484949/* special flags */5050+#define IN_ONLYDIR 0x01000000 /* only watch the path if it is a directory */5151+#define IN_DONT_FOLLOW 0x02000000 /* don't follow a sym link */5052#define IN_MASK_ADD 0x20000000 /* add to the mask of an already existing watch */5153#define IN_ISDIR 0x40000000 /* event occurred against dir */5254#define IN_ONESHOT 0x80000000 /* only send event once */
···122122 ATA_FLAG_NOINTR = (1 << 9), /* FIXME: Remove this once123123 * proper HSM is in place. */124124 ATA_FLAG_DEBUGMSG = (1 << 10),125125+ ATA_FLAG_NO_ATAPI = (1 << 11), /* No ATAPI support */125126126127 ATA_QCFLAG_ACTIVE = (1 << 1), /* cmd not yet ack'd to scsi lyer */127128 ATA_QCFLAG_SG = (1 << 3), /* have s/g table? */
+25-1
include/linux/list.h
···202202 *203203 * The old entry will be replaced with the new entry atomically.204204 */205205-static inline void list_replace_rcu(struct list_head *old, struct list_head *new){205205+static inline void list_replace_rcu(struct list_head *old,206206+ struct list_head *new)207207+{206208 new->next = old->next;207209 new->prev = old->prev;208210 smp_wmb();209211 new->next->prev = new;210212 new->prev->next = new;213213+ old->prev = LIST_POISON2;211214}212215213216/**···579576 __hlist_del(n);580577 INIT_HLIST_NODE(n);581578 }579579+}580580+581581+/*582582+ * hlist_replace_rcu - replace old entry by new one583583+ * @old : the element to be replaced584584+ * @new : the new element to insert585585+ *586586+ * The old entry will be replaced with the new entry atomically.587587+ */588588+static inline void hlist_replace_rcu(struct hlist_node *old,589589+ struct hlist_node *new)590590+{591591+ struct hlist_node *next = old->next;592592+593593+ new->next = next;594594+ new->pprev = old->pprev;595595+ smp_wmb();596596+ if (next)597597+ new->next->pprev = &new->next;598598+ *new->pprev = new;599599+ old->pprev = LIST_POISON2;582600}583601584602static inline void hlist_add_head(struct hlist_node *n, struct hlist_head *h)
-1
include/linux/mm.h
···163163#define VM_HUGETLB 0x00400000 /* Huge TLB Page VM */164164#define VM_NONLINEAR 0x00800000 /* Is non-linear (remap_file_pages) */165165#define VM_MAPPED_COPY 0x01000000 /* T if mapped copy of data (nommu mmap) */166166-#define VM_INCOMPLETE 0x02000000 /* Strange partial PFN mapping marker */167166168167#ifndef VM_STACK_DEFAULT_FLAGS /* arch can override this */169168#define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS
···234234extern int decnet_dr_count;235235extern int decnet_no_fc_max_cwnd;236236237237+extern int sysctl_decnet_mem[3];238238+extern int sysctl_decnet_wmem[3];239239+extern int sysctl_decnet_rmem[3];240240+237241#endif /* _NET_DN_H */
+2-2
init/Kconfig
···206206 outside the kernel tree does. Such modules require Y here.207207208208config KOBJECT_UEVENT209209- bool "Kernel Userspace Events"209209+ bool "Kernel Userspace Events" if EMBEDDED210210 depends on NET211211 default y212212 help···339339 support for epoll family of system calls.340340341341config CC_OPTIMIZE_FOR_SIZE342342- bool "Optimize for size" if EMBEDDED342342+ bool "Optimize for size"343343 default y if ARM || H8300344344 help345345 Enabling this option will pass "-Os" instead of "-O2" to gcc
+3-1
kernel/audit.c
···291291 set_current_state(TASK_INTERRUPTIBLE);292292 add_wait_queue(&kauditd_wait, &wait);293293294294- if (!skb_queue_len(&audit_skb_queue))294294+ if (!skb_queue_len(&audit_skb_queue)) {295295+ try_to_freeze();295296 schedule();297297+ }296298297299 __set_current_state(TASK_RUNNING);298300 remove_wait_queue(&kauditd_wait, &wait);
+30-6
kernel/kprobes.c
···246246 return ret;247247}248248249249+/* Walks the list and increments nmissed count for multiprobe case */250250+void __kprobes kprobes_inc_nmissed_count(struct kprobe *p)251251+{252252+ struct kprobe *kp;253253+ if (p->pre_handler != aggr_pre_handler) {254254+ p->nmissed++;255255+ } else {256256+ list_for_each_entry_rcu(kp, &p->list, list)257257+ kp->nmissed++;258258+ }259259+ return;260260+}261261+249262/* Called with kretprobe_lock held */250263struct kretprobe_instance __kprobes *get_free_rp_inst(struct kretprobe *rp)251264{···412399 INIT_LIST_HEAD(&ap->list);413400 list_add_rcu(&p->list, &ap->list);414401415415- INIT_HLIST_NODE(&ap->hlist);416416- hlist_del_rcu(&p->hlist);417417- hlist_add_head_rcu(&ap->hlist,418418- &kprobe_table[hash_ptr(ap->addr, KPROBE_HASH_BITS)]);402402+ hlist_replace_rcu(&p->hlist, &ap->hlist);419403}420404421405/*···472462 int ret = 0;473463 unsigned long flags = 0;474464 struct kprobe *old_p;465465+ struct module *mod;475466476476- if ((ret = in_kprobes_functions((unsigned long) p->addr)) != 0)477477- return ret;467467+ if ((!kernel_text_address((unsigned long) p->addr)) ||468468+ in_kprobes_functions((unsigned long) p->addr))469469+ return -EINVAL;470470+471471+ if ((mod = module_text_address((unsigned long) p->addr)) &&472472+ (unlikely(!try_module_get(mod))))473473+ return -EINVAL;474474+478475 if ((ret = arch_prepare_kprobe(p)) != 0)479476 goto rm_kprobe;480477···505488rm_kprobe:506489 if (ret == -EEXIST)507490 arch_remove_kprobe(p);491491+ if (ret && mod)492492+ module_put(mod);508493 return ret;509494}510495···514495{515496 unsigned long flags;516497 struct kprobe *old_p;498498+ struct module *mod;517499518500 spin_lock_irqsave(&kprobe_lock, flags);519501 old_p = get_kprobe(p->addr);···526506 cleanup_kprobe(p, flags);527507528508 synchronize_sched();509509+510510+ if ((mod = module_text_address((unsigned long)p->addr)))511511+ module_put(mod);512512+529513 if (old_p->pre_handler == aggr_pre_handler &&530514 list_empty(&old_p->list))531515 kfree(old_p);
+54-5
kernel/rcupdate.c
···116116 local_irq_restore(flags);117117}118118119119+static atomic_t rcu_barrier_cpu_count;120120+static struct semaphore rcu_barrier_sema;121121+static struct completion rcu_barrier_completion;122122+119123/**120124 * call_rcu_bh - Queue an RCU for invocation after a quicker grace period.121125 * @head: structure to be used for queueing the RCU updates.···165161{166162 return rcu_ctrlblk.completed;167163}164164+165165+static void rcu_barrier_callback(struct rcu_head *notused)166166+{167167+ if (atomic_dec_and_test(&rcu_barrier_cpu_count))168168+ complete(&rcu_barrier_completion);169169+}170170+171171+/*172172+ * Called with preemption disabled, and from cross-cpu IRQ context.173173+ */174174+static void rcu_barrier_func(void *notused)175175+{176176+ int cpu = smp_processor_id();177177+ struct rcu_data *rdp = &per_cpu(rcu_data, cpu);178178+ struct rcu_head *head;179179+180180+ head = &rdp->barrier;181181+ atomic_inc(&rcu_barrier_cpu_count);182182+ call_rcu(head, rcu_barrier_callback);183183+}184184+185185+/**186186+ * rcu_barrier - Wait until all the in-flight RCUs are complete.187187+ */188188+void rcu_barrier(void)189189+{190190+ BUG_ON(in_interrupt());191191+ /* Take cpucontrol semaphore to protect against CPU hotplug */192192+ down(&rcu_barrier_sema);193193+ init_completion(&rcu_barrier_completion);194194+ atomic_set(&rcu_barrier_cpu_count, 0);195195+ on_each_cpu(rcu_barrier_func, NULL, 0, 1);196196+ wait_for_completion(&rcu_barrier_completion);197197+ up(&rcu_barrier_sema);198198+}199199+EXPORT_SYMBOL_GPL(rcu_barrier);168200169201/*170202 * Invoke the completed RCU callbacks. They are expected to be in···257217258218 if (rcp->next_pending &&259219 rcp->completed == rcp->cur) {260260- /* Can't change, since spin lock held. */261261- cpus_andnot(rsp->cpumask, cpu_online_map, nohz_cpu_mask);262262-263220 rcp->next_pending = 0;264264- /* next_pending == 0 must be visible in __rcu_process_callbacks()265265- * before it can see new value of cur.221221+ /*222222+ * next_pending == 0 must be visible in223223+ * __rcu_process_callbacks() before it can see new value of cur.266224 */267225 smp_wmb();268226 rcp->cur++;227227+228228+ /*229229+ * Accessing nohz_cpu_mask before incrementing rcp->cur needs a230230+ * Barrier Otherwise it can cause tickless idle CPUs to be231231+ * included in rsp->cpumask, which will extend graceperiods232232+ * unnecessarily.233233+ */234234+ smp_mb();235235+ cpus_andnot(rsp->cpumask, cpu_online_map, nohz_cpu_mask);236236+269237 }270238}271239···505457 */506458void __init rcu_init(void)507459{460460+ sema_init(&rcu_barrier_sema, 1);508461 rcu_cpu_notify(&rcu_nb, CPU_UP_PREPARE,509462 (void *)(long)smp_processor_id());510463 /* Register notifier for non-boot CPUs */
+1-2
kernel/rcutorture.c
···409409 stats_task = NULL;410410411411 /* Wait for all RCU callbacks to fire. */412412+ rcu_barrier();412413413413- for (i = 0; i < RCU_TORTURE_PIPE_LEN; i++)414414- synchronize_rcu();415414 rcu_torture_stats_print(); /* -After- the stats thread is stopped! */416415 printk(KERN_ALERT TORTURE_FLAG417416 "--- End of test: %s\n",
+2-1
kernel/sys.c
···32323333#include <linux/compat.h>3434#include <linux/syscalls.h>3535+#include <linux/kprobes.h>35363637#include <asm/uaccess.h>3738#include <asm/io.h>···169168 * of the last notifier function called.170169 */171170172172-int notifier_call_chain(struct notifier_block **n, unsigned long val, void *v)171171+int __kprobes notifier_call_chain(struct notifier_block **n, unsigned long val, void *v)173172{174173 int ret=NOTIFY_DONE;175174 struct notifier_block *nb = *n;
···204204 unsigned long j;205205 i = find_next_zero_bit(bdata->node_bootmem_map, eidx, i);206206 i = ALIGN(i, incr);207207+ if (i >= eidx)208208+ break;207209 if (test_bit(i, bdata->node_bootmem_map))208210 continue;209211 for (j = i + 1; j < i + areasize; ++j) {
+19-50
mm/memory.c
···349349 dump_stack();350350}351351352352+static inline int is_cow_mapping(unsigned int flags)353353+{354354+ return (flags & (VM_SHARED | VM_MAYWRITE)) == VM_MAYWRITE;355355+}356356+352357/*353358 * This function gets the "struct page" associated with a pte.354359 *···381376 if (vma->vm_flags & VM_PFNMAP) {382377 unsigned long off = (addr - vma->vm_start) >> PAGE_SHIFT;383378 if (pfn == vma->vm_pgoff + off)379379+ return NULL;380380+ if (!is_cow_mapping(vma->vm_flags))384381 return NULL;385382 }386383···444437 * If it's a COW mapping, write protect it both445438 * in the parent and the child446439 */447447- if ((vm_flags & (VM_SHARED | VM_MAYWRITE)) == VM_MAYWRITE) {440440+ if (is_cow_mapping(vm_flags)) {448441 ptep_set_wrprotect(src_mm, addr, src_pte);449442 pte = *src_pte;450443 }···10091002 continue;10101003 }1011100410121012- if (!vma || (vma->vm_flags & VM_IO)10051005+ if (!vma || (vma->vm_flags & (VM_IO | VM_PFNMAP))10131006 || !(vm_flags & vma->vm_flags))10141007 return i ? : -EFAULT;10151008···12331226EXPORT_SYMBOL(vm_insert_page);1234122712351228/*12361236- * Somebody does a pfn remapping that doesn't actually work as a vma.12371237- *12381238- * Do it as individual pages instead, and warn about it. It's bad form,12391239- * and very inefficient.12401240- */12411241-static int incomplete_pfn_remap(struct vm_area_struct *vma,12421242- unsigned long start, unsigned long end,12431243- unsigned long pfn, pgprot_t prot)12441244-{12451245- static int warn = 10;12461246- struct page *page;12471247- int retval;12481248-12491249- if (!(vma->vm_flags & VM_INCOMPLETE)) {12501250- if (warn) {12511251- warn--;12521252- printk("%s does an incomplete pfn remapping", current->comm);12531253- dump_stack();12541254- }12551255- }12561256- vma->vm_flags |= VM_INCOMPLETE | VM_IO | VM_RESERVED;12571257-12581258- if (start < vma->vm_start || end > vma->vm_end)12591259- return -EINVAL;12601260-12611261- if (!pfn_valid(pfn))12621262- return -EINVAL;12631263-12641264- page = pfn_to_page(pfn);12651265- if (!PageReserved(page))12661266- return -EINVAL;12671267-12681268- retval = 0;12691269- while (start < end) {12701270- retval = insert_page(vma->vm_mm, start, page, prot);12711271- if (retval < 0)12721272- break;12731273- start += PAGE_SIZE;12741274- page++;12751275- }12761276- return retval;12771277-}12781278-12791279-/*12801229 * maps a range of physical memory into the requested pages. the old12811230 * mappings are removed. any references to nonexistent pages results12821231 * in null mappings (currently treated as "copy-on-access")···13061343 struct mm_struct *mm = vma->vm_mm;13071344 int err;1308134513091309- if (addr != vma->vm_start || end != vma->vm_end)13101310- return incomplete_pfn_remap(vma, addr, end, pfn, prot);13111311-13121346 /*13131347 * Physically remapped pages are special. Tell the13141348 * rest of the world about it:···13191359 * VM_PFNMAP tells the core MM that the base pages are just13201360 * raw PFN mappings, and do not have a "struct page" associated13211361 * with them.13621362+ *13631363+ * There's a horrible special case to handle copy-on-write13641364+ * behaviour that some programs depend on. We mark the "original"13651365+ * un-COW'ed pages by matching them up with "vma->vm_pgoff".13221366 */13671367+ if (is_cow_mapping(vma->vm_flags)) {13681368+ if (addr != vma->vm_start || end != vma->vm_end)13691369+ return -EINVAL;13701370+ vma->vm_pgoff = pfn;13711371+ }13721372+13231373 vma->vm_flags |= VM_IO | VM_RESERVED | VM_PFNMAP;13241324- vma->vm_pgoff = pfn;1325137413261375 BUG_ON(addr >= end);13271376 pfn -= addr >> PAGE_SHIFT;
+1-1
mm/memory_hotplug.c
···104104 pgdat->node_start_pfn = start_pfn;105105106106 if (end_pfn > old_pgdat_end_pfn)107107- pgdat->node_spanned_pages = end_pfn - pgdat->node_spanned_pages;107107+ pgdat->node_spanned_pages = end_pfn - pgdat->node_start_pfn;108108}109109110110int online_pages(unsigned long pfn, unsigned long nr_pages)
···17251725 * of the skb if any page alloc fails user this procedure returns -ENOMEM17261726 */17271727int skb_append_datato_frags(struct sock *sk, struct sk_buff *skb,17281728- int getfrag(void *from, char *to, int offset,17281728+ int (*getfrag)(void *from, char *to, int offset,17291729 int len, int odd, struct sk_buff *skb),17301730 void *from, int length)17311731{
+22-3
net/decnet/af_decnet.c
···153153static DEFINE_RWLOCK(dn_hash_lock);154154static struct hlist_head dn_sk_hash[DN_SK_HASH_SIZE];155155static struct hlist_head dn_wild_sk;156156+static atomic_t decnet_memory_allocated;156157157158static int __dn_setsockopt(struct socket *sock, int level, int optname, char __user *optval, int optlen, int flags);158159static int __dn_getsockopt(struct socket *sock, int level, int optname, char __user *optval, int __user *optlen, int flags);···447446 dst_release(xchg(&sk->sk_dst_cache, NULL));448447}449448449449+static int dn_memory_pressure;450450+451451+static void dn_enter_memory_pressure(void)452452+{453453+ if (!dn_memory_pressure) {454454+ dn_memory_pressure = 1;455455+ }456456+}457457+450458static struct proto dn_proto = {451451- .name = "DECNET",452452- .owner = THIS_MODULE,453453- .obj_size = sizeof(struct dn_sock),459459+ .name = "NSP",460460+ .owner = THIS_MODULE,461461+ .enter_memory_pressure = dn_enter_memory_pressure,462462+ .memory_pressure = &dn_memory_pressure,463463+ .memory_allocated = &decnet_memory_allocated,464464+ .sysctl_mem = sysctl_decnet_mem,465465+ .sysctl_wmem = sysctl_decnet_wmem,466466+ .sysctl_rmem = sysctl_decnet_rmem,467467+ .max_header = DN_MAX_NSP_DATA_HEADER + 64,468468+ .obj_size = sizeof(struct dn_sock),454469};455470456471static struct sock *dn_alloc_sock(struct socket *sock, gfp_t gfp)···487470 sk->sk_family = PF_DECnet;488471 sk->sk_protocol = 0;489472 sk->sk_allocation = gfp;473473+ sk->sk_sndbuf = sysctl_decnet_wmem[1];474474+ sk->sk_rcvbuf = sysctl_decnet_rmem[1];490475491476 /* Initialization of DECnet Session Control Port */492477 scp = DN_SK(sk);
···55555656config IEEE80211_CRYPT_TKIP5757 tristate "IEEE 802.11i TKIP encryption"5858- depends on IEEE802115858+ depends on IEEE80211 && NET_RADIO5959 select CRYPTO6060 select CRYPTO_MICHAEL_MIC6161 ---help---
+4-4
net/ipv4/netfilter/Kconfig
···5656 instead of the individual packets.57575858config IP_NF_CONNTRACK_EVENTS5959- bool "Connection tracking events"6060- depends on IP_NF_CONNTRACK5959+ bool "Connection tracking events (EXPERIMENTAL)"6060+ depends on EXPERIMENTAL && IP_NF_CONNTRACK6161 help6262 If this option is enabled, the connection tracking code will6363 provide a notifier chain that can be used by other kernel code···6666 IF unsure, say `N'.67676868config IP_NF_CONNTRACK_NETLINK6969- tristate 'Connection tracking netlink interface'7070- depends on IP_NF_CONNTRACK && NETFILTER_NETLINK6969+ tristate 'Connection tracking netlink interface (EXPERIMENTAL)'7070+ depends on EXPERIMENTAL && IP_NF_CONNTRACK && NETFILTER_NETLINK7171 depends on IP_NF_CONNTRACK!=y || NETFILTER_NETLINK!=m7272 help7373 This option enables support for a netlink-based userspace interface
+11-9
net/ipv4/netfilter/ip_conntrack_core.c
···13451345 return 1;13461346}1347134713481348+void ip_conntrack_flush(void)13491349+{13501350+ ip_ct_iterate_cleanup(kill_all, NULL);13511351+}13521352+13481353static void free_conntrack_hash(struct list_head *hash, int vmalloced,int size)13491354{13501355 if (vmalloced)···13591354 get_order(sizeof(struct list_head) * size));13601355}1361135613621362-void ip_conntrack_flush(void)13571357+/* Mishearing the voices in his head, our hero wonders how he's13581358+ supposed to kill the mall. */13591359+void ip_conntrack_cleanup(void)13631360{13611361+ ip_ct_attach = NULL;13621362+13641363 /* This makes sure all current packets have passed through13651364 netfilter framework. Roll on, two-stage module13661365 delete... */···1372136313731364 ip_ct_event_cache_flush();13741365 i_see_dead_people:13751375- ip_ct_iterate_cleanup(kill_all, NULL);13661366+ ip_conntrack_flush();13761367 if (atomic_read(&ip_conntrack_count) != 0) {13771368 schedule();13781369 goto i_see_dead_people;···13801371 /* wait until all references to ip_conntrack_untracked are dropped */13811372 while (atomic_read(&ip_conntrack_untracked.ct_general.use) > 1)13821373 schedule();13831383-}1384137413851385-/* Mishearing the voices in his head, our hero wonders how he's13861386- supposed to kill the mall. */13871387-void ip_conntrack_cleanup(void)13881388-{13891389- ip_ct_attach = NULL;13901390- ip_conntrack_flush();13911375 kmem_cache_destroy(ip_conntrack_cachep);13921376 kmem_cache_destroy(ip_conntrack_expect_cachep);13931377 free_conntrack_hash(ip_conntrack_hash, ip_conntrack_vmalloc,
···262262 * We are working here with either a clone of the original263263 * SKB, or a fresh unique copy made by the retransmit engine.264264 */265265-static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb)265265+static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it, gfp_t gfp_mask)266266{267267- if (skb != NULL) {268268- const struct inet_connection_sock *icsk = inet_csk(sk);269269- struct inet_sock *inet = inet_sk(sk);270270- struct tcp_sock *tp = tcp_sk(sk);271271- struct tcp_skb_cb *tcb = TCP_SKB_CB(skb);272272- int tcp_header_size = tp->tcp_header_len;273273- struct tcphdr *th;274274- int sysctl_flags;275275- int err;267267+ const struct inet_connection_sock *icsk = inet_csk(sk);268268+ struct inet_sock *inet;269269+ struct tcp_sock *tp;270270+ struct tcp_skb_cb *tcb;271271+ int tcp_header_size;272272+ struct tcphdr *th;273273+ int sysctl_flags;274274+ int err;276275277277- BUG_ON(!tcp_skb_pcount(skb));276276+ BUG_ON(!skb || !tcp_skb_pcount(skb));277277+278278+ /* If congestion control is doing timestamping, we must279279+ * take such a timestamp before we potentially clone/copy.280280+ */281281+ if (icsk->icsk_ca_ops->rtt_sample)282282+ __net_timestamp(skb);283283+284284+ if (likely(clone_it)) {285285+ if (unlikely(skb_cloned(skb)))286286+ skb = pskb_copy(skb, gfp_mask);287287+ else288288+ skb = skb_clone(skb, gfp_mask);289289+ if (unlikely(!skb))290290+ return -ENOBUFS;291291+ }292292+293293+ inet = inet_sk(sk);294294+ tp = tcp_sk(sk);295295+ tcb = TCP_SKB_CB(skb);296296+ tcp_header_size = tp->tcp_header_len;278297279298#define SYSCTL_FLAG_TSTAMPS 0x1280299#define SYSCTL_FLAG_WSCALE 0x2281300#define SYSCTL_FLAG_SACK 0x4282301283283- /* If congestion control is doing timestamping */284284- if (icsk->icsk_ca_ops->rtt_sample)285285- __net_timestamp(skb);286286-287287- sysctl_flags = 0;288288- if (tcb->flags & TCPCB_FLAG_SYN) {289289- tcp_header_size = sizeof(struct tcphdr) + TCPOLEN_MSS;290290- if(sysctl_tcp_timestamps) {291291- tcp_header_size += TCPOLEN_TSTAMP_ALIGNED;292292- sysctl_flags |= SYSCTL_FLAG_TSTAMPS;293293- }294294- if(sysctl_tcp_window_scaling) {295295- tcp_header_size += TCPOLEN_WSCALE_ALIGNED;296296- sysctl_flags |= SYSCTL_FLAG_WSCALE;297297- }298298- if(sysctl_tcp_sack) {299299- sysctl_flags |= SYSCTL_FLAG_SACK;300300- if(!(sysctl_flags & SYSCTL_FLAG_TSTAMPS))301301- tcp_header_size += TCPOLEN_SACKPERM_ALIGNED;302302- }303303- } else if (tp->rx_opt.eff_sacks) {304304- /* A SACK is 2 pad bytes, a 2 byte header, plus305305- * 2 32-bit sequence numbers for each SACK block.306306- */307307- tcp_header_size += (TCPOLEN_SACK_BASE_ALIGNED +308308- (tp->rx_opt.eff_sacks * TCPOLEN_SACK_PERBLOCK));302302+ sysctl_flags = 0;303303+ if (unlikely(tcb->flags & TCPCB_FLAG_SYN)) {304304+ tcp_header_size = sizeof(struct tcphdr) + TCPOLEN_MSS;305305+ if(sysctl_tcp_timestamps) {306306+ tcp_header_size += TCPOLEN_TSTAMP_ALIGNED;307307+ sysctl_flags |= SYSCTL_FLAG_TSTAMPS;309308 }310310-311311- if (tcp_packets_in_flight(tp) == 0)312312- tcp_ca_event(sk, CA_EVENT_TX_START);313313-314314- th = (struct tcphdr *) skb_push(skb, tcp_header_size);315315- skb->h.th = th;316316- skb_set_owner_w(skb, sk);317317-318318- /* Build TCP header and checksum it. */319319- th->source = inet->sport;320320- th->dest = inet->dport;321321- th->seq = htonl(tcb->seq);322322- th->ack_seq = htonl(tp->rcv_nxt);323323- *(((__u16 *)th) + 6) = htons(((tcp_header_size >> 2) << 12) | tcb->flags);324324- if (tcb->flags & TCPCB_FLAG_SYN) {325325- /* RFC1323: The window in SYN & SYN/ACK segments326326- * is never scaled.327327- */328328- th->window = htons(tp->rcv_wnd);329329- } else {330330- th->window = htons(tcp_select_window(sk));309309+ if (sysctl_tcp_window_scaling) {310310+ tcp_header_size += TCPOLEN_WSCALE_ALIGNED;311311+ sysctl_flags |= SYSCTL_FLAG_WSCALE;331312 }332332- th->check = 0;333333- th->urg_ptr = 0;334334-335335- if (tp->urg_mode &&336336- between(tp->snd_up, tcb->seq+1, tcb->seq+0xFFFF)) {337337- th->urg_ptr = htons(tp->snd_up-tcb->seq);338338- th->urg = 1;313313+ if (sysctl_tcp_sack) {314314+ sysctl_flags |= SYSCTL_FLAG_SACK;315315+ if (!(sysctl_flags & SYSCTL_FLAG_TSTAMPS))316316+ tcp_header_size += TCPOLEN_SACKPERM_ALIGNED;339317 }340340-341341- if (tcb->flags & TCPCB_FLAG_SYN) {342342- tcp_syn_build_options((__u32 *)(th + 1),343343- tcp_advertise_mss(sk),344344- (sysctl_flags & SYSCTL_FLAG_TSTAMPS),345345- (sysctl_flags & SYSCTL_FLAG_SACK),346346- (sysctl_flags & SYSCTL_FLAG_WSCALE),347347- tp->rx_opt.rcv_wscale,348348- tcb->when,349349- tp->rx_opt.ts_recent);350350- } else {351351- tcp_build_and_update_options((__u32 *)(th + 1),352352- tp, tcb->when);353353-354354- TCP_ECN_send(sk, tp, skb, tcp_header_size);355355- }356356- tp->af_specific->send_check(sk, th, skb->len, skb);357357-358358- if (tcb->flags & TCPCB_FLAG_ACK)359359- tcp_event_ack_sent(sk, tcp_skb_pcount(skb));360360-361361- if (skb->len != tcp_header_size)362362- tcp_event_data_sent(tp, skb, sk);363363-364364- TCP_INC_STATS(TCP_MIB_OUTSEGS);365365-366366- err = tp->af_specific->queue_xmit(skb, 0);367367- if (err <= 0)368368- return err;369369-370370- tcp_enter_cwr(sk);371371-372372- /* NET_XMIT_CN is special. It does not guarantee,373373- * that this packet is lost. It tells that device374374- * is about to start to drop packets or already375375- * drops some packets of the same priority and376376- * invokes us to send less aggressively.318318+ } else if (unlikely(tp->rx_opt.eff_sacks)) {319319+ /* A SACK is 2 pad bytes, a 2 byte header, plus320320+ * 2 32-bit sequence numbers for each SACK block.377321 */378378- return err == NET_XMIT_CN ? 0 : err;322322+ tcp_header_size += (TCPOLEN_SACK_BASE_ALIGNED +323323+ (tp->rx_opt.eff_sacks *324324+ TCPOLEN_SACK_PERBLOCK));379325 }380380- return -ENOBUFS;326326+327327+ if (tcp_packets_in_flight(tp) == 0)328328+ tcp_ca_event(sk, CA_EVENT_TX_START);329329+330330+ th = (struct tcphdr *) skb_push(skb, tcp_header_size);331331+ skb->h.th = th;332332+ skb_set_owner_w(skb, sk);333333+334334+ /* Build TCP header and checksum it. */335335+ th->source = inet->sport;336336+ th->dest = inet->dport;337337+ th->seq = htonl(tcb->seq);338338+ th->ack_seq = htonl(tp->rcv_nxt);339339+ *(((__u16 *)th) + 6) = htons(((tcp_header_size >> 2) << 12) |340340+ tcb->flags);341341+342342+ if (unlikely(tcb->flags & TCPCB_FLAG_SYN)) {343343+ /* RFC1323: The window in SYN & SYN/ACK segments344344+ * is never scaled.345345+ */346346+ th->window = htons(tp->rcv_wnd);347347+ } else {348348+ th->window = htons(tcp_select_window(sk));349349+ }350350+ th->check = 0;351351+ th->urg_ptr = 0;352352+353353+ if (unlikely(tp->urg_mode &&354354+ between(tp->snd_up, tcb->seq+1, tcb->seq+0xFFFF))) {355355+ th->urg_ptr = htons(tp->snd_up-tcb->seq);356356+ th->urg = 1;357357+ }358358+359359+ if (unlikely(tcb->flags & TCPCB_FLAG_SYN)) {360360+ tcp_syn_build_options((__u32 *)(th + 1),361361+ tcp_advertise_mss(sk),362362+ (sysctl_flags & SYSCTL_FLAG_TSTAMPS),363363+ (sysctl_flags & SYSCTL_FLAG_SACK),364364+ (sysctl_flags & SYSCTL_FLAG_WSCALE),365365+ tp->rx_opt.rcv_wscale,366366+ tcb->when,367367+ tp->rx_opt.ts_recent);368368+ } else {369369+ tcp_build_and_update_options((__u32 *)(th + 1),370370+ tp, tcb->when);371371+ TCP_ECN_send(sk, tp, skb, tcp_header_size);372372+ }373373+374374+ tp->af_specific->send_check(sk, th, skb->len, skb);375375+376376+ if (likely(tcb->flags & TCPCB_FLAG_ACK))377377+ tcp_event_ack_sent(sk, tcp_skb_pcount(skb));378378+379379+ if (skb->len != tcp_header_size)380380+ tcp_event_data_sent(tp, skb, sk);381381+382382+ TCP_INC_STATS(TCP_MIB_OUTSEGS);383383+384384+ err = tp->af_specific->queue_xmit(skb, 0);385385+ if (unlikely(err <= 0))386386+ return err;387387+388388+ tcp_enter_cwr(sk);389389+390390+ /* NET_XMIT_CN is special. It does not guarantee,391391+ * that this packet is lost. It tells that device392392+ * is about to start to drop packets or already393393+ * drops some packets of the same priority and394394+ * invokes us to send less aggressively.395395+ */396396+ return err == NET_XMIT_CN ? 0 : err;397397+381398#undef SYSCTL_FLAG_TSTAMPS382399#undef SYSCTL_FLAG_WSCALE383400#undef SYSCTL_FLAG_SACK···1053103610541037 TCP_SKB_CB(skb)->when = tcp_time_stamp;1055103810561056- if (unlikely(tcp_transmit_skb(sk, skb_clone(skb, GFP_ATOMIC))))10391039+ if (unlikely(tcp_transmit_skb(sk, skb, 1, GFP_ATOMIC)))10571040 break;1058104110591042 /* Advance the send_head. This one is sent out.···11261109 /* Send it out now. */11271110 TCP_SKB_CB(skb)->when = tcp_time_stamp;1128111111291129- if (likely(!tcp_transmit_skb(sk, skb_clone(skb, sk->sk_allocation)))) {11121112+ if (likely(!tcp_transmit_skb(sk, skb, 1, sk->sk_allocation))) {11301113 update_send_head(sk, tp, skb);11311114 tcp_cwnd_validate(sk, tp);11321115 return;···14461429 */14471430 TCP_SKB_CB(skb)->when = tcp_time_stamp;1448143114491449- err = tcp_transmit_skb(sk, (skb_cloned(skb) ?14501450- pskb_copy(skb, GFP_ATOMIC):14511451- skb_clone(skb, GFP_ATOMIC)));14321432+ err = tcp_transmit_skb(sk, skb, 1, GFP_ATOMIC);1452143314531434 if (err == 0) {14541435 /* Update global TCP statistics. */···16801665 TCP_SKB_CB(skb)->seq = tcp_acceptable_seq(sk, tp);16811666 TCP_SKB_CB(skb)->end_seq = TCP_SKB_CB(skb)->seq;16821667 TCP_SKB_CB(skb)->when = tcp_time_stamp;16831683- if (tcp_transmit_skb(sk, skb))16681668+ if (tcp_transmit_skb(sk, skb, 0, priority))16841669 NET_INC_STATS(LINUX_MIB_TCPABORTFAILED);16851670}16861671···17151700 TCP_ECN_send_synack(tcp_sk(sk), skb);17161701 }17171702 TCP_SKB_CB(skb)->when = tcp_time_stamp;17181718- return tcp_transmit_skb(sk, skb_clone(skb, GFP_ATOMIC));17031703+ return tcp_transmit_skb(sk, skb, 1, GFP_ATOMIC);17191704}1720170517211706/*···18761861 __skb_queue_tail(&sk->sk_write_queue, buff);18771862 sk_charge_skb(sk, buff);18781863 tp->packets_out += tcp_skb_pcount(buff);18791879- tcp_transmit_skb(sk, skb_clone(buff, GFP_KERNEL));18641864+ tcp_transmit_skb(sk, buff, 1, GFP_KERNEL);18801865 TCP_INC_STATS(TCP_MIB_ACTIVEOPENS);1881186618821867 /* Timer for repeating the SYN until an answer. */···19721957 /* Send it off, this clears delayed acks for us. */19731958 TCP_SKB_CB(buff)->seq = TCP_SKB_CB(buff)->end_seq = tcp_acceptable_seq(sk, tp);19741959 TCP_SKB_CB(buff)->when = tcp_time_stamp;19751975- tcp_transmit_skb(sk, buff);19601960+ tcp_transmit_skb(sk, buff, 0, GFP_ATOMIC);19761961 }19771962}19781963···20121997 TCP_SKB_CB(skb)->seq = urgent ? tp->snd_una : tp->snd_una - 1;20131998 TCP_SKB_CB(skb)->end_seq = TCP_SKB_CB(skb)->seq;20141999 TCP_SKB_CB(skb)->when = tcp_time_stamp;20152015- return tcp_transmit_skb(sk, skb);20002000+ return tcp_transmit_skb(sk, skb, 0, GFP_ATOMIC);20162001}2017200220182003int tcp_write_wakeup(struct sock *sk)···2045203020462031 TCP_SKB_CB(skb)->flags |= TCPCB_FLAG_PSH;20472032 TCP_SKB_CB(skb)->when = tcp_time_stamp;20482048- err = tcp_transmit_skb(sk, skb_clone(skb, GFP_ATOMIC));20332033+ err = tcp_transmit_skb(sk, skb, 1, GFP_ATOMIC);20492034 if (!err) {20502035 update_send_head(sk, tp, skb);20512036 }
+4-12
net/ipv4/tcp_vegas.c
···215215 vegas->beg_snd_nxt = tp->snd_nxt;216216 vegas->beg_snd_cwnd = tp->snd_cwnd;217217218218- /* Take into account the current RTT sample too, to219219- * decrease the impact of delayed acks. This double counts220220- * this sample since we count it for the next window as well,221221- * but that's not too awful, since we're taking the min,222222- * rather than averaging.223223- */224224- tcp_vegas_rtt_calc(sk, seq_rtt * 1000);225225-226218 /* We do the Vegas calculations only if we got enough RTT227219 * samples that we can be reasonably sure that we got228220 * at least one RTT sample that wasn't from a delayed ACK.···325333 else if (tp->snd_cwnd > tp->snd_cwnd_clamp)326334 tp->snd_cwnd = tp->snd_cwnd_clamp;327335 }328328- }329336330330- /* Wipe the slate clean for the next RTT. */331331- vegas->cntRTT = 0;332332- vegas->minRTT = 0x7fffffff;337337+ /* Wipe the slate clean for the next RTT. */338338+ vegas->cntRTT = 0;339339+ vegas->minRTT = 0x7fffffff;340340+ }333341}334342335343/* Extract info for Tcp socket info provided via netlink. */
···248248 if (esp->conf.padlen)249249 mtu = ALIGN(mtu, esp->conf.padlen);250250251251- return mtu + x->props.header_len + esp->auth.icv_full_len;251251+ return mtu + x->props.header_len + esp->auth.icv_trunc_len;252252}253253254254static void esp6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
+6-6
net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c
···6868 [ICMPV6_NI_REPLY - 128] = ICMPV6_NI_REPLY +16969 };70707171- __u8 type = orig->dst.u.icmp.type - 128;7272- if (type >= sizeof(invmap) || !invmap[type])7171+ int type = orig->dst.u.icmp.type - 128;7272+ if (type < 0 || type >= sizeof(invmap) || !invmap[type])7373 return 0;74747575 tuple->src.u.icmp.id = orig->src.u.icmp.id;···129129 [ICMPV6_ECHO_REQUEST - 128] = 1,130130 [ICMPV6_NI_QUERY - 128] = 1131131 };132132+ int type = conntrack->tuplehash[0].tuple.dst.u.icmp.type - 128;132133133133- if (conntrack->tuplehash[0].tuple.dst.u.icmp.type - 128 >= sizeof(valid_new)134134- || !valid_new[conntrack->tuplehash[0].tuple.dst.u.icmp.type - 128]) {134134+ if (type < 0 || type >= sizeof(valid_new) || !valid_new[type]) {135135 /* Can't create a new ICMPv6 `conn' with this. */136136- DEBUGP("icmp: can't create new conn with type %u\n",137137- conntrack->tuplehash[0].tuple.dst.u.icmp.type);136136+ DEBUGP("icmpv6: can't create new conn with type %u\n",137137+ type + 128);138138 NF_CT_DUMP_TUPLE(&conntrack->tuplehash[0].tuple);139139 return 0;140140 }
+9-10
net/ipv6/tcp_ipv6.c
···992992 /* sk = NULL, but it is safe for now. RST socket required. */993993 if (!ip6_dst_lookup(NULL, &buff->dst, &fl)) {994994995995- if ((xfrm_lookup(&buff->dst, &fl, NULL, 0)) < 0)995995+ if (xfrm_lookup(&buff->dst, &fl, NULL, 0) >= 0) {996996+ ip6_xmit(NULL, buff, &fl, NULL, 0);997997+ TCP_INC_STATS_BH(TCP_MIB_OUTSEGS);998998+ TCP_INC_STATS_BH(TCP_MIB_OUTRSTS);996999 return;997997-998998- ip6_xmit(NULL, buff, &fl, NULL, 0);999999- TCP_INC_STATS_BH(TCP_MIB_OUTSEGS);10001000- TCP_INC_STATS_BH(TCP_MIB_OUTRSTS);10011001- return;10001000+ }10021001 }1003100210041003 kfree_skb(buff);···10561057 fl.fl_ip_sport = t1->source;1057105810581059 if (!ip6_dst_lookup(NULL, &buff->dst, &fl)) {10591059- if ((xfrm_lookup(&buff->dst, &fl, NULL, 0)) < 0)10601060+ if (xfrm_lookup(&buff->dst, &fl, NULL, 0) >= 0) {10611061+ ip6_xmit(NULL, buff, &fl, NULL, 0);10621062+ TCP_INC_STATS_BH(TCP_MIB_OUTSEGS);10601063 return;10611061- ip6_xmit(NULL, buff, &fl, NULL, 0);10621062- TCP_INC_STATS_BH(TCP_MIB_OUTSEGS);10631063- return;10641064+ }10641065 }1065106610661067 kfree_skb(buff);
+2-2
net/netfilter/Kconfig
···6161 instead of the individual packets.62626363config NF_CONNTRACK_EVENTS6464- bool "Connection tracking events"6565- depends on NF_CONNTRACK6464+ bool "Connection tracking events (EXPERIMENTAL)"6565+ depends on EXPERIMENTAL && NF_CONNTRACK6666 help6767 If this option is enabled, the connection tracking code will6868 provide a notifier chain that can be used by other kernel code
+3
net/netfilter/nf_conntrack_core.c
···13831383 schedule();13841384 goto i_see_dead_people;13851385 }13861386+ /* wait until all references to nf_conntrack_untracked are dropped */13871387+ while (atomic_read(&nf_conntrack_untracked.ct_general.use) > 1)13881388+ schedule();1386138913871390 for (i = 0; i < NF_CT_F_NUM; i++) {13881391 if (nf_ct_cache[i].use == 0)
+2-3
net/netfilter/nfnetlink.c
···162162 return -EINVAL;163163 }164164165165- min_len = NLMSG_ALIGN(sizeof(struct nfgenmsg));165165+ min_len = NLMSG_SPACE(sizeof(struct nfgenmsg));166166 if (unlikely(nlh->nlmsg_len < min_len))167167 return -EINVAL;168168···236236 }237237238238 /* All the messages must at least contain nfgenmsg */239239- if (nlh->nlmsg_len < 240240- NLMSG_LENGTH(NLMSG_ALIGN(sizeof(struct nfgenmsg)))) {239239+ if (nlh->nlmsg_len < NLMSG_SPACE(sizeof(struct nfgenmsg))) {241240 DEBUGP("received message was too short\n");242241 return 0;243242 }
+61-54
net/packet/af_packet.c
···15871587 return virt_to_page(one_pg_vec + (PAGE_SIZE << order) - 1);15881588}1589158915901590-static void free_pg_vec(char **pg_vec, unsigned order, unsigned len)15901590+static void free_pg_vec(char **pg_vec, unsigned int order, unsigned int len)15911591{15921592 int i;1593159315941594- for (i=0; i<len; i++) {15951595- if (pg_vec[i]) {15961596- struct page *page, *pend;15971597-15981598- pend = pg_vec_endpage(pg_vec[i], order);15991599- for (page = virt_to_page(pg_vec[i]); page <= pend; page++)16001600- ClearPageReserved(page);16011601- free_pages((unsigned long)pg_vec[i], order);16021602- }15941594+ for (i = 0; i < len; i++) {15951595+ if (likely(pg_vec[i]))15961596+ free_pages((unsigned long) pg_vec[i], order);16031597 }16041598 kfree(pg_vec);16051599}1606160016011601+static inline char *alloc_one_pg_vec_page(unsigned long order)16021602+{16031603+ return (char *) __get_free_pages(GFP_KERNEL | __GFP_COMP | __GFP_ZERO,16041604+ order);16051605+}16061606+16071607+static char **alloc_pg_vec(struct tpacket_req *req, int order)16081608+{16091609+ unsigned int block_nr = req->tp_block_nr;16101610+ char **pg_vec;16111611+ int i;16121612+16131613+ pg_vec = kzalloc(block_nr * sizeof(char *), GFP_KERNEL);16141614+ if (unlikely(!pg_vec))16151615+ goto out;16161616+16171617+ for (i = 0; i < block_nr; i++) {16181618+ pg_vec[i] = alloc_one_pg_vec_page(order);16191619+ if (unlikely(!pg_vec[i]))16201620+ goto out_free_pgvec;16211621+ }16221622+16231623+out:16241624+ return pg_vec;16251625+16261626+out_free_pgvec:16271627+ free_pg_vec(pg_vec, order, block_nr);16281628+ pg_vec = NULL;16291629+ goto out;16301630+}1607163116081632static int packet_set_ring(struct sock *sk, struct tpacket_req *req, int closing)16091633{···1641161716421618 /* Sanity tests and some calculations */1643161916441644- if (po->pg_vec)16201620+ if (unlikely(po->pg_vec))16451621 return -EBUSY;1646162216471647- if ((int)req->tp_block_size <= 0)16231623+ if (unlikely((int)req->tp_block_size <= 0))16481624 return -EINVAL;16491649- if (req->tp_block_size&(PAGE_SIZE-1))16251625+ if (unlikely(req->tp_block_size & (PAGE_SIZE - 1)))16501626 return -EINVAL;16511651- if (req->tp_frame_size < TPACKET_HDRLEN)16271627+ if (unlikely(req->tp_frame_size < TPACKET_HDRLEN))16521628 return -EINVAL;16531653- if (req->tp_frame_size&(TPACKET_ALIGNMENT-1))16291629+ if (unlikely(req->tp_frame_size & (TPACKET_ALIGNMENT - 1)))16541630 return -EINVAL;1655163116561632 po->frames_per_block = req->tp_block_size/req->tp_frame_size;16571657- if (po->frames_per_block <= 0)16331633+ if (unlikely(po->frames_per_block <= 0))16581634 return -EINVAL;16591659- if (po->frames_per_block*req->tp_block_nr != req->tp_frame_nr)16351635+ if (unlikely((po->frames_per_block * req->tp_block_nr) !=16361636+ req->tp_frame_nr))16601637 return -EINVAL;16611661- /* OK! */16621662-16631663- /* Allocate page vector */16641664- while ((PAGE_SIZE<<order) < req->tp_block_size)16651665- order++;1666163816671639 err = -ENOMEM;16681668-16691669- pg_vec = kmalloc(req->tp_block_nr*sizeof(char *), GFP_KERNEL);16701670- if (pg_vec == NULL)16401640+ order = get_order(req->tp_block_size);16411641+ pg_vec = alloc_pg_vec(req, order);16421642+ if (unlikely(!pg_vec))16711643 goto out;16721672- memset(pg_vec, 0, req->tp_block_nr*sizeof(char **));16731673-16741674- for (i=0; i<req->tp_block_nr; i++) {16751675- struct page *page, *pend;16761676- pg_vec[i] = (char *)__get_free_pages(GFP_KERNEL, order);16771677- if (!pg_vec[i])16781678- goto out_free_pgvec;16791679-16801680- pend = pg_vec_endpage(pg_vec[i], order);16811681- for (page = virt_to_page(pg_vec[i]); page <= pend; page++)16821682- SetPageReserved(page);16831683- }16841684- /* Page vector is allocated */1685164416861645 l = 0;16871687- for (i=0; i<req->tp_block_nr; i++) {16461646+ for (i = 0; i < req->tp_block_nr; i++) {16881647 char *ptr = pg_vec[i];16891648 struct tpacket_hdr *header;16901649 int k;1691165016921692- for (k=0; k<po->frames_per_block; k++) {16931693-16941694- header = (struct tpacket_hdr*)ptr;16511651+ for (k = 0; k < po->frames_per_block; k++) {16521652+ header = (struct tpacket_hdr *) ptr;16951653 header->tp_status = TP_STATUS_KERNEL;16961654 ptr += req->tp_frame_size;16971655 }16981656 }16991657 /* Done */17001658 } else {17011701- if (req->tp_frame_nr)16591659+ if (unlikely(req->tp_frame_nr))17021660 return -EINVAL;17031661 }17041662···1707170117081702 spin_lock_bh(&sk->sk_receive_queue.lock);17091703 pg_vec = XC(po->pg_vec, pg_vec);17101710- po->frame_max = req->tp_frame_nr-1;17041704+ po->frame_max = (req->tp_frame_nr - 1);17111705 po->head = 0;17121706 po->frame_size = req->tp_frame_size;17131707 spin_unlock_bh(&sk->sk_receive_queue.lock);···1734172817351729 release_sock(sk);1736173017371737-out_free_pgvec:17381731 if (pg_vec)17391732 free_pg_vec(pg_vec, order, req->tp_block_nr);17401733out:···17601755 if (size != po->pg_vec_len*po->pg_vec_pages*PAGE_SIZE)17611756 goto out;1762175717631763- atomic_inc(&po->mapped);17641758 start = vma->vm_start;17651765- err = -EAGAIN;17661766- for (i=0; i<po->pg_vec_len; i++) {17671767- if (remap_pfn_range(vma, start,17681768- __pa(po->pg_vec[i]) >> PAGE_SHIFT,17691769- po->pg_vec_pages*PAGE_SIZE,17701770- vma->vm_page_prot))17711771- goto out;17721772- start += po->pg_vec_pages*PAGE_SIZE;17591759+ for (i = 0; i < po->pg_vec_len; i++) {17601760+ struct page *page = virt_to_page(po->pg_vec[i]);17611761+ int pg_num;17621762+17631763+ for (pg_num = 0; pg_num < po->pg_vec_pages; pg_num++, page++) {17641764+ err = vm_insert_page(vma, start, page);17651765+ if (unlikely(err))17661766+ goto out;17671767+ start += PAGE_SIZE;17681768+ }17731769 }17701770+ atomic_inc(&po->mapped);17741771 vma->vm_ops = &packet_mmap_ops;17751772 err = 0;17761773
+1-1
net/sched/act_api.c
···3434#include <net/sch_generic.h>3535#include <net/act_api.h>36363737-#if 1 /* control */3737+#if 0 /* control */3838#define DPRINTK(format, args...) printk(KERN_DEBUG format, ##args)3939#else4040#define DPRINTK(format, args...)