dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

12805 Commits

Author SHA1 Message Date
Mohan Kumar M b4aea36b79 [POWERPC] Avoid hypervisor statistics calculation in real mode
kexec invokes plpar_hcall hypervisor call in real mode.  plpar_hcall
refers to per cpu variables for accounting hypervisor statistics.
These variables may not be in the RMO region, so accesses to them
in real mode may result in a data storage exception.

This fixes this problem by using a new plpar_hcall_raw function which
does not update the hypervisor call statistics.  Thanks to Anton for
suggesting this idea.

Signed-off-by: Mohan Kumar M <mohan@in.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-03-22 15:01:43 +11:00
Linus Torvalds 8559840c4c Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] Fix wrong /proc/iomem on SGI Altix
  [IA64] Altix: ioremap vga_console_iobase
  [IA64] Fix typo/thinko in crash.c
  [IA64] Fix get_model_name() for mixed cpu type systems
  [IA64] min_low_pfn and max_low_pfn calculation fix
2007-03-21 19:45:50 -07:00
Zou Nan hai a3f5c338b9 [IA64] min_low_pfn and max_low_pfn calculation fix
We have seen bad_pte_print when testing crashdump on an SN machine in
recent 2.6.20 kernel.  There are tons of bad pte print (pfn < max_low_pfn)
reports when the crash kernel boots up, all those reported bad pages
are inside initmem range; That is because if the crash kernel code and
data happens to be at the beginning of the 1st node. build_node_maps in
discontig.c will bypass reserved regions with filter_rsvd_memory. Since
min_low_pfn is calculated in build_node_map, so in this case, min_low_pfn
will be greater than kernel code and data.

Because pages inside initmem are freed and reused later, we saw
pfn_valid check fail on those pages.

I think this theoretically happen on a normal kernel. When I check
min_low_pfn and max_low_pfn calculation in contig.c and discontig.c.
I found more issues than this.

1. min_low_pfn and max_low_pfn calculation is inconsistent between
contig.c and discontig.c,
min_low_pfn is calculated as the first page number of boot memmap in
contig.c (Why? Though this may work at the most of the time, I don't
think it is the right logic). It is calculated as the lowest physical
memory page number bypass reserved regions in discontig.c.
max_low_pfn is calculated include reserved regions in contig.c. It is
calculated exclude reserved regions in discontig.c.

2. If kernel code and data region is happen to be at the begin or the
end of physical memory, when min_low_pfn and max_low_pfn calculation is
bypassed kernel code and data, pages in initmem will report bad.

3. initrd is also in reserved regions, if it is at the begin or at the
end of physical memory, kernel will refuse to reuse the memory. Because
the virt_addr_valid check in free_initrd_mem.

So it is better to fix and clean up those issues.
Calculate min_low_pfn and max_low_pfn in a consistent way.

Signed-off-by:	Zou Nan hai <nanhai.zou@intel.com>
Acked-by: Jay Lan <jlan@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2007-03-20 13:41:57 -07:00
Uwe Kleine-König 9d5cf5adcb [ARM] 4235/1: ns9xxx: declare the clock functions as "const"
This patch removes some "const"s that I introduced thinking they mean
the same thing as the "const"s introduced here.  So it fixes three warnings.

Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-03-20 17:22:23 +00:00
Len Brown f5ea908c8f Pull bugzilla-8171 into release branch 2007-03-20 11:06:00 -04:00
Len Brown 54b8c39fbd Pull misc-for-upstream into release branch 2007-03-20 11:05:41 -04:00
Vlad Yasevich 749bf9215e [SCTP]: Reset some transport and association variables on restart
If the association has been restarted, we need to reset the
transport congestion variables as well as accumulated error
counts and CACC variables.  If we do not, the association
will use the wrong values and may terminate prematurely.

This was found with a scenario where the peer restarted
the association when lksctp was in the last HB timeout for
its association.  The restart happened, but the error counts
have not been reset and when the timeout occurred, a newly
restarted association was terminated due to excessive
retransmits.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-20 00:09:45 -07:00
Vlad Yasevich 0b58a81146 [SCTP]: Clean up stale data during association restart
During association restart we may have stale data sitting
on the ULP queue waiting for ordering or reassembly.  This
data may cause severe problems if not cleaned up.  In particular
stale data pending ordering may cause problems with receive
window exhaustion if our peer has decided to restart the
association.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-20 00:09:43 -07:00
Len Brown 0cd4554df0 ACPI: IA64: fix %ll build warnings
acpi_integer is 64-bits on all platforms, and so was defined as a u64.

i386 and x86_64 define u64 as unsigned long long.
ia64 defines u64 as long.

While these are all 64-bits, the kernel build warns about formating
a "long" with %ll:

drivers/ata/libata-acpi.c:176: warning: long long unsigned int format, acpi_integer arg (arg 5)

So skip using "u64" and define acpi_integer as "unsigned long long"
to make gcc happy with %ll.

Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-19 23:51:36 -04:00
Linus Torvalds f32e355583 Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 4264/1: ldrex/strex syntax errors with recent compilers
  [ARM] Fix breakage caused by 72486f1f8f
2007-03-19 20:05:16 -07:00
Linus Torvalds 511b00a319 Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
  [S390] zcrypt: fix possible race when unloading zcrypt driver modules
  [S390] zcrypt: fix possible dead lock in AP bus module
  [S390] Wire up sys_utimes.
  [S390] reboot from and dump to SCSI under z/VM fails.
  [S390] Wire up compat_sys_epoll_pwait.
  [S390] strlcpy is smart enough
  [S390] memory detection: fix off by one bug.
  [S390] cio: qdio slsb setup
2007-03-19 20:04:26 -07:00
Heiko Carstens fb1c171992 [S390] Wire up sys_utimes.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-03-19 13:19:07 +01:00
Michael Holzheu fbb04f38cf [S390] reboot from and dump to SCSI under z/VM fails.
We used wrong length values for ipl and dump hardware structures.
Since z/VM checks the ipl parameters more accurately than LPAR,
the operations fail there.

Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-03-19 13:19:03 +01:00
Linus Torvalds fbeb1f1922 Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6:
  serial: Fix sh-sci break interrupt/sysrq handling.
  sh: Fix bogus regs pointer in do_IRQ().
  sh: Fix SH-3 cache entry_mask and way_size calculation.
  sh: Convert struct ioctls to static defines.
  sh: Define missing __NR_readahead.
  sh: Fix PCI BAR address-space wraparound.
2007-03-18 16:07:27 -07:00
Ralf Baechle 5851fadce8 [PATCH] Fix build error due to not including <linux/errno.h>
Since d9a9cdfb07 <linux/sysfs.h> is using
ENOSYS without including <linux/errno.h> if CONFIG_SYSFS is disabled.

Fixed by including <linux/errno.h>.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-18 13:40:06 -07:00
John Keller 6a3d039078 [PATCH] ia64: platform_kernel_launch_event is noop on generic kernel
Add a missing #define for the platform_kernel_launch_event.  Without this
fix, a call to platform_kernel_launch_event() becomes a noop on generic
kernels.  SN systems require this fix to successfully kdump/kexec from
certain hardware errors.

[bwalle@suse.de: fix it]
Signed-off-by: John Keller <jpk@sgi.com>
Cc: Bernhard Walle <bwalle@suse.de>
Acked-by: Simon Horman <horms@verge.net.au>
Acked-by: Jay Lan <jlan@sgi.com>
Acked-by: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-18 11:35:07 -07:00
Linus Torvalds 98ae6878f1 Merge branch 'linus' of master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa
* 'linus' of master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa:
  [ALSA] hda-intel - Fix HDA buffer alignment
  [ALSA] hda-codec - Add model for HP Compaq d5750
  [ALSA] hda-codec - Add support for MacBook Pro 1st generation
  [ALSA] version 1.0.14rc3
  [ALSA] hda-codec - Add model for HP Compaq d5700
  [ALSA] intel8x0 - Fix Oops at kdump crash kernel
  [ALSA] hda-codec - Fix speaker output on MacPro
  [ALSA] hda-codec - more systems for Analog Devices
  [ALSA] hda-intel - Fix codec probe with ATI contorllers
  [ALSA] hda-codec - Add suppoprt for Asus M2N-SLI motherboard
  [ALSA] intel8x0 - Fix speaker output after S2RAM
  [ALSA] ac97 - fix AD shared shared jack control logic
  [ALSA] soc - Fix dependencies in Kconfig files
2007-03-18 10:50:44 -07:00
Linus Torvalds 2f8dd8505e Merge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6:
  ide: remove CONFIG_IDEDMA_{ICS,PCI}_AUTO config options
  ide: don't allow DMA to be enabled if CONFIG_IDEDMA_{ICS,PCI}_AUTO=n
  scc_pata: dependency fix
  jmicron: make ide jmicron driver play nice with libata ones
  ide: remove static prototypes from include/asm-mips/mach-au1x00/au1xxx_ide.h
  ide: au1xxx: fix use of mixed declarations and code
  cmd64x: fix recovery time calculation (take 3)
2007-03-17 17:00:48 -07:00
Linus Torvalds 360afb0332 Merge branch 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6
* 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6:
  [PATCH] x86: Export _proxy_pda for gcc 4.2
  [PATCH] i386: Don't use the TSC in sched_clock if unstable
  [PATCH] x86-64: fix section mismatch warnings
  [PATCH] i386: Enforce GPLness of VMI ROM
  [PATCH] x86-64: wire up compat sched_rr_get_interval(2)
  [PATCH] i386: Update defconfig
  [PATCH] x86-64: Update defconfig
2007-03-17 16:57:41 -07:00
Daniel Mack 9c67cd1460 ide: remove static prototypes from include/asm-mips/mach-au1x00/au1xxx_ide.h
This patch removes the static prototypes from the au1xxx_ide.h, some of
them were not even implemented. Also, they caused build breakage since
they differed from the functions actually implemented in
drivers/ide/mips/au1xxx-ide.c.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-03-17 21:57:24 +01:00
Linus Torvalds c334ba9e11 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: Get DEBUG_PAGEALLOC working again.
2007-03-16 19:28:33 -07:00
Linus Torvalds 4745591167 Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [MIPS] Kconfig: Move missplaced NR_CPUS default from SMTC to VSMP.
  [MIPS] Lockdep: Fix recursion bug.
  [MIPS] RTLX: Handle copy_*_user return values.
  [MIPS] RTLX: Protect rtlx_{read,write} with mutex.
  [MIPS] RTLX: Harden against compiler reordering and optimization.
  [MIPS] RTLX: Don't use volatile; it's fragile.
  [MIPS] Lasat: Downgrade 64-bit kernel from experimental to broken.
  [MIPS] Compat: Fix build if CONFIG_SYSVIPC is disabled.
  [CHAR] lcd: Fix two warnings.
  [MIPS] FPU ownership management & preemption fixes
  [MIPS] Check FCSR for pending interrupts, alternative version
  [MIPS] IP27, IP35: Fix warnings.
2007-03-16 19:28:15 -07:00
Thomas Gleixner 5379058b71 [PATCH] fix MTIME_SEC_MAX on 32-bit
The maximum seconds value we can handle on 32bit is LONG_MAX.

Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-16 19:25:07 -07:00
Jeremy Fitzhardinge 014efb1df7 [PATCH] i386: fix typo in sync_constant_test_bit()'s name
Fix typo in sync_constant_test_bit()'s name, so sync_bitops.h is consistent
with bitops.h

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-16 19:25:07 -07:00
Peter Zijlstra 89a09141df [PATCH] nfs: fix congestion control
The current NFS client congestion logic is severly broken, it marks the
backing device congested during each nfs_writepages() call but doesn't
mirror this in nfs_writepage() which makes for deadlocks.  Also it
implements its own waitqueue.

Replace this by a more regular congestion implementation that puts a cap on
the number of active writeback pages and uses the bdi congestion waitqueue.

Also always use an interruptible wait since it makes sense to be able to
SIGKILL the process even for mounts without 'intr'.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Christoph Lameter <clameter@engr.sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-16 19:25:05 -07:00
Andrew Johnson b257bc051f [PATCH] swsusp: fix suspend when console is in VT_AUTO+KD_GRAPHICS mode
When the console is in VT_AUTO+KD_GRAPHICS mode, switching to the
SUSPEND_CONSOLE fails, resulting in vt_waitactive() waiting indefinitely or
until the task is interrupted.  This patch tests if a console switch can
occur in set_console() and returns early if a console switch is not
possible.

[akpm@linux-foundation.org: cleanup]
Signed-off-by: Andrew Johnson <ajohnson@intrinsyc.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-16 19:25:05 -07:00
David Brownell 28735a7253 [PATCH] gpio_direction_output() needs an initial value
It's been pointed out that output GPIOs should have an initial value, to
avoid signal glitching ...  among other things, it can be some time before
a driver is ready.  This patch corrects that oversight, fixing

 - documentation
 - platforms supporting the GPIO interface
 - users of that call (just one for now, others are pending)

There's only one user of this call for now since most platforms are still
using non-generic GPIO setup code, which in most cases already couples the
initial value with its "set output mode" request.

Note that most platforms are clear about the hardware letting the output
value be set before the pin direction is changed, but the s3c241x docs are
vague on that topic ...  so those chips might not avoid the glitches.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Andrew Victor <andrew@sanpeople.com>
Acked-by: Milan Svoboda <msvoboda@ra.rockwell.com>
Acked-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-16 19:25:04 -07:00
Chris Lesiak a836f5856a [PATCH] spi: destroy workqueue after spi_unregister_master
Fix a bug in the cleanup of an spi_bitbang bus.

The workqueue associated with the bus was destroyed before the call to
spi_unregister_master.  That meant that spi devices on that bus would be
unable to do IO in their remove method.  The shutdown flag should have been
able to prevent a segfault, but was never getting set.  By waiting to
destroy the workqueue until after the master is unregistered, devices are
able to do IO in their remove methods.  An added benefit is that neither
the shutdown flag nor a wait for the queue of messages to empty is needed.

Signed-off-by: Chris Lesiak <chris.lesiak@licor.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-16 19:25:04 -07:00
Evgeniy Dushistov 2189850f42 [PATCH] ufs2: more correct work with time
This patch corrects work with time in UFS2 case.

1) According to UFS2 disk layout modification/access and so on "time"
   should be hold in two variables one 64bit for seconds and another 32bit for
   nanoseconds,

   at now for some unknown reason we suppose that "inode time" holds in
   three variables 32bit for seconds, 32bit for milliseconds and 32bit for
   nanoseconds.

2) We set amount of nanoseconds in "VFS inode" to 0 during read, instead of
   getting values from "on disk inode"(this should close
   http://bugzilla.kernel.org/show_bug.cgi?id=7991).

Signed-off-by: Evgeniy Dushistov <dushistov@mail.ru>
Cc: Bjoern Jacke <bjoern@j3e.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-16 19:25:03 -07:00
Ralf Baechle 49edd098e2 [MIPS] Lockdep: Fix recursion bug.
trace_hardirqs_off -> atomic_inc -> local_irq_restore -> trace_hardirqs_off

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-17 01:03:29 +00:00
Ralf Baechle 46230aa6ea [MIPS] RTLX: Handle copy_*_user return values.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-17 01:03:29 +00:00
Atsushi Nemoto 53dc80287d [MIPS] FPU ownership management & preemption fixes
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-17 01:03:26 +00:00
Ralf Baechle f1dbf8e718 [MIPS] IP27, IP35: Fix warnings.
include/asm-mips/mach-ip27/dma-coherence.h:22: warning: 'plat_map_dma_mem' defined but not used
include/asm-mips/mach-ip27/dma-coherence.h:41: warning: 'plat_unmap_dma_mem' defined but not used
include/asm-mips/mach-ip32/dma-coherence.h:30: warning: 'plat_map_dma_mem' defined but not used
include/asm-mips/mach-ip32/dma-coherence.h:63: warning: 'plat_unmap_dma_mem' defined but not used

These functions are meant to be inlined anyway.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-17 01:03:24 +00:00
David S. Miller d1acb4210a [SPARC64]: Get DEBUG_PAGEALLOC working again.
We have to make sure to use base-pagesize TLB entries even during the
early transition period where we need TLB miss handling but don't have
the kernel page tables setup yet for the linear region.

Also, it is necessary therefore to not use the 4MB TSB for these
translations, and instead use the normal kernel TSB.  This allows us
to also get rid of the 4MB tsb for debug builds which shrinks the
kernel a little bit.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-16 17:20:28 -07:00
Sam Ravnborg 43999d9e4e [PATCH] x86-64: fix section mismatch warnings
Fix the following section mismatch warnings on x86_64:
(build using defconfig)

WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.text:mtrr_bp_init from .text between 'identify_cpu' (at offset 0x65eb) and 'IRQ0x20_interrupt'
WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data: from .text between 'finish_e820_parsing' (at offset 0x7dc2) and 'early_panic'
WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.text:e820_print_map from .text between 'finish_e820_parsing' (at offset 0x7de1) and 'early_panic'
WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:num_processors from .text between 'acpi_unmap_lsapic' (at offset 0xc88f) and 'acpi_register_ioapic'
WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:disabled_cpus from .text between 'MP_processor_info' (at offset 0x11f35) and 'mp_register_lapic'
WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:num_processors from .text between 'MP_processor_info' (at offset 0x11f6e) and 'mp_register_lapic'
WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:num_processors from .text between 'MP_processor_info' (at offset 0x11f93) and 'mp_register_lapic'
WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:fix_aperture from .text between 'gart_parse_options' (at offset 0x15517) and 'iommu_full'
WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:fix_aperture from .text between 'gart_parse_options' (at offset 0x1552c) and 'iommu_full'
WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:iommu_aperture_allowed from .text between 'gart_parse_options' (at offset 0x1553d) and 'iommu_full'
WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:iommu_aperture_allowed from .text between 'gart_parse_options' (at offset 0x15552) and 'iommu_full'
WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:iommu_aperture_allowed from .text between 'gart_parse_options' (at offset 0x15561) and 'iommu_full'
WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:iommu_aperture_allowed from .text between 'gart_parse_options' (at offset 0x15577) and 'iommu_full'
WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:fallback_aper_force from .text between 'gart_parse_options' (at offset 0x1558a) and 'iommu_full'
WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:fallback_aper_order from .text between 'gart_parse_options' (at offset 0x155bf) and 'iommu_full'
WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:timer_over_8254 from .text between 'ati_bugs' (at offset 0x16344) and 'via_bugs'
WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:timer_over_8254 from .text between 'ati_bugs' (at offset 0x16356) and 'via_bugs'
WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:iommu_aperture_allowed from .text between 'via_bugs' (at offset 0x16380) and 'nvidia_bugs'
WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:iommu_aperture_disabled from .text between 'via_bugs' (at offset 0x16397) and 'nvidia_bugs'
WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:acpi_use_timer_override from .text between 'nvidia_bugs' (at offset 0x163a7) and 'arch_unregister_cpu'
WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.text:nvidia_hpet_check from .text between 'nvidia_bugs' (at offset 0x163b1) and 'arch_unregister_cpu'
WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data: from .text between 'nvidia_bugs' (at offset 0x163be) and 'arch_unregister_cpu'
WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data: from .text between 'nvidia_bugs' (at offset 0x163d1) and 'arch_unregister_cpu'
WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:acpi_skip_timer_override from .text between 'nvidia_bugs' (at offset 0x163e1) and 'arch_unregister_cpu'
WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.text:quirk_intel_irqbalance from .text between 'intel_bugs' (at offset 0x1633c) and 'ati_bugs'

But adds:
WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.text:get_mtrr_state from .text between 'mtrr_bp_init' (at offset 0xb887) and 'ipi_handler'

The warnings does not show up during a normal build due to kbuild
failing to check for section mismatch in vmlinux.
To see these warnings run:
scripts/mod/modpost arch/x86_64/kernel/built-in.o

kbuild will be fixed but the 'noise-level' had to be decresed first.
There remains a few section mismatch warnigns for x86_64 for areas where I did
not feel confident.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andi Kleen <ak@suse.de>
2007-03-16 21:07:36 +01:00
Alan Stern d9a9cdfb07 [PATCH] sysfs and driver core: add callback helper, used by SCSI and S390
This patch (as868) adds a helper routine for device drivers that need
to set up a callback to perform some action in a different process's
context.  This is intended for use by attribute methods that want to
unregister themselves or their parent device.  Attribute method calls
are mutually exclusive with unregistration, so such actions cannot be
taken directly.

Two attribute methods are converted to use the new helper routine: one
for SCSI device deletion and one for System/390 ccwgroup devices.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-15 15:29:26 -07:00
Stelian Pop 0803c30c23 [ARM] 4264/1: ldrex/strex syntax errors with recent compilers
Trying to build some code using atomic_clear_mask() on a ARM v6
processor with a recent compiler (tried with gcc version 4.1.1
(CodeSourcery ARM Sourcery G++ 2006q3-26), but
all gcc > 4.1 might be affected) results in the following:

/tmp/ccWKLJV8.s: Assembler messages:
/tmp/ccWKLJV8.s:581: Error: instruction does not accept this addressing
mode -- `ldrex r0,r3'
/tmp/ccWKLJV8.s:583: Error: instruction does not accept this addressing
mode -- `strex r1,r0,r3'

Older gcc (like gcc version 4.0.0 (DENX ELDK 4.1 4.0.0)) have no problem
with this.

The patch below fixes the compile error. I also verified that gcc-4.0.0 generates identical code using both forms.

Signed-off-by: Stelian Pop <stelian@popies.net>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-03-15 20:39:16 +00:00
Len Brown a8f4af6dc6 ACPICA: revert "acpi_serialize" changes
This reverts 977a6226fe
and reverts 1ba753acb3
and updates acpi_ev_queue_notify_request()
to restore the previous implementation of the
"acpi_serialize" workaround.

http://bugzilla.kernel.org/show_bug.cgi?id=8171

Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-15 04:10:36 -04:00
Linus Torvalds 8ce5e3e45e Disable NMI watchdog by default properly
This reverts commit 6ebf622b25 and
replaces it with one that actually works.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-14 17:53:43 -07:00
Al Viro 69300436ca [PATCH] m68k dma-mapping: gfp_t annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-14 15:27:51 -07:00
Al Viro ecb7524c5d [PATCH] kill bogus casts in amd64 uaccess.h
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-14 15:27:50 -07:00
Al Viro 1be9ab056e [PATCH] ANSIfy powerpc floppy.h
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-14 15:27:50 -07:00
Al Viro 192cd59bd9 [PATCH] fastcall still doesn't make sense in paravirt
Andi had removed a bunch of those, but one more had creeped in...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-14 15:27:49 -07:00
Al Viro 0ae24bdedd [PATCH] rtc-cmos needs RTC_ALWAYS_BCD known
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-14 15:27:49 -07:00
Al Viro a7124d799a [PATCH] sparc: have dma-mapping.h include generic/dma-mapping-broken in non-PCI case
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-14 15:27:49 -07:00
Al Viro 24b29dbcf3 [PATCH] m32r dma-mapping.h should simply include generic/dma-mapping-broken.h
... instead of trying to duplicate its bits

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-14 15:27:49 -07:00
Al Viro 04ff97086b [PATCH] sanitize security_getprocattr() API
have it return the buffer it had allocated

Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Acked-by: James Morris <jmorris@namei.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-14 15:27:48 -07:00
Jaroslav Kysela 717aa9fd26 [ALSA] version 1.0.14rc3
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-03-14 08:25:52 +01:00
Paul Mundt 3afb209a43 sh: Fix bogus regs pointer in do_IRQ().
SH-3 and SH-4 were trampling the register, and SH-2 wasn't even
setting it in the first place. This ended up with some rather
broken behaviour in the sysrq show_regs().

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-03-14 13:03:35 +09:00
David S. Miller 50d266a3a1 [SPARC]: Hook up missing syscalls.
sys_mbind
sys_get_mempolicy
sys_set_mempolicy
sys_kexec_load
sys_move_pages
sys_getcpu
sys_epoll_pwait

This work is largely a result of David Woodhouse's most
excellent missing syscalls patch.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-12 19:58:18 -07:00
Linus Torvalds 8b9909ded6 Merge branch 'merge' of master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc:
  [POWERPC] sys_move_pages should be callable from an SPU
  [POWERPC] Wire up sys_epoll_pwait
  [POWERPC] Allocate syscall number for sys_getcpu
  [POWERPC] update cell_defconfig
  [POWERPC] ps3: always make sure were running on a PS3
  [POWERPC] Fix spu SLB invalidations
  [POWERPC] avoid SPU_ACTIVATE_NOWAKE optimization
  [POWERPC] spufs: fix possible memory corruption is spufs_mem_write
2007-03-12 18:13:45 -07:00
Linus Torvalds 44a5085162 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC]: Fix TIF_USEDFPU flag atomicity
  [SPARC64]: Fix atomicity of TIF update in flush_thread()
  [BW2]: Fix section mismatch warnings.
  [CG14]: Fix section mismatch warnings.
  [SPARC]: We do not need OLD_GETRLIMIT.
2007-03-12 18:13:02 -07:00
Zachary Amsden 2cb8a57b98 [PATCH] Fix vmi time header bug
Some gcc put this function in .init.text because the header didn't
match.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-12 16:36:16 -07:00
Eric W. Biederman 9f35575dfc [PATCH] pci: Repair pci_save/restore_state so we can restore one save many times.
Because we do not reserve space for the pci-x and pci-e state in struct
pci dev we need to dynamically allocate it.  However because we need
to support restore being called multiple times after a single save
it is never safe to free the buffers we have allocated to hold the
state.

So this patch modifies the save routines to first check to see
if we have already allocated a state buffer before allocating
a new one.  Then the restore routines are modified to not free
the state after restoring it.  Simple and it fixes some subtle
error path handling bugs, that are hard to test for.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-12 16:31:50 -07:00
Eric W. Biederman 392ee1e6dd [PATCH] msi: Safer state caching.
There are two ways pci_save_state and pci_restore_state are used.  As
helper functions during suspend/resume, and as helper functions around
a hardware reset event.  When used as helper functions around a hardware
reset event there is no reason to believe the calls will be paired, nor
is there a good reason to believe that if we restore the msi state from
before the reset that it will match the current msi state.  Since arch
code may change the msi message without going through the driver, drivers
currently do not have enough information to even know when to call
pci_save_state to ensure they will have msi state in sync with the other
kernel irq reception data structures.

It turns out the solution is straight forward, cache the state in the
existing msi data structures (not the magic pci saved things) and
have the msi code update the cached state each time we write to the hardware.
This means we never need to read the hardware to figure out what the hardware
state should be.

By modifying the caching in this manner we get to remove our save_state
routines and only need to provide restore_state routines.

The only fields that were at all tricky to regenerate were the msi and msi-x
control registers and the way we regenerate them currently is a bit dependent
upon assumptions on how we use the allow msi registers to be configured and used
making the code a little bit brittle.  If we ever change what cases we allow
or how we configure the msi bits we can address the fragility then.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-12 16:31:50 -07:00
Linus Torvalds 529284a0b6 Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 4263/1: fix IXP4XX_NPE[ABC]_BASE_VIRT address
  [ARM] 4256/1: i.MX/MX1 SDHC fix/workaround of SD card recognition problems
  [ARM] 4255/1: i.MX/MX1 Correct MPU PLL reference clock value.
  [ARM] 4254/1: i.MX/MX1 CPU Frequency scaling honor boot loader set BCLK_DIV.
  [ARM] 4251/1: Fix sharpsl_pm dependency
  [ARM] 4250/1: Fix locomo backlight conversion error/compile failure
  [ARM] 4249/1: Fix tosa compile failure
  [ARM] 4248/1: lh7a40x: fix missing definitions for get_irqnr_preamble
  [ARM] 4247/1: Fix long name for cc9p9360dev
  ARM: OMAP: Fix OMAP2 dss2 so clk_set_parent works
  ARM: OMAP: Fix missing workqueue include in board-h2.c
  ARM: OMAP: Include missing header
2007-03-12 12:31:43 -07:00
Milan Svoboda 1dee79087c [ARM] 4263/1: fix IXP4XX_NPE[ABC]_BASE_VIRT address
This fixs address defines for IXP4XX_NPE[ABC]_BASE_VIRT.
They are defined as (IXP4XX_PERIPHERAL_BASE_PHYS + 0x[678]000) now,
but they should be defined as (IXP4XX_PERIPHERAL_BASE_VIRT + 0x[678]000). Note PHYS vs VIRT in IXP4XX_PERIPHERAL_BASE...

Signed-off-by: Milan Svoboda <msvoboda@ra.rockwell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-03-12 16:49:38 +00:00
Mike Frysinger fbd168461e sh: Convert struct ioctls to static defines.
This fixes up some compile failures for cases where we don't include
all of the headers. There's not much point in keeping the struct
references around anyways, most of the others have been converted
already.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-03-12 16:12:45 +09:00
Paul Mundt 72a121ba6d sh: Define missing __NR_readahead.
For some reason sh was missing __NR_readahead, even though the
syscall was wired up, and the slot was reserved. Caught with
dwmw2's missing syscall checker.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-03-12 15:55:19 +09:00
Stephen Rothwell 7b3c384db1 [POWERPC] sys_move_pages should be callable from an SPU
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-03-12 15:48:35 +11:00
Stephen Rothwell 4b0092c215 [POWERPC] Wire up sys_epoll_pwait
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-03-12 15:48:35 +11:00
Stephen Rothwell 4cd723b4a0 [POWERPC] Allocate syscall number for sys_getcpu
I forgot to do this when wiring up the syscall.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-03-12 15:48:35 +11:00
Paul Mackerras f57e8430bd Merge branch 'cell-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/cell-2.6 into merge 2007-03-12 15:47:23 +11:00
David S. Miller ac33d1febb [SPARC]: We do not need OLD_GETRLIMIT.
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-09 23:10:23 -08:00
Linus Torvalds f4cd87aabb Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] refresh config files
  [IA64] put kdump_find_rsvd_region in __init
  [IA64] Remove sparse warning from unwind code
  [IA64] add missing syscall trace clear
  [IA64] Cleanup in crash.c
  [IA64] kexec: declare ia64_mca_pal_base in mca.h rather than kexec.h
  [IA64] pci_get_legacy_ide_irq should return irq (not GSI)
  [IA64] whitespace fixes for include/asm-ia64/sal.h
  [IA64] Cache error recovery
  [IA64] Proper handling of TLB errors from duplicate itr.d dropins
2007-03-09 22:00:51 -08:00
Benjamin Herrenschmidt 94b2a4393c [POWERPC] Fix spu SLB invalidations
The SPU code doesn't properly invalidate SPUs SLBs when necessary,
for example when changing a segment size from the hugetlbfs code. In
addition, it saves and restores the SLB content on context switches
which makes it harder to properly handle those invalidations.

This patch removes the saving & restoring for now, something more
efficient might be found later on. It also adds a spu_flush_all_slbs(mm)
that can be used by the core mm code to flush the SLBs of all SPEs that
are running a given mm at the time of the flush.

In order to do that, it adds a spinlock to the list of all SPEs and move
some bits & pieces from spufs to spu_base.c

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2007-03-10 00:07:50 +01:00
Ralf Baechle bb9b813bb6 [MIPS] Sibyte: Fix ZBbus profiler
o Fix build error.
 o Handle error returns.
 o Deal with signals received while sleeping.
 o Don't allow to be selected when we're not building the directory with
   the driver anyway.
 o Coding style cleanups.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-09 20:27:31 +00:00
Linus Torvalds 6e96783f58 Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6:
  [JFFS2] print a message when marking bad block
  [JFFS2] Check for all-zero node headers
  [MTD] [OneNAND] Classify the page data and oob buffer
  [MTD] [OneNAND] Exit the loop when transferring/filling of the oob is finished
  [MTD] [OneNAND] add Nokia Copyright and a credit
  [MTD] [OneNAND] Fix typo & wrong comments
  [MTD] [OneNAND] Use oob buffer instead of main one in oob functions
  [MTD] Correct partition failed erase address
  [JFFS2] Use yield() between GC passes in background thread.
  [MTD] [NAND] Correct misspelled preprocessor variable.
  [MTD] [MAPS] dilnetpc: Fix printk warning
  [MTD] [NOR] Fix oops in cfi_amdstd_sync
  [MTD] ESB2 check for closed ROM window
  [JFFS2] Fix writebuffer recovery in the first page of a block
  [MTD] [NAND] make oobavail public
2007-03-09 10:34:55 -08:00
Kyungmin Park 470bc84436 [MTD] [OneNAND] Classify the page data and oob buffer
Classify the page data and oob buffer
and it prevents the memory fragementation (writesize + oobsize)

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-03-09 08:08:09 +00:00
David S. Miller 2ef550790a [SPARC64]: Fix PARPORT build (again).
Need to provide {claim,release}_dma_lock() for this guy too.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-08 15:00:03 -08:00
Keith Owens 1f0ef4ef60 [IA64] Remove sparse warning from unwind code
Running ia64 through sparse gives warnings in the unwind code.

  include/asm-ia64/unwind.h:84:17: error: dubious bitfield without explicit `signed' or `unsigned'

Make the bitfield explicitly unsigned.

Signed-off-by: Keith Owens <kaos@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2007-03-08 10:28:48 -08:00
Simon Horman 297632544a [IA64] kexec: declare ia64_mca_pal_base in mca.h rather than kexec.h
* Kexec adds some code to arch/ia64/kernel/smp.c which needs ia64_mca_pal_base,
  so the kexec patch (actually the kdump patch) declares this
  per-cpu variable in include/asm-ia64/kexec.h.

* ia64_mca_pal_base is defined in arch/ia64/kernel/mca.c, so it
  seems to me that it would make a lot more sense to declare it in
  include/asm-ia64/mca.h.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2007-03-08 10:18:24 -08:00
Zhang, Yanmin 8621235b2e [IA64] pci_get_legacy_ide_irq should return irq (not GSI)
Function pci_get_legacy_ide_irq is incorrect on ia64. It should return
irq vector instead of GSI. The fixed number 14 and 15 are just GSI.

Signed-off-by: Zhang Yanmin <yanmin.zhang@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2007-03-08 10:04:44 -08:00
Horms 860abe8f72 [IA64] whitespace fixes for include/asm-ia64/sal.h
* Make use of spaces and tabs consistent
* Make long line < 80col

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2007-03-08 09:58:13 -08:00
Russ Anderson 618b206f0b [IA64] Proper handling of TLB errors from duplicate itr.d dropins
Jack Steiner noticed that duplicate TLB DTC entries do not cause a
linux panic.  See discussion:

http://www.gelato.unsw.edu.au/archives/linux-ia64/0307/6108.html

The current TLB recovery code is recovering from the duplicate itr.d
dropins, masking the underlying problem.  This change modifies
the MCA recovery code to look for the TLB check signature of the
duplicate TLB entry and panic in that case.

Signed-off-by: Russ Anderson (rja@sgi.com)
Signed-off-by: Tony Luck <tony.luck@intel.com>
2007-03-08 09:41:46 -08:00
Davide Libenzi f6dfb4fd7d [PATCH] Add epoll compat_ code to fs/compat.c
IA64 and ARM-OABI are currently using their own version of epoll compat_
code.

An architecture needs epoll_event translation if alignof(u64) in 32 bit
mode is different from alignof(u64) in 64 bit mode.  If an architecture
needs epoll_event translation, it must define struct compat_epoll_event in
asm/compat.h and set CONFIG_HAVE_COMPAT_EPOLL_EVENT and use
compat_sys_epoll_ctl and compat_sys_epoll_wait.

All 64 bit architecture should use compat_sys_epoll_pwait.

[sfr: restructure and move to fs/compat.c, remove MIPS version
of compat_sys_epoll_pwait, use __put_user_unaligned]

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-08 07:38:22 -08:00
Dan Williams 25613cae00 [ARM] 4248/1: lh7a40x: fix missing definitions for get_irqnr_preamble
commit f80dff9da0 missed the needed
definitions within the #elif blocks in
include/asm-arm/arch-lh7a40x/entry-macro.S

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-03-08 13:33:57 +00:00
Vitaly Wool 1f92267c51 [MTD] [NAND] make oobavail public
During the MTD rework the oobavail parameter of mtd_info structure has become
private. This is not quite correct in terms of integrity and logic. If we have
means to write to OOB area, then we'd like to know upfront how many bytes out
of OOB are spare per page to be able to adapt to specific cases.
The patch inlined adds the public oobavail parameter.

Signed-off-by: Vitaly Wool <vwool@ru.mvista.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-03-08 09:17:43 +00:00
Linus Torvalds eee8abe5de Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [BRIDGE]: adding new device to bridge should enable if up
  [IPV6]: Do not set IF_READY if device is down
  [IPSEC]: xfrm audit hook misplaced in pfkey_delete and xfrm_del_sa
  [IPSEC]: Add xfrm policy change auditing to pfkey_spdget
  [IPSEC]: xfrm_policy delete security check misplaced
  [CONNECTOR]: Bugfix for cn_call_callback()
  [DCCP]: Revert patch which disables bidirectional mode
  [IPV6]: Handle np->opt being NULL in ipv6_getsockopt_sticky().
  [UDP]: Reread uh pointer after pskb_trim
  [NETFILTER]: nfnetlink_log: fix crash on bridged packet
  [NETFILTER]: nfnetlink_log: zero-terminate prefix
  [NETFILTER]: nf_conntrack_ipv6: fix incorrect classification of IPv6 fragments as ESTABLISHED
2007-03-07 19:05:34 -08:00
Ralf Baechle 012390517e [MIPS] ISA: Fix typo
Lost CONFIG_ prefix discovered by Robert P. J. Day <rpjday@mindspring.com>.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-08 01:10:30 +00:00
Eric Paris ef41aaa0b7 [IPSEC]: xfrm_policy delete security check misplaced
The security hooks to check permissions to remove an xfrm_policy were
actually done after the policy was removed.  Since the unlinking and
deletion are done in xfrm_policy_by* functions this moves the hooks
inside those 2 functions.  There we have all the information needed to
do the security check and it can be done before the deletion.  Since
auditing requires the result of that security check err has to be passed
back and forth from the xfrm_policy_by* functions.

This patch also fixes a bug where a deletion that failed the security
check could cause improper accounting on the xfrm_policy
(xfrm_get_policy didn't have a put on the exit path for the hold taken
by xfrm_policy_by*)

It also fixes the return code when no policy is found in
xfrm_add_pol_expire.  In old code (at least back in the 2.6.18 days) err
wasn't used before the return when no policy is found and so the
initialization would cause err to be ENOENT.  But since err has since
been used above when we don't get a policy back from the xfrm_policy_by*
function we would always return 0 instead of the intended ENOENT.  Also
fixed some white space damage in the same area.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Venkat Yekkirala <vyekkirala@trustedcs.com>
Acked-by: James Morris <jmorris@namei.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-07 16:08:09 -08:00
Linus Torvalds 455921451a Merge branch 'for-linus' of git://www.atmel.no/~hskinnemoen/linux/kernel/avr32
* 'for-linus' of git://www.atmel.no/~hskinnemoen/linux/kernel/avr32:
  avr32: dma-mapping.h
  [AVR32] Don't use kmap() in flush_icache_page()
  [AVR32] Fix bogus ti->flags manipulation in debug handler
  [AVR32] Fix typo in include/asm-avr32/Kbuild
  [AVR32] show_trace: Only walk valid stack addresses
  [AVR32] at32_spi_setup_slaves should be __init
2007-03-07 11:27:53 -08:00
Linus Torvalds d694c16bc3 Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6:
  sh: Kill off I/O cruft for R7780RP.
  sh: Revert lazy dcache writeback changes.
  sh: Enable SM501 support for RTS7751R2D.
  sh: Use L1_CACHE_BYTES for .data.cacheline_aligned.
  sysctl: Support vdso_enabled sysctl on SH.
  sh: Fix kernel thread stack corruption with preempt.
  doc: Add SH to vdso and earlyprintk in kernel-parameters.txt
  sh: Fix sigmask trampling in signal delivery.
  sh: Clear UBC when not in use.
2007-03-07 10:08:33 -08:00
Gary Zambrano a9e28d9b0b avr32: dma-mapping.h
Added dma_sync_single_range_for_cpu/device to dma-mapping.h in asm-avr32 to
call dma_sync_single_for_cpu/device.  This patch enables b44 to compile on
systems with these cpus.  This patch was created with the assumption that
another method of dma_sync_single_range_for_cpu/device does not exist on these
architectures.

Signed-off by: Gary Zambrano <zambrano@broadcom.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-03-07 10:50:30 +01:00
Haavard Skinnemoen bfa4f55cc8 [AVR32] Fix typo in include/asm-avr32/Kbuild
It's header-y, not headers-y.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-03-07 10:50:27 +01:00
Linus Torvalds 2f774456e4 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: Fix floppy build failure.
2007-03-06 19:57:46 -08:00
Linus Torvalds 5b3c1184e7 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [DCCP]: Set RTO for newly created child socket
  [DCCP]: Correctly split CCID half connections
  [NET]: Fix compat_sock_common_getsockopt typo.
  [NET]: Revert incorrect accept queue backlog changes.
  [INET]: twcal_jiffie should be unsigned long, not int
  [GIANFAR]: Fix compile error in latest git
  [PPPOE]: Use ifindex instead of device pointer in key lookups.
  [NETFILTER]: ip6_route_me_harder should take into account mark
  [NETFILTER]: nfnetlink_log: fix reference counting
  [NETFILTER]: nfnetlink_log: fix module reference counting
  [NETFILTER]: nfnetlink_log: fix possible NULL pointer dereference
  [NETFILTER]: nfnetlink_log: fix NULL pointer dereference
  [NETFILTER]: nfnetlink_log: fix use after free
  [NETFILTER]: nfnetlink_log: fix reference leak
  [NETFILTER]: tcp conntrack: accept SYN|URG as valid
  [NETFILTER]: nf_conntrack/nf_nat: fix incorrect config ifdefs
  [NETFILTER]: conntrack: fix {nf,ip}_ct_iterate_cleanup endless loops
2007-03-06 19:53:34 -08:00
Linus Torvalds fe1b4ba400 Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
  [S390] cio: Call cancel_halt_clear even when actl == 0.
  [S390] cio: Use path verification to check for path state.
  [S390] cio: Fix locking when calling notify function.
  [S390] Fixed handling of access register mode faults.
  [S390] dasd: Use default recovery for SNSS requests
  [S390] check_bugs() should be inline.
  [S390] tape: Compression overwrites crypto setting
  [S390] nss: disable kexec.
  [S390] reipl: move dump_prefix_page out of text section.
  [S390] smp: disable preemption in smp_call_function/smp_call_function_on
  [S390] kprobes breaks BUG_ON
2007-03-06 19:52:50 -08:00
Linus Torvalds 38f3323037 Revert "[PATCH] LOG2: Alter get_order() so that it can make use of ilog2() on a constant"
This reverts commit 39d61db0ed.

The commit was buggy in multiple ways:
 - the conversion to ilog2() was incorrect to begin with
 - it tested the wrong #defines, so on all architectures but FRV you'd
   never see the bug except for constant arguments.
 - the new "get_order()" macro used its arguments multiple times, and
   didn't even parenthesize them properly
 - despite the comments, it was not true that you could use it for
   constant initializers, since not all architectures even use the
   generic page.h header file.

All of the problems are individually fixable, but it all boils down to:
better just revert it, and re-do it from scratch.

Cc: David Howells <dhowells@redhat.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-06 19:38:01 -08:00
Greg Ungerer 8bb25184b3 [PATCH] m68knommu: GPIO line defines for the ColdFire 5282
For the Freescale M5282 ColdFire,
Port UA Pin Assignment Register should set to UART mode.
Patch submitted by David Wu <davidwu@arcturusnetworks.com>.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-06 18:08:38 -08:00
Linus Torvalds 1ba73b99c3 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] kexec: Use EFI_LOADER_DATA for ELF core header
  [IA64] permon use-after-free fix
  [IA64] sync compat getdents
  [IA64] always build arch/ia64/lib/xor.o
  [IA64] Remove stack hard limit on ia64
  [IA64] point saved_max_pfn to the max_pfn of the entire system
  Revert "[IA64] swiotlb abstraction (e.g. for Xen)"
2007-03-06 18:05:10 -08:00
Linus Torvalds 185d84b4e1 Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [MIPS] IP27: Build fix
  [MIPS] Wire up ioprio_set and ioprio_get.
  [MIPS] Fix __raw_read_trylock() to allow multiple readers
  [MIPS] Export __copy_user_inatomic.
  [MIPS] R2 bitops compile fix for gcc < 4.0.
  [MIPS] TX39: Remove redundant tx39_blast_icache() calls
  [MIPS] Cobalt: Fix early printk
  [MIPS] SMTC: De-obscure Malta hooks.
  [MIPS] SMTC: Add fordward declarations for mm_struct and task_struct.
  [MIPS] SMTC: <asm/mips_mt.h> must include <linux/cpumask.h>
  [MIPS] SMTC: <asm/smtc_ipi.h> must include <linux/spinlock.h>
  [MIPS] Atlas, Malta: Fix build warning.
2007-03-06 18:02:46 -08:00
Linus Torvalds cba5a641ca Merge branch 'linus' of master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa
* 'linus' of master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa:
  [ALSA] version 1.0.14rc3
  [ALSA] cmipci - Allow to disable integrated FM port
  [ALSA] hda-codec - Fix logic error in headphone mute for Conexant codecs
  [ALSA] hda-codec - Add missing Mic Boost for AD1986A codec
  [ALSA] ac97 - Add Thinkpad X31 and R40 to AD1981x blacklist
  [ALSA] Add missing sysfs device assignment for ALSA PCI drivers
  [ALSA] hda-codec - Define pin configs for MacBooks
  [ALSA] hda-codec - Add missing Mic Boost controls for ALC262
  [ALSA] soc - WM9712 PCM volume
  [ALSA] soc - Fix WM9712 register cache entry
  [ALSA] hda-codec - Add method for configuring Mac Pro without PCI SSID
  [ALSA] hda-codec - Add LFE support on Dell M90
2007-03-06 17:32:45 -08:00
Linus Torvalds 8328258e74 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
  sdhci: release irq during suspend
  sdhci: make isr tolerant of read errors
  mmc: require explicit support for high-speed
  ncpfs: make sure server connection survives a kill
2007-03-06 17:31:29 -08:00
Linus Torvalds 205c911da3 Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
  sis900 warning fixes
  mv643xx_eth: Place explicit port number in mv643xx_eth_platform_data
  pcnet32: Fix PCnet32 performance bug on non-coherent architecutres
  __devinit & __devexit cleanups for de2104x driver
  3c59x: Handle pci_enable_device() failure while resuming
  dmfe: Fix link detection
  dmfe: fix two bugs
  dmfe: trivial/spelling fixes
  revert "drivers/net/tulip/dmfe: support basic carrier detection"
  ucc_geth: returns NETDEV_TX_BUSY when BD ring is full
  ucc_geth: Fix BD processing
  natsemi: netpoll fixes
  bonding: Improve IGMP join processing
  bonding: only receive ARPs for us
  bonding: fix double dev_add_pack
2007-03-06 17:30:59 -08:00
Ralf Baechle 08253b39f8 [MIPS] Wire up ioprio_set and ioprio_get.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-07 00:07:18 +00:00
Dave Johnson d52c2d5a62 [MIPS] Fix __raw_read_trylock() to allow multiple readers
A deadlock can occur for mixed irq and non-irq rwlock readers if a 2nd
reader attempts to take lock by looping around __raw_read_trylock().

Signed-off-by: Dave Johnson <djohnson+linux-mips@sw.starentnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-07 00:07:17 +00:00
Ralf Baechle d0c91ae2bb [MIPS] Export __copy_user_inatomic.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-07 00:07:17 +00:00
Ralf Baechle b961153be9 [MIPS] R2 bitops compile fix for gcc < 4.0.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-07 00:07:17 +00:00
Ralf Baechle b3920590b5 [MIPS] SMTC: Add fordward declarations for mm_struct and task_struct.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-07 00:07:16 +00:00
Ralf Baechle 32fac80be6 [MIPS] SMTC: <asm/mips_mt.h> must include <linux/cpumask.h>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-07 00:07:15 +00:00
Ralf Baechle 22e651c6ae [MIPS] SMTC: <asm/smtc_ipi.h> must include <linux/spinlock.h>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-07 00:07:15 +00:00
Magnus Damm cee87af2a5 [IA64] kexec: Use EFI_LOADER_DATA for ELF core header
The address where the ELF core header is stored is passed to the secondary
kernel as a kernel command line option.  The memory area for this header is
also marked as a separate EFI memory descriptor on ia64.

The separate EFI memory descriptor is at the moment of the type
EFI_UNUSABLE_MEMORY.  With such a type the secondary kernel skips over the
entire memory granule (config option, 16M or 64M) when detecting memory.
If we are lucky we will just lose some memory, but if we happen to have
data in the same granule (such as an initramfs image), then this data will
never get mapped and the kernel bombs out when trying to access it.

So this is an attempt to fix this by changing the EFI memory descriptor
type into EFI_LOADER_DATA.  This type is the same type used for the kernel
data and for initramfs.  In the secondary kernel we then handle the ELF
core header data the same way as we handle the initramfs image.

This patch contains the kernel changes to make this happen.  Pretty
straightforward, we reserve the area in reserve_memory().  The address for
the area comes from the kernel command line and the size comes from the
specialized EFI parsing function vmcore_find_descriptor_size().

The kexec-tools-testing code for this can be found here:
http://lists.osdl.org/pipermail/fastboot/2007-February/005983.html

Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
Cc: Simon Horman <horms@verge.net.au>
Cc: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2007-03-06 14:50:33 -08:00
schwab@suse.de d826393cde [IA64] Remove stack hard limit on ia64
Un-Breaks pthreads, since Oct 2003.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2007-03-06 14:48:19 -08:00
Tony Luck 25667d6754 Revert "[IA64] swiotlb abstraction (e.g. for Xen)"
This reverts commit 51099005ab.
2007-03-06 13:31:45 -08:00
David S. Miller 64a146513f [NET]: Revert incorrect accept queue backlog changes.
This reverts two changes:

8488df894d
248f06726e

A backlog value of N really does mean allow "N + 1" connections
to queue to a listening socket.  This allows one to specify
"0" as the backlog and still get 1 connection.

Noticed by Gerrit Renker and Rick Jones.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-06 11:21:05 -08:00
NeilBrown cda1fd4abd [PATCH] knfsd: fix recently introduced problem with shutting down a busy NFS server
When the last thread of nfsd exits, it shuts down all related sockets.  It
currently uses svc_close_socket to do this, but that only is immediately
effective if the socket is not SK_BUSY.

If the socket is busy - i.e.  if a request has arrived that has not yet been
processes - svc_close_socket is not effective and the shutdown process spins.

So create a new svc_force_close_socket which removes the SK_BUSY flag is set
and then calls svc_close_socket.

Also change some open-codes loops in svc_destroy to use
list_for_each_entry_safe.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-06 09:30:26 -08:00
NeilBrown 5a05ed73e1 [PATCH] knfsd: remove CONFIG_IPV6 ifdefs from sunrpc server code
They don't really save that much, and aren't worth the hassle.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-06 09:30:26 -08:00
Jeff Dike 3b46e65016 [PATCH] linux/audit.h needs linux/types.h
Include linux/types.h here because we need a definition of __u32.  This file
appears not be exported verbatim by libc, so I think this doesn't have any
userspace consequences.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-06 09:30:25 -08:00
Andres Salomon d1d67174b4 [PATCH] hrtimers: hrtimer_clock_base description typo
The description for the hrtimer_clock_base struct describes "hrtimer_base".
 That should be hrtimer_clock_base.

Signed-off-by: Andres Salomon <dilinger@debian.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-06 09:30:24 -08:00
Andres Salomon 8437fdc742 [PATCH] hrtimers: fix HRTIMER_CB_IRQSAFE_NO_SOFTIRQ description
The description for HRTIMER_CB_IRQSAFE_NO_SOFTIRQ is backwards; "NO
SOFTIRQ" sounds a whole lot like it means it must not be run in a softirq.

Signed-off-by: Andres Salomon <dilinger@debian.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-06 09:30:24 -08:00
Andres Salomon 2272b0e03e [PATCH] i386: make x86_64 tsc header require i386 rather than vice-versa
Prior to commit 95492e4646 ([PATCH] x86:
rewrite SMP TSC sync code), the headers in asm-i386 did not really require
anything in include/asm-x86_64.  This means that distributions such as
fedora did not include asm-x86_64 in kernel-devel headers for i386.  Ingo's
commit changed that, and broke things.  This is easy enough to hack around
in package builds by just including asm-x86_64 on i386, but that's kind of
annoying.  If anything, x86_64 should depend upon i386, not the other way
around.

This patch changes it so that asm-x86_64/tsc.h includes asm-i386/tsc.h,
rather than vice-versa.

Signed-off-by: Andres Salomon <dilinger@debian.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-06 09:30:24 -08:00
Andrew Morton 6261d720da [PATCH] fix build with CONFIG_NO_IDLE_HZ=n
arch/i386/kernel/vmi.c: In function 'vmi_safe_halt':
arch/i386/kernel/vmi.c:262: warning: implicit declaration of function 'vmi_stop_hz_timer'
arch/i386/kernel/vmi.c:266: warning: implicit declaration of function 'vmi_account_time_restart_hz_timer'

Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Zachary Amsden <zach@vmware.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-06 09:30:24 -08:00
Jaroslav Kysela 6185af1f42 [ALSA] version 1.0.14rc3
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-03-06 14:10:08 +01:00
Pierre Ossman cd9277c011 mmc: require explicit support for high-speed
The new high-speed timings are similar to each other and the old
system, but not identical. And although things "just work" most of
the time, sometimes it does not. So we need to start marking which
hosts are known to fully comply with the new timings.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-03-06 13:26:55 +01:00
Pierre Ossman c5f93cf19d ncpfs: make sure server connection survives a kill
Use internal buffers instead of the ones supplied by the caller
so that a caller can be interrupted without having to abort the
entire ncp connection.

Signed-off-by: Pierre Ossman <ossman@cendio.se>
Acked-by: Petr Vandrovec <petr@vandrovec.name>
2007-03-06 13:26:27 +01:00
Dale Farnsworth 84dd619e4d mv643xx_eth: Place explicit port number in mv643xx_eth_platform_data
We were using the platform_device.id field to identify which ethernet
port is used for mv643xx_eth device.  This is not generally correct.
It will be incorrect, for example, if a hardware platform uses a single
port but not the first port.  Here, we add an explicit port_number field
to struct mv643xx_eth_platform_data.

This makes the mv643xx_eth_platform_data structure required, but that
isn't an issue since all users currently provide it already.

Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-03-06 06:14:54 -05:00
Jay Vosburgh a816c7c712 bonding: Improve IGMP join processing
In active-backup mode, the current bonding code duplicates IGMP
traffic to all slaves, so that switches are up to date in case of a
failover from an active to a backup interface.  If bonding then fails
back to the original active interface, it is likely that the "active
slave" switch's IGMP forwarding for the port will be out of date until
some event occurs to refresh the switch (e.g., a membership query).

	This patch alters the behavior of bonding to no longer flood
IGMP to all ports, and to issue IGMP JOINs to the newly active port at
the time of a failover.  This insures that switches are kept up to date
for all cases.

	"GOELLESCH Niels" <niels.goellesch@eurocontrol.int> originally
reported this problem, and included a patch.  His original patch was
modified by Jay Vosburgh to additionally remove the existing IGMP flood
behavior, use RCU, streamline code paths, fix trailing white space, and
adjust for style.

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-03-06 06:08:11 -05:00
Heiko Carstens 5ea732fba7 [S390] check_bugs() should be inline.
Don't have functions in header files unless they are inline.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-03-05 23:35:50 +01:00
Heiko Carstens c5dd858670 [S390] reipl: move dump_prefix_page out of text section.
Reipl doesn't work on older machines were s390_reset_machine() gets
called. The reason is that the text section is read-only but the
variable dump_prefix_page is there. Since s390_reset_machine() writes
to it we get a protection exception.
Therefore move dump_prefix_page to the bss section.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-03-05 23:35:43 +01:00
Eric Dumazet 187f5f84ef [INET]: twcal_jiffie should be unsigned long, not int
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-05 13:32:48 -08:00
Florian Zumbiehl 6f30e1867c [PPPOE]: Use ifindex instead of device pointer in key lookups.
Otherwise we can potentially try to dereference a NULL device
pointer in some cases.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-05 13:25:28 -08:00
Patrick McHardy ec68e97ded [NETFILTER]: conntrack: fix {nf,ip}_ct_iterate_cleanup endless loops
Fix {nf,ip}_ct_iterate_cleanup unconfirmed list handling:

- unconfirmed entries can not be killed manually, they are removed on
  confirmation or final destruction of the conntrack entry, which means
  we might iterate forever without making forward progress.

  This can happen in combination with the conntrack event cache, which
  holds a reference to the conntrack entry, which is only released when
  the packet makes it all the way through the stack or a different
  packet is handled.

- taking references to an unconfirmed entry and using it outside the
  locked section doesn't work, the list entries are not refcounted and
  another CPU might already be waiting to destroy the entry

What the code really wants to do is make sure the references of the hash
table to the selected conntrack entries are released, so they will be
destroyed once all references from skbs and the event cache are dropped.

Since unconfirmed entries haven't even entered the hash yet, simply mark
them as dying and skip confirmation based on that.

Reported and tested by Chuck Ebbert <cebbert@redhat.com>

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-05 13:25:18 -08:00
David S. Miller 78ad0b8408 [SPARC64]: Fix floppy build failure.
Just define a local {claim,release}_dma_lock() implementation
for the floppy driver to use so we don't need to define and
export to modules the silly dma_spin_lock.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-05 13:22:28 -08:00
Ingo Molnar 6ebf622b25 [PATCH] disable NMI watchdog by default
there's a new NMI watchdog related problem: KVM crashes on certain
bzImages because ... we enable the NMI watchdog by default (even if the
user does not ask for it) , and no other OS on this planet does that so
KVM doesnt have emulation for that yet. So KVM injects a #GP, which
crashes the Linux guest:

 general protection fault: 0000 [#1]
 PREEMPT SMP
 Modules linked in:
 CPU:    0
 EIP:    0060:[<c011a8ae>]    Not tainted VLI
 EFLAGS: 00000246   (2.6.20-rc5-rt0 #3)
 EIP is at setup_apic_nmi_watchdog+0x26d/0x3d3

and no, i did /not/ request an nmi_watchdog on the boot command line!

Solution: turn off that darn thing! It's a debug tool, not a 'make life
harder' tool!!

with this patch the KVM guest boots up just fine.

And with this my laptop (Lenovo T60) also stopped its sporadic hard
hanging (sometimes in acpi_init(), sometimes later during bootup,
sometimes much later during actual use) as well. It hung with both
nmi_watchdog=1 and nmi_watchdog=2, so it's generally the fact of NMI
injection that is causing problems, not the NMI watchdog variant, nor
any particular bootup code.

[ NMI breaks on some systems, esp in combination with SMM -Arjan ]

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-05 08:23:51 -08:00
Heiko Carstens e81ce1f7ec [PATCH] timer/hrtimer: take per cpu locks in sane order
Doing something like this on a two cpu system

  # echo 0 > /sys/devices/system/cpu/cpu0/online
  # echo 1 > /sys/devices/system/cpu/cpu0/online
  # echo 0 > /sys/devices/system/cpu/cpu1/online

will give me this:

  =======================================================
  [ INFO: possible circular locking dependency detected ]
  2.6.21-rc2-g562aa1d4-dirty #7
  -------------------------------------------------------
  bash/1282 is trying to acquire lock:
   (&cpu_base->lock_key){.+..}, at: [<000000000005f17e>] hrtimer_cpu_notify+0xc6/0x240

  but task is already holding lock:
   (&cpu_base->lock_key#2){.+..}, at: [<000000000005f174>] hrtimer_cpu_notify+0xbc/0x240

  which lock already depends on the new lock.

This happens because we have the following code in kernel/hrtimer.c:

  migrate_hrtimers(int cpu)
  [...]
  old_base = &per_cpu(hrtimer_bases, cpu);
  new_base = &get_cpu_var(hrtimer_bases);
  [...]
  spin_lock(&new_base->lock);
  spin_lock(&old_base->lock);

Which means the spinlocks are taken in an order which depends on which cpu
gets shut down from which other cpu. Therefore lockdep complains that there
might be an ABBA deadlock. Since migrate_hrtimers() gets only called on
cpu hotplug it's safe to assume that it isn't executed concurrently on a

The same problem exists in kernel/timer.c: migrate_timers().

As pointed out by Christian Borntraeger one possible solution to avoid
the locking order complaints would be to make sure that the locks are
always taken in the same order. E.g. by taking the lock of the cpu with
the lower number first.

To achieve this we introduce two new spinlock functions double_spin_lock
and double_spin_unlock which lock or unlock two locks in a given order.

Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: John Stultz <johnstul@us.ibm.com>
Cc: Christian Borntraeger <cborntra@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-05 07:57:53 -08:00
john stultz 6bb74df481 [PATCH] clocksource init adjustments (fix bug #7426)
This patch resolves the issue found here:
http://bugme.osdl.org/show_bug.cgi?id=7426

The basic summary is:
Currently we register most of i386/x86_64 clocksources at module_init
time. Then we enable clocksource selection at late_initcall time. This
causes some problems for drivers that use gettimeofday for init
calibration routines (specifically the es1968 driver in this case),
where durring module_init, the only clocksource available is the low-res
jiffies clocksource. This may cause slight calibration errors, due to
the small sampling time used.

It should be noted that drivers that require fine grained time may not
function on architectures that do not have better then jiffies
resolution timekeeping (there are a few). However, this does not
discount the reasonable need for such fine-grained timekeeping at init
time.

Thus the solution here is to register clocksources earlier (ideally when
the hardware is being initialized), and then we enable clocksource
selection at fs_initcall (before device_initcall).

This patch should probably get some testing time in -mm, since
clocksource selection is one of the most important issues for correct
timekeeping, and I've only been able to test this on a few of my own
boxes.

Signed-off-by: John Stultz <johnstul@us.ibm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-05 07:57:53 -08:00
Zachary Amsden 772205f62e [PATCH] vmi: apic ops
Use para_fill instead of directly setting the APIC ops to the result of the
vmi_get_function call - this allows one to implement a VMI ROM without
implementing APIC functions, just using the native APIC functions.

While doing this, I realized that there is a lot more cleanup that should have
been done.  Basically, we should never assume that the ROM implements a
specific set of functions, and always allow fallback to the native
implementation.

This is critical for future compatibility.

Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>
Signed-off-by: Zachary Amsden <zach@vmware.com>

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-05 07:57:52 -08:00
Zachary Amsden e30fab3ad3 [PATCH] vmi: pit override
The time_init_hook in paravirt-ops no longer functions in the correct manner
after the integration of the hrtimers code.  The problem is that now the call
path for time initialization is:

  time_init :
       late_time_init = hpet_time_init;

  late_time_init -> hpet_time_init:
       setup_pit_timer (BAD)
       do_time_init --> (via paravirt.h)
          time_init_hook --> (via arch_hooks.h)
              time_init_hook (in SUBARCH/setup.c)

If this isn't confusing enough, the paravirt case goes through an indirect
function pointer in the paravirt-ops table.  The problem is, by the time the
paravirt hook is called, the pit timer is already enabled.

But paravirt guests have their own timer, and don't want to use the PIT.
Rather than intensify the struggle for power going on here, just make it all
nice and simple and just unconditionally do all timer setup in the
late_time_init hook.  This also has the advantage of enabling timers in the
same place in all code paths, so everyone has the same bugs and we don't have
outliers who break other code because they turn on timer too early or too
late.

So the paravirt-ops time init function is now by default hpet_time_init, which
is the time init function used for native hardware.  Paravirt guests have the
chance to override this when they setup the paravirt-ops table, and should
need no change.

Signed-off-by: Zachary Amsden <zach@vmware.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-05 07:57:52 -08:00
Zachary Amsden eda08b1bef [PATCH] vmi: paravirt drop udelay op
Not respecting udelay causes problems with any virtual hardware that is passed
through to real hardware.  This can be noticed by any device that interacts
with the real world in real time - like AP startup, which takes real time.  Or
keyboard LEDs, which should blink in real-time.  Or floppy drives, but only
when passed through to a real floppy controller on OSes which can't
sufficiently buffer the floppy commands to emulate a zero latency floppy.  Or
IDE drives, when connecting to a physical CDROM.

This was mostly a hack to get the kernel to boot faster, but it introduced a
number of misvirtualization bugs, and Alan and Pavel argued pretty strongly
against it.  We were the only client, and now want to clean up this cruft.

Signed-off-by: Zachary Amsden <zach@vmware.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-05 07:57:52 -08:00
Zachary Amsden 9a1c13e91f [PATCH] vmi: fix highpte
Provide a PT map hook for HIGHPTE kernels to designate where they are mapping
page tables.  This information is required so the physical address of PTE
updates can be determined; otherwise, the mm layer would have to carry the
physical address all the way to each PTE modification callsite, which is even
more hideous that the macros required to provide the proper hooks.

So lets not mess up arch neutral code to achieve this, but keep the horror in
an #ifdef HIGHPTE in include/asm-i386/pgtable.h.  I had to use macros here
because some types are not yet defined in all the include paths for this
header.

This patch is absolutely required for HIGHPTE kernels to operate properly with
VMI.

Signed-off-by: Zachary Amsden <zach@vmware.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-05 07:57:52 -08:00
Zachary Amsden 1182d8528b [PATCH] vmi: cpu cycles fix
In order to share the common code in tsc.c which does CPU Khz calibration, we
need to make an accurate value of CPU speed available to the tsc.c code.  This
value loses a lot of precision in a VM because of the timing differences with
real hardware, but we need it to be as precise as possible so the guest can
make accurate time calculations with the cycle counters.

Signed-off-by: Zachary Amsden <zach@vmware.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-05 07:57:52 -08:00
Zachary Amsden 6cb9a8350a [PATCH] vmi: sched clock paravirt op fix
The custom_sched_clock hook is broken.  The result from sched_clock needs to
be in nanoseconds, not in CPU cycles.  The TSC is insufficient for this
purpose, because TSC is poorly defined in a virtual environment, and mostly
represents real world time instead of scheduled process time (which can be
interrupted without notice when a virtual machine is descheduled).

To make the scheduler consistent, we must expose a different nature of time,
that is scheduled time.  So deprecate this custom_sched_clock hack and turn it
into a paravirt-op, as it should have been all along.  This allows the tsc.c
code which converts cycles to nanoseconds to be shared by all paravirt-ops
backends.

It is unfortunate to add a new paravirt-op, but this is a very distinct
abstraction which is clearly different for all virtual machine
implementations, and it gets rid of an ugly indirect function which I
ashamedly admit I hacked in to try to get this to work earlier, and then even
got in the wrong units.

Signed-off-by: Zachary Amsden <zach@vmware.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-05 07:57:52 -08:00
Christoph Lameter 0dc952dc3e [PATCH] Page migration: Fix vma flag checking
Currently we do not check for vma flags if sys_move_pages is called to move
individual pages.  If sys_migrate_pages is called to move pages then we
check for vm_flags that indicate a non migratable vma but that still
includes VM_LOCKED and we can migrate mlocked pages.

Extract the vma_migratable check from mm/mempolicy.c, fix it and put it
into migrate.h so that is can be used from both locations.

Problem was spotted by Lee Schermerhorn

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-05 07:57:51 -08:00
Con Kolivas 69f7c0a1be [PATCH] sched: remove SMT nice
Remove the SMT-nice feature which idles sibling cpus on SMT cpus to
facilitiate nice working properly where cpu power is shared.  The idling of
cpus in the presence of runnable tasks is considered too fragile, easy to
break with outside code, and the complexity of managing this system if an
architecture comes along with many logical cores sharing cpu power will be
unworkable.

Remove the associated per_cpu_gain variable in sched_domains used only by
this code.

Also:

  The reason is that with dynticks enabled, this code breaks without yet
  further tweaks so dynticks brought on the rapid demise of this code.  So
  either we tweak this code or kill it off entirely.  It was Ingo's preference
  to kill it off.  Either way this needs to happen for 2.6.21 since dynticks
  has gone in.

Signed-off-by: Con Kolivas <kernel@kolivas.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-05 07:57:51 -08:00
David Brownell 49015bee40 [PATCH] gpio_keys driver shouldn't be ARM-specific
The gpio_keys driver is wrongly ARM-specific; it can't build on
other platforms with GPIO suport.  This fixes that problem.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: pHilipp Zabel <philipp.zabel@gmail.com>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Ben Nizette <ben.nizette@iinet.net.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-05 07:57:51 -08:00
Eric W. Biederman f5f2b13129 [PATCH] msi: sanely support hardware level msi disabling
In some cases when we are not using msi we need a way to ensure that the
hardware does not have an msi capability enabled.  Currently the code has been
calling disable_msi_mode to try and achieve that.  However disable_msi_mode
has several other side effects and is only available when msi support is
compiled in so it isn't really appropriate.

Instead this patch implements pci_msi_off which disables all msi and msix
capabilities unconditionally with no additional side effects.

pci_disable_device was redundantly clearing the bus master enable flag and
clearing the msi enable bit.  A device that is not allowed to perform bus
mastering operations cannot generate intx or msi interrupt messages as those
are essentially a special case of dma, and require bus mastering.  So the call
in pci_disable_device to disable msi capabilities was redundant.

quirk_pcie_pxh also called disable_msi_mode and is updated to use pci_msi_off.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Michael Ellerman <michael@ellerman.id.au>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-05 07:57:50 -08:00
Jean Delvare 58a53b246b [PATCH] io_apic.h needs apicdef.h
A -mm patch caused:

In file included from drivers/pci/quirks.c:532:
include/asm/io_apic.h:61: error: "MAX_IO_APICS" undeclared here (not in a function)

So let's include the needed header.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-05 07:57:50 -08:00
Paul Mundt 39e688a94b sh: Revert lazy dcache writeback changes.
These ended up causing too many problems on older parts,
revert for now..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-03-05 19:46:47 +09:00
Paul Mundt 87e29cacb7 sh: Use L1_CACHE_BYTES for .data.cacheline_aligned.
Previously this was using a hardcoded 32, use L1_CACHE_BYTES for
cacheline alignment instead.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-03-05 14:13:26 +09:00
Stuart Menefy 9432f96803 sh: Clear UBC when not in use.
This takes care of tearing down the UBC so it's not inadvertently
left configured at the next context switch time. Failure to do
this results in spurious SIGTRAPs in certain debug sequences.

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-03-05 14:13:25 +09:00
Linus Torvalds 20b0f65d35 Merge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6:
  ide: make legacy IDE VLB modules check for the "probe" kernel params (v2)
  ide: remove some obsoleted kernel params (v2)
  ide/pci/delkin_cb.c: pci_module_init to pci_register_driver
  scc_pata: bugfix for checking DMA IRQ status
  ide: remove a ton of pointless #undef REALLY_SLOW_IO
  siimage: DRAC4 note
  adjust legacy IDE resource setting (v2)
  ide: fix pmac breakage
  ide-cs: Update device table
  ide: ide_get_best_pio_mode() returns incorrect IORDY setting (take 2)
  piix/slc90e66: more tuneproc() fixing (take 2)
  ide: fix drive side 80c cable check, take 2
  cmd64x: fix PIO mode setup (take 3)
  alim15x3: fix PIO mode setup
2007-03-04 13:31:00 -08:00
Linus Torvalds 6d04e3b04b Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [VLAN]: Avoid a 4-order allocation.
  [HDLC] Fix dev->header_cache_update having a random value.
  [NetLabel]: Verify sensitivity level has a valid CIPSO mapping
  [PPPOE]: Key connections properly on local device.
  [AF_UNIX]: Test against sk_max_ack_backlog properly.
  [NET]: Fix bugs in "Whether sock accept queue is full" checking
2007-03-04 13:16:49 -08:00
Linus Torvalds 42270035c6 Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm: (30 commits)
  [ARM] Acorn: move the i2c bus driver into drivers/i2c
  [ARM] ARM SCSI: Don't try to dma_map_sg too many scatterlist entries
  [ARM] ARM FAS216: don't modify scsi_cmnd request_bufflen
  [ARM] rtc-pcf8583: Final fixes for this RTC on RiscPC
  [ARM] rtc-pcf8583: correct month and year offsets
  [ARM] rtc-pcf8583: don't use BCD_TO_BIN/BIN_TO_BCD
  [ARM] EBSA110: Work around build errors
  [ARM] 4241/1: Define mb() as compiler barrier on a uniprocessor system
  [ARM] 4239/1: S3C24XX: Update kconfig entries for PM
  [ARM] 4238/1: S3C24XX: docs: update suspend and resume
  [ARM] 4237/2: oprofile: Always allow backtraces on ARM
  [ARM] Yet more asm/apm-emulation.h stuff
  ARM: OMAP: Add missing get_irqnr_preamble and arch_ret_to_user for omap2
  ARM: OMAP: Use linux/delay.h not asm/delay.h
  ARM: OMAP: Remove obsolete alsa typedefs
  ARM: OMAP: omap1510->15xx conversions needed for sx1
  ARM: OMAP: Add missing includes to board-nokia770
  ARM: OMAP: Workqueue changes for board-h4.c
  ARM: OMAP: dmtimer.c omap1 register fix
  ARM: OMAP: board-nokia770: correct lcd name
  ...
2007-03-04 13:15:48 -08:00
Linus Torvalds 2c89a8d09f Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [MIPS] MTX1: clear PCI errors
  [MIPS] MTX1: add idsel cardbus ressources
  [MIPS] MTX1: remove unneeded settings
  [MIPS] dma_sync_sg_for_cpu is a no-op except for non-coherent R10000s.
  [MIPS] Cobalt: update reserved resources
  [MIPS] SN: PCI fixup needs to include <irq.h>.
  [MIPS] DMA: Fix a bunch of warnings due to missing inline keywords.
  [MIPS] RM: It should be #ifdef CONFIG_FOO not #if CONFIG_FOO ...
  [MIPS] Fix and cleanup the mess that a dozen prom_printf variants are.
  [MIPS] DEC: Remove redeclarations of mips_machgroup and mips_machtype.
  [MIPS] No need to write c0_compare in plat_timer_setup
  [MIPS] Convert to RTC-class ds1742 driver
  [MIPS] Oprofile: Add missing break statements.
  [MIPS] jmr3927: build fix
  [MIPS] SNI: Fix mc146818_decode_year
  [MIPS] Replace sys32_timer_create with the generic compat_sys_timer_create.
  [MIPS] Replace sys32_socketcall with the generic compat_sys_socketcall.
  [MIPS] N32 waitid is the same as o32.
2007-03-04 13:15:00 -08:00
Ralf Baechle a9b6590ced [MIPS] DMA: Fix a bunch of warnings due to missing inline keywords.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-04 19:02:39 +00:00
Ralf Baechle 07c0d7437c [MIPS] RM: It should be #ifdef CONFIG_FOO not #if CONFIG_FOO ...
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-04 19:02:38 +00:00
Ralf Baechle 36a885306f [MIPS] Fix and cleanup the mess that a dozen prom_printf variants are.
early_printk is a so much saner thing.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-04 19:02:37 +00:00
Atsushi Nemoto a0574e0480 [MIPS] Convert to RTC-class ds1742 driver
The generic rtc-ds1742 driver can be used for RBTX4927 and JMR3927
(with __swizzle_addr trick).  This patch also removes MIPS local
DS1742 stuff.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-04 19:02:34 +00:00
Thomas Bogendoerfer 49fa3c0869 [MIPS] SNI: Fix mc146818_decode_year
Big endian RMs uses a different mc146818_decode_year than little endian RMs
Correct mc146818_decode_year for years before 2000

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-04 19:02:31 +00:00
Andrew Morton e9cdb1e330 KVM: Move kvmfs magic number to <linux/magic.h>
Use the standard magic.h for kvmfs.

Cc: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Avi Kivity <avi@qumranet.com>
2007-03-04 11:12:43 +02:00
Avi Kivity f7e6a45ad9 KVM: Bump API version
Signed-off-by: Avi Kivity <avi@qumranet.com>
2007-03-04 11:12:42 +02:00
Avi Kivity bccf2150fe KVM: Per-vcpu inodes
Allocate a distinct inode for every vcpu in a VM.  This has the following
benefits:

 - the filp cachelines are no longer bounced when f_count is incremented on
   every ioctl()
 - the API and internal code are distinctly clearer; for example, on the
   KVM_GET_REGS ioctl, there is no need to copy the vcpu number from
   userspace and then copy the registers back; the vcpu identity is derived
   from the fd used to make the call

Right now the performance benefits are completely theoretical since (a) we
don't support more than one vcpu per VM and (b) virtualization hardware
inefficiencies completely everwhelm any cacheline bouncing effects.  But
both of these will change, and we need to prepare the API today.

Signed-off-by: Avi Kivity <avi@qumranet.com>
2007-03-04 11:12:42 +02:00
Avi Kivity f17abe9a44 KVM: Create an inode per virtual machine
This avoids having filp->f_op and the corresponding inode->i_fop different,
which is a little unorthodox.

The ioctl list is split into two: global kvm ioctls and per-vm ioctls.  A new
ioctl, KVM_CREATE_VM, is used to create VMs and return the VM fd.

Signed-off-by: Avi Kivity <avi@qumranet.com>
2007-03-04 11:12:42 +02:00
Ingo Molnar c21415e843 KVM: Add host hypercall support for vmx
Signed-off-by: Avi Kivity <avi@qumranet.com>
2007-03-04 11:12:40 +02:00
Ingo Molnar 102d8325a1 KVM: add MSR based hypercall API
This adds a special MSR based hypercall API to KVM. This is to be
used by paravirtual kernels and virtual drivers.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Avi Kivity <avi@qumranet.com>
2007-03-04 11:12:40 +02:00
Sergei Shtylyov 81d368e0e2 ide: ide_get_best_pio_mode() returns incorrect IORDY setting (take 2)
The function ide_get_best_pio_mode() fails to return the correct IORDY setting
for the explicitly specified modes -- fix this along with the heading comment,
and also remove the long commented out code.

Also, while at it, correct the misliading comment about the PIO cycle time in
<linux/ide.h> -- it actually consists of only the active and recovery periods,
with only some chips also including the address setup time into equation...

[ bart: sl82c105 seems to be currently the only driver affected by this fix ]

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-03-03 17:48:53 +01:00
Dan Aloni 5c15bdec5c [VLAN]: Avoid a 4-order allocation.
This patch splits the vlan_group struct into a multi-allocated struct. On
x86_64, the size of the original struct is a little more than 32KB, causing
a 4-order allocation, which is prune to problems caused by buddy-system
external fragmentation conditions.

I couldn't just use vmalloc() because vfree() cannot be called in the
softirq context of the RCU callback.

Signed-off-by: Dan Aloni <da-x@monatomic.org>
Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-02 20:44:51 -08:00
Wei Dong 8488df894d [NET]: Fix bugs in "Whether sock accept queue is full" checking
when I use linux TCP socket, and find there is a bug in function
sk_acceptq_is_full().

	When a new SYN comes, TCP module first checks its validation. If valid,
send SYN,ACK to the client and add the sock to the syn hash table. Next
time if received the valid ACK for SYN,ACK from the client. server will
accept this connection and increase the sk->sk_ack_backlog -- which is
done in function tcp_check_req().We check wether acceptq is full in
function tcp_v4_syn_recv_sock().

Consider an example:

 After listen(sockfd, 1) system call, sk->sk_max_ack_backlog is set to
1. As we know, sk->sk_ack_backlog is initialized to 0. Assuming accept()
system call is not invoked now.

1. 1st connection comes. invoke sk_acceptq_is_full(). sk-
>sk_ack_backlog=0 sk->sk_max_ack_backlog=1, function return 0 accept
this connection. Increase the sk->sk_ack_backlog
2. 2nd connection comes. invoke sk_acceptq_is_full(). sk-
>sk_ack_backlog=1 sk->sk_max_ack_backlog=1, function return 0 accept
this connection. Increase the sk->sk_ack_backlog
3. 3rd connection comes. invoke sk_acceptq_is_full(). sk-
>sk_ack_backlog=2 sk->sk_max_ack_backlog=1, function return 1. Refuse
this connection.

I think it has bugs. after listen system call. sk->sk_max_ack_backlog=1
but now it can accept 2 connections.

Signed-off-by: Wei Dong <weid@np.css.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-02 20:37:33 -08:00
Linus Torvalds bb648a0d22 Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  libata: add CONFIG_PM to libata core layer
  libata: add missing CONFIG_PM in LLDs
  libata: add missing PM callbacks
  pata_qdi: Fix initialisation
  [libata] pata_cmd64x: fix driver description in comments
  [libata] pata_{legacy,sc1200,sl82c105}: add missing hooks
  [libata] change master/slave IDENTIFY order
  libata-core: Fix simplex handling
2007-03-02 17:58:52 -08:00
Dale Farnsworth 5ada386bad mv643xx_eth: move mac_addr inside mv643xx_eth_platform_data
The information contained within platform_data should be self-contained.
Replace the pointer to a MAC address with the actual MAC address in
struct mv643xx_eth_platform_data.

Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-03-02 20:16:10 -05:00
Tejun Heo 6ffa01d88c libata: add CONFIG_PM to libata core layer
Conditionalize all PM related stuff in libata core layer using
CONFIG_PM.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-03-02 18:30:35 -05:00
David S. Miller c4c31fe0e2 [SPARC]: Provide 'get_property()' alias for of_get_property().
Another powerpc compatibility item, this will allow us to share
more code with them.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-02 15:22:53 -08:00
David S. Miller f6d0f9ea55 [SPARC]: Provide pci_device_to_OF_node() just like powerpc.
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-02 15:22:51 -08:00
Alan 032af1ce16 libata-core: Fix simplex handling
The initial simplex handling code is fooled if you suspend and resume.
This also causes problems with some single channel controllers which
claim to be simplex.

The fix is fairly simple, instead of keeping a flag to remember if we
gave away the simplex channel we remember the actual owner. As the owner
is always part of the host_set we don't even need a refcount.

Knowing the owner also means we can reassign simplex DMA channels in
future hotplug code etc if we need to

Signed-off-by: Alan Cox <alan@redhat.com>
(and a signed-off for the patch I sent before while I remember)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-03-02 17:42:48 -05:00
Russell King 6139dbbb77 Merge branch 'omap-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 2007-03-02 12:04:16 +00:00
Catalin Marinas 9623b3732d [ARM] 4241/1: Define mb() as compiler barrier on a uniprocessor system
Currently, the mb() is defined as a DMB operation on ARMv6, even for
UP systems. This patch defines mb() as a compiler barrier only. For
the SMP case, the smp_* variants should be used anyway and the patch
defines them as DMB.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-03-02 11:59:00 +00:00
Tony Lindgren 1f4d177413 ARM: OMAP: Add missing get_irqnr_preamble and arch_ret_to_user for omap2
Only entries for omap1 were added earlier.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2007-03-02 01:47:13 -08:00
Tony Lindgren 2f4ff76499 ARM: OMAP: Remove obsolete alsa typedefs
Remove obsolete alsa typedefs

Signed-off-by: Tony Lindgren <tony@atomide.com>
2007-03-02 01:47:12 -08:00
Vladimir Ananiev 99c658a6c0 ARM: OMAP: omap1510->15xx conversions needed for sx1
Convert 1510->15xx in generic omap code, so that sx1 can work.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2007-03-02 01:47:12 -08:00
Linus Torvalds b4350861dd Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jikos/hid
* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jikos/hid:
  HID: fix Logitech DiNovo Edge touchwheel and Logic3 /SpectraVideo middle button
  HID: add git tree information to MAINTAINERS
  HID: fix broken Logitech S510 keyboard report descriptor; make extra keys work
  HID: fix possible double-free on error path in hid parser
  HID: hid-debug.c should #include <linux/hid-debug.h>
  HID: fix bug in zeroing the last field byte in output reports
  USB HID: use CONFIG_HID_DEBUG for outputting report descriptor
  USB HID: Fix USB vendor and product IDs endianness for USB HID devices
2007-03-01 17:30:51 -08:00
Linus Torvalds 132a69c6cc Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: Fix parport_pc build.
  [SPARC64]: Update defconfig.
2007-03-01 17:28:31 -08:00
Linus Torvalds fb7d404566 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [TCP]: Fix minisock tcp_create_openreq_child() typo.
  [TCP]: Document several sysctls.
  [NET]: Fix kfree(skb)
  [NET]: Handle disabled preemption in gfp_any()
  [BRIDGE]: Fix locking of set path cost.
  [IPV6]: /proc/net/anycast6 unbalanced inet6_dev refcnt
  [IPX]: Remove ancient changelog
  [IPX]: Remove outdated information from Kconfig
  [NET]: Revert socket.h/stat.h ifdef hacks.
  [IPV6]: anycast refcnt fix
  [XFRM] xfrm_user: Fix return values of xfrm_add_sa_expire.
2007-03-01 17:27:01 -08:00
Linus Torvalds 100b425480 Merge master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb:
  V4L/DVB (5305): Mark VIDIOC_DBG_S/G_REGISTER as experimental
  V4L/DVB (5271): Add VIDIOC_TRY_ENCODER_CMD and VIDIOC_ENCODER_CMD ioctls.
  V4L/DVB (5270): Add VIDIOC_G_ENC_INDEX ioctl
  V4L/DVB (5276): Cxusb: fix firmware patch for big endian systems
  V4L/DVB (5258): Cafe_ccic: fix compiler warning
  V4L/DVB (5295): Digitv: open nxt6000 i2c_gate for TDED4 tuner handling
  V4L/DVB (5304): Improve chip matching in v4l2_register
  V4L/DVB (5255): Fix cx25840 firmware loading.
2007-03-01 17:25:23 -08:00
Ralf Baechle d701d8a3bc [PATCH] Fix sysfs build breakage if !CONFIG_SYSFS
B0rkage introduced by dfa87c824a.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-01 17:22:04 -08:00
Adam Litke 516dffdcd8 [PATCH] Fix get_unmapped_area and fsync for hugetlb shm segments
This patch provides the following hugetlb-related fixes to the recent stacked
shm files changes:
 - Update is_file_hugepages() so it will reconize hugetlb shm segments.
 - get_unmapped_area must be called with the nested file struct to handle
   the sfd->file->f_ops->get_unmapped_area == NULL case.
 - The fsync f_op must be wrapped since it is specified in the hugetlbfs
   f_ops.

This is based on proposed fixes from Eric Biederman that were debugged and
tested by me.  Without it, attempting to use hugetlb shared memory segments
on powerpc (and likely ia64) will kill your box.

Signed-off-by: Adam Litke <agl@us.ibm.com>
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Acked-by: William Irwin <bill.irwin@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-01 17:18:39 -08:00
Karsten Keil 17f0cd2f35 [PATCH] Fix buffer overflow and races in capi debug functions
The CAPI trace debug functions were using a fixed size buffer, which can be
overflowed if wrong formatted CAPI messages were sent to the kernel capi
layer.  The code was also not protected against multiple callers.  This fix
bug 8028.

Additionally the patch make the CAPI trace functions optional.

Signed-off-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-01 14:53:39 -08:00
Jeff Dike 1463fdbcc7 [PATCH] uml: pte_mkread fix
Fix the fact that pte_mkread set _PAGE_RW instead of _PAGE_USER (the logic is
copied from i386 in most place, so it is really as bad as you're thinking).

Thus currently page tables are more permissive than they should.

Such a change may trigger other latent bugs, so be careful with this.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-01 14:53:38 -08:00
David Howells 77904fd64e [PATCH] FRV: Missing error defs
linux/irq.h uses EINVAL but does not #include linux/errno.h.  This results in
the compiler spitting out errors on some files.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-01 14:53:38 -08:00
Andrew Morton 232ea4d69d [PATCH] throttle_vm_writeout(): don't loop on GFP_NOFS and GFP_NOIO allocations
throttle_vm_writeout() is designed to wait for the dirty levels to subside.
But if the caller holds IO or FS locks, we might be holding up that writeout.

So change it to take a single nap to give other devices a chance to clean some
memory, then return.

Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-01 14:53:38 -08:00
Nick Piggin 5409bae07a [PATCH] Rename PG_checked to PG_owner_priv_1
Rename PG_checked to PG_owner_priv_1 to reflect its availablilty as a
private flag for use by the owner/allocator of the page.  In the case of
pagecache pages (which might be considered to be owned by the mm),
filesystems may use the flag.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-01 14:53:37 -08:00
Randy Dunlap 05fb6bf0b2 [PATCH] kernel-doc fixes for 2.6.20-git15 (non-drivers)
Fix kernel-doc warnings in 2.6.20-git15 (lib/, mm/, kernel/, include/).

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-01 14:53:37 -08:00
David Howells 28936117af [PATCH] FRV: Add some missng lazy MMU hooks for NOMMU mode
Add some missing lazy MMU hooks for NOMMU mode.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-01 14:53:36 -08:00
Adrian Bunk 9b83a6a852 [PATCH] mm/{,tiny-}shmem.c cleanups
shmem_{nopage,mmap} are no longer used in ipc/shm.c

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-01 14:53:35 -08:00
Hans Verkuil f3502b8a19 V4L/DVB (5305): Mark VIDIOC_DBG_S/G_REGISTER as experimental
Move VIDIOC_DBG_S/G_REGISTER from the internal ioctl list to the
public ioctls, but mark it as experimental for now.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-03-01 13:09:46 -02:00
Hans Verkuil ada6ecd2bf V4L/DVB (5271): Add VIDIOC_TRY_ENCODER_CMD and VIDIOC_ENCODER_CMD ioctls.
Add support for starting, stopping, pausing and resuming an MPEG (or similar
compressed stream) encoder.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-03-01 13:09:46 -02:00
Hans Verkuil db6eb5b334 V4L/DVB (5270): Add VIDIOC_G_ENC_INDEX ioctl
The VIDIOC_G_ENC_INDEX ioctl can obtain the MPEG index from an MPEG
encoder.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-03-01 13:09:46 -02:00
Hans Verkuil f3d092b84a V4L/DVB (5304): Improve chip matching in v4l2_register
The chip matching in struct v4l2_register for VIDIOC_DBG_G/S_REGISTER 
was rather primitive. It could not be extended to other busses besides 
i2c and it lacked a way to.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-03-01 13:09:44 -02:00
Jiri Kosina 25914662b7 HID: fix Logitech DiNovo Edge touchwheel and Logic3 /SpectraVideo middle button
Dongle shipped with Logitech DiNovo Edge (0x046d/0xc714) behaves in a weird
non-standard way - it contains multiple reports with the same usage, which
results in remapping of GenericDesktop.X and GenericDesktop.Y usages to
GenericDesktop.Z and GenericDesktop.RX respectively, thus rendering the
touchwheel unusable.

The commit 3506897691 solved this
in a way that it didn't remap certain usages. This however breaks
(at least) middle button of Logic3 / SpectraVideo (0x1267/0x0210),
which in contrary requires the remapping.

To make both of the harware work, allow remapping of these usages again,
and introduce a quirk for Logitech DiNovo Edge "touchwheel" instead - we
disable remapping for key, abs and rel events only for this hardware.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-03-01 09:54:44 +01:00
Jiri Kosina b55fd23ccd HID: fix broken Logitech S510 keyboard report descriptor; make extra keys work
This patch makes extra keys (F1-F12 in special mode, zooming, rotate, shuffle)
on Logitech S510 keyboard work.

Logitech S510 keyboard sends in report no. 3 keys which are far above the
logical maximum described in descriptor for given report.

This patch introduces a HID quirk for this wireless USB receiver/keyboard
in order to fix the report descriptor before it's being parsed - the logical
maximum and the number of usages is bumped up to 0x104d). The values are in the
"Reserved" area of consumer HUT, so HID_MAX_USAGE had to be changed too.

In addition to proper extracting of  the values from report descriptor, proper
HID-input mapping is introduced for them.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-03-01 09:52:45 +01:00
David S. Miller 74bd7d093b [SPARC64]: Fix parport_pc build.
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-02-28 13:09:34 -08:00
Patrick McHardy 4498121ca3 [NET]: Handle disabled preemption in gfp_any()
ctnetlink uses netlink_unicast from an atomic_notifier_chain
(which is called within a RCU read side critical section)
without holding further locks. netlink_unicast calls netlink_trim
with the result of gfp_any() for the gfp flags, which are passed
down to pskb_expand_header. gfp_any() only checks for softirq
context and returns GFP_KERNEL, resulting in this warning:

BUG: sleeping function called from invalid context at mm/slab.c:3032
in_atomic():1, irqs_disabled():0
no locks held by rmmod/7010.

Call Trace:
 [<ffffffff8109467f>] debug_show_held_locks+0x9/0xb
 [<ffffffff8100b0b4>] __might_sleep+0xd9/0xdb
 [<ffffffff810b5082>] __kmalloc+0x68/0x110
 [<ffffffff811ba8f2>] pskb_expand_head+0x4d/0x13b
 [<ffffffff81053147>] netlink_broadcast+0xa5/0x2e0
 [<ffffffff881cd1d7>] :nfnetlink:nfnetlink_send+0x83/0x8a
 [<ffffffff8834f6a6>] :nf_conntrack_netlink:ctnetlink_conntrack_event+0x94c/0x96a
 [<ffffffff810624d6>] notifier_call_chain+0x29/0x3e
 [<ffffffff8106251d>] atomic_notifier_call_chain+0x32/0x60
 [<ffffffff881d266d>] :nf_conntrack:destroy_conntrack+0xa5/0x1d3
 [<ffffffff881d194e>] :nf_conntrack:nf_ct_cleanup+0x8c/0x12c
 [<ffffffff881d4614>] :nf_conntrack:kill_l3proto+0x0/0x13
 [<ffffffff881d482a>] :nf_conntrack:nf_conntrack_l3proto_unregister+0x90/0x94
 [<ffffffff883551b3>] :nf_conntrack_ipv4:nf_conntrack_l3proto_ipv4_fini+0x2b/0x5d
 [<ffffffff8109d44f>] sys_delete_module+0x1b5/0x1e6
 [<ffffffff8105f245>] trace_hardirqs_on_thunk+0x35/0x37
 [<ffffffff8105911e>] system_call+0x7e/0x83

Since netlink_unicast is supposed to be callable from within RCU
read side critical sections, make gfp_any() check for in_atomic()
instead of in_softirq().

Additionally nfnetlink_send needs to use gfp_any() as well for the
call to netlink_broadcast).

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-02-28 09:42:13 -08:00
David S. Miller 304c209c9b [NET]: Revert socket.h/stat.h ifdef hacks.
This reverts 57a87bb072.

As H. Peter Anvin states, this change broke klibc and it's
not very easy to fix things up without duplicating everything
into userspace.

In the longer term we should have a better solution to this
problem, but for now let's unbreak things.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-02-28 09:41:59 -08:00
Robert P. J. Day 40139bd459 [MIPS] Remove unreferenced _IOC_SLMASK macro in ioctl.h.
Delete the definition of the apparently unreferenced macro _IOC_SLMASK.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-26 23:06:06 +00:00
Thomas Bogendoerfer f13cc01d8d [MIPS] SNI: MIPS_CPU_IRQ_BASE cleanup
Use MIPS_CPU_IRQ_BASE instead of own define.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-26 23:06:06 +00:00
Linus Torvalds 6f366c1c75 Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev: (51 commits)
  [libata] bump versions
  [libata] Trim trailing whitespace.
  [libata] sata_mv: Fix 50xx irq mask
  [libata] sata_mv: don't touch reserved bits in EDMA config register
  libata: Use new id_to_dma_mode function to tidy reporting in more drivers (minimally tested)
  pata_pcmcia: Fix oops in 2.6.21-rc1
  Add id_to_dma_mode function for printing DMA modes
  sata_promise: simplify port setup
  sata_promise: fix 20619 new EH merge error
  [libata] ACPI: remove needless ->qc_issue hook existence test
  sata_vsc: refactor vsc_sata_interrupt and hook up error handling
  sata_sil: ignore and clear spurious IRQs while executing commands by polling
  sata_mv: fix pci_enable_msi() error handling
  pata_amd: fix an obvious bug in cable detection
  [libata] ata_piix: remove duplicate PCI IDs
  sata_nv: complain on spurious completion notifiers
  libata: test major version in ata_id_is_sata()
  sata_nv: kill old private BMDMA helper functions
  libata: fix remaining ap->id
  ahci: consider SDB FIS containing spurious NCQ completions HSM violation (regenerated)
  ...
2007-02-26 14:58:03 -08:00
Linus Torvalds 221dee285e Revert "[CPUFREQ] constify cpufreq_driver where possible."
This reverts commit aeeddc1435, which was
half-baked and broken.  It just resulted in compile errors, since
cpufreq_register_driver() still changes the 'driver_data' by setting
bits in the flags field.  So claiming it is 'const' _really_ doesn't
work.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-26 14:55:48 -08:00
Linus Torvalds 6f8c480f99 Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq
* master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq:
  [CPUFREQ] constify some data tables.
  [CPUFREQ] constify cpufreq_driver where possible.
  {rd,wr}msr_on_cpu SMP=n optimization
  [CPUFREQ] cpufreq_ondemand.c: don't use _WORK_NAR
  rdmsr_on_cpu, wrmsr_on_cpu
  [CPUFREQ] Revert default on deprecated config X86_SPEEDSTEP_CENTRINO_ACPI
2007-02-26 14:17:50 -08:00
Linus Torvalds 038c068f63 Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] CLPS7500 doesn't have IO ports
  [ARM] Fix more apm-emulation.h
  [ARM] 4234/1: Introduce get_irqnr_preamble and arch_ret_to_user for ns9xxx.
  [ARM] 4233/1: nand/s3c2410.c: warning fix
  [ARM] 4226/1: initial .data and .bss mappings of XIP kernel should be TEXT_OFFSET
  [ARM] 4224/2: allow XIP kernel to boot again
  [ARM] 4232/1: AT91: Generic GPIO bug
  [ARM] 4231/1: AT91: Merge and typo fixes.
  [ARM] 4229/1: S3C2410: Add MACH_QT2410 to s3c2410_defconfig
  [ARM] 4228/2: S3C24XX: update s3c2410_defconfig for 2.6.21-rc1
2007-02-26 13:19:17 -08:00
Linus Torvalds b0138a6cb7 Merge master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6: (78 commits)
  [PARISC] Use symbolic last syscall in __NR_Linux_syscalls
  [PARISC] Add missing statfs64 and fstatfs64 syscalls
  Revert "[PARISC] Optimize TLB flush on SMP systems"
  [PARISC] Compat signal fixes for 64-bit parisc
  [PARISC] Reorder syscalls to match unistd.h
  Revert "[PATCH] make kernel/signal.c:kill_proc_info() static"
  [PARISC] fix sys_rt_sigqueueinfo
  [PARISC] fix section mismatch warnings in harmony sound driver
  [PARISC] do not export get_register/set_register
  [PARISC] add ENTRY()/ENDPROC() and simplify assembly of HP/UX emulation code
  [PARISC] convert to use CONFIG_64BIT instead of __LP64__
  [PARISC] use CONFIG_64BIT instead of __LP64__
  [PARISC] add ASM_EXCEPTIONTABLE_ENTRY() macro
  [PARISC] more ENTRY(), ENDPROC(), END() conversions
  [PARISC] fix ENTRY() and ENDPROC() for 64bit-parisc
  [PARISC] Fixes /proc/cpuinfo cache output on B160L
  [PARISC] implement standard ENTRY(), END() and ENDPROC()
  [PARISC] kill ENTRY_SYS_CPUS
  [PARISC] clean up debugging printks in smp.c
  [PARISC] factor syscall_restart code out of do_signal
  ...

Fix conflict in include/linux/sched.h due to kill_proc_info() being made
publicly available to PARISC again.
2007-02-26 12:48:06 -08:00
Linus Torvalds 5d5dde2ed9 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (25 commits)
  [XFRM]: Fix oops in xfrm4_dst_destroy()
  [XFRM_TUNNEL]: Reload header pointer after pskb_may_pull/pskb_expand_head
  [IPV4]: Use random32() in net/ipv4/multipath
  [BRIDGE]: eliminate workqueue for carrier check
  [BRIDGE]: get rid of miscdevice include
  [IPV6]: Fix __ipv6_addr_type() export in correct place.
  [IPV4] devinet: Register inetdev earlier.
  [IPV6] ADDRCONF: Register inet6_dev earlier.
  [IPV6] ADDRCONF: Manage prefix route corresponding to address manually added.
  [IPV6] IP6TUNNEL: Use update_pmtu() of dst on xmit.
  [IPV6] ADDRCONF: Statically link __ipv6_addr_type() for sunrpc subsystem.
  [IPV4]: Correct links in net/ipv4/Kconfig
  [SCTP]: Strike the transport before updating rto.
  [SCTP]: Fix connection hang/slowdown with PR-SCTP
  [TCP]: Fix MD5 signature pool locking.
  [TG3]: TSO workaround fixes.
  [AF_PACKET]: Remove unnecessary casts.
  [IPV6]: Adjust inet6_exit() cleanup sequence against inet6_init()
  [IPSEC]: More fix is needed for __xfrm6_bundle_create().
  [IRDA] net/irda/: proper prototypes
  ...
2007-02-26 12:23:08 -08:00
Adrian Bunk a39a21982c [IRDA] net/irda/: proper prototypes
This patch adds proper prototypes for some functions in
include/net/irda/irda.h

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-02-26 11:42:43 -08:00
Linus Torvalds a7538a7f87 Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6:
  Revert "Driver core: let request_module() send a /sys/modules/kmod/-uevent"
  Driver core: fix error by cleanup up symlinks properly
  make kernel/kmod.c:kmod_mk static
  power management: fix struct layout and docs
  power management: no valid states w/o pm_ops
  Driver core: more fallout from class_device changes for pcmcia
  sysfs: move struct sysfs_dirent to private header
  driver core: refcounting fix
  Driver core: remove class_device_rename
2007-02-26 11:41:30 -08:00
Linus Torvalds 92320cec61 Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  USB: export autosuspend delay in sysfs
  sysfs: allow attributes to be added to groups
  USB: make autosuspend delay a module parameter
  USB: minor cleanups for sysfs.c
  USB: add a blacklist for devices that can't handle some things we throw at them.
  USB: refactor usb device matching and create usb_device_match
  USB: Wacom driver updates
  gadgetfs: Fixed bug in ep_aio_read_retry.
  USB: Use USB defines in usbmouse.c and usbkbd.c
  USB: add rationale on why usb descriptor structures have to be packed
  USB: ftdi_sio: Adding VID and PID for Tellstick
  UHCI: Eliminate asynchronous skeleton Queue Headers
  UHCI: Add macros for computing DMA values
  USB: Davicom DM9601 usbnet driver
  USB: asix.c - Add JVC-PRX1 ids
  usbmon: Remove erroneous __exit
  USB: add driver for iowarrior devices.
  USB: option: add a bunch of new device ids
  USB: option: remove duplicate device id table
2007-02-26 11:41:08 -08:00
Linus Torvalds 63ae0e5be3 Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [MIPS] Fix port 0 mac address for mips mv6434x platforms
  [SERIAL] serial_txx9 driver update
  Revert "[PATCH] Generic ioremap_page_range: mips conversion"
  [MIPS] Cobalt: Rename "Colo" MTD partition to "firmware".
  [MIPS] SMP: Get smp_tune_scheduling to do something useful.
  [MIPS] Add basic SMARTMIPS ASE support
2007-02-26 11:40:46 -08:00
Eric W. Biederman 610142927b [PATCH] x86_64 irq: Safely cleanup an irq after moving it.
The problem:  After moving an interrupt when is it safe to teardown
the data structures for receiving the interrupt at the old location?

With a normal pci device it is possible to issue a read to a device
to flush all posted writes.  This does not work for the oldest ioapics
because they are on a 3-wire apic bus which is a completely different
data path.  For some more modern ioapics when everything is using
front side bus delivery you can flush interrupts by simply issuing a
read to the ioapic.  For other modern ioapics emperical testing has
shown that this does not work.

So it appears the only reliable way to know the last of the irqs from an
ioapic have been received from before the ioapic was reprogrammed is to
received the first irq from the ioapic from after it was reprogrammed.

Once we know the last irq message has been received from an ioapic
into a local apic we then need to know that irq message has been
processed through the local apics.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-26 10:34:08 -08:00
Eric W. Biederman bc5e81a151 [PATCH] x86_64 irq: Add constants for the reserved IRQ vectors.
For the ISA irqs we reserve 16 vectors.  This patch adds constants for
those vectors and modifies the code to use them.  Making the code a
little clearer and making it possible to move these vectors in the future.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-26 10:34:08 -08:00
Eric W. Biederman 9f0a5ba550 [PATCH] irq: Remove set_native_irq_info
This patch replaces all instances of "set_native_irq_info(irq, mask)"
with "irq_desc[irq].affinity = mask".  The latter form is clearer
uses fewer abstractions, and makes access to this field uniform
accross different architectures.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-26 10:34:07 -08:00
Linus Torvalds ea3d5226f5 Revert "[PATCH] i386: add idle notifier"
This reverts commit 2ff2d3d747.

Uwe Bugla reports that he cannot mount a floppy drive any more, and Jiri
Slaby bisected it down to this commit.

Benjamin LaHaise also points out that this is a big hot-path, and that
interrupt delivery while idle is very common and should not go through
all these expensive gyrations.

Fix up conflicts in arch/i386/kernel/apic.c and arch/i386/kernel/irq.c
due to other unrelated irq changes.

Cc: Stephane Eranian <eranian@hpl.hp.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Andrew Morton <akpm@osdl.org>
Cc: Uwe Bugla <uwe.bugla@gmx.de>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-26 09:21:46 -08:00
Alan 10305f0f8e Add id_to_dma_mode function for printing DMA modes
Also export dev_disable as this is needed by drivers doing slave decode
filtering, which will follow shortly

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-25 15:41:40 -05:00
Uwe Kleine-König 8748415d0d [ARM] 4234/1: Introduce get_irqnr_preamble and arch_ret_to_user for ns9xxx.
This is a follow up for f80dff9da0 which
didn't include adaption for the new ns9xxx machine support.

Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-02-25 16:41:43 +00:00
Alan Stern dfa87c824a sysfs: allow attributes to be added to groups
This patch (as860) adds two new sysfs routines:
sysfs_add_file_to_group() and sysfs_remove_file_from_group().
A later patch adds code that uses the new routines.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Maneesh Soni <maneesh@in.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-23 15:03:46 -08:00
Alan Stern b5e795f8df USB: make autosuspend delay a module parameter
This patch (as859) makes the default USB autosuspend delay a module
parameter of usbcore.  By setting the delay value at boot time, users
will be able to prevent the system from autosuspending devices which
for some reason can't handle it.

The patch also stores the autosuspend delay as a per-device value.  A
later patch will allow the user to change the value, tailoring the
delay for each individual device.  A delay value of 0 will prevent
autosuspend.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-23 15:03:46 -08:00
Oliver Neukum 7ceec1f1d2 USB: add a blacklist for devices that can't handle some things we throw at them.
This adds a blacklist to the USB core to handle some autosuspend and
string issues that devices have.

Originally written by Oliver, but hacked up a lot by Greg.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-23 15:03:46 -08:00
Inaky Perez-Gonzalez 672027a357 USB: add rationale on why usb descriptor structures have to be packed
Add argumentation in defense of using __attribute__((packed)) in USB
descriptors authored by Dave Brownell. Necessary as in some cases it
seems superfluous.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-23 15:03:46 -08:00
Greg Kroah-Hartman 946b960d13 USB: add driver for iowarrior devices.
The ioctl is commented out for now, until we verify some userspace
application issues.

Cc: Christian Lucht <lucht@codemercs.com>
Cc: Robert Marquardt <marquardt@codemercs.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-23 15:03:45 -08:00
Greg Kroah-Hartman dfff0a0671 Revert "Driver core: let request_module() send a /sys/modules/kmod/-uevent"
This reverts commit c353c3fb07.

It turns out that we end up with a loop trying to load the unix
module and calling netfilter to do that.  Will redo the patch
later to not have this loop.

Acked-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-23 14:54:57 -08:00
Johannes Berg 2a9df49451 power management: fix struct layout and docs
Because the pm ops in powermac are obviously not using them as intended, I
added documentation for it in kernel-doc format.

Reordering the fields in struct pm_ops not only makes the output of kernel-doc
make more sense but also removes a hole from the structure on 64-bit
platforms.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: "Randy.Dunlap" <rdunlap@xenotime.net>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Pavel Macheck <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-23 14:52:09 -08:00
Adam J. Richter d56c3eae67 sysfs: move struct sysfs_dirent to private header
struct sysfs_dirent is private to the fs/sysfs/ subtree.  It is
not even referenced as an opaque structure outside of that subtree.

The following patch moves the declaration from include/linux/sysfs.h to
fs/sysfs/sysfs.h, making it clearer that nothing else in the kernel
dereferences it.

I have been running this patch for years.  Please integrate and forward
upstream if there are no objections.

From: "Adam J. Richter" <adam@yggdrasil.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-23 14:52:09 -08:00
Greg Kroah-Hartman 40cf67c5fc Driver core: remove class_device_rename
No one uses it, and it wasn't exported to modules, so remove it.  The
only other user of it was the network code, which is now converted to
use struct device instead.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-23 14:52:08 -08:00
Tejun Heo 32d9091156 libata: test major version in ata_id_is_sata()
Test major version in ata_id_is_sata() not separately.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-23 05:37:11 -05:00
Dave Jones aeeddc1435 [CPUFREQ] constify cpufreq_driver where possible.
Not all cases are possible due to ->flags being set at runtime
on some drivers.

Signed-off-by: Dave Jones <davej@redhat.com>
2007-02-22 19:08:27 -05:00
Andrew Victor 7f6e2d992d [ARM] 4231/1: AT91: Merge and typo fixes.
The duplicate file "include/asm-arm/arch-at91rm9200/entry-macro.S" can
be removed - it was already moved to include/asm-arm/arch-at91/.

Fix 3 small typo's - two in comments, and the incorrect clock was
specified for the LCD device.

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-02-22 14:53:30 +00:00
Franck Bui-Huu 9693a85378 [MIPS] Add basic SMARTMIPS ASE support
This patch adds trivial support for SMARTMIPS extension. This extension
is currently implemented by 4KS[CD] CPUs.

Basically it saves/restores ACX register, which is part of the SMARTMIPS
ASE, when needed. This patch does *not* add any support for Smartmips MMU
features.

Futhermore this patch does not add explicit support for 4KS[CD] CPUs since
they are respectively mips32 and mips32r2 compliant.  So with the current
processor configuration, a platform that has such CPUs needs to select
both configs:

	CPU_HAS_SMARTMIPS
	SYS_HAS_CPU_MIPS32_R[12]

This is due to the processor configuration which is mixing up all the
architecture variants and the processor types.

The drawback of this, is that we currently pass '-march=mips32' option to
gcc when building a kernel instead of '-march=4ksc' for 4KSC case. This
can lead to a kernel image a little bit bigger than required.

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-22 00:50:44 +00:00
Linus Torvalds e695e10bc9 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (196 commits)
  V4L/DVB (5253): Qt1010: whitespace / 80 column cleanups
  V4L/DVB (5252): Qt1010: use ARRAY_SIZE macro when appropriate
  V4L/DVB (5251): Qt1010: fix compiler warning
  V4L/DVB (5249): Fix compiler warning in vivi.c
  V4L/DVB (5247): Stv0297: Enable BER/UNC counting
  V4L/DVB (5246): Budget-ci: IR handling fixups
  V4L/DVB (5245): Dvb-ttpci: use i2c gate ctrl from stv0297 frontend driver
  V4L/DVB (5244): Dvbdev: fix illegal re-usage of fileoperations struct
  V4L/DVB (5178): Avoid race when deregistering the IR control for dvb-usb
  V4L/DVB (5240): Qt1010: use i2c_gate_ctrl where appropriate
  V4L/DVB (5239): Whitespace / 80-column cleanups
  V4L/DVB (5238): Kconfig: qt1010 should be selected by gl861 and au6610
  V4L/DVB (5237): Dvb: add new qt1010 tuner module
  V4L/DVB (5236): Initial support for Sigmatek DVB-110 DVB-T
  V4L/DVB (5235): Gl861: use parallel_ts
  V4L/DVB (5234): Gl861: remove unneeded declaration
  V4L/DVB (5233): Gl861: correct address of the bulk endpoint
  V4L/DVB (5232): Gl861: correct oops when loading module
  V4L/DVB (5231): Gl861: whitespace cleanups
  V4L/DVB (5230): Gl861: remove NULL entry from gl861_properties
  ...
2007-02-21 11:10:30 -08:00
Kyle McMartin 1055a8af09 [PARISC] Use symbolic last syscall in __NR_Linux_syscalls
Hopefully will prevent people from forgetting to update this...

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-21 15:36:05 +00:00
Adrian Bunk c65eeaab1f V4L/DVB (5200): V4l_printk_ioctl_arg() is no longer used.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:35:18 -02:00
Michael Schimek b1e7df1d35 V4L/DVB (5204): Change videodev2.h licence to dual GPL/BSD
videodev2.h contains just the V4L2 API structs and defines.
By allowing this header file to be dual GPL/BSD will enable sharing
userspace apps between Linux and *BSD systems. It will also allow developing
newer BSD licensed drivers that can be shared on Linux and *BSD.
It should be noticed that most of the current V4L drivers, and v4l core
itself are GPL only. This won't be changed by this patch.

Signed-off-by: Michael H. Schimek <mschimek@gmx.at>
Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
Signed-off-by: Bill Dirks <bill@thedirks.org>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Martin Rubli <mrubli@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:35:18 -02:00
Hans Verkuil 2675f7a88f V4L/DVB (5182): Remove #if 0 section from videodev2.h
Remove a section containing basically ideas for future sliced VBI standards.
This can be resurrected should any of this be actually implemented. For now
it only pollutes this header file.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:35:14 -02:00
Hans Verkuil 4f828ef7f3 V4L/DVB (5181): Sliced VBI API no longer marked experimental.
The Sliced VBI API is no longer marked experimental. Introduced in 2.6.14
and with only a single modification in 2.6.19 I think we can consider this
API to be solid.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:35:14 -02:00
Trent Piepho e7b58f5259 V4L/DVB (5162): Change VIDIOC_DBG_[SG]_REGISTER ioctls' reg address to 64 bits
Maybe someday there will be a device with a register address space >
32-bits, or maybe an i2c device which uses a protocol > 4 bytes long to
address its registers.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:35:10 -02:00
Mauro Carvalho Chehab b50e7fe993 V4L/DVB (5147): Make vivi driver to use vmalloced pointers
Before this patch, vivi were simulating a scatter gather DMA transfer.
While this is academic, showing how stuff really works on a real PCI 
device, this means a non-optimized code. 
There are only two memory models that vivi implements:
	1) kernel alloced memory. This is also used by read() method.
	   On this case, a vmalloc32 buffer is allocated at kernel;
	2) userspace allocated memory. This is used by most userspace apps.
	   video-buf will store this pointer.
	   a simple copy_to_user is enough to transfer data.
The third memory model scenario supported by video-buf is overlay mode. 
This model is not implemented on vivi and unlikely to be implemented on 
newer drivers, since now, most userspace apps do some post-processing 
(like de-interlacing).
After this patch, some cleanups may be done at video-buf.c to avoid 
allocating pages, when the driver doesn't need a PCI buffer. This is the 
case of vivi and usb drivers.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:55 -02:00
Trent Piepho 52ebc763d8 V4L/DVB (5146): Make VIDIOC_INT_[SG]_REGISTER ioctls no longer internal only
The direct register access ioctls were defined as kernel internal only,
but they are very useful for debugging hardware from userspace and are
used as such.  Officially export them.

VIDIOC_INT_[SG]_REGISTER is renamed to VIDIOC_DBG_[SG]_REGISTER 
Definition of ioctl and struct v4l2_register is moved from v4l2-common.h 
to videodev2.h.

Types used in struct v4l2_register are changed to the userspace 
exportable versions (u32 -> __u32, etc). 

Use of VIDIOC_DBG_S_REGISTER requires CAP_SYS_ADMIN permission, so move 
the check into the video_ioctl2() dispatcher so it doesn't need to be 
duplicated in each driver's call-back function. CAP_SYS_ADMIN check is 
added to pvrusb2 (which doesn't use video_ioctl2).

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:55 -02:00
Trent Piepho dbbff48f39 V4L/DVB (5144): Restore VIDIOC_INT_[SG]_REGISTER calls
Add support for these ioctls to the video_ioctl2 system and the cx88
driver.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:54 -02:00
Marco Schluessler 4cbca185e9 V4L/DVB (5113): Adds video output routing
Nexus CA needs to use a different routing on saa7115 module.

Signed-off-by: Marco Schluessler <marco@lordzodiac.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:47 -02:00
Ville-Pekka Vainio ae1942c571 V4L/DVB (5070): Budget-ci: add support for the Technotrend 1500 bundled remote
The keymap is based on a previous patch by Jussi Kukkonen.
This remote is identified by subsystem_device id 0x1010.

Signed-off-by: Ville-Pekka Vainio <vpivaini@cs.helsinki.fi>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:20 -02:00
Mauro Carvalho Chehab 43db48d3d2 V4L/DVB (5068): Fix authorship references
Bill Dirks asked me to update his entries at kernel files, since
he change his e-mail.
I've also updated a few web broken links or obsolete info to the curent
sites where V4L drivers and API are being discussed currently.

CC: Bill Dirks <bill@thedirks.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:20 -02:00
Adrian Bunk c408a6f673 V4L/DVB (5017): DVB: fix compile error
This patch fixes the following compile error:
<--  snip  -->
...
  LD      drivers/media/video/built-in.o
drivers/media/video/saa7134/built-in.o:(.data+0x85ec): multiple definition of `ir_rc5_remote_gap'
drivers/media/video/bt8xx/built-in.o:(.data+0x734c): first defined here
drivers/media/video/saa7134/built-in.o:(.data+0x85f0): multiple definition of `ir_rc5_key_timeout'
drivers/media/video/bt8xx/built-in.o:(.data+0x7350): first defined here
make[4]: *** [drivers/media/video/built-in.o] Error 1
<--  snip  -->
Since this variables were needlessly global, this patch implements the
trivial fix of making them static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:16 -02:00
Juan Pablo Sormani c36c459a55 V4L/DVB (5015): Add support for more Encore TV cards
Signed-off-by: Juan Pablo Sormani <sorman@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:16 -02:00
Hans Verkuil 75558ab92d V4L/DVB (4986): Removed unimplemented cx2341x API commands
The commands CX2341X_DEC_SET_AUDIO_OUTPUT, CX2341X_DEC_SET_AV_DELAY and
CX2341X_ENC_SET_3_2_PULLDOWN are not implemented in the Conexant firmware.
So these commands are removed. This also means that the V4L2_CID_MPEG_VIDEO_PULLDOWN
control in cx2341x.c and pvrusb2-hdw.c is removed.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:13 -02:00
Hermann Pitton 9160723ed6 V4L/DVB (4961): Add support for the ASUS P7131 remote control
Besides adding the board specific code, this patch moves
the RC5 decoding code from bt8xx to ir-functions.c to make it available 
for all drivers.

Signed-off-by: Marc Fargas <telenieko.telenieko.com>
Signed-off-by: Hermann Pitton <hermann-pitton@arcor.de>
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:12 -02:00
Guy Martin 2ed0e24359 [PARISC] Add missing statfs64 and fstatfs64 syscalls
Signed-off-by: Guy Martin <gmsoft@tuxicoman.be>
2007-02-21 15:33:59 +00:00
Tejun Heo 44877b4e22 libata: s/ap->id/ap->print_id/g
ata_port has two different id fields - id and port_no.  id is
system-wide 1-based unique id for the port while port_no is 0-based
host-wide port number.  The former is primarily used to identify the
ATA port to the user in printk messages while the latter is used in
various places in libata core and LLDs to index the port inside the
host.

The two fields feel quite similar and sometimes ap->id is used in
place of ap->port_no, which is very difficult to spot.  This patch
renames ap->id to ap->print_id to reduce the possibility of such bugs.

Some printk messages are adjusted such that id string (ata%u[.%u])
isn't printed twice and/or to use ata_*_printk() instead of hardcoded
id format.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-21 04:58:20 -05:00
Tejun Heo 6d1245bf29 libata: separate out ata_ncq_enabled()
Separate out ata_ncq_enabled().

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-21 04:58:18 -05:00
Tejun Heo 7d47e8d4d4 libata: put some intelligence into EH speed down sequence
The current EH speed down code is more of a proof that the EH
framework is capable of adjusting transfer speed in response to error.
This patch puts some intelligence into EH speed down sequence.  The
rules are..

* If there have been more than three timeout, HSM violation or
  unclassified DEV errors for known supported commands during last 10
  mins, NCQ is turned off.

* If there have been more than three timeout or HSM violation for known
  supported command, transfer mode is slowed down.  If DMA is active,
  it is first slowered by one grade (e.g. UDMA133->100).  If that
  doesn't help, it's slowered to 40c limit (UDMA33).  If PIO is
  active, it's slowered by one grade first.  If that doesn't help,
  PIO0 is forced.  Note that this rule does not change transfer mode.
  DMA is never degraded into PIO by this rule.

* If there have been more than ten ATA bus, timeout, HSM violation or
  unclassified device errors for known supported commands && speeding
  down DMA mode didn't help, the device is forced into PIO mode.  Note
  that this rule is considered only for PATA devices and is pretty
  difficult to trigger.

One error can only trigger one rule at a time.  After a rule is
triggered, error history is cleared such that the next speed down
happens only after some number of errors are accumulated.  This makes
sense because now speed down is done in bigger stride.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-21 04:58:16 -05:00
Akira Iguchi a619f981b4 libata: PATA driver for Celleb
This is the patch for PATA controller of Celleb.

This driver uses the managed iomap (devres).

Because this driver needs special taskfile accesses, there is
a copy of ata_std_softreset(). ata_dev_try_classify() is exported
so that it can be used in this function.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Akira Iguchi <akira2.iguchi@toshiba.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-21 04:58:16 -05:00
Mathieu Desnoyers 3a5f10e370 [S390] add atomic64_xchg to s390
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-02-21 10:55:59 +01:00
Mathieu Desnoyers de61c9341b [S390] local_t cleanup : use asm-generic/local.h.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-02-21 10:55:55 +01:00
Heiko Carstens 615b04b301 [S390] nss: Free unused memory in kernel image.
With CONFIG_SHARED_KERNEL the kernel text segment that might be in a
read only memory sections starts at 1MB. Memory between 0x12000 and
0x100000 is unused then. Free this, so we have appr. an extra MB
of memory available.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-02-21 10:55:37 +01:00
Michael Holzheu 46b05d2617 [S390] New header file ipl.h
Setup.h has been misused for ipl related stuff in the past. We now move
everything, which has to do with ipl and reipl to a new header file named
"ipl.h".

Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-02-21 10:55:21 +01:00
Michael Holzheu 72960a02c2 [S390] New get_cpu_id() inline assembly
Replace two stidp inline assemblies with one global implementation.

Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-02-21 10:55:18 +01:00
Philipp Zabel 5b7e42b2d3 [PATCH] GPIO API: SA1100 wrapper cleanup
Based on the discussion last december (http://lkml.org/lkml/2006/12/20/241),
this patch
  - adds gpio_direction_input/output functions to
    generic.c instead of making them inline,
  - fixes comment and includes and uses inline functions
    instead of macros in gpio.h

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-20 17:10:16 -08:00
Philipp Zabel adff264fe6 [PATCH] GPIO API: S3C2410 wrapper cleanup
this one adds an #include <asm/arch/regs-gpio.h>.
Tested by Roman Moravcik on s3c2440.

Based on the discussion last december
(http://lkml.org/lkml/2006/12/20/243), this patch
 - fixes comment and includes in gpio.h
 - adds the gpio_to_irq definition for S3C2400
 - includes asm/arch/regs-gpio.h for pin direction
   definitions

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-20 17:10:16 -08:00
Philipp Zabel 3deac046e2 [PATCH] GPIO API: PXA wrapper cleanup
Based on the discussion last december (http://lkml.org/lkml/2006/12/20/242),
this patch:

  - moves the PXA_LAST_GPIO check into pxa_gpio_mode
  - fixes comment and includes in gpio.h
  - replaces the gpio_set/get_value macros with inline
    functions and adds a non-inline version to avoid
    code explosion when gpio is not a constant.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Nicolas Pitre <nico@cam.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-20 17:10:16 -08:00
Ian Kent e8514478f6 [PATCH] autofs4: header file update
The current header file definitions for autofs version 5 have caused a couple
of problems for application builds downstream.

This fixes the problem by separating the definitions.

Signed-off-by: Ian Kent <raven@themaw.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-20 17:10:15 -08:00
Randy Dunlap 0cba01db64 [PATCH] cdrom: use unsigned bitfields
Fix 23 of these sparse warnings on x86_64 allmodconfig:
include/linux/cdrom.h:942:19: error: dubious bitfield without explicit
`signed' or `unsigned'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Jens Axboe <axboe@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-20 17:10:14 -08:00
Ben Dooks b6d6454fdb [PATCH] mfd: SM501 core driver
This driver provides the core functionality of the SM501, which is a
multi-function chip including two framebuffers, video acceleration, USB,
and many other peripheral blocks.

The driver exports a number of entries for the peripheral drivers to use.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Vincent Sanders <vince@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-20 17:10:14 -08:00
Miguel Ojeda 34173a4aad [PATCH] cfag12864b: fix crash when built-in and no parport present
The problem comes when ks0108/cfag12864b are built-in and no parallel port is
present.  ks0108_init() is called first, as it should be, but fails to load
(as there is no parallel port to use).

After that, cfag12864b_init() gets called, without knowing anything about
ks0108 failed, and calls ks0108_writecontrol(), which dereferences an
uninitialized pointer.

Init order is OK, I think.  The problem is how to stop cfag12864b_init() being
called if ks0108 failed to load.  modprobe does it for us, but, how when
built-in?

Signed-off-by: Miguel Ojeda Sandonis <maxextreme@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-20 17:10:14 -08:00
Christoph Lameter 53b8a315b7 [PATCH] Convert highest_possible_processor_id to nr_cpu_ids
We frequently need the maximum number of possible processors in order to
allocate arrays for all processors.  So far this was done using
highest_possible_processor_id().  However, we do need the number of
processors not the highest id.  Moreover the number was so far dynamically
calculated on each invokation.  The number of possible processors does not
change when the system is running.  We can therefore calculate that number
once.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Frederik Deweerdt <frederik.deweerdt@gmail.com>
Cc: Neil Brown <neilb@suse.de>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-20 17:10:13 -08:00
Christoph Lameter 74c7aa8b85 [PATCH] Replace highest_possible_node_id() with nr_node_ids
highest_possible_node_id() is currently used to calculate the last possible
node idso that the network subsystem can figure out how to size per node
arrays.

I think having the ability to determine the maximum amount of nodes in a
system at runtime is useful but then we should name this entry
correspondingly, it should return the number of node_ids, and the the value
needs to be setup only once on bootup.  The node_possible_map does not
change after bootup.

This patch introduces nr_node_ids and replaces the use of
highest_possible_node_id().  nr_node_ids is calculated on bootup when the
page allocators pagesets are initialized.

[deweerdt@free.fr: fix oops]
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Neil Brown <neilb@suse.de>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Frederik Deweerdt <frederik.deweerdt@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-20 17:10:13 -08:00
Andrew Morton 5ec553a904 [PATCH] mincore warning fix
allnoconfig:

mm/mincore.c: In function 'do_mincore':
mm/mincore.c:122: warning: unused variable 'entry'

Yet another entry in the why-macros-are-wrong encyclopedia.

Cc: Christoph Lameter <clameter@engr.sgi.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-20 17:10:13 -08:00
Andrew Morton b446b60e4e [PATCH] rework reserved major handling
Several people have reported failures in dynamic major device number handling
due to the recent changes in there to avoid handing out the local/experimental
majors.

Rolf reports that this is due to a gcc-4.1.0 bug.

The patch refactors that code a lot in an attempt to provoke the compiler into
behaving.

Cc: Rolf Eike Beer <eike-kernel@sf-tec.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-20 17:10:13 -08:00
Andries Brouwer f4fa27c16b [PATCH] minix v3: fix superblock definition
Somehow we got the layout of the v3 superblock wrong, which causes crashes due
to overindexing of the buffer_head array in statfs on large fielsystems.

Cc: "Cedric Augonnet" <cedric.augonnet@gmail.com>
Cc: "Daniel Aragones" <danarag@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-20 17:10:13 -08:00
Ralf Baechle 7b8f850beb [PATCH] Fix build errors if bitop functions are do {} while macros
If one of clear_bit, change_bit or set_bit is defined as a do { } while (0)
function usage of these functions in parenthesis like

  (foo_bit(23, &var))

while be expaned to something like

  (do { ... } while (0)}).

resulting in a build error.  This patch removes the useless parenthesis.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-20 17:10:12 -08:00
Linus Torvalds e696268a73 Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 4165/1: S3C24XX: Select CONFIG_NO_IOPORT
  [ARM] Fix s3c2410 ALSA audio for typedef elimination
  [ARM] Fix ARM AACI ALSA driver
  [ARM] fix mach-at91 build breakage
  [ARM] Fix jornada720 build errors
  [ARM] Fix iop13xx build error
  [ARM] Fix build error caused by move of apm
  [ARM] 4223/1: ixdp2351 : Fix for a define error
  [ARM] 4187/1: iop: unify time implementation across iop32x, iop33x, and iop13xx
  [ARM] 4186/1: iop: remove cp6_enable/disable routines
  [ARM] 4185/2: entry: introduce get_irqnr_preamble and arch_ret_to_user
2007-02-20 12:14:32 -08:00
Adrian Bunk b44755cfaa {rd,wr}msr_on_cpu SMP=n optimization
Let's save a few bytes in the CONFIG_SMP=n case.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Dave Jones <davej@redhat.com>
2007-02-20 14:29:37 -05:00
Alexey Dobriyan b077ffb3b7 rdmsr_on_cpu, wrmsr_on_cpu
There was OpenVZ specific bug rendering some cpufreq drivers unusable on SMP.
In short, when cpufreq code thinks it confined itself to needed cpu by means
of set_cpus_allowed() to execute rdmsr, some "virtual cpu" feature can migrate
process to anywhere.  This triggers bugons and does wrong things in general.

This got fixed by introducing rdmsr_on_cpu and wrmsr_on_cpu executing rdmsr
and wrmsr on given physical cpu by means of smp_call_function_single().

Dave Jones mentioned cpufreq might be not only user of rdmsr_on_cpu() and
wrmsr_on_cpu(), so I'm putting them into arch/{i386,x86_64}/lib/ .

Signed-off-by: Alexey Dobriyan <adobriyan@openvz.org>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Jones <davej@redhat.com>
2007-02-20 14:23:43 -05:00
Russell King 5a84d15906 Merge ARM fixes 2007-02-20 19:13:30 +00:00
Linus Torvalds 91aa69315e Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (21 commits)
  natsemi: Support Aculab E1/T1 PMXc cPCI carrier cards
  natsemi: Add support for using MII port with no PHY
  skge: race with workq and RTNL
  Replace local random function with random32()
  s2io: RTNL and flush_scheduled_work deadlock
  8139too: RTNL and flush_scheduled_work deadlock
  sis190: RTNL and flush_scheduled_work deadlock
  r8169: RTNL and flush_scheduled_work deadlock
  [PATCH] ieee80211softmac: Fix setting of initial transmit rates
  [PATCH] bcm43xx: OFDM fix for rev 1 cards
  [PATCH] bcm43xx: Fix for 4311 and 02/07/07 specification changes
  [PATCH] prism54: correct assignment of DOT1XENABLE in WE-19 codepaths
  [PATCH] zd1211rw: Readd zd_addr_t cast
  [PATCH] bcm43xx: Fix for oops on resume
  [PATCH] bcm43xx: Ignore ampdu status reports
  [PATCH] wavelan: Use ARRAY_SIZE macro when appropriate
  [PATCH] hostap: Use ARRAY_SIZE macro when appropriate
  [PATCH] misc-wireless: Use ARRAY_SIZE macro when appropriate
  [PATCH] ipw2100: Use ARRAY_SIZE macro when appropriate
  [PATCH] bcm43xx: Janitorial change - remove two unused variables
  ...
2007-02-20 10:26:46 -08:00
Jeff Garzik 6606e17a7f Merge branch 'upstream-jgarzik' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream 2007-02-20 11:28:42 -05:00
Russell King 97e412fa9e [ARM] Fix s3c2410 ALSA audio for typedef elimination
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-02-20 16:11:11 +00:00
Ozzy 37985b4493 [ARM] 4223/1: ixdp2351 : Fix for a define error
Fix syntax error for a define in ixdp2351.h

Signed-off-by: ozzy <linux-ozzy@gmx.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-02-20 10:55:55 +00:00
Russell King e80a0e6e7c [ARM] Merge remaining IOP code
Conflicts:
	include/asm-arm/arch-at91rm9200/entry-macro.S

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-02-20 10:52:43 +00:00
Richard Purdie 599a52d126 backlight: Separate backlight properties from backlight ops pointers
Per device data such as brightness belongs to the indivdual device
and should therefore be separate from the the backlight operation
function pointers. This patch splits the two types of data and
allows simplifcation of some code.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2007-02-20 09:26:53 +00:00
Richard Purdie 37ce69a57f backlight: Rework backlight/fb interaction simplifying, lots
fb_info->bl_mutex is badly thought out and the backlight class doesn't
need it if the framebuffer/backlight register/unregister order is
consistent, particularly after the backlight locking fixes.

Fix the drivers to use the order:

backlight_device_register()
register_framebuffer()
unregister_framebuffer()
backlight_device_unregister()

and turn bl_mutex into a lock for the bl_curve data only.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2007-02-20 08:38:46 +00:00
Richard Purdie 994efacdf9 backlight/fbcon: Add FB_EVENT_CONBLANK
The backlight class wants notification whenever the console is blanked
but doesn't get this when hardware blanking fails and software blanking
is used. Changing FB_EVENT_BLANK to report both would be a behaviour
change which could confuse the console layer so add a new event for
software blanking and have the backlight class listen for both.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2007-02-20 08:38:45 +00:00
Richard Purdie 249040dc7f backlight: Convert semaphore -> mutex
Convert internal semaphore to a mutex

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2007-02-20 08:38:45 +00:00
Richard Purdie 28ee086d5b backlight: Fix external uses of backlight internal semaphore
backlight_device->sem has a very specific use as documented in the
header file. The external users of this are using it for a different
reason, to serialise access to the update_status() method.

backlight users were supposed to implement their own internal
serialisation of update_status() if needed but everyone is doing
things differently and incorrectly. Therefore add a global mutex to
take care of serialisation for everyone, once and for all.

Locking for get_brightness remains optional since most users don't
need it.

Also update the lcd class in a similar way.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2007-02-20 08:38:45 +00:00
Richard Purdie dfcba20067 backlight: Remove unneeded owner field
Remove uneeded owner field from backlight_properties structure.

Nothing uses it and it is unlikely that it will ever be used. The
backlight class uses other means to ensure that nothing references
unloaded code.

Based on a patch from Dmitry Torokhov <dtor@insightbb.com>

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2007-02-20 08:37:40 +00:00
Ralf Baechle e03b526932 [MIPS] Fixup copy_from_user_inatomic
From the 01408c4939 log message:

The problem is that when we write to a file, the copy from userspace to
pagecache is first done with preemption disabled, so if the source
address is not immediately available the copy fails *and* *zeros* *the*
*destination*.

This is a problem because a concurrent read (which admittedly is an odd
thing to do) might see zeros rather that was there before the write, or
what was there after, or some mixture of the two (any of these being a
reasonable thing to see).

If the copy did fail, it will immediately be retried with preemption
re-enabled so any transient problem with accessing the source won't
cause an error.

The first copying does not need to zero any uncopied bytes, and doing
so causes the problem.  It uses copy_from_user_atomic rather than
copy_from_user so the simple expedient is to change copy_from_user_atomic
to *not* zero out bytes on failure.

< --- end cite --- >

This patch finally implements at least a not so pretty solution by
duplicating the relevant part of __copy_user.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-20 01:26:42 +00:00
Atsushi Nemoto 269dd2b252 [MIPS] Fix struct sigcontext for N32 userland
The kernel use 64-bit for sc_regs[0], and both N32/N64 userland
expects it was 64-bit.  But size of 'long' on N32 is actually 32-bit.
So this definition make some confusion.  Use __u32 and __u64 for
N32/N64 sigcontext to get rid of this confusion.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-20 01:26:42 +00:00
Andrew Morton 6168a702ab [PATCH] Declare init_irq_proc before we use it.
powerpc gets:

init/main.c: In function `do_basic_setup':
init/main.c:714: warning: implicit declaration of function `init_irq_proc'

but we cannot include linux/irq.h in generic code.

Fix it by moving the declaration into linux/interrupt.h instead.

And make sure all code that defines init_irq_proc() is including
linux/interrupt.h.

And nuke an ifdef-in-C

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-19 14:21:50 -08:00
Linus Torvalds cb553c4800 Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [MIPS] Update defconfigs
  [MIPS] Support for several more SNI RM models.
  [MIPS] Include <asm/bugs> to for declaration of check_bugs32.
  [MIPS] Add external declaration of pagetable_init() to pgalloc.h
  [MIPS] Make kernel_thread_helper() static
  [MIPS] Make __declare_dbe_table static and avoid it getting optimized away
  [MIPS] Use MIPS R2 instructions for bitops.
  [MIPS] signals: Share even more code.
  [MIPS] Fix CONFIG_MIPS32_N32=y CONFIG_MIPS32_O32=n build
  [MIPS] Iomap implementation.
  [MIPS] <asm/compat-signal.h> needs to include <asm/uaccess.h>.
  [MIPS] IP27: Fix warning.
  [MIPS] Fix sigset_t endianess swapping issues in 32-bit compat code.
2007-02-19 13:38:42 -08:00
Linus Torvalds 4935361766 Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6: (49 commits)
  [MTD] [NAND] S3C2412 fix hw ecc
  [MTD] [NAND] Work around false compiler warning in CAFÉ driver
  [JFFS2] printk warning fixes
  [MTD] [MAPS] ichxrom warning fix
  [MTD] [MAPS] amd76xrom warning fix
  [MTD] [MAPS] esb2rom warning fixes
  [MTD] [MAPS] ck804xrom warning fix
  [MTD] [MAPS] netsc520 warning fix
  [MTD] [MAPS] sc520cdp warning fix
  [MTD] [ONENAND] onenand_base warning fix
  [MTD] [NAND] eXcite nand flash driver
  [MTD] Improve heuristic for detecting wrong-endian RedBoot partition table
  [MTD] Fix RedBoot partition parsing regression harder.
  [MTD] [NAND] S3C2410: Hardware ECC correction code
  [JFFS2] Use MTD_OOB_AUTO to automatically place cleanmarker on NAND
  [MTD] Clarify OOB-operation interface comments
  [MTD] remove unused ecctype,eccsize fields from struct mtd_info
  [MTD] [NOR] Intel: remove ugly PROGREGION macros
  [MTD] [NOR] STAA: use writesize instead off eccsize to represent ECC block
  [MTD] OneNAND: Invalidate bufferRAM after erase
  ...
2007-02-19 13:34:11 -08:00
Linus Torvalds 5fc77247f7 Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6:
  [SCSI] SCSI core: better initialization for sdev->scsi_level
  [SCSI] scsi_proc.c: display sdev->scsi_level correctly
  [SCSI] megaraid_sas: update version and author info
  [SCSI] megaraid_sas: return sync cache call with success
  [SCSI] megaraid_sas: replace pci_alloc_consitent with dma_alloc_coherent in ioctl path
  [SCSI] megaraid_sas: add bios_param in scsi_host_template
  [SCSI] megaraid_sas: do not process cmds if hw_crit_error is set
  [SCSI] scsi_transport.h should include scsi_device.h
  [SCSI] aic79xx: remove extra newline from info message
  [SCSI] scsi_scan.c: handle bad inquiry responses
  [SCSI] aic94xx: tie driver to the major number of the sequencer firmware
  [SCSI] lpfc: add PCI error recovery support
  [SCSI] megaraid: pci_module_init to pci_register_driver
  [SCSI] tgt: fix the user/kernel ring buffer interface
  [SCSI] sgiwd93: interfacing to wd33c93
  [SCSI] wd33c93: Fast SCSI with WD33C93B
2007-02-19 13:32:28 -08:00
Linus Torvalds d43a338e39 Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/dtor/input:
  Input: remove obsolete setup parameters from input drivers
  Input: HIL - fix improper call to release_region()
  Input: hid-lgff - treat devices as joysticks unless told otherwise
  Input: HID - add support for Logitech Formula Force EX
  Input: gpio-keys - switch to common GPIO API
  Input: do not lock device when showing name, phys and uniq
  Input: i8042 - let serio bus suspend ports
  Input: psmouse - properly reset mouse on shutdown/suspend
2007-02-19 13:31:34 -08:00
Linus Torvalds cb4aaf46c0 Merge branch 'audit.b37' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current
* 'audit.b37' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current:
  [PATCH] AUDIT_FD_PAIR
  [PATCH] audit config lockdown
  [PATCH] minor update to rule add/delete messages (ver 2)
2007-02-19 13:29:54 -08:00
Linus Torvalds 874ff01bd9 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial
* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: (25 commits)
  Documentation/kernel-docs.txt update.
  arch/cris: typo in KERN_INFO
  Storage class should be before const qualifier
  kernel/printk.c: comment fix
  update I/O sched Kconfig help texts - CFQ is now default, not AS.
  Remove duplicate listing of Cris arch from README
  kbuild: more doc. cleanups
  doc: make doc. for maxcpus= more visible
  drivers/net/eexpress.c: remove duplicate comment
  add a help text for BLK_DEV_GENERIC
  correct a dead URL in the IP_MULTICAST help text
  fix the BAYCOM_SER_HDX help text
  fix SCSI_SCAN_ASYNC help text
  trivial documentation patch for platform.txt
  Fix typos concerning hierarchy
  Fix comment typo "spin_lock_irqrestore".
  Fix misspellings of "agressive".
  drivers/scsi/a100u2w.c: trivial typo patch
  Correct trivial typo in log2.h.
  Remove useless FIND_FIRST_BIT() macro from cardbus.c.
  ...
2007-02-19 13:29:02 -08:00
Linus Torvalds ebbe46f73a Merge branch 'kill-jffs' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6
* 'kill-jffs' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6:
  Remove JFFS (version 1), as scheduled.
2007-02-19 13:25:36 -08:00
Linus Torvalds 901ea4a079 Merge branch 'acpi' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'acpi' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  [PATCH] libata: wrong sizeof for BUFFER
  [PATCH] libata: change order of _SDD/_GTF execution (resend #3)
  [PATCH] libata: ACPI _SDD support
  [PATCH] libata: ACPI and _GTF support
2007-02-19 13:23:50 -08:00
Linus Torvalds 2370965c50 Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (51 commits)
  sk98lin: mark deprecated in Kconfig
  Hostess SV-11 depends on INET
  Fix link autonegotiation timer.
  sk98lin: planned removal
  B44: increase wait loop
  b44: replace define
  e1000: allow ethtool to see link status when down
  e1000: remove obsolete custom pci_save_state code
  e1000: fix shared interrupt warning message
  atm: Use ARRAY_SIZE macro when appropriate
  bugfixes and new hardware support for arcnet driver
  pcnet32 NAPI no longer experimental
  MAINTAINER
  macb: Remove inappropriate spinlocks around mii calls
  Convert meth to netdev_priv
  sky2: v1.13
  sky2: receive error handling improvements
  sky2: transmit timeout
  sky2: flow control negotiation for Yukon-FE
  sky2: no need to reset pause bits on shutdown
  ...
2007-02-19 13:23:26 -08:00
Linus Torvalds 59b8175c77 Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (117 commits)
  [ARM] 4058/2: iop32x: set ->broken_parity_status on n2100 onboard r8169 ports
  [ARM] 4140/1: AACI stability add ac97 timeout and retries
  [ARM] 4139/1: AACI record support
  [ARM] 4138/1: AACI: multiple channel support for IRQ handling
  [ARM] 4211/1: Provide a defconfig for ns9xxx
  [ARM] 4210/1: base for new machine type "NetSilicon NS9360"
  [ARM] 4222/1: S3C2443: Remove reference to missing S3C2443_PM
  [ARM] 4221/1: S3C2443: DMA support
  [ARM] 4220/1: S3C24XX: DMA system initialised from sysdev
  [ARM] 4219/1: S3C2443: DMA source definitions
  [ARM] 4218/1: S3C2412: fix CONFIG_CPU_S3C2412_ONLY wrt to S3C2443
  [ARM] 4217/1: S3C24XX: remove the dma channel show at startup
  [ARM] 4090/2: avoid clash between PXA and SA1111 defines
  [ARM] 4216/1: add .gitignore entries for ARM specific files
  [ARM] 4214/2: S3C2410: Add Armzone QT2410
  [ARM] 4215/1: s3c2410 usb device:  per-platform vbus_draw
  [ARM] 4213/1: S3C2410 - Update definition of ADCTSC_XY_PST
  [ARM] 4098/1: ARM: rtc_lock only used with rtc_cmos
  [ARM] 4137/1: Add kexec support
  [ARM] 4201/1: SMP barriers pair needed for the secondary boot process
  ...

Fix up conflict due to typedef removal in sound/arm/aaci.h
2007-02-19 13:18:39 -08:00
Linus Torvalds 5c56f46683 Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (34 commits)
  [POWERPC] 86xx: Cleaned up platform dts files
  [POWERPC] 85xx: Renamed MPC8568 MDS board code to match other boards
  [POWERPC] 85xx: Cleaning up machine probing
  [POWERPC] QE: clean up ucc_slow.c and ucc_fast.c
  [POWERPC] 85xx: Cleaned up platform dts files
  [POWERPC] 83xx: Renamed MPC8323 MDS dts and defconfig to match other boards
  [POWERPC] 83xx: Updated and renamed MPC8360PB to MPC836x MDS
  [POWERPC] 83xx: Use of_platform_bus_probe to setup QE devices
  [POWERPC] 83xx: use default value of loops_per_jiffy
  [POWERPC] 83xx: Remove obsolete setting of ROOT_DEV.
  [POWERPC] 83xx: Cleaning up machine probing and board initcalls
  [POWERPC] Dispose irq mapping when done in mpc52xx_serial.c
  [POWERPC] 86xx: Add missing of_node_put() in mpc86xx_hpcn_init_irq().
  [POWERPC] 8[56]xx: Remove obsolete setting of ROOT_DEV for 85xx and 86xx platforms.
  [POWERPC] pseries: Enabling auto poweron after power is restored.
  [POWERPC] use winbond libata instead of ide driver for pseries CD drives
  [POWERPC] powerpc: remove references to the obsolete linux,platform property
  [POWERPC] add of_get_mac_address and update fsl_soc.c to use it
  [POWERPC] 83xx: Cleaned up 83xx platform dts files
  [POWERPC] Fix bug with early ioremap and 64k pages
  ...
2007-02-19 13:05:14 -08:00
Linus Torvalds dd397a6d1a Merge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6: (30 commits)
  ide: make ide_hwif_t.ide_dma_host_on void (v2)
  ide: make ide_hwif_t.ide_dma_{host_off,off_quietly} void (v2)
  ide: add ide_set_dma() helper (v2)
  sgiioc4: fix sgiioc4_ide_dma_check() to enable/disable DMA properly
  ide: disable DMA in ->ide_dma_check for "no IORDY" case (v2)
  ide: convert ide_hwif_t.mmio into flag (v2)
  ide: use PIO/MMIO operations directly where possible (v2)
  ide: add ide_use_fast_pio() helper (v3)
  ide: unexport ide_set_xfer_rate() (v2)
  ide: remove ide_drive_t.usage
  ide: remove ide_pci_device_t tables with only one entry
  ide: remove write-only ide_hwif_t.no_dsc flag
  ide: remove write-only ide_pio_data_t.blacklisted
  sis5513: sis5513_config_xfer_rate() cleanup
  piix: cleanup
  svwks: small cleanup
  cs5530: small cleanup
  hpt366: remove redundant check from init_dma_hpt366()
  trm290: remove redundant CONFIG_BLK_DEV_IDEDMA #ifdef-s
  au1xxx-ide: remove dead code
  ...
2007-02-19 13:01:30 -08:00
Linus Torvalds 976fd0e29c Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband:
  IB/core: Set static rate in ib_init_ah_from_path()
  IB/ipath: Make ipath_map_sg() static
  IB/core: Fix sparse warnings about shadowed declarations
  RDMA/cma: Add multicast communication support
  IB/sa: Track multicast join/leave requests
  IPoIB: CM error handling thinko fix
  RDMA/cxgb3: Remove Open Grid Computing copyrights in iw_cxgb3 driver
  RDMA/cxgb3: Fail posts synchronously when in TERMINATE state
  RDMA/iwcm: iw_cm_id destruction race fixes
  IB/ehca: Change query_port() to return LINK_UP instead UNKNOWN
  IB/ehca: Allow en/disabling scaling code via module parameter
  IB/ehca: Fix race condition/locking issues in scaling code
  IB/ehca: Rework irq handler
  IPoIB: Only allow root to change between datagram and connected mode
  IB/mthca: Fix allocation of ICM chunks in coherent memory
  IB/mthca: Allow the QP state transition RESET->RESET
2007-02-19 13:00:26 -08:00
Linus Torvalds 733abe4fff Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6:
  PCI: Make PCI device numa-node attribute visible in sysfs
  PCI: add systems for automatic breadth-first device sorting
  PCI: PCI devices get assigned redundant IRQs
  PCI: Make CARDBUS_MEM_SIZE and CARDBUS_IO_SIZE boot options
  PCI: pci.txt fix __devexit() usage
  PCI/sysfs/kobject kernel-doc fixes
2007-02-19 12:59:55 -08:00
Linus Torvalds 5fe8252fc3 Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6:
  sysfs: fix build errors: uevent with CONFIG_SYSFS=n
  pcmcia: some class_device fallout
  Driver core: device_add_attrs() cleanup
  debugfs: Remove misleading comments.
  debugfs: implement symbolic links
  Driver: remove redundant kobject_unregister checks
  kobject: kobj->k_name verification fix
  serial: Add PCMCIA IDs for Quatech DSP-100 dual RS232 adapter.
  Driver core: let request_module() send a /sys/modules/kmod/-uevent
  Driver.h copyright update
2007-02-19 12:59:26 -08:00
Linus Torvalds 460223d21d Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (39 commits)
  USB: at91-ohci, handle extra at91sam9261 ahb clock
  USB: another id for cp2101 driver
  USB: ueagle-atm.c needs sched.h
  USB: at91_udc, shrink runtime footprint
  usbnet: add missing Kconfig for KC2190 cables
  usbnet: init fault (oops) cleanup, whitespace fixes
  usbnet: recognize SiteCom CN-124
  usb: Remove Airprime device from option.c
  USB: change __init to __devinit for isp116x_probe
  USB: ps3: don't call ps3_system_bus_driver_register on other platforms
  USB: hid-core.c: Removes GTCO CalComp Interwrite IPanel PIDs from blacklist
  USB: kernel-doc fixes
  USB: quirky device for cdc-acm
  USB: cdc-acm: fix incorrect throtteling, make set_control optional
  USB: unconfigure devices which have config 0
  USB: make usb_iso_packet_descriptor.status signed
  USB: fix g_serial small error
  USB: use __u32 rather than u32 in userspace ioctls in usbdevice_fs.h
  USB Storage: US_FL_IGNORE_RESIDUE needed for Aiptek MP3 Player
  USB: Fix misspelled "USBNET_MII" kernel config option.
  ...
2007-02-19 12:59:04 -08:00
Thomas Bogendoerfer c066a32a89 [MIPS] Support for several more SNI RM models.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-18 21:31:37 +00:00
Atsushi Nemoto 6a1e552947 [MIPS] Add external declaration of pagetable_init() to pgalloc.h
This fixes some sparse warnings.

pgtable-32.c:15:6: warning: symbol 'pgd_init' was not declared. Should it be static?
pgtable-32.c:32:13: warning: symbol 'pagetable_init' was not declared. Should it be static?

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-18 21:31:36 +00:00
Ralf Baechle 102fa15c3f [MIPS] Use MIPS R2 instructions for bitops.
Add R2 optimized variants of clear_bit, set_bit and test_and_clear_bit.
With gcc 4.1.1 this saves 1592 bytes on a defconfig (minus IPv6) kernel.
Turns out that R2 bitop instructions are no gain for the other bitop
functions.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-18 21:31:35 +00:00
Ralf Baechle 151fd6acd9 [MIPS] signals: Share even more code.
native and compat do_signal and handle_signal are identical and can easily
be unified.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-18 21:31:35 +00:00
Ralf Baechle 140c1729a2 [MIPS] Iomap implementation.
This implementation has support for the concept of one separate ioport
address space by PCI domain.  A pointer to the virtual address where
the port space of a domain has been mapped has been added to struct
pci_controller and systems should be fixed to fill in this value. For
single domain systems this will be the same value as passed to
set_io_port_base().

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-18 21:31:34 +00:00
Ralf Baechle 4c1569949a [MIPS] <asm/compat-signal.h> needs to include <asm/uaccess.h>.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-18 21:31:34 +00:00
Atsushi Nemoto 755f21bb89 [MIPS] Fix sigset_t endianess swapping issues in 32-bit compat code.
access_ok in compat-signal.h is wrong (checking destination instead of
source) and redundant (already checked before calling this function).

Also sf_mask in struct sigframe32 should be compat_sigset_t type.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-18 21:31:33 +00:00
Kyle McMartin 04532c4f55 Revert "[PARISC] Optimize TLB flush on SMP systems"
This reverts commit 592ac93a60
which causes SMP machines with maxcpus > 1 to fail to boot...
2007-02-18 19:35:45 +00:00
Russell King 3b0eb4a195 Merge the easy part of the IOP branch 2007-02-18 11:31:14 +00:00
Russell King 8213084125 Merge NetSilicon NS93xx tree
Fixed conflicts:

	arch/arm/Makefile
	arch/arm/mm/Kconfig

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-02-18 11:27:07 +00:00
Dmitry Torokhov 82dd9eff4b Input: i8042 - let serio bus suspend ports
Let serio subsystem take care of suspending the ports; concentrate
on suspending/resuming the controller itself.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-02-18 01:40:30 -05:00
Al Viro db3495099d [PATCH] AUDIT_FD_PAIR
Provide an audit record of the descriptor pair returned by pipe() and
socketpair().  Rewritten from the original posted to linux-audit by
John D. Ramsdell <ramsdell@mitre.org>

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2007-02-17 21:30:15 -05:00
John W. Linville b312362be6 Merge branch 'upstream' into upstream-jgarzik
Conflicts:

	net/ieee80211/softmac/ieee80211softmac_module.c
	net/ieee80211/softmac/ieee80211softmac_wx.c
2007-02-17 18:26:09 -05:00
Timur Tabi 5af68af5bc [POWERPC] QE: clean up ucc_slow.c and ucc_fast.c
Refactored and cleaned up ucc_fast.c and ucc_slow.c so that the two files
look more alike and are easier to read.  Removed uccf_printk() and related
functions, because they were just front-ends to printk().  Fixed some
spacing and tabbing issues.  Minor optimizations of some code.  Changed
the type of some variables to their proper type (mostly buffer
descriptors).

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-02-17 16:12:54 -06:00
Jeff Garzik 419ee448ff Remove JFFS (version 1), as scheduled.
Unmaintained for years, few if any users.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-17 16:10:59 -05:00
Chris Snook e81e557a8f atl1: add L1 device id to pci_ids, then use it
Add device id for the Attansic L1 chip to pci_ids.h, then use it.

Signed-off-by: Chris Snook <csnook@redhat.com>
Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-17 15:17:05 -05:00
Russell King f69eda00d4 Merge AT91, EP93xx, General devel, PXA, S3C, V6+ and Xscale trees 2007-02-17 20:09:53 +00:00
Uwe Kleine-König 9918cda523 [ARM] 4210/1: base for new machine type "NetSilicon NS9360"
Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-02-17 20:05:45 +00:00
Tobias Klauser c5a69d57eb Storage class should be before const qualifier
The C99 specification states in section 6.11.5:

The placement of a storage-class specifier other than at the
beginning of the declaration specifiers in a declaration is an
obsolescent feature.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2007-02-17 20:11:19 +01:00
Uwe Kleine-König 1b3c3714cb Fix typos concerning hierarchy
heirarchical, hierachical -> hierarchical
        heirarchy, hierachy -> hierarchy

Signed-off-by: Uwe Kleine-König <zeisberg@informatik.uni-freiburg.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2007-02-17 19:23:03 +01:00
Robert P. J. Day bbf2f9fb1c Fix misspellings of "agressive".
Fix the various misspellings of "agressive", as well as a couple
other things on the same lines while we're there.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2007-02-17 19:20:16 +01:00
Robert P. J. Day 6fb189c2a4 Correct trivial typo in log2.h.
Single typo correction in include/linux/log2.h.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2007-02-17 19:17:37 +01:00
Robert P. J. Day 405ae7d381 Replace remaining references to "driverfs" with "sysfs".
Globally, s/driverfs/sysfs/g.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2007-02-17 19:13:42 +01:00
Robert P. J. Day d08df601a3 Various typo fixes.
Correct mis-spellings of "algorithm", "appear", "consistent" and
(shame, shame) "kernel".

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2007-02-17 19:07:33 +01:00
Dan Williams 3668b45d46 [ARM] 4187/1: iop: unify time implementation across iop32x, iop33x, and iop13xx
* architecture specific details are handled in asm/arch/time.h
* ARCH_IOP13XX now selects PLAT_IOP
* as suggested by Lennert use ifdef CONFIG_XSCALE to skip the cp_wait on
XSC3

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-02-17 15:05:40 +00:00
Dan Williams 4434c5c7fd [ARM] 4186/1: iop: remove cp6_enable/disable routines
This functionality is replaced by cp6_trap

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-02-17 15:04:53 +00:00
Dan Williams f80dff9da0 [ARM] 4185/2: entry: introduce get_irqnr_preamble and arch_ret_to_user
get_irqnr_preamble allows machines to take some action before entering the
get_irqnr_and_base loop.  On iop we enable cp6 access.

arch_ret_to_user is added to the userspace return path to allow individual
architectures to take actions, like disabling coprocessor access, before
the final return to userspace.

Per Nicolas Pitre's note, there is no need to cp_wait on the return to user
as the latency to return is sufficient.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-02-17 15:04:29 +00:00
Ben Dooks 48adbcf33b [ARM] 4220/1: S3C24XX: DMA system initialised from sysdev
This patch gets the DMA system for the S3C24XX
ready for the S3C2443, which requires 6 dma channels
at a different stride, and different base IRQ.

The DMA system is now initialised from the same
drivers which apply the DMA mappings, as well
as removing the DMA sysdev intialisation out of
the main init code (which is now being called
from a sysdev probe, so cannot add a new sysdev)

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-02-17 15:00:34 +00:00
Ben Dooks 15e4db7b80 [ARM] 4219/1: S3C2443: DMA source definitions
Defines for the S3C2443 DMA source selection,
and update the maximum channels to 6 if the S3C2443
is selected.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-02-17 15:00:33 +00:00
Nicolas Pitre bc43fd40ea [ARM] 4090/2: avoid clash between PXA and SA1111 defines
The Lubbock platform uses both a PXA25x and a SA1111 at the same time.
Both chips have the same "Serial Audio Controller" registers although
the SA1111 one is never expected to be used in preference to the PXA25x
one. So let's disable the SA1111 defines whenever compilation is for a
PXA architecture and make the PXA defines always defined.

This removes a bunch of "already defined" warnings as well since the
current hack to prevent them depended on include ordering which wasn't
always right.

While at it, clean up the SA1111 defines allowing to get rid of the
__CCREG() macro.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-02-17 11:27:25 +00:00
Nicolas Pitre ca83b0bcf8 [ARM] 4216/1: add .gitignore entries for ARM specific files
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-02-17 11:26:41 +00:00
Arnaud Patard 52c477a34b [ARM] 4215/1: s3c2410 usb device: per-platform vbus_draw
Introduce a platform_device (machine) specific callback function
which gets called when the amount of power we can draw from Vbus
has changed.

Signed-off-by: Harald Welte <laforge@openmoko.org>
Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-02-17 11:17:40 +00:00
Arnaud Patard a7eec7b332 [ARM] 4213/1: S3C2410 - Update definition of ADCTSC_XY_PST
Update S3C2410_ADCTSC_XY_PST macro to allow setting the ADCTSC_XY_PST
bits.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-02-17 11:17:38 +00:00
Matthew Wilcox c3de4b3815 Revert "[PATCH] make kernel/signal.c:kill_proc_info() static"
This reverts commit d3228a887c.
DeBunk this code.  We need it for compat_sys_rt_sigqueueinfo.

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 01:20:07 -05:00
Helge Deller 513e7ecd69 [PARISC] convert to use CONFIG_64BIT instead of __LP64__
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 01:17:13 -05:00
Helge Deller 0b3d643f9e [PARISC] add ASM_EXCEPTIONTABLE_ENTRY() macro
- this macro unifies the code to add exception table entries
- additionally use ENTRY()/ENDPROC() at more places

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 01:16:26 -05:00
Helge Deller b288a8f79a [PARISC] fix ENTRY() and ENDPROC() for 64bit-parisc
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 01:15:51 -05:00
Helge Deller c5e7655297 [PARISC] implement standard ENTRY(), END() and ENDPROC()
Use the macros in entry.S

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 01:14:37 -05:00
Kyle McMartin 430a502abe [PARISC] kill ENTRY_SYS_CPUS
it's unlikely iCOD will ever happen on parisc-linux now... ;-)

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 01:11:41 -05:00
Kyle McMartin f354ef8abe [PARISC] rename *_ANY_ID to PA_*_ANY_ID in the exported header
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 01:09:12 -05:00
Kyle McMartin f2439b262a [PARISC] move parisc_device_id definition to mod_devicetable.h
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 01:08:11 -05:00
Kyle McMartin 4650f0a583 [PARISC] Add TIF_RESTORE_SIGMASK support
And unmask the pselect6/ppoll system calls.

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 01:06:04 -05:00
Helge Deller 6e16d9409e [PARISC] Convert soft power switch driver to kthread
And remove it's reference in time.c.
Allow lcd_print() to take a const char *.

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 01:03:43 -05:00
Helge Deller c4ba7a2e44 [PARISC] Use fstatat64 instead of newfstatat syscall
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 00:59:38 -05:00
Helge Deller 19dd705f4e [PARISC] add missing syscalls for vmsplice, move_pages, getcpu & epoll_pwait
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 00:57:56 -05:00
Helge Deller ca72a22327 [PARISC] fix fixup declarations for 32bit and use CONFIG_64BIT
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 00:56:16 -05:00
Helge Deller 94a1981df0 [PARISC] whitespace cleanups and unify 32/64bit user-access assembler inlines
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 00:54:42 -05:00
Helge Deller e382876474 [PARISC] fix build for WARN_ON() when CONFIG_DEBUG_BUGVERBOSE=y
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 00:53:19 -05:00
Helge Deller 6891f8a113 [PARISC] Generic BUG
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 00:51:46 -05:00
Matthew Wilcox e6fc0449be [PARISC] Remove sched.h from uaccess.h on parisc
Al Viro did this for x86-64 and reduced the number of dependencies on
sched.h significantly.  We had a couple of files which were relying on
uaccess.h pulling in sched.h, so they need explicit dependencies added.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 00:44:30 -05:00
Matthew Wilcox 3735313ad2 [PARISC] Add prototypes for flush_user_dcache_range and flush_user_icache_range
They're called from signal.c, so need to be prototyped

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 00:43:51 -05:00
Kyle McMartin 959f4f13a3 [PARISC] "Fix" circular includes
Use a really big hammer for the mean time to get things building again.

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 00:43:10 -05:00