]> err.no Git - linux-2.6/log
linux-2.6
16 years agob43: fix shared IRQ race condition
Stefano Brivio [Wed, 7 Nov 2007 17:16:11 +0000 (18:16 +0100)]
b43: fix shared IRQ race condition

Fix an IRQ race condition in b43. If we call b43_stop_wireless_core(), it
will set the status of the device to INITIALIZED and the IRQ handler won't
care any longer about IRQs, thus the kernel will disable the IRQ if it's
shared (unless we boot it with the 'irqpoll' option). So we must disable
IRQs before changing the device status.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agob43legacy: add me as maintainer and fix URLs
Stefano Brivio [Tue, 6 Nov 2007 21:48:56 +0000 (22:48 +0100)]
b43legacy: add me as maintainer and fix URLs

As b43legacy is going to be orphaned, add me as a maintainer. Fix URLs for
the related website and fix my e-mail address in MAINTAINERS file.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Cc: Larry Finger <larry.finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agob43legacy: fix possible buffer overrun in debugfs
Stefano Brivio [Tue, 6 Nov 2007 21:48:36 +0000 (22:48 +0100)]
b43legacy: fix possible buffer overrun in debugfs

Fix possible buffer overrun.

The patch to b43 by Michael Buesch <mb@bu3sch.de> has been ported to
b43legacy.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agob43: Rewrite and fix rfkill init
Michael Buesch [Sat, 3 Nov 2007 13:34:32 +0000 (14:34 +0100)]
b43: Rewrite and fix rfkill init

The rfkill subsystem doesn't like code like that
rfkill_allocate();
rfkill_register();
rfkill_unregister();
rfkill_register(); /* <- This will crash */

This sequence happens with
modprobe b43
ifconfig wlanX up
ifconfig wlanX down
ifconfig wlanX up

Fix this by always re-allocating the rfkill stuff before register.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agob43: debugfs SHM read buffer overrun fix
Michael Buesch [Fri, 2 Nov 2007 17:35:02 +0000 (18:35 +0100)]
b43: debugfs SHM read buffer overrun fix

Fix possible buffer overrun.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agob43: Fix rfkill callback deadlock
Michael Buesch [Sun, 28 Oct 2007 16:27:10 +0000 (17:27 +0100)]
b43: Fix rfkill callback deadlock

wl->mutex might already be locked on initialization.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agob43: pcmcia-host initialization bugfixes
Michael Buesch [Tue, 6 Nov 2007 15:36:41 +0000 (16:36 +0100)]
b43: pcmcia-host initialization bugfixes

Fix the initialization for PCMCIA devices.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoipw2100: fix postfix decrement errors
Roel Kluin [Mon, 5 Nov 2007 22:55:02 +0000 (23:55 +0100)]
ipw2100: fix postfix decrement errors

If i reaches zero, the loop ends, but the postfix decrement subtracts it to -1.
Testing for 'i == 0', later in the function, will not fulfill its purpose.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agohostap: fix section mismatch warning
Randy Dunlap [Mon, 29 Oct 2007 18:20:26 +0000 (11:20 -0700)]
hostap: fix section mismatch warning

Fix section mismatch warning:

WARNING: vmlinux.o(.data+0x36fcc): Section mismatch: reference to .init.data:prism2_pci_id_table (between 'prism2_pci_drv_id' and 'prism2_pci_funcs')

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agort2x00: Block adhoc & master mode
Ivo van Doorn [Sun, 28 Oct 2007 13:39:52 +0000 (14:39 +0100)]
rt2x00: Block adhoc & master mode

rt2x00 is broken when it comes down to adhoc and master mode.
The main problem is the beaconing, which is completely failing.
Untill a solution has been found, both beacon requiring modes
must be disabled to prevent numerous bug reports.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: properly account for queue commands
Marcelo Tosatti [Tue, 30 Oct 2007 14:52:46 +0000 (10:52 -0400)]
libertas: properly account for queue commands

Properly account for queue commands, this fixes a problem reported
by Holger Schurig when using the debugfs interface.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: make if_sdio align packets
Pierre Ossman [Mon, 22 Oct 2007 17:05:32 +0000 (19:05 +0200)]
libertas: make if_sdio align packets

Incoming packets have to be aligned or the IP stack becomes upset.
Make sure to shift them two bytes to achieve this.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: fixes for slow hardware
Holger Schurig [Tue, 9 Oct 2007 08:41:57 +0000 (10:41 +0200)]
libertas: fixes for slow hardware

Fixes for slow hardware.

Signed-off-by: Vitaly V. Bursov <vitalyvb@ukr.net>
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agohermes: clarify Intel reference in Kconfig help
John W. Linville [Fri, 2 Nov 2007 19:36:38 +0000 (15:36 -0400)]
hermes: clarify Intel reference in Kconfig help

The Intel device supported by the hermes driver core is the IPW2011.  The
"Intel PRO/Wireless" wording suggests the later Centrino devices and may
be confusing to some users.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agor8169: revert 7da97ec96a0934319c7fbedd3d38baf533e20640 (partly)
Mark Lord [Thu, 8 Nov 2007 00:03:04 +0000 (01:03 +0100)]
r8169: revert 7da97ec96a0934319c7fbedd3d38baf533e20640 (partly)

Various symptoms depending on the .config options:
- the card stops working after some (short) time
- the card does not work at all
- the card disappears (nothing in lspci/dmesg)

A real power-off is needed to recover the card.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
16 years agor8169: do not enable the TBI for the 8168 and the 81x0
Francois Romieu [Tue, 6 Nov 2007 21:56:10 +0000 (22:56 +0100)]
r8169: do not enable the TBI for the 8168 and the 81x0

The 8168c and the 8100e choke on it. I have not seen an indication
nor received a report that the TBI is being actively used on the
remaining 8168b and 8110. Let's disable it for now until someone
complains.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Matthias Winkler <m.winkler@unicon-ka.de>
Cc: Maarten Vanraes <maarten.vanraes@gmail.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
16 years agor8169: add PCI ID for the 8168 in the Abit Fatal1ty F-190HD motherboard
Ciaran McCreesh [Thu, 1 Nov 2007 21:48:15 +0000 (22:48 +0100)]
r8169: add PCI ID for the 8168 in the Abit Fatal1ty F-190HD motherboard

Signed-off-by: Ciaran McCreesh <ciaran.mccreesh@blueyonder.co.uk>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
16 years agoadd support for smc91x ethernet interface on zylonite
eric miao [Tue, 30 Oct 2007 01:48:41 +0000 (09:48 +0800)]
add support for smc91x ethernet interface on zylonite

This patch adds LAN91C111 ethernet interface support for zylonite
(a.k.a Marvell's PXA3xx Development Platform) with smc91x driver.

It would be better if a patch would support zylonite along with all
other PXA boards with a single binary of smc91x driver, but it looks
quite difficult for the moment, so ugly #ifdef is still used here.

Signed-off-by: Aleksey Makarov <amakarov@ru.mvista.com>
Acked-by: eric miao <eric.miao@marvell.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agosky2: version 1.20
Stephen Hemminger [Mon, 5 Nov 2007 23:52:14 +0000 (15:52 -0800)]
sky2: version 1.20

Version update to 1.20

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agosky2: handle advanced error recovery config issues
Stephen Hemminger [Mon, 5 Nov 2007 23:52:13 +0000 (15:52 -0800)]
sky2: handle advanced error recovery config issues

The PCI AER support may not work for a couple of reasons.
It may not be configured into the kernel or there may be a BIOS
bug that prevents MMCONFIG from working.  If MMCONFIG doesn't work
then the PCI registers that control AER will not be accessible via
pci_read_config functions; luckly there is another window to access
PCI space in the device, so use that.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agosky2: remove unneeded mask update
Stephen Hemminger [Mon, 5 Nov 2007 23:52:12 +0000 (15:52 -0800)]
sky2: remove unneeded mask update

The IRQ's is already masked on shutdown, and on startup avoid
touching PHY until after phy_init().

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agosky2: dont change LED after autoneg
Stephen Hemminger [Mon, 5 Nov 2007 23:52:11 +0000 (15:52 -0800)]
sky2: dont change LED after autoneg

Don't need to change LED's after auto negotiation, the chip
sets them correctly.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agosky2: longer PHY delay
Stephen Hemminger [Mon, 5 Nov 2007 23:52:10 +0000 (15:52 -0800)]
sky2: longer PHY delay

Increse phy delay and handle I/O errors.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agosky2: status ring race fix
Stephen Hemminger [Mon, 5 Nov 2007 23:52:09 +0000 (15:52 -0800)]
sky2: status ring race fix

The D-Link PCI-X board (and maybe others) can lie about status
ring entries. It seems it will update the register for last status
index before completing the DMA for the ring entry. To avoid reading
stale data, zap the old entry and check.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agosky2: enable PCI config writes
Stephen Hemminger [Mon, 5 Nov 2007 23:52:08 +0000 (15:52 -0800)]
sky2: enable PCI config writes

On some boards, PCI configuration space access is turned off by default.
The 2.6.24 driver doesn't turn it on, and should have.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata: Don't fail device revalidation for bad _GTF methods
Matthew Garrett [Thu, 8 Nov 2007 18:37:07 +0000 (18:37 +0000)]
libata: Don't fail device revalidation for bad _GTF methods

Experience suggests that the _GTF method may be bad. We currently fail
device revalidation in that case, which seems excessive.

Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agox86 - 32-bit ptrace emulation mishandles 6th arg
Chuck Ebbert [Wed, 7 Nov 2007 15:48:39 +0000 (10:48 -0500)]
x86 - 32-bit ptrace emulation mishandles 6th arg

[ jdike - Pushing Chuck's patch - see
http://lkml.org/lkml/2005/9/16/261 for some history and a test
program.  UML is also broken without this patch - its processes get
SIGBUS from the corrupt 6th argument to mmap being interpretted as a
file offset ]

When the 32-bit vDSO is used to make a system call, the %ebp register for
the 6th syscall arg has to be loaded from the user stack (where it's pushed
by the vDSO user code).  The native i386 kernel always does this before
stopping for syscall tracing, so %ebp can be seen and modified via ptrace
to access the 6th syscall argument.  The x86-64 kernel fails to do this,
presenting the stack address to ptrace instead.  This makes the %rbp value
seen by 64-bit ptrace of a 32-bit process, and the %ebp value seen by a
32-bit caller of ptrace, both differ from the native i386 behavior.

This patch fixes the problem by putting the word loaded from the user stack
into %rbp before calling syscall_trace_enter, and reloading the 6th syscall
argument from there afterwards (so ptrace can change it).  This makes the
behavior match that of i386 kernels.

Original-Patch-By: Roland McGrath <roland@redhat.com>
Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86_64: ia32 ptrace THREAD_AREA fix
Roland McGrath [Tue, 6 Nov 2007 23:30:38 +0000 (15:30 -0800)]
x86_64: ia32 ptrace THREAD_AREA fix

The addr argument to PTRACE_GET_THREAD_AREA and PTRACE_SET_THREAD_AREA is
not a magic constant.  It's derived from the segment register values being
used, which are computed originally from the index used with set_thread_area.
The value does not need to match what a native i386 kernel would accept.
It needs to match the segment selectors that can actually be in use in this
32-bit process.  The 64-bit ptrace support for PTRACE_GET_THREAD_AREA
(normally used only on 32-bit processes) is correct, but the 32-bit emulation
of ptrace is broken.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agovoyager: use struct instead of PARAM
Randy Dunlap [Sat, 10 Nov 2007 03:30:36 +0000 (04:30 +0100)]
voyager: use struct instead of PARAM

Use struct boot_params instead of PARAM + 0xoffsets.
Fixes one of many Voyager build problems.

arch/x86/kernel/setup_32.c:543: error: 'PARAM' undeclared (first use in this function)

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years ago[FUTEX] Fix address computation in compat code.
David Miller [Wed, 7 Nov 2007 05:13:56 +0000 (21:13 -0800)]
[FUTEX] Fix address computation in compat code.

compat_exit_robust_list() computes a pointer to the
futex entry in userspace as follows:

(void __user *)entry + futex_offset

'entry' is a 'struct robust_list __user *', and
'futex_offset' is a 'compat_long_t' (typically a 's32').

Things explode if the 32-bit sign bit is set in futex_offset.

Type promotion sign extends futex_offset to a 64-bit value before
adding it to 'entry'.

This triggered a problem on sparc64 running 32-bit applications which
would lock up a cpu looping forever in the fault handling for the
userspace load in handle_futex_death().

Compat userspace runs with address masking (wherein the cpu zeros out
the top 32-bits of every effective address given to a memory operation
instruction) so the sparc64 fault handler accounts for this by
zero'ing out the top 32-bits of the fault address too.

Since the kernel properly uses the compat_uptr interfaces, kernel side
accesses to compat userspace work too since they will only use
addresses with the top 32-bit clear.

Because of this compat futex layer bug we get into the following loop
when executing the get_user() load near the top of handle_futex_death():

1) load from address '0xfffffffff7f16bd8', FAULT
2) fault handler clears upper 32-bits, processes fault
   for address '0xf7f16bd8' which succeeds
3) goto #1

I want to thank Bernd Zeimetz, Josip Rodin, and Fabio Massimo Di Nitto
for their tireless efforts helping me track down this bug.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Fri, 9 Nov 2007 23:28:11 +0000 (15:28 -0800)]
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] IOSAPIC bogus error cleanup
  [IA64] Update printing of feature set bits
  [IA64] Fix IOSAPIC delivery mode setting
  [IA64] XPC heartbeat timer function must run on CPU 0
  [IA64] Clean up /proc/interrupts output
  [IA64] Disable/re-enable CPE interrupts on Altix
  [IA64] Clean-up McKinley Errata message
  [IA64] Add gate.lds to list of files ignored by Git
  [IA64] Fix section mismatch in contig.c version of per_cpu_init()
  [IA64] Wrong args to memset in efi_gettimeofday()
  [IA64] Remove duplicate includes from ia32priv.h
  [IA64] fix number of bytes zeroed by sys_fw_init() in arch/ia64/hp/sim/boot/fw-emu.c
  [IA64] Fix perfmon sysctl directory modes

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched
Linus Torvalds [Fri, 9 Nov 2007 23:27:54 +0000 (15:27 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched

* git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched:
  sched: proper prototype for kernel/sched.c:migration_init()
  sched: avoid large irq-latencies in smp-balancing
  sched: fix copy_namespace() <-> sched_fork() dependency in do_fork
  sched: clean up the wakeup preempt check, #2
  sched: clean up the wakeup preempt check
  sched: wakeup preemption fix
  sched: remove PREEMPT_RESTRICT
  sched: turn off PREEMPT_RESTRICT
  KVM: fix !SMP build error
  x86: make nmi_cpu_busy() always defined
  x86: make ipi_handler() always defined
  sched: cleanup, use NSEC_PER_MSEC and NSEC_PER_SEC
  sched: reintroduce SMP tunings again
  sched: restore deterministic CPU accounting on powerpc
  sched: fix delay accounting regression
  sched: reintroduce the sched_min_granularity tunable
  sched: documentation: place_entity() comments
  sched: fix vslice

16 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6
Linus Torvalds [Fri, 9 Nov 2007 23:25:29 +0000 (15:25 -0800)]
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: (26 commits)
  sh: remove dead config symbols from SH code
  sh: Kill off broken snapgear ds1302 code.
  sh: Add a dummy vga.h.
  rtc: rtc-sh: Zero out tm value for invalid rtc states.
  rtc: sh-rtc: Handle rtc_device_register() failure properly.
  sh: Fix heartbeart on Solution Engine series
  sh: Remove SCI_NPORTS from sh-sci.h
  sh: Fix up PAGE_KERNEL_PCC() for nommu.
  sh: hs7751rvoip: Kill off dead IPR IRQ mappings.
  sh: hs7751rvoip: irq.c needs linux/interrupt.h.
  sh: Kill off __{copy,clear}_user_page().
  sh: Optimized copy_{to,from}_user_page() for SH-4.
  sh: Wire up clear_user_highpage().
  sh: Kill off the remaining ST40 cruft.
  superhyway: Handle device_register() retval properly.
  sh: kgdb sysrq depends on magic sysrq.
  sh: Add -Werror for clean directories.
  sh: Fix up kgdb build with modular sh-sci.
  sh: Export __{s,u}divsi3_i4i on all CPUs.
  sh: Fix up kgdb-on-NMI branch target.
  ...

16 years ago[CIFS] fix oops on second mount to same server when null auth is used
Jeff Layton [Fri, 9 Nov 2007 23:25:04 +0000 (23:25 +0000)]
[CIFS] fix oops on second mount to same server when null auth is used

When a share is mounted using no username, cifs_mount sets
volume_info.username as a NULL pointer, and the sesInfo userName as an
empty string. The volume_info.username is passed to a couple of other
functions to see if there is an existing unc or tcp connection that can
be used. These functions assume that the username will be a valid
string that can be passed to strncmp. If the pointer is NULL, then the
kernel will oops if there's an existing session to which the string
can be compared.

This patch changes cifs_mount to set volume_info.username to an empty
string in this situation, which prevents the oops and should make it
so that the comparison to other null auth sessions match.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
16 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Fri, 9 Nov 2007 23:24:19 +0000 (15:24 -0800)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] pxa: fix one-shot timer mode
  [ARM] 4645/1: Cyberpro: Trivial fix to restore 16bpp mode.
  [ARM] 4644/2: fix flush_kern_tlb_range() in module space
  [ARM] Allow watchdog drivers to be selected again
  [ARM] 4633/1: omap build fix when FB enabled
  [ARM] 4642/2: netX: default config for netx based boards
  [ARM] 4641/2: netX: fix kobject_name type
  [ARM] Fix iop3xx macro

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Fri, 9 Nov 2007 23:19:54 +0000 (15:19 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  [LIB] crc32c: Keep intermediate crc state in cpu order

16 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
Linus Torvalds [Fri, 9 Nov 2007 23:17:49 +0000 (15:17 -0800)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block

* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
  Add UNPLUG traces to all appropriate places
  block: fix requeue handling in blk_queue_invalidate_tags()
  mmc: Fix sg helper copy-and-paste error
  pktcdvd: fix BUG caused by sysfs module reference semantics change
  ioprio: allow sys_ioprio_set() value of 0 to reset ioprio setting
  cfq_idle_class_timer: add paranoid checks for jiffies overflow
  cfq: fix IOPRIO_CLASS_IDLE delays
  cfq: fix IOPRIO_CLASS_IDLE accounting

16 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
Linus Torvalds [Fri, 9 Nov 2007 23:16:52 +0000 (15:16 -0800)]
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (37 commits)
  [POWERPC] EEH: Make sure warning message is printed
  [POWERPC] Make altivec code in swsusp_32.S depend on CONFIG_ALTIVEC
  [POWERPC] windfarm: Fix windfarm thread freezer interaction
  [POWERPC] Fix si_addr value on low level hash failures
  [POWERPC] Refresh ppc64_defconfig and enable pasemi-related options
  [POWERPC] pasemi: Update defconfig
  [POWERPC] iSeries: Fix ref counting in vio setup
  [POWERPC] ] Fix memset size error
  [POWERPC] Fix link errors for allyesconfig
  [POWERPC] iSeries_init_IRQ non-PCI tidy
  [POWERPC] Change fallocate to match unistd.h on powerpc
  [POWERPC] EEH: Avoid crash on null device
  [POWERPC] EEH: Drivers that need reset trump others
  [POWERPC] EEH: Clean up comments
  [POWERPC] Fix off-by-one error in setting decrementer on Book E/4xx (v2)
  [POWERPC] Fix switch_slb handling of 1T ESID values
  [POWERPC] Fix build failure when CONFIG_VIRT_CPU_ACCOUNTING is not defined
  [POWERPC] Include udbg.h when using udbg_printf
  [POWERPC] Fix cache line vs. block size confusion
  [POWERPC] Fix sysctl table check failure on PowerMac
  ...

16 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfashe...
Linus Torvalds [Fri, 9 Nov 2007 23:11:58 +0000 (15:11 -0800)]
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2:
  ocfs2: fix rename vs unlink race
  [PATCH] Fix possibly too long write in o2hb_setup_one_bio()
  ocfs2: fix write() performance regression
  ocfs2: Commit journal on sync writes
  ocfs2: Re-order iput in ocfs2_drop_dentry_lock
  ocfs2: Create locks at initially requested level
  [PATCH] Fix priority mistakes in fs/ocfs2/{alloc.c, dlmglue.c}
  [2.6 patch] make ocfs2_find_entry_el() static

16 years agofrv: Remove bogus NO_IRQ = -1 define
Alan Cox [Wed, 7 Nov 2007 16:53:00 +0000 (16:53 +0000)]
frv: Remove bogus NO_IRQ = -1 define

The old NO_IRQ define some platforms had was long ago declared obsolete
and wrong. FRV should therefore not be re-introducing this, especially as
IRQs are usually unsigned in the kernel. The "no IRQ" case is defined to be
zero and Linus made this rather clear at the time.

arch/frv shows no dependancy on this but it might show up driver fixes
needing doing I guess

Signed-off-by: Alan Cox <alan@redhat.com>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Fri, 9 Nov 2007 23:08:37 +0000 (15:08 -0800)]
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6

* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: Use "is_power_of_2" macro for simplicity.
  [SPARC]: Remove duplicate includes.

16 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Fri, 9 Nov 2007 23:07:57 +0000 (15:07 -0800)]
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (44 commits)
  [NETLINK]: Fix unicast timeouts
  [INET]: Remove per bucket rwlock in tcp/dccp ehash table.
  [IPVS]: Synchronize closing of Connections
  [IPVS]: Bind connections on stanby if the destination exists
  [NET]: Remove Documentation/networking/pt.txt
  [NET]: Remove Documentation/networking/routing.txt
  [NET]: Remove Documentation/networking/ncsa-telnet
  [NET]: Remove comx driver docs.
  [NET]: Remove Documentation/networking/Configurable
  [NET]: Clean proto_(un)register from in-code ifdefs
  [IPSEC]: Fix crypto_alloc_comp error checking
  [VLAN]: Fix SET_VLAN_INGRESS_PRIORITY_CMD ioctl
  [NETNS]: Fix compiler error in net_namespace.c
  [TTY]: Use tty_mode_ioctl() in network drivers.
  [TTY]: Fix network driver interactions with TCGET/SET calls.
  [PKT_SCHED] CLS_U32: Fix endianness problem with u32 classifier hash masks.
  [NET]: Removing duplicit #includes
  [NET]: Let USB_USBNET always select MII.
  [RRUNNER]: Do not muck with sysctl_{r,w}mem_max
  [DLM] lowcomms: Do not muck with sysctl_rmem_max.
  ...

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
Linus Torvalds [Fri, 9 Nov 2007 23:04:12 +0000 (15:04 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  firewire: fw-sbp2: fix refcounting

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Fri, 9 Nov 2007 23:02:43 +0000 (15:02 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6:
  SELinux: add more validity checks on policy load
  SELinux: fix bug in new ebitmap code.
  SELinux: suppress a warning for 64k pages.

16 years agoFRV: Remove the section annotation on free_initmem()
David Howells [Tue, 6 Nov 2007 21:54:44 +0000 (21:54 +0000)]
FRV: Remove the section annotation on free_initmem()

Remove the section annotation on FRV's free_initmem().  It can't be marked
__init, lest it free itself.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agosched: proper prototype for kernel/sched.c:migration_init()
Adrian Bunk [Fri, 9 Nov 2007 21:39:39 +0000 (22:39 +0100)]
sched: proper prototype for kernel/sched.c:migration_init()

This patch adds a proper prototype for migration_init() in
include/linux/sched.h

Since there's no point in always returning 0 to a caller that doesn't check
the return value it also changes the function to return void.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: avoid large irq-latencies in smp-balancing
Peter Zijlstra [Fri, 9 Nov 2007 21:39:39 +0000 (22:39 +0100)]
sched: avoid large irq-latencies in smp-balancing

SMP balancing is done with IRQs disabled and can iterate the full rq.
When rqs are large this can cause large irq-latencies. Limit the nr of
iterations on each run.

This fixes a scheduling latency regression reported by the -rt folks.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Tested-by: Gregory Haskins <ghaskins@novell.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: fix copy_namespace() <-> sched_fork() dependency in do_fork
Srivatsa Vaddagiri [Fri, 9 Nov 2007 21:39:39 +0000 (22:39 +0100)]
sched: fix copy_namespace() <-> sched_fork() dependency in do_fork

Sukadev Bhattiprolu reported a kernel crash with control groups.
There are couple of problems discovered by Suka's test:

- The test requires the cgroup filesystem to be mounted with
  atleast the cpu and ns options (i.e both namespace and cpu
  controllers are active in the same hierarchy).

# mkdir /dev/cpuctl
# mount -t cgroup -ocpu,ns none cpuctl
(or simply)
# mount -t cgroup none cpuctl -> Will activate all controllers
 in same hierarchy.

- The test invokes clone() with CLONE_NEWNS set. This causes a a new child
  to be created, also a new group (do_fork->copy_namespaces->ns_cgroup_clone->
  cgroup_clone) and the child is attached to the new group (cgroup_clone->
  attach_task->sched_move_task). At this point in time, the child's scheduler
  related fields are uninitialized (including its on_rq field, which it has
  inherited from parent). As a result sched_move_task thinks its on
  runqueue, when it isn't.

  As a solution to this problem, I moved sched_fork() call, which
  initializes scheduler related fields on a new task, before
  copy_namespaces(). I am not sure though whether moving up will
  cause other side-effects. Do you see any issue?

- The second problem exposed by this test is that task_new_fair()
  assumes that parent and child will be part of the same group (which
  needn't be as this test shows). As a result, cfs_rq->curr can be NULL
  for the child.

  The solution is to test for curr pointer being NULL in
  task_new_fair().

With the patch below, I could run ns_exec() fine w/o a crash.

Reported-by: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Signed-off-by: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: clean up the wakeup preempt check, #2
Ingo Molnar [Fri, 9 Nov 2007 21:39:39 +0000 (22:39 +0100)]
sched: clean up the wakeup preempt check, #2

clean up the preemption check to not use unnecessary 64-bit
variables. This improves code size:

   text    data     bss     dec     hex filename
  44227    3326      36   47589    b9e5 sched.o.before
  44201    3326      36   47563    b9cb sched.o.after

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: clean up the wakeup preempt check
Ingo Molnar [Fri, 9 Nov 2007 21:39:39 +0000 (22:39 +0100)]
sched: clean up the wakeup preempt check

clean up the wakeup preemption check. No code changed:

   text    data     bss     dec     hex filename
  44227    3326      36   47589    b9e5 sched.o.before
  44227    3326      36   47589    b9e5 sched.o.after

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: wakeup preemption fix
Ingo Molnar [Fri, 9 Nov 2007 21:39:39 +0000 (22:39 +0100)]
sched: wakeup preemption fix

wakeup preemption fix: do not make it dependent on p->prio.
Preemption purely depends on ->vruntime.

This improves preemption in mixed-nice-level workloads.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: remove PREEMPT_RESTRICT
Ingo Molnar [Fri, 9 Nov 2007 21:39:39 +0000 (22:39 +0100)]
sched: remove PREEMPT_RESTRICT

remove PREEMPT_RESTRICT. (this is a separate commit so that any
regression related to the removal itself is bisectable)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: turn off PREEMPT_RESTRICT
Ingo Molnar [Fri, 9 Nov 2007 21:39:39 +0000 (22:39 +0100)]
sched: turn off PREEMPT_RESTRICT

PREEMPT_RESTRICT was a method aimed at reducing the amount of wakeup
related preemption. It has a disadvantage though, it can prevent
legitimate wakeups if a task is 'unlucky' to be hit too early by a tick
that clears peer_preempt.

Now that the wakeup preemption has been cleaned up we dont seem to have
excessive preemptions anymore, so this feature can be turned off. (and
removed in the next patch)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoKVM: fix !SMP build error
Ingo Molnar [Fri, 9 Nov 2007 21:39:38 +0000 (22:39 +0100)]
KVM: fix !SMP build error

fix a !SMP build error:

drivers/kvm/kvm_main.c: In function 'kvm_flush_remote_tlbs':
drivers/kvm/kvm_main.c:220: error: implicit declaration of function 'smp_call_function_mask'

(and also avoid unused function warning related to up_smp_call_function()
not making use of the 'func' parameter.)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: make nmi_cpu_busy() always defined
Ingo Molnar [Fri, 9 Nov 2007 21:39:38 +0000 (22:39 +0100)]
x86: make nmi_cpu_busy() always defined

nmi_cpu_busy() must be available on !SMP too.

this is in preparation to a smp_call_function_mask() fix.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: make ipi_handler() always defined
Ingo Molnar [Fri, 9 Nov 2007 21:39:38 +0000 (22:39 +0100)]
x86: make ipi_handler() always defined

prepare for up_smp_call_function() to ensure that the 'func'
pointer is unused. (which is related to a KVM build fix)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: cleanup, use NSEC_PER_MSEC and NSEC_PER_SEC
Eric Dumazet [Fri, 9 Nov 2007 21:39:38 +0000 (22:39 +0100)]
sched: cleanup, use NSEC_PER_MSEC and NSEC_PER_SEC

1) hardcoded 1000000000 value is used five times in places where
   NSEC_PER_SEC might be more readable.

2) A conversion from nsec to msec uses the hardcoded 1000000 value,
   which is a candidate for NSEC_PER_MSEC.

no code changed:

    text    data     bss     dec     hex filename
   44359    3326      36   47721    ba69 sched.o.before
   44359    3326      36   47721    ba69 sched.o.after

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: reintroduce SMP tunings again
Ingo Molnar [Fri, 9 Nov 2007 21:39:38 +0000 (22:39 +0100)]
sched: reintroduce SMP tunings again

Yanmin Zhang reported an aim7 regression and bisected it down to:

 |  commit 38ad464d410dadceda1563f36bdb0be7fe4c8938
 |  Author: Ingo Molnar <mingo@elte.hu>
 |  Date:   Mon Oct 15 17:00:02 2007 +0200
 |
 |     sched: uniform tunings
 |
 |     use the same defaults on both UP and SMP.

fix this by reintroducing similar SMP tunings again. This resolves
the regression.

(also update the comments to match the ilog2(nr_cpus) tuning effect)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: restore deterministic CPU accounting on powerpc
Paul Mackerras [Fri, 9 Nov 2007 21:39:38 +0000 (22:39 +0100)]
sched: restore deterministic CPU accounting on powerpc

Since powerpc started using CONFIG_GENERIC_CLOCKEVENTS, the
deterministic CPU accounting (CONFIG_VIRT_CPU_ACCOUNTING) has been
broken on powerpc, because we end up counting user time twice: once in
timer_interrupt() and once in update_process_times().

This fixes the problem by pulling the code in update_process_times
that updates utime and stime into a separate function called
account_process_tick.  If CONFIG_VIRT_CPU_ACCOUNTING is not defined,
there is a version of account_process_tick in kernel/timer.c that
simply accounts a whole tick to either utime or stime as before.  If
CONFIG_VIRT_CPU_ACCOUNTING is defined, then arch code gets to
implement account_process_tick.

This also lets us simplify the s390 code a bit; it means that the s390
timer interrupt can now call update_process_times even when
CONFIG_VIRT_CPU_ACCOUNTING is turned on, and can just implement a
suitable account_process_tick().

account_process_tick() now takes the task_struct * as an argument.
Tested both with and without CONFIG_VIRT_CPU_ACCOUNTING.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: fix delay accounting regression
Balbir Singh [Fri, 9 Nov 2007 21:39:37 +0000 (22:39 +0100)]
sched: fix delay accounting regression

Fix the delay accounting regression introduced by commit
75d4ef16a6aa84f708188bada182315f80aab6fa. rq no longer has sched_info
data associated with it. task_struct sched_info structure is used by delay
accounting to provide back statistics to user space.

also remove direct use of sched_clock() (which is not a valid thing to
do anymore) and use rq->clock instead.

Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: reintroduce the sched_min_granularity tunable
Peter Zijlstra [Fri, 9 Nov 2007 21:39:37 +0000 (22:39 +0100)]
sched: reintroduce the sched_min_granularity tunable

we lost the sched_min_granularity tunable to a clever optimization
that uses the sched_latency/min_granularity ratio - but the ratio
is quite unintuitive to users and can also crash the kernel if the
ratio is set to 0. So reintroduce the min_granularity tunable,
while keeping the ratio maintained internally.

no functionality changed.

[ mingo@elte.hu: some fixlets. ]

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: documentation: place_entity() comments
Peter Zijlstra [Fri, 9 Nov 2007 21:39:37 +0000 (22:39 +0100)]
sched: documentation: place_entity() comments

Add a few comments to place_entity(). No code changed.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: fix vslice
Peter Zijlstra [Fri, 9 Nov 2007 21:39:37 +0000 (22:39 +0100)]
sched: fix vslice

vslice was missing a factor NICE_0_LOAD, as weight is in
weight*NICE_0_LOAD units.

the effect of this bug was larger initial slices and
thus latency-noisier forks.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years ago[IA64] IOSAPIC bogus error cleanup
George Beshers [Thu, 11 Oct 2007 19:33:55 +0000 (15:33 -0400)]
[IA64] IOSAPIC bogus error cleanup

On Altix (sn2) machines the "Error parsing MADT" message is
misleading because the lack of IOSAPIC entries is expected.

Since I am sure someone will ask, I have been told that
the chance of this changing anytime soon is close to nil.

Signed-off-by: George Beshers <gbeshers@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] Update printing of feature set bits
Russ Anderson [Tue, 16 Oct 2007 22:02:38 +0000 (17:02 -0500)]
[IA64] Update printing of feature set bits

Newer Itanium versions have added additional processor feature set
bits.  This patch prints all the implemented feature set bits.  Some
bit descriptions have not been made public.  For those bits, a generic
"Feature set X bit Y" message is printed.  Bits that are not implemented
will no longer be printed.

Signed-off-by: Russ Anderson <rja@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] Fix IOSAPIC delivery mode setting
Kenji Kaneshige [Wed, 7 Nov 2007 06:38:30 +0000 (15:38 +0900)]
[IA64] Fix IOSAPIC delivery mode setting

Fix the problem that redirect hit bit in I/O SAPIC RTE is set even
when it must be disabled (e.g. nointroute boot option is set, CPU
hotplug is enabled or percpu vector is enabled).

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] XPC heartbeat timer function must run on CPU 0
Dean Nelson [Wed, 7 Nov 2007 13:53:06 +0000 (07:53 -0600)]
[IA64] XPC heartbeat timer function must run on CPU 0

Currently, XPC's heartbeat timer function runs on whatever CPU modprobe/insmod
ran on when XPC was started. To avoid the heartbeat from being delayed for
long periods the timer function must run on CPU 0.

N.B. Altix doesn't currently allow cpu0 to be taken offline, so this is
safe for now.  This code must be revised when offline of cpu0 is enabled.

Signed-off-by: Dean Nelson <dcn@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years agoSCTP: Always flush the queue when uncorcking.
Vlad Yasevich [Fri, 9 Nov 2007 16:43:41 +0000 (11:43 -0500)]
SCTP: Always flush the queue when uncorcking.

When the code calls uncork, trigger a queue flush, even
if the queue was not corked.  Most callers that explicitely
cork the queue will have additinal checks to see if they
corked it.  Callers who do not cork the queue expect packets
to flow when they call uncork.

The scneario that showcased this bug happend when we were not
able to bundle DATA with outgoing COOKIE-ECHO.  As a result
the data just sat in the outqueue and did not get transmitted.
The application expected a response, but nothing happened.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
16 years agoSCTP: Clean-up some defines for regressions tests.
Vlad Yasevich [Fri, 9 Nov 2007 16:43:41 +0000 (11:43 -0500)]
SCTP: Clean-up some defines for regressions tests.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
16 years agoSCTP: Fix PR-SCTP to deliver all the accumulated ordered chunks
Vlad Yasevich [Fri, 9 Nov 2007 16:43:41 +0000 (11:43 -0500)]
SCTP: Fix PR-SCTP to deliver all the accumulated ordered chunks

There is a small bug when we process a FWD-TSN.  We'll deliver
anything upto the current next expected SSN.  However, if the
next expected is already in the queue, it will take another
chunk to trigger its delivery.  The fix is to simply check
the current queued SSN is the next expected one.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
16 years agoSCTP: Make sctp_verify_param return multiple indications.
Vlad Yasevich [Fri, 9 Nov 2007 16:43:41 +0000 (11:43 -0500)]
SCTP: Make sctp_verify_param return multiple indications.

SCTP-AUTH and future ADD-IP updates have a requirement to
do additional verification of parameters and an ability to
ABORT the association if verification fails.  So, introduce
additional return code so that we can clear signal a required
action.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
16 years agoSCTP: Convert custom hash lists to use hlist.
Vlad Yasevich [Fri, 9 Nov 2007 16:43:40 +0000 (11:43 -0500)]
SCTP: Convert custom hash lists to use hlist.

Convert the custom hash list traversals to use hlist functions.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
16 years agoSCTP: Use hashed lookup when looking for an association.
Vlad Yasevich [Fri, 9 Nov 2007 16:41:36 +0000 (11:41 -0500)]
SCTP: Use hashed lookup when looking for an association.

A SCTP endpoint may have a lot of associations on them and walking
the list is fairly inefficient.  Instead, use a hashed lookup,
and filter out the hash list based on the endopoing we already have.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
16 years agoAdd UNPLUG traces to all appropriate places
Alan D. Brunelle [Wed, 7 Nov 2007 19:26:56 +0000 (14:26 -0500)]
Add UNPLUG traces to all appropriate places

Added blk_unplug interface, allowing all invocations of unplugs to result
in a generated blktrace UNPLUG.

Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoblock: fix requeue handling in blk_queue_invalidate_tags()
Jens Axboe [Fri, 9 Nov 2007 11:52:45 +0000 (12:52 +0100)]
block: fix requeue handling in blk_queue_invalidate_tags()

Credit goes to juergen.kadidlo@exasol.com for diagnosing this issue
and supplying the initial patch.

blk_queue_invalidate_tags() must use the proper requeueing paths instead
of open coding the re-add of the request, otherwise we bug out in rq
accounting. Just switch to using blk_requeue_request(), that takes care
of end-tag handling as well and also adds the blktrace REQUEUE notify
event that is also appropriate here.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh64-2.6
Paul Mundt [Fri, 9 Nov 2007 08:59:53 +0000 (17:59 +0900)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh64-2.6

16 years ago[ARM] pxa: fix one-shot timer mode
Russell King [Thu, 8 Nov 2007 23:35:46 +0000 (23:35 +0000)]
[ARM] pxa: fix one-shot timer mode

One-shot timer mode on PXA has various bugs which prevent kernels
build with NO_HZ enabled booting.  They end up spinning on a
permanently asserted timer interrupt because we don't properly
clear it down - clearing the OIER bit does not stop the pending
interrupt status.  Fix this in the set_mode handler as well.

Moreover, the code which sets the next expiry point may race with
the hardware, and we might not set the match register sufficiently
in the future.  If we encounter that situation, return -ETIME so
the generic time code retries.

Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[ARM] 4645/1: Cyberpro: Trivial fix to restore 16bpp mode.
Jan Rinze [Thu, 8 Nov 2007 20:51:05 +0000 (21:51 +0100)]
[ARM] 4645/1: Cyberpro: Trivial fix to restore 16bpp mode.

Cyberpro: when user requests 16bpp, use it and not 24bpp.
There was a missing break causing requests for 16bpp mode
to end up in 24bpp mode.

Signed-off-by: Jan Rinze Peterzon <janrinze@home.nl>
Acked-by: Ralph Siemsen <ralphs@netwinder.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[CIFS] Fix stale mode after readdir when cifsacl specified
Steve French [Thu, 8 Nov 2007 23:10:32 +0000 (23:10 +0000)]
[CIFS] Fix stale mode after readdir when cifsacl specified

When mounted with cifsacl mount option, readdir can not
instantiate the inode with the estimated mode based on the ACL
for each file since we have not queried for the ACL for
each of these files yet.  So set the refresh time to zero
for these inodes so that the next stat will cause the client
to go to the server for the ACL info so we can build the estimated
mode (this means we also will issue an extra QueryPathInfo if
the stat happens within 1 second, but this is trivial compared to
the time required to open/getacl/close for each).

ls -l is slower when cifsacl mount option is specified, but
displays correct mode information.

Signed-off-by: Shirish Pargaonkar <shirishp@us.ibm.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
16 years ago[CIFS] add mode to acl conversion helper function
Steve French [Thu, 8 Nov 2007 21:12:01 +0000 (21:12 +0000)]
[CIFS] add mode to acl conversion helper function

Acked-by: Shirish Pargaonkar <shirishp@us.ibm.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
16 years agosh: remove dead config symbols from SH code
Jiri Olsa [Thu, 8 Nov 2007 19:45:29 +0000 (04:45 +0900)]
sh: remove dead config symbols from SH code

Signed-off-by: Jiri Olsa <olsajiri@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agolibata: port and host should be stopped before hardware resources are released
Tejun Heo [Thu, 8 Nov 2007 04:09:00 +0000 (13:09 +0900)]
libata: port and host should be stopped before hardware resources are released

Port / host stop calls used to be made from ata_host_release() which
is called after all hardware resources acquired after host allocation
are released.  This is wrong as port and host stop routines often
access the hardware.

Add separate devres for port / host stop which is invoked right after
IRQ is released but with all other hardware resources intact.  The
devres is added iff ->host_stop and/or ->port_stop exist.

This problem has been spotted by Mark Lord.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Mark Lord <liml@rtr.ca>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata: skip 0xff polling for PATA controllers
Tejun Heo [Thu, 8 Nov 2007 02:20:18 +0000 (11:20 +0900)]
libata: skip 0xff polling for PATA controllers

In a presentation of true workmanship, pata_ali asserts IRQ
permanantly if the TF status register is read more than once when
there's no device attached to the port.

Avoid waiting polling for !0xff if it's PATA.  It's needed only for
some rare SATA devices anyway.

This problem is reported by Luca Tettamanti in bugzilla bug 9298.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Tested-By: Luca Tettamanti <kronos.it@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata: pata_platform: Support polling-mode configuration.
Paul Mundt [Thu, 8 Nov 2007 02:15:21 +0000 (11:15 +0900)]
libata: pata_platform: Support polling-mode configuration.

Some SH boards (old R2D-1 boards) have generally not had working CF
under libata, due to both buswidth issues (handled by Aoi Shinkai
in 43f4b8c7578b928892b6f01d374346ae14e5eb70), and buggy interrupt
controllers. For these sorts of boards simply disabling the IRQ and
polling ends up working fine.

This conditionalizes the IRQ resource for pata_platform and lets
platforms that want to use polling mode simply omit the resource
entirely.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata: Support PIO polling-only hosts.
Paul Mundt [Thu, 8 Nov 2007 02:14:56 +0000 (11:14 +0900)]
libata: Support PIO polling-only hosts.

By default ata_host_activate() expects a valid IRQ in order to
successfully register the host. This patch enables a special case
for registering polling-only hosts that either don't have IRQs
or have buggy IRQ generation (either in terms of handling or
sensing), which otherwise work fine.

Hosts that want to use polling mode can simply set ATA_FLAG_PIO_POLLING
and pass in an invalid IRQ.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata sata_qstor conversion to new error handling (EH).
Mark Lord [Wed, 7 Nov 2007 15:54:15 +0000 (10:54 -0500)]
libata sata_qstor conversion to new error handling (EH).

sata_qstor conversion to new error handling (EH).

Convert sata_qstor to use the newer libata EH mechanisms.
Based on earlier work by Jeff Garzik.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata sata_qstor workaround for spurious interrupts
Mark Lord [Wed, 7 Nov 2007 15:53:41 +0000 (10:53 -0500)]
libata sata_qstor workaround for spurious interrupts

sata_qstor workaround for spurious interrupts.

The qstor hardware generates spurious interrupts from time to time when
switching in and out of packet mode.  These eventually result in the
IRQ being disabled, which kills other devices sharing this IRQ with us.

This workaround isn't perfect, but it's about the best we can do for
this hardware.  Spurious interrupts will still happen, but won't be
logged as such, and therefore won't cause the IRQ to be inadvertently
disabled.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata sata_qstor nuke idle state
Mark Lord [Wed, 7 Nov 2007 15:52:55 +0000 (10:52 -0500)]
libata sata_qstor nuke idle state

sata_qstor nuke idle state.

We're really only ever in one of two hardware states:  packet, or mmio.
Get rid of unnecessary "qs_state_idle" state.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agonv_hardreset: update dangling reference to bugzilla entry
Fernando Luis Vázquez Cao [Wed, 7 Nov 2007 07:33:49 +0000 (16:33 +0900)]
nv_hardreset: update dangling reference to bugzilla entry

Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoata_piix: add SATELLITE PRO U200 to broken suspend list
Yann Chachkoff [Wed, 7 Nov 2007 03:02:27 +0000 (12:02 +0900)]
ata_piix: add SATELLITE PRO U200 to broken suspend list

Please warmly welcome the PRO variant of Satellite U200 to the broken
suspend list.

Original patch is from Yann Chachkoff.  Patch reformatted and
forwarded by Tejun Heo.

Signed-off-by: Yann Chachkoff <yann.chachkoff@myrealbox.com>
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years ago[CIFS] Fix incorrect mode when ACL had deny access control entries
Steve French [Thu, 8 Nov 2007 17:57:40 +0000 (17:57 +0000)]
[CIFS] Fix incorrect mode when ACL had deny access control entries

When mounted with the cifsacl mount option, we were
treating any deny ACEs found like allow ACEs and it turns out for
SFU and SUA Windows set these type of access control entries often.
The order of ACEs is important too.  The canonical order that most
ACL tools and Windows explorer consruct ACLs with is to begin with
DENY entries then follow with ALLOW, otherwise an allow entry
could be encountered first, making the subsequent deny entry like "dead
code which would be superflous since Windows stops when a match is
made for the operation you are trying to perform for your user

We start with no permissions in the mode and build up as we find
permissions (ie allow ACEs).  This fixes deny ACEs so they affect
the mask used to set the subsequent allow ACEs.

Acked-by: Shirish Pargaonkar <shirishp@us.ibm.com>
CC: Alexander Bokovoy <ab@samba.org>
Signed-off-by: Steve French <sfrench@us.ibm.com>
16 years ago[CIFS] Add uid to key description so krb can handle user mounts
Igor Mammedov [Thu, 8 Nov 2007 16:13:31 +0000 (16:13 +0000)]
[CIFS] Add uid to key description so krb can handle user mounts

Adds uid to key description fro supporting user mounts
and minor formating changes

Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Igor Mammedov <niallain@gmail.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
16 years ago[LIB] crc32c: Keep intermediate crc state in cpu order
Benny Halevy [Thu, 8 Nov 2007 13:34:09 +0000 (21:34 +0800)]
[LIB] crc32c: Keep intermediate crc state in cpu order

crypto/crc32.c:chksum_final() is computing the digest as
*(__le32 *)out = ~cpu_to_le32(mctx->crc);
so the low-level crc32c_le routines should just keep
the crc in cpu order, otherwise it is getting swabbed
one too many times on big-endian machines.

Signed-off-by: Benny Halevy <bhalevy@fs1.bhalevy.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
16 years agommc: Fix sg helper copy-and-paste error
Roland Dreier [Thu, 8 Nov 2007 12:50:58 +0000 (13:50 +0100)]
mmc: Fix sg helper copy-and-paste error

Commit 45711f1a ("[SG] Update drivers to use sg helpers") had the
following bogus change in drivers/mmc/card/queue.c:

    > - src_buf = page_address(src->page) + src->offset;
    > + src_buf = sg_virt(dst);

(Notice that "src" is converted to "dst").  Turn this "dst" back into
the intended "src".

Signed-off-by: Roland Dreier <roland@digitalvampire.org>
Tested-by: Romano Giannetti <romano.giannetti@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years ago[ARM] 4644/2: fix flush_kern_tlb_range() in module space
Kevin Hilman [Thu, 8 Nov 2007 00:48:16 +0000 (01:48 +0100)]
[ARM] 4644/2: fix flush_kern_tlb_range() in module space

For kernel addresses between TASK_SIZE and PAGE_OFFSET,
flush_tlb_kern_range() does not work as would be expected.

The TLB invalidate works with a matching ASID, or on entries marked as
global.  The set_pte_at() macro marks addresses >= PAGE_OFFSET as
global, but not addresses from TASK_SIZE to PAGE_OFFSET, which are
also kernel addresses.

The result is that the entries in this range are not actually
invalidated by flush_tlb_kern_range().

This patch instead marks addresses >= TASK_SIZE as global.

Signed-off-by: Satoru Fujii <s-fujii@ct.jp.nec.com>
Signed-off-by: Kevin Hilman <khilman@mvista.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years agoKVM: SVM: Intercept the 'invd' and 'wbinvd' instructions
Avi Kivity [Sun, 28 Oct 2007 14:11:58 +0000 (16:11 +0200)]
KVM: SVM: Intercept the 'invd' and 'wbinvd' instructions

'invd' can destroy host data, and 'wbinvd' allows the guest to induce
long (milliseconds) latencies.

Noted by Ben Serebrin.

Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: x86 emulator: invd instruction
Avi Kivity [Sun, 28 Oct 2007 14:09:18 +0000 (16:09 +0200)]
KVM: x86 emulator: invd instruction

Emulate the 'invd' instruction (opcode 0f 08).

Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: SVM: Defer nmi processing until switch to host state is complete
Avi Kivity [Wed, 7 Nov 2007 15:14:18 +0000 (17:14 +0200)]
KVM: SVM: Defer nmi processing until switch to host state is complete

If we stgi() too soon, nmis can reach the processor even though interrupts
are disabled, catching it in a half-switched state.  Delay the stgi() until
we're done switching.

Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: SVM: Fix SMP with kernel apic
Avi Kivity [Wed, 7 Nov 2007 10:57:23 +0000 (12:57 +0200)]
KVM: SVM: Fix SMP with kernel apic

AP processor needs to reset to the SIPI vector, not normal INIT.

Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: x86 emulator: fix 'push imm8' emulation
Avi Kivity [Fri, 26 Oct 2007 12:16:56 +0000 (14:16 +0200)]
KVM: x86 emulator: fix 'push imm8' emulation

'push imm8' found itself in the wrong switch somehow, so it is never executed.

This fixes Windows 2003 installation.

Signed-off-by: Avi Kivity <avi@qumranet.com>