## Automatically generated incremental diff ## From: linux-2.6.19-rc5 ## To: linux-2.6.19-rc6 ## Robot: $Id: make-incremental-diff,v 1.12 2004/01/06 07:19:36 hpa Exp $ diff -urN linux-2.6.19-rc5/.gitignore linux-2.6.19-rc6/.gitignore --- linux-2.6.19-rc5/.gitignore 2006-09-20 03:42:06.000000000 +0000 +++ linux-2.6.19-rc6/.gitignore 2006-11-16 05:11:44.756801649 +0000 @@ -20,6 +20,7 @@ # Top-level generic files # tags +TAGS vmlinux* System.map Module.symvers diff -urN linux-2.6.19-rc5/CREDITS linux-2.6.19-rc6/CREDITS --- linux-2.6.19-rc5/CREDITS 2006-11-16 05:11:39.392219038 +0000 +++ linux-2.6.19-rc6/CREDITS 2006-11-16 05:11:44.760802084 +0000 @@ -45,7 +45,7 @@ S: Sydney, Australia N: Tigran A. Aivazian -E: tigran@veritas.com +E: tigran@aivazian.fsnet.co.uk W: http://www.moses.uklinux.net/patches D: BFS filesystem D: Intel IA32 CPU microcode update support diff -urN linux-2.6.19-rc5/Documentation/feature-removal-schedule.txt linux-2.6.19-rc6/Documentation/feature-removal-schedule.txt --- linux-2.6.19-rc5/Documentation/feature-removal-schedule.txt 2006-11-16 05:11:39.412221211 +0000 +++ linux-2.6.19-rc6/Documentation/feature-removal-schedule.txt 2006-11-16 05:11:44.776803821 +0000 @@ -53,18 +53,6 @@ --------------------------- -What: sys_sysctl -When: January 2007 -Why: The same information is available through /proc/sys and that is the - interface user space prefers to use. And there do not appear to be - any existing user in user space of sys_sysctl. The additional - maintenance overhead of keeping a set of binary names gets - in the way of doing a good job of maintaining this interface. - -Who: Eric Biederman - ---------------------------- - What: PCMCIA control ioctl (needed for pcmcia-cs [cardmgr, cardctl]) When: November 2005 Files: drivers/pcmcia/: pcmcia_ioctl.c diff -urN linux-2.6.19-rc5/Documentation/kernel-parameters.txt linux-2.6.19-rc6/Documentation/kernel-parameters.txt --- linux-2.6.19-rc5/Documentation/kernel-parameters.txt 2006-11-16 05:11:39.428222948 +0000 +++ linux-2.6.19-rc6/Documentation/kernel-parameters.txt 2006-11-16 05:11:44.792805559 +0000 @@ -164,6 +164,10 @@ acpi_skip_timer_override [HW,ACPI] Recognize and ignore IRQ0/pin2 Interrupt Override. For broken nForce2 BIOS resulting in XT-PIC timer. + acpi_use_timer_override [HW,ACPI} + Use timer override. For some broken Nvidia NF5 boards + that require a timer override, but don't have + HPET acpi_dbg_layer= [HW,ACPI] Format: diff -urN linux-2.6.19-rc5/Documentation/memory-barriers.txt linux-2.6.19-rc6/Documentation/memory-barriers.txt --- linux-2.6.19-rc5/Documentation/memory-barriers.txt 2006-11-16 05:11:39.432223383 +0000 +++ linux-2.6.19-rc6/Documentation/memory-barriers.txt 2006-11-16 05:11:44.796805994 +0000 @@ -1016,7 +1016,7 @@ (*) set_mb(var, value) - This assigns the value to the variable and then inserts at least a write + This assigns the value to the variable and then inserts a full memory barrier after it, depending on the function. It isn't guaranteed to insert anything more than a compiler barrier in a UP compilation. diff -urN linux-2.6.19-rc5/Documentation/sound/alsa/ALSA-Configuration.txt linux-2.6.19-rc6/Documentation/sound/alsa/ALSA-Configuration.txt --- linux-2.6.19-rc5/Documentation/sound/alsa/ALSA-Configuration.txt 2006-11-16 05:11:39.460226424 +0000 +++ linux-2.6.19-rc6/Documentation/sound/alsa/ALSA-Configuration.txt 2006-11-16 05:11:44.824809035 +0000 @@ -753,7 +753,7 @@ position_fix - Fix DMA pointer (0 = auto, 1 = none, 2 = POSBUF, 3 = FIFO size) single_cmd - Use single immediate commands to communicate with codecs (for debugging only) - disable_msi - Disable Message Signaled Interrupt (MSI) + enable_msi - Enable Message Signaled Interrupt (MSI) (default = off) This module supports one card and autoprobe. diff -urN linux-2.6.19-rc5/MAINTAINERS linux-2.6.19-rc6/MAINTAINERS --- linux-2.6.19-rc5/MAINTAINERS 2006-11-16 05:11:39.480228596 +0000 +++ linux-2.6.19-rc6/MAINTAINERS 2006-11-16 05:11:44.844811207 +0000 @@ -493,7 +493,7 @@ BFS FILE SYSTEM P: Tigran A. Aivazian -M: tigran@veritas.com +M: tigran@aivazian.fsnet.co.uk L: linux-kernel@vger.kernel.org S: Maintained @@ -1513,7 +1513,7 @@ INTEL IA32 MICROCODE UPDATE SUPPORT P: Tigran Aivazian -M: tigran@veritas.com +M: tigran@aivazian.fsnet.co.uk S: Maintained INTEL IXP4XX RANDOM NUMBER GENERATOR SUPPORT @@ -3072,6 +3072,13 @@ W: http://www.linux-projects.org S: Maintained +USB GADGET/PERIPHERAL SUBSYSTEM +P: David Brownell +M: dbrownell@users.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net +W: http://www.linux-usb.org/gadget +S: Maintained + USB HID/HIDBP DRIVERS P: Vojtech Pavlik M: vojtech@suse.cz @@ -3255,10 +3262,11 @@ L: linux-usb-devel@lists.sourceforge.net S: Maintained -USB "USBNET" DRIVER +USB "USBNET" DRIVER FRAMEWORK P: David Brownell M: dbrownell@users.sourceforge.net L: linux-usb-devel@lists.sourceforge.net +W: http://www.linux-usb.org/usbnet S: Maintained USB W996[87]CF DRIVER diff -urN linux-2.6.19-rc5/Makefile linux-2.6.19-rc6/Makefile --- linux-2.6.19-rc5/Makefile 2006-11-16 05:11:39.480228596 +0000 +++ linux-2.6.19-rc6/Makefile 2006-11-16 05:11:44.844811207 +0000 @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 19 -EXTRAVERSION =-rc5 +EXTRAVERSION =-rc6 NAME=Avast! A bilge rat! # *DOCUMENTATION* diff -urN linux-2.6.19-rc5/arch/i386/kernel/acpi/boot.c linux-2.6.19-rc6/arch/i386/kernel/acpi/boot.c --- linux-2.6.19-rc5/arch/i386/kernel/acpi/boot.c 2006-11-16 05:11:39.648246844 +0000 +++ linux-2.6.19-rc6/arch/i386/kernel/acpi/boot.c 2006-11-16 05:11:44.988826848 +0000 @@ -82,6 +82,7 @@ acpi_interrupt_flags acpi_sci_flags __initdata; int acpi_sci_override_gsi __initdata; int acpi_skip_timer_override __initdata; +int acpi_use_timer_override __initdata; #ifdef CONFIG_X86_LOCAL_APIC static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE; @@ -1300,6 +1301,13 @@ return 0; } early_param("acpi_skip_timer_override", parse_acpi_skip_timer_override); + +static int __init parse_acpi_use_timer_override(char *arg) +{ + acpi_use_timer_override = 1; + return 0; +} +early_param("acpi_use_timer_override", parse_acpi_use_timer_override); #endif /* CONFIG_X86_IO_APIC */ static int __init setup_acpi_sci(char *s) diff -urN linux-2.6.19-rc5/arch/i386/kernel/acpi/earlyquirk.c linux-2.6.19-rc6/arch/i386/kernel/acpi/earlyquirk.c --- linux-2.6.19-rc5/arch/i386/kernel/acpi/earlyquirk.c 2006-11-16 05:11:39.648246844 +0000 +++ linux-2.6.19-rc6/arch/i386/kernel/acpi/earlyquirk.c 2006-11-16 05:11:44.988826848 +0000 @@ -27,11 +27,17 @@ #ifdef CONFIG_ACPI /* According to Nvidia all timer overrides are bogus unless HPET is enabled. */ - if (vendor == PCI_VENDOR_ID_NVIDIA) { + if (!acpi_use_timer_override && vendor == PCI_VENDOR_ID_NVIDIA) { nvidia_hpet_detected = 0; acpi_table_parse(ACPI_HPET, nvidia_hpet_check); if (nvidia_hpet_detected == 0) { acpi_skip_timer_override = 1; + printk(KERN_INFO "Nvidia board " + "detected. Ignoring ACPI " + "timer override.\n"); + printk(KERN_INFO "If you got timer trouble " + "try acpi_use_timer_override\n"); + } } #endif diff -urN linux-2.6.19-rc5/arch/i386/kernel/io_apic.c linux-2.6.19-rc6/arch/i386/kernel/io_apic.c --- linux-2.6.19-rc5/arch/i386/kernel/io_apic.c 2006-11-16 05:11:39.656247713 +0000 +++ linux-2.6.19-rc6/arch/i386/kernel/io_apic.c 2006-11-16 05:11:45.000828151 +0000 @@ -1287,9 +1287,11 @@ trigger == IOAPIC_LEVEL) set_irq_chip_and_handler_name(irq, &ioapic_chip, handle_fasteoi_irq, "fasteoi"); - else + else { + irq_desc[irq].status |= IRQ_DELAYED_DISABLE; set_irq_chip_and_handler_name(irq, &ioapic_chip, handle_edge_irq, "edge"); + } set_intr_gate(vector, interrupt[irq]); } @@ -2624,18 +2626,16 @@ static void target_ht_irq(unsigned int irq, unsigned int dest) { - u32 low, high; - low = read_ht_irq_low(irq); - high = read_ht_irq_high(irq); + struct ht_irq_msg msg; + fetch_ht_irq_msg(irq, &msg); - low &= ~(HT_IRQ_LOW_DEST_ID_MASK); - high &= ~(HT_IRQ_HIGH_DEST_ID_MASK); + msg.address_lo &= ~(HT_IRQ_LOW_DEST_ID_MASK); + msg.address_hi &= ~(HT_IRQ_HIGH_DEST_ID_MASK); - low |= HT_IRQ_LOW_DEST_ID(dest); - high |= HT_IRQ_HIGH_DEST_ID(dest); + msg.address_lo |= HT_IRQ_LOW_DEST_ID(dest); + msg.address_hi |= HT_IRQ_HIGH_DEST_ID(dest); - write_ht_irq_low(irq, low); - write_ht_irq_high(irq, high); + write_ht_irq_msg(irq, &msg); } static void set_ht_irq_affinity(unsigned int irq, cpumask_t mask) @@ -2673,7 +2673,7 @@ vector = assign_irq_vector(irq); if (vector >= 0) { - u32 low, high; + struct ht_irq_msg msg; unsigned dest; cpumask_t tmp; @@ -2681,9 +2681,10 @@ cpu_set(vector >> 8, tmp); dest = cpu_mask_to_apicid(tmp); - high = HT_IRQ_HIGH_DEST_ID(dest); + msg.address_hi = HT_IRQ_HIGH_DEST_ID(dest); - low = HT_IRQ_LOW_BASE | + msg.address_lo = + HT_IRQ_LOW_BASE | HT_IRQ_LOW_DEST_ID(dest) | HT_IRQ_LOW_VECTOR(vector) | ((INT_DEST_MODE == 0) ? @@ -2695,8 +2696,7 @@ HT_IRQ_LOW_MT_ARBITRATED) | HT_IRQ_LOW_IRQ_MASKED; - write_ht_irq_low(irq, low); - write_ht_irq_high(irq, high); + write_ht_irq_msg(irq, &msg); set_irq_chip_and_handler_name(irq, &ht_irq_chip, handle_edge_irq, "edge"); diff -urN linux-2.6.19-rc5/arch/i386/kernel/kprobes.c linux-2.6.19-rc6/arch/i386/kernel/kprobes.c --- linux-2.6.19-rc5/arch/i386/kernel/kprobes.c 2006-11-16 05:11:39.660248147 +0000 +++ linux-2.6.19-rc6/arch/i386/kernel/kprobes.c 2006-11-16 05:11:45.000828151 +0000 @@ -361,8 +361,11 @@ asm volatile ( ".global kretprobe_trampoline\n" "kretprobe_trampoline: \n" " pushf\n" - /* skip cs, eip, orig_eax, es, ds */ - " subl $20, %esp\n" + /* skip cs, eip, orig_eax */ + " subl $12, %esp\n" + " pushl %gs\n" + " pushl %ds\n" + " pushl %es\n" " pushl %eax\n" " pushl %ebp\n" " pushl %edi\n" @@ -373,10 +376,10 @@ " movl %esp, %eax\n" " call trampoline_handler\n" /* move eflags to cs */ - " movl 48(%esp), %edx\n" - " movl %edx, 44(%esp)\n" + " movl 52(%esp), %edx\n" + " movl %edx, 48(%esp)\n" /* save true return address on eflags */ - " movl %eax, 48(%esp)\n" + " movl %eax, 52(%esp)\n" " popl %ebx\n" " popl %ecx\n" " popl %edx\n" @@ -384,8 +387,8 @@ " popl %edi\n" " popl %ebp\n" " popl %eax\n" - /* skip eip, orig_eax, es, ds */ - " addl $16, %esp\n" + /* skip eip, orig_eax, es, ds, gs */ + " addl $20, %esp\n" " popf\n" " ret\n"); } @@ -404,6 +407,10 @@ INIT_HLIST_HEAD(&empty_rp); spin_lock_irqsave(&kretprobe_lock, flags); head = kretprobe_inst_table_head(current); + /* fixup registers */ + regs->xcs = __KERNEL_CS; + regs->eip = trampoline_address; + regs->orig_eax = 0xffffffff; /* * It is possible to have multiple instances associated with a given @@ -425,6 +432,7 @@ if (ri->rp && ri->rp->handler){ __get_cpu_var(current_kprobe) = &ri->rp->kp; + get_kprobe_ctlblk()->kprobe_status = KPROBE_HIT_ACTIVE; ri->rp->handler(ri, regs); __get_cpu_var(current_kprobe) = NULL; } diff -urN linux-2.6.19-rc5/arch/i386/kernel/microcode.c linux-2.6.19-rc6/arch/i386/kernel/microcode.c --- linux-2.6.19-rc5/arch/i386/kernel/microcode.c 2006-11-16 05:11:39.660248147 +0000 +++ linux-2.6.19-rc6/arch/i386/kernel/microcode.c 2006-11-16 05:11:45.000828151 +0000 @@ -577,7 +577,7 @@ set_cpus_allowed(current, cpumask_of_cpu(cpu)); mutex_lock(µcode_mutex); collect_cpu_info(cpu); - if (uci->valid) + if (uci->valid && system_state == SYSTEM_RUNNING) cpu_request_microcode(cpu); mutex_unlock(µcode_mutex); set_cpus_allowed(current, old); diff -urN linux-2.6.19-rc5/arch/i386/kernel/vmlinux.lds.S linux-2.6.19-rc6/arch/i386/kernel/vmlinux.lds.S --- linux-2.6.19-rc5/arch/i386/kernel/vmlinux.lds.S 2006-11-16 05:11:39.672249450 +0000 +++ linux-2.6.19-rc6/arch/i386/kernel/vmlinux.lds.S 2006-11-16 05:11:45.012829455 +0000 @@ -51,6 +51,7 @@ __tracedata_end = .; /* writeable */ + . = ALIGN(4096); .data : AT(ADDR(.data) - LOAD_OFFSET) { /* Data */ *(.data) CONSTRUCTORS diff -urN linux-2.6.19-rc5/arch/i386/pci/irq.c linux-2.6.19-rc6/arch/i386/pci/irq.c --- linux-2.6.19-rc5/arch/i386/pci/irq.c 2006-11-16 05:11:39.680250319 +0000 +++ linux-2.6.19-rc6/arch/i386/pci/irq.c 2006-11-16 05:11:45.020830323 +0000 @@ -255,13 +255,13 @@ */ static int pirq_via586_get(struct pci_dev *router, struct pci_dev *dev, int pirq) { - static const unsigned int pirqmap[4] = { 3, 2, 5, 1 }; + static const unsigned int pirqmap[5] = { 3, 2, 5, 1, 1 }; return read_config_nybble(router, 0x55, pirqmap[pirq-1]); } static int pirq_via586_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) { - static const unsigned int pirqmap[4] = { 3, 2, 5, 1 }; + static const unsigned int pirqmap[5] = { 3, 2, 5, 1, 1 }; write_config_nybble(router, 0x55, pirqmap[pirq-1], irq); return 1; } diff -urN linux-2.6.19-rc5/arch/i386/pci/mmconfig.c linux-2.6.19-rc6/arch/i386/pci/mmconfig.c --- linux-2.6.19-rc5/arch/i386/pci/mmconfig.c 2006-11-16 05:11:39.680250319 +0000 +++ linux-2.6.19-rc6/arch/i386/pci/mmconfig.c 2006-11-16 05:11:45.020830323 +0000 @@ -154,38 +154,6 @@ .write = pci_mmcfg_write, }; - -static __init void pci_mmcfg_insert_resources(void) -{ -#define PCI_MMCFG_RESOURCE_NAME_LEN 19 - int i; - struct resource *res; - char *names; - unsigned num_buses; - - res = kcalloc(PCI_MMCFG_RESOURCE_NAME_LEN + sizeof(*res), - pci_mmcfg_config_num, GFP_KERNEL); - - if (!res) { - printk(KERN_ERR "PCI: Unable to allocate MMCONFIG resources\n"); - return; - } - - names = (void *)&res[pci_mmcfg_config_num]; - for (i = 0; i < pci_mmcfg_config_num; i++, res++) { - num_buses = pci_mmcfg_config[i].end_bus_number - - pci_mmcfg_config[i].start_bus_number + 1; - res->name = names; - snprintf(names, PCI_MMCFG_RESOURCE_NAME_LEN, "PCI MMCONFIG %u", - pci_mmcfg_config[i].pci_segment_group_number); - res->start = pci_mmcfg_config[i].base_address; - res->end = res->start + (num_buses << 20) - 1; - res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; - insert_resource(&iomem_resource, res); - names += PCI_MMCFG_RESOURCE_NAME_LEN; - } -} - /* K8 systems have some devices (typically in the builtin northbridge) that are only accessible using type1 Normally this can be expressed in the MCFG by not listing them @@ -222,8 +190,6 @@ } } - - void __init pci_mmcfg_init(int type) { if ((pci_probe & PCI_PROBE_MMCONF) == 0) @@ -251,5 +217,4 @@ pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF; unreachable_devices(); - pci_mmcfg_insert_resources(); } diff -urN linux-2.6.19-rc5/arch/ia64/Kconfig linux-2.6.19-rc6/arch/ia64/Kconfig --- linux-2.6.19-rc5/arch/ia64/Kconfig 2006-11-16 05:11:39.680250319 +0000 +++ linux-2.6.19-rc6/arch/ia64/Kconfig 2006-11-16 05:11:45.020830323 +0000 @@ -341,6 +341,7 @@ bool "NUMA support" depends on !IA64_HP_SIM && !FLATMEM default y if IA64_SGI_SN2 + select ACPI_NUMA if ACPI help Say Y to compile the kernel to support NUMA (Non-Uniform Memory Access). This option is for configuring high-end multiprocessor @@ -483,6 +484,15 @@ source "drivers/Kconfig" +config MSPEC + tristate "Memory special operations driver" + depends on IA64 + select IA64_UNCACHED_ALLOCATOR + help + If you have an ia64 and you want to enable memory special + operations support (formerly known as fetchop), say Y here, + otherwise say N. + source "fs/Kconfig" source "lib/Kconfig" diff -urN linux-2.6.19-rc5/arch/ia64/mm/hugetlbpage.c linux-2.6.19-rc6/arch/ia64/mm/hugetlbpage.c --- linux-2.6.19-rc5/arch/ia64/mm/hugetlbpage.c 2006-09-20 03:42:06.000000000 +0000 +++ linux-2.6.19-rc6/arch/ia64/mm/hugetlbpage.c 2006-11-16 05:11:45.036832061 +0000 @@ -70,8 +70,10 @@ * Don't actually need to do any preparation, but need to make sure * the address is in the right region. */ -int prepare_hugepage_range(unsigned long addr, unsigned long len) +int prepare_hugepage_range(unsigned long addr, unsigned long len, pgoff_t pgoff) { + if (pgoff & (~HPAGE_MASK >> PAGE_SHIFT)) + return -EINVAL; if (len & ~HPAGE_MASK) return -EINVAL; if (addr & ~HPAGE_MASK) diff -urN linux-2.6.19-rc5/arch/powerpc/Kconfig linux-2.6.19-rc6/arch/powerpc/Kconfig --- linux-2.6.19-rc5/arch/powerpc/Kconfig 2006-11-16 05:11:39.848268567 +0000 +++ linux-2.6.19-rc6/arch/powerpc/Kconfig 2006-11-16 05:11:45.164845964 +0000 @@ -740,7 +740,7 @@ config ARCH_SPARSEMEM_DEFAULT def_bool y - depends on SMP && PPC_PSERIES + depends on (SMP && PPC_PSERIES) || PPC_CELL config ARCH_POPULATES_NODE_MAP def_bool y diff -urN linux-2.6.19-rc5/arch/powerpc/boot/wrapper linux-2.6.19-rc6/arch/powerpc/boot/wrapper --- linux-2.6.19-rc5/arch/powerpc/boot/wrapper 2006-11-16 05:11:39.856269436 +0000 +++ linux-2.6.19-rc6/arch/powerpc/boot/wrapper 2006-11-16 05:11:45.172846833 +0000 @@ -179,11 +179,11 @@ fi if [ -n "$initrd" ]; then - addsec $tmp "$initrd" initrd + addsec $tmp "$initrd" $isection fi if [ -n "$dtb" ]; then - addsec $tmp "$dtb" dtb + addsec $tmp "$dtb" .kernel:dtb fi if [ "$platform" != "miboot" ]; then diff -urN linux-2.6.19-rc5/arch/powerpc/boot/zImage.lds.S linux-2.6.19-rc6/arch/powerpc/boot/zImage.lds.S --- linux-2.6.19-rc5/arch/powerpc/boot/zImage.lds.S 2006-11-16 05:11:39.856269436 +0000 +++ linux-2.6.19-rc6/arch/powerpc/boot/zImage.lds.S 2006-11-16 05:11:45.172846833 +0000 @@ -21,6 +21,11 @@ __got2_end = .; } + . = ALIGN(8); + _dtb_start = .; + .kernel:dtb : { *(.kernel:dtb) } + _dtb_end = .; + . = ALIGN(4096); _vmlinux_start = .; .kernel:vmlinux.strip : { *(.kernel:vmlinux.strip) } diff -urN linux-2.6.19-rc5/arch/powerpc/kernel/rtas_flash.c linux-2.6.19-rc6/arch/powerpc/kernel/rtas_flash.c --- linux-2.6.19-rc5/arch/powerpc/kernel/rtas_flash.c 2006-09-20 03:42:06.000000000 +0000 +++ linux-2.6.19-rc6/arch/powerpc/kernel/rtas_flash.c 2006-11-16 05:11:45.196849440 +0000 @@ -72,6 +72,10 @@ #define VALIDATE_BUF_SIZE 4096 #define RTAS_MSG_MAXLEN 64 +/* Quirk - RTAS requires 4k list length and block size */ +#define RTAS_BLKLIST_LENGTH 4096 +#define RTAS_BLK_SIZE 4096 + struct flash_block { char *data; unsigned long length; @@ -83,7 +87,7 @@ * into a version/length and translate the pointers * to absolute. */ -#define FLASH_BLOCKS_PER_NODE ((PAGE_SIZE - 16) / sizeof(struct flash_block)) +#define FLASH_BLOCKS_PER_NODE ((RTAS_BLKLIST_LENGTH - 16) / sizeof(struct flash_block)) struct flash_block_list { unsigned long num_blocks; struct flash_block_list *next; @@ -96,6 +100,9 @@ static struct flash_block_list_header rtas_firmware_flash_list = {0, NULL}; +/* Use slab cache to guarantee 4k alignment */ +static kmem_cache_t *flash_block_cache = NULL; + #define FLASH_BLOCK_LIST_VERSION (1UL) /* Local copy of the flash block list. @@ -153,7 +160,7 @@ return FLASH_IMG_NULL_DATA; } block_size = f->blocks[i].length; - if (block_size <= 0 || block_size > PAGE_SIZE) { + if (block_size <= 0 || block_size > RTAS_BLK_SIZE) { return FLASH_IMG_BAD_LEN; } image_size += block_size; @@ -177,9 +184,9 @@ while (f) { for (i = 0; i < f->num_blocks; i++) - free_page((unsigned long)(f->blocks[i].data)); + kmem_cache_free(flash_block_cache, f->blocks[i].data); next = f->next; - free_page((unsigned long)f); + kmem_cache_free(flash_block_cache, f); f = next; } } @@ -278,6 +285,12 @@ return msglen; } +/* constructor for flash_block_cache */ +void rtas_block_ctor(void *ptr, kmem_cache_t *cache, unsigned long flags) +{ + memset(ptr, 0, RTAS_BLK_SIZE); +} + /* We could be much more efficient here. But to keep this function * simple we allocate a page to the block list no matter how small the * count is. If the system is low on memory it will be just as well @@ -302,7 +315,7 @@ * proc file */ if (uf->flist == NULL) { - uf->flist = (struct flash_block_list *) get_zeroed_page(GFP_KERNEL); + uf->flist = kmem_cache_alloc(flash_block_cache, GFP_KERNEL); if (!uf->flist) return -ENOMEM; } @@ -313,21 +326,21 @@ next_free = fl->num_blocks; if (next_free == FLASH_BLOCKS_PER_NODE) { /* Need to allocate another block_list */ - fl->next = (struct flash_block_list *)get_zeroed_page(GFP_KERNEL); + fl->next = kmem_cache_alloc(flash_block_cache, GFP_KERNEL); if (!fl->next) return -ENOMEM; fl = fl->next; next_free = 0; } - if (count > PAGE_SIZE) - count = PAGE_SIZE; - p = (char *)get_zeroed_page(GFP_KERNEL); + if (count > RTAS_BLK_SIZE) + count = RTAS_BLK_SIZE; + p = kmem_cache_alloc(flash_block_cache, GFP_KERNEL); if (!p) return -ENOMEM; if(copy_from_user(p, buffer, count)) { - free_page((unsigned long)p); + kmem_cache_free(flash_block_cache, p); return -EFAULT; } fl->blocks[next_free].data = p; @@ -791,6 +804,16 @@ goto cleanup; rtas_flash_term_hook = rtas_flash_firmware; + + flash_block_cache = kmem_cache_create("rtas_flash_cache", + RTAS_BLK_SIZE, RTAS_BLK_SIZE, 0, + rtas_block_ctor, NULL); + if (!flash_block_cache) { + printk(KERN_ERR "%s: failed to create block cache\n", + __FUNCTION__); + rc = -ENOMEM; + goto cleanup; + } return 0; cleanup: @@ -805,6 +828,10 @@ void __exit rtas_flash_cleanup(void) { rtas_flash_term_hook = NULL; + + if (flash_block_cache) + kmem_cache_destroy(flash_block_cache); + remove_flash_pde(firmware_flash_pde); remove_flash_pde(firmware_update_pde); remove_flash_pde(validate_pde); diff -urN linux-2.6.19-rc5/arch/powerpc/mm/hugetlbpage.c linux-2.6.19-rc6/arch/powerpc/mm/hugetlbpage.c --- linux-2.6.19-rc5/arch/powerpc/mm/hugetlbpage.c 2006-11-16 05:11:39.892273346 +0000 +++ linux-2.6.19-rc6/arch/powerpc/mm/hugetlbpage.c 2006-11-16 05:11:45.204850309 +0000 @@ -491,11 +491,15 @@ return 0; } -int prepare_hugepage_range(unsigned long addr, unsigned long len) +int prepare_hugepage_range(unsigned long addr, unsigned long len, pgoff_t pgoff) { int err = 0; - if ( (addr+len) < addr ) + if (pgoff & (~HPAGE_MASK >> PAGE_SHIFT)) + return -EINVAL; + if (len & ~HPAGE_MASK) + return -EINVAL; + if (addr & ~HPAGE_MASK) return -EINVAL; if (addr < 0x100000000UL) diff -urN linux-2.6.19-rc5/arch/powerpc/platforms/cell/spu_base.c linux-2.6.19-rc6/arch/powerpc/platforms/cell/spu_base.c --- linux-2.6.19-rc5/arch/powerpc/platforms/cell/spu_base.c 2006-11-16 05:11:39.900274215 +0000 +++ linux-2.6.19-rc6/arch/powerpc/platforms/cell/spu_base.c 2006-11-16 05:11:45.216851612 +0000 @@ -655,14 +655,19 @@ for (i=0; i < 3; i++) { ret = of_irq_map_one(np, i, &oirq); - if (ret) + if (ret) { + pr_debug("spu_new: failed to get irq %d\n", i); goto err; - + } ret = -EINVAL; + pr_debug(" irq %d no 0x%x on %s\n", i, oirq.specifier[0], + oirq.controller->full_name); spu->irqs[i] = irq_create_of_mapping(oirq.controller, oirq.specifier, oirq.size); - if (spu->irqs[i] == NO_IRQ) + if (spu->irqs[i] == NO_IRQ) { + pr_debug("spu_new: failed to map it !\n"); goto err; + } } return 0; @@ -681,7 +686,7 @@ struct resource resource = { }; int ret; - ret = of_address_to_resource(node, 0, &resource); + ret = of_address_to_resource(node, nr, &resource); if (ret) goto out; @@ -704,22 +709,42 @@ ret = spu_map_resource(node, 0, (void __iomem**)&spu->local_store, &spu->local_store_phys); - if (ret) + if (ret) { + pr_debug("spu_new: failed to map %s resource 0\n", + node->full_name); goto out; + } ret = spu_map_resource(node, 1, (void __iomem**)&spu->problem, &spu->problem_phys); - if (ret) + if (ret) { + pr_debug("spu_new: failed to map %s resource 1\n", + node->full_name); goto out_unmap; + } ret = spu_map_resource(node, 2, (void __iomem**)&spu->priv2, NULL); - if (ret) + if (ret) { + pr_debug("spu_new: failed to map %s resource 2\n", + node->full_name); goto out_unmap; + } if (!firmware_has_feature(FW_FEATURE_LPAR)) ret = spu_map_resource(node, 3, (void __iomem**)&spu->priv1, NULL); - if (ret) + if (ret) { + pr_debug("spu_new: failed to map %s resource 3\n", + node->full_name); goto out_unmap; + } + pr_debug("spu_new: %s maps:\n", node->full_name); + pr_debug(" local store : 0x%016lx -> 0x%p\n", + spu->local_store_phys, spu->local_store); + pr_debug(" problem state : 0x%016lx -> 0x%p\n", + spu->problem_phys, spu->problem); + pr_debug(" priv2 : 0x%p\n", spu->priv2); + pr_debug(" priv1 : 0x%p\n", spu->priv1); + return 0; out_unmap: diff -urN linux-2.6.19-rc5/arch/x86_64/boot/setup.S linux-2.6.19-rc6/arch/x86_64/boot/setup.S --- linux-2.6.19-rc5/arch/x86_64/boot/setup.S 2006-11-16 05:11:40.144300717 +0000 +++ linux-2.6.19-rc6/arch/x86_64/boot/setup.S 2006-11-16 05:11:45.436875507 +0000 @@ -836,13 +836,12 @@ .word 0x9200 # data read/write .word 0x00CF # granularity = 4096, 386 # (+5th nibble of limit) +gdt_end: idt_48: .word 0 # idt limit = 0 .word 0, 0 # idt base = 0L gdt_48: - .word 0x8000 # gdt limit=2048, - # 256 GDT entries - + .word gdt_end-gdt-1 # gdt limit .word 0, 0 # gdt base (filled in later) # Include video setup & detection code diff -urN linux-2.6.19-rc5/arch/x86_64/ia32/ptrace32.c linux-2.6.19-rc6/arch/x86_64/ia32/ptrace32.c --- linux-2.6.19-rc5/arch/x86_64/ia32/ptrace32.c 2006-11-16 05:11:40.148301151 +0000 +++ linux-2.6.19-rc6/arch/x86_64/ia32/ptrace32.c 2006-11-16 05:11:45.440875942 +0000 @@ -244,6 +244,8 @@ case PTRACE_DETACH: case PTRACE_SYSCALL: case PTRACE_SETOPTIONS: + case PTRACE_SET_THREAD_AREA: + case PTRACE_GET_THREAD_AREA: return sys_ptrace(request, pid, addr, data); default: diff -urN linux-2.6.19-rc5/arch/x86_64/kernel/e820.c linux-2.6.19-rc6/arch/x86_64/kernel/e820.c --- linux-2.6.19-rc5/arch/x86_64/kernel/e820.c 2006-11-16 05:11:40.148301151 +0000 +++ linux-2.6.19-rc6/arch/x86_64/kernel/e820.c 2006-11-16 05:11:45.444876376 +0000 @@ -278,7 +278,7 @@ >> PAGE_SHIFT; /* Skip map entries smaller than a page */ - if (ei_startpfn > ei_endpfn) + if (ei_startpfn >= ei_endpfn) continue; /* Check if end_pfn_map should be updated */ @@ -594,7 +594,9 @@ * size before original memory map is * reset. */ + e820_register_active_regions(0, 0, -1UL); saved_max_pfn = e820_end_of_ram(); + remove_all_active_ranges(); #endif end_pfn_map = 0; e820.nr_map = 0; diff -urN linux-2.6.19-rc5/arch/x86_64/kernel/early-quirks.c linux-2.6.19-rc6/arch/x86_64/kernel/early-quirks.c --- linux-2.6.19-rc5/arch/x86_64/kernel/early-quirks.c 2006-11-16 05:11:40.148301151 +0000 +++ linux-2.6.19-rc6/arch/x86_64/kernel/early-quirks.c 2006-11-16 05:11:45.444876376 +0000 @@ -45,7 +45,13 @@ /* * All timer overrides on Nvidia are * wrong unless HPET is enabled. + * Unfortunately that's not true on many Asus boards. + * We don't know yet how to detect this automatically, but + * at least allow a command line override. */ + if (acpi_use_timer_override) + return; + nvidia_hpet_detected = 0; acpi_table_parse(ACPI_HPET, nvidia_hpet_check); if (nvidia_hpet_detected == 0) { @@ -53,6 +59,8 @@ printk(KERN_INFO "Nvidia board " "detected. Ignoring ACPI " "timer override.\n"); + printk(KERN_INFO "If you got timer trouble " + "try acpi_use_timer_override\n"); } #endif /* RED-PEN skip them on mptables too? */ diff -urN linux-2.6.19-rc5/arch/x86_64/kernel/io_apic.c linux-2.6.19-rc6/arch/x86_64/kernel/io_apic.c --- linux-2.6.19-rc5/arch/x86_64/kernel/io_apic.c 2006-11-16 05:11:40.156302020 +0000 +++ linux-2.6.19-rc6/arch/x86_64/kernel/io_apic.c 2006-11-16 05:11:45.448876811 +0000 @@ -88,6 +88,52 @@ short apic, pin, next; } irq_2_pin[PIN_MAP_SIZE]; +struct io_apic { + unsigned int index; + unsigned int unused[3]; + unsigned int data; +}; + +static __attribute_const__ struct io_apic __iomem *io_apic_base(int idx) +{ + return (void __iomem *) __fix_to_virt(FIX_IO_APIC_BASE_0 + idx) + + (mp_ioapics[idx].mpc_apicaddr & ~PAGE_MASK); +} + +static inline unsigned int io_apic_read(unsigned int apic, unsigned int reg) +{ + struct io_apic __iomem *io_apic = io_apic_base(apic); + writel(reg, &io_apic->index); + return readl(&io_apic->data); +} + +static inline void io_apic_write(unsigned int apic, unsigned int reg, unsigned int value) +{ + struct io_apic __iomem *io_apic = io_apic_base(apic); + writel(reg, &io_apic->index); + writel(value, &io_apic->data); +} + +/* + * Re-write a value: to be used for read-modify-write + * cycles where the read already set up the index register. + */ +static inline void io_apic_modify(unsigned int apic, unsigned int value) +{ + struct io_apic __iomem *io_apic = io_apic_base(apic); + writel(value, &io_apic->data); +} + +/* + * Synchronize the IO-APIC and the CPU by doing + * a dummy read from the IO-APIC + */ +static inline void io_apic_sync(unsigned int apic) +{ + struct io_apic __iomem *io_apic = io_apic_base(apic); + readl(&io_apic->data); +} + #define __DO_ACTION(R, ACTION, FINAL) \ \ { \ @@ -126,12 +172,34 @@ return eu.entry; } +/* + * When we write a new IO APIC routing entry, we need to write the high + * word first! If the mask bit in the low word is clear, we will enable + * the interrupt, and we need to make sure the entry is fully populated + * before that happens. + */ static void ioapic_write_entry(int apic, int pin, struct IO_APIC_route_entry e) { unsigned long flags; union entry_union eu; eu.entry = e; spin_lock_irqsave(&ioapic_lock, flags); + io_apic_write(apic, 0x11 + 2*pin, eu.w2); + io_apic_write(apic, 0x10 + 2*pin, eu.w1); + spin_unlock_irqrestore(&ioapic_lock, flags); +} + +/* + * When we mask an IO APIC routing entry, we need to write the low + * word first, in order to set the mask bit before we change the + * high bits! + */ +static void ioapic_mask_entry(int apic, int pin) +{ + unsigned long flags; + union entry_union eu = { .entry.mask = 1 }; + + spin_lock_irqsave(&ioapic_lock, flags); io_apic_write(apic, 0x10 + 2*pin, eu.w1); io_apic_write(apic, 0x11 + 2*pin, eu.w2); spin_unlock_irqrestore(&ioapic_lock, flags); @@ -256,9 +324,7 @@ /* * Disable it in the IO-APIC irq-routing table: */ - memset(&entry, 0, sizeof(entry)); - entry.mask = 1; - ioapic_write_entry(apic, pin, entry); + ioapic_mask_entry(apic, pin); } static void clear_IO_APIC (void) @@ -724,9 +790,11 @@ trigger == IOAPIC_LEVEL) set_irq_chip_and_handler_name(irq, &ioapic_chip, handle_fasteoi_irq, "fasteoi"); - else + else { + irq_desc[irq].status |= IRQ_DELAYED_DISABLE; set_irq_chip_and_handler_name(irq, &ioapic_chip, handle_edge_irq, "edge"); + } } static void __init setup_IO_APIC_irqs(void) @@ -1889,18 +1957,16 @@ static void target_ht_irq(unsigned int irq, unsigned int dest, u8 vector) { - u32 low, high; - low = read_ht_irq_low(irq); - high = read_ht_irq_high(irq); + struct ht_irq_msg msg; + fetch_ht_irq_msg(irq, &msg); - low &= ~(HT_IRQ_LOW_VECTOR_MASK | HT_IRQ_LOW_DEST_ID_MASK); - high &= ~(HT_IRQ_HIGH_DEST_ID_MASK); + msg.address_lo &= ~(HT_IRQ_LOW_VECTOR_MASK | HT_IRQ_LOW_DEST_ID_MASK); + msg.address_hi &= ~(HT_IRQ_HIGH_DEST_ID_MASK); - low |= HT_IRQ_LOW_VECTOR(vector) | HT_IRQ_LOW_DEST_ID(dest); - high |= HT_IRQ_HIGH_DEST_ID(dest); + msg.address_lo |= HT_IRQ_LOW_VECTOR(vector) | HT_IRQ_LOW_DEST_ID(dest); + msg.address_hi |= HT_IRQ_HIGH_DEST_ID(dest); - write_ht_irq_low(irq, low); - write_ht_irq_high(irq, high); + write_ht_irq_msg(irq, &msg); } static void set_ht_irq_affinity(unsigned int irq, cpumask_t mask) @@ -1921,7 +1987,7 @@ dest = cpu_mask_to_apicid(tmp); - target_ht_irq(irq, dest, vector & 0xff); + target_ht_irq(irq, dest, vector); set_native_irq_info(irq, mask); } #endif @@ -1944,14 +2010,15 @@ vector = assign_irq_vector(irq, TARGET_CPUS, &tmp); if (vector >= 0) { - u32 low, high; + struct ht_irq_msg msg; unsigned dest; dest = cpu_mask_to_apicid(tmp); - high = HT_IRQ_HIGH_DEST_ID(dest); + msg.address_hi = HT_IRQ_HIGH_DEST_ID(dest); - low = HT_IRQ_LOW_BASE | + msg.address_lo = + HT_IRQ_LOW_BASE | HT_IRQ_LOW_DEST_ID(dest) | HT_IRQ_LOW_VECTOR(vector) | ((INT_DEST_MODE == 0) ? @@ -1960,10 +2027,10 @@ HT_IRQ_LOW_RQEOI_EDGE | ((INT_DELIVERY_MODE != dest_LowestPrio) ? HT_IRQ_LOW_MT_FIXED : - HT_IRQ_LOW_MT_ARBITRATED); + HT_IRQ_LOW_MT_ARBITRATED) | + HT_IRQ_LOW_IRQ_MASKED; - write_ht_irq_low(irq, low); - write_ht_irq_high(irq, high); + write_ht_irq_msg(irq, &msg); set_irq_chip_and_handler_name(irq, &ht_irq_chip, handle_edge_irq, "edge"); diff -urN linux-2.6.19-rc5/arch/x86_64/kernel/process.c linux-2.6.19-rc6/arch/x86_64/kernel/process.c --- linux-2.6.19-rc5/arch/x86_64/kernel/process.c 2006-11-16 05:11:40.160302455 +0000 +++ linux-2.6.19-rc6/arch/x86_64/kernel/process.c 2006-11-16 05:11:45.456877680 +0000 @@ -88,9 +88,8 @@ static void __exit_idle(void) { - if (read_pda(isidle) == 0) + if (test_and_clear_bit_pda(0, isidle) == 0) return; - write_pda(isidle, 0); atomic_notifier_call_chain(&idle_notifier, IDLE_END, NULL); } diff -urN linux-2.6.19-rc5/arch/x86_64/kernel/smp.c linux-2.6.19-rc6/arch/x86_64/kernel/smp.c --- linux-2.6.19-rc5/arch/x86_64/kernel/smp.c 2006-11-16 05:11:40.164302889 +0000 +++ linux-2.6.19-rc6/arch/x86_64/kernel/smp.c 2006-11-16 05:11:45.456877680 +0000 @@ -376,9 +376,8 @@ /* prevent preemption and reschedule on another processor */ int me = get_cpu(); if (cpu == me) { - WARN_ON(1); put_cpu(); - return -EBUSY; + return 0; } spin_lock_bh(&call_lock); __smp_call_function_single(cpu, func, info, nonatomic, wait); diff -urN linux-2.6.19-rc5/arch/x86_64/kernel/time.c linux-2.6.19-rc6/arch/x86_64/kernel/time.c --- linux-2.6.19-rc5/arch/x86_64/kernel/time.c 2006-11-16 05:11:40.164302889 +0000 +++ linux-2.6.19-rc6/arch/x86_64/kernel/time.c 2006-11-16 05:11:45.460878114 +0000 @@ -876,15 +876,6 @@ timer_interrupt, IRQF_DISABLED, CPU_MASK_NONE, "timer", NULL, NULL }; -static int __cpuinit -time_cpu_notifier(struct notifier_block *nb, unsigned long action, void *hcpu) -{ - unsigned cpu = (unsigned long) hcpu; - if (action == CPU_ONLINE) - vsyscall_set_cpu(cpu); - return NOTIFY_DONE; -} - void __init time_init(void) { if (nohpet) @@ -925,8 +916,6 @@ vxtime.last_tsc = get_cycles_sync(); set_cyc2ns_scale(cpu_khz); setup_irq(0, &irq0); - hotcpu_notifier(time_cpu_notifier, 0); - time_cpu_notifier(NULL, CPU_ONLINE, (void *)(long)smp_processor_id()); #ifndef CONFIG_SMP time_init_gtod(); diff -urN linux-2.6.19-rc5/arch/x86_64/kernel/vsyscall.c linux-2.6.19-rc6/arch/x86_64/kernel/vsyscall.c --- linux-2.6.19-rc5/arch/x86_64/kernel/vsyscall.c 2006-11-16 05:11:40.168303323 +0000 +++ linux-2.6.19-rc6/arch/x86_64/kernel/vsyscall.c 2006-11-16 05:11:45.460878114 +0000 @@ -27,6 +27,9 @@ #include #include #include +#include +#include +#include #include #include @@ -243,32 +246,17 @@ #endif -static void __cpuinit write_rdtscp_cb(void *info) -{ - write_rdtscp_aux((unsigned long)info); -} - -void __cpuinit vsyscall_set_cpu(int cpu) +/* Assume __initcall executes before all user space. Hopefully kmod + doesn't violate that. We'll find out if it does. */ +static void __cpuinit vsyscall_set_cpu(int cpu) { unsigned long *d; unsigned long node = 0; #ifdef CONFIG_NUMA node = cpu_to_node[cpu]; #endif - if (cpu_has(&cpu_data[cpu], X86_FEATURE_RDTSCP)) { - void *info = (void *)((node << 12) | cpu); - /* Can happen on preemptive kernel */ - if (get_cpu() == cpu) - write_rdtscp_cb(info); -#ifdef CONFIG_SMP - else { - /* the notifier is unfortunately not executed on the - target CPU */ - smp_call_function_single(cpu,write_rdtscp_cb,info,0,1); - } -#endif - put_cpu(); - } + if (cpu_has(&cpu_data[cpu], X86_FEATURE_RDTSCP)) + write_rdtscp_aux((node << 12) | cpu); /* Store cpu number in limit so that it can be loaded quickly in user space in vgetcpu. @@ -280,6 +268,21 @@ *d |= (node >> 4) << 48; } +static void __cpuinit cpu_vsyscall_init(void *arg) +{ + /* preemption should be already off */ + vsyscall_set_cpu(raw_smp_processor_id()); +} + +static int __cpuinit +cpu_vsyscall_notifier(struct notifier_block *n, unsigned long action, void *arg) +{ + long cpu = (long)arg; + if (action == CPU_ONLINE) + smp_call_function_single(cpu, cpu_vsyscall_init, NULL, 0, 1); + return NOTIFY_DONE; +} + static void __init map_vsyscall(void) { extern char __vsyscall_0; @@ -299,6 +302,8 @@ #ifdef CONFIG_SYSCTL register_sysctl_table(kernel_root_table2, 0); #endif + on_each_cpu(cpu_vsyscall_init, NULL, 0, 1); + hotcpu_notifier(cpu_vsyscall_notifier, 0); return 0; } diff -urN linux-2.6.19-rc5/arch/x86_64/mm/init.c linux-2.6.19-rc6/arch/x86_64/mm/init.c --- linux-2.6.19-rc5/arch/x86_64/mm/init.c 2006-11-16 05:11:40.172303758 +0000 +++ linux-2.6.19-rc6/arch/x86_64/mm/init.c 2006-11-16 05:11:45.464878548 +0000 @@ -655,9 +655,22 @@ void __init reserve_bootmem_generic(unsigned long phys, unsigned len) { - /* Should check here against the e820 map to avoid double free */ #ifdef CONFIG_NUMA int nid = phys_to_nid(phys); +#endif + unsigned long pfn = phys >> PAGE_SHIFT; + if (pfn >= end_pfn) { + /* This can happen with kdump kernels when accessing firmware + tables. */ + if (pfn < end_pfn_map) + return; + printk(KERN_ERR "reserve_bootmem: illegal reserve %lx %u\n", + phys, len); + return; + } + + /* Should check here against the e820 map to avoid double free */ +#ifdef CONFIG_NUMA reserve_bootmem_node(NODE_DATA(nid), phys, len); #else reserve_bootmem(phys, len); diff -urN linux-2.6.19-rc5/arch/x86_64/pci/mmconfig.c linux-2.6.19-rc6/arch/x86_64/pci/mmconfig.c --- linux-2.6.19-rc5/arch/x86_64/pci/mmconfig.c 2006-11-16 05:11:40.176304192 +0000 +++ linux-2.6.19-rc6/arch/x86_64/pci/mmconfig.c 2006-11-16 05:11:45.464878548 +0000 @@ -163,37 +163,6 @@ } } -static __init void pci_mmcfg_insert_resources(void) -{ -#define PCI_MMCFG_RESOURCE_NAME_LEN 19 - int i; - struct resource *res; - char *names; - unsigned num_buses; - - res = kcalloc(PCI_MMCFG_RESOURCE_NAME_LEN + sizeof(*res), - pci_mmcfg_config_num, GFP_KERNEL); - - if (!res) { - printk(KERN_ERR "PCI: Unable to allocate MMCONFIG resources\n"); - return; - } - - names = (void *)&res[pci_mmcfg_config_num]; - for (i = 0; i < pci_mmcfg_config_num; i++, res++) { - num_buses = pci_mmcfg_config[i].end_bus_number - - pci_mmcfg_config[i].start_bus_number + 1; - res->name = names; - snprintf(names, PCI_MMCFG_RESOURCE_NAME_LEN, "PCI MMCONFIG %u", - pci_mmcfg_config[i].pci_segment_group_number); - res->start = pci_mmcfg_config[i].base_address; - res->end = res->start + (num_buses << 20) - 1; - res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; - insert_resource(&iomem_resource, res); - names += PCI_MMCFG_RESOURCE_NAME_LEN; - } -} - void __init pci_mmcfg_init(int type) { int i; @@ -237,7 +206,6 @@ } unreachable_devices(); - pci_mmcfg_insert_resources(); raw_pci_ops = &pci_mmcfg; pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF; diff -urN linux-2.6.19-rc5/block/scsi_ioctl.c linux-2.6.19-rc6/block/scsi_ioctl.c --- linux-2.6.19-rc5/block/scsi_ioctl.c 2006-11-16 05:11:40.188305496 +0000 +++ linux-2.6.19-rc6/block/scsi_ioctl.c 2006-11-16 05:11:45.480880286 +0000 @@ -246,10 +246,10 @@ switch (hdr->dxfer_direction) { default: return -EINVAL; - case SG_DXFER_TO_FROM_DEV: case SG_DXFER_TO_DEV: writing = 1; break; + case SG_DXFER_TO_FROM_DEV: case SG_DXFER_FROM_DEV: break; } diff -urN linux-2.6.19-rc5/drivers/ata/libata-core.c linux-2.6.19-rc6/drivers/ata/libata-core.c --- linux-2.6.19-rc5/drivers/ata/libata-core.c 2006-11-16 05:11:40.228309840 +0000 +++ linux-2.6.19-rc6/drivers/ata/libata-core.c 2006-11-16 05:11:45.508883328 +0000 @@ -5957,7 +5957,7 @@ destroy_workqueue(ata_aux_wq); } -module_init(ata_init); +subsys_initcall(ata_init); module_exit(ata_exit); static unsigned long ratelimit_time; diff -urN linux-2.6.19-rc5/drivers/ata/libata-scsi.c linux-2.6.19-rc6/drivers/ata/libata-scsi.c --- linux-2.6.19-rc5/drivers/ata/libata-scsi.c 2006-11-16 05:11:40.232310275 +0000 +++ linux-2.6.19-rc6/drivers/ata/libata-scsi.c 2006-11-16 05:11:45.516884196 +0000 @@ -1612,9 +1612,9 @@ err_did: ata_qc_free(qc); -err_mem: cmd->result = (DID_ERROR << 16); done(cmd); +err_mem: DPRINTK("EXIT - internal\n"); return 0; diff -urN linux-2.6.19-rc5/drivers/ata/pata_artop.c linux-2.6.19-rc6/drivers/ata/pata_artop.c --- linux-2.6.19-rc5/drivers/ata/pata_artop.c 2006-11-16 05:11:40.236310709 +0000 +++ linux-2.6.19-rc6/drivers/ata/pata_artop.c 2006-11-16 05:11:45.516884196 +0000 @@ -92,7 +92,7 @@ return -ENOENT; pci_read_config_byte(pdev, 0x49, &tmp); - if (tmp & (1 >> ap->port_no)) + if (tmp & (1 << ap->port_no)) ap->cbl = ATA_CBL_PATA40; else ap->cbl = ATA_CBL_PATA80; diff -urN linux-2.6.19-rc5/drivers/ata/pata_hpt37x.c linux-2.6.19-rc6/drivers/ata/pata_hpt37x.c --- linux-2.6.19-rc5/drivers/ata/pata_hpt37x.c 2006-11-16 05:11:40.240311144 +0000 +++ linux-2.6.19-rc6/drivers/ata/pata_hpt37x.c 2006-11-16 05:11:45.520884631 +0000 @@ -25,7 +25,7 @@ #include #define DRV_NAME "pata_hpt37x" -#define DRV_VERSION "0.5" +#define DRV_VERSION "0.5.1" struct hpt_clock { u8 xfer_speed; @@ -453,7 +453,13 @@ { u8 scr2, ata66; struct pci_dev *pdev = to_pci_dev(ap->host->dev); - + static const struct pci_bits hpt37x_enable_bits[] = { + { 0x50, 1, 0x04, 0x04 }, + { 0x54, 1, 0x04, 0x04 } + }; + if (!pci_test_config_bits(pdev, &hpt37x_enable_bits[ap->port_no])) + return -ENOENT; + pci_read_config_byte(pdev, 0x5B, &scr2); pci_write_config_byte(pdev, 0x5B, scr2 & ~0x01); /* Cable register now active */ @@ -488,10 +494,17 @@ static int hpt374_pre_reset(struct ata_port *ap) { + static const struct pci_bits hpt37x_enable_bits[] = { + { 0x50, 1, 0x04, 0x04 }, + { 0x54, 1, 0x04, 0x04 } + }; u16 mcr3, mcr6; u8 ata66; - struct pci_dev *pdev = to_pci_dev(ap->host->dev); + + if (!pci_test_config_bits(pdev, &hpt37x_enable_bits[ap->port_no])) + return -ENOENT; + /* Do the extra channel work */ pci_read_config_word(pdev, 0x52, &mcr3); pci_read_config_word(pdev, 0x56, &mcr6); diff -urN linux-2.6.19-rc5/drivers/ata/sata_via.c linux-2.6.19-rc6/drivers/ata/sata_via.c --- linux-2.6.19-rc5/drivers/ata/sata_via.c 2006-11-16 05:11:40.260313316 +0000 +++ linux-2.6.19-rc6/drivers/ata/sata_via.c 2006-11-16 05:11:45.544887238 +0000 @@ -230,7 +230,7 @@ int online; /* don't do any SCR stuff if we're not loading */ - if (!ATA_PFLAG_LOADING) + if (!(ap->pflags & ATA_PFLAG_LOADING)) goto skip_scr; /* Resume phy. This is the old resume sequence from diff -urN linux-2.6.19-rc5/drivers/block/cciss.c linux-2.6.19-rc6/drivers/block/cciss.c --- linux-2.6.19-rc5/drivers/block/cciss.c 2006-11-16 05:11:40.288316357 +0000 +++ linux-2.6.19-rc6/drivers/block/cciss.c 2006-11-16 05:11:45.568889844 +0000 @@ -1300,6 +1300,12 @@ complete_buffers(rq->bio, rq->errors); + if (blk_fs_request(rq)) { + const int rw = rq_data_dir(rq); + + disk_stat_add(rq->rq_disk, sectors[rw], rq->nr_sectors); + } + #ifdef CCISS_DEBUG printk("Done with %p\n", rq); #endif /* CCISS_DEBUG */ diff -urN linux-2.6.19-rc5/drivers/block/cpqarray.c linux-2.6.19-rc6/drivers/block/cpqarray.c --- linux-2.6.19-rc5/drivers/block/cpqarray.c 2006-11-16 05:11:40.292316792 +0000 +++ linux-2.6.19-rc6/drivers/block/cpqarray.c 2006-11-16 05:11:45.572890279 +0000 @@ -998,6 +998,7 @@ */ static inline void complete_command(cmdlist_t *cmd, int timeout) { + struct request *rq = cmd->rq; int ok=1; int i, ddir; @@ -1029,12 +1030,18 @@ pci_unmap_page(hba[cmd->ctlr]->pci_dev, cmd->req.sg[i].addr, cmd->req.sg[i].size, ddir); - complete_buffers(cmd->rq->bio, ok); + complete_buffers(rq->bio, ok); - add_disk_randomness(cmd->rq->rq_disk); + if (blk_fs_request(rq)) { + const int rw = rq_data_dir(rq); - DBGPX(printk("Done with %p\n", cmd->rq);); - end_that_request_last(cmd->rq, ok ? 1 : -EIO); + disk_stat_add(rq->rq_disk, sectors[rw], rq->nr_sectors); + } + + add_disk_randomness(rq->rq_disk); + + DBGPX(printk("Done with %p\n", rq);); + end_that_request_last(rq, ok ? 1 : -EIO); } /* diff -urN linux-2.6.19-rc5/drivers/char/Kconfig linux-2.6.19-rc6/drivers/char/Kconfig --- linux-2.6.19-rc5/drivers/char/Kconfig 2006-11-16 05:11:40.308318530 +0000 +++ linux-2.6.19-rc6/drivers/char/Kconfig 2006-11-16 05:11:45.588892017 +0000 @@ -409,14 +409,6 @@ If you have an SGI Altix with an attached SABrick say Y or M here, otherwise say N. -config MSPEC - tristate "Memory special operations driver" - depends on IA64 - help - If you have an ia64 and you want to enable memory special - operations support (formerly known as fetchop), say Y here, - otherwise say N. - source "drivers/serial/Kconfig" config UNIX98_PTYS diff -urN linux-2.6.19-rc5/drivers/char/ipmi/ipmi_msghandler.c linux-2.6.19-rc6/drivers/char/ipmi/ipmi_msghandler.c --- linux-2.6.19-rc5/drivers/char/ipmi/ipmi_msghandler.c 2006-11-16 05:11:40.348322874 +0000 +++ linux-2.6.19-rc6/drivers/char/ipmi/ipmi_msghandler.c 2006-11-16 05:11:45.628896361 +0000 @@ -376,13 +376,23 @@ } } +static void free_smi_msg_list(struct list_head *q) +{ + struct ipmi_smi_msg *msg, *msg2; + + list_for_each_entry_safe(msg, msg2, q, link) { + list_del(&msg->link); + ipmi_free_smi_msg(msg); + } +} + static void clean_up_interface_data(ipmi_smi_t intf) { int i; struct cmd_rcvr *rcvr, *rcvr2; struct list_head list; - free_recv_msg_list(&intf->waiting_msgs); + free_smi_msg_list(&intf->waiting_msgs); free_recv_msg_list(&intf->waiting_events); /* Wholesale remove all the entries from the list in the @@ -1844,7 +1854,7 @@ struct bmc_device *bmc = dev_get_drvdata(dev); return snprintf(buf, 10, "%u\n", - bmc->id.device_revision && 0x80 >> 7); + (bmc->id.device_revision & 0x80) >> 7); } static ssize_t revision_show(struct device *dev, struct device_attribute *attr, @@ -1853,7 +1863,7 @@ struct bmc_device *bmc = dev_get_drvdata(dev); return snprintf(buf, 20, "%u\n", - bmc->id.device_revision && 0x0F); + bmc->id.device_revision & 0x0F); } static ssize_t firmware_rev_show(struct device *dev, @@ -3232,7 +3242,9 @@ report the error immediately. */ if ((msg->rsp_size >= 3) && (msg->rsp[2] != 0) && (msg->rsp[2] != IPMI_NODE_BUSY_ERR) - && (msg->rsp[2] != IPMI_LOST_ARBITRATION_ERR)) + && (msg->rsp[2] != IPMI_LOST_ARBITRATION_ERR) + && (msg->rsp[2] != IPMI_BUS_ERR) + && (msg->rsp[2] != IPMI_NAK_ON_WRITE_ERR)) { int chan = msg->rsp[3] & 0xf; diff -urN linux-2.6.19-rc5/drivers/char/ipmi/ipmi_si_intf.c linux-2.6.19-rc6/drivers/char/ipmi/ipmi_si_intf.c --- linux-2.6.19-rc5/drivers/char/ipmi/ipmi_si_intf.c 2006-11-16 05:11:40.352323309 +0000 +++ linux-2.6.19-rc6/drivers/char/ipmi/ipmi_si_intf.c 2006-11-16 05:11:45.628896361 +0000 @@ -1211,7 +1211,7 @@ static unsigned char intf_mem_inw(struct si_sm_io *io, unsigned int offset) { return (readw((io->addr)+(offset * io->regspacing)) >> io->regshift) - && 0xff; + & 0xff; } static void intf_mem_outw(struct si_sm_io *io, unsigned int offset, @@ -1223,7 +1223,7 @@ static unsigned char intf_mem_inl(struct si_sm_io *io, unsigned int offset) { return (readl((io->addr)+(offset * io->regspacing)) >> io->regshift) - && 0xff; + & 0xff; } static void intf_mem_outl(struct si_sm_io *io, unsigned int offset, @@ -1236,7 +1236,7 @@ static unsigned char mem_inq(struct si_sm_io *io, unsigned int offset) { return (readq((io->addr)+(offset * io->regspacing)) >> io->regshift) - && 0xff; + & 0xff; } static void mem_outq(struct si_sm_io *io, unsigned int offset, diff -urN linux-2.6.19-rc5/drivers/char/isicom.c linux-2.6.19-rc6/drivers/char/isicom.c --- linux-2.6.19-rc5/drivers/char/isicom.c 2006-11-16 05:11:40.352323309 +0000 +++ linux-2.6.19-rc6/drivers/char/isicom.c 2006-11-16 05:11:45.628896361 +0000 @@ -1062,11 +1062,12 @@ static void isicom_close(struct tty_struct *tty, struct file *filp) { struct isi_port *port = tty->driver_data; - struct isi_board *card = port->card; + struct isi_board *card; unsigned long flags; if (!port) return; + card = port->card; if (isicom_paranoia_check(port, tty->name, "isicom_close")) return; diff -urN linux-2.6.19-rc5/drivers/char/mspec.c linux-2.6.19-rc6/drivers/char/mspec.c --- linux-2.6.19-rc5/drivers/char/mspec.c 2006-11-16 05:11:40.360324178 +0000 +++ linux-2.6.19-rc6/drivers/char/mspec.c 2006-11-16 05:11:45.636897230 +0000 @@ -72,7 +72,11 @@ MSPEC_UNCACHED }; +#ifdef CONFIG_SGI_SN static int is_sn2; +#else +#define is_sn2 0 +#endif /* * One of these structures is allocated when an mspec region is mmaped. The @@ -211,7 +215,7 @@ if (vdata->type == MSPEC_FETCHOP) paddr = TO_AMO(maddr); else - paddr = __pa(TO_CAC(maddr)); + paddr = maddr & ~__IA64_UNCACHED_OFFSET; pfn = paddr >> PAGE_SHIFT; @@ -335,6 +339,7 @@ * The fetchop device only works on SN2 hardware, uncached and cached * memory drivers should both be valid on all ia64 hardware */ +#ifdef CONFIG_SGI_SN if (ia64_platform_is("sn2")) { is_sn2 = 1; if (is_shub2()) { @@ -363,6 +368,7 @@ goto free_scratch_pages; } } +#endif ret = misc_register(&cached_miscdev); if (ret) { printk(KERN_ERR "%s: failed to register device %i\n", diff -urN linux-2.6.19-rc5/drivers/ide/ide-cd.c linux-2.6.19-rc6/drivers/ide/ide-cd.c --- linux-2.6.19-rc5/drivers/ide/ide-cd.c 2006-11-16 05:11:40.460335039 +0000 +++ linux-2.6.19-rc6/drivers/ide/ide-cd.c 2006-11-16 05:11:45.732907657 +0000 @@ -724,7 +724,7 @@ * if we have an error, pass back CHECK_CONDITION as the * scsi status byte */ - if (!rq->errors) + if (blk_pc_request(rq) && !rq->errors) rq->errors = SAM_STAT_CHECK_CONDITION; /* Check for tray open. */ diff -urN linux-2.6.19-rc5/drivers/ide/legacy/hd.c linux-2.6.19-rc6/drivers/ide/legacy/hd.c --- linux-2.6.19-rc5/drivers/ide/legacy/hd.c 2006-11-16 05:11:40.468335908 +0000 +++ linux-2.6.19-rc6/drivers/ide/legacy/hd.c 2006-11-16 05:11:45.740908526 +0000 @@ -459,7 +459,7 @@ #ifdef DEBUG printk("%s: read: sector %ld, remaining = %ld, buffer=%p\n", req->rq_disk->disk_name, req->sector, req->nr_sectors, - req->buffer+512)); + req->buffer+512); #endif if (req->current_nr_sectors <= 0) end_request(req, 1); diff -urN linux-2.6.19-rc5/drivers/infiniband/core/mad.c linux-2.6.19-rc6/drivers/infiniband/core/mad.c --- linux-2.6.19-rc5/drivers/infiniband/core/mad.c 2006-11-16 05:11:40.496338949 +0000 +++ linux-2.6.19-rc6/drivers/infiniband/core/mad.c 2006-11-16 05:11:45.772912002 +0000 @@ -1750,7 +1750,7 @@ */ (is_direct(wc->recv_buf.mad->mad_hdr.mgmt_class) || rcv_has_same_gid(mad_agent_priv, wr, wc))) - return wr; + return (wr->status == IB_WC_SUCCESS) ? wr : NULL; } /* diff -urN linux-2.6.19-rc5/drivers/infiniband/hw/amso1100/c2.c linux-2.6.19-rc6/drivers/infiniband/hw/amso1100/c2.c --- linux-2.6.19-rc5/drivers/infiniband/hw/amso1100/c2.c 2006-11-16 05:11:40.504339818 +0000 +++ linux-2.6.19-rc6/drivers/infiniband/hw/amso1100/c2.c 2006-11-16 05:11:45.776912436 +0000 @@ -1155,7 +1155,8 @@ goto bail10; } - c2_register_device(c2dev); + if (c2_register_device(c2dev)) + goto bail10; return 0; diff -urN linux-2.6.19-rc5/drivers/infiniband/hw/amso1100/c2_provider.c linux-2.6.19-rc6/drivers/infiniband/hw/amso1100/c2_provider.c --- linux-2.6.19-rc5/drivers/infiniband/hw/amso1100/c2_provider.c 2006-11-16 05:11:40.508340253 +0000 +++ linux-2.6.19-rc6/drivers/infiniband/hw/amso1100/c2_provider.c 2006-11-16 05:11:45.780912871 +0000 @@ -757,20 +757,17 @@ int c2_register_device(struct c2_dev *dev) { - int ret; + int ret = -ENOMEM; int i; /* Register pseudo network device */ dev->pseudo_netdev = c2_pseudo_netdev_init(dev); - if (dev->pseudo_netdev) { - ret = register_netdev(dev->pseudo_netdev); - if (ret) { - printk(KERN_ERR PFX - "Unable to register netdev, ret = %d\n", ret); - free_netdev(dev->pseudo_netdev); - return ret; - } - } + if (!dev->pseudo_netdev) + goto out3; + + ret = register_netdev(dev->pseudo_netdev); + if (ret) + goto out2; pr_debug("%s:%u\n", __FUNCTION__, __LINE__); strlcpy(dev->ibdev.name, "amso%d", IB_DEVICE_NAME_MAX); @@ -848,21 +845,25 @@ ret = ib_register_device(&dev->ibdev); if (ret) - return ret; + goto out1; for (i = 0; i < ARRAY_SIZE(c2_class_attributes); ++i) { ret = class_device_create_file(&dev->ibdev.class_dev, c2_class_attributes[i]); - if (ret) { - unregister_netdev(dev->pseudo_netdev); - free_netdev(dev->pseudo_netdev); - ib_unregister_device(&dev->ibdev); - return ret; - } + if (ret) + goto out0; } + goto out3; - pr_debug("%s:%u\n", __FUNCTION__, __LINE__); - return 0; +out0: + ib_unregister_device(&dev->ibdev); +out1: + unregister_netdev(dev->pseudo_netdev); +out2: + free_netdev(dev->pseudo_netdev); +out3: + pr_debug("%s:%u ret=%d\n", __FUNCTION__, __LINE__, ret); + return ret; } void c2_unregister_device(struct c2_dev *dev) diff -urN linux-2.6.19-rc5/drivers/infiniband/hw/amso1100/c2_rnic.c linux-2.6.19-rc6/drivers/infiniband/hw/amso1100/c2_rnic.c --- linux-2.6.19-rc5/drivers/infiniband/hw/amso1100/c2_rnic.c 2006-11-16 05:11:40.508340253 +0000 +++ linux-2.6.19-rc6/drivers/infiniband/hw/amso1100/c2_rnic.c 2006-11-16 05:11:45.780912871 +0000 @@ -157,8 +157,8 @@ props->fw_ver = ((u64)be32_to_cpu(reply->fw_ver_major) << 32) | - ((be32_to_cpu(reply->fw_ver_minor) && 0xFFFF) << 16) | - (be32_to_cpu(reply->fw_ver_patch) && 0xFFFF); + ((be32_to_cpu(reply->fw_ver_minor) & 0xFFFF) << 16) | + (be32_to_cpu(reply->fw_ver_patch) & 0xFFFF); memcpy(&props->sys_image_guid, c2dev->netdev->dev_addr, 6); props->max_mr_size = 0xFFFFFFFF; props->page_size_cap = ~(C2_MIN_PAGESIZE-1); diff -urN linux-2.6.19-rc5/drivers/infiniband/hw/ehca/Kconfig linux-2.6.19-rc6/drivers/infiniband/hw/ehca/Kconfig --- linux-2.6.19-rc5/drivers/infiniband/hw/ehca/Kconfig 2006-11-16 05:11:40.512340687 +0000 +++ linux-2.6.19-rc6/drivers/infiniband/hw/ehca/Kconfig 2006-11-16 05:11:45.784913305 +0000 @@ -10,6 +10,7 @@ config INFINIBAND_EHCA_SCALING bool "Scaling support (EXPERIMENTAL)" depends on IBMEBUS && INFINIBAND_EHCA && HOTPLUG_CPU && EXPERIMENTAL + default y ---help--- eHCA scaling support schedules the CQ callbacks to different CPUs. diff -urN linux-2.6.19-rc5/drivers/infiniband/hw/ehca/ehca_av.c linux-2.6.19-rc6/drivers/infiniband/hw/ehca/ehca_av.c --- linux-2.6.19-rc5/drivers/infiniband/hw/ehca/ehca_av.c 2006-11-16 05:11:40.512340687 +0000 +++ linux-2.6.19-rc6/drivers/infiniband/hw/ehca/ehca_av.c 2006-11-16 05:11:45.784913305 +0000 @@ -118,8 +118,7 @@ } memcpy(&av->av.grh.word_1, &gid, sizeof(gid)); } - /* for the time being we use a hard coded PMTU of 2048 Bytes */ - av->av.pmtu = 4; + av->av.pmtu = EHCA_MAX_MTU; /* dgid comes in grh.word_3 */ memcpy(&av->av.grh.word_3, &ah_attr->grh.dgid, @@ -193,7 +192,7 @@ memcpy(&new_ehca_av.grh.word_1, &gid, sizeof(gid)); } - new_ehca_av.pmtu = 4; /* see also comment in create_ah() */ + new_ehca_av.pmtu = EHCA_MAX_MTU; memcpy(&new_ehca_av.grh.word_3, &ah_attr->grh.dgid, sizeof(ah_attr->grh.dgid)); diff -urN linux-2.6.19-rc5/drivers/infiniband/hw/ehca/ehca_hca.c linux-2.6.19-rc6/drivers/infiniband/hw/ehca/ehca_hca.c --- linux-2.6.19-rc5/drivers/infiniband/hw/ehca/ehca_hca.c 2006-11-16 05:11:40.512340687 +0000 +++ linux-2.6.19-rc6/drivers/infiniband/hw/ehca/ehca_hca.c 2006-11-16 05:11:45.788913740 +0000 @@ -40,6 +40,7 @@ */ #include "ehca_tools.h" +#include "ehca_iverbs.h" #include "hcp_if.h" int ehca_query_device(struct ib_device *ibdev, struct ib_device_attr *props) @@ -49,7 +50,7 @@ ib_device); struct hipz_query_hca *rblock; - rblock = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); + rblock = ehca_alloc_fw_ctrlblock(); if (!rblock) { ehca_err(&shca->ib_device, "Can't allocate rblock memory."); return -ENOMEM; @@ -96,7 +97,7 @@ = min_t(int, rblock->max_total_mcast_qp_attach, INT_MAX); query_device1: - kfree(rblock); + ehca_free_fw_ctrlblock(rblock); return ret; } @@ -109,7 +110,7 @@ ib_device); struct hipz_query_port *rblock; - rblock = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); + rblock = ehca_alloc_fw_ctrlblock(); if (!rblock) { ehca_err(&shca->ib_device, "Can't allocate rblock memory."); return -ENOMEM; @@ -162,7 +163,7 @@ props->active_speed = 0x1; query_port1: - kfree(rblock); + ehca_free_fw_ctrlblock(rblock); return ret; } @@ -178,7 +179,7 @@ return -EINVAL; } - rblock = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); + rblock = ehca_alloc_fw_ctrlblock(); if (!rblock) { ehca_err(&shca->ib_device, "Can't allocate rblock memory."); return -ENOMEM; @@ -193,7 +194,7 @@ memcpy(pkey, &rblock->pkey_entries + index, sizeof(u16)); query_pkey1: - kfree(rblock); + ehca_free_fw_ctrlblock(rblock); return ret; } @@ -211,7 +212,7 @@ return -EINVAL; } - rblock = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); + rblock = ehca_alloc_fw_ctrlblock(); if (!rblock) { ehca_err(&shca->ib_device, "Can't allocate rblock memory."); return -ENOMEM; @@ -227,7 +228,7 @@ memcpy(&gid->raw[8], &rblock->guid_entries[index], sizeof(u64)); query_gid1: - kfree(rblock); + ehca_free_fw_ctrlblock(rblock); return ret; } diff -urN linux-2.6.19-rc5/drivers/infiniband/hw/ehca/ehca_irq.c linux-2.6.19-rc6/drivers/infiniband/hw/ehca/ehca_irq.c --- linux-2.6.19-rc5/drivers/infiniband/hw/ehca/ehca_irq.c 2006-11-16 05:11:40.516341122 +0000 +++ linux-2.6.19-rc6/drivers/infiniband/hw/ehca/ehca_irq.c 2006-11-16 05:11:45.788913740 +0000 @@ -45,6 +45,7 @@ #include "ehca_tools.h" #include "hcp_if.h" #include "hipz_fns.h" +#include "ipz_pt_fn.h" #define EQE_COMPLETION_EVENT EHCA_BMASK_IBM(1,1) #define EQE_CQ_QP_NUMBER EHCA_BMASK_IBM(8,31) @@ -137,38 +138,36 @@ u64 *rblock; unsigned long block_count; - rblock = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); + rblock = ehca_alloc_fw_ctrlblock(); if (!rblock) { ehca_err(&shca->ib_device, "Cannot allocate rblock memory."); ret = -ENOMEM; goto error_data1; } + /* rblock must be 4K aligned and should be 4K large */ ret = hipz_h_error_data(shca->ipz_hca_handle, resource, rblock, &block_count); - if (ret == H_R_STATE) { + if (ret == H_R_STATE) ehca_err(&shca->ib_device, "No error data is available: %lx.", resource); - } else if (ret == H_SUCCESS) { int length; length = EHCA_BMASK_GET(ERROR_DATA_LENGTH, rblock[0]); - if (length > PAGE_SIZE) - length = PAGE_SIZE; + if (length > EHCA_PAGESIZE) + length = EHCA_PAGESIZE; print_error_data(shca, data, rblock, length); - } - else { + } else ehca_err(&shca->ib_device, "Error data could not be fetched: %lx", resource); - } - kfree(rblock); + ehca_free_fw_ctrlblock(rblock); error_data1: return ret; diff -urN linux-2.6.19-rc5/drivers/infiniband/hw/ehca/ehca_iverbs.h linux-2.6.19-rc6/drivers/infiniband/hw/ehca/ehca_iverbs.h --- linux-2.6.19-rc5/drivers/infiniband/hw/ehca/ehca_iverbs.h 2006-11-16 05:11:40.516341122 +0000 +++ linux-2.6.19-rc6/drivers/infiniband/hw/ehca/ehca_iverbs.h 2006-11-16 05:11:45.788913740 +0000 @@ -179,4 +179,12 @@ int ehca_munmap(unsigned long addr, size_t len); +#ifdef CONFIG_PPC_64K_PAGES +void *ehca_alloc_fw_ctrlblock(void); +void ehca_free_fw_ctrlblock(void *ptr); +#else +#define ehca_alloc_fw_ctrlblock() ((void *) get_zeroed_page(GFP_KERNEL)) +#define ehca_free_fw_ctrlblock(ptr) free_page((unsigned long)(ptr)) +#endif + #endif diff -urN linux-2.6.19-rc5/drivers/infiniband/hw/ehca/ehca_main.c linux-2.6.19-rc6/drivers/infiniband/hw/ehca/ehca_main.c --- linux-2.6.19-rc5/drivers/infiniband/hw/ehca/ehca_main.c 2006-11-16 05:11:40.516341122 +0000 +++ linux-2.6.19-rc6/drivers/infiniband/hw/ehca/ehca_main.c 2006-11-16 05:11:45.788913740 +0000 @@ -40,6 +40,9 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#ifdef CONFIG_PPC_64K_PAGES +#include +#endif #include "ehca_classes.h" #include "ehca_iverbs.h" #include "ehca_mrmw.h" @@ -49,7 +52,7 @@ MODULE_LICENSE("Dual BSD/GPL"); MODULE_AUTHOR("Christoph Raisch "); MODULE_DESCRIPTION("IBM eServer HCA InfiniBand Device Driver"); -MODULE_VERSION("SVNEHCA_0017"); +MODULE_VERSION("SVNEHCA_0018"); int ehca_open_aqp1 = 0; int ehca_debug_level = 0; @@ -94,11 +97,31 @@ DEFINE_IDR(ehca_qp_idr); DEFINE_IDR(ehca_cq_idr); + static struct list_head shca_list; /* list of all registered ehcas */ static spinlock_t shca_list_lock; static struct timer_list poll_eqs_timer; +#ifdef CONFIG_PPC_64K_PAGES +static struct kmem_cache *ctblk_cache = NULL; + +void *ehca_alloc_fw_ctrlblock(void) +{ + void *ret = kmem_cache_zalloc(ctblk_cache, SLAB_KERNEL); + if (!ret) + ehca_gen_err("Out of memory for ctblk"); + return ret; +} + +void ehca_free_fw_ctrlblock(void *ptr) +{ + if (ptr) + kmem_cache_free(ctblk_cache, ptr); + +} +#endif + static int ehca_create_slab_caches(void) { int ret; @@ -133,6 +156,17 @@ goto create_slab_caches5; } +#ifdef CONFIG_PPC_64K_PAGES + ctblk_cache = kmem_cache_create("ehca_cache_ctblk", + EHCA_PAGESIZE, H_CB_ALIGNMENT, + SLAB_HWCACHE_ALIGN, + NULL, NULL); + if (!ctblk_cache) { + ehca_gen_err("Cannot create ctblk SLAB cache."); + ehca_cleanup_mrmw_cache(); + goto create_slab_caches5; + } +#endif return 0; create_slab_caches5: @@ -157,6 +191,10 @@ ehca_cleanup_qp_cache(); ehca_cleanup_cq_cache(); ehca_cleanup_pd_cache(); +#ifdef CONFIG_PPC_64K_PAGES + if (ctblk_cache) + kmem_cache_destroy(ctblk_cache); +#endif } #define EHCA_HCAAVER EHCA_BMASK_IBM(32,39) @@ -168,7 +206,7 @@ u64 h_ret; struct hipz_query_hca *rblock; - rblock = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); + rblock = ehca_alloc_fw_ctrlblock(); if (!rblock) { ehca_gen_err("Cannot allocate rblock memory."); return -ENOMEM; @@ -211,7 +249,7 @@ shca->sport[1].rate = IB_RATE_30_GBPS; num_ports1: - kfree(rblock); + ehca_free_fw_ctrlblock(rblock); return ret; } @@ -220,7 +258,7 @@ int ret = 0; struct hipz_query_hca *rblock; - rblock = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); + rblock = ehca_alloc_fw_ctrlblock(); if (!rblock) { ehca_err(&shca->ib_device, "Can't allocate rblock memory."); return -ENOMEM; @@ -235,7 +273,7 @@ memcpy(&shca->ib_device.node_guid, &rblock->node_guid, sizeof(u64)); init_node_guid1: - kfree(rblock); + ehca_free_fw_ctrlblock(rblock); return ret; } @@ -431,7 +469,7 @@ \ shca = dev->driver_data; \ \ - rblock = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); \ + rblock = ehca_alloc_fw_ctrlblock(); \ if (!rblock) { \ dev_err(dev, "Can't allocate rblock memory."); \ return 0; \ @@ -439,12 +477,12 @@ \ if (hipz_h_query_hca(shca->ipz_hca_handle, rblock) != H_SUCCESS) { \ dev_err(dev, "Can't query device properties"); \ - kfree(rblock); \ + ehca_free_fw_ctrlblock(rblock); \ return 0; \ } \ \ data = rblock->name; \ - kfree(rblock); \ + ehca_free_fw_ctrlblock(rblock); \ \ if ((strcmp(#name, "num_ports") == 0) && (ehca_nr_ports == 1)) \ return snprintf(buf, 256, "1\n"); \ @@ -752,7 +790,7 @@ int ret; printk(KERN_INFO "eHCA Infiniband Device Driver " - "(Rel.: SVNEHCA_0017)\n"); + "(Rel.: SVNEHCA_0018)\n"); idr_init(&ehca_qp_idr); idr_init(&ehca_cq_idr); spin_lock_init(&ehca_qp_idr_lock); diff -urN linux-2.6.19-rc5/drivers/infiniband/hw/ehca/ehca_mrmw.c linux-2.6.19-rc6/drivers/infiniband/hw/ehca/ehca_mrmw.c --- linux-2.6.19-rc5/drivers/infiniband/hw/ehca/ehca_mrmw.c 2006-11-16 05:11:40.520341556 +0000 +++ linux-2.6.19-rc6/drivers/infiniband/hw/ehca/ehca_mrmw.c 2006-11-16 05:11:45.792914174 +0000 @@ -1013,7 +1013,7 @@ u32 i; u64 *kpage; - kpage = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); + kpage = ehca_alloc_fw_ctrlblock(); if (!kpage) { ehca_err(&shca->ib_device, "kpage alloc failed"); ret = -ENOMEM; @@ -1092,7 +1092,7 @@ ehca_reg_mr_rpages_exit1: - kfree(kpage); + ehca_free_fw_ctrlblock(kpage); ehca_reg_mr_rpages_exit0: if (ret) ehca_err(&shca->ib_device, "ret=%x shca=%p e_mr=%p pginfo=%p " @@ -1124,7 +1124,7 @@ ehca_mrmw_map_acl(acl, &hipz_acl); ehca_mrmw_set_pgsize_hipz_acl(&hipz_acl); - kpage = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); + kpage = ehca_alloc_fw_ctrlblock(); if (!kpage) { ehca_err(&shca->ib_device, "kpage alloc failed"); ret = -ENOMEM; @@ -1181,7 +1181,7 @@ } ehca_rereg_mr_rereg1_exit1: - kfree(kpage); + ehca_free_fw_ctrlblock(kpage); ehca_rereg_mr_rereg1_exit0: if ( ret && (ret != -EAGAIN) ) ehca_err(&shca->ib_device, "ret=%x lkey=%x rkey=%x " diff -urN linux-2.6.19-rc5/drivers/infiniband/hw/ehca/ehca_qp.c linux-2.6.19-rc6/drivers/infiniband/hw/ehca/ehca_qp.c --- linux-2.6.19-rc5/drivers/infiniband/hw/ehca/ehca_qp.c 2006-11-16 05:11:40.520341556 +0000 +++ linux-2.6.19-rc6/drivers/infiniband/hw/ehca/ehca_qp.c 2006-11-16 05:11:45.792914174 +0000 @@ -811,8 +811,8 @@ unsigned long spl_flags = 0; /* do query_qp to obtain current attr values */ - mqpcb = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); - if (mqpcb == NULL) { + mqpcb = ehca_alloc_fw_ctrlblock(); + if (!mqpcb) { ehca_err(ibqp->device, "Could not get zeroed page for mqpcb " "ehca_qp=%p qp_num=%x ", my_qp, ibqp->qp_num); return -ENOMEM; @@ -1225,7 +1225,7 @@ } modify_qp_exit1: - kfree(mqpcb); + ehca_free_fw_ctrlblock(mqpcb); return ret; } @@ -1277,7 +1277,7 @@ return -EINVAL; } - qpcb = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL ); + qpcb = ehca_alloc_fw_ctrlblock(); if (!qpcb) { ehca_err(qp->device,"Out of memory for qpcb " "ehca_qp=%p qp_num=%x", my_qp, qp->qp_num); @@ -1401,7 +1401,7 @@ ehca_dmp(qpcb, 4*70, "qp_num=%x", qp->qp_num); query_qp_exit1: - kfree(qpcb); + ehca_free_fw_ctrlblock(qpcb); return ret; } diff -urN linux-2.6.19-rc5/drivers/infiniband/hw/ehca/hipz_hw.h linux-2.6.19-rc6/drivers/infiniband/hw/ehca/hipz_hw.h --- linux-2.6.19-rc5/drivers/infiniband/hw/ehca/hipz_hw.h 2006-11-16 05:11:40.524341990 +0000 +++ linux-2.6.19-rc6/drivers/infiniband/hw/ehca/hipz_hw.h 2006-11-16 05:11:45.796914609 +0000 @@ -45,6 +45,8 @@ #include "ehca_tools.h" +#define EHCA_MAX_MTU 4 + /* QP Table Entry Memory Map */ struct hipz_qptemm { u64 qpx_hcr; diff -urN linux-2.6.19-rc5/drivers/infiniband/hw/ipath/ipath_driver.c linux-2.6.19-rc6/drivers/infiniband/hw/ipath/ipath_driver.c --- linux-2.6.19-rc5/drivers/infiniband/hw/ipath/ipath_driver.c 2006-11-16 05:11:40.528342425 +0000 +++ linux-2.6.19-rc6/drivers/infiniband/hw/ipath/ipath_driver.c 2006-11-16 05:11:45.800915043 +0000 @@ -304,7 +304,7 @@ } addr = pci_resource_start(pdev, 0); len = pci_resource_len(pdev, 0); - ipath_cdbg(VERBOSE, "regbase (0) %llx len %d irq %x, vend %x/%x " + ipath_cdbg(VERBOSE, "regbase (0) %llx len %d pdev->irq %d, vend %x/%x " "driver_data %lx\n", addr, len, pdev->irq, ent->vendor, ent->device, ent->driver_data); @@ -467,15 +467,15 @@ * check 0 irq after we return from chip-specific bus setup, since * that can affect this due to setup */ - if (!pdev->irq) + if (!dd->ipath_irq) ipath_dev_err(dd, "irq is 0, BIOS error? Interrupts won't " "work\n"); else { - ret = request_irq(pdev->irq, ipath_intr, IRQF_SHARED, + ret = request_irq(dd->ipath_irq, ipath_intr, IRQF_SHARED, IPATH_DRV_NAME, dd); if (ret) { ipath_dev_err(dd, "Couldn't setup irq handler, " - "irq=%u: %d\n", pdev->irq, ret); + "irq=%d: %d\n", dd->ipath_irq, ret); goto bail_iounmap; } } @@ -637,11 +637,10 @@ * free up port 0 (kernel) rcvhdr, egr bufs, and eventually tid bufs * for all versions of the driver, if they were allocated */ - if (pdev->irq) { - ipath_cdbg(VERBOSE, - "unit %u free_irq of irq %x\n", - dd->ipath_unit, pdev->irq); - free_irq(pdev->irq, dd); + if (dd->ipath_irq) { + ipath_cdbg(VERBOSE, "unit %u free irq %d\n", + dd->ipath_unit, dd->ipath_irq); + dd->ipath_f_free_irq(dd); } else ipath_dbg("irq is 0, not doing free_irq " "for unit %u\n", dd->ipath_unit); diff -urN linux-2.6.19-rc5/drivers/infiniband/hw/ipath/ipath_iba6110.c linux-2.6.19-rc6/drivers/infiniband/hw/ipath/ipath_iba6110.c --- linux-2.6.19-rc5/drivers/infiniband/hw/ipath/ipath_iba6110.c 2006-11-16 05:11:40.536343294 +0000 +++ linux-2.6.19-rc6/drivers/infiniband/hw/ipath/ipath_iba6110.c 2006-11-16 05:11:45.808915912 +0000 @@ -38,6 +38,7 @@ #include #include +#include #include "ipath_kernel.h" #include "ipath_registers.h" @@ -913,49 +914,40 @@ } } -static int set_int_handler(struct ipath_devdata *dd, struct pci_dev *pdev, - int pos) +static int ipath_ht_intconfig(struct ipath_devdata *dd) +{ + int ret; + + if (dd->ipath_intconfig) { + ipath_write_kreg(dd, dd->ipath_kregs->kr_interruptconfig, + dd->ipath_intconfig); /* interrupt address */ + ret = 0; + } else { + ipath_dev_err(dd, "No interrupts enabled, couldn't setup " + "interrupt address\n"); + ret = -EINVAL; + } + + return ret; +} + +static void ipath_ht_irq_update(struct pci_dev *dev, int irq, + struct ht_irq_msg *msg) { - u32 int_handler_addr_lower; - u32 int_handler_addr_upper; - u64 ihandler; - u32 intvec; - - /* use indirection register to get the intr handler */ - pci_write_config_byte(pdev, pos + HT_INTR_REG_INDEX, 0x10); - pci_read_config_dword(pdev, pos + 4, &int_handler_addr_lower); - pci_write_config_byte(pdev, pos + HT_INTR_REG_INDEX, 0x11); - pci_read_config_dword(pdev, pos + 4, &int_handler_addr_upper); - - ihandler = (u64) int_handler_addr_lower | - ((u64) int_handler_addr_upper << 32); - - /* - * kernels with CONFIG_PCI_MSI set the vector in the irq field of - * struct pci_device, so we use that to program the internal - * interrupt register (not config space) with that value. The BIOS - * must still have done the basic MSI setup. - */ - intvec = pdev->irq; - /* - * clear any vector bits there; normally not set but we'll overload - * this for some debug purposes (setting the HTC debug register - * value from software, rather than GPIOs), so it might be set on a - * driver reload. - */ - ihandler &= ~0xff0000; - /* x86 vector goes in intrinfo[23:16] */ - ihandler |= intvec << 16; - ipath_cdbg(VERBOSE, "ihandler lower %x, upper %x, intvec %x, " - "interruptconfig %llx\n", int_handler_addr_lower, - int_handler_addr_upper, intvec, - (unsigned long long) ihandler); - - /* can't program yet, so save for interrupt setup */ - dd->ipath_intconfig = ihandler; - /* keep going, so we find link control stuff also */ + struct ipath_devdata *dd = pci_get_drvdata(dev); + u64 prev_intconfig = dd->ipath_intconfig; + + dd->ipath_intconfig = msg->address_lo; + dd->ipath_intconfig |= ((u64) msg->address_hi) << 32; - return ihandler != 0; + /* + * If the previous value of dd->ipath_intconfig is zero, we're + * getting configured for the first time, and must not program the + * intconfig register here (it will be programmed later, when the + * hardware is ready). Otherwise, we should. + */ + if (prev_intconfig) + ipath_ht_intconfig(dd); } /** @@ -971,12 +963,19 @@ static int ipath_setup_ht_config(struct ipath_devdata *dd, struct pci_dev *pdev) { - int pos, ret = 0; - int ihandler = 0; + int pos, ret; + + ret = __ht_create_irq(pdev, 0, ipath_ht_irq_update); + if (ret < 0) { + ipath_dev_err(dd, "Couldn't create interrupt handler: " + "err %d\n", ret); + goto bail; + } + dd->ipath_irq = ret; + ret = 0; /* - * Read the capability info to find the interrupt info, and also - * handle clearing CRC errors in linkctrl register if necessary. We + * Handle clearing CRC errors in linkctrl register if necessary. We * do this early, before we ever enable errors or hardware errors, * mostly to avoid causing the chip to enter freeze mode. */ @@ -1000,17 +999,9 @@ } if (!(cap_type & 0xE0)) slave_or_pri_blk(dd, pdev, pos, cap_type); - else if (cap_type == HT_INTR_DISC_CONFIG) - ihandler = set_int_handler(dd, pdev, pos); } while ((pos = pci_find_next_capability(pdev, pos, PCI_CAP_ID_HT))); - if (!ihandler) { - ipath_dev_err(dd, "Couldn't find interrupt handler in " - "config space\n"); - ret = -ENODEV; - } - bail: return ret; } @@ -1360,25 +1351,6 @@ ipath_write_kreg(dd, dd->ipath_kregs->kr_serdesconfig0, val); } -static int ipath_ht_intconfig(struct ipath_devdata *dd) -{ - int ret; - - if (!dd->ipath_intconfig) { - ipath_dev_err(dd, "No interrupts enabled, couldn't setup " - "interrupt address\n"); - ret = 1; - goto bail; - } - - ipath_write_kreg(dd, dd->ipath_kregs->kr_interruptconfig, - dd->ipath_intconfig); /* interrupt address */ - ret = 0; - -bail: - return ret; -} - /** * ipath_pe_put_tid - write a TID in chip * @dd: the infinipath device @@ -1575,6 +1547,14 @@ return 0; } +static void ipath_ht_free_irq(struct ipath_devdata *dd) +{ + free_irq(dd->ipath_irq, dd); + ht_destroy_irq(dd->ipath_irq); + dd->ipath_irq = 0; + dd->ipath_intconfig = 0; +} + /** * ipath_init_iba6110_funcs - set up the chip-specific function pointers * @dd: the infinipath device @@ -1598,6 +1578,7 @@ dd->ipath_f_cleanup = ipath_setup_ht_cleanup; dd->ipath_f_setextled = ipath_setup_ht_setextled; dd->ipath_f_get_base_info = ipath_ht_get_base_info; + dd->ipath_f_free_irq = ipath_ht_free_irq; /* * initialize chip-specific variables diff -urN linux-2.6.19-rc5/drivers/infiniband/hw/ipath/ipath_iba6120.c linux-2.6.19-rc6/drivers/infiniband/hw/ipath/ipath_iba6120.c --- linux-2.6.19-rc5/drivers/infiniband/hw/ipath/ipath_iba6120.c 2006-11-16 05:11:40.536343294 +0000 +++ linux-2.6.19-rc6/drivers/infiniband/hw/ipath/ipath_iba6120.c 2006-11-16 05:11:45.808915912 +0000 @@ -851,6 +851,7 @@ int pos, ret; dd->ipath_msi_lo = 0; /* used as a flag during reset processing */ + dd->ipath_irq = pdev->irq; ret = pci_enable_msi(dd->pcidev); if (ret) ipath_dev_err(dd, "pci_enable_msi failed: %d, " @@ -1323,6 +1324,12 @@ return 0; } +static void ipath_pe_free_irq(struct ipath_devdata *dd) +{ + free_irq(dd->ipath_irq, dd); + dd->ipath_irq = 0; +} + /** * ipath_init_iba6120_funcs - set up the chip-specific function pointers * @dd: the infinipath device @@ -1349,6 +1356,7 @@ dd->ipath_f_cleanup = ipath_setup_pe_cleanup; dd->ipath_f_setextled = ipath_setup_pe_setextled; dd->ipath_f_get_base_info = ipath_pe_get_base_info; + dd->ipath_f_free_irq = ipath_pe_free_irq; /* initialize chip-specific variables */ dd->ipath_f_tidtemplate = ipath_pe_tidtemplate; diff -urN linux-2.6.19-rc5/drivers/infiniband/hw/ipath/ipath_intr.c linux-2.6.19-rc6/drivers/infiniband/hw/ipath/ipath_intr.c --- linux-2.6.19-rc5/drivers/infiniband/hw/ipath/ipath_intr.c 2006-11-16 05:11:40.540343728 +0000 +++ linux-2.6.19-rc6/drivers/infiniband/hw/ipath/ipath_intr.c 2006-11-16 05:11:45.812916346 +0000 @@ -710,14 +710,14 @@ * linuxbios development work, and it may happen in * the future again. */ - if (dd->pcidev && dd->pcidev->irq) { + if (dd->pcidev && dd->ipath_irq) { ipath_dev_err(dd, "Now %u unexpected " "interrupts, unregistering " "interrupt handler\n", *unexpectp); - ipath_dbg("free_irq of irq %x\n", - dd->pcidev->irq); - free_irq(dd->pcidev->irq, dd); + ipath_dbg("free_irq of irq %d\n", + dd->ipath_irq); + dd->ipath_f_free_irq(dd); } } if (ipath_read_kreg32(dd, dd->ipath_kregs->kr_intmask)) { @@ -753,7 +753,7 @@ if (allbits == 2) { ipath_dev_err(dd, "Still bad interrupt status, " "unregistering interrupt\n"); - free_irq(dd->pcidev->irq, dd); + dd->ipath_f_free_irq(dd); } else if (allbits > 2) { if ((allbits % 10000) == 0) printk("."); diff -urN linux-2.6.19-rc5/drivers/infiniband/hw/ipath/ipath_kernel.h linux-2.6.19-rc6/drivers/infiniband/hw/ipath/ipath_kernel.h --- linux-2.6.19-rc5/drivers/infiniband/hw/ipath/ipath_kernel.h 2006-11-16 05:11:40.540343728 +0000 +++ linux-2.6.19-rc6/drivers/infiniband/hw/ipath/ipath_kernel.h 2006-11-16 05:11:45.812916346 +0000 @@ -213,6 +213,8 @@ void (*ipath_f_setextled)(struct ipath_devdata *, u64, u64); /* fill out chip-specific fields */ int (*ipath_f_get_base_info)(struct ipath_portdata *, void *); + /* free irq */ + void (*ipath_f_free_irq)(struct ipath_devdata *); struct ipath_ibdev *verbs_dev; struct timer_list verbs_timer; /* total dwords sent (summed from counter) */ @@ -328,6 +330,8 @@ /* so we can rewrite it after a chip reset */ u32 ipath_pcibar1; + /* interrupt number */ + int ipath_irq; /* HT/PCI Vendor ID (here for NodeInfo) */ u16 ipath_vendorid; /* HT/PCI Device ID (here for NodeInfo) */ diff -urN linux-2.6.19-rc5/drivers/macintosh/windfarm_pm112.c linux-2.6.19-rc6/drivers/macintosh/windfarm_pm112.c --- linux-2.6.19-rc5/drivers/macintosh/windfarm_pm112.c 2006-11-16 05:11:40.628353286 +0000 +++ linux-2.6.19-rc6/drivers/macintosh/windfarm_pm112.c 2006-11-16 05:11:45.896925470 +0000 @@ -685,6 +685,17 @@ ++nr_cores; printk(KERN_INFO "windfarm: initializing for dual-core desktop G5\n"); + +#ifdef MODULE + request_module("windfarm_smu_controls"); + request_module("windfarm_smu_sensors"); + request_module("windfarm_smu_sat"); + request_module("windfarm_lm75_sensor"); + request_module("windfarm_max6690_sensor"); + request_module("windfarm_cpufreq_clamp"); + +#endif /* MODULE */ + platform_driver_register(&wf_pm112_driver); return 0; } diff -urN linux-2.6.19-rc5/drivers/macintosh/windfarm_pm81.c linux-2.6.19-rc6/drivers/macintosh/windfarm_pm81.c --- linux-2.6.19-rc5/drivers/macintosh/windfarm_pm81.c 2006-11-16 05:11:40.628353286 +0000 +++ linux-2.6.19-rc6/drivers/macintosh/windfarm_pm81.c 2006-11-16 05:11:45.900925905 +0000 @@ -788,6 +788,7 @@ request_module("windfarm_smu_controls"); request_module("windfarm_smu_sensors"); request_module("windfarm_lm75_sensor"); + request_module("windfarm_cpufreq_clamp"); #endif /* MODULE */ platform_driver_register(&wf_smu_driver); diff -urN linux-2.6.19-rc5/drivers/macintosh/windfarm_pm91.c linux-2.6.19-rc6/drivers/macintosh/windfarm_pm91.c --- linux-2.6.19-rc5/drivers/macintosh/windfarm_pm91.c 2006-11-16 05:11:40.628353286 +0000 +++ linux-2.6.19-rc6/drivers/macintosh/windfarm_pm91.c 2006-11-16 05:11:45.900925905 +0000 @@ -719,6 +719,7 @@ request_module("windfarm_smu_controls"); request_module("windfarm_smu_sensors"); request_module("windfarm_lm75_sensor"); + request_module("windfarm_cpufreq_clamp"); #endif /* MODULE */ platform_driver_register(&wf_smu_driver); diff -urN linux-2.6.19-rc5/drivers/md/dm-ioctl.c linux-2.6.19-rc6/drivers/md/dm-ioctl.c --- linux-2.6.19-rc5/drivers/md/dm-ioctl.c 2006-09-20 03:42:06.000000000 +0000 +++ linux-2.6.19-rc6/drivers/md/dm-ioctl.c 2006-11-16 05:11:45.904926339 +0000 @@ -606,9 +606,14 @@ return __get_name_cell(param->name); md = dm_get_md(huge_decode_dev(param->dev)); - if (md) - mdptr = dm_get_mdptr(md); + if (!md) + goto out; + mdptr = dm_get_mdptr(md); + if (!mdptr) + dm_put(md); + +out: return mdptr; } diff -urN linux-2.6.19-rc5/drivers/md/dm-raid1.c linux-2.6.19-rc6/drivers/md/dm-raid1.c --- linux-2.6.19-rc5/drivers/md/dm-raid1.c 2006-11-16 05:11:40.632353721 +0000 +++ linux-2.6.19-rc6/drivers/md/dm-raid1.c 2006-11-16 05:11:45.904926339 +0000 @@ -24,6 +24,7 @@ static struct workqueue_struct *_kmirrord_wq; static struct work_struct _kmirrord_work; +static DECLARE_WAIT_QUEUE_HEAD(_kmirrord_recovery_stopped); static inline void wake(void) { @@ -83,6 +84,7 @@ struct list_head *buckets; spinlock_t region_lock; + atomic_t recovery_in_flight; struct semaphore recovery_count; struct list_head clean_regions; struct list_head quiesced_regions; @@ -191,6 +193,7 @@ spin_lock_init(&rh->region_lock); sema_init(&rh->recovery_count, 0); + atomic_set(&rh->recovery_in_flight, 0); INIT_LIST_HEAD(&rh->clean_regions); INIT_LIST_HEAD(&rh->quiesced_regions); INIT_LIST_HEAD(&rh->recovered_regions); @@ -382,6 +385,8 @@ rh->log->type->clear_region(rh->log, reg->key); rh->log->type->complete_resync_work(rh->log, reg->key, 1); dispatch_bios(rh->ms, ®->delayed_bios); + if (atomic_dec_and_test(&rh->recovery_in_flight)) + wake_up_all(&_kmirrord_recovery_stopped); up(&rh->recovery_count); mempool_free(reg, rh->region_pool); } @@ -502,11 +507,21 @@ static void rh_recovery_prepare(struct region_hash *rh) { - while (!down_trylock(&rh->recovery_count)) + /* Extra reference to avoid race with rh_stop_recovery */ + atomic_inc(&rh->recovery_in_flight); + + while (!down_trylock(&rh->recovery_count)) { + atomic_inc(&rh->recovery_in_flight); if (__rh_recovery_prepare(rh) <= 0) { + atomic_dec(&rh->recovery_in_flight); up(&rh->recovery_count); break; } + } + + /* Drop the extra reference */ + if (atomic_dec_and_test(&rh->recovery_in_flight)) + wake_up_all(&_kmirrord_recovery_stopped); } /* @@ -1177,6 +1192,11 @@ struct dirty_log *log = ms->rh.log; rh_stop_recovery(&ms->rh); + + /* Wait for all I/O we generated to complete */ + wait_event(_kmirrord_recovery_stopped, + !atomic_read(&ms->rh.recovery_in_flight)); + if (log->type->suspend && log->type->suspend(log)) /* FIXME: need better error handling */ DMWARN("log suspend failed"); diff -urN linux-2.6.19-rc5/drivers/md/dm-round-robin.c linux-2.6.19-rc6/drivers/md/dm-round-robin.c --- linux-2.6.19-rc5/drivers/md/dm-round-robin.c 2006-09-20 03:42:06.000000000 +0000 +++ linux-2.6.19-rc6/drivers/md/dm-round-robin.c 2006-11-16 05:11:45.904926339 +0000 @@ -136,7 +136,7 @@ path->pscontext = pi; - list_add(&pi->list, &s->valid_paths); + list_add_tail(&pi->list, &s->valid_paths); return 0; } diff -urN linux-2.6.19-rc5/drivers/md/dm.c linux-2.6.19-rc6/drivers/md/dm.c --- linux-2.6.19-rc5/drivers/md/dm.c 2006-11-16 05:11:40.636354155 +0000 +++ linux-2.6.19-rc6/drivers/md/dm.c 2006-11-16 05:11:45.908926774 +0000 @@ -1285,7 +1285,7 @@ down(&md->suspend_lock); if (dm_suspended(md)) - goto out; + goto out_unlock; map = dm_get_table(md); @@ -1361,6 +1361,8 @@ } dm_table_put(map); + +out_unlock: up(&md->suspend_lock); return r; } diff -urN linux-2.6.19-rc5/drivers/md/md.c linux-2.6.19-rc6/drivers/md/md.c --- linux-2.6.19-rc5/drivers/md/md.c 2006-11-16 05:11:40.640354590 +0000 +++ linux-2.6.19-rc6/drivers/md/md.c 2006-11-16 05:11:45.908926774 +0000 @@ -3200,7 +3200,7 @@ mddev->changed = 1; md_new_event(mddev); - kobject_uevent(&mddev->gendisk->kobj, KOBJ_ONLINE); + kobject_uevent(&mddev->gendisk->kobj, KOBJ_CHANGE); return 0; } @@ -3314,7 +3314,6 @@ module_put(mddev->pers->owner); mddev->pers = NULL; - kobject_uevent(&mddev->gendisk->kobj, KOBJ_OFFLINE); if (mddev->ro) mddev->ro = 0; } @@ -4487,6 +4486,7 @@ * many dirty RAID5 blocks. */ + current->flags |= PF_NOFREEZE; allow_signal(SIGKILL); while (!kthread_should_stop()) { @@ -4503,7 +4503,6 @@ test_bit(THREAD_WAKEUP, &thread->flags) || kthread_should_stop(), thread->timeout); - try_to_freeze(); clear_bit(THREAD_WAKEUP, &thread->flags); diff -urN linux-2.6.19-rc5/drivers/md/raid5.c linux-2.6.19-rc6/drivers/md/raid5.c --- linux-2.6.19-rc5/drivers/md/raid5.c 2006-11-16 05:11:40.644355024 +0000 +++ linux-2.6.19-rc6/drivers/md/raid5.c 2006-11-16 05:11:45.912927208 +0000 @@ -3659,7 +3659,7 @@ bdev = bdget_disk(conf->mddev->gendisk, 0); if (bdev) { mutex_lock(&bdev->bd_inode->i_mutex); - i_size_write(bdev->bd_inode, conf->mddev->array_size << 10); + i_size_write(bdev->bd_inode, (loff_t)conf->mddev->array_size << 10); mutex_unlock(&bdev->bd_inode->i_mutex); bdput(bdev); } diff -urN linux-2.6.19-rc5/drivers/media/dvb/b2c2/flexcop-usb.c linux-2.6.19-rc6/drivers/media/dvb/b2c2/flexcop-usb.c --- linux-2.6.19-rc5/drivers/media/dvb/b2c2/flexcop-usb.c 2006-11-16 05:11:40.644355024 +0000 +++ linux-2.6.19-rc6/drivers/media/dvb/b2c2/flexcop-usb.c 2006-11-16 05:11:45.916927642 +0000 @@ -246,7 +246,7 @@ wIndex = (chipaddr << 8 ) | addr; deb_i2c("i2c %2d: %02x %02x %02x %02x %02x %02x\n",func,request_type,req, - ((wValue && 0xff) << 8),wValue >> 8,((wIndex && 0xff) << 8),wIndex >> 8); + wValue & 0xff, wValue >> 8, wIndex & 0xff, wIndex >> 8); len = usb_control_msg(fc_usb->udev,pipe, req, diff -urN linux-2.6.19-rc5/drivers/media/dvb/frontends/tda826x.c linux-2.6.19-rc6/drivers/media/dvb/frontends/tda826x.c --- linux-2.6.19-rc5/drivers/media/dvb/frontends/tda826x.c 2006-11-16 05:11:40.676358500 +0000 +++ linux-2.6.19-rc6/drivers/media/dvb/frontends/tda826x.c 2006-11-16 05:11:45.944930684 +0000 @@ -121,7 +121,7 @@ .info = { .name = "Philips TDA826X", .frequency_min = 950000, - .frequency_min = 2175000 + .frequency_max = 2175000 }, .release = tda826x_release, .sleep = tda826x_sleep, diff -urN linux-2.6.19-rc5/drivers/media/video/Kconfig linux-2.6.19-rc6/drivers/media/video/Kconfig --- linux-2.6.19-rc5/drivers/media/video/Kconfig 2006-11-16 05:11:40.692360238 +0000 +++ linux-2.6.19-rc6/drivers/media/video/Kconfig 2006-11-16 05:11:45.960932422 +0000 @@ -186,7 +186,7 @@ config VIDEO_SAA7110 tristate "Philips SAA7110 video decoder" - depends on VIDEO_V4L1 + depends on VIDEO_V4L1 && I2C ---help--- Support for the Philips SAA7110 video decoders. diff -urN linux-2.6.19-rc5/drivers/media/video/bt8xx/bttv-cards.c linux-2.6.19-rc6/drivers/media/video/bt8xx/bttv-cards.c --- linux-2.6.19-rc5/drivers/media/video/bt8xx/bttv-cards.c 2006-11-16 05:11:40.696360672 +0000 +++ linux-2.6.19-rc6/drivers/media/video/bt8xx/bttv-cards.c 2006-11-16 05:11:45.964932856 +0000 @@ -4001,7 +4001,7 @@ * - sleep 1ms * - write 0x0E * read from GPIO_DATA into buf (uint_32) - * - if ( buf>>18 & 0x01 ) || ( buf>>19 && 0x01 != 0 ) + * - if ( buf>>18 & 0x01 ) || ( buf>>19 & 0x01 != 0 ) * error. ERROR_CPLD_Check_Failed. */ /* ----------------------------------------------------------------------- */ diff -urN linux-2.6.19-rc5/drivers/media/video/cx88/cx88-input.c linux-2.6.19-rc6/drivers/media/video/cx88/cx88-input.c --- linux-2.6.19-rc5/drivers/media/video/cx88/cx88-input.c 2006-11-16 05:11:40.704361541 +0000 +++ linux-2.6.19-rc6/drivers/media/video/cx88/cx88-input.c 2006-11-16 05:11:45.972933725 +0000 @@ -202,13 +202,19 @@ ir->sampling = 1; break; case CX88_BOARD_WINFAST_DTV2000H: - case CX88_BOARD_WINFAST2000XP_EXPERT: ir_codes = ir_codes_winfast; ir->gpio_addr = MO_GP0_IO; ir->mask_keycode = 0x8f8; ir->mask_keyup = 0x100; ir->polling = 50; /* ms */ break; + case CX88_BOARD_WINFAST2000XP_EXPERT: + ir_codes = ir_codes_winfast; + ir->gpio_addr = MO_GP0_IO; + ir->mask_keycode = 0x8f8; + ir->mask_keyup = 0x100; + ir->polling = 1; /* ms */ + break; case CX88_BOARD_IODATA_GVBCTV7E: ir_codes = ir_codes_iodata_bctv7e; ir->gpio_addr = MO_GP0_IO; @@ -216,7 +222,7 @@ ir->mask_keydown = 0x02; ir->polling = 5; /* ms */ break; - case CX88_BOARD_PROLINK_PLAYTVPVR: + case CX88_BOARD_PROLINK_PLAYTVPVR: case CX88_BOARD_PIXELVIEW_PLAYTV_ULTRA_PRO: ir_codes = ir_codes_pixelview; ir->gpio_addr = MO_GP1_IO; diff -urN linux-2.6.19-rc5/drivers/media/video/saa7134/saa7134-cards.c linux-2.6.19-rc6/drivers/media/video/saa7134/saa7134-cards.c --- linux-2.6.19-rc5/drivers/media/video/saa7134/saa7134-cards.c 2006-11-16 05:11:40.724363713 +0000 +++ linux-2.6.19-rc6/drivers/media/video/saa7134/saa7134-cards.c 2006-11-16 05:11:45.992935897 +0000 @@ -2969,7 +2969,7 @@ /* Petr Baudis */ .name = "AVerMedia TV Hybrid A16AR", .audio_clock = 0x187de7, - .tuner_type = TUNER_PHILIPS_TDA8290, /* untested */ + .tuner_type = TUNER_PHILIPS_TD1316, /* untested */ .radio_type = TUNER_TEA5767, /* untested */ .tuner_addr = ADDR_UNSET, .radio_addr = ADDR_UNSET, @@ -3718,6 +3718,7 @@ case SAA7134_BOARD_AVERMEDIA_STUDIO_307: case SAA7134_BOARD_AVERMEDIA_307: case SAA7134_BOARD_AVERMEDIA_GO_007_FM: + case SAA7134_BOARD_AVERMEDIA_777: /* case SAA7134_BOARD_SABRENT_SBTTVFM: */ /* not finished yet */ case SAA7134_BOARD_VIDEOMATE_TV_PVR: case SAA7134_BOARD_VIDEOMATE_GOLD_PLUS: @@ -3734,6 +3735,7 @@ case SAA7134_BOARD_FLYDVBT_LR301: case SAA7134_BOARD_FLYDVBTDUO: case SAA7134_BOARD_PROTEUS_2309: + case SAA7134_BOARD_AVERMEDIA_A16AR: dev->has_remote = SAA7134_REMOTE_GPIO; break; case SAA7134_BOARD_FLYDVBS_LR300: @@ -3772,7 +3774,6 @@ saa_writeb(SAA7134_GPIO_GPMODE3, 0x08); saa_writeb(SAA7134_GPIO_GPSTATUS3, 0x00); break; - case SAA7134_BOARD_AVERMEDIA_A16AR: case SAA7134_BOARD_AVERMEDIA_CARDBUS: /* power-up tuner chip */ saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0xffffffff, 0xffffffff); diff -urN linux-2.6.19-rc5/drivers/media/video/saa7134/saa7134-input.c linux-2.6.19-rc6/drivers/media/video/saa7134/saa7134-input.c --- linux-2.6.19-rc5/drivers/media/video/saa7134/saa7134-input.c 2006-11-16 05:11:40.728364148 +0000 +++ linux-2.6.19-rc6/drivers/media/video/saa7134/saa7134-input.c 2006-11-16 05:11:45.992935897 +0000 @@ -185,7 +185,6 @@ case SAA7134_BOARD_AVERMEDIA_STUDIO_305: case SAA7134_BOARD_AVERMEDIA_STUDIO_307: case SAA7134_BOARD_AVERMEDIA_GO_007_FM: - case SAA7134_BOARD_AVERMEDIA_A16AR: ir_codes = ir_codes_avermedia; mask_keycode = 0x0007C8; mask_keydown = 0x000010; @@ -194,6 +193,16 @@ saa_setb(SAA7134_GPIO_GPMODE0, 0x4); saa_setb(SAA7134_GPIO_GPSTATUS0, 0x4); break; + case SAA7134_BOARD_AVERMEDIA_777: + case SAA7134_BOARD_AVERMEDIA_A16AR: + ir_codes = ir_codes_avermedia; + mask_keycode = 0x02F200; + mask_keydown = 0x000400; + polling = 50; // ms + /* Without this we won't receive key up events */ + saa_setb(SAA7134_GPIO_GPMODE1, 0x1); + saa_setb(SAA7134_GPIO_GPSTATUS1, 0x1); + break; case SAA7134_BOARD_KWORLD_TERMINATOR: ir_codes = ir_codes_pixelview; mask_keycode = 0x00001f; diff -urN linux-2.6.19-rc5/drivers/media/video/tveeprom.c linux-2.6.19-rc6/drivers/media/video/tveeprom.c --- linux-2.6.19-rc5/drivers/media/video/tveeprom.c 2006-11-16 05:11:40.736365017 +0000 +++ linux-2.6.19-rc6/drivers/media/video/tveeprom.c 2006-11-16 05:11:46.000936766 +0000 @@ -468,7 +468,7 @@ (eeprom_data[i+6] << 8) + (eeprom_data[i+7] << 16); - if ( (eeprom_data[i + 8] && 0xf0) && + if ( (eeprom_data[i + 8] & 0xf0) && (tvee->serial_number < 0xffffff) ) { tvee->MAC_address[0] = 0x00; tvee->MAC_address[1] = 0x0D; diff -urN linux-2.6.19-rc5/drivers/mmc/mmc.c linux-2.6.19-rc6/drivers/mmc/mmc.c --- linux-2.6.19-rc5/drivers/mmc/mmc.c 2006-11-16 05:11:40.760367624 +0000 +++ linux-2.6.19-rc6/drivers/mmc/mmc.c 2006-11-16 05:11:46.024939373 +0000 @@ -475,7 +475,7 @@ if (bit) { bit -= 1; - ocr = 3 << bit; + ocr &= 3 << bit; host->ios.vdd = bit; mmc_set_ios(host); @@ -1178,14 +1178,29 @@ { struct mmc_host *host = data; struct list_head *l, *n; + unsigned char power_mode; mmc_claim_host(host); - if (host->ios.power_mode == MMC_POWER_ON) + /* + * Check for removed cards and newly inserted ones. We check for + * removed cards first so we can intelligently re-select the VDD. + */ + power_mode = host->ios.power_mode; + if (power_mode == MMC_POWER_ON) mmc_check_cards(host); mmc_setup(host); + /* + * Some broken cards process CMD1 even in stand-by state. There is + * no reply, but an ILLEGAL_COMMAND error is cached and returned + * after next command. We poll for card status here to clear any + * possibly pending error. + */ + if (power_mode == MMC_POWER_ON) + mmc_check_cards(host); + if (!list_empty(&host->cards)) { /* * (Re-)calculate the fastest clock rate which the diff -urN linux-2.6.19-rc5/drivers/net/Kconfig linux-2.6.19-rc6/drivers/net/Kconfig --- linux-2.6.19-rc5/drivers/net/Kconfig 2006-11-16 05:11:40.792371099 +0000 +++ linux-2.6.19-rc6/drivers/net/Kconfig 2006-11-16 05:11:46.056942849 +0000 @@ -2833,7 +2833,7 @@ "SCSI generic support". config SHAPER - tristate "Traffic Shaper (EXPERIMENTAL)" + tristate "Traffic Shaper (OBSOLETE)" depends on EXPERIMENTAL ---help--- The traffic shaper is a virtual network device that allows you to @@ -2842,9 +2842,9 @@ these virtual devices. See for more information. - An alternative to this traffic shaper is the experimental - Class-Based Queuing (CBQ) scheduling support which you get if you - say Y to "QoS and/or fair queuing" above. + An alternative to this traffic shaper are traffic schedulers which + you'll get if you say Y to "QoS and/or fair queuing" in + "Networking options". To compile this driver as a module, choose M here: the module will be called shaper. If unsure, say N. diff -urN linux-2.6.19-rc5/drivers/net/arcnet/com20020.c linux-2.6.19-rc6/drivers/net/arcnet/com20020.c --- linux-2.6.19-rc5/drivers/net/arcnet/com20020.c 2006-09-20 03:42:06.000000000 +0000 +++ linux-2.6.19-rc6/drivers/net/arcnet/com20020.c 2006-11-16 05:11:46.092946759 +0000 @@ -337,13 +337,16 @@ } } -#ifdef MODULE - +#if defined(CONFIG_ARCNET_COM20020_PCI_MODULE) || \ + defined(CONFIG_ARCNET_COM20020_ISA_MODULE) EXPORT_SYMBOL(com20020_check); EXPORT_SYMBOL(com20020_found); +#endif MODULE_LICENSE("GPL"); +#ifdef MODULE + int init_module(void) { BUGLVL(D_NORMAL) printk(VERSION); diff -urN linux-2.6.19-rc5/drivers/net/bonding/bond_main.c linux-2.6.19-rc6/drivers/net/bonding/bond_main.c --- linux-2.6.19-rc5/drivers/net/bonding/bond_main.c 2006-11-16 05:11:40.844376747 +0000 +++ linux-2.6.19-rc6/drivers/net/bonding/bond_main.c 2006-11-16 05:11:46.108948497 +0000 @@ -4692,6 +4692,8 @@ return 0; } +static struct lock_class_key bonding_netdev_xmit_lock_key; + /* Create a new bond based on the specified name and bonding parameters. * Caller must NOT hold rtnl_lock; we need to release it here before we * set up our sysfs entries. @@ -4727,6 +4729,9 @@ if (res < 0) { goto out_bond; } + + lockdep_set_class(&bond_dev->_xmit_lock, &bonding_netdev_xmit_lock_key); + if (newbond) *newbond = bond_dev->priv; diff -urN linux-2.6.19-rc5/drivers/net/cris/eth_v10.c linux-2.6.19-rc6/drivers/net/cris/eth_v10.c --- linux-2.6.19-rc5/drivers/net/cris/eth_v10.c 2006-11-16 05:11:40.856378051 +0000 +++ linux-2.6.19-rc6/drivers/net/cris/eth_v10.c 2006-11-16 05:11:46.120949800 +0000 @@ -509,6 +509,8 @@ * does not share cacheline with any other data (to avoid cache bug) */ RxDescList[i].skb = dev_alloc_skb(MAX_MEDIA_DATA_SIZE + 2 * L1_CACHE_BYTES); + if (!RxDescList[i].skb) + return -ENOMEM; RxDescList[i].descr.ctrl = 0; RxDescList[i].descr.sw_len = MAX_MEDIA_DATA_SIZE; RxDescList[i].descr.next = virt_to_phys(&RxDescList[i + 1]); diff -urN linux-2.6.19-rc5/drivers/net/tg3.c linux-2.6.19-rc6/drivers/net/tg3.c --- linux-2.6.19-rc5/drivers/net/tg3.c 2006-11-16 05:11:41.056399774 +0000 +++ linux-2.6.19-rc6/drivers/net/tg3.c 2006-11-16 05:11:46.308970220 +0000 @@ -10212,7 +10212,7 @@ static void __devinit tg3_read_partno(struct tg3 *tp) { unsigned char vpd_data[256]; - int i; + unsigned int i; u32 magic; if (tg3_nvram_read_swab(tp, 0x0, &magic)) @@ -10258,9 +10258,9 @@ } /* Now parse and find the part number. */ - for (i = 0; i < 256; ) { + for (i = 0; i < 254; ) { unsigned char val = vpd_data[i]; - int block_end; + unsigned int block_end; if (val == 0x82 || val == 0x91) { i = (i + 3 + @@ -10276,21 +10276,26 @@ (vpd_data[i + 1] + (vpd_data[i + 2] << 8))); i += 3; - while (i < block_end) { + + if (block_end > 256) + goto out_not_found; + + while (i < (block_end - 2)) { if (vpd_data[i + 0] == 'P' && vpd_data[i + 1] == 'N') { int partno_len = vpd_data[i + 2]; - if (partno_len > 24) + i += 3; + if (partno_len > 24 || (partno_len + i) > 256) goto out_not_found; memcpy(tp->board_part_number, - &vpd_data[i + 3], - partno_len); + &vpd_data[i], partno_len); /* Success. */ return; } + i += 3 + vpd_data[i + 2]; } /* Part number not found. */ diff -urN linux-2.6.19-rc5/drivers/net/wireless/bcm43xx/bcm43xx_main.c linux-2.6.19-rc6/drivers/net/wireless/bcm43xx/bcm43xx_main.c --- linux-2.6.19-rc5/drivers/net/wireless/bcm43xx/bcm43xx_main.c 2006-11-16 05:11:41.132408028 +0000 +++ linux-2.6.19-rc6/drivers/net/wireless/bcm43xx/bcm43xx_main.c 2006-11-16 05:11:46.380978040 +0000 @@ -746,7 +746,7 @@ if (err) goto err_ctlreg; spromctl |= 0x10; /* SPROM WRITE enable. */ - bcm43xx_pci_write_config32(bcm, BCM43xx_PCICFG_SPROMCTL, spromctl); + err = bcm43xx_pci_write_config32(bcm, BCM43xx_PCICFG_SPROMCTL, spromctl); if (err) goto err_ctlreg; /* We must burn lots of CPU cycles here, but that does not @@ -768,7 +768,7 @@ mdelay(20); } spromctl &= ~0x10; /* SPROM WRITE enable. */ - bcm43xx_pci_write_config32(bcm, BCM43xx_PCICFG_SPROMCTL, spromctl); + err = bcm43xx_pci_write_config32(bcm, BCM43xx_PCICFG_SPROMCTL, spromctl); if (err) goto err_ctlreg; mdelay(500); @@ -1463,6 +1463,23 @@ } } +static void drain_txstatus_queue(struct bcm43xx_private *bcm) +{ + u32 dummy; + + if (bcm->current_core->rev < 5) + return; + /* Read all entries from the microcode TXstatus FIFO + * and throw them away. + */ + while (1) { + dummy = bcm43xx_read32(bcm, BCM43xx_MMIO_XMITSTAT_0); + if (!dummy) + break; + dummy = bcm43xx_read32(bcm, BCM43xx_MMIO_XMITSTAT_1); + } +} + static void bcm43xx_generate_noise_sample(struct bcm43xx_private *bcm) { bcm43xx_shm_write16(bcm, BCM43xx_SHM_SHARED, 0x408, 0x7F7F); @@ -3532,6 +3549,7 @@ bcm43xx_macfilter_clear(bcm, BCM43xx_MACFILTER_ASSOC); bcm43xx_macfilter_set(bcm, BCM43xx_MACFILTER_SELF, (u8 *)(bcm->net_dev->dev_addr)); bcm43xx_security_init(bcm); + drain_txstatus_queue(bcm); ieee80211softmac_start(bcm->net_dev); /* Let's go! Be careful after enabling the IRQs. diff -urN linux-2.6.19-rc5/drivers/pci/htirq.c linux-2.6.19-rc6/drivers/pci/htirq.c --- linux-2.6.19-rc5/drivers/pci/htirq.c 2006-11-16 05:11:41.188414111 +0000 +++ linux-2.6.19-rc6/drivers/pci/htirq.c 2006-11-16 05:11:46.436984122 +0000 @@ -25,97 +25,72 @@ struct ht_irq_cfg { struct pci_dev *dev; + /* Update callback used to cope with buggy hardware */ + ht_irq_update_t *update; unsigned pos; unsigned idx; + struct ht_irq_msg msg; }; -void write_ht_irq_low(unsigned int irq, u32 data) -{ - struct ht_irq_cfg *cfg = get_irq_data(irq); - unsigned long flags; - spin_lock_irqsave(&ht_irq_lock, flags); - pci_write_config_byte(cfg->dev, cfg->pos + 2, cfg->idx); - pci_write_config_dword(cfg->dev, cfg->pos + 4, data); - spin_unlock_irqrestore(&ht_irq_lock, flags); -} -void write_ht_irq_high(unsigned int irq, u32 data) +void write_ht_irq_msg(unsigned int irq, struct ht_irq_msg *msg) { struct ht_irq_cfg *cfg = get_irq_data(irq); unsigned long flags; spin_lock_irqsave(&ht_irq_lock, flags); - pci_write_config_byte(cfg->dev, cfg->pos + 2, cfg->idx + 1); - pci_write_config_dword(cfg->dev, cfg->pos + 4, data); - spin_unlock_irqrestore(&ht_irq_lock, flags); -} - -u32 read_ht_irq_low(unsigned int irq) -{ - struct ht_irq_cfg *cfg = get_irq_data(irq); - unsigned long flags; - u32 data; - spin_lock_irqsave(&ht_irq_lock, flags); - pci_write_config_byte(cfg->dev, cfg->pos + 2, cfg->idx); - pci_read_config_dword(cfg->dev, cfg->pos + 4, &data); + if (cfg->msg.address_lo != msg->address_lo) { + pci_write_config_byte(cfg->dev, cfg->pos + 2, cfg->idx); + pci_write_config_dword(cfg->dev, cfg->pos + 4, msg->address_lo); + } + if (cfg->msg.address_hi != msg->address_hi) { + pci_write_config_byte(cfg->dev, cfg->pos + 2, cfg->idx + 1); + pci_write_config_dword(cfg->dev, cfg->pos + 4, msg->address_hi); + } + if (cfg->update) + cfg->update(cfg->dev, irq, msg); spin_unlock_irqrestore(&ht_irq_lock, flags); - return data; + cfg->msg = *msg; } -u32 read_ht_irq_high(unsigned int irq) +void fetch_ht_irq_msg(unsigned int irq, struct ht_irq_msg *msg) { struct ht_irq_cfg *cfg = get_irq_data(irq); - unsigned long flags; - u32 data; - spin_lock_irqsave(&ht_irq_lock, flags); - pci_write_config_byte(cfg->dev, cfg->pos + 2, cfg->idx + 1); - pci_read_config_dword(cfg->dev, cfg->pos + 4, &data); - spin_unlock_irqrestore(&ht_irq_lock, flags); - return data; + *msg = cfg->msg; } void mask_ht_irq(unsigned int irq) { struct ht_irq_cfg *cfg; - unsigned long flags; - u32 data; + struct ht_irq_msg msg; cfg = get_irq_data(irq); - spin_lock_irqsave(&ht_irq_lock, flags); - pci_write_config_byte(cfg->dev, cfg->pos + 2, cfg->idx); - pci_read_config_dword(cfg->dev, cfg->pos + 4, &data); - data |= 1; - pci_write_config_dword(cfg->dev, cfg->pos + 4, data); - spin_unlock_irqrestore(&ht_irq_lock, flags); + msg = cfg->msg; + msg.address_lo |= 1; + write_ht_irq_msg(irq, &msg); } void unmask_ht_irq(unsigned int irq) { struct ht_irq_cfg *cfg; - unsigned long flags; - u32 data; + struct ht_irq_msg msg; cfg = get_irq_data(irq); - spin_lock_irqsave(&ht_irq_lock, flags); - pci_write_config_byte(cfg->dev, cfg->pos + 2, cfg->idx); - pci_read_config_dword(cfg->dev, cfg->pos + 4, &data); - data &= ~1; - pci_write_config_dword(cfg->dev, cfg->pos + 4, data); - spin_unlock_irqrestore(&ht_irq_lock, flags); + msg = cfg->msg; + msg.address_lo &= ~1; + write_ht_irq_msg(irq, &msg); } /** - * ht_create_irq - create an irq and attach it to a device. + * __ht_create_irq - create an irq and attach it to a device. * @dev: The hypertransport device to find the irq capability on. * @idx: Which of the possible irqs to attach to. - * - * ht_create_irq is needs to be called for all hypertransport devices - * that generate irqs. + * @update: Function to be called when changing the htirq message * * The irq number of the new irq or a negative error value is returned. */ -int ht_create_irq(struct pci_dev *dev, int idx) +int __ht_create_irq(struct pci_dev *dev, int idx, ht_irq_update_t *update) { struct ht_irq_cfg *cfg; unsigned long flags; @@ -150,8 +125,12 @@ return -ENOMEM; cfg->dev = dev; + cfg->update = update; cfg->pos = pos; cfg->idx = 0x10 + (idx * 2); + /* Initialize msg to a value that will never match the first write. */ + cfg->msg.address_lo = 0xffffffff; + cfg->msg.address_hi = 0xffffffff; irq = create_irq(); if (irq < 0) { @@ -169,6 +148,21 @@ } /** + * ht_create_irq - create an irq and attach it to a device. + * @dev: The hypertransport device to find the irq capability on. + * @idx: Which of the possible irqs to attach to. + * + * ht_create_irq needs to be called for all hypertransport devices + * that generate irqs. + * + * The irq number of the new irq or a negative error value is returned. + */ +int ht_create_irq(struct pci_dev *dev, int idx) +{ + return __ht_create_irq(dev, idx, NULL); +} + +/** * ht_destroy_irq - destroy an irq created with ht_create_irq * * This reverses ht_create_irq removing the specified irq from @@ -186,5 +180,6 @@ kfree(cfg); } +EXPORT_SYMBOL(__ht_create_irq); EXPORT_SYMBOL(ht_create_irq); EXPORT_SYMBOL(ht_destroy_irq); diff -urN linux-2.6.19-rc5/drivers/pci/pci-sysfs.c linux-2.6.19-rc6/drivers/pci/pci-sysfs.c --- linux-2.6.19-rc5/drivers/pci/pci-sysfs.c 2006-11-16 05:11:41.192414545 +0000 +++ linux-2.6.19-rc6/drivers/pci/pci-sysfs.c 2006-11-16 05:11:46.440984557 +0000 @@ -642,6 +642,9 @@ */ void pci_remove_sysfs_dev_files(struct pci_dev *pdev) { + if (!sysfs_initialized) + return; + if (pdev->cfg_size < 4096) sysfs_remove_bin_file(&pdev->dev.kobj, &pci_config_attr); else diff -urN linux-2.6.19-rc5/drivers/pci/quirks.c linux-2.6.19-rc6/drivers/pci/quirks.c --- linux-2.6.19-rc5/drivers/pci/quirks.c 2006-11-16 05:11:41.200415414 +0000 +++ linux-2.6.19-rc6/drivers/pci/quirks.c 2006-11-16 05:11:46.444984991 +0000 @@ -1460,33 +1460,6 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x260a, quirk_intel_pcie_pm); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x260b, quirk_intel_pcie_pm); -/* - * Fixup the cardbus bridges on the IBM Dock II docking station - */ -static void __devinit quirk_ibm_dock2_cardbus(struct pci_dev *dev) -{ - u32 val; - - /* - * tie the 2 interrupt pins to INTA, and configure the - * multifunction routing register to handle this. - */ - if ((dev->subsystem_vendor == PCI_VENDOR_ID_IBM) && - (dev->subsystem_device == 0x0148)) { - printk(KERN_INFO "PCI: Found IBM Dock II Cardbus Bridge " - "applying quirk\n"); - pci_read_config_dword(dev, 0x8c, &val); - val = ((val & 0xffffff00) | 0x1002); - pci_write_config_dword(dev, 0x8c, val); - pci_read_config_dword(dev, 0x80, &val); - val = ((val & 0x00ffff00) | 0x2864c077); - pci_write_config_dword(dev, 0x80, val); - } -} - -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1420, - quirk_ibm_dock2_cardbus); - static void __devinit quirk_netmos(struct pci_dev *dev) { unsigned int num_parallel = (dev->subsystem_device & 0xf0) >> 4; diff -urN linux-2.6.19-rc5/drivers/scsi/scsi_scan.c linux-2.6.19-rc6/drivers/scsi/scsi_scan.c --- linux-2.6.19-rc5/drivers/scsi/scsi_scan.c 2006-11-16 05:11:41.460443654 +0000 +++ linux-2.6.19-rc6/drivers/scsi/scsi_scan.c 2006-11-16 05:11:46.697012362 +0000 @@ -631,12 +631,22 @@ * scanning run at their own risk, or supply a user level program * that can correctly scan. */ - sdev->inquiry = kmalloc(sdev->inquiry_len, GFP_ATOMIC); - if (sdev->inquiry == NULL) { + + /* + * Copy at least 36 bytes of INQUIRY data, so that we don't + * dereference unallocated memory when accessing the Vendor, + * Product, and Revision strings. Badly behaved devices may set + * the INQUIRY Additional Length byte to a small value, indicating + * these strings are invalid, but often they contain plausible data + * nonetheless. It doesn't matter if the device sent < 36 bytes + * total, since scsi_probe_lun() initializes inq_result with 0s. + */ + sdev->inquiry = kmemdup(inq_result, + max_t(size_t, sdev->inquiry_len, 36), + GFP_ATOMIC); + if (sdev->inquiry == NULL) return SCSI_SCAN_NO_RESPONSE; - } - memcpy(sdev->inquiry, inq_result, sdev->inquiry_len); sdev->vendor = (char *) (sdev->inquiry + 8); sdev->model = (char *) (sdev->inquiry + 16); sdev->rev = (char *) (sdev->inquiry + 32); diff -urN linux-2.6.19-rc5/drivers/serial/cpm_uart/cpm_uart.h linux-2.6.19-rc6/drivers/serial/cpm_uart/cpm_uart.h --- linux-2.6.19-rc5/drivers/serial/cpm_uart/cpm_uart.h 2006-11-16 05:11:41.488446695 +0000 +++ linux-2.6.19-rc6/drivers/serial/cpm_uart/cpm_uart.h 2006-11-16 05:11:46.725015403 +0000 @@ -88,7 +88,7 @@ /* these are located in their respective files */ void cpm_line_cr_cmd(int line, int cmd); -int cpm_uart_init_portdesc(void); +int __init cpm_uart_init_portdesc(void); int cpm_uart_allocbuf(struct uart_cpm_port *pinfo, unsigned int is_con); void cpm_uart_freebuf(struct uart_cpm_port *pinfo); diff -urN linux-2.6.19-rc5/drivers/serial/cpm_uart/cpm_uart_core.c linux-2.6.19-rc6/drivers/serial/cpm_uart/cpm_uart_core.c --- linux-2.6.19-rc5/drivers/serial/cpm_uart/cpm_uart_core.c 2006-11-16 05:11:41.488446695 +0000 +++ linux-2.6.19-rc6/drivers/serial/cpm_uart/cpm_uart_core.c 2006-11-16 05:11:46.725015403 +0000 @@ -195,10 +195,8 @@ if (cpm_uart_tx_pump(port) != 0) { if (IS_SMC(pinfo)) { smcp->smc_smcm |= SMCM_TX; - smcp->smc_smcmr |= SMCMR_TEN; } else { sccp->scc_sccm |= UART_SCCM_TX; - pinfo->sccp->scc_gsmrl |= SCC_GSMRL_ENT; } } } @@ -421,9 +419,10 @@ /* Startup rx-int */ if (IS_SMC(pinfo)) { pinfo->smcp->smc_smcm |= SMCM_RX; - pinfo->smcp->smc_smcmr |= SMCMR_REN; + pinfo->smcp->smc_smcmr |= (SMCMR_REN | SMCMR_TEN); } else { pinfo->sccp->scc_sccm |= UART_SCCM_RX; + pinfo->sccp->scc_gsmrl |= (SCC_GSMRL_ENR | SCC_GSMRL_ENT); } if (!(pinfo->flags & FLAG_CONSOLE)) @@ -1350,11 +1349,10 @@ pr_info("cpm_uart: WARNING: no UART devices found on platform bus!\n"); pr_info( "cpm_uart: the driver will guess configuration, but this mode is no longer supported.\n"); -#ifndef CONFIG_SERIAL_CPM_CONSOLE - ret = cpm_uart_init_portdesc(); - if (ret) - return ret; -#endif + + /* Don't run this again, if the console driver did it already */ + if (cpm_uart_nr == 0) + cpm_uart_init_portdesc(); cpm_reg.nr = cpm_uart_nr; ret = uart_register_driver(&cpm_reg); @@ -1366,6 +1364,8 @@ int con = cpm_uart_port_map[i]; cpm_uart_ports[con].port.line = i; cpm_uart_ports[con].port.flags = UPF_BOOT_AUTOCONF; + if (cpm_uart_ports[con].set_lineif) + cpm_uart_ports[con].set_lineif(&cpm_uart_ports[con]); uart_add_one_port(&cpm_reg, &cpm_uart_ports[con].port); } diff -urN linux-2.6.19-rc5/drivers/serial/cpm_uart/cpm_uart_cpm1.c linux-2.6.19-rc6/drivers/serial/cpm_uart/cpm_uart_cpm1.c --- linux-2.6.19-rc5/drivers/serial/cpm_uart/cpm_uart_cpm1.c 2006-09-20 03:42:06.000000000 +0000 +++ linux-2.6.19-rc6/drivers/serial/cpm_uart/cpm_uart_cpm1.c 2006-11-16 05:11:46.725015403 +0000 @@ -184,7 +184,7 @@ } /* Setup any dynamic params in the uart desc */ -int cpm_uart_init_portdesc(void) +int __init cpm_uart_init_portdesc(void) { pr_debug("CPM uart[-]:init portdesc\n"); diff -urN linux-2.6.19-rc5/drivers/telephony/ixj.h linux-2.6.19-rc6/drivers/telephony/ixj.h --- linux-2.6.19-rc5/drivers/telephony/ixj.h 2006-09-20 03:42:06.000000000 +0000 +++ linux-2.6.19-rc6/drivers/telephony/ixj.h 2006-11-16 05:11:46.753018445 +0000 @@ -1295,7 +1295,7 @@ Proc_Info_Type Info_write; unsigned short frame_count; unsigned int filter_hist[4]; - unsigned char filter_en[4]; + unsigned char filter_en[6]; unsigned short proc_load; unsigned long framesread; unsigned long frameswritten; diff -urN linux-2.6.19-rc5/drivers/video/nvidia/nv_hw.c linux-2.6.19-rc6/drivers/video/nvidia/nv_hw.c --- linux-2.6.19-rc5/drivers/video/nvidia/nv_hw.c 2006-09-20 03:42:06.000000000 +0000 +++ linux-2.6.19-rc6/drivers/video/nvidia/nv_hw.c 2006-11-16 05:11:46.889033216 +0000 @@ -145,12 +145,18 @@ if (par->Architecture >= NV_ARCH_40) { pll = NV_RD32(par->PMC, 0x4020); - P = (pll >> 16) & 0x03; + P = (pll >> 16) & 0x07; pll = NV_RD32(par->PMC, 0x4024); M = pll & 0xFF; N = (pll >> 8) & 0xFF; - MB = (pll >> 16) & 0xFF; - NB = (pll >> 24) & 0xFF; + if (((par->Chipset & 0xfff0) == 0x0290) || + ((par->Chipset & 0xfff0) == 0x0390)) { + MB = 1; + NB = 1; + } else { + MB = (pll >> 16) & 0xFF; + NB = (pll >> 24) & 0xFF; + } *MClk = ((N * NB * par->CrystalFreqKHz) / (M * MB)) >> P; pll = NV_RD32(par->PMC, 0x4000); diff -urN linux-2.6.19-rc5/drivers/video/nvidia/nv_setup.c linux-2.6.19-rc6/drivers/video/nvidia/nv_setup.c --- linux-2.6.19-rc5/drivers/video/nvidia/nv_setup.c 2006-09-20 03:42:06.000000000 +0000 +++ linux-2.6.19-rc6/drivers/video/nvidia/nv_setup.c 2006-11-16 05:11:46.889033216 +0000 @@ -262,7 +262,7 @@ #endif dev = pci_find_slot(0, 1); - if ((par->Chipset && 0xffff) == 0x01a0) { + if ((par->Chipset & 0xffff) == 0x01a0) { int amt = 0; pci_read_config_dword(dev, 0x7c, &amt); @@ -359,6 +359,7 @@ case 0x0186: case 0x0187: case 0x018D: + case 0x0228: case 0x0286: case 0x028C: case 0x0316: @@ -382,6 +383,10 @@ case 0x034C: case 0x0160: case 0x0166: + case 0x0169: + case 0x016B: + case 0x016C: + case 0x016D: case 0x00C8: case 0x00CC: case 0x0144: @@ -639,12 +644,23 @@ par->fpHeight = NV_RD32(par->PRAMDAC, 0x0800) + 1; par->fpSyncs = NV_RD32(par->PRAMDAC, 0x0848) & 0x30000033; - printk("Panel size is %i x %i\n", par->fpWidth, par->fpHeight); + printk("nvidiafb: Panel size is %i x %i\n", par->fpWidth, par->fpHeight); } if (monA) info->monspecs = *monA; + if (!par->FlatPanel || !par->twoHeads) + par->FPDither = 0; + + par->LVDS = 0; + if (par->FlatPanel && par->twoHeads) { + NV_WR32(par->PRAMDAC0, 0x08B0, 0x00010004); + if (par->PRAMDAC0[0x08b4] & 1) + par->LVDS = 1; + printk("nvidiafb: Panel is %s\n", par->LVDS ? "LVDS" : "TMDS"); + } + kfree(edidA); kfree(edidB); done: diff -urN linux-2.6.19-rc5/drivers/video/nvidia/nv_type.h linux-2.6.19-rc6/drivers/video/nvidia/nv_type.h --- linux-2.6.19-rc5/drivers/video/nvidia/nv_type.h 2006-09-20 03:42:06.000000000 +0000 +++ linux-2.6.19-rc6/drivers/video/nvidia/nv_type.h 2006-11-16 05:11:46.889033216 +0000 @@ -129,6 +129,7 @@ int fpHeight; int PanelTweak; int paneltweak; + int LVDS; int pm_state; u32 crtcSync_read; u32 fpSyncs; diff -urN linux-2.6.19-rc5/drivers/video/nvidia/nvidia.c linux-2.6.19-rc6/drivers/video/nvidia/nvidia.c --- linux-2.6.19-rc5/drivers/video/nvidia/nvidia.c 2006-11-16 05:11:41.652464508 +0000 +++ linux-2.6.19-rc6/drivers/video/nvidia/nvidia.c 2006-11-16 05:11:46.889033216 +0000 @@ -1160,20 +1160,20 @@ case 0x0340: /* GeForceFX 5700 */ arch = NV_ARCH_30; break; - case 0x0040: - case 0x00C0: - case 0x0120: + case 0x0040: /* GeForce 6800 */ + case 0x00C0: /* GeForce 6800 */ + case 0x0120: /* GeForce 6800 */ case 0x0130: - case 0x0140: - case 0x0160: - case 0x01D0: - case 0x0090: - case 0x0210: - case 0x0220: + case 0x0140: /* GeForce 6600 */ + case 0x0160: /* GeForce 6200 */ + case 0x01D0: /* GeForce 7200, 7300, 7400 */ + case 0x0090: /* GeForce 7800 */ + case 0x0210: /* GeForce 6800 */ + case 0x0220: /* GeForce 6200 */ case 0x0230: - case 0x0240: - case 0x0290: - case 0x0390: + case 0x0240: /* GeForce 6100 */ + case 0x0290: /* GeForce 7900 */ + case 0x0390: /* GeForce 7600 */ arch = NV_ARCH_40; break; case 0x0020: /* TNT, TNT2 */ diff -urN linux-2.6.19-rc5/fs/autofs/inode.c linux-2.6.19-rc6/fs/autofs/inode.c --- linux-2.6.19-rc5/fs/autofs/inode.c 2006-11-16 05:11:41.672466680 +0000 +++ linux-2.6.19-rc6/fs/autofs/inode.c 2006-11-16 05:11:46.909035389 +0000 @@ -25,6 +25,14 @@ struct autofs_sb_info *sbi = autofs_sbi(sb); unsigned int n; + /* + * In the event of a failure in get_sb_nodev the superblock + * info is not present so nothing else has been setup, so + * just exit when we are called from deactivate_super. + */ + if (!sbi) + return; + if ( !sbi->catatonic ) autofs_catatonic_mode(sbi); /* Free wait queues, close pipe */ @@ -136,7 +144,8 @@ s->s_fs_info = sbi; sbi->magic = AUTOFS_SBI_MAGIC; - sbi->catatonic = 0; + sbi->pipe = NULL; + sbi->catatonic = 1; sbi->exp_timeout = 0; sbi->oz_pgrp = process_group(current); autofs_initialize_hash(&sbi->dirhash); @@ -180,6 +189,7 @@ if ( !pipe->f_op || !pipe->f_op->write ) goto fail_fput; sbi->pipe = pipe; + sbi->catatonic = 0; /* * Success! Install the root dentry now to indicate completion. @@ -198,6 +208,8 @@ iput(root_inode); fail_free: kfree(sbi); + s->s_fs_info = NULL; + kill_anon_super(s); fail_unlock: return -EINVAL; } diff -urN linux-2.6.19-rc5/fs/autofs/waitq.c linux-2.6.19-rc6/fs/autofs/waitq.c --- linux-2.6.19-rc5/fs/autofs/waitq.c 2006-09-20 03:42:06.000000000 +0000 +++ linux-2.6.19-rc6/fs/autofs/waitq.c 2006-11-16 05:11:46.909035389 +0000 @@ -41,6 +41,7 @@ wq = nwq; } fput(sbi->pipe); /* Close the pipe */ + sbi->pipe = NULL; autofs_hash_dputall(&sbi->dirhash); /* Remove all dentry pointers */ } diff -urN linux-2.6.19-rc5/fs/autofs4/inode.c linux-2.6.19-rc6/fs/autofs4/inode.c --- linux-2.6.19-rc5/fs/autofs4/inode.c 2006-11-16 05:11:41.672466680 +0000 +++ linux-2.6.19-rc6/fs/autofs4/inode.c 2006-11-16 05:11:46.909035389 +0000 @@ -99,6 +99,9 @@ struct dentry *this_parent = sbi->sb->s_root; struct list_head *next; + if (!sbi->sb->s_root) + return; + spin_lock(&dcache_lock); repeat: next = this_parent->d_subdirs.next; @@ -146,6 +149,14 @@ { struct autofs_sb_info *sbi = autofs4_sbi(sb); + /* + * In the event of a failure in get_sb_nodev the superblock + * info is not present so nothing else has been setup, so + * just exit when we are called from deactivate_super. + */ + if (!sbi) + return; + sb->s_fs_info = NULL; if ( !sbi->catatonic ) @@ -310,7 +321,8 @@ s->s_fs_info = sbi; sbi->magic = AUTOFS_SBI_MAGIC; sbi->pipefd = -1; - sbi->catatonic = 0; + sbi->pipe = NULL; + sbi->catatonic = 1; sbi->exp_timeout = 0; sbi->oz_pgrp = process_group(current); sbi->sb = s; @@ -388,6 +400,7 @@ goto fail_fput; sbi->pipe = pipe; sbi->pipefd = pipefd; + sbi->catatonic = 0; /* * Success! Install the root dentry now to indicate completion. @@ -412,6 +425,8 @@ kfree(ino); fail_free: kfree(sbi); + s->s_fs_info = NULL; + kill_anon_super(s); fail_unlock: return -EINVAL; } diff -urN linux-2.6.19-rc5/fs/autofs4/waitq.c linux-2.6.19-rc6/fs/autofs4/waitq.c --- linux-2.6.19-rc5/fs/autofs4/waitq.c 2006-11-16 05:11:41.672466680 +0000 +++ linux-2.6.19-rc6/fs/autofs4/waitq.c 2006-11-16 05:11:46.909035389 +0000 @@ -41,10 +41,8 @@ wake_up_interruptible(&wq->queue); wq = nwq; } - if (sbi->pipe) { - fput(sbi->pipe); /* Close the pipe */ - sbi->pipe = NULL; - } + fput(sbi->pipe); /* Close the pipe */ + sbi->pipe = NULL; } static int autofs4_write(struct file *file, const void *addr, int bytes) diff -urN linux-2.6.19-rc5/fs/cifs/file.c linux-2.6.19-rc6/fs/cifs/file.c --- linux-2.6.19-rc5/fs/cifs/file.c 2006-11-16 05:11:41.692468853 +0000 +++ linux-2.6.19-rc6/fs/cifs/file.c 2006-11-16 05:11:46.929037561 +0000 @@ -492,10 +492,14 @@ the struct would be in each open file, but this should give enough time to clear the socket */ - cERROR(1,("close with pending writes")); +#ifdef CONFIG_CIFS_DEBUG2 + cFYI(1,("close delay, write pending")); +#endif /* DEBUG2 */ msleep(timeout); timeout *= 4; - } + } + if(atomic_read(&pSMBFile->wrtPending)) + cERROR(1,("close with pending writes")); rc = CIFSSMBClose(xid, pTcon, pSMBFile->netfid); } diff -urN linux-2.6.19-rc5/fs/cifs/inode.c linux-2.6.19-rc6/fs/cifs/inode.c --- linux-2.6.19-rc5/fs/cifs/inode.c 2006-11-16 05:11:41.692468853 +0000 +++ linux-2.6.19-rc6/fs/cifs/inode.c 2006-11-16 05:11:46.929037561 +0000 @@ -1089,8 +1089,10 @@ struct kstat *stat) { int err = cifs_revalidate(dentry); - if (!err) + if (!err) { generic_fillattr(dentry->d_inode, stat); + stat->blksize = CIFS_MAX_MSGSIZE; + } return err; } diff -urN linux-2.6.19-rc5/fs/cifs/sess.c linux-2.6.19-rc6/fs/cifs/sess.c --- linux-2.6.19-rc5/fs/cifs/sess.c 2006-11-16 05:11:41.692468853 +0000 +++ linux-2.6.19-rc6/fs/cifs/sess.c 2006-11-16 05:11:46.933037995 +0000 @@ -90,7 +90,9 @@ } */ /* copy user */ if(ses->userName == NULL) { - /* BB what about null user mounts - check that we do this BB */ + /* null user mount */ + *bcc_ptr = 0; + *(bcc_ptr+1) = 0; } else { /* 300 should be long enough for any conceivable user name */ bytes_ret = cifs_strtoUCS((__le16 *) bcc_ptr, ses->userName, 300, nls_cp); @@ -98,10 +100,13 @@ bcc_ptr += 2 * bytes_ret; bcc_ptr += 2; /* account for null termination */ /* copy domain */ - if(ses->domainName == NULL) - bytes_ret = cifs_strtoUCS((__le16 *) bcc_ptr, - "CIFS_LINUX_DOM", 32, nls_cp); - else + if(ses->domainName == NULL) { + /* Sending null domain better than using a bogus domain name (as + we did briefly in 2.6.18) since server will use its default */ + *bcc_ptr = 0; + *(bcc_ptr+1) = 0; + bytes_ret = 0; + } else bytes_ret = cifs_strtoUCS((__le16 *) bcc_ptr, ses->domainName, 256, nls_cp); bcc_ptr += 2 * bytes_ret; @@ -144,13 +149,11 @@ /* copy domain */ - if(ses->domainName == NULL) { - strcpy(bcc_ptr, "CIFS_LINUX_DOM"); - bcc_ptr += 14; /* strlen(CIFS_LINUX_DOM) */ - } else { + if(ses->domainName != NULL) { strncpy(bcc_ptr, ses->domainName, 256); bcc_ptr += strnlen(ses->domainName, 256); - } + } /* else we will send a null domain name + so the server will default to its own domain */ *bcc_ptr = 0; bcc_ptr++; diff -urN linux-2.6.19-rc5/fs/hugetlbfs/inode.c linux-2.6.19-rc6/fs/hugetlbfs/inode.c --- linux-2.6.19-rc5/fs/hugetlbfs/inode.c 2006-11-16 05:11:41.792479714 +0000 +++ linux-2.6.19-rc6/fs/hugetlbfs/inode.c 2006-11-16 05:11:47.033048857 +0000 @@ -62,24 +62,19 @@ loff_t len, vma_len; int ret; - if (vma->vm_pgoff & (HPAGE_SIZE / PAGE_SIZE - 1)) - return -EINVAL; - - if (vma->vm_start & ~HPAGE_MASK) - return -EINVAL; - - if (vma->vm_end & ~HPAGE_MASK) - return -EINVAL; - - if (vma->vm_end - vma->vm_start < HPAGE_SIZE) - return -EINVAL; + /* + * vma alignment has already been checked by prepare_hugepage_range. + * If you add any error returns here, do so after setting VM_HUGETLB, + * so is_vm_hugetlb_page tests below unmap_region go the right way + * when do_mmap_pgoff unwinds (may be important on powerpc and ia64). + */ + vma->vm_flags |= VM_HUGETLB | VM_RESERVED; + vma->vm_ops = &hugetlb_vm_ops; vma_len = (loff_t)(vma->vm_end - vma->vm_start); mutex_lock(&inode->i_mutex); file_accessed(file); - vma->vm_flags |= VM_HUGETLB | VM_RESERVED; - vma->vm_ops = &hugetlb_vm_ops; ret = -ENOMEM; len = vma_len + ((loff_t)vma->vm_pgoff << PAGE_SHIFT); diff -urN linux-2.6.19-rc5/fs/nfsd/nfs3proc.c linux-2.6.19-rc6/fs/nfsd/nfs3proc.c --- linux-2.6.19-rc5/fs/nfsd/nfs3proc.c 2006-11-16 05:11:41.864487535 +0000 +++ linux-2.6.19-rc6/fs/nfsd/nfs3proc.c 2006-11-16 05:11:47.101056243 +0000 @@ -258,7 +258,7 @@ /* Now create the file and set attributes */ nfserr = nfsd_create_v3(rqstp, dirfhp, argp->name, argp->len, attr, newfhp, - argp->createmode, argp->verf, NULL); + argp->createmode, argp->verf, NULL, NULL); RETURN_STATUS(nfserr); } diff -urN linux-2.6.19-rc5/fs/nfsd/nfs4proc.c linux-2.6.19-rc6/fs/nfsd/nfs4proc.c --- linux-2.6.19-rc5/fs/nfsd/nfs4proc.c 2006-11-16 05:11:41.868487969 +0000 +++ linux-2.6.19-rc6/fs/nfsd/nfs4proc.c 2006-11-16 05:11:47.105056677 +0000 @@ -93,6 +93,7 @@ { struct svc_fh resfh; __be32 status; + int created = 0; fh_init(&resfh, NFS4_FHSIZE); open->op_truncate = 0; @@ -105,28 +106,27 @@ status = nfsd_create_v3(rqstp, current_fh, open->op_fname.data, open->op_fname.len, &open->op_iattr, &resfh, open->op_createmode, - (u32 *)open->op_verf.data, &open->op_truncate); - } - else { + (u32 *)open->op_verf.data, &open->op_truncate, &created); + } else { status = nfsd_lookup(rqstp, current_fh, open->op_fname.data, open->op_fname.len, &resfh); fh_unlock(current_fh); } + if (status) + goto out; - if (!status) { - set_change_info(&open->op_cinfo, current_fh); + set_change_info(&open->op_cinfo, current_fh); - /* set reply cache */ - fh_dup2(current_fh, &resfh); - open->op_stateowner->so_replay.rp_openfh_len = - resfh.fh_handle.fh_size; - memcpy(open->op_stateowner->so_replay.rp_openfh, - &resfh.fh_handle.fh_base, - resfh.fh_handle.fh_size); + /* set reply cache */ + fh_dup2(current_fh, &resfh); + open->op_stateowner->so_replay.rp_openfh_len = resfh.fh_handle.fh_size; + memcpy(open->op_stateowner->so_replay.rp_openfh, + &resfh.fh_handle.fh_base, resfh.fh_handle.fh_size); + if (!created) status = do_open_permission(rqstp, current_fh, open, MAY_NOP); - } +out: fh_put(&resfh); return status; } diff -urN linux-2.6.19-rc5/fs/nfsd/vfs.c linux-2.6.19-rc6/fs/nfsd/vfs.c --- linux-2.6.19-rc5/fs/nfsd/vfs.c 2006-11-16 05:11:41.876488838 +0000 +++ linux-2.6.19-rc6/fs/nfsd/vfs.c 2006-11-16 05:11:47.113057546 +0000 @@ -1177,7 +1177,7 @@ /* * Get the dir op function pointer. */ - err = nfserr_perm; + err = 0; switch (type) { case S_IFREG: host_err = vfs_create(dirp, dchild, iap->ia_mode, NULL); @@ -1237,7 +1237,7 @@ nfsd_create_v3(struct svc_rqst *rqstp, struct svc_fh *fhp, char *fname, int flen, struct iattr *iap, struct svc_fh *resfhp, int createmode, u32 *verifier, - int *truncp) + int *truncp, int *created) { struct dentry *dentry, *dchild = NULL; struct inode *dirp; @@ -1331,6 +1331,8 @@ host_err = vfs_create(dirp, dchild, iap->ia_mode, NULL); if (host_err < 0) goto out_nfserr; + if (created) + *created = 1; if (EX_ISSYNC(fhp->fh_export)) { err = nfserrno(nfsd_sync_dir(dentry)); diff -urN linux-2.6.19-rc5/fs/xfs/Makefile-linux-2.6 linux-2.6.19-rc6/fs/xfs/Makefile-linux-2.6 --- linux-2.6.19-rc5/fs/xfs/Makefile-linux-2.6 2006-11-16 05:11:41.972499265 +0000 +++ linux-2.6.19-rc6/fs/xfs/Makefile-linux-2.6 2006-11-16 05:11:47.209067973 +0000 @@ -21,22 +21,7 @@ XFS_LINUX := linux-2.6 ifeq ($(CONFIG_XFS_DEBUG),y) - EXTRA_CFLAGS += -g -DSTATIC="" -DDEBUG - EXTRA_CFLAGS += -DXFS_BUF_LOCK_TRACKING -endif -ifeq ($(CONFIG_XFS_TRACE),y) - EXTRA_CFLAGS += -DXFS_ALLOC_TRACE - EXTRA_CFLAGS += -DXFS_ATTR_TRACE - EXTRA_CFLAGS += -DXFS_BLI_TRACE - EXTRA_CFLAGS += -DXFS_BMAP_TRACE - EXTRA_CFLAGS += -DXFS_BMBT_TRACE - EXTRA_CFLAGS += -DXFS_DIR2_TRACE - EXTRA_CFLAGS += -DXFS_DQUOT_TRACE - EXTRA_CFLAGS += -DXFS_ILOCK_TRACE - EXTRA_CFLAGS += -DXFS_LOG_TRACE - EXTRA_CFLAGS += -DXFS_RW_TRACE - EXTRA_CFLAGS += -DXFS_BUF_TRACE - EXTRA_CFLAGS += -DXFS_VNODE_TRACE + EXTRA_CFLAGS += -g endif obj-$(CONFIG_XFS_FS) += xfs.o diff -urN linux-2.6.19-rc5/fs/xfs/linux-2.6/xfs_buf.c linux-2.6.19-rc6/fs/xfs/linux-2.6/xfs_buf.c --- linux-2.6.19-rc5/fs/xfs/linux-2.6/xfs_buf.c 2006-11-16 05:11:41.972499265 +0000 +++ linux-2.6.19-rc6/fs/xfs/linux-2.6/xfs_buf.c 2006-11-16 05:11:47.209067973 +0000 @@ -15,6 +15,7 @@ * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "xfs.h" #include #include #include @@ -31,7 +32,6 @@ #include #include #include -#include "xfs_linux.h" STATIC kmem_zone_t *xfs_buf_zone; STATIC kmem_shaker_t xfs_buf_shake; @@ -1406,7 +1406,7 @@ btp->bt_hashshift = external ? 3 : 8; /* 8 or 256 buckets */ btp->bt_hashmask = (1 << btp->bt_hashshift) - 1; btp->bt_hash = kmem_zalloc((1 << btp->bt_hashshift) * - sizeof(xfs_bufhash_t), KM_SLEEP); + sizeof(xfs_bufhash_t), KM_SLEEP | KM_LARGE); for (i = 0; i < (1 << btp->bt_hashshift); i++) { spin_lock_init(&btp->bt_hash[i].bh_lock); INIT_LIST_HEAD(&btp->bt_hash[i].bh_list); diff -urN linux-2.6.19-rc5/fs/xfs/linux-2.6/xfs_dmapi_priv.h linux-2.6.19-rc6/fs/xfs/linux-2.6/xfs_dmapi_priv.h --- linux-2.6.19-rc5/fs/xfs/linux-2.6/xfs_dmapi_priv.h 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.6.19-rc6/fs/xfs/linux-2.6/xfs_dmapi_priv.h 2006-11-16 05:11:47.209067973 +0000 @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2000-2006 Silicon Graphics, Inc. + * All Rights Reserved. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +#ifndef __XFS_DMAPI_PRIV_H__ +#define __XFS_DMAPI_PRIV_H__ + +/* + * Based on IO_ISDIRECT, decide which i_ flag is set. + */ +#define DM_SEM_FLAG_RD(ioflags) (((ioflags) & IO_ISDIRECT) ? \ + DM_FLAGS_IMUX : 0) +#define DM_SEM_FLAG_WR (DM_FLAGS_IALLOCSEM_WR | DM_FLAGS_IMUX) + +#endif /*__XFS_DMAPI_PRIV_H__*/ diff -urN linux-2.6.19-rc5/fs/xfs/linux-2.6/xfs_ioctl.c linux-2.6.19-rc6/fs/xfs/linux-2.6/xfs_ioctl.c --- linux-2.6.19-rc5/fs/xfs/linux-2.6/xfs_ioctl.c 2006-11-16 05:11:41.972499265 +0000 +++ linux-2.6.19-rc6/fs/xfs/linux-2.6/xfs_ioctl.c 2006-11-16 05:11:47.213068407 +0000 @@ -341,8 +341,11 @@ put_unused_fd(new_fd); return -XFS_ERROR(-PTR_ERR(filp)); } - if (inode->i_mode & S_IFREG) + if (inode->i_mode & S_IFREG) { + /* invisible operation should not change atime */ + filp->f_flags |= O_NOATIME; filp->f_op = &xfs_invis_file_operations; + } fd_install(new_fd, filp); return new_fd; diff -urN linux-2.6.19-rc5/fs/xfs/linux-2.6/xfs_super.c linux-2.6.19-rc6/fs/xfs/linux-2.6/xfs_super.c --- linux-2.6.19-rc5/fs/xfs/linux-2.6/xfs_super.c 2006-11-16 05:11:41.976499699 +0000 +++ linux-2.6.19-rc6/fs/xfs/linux-2.6/xfs_super.c 2006-11-16 05:11:47.213068407 +0000 @@ -227,9 +227,7 @@ xfs_revalidate_inode(XFS_BHVTOM(bdp), vp, ip); xfs_set_inodeops(inode); - spin_lock(&ip->i_flags_lock); - ip->i_flags &= ~XFS_INEW; - spin_unlock(&ip->i_flags_lock); + xfs_iflags_clear(ip, XFS_INEW); barrier(); unlock_new_inode(inode); diff -urN linux-2.6.19-rc5/fs/xfs/support/debug.c linux-2.6.19-rc6/fs/xfs/support/debug.c --- linux-2.6.19-rc5/fs/xfs/support/debug.c 2006-11-16 05:11:41.976499699 +0000 +++ linux-2.6.19-rc6/fs/xfs/support/debug.c 2006-11-16 05:11:47.217068842 +0000 @@ -15,11 +15,9 @@ * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include #include "debug.h" #include "spin.h" -#include -#include -#include static char message[256]; /* keep it off the stack */ static DEFINE_SPINLOCK(xfs_err_lock); diff -urN linux-2.6.19-rc5/fs/xfs/support/move.c linux-2.6.19-rc6/fs/xfs/support/move.c --- linux-2.6.19-rc5/fs/xfs/support/move.c 2006-09-20 03:42:06.000000000 +0000 +++ linux-2.6.19-rc6/fs/xfs/support/move.c 2006-11-16 05:11:47.217068842 +0000 @@ -22,7 +22,7 @@ * as we go. */ int -uio_read(caddr_t src, size_t len, struct uio *uio) +xfs_uio_read(caddr_t src, size_t len, struct uio *uio) { size_t count; diff -urN linux-2.6.19-rc5/fs/xfs/support/move.h linux-2.6.19-rc6/fs/xfs/support/move.h --- linux-2.6.19-rc5/fs/xfs/support/move.h 2006-09-20 03:42:06.000000000 +0000 +++ linux-2.6.19-rc6/fs/xfs/support/move.h 2006-11-16 05:11:47.217068842 +0000 @@ -65,6 +65,6 @@ typedef struct uio uio_t; typedef struct iovec iovec_t; -extern int uio_read (caddr_t, size_t, uio_t *); +extern int xfs_uio_read (caddr_t, size_t, uio_t *); #endif /* __XFS_SUPPORT_MOVE_H__ */ diff -urN linux-2.6.19-rc5/fs/xfs/xfs.h linux-2.6.19-rc6/fs/xfs/xfs.h --- linux-2.6.19-rc5/fs/xfs/xfs.h 2006-09-20 03:42:06.000000000 +0000 +++ linux-2.6.19-rc6/fs/xfs/xfs.h 2006-11-16 05:11:47.217068842 +0000 @@ -17,5 +17,28 @@ */ #ifndef __XFS_H__ #define __XFS_H__ + +#ifdef CONFIG_XFS_DEBUG +#define STATIC +#define DEBUG 1 +#define XFS_BUF_LOCK_TRACKING 1 +/* #define QUOTADEBUG 1 */ +#endif + +#ifdef CONFIG_XFS_TRACE +#define XFS_ALLOC_TRACE 1 +#define XFS_ATTR_TRACE 1 +#define XFS_BLI_TRACE 1 +#define XFS_BMAP_TRACE 1 +#define XFS_BMBT_TRACE 1 +#define XFS_DIR2_TRACE 1 +#define XFS_DQUOT_TRACE 1 +#define XFS_ILOCK_TRACE 1 +#define XFS_LOG_TRACE 1 +#define XFS_RW_TRACE 1 +#define XFS_BUF_TRACE 1 +#define XFS_VNODE_TRACE 1 +#endif + #include #endif /* __XFS_H__ */ diff -urN linux-2.6.19-rc5/fs/xfs/xfs_dir2.c linux-2.6.19-rc6/fs/xfs/xfs_dir2.c --- linux-2.6.19-rc5/fs/xfs/xfs_dir2.c 2006-09-20 03:42:06.000000000 +0000 +++ linux-2.6.19-rc6/fs/xfs/xfs_dir2.c 2006-11-16 05:11:47.229070145 +0000 @@ -678,7 +678,7 @@ idbp->d_off = pa->cook; idbp->d_name[namelen] = '\0'; memcpy(idbp->d_name, pa->name, namelen); - rval = uio_read((caddr_t)idbp, reclen, uio); + rval = xfs_uio_read((caddr_t)idbp, reclen, uio); pa->done = (rval == 0); return rval; } diff -urN linux-2.6.19-rc5/fs/xfs/xfs_dmapi.h linux-2.6.19-rc6/fs/xfs/xfs_dmapi.h --- linux-2.6.19-rc5/fs/xfs/xfs_dmapi.h 2006-09-20 03:42:06.000000000 +0000 +++ linux-2.6.19-rc6/fs/xfs/xfs_dmapi.h 2006-11-16 05:11:47.229070145 +0000 @@ -157,27 +157,9 @@ #define DM_FLAGS_IALLOCSEM_WR 0x020 /* thread holds i_alloc_sem wr */ /* - * Based on IO_ISDIRECT, decide which i_ flag is set. + * Pull in platform specific event flags defines */ -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0) -#define DM_SEM_FLAG_RD(ioflags) (((ioflags) & IO_ISDIRECT) ? \ - DM_FLAGS_IMUX : 0) -#define DM_SEM_FLAG_WR (DM_FLAGS_IALLOCSEM_WR | DM_FLAGS_IMUX) -#endif - -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)) && \ - (LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,22)) -#define DM_SEM_FLAG_RD(ioflags) (((ioflags) & IO_ISDIRECT) ? \ - DM_FLAGS_IALLOCSEM_RD : DM_FLAGS_IMUX) -#define DM_SEM_FLAG_WR (DM_FLAGS_IALLOCSEM_WR | DM_FLAGS_IMUX) -#endif - -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,4,21) -#define DM_SEM_FLAG_RD(ioflags) (((ioflags) & IO_ISDIRECT) ? \ - 0 : DM_FLAGS_IMUX) -#define DM_SEM_FLAG_WR (DM_FLAGS_IMUX) -#endif - +#include "xfs_dmapi_priv.h" /* * Macros to turn caller specified delay/block flags into diff -urN linux-2.6.19-rc5/fs/xfs/xfs_iget.c linux-2.6.19-rc6/fs/xfs/xfs_iget.c --- linux-2.6.19-rc5/fs/xfs/xfs_iget.c 2006-11-16 05:11:41.992501437 +0000 +++ linux-2.6.19-rc6/fs/xfs/xfs_iget.c 2006-11-16 05:11:47.233070580 +0000 @@ -215,7 +215,7 @@ * If INEW is set this inode is being set up * we need to pause and try again. */ - if (ip->i_flags & XFS_INEW) { + if (xfs_iflags_test(ip, XFS_INEW)) { read_unlock(&ih->ih_lock); delay(1); XFS_STATS_INC(xs_ig_frecycle); @@ -230,22 +230,50 @@ * on its way out of the system, * we need to pause and try again. */ - if (ip->i_flags & XFS_IRECLAIM) { + if (xfs_iflags_test(ip, XFS_IRECLAIM)) { read_unlock(&ih->ih_lock); delay(1); XFS_STATS_INC(xs_ig_frecycle); goto again; } + ASSERT(xfs_iflags_test(ip, XFS_IRECLAIMABLE)); + + /* + * If lookup is racing with unlink, then we + * should return an error immediately so we + * don't remove it from the reclaim list and + * potentially leak the inode. + */ + if ((ip->i_d.di_mode == 0) && + !(flags & XFS_IGET_CREATE)) { + read_unlock(&ih->ih_lock); + return ENOENT; + } + + /* + * There may be transactions sitting in the + * incore log buffers or being flushed to disk + * at this time. We can't clear the + * XFS_IRECLAIMABLE flag until these + * transactions have hit the disk, otherwise we + * will void the guarantee the flag provides + * xfs_iunpin() + */ + if (xfs_ipincount(ip)) { + read_unlock(&ih->ih_lock); + xfs_log_force(mp, 0, + XFS_LOG_FORCE|XFS_LOG_SYNC); + XFS_STATS_INC(xs_ig_frecycle); + goto again; + } vn_trace_exit(vp, "xfs_iget.alloc", (inst_t *)__return_address); XFS_STATS_INC(xs_ig_found); - spin_lock(&ip->i_flags_lock); - ip->i_flags &= ~XFS_IRECLAIMABLE; - spin_unlock(&ip->i_flags_lock); + xfs_iflags_clear(ip, XFS_IRECLAIMABLE); version = ih->ih_version; read_unlock(&ih->ih_lock); xfs_ihash_promote(ih, ip, version); @@ -299,10 +327,7 @@ if (lock_flags != 0) xfs_ilock(ip, lock_flags); - spin_lock(&ip->i_flags_lock); - ip->i_flags &= ~XFS_ISTALE; - spin_unlock(&ip->i_flags_lock); - + xfs_iflags_clear(ip, XFS_ISTALE); vn_trace_exit(vp, "xfs_iget.found", (inst_t *)__return_address); goto return_ip; @@ -371,10 +396,7 @@ ih->ih_next = ip; ip->i_udquot = ip->i_gdquot = NULL; ih->ih_version++; - spin_lock(&ip->i_flags_lock); - ip->i_flags |= XFS_INEW; - spin_unlock(&ip->i_flags_lock); - + xfs_iflags_set(ip, XFS_INEW); write_unlock(&ih->ih_lock); /* @@ -625,7 +647,7 @@ vn_trace_entry(vp, "xfs_iput_new", (inst_t *)__return_address); if ((ip->i_d.di_mode == 0)) { - ASSERT(!(ip->i_flags & XFS_IRECLAIMABLE)); + ASSERT(!xfs_iflags_test(ip, XFS_IRECLAIMABLE)); vn_mark_bad(vp); } if (inode->i_state & I_NEW) @@ -683,6 +705,7 @@ /* * Free all memory associated with the inode. */ + xfs_iunlock(ip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL); xfs_idestroy(ip); } diff -urN linux-2.6.19-rc5/fs/xfs/xfs_inode.c linux-2.6.19-rc6/fs/xfs/xfs_inode.c --- linux-2.6.19-rc5/fs/xfs/xfs_inode.c 2006-11-16 05:11:41.996501872 +0000 +++ linux-2.6.19-rc6/fs/xfs/xfs_inode.c 2006-11-16 05:11:47.233070580 +0000 @@ -2193,7 +2193,7 @@ /* Inode not in memory or we found it already, * nothing to do */ - if (!ip || (ip->i_flags & XFS_ISTALE)) { + if (!ip || xfs_iflags_test(ip, XFS_ISTALE)) { read_unlock(&ih->ih_lock); continue; } @@ -2215,10 +2215,7 @@ if (ip == free_ip) { if (xfs_iflock_nowait(ip)) { - spin_lock(&ip->i_flags_lock); - ip->i_flags |= XFS_ISTALE; - spin_unlock(&ip->i_flags_lock); - + xfs_iflags_set(ip, XFS_ISTALE); if (xfs_inode_clean(ip)) { xfs_ifunlock(ip); } else { @@ -2231,9 +2228,7 @@ if (xfs_ilock_nowait(ip, XFS_ILOCK_EXCL)) { if (xfs_iflock_nowait(ip)) { - spin_lock(&ip->i_flags_lock); - ip->i_flags |= XFS_ISTALE; - spin_unlock(&ip->i_flags_lock); + xfs_iflags_set(ip, XFS_ISTALE); if (xfs_inode_clean(ip)) { xfs_ifunlock(ip); @@ -2263,9 +2258,7 @@ AIL_LOCK(mp,s); iip->ili_flush_lsn = iip->ili_item.li_lsn; AIL_UNLOCK(mp, s); - spin_lock(&iip->ili_inode->i_flags_lock); - iip->ili_inode->i_flags |= XFS_ISTALE; - spin_unlock(&iip->ili_inode->i_flags_lock); + xfs_iflags_set(ip, XFS_ISTALE); pre_flushed++; } lip = lip->li_bio_list; @@ -2748,42 +2741,39 @@ { ASSERT(atomic_read(&ip->i_pincount) > 0); - if (atomic_dec_and_test(&ip->i_pincount)) { + if (atomic_dec_and_lock(&ip->i_pincount, &ip->i_flags_lock)) { + /* - * If the inode is currently being reclaimed, the - * linux inode _and_ the xfs vnode may have been - * freed so we cannot reference either of them safely. - * Hence we should not try to do anything to them - * if the xfs inode is currently in the reclaim - * path. + * If the inode is currently being reclaimed, the link between + * the bhv_vnode and the xfs_inode will be broken after the + * XFS_IRECLAIM* flag is set. Hence, if these flags are not + * set, then we can move forward and mark the linux inode dirty + * knowing that it is still valid as it won't freed until after + * the bhv_vnode<->xfs_inode link is broken in xfs_reclaim. The + * i_flags_lock is used to synchronise the setting of the + * XFS_IRECLAIM* flags and the breaking of the link, and so we + * can execute atomically w.r.t to reclaim by holding this lock + * here. * - * However, we still need to issue the unpin wakeup - * call as the inode reclaim may be blocked waiting for - * the inode to become unpinned. + * However, we still need to issue the unpin wakeup call as the + * inode reclaim may be blocked waiting for the inode to become + * unpinned. */ - struct inode *inode = NULL; - spin_lock(&ip->i_flags_lock); - if (!(ip->i_flags & (XFS_IRECLAIM|XFS_IRECLAIMABLE))) { + if (!__xfs_iflags_test(ip, XFS_IRECLAIM|XFS_IRECLAIMABLE)) { bhv_vnode_t *vp = XFS_ITOV_NULL(ip); + struct inode *inode = NULL; - /* make sync come back and flush this inode */ - if (vp) { - inode = vn_to_inode(vp); + BUG_ON(vp == NULL); + inode = vn_to_inode(vp); + BUG_ON(inode->i_state & I_CLEAR); - if (!(inode->i_state & - (I_NEW|I_FREEING|I_CLEAR))) { - inode = igrab(inode); - if (inode) - mark_inode_dirty_sync(inode); - } else - inode = NULL; - } + /* make sync come back and flush this inode */ + if (!(inode->i_state & (I_NEW|I_FREEING))) + mark_inode_dirty_sync(inode); } spin_unlock(&ip->i_flags_lock); wake_up(&ip->i_ipin_wait); - if (inode) - iput(inode); } } diff -urN linux-2.6.19-rc5/fs/xfs/xfs_inode.h linux-2.6.19-rc6/fs/xfs/xfs_inode.h --- linux-2.6.19-rc5/fs/xfs/xfs_inode.h 2006-11-16 05:11:41.996501872 +0000 +++ linux-2.6.19-rc6/fs/xfs/xfs_inode.h 2006-11-16 05:11:47.233070580 +0000 @@ -305,6 +305,47 @@ #endif } xfs_inode_t; + +/* + * i_flags helper functions + */ +static inline void +__xfs_iflags_set(xfs_inode_t *ip, unsigned short flags) +{ + ip->i_flags |= flags; +} + +static inline void +xfs_iflags_set(xfs_inode_t *ip, unsigned short flags) +{ + spin_lock(&ip->i_flags_lock); + __xfs_iflags_set(ip, flags); + spin_unlock(&ip->i_flags_lock); +} + +static inline void +xfs_iflags_clear(xfs_inode_t *ip, unsigned short flags) +{ + spin_lock(&ip->i_flags_lock); + ip->i_flags &= ~flags; + spin_unlock(&ip->i_flags_lock); +} + +static inline int +__xfs_iflags_test(xfs_inode_t *ip, unsigned short flags) +{ + return (ip->i_flags & flags); +} + +static inline int +xfs_iflags_test(xfs_inode_t *ip, unsigned short flags) +{ + int ret; + spin_lock(&ip->i_flags_lock); + ret = __xfs_iflags_test(ip, flags); + spin_unlock(&ip->i_flags_lock); + return ret; +} #endif /* __KERNEL__ */ diff -urN linux-2.6.19-rc5/fs/xfs/xfs_vnodeops.c linux-2.6.19-rc6/fs/xfs/xfs_vnodeops.c --- linux-2.6.19-rc5/fs/xfs/xfs_vnodeops.c 2006-11-16 05:11:42.004502741 +0000 +++ linux-2.6.19-rc6/fs/xfs/xfs_vnodeops.c 2006-11-16 05:11:47.241071449 +0000 @@ -1013,7 +1013,7 @@ pathlen = (int)ip->i_d.di_size; if (ip->i_df.if_flags & XFS_IFINLINE) { - error = uio_read(ip->i_df.if_u1.if_data, pathlen, uiop); + error = xfs_uio_read(ip->i_df.if_u1.if_data, pathlen, uiop); } else { /* @@ -1044,7 +1044,7 @@ byte_cnt = pathlen; pathlen -= byte_cnt; - error = uio_read(XFS_BUF_PTR(bp), byte_cnt, uiop); + error = xfs_uio_read(XFS_BUF_PTR(bp), byte_cnt, uiop); xfs_buf_relse (bp); } @@ -3827,11 +3827,16 @@ */ xfs_synchronize_atime(ip); - /* If we have nothing to flush with this inode then complete the - * teardown now, otherwise break the link between the xfs inode - * and the linux inode and clean up the xfs inode later. This - * avoids flushing the inode to disk during the delete operation - * itself. + /* + * If we have nothing to flush with this inode then complete the + * teardown now, otherwise break the link between the xfs inode and the + * linux inode and clean up the xfs inode later. This avoids flushing + * the inode to disk during the delete operation itself. + * + * When breaking the link, we need to set the XFS_IRECLAIMABLE flag + * first to ensure that xfs_iunpin() will never see an xfs inode + * that has a linux inode being reclaimed. Synchronisation is provided + * by the i_flags_lock. */ if (!ip->i_update_core && (ip->i_itemp == NULL)) { xfs_ilock(ip, XFS_ILOCK_EXCL); @@ -3840,13 +3845,13 @@ } else { xfs_mount_t *mp = ip->i_mount; - /* Protect sync from us */ + /* Protect sync and unpin from us */ XFS_MOUNT_ILOCK(mp); - vn_bhv_remove(VN_BHV_HEAD(vp), XFS_ITOBHV(ip)); - list_add_tail(&ip->i_reclaim, &mp->m_del_inodes); spin_lock(&ip->i_flags_lock); - ip->i_flags |= XFS_IRECLAIMABLE; + __xfs_iflags_set(ip, XFS_IRECLAIMABLE); + vn_bhv_remove(VN_BHV_HEAD(vp), XFS_ITOBHV(ip)); spin_unlock(&ip->i_flags_lock); + list_add_tail(&ip->i_reclaim, &mp->m_del_inodes); XFS_MOUNT_IUNLOCK(mp); } return 0; @@ -3872,8 +3877,8 @@ */ write_lock(&ih->ih_lock); spin_lock(&ip->i_flags_lock); - if ((ip->i_flags & XFS_IRECLAIM) || - (!(ip->i_flags & XFS_IRECLAIMABLE) && vp == NULL)) { + if (__xfs_iflags_test(ip, XFS_IRECLAIM) || + (!__xfs_iflags_test(ip, XFS_IRECLAIMABLE) && vp == NULL)) { spin_unlock(&ip->i_flags_lock); write_unlock(&ih->ih_lock); if (locked) { @@ -3882,7 +3887,7 @@ } return 1; } - ip->i_flags |= XFS_IRECLAIM; + __xfs_iflags_set(ip, XFS_IRECLAIM); spin_unlock(&ip->i_flags_lock); write_unlock(&ih->ih_lock); diff -urN linux-2.6.19-rc5/include/asm-i386/acpi.h linux-2.6.19-rc6/include/asm-i386/acpi.h --- linux-2.6.19-rc5/include/asm-i386/acpi.h 2006-11-16 05:11:42.072510126 +0000 +++ linux-2.6.19-rc6/include/asm-i386/acpi.h 2006-11-16 05:11:47.309078835 +0000 @@ -132,6 +132,7 @@ #ifdef CONFIG_X86_IO_APIC extern int acpi_skip_timer_override; +extern int acpi_use_timer_override; #endif static inline void acpi_noirq_set(void) { acpi_noirq = 1; } diff -urN linux-2.6.19-rc5/include/asm-ia64/sn/addrs.h linux-2.6.19-rc6/include/asm-ia64/sn/addrs.h --- linux-2.6.19-rc5/include/asm-ia64/sn/addrs.h 2006-09-20 03:42:06.000000000 +0000 +++ linux-2.6.19-rc6/include/asm-ia64/sn/addrs.h 2006-11-16 05:11:47.325080572 +0000 @@ -136,9 +136,13 @@ */ #define TO_PHYS(x) (TO_PHYS_MASK & (x)) #define TO_CAC(x) (CAC_BASE | TO_PHYS(x)) +#ifdef CONFIG_SGI_SN #define TO_AMO(x) (AMO_BASE | TO_PHYS(x)) #define TO_GET(x) (GET_BASE | TO_PHYS(x)) - +#else +#define TO_AMO(x) ({ BUG(); x; }) +#define TO_GET(x) ({ BUG(); x; }) +#endif /* * Covert from processor physical address to II/TIO physical address: diff -urN linux-2.6.19-rc5/include/asm-powerpc/systbl.h linux-2.6.19-rc6/include/asm-powerpc/systbl.h --- linux-2.6.19-rc5/include/asm-powerpc/systbl.h 2006-11-16 05:11:42.152518816 +0000 +++ linux-2.6.19-rc6/include/asm-powerpc/systbl.h 2006-11-16 05:11:47.373085786 +0000 @@ -304,3 +304,4 @@ SYSCALL_SPU(faccessat) COMPAT_SYS_SPU(get_robust_list) COMPAT_SYS_SPU(set_robust_list) +COMPAT_SYS(move_pages) diff -urN linux-2.6.19-rc5/include/asm-powerpc/topology.h linux-2.6.19-rc6/include/asm-powerpc/topology.h --- linux-2.6.19-rc5/include/asm-powerpc/topology.h 2006-11-16 05:11:42.152518816 +0000 +++ linux-2.6.19-rc6/include/asm-powerpc/topology.h 2006-11-16 05:11:47.373085786 +0000 @@ -96,7 +96,13 @@ #ifdef CONFIG_SMP #include -#define smt_capable() (cpu_has_feature(CPU_FTR_SMT)) +#define smt_capable() (cpu_has_feature(CPU_FTR_SMT)) + +#ifdef CONFIG_PPC64 +#include + +#define topology_thread_siblings(cpu) (cpu_sibling_map[cpu]) +#endif #endif #endif /* __KERNEL__ */ diff -urN linux-2.6.19-rc5/include/asm-powerpc/unistd.h linux-2.6.19-rc6/include/asm-powerpc/unistd.h --- linux-2.6.19-rc5/include/asm-powerpc/unistd.h 2006-11-16 05:11:42.152518816 +0000 +++ linux-2.6.19-rc6/include/asm-powerpc/unistd.h 2006-11-16 05:11:47.373085786 +0000 @@ -323,10 +323,11 @@ #define __NR_faccessat 298 #define __NR_get_robust_list 299 #define __NR_set_robust_list 300 +#define __NR_move_pages 301 #ifdef __KERNEL__ -#define __NR_syscalls 301 +#define __NR_syscalls 302 #define __NR__exit __NR_exit #define NR_syscalls __NR_syscalls diff -urN linux-2.6.19-rc5/include/asm-x86_64/acpi.h linux-2.6.19-rc6/include/asm-x86_64/acpi.h --- linux-2.6.19-rc5/include/asm-x86_64/acpi.h 2006-11-16 05:11:42.228527070 +0000 +++ linux-2.6.19-rc6/include/asm-x86_64/acpi.h 2006-11-16 05:11:47.445093606 +0000 @@ -163,6 +163,7 @@ #define ARCH_HAS_POWER_INIT 1 extern int acpi_skip_timer_override; +extern int acpi_use_timer_override; #endif /*__KERNEL__*/ diff -urN linux-2.6.19-rc5/include/asm-x86_64/io_apic.h linux-2.6.19-rc6/include/asm-x86_64/io_apic.h --- linux-2.6.19-rc5/include/asm-x86_64/io_apic.h 2006-11-16 05:11:42.228527070 +0000 +++ linux-2.6.19-rc6/include/asm-x86_64/io_apic.h 2006-11-16 05:11:47.445093606 +0000 @@ -12,10 +12,6 @@ #define APIC_MISMATCH_DEBUG -#define IO_APIC_BASE(idx) \ - ((volatile int *)(__fix_to_virt(FIX_IO_APIC_BASE_0 + idx) \ - + (mp_ioapics[idx].mpc_apicaddr & ~PAGE_MASK))) - /* * The structure of the IO-APIC: */ @@ -119,36 +115,6 @@ /* non-0 if default (table-less) MP configuration */ extern int mpc_default_type; -static inline unsigned int io_apic_read(unsigned int apic, unsigned int reg) -{ - *IO_APIC_BASE(apic) = reg; - return *(IO_APIC_BASE(apic)+4); -} - -static inline void io_apic_write(unsigned int apic, unsigned int reg, unsigned int value) -{ - *IO_APIC_BASE(apic) = reg; - *(IO_APIC_BASE(apic)+4) = value; -} - -/* - * Re-write a value: to be used for read-modify-write - * cycles where the read already set up the index register. - */ -static inline void io_apic_modify(unsigned int apic, unsigned int value) -{ - *(IO_APIC_BASE(apic)+4) = value; -} - -/* - * Synchronize the IO-APIC and the CPU by doing - * a dummy read from the IO-APIC - */ -static inline void io_apic_sync(unsigned int apic) -{ - (void) *(IO_APIC_BASE(apic)+4); -} - /* 1 if "noapic" boot option passed */ extern int skip_ioapic_setup; diff -urN linux-2.6.19-rc5/include/asm-x86_64/pda.h linux-2.6.19-rc6/include/asm-x86_64/pda.h --- linux-2.6.19-rc5/include/asm-x86_64/pda.h 2006-11-16 05:11:42.232527505 +0000 +++ linux-2.6.19-rc6/include/asm-x86_64/pda.h 2006-11-16 05:11:47.449094041 +0000 @@ -109,6 +109,15 @@ #define sub_pda(field,val) pda_to_op("sub",field,val) #define or_pda(field,val) pda_to_op("or",field,val) +/* This is not atomic against other CPUs -- CPU preemption needs to be off */ +#define test_and_clear_bit_pda(bit,field) ({ \ + int old__; \ + asm volatile("btr %2,%%gs:%c3\n\tsbbl %0,%0" \ + : "=r" (old__), "+m" (_proxy_pda.field) \ + : "dIr" (bit), "i" (pda_offset(field)) : "memory"); \ + old__; \ +}) + #endif #define PDA_STACKOFFSET (5*8) diff -urN linux-2.6.19-rc5/include/asm-x86_64/vsyscall.h linux-2.6.19-rc6/include/asm-x86_64/vsyscall.h --- linux-2.6.19-rc5/include/asm-x86_64/vsyscall.h 2006-11-16 05:11:42.236527939 +0000 +++ linux-2.6.19-rc6/include/asm-x86_64/vsyscall.h 2006-11-16 05:11:47.453094475 +0000 @@ -59,8 +59,6 @@ extern int sysctl_vsyscall; -extern void vsyscall_set_cpu(int cpu); - #define ARCH_HAVE_XTIME_LOCK 1 #endif /* __KERNEL__ */ diff -urN linux-2.6.19-rc5/include/linux/htirq.h linux-2.6.19-rc6/include/linux/htirq.h --- linux-2.6.19-rc5/include/linux/htirq.h 2006-11-16 05:11:42.264530981 +0000 +++ linux-2.6.19-rc6/include/linux/htirq.h 2006-11-16 05:11:47.481097516 +0000 @@ -1,15 +1,23 @@ #ifndef LINUX_HTIRQ_H #define LINUX_HTIRQ_H +struct ht_irq_msg { + u32 address_lo; /* low 32 bits of the ht irq message */ + u32 address_hi; /* high 32 bits of the it irq message */ +}; + /* Helper functions.. */ -void write_ht_irq_low(unsigned int irq, u32 data); -void write_ht_irq_high(unsigned int irq, u32 data); -u32 read_ht_irq_low(unsigned int irq); -u32 read_ht_irq_high(unsigned int irq); +void fetch_ht_irq_msg(unsigned int irq, struct ht_irq_msg *msg); +void write_ht_irq_msg(unsigned int irq, struct ht_irq_msg *msg); void mask_ht_irq(unsigned int irq); void unmask_ht_irq(unsigned int irq); /* The arch hook for getting things started */ int arch_setup_ht_irq(unsigned int irq, struct pci_dev *dev); +/* For drivers of buggy hardware */ +typedef void (ht_irq_update_t)(struct pci_dev *dev, int irq, + struct ht_irq_msg *msg); +int __ht_create_irq(struct pci_dev *dev, int idx, ht_irq_update_t *update); + #endif /* LINUX_HTIRQ_H */ diff -urN linux-2.6.19-rc5/include/linux/hugetlb.h linux-2.6.19-rc6/include/linux/hugetlb.h --- linux-2.6.19-rc5/include/linux/hugetlb.h 2006-11-16 05:11:42.264530981 +0000 +++ linux-2.6.19-rc6/include/linux/hugetlb.h 2006-11-16 05:11:47.481097516 +0000 @@ -60,8 +60,11 @@ * If the arch doesn't supply something else, assume that hugepage * size aligned regions are ok without further preparation. */ -static inline int prepare_hugepage_range(unsigned long addr, unsigned long len) +static inline int prepare_hugepage_range(unsigned long addr, unsigned long len, + pgoff_t pgoff) { + if (pgoff & (~HPAGE_MASK >> PAGE_SHIFT)) + return -EINVAL; if (len & ~HPAGE_MASK) return -EINVAL; if (addr & ~HPAGE_MASK) @@ -69,7 +72,8 @@ return 0; } #else -int prepare_hugepage_range(unsigned long addr, unsigned long len); +int prepare_hugepage_range(unsigned long addr, unsigned long len, + pgoff_t pgoff); #endif #ifndef ARCH_HAS_SETCLEAR_HUGE_PTE @@ -107,7 +111,7 @@ #define hugetlb_report_meminfo(buf) 0 #define hugetlb_report_node_meminfo(n, buf) 0 #define follow_huge_pmd(mm, addr, pmd, write) NULL -#define prepare_hugepage_range(addr, len) (-EINVAL) +#define prepare_hugepage_range(addr,len,pgoff) (-EINVAL) #define pmd_huge(x) 0 #define is_hugepage_only_range(mm, addr, len) 0 #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; }) diff -urN linux-2.6.19-rc5/include/linux/ipmi_msgdefs.h linux-2.6.19-rc6/include/linux/ipmi_msgdefs.h --- linux-2.6.19-rc5/include/linux/ipmi_msgdefs.h 2006-09-20 03:42:06.000000000 +0000 +++ linux-2.6.19-rc6/include/linux/ipmi_msgdefs.h 2006-11-16 05:11:47.489098385 +0000 @@ -75,6 +75,8 @@ #define IPMI_INVALID_COMMAND_ERR 0xc1 #define IPMI_ERR_MSG_TRUNCATED 0xc6 #define IPMI_LOST_ARBITRATION_ERR 0x81 +#define IPMI_BUS_ERR 0x82 +#define IPMI_NAK_ON_WRITE_ERR 0x83 #define IPMI_ERR_UNSPECIFIED 0xff #define IPMI_CHANNEL_PROTOCOL_IPMB 1 diff -urN linux-2.6.19-rc5/include/linux/nfsd/nfsd.h linux-2.6.19-rc6/include/linux/nfsd/nfsd.h --- linux-2.6.19-rc5/include/linux/nfsd/nfsd.h 2006-11-16 05:11:42.300534891 +0000 +++ linux-2.6.19-rc6/include/linux/nfsd/nfsd.h 2006-11-16 05:11:47.513100992 +0000 @@ -89,7 +89,7 @@ __be32 nfsd_create_v3(struct svc_rqst *, struct svc_fh *, char *name, int len, struct iattr *attrs, struct svc_fh *res, int createmode, - u32 *verifier, int *truncp); + u32 *verifier, int *truncp, int *created); __be32 nfsd_commit(struct svc_rqst *, struct svc_fh *, loff_t, unsigned long); #endif /* CONFIG_NFSD_V3 */ diff -urN linux-2.6.19-rc5/include/linux/personality.h linux-2.6.19-rc6/include/linux/personality.h --- linux-2.6.19-rc5/include/linux/personality.h 2006-11-16 05:11:42.308535760 +0000 +++ linux-2.6.19-rc6/include/linux/personality.h 2006-11-16 05:11:47.521101861 +0000 @@ -114,7 +114,7 @@ * Change personality of the currently running process. */ #define set_personality(pers) \ - ((current->personality == pers) ? 0 : __set_personality(pers)) + ((current->personality == (pers)) ? 0 : __set_personality(pers)) #endif /* __KERNEL__ */ diff -urN linux-2.6.19-rc5/include/linux/vmalloc.h linux-2.6.19-rc6/include/linux/vmalloc.h --- linux-2.6.19-rc5/include/linux/vmalloc.h 2006-11-16 05:11:42.336538801 +0000 +++ linux-2.6.19-rc6/include/linux/vmalloc.h 2006-11-16 05:11:47.549104902 +0000 @@ -23,13 +23,14 @@ #endif struct vm_struct { + /* keep next,addr,size together to speedup lookups */ + struct vm_struct *next; void *addr; unsigned long size; unsigned long flags; struct page **pages; unsigned int nr_pages; unsigned long phys_addr; - struct vm_struct *next; }; /* diff -urN linux-2.6.19-rc5/include/net/ip_vs.h linux-2.6.19-rc6/include/net/ip_vs.h --- linux-2.6.19-rc5/include/net/ip_vs.h 2006-11-16 05:11:42.348540104 +0000 +++ linux-2.6.19-rc6/include/net/ip_vs.h 2006-11-16 05:11:47.561106205 +0000 @@ -7,6 +7,7 @@ #define _IP_VS_H #include /* For __uXX types */ +#include /* For __beXX types in userland */ #define IP_VS_VERSION_CODE 0x010201 #define NVERSION(version) \ diff -urN linux-2.6.19-rc5/init/Kconfig linux-2.6.19-rc6/init/Kconfig --- linux-2.6.19-rc5/init/Kconfig 2006-11-16 05:11:42.372542711 +0000 +++ linux-2.6.19-rc6/init/Kconfig 2006-11-16 05:11:47.581108378 +0000 @@ -304,20 +304,19 @@ config SYSCTL_SYSCALL bool "Sysctl syscall support" if EMBEDDED - default n + default y select SYSCTL ---help--- - Enable the deprecated sysctl system call. sys_sysctl uses - binary paths that have been found to be a major pain to maintain - and use. The interface in /proc/sys is now the primary and what - everyone uses. - - Nothing has been using the binary sysctl interface for some - time now so nothing should break if you disable sysctl syscall - support, and your kernel will get marginally smaller. + sys_sysctl uses binary paths that have been found challenging + to properly maintain and use. The interface in /proc/sys + using paths with ascii names is now the primary path to this + information. + + Almost nothing using the binary sysctl interface so if you are + trying to save some space it is probably safe to disable this, + making your kernel marginally smaller. - Unless you have an application that uses the sys_sysctl interface - you should probably say N here. + If unsure say Y here. config KALLSYMS bool "Load all symbols for debugging/kksymoops" if EMBEDDED diff -urN linux-2.6.19-rc5/kernel/irq/manage.c linux-2.6.19-rc6/kernel/irq/manage.c --- linux-2.6.19-rc5/kernel/irq/manage.c 2006-11-16 05:11:42.384544014 +0000 +++ linux-2.6.19-rc6/kernel/irq/manage.c 2006-11-16 05:11:47.593109681 +0000 @@ -216,6 +216,7 @@ { struct irq_desc *desc = irq_desc + irq; struct irqaction *old, **p; + const char *old_name = NULL; unsigned long flags; int shared = 0; @@ -255,8 +256,10 @@ * set the trigger type must match. */ if (!((old->flags & new->flags) & IRQF_SHARED) || - ((old->flags ^ new->flags) & IRQF_TRIGGER_MASK)) + ((old->flags ^ new->flags) & IRQF_TRIGGER_MASK)) { + old_name = old->name; goto mismatch; + } #if defined(CONFIG_IRQ_PER_CPU) /* All handlers must agree on per-cpuness */ @@ -322,11 +325,13 @@ return 0; mismatch: - spin_unlock_irqrestore(&desc->lock, flags); if (!(new->flags & IRQF_PROBE_SHARED)) { printk(KERN_ERR "IRQ handler type mismatch for IRQ %d\n", irq); + if (old_name) + printk(KERN_ERR "current handler: %s\n", old_name); dump_stack(); } + spin_unlock_irqrestore(&desc->lock, flags); return -EBUSY; } diff -urN linux-2.6.19-rc5/kernel/irq/spurious.c linux-2.6.19-rc6/kernel/irq/spurious.c --- linux-2.6.19-rc5/kernel/irq/spurious.c 2006-11-16 05:11:42.384544014 +0000 +++ linux-2.6.19-rc6/kernel/irq/spurious.c 2006-11-16 05:11:47.593109681 +0000 @@ -147,7 +147,11 @@ if (unlikely(irqfixup)) { /* Don't punish working computers */ if ((irqfixup == 2 && irq == 0) || action_ret == IRQ_NONE) { - int ok = misrouted_irq(irq); + int ok; + + spin_unlock(&desc->lock); + ok = misrouted_irq(irq); + spin_lock(&desc->lock); if (action_ret == IRQ_NONE) desc->irqs_unhandled -= ok; } diff -urN linux-2.6.19-rc5/mm/mmap.c linux-2.6.19-rc6/mm/mmap.c --- linux-2.6.19-rc5/mm/mmap.c 2006-11-16 05:11:42.428548793 +0000 +++ linux-2.6.19-rc6/mm/mmap.c 2006-11-16 05:11:47.633114026 +0000 @@ -1379,7 +1379,7 @@ * Check if the given range is hugepage aligned, and * can be made suitable for hugepages. */ - ret = prepare_hugepage_range(addr, len); + ret = prepare_hugepage_range(addr, len, pgoff); } else { /* * Ensure that a normal request is not falling in a @@ -1880,6 +1880,9 @@ if ((addr + len) > TASK_SIZE || (addr + len) < addr) return -EINVAL; + if (is_hugepage_only_range(mm, addr, len)) + return -EINVAL; + flags = VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT | mm->def_flags; error = arch_mmap_check(addr, len, flags); diff -urN linux-2.6.19-rc5/mm/vmalloc.c linux-2.6.19-rc6/mm/vmalloc.c --- linux-2.6.19-rc5/mm/vmalloc.c 2006-11-16 05:11:42.440550097 +0000 +++ linux-2.6.19-rc6/mm/vmalloc.c 2006-11-16 05:11:47.645115329 +0000 @@ -186,10 +186,8 @@ if (unlikely(!area)) return NULL; - if (unlikely(!size)) { - kfree (area); + if (unlikely(!size)) return NULL; - } /* * We always allocate a guard page. @@ -532,11 +530,12 @@ void *ret; ret = __vmalloc(size, GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO, PAGE_KERNEL); - write_lock(&vmlist_lock); - area = __find_vm_area(ret); - area->flags |= VM_USERMAP; - write_unlock(&vmlist_lock); - + if (ret) { + write_lock(&vmlist_lock); + area = __find_vm_area(ret); + area->flags |= VM_USERMAP; + write_unlock(&vmlist_lock); + } return ret; } EXPORT_SYMBOL(vmalloc_user); @@ -605,11 +604,12 @@ void *ret; ret = __vmalloc(size, GFP_KERNEL | __GFP_ZERO, PAGE_KERNEL); - write_lock(&vmlist_lock); - area = __find_vm_area(ret); - area->flags |= VM_USERMAP; - write_unlock(&vmlist_lock); - + if (ret) { + write_lock(&vmlist_lock); + area = __find_vm_area(ret); + area->flags |= VM_USERMAP; + write_unlock(&vmlist_lock); + } return ret; } EXPORT_SYMBOL(vmalloc_32_user); diff -urN linux-2.6.19-rc5/net/core/netpoll.c linux-2.6.19-rc6/net/core/netpoll.c --- linux-2.6.19-rc5/net/core/netpoll.c 2006-11-16 05:11:42.464552704 +0000 +++ linux-2.6.19-rc6/net/core/netpoll.c 2006-11-16 05:11:47.669117936 +0000 @@ -340,6 +340,12 @@ udph->dest = htons(np->remote_port); udph->len = htons(udp_len); udph->check = 0; + udph->check = csum_tcpudp_magic(htonl(np->local_ip), + htonl(np->remote_ip), + udp_len, IPPROTO_UDP, + csum_partial((unsigned char *)udph, udp_len, 0)); + if (udph->check == 0) + udph->check = -1; skb->nh.iph = iph = (struct iphdr *)skb_push(skb, sizeof(*iph)); diff -urN linux-2.6.19-rc5/net/core/skbuff.c linux-2.6.19-rc6/net/core/skbuff.c --- linux-2.6.19-rc5/net/core/skbuff.c 2006-11-16 05:11:42.468553138 +0000 +++ linux-2.6.19-rc6/net/core/skbuff.c 2006-11-16 05:11:47.673118370 +0000 @@ -639,6 +639,7 @@ n->csum = skb->csum; n->ip_summed = skb->ip_summed; + n->truesize += skb->data_len; n->data_len = skb->data_len; n->len = skb->len; diff -urN linux-2.6.19-rc5/net/decnet/af_decnet.c linux-2.6.19-rc6/net/decnet/af_decnet.c --- linux-2.6.19-rc5/net/decnet/af_decnet.c 2006-11-16 05:11:42.480554441 +0000 +++ linux-2.6.19-rc6/net/decnet/af_decnet.c 2006-11-16 05:11:47.681119239 +0000 @@ -166,7 +166,7 @@ if (scp->addr.sdn_flags & SDF_WILD) return hlist_empty(&dn_wild_sk) ? &dn_wild_sk : NULL; - return &dn_sk_hash[scp->addrloc & DN_SK_HASH_MASK]; + return &dn_sk_hash[dn_ntohs(scp->addrloc) & DN_SK_HASH_MASK]; } /* @@ -180,7 +180,7 @@ if (port == 0) return -1; - sk_for_each(sk, node, &dn_sk_hash[port & DN_SK_HASH_MASK]) { + sk_for_each(sk, node, &dn_sk_hash[dn_ntohs(port) & DN_SK_HASH_MASK]) { struct dn_scp *scp = DN_SK(sk); if (scp->addrloc == port) return -1; @@ -194,12 +194,12 @@ static unsigned short port = 0x2000; unsigned short i_port = port; - while(check_port(++port) != 0) { + while(check_port(dn_htons(++port)) != 0) { if (port == i_port) return 0; } - scp->addrloc = port; + scp->addrloc = dn_htons(port); return 1; } @@ -418,7 +418,7 @@ struct dn_scp *scp; read_lock(&dn_hash_lock); - sk_for_each(sk, node, &dn_sk_hash[cb->dst_port & DN_SK_HASH_MASK]) { + sk_for_each(sk, node, &dn_sk_hash[dn_ntohs(cb->dst_port) & DN_SK_HASH_MASK]) { scp = DN_SK(sk); if (cb->src != dn_saddr2dn(&scp->peer)) continue; @@ -1016,13 +1016,14 @@ static void dn_user_copy(struct sk_buff *skb, struct optdata_dn *opt) { - unsigned char *ptr = skb->data; - - opt->opt_optl = *ptr++; - opt->opt_status = 0; - memcpy(opt->opt_data, ptr, opt->opt_optl); - skb_pull(skb, dn_ntohs(opt->opt_optl) + 1); + unsigned char *ptr = skb->data; + u16 len = *ptr++; /* yes, it's 8bit on the wire */ + BUG_ON(len > 16); /* we've checked the contents earlier */ + opt->opt_optl = dn_htons(len); + opt->opt_status = 0; + memcpy(opt->opt_data, ptr, len); + skb_pull(skb, len + 1); } static struct sk_buff *dn_wait_for_connect(struct sock *sk, long *timeo) diff -urN linux-2.6.19-rc5/net/decnet/dn_nsp_in.c linux-2.6.19-rc6/net/decnet/dn_nsp_in.c --- linux-2.6.19-rc5/net/decnet/dn_nsp_in.c 2006-11-16 05:11:42.480554441 +0000 +++ linux-2.6.19-rc6/net/decnet/dn_nsp_in.c 2006-11-16 05:11:47.681119239 +0000 @@ -360,9 +360,9 @@ scp->max_window = decnet_no_fc_max_cwnd; if (skb->len > 0) { - unsigned char dlen = *skb->data; + u16 dlen = *skb->data; if ((dlen <= 16) && (dlen <= skb->len)) { - scp->conndata_in.opt_optl = dn_htons((__u16)dlen); + scp->conndata_in.opt_optl = dn_htons(dlen); memcpy(scp->conndata_in.opt_data, skb->data + 1, dlen); } } @@ -404,9 +404,9 @@ memset(scp->discdata_in.opt_data, 0, 16); if (skb->len > 0) { - unsigned char dlen = *skb->data; + u16 dlen = *skb->data; if ((dlen <= 16) && (dlen <= skb->len)) { - scp->discdata_in.opt_optl = dn_htons((__u16)dlen); + scp->discdata_in.opt_optl = dn_htons(dlen); memcpy(scp->discdata_in.opt_data, skb->data + 1, dlen); } } diff -urN linux-2.6.19-rc5/net/decnet/dn_nsp_out.c linux-2.6.19-rc6/net/decnet/dn_nsp_out.c --- linux-2.6.19-rc5/net/decnet/dn_nsp_out.c 2006-09-20 03:42:06.000000000 +0000 +++ linux-2.6.19-rc6/net/decnet/dn_nsp_out.c 2006-11-16 05:11:47.681119239 +0000 @@ -526,7 +526,7 @@ struct nsp_conn_init_msg *msg; __u8 len = (__u8)dn_ntohs(scp->conndata_out.opt_optl); - if ((skb = dn_alloc_skb(sk, 50 + dn_ntohs(scp->conndata_out.opt_optl), gfp)) == NULL) + if ((skb = dn_alloc_skb(sk, 50 + len, gfp)) == NULL) return; msg = (struct nsp_conn_init_msg *)skb_put(skb, sizeof(*msg)); diff -urN linux-2.6.19-rc5/net/decnet/dn_rules.c linux-2.6.19-rc6/net/decnet/dn_rules.c --- linux-2.6.19-rc5/net/decnet/dn_rules.c 2006-11-16 05:11:42.480554441 +0000 +++ linux-2.6.19-rc6/net/decnet/dn_rules.c 2006-11-16 05:11:47.685119674 +0000 @@ -124,8 +124,8 @@ static int dn_fib_rule_match(struct fib_rule *rule, struct flowi *fl, int flags) { struct dn_fib_rule *r = (struct dn_fib_rule *)rule; - u16 daddr = fl->fld_dst; - u16 saddr = fl->fld_src; + __le16 daddr = fl->fld_dst; + __le16 saddr = fl->fld_src; if (((saddr ^ r->src) & r->srcmask) || ((daddr ^ r->dst) & r->dstmask)) diff -urN linux-2.6.19-rc5/net/ipv4/ipvs/ip_vs_ftp.c linux-2.6.19-rc6/net/ipv4/ipvs/ip_vs_ftp.c --- linux-2.6.19-rc5/net/ipv4/ipvs/ip_vs_ftp.c 2006-11-16 05:11:42.504557048 +0000 +++ linux-2.6.19-rc6/net/ipv4/ipvs/ip_vs_ftp.c 2006-11-16 05:11:47.709122281 +0000 @@ -200,7 +200,7 @@ from = n_cp->vaddr; port = n_cp->vport; sprintf(buf,"%d,%d,%d,%d,%d,%d", NIPQUAD(from), - ntohs(port)&255, (ntohs(port)>>8)&255); + (ntohs(port)>>8)&255, ntohs(port)&255); buf_len = strlen(buf); /* diff -urN linux-2.6.19-rc5/net/ipv4/ipvs/ip_vs_proto_tcp.c linux-2.6.19-rc6/net/ipv4/ipvs/ip_vs_proto_tcp.c --- linux-2.6.19-rc5/net/ipv4/ipvs/ip_vs_proto_tcp.c 2006-11-16 05:11:42.508557483 +0000 +++ linux-2.6.19-rc6/net/ipv4/ipvs/ip_vs_proto_tcp.c 2006-11-16 05:11:47.709122281 +0000 @@ -117,7 +117,7 @@ { tcph->check = ip_vs_check_diff(~oldip, newip, - ip_vs_check_diff(oldport ^ htonl(0xFFFF), + ip_vs_check_diff(oldport ^ htons(0xFFFF), newport, tcph->check)); } diff -urN linux-2.6.19-rc5/net/ipv4/ipvs/ip_vs_proto_udp.c linux-2.6.19-rc6/net/ipv4/ipvs/ip_vs_proto_udp.c --- linux-2.6.19-rc5/net/ipv4/ipvs/ip_vs_proto_udp.c 2006-11-16 05:11:42.508557483 +0000 +++ linux-2.6.19-rc6/net/ipv4/ipvs/ip_vs_proto_udp.c 2006-11-16 05:11:47.709122281 +0000 @@ -122,10 +122,10 @@ { uhdr->check = ip_vs_check_diff(~oldip, newip, - ip_vs_check_diff(oldport ^ htonl(0xFFFF), + ip_vs_check_diff(oldport ^ htons(0xFFFF), newport, uhdr->check)); if (!uhdr->check) - uhdr->check = htonl(0xFFFF); + uhdr->check = -1; } static int @@ -173,7 +173,7 @@ cp->protocol, (*pskb)->csum); if (udph->check == 0) - udph->check = htonl(0xFFFF); + udph->check = -1; IP_VS_DBG(11, "O-pkt: %s O-csum=%d (+%zd)\n", pp->name, udph->check, (char*)&(udph->check) - (char*)udph); @@ -228,7 +228,7 @@ cp->protocol, (*pskb)->csum); if (udph->check == 0) - udph->check = 0xFFFF; + udph->check = -1; (*pskb)->ip_summed = CHECKSUM_UNNECESSARY; } return 1; diff -urN linux-2.6.19-rc5/net/ipv4/tcp.c linux-2.6.19-rc6/net/ipv4/tcp.c --- linux-2.6.19-rc5/net/ipv4/tcp.c 2006-11-16 05:11:42.532560089 +0000 +++ linux-2.6.19-rc6/net/ipv4/tcp.c 2006-11-16 05:11:47.733124887 +0000 @@ -2270,7 +2270,7 @@ thash_entries, (num_physpages >= 128 * 1024) ? 13 : 15, - HASH_HIGHMEM, + 0, &tcp_hashinfo.ehash_size, NULL, 0); @@ -2286,7 +2286,7 @@ tcp_hashinfo.ehash_size, (num_physpages >= 128 * 1024) ? 13 : 15, - HASH_HIGHMEM, + 0, &tcp_hashinfo.bhash_size, NULL, 64 * 1024); diff -urN linux-2.6.19-rc5/net/sched/sch_htb.c linux-2.6.19-rc6/net/sched/sch_htb.c --- linux-2.6.19-rc5/net/sched/sch_htb.c 2006-11-16 05:11:42.600567475 +0000 +++ linux-2.6.19-rc6/net/sched/sch_htb.c 2006-11-16 05:11:47.801132273 +0000 @@ -1284,8 +1284,7 @@ struct htb_class, sibling)); /* note: this delete may happen twice (see htb_delete) */ - if (!hlist_unhashed(&cl->hlist)) - hlist_del(&cl->hlist); + hlist_del_init(&cl->hlist); list_del(&cl->sibling); if (cl->prio_activity) @@ -1333,8 +1332,7 @@ sch_tree_lock(sch); /* delete from hash and active; remainder in destroy_class */ - if (!hlist_unhashed(&cl->hlist)) - hlist_del(&cl->hlist); + hlist_del_init(&cl->hlist); if (cl->prio_activity) htb_deactivate(q, cl); diff -urN linux-2.6.19-rc5/scripts/kconfig/.gitignore linux-2.6.19-rc6/scripts/kconfig/.gitignore --- linux-2.6.19-rc5/scripts/kconfig/.gitignore 2006-09-20 03:42:06.000000000 +0000 +++ linux-2.6.19-rc6/scripts/kconfig/.gitignore 2006-11-16 05:11:47.841136618 +0000 @@ -6,6 +6,8 @@ *.tab.c *.tab.h zconf.hash.c +*.moc +lkc_defs.h # # configuration programs diff -urN linux-2.6.19-rc5/sound/pci/hda/hda_intel.c linux-2.6.19-rc6/sound/pci/hda/hda_intel.c --- linux-2.6.19-rc5/sound/pci/hda/hda_intel.c 2006-11-16 05:11:42.808590067 +0000 +++ linux-2.6.19-rc6/sound/pci/hda/hda_intel.c 2006-11-16 05:11:48.005154431 +0000 @@ -55,7 +55,7 @@ static int position_fix; static int probe_mask = -1; static int single_cmd; -static int disable_msi; +static int enable_msi; module_param(index, int, 0444); MODULE_PARM_DESC(index, "Index value for Intel HD audio interface."); @@ -69,8 +69,8 @@ MODULE_PARM_DESC(probe_mask, "Bitmask to probe codecs (default = -1)."); module_param(single_cmd, bool, 0444); MODULE_PARM_DESC(single_cmd, "Use single command to communicate with codecs (for debugging only)."); -module_param(disable_msi, int, 0); -MODULE_PARM_DESC(disable_msi, "Disable Message Signaled Interrupt (MSI)"); +module_param(enable_msi, int, 0); +MODULE_PARM_DESC(enable_msi, "Enable Message Signaled Interrupt (MSI)"); /* just for backward compatibility */ @@ -1531,7 +1531,7 @@ chip->pci = pci; chip->irq = -1; chip->driver_type = driver_type; - chip->msi = !disable_msi; + chip->msi = enable_msi; chip->position_fix = position_fix; chip->single_cmd = single_cmd;