From 5d312b4ce8c51a5bdc8fd2e9ab402dba8fd6cc14 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 16 Mar 2010 02:01:33 +0000 Subject: [PATCH] --- yaml --- r: 188984 b: refs/heads/master c: b230eb32c8d568284c1f33f5d06005eb97d4f897 h: refs/heads/master v: v3 --- [refs] | 2 +- .../PCI-DMA-mapping.txt} | 0 trunk/Documentation/cgroups/memory.txt | 2 +- trunk/Documentation/circular-buffers.txt | 234 ------------------ trunk/Documentation/filesystems/tmpfs.txt | 6 +- trunk/Documentation/memory-barriers.txt | 20 -- .../volatile-considered-harmful.txt | 6 +- trunk/MAINTAINERS | 40 +-- trunk/arch/s390/boot/compressed/misc.c | 8 +- trunk/arch/s390/include/asm/system.h | 9 +- trunk/arch/s390/kernel/head.S | 3 - trunk/arch/s390/kernel/head64.S | 2 + trunk/arch/s390/kernel/setup.c | 4 +- trunk/arch/s390/kernel/smp.c | 6 +- trunk/arch/s390/mm/maccess.c | 26 -- trunk/arch/sh/boards/mach-ecovec24/setup.c | 2 + trunk/drivers/acpi/scan.c | 38 --- trunk/drivers/char/agp/intel-agp.c | 34 +-- trunk/drivers/gpio/max730x.c | 4 - trunk/drivers/gpu/drm/i915/i915_dma.c | 46 ++-- trunk/drivers/gpu/drm/i915/i915_drv.c | 4 +- trunk/drivers/gpu/drm/i915/i915_drv.h | 4 +- trunk/drivers/gpu/drm/i915/i915_gem.c | 31 ++- trunk/drivers/gpu/drm/i915/i915_gem_tiling.c | 7 +- trunk/drivers/gpu/drm/i915/i915_reg.h | 14 +- trunk/drivers/gpu/drm/i915/intel_bios.c | 5 +- trunk/drivers/gpu/drm/i915/intel_display.c | 16 +- trunk/drivers/gpu/drm/i915/intel_lvds.c | 52 +++- trunk/drivers/gpu/drm/i915/intel_overlay.c | 13 +- trunk/drivers/i2c/busses/i2c-scmi.c | 32 +-- trunk/drivers/misc/c2port/core.c | 4 +- trunk/drivers/mmc/core/mmc.c | 3 +- trunk/drivers/regulator/core.c | 1 - trunk/drivers/regulator/lp3971.c | 10 +- trunk/drivers/regulator/max1586.c | 2 +- trunk/drivers/regulator/max8649.c | 3 +- trunk/drivers/regulator/max8660.c | 2 +- trunk/drivers/regulator/max8925-regulator.c | 6 +- trunk/drivers/rtc/rtc-mc13783.c | 23 +- trunk/drivers/s390/block/dasd_3990_erp.c | 7 +- trunk/drivers/s390/block/dasd_eckd.c | 4 +- trunk/drivers/s390/char/sclp_async.c | 1 - trunk/drivers/s390/char/sclp_cmd.c | 14 +- trunk/drivers/s390/char/zcore.c | 31 ++- trunk/drivers/video/geode/lxfb.h | 2 - trunk/drivers/video/geode/lxfb_ops.c | 10 +- trunk/fs/binfmt_aout.c | 14 +- trunk/fs/binfmt_elf_fdpic.c | 2 +- trunk/fs/fscache/page.c | 1 - trunk/fs/partitions/msdos.c | 85 +++---- trunk/fs/proc/kcore.c | 2 +- trunk/fs/read_write.c | 2 - trunk/fs/reiserfs/journal.c | 15 +- trunk/fs/reiserfs/xattr_security.c | 2 +- trunk/include/acpi/acpi_drivers.h | 2 - trunk/include/linux/circ_buf.h | 4 - trunk/include/linux/kfifo.h | 2 + trunk/include/linux/mmc/mmc.h | 1 - trunk/include/linux/reiserfs_xattr.h | 5 - trunk/init/main.c | 2 +- trunk/kernel/cgroup.c | 1 + trunk/kernel/cpuset.c | 106 +++----- trunk/kernel/kthread.c | 2 +- trunk/lib/Kconfig.debug | 3 +- trunk/mm/ksm.c | 2 +- trunk/mm/memcontrol.c | 50 ++-- trunk/mm/memory.c | 1 - trunk/mm/mempolicy.c | 50 ++-- trunk/mm/mmu_context.c | 1 - trunk/mm/nommu.c | 7 +- trunk/scripts/get_maintainer.pl | 2 +- trunk/scripts/kernel-doc | 3 - trunk/sound/arm/pxa2xx-pcm-lib.c | 1 - trunk/sound/oss/vidc.c | 4 +- trunk/sound/pci/cmipci.c | 14 +- trunk/sound/pci/hda/patch_conexant.c | 15 -- trunk/sound/pci/hda/patch_nvhdmi.c | 15 +- trunk/sound/pci/hda/patch_realtek.c | 5 +- trunk/sound/pci/hda/patch_sigmatel.c | 2 - trunk/sound/soc/codecs/tlv320dac33.c | 10 +- trunk/sound/soc/codecs/wm_hubs.c | 2 +- trunk/sound/soc/imx/Kconfig | 2 +- trunk/sound/soc/sh/Kconfig | 1 - 83 files changed, 379 insertions(+), 852 deletions(-) rename trunk/Documentation/{DMA-API-HOWTO.txt => PCI/PCI-DMA-mapping.txt} (100%) delete mode 100644 trunk/Documentation/circular-buffers.txt diff --git a/[refs] b/[refs] index f13dd93db6cf..6df83e6550f8 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1147d0f915e3b4c5c4fa279dae2c40016b8f441d +refs/heads/master: b230eb32c8d568284c1f33f5d06005eb97d4f897 diff --git a/trunk/Documentation/DMA-API-HOWTO.txt b/trunk/Documentation/PCI/PCI-DMA-mapping.txt similarity index 100% rename from trunk/Documentation/DMA-API-HOWTO.txt rename to trunk/Documentation/PCI/PCI-DMA-mapping.txt diff --git a/trunk/Documentation/cgroups/memory.txt b/trunk/Documentation/cgroups/memory.txt index 3a6aecd078ba..f8bc802d70b9 100644 --- a/trunk/Documentation/cgroups/memory.txt +++ b/trunk/Documentation/cgroups/memory.txt @@ -340,7 +340,7 @@ Note: 5.3 swappiness Similar to /proc/sys/vm/swappiness, but affecting a hierarchy of groups only. - Following cgroups' swappiness can't be changed. + Following cgroups' swapiness can't be changed. - root cgroup (uses /proc/sys/vm/swappiness). - a cgroup which uses hierarchy and it has child cgroup. - a cgroup which uses hierarchy and not the root of hierarchy. diff --git a/trunk/Documentation/circular-buffers.txt b/trunk/Documentation/circular-buffers.txt deleted file mode 100644 index 8117e5bf6065..000000000000 --- a/trunk/Documentation/circular-buffers.txt +++ /dev/null @@ -1,234 +0,0 @@ - ================ - CIRCULAR BUFFERS - ================ - -By: David Howells - Paul E. McKenney - - -Linux provides a number of features that can be used to implement circular -buffering. There are two sets of such features: - - (1) Convenience functions for determining information about power-of-2 sized - buffers. - - (2) Memory barriers for when the producer and the consumer of objects in the - buffer don't want to share a lock. - -To use these facilities, as discussed below, there needs to be just one -producer and just one consumer. It is possible to handle multiple producers by -serialising them, and to handle multiple consumers by serialising them. - - -Contents: - - (*) What is a circular buffer? - - (*) Measuring power-of-2 buffers. - - (*) Using memory barriers with circular buffers. - - The producer. - - The consumer. - - -========================== -WHAT IS A CIRCULAR BUFFER? -========================== - -First of all, what is a circular buffer? A circular buffer is a buffer of -fixed, finite size into which there are two indices: - - (1) A 'head' index - the point at which the producer inserts items into the - buffer. - - (2) A 'tail' index - the point at which the consumer finds the next item in - the buffer. - -Typically when the tail pointer is equal to the head pointer, the buffer is -empty; and the buffer is full when the head pointer is one less than the tail -pointer. - -The head index is incremented when items are added, and the tail index when -items are removed. The tail index should never jump the head index, and both -indices should be wrapped to 0 when they reach the end of the buffer, thus -allowing an infinite amount of data to flow through the buffer. - -Typically, items will all be of the same unit size, but this isn't strictly -required to use the techniques below. The indices can be increased by more -than 1 if multiple items or variable-sized items are to be included in the -buffer, provided that neither index overtakes the other. The implementer must -be careful, however, as a region more than one unit in size may wrap the end of -the buffer and be broken into two segments. - - -============================ -MEASURING POWER-OF-2 BUFFERS -============================ - -Calculation of the occupancy or the remaining capacity of an arbitrarily sized -circular buffer would normally be a slow operation, requiring the use of a -modulus (divide) instruction. However, if the buffer is of a power-of-2 size, -then a much quicker bitwise-AND instruction can be used instead. - -Linux provides a set of macros for handling power-of-2 circular buffers. These -can be made use of by: - - #include - -The macros are: - - (*) Measure the remaining capacity of a buffer: - - CIRC_SPACE(head_index, tail_index, buffer_size); - - This returns the amount of space left in the buffer[1] into which items - can be inserted. - - - (*) Measure the maximum consecutive immediate space in a buffer: - - CIRC_SPACE_TO_END(head_index, tail_index, buffer_size); - - This returns the amount of consecutive space left in the buffer[1] into - which items can be immediately inserted without having to wrap back to the - beginning of the buffer. - - - (*) Measure the occupancy of a buffer: - - CIRC_CNT(head_index, tail_index, buffer_size); - - This returns the number of items currently occupying a buffer[2]. - - - (*) Measure the non-wrapping occupancy of a buffer: - - CIRC_CNT_TO_END(head_index, tail_index, buffer_size); - - This returns the number of consecutive items[2] that can be extracted from - the buffer without having to wrap back to the beginning of the buffer. - - -Each of these macros will nominally return a value between 0 and buffer_size-1, -however: - - [1] CIRC_SPACE*() are intended to be used in the producer. To the producer - they will return a lower bound as the producer controls the head index, - but the consumer may still be depleting the buffer on another CPU and - moving the tail index. - - To the consumer it will show an upper bound as the producer may be busy - depleting the space. - - [2] CIRC_CNT*() are intended to be used in the consumer. To the consumer they - will return a lower bound as the consumer controls the tail index, but the - producer may still be filling the buffer on another CPU and moving the - head index. - - To the producer it will show an upper bound as the consumer may be busy - emptying the buffer. - - [3] To a third party, the order in which the writes to the indices by the - producer and consumer become visible cannot be guaranteed as they are - independent and may be made on different CPUs - so the result in such a - situation will merely be a guess, and may even be negative. - - -=========================================== -USING MEMORY BARRIERS WITH CIRCULAR BUFFERS -=========================================== - -By using memory barriers in conjunction with circular buffers, you can avoid -the need to: - - (1) use a single lock to govern access to both ends of the buffer, thus - allowing the buffer to be filled and emptied at the same time; and - - (2) use atomic counter operations. - -There are two sides to this: the producer that fills the buffer, and the -consumer that empties it. Only one thing should be filling a buffer at any one -time, and only one thing should be emptying a buffer at any one time, but the -two sides can operate simultaneously. - - -THE PRODUCER ------------- - -The producer will look something like this: - - spin_lock(&producer_lock); - - unsigned long head = buffer->head; - unsigned long tail = ACCESS_ONCE(buffer->tail); - - if (CIRC_SPACE(head, tail, buffer->size) >= 1) { - /* insert one item into the buffer */ - struct item *item = buffer[head]; - - produce_item(item); - - smp_wmb(); /* commit the item before incrementing the head */ - - buffer->head = (head + 1) & (buffer->size - 1); - - /* wake_up() will make sure that the head is committed before - * waking anyone up */ - wake_up(consumer); - } - - spin_unlock(&producer_lock); - -This will instruct the CPU that the contents of the new item must be written -before the head index makes it available to the consumer and then instructs the -CPU that the revised head index must be written before the consumer is woken. - -Note that wake_up() doesn't have to be the exact mechanism used, but whatever -is used must guarantee a (write) memory barrier between the update of the head -index and the change of state of the consumer, if a change of state occurs. - - -THE CONSUMER ------------- - -The consumer will look something like this: - - spin_lock(&consumer_lock); - - unsigned long head = ACCESS_ONCE(buffer->head); - unsigned long tail = buffer->tail; - - if (CIRC_CNT(head, tail, buffer->size) >= 1) { - /* read index before reading contents at that index */ - smp_read_barrier_depends(); - - /* extract one item from the buffer */ - struct item *item = buffer[tail]; - - consume_item(item); - - smp_mb(); /* finish reading descriptor before incrementing tail */ - - buffer->tail = (tail + 1) & (buffer->size - 1); - } - - spin_unlock(&consumer_lock); - -This will instruct the CPU to make sure the index is up to date before reading -the new item, and then it shall make sure the CPU has finished reading the item -before it writes the new tail pointer, which will erase the item. - - -Note the use of ACCESS_ONCE() in both algorithms to read the opposition index. -This prevents the compiler from discarding and reloading its cached value - -which some compilers will do across smp_read_barrier_depends(). This isn't -strictly needed if you can be sure that the opposition index will _only_ be -used the once. - - -=============== -FURTHER READING -=============== - -See also Documentation/memory-barriers.txt for a description of Linux's memory -barrier facilities. diff --git a/trunk/Documentation/filesystems/tmpfs.txt b/trunk/Documentation/filesystems/tmpfs.txt index fe09a2cb1858..3015da0c6b2a 100644 --- a/trunk/Documentation/filesystems/tmpfs.txt +++ b/trunk/Documentation/filesystems/tmpfs.txt @@ -82,13 +82,11 @@ tmpfs has a mount option to set the NUMA memory allocation policy for all files in that instance (if CONFIG_NUMA is enabled) - which can be adjusted on the fly via 'mount -o remount ...' -mpol=default use the process allocation policy - (see set_mempolicy(2)) +mpol=default prefers to allocate memory from the local node mpol=prefer:Node prefers to allocate memory from the given Node mpol=bind:NodeList allocates memory only from nodes in NodeList mpol=interleave prefers to allocate from each node in turn mpol=interleave:NodeList allocates from each node of NodeList in turn -mpol=local prefers to allocate memory from the local node NodeList format is a comma-separated list of decimal numbers and ranges, a range being two hyphen-separated decimal numbers, the smallest and @@ -136,5 +134,3 @@ Author: Christoph Rohland , 1.12.01 Updated: Hugh Dickins, 4 June 2007 -Updated: - KOSAKI Motohiro, 16 Mar 2010 diff --git a/trunk/Documentation/memory-barriers.txt b/trunk/Documentation/memory-barriers.txt index 631ad2f1b229..7f5809eddee6 100644 --- a/trunk/Documentation/memory-barriers.txt +++ b/trunk/Documentation/memory-barriers.txt @@ -3,7 +3,6 @@ ============================ By: David Howells - Paul E. McKenney Contents: @@ -61,10 +60,6 @@ Contents: - And then there's the Alpha. - (*) Example uses. - - - Circular buffers. - (*) References. @@ -2231,21 +2226,6 @@ The Alpha defines the Linux kernel's memory barrier model. See the subsection on "Cache Coherency" above. -============ -EXAMPLE USES -============ - -CIRCULAR BUFFERS ----------------- - -Memory barriers can be used to implement circular buffering without the need -of a lock to serialise the producer with the consumer. See: - - Documentation/circular-buffers.txt - -for details. - - ========== REFERENCES ========== diff --git a/trunk/Documentation/volatile-considered-harmful.txt b/trunk/Documentation/volatile-considered-harmful.txt index db0cb228d64a..991c26a6ef64 100644 --- a/trunk/Documentation/volatile-considered-harmful.txt +++ b/trunk/Documentation/volatile-considered-harmful.txt @@ -63,9 +63,9 @@ way to perform a busy wait is: cpu_relax(); The cpu_relax() call can lower CPU power consumption or yield to a -hyperthreaded twin processor; it also happens to serve as a compiler -barrier, so, once again, volatile is unnecessary. Of course, busy- -waiting is generally an anti-social act to begin with. +hyperthreaded twin processor; it also happens to serve as a memory barrier, +so, once again, volatile is unnecessary. Of course, busy-waiting is +generally an anti-social act to begin with. There are still a few rare situations where volatile makes sense in the kernel: diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS index fbc3d653d52b..449d44402083 100644 --- a/trunk/MAINTAINERS +++ b/trunk/MAINTAINERS @@ -797,12 +797,12 @@ M: Michael Petchkovsky S: Maintained ARM/NOMADIK ARCHITECTURE -M: Alessandro Rubini -M: STEricsson -L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) -S: Maintained -F: arch/arm/mach-nomadik/ -F: arch/arm/plat-nomadik/ +M: Alessandro Rubini +M: STEricsson +L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) +S: Maintained +F: arch/arm/mach-nomadik/ +F: arch/arm/plat-nomadik/ ARM/OPENMOKO NEO FREERUNNER (GTA02) MACHINE SUPPORT M: Nelson Castillo @@ -1926,17 +1926,17 @@ F: drivers/scsi/dpt* F: drivers/scsi/dpt/ DRBD DRIVER -P: Philipp Reisner -P: Lars Ellenberg -M: drbd-dev@lists.linbit.com -L: drbd-user@lists.linbit.com -W: http://www.drbd.org -T: git git://git.drbd.org/linux-2.6-drbd.git drbd -T: git git://git.drbd.org/drbd-8.3.git -S: Supported -F: drivers/block/drbd/ -F: lib/lru_cache.c -F: Documentation/blockdev/drbd/ +P: Philipp Reisner +P: Lars Ellenberg +M: drbd-dev@lists.linbit.com +L: drbd-user@lists.linbit.com +W: http://www.drbd.org +T: git git://git.drbd.org/linux-2.6-drbd.git drbd +T: git git://git.drbd.org/drbd-8.3.git +S: Supported +F: drivers/block/drbd/ +F: lib/lru_cache.c +F: Documentation/blockdev/drbd/ DRIVER CORE, KOBJECTS, AND SYSFS M: Greg Kroah-Hartman @@ -3518,8 +3518,8 @@ F: drivers/scsi/sym53c8xx_2/ LTP (Linux Test Project) M: Rishikesh K Rajak M: Garrett Cooper -M: Mike Frysinger -M: Subrata Modak +M: Mike Frysinger +M: Subrata Modak L: ltp-list@lists.sourceforge.net (subscribers-only) W: http://ltp.sourceforge.net/ T: git git://git.kernel.org/pub/scm/linux/kernel/git/galak/ltp.git @@ -6201,7 +6201,7 @@ F: arch/x86/ X86 PLATFORM DRIVERS M: Matthew Garrett L: platform-driver-x86@vger.kernel.org -T: git git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86.git +T: git git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86.git S: Maintained F: drivers/platform/x86 diff --git a/trunk/arch/s390/boot/compressed/misc.c b/trunk/arch/s390/boot/compressed/misc.c index 14e0479d3888..a97d69525829 100644 --- a/trunk/arch/s390/boot/compressed/misc.c +++ b/trunk/arch/s390/boot/compressed/misc.c @@ -24,8 +24,8 @@ /* Symbols defined by linker scripts */ extern char input_data[]; extern int input_len; -extern char _text, _end; -extern char _bss, _ebss; +extern int _text; +extern int _end; static void error(char *m); @@ -129,12 +129,12 @@ unsigned long decompress_kernel(void) unsigned long output_addr; unsigned char *output; - check_ipl_parmblock((void *) 0, (unsigned long) output + SZ__bss_start); - memset(&_bss, 0, &_ebss - &_bss); free_mem_ptr = (unsigned long)&_end; free_mem_end_ptr = free_mem_ptr + HEAP_SIZE; output = (unsigned char *) ((free_mem_end_ptr + 4095UL) & -4096UL); + check_ipl_parmblock((void *) 0, (unsigned long) output + SZ__bss_start); + #ifdef CONFIG_BLK_DEV_INITRD /* * Move the initrd right behind the end of the decompressed diff --git a/trunk/arch/s390/include/asm/system.h b/trunk/arch/s390/include/asm/system.h index 1741c1556a4e..67ee6c3c6bb3 100644 --- a/trunk/arch/s390/include/asm/system.h +++ b/trunk/arch/s390/include/asm/system.h @@ -110,7 +110,6 @@ extern void pfault_fini(void); #endif /* CONFIG_PFAULT */ extern void cmma_init(void); -extern int memcpy_real(void *, void *, size_t); #define finish_arch_switch(prev) do { \ set_fs(current->thread.mm_segment); \ @@ -219,8 +218,8 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) " l %0,%2\n" "0: nr %0,%5\n" " lr %1,%0\n" - " or %0,%3\n" - " or %1,%4\n" + " or %0,%2\n" + " or %1,%3\n" " cs %0,%1,%2\n" " jnl 1f\n" " xr %1,%0\n" @@ -240,8 +239,8 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) " l %0,%2\n" "0: nr %0,%5\n" " lr %1,%0\n" - " or %0,%3\n" - " or %1,%4\n" + " or %0,%2\n" + " or %1,%3\n" " cs %0,%1,%2\n" " jnl 1f\n" " xr %1,%0\n" diff --git a/trunk/arch/s390/kernel/head.S b/trunk/arch/s390/kernel/head.S index 9d1f76702d47..ca4a62bd862f 100644 --- a/trunk/arch/s390/kernel/head.S +++ b/trunk/arch/s390/kernel/head.S @@ -517,10 +517,7 @@ startup: lhi %r1,2 # mode 2 = esame (dump) sigp %r1,%r0,0x12 # switch to esame mode sam64 # switch to 64 bit mode - larl %r13,4f - lmh %r0,%r15,0(%r13) # clear high-order half jg startup_continue -4: .fill 16,4,0x0 #else mvi __LC_AR_MODE_ID,0 # set ESA flag (mode 0) l %r13,4f-.LPG0(%r13) diff --git a/trunk/arch/s390/kernel/head64.S b/trunk/arch/s390/kernel/head64.S index 1f70970de0aa..39580e768658 100644 --- a/trunk/arch/s390/kernel/head64.S +++ b/trunk/arch/s390/kernel/head64.S @@ -21,6 +21,7 @@ startup_continue: larl %r1,sched_clock_base_cc mvc 0(8,%r1),__LC_LAST_UPDATE_CLOCK larl %r13,.LPG1 # get base + lmh %r0,%r15,.Lzero64-.LPG1(%r13) # clear high-order half lctlg %c0,%c15,.Lctl-.LPG1(%r13) # load control registers lg %r12,.Lparmaddr-.LPG1(%r13) # pointer to parameter area # move IPL device to lowcore @@ -66,6 +67,7 @@ startup_continue: .L4malign:.quad 0xffffffffffc00000 .Lscan2g:.quad 0x80000000 + 0x20000 - 8 # 2GB + 128K - 8 .Lnop: .long 0x07000700 +.Lzero64:.fill 16,4,0x0 .Lparmaddr: .quad PARMAREA .align 64 diff --git a/trunk/arch/s390/kernel/setup.c b/trunk/arch/s390/kernel/setup.c index ba363d99de43..77a63ae419f0 100644 --- a/trunk/arch/s390/kernel/setup.c +++ b/trunk/arch/s390/kernel/setup.c @@ -401,7 +401,7 @@ setup_lowcore(void) * Setup lowcore for boot cpu */ BUILD_BUG_ON(sizeof(struct _lowcore) != LC_PAGES * 4096); - lc = __alloc_bootmem_low(LC_PAGES * PAGE_SIZE, LC_PAGES * PAGE_SIZE, 0); + lc = __alloc_bootmem(LC_PAGES * PAGE_SIZE, LC_PAGES * PAGE_SIZE, 0); lc->restart_psw.mask = PSW_BASE_BITS | PSW_DEFAULT_KEY; lc->restart_psw.addr = PSW_ADDR_AMODE | (unsigned long) restart_int_handler; @@ -433,7 +433,7 @@ setup_lowcore(void) #ifndef CONFIG_64BIT if (MACHINE_HAS_IEEE) { lc->extended_save_area_addr = (__u32) - __alloc_bootmem_low(PAGE_SIZE, PAGE_SIZE, 0); + __alloc_bootmem(PAGE_SIZE, PAGE_SIZE, 0); /* enable extended save area */ __ctl_set_bit(14, 29); } diff --git a/trunk/arch/s390/kernel/smp.c b/trunk/arch/s390/kernel/smp.c index d7d24fc3d6b7..29f65bce55e1 100644 --- a/trunk/arch/s390/kernel/smp.c +++ b/trunk/arch/s390/kernel/smp.c @@ -292,9 +292,9 @@ static void __init smp_get_save_area(unsigned int cpu, unsigned int phy_cpu) zfcpdump_save_areas[cpu] = kmalloc(sizeof(struct save_area), GFP_KERNEL); while (raw_sigp(phy_cpu, sigp_stop_and_store_status) == sigp_busy) cpu_relax(); - memcpy_real(zfcpdump_save_areas[cpu], - (void *)(unsigned long) store_prefix() + SAVE_AREA_BASE, - sizeof(struct save_area)); + memcpy(zfcpdump_save_areas[cpu], + (void *)(unsigned long) store_prefix() + SAVE_AREA_BASE, + sizeof(struct save_area)); } struct save_area *zfcpdump_save_areas[NR_CPUS + 1]; diff --git a/trunk/arch/s390/mm/maccess.c b/trunk/arch/s390/mm/maccess.c index a8c2af8c650f..81756271dc44 100644 --- a/trunk/arch/s390/mm/maccess.c +++ b/trunk/arch/s390/mm/maccess.c @@ -59,29 +59,3 @@ long probe_kernel_write(void *dst, void *src, size_t size) } return copied < 0 ? -EFAULT : 0; } - -int memcpy_real(void *dest, void *src, size_t count) -{ - register unsigned long _dest asm("2") = (unsigned long) dest; - register unsigned long _len1 asm("3") = (unsigned long) count; - register unsigned long _src asm("4") = (unsigned long) src; - register unsigned long _len2 asm("5") = (unsigned long) count; - unsigned long flags; - int rc = -EFAULT; - - if (!count) - return 0; - flags = __raw_local_irq_stnsm(0xf8UL); - asm volatile ( - "0: mvcle %1,%2,0x0\n" - "1: jo 0b\n" - " lhi %0,0x0\n" - "2:\n" - EX_TABLE(1b,2b) - : "+d" (rc), "+d" (_dest), "+d" (_src), "+d" (_len1), - "+d" (_len2), "=m" (*((long *) dest)) - : "m" (*((long *) src)) - : "cc", "memory"); - __raw_local_irq_ssm(flags); - return rc; -} diff --git a/trunk/arch/sh/boards/mach-ecovec24/setup.c b/trunk/arch/sh/boards/mach-ecovec24/setup.c index 39ed8722d11a..6c13b92742e8 100644 --- a/trunk/arch/sh/boards/mach-ecovec24/setup.c +++ b/trunk/arch/sh/boards/mach-ecovec24/setup.c @@ -836,6 +836,8 @@ static void __init sh_eth_init(struct sh_eth_plat_data *pd) pd->mac_addr[i] = mac_read(a, 0x10 + i); msleep(10); } + + i2c_put_adapter(a); } #else static void __init sh_eth_init(struct sh_eth_plat_data *pd) diff --git a/trunk/drivers/acpi/scan.c b/trunk/drivers/acpi/scan.c index 189cbc2585fa..fb7fc24fe727 100644 --- a/trunk/drivers/acpi/scan.c +++ b/trunk/drivers/acpi/scan.c @@ -8,7 +8,6 @@ #include #include #include -#include #include @@ -1033,41 +1032,6 @@ static void acpi_add_id(struct acpi_device *device, const char *dev_id) list_add_tail(&id->list, &device->pnp.ids); } -/* - * Old IBM workstations have a DSDT bug wherein the SMBus object - * lacks the SMBUS01 HID and the methods do not have the necessary "_" - * prefix. Work around this. - */ -static int acpi_ibm_smbus_match(struct acpi_device *device) -{ - acpi_handle h_dummy; - struct acpi_buffer path = {ACPI_ALLOCATE_BUFFER, NULL}; - int result; - - if (!dmi_name_in_vendors("IBM")) - return -ENODEV; - - /* Look for SMBS object */ - result = acpi_get_name(device->handle, ACPI_SINGLE_NAME, &path); - if (result) - return result; - - if (strcmp("SMBS", path.pointer)) { - result = -ENODEV; - goto out; - } - - /* Does it have the necessary (but misnamed) methods? */ - result = -ENODEV; - if (ACPI_SUCCESS(acpi_get_handle(device->handle, "SBI", &h_dummy)) && - ACPI_SUCCESS(acpi_get_handle(device->handle, "SBR", &h_dummy)) && - ACPI_SUCCESS(acpi_get_handle(device->handle, "SBW", &h_dummy))) - result = 0; -out: - kfree(path.pointer); - return result; -} - static void acpi_device_set_id(struct acpi_device *device) { acpi_status status; @@ -1118,8 +1082,6 @@ static void acpi_device_set_id(struct acpi_device *device) acpi_add_id(device, ACPI_BAY_HID); else if (ACPI_SUCCESS(acpi_dock_match(device))) acpi_add_id(device, ACPI_DOCK_HID); - else if (!acpi_ibm_smbus_match(device)) - acpi_add_id(device, ACPI_SMBUS_IBM_HID); break; case ACPI_BUS_TYPE_POWER: diff --git a/trunk/drivers/char/agp/intel-agp.c b/trunk/drivers/char/agp/intel-agp.c index b78d5c381efe..a3e10dc7cc25 100644 --- a/trunk/drivers/char/agp/intel-agp.c +++ b/trunk/drivers/char/agp/intel-agp.c @@ -97,9 +97,6 @@ EXPORT_SYMBOL(intel_agp_enabled); #define IS_PINEVIEW (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_PINEVIEW_M_HB || \ agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_PINEVIEW_HB) -#define IS_SNB (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_SANDYBRIDGE_HB || \ - agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_SANDYBRIDGE_M_HB) - #define IS_G4X (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_EAGLELAKE_HB || \ agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_Q45_HB || \ agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_G45_HB || \ @@ -110,7 +107,8 @@ EXPORT_SYMBOL(intel_agp_enabled); agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IRONLAKE_M_HB || \ agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IRONLAKE_MA_HB || \ agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IRONLAKE_MC2_HB || \ - IS_SNB) + agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_SANDYBRIDGE_HB || \ + agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_SANDYBRIDGE_M_HB) extern int agp_memory_reserved; @@ -177,10 +175,6 @@ extern int agp_memory_reserved; #define SNB_GMCH_GMS_STOLEN_448M (0xe << 3) #define SNB_GMCH_GMS_STOLEN_480M (0xf << 3) #define SNB_GMCH_GMS_STOLEN_512M (0x10 << 3) -#define SNB_GTT_SIZE_0M (0 << 8) -#define SNB_GTT_SIZE_1M (1 << 8) -#define SNB_GTT_SIZE_2M (2 << 8) -#define SNB_GTT_SIZE_MASK (3 << 8) static const struct aper_size_info_fixed intel_i810_sizes[] = { @@ -1206,9 +1200,6 @@ static void intel_i9xx_setup_flush(void) if (intel_private.ifp_resource.start) return; - if (IS_SNB) - return; - /* setup a resource for this object */ intel_private.ifp_resource.name = "Intel Flush Page"; intel_private.ifp_resource.flags = IORESOURCE_MEM; @@ -1447,8 +1438,6 @@ static unsigned long intel_i965_mask_memory(struct agp_bridge_data *bridge, static void intel_i965_get_gtt_range(int *gtt_offset, int *gtt_size) { - u16 snb_gmch_ctl; - switch (agp_bridge->dev->device) { case PCI_DEVICE_ID_INTEL_GM45_HB: case PCI_DEVICE_ID_INTEL_EAGLELAKE_HB: @@ -1460,26 +1449,9 @@ static void intel_i965_get_gtt_range(int *gtt_offset, int *gtt_size) case PCI_DEVICE_ID_INTEL_IRONLAKE_M_HB: case PCI_DEVICE_ID_INTEL_IRONLAKE_MA_HB: case PCI_DEVICE_ID_INTEL_IRONLAKE_MC2_HB: - *gtt_offset = *gtt_size = MB(2); - break; case PCI_DEVICE_ID_INTEL_SANDYBRIDGE_HB: case PCI_DEVICE_ID_INTEL_SANDYBRIDGE_M_HB: - *gtt_offset = MB(2); - - pci_read_config_word(intel_private.pcidev, SNB_GMCH_CTRL, &snb_gmch_ctl); - switch (snb_gmch_ctl & SNB_GTT_SIZE_MASK) { - default: - case SNB_GTT_SIZE_0M: - printk(KERN_ERR "Bad GTT size mask: 0x%04x.\n", snb_gmch_ctl); - *gtt_size = MB(0); - break; - case SNB_GTT_SIZE_1M: - *gtt_size = MB(1); - break; - case SNB_GTT_SIZE_2M: - *gtt_size = MB(2); - break; - } + *gtt_offset = *gtt_size = MB(2); break; default: *gtt_offset = *gtt_size = KB(512); diff --git a/trunk/drivers/gpio/max730x.c b/trunk/drivers/gpio/max730x.c index 4a7d662ff9b7..c9bced55f82b 100644 --- a/trunk/drivers/gpio/max730x.c +++ b/trunk/drivers/gpio/max730x.c @@ -242,7 +242,3 @@ int __devexit __max730x_remove(struct device *dev) return ret; } EXPORT_SYMBOL_GPL(__max730x_remove); - -MODULE_AUTHOR("Juergen Beisert, Wolfram Sang"); -MODULE_LICENSE("GPL v2"); -MODULE_DESCRIPTION("MAX730x GPIO-Expanders, generic parts"); diff --git a/trunk/drivers/gpu/drm/i915/i915_dma.c b/trunk/drivers/gpu/drm/i915/i915_dma.c index a9f8589490cf..8bfc0bbf13e6 100644 --- a/trunk/drivers/gpu/drm/i915/i915_dma.c +++ b/trunk/drivers/gpu/drm/i915/i915_dma.c @@ -1881,29 +1881,29 @@ struct drm_ioctl_desc i915_ioctls[] = { DRM_IOCTL_DEF(DRM_I915_GET_VBLANK_PIPE, i915_vblank_pipe_get, DRM_AUTH ), DRM_IOCTL_DEF(DRM_I915_VBLANK_SWAP, i915_vblank_swap, DRM_AUTH), DRM_IOCTL_DEF(DRM_I915_HWS_ADDR, i915_set_status_page, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), - DRM_IOCTL_DEF(DRM_I915_GEM_INIT, i915_gem_init_ioctl, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY|DRM_UNLOCKED), - DRM_IOCTL_DEF(DRM_I915_GEM_EXECBUFFER, i915_gem_execbuffer, DRM_AUTH|DRM_UNLOCKED), - DRM_IOCTL_DEF(DRM_I915_GEM_EXECBUFFER2, i915_gem_execbuffer2, DRM_AUTH|DRM_UNLOCKED), - DRM_IOCTL_DEF(DRM_I915_GEM_PIN, i915_gem_pin_ioctl, DRM_AUTH|DRM_ROOT_ONLY|DRM_UNLOCKED), - DRM_IOCTL_DEF(DRM_I915_GEM_UNPIN, i915_gem_unpin_ioctl, DRM_AUTH|DRM_ROOT_ONLY|DRM_UNLOCKED), - DRM_IOCTL_DEF(DRM_I915_GEM_BUSY, i915_gem_busy_ioctl, DRM_AUTH|DRM_UNLOCKED), - DRM_IOCTL_DEF(DRM_I915_GEM_THROTTLE, i915_gem_throttle_ioctl, DRM_AUTH|DRM_UNLOCKED), - DRM_IOCTL_DEF(DRM_I915_GEM_ENTERVT, i915_gem_entervt_ioctl, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY|DRM_UNLOCKED), - DRM_IOCTL_DEF(DRM_I915_GEM_LEAVEVT, i915_gem_leavevt_ioctl, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY|DRM_UNLOCKED), - DRM_IOCTL_DEF(DRM_I915_GEM_CREATE, i915_gem_create_ioctl, DRM_UNLOCKED), - DRM_IOCTL_DEF(DRM_I915_GEM_PREAD, i915_gem_pread_ioctl, DRM_UNLOCKED), - DRM_IOCTL_DEF(DRM_I915_GEM_PWRITE, i915_gem_pwrite_ioctl, DRM_UNLOCKED), - DRM_IOCTL_DEF(DRM_I915_GEM_MMAP, i915_gem_mmap_ioctl, DRM_UNLOCKED), - DRM_IOCTL_DEF(DRM_I915_GEM_MMAP_GTT, i915_gem_mmap_gtt_ioctl, DRM_UNLOCKED), - DRM_IOCTL_DEF(DRM_I915_GEM_SET_DOMAIN, i915_gem_set_domain_ioctl, DRM_UNLOCKED), - DRM_IOCTL_DEF(DRM_I915_GEM_SW_FINISH, i915_gem_sw_finish_ioctl, DRM_UNLOCKED), - DRM_IOCTL_DEF(DRM_I915_GEM_SET_TILING, i915_gem_set_tiling, DRM_UNLOCKED), - DRM_IOCTL_DEF(DRM_I915_GEM_GET_TILING, i915_gem_get_tiling, DRM_UNLOCKED), - DRM_IOCTL_DEF(DRM_I915_GEM_GET_APERTURE, i915_gem_get_aperture_ioctl, DRM_UNLOCKED), - DRM_IOCTL_DEF(DRM_I915_GET_PIPE_FROM_CRTC_ID, intel_get_pipe_from_crtc_id, DRM_UNLOCKED), - DRM_IOCTL_DEF(DRM_I915_GEM_MADVISE, i915_gem_madvise_ioctl, DRM_UNLOCKED), - DRM_IOCTL_DEF(DRM_I915_OVERLAY_PUT_IMAGE, intel_overlay_put_image, DRM_MASTER|DRM_CONTROL_ALLOW|DRM_UNLOCKED), - DRM_IOCTL_DEF(DRM_I915_OVERLAY_ATTRS, intel_overlay_attrs, DRM_MASTER|DRM_CONTROL_ALLOW|DRM_UNLOCKED), + DRM_IOCTL_DEF(DRM_I915_GEM_INIT, i915_gem_init_ioctl, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), + DRM_IOCTL_DEF(DRM_I915_GEM_EXECBUFFER, i915_gem_execbuffer, DRM_AUTH), + DRM_IOCTL_DEF(DRM_I915_GEM_EXECBUFFER2, i915_gem_execbuffer2, DRM_AUTH), + DRM_IOCTL_DEF(DRM_I915_GEM_PIN, i915_gem_pin_ioctl, DRM_AUTH|DRM_ROOT_ONLY), + DRM_IOCTL_DEF(DRM_I915_GEM_UNPIN, i915_gem_unpin_ioctl, DRM_AUTH|DRM_ROOT_ONLY), + DRM_IOCTL_DEF(DRM_I915_GEM_BUSY, i915_gem_busy_ioctl, DRM_AUTH), + DRM_IOCTL_DEF(DRM_I915_GEM_THROTTLE, i915_gem_throttle_ioctl, DRM_AUTH), + DRM_IOCTL_DEF(DRM_I915_GEM_ENTERVT, i915_gem_entervt_ioctl, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), + DRM_IOCTL_DEF(DRM_I915_GEM_LEAVEVT, i915_gem_leavevt_ioctl, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), + DRM_IOCTL_DEF(DRM_I915_GEM_CREATE, i915_gem_create_ioctl, 0), + DRM_IOCTL_DEF(DRM_I915_GEM_PREAD, i915_gem_pread_ioctl, 0), + DRM_IOCTL_DEF(DRM_I915_GEM_PWRITE, i915_gem_pwrite_ioctl, 0), + DRM_IOCTL_DEF(DRM_I915_GEM_MMAP, i915_gem_mmap_ioctl, 0), + DRM_IOCTL_DEF(DRM_I915_GEM_MMAP_GTT, i915_gem_mmap_gtt_ioctl, 0), + DRM_IOCTL_DEF(DRM_I915_GEM_SET_DOMAIN, i915_gem_set_domain_ioctl, 0), + DRM_IOCTL_DEF(DRM_I915_GEM_SW_FINISH, i915_gem_sw_finish_ioctl, 0), + DRM_IOCTL_DEF(DRM_I915_GEM_SET_TILING, i915_gem_set_tiling, 0), + DRM_IOCTL_DEF(DRM_I915_GEM_GET_TILING, i915_gem_get_tiling, 0), + DRM_IOCTL_DEF(DRM_I915_GEM_GET_APERTURE, i915_gem_get_aperture_ioctl, 0), + DRM_IOCTL_DEF(DRM_I915_GET_PIPE_FROM_CRTC_ID, intel_get_pipe_from_crtc_id, 0), + DRM_IOCTL_DEF(DRM_I915_GEM_MADVISE, i915_gem_madvise_ioctl, 0), + DRM_IOCTL_DEF(DRM_I915_OVERLAY_PUT_IMAGE, intel_overlay_put_image, DRM_MASTER|DRM_CONTROL_ALLOW), + DRM_IOCTL_DEF(DRM_I915_OVERLAY_ATTRS, intel_overlay_attrs, DRM_MASTER|DRM_CONTROL_ALLOW), }; int i915_max_ioctl = DRM_ARRAY_SIZE(i915_ioctls); diff --git a/trunk/drivers/gpu/drm/i915/i915_drv.c b/trunk/drivers/gpu/drm/i915/i915_drv.c index 4b26919abdb2..1b2e95455c05 100644 --- a/trunk/drivers/gpu/drm/i915/i915_drv.c +++ b/trunk/drivers/gpu/drm/i915/i915_drv.c @@ -139,12 +139,12 @@ const static struct intel_device_info intel_ironlake_m_info = { const static struct intel_device_info intel_sandybridge_d_info = { .is_i965g = 1, .is_i9xx = 1, .need_gfx_hws = 1, - .has_hotplug = 1, .is_gen6 = 1, + .has_hotplug = 1, }; const static struct intel_device_info intel_sandybridge_m_info = { .is_i965g = 1, .is_mobile = 1, .is_i9xx = 1, .need_gfx_hws = 1, - .has_hotplug = 1, .is_gen6 = 1, + .has_hotplug = 1, }; const static struct pci_device_id pciidlist[] = { diff --git a/trunk/drivers/gpu/drm/i915/i915_drv.h b/trunk/drivers/gpu/drm/i915/i915_drv.h index aba8260fbc5e..979439cfb827 100644 --- a/trunk/drivers/gpu/drm/i915/i915_drv.h +++ b/trunk/drivers/gpu/drm/i915/i915_drv.h @@ -205,7 +205,6 @@ struct intel_device_info { u8 is_g4x : 1; u8 is_pineview : 1; u8 is_ironlake : 1; - u8 is_gen6 : 1; u8 has_fbc : 1; u8 has_rc6 : 1; u8 has_pipe_cxsr : 1; @@ -1085,7 +1084,6 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller); #define IS_IRONLAKE_M(dev) ((dev)->pci_device == 0x0046) #define IS_IRONLAKE(dev) (INTEL_INFO(dev)->is_ironlake) #define IS_I9XX(dev) (INTEL_INFO(dev)->is_i9xx) -#define IS_GEN6(dev) (INTEL_INFO(dev)->is_gen6) #define IS_MOBILE(dev) (INTEL_INFO(dev)->is_mobile) #define IS_GEN3(dev) (IS_I915G(dev) || \ @@ -1109,6 +1107,8 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller); #define I915_NEED_GFX_HWS(dev) (INTEL_INFO(dev)->need_gfx_hws) +#define IS_GEN6(dev) ((dev)->pci_device == 0x0102) + /* With the 945 and later, Y tiling got adjusted so that it was 32 128-byte * rows, which changed the alignment requirements and fence programming. */ diff --git a/trunk/drivers/gpu/drm/i915/i915_gem.c b/trunk/drivers/gpu/drm/i915/i915_gem.c index 933e865a8929..fba37e9f775d 100644 --- a/trunk/drivers/gpu/drm/i915/i915_gem.c +++ b/trunk/drivers/gpu/drm/i915/i915_gem.c @@ -1466,6 +1466,9 @@ i915_gem_object_put_pages(struct drm_gem_object *obj) obj_priv->dirty = 0; for (i = 0; i < page_count; i++) { + if (obj_priv->pages[i] == NULL) + break; + if (obj_priv->dirty) set_page_dirty(obj_priv->pages[i]); @@ -2224,6 +2227,11 @@ i915_gem_evict_something(struct drm_device *dev, int min_size) seqno = i915_add_request(dev, NULL, obj->write_domain); if (seqno == 0) return -ENOMEM; + + ret = i915_wait_request(dev, seqno); + if (ret) + return ret; + continue; } } @@ -2248,6 +2256,7 @@ i915_gem_object_get_pages(struct drm_gem_object *obj, struct address_space *mapping; struct inode *inode; struct page *page; + int ret; if (obj_priv->pages_refcount++ != 0) return 0; @@ -2270,9 +2279,11 @@ i915_gem_object_get_pages(struct drm_gem_object *obj, mapping_gfp_mask (mapping) | __GFP_COLD | gfpmask); - if (IS_ERR(page)) - goto err_pages; - + if (IS_ERR(page)) { + ret = PTR_ERR(page); + i915_gem_object_put_pages(obj); + return ret; + } obj_priv->pages[i] = page; } @@ -2280,15 +2291,6 @@ i915_gem_object_get_pages(struct drm_gem_object *obj, i915_gem_object_do_bit_17_swizzle(obj); return 0; - -err_pages: - while (i--) - page_cache_release(obj_priv->pages[i]); - - drm_free_large(obj_priv->pages); - obj_priv->pages = NULL; - obj_priv->pages_refcount--; - return PTR_ERR(page); } static void sandybridge_write_fence_reg(struct drm_i915_fence_reg *reg) @@ -4728,11 +4730,6 @@ i915_gem_init_ringbuffer(struct drm_device *dev) ring->space += ring->Size; } - if (IS_I9XX(dev) && !IS_GEN3(dev)) { - I915_WRITE(MI_MODE, - (VS_TIMER_DISPATCH) << 16 | VS_TIMER_DISPATCH); - } - return 0; } diff --git a/trunk/drivers/gpu/drm/i915/i915_gem_tiling.c b/trunk/drivers/gpu/drm/i915/i915_gem_tiling.c index c01c878e51ba..b5c55d88ff76 100644 --- a/trunk/drivers/gpu/drm/i915/i915_gem_tiling.c +++ b/trunk/drivers/gpu/drm/i915/i915_gem_tiling.c @@ -325,12 +325,9 @@ i915_gem_set_tiling(struct drm_device *dev, void *data, * need to ensure that any fence register is cleared. */ if (!i915_gem_object_fence_offset_ok(obj, args->tiling_mode)) - ret = i915_gem_object_unbind(obj); - else if (obj_priv->fence_reg != I915_FENCE_REG_NONE) - ret = i915_gem_object_put_fence_reg(obj); + ret = i915_gem_object_unbind(obj); else - i915_gem_release_mmap(obj); - + ret = i915_gem_object_put_fence_reg(obj); if (ret != 0) { WARN(ret != -ERESTARTSYS, "failed to reset object for tiling switch"); diff --git a/trunk/drivers/gpu/drm/i915/i915_reg.h b/trunk/drivers/gpu/drm/i915/i915_reg.h index cbbf59f56dfa..3d59862c7ccd 100644 --- a/trunk/drivers/gpu/drm/i915/i915_reg.h +++ b/trunk/drivers/gpu/drm/i915/i915_reg.h @@ -298,10 +298,6 @@ #define INSTDONE 0x02090 #define NOPID 0x02094 #define HWSTAM 0x02098 - -#define MI_MODE 0x0209c -# define VS_TIMER_DISPATCH (1 << 6) - #define SCPD0 0x0209c /* 915+ only */ #define IER 0x020a0 #define IIR 0x020a4 @@ -370,7 +366,7 @@ #define FBC_CTL_PERIODIC (1<<30) #define FBC_CTL_INTERVAL_SHIFT (16) #define FBC_CTL_UNCOMPRESSIBLE (1<<14) -#define FBC_CTL_C3_IDLE (1<<13) +#define FBC_C3_IDLE (1<<13) #define FBC_CTL_STRIDE_SHIFT (5) #define FBC_CTL_FENCENO (1<<0) #define FBC_COMMAND 0x0320c @@ -2176,14 +2172,6 @@ #define DISPLAY_PORT_PLL_BIOS_1 0x46010 #define DISPLAY_PORT_PLL_BIOS_2 0x46014 -#define PCH_DSPCLK_GATE_D 0x42020 -# define DPFDUNIT_CLOCK_GATE_DISABLE (1 << 7) -# define DPARBUNIT_CLOCK_GATE_DISABLE (1 << 5) - -#define PCH_3DCGDIS0 0x46020 -# define MARIUNIT_CLOCK_GATE_DISABLE (1 << 18) -# define SVSMUNIT_CLOCK_GATE_DISABLE (1 << 1) - #define FDI_PLL_FREQ_CTL 0x46030 #define FDI_PLL_FREQ_CHANGE_REQUEST (1<<24) #define FDI_PLL_FREQ_LOCK_LIMIT_MASK 0xfff00 diff --git a/trunk/drivers/gpu/drm/i915/intel_bios.c b/trunk/drivers/gpu/drm/i915/intel_bios.c index f9ba452f0cbf..70c9d4ba7042 100644 --- a/trunk/drivers/gpu/drm/i915/intel_bios.c +++ b/trunk/drivers/gpu/drm/i915/intel_bios.c @@ -417,9 +417,8 @@ parse_edp(struct drm_i915_private *dev_priv, struct bdb_header *bdb) edp = find_section(bdb, BDB_EDP); if (!edp) { if (SUPPORTS_EDP(dev_priv->dev) && dev_priv->edp_support) { - DRM_DEBUG_KMS("No eDP BDB found but eDP panel " - "supported, assume 18bpp panel color " - "depth.\n"); + DRM_DEBUG_KMS("No eDP BDB found but eDP panel supported,\ + assume 18bpp panel color depth.\n"); dev_priv->edp_bpp = 18; } return; diff --git a/trunk/drivers/gpu/drm/i915/intel_display.c b/trunk/drivers/gpu/drm/i915/intel_display.c index 58fc7fa0eb1d..9cd6de5f9906 100644 --- a/trunk/drivers/gpu/drm/i915/intel_display.c +++ b/trunk/drivers/gpu/drm/i915/intel_display.c @@ -1032,7 +1032,7 @@ static void i8xx_enable_fbc(struct drm_crtc *crtc, unsigned long interval) /* enable it... */ fbc_ctl = FBC_CTL_EN | FBC_CTL_PERIODIC; if (IS_I945GM(dev)) - fbc_ctl |= FBC_CTL_C3_IDLE; /* 945 needs special SR handling */ + fbc_ctl |= FBC_C3_IDLE; /* 945 needs special SR handling */ fbc_ctl |= (dev_priv->cfb_pitch & 0xff) << FBC_CTL_STRIDE_SHIFT; fbc_ctl |= (interval & 0x2fff) << FBC_CTL_INTERVAL_SHIFT; if (obj_priv->tiling_mode != I915_TILING_NONE) @@ -4717,20 +4717,6 @@ void intel_init_clock_gating(struct drm_device *dev) * specs, but enable as much else as we can. */ if (HAS_PCH_SPLIT(dev)) { - uint32_t dspclk_gate = VRHUNIT_CLOCK_GATE_DISABLE; - - if (IS_IRONLAKE(dev)) { - /* Required for FBC */ - dspclk_gate |= DPFDUNIT_CLOCK_GATE_DISABLE; - /* Required for CxSR */ - dspclk_gate |= DPARBUNIT_CLOCK_GATE_DISABLE; - - I915_WRITE(PCH_3DCGDIS0, - MARIUNIT_CLOCK_GATE_DISABLE | - SVSMUNIT_CLOCK_GATE_DISABLE); - } - - I915_WRITE(PCH_DSPCLK_GATE_D, dspclk_gate); return; } else if (IS_G4X(dev)) { uint32_t dspclk_gate; diff --git a/trunk/drivers/gpu/drm/i915/intel_lvds.c b/trunk/drivers/gpu/drm/i915/intel_lvds.c index 2b3fa7a3c028..14e516fdc2dd 100644 --- a/trunk/drivers/gpu/drm/i915/intel_lvds.c +++ b/trunk/drivers/gpu/drm/i915/intel_lvds.c @@ -607,6 +607,53 @@ static void intel_lvds_mode_set(struct drm_encoder *encoder, I915_WRITE(PFIT_CONTROL, lvds_priv->pfit_control); } +/* Some lid devices report incorrect lid status, assume they're connected */ +static const struct dmi_system_id bad_lid_status[] = { + { + .ident = "Compaq nx9020", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), + DMI_MATCH(DMI_BOARD_NAME, "3084"), + }, + }, + { + .ident = "Samsung SX20S", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Samsung Electronics"), + DMI_MATCH(DMI_BOARD_NAME, "SX20S"), + }, + }, + { + .ident = "Aspire One", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Acer"), + DMI_MATCH(DMI_PRODUCT_NAME, "Aspire one"), + }, + }, + { + .ident = "Aspire 1810T", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Acer"), + DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 1810T"), + }, + }, + { + .ident = "PC-81005", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "MALATA"), + DMI_MATCH(DMI_PRODUCT_NAME, "PC-81005"), + }, + }, + { + .ident = "Clevo M5x0N", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "CLEVO Co."), + DMI_MATCH(DMI_BOARD_NAME, "M5x0N"), + }, + }, + { } +}; + /** * Detect the LVDS connection. * @@ -622,9 +669,12 @@ static enum drm_connector_status intel_lvds_detect(struct drm_connector *connect /* ACPI lid methods were generally unreliable in this generation, so * don't even bother. */ - if (IS_GEN2(dev) || IS_GEN3(dev)) + if (IS_GEN2(dev)) return connector_status_connected; + if (!dmi_check_system(bad_lid_status) && !acpi_lid_open()) + status = connector_status_disconnected; + return status; } diff --git a/trunk/drivers/gpu/drm/i915/intel_overlay.c b/trunk/drivers/gpu/drm/i915/intel_overlay.c index 60595fc26fdd..d355d1d527e7 100644 --- a/trunk/drivers/gpu/drm/i915/intel_overlay.c +++ b/trunk/drivers/gpu/drm/i915/intel_overlay.c @@ -1068,18 +1068,14 @@ int intel_overlay_put_image(struct drm_device *dev, void *data, drmmode_obj = drm_mode_object_find(dev, put_image_rec->crtc_id, DRM_MODE_OBJECT_CRTC); - if (!drmmode_obj) { - ret = -ENOENT; - goto out_free; - } + if (!drmmode_obj) + return -ENOENT; crtc = to_intel_crtc(obj_to_crtc(drmmode_obj)); new_bo = drm_gem_object_lookup(dev, file_priv, put_image_rec->bo_handle); - if (!new_bo) { - ret = -ENOENT; - goto out_free; - } + if (!new_bo) + return -ENOENT; mutex_lock(&dev->mode_config.mutex); mutex_lock(&dev->struct_mutex); @@ -1169,7 +1165,6 @@ int intel_overlay_put_image(struct drm_device *dev, void *data, mutex_unlock(&dev->struct_mutex); mutex_unlock(&dev->mode_config.mutex); drm_gem_object_unreference_unlocked(new_bo); -out_free: kfree(params); return ret; diff --git a/trunk/drivers/i2c/busses/i2c-scmi.c b/trunk/drivers/i2c/busses/i2c-scmi.c index 388cbdc96db7..365e0becaf12 100644 --- a/trunk/drivers/i2c/busses/i2c-scmi.c +++ b/trunk/drivers/i2c/busses/i2c-scmi.c @@ -33,7 +33,6 @@ struct acpi_smbus_cmi { u8 cap_info:1; u8 cap_read:1; u8 cap_write:1; - struct smbus_methods_t *methods; }; static const struct smbus_methods_t smbus_methods = { @@ -42,19 +41,10 @@ static const struct smbus_methods_t smbus_methods = { .mt_sbw = "_SBW", }; -/* Some IBM BIOSes omit the leading underscore */ -static const struct smbus_methods_t ibm_smbus_methods = { - .mt_info = "SBI_", - .mt_sbr = "SBR_", - .mt_sbw = "SBW_", -}; - static const struct acpi_device_id acpi_smbus_cmi_ids[] = { - {"SMBUS01", (kernel_ulong_t)&smbus_methods}, - {ACPI_SMBUS_IBM_HID, (kernel_ulong_t)&ibm_smbus_methods}, + {"SMBUS01", 0}, {"", 0} }; -MODULE_DEVICE_TABLE(acpi, acpi_smbus_cmi_ids); #define ACPI_SMBUS_STATUS_OK 0x00 #define ACPI_SMBUS_STATUS_FAIL 0x07 @@ -160,11 +150,11 @@ acpi_smbus_cmi_access(struct i2c_adapter *adap, u16 addr, unsigned short flags, if (read_write == I2C_SMBUS_READ) { protocol |= ACPI_SMBUS_PRTCL_READ; - method = smbus_cmi->methods->mt_sbr; + method = smbus_methods.mt_sbr; input.count = 3; } else { protocol |= ACPI_SMBUS_PRTCL_WRITE; - method = smbus_cmi->methods->mt_sbw; + method = smbus_methods.mt_sbw; input.count = 5; } @@ -300,13 +290,13 @@ static int acpi_smbus_cmi_add_cap(struct acpi_smbus_cmi *smbus_cmi, union acpi_object *obj; acpi_status status; - if (!strcmp(name, smbus_cmi->methods->mt_info)) { + if (!strcmp(name, smbus_methods.mt_info)) { status = acpi_evaluate_object(smbus_cmi->handle, - smbus_cmi->methods->mt_info, + smbus_methods.mt_info, NULL, &buffer); if (ACPI_FAILURE(status)) { ACPI_ERROR((AE_INFO, "Evaluating %s: %i", - smbus_cmi->methods->mt_info, status)); + smbus_methods.mt_info, status)); return -EIO; } @@ -329,9 +319,9 @@ static int acpi_smbus_cmi_add_cap(struct acpi_smbus_cmi *smbus_cmi, kfree(buffer.pointer); smbus_cmi->cap_info = 1; - } else if (!strcmp(name, smbus_cmi->methods->mt_sbr)) + } else if (!strcmp(name, smbus_methods.mt_sbr)) smbus_cmi->cap_read = 1; - else if (!strcmp(name, smbus_cmi->methods->mt_sbw)) + else if (!strcmp(name, smbus_methods.mt_sbw)) smbus_cmi->cap_write = 1; else ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Unsupported CMI method: %s\n", @@ -359,7 +349,6 @@ static acpi_status acpi_smbus_cmi_query_methods(acpi_handle handle, u32 level, static int acpi_smbus_cmi_add(struct acpi_device *device) { struct acpi_smbus_cmi *smbus_cmi; - const struct acpi_device_id *id; smbus_cmi = kzalloc(sizeof(struct acpi_smbus_cmi), GFP_KERNEL); if (!smbus_cmi) @@ -373,11 +362,6 @@ static int acpi_smbus_cmi_add(struct acpi_device *device) smbus_cmi->cap_read = 0; smbus_cmi->cap_write = 0; - for (id = acpi_smbus_cmi_ids; id->id[0]; id++) - if (!strcmp(id->id, acpi_device_hid(device))) - smbus_cmi->methods = - (struct smbus_methods_t *) id->driver_data; - acpi_walk_namespace(ACPI_TYPE_METHOD, smbus_cmi->handle, 1, acpi_smbus_cmi_query_methods, NULL, smbus_cmi, NULL); diff --git a/trunk/drivers/misc/c2port/core.c b/trunk/drivers/misc/c2port/core.c index b7a85f46a6c2..b5346b4db91a 100644 --- a/trunk/drivers/misc/c2port/core.c +++ b/trunk/drivers/misc/c2port/core.c @@ -912,8 +912,8 @@ struct c2port_device *c2port_device_register(char *name, c2dev->dev = device_create(c2port_class, NULL, 0, c2dev, "c2port%d", id); - if (unlikely(IS_ERR(c2dev->dev))) { - ret = PTR_ERR(c2dev->dev); + if (unlikely(!c2dev->dev)) { + ret = -ENOMEM; goto error_device_create; } dev_set_drvdata(c2dev->dev, c2dev); diff --git a/trunk/drivers/mmc/core/mmc.c b/trunk/drivers/mmc/core/mmc.c index e041c003db22..0eac6c814904 100644 --- a/trunk/drivers/mmc/core/mmc.c +++ b/trunk/drivers/mmc/core/mmc.c @@ -225,7 +225,7 @@ static int mmc_read_ext_csd(struct mmc_card *card) mmc_card_set_blockaddr(card); } - switch (ext_csd[EXT_CSD_CARD_TYPE] & EXT_CSD_CARD_TYPE_MASK) { + switch (ext_csd[EXT_CSD_CARD_TYPE]) { case EXT_CSD_CARD_TYPE_52 | EXT_CSD_CARD_TYPE_26: card->ext_csd.hs_max_dtr = 52000000; break; @@ -237,6 +237,7 @@ static int mmc_read_ext_csd(struct mmc_card *card) printk(KERN_WARNING "%s: card is mmc v4 but doesn't " "support any high-speed modes.\n", mmc_hostname(card->host)); + goto out; } if (card->ext_csd.rev >= 3) { diff --git a/trunk/drivers/regulator/core.c b/trunk/drivers/regulator/core.c index 5af16c2bb540..c7bbe30010f7 100644 --- a/trunk/drivers/regulator/core.c +++ b/trunk/drivers/regulator/core.c @@ -1038,7 +1038,6 @@ static struct regulator *create_regulator(struct regulator_dev *rdev, goto overflow_err; regulator->dev = dev; - sysfs_attr_init(®ulator->dev_attr.attr); regulator->dev_attr.attr.name = kstrdup(buf, GFP_KERNEL); if (regulator->dev_attr.attr.name == NULL) goto attr_name_err; diff --git a/trunk/drivers/regulator/lp3971.c b/trunk/drivers/regulator/lp3971.c index b20b3e1d821a..f5532ed79272 100644 --- a/trunk/drivers/regulator/lp3971.c +++ b/trunk/drivers/regulator/lp3971.c @@ -45,7 +45,7 @@ static int lp3971_set_bits(struct lp3971 *lp3971, u8 reg, u16 mask, u16 val); LP3971_BUCK2 -> 4 LP3971_BUCK3 -> 6 */ -#define BUCK_VOL_CHANGE_SHIFT(x) (((!!x) << 2) | (x & ~0x01)) +#define BUCK_VOL_CHANGE_SHIFT(x) (((1 << x) & ~0x01) << 1) #define BUCK_VOL_CHANGE_FLAG_GO 0x01 #define BUCK_VOL_CHANGE_FLAG_TARGET 0x02 #define BUCK_VOL_CHANGE_FLAG_MASK 0x03 @@ -187,8 +187,7 @@ static int lp3971_ldo_set_voltage(struct regulator_dev *dev, return -EINVAL; return lp3971_set_bits(lp3971, LP3971_LDO_VOL_CONTR_REG(ldo), - LDO_VOL_CONTR_MASK << LDO_VOL_CONTR_SHIFT(ldo), - val << LDO_VOL_CONTR_SHIFT(ldo)); + LDO_VOL_CONTR_MASK << LDO_VOL_CONTR_SHIFT(ldo), val); } static struct regulator_ops lp3971_ldo_ops = { @@ -440,10 +439,6 @@ static int __devinit setup_regulators(struct lp3971 *lp3971, lp3971->num_regulators = pdata->num_regulators; lp3971->rdev = kcalloc(pdata->num_regulators, sizeof(struct regulator_dev *), GFP_KERNEL); - if (!lp3971->rdev) { - err = -ENOMEM; - goto err_nomem; - } /* Instantiate the regulators */ for (i = 0; i < pdata->num_regulators; i++) { @@ -466,7 +461,6 @@ static int __devinit setup_regulators(struct lp3971 *lp3971, regulator_unregister(lp3971->rdev[i]); kfree(lp3971->rdev); lp3971->rdev = NULL; -err_nomem: return err; } diff --git a/trunk/drivers/regulator/max1586.c b/trunk/drivers/regulator/max1586.c index c0b09e15edb6..a49fc952c9a9 100644 --- a/trunk/drivers/regulator/max1586.c +++ b/trunk/drivers/regulator/max1586.c @@ -243,8 +243,8 @@ static int __devexit max1586_pmic_remove(struct i2c_client *client) for (i = 0; i <= MAX1586_V6; i++) if (rdev[i]) regulator_unregister(rdev[i]); - i2c_set_clientdata(client, NULL); kfree(rdev); + i2c_set_clientdata(client, NULL); return 0; } diff --git a/trunk/drivers/regulator/max8649.c b/trunk/drivers/regulator/max8649.c index 833aaedc7e64..3ebdf698c648 100644 --- a/trunk/drivers/regulator/max8649.c +++ b/trunk/drivers/regulator/max8649.c @@ -356,7 +356,6 @@ static int __devinit max8649_regulator_probe(struct i2c_client *client, dev_info(info->dev, "Max8649 regulator device is detected.\n"); return 0; out: - i2c_set_clientdata(client, NULL); kfree(info); return ret; } @@ -368,9 +367,9 @@ static int __devexit max8649_regulator_remove(struct i2c_client *client) if (info) { if (info->regulator) regulator_unregister(info->regulator); - i2c_set_clientdata(client, NULL); kfree(info); } + i2c_set_clientdata(client, NULL); return 0; } diff --git a/trunk/drivers/regulator/max8660.c b/trunk/drivers/regulator/max8660.c index 47f90b2fc290..f12f1bb62138 100644 --- a/trunk/drivers/regulator/max8660.c +++ b/trunk/drivers/regulator/max8660.c @@ -470,8 +470,8 @@ static int __devexit max8660_remove(struct i2c_client *client) for (i = 0; i < MAX8660_V_END; i++) if (rdev[i]) regulator_unregister(rdev[i]); - i2c_set_clientdata(client, NULL); kfree(rdev); + i2c_set_clientdata(client, NULL); return 0; } diff --git a/trunk/drivers/regulator/max8925-regulator.c b/trunk/drivers/regulator/max8925-regulator.c index b6218f11c957..67873f08ed40 100644 --- a/trunk/drivers/regulator/max8925-regulator.c +++ b/trunk/drivers/regulator/max8925-regulator.c @@ -230,7 +230,7 @@ static struct max8925_regulator_info max8925_regulator_info[] = { MAX8925_LDO(20, 750, 3900, 50), }; -static struct max8925_regulator_info * __devinit find_regulator_info(int id) +static inline struct max8925_regulator_info *find_regulator_info(int id) { struct max8925_regulator_info *ri; int i; @@ -247,7 +247,7 @@ static int __devinit max8925_regulator_probe(struct platform_device *pdev) { struct max8925_chip *chip = dev_get_drvdata(pdev->dev.parent); struct max8925_platform_data *pdata = chip->dev->platform_data; - struct max8925_regulator_info *ri; + struct max8925_regulator_info *ri = NULL; struct regulator_dev *rdev; ri = find_regulator_info(pdev->id); @@ -274,9 +274,7 @@ static int __devexit max8925_regulator_remove(struct platform_device *pdev) { struct regulator_dev *rdev = platform_get_drvdata(pdev); - platform_set_drvdata(pdev, NULL); regulator_unregister(rdev); - return 0; } diff --git a/trunk/drivers/rtc/rtc-mc13783.c b/trunk/drivers/rtc/rtc-mc13783.c index 1379c7faa448..d60c81b7b693 100644 --- a/trunk/drivers/rtc/rtc-mc13783.c +++ b/trunk/drivers/rtc/rtc-mc13783.c @@ -319,38 +319,35 @@ static int __devinit mc13783_rtc_probe(struct platform_device *pdev) { int ret; struct mc13783_rtc *priv; - struct mc13783 *mc13783; int rtcrst_pending; priv = kzalloc(sizeof(*priv), GFP_KERNEL); if (!priv) return -ENOMEM; - mc13783 = dev_get_drvdata(pdev->dev.parent); - priv->mc13783 = mc13783; - + priv->mc13783 = dev_get_drvdata(pdev->dev.parent); platform_set_drvdata(pdev, priv); - mc13783_lock(mc13783); + mc13783_lock(priv->mc13783); - ret = mc13783_irq_request(mc13783, MC13783_IRQ_RTCRST, + ret = mc13783_irq_request(priv->mc13783, MC13783_IRQ_RTCRST, mc13783_rtc_reset_handler, DRIVER_NAME, priv); if (ret) goto err_reset_irq_request; - ret = mc13783_irq_status(mc13783, MC13783_IRQ_RTCRST, + ret = mc13783_irq_status(priv->mc13783, MC13783_IRQ_RTCRST, NULL, &rtcrst_pending); if (ret) goto err_reset_irq_status; priv->valid = !rtcrst_pending; - ret = mc13783_irq_request_nounmask(mc13783, MC13783_IRQ_1HZ, + ret = mc13783_irq_request_nounmask(priv->mc13783, MC13783_IRQ_1HZ, mc13783_rtc_update_handler, DRIVER_NAME, priv); if (ret) goto err_update_irq_request; - ret = mc13783_irq_request_nounmask(mc13783, MC13783_IRQ_TODA, + ret = mc13783_irq_request_nounmask(priv->mc13783, MC13783_IRQ_TODA, mc13783_rtc_alarm_handler, DRIVER_NAME, priv); if (ret) goto err_alarm_irq_request; @@ -360,22 +357,22 @@ static int __devinit mc13783_rtc_probe(struct platform_device *pdev) if (IS_ERR(priv->rtc)) { ret = PTR_ERR(priv->rtc); - mc13783_irq_free(mc13783, MC13783_IRQ_TODA, priv); + mc13783_irq_free(priv->mc13783, MC13783_IRQ_TODA, priv); err_alarm_irq_request: - mc13783_irq_free(mc13783, MC13783_IRQ_1HZ, priv); + mc13783_irq_free(priv->mc13783, MC13783_IRQ_1HZ, priv); err_update_irq_request: err_reset_irq_status: - mc13783_irq_free(mc13783, MC13783_IRQ_RTCRST, priv); + mc13783_irq_free(priv->mc13783, MC13783_IRQ_RTCRST, priv); err_reset_irq_request: platform_set_drvdata(pdev, NULL); kfree(priv); } - mc13783_unlock(mc13783); + mc13783_unlock(priv->mc13783); return ret; } diff --git a/trunk/drivers/s390/block/dasd_3990_erp.c b/trunk/drivers/s390/block/dasd_3990_erp.c index b3736b8aad39..51224f76b980 100644 --- a/trunk/drivers/s390/block/dasd_3990_erp.c +++ b/trunk/drivers/s390/block/dasd_3990_erp.c @@ -2287,8 +2287,7 @@ static struct dasd_ccw_req *dasd_3990_erp_add_erp(struct dasd_ccw_req *cqr) if (cqr->cpmode == 1) { cplength = 0; - /* TCW needs to be 64 byte aligned, so leave enough room */ - datasize = 64 + sizeof(struct tcw) + sizeof(struct tsb); + datasize = sizeof(struct tcw) + sizeof(struct tsb); } else { cplength = 2; datasize = 0; @@ -2317,8 +2316,8 @@ static struct dasd_ccw_req *dasd_3990_erp_add_erp(struct dasd_ccw_req *cqr) if (cqr->cpmode == 1) { /* make a shallow copy of the original tcw but set new tsb */ erp->cpmode = 1; - erp->cpaddr = PTR_ALIGN(erp->data, 64); - tcw = erp->cpaddr; + erp->cpaddr = erp->data; + tcw = erp->data; tsb = (struct tsb *) &tcw[1]; *tcw = *((struct tcw *)cqr->cpaddr); tcw->tsb = (long)tsb; diff --git a/trunk/drivers/s390/block/dasd_eckd.c b/trunk/drivers/s390/block/dasd_eckd.c index 0cb233116855..01f4e7a34aa8 100644 --- a/trunk/drivers/s390/block/dasd_eckd.c +++ b/trunk/drivers/s390/block/dasd_eckd.c @@ -3155,11 +3155,11 @@ static void dasd_eckd_dump_sense_tcw(struct dasd_device *device, tsb = NULL; sense = NULL; - if (irb->scsw.tm.tcw && (irb->scsw.tm.fcxs == 0x01)) + if (irb->scsw.tm.tcw) tsb = tcw_get_tsb( (struct tcw *)(unsigned long)irb->scsw.tm.tcw); - if (tsb) { + if (tsb && (irb->scsw.tm.fcxs == 0x01)) { len += sprintf(page + len, KERN_ERR PRINTK_HEADER " tsb->length %d\n", tsb->length); len += sprintf(page + len, KERN_ERR PRINTK_HEADER diff --git a/trunk/drivers/s390/char/sclp_async.c b/trunk/drivers/s390/char/sclp_async.c index f449c696e503..740fe405c395 100644 --- a/trunk/drivers/s390/char/sclp_async.c +++ b/trunk/drivers/s390/char/sclp_async.c @@ -84,7 +84,6 @@ static int proc_handler_callhome(struct ctl_table *ctl, int write, rc = copy_from_user(buf, buffer, sizeof(buf)); if (rc != 0) return -EFAULT; - buf[len - 1] = '\0'; if (strict_strtoul(buf, 0, &val) != 0) return -EINVAL; if (val != 0 && val != 1) diff --git a/trunk/drivers/s390/char/sclp_cmd.c b/trunk/drivers/s390/char/sclp_cmd.c index 4b60ede07f0e..fc7ae05ce48a 100644 --- a/trunk/drivers/s390/char/sclp_cmd.c +++ b/trunk/drivers/s390/char/sclp_cmd.c @@ -308,13 +308,6 @@ struct assign_storage_sccb { u16 rn; } __packed; -int arch_get_memory_phys_device(unsigned long start_pfn) -{ - if (!rzm) - return 0; - return PFN_PHYS(start_pfn) >> ilog2(rzm); -} - static unsigned long long rn2addr(u16 rn) { return (unsigned long long) (rn - 1) * rzm; @@ -711,6 +704,13 @@ int sclp_chp_deconfigure(struct chp_id chpid) return do_chp_configure(SCLP_CMDW_DECONFIGURE_CHPATH | chpid.id << 8); } +int arch_get_memory_phys_device(unsigned long start_pfn) +{ + if (!rzm) + return 0; + return PFN_PHYS(start_pfn) / rzm; +} + struct chp_info_sccb { struct sccb_header header; u8 recognized[SCLP_CHP_INFO_MASK_SIZE]; diff --git a/trunk/drivers/s390/char/zcore.c b/trunk/drivers/s390/char/zcore.c index 3166d85914f2..3438658b66b7 100644 --- a/trunk/drivers/s390/char/zcore.c +++ b/trunk/drivers/s390/char/zcore.c @@ -141,6 +141,33 @@ static int memcpy_hsa_kernel(void *dest, unsigned long src, size_t count) return memcpy_hsa(dest, src, count, TO_KERNEL); } +static int memcpy_real(void *dest, unsigned long src, size_t count) +{ + unsigned long flags; + int rc = -EFAULT; + register unsigned long _dest asm("2") = (unsigned long) dest; + register unsigned long _len1 asm("3") = (unsigned long) count; + register unsigned long _src asm("4") = src; + register unsigned long _len2 asm("5") = (unsigned long) count; + + if (count == 0) + return 0; + flags = __raw_local_irq_stnsm(0xf8UL); /* switch to real mode */ + asm volatile ( + "0: mvcle %1,%2,0x0\n" + "1: jo 0b\n" + " lhi %0,0x0\n" + "2:\n" + EX_TABLE(1b,2b) + : "+d" (rc), "+d" (_dest), "+d" (_src), "+d" (_len1), + "+d" (_len2), "=m" (*((long*)dest)) + : "m" (*((long*)src)) + : "cc", "memory"); + __raw_local_irq_ssm(flags); + + return rc; +} + static int memcpy_real_user(void __user *dest, unsigned long src, size_t count) { static char buf[4096]; @@ -148,7 +175,7 @@ static int memcpy_real_user(void __user *dest, unsigned long src, size_t count) while (offs < count) { size = min(sizeof(buf), count - offs); - if (memcpy_real(buf, (void *) src + offs, size)) + if (memcpy_real(buf, src + offs, size)) return -EFAULT; if (copy_to_user(dest + offs, buf, size)) return -EFAULT; @@ -636,7 +663,7 @@ static int __init zcore_reipl_init(void) if (ipib_info.ipib < ZFCPDUMP_HSA_SIZE) rc = memcpy_hsa_kernel(ipl_block, ipib_info.ipib, PAGE_SIZE); else - rc = memcpy_real(ipl_block, (void *) ipib_info.ipib, PAGE_SIZE); + rc = memcpy_real(ipl_block, ipib_info.ipib, PAGE_SIZE); if (rc) { free_page((unsigned long) ipl_block); return rc; diff --git a/trunk/drivers/video/geode/lxfb.h b/trunk/drivers/video/geode/lxfb.h index e4c4d89b7860..cc781c00f75d 100644 --- a/trunk/drivers/video/geode/lxfb.h +++ b/trunk/drivers/video/geode/lxfb.h @@ -365,8 +365,6 @@ enum fp_registers { FP_CRC, /* 0x458 */ }; -#define FP_PT2_HSP (1 << 22) -#define FP_PT2_VSP (1 << 23) #define FP_PT2_SCRC (1 << 27) /* shfclk free */ #define FP_PM_P (1 << 24) /* panel power ctl */ diff --git a/trunk/drivers/video/geode/lxfb_ops.c b/trunk/drivers/video/geode/lxfb_ops.c index bc35a95e59d4..0e5d8c7c3eba 100644 --- a/trunk/drivers/video/geode/lxfb_ops.c +++ b/trunk/drivers/video/geode/lxfb_ops.c @@ -274,15 +274,7 @@ static void lx_graphics_enable(struct fb_info *info) u32 msrlo, msrhi; write_fp(par, FP_PT1, 0); - temp = FP_PT2_SCRC; - - if (info->var.sync & FB_SYNC_HOR_HIGH_ACT) - temp |= FP_PT2_HSP; - - if (info->var.sync & FB_SYNC_VERT_HIGH_ACT) - temp |= FP_PT2_VSP; - - write_fp(par, FP_PT2, temp); + write_fp(par, FP_PT2, FP_PT2_SCRC); write_fp(par, FP_DFC, FP_DFC_BC); msrlo = MSR_LX_MSR_PADSEL_TFT_SEL_LOW; diff --git a/trunk/fs/binfmt_aout.c b/trunk/fs/binfmt_aout.c index 9b6aef0f75e5..15d80bb35d6f 100644 --- a/trunk/fs/binfmt_aout.c +++ b/trunk/fs/binfmt_aout.c @@ -75,16 +75,14 @@ static int aout_core_dump(struct coredump_params *cprm) struct file *file = cprm->file; mm_segment_t fs; int has_dumped = 0; - void __user *dump_start; - int dump_size; + unsigned long dump_start, dump_size; struct user dump; #ifdef __alpha__ -# define START_DATA(u) ((void __user *)u.start_data) +# define START_DATA(u) (u.start_data) #else -# define START_DATA(u) ((void __user *)((u.u_tsize << PAGE_SHIFT) + \ - u.start_code)) +# define START_DATA(u) ((u.u_tsize << PAGE_SHIFT) + u.start_code) #endif -# define START_STACK(u) ((void __user *)u.start_stack) +# define START_STACK(u) (u.start_stack) fs = get_fs(); set_fs(KERNEL_DS); @@ -106,9 +104,9 @@ static int aout_core_dump(struct coredump_params *cprm) /* make sure we actually have a data and stack area to dump */ set_fs(USER_DS); - if (!access_ok(VERIFY_READ, START_DATA(dump), dump.u_dsize << PAGE_SHIFT)) + if (!access_ok(VERIFY_READ, (void __user *)START_DATA(dump), dump.u_dsize << PAGE_SHIFT)) dump.u_dsize = 0; - if (!access_ok(VERIFY_READ, START_STACK(dump), dump.u_ssize << PAGE_SHIFT)) + if (!access_ok(VERIFY_READ, (void __user *)START_STACK(dump), dump.u_ssize << PAGE_SHIFT)) dump.u_ssize = 0; set_fs(KERNEL_DS); diff --git a/trunk/fs/binfmt_elf_fdpic.c b/trunk/fs/binfmt_elf_fdpic.c index 7ab23e006e4c..2c32d00a6690 100644 --- a/trunk/fs/binfmt_elf_fdpic.c +++ b/trunk/fs/binfmt_elf_fdpic.c @@ -1590,7 +1590,7 @@ static size_t elf_core_vma_data_size(unsigned long mm_flags) struct vm_area_struct *vma; size_t size = 0; - for (vma = current->mm->mmap; vma; vma = vma->vm_next) + for (vma = current->mm->mmap; vma; vma->vm_next) if (maydump(vma, mm_flags)) size += vma->vm_end - vma->vm_start; return size; diff --git a/trunk/fs/fscache/page.c b/trunk/fs/fscache/page.c index 69809024d71d..c598ea4c4e7d 100644 --- a/trunk/fs/fscache/page.c +++ b/trunk/fs/fscache/page.c @@ -881,7 +881,6 @@ int __fscache_write_page(struct fscache_cookie *cookie, goto nobufs; nobufs_unlock_obj: - spin_unlock(&cookie->stores_lock); spin_unlock(&object->lock); nobufs: spin_unlock(&cookie->lock); diff --git a/trunk/fs/partitions/msdos.c b/trunk/fs/partitions/msdos.c index 90be97f1f5a8..0028d2ef0662 100644 --- a/trunk/fs/partitions/msdos.c +++ b/trunk/fs/partitions/msdos.c @@ -31,17 +31,14 @@ */ #include -#define SYS_IND(p) get_unaligned(&p->sys_ind) +#define SYS_IND(p) (get_unaligned(&p->sys_ind)) +#define NR_SECTS(p) ({ __le32 __a = get_unaligned(&p->nr_sects); \ + le32_to_cpu(__a); \ + }) -static inline sector_t nr_sects(struct partition *p) -{ - return (sector_t)get_unaligned_le32(&p->nr_sects); -} - -static inline sector_t start_sect(struct partition *p) -{ - return (sector_t)get_unaligned_le32(&p->start_sect); -} +#define START_SECT(p) ({ __le32 __a = get_unaligned(&p->start_sect); \ + le32_to_cpu(__a); \ + }) static inline int is_extended_partition(struct partition *p) { @@ -107,13 +104,13 @@ static int aix_magic_present(unsigned char *p, struct block_device *bdev) static void parse_extended(struct parsed_partitions *state, struct block_device *bdev, - sector_t first_sector, sector_t first_size) + u32 first_sector, u32 first_size) { struct partition *p; Sector sect; unsigned char *data; - sector_t this_sector, this_size; - sector_t sector_size = bdev_logical_block_size(bdev) / 512; + u32 this_sector, this_size; + int sector_size = bdev_logical_block_size(bdev) / 512; int loopct = 0; /* number of links followed without finding a data partition */ int i; @@ -148,14 +145,14 @@ parse_extended(struct parsed_partitions *state, struct block_device *bdev, * First process the data partition(s) */ for (i=0; i<4; i++, p++) { - sector_t offs, size, next; - if (!nr_sects(p) || is_extended_partition(p)) + u32 offs, size, next; + if (!NR_SECTS(p) || is_extended_partition(p)) continue; /* Check the 3rd and 4th entries - these sometimes contain random garbage */ - offs = start_sect(p)*sector_size; - size = nr_sects(p)*sector_size; + offs = START_SECT(p)*sector_size; + size = NR_SECTS(p)*sector_size; next = this_sector + offs; if (i >= 2) { if (offs + size > this_size) @@ -182,13 +179,13 @@ parse_extended(struct parsed_partitions *state, struct block_device *bdev, */ p -= 4; for (i=0; i<4; i++, p++) - if (nr_sects(p) && is_extended_partition(p)) + if (NR_SECTS(p) && is_extended_partition(p)) break; if (i == 4) goto done; /* nothing left to do */ - this_sector = first_sector + start_sect(p) * sector_size; - this_size = nr_sects(p) * sector_size; + this_sector = first_sector + START_SECT(p) * sector_size; + this_size = NR_SECTS(p) * sector_size; put_dev_sector(sect); } done: @@ -200,7 +197,7 @@ parse_extended(struct parsed_partitions *state, struct block_device *bdev, static void parse_solaris_x86(struct parsed_partitions *state, struct block_device *bdev, - sector_t offset, sector_t size, int origin) + u32 offset, u32 size, int origin) { #ifdef CONFIG_SOLARIS_X86_PARTITION Sector sect; @@ -247,7 +244,7 @@ parse_solaris_x86(struct parsed_partitions *state, struct block_device *bdev, */ static void parse_bsd(struct parsed_partitions *state, struct block_device *bdev, - sector_t offset, sector_t size, int origin, char *flavour, + u32 offset, u32 size, int origin, char *flavour, int max_partitions) { Sector sect; @@ -266,7 +263,7 @@ parse_bsd(struct parsed_partitions *state, struct block_device *bdev, if (le16_to_cpu(l->d_npartitions) < max_partitions) max_partitions = le16_to_cpu(l->d_npartitions); for (p = l->d_partitions; p - l->d_partitions < max_partitions; p++) { - sector_t bsd_start, bsd_size; + u32 bsd_start, bsd_size; if (state->next == state->limit) break; @@ -293,7 +290,7 @@ parse_bsd(struct parsed_partitions *state, struct block_device *bdev, static void parse_freebsd(struct parsed_partitions *state, struct block_device *bdev, - sector_t offset, sector_t size, int origin) + u32 offset, u32 size, int origin) { #ifdef CONFIG_BSD_DISKLABEL parse_bsd(state, bdev, offset, size, origin, @@ -303,7 +300,7 @@ parse_freebsd(struct parsed_partitions *state, struct block_device *bdev, static void parse_netbsd(struct parsed_partitions *state, struct block_device *bdev, - sector_t offset, sector_t size, int origin) + u32 offset, u32 size, int origin) { #ifdef CONFIG_BSD_DISKLABEL parse_bsd(state, bdev, offset, size, origin, @@ -313,7 +310,7 @@ parse_netbsd(struct parsed_partitions *state, struct block_device *bdev, static void parse_openbsd(struct parsed_partitions *state, struct block_device *bdev, - sector_t offset, sector_t size, int origin) + u32 offset, u32 size, int origin) { #ifdef CONFIG_BSD_DISKLABEL parse_bsd(state, bdev, offset, size, origin, @@ -327,7 +324,7 @@ parse_openbsd(struct parsed_partitions *state, struct block_device *bdev, */ static void parse_unixware(struct parsed_partitions *state, struct block_device *bdev, - sector_t offset, sector_t size, int origin) + u32 offset, u32 size, int origin) { #ifdef CONFIG_UNIXWARE_DISKLABEL Sector sect; @@ -351,8 +348,7 @@ parse_unixware(struct parsed_partitions *state, struct block_device *bdev, if (p->s_label != UNIXWARE_FS_UNUSED) put_partition(state, state->next++, - le32_to_cpu(p->start_sect), - le32_to_cpu(p->nr_sects)); + START_SECT(p), NR_SECTS(p)); p++; } put_dev_sector(sect); @@ -367,7 +363,7 @@ parse_unixware(struct parsed_partitions *state, struct block_device *bdev, */ static void parse_minix(struct parsed_partitions *state, struct block_device *bdev, - sector_t offset, sector_t size, int origin) + u32 offset, u32 size, int origin) { #ifdef CONFIG_MINIX_SUBPARTITION Sector sect; @@ -394,7 +390,7 @@ parse_minix(struct parsed_partitions *state, struct block_device *bdev, /* add each partition in use */ if (SYS_IND(p) == MINIX_PARTITION) put_partition(state, state->next++, - start_sect(p), nr_sects(p)); + START_SECT(p), NR_SECTS(p)); } printk(" >\n"); } @@ -405,7 +401,7 @@ parse_minix(struct parsed_partitions *state, struct block_device *bdev, static struct { unsigned char id; void (*parse)(struct parsed_partitions *, struct block_device *, - sector_t, sector_t, int); + u32, u32, int); } subtypes[] = { {FREEBSD_PARTITION, parse_freebsd}, {NETBSD_PARTITION, parse_netbsd}, @@ -419,7 +415,7 @@ static struct { int msdos_partition(struct parsed_partitions *state, struct block_device *bdev) { - sector_t sector_size = bdev_logical_block_size(bdev) / 512; + int sector_size = bdev_logical_block_size(bdev) / 512; Sector sect; unsigned char *data; struct partition *p; @@ -487,21 +483,14 @@ int msdos_partition(struct parsed_partitions *state, struct block_device *bdev) state->next = 5; for (slot = 1 ; slot <= 4 ; slot++, p++) { - sector_t start = start_sect(p)*sector_size; - sector_t size = nr_sects(p)*sector_size; + u32 start = START_SECT(p)*sector_size; + u32 size = NR_SECTS(p)*sector_size; if (!size) continue; if (is_extended_partition(p)) { - /* - * prevent someone doing mkfs or mkswap on an - * extended partition, but leave room for LILO - * FIXME: this uses one logical sector for > 512b - * sector, although it may not be enough/proper. - */ - sector_t n = 2; - n = min(size, max(sector_size, n)); - put_partition(state, slot, start, n); - + /* prevent someone doing mkfs or mkswap on an + extended partition, but leave room for LILO */ + put_partition(state, slot, start, size == 1 ? 1 : 2); printk(" <"); parse_extended(state, bdev, start, size); printk(" >"); @@ -524,7 +513,7 @@ int msdos_partition(struct parsed_partitions *state, struct block_device *bdev) unsigned char id = SYS_IND(p); int n; - if (!nr_sects(p)) + if (!NR_SECTS(p)) continue; for (n = 0; subtypes[n].parse && id != subtypes[n].id; n++) @@ -532,8 +521,8 @@ int msdos_partition(struct parsed_partitions *state, struct block_device *bdev) if (!subtypes[n].parse) continue; - subtypes[n].parse(state, bdev, start_sect(p)*sector_size, - nr_sects(p)*sector_size, slot); + subtypes[n].parse(state, bdev, START_SECT(p)*sector_size, + NR_SECTS(p)*sector_size, slot); } put_dev_sector(sect); return 1; diff --git a/trunk/fs/proc/kcore.c b/trunk/fs/proc/kcore.c index b442dac8f5f9..a44a7897fd4d 100644 --- a/trunk/fs/proc/kcore.c +++ b/trunk/fs/proc/kcore.c @@ -490,7 +490,7 @@ read_kcore(struct file *file, char __user *buffer, size_t buflen, loff_t *fpos) } read_unlock(&kclist_lock); - if (&m->list == &kclist_head) { + if (m == NULL) { if (clear_user(buffer, tsz)) return -EFAULT; } else if (is_vmalloc_or_module_addr((void *)start)) { diff --git a/trunk/fs/read_write.c b/trunk/fs/read_write.c index 113386d6fd2d..b7f4a1f94d48 100644 --- a/trunk/fs/read_write.c +++ b/trunk/fs/read_write.c @@ -258,7 +258,6 @@ ssize_t do_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *pp init_sync_kiocb(&kiocb, filp); kiocb.ki_pos = *ppos; kiocb.ki_left = len; - kiocb.ki_nbytes = len; for (;;) { ret = filp->f_op->aio_read(&kiocb, &iov, 1, kiocb.ki_pos); @@ -314,7 +313,6 @@ ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, lof init_sync_kiocb(&kiocb, filp); kiocb.ki_pos = *ppos; kiocb.ki_left = len; - kiocb.ki_nbytes = len; for (;;) { ret = filp->f_op->aio_write(&kiocb, &iov, 1, kiocb.ki_pos); diff --git a/trunk/fs/reiserfs/journal.c b/trunk/fs/reiserfs/journal.c index f3de5e8a2ae8..ba98546fabbd 100644 --- a/trunk/fs/reiserfs/journal.c +++ b/trunk/fs/reiserfs/journal.c @@ -2217,15 +2217,6 @@ static int journal_read_transaction(struct super_block *sb, brelse(d_bh); return 1; } - - if (bdev_read_only(sb->s_bdev)) { - reiserfs_warning(sb, "clm-2076", - "device is readonly, unable to replay log"); - brelse(c_bh); - brelse(d_bh); - return -EROFS; - } - trans_id = get_desc_trans_id(desc); /* now we know we've got a good transaction, and it was inside the valid time ranges */ log_blocks = kmalloc(get_desc_trans_len(desc) * @@ -2468,6 +2459,12 @@ static int journal_read(struct super_block *sb) goto start_log_replay; } + if (continue_replay && bdev_read_only(sb->s_bdev)) { + reiserfs_warning(sb, "clm-2076", + "device is readonly, unable to replay log"); + return -1; + } + /* ok, there are transactions that need to be replayed. start with the first log block, find ** all the valid transactions, and pick out the oldest. */ diff --git a/trunk/fs/reiserfs/xattr_security.c b/trunk/fs/reiserfs/xattr_security.c index de1fcffd906b..d8b5bfcbdd30 100644 --- a/trunk/fs/reiserfs/xattr_security.c +++ b/trunk/fs/reiserfs/xattr_security.c @@ -76,7 +76,7 @@ int reiserfs_security_init(struct inode *dir, struct inode *inode, return error; } - if (sec->length && reiserfs_xattrs_initialized(inode->i_sb)) { + if (sec->length) { blocks = reiserfs_xattr_jcreate_nblocks(inode) + reiserfs_xattr_nblocks(inode, sec->length); /* We don't want to count the directories twice if we have diff --git a/trunk/include/acpi/acpi_drivers.h b/trunk/include/acpi/acpi_drivers.h index 4f7b44866b76..3a4767c01c5f 100644 --- a/trunk/include/acpi/acpi_drivers.h +++ b/trunk/include/acpi/acpi_drivers.h @@ -65,8 +65,6 @@ #define ACPI_VIDEO_HID "LNXVIDEO" #define ACPI_BAY_HID "LNXIOBAY" #define ACPI_DOCK_HID "LNXDOCK" -/* Quirk for broken IBM BIOSes */ -#define ACPI_SMBUS_IBM_HID "SMBUSIBM" /* * For fixed hardware buttons, we fabricate acpi_devices with HID diff --git a/trunk/include/linux/circ_buf.h b/trunk/include/linux/circ_buf.h index 90f2471dc6f2..a2ed0591fb19 100644 --- a/trunk/include/linux/circ_buf.h +++ b/trunk/include/linux/circ_buf.h @@ -1,7 +1,3 @@ -/* - * See Documentation/circular-buffers.txt for more information. - */ - #ifndef _LINUX_CIRC_BUF_H #define _LINUX_CIRC_BUF_H 1 diff --git a/trunk/include/linux/kfifo.h b/trunk/include/linux/kfifo.h index ece0b1c33816..bc0fc795bd35 100644 --- a/trunk/include/linux/kfifo.h +++ b/trunk/include/linux/kfifo.h @@ -102,6 +102,8 @@ union { \ unsigned char name##kfifo_buffer[size]; \ struct kfifo name = __kfifo_initializer(size, name##kfifo_buffer) +#undef __kfifo_initializer + extern void kfifo_init(struct kfifo *fifo, void *buffer, unsigned int size); extern __must_check int kfifo_alloc(struct kfifo *fifo, unsigned int size, diff --git a/trunk/include/linux/mmc/mmc.h b/trunk/include/linux/mmc/mmc.h index 8a49cbf0376d..c02c8db73701 100644 --- a/trunk/include/linux/mmc/mmc.h +++ b/trunk/include/linux/mmc/mmc.h @@ -268,7 +268,6 @@ struct _mmc_csd { #define EXT_CSD_CARD_TYPE_26 (1<<0) /* Card can run at 26MHz */ #define EXT_CSD_CARD_TYPE_52 (1<<1) /* Card can run at 52MHz */ -#define EXT_CSD_CARD_TYPE_MASK 0x3 /* Mask out reserved and DDR bits */ #define EXT_CSD_BUS_WIDTH_1 0 /* Card is in 1 bit mode */ #define EXT_CSD_BUS_WIDTH_4 1 /* Card is in 4 bit mode */ diff --git a/trunk/include/linux/reiserfs_xattr.h b/trunk/include/linux/reiserfs_xattr.h index 7fa02b4af838..99928dce37ea 100644 --- a/trunk/include/linux/reiserfs_xattr.h +++ b/trunk/include/linux/reiserfs_xattr.h @@ -70,11 +70,6 @@ int reiserfs_security_write(struct reiserfs_transaction_handle *th, void reiserfs_security_free(struct reiserfs_security_handle *sec); #endif -static inline int reiserfs_xattrs_initialized(struct super_block *sb) -{ - return REISERFS_SB(sb)->priv_root != NULL; -} - #define xattr_size(size) ((size) + sizeof(struct reiserfs_xattr_header)) static inline loff_t reiserfs_xattr_nblocks(struct inode *inode, loff_t size) { diff --git a/trunk/init/main.c b/trunk/init/main.c index cbead27caefc..a1ab78ceb4b6 100644 --- a/trunk/init/main.c +++ b/trunk/init/main.c @@ -858,7 +858,7 @@ static int __init kernel_init(void * unused) /* * init can allocate pages on any node */ - set_mems_allowed(node_states[N_HIGH_MEMORY]); + set_mems_allowed(node_possible_map); /* * init can run on any cpu. */ diff --git a/trunk/kernel/cgroup.c b/trunk/kernel/cgroup.c index e2769e13980c..ef909a329750 100644 --- a/trunk/kernel/cgroup.c +++ b/trunk/kernel/cgroup.c @@ -27,6 +27,7 @@ */ #include +#include #include #include #include diff --git a/trunk/kernel/cpuset.c b/trunk/kernel/cpuset.c index d10946748ec2..ba401fab459f 100644 --- a/trunk/kernel/cpuset.c +++ b/trunk/kernel/cpuset.c @@ -920,6 +920,9 @@ static int update_cpumask(struct cpuset *cs, struct cpuset *trialcs, * call to guarantee_online_mems(), as we know no one is changing * our task's cpuset. * + * Hold callback_mutex around the two modifications of our tasks + * mems_allowed to synchronize with cpuset_mems_allowed(). + * * While the mm_struct we are migrating is typically from some * other task, the task_struct mems_allowed that we are hacking * is for our current task, which must allocate new pages for that @@ -970,20 +973,15 @@ static void cpuset_change_nodemask(struct task_struct *p, struct cpuset *cs; int migrate; const nodemask_t *oldmem = scan->data; - NODEMASK_ALLOC(nodemask_t, newmems, GFP_KERNEL); - - if (!newmems) - return; + nodemask_t newmems; cs = cgroup_cs(scan->cg); - guarantee_online_mems(cs, newmems); + guarantee_online_mems(cs, &newmems); task_lock(p); - cpuset_change_task_nodemask(p, newmems); + cpuset_change_task_nodemask(p, &newmems); task_unlock(p); - NODEMASK_FREE(newmems); - mm = get_task_mm(p); if (!mm) return; @@ -1053,21 +1051,16 @@ static void update_tasks_nodemask(struct cpuset *cs, const nodemask_t *oldmem, static int update_nodemask(struct cpuset *cs, struct cpuset *trialcs, const char *buf) { - NODEMASK_ALLOC(nodemask_t, oldmem, GFP_KERNEL); + nodemask_t oldmem; int retval; struct ptr_heap heap; - if (!oldmem) - return -ENOMEM; - /* * top_cpuset.mems_allowed tracks node_stats[N_HIGH_MEMORY]; * it's read-only */ - if (cs == &top_cpuset) { - retval = -EACCES; - goto done; - } + if (cs == &top_cpuset) + return -EACCES; /* * An empty mems_allowed is ok iff there are no tasks in the cpuset. @@ -1083,13 +1076,11 @@ static int update_nodemask(struct cpuset *cs, struct cpuset *trialcs, goto done; if (!nodes_subset(trialcs->mems_allowed, - node_states[N_HIGH_MEMORY])) { - retval = -EINVAL; - goto done; - } + node_states[N_HIGH_MEMORY])) + return -EINVAL; } - *oldmem = cs->mems_allowed; - if (nodes_equal(*oldmem, trialcs->mems_allowed)) { + oldmem = cs->mems_allowed; + if (nodes_equal(oldmem, trialcs->mems_allowed)) { retval = 0; /* Too easy - nothing to do */ goto done; } @@ -1105,11 +1096,10 @@ static int update_nodemask(struct cpuset *cs, struct cpuset *trialcs, cs->mems_allowed = trialcs->mems_allowed; mutex_unlock(&callback_mutex); - update_tasks_nodemask(cs, oldmem, &heap); + update_tasks_nodemask(cs, &oldmem, &heap); heap_free(&heap); done: - NODEMASK_FREE(oldmem); return retval; } @@ -1394,47 +1384,40 @@ static void cpuset_attach(struct cgroup_subsys *ss, struct cgroup *cont, struct cgroup *oldcont, struct task_struct *tsk, bool threadgroup) { + nodemask_t from, to; struct mm_struct *mm; struct cpuset *cs = cgroup_cs(cont); struct cpuset *oldcs = cgroup_cs(oldcont); - NODEMASK_ALLOC(nodemask_t, from, GFP_KERNEL); - NODEMASK_ALLOC(nodemask_t, to, GFP_KERNEL); - - if (from == NULL || to == NULL) - goto alloc_fail; if (cs == &top_cpuset) { cpumask_copy(cpus_attach, cpu_possible_mask); + to = node_possible_map; } else { guarantee_online_cpus(cs, cpus_attach); + guarantee_online_mems(cs, &to); } - guarantee_online_mems(cs, to); /* do per-task migration stuff possibly for each in the threadgroup */ - cpuset_attach_task(tsk, to, cs); + cpuset_attach_task(tsk, &to, cs); if (threadgroup) { struct task_struct *c; rcu_read_lock(); list_for_each_entry_rcu(c, &tsk->thread_group, thread_group) { - cpuset_attach_task(c, to, cs); + cpuset_attach_task(c, &to, cs); } rcu_read_unlock(); } /* change mm; only needs to be done once even if threadgroup */ - *from = oldcs->mems_allowed; - *to = cs->mems_allowed; + from = oldcs->mems_allowed; + to = cs->mems_allowed; mm = get_task_mm(tsk); if (mm) { - mpol_rebind_mm(mm, to); + mpol_rebind_mm(mm, &to); if (is_memory_migrate(cs)) - cpuset_migrate_mm(mm, from, to); + cpuset_migrate_mm(mm, &from, &to); mmput(mm); } - -alloc_fail: - NODEMASK_FREE(from); - NODEMASK_FREE(to); } /* The various types of files and directories in a cpuset file system */ @@ -1579,21 +1562,13 @@ static int cpuset_sprintf_cpulist(char *page, struct cpuset *cs) static int cpuset_sprintf_memlist(char *page, struct cpuset *cs) { - NODEMASK_ALLOC(nodemask_t, mask, GFP_KERNEL); - int retval; - - if (mask == NULL) - return -ENOMEM; + nodemask_t mask; mutex_lock(&callback_mutex); - *mask = cs->mems_allowed; + mask = cs->mems_allowed; mutex_unlock(&callback_mutex); - retval = nodelist_scnprintf(page, PAGE_SIZE, *mask); - - NODEMASK_FREE(mask); - - return retval; + return nodelist_scnprintf(page, PAGE_SIZE, mask); } static ssize_t cpuset_common_file_read(struct cgroup *cont, @@ -2022,10 +1997,7 @@ static void scan_for_empty_cpusets(struct cpuset *root) struct cpuset *cp; /* scans cpusets being updated */ struct cpuset *child; /* scans child cpusets of cp */ struct cgroup *cont; - NODEMASK_ALLOC(nodemask_t, oldmems, GFP_KERNEL); - - if (oldmems == NULL) - return; + nodemask_t oldmems; list_add_tail((struct list_head *)&root->stack_list, &queue); @@ -2042,7 +2014,7 @@ static void scan_for_empty_cpusets(struct cpuset *root) nodes_subset(cp->mems_allowed, node_states[N_HIGH_MEMORY])) continue; - *oldmems = cp->mems_allowed; + oldmems = cp->mems_allowed; /* Remove offline cpus and mems from this cpuset. */ mutex_lock(&callback_mutex); @@ -2058,10 +2030,9 @@ static void scan_for_empty_cpusets(struct cpuset *root) remove_tasks_in_empty_cpuset(cp); else { update_tasks_cpumask(cp, NULL); - update_tasks_nodemask(cp, oldmems, NULL); + update_tasks_nodemask(cp, &oldmems, NULL); } } - NODEMASK_FREE(oldmems); } /* @@ -2119,33 +2090,20 @@ static int cpuset_track_online_cpus(struct notifier_block *unused_nb, static int cpuset_track_online_nodes(struct notifier_block *self, unsigned long action, void *arg) { - NODEMASK_ALLOC(nodemask_t, oldmems, GFP_KERNEL); - - if (oldmems == NULL) - return NOTIFY_DONE; - cgroup_lock(); switch (action) { case MEM_ONLINE: - *oldmems = top_cpuset.mems_allowed; + case MEM_OFFLINE: mutex_lock(&callback_mutex); top_cpuset.mems_allowed = node_states[N_HIGH_MEMORY]; mutex_unlock(&callback_mutex); - update_tasks_nodemask(&top_cpuset, oldmems, NULL); - break; - case MEM_OFFLINE: - /* - * needn't update top_cpuset.mems_allowed explicitly because - * scan_for_empty_cpusets() will update it. - */ - scan_for_empty_cpusets(&top_cpuset); + if (action == MEM_OFFLINE) + scan_for_empty_cpusets(&top_cpuset); break; default: break; } cgroup_unlock(); - - NODEMASK_FREE(oldmems); return NOTIFY_OK; } #endif diff --git a/trunk/kernel/kthread.c b/trunk/kernel/kthread.c index 83911c780175..82ed0ea15194 100644 --- a/trunk/kernel/kthread.c +++ b/trunk/kernel/kthread.c @@ -219,7 +219,7 @@ int kthreadd(void *unused) set_task_comm(tsk, "kthreadd"); ignore_signals(tsk); set_cpus_allowed_ptr(tsk, cpu_all_mask); - set_mems_allowed(node_states[N_HIGH_MEMORY]); + set_mems_allowed(node_possible_map); current->flags |= PF_NOFREEZE | PF_FREEZER_NOSIG; diff --git a/trunk/lib/Kconfig.debug b/trunk/lib/Kconfig.debug index 1fafb4b99c9b..8e5ec5e1ab91 100644 --- a/trunk/lib/Kconfig.debug +++ b/trunk/lib/Kconfig.debug @@ -103,8 +103,7 @@ config HEADERS_CHECK config DEBUG_SECTION_MISMATCH bool "Enable full Section mismatch analysis" - depends on UNDEFINED || (BLACKFIN) - default y + depends on UNDEFINED # This option is on purpose disabled for now. # It will be enabled when we are down to a reasonable number # of section mismatch warnings (< 10 for an allyesconfig build) diff --git a/trunk/mm/ksm.c b/trunk/mm/ksm.c index 8cdfc2a1e8bf..a93f1b7f508c 100644 --- a/trunk/mm/ksm.c +++ b/trunk/mm/ksm.c @@ -751,7 +751,7 @@ static int write_protect_page(struct vm_area_struct *vma, struct page *page, * page */ if (page_mapcount(page) + 1 + swapped != page_count(page)) { - set_pte_at(mm, addr, ptep, entry); + set_pte_at_notify(mm, addr, ptep, entry); goto out_unlock; } entry = pte_wrprotect(entry); diff --git a/trunk/mm/memcontrol.c b/trunk/mm/memcontrol.c index 9ed760dc7448..7973b5221fb8 100644 --- a/trunk/mm/memcontrol.c +++ b/trunk/mm/memcontrol.c @@ -3691,10 +3691,8 @@ static struct mem_cgroup *mem_cgroup_alloc(void) else mem = vmalloc(size); - if (!mem) - return NULL; - - memset(mem, 0, size); + if (mem) + memset(mem, 0, size); mem->stat = alloc_percpu(struct mem_cgroup_stat_cpu); if (!mem->stat) { if (size < PAGE_SIZE) @@ -3948,6 +3946,28 @@ static int mem_cgroup_do_precharge(unsigned long count) } return ret; } +#else /* !CONFIG_MMU */ +static int mem_cgroup_can_attach(struct cgroup_subsys *ss, + struct cgroup *cgroup, + struct task_struct *p, + bool threadgroup) +{ + return 0; +} +static void mem_cgroup_cancel_attach(struct cgroup_subsys *ss, + struct cgroup *cgroup, + struct task_struct *p, + bool threadgroup) +{ +} +static void mem_cgroup_move_task(struct cgroup_subsys *ss, + struct cgroup *cont, + struct cgroup *old_cont, + struct task_struct *p, + bool threadgroup) +{ +} +#endif /** * is_target_pte_for_mc - check a pte whether it is valid for move charge @@ -4310,28 +4330,6 @@ static void mem_cgroup_move_task(struct cgroup_subsys *ss, } mem_cgroup_clear_mc(); } -#else /* !CONFIG_MMU */ -static int mem_cgroup_can_attach(struct cgroup_subsys *ss, - struct cgroup *cgroup, - struct task_struct *p, - bool threadgroup) -{ - return 0; -} -static void mem_cgroup_cancel_attach(struct cgroup_subsys *ss, - struct cgroup *cgroup, - struct task_struct *p, - bool threadgroup) -{ -} -static void mem_cgroup_move_task(struct cgroup_subsys *ss, - struct cgroup *cont, - struct cgroup *old_cont, - struct task_struct *p, - bool threadgroup) -{ -} -#endif struct cgroup_subsys mem_cgroup_subsys = { .name = "memory", diff --git a/trunk/mm/memory.c b/trunk/mm/memory.c index bc9ba5a1f5b9..5b7f2002e54b 100644 --- a/trunk/mm/memory.c +++ b/trunk/mm/memory.c @@ -130,7 +130,6 @@ void __sync_task_rss_stat(struct task_struct *task, struct mm_struct *mm) for (i = 0; i < NR_MM_COUNTERS; i++) { if (task->rss_stat.count[i]) { - BUG_ON(!mm); add_mm_counter(mm, i, task->rss_stat.count[i]); task->rss_stat.count[i] = 0; } diff --git a/trunk/mm/mempolicy.c b/trunk/mm/mempolicy.c index 8034abd3a135..643f66e10187 100644 --- a/trunk/mm/mempolicy.c +++ b/trunk/mm/mempolicy.c @@ -806,13 +806,9 @@ static long do_get_mempolicy(int *policy, nodemask_t *nmask, err = 0; if (nmask) { - if (mpol_store_user_nodemask(pol)) { - *nmask = pol->w.user_nodemask; - } else { - task_lock(current); - get_policy_nodemask(pol, nmask); - task_unlock(current); - } + task_lock(current); + get_policy_nodemask(pol, nmask); + task_unlock(current); } out: @@ -2199,8 +2195,8 @@ int mpol_parse_str(char *str, struct mempolicy **mpol, int no_context) char *rest = nodelist; while (isdigit(*rest)) rest++; - if (*rest) - goto out; + if (!*rest) + err = 0; } break; case MPOL_INTERLEAVE: @@ -2209,6 +2205,7 @@ int mpol_parse_str(char *str, struct mempolicy **mpol, int no_context) */ if (!nodelist) nodes = node_states[N_HIGH_MEMORY]; + err = 0; break; case MPOL_LOCAL: /* @@ -2218,19 +2215,11 @@ int mpol_parse_str(char *str, struct mempolicy **mpol, int no_context) goto out; mode = MPOL_PREFERRED; break; - case MPOL_DEFAULT: - /* - * Insist on a empty nodelist - */ - if (!nodelist) - err = 0; - goto out; - case MPOL_BIND: - /* - * Insist on a nodelist - */ - if (!nodelist) - goto out; + + /* + * case MPOL_BIND: mpol_new() enforces non-empty nodemask. + * case MPOL_DEFAULT: mpol_new() enforces empty nodemask, ignores flags. + */ } mode_flags = 0; @@ -2244,14 +2233,13 @@ int mpol_parse_str(char *str, struct mempolicy **mpol, int no_context) else if (!strcmp(flags, "relative")) mode_flags |= MPOL_F_RELATIVE_NODES; else - goto out; + err = 1; } new = mpol_new(mode, mode_flags, &nodes); if (IS_ERR(new)) - goto out; - - { + err = 1; + else { int ret; NODEMASK_SCRATCH(scratch); if (scratch) { @@ -2262,15 +2250,13 @@ int mpol_parse_str(char *str, struct mempolicy **mpol, int no_context) ret = -ENOMEM; NODEMASK_SCRATCH_FREE(scratch); if (ret) { + err = 1; mpol_put(new); - goto out; + } else if (no_context) { + /* save for contextualization */ + new->w.user_nodemask = nodes; } } - err = 0; - if (no_context) { - /* save for contextualization */ - new->w.user_nodemask = nodes; - } out: /* Restore string for error message */ diff --git a/trunk/mm/mmu_context.c b/trunk/mm/mmu_context.c index 9e82e937000e..0777654147c9 100644 --- a/trunk/mm/mmu_context.c +++ b/trunk/mm/mmu_context.c @@ -53,7 +53,6 @@ void unuse_mm(struct mm_struct *mm) struct task_struct *tsk = current; task_lock(tsk); - sync_mm_rss(tsk, mm); tsk->mm = NULL; /* active_mm is still 'mm' */ enter_lazy_tlb(mm, tsk); diff --git a/trunk/mm/nommu.c b/trunk/mm/nommu.c index e4b8f4d28a3f..605ace8982a8 100644 --- a/trunk/mm/nommu.c +++ b/trunk/mm/nommu.c @@ -1040,9 +1040,10 @@ static int do_mmap_shared_file(struct vm_area_struct *vma) if (ret != -ENOSYS) return ret; - /* getting -ENOSYS indicates that direct mmap isn't possible (as - * opposed to tried but failed) so we can only give a suitable error as - * it's not possible to make a private copy if MAP_SHARED was given */ + /* getting an ENOSYS error indicates that direct mmap isn't + * possible (as opposed to tried but failed) so we'll fall + * through to making a private copy of the data and mapping + * that if we can */ return -ENODEV; } diff --git a/trunk/scripts/get_maintainer.pl b/trunk/scripts/get_maintainer.pl index 6f97a13bcee4..f76f3d13276d 100755 --- a/trunk/scripts/get_maintainer.pl +++ b/trunk/scripts/get_maintainer.pl @@ -284,7 +284,7 @@ my $file_cnt = @files; my $lastfile; - open(my $patch, "< $file") + open(my $patch, '<', $file) or die "$P: Can't open $file: $!\n"; while (<$patch>) { my $patch_line = $_; diff --git a/trunk/scripts/kernel-doc b/trunk/scripts/kernel-doc index fcdfb245a575..c7865c362d28 100755 --- a/trunk/scripts/kernel-doc +++ b/trunk/scripts/kernel-doc @@ -1424,8 +1424,6 @@ sub dump_struct($$) { $nested =~ s/\/\*.*?\*\///gos; # strip kmemcheck_bitfield_{begin,end}.*; $members =~ s/kmemcheck_bitfield_.*?;//gos; - # strip attributes - $members =~ s/__aligned\s*\(\d+\)//gos; create_parameterlist($members, ';', $file); check_sections($file, $declaration_name, "struct", $sectcheck, $struct_actual, $nested); @@ -1730,7 +1728,6 @@ sub dump_function($$) { $prototype =~ s/^noinline +//; $prototype =~ s/__devinit +//; $prototype =~ s/__init +//; - $prototype =~ s/__init_or_module +//; $prototype =~ s/^#\s*define\s+//; #ak added $prototype =~ s/__attribute__\s*\(\([a-z,]*\)\)//; diff --git a/trunk/sound/arm/pxa2xx-pcm-lib.c b/trunk/sound/arm/pxa2xx-pcm-lib.c index fd51fa8b06a1..743ac6a29065 100644 --- a/trunk/sound/arm/pxa2xx-pcm-lib.c +++ b/trunk/sound/arm/pxa2xx-pcm-lib.c @@ -205,7 +205,6 @@ int __pxa2xx_pcm_open(struct snd_pcm_substream *substream) if (!rtd->dma_desc_array) goto err1; - rtd->dma_ch = -1; runtime->private_data = rtd; return 0; diff --git a/trunk/sound/oss/vidc.c b/trunk/sound/oss/vidc.c index a4127bab9231..725fef0f59a3 100644 --- a/trunk/sound/oss/vidc.c +++ b/trunk/sound/oss/vidc.c @@ -363,13 +363,13 @@ static void vidc_audio_trigger(int dev, int enable_bits) struct audio_operations *adev = audio_devs[dev]; if (enable_bits & PCM_ENABLE_OUTPUT) { - if (!(adev->dmap_out->flags & DMA_ACTIVE)) { + if (!(adev->flags & DMA_ACTIVE)) { unsigned long flags; local_irq_save(flags); /* prevent recusion */ - adev->dmap_out->flags |= DMA_ACTIVE; + adev->flags |= DMA_ACTIVE; dma_interrupt = vidc_audio_dma_interrupt; vidc_sound_dma_irq(0, NULL); diff --git a/trunk/sound/pci/cmipci.c b/trunk/sound/pci/cmipci.c index 329968edca9b..1ded64e05643 100644 --- a/trunk/sound/pci/cmipci.c +++ b/trunk/sound/pci/cmipci.c @@ -941,21 +941,13 @@ static snd_pcm_uframes_t snd_cmipci_pcm_pointer(struct cmipci *cm, struct cmipci struct snd_pcm_substream *substream) { size_t ptr; - unsigned int reg, rem, tries; - + unsigned int reg; if (!rec->running) return 0; #if 1 // this seems better.. reg = rec->ch ? CM_REG_CH1_FRAME2 : CM_REG_CH0_FRAME2; - for (tries = 0; tries < 3; tries++) { - rem = snd_cmipci_read_w(cm, reg); - if (rem < rec->dma_size) - goto ok; - } - printk(KERN_ERR "cmipci: invalid PCM pointer: %#x\n", rem); - return SNDRV_PCM_POS_XRUN; -ok: - ptr = (rec->dma_size - (rem + 1)) >> rec->shift; + ptr = rec->dma_size - (snd_cmipci_read_w(cm, reg) + 1); + ptr >>= rec->shift; #else reg = rec->ch ? CM_REG_CH1_FRAME1 : CM_REG_CH0_FRAME1; ptr = snd_cmipci_read(cm, reg) - rec->offset; diff --git a/trunk/sound/pci/hda/patch_conexant.c b/trunk/sound/pci/hda/patch_conexant.c index 61682e1d09da..194a28c54992 100644 --- a/trunk/sound/pci/hda/patch_conexant.c +++ b/trunk/sound/pci/hda/patch_conexant.c @@ -1591,21 +1591,6 @@ static int patch_cxt5047(struct hda_codec *codec) #endif } spec->vmaster_nid = 0x13; - - switch (codec->subsystem_id >> 16) { - case 0x103c: - /* HP laptops have really bad sound over 0 dB on NID 0x10. - * Fix max PCM level to 0 dB (originally it has 0x1e steps - * with 0 dB offset 0x17) - */ - snd_hda_override_amp_caps(codec, 0x10, HDA_INPUT, - (0x17 << AC_AMPCAP_OFFSET_SHIFT) | - (0x17 << AC_AMPCAP_NUM_STEPS_SHIFT) | - (0x05 << AC_AMPCAP_STEP_SIZE_SHIFT) | - (1 << AC_AMPCAP_MUTE_SHIFT)); - break; - } - return 0; } diff --git a/trunk/sound/pci/hda/patch_nvhdmi.c b/trunk/sound/pci/hda/patch_nvhdmi.c index 3c10c0b149f4..70669a246902 100644 --- a/trunk/sound/pci/hda/patch_nvhdmi.c +++ b/trunk/sound/pci/hda/patch_nvhdmi.c @@ -538,6 +538,8 @@ static int patch_nvhdmi_2ch(struct hda_codec *codec) * patch entries */ static struct hda_codec_preset snd_hda_preset_nvhdmi[] = { + { .id = 0x10de0067, .name = "MCP67 HDMI", .patch = patch_nvhdmi_2ch }, + { .id = 0x10de8001, .name = "MCP73 HDMI", .patch = patch_nvhdmi_2ch }, { .id = 0x10de0002, .name = "MCP77/78 HDMI", .patch = patch_nvhdmi_8ch_7x }, { .id = 0x10de0003, .name = "MCP77/78 HDMI", @@ -548,16 +550,12 @@ static struct hda_codec_preset snd_hda_preset_nvhdmi[] = { .patch = patch_nvhdmi_8ch_7x }, { .id = 0x10de0007, .name = "MCP79/7A HDMI", .patch = patch_nvhdmi_8ch_7x }, - { .id = 0x10de000a, .name = "GT220 HDMI", + { .id = 0x10de000c, .name = "MCP89 HDMI", .patch = patch_nvhdmi_8ch_89 }, { .id = 0x10de000b, .name = "GT21x HDMI", .patch = patch_nvhdmi_8ch_89 }, - { .id = 0x10de000c, .name = "MCP89 HDMI", - .patch = patch_nvhdmi_8ch_89 }, { .id = 0x10de000d, .name = "GT240 HDMI", .patch = patch_nvhdmi_8ch_89 }, - { .id = 0x10de0067, .name = "MCP67 HDMI", .patch = patch_nvhdmi_2ch }, - { .id = 0x10de8001, .name = "MCP73 HDMI", .patch = patch_nvhdmi_2ch }, {} /* terminator */ }; @@ -566,12 +564,11 @@ MODULE_ALIAS("snd-hda-codec-id:10de0003"); MODULE_ALIAS("snd-hda-codec-id:10de0005"); MODULE_ALIAS("snd-hda-codec-id:10de0006"); MODULE_ALIAS("snd-hda-codec-id:10de0007"); -MODULE_ALIAS("snd-hda-codec-id:10de000a"); -MODULE_ALIAS("snd-hda-codec-id:10de000b"); -MODULE_ALIAS("snd-hda-codec-id:10de000c"); -MODULE_ALIAS("snd-hda-codec-id:10de000d"); MODULE_ALIAS("snd-hda-codec-id:10de0067"); MODULE_ALIAS("snd-hda-codec-id:10de8001"); +MODULE_ALIAS("snd-hda-codec-id:10de000c"); +MODULE_ALIAS("snd-hda-codec-id:10de000b"); +MODULE_ALIAS("snd-hda-codec-id:10de000d"); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("NVIDIA HDMI HD-audio codec"); diff --git a/trunk/sound/pci/hda/patch_realtek.c b/trunk/sound/pci/hda/patch_realtek.c index 053d53d8c8b2..4ec57633af88 100644 --- a/trunk/sound/pci/hda/patch_realtek.c +++ b/trunk/sound/pci/hda/patch_realtek.c @@ -2532,6 +2532,8 @@ static int alc_build_controls(struct hda_codec *codec) return err; } + alc_free_kctls(codec); /* no longer needed */ + /* assign Capture Source enums to NID */ kctl = snd_hda_find_mixer_ctl(codec, "Capture Source"); if (!kctl) @@ -2600,9 +2602,6 @@ static int alc_build_controls(struct hda_codec *codec) } } } - - alc_free_kctls(codec); /* no longer needed */ - return 0; } diff --git a/trunk/sound/pci/hda/patch_sigmatel.c b/trunk/sound/pci/hda/patch_sigmatel.c index c4be3fab94e5..8c416bb18a57 100644 --- a/trunk/sound/pci/hda/patch_sigmatel.c +++ b/trunk/sound/pci/hda/patch_sigmatel.c @@ -1730,8 +1730,6 @@ static struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = { "HP HDX", STAC_HP_HDX), /* HDX16 */ SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x3620, "HP dv6", STAC_HP_DV5), - SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3061, - "HP dv6", STAC_HP_DV5), /* HP dv6-1110ax */ SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x7010, "HP", STAC_HP_DV5), SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0233, diff --git a/trunk/sound/soc/codecs/tlv320dac33.c b/trunk/sound/soc/codecs/tlv320dac33.c index d50f1699ccb2..f9f367d29a90 100644 --- a/trunk/sound/soc/codecs/tlv320dac33.c +++ b/trunk/sound/soc/codecs/tlv320dac33.c @@ -778,7 +778,7 @@ static int dac33_prepare_chip(struct snd_pcm_substream *substream) if (dac33->fifo_mode) { /* Generic for all FIFO modes */ /* 50-51 : ASRC Control registers */ - dac33_write(codec, DAC33_ASRC_CTRL_A, DAC33_SRCLKDIV(1)); + dac33_write(codec, DAC33_ASRC_CTRL_A, (1 << 4)); /* div=2 */ dac33_write(codec, DAC33_ASRC_CTRL_B, 1); /* ??? */ /* Write registers 0x34 and 0x35 (MSB, LSB) */ @@ -1038,7 +1038,11 @@ static int dac33_set_dai_fmt(struct snd_soc_dai *codec_dai, case SND_SOC_DAIFMT_DSP_A: aictrl_a |= DAC33_AFMT_DSP; aictrl_b &= ~DAC33_DATA_DELAY_MASK; - aictrl_b |= DAC33_DATA_DELAY(0); + aictrl_b |= DAC33_DATA_DELAY(1); /* 1 bit delay */ + break; + case SND_SOC_DAIFMT_DSP_B: + aictrl_a |= DAC33_AFMT_DSP; + aictrl_b &= ~DAC33_DATA_DELAY_MASK; /* No delay */ break; case SND_SOC_DAIFMT_RIGHT_J: aictrl_a |= DAC33_AFMT_RIGHT_J; @@ -1062,7 +1066,7 @@ static void dac33_init_chip(struct snd_soc_codec *codec) { /* 44-46: DAC Control Registers */ /* A : DAC sample rate Fsref/1.5 */ - dac33_write(codec, DAC33_DAC_CTRL_A, DAC33_DACRATE(0)); + dac33_write(codec, DAC33_DAC_CTRL_A, DAC33_DACRATE(1)); /* B : DAC src=normal, not muted */ dac33_write(codec, DAC33_DAC_CTRL_B, DAC33_DACSRCR_RIGHT | DAC33_DACSRCL_LEFT); diff --git a/trunk/sound/soc/codecs/wm_hubs.c b/trunk/sound/soc/codecs/wm_hubs.c index 486bdd21a98a..0ad9f5d536c6 100644 --- a/trunk/sound/soc/codecs/wm_hubs.c +++ b/trunk/sound/soc/codecs/wm_hubs.c @@ -74,7 +74,7 @@ static void wait_for_dc_servo(struct snd_soc_codec *codec) msleep(1); reg = snd_soc_read(codec, WM8993_DC_SERVO_READBACK_0); dev_dbg(codec->dev, "DC servo: %x\n", reg); - } while (reg & WM8993_DCS_DATAPATH_BUSY && count < 400); + } while (reg & WM8993_DCS_DATAPATH_BUSY); if (reg & WM8993_DCS_DATAPATH_BUSY) dev_err(codec->dev, "Timed out waiting for DC Servo\n"); diff --git a/trunk/sound/soc/imx/Kconfig b/trunk/sound/soc/imx/Kconfig index 7174b4c710de..c7d0fd9b7de8 100644 --- a/trunk/sound/soc/imx/Kconfig +++ b/trunk/sound/soc/imx/Kconfig @@ -1,6 +1,6 @@ config SND_IMX_SOC tristate "SoC Audio for Freescale i.MX CPUs" - depends on ARCH_MXC + depends on ARCH_MXC && BROKEN select SND_PCM select FIQ select SND_SOC_AC97_BUS diff --git a/trunk/sound/soc/sh/Kconfig b/trunk/sound/soc/sh/Kconfig index f07f6d8b93e1..106674979b53 100644 --- a/trunk/sound/soc/sh/Kconfig +++ b/trunk/sound/soc/sh/Kconfig @@ -32,7 +32,6 @@ config SND_SOC_SH4_SIU select DMA_ENGINE select DMADEVICES select SH_DMAE - select FW_LOADER ## ## Boards