safe/jmp/linux-2.6
15 years agoMerge branch 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 31 Jan 2009 23:54:30 +0000 (15:54 -0800)]
Merge branch 'irq-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  irq: export __set_irq_handler() and handle_level_irq()

15 years agoMerge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 31 Jan 2009 23:54:06 +0000 (15:54 -0800)]
Merge branch 'timers-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  hrtimer: prevent negative expiry value after clock_was_set()
  hrtimers: allow the hot-unplugging of all cpus
  hrtimers: increase clock min delta threshold while interrupt hanging

15 years agoMerge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 31 Jan 2009 23:53:30 +0000 (15:53 -0800)]
Merge branch 'tracing-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86, ds, bts: cleanup/fix DS configuration
  ring-buffer: reset timestamps when ring buffer is reset
  trace: set max latency variable to zero on default
  trace: stop all recording to ring buffer on ftrace_dump
  trace: print ftrace_dump at KERN_EMERG log level
  ring_buffer: reset write when reserve buffer fail
  tracing/function-graph-tracer: fix a regression while suspend to disk
  ring-buffer: fix alignment problem

15 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 31 Jan 2009 23:52:46 +0000 (15:52 -0800)]
Merge branch 'x86-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86 setup: fix asm constraints in vesa_store_edid
  xen: make sysfs files behave as their names suggest
  x86: tone down mtrr_trim_uncached_memory() warning
  x86: correct the CPUID pattern for MSR_IA32_MISC_ENABLE availability

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6
Linus Torvalds [Sat, 31 Jan 2009 23:52:25 +0000 (15:52 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/lrg/voltage-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6:
  leds: Fix bounds checking of wm8350->pmic.led
  regulator: move bq24022 init back to module_init instead of subsys_initcall

15 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Sat, 31 Jan 2009 23:52:02 +0000 (15:52 -0800)]
Merge branch 'upstream' of git://ftp.linux-mips.org/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (27 commits)
  MIPS: Alchemy: time.c build fix
  MIPS: RB532: Export rb532_gpio_set_func()
  MIPS: RB532: Update headers
  MIPS: RB532: Simplify dev3 init
  MIPS: RB532: Remove {get,set}_434_reg()
  MIPS: RB532: Move dev3 init code to devices.c
  MIPS: RB532: Fix set_latch_u5()
  MIPS: RB532: Fix init of rb532_dev3_ctl_res
  MIPS: RB532: Use driver_data instead of platform_data
  MIPS: RB532: Detect uart type, add platform device
  MIPS: RB532: remove useless CF GPIO initialisation
  MIPS: RB532: Auto disable GPIO alternate function
  MIPS: RB532: Add set_type() function to IRQ struct.
  MIPS: RC32434: Define io_map_base for PCI controller
  MIPS: RB532: Fix bit swapping in rb532_set_bit()
  MIPS: Use hardware watchpoints on all R1 and R2 CPUs.
  MIPS: Read watch registers with interrupts disabled.
  MIPS: Fix a typo in watchpoint register structure.
  MIPS: TXx9: Add support for TX4939 internal RTC
  MIPS: R2: Fix broken installation of cache error handler.
  ...

15 years agoFix memory corruption in console selection
Mikulas Patocka [Fri, 30 Jan 2009 20:27:14 +0000 (15:27 -0500)]
Fix memory corruption in console selection

Fix an off-by-two memory error in console selection.

The loop below goes from sel_start to sel_end (inclusive), so it writes
one more character.  This one more character was added to the allocated
size (+1), but it was not multiplied by an UTF-8 multiplier.

This patch fixes a memory corruption when UTF-8 console is used and the
user selects a few characters, all of them 3-byte in UTF-8 (for example
a frame line).

When memory redzones are enabled, a redzone corruption is reported.
When they are not enabled, trashing of random memory occurs.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Sat, 31 Jan 2009 23:50:43 +0000 (15:50 -0800)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  igb: fix link reporting when using sgmii
  igb: prevent skb_over panic w/ mtu smaller than 1K
  igb: Fix DCA errors and do not use context index for 82576
  ipv6: compile fix for ip6mr.c
  packet: Avoid lock_sock in mmap handler
  sfc: Replace stats_enabled flag with a disable count
  sfc: SFX7101/SFT9001: Fix AN advertisements
  sfc: SFT9001: Always enable XNP exchange on SFT9001 rev B
  sfc: Update board info for hardware monitor on SFN4111T-R5 and later
  sfc: Test for PHYXS faults whenever we cannot test link state bits
  sfc: Reinitialise the PHY completely in case of a PHY or NIC reset
  sfc: Fix post-reset MAC selection
  sfc: SFN4111T: Fix GPIO sharing between I2C and FLASH_CFG_1
  sfc: SFT9001: Fix speed reporting in 1G PHY loopback
  sfc: SFX7101: Remove workaround for bad link training
  sfc: SFT9001: Enable robust link training
  sky2: fix hard hang with netconsoling and iface going up

15 years agoStop playing silly games with the VM_ACCOUNT flag
Linus Torvalds [Sat, 31 Jan 2009 23:08:56 +0000 (15:08 -0800)]
Stop playing silly games with the VM_ACCOUNT flag

The mmap_region() code would temporarily set the VM_ACCOUNT flag for
anonymous shared mappings just to inform shmem_zero_setup() that it
should enable accounting for the resulting shm object.  It would then
clear the flag after calling ->mmap (for the /dev/zero case) or doing
shmem_zero_setup() (for the MAP_ANON case).

This just resulted in vma merge issues, but also made for just
unnecessary confusion.  Use the already-existing VM_NORESERVE flag for
this instead, and let shmem_{zero|file}_setup() just figure it out from
that.

This also happens to make it obvious that the new DRI2 GEM layer uses a
non-reserving backing store for its object allocation - which is quite
possibly not intentional.  But since I didn't want to change semantics
in this patch, I left it alone, and just updated the caller to use the
new flag semantics.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoigb: fix link reporting when using sgmii
Alexander Duyck [Sat, 31 Jan 2009 08:53:18 +0000 (00:53 -0800)]
igb: fix link reporting when using sgmii

When using sgmii the link was not being properly passed up to the driver
from the underlying link management functions.  This change corrects it so
that get_link_status is cleared when a link has been found.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoigb: prevent skb_over panic w/ mtu smaller than 1K
Alexander Duyck [Sat, 31 Jan 2009 08:52:57 +0000 (00:52 -0800)]
igb: prevent skb_over panic w/ mtu smaller than 1K

A panic has been observed with frame sizes smaller than 1K.  This has been
root caused to the hardware spanning larger frames across multiple buffers
and then reporting the original frame size in the first descriptor.  To
prevent this we can enable set the LPE bit which in turn will restrict
packet sizes to those set in the RLPML register.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoigb: Fix DCA errors and do not use context index for 82576
Alexander Duyck [Sat, 31 Jan 2009 08:52:30 +0000 (00:52 -0800)]
igb: Fix DCA errors and do not use context index for 82576

82576 was being incorrectly flagged as needing a context index.  It does not as
each ring has it's own table of 2 contexts.

Driver was registering after registering the driver instead of the other way around.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoipv6: compile fix for ip6mr.c
Dave Jones [Sat, 31 Jan 2009 08:51:49 +0000 (00:51 -0800)]
ipv6: compile fix for ip6mr.c

net/ipv6/ip6mr.c: In function 'pim6_rcv':
net/ipv6/ip6mr.c:368: error: implicit declaration of function 'csum_ipv6_magic'

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agox86 setup: fix asm constraints in vesa_store_edid
Andreas Schwab [Tue, 27 Jan 2009 20:45:57 +0000 (21:45 +0100)]
x86 setup: fix asm constraints in vesa_store_edid

Impact: fix potential miscompile (currently believed non-manifest)

As the comment explains, the VBE DDC call can clobber any register.
Tell the compiler about that fact.

Signed-off-by: Andreas Schwab <schwab@suse.de>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agopacket: Avoid lock_sock in mmap handler
Herbert Xu [Fri, 30 Jan 2009 22:12:06 +0000 (14:12 -0800)]
packet: Avoid lock_sock in mmap handler

As the mmap handler gets called under mmap_sem, and we may grab
mmap_sem elsewhere under the socket lock to access user data, we
should avoid grabbing the socket lock in the mmap handler.

Since the only thing we care about in the mmap handler is for
pg_vec* to be invariant, i.e., to exclude packet_set_ring, we
can achieve this by simply using a new mutex.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Tested-by: Martin MOKREJŠ <mmokrejs@ribosome.natur.cuni.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosfc: Replace stats_enabled flag with a disable count
Ben Hutchings [Thu, 29 Jan 2009 18:00:07 +0000 (18:00 +0000)]
sfc: Replace stats_enabled flag with a disable count

Currently we use a spin-lock to serialise statistics fetches and also
to inhibit them for short periods of time, plus a flag to
enable/disable statistics fetches for longer periods of time, during
online reset.  This was apparently insufficient to deal with the several
reasons for stats being disabled.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosfc: SFX7101/SFT9001: Fix AN advertisements
Ben Hutchings [Thu, 29 Jan 2009 17:59:37 +0000 (17:59 +0000)]
sfc: SFX7101/SFT9001: Fix AN advertisements

All 10Xpress PHYs require autonegotiation all the time; enforce this
in the set_settings() method and do not treat it as a workaround.

Remove claimed support for 100M HD mode since it is not supported by
current firmware.

Do not set speed override bits when AN is enabled, and do not use
register 1.49192 for AN configuration as it can override what we set
elsewhere.

Always set the AN selector bits to 1 (802.3).

Fix confusion between Next Page and Extended Next Page.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosfc: SFT9001: Always enable XNP exchange on SFT9001 rev B
Ben Hutchings [Thu, 29 Jan 2009 17:52:11 +0000 (17:52 +0000)]
sfc: SFT9001: Always enable XNP exchange on SFT9001 rev B

This workaround is not specific to rev A.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosfc: Update board info for hardware monitor on SFN4111T-R5 and later
Ben Hutchings [Thu, 29 Jan 2009 17:51:48 +0000 (17:51 +0000)]
sfc: Update board info for hardware monitor on SFN4111T-R5 and later

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosfc: Test for PHYXS faults whenever we cannot test link state bits
Steve Hodgson [Thu, 29 Jan 2009 17:51:15 +0000 (17:51 +0000)]
sfc: Test for PHYXS faults whenever we cannot test link state bits

Depending on the loopback mode, there may be no pertinent link state
bits.  In this case we test the PHYXS RX fault bit instead.  Make
sure to do this in all cases where there are no link state bits.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosfc: Reinitialise the PHY completely in case of a PHY or NIC reset
Steve Hodgson [Thu, 29 Jan 2009 17:50:51 +0000 (17:50 +0000)]
sfc: Reinitialise the PHY completely in case of a PHY or NIC reset

In particular, set pause advertising bits properly.

A PHY reset is not necessary to recover from the register self-test,
so use a "invisible" reset there instead.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosfc: Fix post-reset MAC selection
Steve Hodgson [Thu, 29 Jan 2009 17:49:59 +0000 (17:49 +0000)]
sfc: Fix post-reset MAC selection

Modify falcon_switch_mac() to always set NIC_STAT_REG, even if the the
MAC is the same as it was before.  This ensures that the value is
correct after an online reset.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosfc: SFN4111T: Fix GPIO sharing between I2C and FLASH_CFG_1
Ben Hutchings [Thu, 29 Jan 2009 17:49:29 +0000 (17:49 +0000)]
sfc: SFN4111T: Fix GPIO sharing between I2C and FLASH_CFG_1

Change sfn4111t_reset() to change only GPIO output enables so that it
doesn't break subsequent I2C operations.

Update comments to explain exactly what we're doing.

Add a short sleep to make sure the FLASH_CFG_1 value is latched before
any subsequent I2C operations.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosfc: SFT9001: Fix speed reporting in 1G PHY loopback
Steve Hodgson [Thu, 29 Jan 2009 17:49:09 +0000 (17:49 +0000)]
sfc: SFT9001: Fix speed reporting in 1G PHY loopback

Instead of disabling AN in loopback, just prevent restarting AN and
override the speed in sft9001_get_settings().

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosfc: SFX7101: Remove workaround for bad link training
Steve Hodgson [Thu, 29 Jan 2009 17:48:43 +0000 (17:48 +0000)]
sfc: SFX7101: Remove workaround for bad link training

Early versions of the SFX7101 firmware could complete link training in
a state where it would not adequately cancel noise (Solarflare bug
10750).  We previously worked around this by resetting the PHY after
seeing many Ethernet CRC errors.  This workaround is unsafe since it
takes no account of the interval between errors; it also appears to
be unnecessary with production firmware.  Therefore remove it.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosfc: SFT9001: Enable robust link training
Steve Hodgson [Thu, 29 Jan 2009 17:48:10 +0000 (17:48 +0000)]
sfc: SFT9001: Enable robust link training

Enable a firmware option that appears to be necessary for reliable
operation.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosky2: fix hard hang with netconsoling and iface going up
Alexey Dobriyan [Fri, 30 Jan 2009 21:45:31 +0000 (13:45 -0800)]
sky2: fix hard hang with netconsoling and iface going up

Printing anything over netconsole before hw is up and running is,
of course, not going to work.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoleds: Fix bounds checking of wm8350->pmic.led
Roel Kluin [Sat, 17 Jan 2009 15:06:40 +0000 (16:06 +0100)]
leds: Fix bounds checking of wm8350->pmic.led

Fix bounds checking of wm8350->pmic.led

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
15 years agoregulator: move bq24022 init back to module_init instead of subsys_initcall
Philipp Zabel [Sun, 18 Jan 2009 13:32:27 +0000 (14:32 +0100)]
regulator: move bq24022 init back to module_init instead of subsys_initcall

This workaround was needed when regulator/ was not linked before both
power/ and usb/otg/ in drivers/Makefile. Now that it is even linked
before mfd/, this patch makes sure that bq24022 isn't probed before the
GPIO expander is set up.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
15 years agohrtimer: prevent negative expiry value after clock_was_set()
Thomas Gleixner [Sun, 25 Jan 2009 10:31:36 +0000 (11:31 +0100)]
hrtimer: prevent negative expiry value after clock_was_set()

Impact: prevent false positive WARN_ON() in clockevents_program_event()

clock_was_set() changes the base->offset of CLOCK_REALTIME and
enforces the reprogramming of the clockevent device to expire timers
which are based on CLOCK_REALTIME. If the clock change is large enough
then the subtraction of the timer expiry value and base->offset can
become negative which triggers the warning in
clockevents_program_event().

Check the subtraction result and set a negative value to 0.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
15 years agohrtimers: allow the hot-unplugging of all cpus
Sebastien Dugue [Mon, 1 Dec 2008 13:09:07 +0000 (14:09 +0100)]
hrtimers: allow the hot-unplugging of all cpus

Impact: fix CPU hotplug hang on Power6 testbox

On architectures that support offlining all cpus (at least powerpc/pseries),
hot-unpluging the tick_do_timer_cpu can result in a system hang.

This comes from the fact that if the cpu going down happens to be the
cpu doing the tick, then as the tick_do_timer_cpu handover happens after the
cpu is dead (via the CPU_DEAD notification), we're left without ticks,
jiffies are frozen and any task relying on timers (msleep, ...) is stuck.
That's particularly the case for the cpu looping in __cpu_die() waiting
for the dying cpu to be dead.

This patch addresses this by having the tick_do_timer_cpu handover happen
earlier during the CPU_DYING notification. For this, a new clockevent
notification type is introduced (CLOCK_EVT_NOTIFY_CPU_DYING) which is triggered
in hrtimer_cpu_notify().

Signed-off-by: Sebastien Dugue <sebastien.dugue@bull.net>
Cc: <stable@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agohrtimers: increase clock min delta threshold while interrupt hanging
Frederic Weisbecker [Mon, 22 Dec 2008 01:24:48 +0000 (02:24 +0100)]
hrtimers: increase clock min delta threshold while interrupt hanging

Impact: avoid timer IRQ hanging slow systems

While using the function graph tracer on a virtualized system, the
hrtimer_interrupt can hang the system on an infinite loop.

This can be caused in several situations:

 - the hardware is very slow and HZ is set too high

 - something intrusive is slowing the system down (tracing under emulation)

... and the next clock events to program are always before the current time.

This patch implements a reasonable compromise: if such a situation is
detected, we share the CPUs time in 1/4 to process the hrtimer interrupts.
This is enough to let the system running without serious starvation.

It has been successfully tested under VirtualBox with 1000 HZ and 100 HZ
with function graph tracer launched. On both cases, the clock events were
increased until about 25 ms periodic ticks, which means 40 HZ.

So we change a hard to debug hang into a warning message and a system that
still manages to limp along.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMIPS: Alchemy: time.c build fix
Manuel Lauss [Tue, 6 Jan 2009 09:34:52 +0000 (10:34 +0100)]
MIPS: Alchemy: time.c build fix

In Linus' current -git the cpumask member is now a pointer.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: RB532: Export rb532_gpio_set_func()
Phil Sutter [Thu, 22 Jan 2009 18:32:43 +0000 (19:32 +0100)]
MIPS: RB532: Export rb532_gpio_set_func()

This kernel symbol provides a way for drivers to switch on alternate
function for a certain GPIO pin. Turning it off is done implicitly when
changing the GPIO direction, as that would be fixed when using the given
pin als alternate function.

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: RB532: Update headers
Phil Sutter [Thu, 22 Jan 2009 18:28:50 +0000 (19:28 +0100)]
MIPS: RB532: Update headers

Remove the {set,get}_434_reg() prototypes, as the functions have been
removed. Also move the prototypes for {get,set}_latch_u5() to the correct
place.

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: RB532: Simplify dev3 init
Phil Sutter [Mon, 19 Jan 2009 22:42:54 +0000 (23:42 +0100)]
MIPS: RB532: Simplify dev3 init

As rb532_dev3_ctl_res is not used by any platform device, it can be dropped
when not used for holding the physical address of the device 3 controller.

Also a size of one byte should suffice when ioremapping the physical
address mentioned above, as only a single byte is being read from and
written to it.

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: RB532: Remove {get,set}_434_reg()
Phil Sutter [Mon, 19 Jan 2009 22:42:53 +0000 (23:42 +0100)]
MIPS: RB532: Remove {get,set}_434_reg()

These kernel symbols are unused. Also, since dev3 init has been moved to
devices.c, set_434_reg() breaks compiling as it uses dev3.

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: RB532: Move dev3 init code to devices.c
Phil Sutter [Mon, 19 Jan 2009 22:42:52 +0000 (23:42 +0100)]
MIPS: RB532: Move dev3 init code to devices.c

This code doesn't belong to gpio.c, as it's completely unrelated to
GPIO. As dev1 and dev2 init code is in devices.c, it seems to be a more
adequate place.

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: RB532: Fix set_latch_u5()
Phil Sutter [Mon, 19 Jan 2009 22:42:51 +0000 (23:42 +0100)]
MIPS: RB532: Fix set_latch_u5()

The data to be written is just a byte, so use writeb instead of writel.
Also, dev3.base contains the address, not the data so referencing here
is wrong.

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: RB532: Fix init of rb532_dev3_ctl_res
Phil Sutter [Mon, 19 Jan 2009 22:42:50 +0000 (23:42 +0100)]
MIPS: RB532: Fix init of rb532_dev3_ctl_res

This register just contains the address of the actual resource, so
initialisation has to be the same as cf_slot0_res and nand_slot0_res.

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: RB532: Use driver_data instead of platform_data
Phil Sutter [Thu, 15 Jan 2009 14:41:44 +0000 (15:41 +0100)]
MIPS: RB532: Use driver_data instead of platform_data

As the korina ethernet driver uses platform_get_drvdata() to extract the
driver specific data from the platform device, driver_data has to be
used here.

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: RB532: Detect uart type, add platform device
Phil Sutter [Thu, 15 Jan 2009 14:38:38 +0000 (15:38 +0100)]
MIPS: RB532: Detect uart type, add platform device

Auto-detection works just fine, so use it instead of specifying the type
manually. Also define a platform device for the uart, as suggested by
David Daney.

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: RB532: remove useless CF GPIO initialisation
Phil Sutter [Fri, 28 Nov 2008 19:46:22 +0000 (20:46 +0100)]
MIPS: RB532: remove useless CF GPIO initialisation

As the pata-rb532-cf driver calls gpio_direction_input(), the calls to
rb532_gpio_set_func() and rb532_gpio_direction_input() are not needed since
the alternate function is automatically being disabled when changing the
GPIO pin direction.
The later two calls to rb532_gpio_set_{ilevel,istat}() are implicitly being
done by the IRQ initialisation of pata-rb532-cf.

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: RB532: Auto disable GPIO alternate function
Phil Sutter [Fri, 28 Nov 2008 19:46:09 +0000 (20:46 +0100)]
MIPS: RB532: Auto disable GPIO alternate function

When a driver calls gpio_set_direction_{input,output}(), it obviously
doesn't want the alternate function for that pin to be active (as the
direction would not matter in that case). This patch ensures alternate
function is disabled when the direction is being changed.

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: RB532: Add set_type() function to IRQ struct.
Phil Sutter [Fri, 28 Nov 2008 19:45:10 +0000 (20:45 +0100)]
MIPS: RB532: Add set_type() function to IRQ struct.

Interrupt Group 4 mapps the GPIO pins enabled as interrupt sources;
add defines to make this clear when addressing them later in code.

The mapped GPIOs support triggering on either level high or low. To
achieve this, the set_type() function calls rb532_gpio_set_ilevel() for
interrupts of the above mentioned group.

As there is no way to alter the triggering characteristics of the other
interrupts, accept level triggering on status high only. (This is just a
guess; but as the system boots fine and interrupt-driven devices (e.g.
serial console) work with no implications, it seems to be right.)

To clear a GPIO mapped IRQ, the source has to be cleared (i.e., the
interrupt status bit of the corresponding GPIO pin). This is done inside
rb532_disable_irq().

After applying these changes I could undo most of my former "fixes" to
pata-rb532-cf. Particularly all interrupt handling can be done
generically via set_irq_type() as it was before.

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: RC32434: Define io_map_base for PCI controller
Phil Sutter [Tue, 11 Nov 2008 23:16:04 +0000 (00:16 +0100)]
MIPS: RC32434: Define io_map_base for PCI controller

The code is rather based on trial-and-error than knowledge. Verified Via
Rhine functionality in PIO as well as MMIO mode.

[Looks sane -- Ralf]

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Tested-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: RB532: Fix bit swapping in rb532_set_bit()
Phil Sutter [Tue, 11 Nov 2008 23:09:30 +0000 (00:09 +0100)]
MIPS: RB532: Fix bit swapping in rb532_set_bit()

The algorithm works unconditionally. If bitval is one, the first line is
a no op and the second line sets the bit at offset position. Vice versa,
if bitval is zero, the first line clears the bit at offset position and
the second line is a no op.

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Use hardware watchpoints on all R1 and R2 CPUs.
David Daney [Mon, 5 Jan 2009 23:29:14 +0000 (15:29 -0800)]
MIPS: Use hardware watchpoints on all R1 and R2 CPUs.

The previous definition inadvertently omits Octeon which currently is
treated as an architecture variant separate from MIPS32 and MIPS64.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Read watch registers with interrupts disabled.
David Daney [Mon, 5 Jan 2009 23:29:58 +0000 (15:29 -0800)]
MIPS: Read watch registers with interrupts disabled.

If a context switch occurred between the watch exception and reading the
watch registers, it would be possible for the new process to corrupt their
state.  Enabling interrupts only after the watch registers are read avoids
this race.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Fix a typo in watchpoint register structure.
David Daney [Wed, 24 Dec 2008 23:44:26 +0000 (15:44 -0800)]
MIPS: Fix a typo in watchpoint register structure.

This fixes the ptrace ABI for watch registers, and should allow 64bit
kernels to use the watch register support.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: TXx9: Add support for TX4939 internal RTC
Atsushi Nemoto [Tue, 20 Jan 2009 14:07:41 +0000 (23:07 +0900)]
MIPS: TXx9: Add support for TX4939 internal RTC

Add platform support to use rtc-tx4939 driver.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: R2: Fix broken installation of cache error handler.
Ralf Baechle [Wed, 28 Jan 2009 18:48:23 +0000 (18:48 +0000)]
MIPS: R2: Fix broken installation of cache error handler.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: IP27: Switch from DMA_IP27 to DMA_COHERENT
Ralf Baechle [Wed, 28 Jan 2009 17:48:40 +0000 (17:48 +0000)]
MIPS: IP27: Switch from DMA_IP27 to DMA_COHERENT

The special IP27 DMA code selected by DMA_IP27 has been removed a while
ago turning DMA_IP27 into almost a nop.  Also fixup the broken logic of
its last users memcpy.S and memcpy-inatomic.s.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Add return value checks to user_termio_to_kernel_termios()
Ralf Baechle [Wed, 28 Jan 2009 14:13:37 +0000 (14:13 +0000)]
MIPS: Add return value checks to user_termio_to_kernel_termios()

And while at it, convert all functions from macros to inline functions
for sanity.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Octeon: Remove duplicated #includes
Huang Weiyi [Wed, 14 Jan 2009 22:56:46 +0000 (06:56 +0800)]
MIPS: Octeon: Remove duplicated #includes

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: atomic_*(): Change type of intermediate variables.
Ralf Baechle [Mon, 12 Jan 2009 00:52:18 +0000 (00:52 +0000)]
MIPS: atomic_*(): Change type of intermediate variables.

This shaves of 1912 bytes of an IP27 defconfig kernel and avoids
unexpected overflow behaviour in atomic_sub_if_positive.  Apply the same
changes to the atomic64_* functions for consistency.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Port "mm: invoke oom-killer from page fault" from UML / x86
Ralf Baechle [Mon, 12 Jan 2009 00:09:13 +0000 (00:09 +0000)]
MIPS: Port "mm: invoke oom-killer from page fault" from UML / x86

Original commit 1c0fe6e3bda0464728c23c8d84aa47567e8b716c.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Avoid destructive invalidation on partial cachelines.
Ralf Baechle [Sun, 11 Jan 2009 18:44:49 +0000 (18:44 +0000)]
MIPS: Avoid destructive invalidation on partial cachelines.

See discussion e9c3a7c20901051031y528d0d31r18d44c5096c59e0@mail.gmail.com.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: SMTC: Fix build after recent creditial changes.
Ralf Baechle [Sun, 11 Jan 2009 18:27:10 +0000 (18:27 +0000)]
MIPS: SMTC: Fix build after recent creditial changes.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoAllow opportunistic merging of VM_CAN_NONLINEAR areas
Linus Torvalds [Fri, 30 Jan 2009 19:37:22 +0000 (11:37 -0800)]
Allow opportunistic merging of VM_CAN_NONLINEAR areas

Commit de33c8db5910cda599899dd431cc30d7c1018cbf ("Fix OOPS in
mmap_region() when merging adjacent VM_LOCKED file segments") unified
the vma merging of anonymous and file maps to just one place, which
simplified the code and fixed a use-after-free bug that could cause an
oops.

But by doing the merge opportunistically before even having called
->mmap() on the file method, it now compares two different 'vm_flags'
values: the pre-mmap() value of the new not-yet-formed vma, and previous
mappings of the same file around it.

And in doing so, it refused to merge the common file case, which adds a
marker to say "I can be made non-linear".

This fixes it by just adding a set of flags that don't have to match,
because we know they are ok to merge.  Currently it's only that single
VM_CAN_NONLINEAR flag, but at least conceptually there could be others
in the future.

Reported-and-acked-by: Hugh Dickins <hugh@veritas.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
Cc: Nick Piggin <npiggin@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Greg KH <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Linus Torvalds [Fri, 30 Jan 2009 16:54:29 +0000 (08:54 -0800)]
Merge branch 'for_linus' of git://git./linux/kernel/git/tytso/ext4

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
  ext4: Remove bogus BUG() check in ext4_bmap()
  ext4: Fix building with EXT4FS_DEBUG
  ext4: Initialize the new group descriptor when resizing the filesystem
  ext4: Fix ext4_free_blocks() w/o a journal when files have indirect blocks
  jbd2: On a __journal_expect() assertion failure printk "JBD2", not "EXT3-fs"
  ext3: Add sanity check to make_indexed_dir
  ext4: Add sanity check to make_indexed_dir
  ext4: only use i_size_high for regular files
  ext4: fix wrong use of do_div

15 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
Linus Torvalds [Fri, 30 Jan 2009 16:46:42 +0000 (08:46 -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:
  cfq-iosched: Allow RT requests to pre-empt ongoing BE timeslice
  block: add sysfs file for controlling io stats accounting
  Mark mandatory elevator functions in the biodoc.txt
  include/linux: Add bsg.h to the Kernel exported headers
  block: silently error an unsupported barrier bio
  block: Fix documentation for blkdev_issue_flush()
  block: add bio_rw_flagged() for testing bio->bi_rw
  block: seperate bio/request unplug and sync bits
  block: export SSD/non-rotational queue flag through sysfs
  Fix small typo in bio.h's documentation
  block: get rid of the manual directory counting in blktrace
  block: Allow empty integrity profile
  block: Remove obsolete BUG_ON
  block: Don't verify integrity metadata on read error

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Fri, 30 Jan 2009 16:41:36 +0000 (08:41 -0800)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (29 commits)
  tulip: fix 21142 with 10Mbps without negotiation
  drivers/net/skfp: if !capable(CAP_NET_ADMIN): inverted logic
  gianfar: Fix Wake-on-LAN support
  smsc911x: timeout reaches -1
  smsc9420: fix interrupt signalling test failures
  ucc_geth: Change uec phy id to the same format as gianfar's
  wimax: fix build issue when debugfs is disabled
  netxen: fix memory leak in drivers/net/netxen_nic_init.c
  tun: Add some missing TUN compat ioctl translations.
  ipv4: fix infinite retry loop in IP-Config
  net: update documentation ip aliases
  net: Fix OOPS in skb_seq_read().
  net: Fix frag_list handling in skb_seq_read
  netxen: revert jumbo ringsize
  ath5k: fix locking in ath5k_config
  cfg80211: print correct intersected regulatory domain
  cfg80211: Fix sanity check on 5 GHz when processing country IE
  iwlwifi: fix kernel oops when ucode DMA memory allocation failure
  rtl8187: Fix error in setting OFDM power settings for RTL8187L
  mac80211: remove Michael Wu as maintainer
  ...

15 years agoAdd enable_ms to jsm driver
Paul Larson [Fri, 30 Jan 2009 16:21:49 +0000 (10:21 -0600)]
Add enable_ms to jsm driver

This fixes a crash observed when non-existant enable_ms function is
called for jsm driver.

Signed-off-by: Scott Kilau <Scott.Kilau@digi.com>
Signed-off-by: Paul Larson <pl@linux.vnet.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocfq-iosched: Allow RT requests to pre-empt ongoing BE timeslice
Divyesh Shah [Fri, 30 Jan 2009 11:46:41 +0000 (12:46 +0100)]
cfq-iosched: Allow RT requests to pre-empt ongoing BE timeslice

This patch adds the ability to pre-empt an ongoing BE timeslice when a RT
request is waiting for the current timeslice to complete. This reduces the
wait time to disk for RT requests from an upper bound of 4 (current value
of cfq_quantum) to 1 disk request.

Applied Jens' suggeested changes to avoid the rb lookup and use !cfq_class_rt()
and retested.

Latency(secs) for the RT task when doing sequential reads from 10G file.
                       | only RT | RT + BE | RT + BE + this patch
small (512 byte) reads | 143     | 163     | 145
large (1Mb) reads      | 142     | 158     | 146

Signed-off-by: Divyesh Shah <dpshah@google.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoblock: add sysfs file for controlling io stats accounting
Jens Axboe [Fri, 23 Jan 2009 09:54:44 +0000 (10:54 +0100)]
block: add sysfs file for controlling io stats accounting

This allows us to turn off disk stat accounting completely, for the cases
where the 0.5-1% reduction in system time is important.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoMark mandatory elevator functions in the biodoc.txt
Nikanth Karthikesan [Tue, 27 Jan 2009 08:29:24 +0000 (09:29 +0100)]
Mark mandatory elevator functions in the biodoc.txt

biodoc.txt mentions that elevator functions marked with * are mandatory, but
no function is marked with *. Mark the 3 functions which should be
implemented by any io scheduler.

Signed-off-by: Nikanth Karthikesan <knikanth@suse.de>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoinclude/linux: Add bsg.h to the Kernel exported headers
Boaz Harrosh [Mon, 19 Jan 2009 09:37:38 +0000 (10:37 +0100)]
include/linux: Add bsg.h to the Kernel exported headers

bsg.h in current form is perfectly suitable for user-mode
consumption. It is needed together with scsi/sg.h for applications
that want to interface with the bsg driver.

Currently the few projects that use it would copy it over into
the projects. But that is not acceptable for projects that need
to provide source and devel packages for distros.

This should also be submitted to stable 2.6.28 and 2.6.27 since bsg had
a stable API since these Kernels and distro users will need the header
for these kernels a swell

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Acked-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
CC: stable@kernel.org
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoblock: silently error an unsupported barrier bio
Jens Axboe [Tue, 13 Jan 2009 14:28:32 +0000 (15:28 +0100)]
block: silently error an unsupported barrier bio

This fixes a "regression" from 2.6.28, where the barrier probes that file
systems may do would trigger additional end request warnings in dmesg.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoblock: Fix documentation for blkdev_issue_flush()
Theodore Ts'o [Tue, 13 Jan 2009 14:27:32 +0000 (15:27 +0100)]
block: Fix documentation for blkdev_issue_flush()

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoblock: add bio_rw_flagged() for testing bio->bi_rw
Jens Axboe [Tue, 6 Jan 2009 08:21:49 +0000 (09:21 +0100)]
block: add bio_rw_flagged() for testing bio->bi_rw

The existing functions for checking bio->bi_rw are badly named. So lets
mirror what we do for bio->bi_flags testing, use a properly named
function so that it's immediately obvious what is being tested.

Maintain compatability names for the old macros, eventually we'll get
rid of these.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoblock: seperate bio/request unplug and sync bits
Jens Axboe [Tue, 6 Jan 2009 08:16:05 +0000 (09:16 +0100)]
block: seperate bio/request unplug and sync bits

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoblock: export SSD/non-rotational queue flag through sysfs
Bartlomiej Zolnierkiewicz [Wed, 7 Jan 2009 11:22:39 +0000 (12:22 +0100)]
block: export SSD/non-rotational queue flag through sysfs

For some devices (i.e. CFA ATA) we can't reliably detect whether
the device is of rotational or non-rotational type so we need to
leave the final decision about this setting to the user-space.

As a bonus do a minor CodingStyle fixup in queue_nomerges_store().

Suggested-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoFix small typo in bio.h's documentation
Alberto Bertogli [Mon, 5 Jan 2009 09:18:53 +0000 (10:18 +0100)]
Fix small typo in bio.h's documentation

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoblock: get rid of the manual directory counting in blktrace
Jens Axboe [Mon, 5 Jan 2009 09:17:25 +0000 (10:17 +0100)]
block: get rid of the manual directory counting in blktrace

It can result in a stuck blktrace system, if --kill is used.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoblock: Allow empty integrity profile
Martin K. Petersen [Sun, 4 Jan 2009 07:43:40 +0000 (02:43 -0500)]
block: Allow empty integrity profile

Allow a block device to allocate and register an integrity profile
without providing a template.  This allows DM to preallocate a profile
to avoid deadlocks during table reconfiguration.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoblock: Remove obsolete BUG_ON
Martin K. Petersen [Sun, 4 Jan 2009 07:43:39 +0000 (02:43 -0500)]
block: Remove obsolete BUG_ON

Now that bio_vecs are no longer cleared in bvec_alloc_bs() the following
BUG_ON must go.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoblock: Don't verify integrity metadata on read error
Martin K. Petersen [Sun, 4 Jan 2009 07:43:38 +0000 (02:43 -0500)]
block: Don't verify integrity metadata on read error

If we get an I/O error on a read request there is no point in doing a
verify pass on the integrity buffer.  Adjust the completion path
accordingly.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoext4: Remove bogus BUG() check in ext4_bmap()
Theodore Ts'o [Fri, 30 Jan 2009 05:00:24 +0000 (00:00 -0500)]
ext4: Remove bogus BUG() check in ext4_bmap()

The code to support journal-less ext4 operation added a BUG to
ext4_bmap() which fired if there was no journal and the
EXT4_STATE_JDATA bit was set in the i_state field.  This caused
running the filefrag program (which uses the FIMBAP ioctl) to trigger
a BUG().

The EXT4_STATE_JDATA bit is only used for ext4_bmap(), and it's
harmless for the bit to be set.  We could add a check in
__ext4_journalled_writepage() and ext4_journalled_write_end() to only
set the EXT4_STATE_JDATA bit if the journal is present, but that adds
an extra test and jump instruction.  It's easier to simply remove the
BUG check.

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

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@kernel.org
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Linus Torvalds [Fri, 30 Jan 2009 02:21:14 +0000 (18:21 -0800)]
Merge git://git./linux/kernel/git/sfrench/cifs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  cifs: make sure we allocate enough storage for socket address
  [CIFS] Make socket retry timeouts consistent between blocking and nonblocking cases
  [CIFS] some cleanup to dir.c prior to addition of posix_open
  [CIFS] revalidate parent inode when rmdir done within that directory
  [CIFS] Rename md5 functions to avoid collision with new rt modules
  cifs: turn smb_send into a wrapper around smb_sendv

15 years agosata_sil: Fix build breakage
Alexander Beregalov [Wed, 28 Jan 2009 23:30:56 +0000 (02:30 +0300)]
sata_sil: Fix build breakage

Commit e57db7b (SATA Sil: Blacklist system that spins off disks during ACPI power off)
 breaks build like the following, in both cases when CONFIG_DMI set or not.

        drivers/ata/sata_sil.c: In function 'sil_broken_system_poweroff':
        drivers/ata/sata_sil.c:713: error: implicit declaration of function 'dmi_first_match'
        drivers/ata/sata_sil.c:713: warning: initialization makes pointer from integer without a cast

  sata_sil.c should include dmi.h

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoDocumentation/Changes: add required versions for new filesystems
Bill Nottingham [Fri, 30 Jan 2009 00:28:40 +0000 (16:28 -0800)]
Documentation/Changes: add required versions for new filesystems

btrfs requires version 0.18 of its tools, and squashfs requires 4.0.
ext3 should use and ext4 requires v1.41.4 of e2fsprogs.

Signed-off-by: Bill Nottingham <notting@redhat.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
cc: Ted Tso <tytso@mit.edu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agofix emacs indenting howto filename expansion
Dan Carpenter [Fri, 30 Jan 2009 00:28:28 +0000 (16:28 -0800)]
fix emacs indenting howto filename expansion

I don't think emacs understands tilde expansion, so use
"expand-file-name" to do that.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoDocumentation: update CodingStyle tips for Emacs users
Teemu Likonen [Fri, 30 Jan 2009 00:28:16 +0000 (16:28 -0800)]
Documentation: update CodingStyle tips for Emacs users

With the previous Emacs tips example the kernel style was made available
for files in the kernel-tree only. This patch updates the tip to add a
separate cc-mode indent style ("linux-tabs-only"). This makes it easy to
switch between different indent styles and also makes the kernel style
easily available for any filetype mode (c++, awk, ...) that is managed
by the Emacs cc-mode.

Signed-off-by: Teemu Likonen <tlikonen@iki.fi>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoDocumentation: move DMA-mapping.txt to Doc/PCI/
Randy Dunlap [Fri, 30 Jan 2009 00:28:02 +0000 (16:28 -0800)]
Documentation: move DMA-mapping.txt to Doc/PCI/

Move DMA-mapping.txt to Documentation/PCI/.

DMA-mapping.txt was supposed to be moved from Documentation/ to
Documentation/PCI/.  The 00-INDEX files in those two directories
were updated, along with a few other text files, but the file
itself somehow escaped being moved, so move it and update more
text files and source files with its new location.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
Linus Torvalds [Fri, 30 Jan 2009 02:14:20 +0000 (18:14 -0800)]
Merge git://git./linux/kernel/git/gregkh/staging-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6:
  Staging: poch: fix verification of memory area
  Staging: usbip: usbip_start_threads(): handle kernel_thread failure
  staging: agnx: drivers/staging/agnx/agnx.h needs <linux/io.h>
  Staging: android: task_get_unused_fd_flags: fix the wrong usage of tsk->signal
  Staging: android: Add lowmemorykiller documentation.
  Staging: android: fix build error on 64bit boxes
  Staging: android: timed_gpio: Fix build to build on kernels after 2.6.25.
  Staging: android: binder: fix arm build errors
  Staging: meilhaus: fix Kbuild
  Staging: comedi: fix Kbuild

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
Linus Torvalds [Fri, 30 Jan 2009 02:14:05 +0000 (18:14 -0800)]
Merge git://git./linux/kernel/git/gregkh/driver-core-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
  driver-core: fix kernel-doc parameter name
  UIO: Add missing documentation of features added recently
  Sync patch for jp_JP/stable_kernel_rules.txt

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Fri, 30 Jan 2009 02:13:22 +0000 (18:13 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ASoC: OMAP: Initialize XCCR and RCCR registers in McBSP DAI driver
  ASoC: Fix null string usage with WM8753 DAIs
  ALSA: hda - add another MacBook Pro 4, 1 subsystem ID
  ALSA: hda - Fix compile warning with CONFIG_SND_JACK=n
  ALSA: hda - Add quirk for HP DV6700 laptop
  ALSA: hda - Fix PCM reference NID for STAC/IDT analog outputs

15 years agoMerge branch 'linux-next' of git://git.infradead.org/ubi-2.6
Linus Torvalds [Fri, 30 Jan 2009 02:12:58 +0000 (18:12 -0800)]
Merge branch 'linux-next' of git://git.infradead.org/ubi-2.6

* 'linux-next' of git://git.infradead.org/ubi-2.6:
  UBI: allow direct user-space I/O
  UBI: fix resource de-allocation
  UBI: remove unused variable
  UBI: use nicer 64-bit math
  UBI: add ioctl compatibility
  UBI: constify file operations
  UBI: allow all ioctls
  UBI: remove unnecessry header inclusion
  UBI: improve ioctl commentaries
  UBI: add ioctl for is_mapped operation
  UBI: add ioctl for unmap operation
  UBI: add ioctl for map operation

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Linus Torvalds [Fri, 30 Jan 2009 02:11:02 +0000 (18:11 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jikos/hid

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: document difference between hid_blacklist and hid_ignore_list
  HID: add antec-branded soundgraph imon devices to blacklist
  HID: fix reversed logic in disconnect testing of hiddev
  HID: adjust report descriptor fixup for MS 1028 receiver

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
Linus Torvalds [Fri, 30 Jan 2009 02:10:36 +0000 (18:10 -0800)]
Merge git://git./linux/kernel/git/rusty/linux-2.6-for-linus

* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
  lguest: Fix a memory leak with the lg object during launcher close
  lguest: disable the FORTIFY for lguest.
  lguest: typos fix

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
Linus Torvalds [Fri, 30 Jan 2009 02:09:41 +0000 (18:09 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ieee1394/linux1394-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  ieee1394: sbp2: add workarounds for 2nd and 3rd generation iPods
  firewire: sbp2: add workarounds for 2nd and 3rd generation iPods
  firewire: sbp2: fix DMA mapping leak on the failure path
  firewire: sbp2: define some magic numbers as macros
  firewire: sbp2: fix payload limit at S1600 and S3200
  ieee1394: sbp2: don't assume zero model_id or firmware_revision if there is none
  ieee1394: sbp2: fix payload limit at S1600 and S3200
  ieee1394: sbp2: update a help string
  ieee1394: support for speeds greater than S800
  firewire: core: optimize card shutdown
  ieee1394: ohci1394: increase AT req. retries, fix ack_busy_X from Panasonic camcorders and others
  firewire: ohci: increase AT req. retries, fix ack_busy_X from Panasonic camcorders and others
  firewire: ohci: change "context_stop: still active" log message
  firewire: keep highlevel drivers attached during brief connection loss
  firewire: unnecessary BM delay after generation rollover
  firewire: insist on successive self ID complete events

15 years agodrivers/gpu/drm/i915/intel_lvds.c: fix locking snafu
Andrew Morton [Thu, 29 Jan 2009 22:25:27 +0000 (14:25 -0800)]
drivers/gpu/drm/i915/intel_lvds.c: fix locking snafu

s/unlock/lock/

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

Reported-by: Daniel Vetter <daniel@ffwll.ch>
Cc: Dave Airlie <airlied@linux.ie>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Eric Anholt <eric@anholt.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoepoll: drop max_user_instances and rely only on max_user_watches
Davide Libenzi [Thu, 29 Jan 2009 22:25:26 +0000 (14:25 -0800)]
epoll: drop max_user_instances and rely only on max_user_watches

Linus suggested to put limits where the money is, and max_user_watches
already does that w/out the need of max_user_instances.  That has the
advantage to mitigate the potential DoS while allowing pretty generous
default behavior.

Allowing top 4% of low memory (per user) to be allocated in epoll watches,
we have:

LOMEM    MAX_WATCHES (per user)
512MB    ~178000
1GB      ~356000
2GB      ~712000

A box with 512MB of lomem, will meet some challenge in hitting 180K
watches, socket buffers math teaches us.  No more max_user_instances
limits then.

Signed-off-by: Davide Libenzi <davidel@xmailserver.org>
Cc: Willy Tarreau <w@1wt.eu>
Cc: Michael Kerrisk <mtk.manpages@googlemail.com>
Cc: Bron Gondwana <brong@fastmail.fm>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agohp-wmi: set initial docking state
Frans Pop [Thu, 29 Jan 2009 22:25:25 +0000 (14:25 -0800)]
hp-wmi: set initial docking state

If the initial state is not set when the input device is set up, the first
docking event after the module is loaded will be lost.

Signed-off-by: Frans Pop <elendil@planet.nl>
Acked-by: Matthew Garrett <mjg59@srcf.ucam.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agohwmon: applesmc: add support for MacPro 3 temperature sensors
Bharath Ramesh [Thu, 29 Jan 2009 22:25:24 +0000 (14:25 -0800)]
hwmon: applesmc: add support for MacPro 3 temperature sensors

MacPro 3 have more temperature sensors than the previous MacPro's also the
sensor THTG has been removed.  This patch add supports for the newer
temperature sensors in the MacPro3.

Signed-off-by: Bharath Ramesh <bramesh@vt.edu>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agohpilo: increment version
David Altobelli [Thu, 29 Jan 2009 22:25:23 +0000 (14:25 -0800)]
hpilo: increment version

Bump hpilo module version to indicate that the open/close bug is fixed.

Signed-off-by: David Altobelli <david.altobelli@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocgroup: fix root_count when mount fails due to busy subsystem
Paul Menage [Thu, 29 Jan 2009 22:25:22 +0000 (14:25 -0800)]
cgroup: fix root_count when mount fails due to busy subsystem

root_count was being incremented in cgroup_get_sb() after all error
checking was complete, but decremented in cgroup_kill_sb(), which can be
called on a superblock that we gave up on due to an error.  This patch
changes cgroup_kill_sb() to only decrement root_count if the root was
previously linked into the list of roots.

Signed-off-by: Paul Menage <menage@google.com>
Tested-by: Serge Hallyn <serue@us.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocgroups: add cpu_relax() calls in css_tryget() and cgroup_clear_css_refs()
Paul Menage [Thu, 29 Jan 2009 22:25:21 +0000 (14:25 -0800)]
cgroups: add cpu_relax() calls in css_tryget() and cgroup_clear_css_refs()

css_tryget() and cgroup_clear_css_refs() contain polling loops; these
loops should have cpu_relax calls in them to reduce cross-cache traffic.

Signed-off-by: Paul Menage <menage@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocgroups: fix lock inconsistency in cgroup_clone()
Li Zefan [Thu, 29 Jan 2009 22:25:21 +0000 (14:25 -0800)]
cgroups: fix lock inconsistency in cgroup_clone()

I fixed a bug in cgroup_clone() in Linus' tree in commit 7b574b7
("cgroups: fix a race between cgroup_clone and umount") without noticing
there was a cleanup patch in -mm tree that should be rebased (now commit
104cbd5, "cgroups: use task_lock() for access tsk->cgroups safe in
cgroup_clone()"), thus resulted in lock inconsistency.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Paul Menage <menage@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>