GitHub/exynos8895/android_kernel_samsung_universal8895.git
17 years agosched: fix /proc/<PID>/stat stime/utime monotonicity, part 2
Balbir Singh [Mon, 29 Oct 2007 23:26:32 +0000 (00:26 +0100)]
sched: fix /proc/<PID>/stat stime/utime monotonicity, part 2

Extend Peter's patch to fix accounting issues, by keeping stime
monotonic too.

Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Tested-by: Frans Pop <elendil@planet.nl>
17 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Mon, 29 Oct 2007 21:06:55 +0000 (14:06 -0700)]
Merge branch 'upstream' of git://ftp.linux-mips.org/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (34 commits)
  [MIPS] tb0219: Update copyright message.
  [MIPS] MT: Fix bug in multithreaded kernels.
  [MIPS] Alchemy: Remove CONFIG_TS_AU1X00_ADS7846 from defconfigs.
  Author: Ralf Baechle <ralf@linux-mips.org>
  [MIPS] sb1250: Enable GenBus IDE in defconfig.
  [MIPS] vmlinux.ld.S: correctly indent .data section
  [MIPS] c-r3k: Implement flush_cache_range()
  [MIPS] Store sign-extend register values for PTRACE_GETREGS
  [MIPS] Alchemy: Register platform devices
  [MIPS] Add len and addr validation for MAP_FIXED mappings.
  [MIPS] IRIX: Fix off-by-one error in signal compat code.
  [MIPS] time: Replace plat_timer_setup with modern APIs.
  [MIPS] time: Fix cut'n'paste bug in Sibyte clockevent driver.
  [MIPS] time: Make c0_compare_int_usable faster
  [MIPS] time: Fix cevt-r4k.c for 64-bit kernel
  [MIPS] Sibyte: Delete {sb1250,bcm1480}_steal_irq().
  [MIPS] txx9tmr clockevent/clocksource driver
  [MIPS] Add mips_hpt_frequency check to mips_clockevent_init().
  [MIPS] IP32: Fixes after interrupt renumbering.
  [MIPS] IP27: Fix slice logic to work for arbitrary number of slices.
  ...

17 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched
Linus Torvalds [Mon, 29 Oct 2007 21:06:19 +0000 (14:06 -0700)]
Merge git://git./linux/kernel/git/mingo/linux-2.6-sched

* git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched:
  sched: fix style in kernel/sched.c
  sched: fix style of swap() macro in kernel/sched_fair.c
  sched: report CPU usage in CFS cgroup directories
  sched: move rcu_head to task_group struct
  sched: fix incorrect assumption that cpu 0 exists
  sched: keep utime/stime monotonic
  sched: make kernel/sched.c:account_guest_time() static

17 years agoRevert "x86_64: allocate sparsemem memmap above 4G"
Linus Torvalds [Mon, 29 Oct 2007 18:36:04 +0000 (11:36 -0700)]
Revert "x86_64: allocate sparsemem memmap above 4G"

This reverts commit 2e1c49db4c640b35df13889b86b9d62215ade4b6.

First off, testing in Fedora has shown it to cause boot failures,
bisected down by Martin Ebourne, and reported by Dave Jobes.  So the
commit will likely be reverted in the 2.6.23 stable kernels.

Secondly, in the 2.6.24 model, x86-64 has now grown support for
SPARSEMEM_VMEMMAP, which disables the relevant code anyway, so while the
bug is not visible any more, it's become invisible due to the code just
being irrelevant and no longer enabled on the only architecture that
this ever affected.

Reported-by: Dave Jones <davej@redhat.com>
Tested-by: Martin Ebourne <fedora@ebourne.me.uk>
Cc: Zou Nan hai <nanhai.zou@intel.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agosched: fix style in kernel/sched.c
Ingo Molnar [Mon, 29 Oct 2007 20:18:11 +0000 (21:18 +0100)]
sched: fix style in kernel/sched.c

fallout of recent commits: small coding style fixes.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: fix style of swap() macro in kernel/sched_fair.c
Ingo Molnar [Mon, 29 Oct 2007 20:18:11 +0000 (21:18 +0100)]
sched: fix style of swap() macro in kernel/sched_fair.c

fix style of swap() macro in kernel/sched_fair.c.

( this macro should eventually move to a general header, as ext3 uses
  a similar construct too. )

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: report CPU usage in CFS cgroup directories
Paul Menage [Mon, 29 Oct 2007 20:18:11 +0000 (21:18 +0100)]
sched: report CPU usage in CFS cgroup directories

Adds a cpu.usage file to the CFS cgroup that reports CPU usage in
milliseconds for that cgroup's tasks

[ mingo@elte.hu: style cleanups. ]

Signed-off-by: Paul Menage <menage@google.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: move rcu_head to task_group struct
Srivatsa Vaddagiri [Mon, 29 Oct 2007 20:18:11 +0000 (21:18 +0100)]
sched: move rcu_head to task_group struct

Peter Zijlstra noticed that the rcu_head object need not be present
in every cfs_rq of a group. Move it to the task_group structure
instead.

Signed-off-by: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: fix incorrect assumption that cpu 0 exists
James Bottomley [Mon, 29 Oct 2007 20:18:11 +0000 (21:18 +0100)]
sched: fix incorrect assumption that cpu 0 exists

This patch:

commit 9b5b77512dce239fa168183fa71896712232e95a
Author: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
Date:   Mon Oct 15 17:00:09 2007 +0200

    sched: clean up code under CONFIG_FAIR_GROUP_SCHED

Introduced an assumption of the existence of CPU0 via this line

cfs_rq = tg->cfs_rq[0];

If you have no CPU0, that will be NULL.  The fix seems to be just to
take whatever cfs_rq queue comes out of the for_each_possible_cpu()
loop, since they're all equally good for the destruction operation.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: keep utime/stime monotonic
Peter Zijlstra [Mon, 29 Oct 2007 20:18:11 +0000 (21:18 +0100)]
sched: keep utime/stime monotonic

keep utime/stime monotonic.

cpustats use utime/stime as a ratio against sum_exec_runtime, as a
consequence it can happen - when the ratio changes faster than time
accumulates - that either can be appear to go backwards.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: make kernel/sched.c:account_guest_time() static
Adrian Bunk [Mon, 29 Oct 2007 20:18:10 +0000 (21:18 +0100)]
sched: make kernel/sched.c:account_guest_time() static

account_guest_time() can become static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years ago[MIPS] tb0219: Update copyright message.
Ralf Baechle [Mon, 29 Oct 2007 19:35:37 +0000 (19:35 +0000)]
[MIPS] tb0219: Update copyright message.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] MT: Fix bug in multithreaded kernels.
Ralf Baechle [Mon, 8 Oct 2007 15:38:37 +0000 (16:38 +0100)]
[MIPS] MT: Fix bug in multithreaded kernels.

When GDB writes a breakpoint into address area of inferior process the
kernel needs to invalidate the modified memory in the inferior which
is done by calling flush_cache_page which in turns calls
r4k_flush_cache_page and local_r4k_flush_cache_page for VSMP or SMTC
kernel via r4k_on_each_cpu().

As the VSMP and SMTC SMP kernels for 34K are running on a single shared
caches it is possible to get away without interprocessor function calls.
This optimization is implemented in r4k_on_each_cpu, so
local_r4k_flush_cache_page is only ever called on the local CPU.

This is where the following code in local_r4k_flush_cache_page() strikes:

        /*
         * If ownes no valid ASID yet, cannot possibly have gotten
         * this page into the cache.
         */
        if (cpu_context(smp_processor_id(), mm) == 0)
                return;

On VSMP and SMTC had a function of cpu_context() for each CPU(TC).

So in case another CPU than the CPU executing local_r4k_cache_flush_page
has not accessed the mm but one of the other CPUs has there may be data
to be flushed in the cache yet local_r4k_cache_flush_page will falsely
return leaving the I-cache inconsistent for the breakpoint.

While the issue was discovered with GDB it also exists in
local_r4k_flush_cache_range() and local_r4k_flush_cache().

Fixed by introducing a new function has_valid_asid which on MT kernels
returns true if a mm is active on any processor in the system.

This is relativly expensive since for memory acccesses in that loop
cache misses have to be assumed but it seems the most viable solution
for 2.6.23 and older -stable kernels.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Alchemy: Remove CONFIG_TS_AU1X00_ADS7846 from defconfigs.
Ralf Baechle [Mon, 29 Oct 2007 19:35:37 +0000 (19:35 +0000)]
[MIPS] Alchemy: Remove CONFIG_TS_AU1X00_ADS7846 from defconfigs.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years agoAuthor: Ralf Baechle <ralf@linux-mips.org>
Ralf Baechle [Tue, 9 Oct 2007 14:15:21 +0000 (15:15 +0100)]
Author: Ralf Baechle <ralf@linux-mips.org>

[MIPS] MSP71xx: Fix bitrot.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] sb1250: Enable GenBus IDE in defconfig.
Maciej W. Rozycki [Fri, 12 Oct 2007 15:46:56 +0000 (16:46 +0100)]
[MIPS] sb1250: Enable GenBus IDE in defconfig.

Enable the onboard GenBus IDE interface in the default configuration.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] vmlinux.ld.S: correctly indent .data section
Franck Bui-Huu [Thu, 18 Oct 2007 21:12:32 +0000 (23:12 +0200)]
[MIPS] vmlinux.ld.S: correctly indent .data section

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] c-r3k: Implement flush_cache_range()
Maciej W. Rozycki [Wed, 17 Oct 2007 10:51:39 +0000 (11:51 +0100)]
[MIPS] c-r3k: Implement flush_cache_range()

Contrary to the belief of some, the R3000 and related processors did have
caches, both a data and an instruction cache.  Here is an implementation
of r3k_flush_cache_page(), which is the processor-specific back-end for
flush_cache_range(), done according to the spec in
Documentation/cachetlb.txt.

While at it, remove an unused local function: get_phys_page(), do some
trivial formatting fixes and modernise debugging facilities.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Store sign-extend register values for PTRACE_GETREGS
Atsushi Nemoto [Thu, 25 Oct 2007 15:53:02 +0000 (00:53 +0900)]
[MIPS] Store sign-extend register values for PTRACE_GETREGS

A comment on ptrace_getregs() states "Registers are sign extended to
fill the available space." but it is not true.  Fix code to match the
comment.  Also fix casts on each caller to get rid of some warnings.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Alchemy: Register platform devices
Florian Fainelli [Tue, 23 Oct 2007 16:55:55 +0000 (18:55 +0200)]
[MIPS] Alchemy: Register platform devices

This patch separates the platform devices registration for the MTX-1
specific devices: GPIO leds and watchdog.

[Minor fixup and formatting change -- Ralf]

Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Add len and addr validation for MAP_FIXED mappings.
David Daney [Sun, 28 Oct 2007 06:10:20 +0000 (23:10 -0700)]
[MIPS] Add len and addr validation for MAP_FIXED mappings.

Mmap with MAP_FIXED was not validating the addr and len parameters.  This
leads to the failure of GCC's gcc.c-torture/execute/loop-2[fg].c testcases
when using the o32 ABI on a 64 bit kernel.

These testcases try to mmap 65536 bytes at 0x7fff8000 and then access all
the memory.  In 2.6.18 and 2.6.23.1 (and likely other versions as well)
the kernel maps the requested memory, but since half of it is above
0x80000000 a SIGBUS is generated when it is accessed.

This patch moves the len validation above the MAP_FIXED processing so that
it is always validated.  It also adds validation to the addr parameter for
MAP_FIXED mappings.

Signed-off-by: David Daney <ddaney@avtrex.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] IRIX: Fix off-by-one error in signal compat code.
Ralf Baechle [Mon, 29 Oct 2007 15:00:37 +0000 (15:00 +0000)]
[MIPS] IRIX: Fix off-by-one error in signal compat code.

Based on original patch by Roel Kluin <12o3l@tiscali.nl>.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] time: Replace plat_timer_setup with modern APIs.
Ralf Baechle [Mon, 29 Oct 2007 14:23:43 +0000 (14:23 +0000)]
[MIPS] time: Replace plat_timer_setup with modern APIs.

plat_timer_setup is no longer getting called.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] time: Fix cut'n'paste bug in Sibyte clockevent driver.
Ralf Baechle [Mon, 29 Oct 2007 11:36:24 +0000 (11:36 +0000)]
[MIPS] time: Fix cut'n'paste bug in Sibyte clockevent driver.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] time: Make c0_compare_int_usable faster
Atsushi Nemoto [Tue, 23 Oct 2007 12:55:42 +0000 (21:55 +0900)]
[MIPS] time: Make c0_compare_int_usable faster

Try increasingly longer time periods starting of at 0x10 cycles.  This
should be fast on hardware and work nicely with emulators.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] time: Fix cevt-r4k.c for 64-bit kernel
Atsushi Nemoto [Tue, 23 Oct 2007 12:51:19 +0000 (21:51 +0900)]
[MIPS] time: Fix cevt-r4k.c for 64-bit kernel

The expression "(long)(read_c0_count() - cnt)" can never be a negative
value on 64-bit kernel.  Cast to "int" before comparison.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Sibyte: Delete {sb1250,bcm1480}_steal_irq().
Ralf Baechle [Sun, 28 Oct 2007 23:02:46 +0000 (23:02 +0000)]
[MIPS] Sibyte: Delete {sb1250,bcm1480}_steal_irq().

They break the timer interrupt initialization and only seem to be a kludge
for initialization happening in the wrong order.  Further testing done by
Thiemo confirms the suspicion that the other invocations also seem to have
useless.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] txx9tmr clockevent/clocksource driver
Atsushi Nemoto [Wed, 24 Oct 2007 16:34:09 +0000 (01:34 +0900)]
[MIPS] txx9tmr clockevent/clocksource driver

Convert jmr3927_clock_event_device to more generic
txx9tmr_clock_event_device which supports one-shot mode.  The
txx9tmr_clock_event_device can be used for TX49 too if the cp0 timer
interrupt was not available.

Convert jmr3927_hpt_read to txx9_clocksource driver which does not
depends jiffies anymore.  The txx9_clocksource itself can be used for
TX49, but normally TX49 uses higher precision clocksource_mips.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Add mips_hpt_frequency check to mips_clockevent_init().
Yoichi Yuasa [Fri, 26 Oct 2007 13:27:05 +0000 (22:27 +0900)]
[MIPS] Add mips_hpt_frequency check to mips_clockevent_init().

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] IP32: Fixes after interrupt renumbering.
Ralf Baechle [Sun, 28 Oct 2007 18:46:39 +0000 (18:46 +0000)]
[MIPS] IP32: Fixes after interrupt renumbering.

And general untangling.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] IP27: Fix slice logic to work for arbitrary number of slices.
Ralf Baechle [Sun, 28 Oct 2007 23:02:37 +0000 (23:02 +0000)]
[MIPS] IP27: Fix slice logic to work for arbitrary number of slices.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] SNI: Convert a20r timer to clockevent device.
Ralf Baechle [Fri, 26 Oct 2007 13:36:10 +0000 (14:36 +0100)]
[MIPS] SNI: Convert a20r timer to clockevent device.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] time: Merge eXcite plat_timer_setup into plat_time_init.
Ralf Baechle [Fri, 26 Oct 2007 12:52:41 +0000 (13:52 +0100)]
[MIPS] time: Merge eXcite plat_timer_setup into plat_time_init.

Fixme: At the time of this writing cevt-r4k.c doesn't yet know about how
to handle the alternate timer interrupt of the RM9000.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] time: Merge lasat plat_timer_setup into plat_time_init.
Ralf Baechle [Fri, 26 Oct 2007 12:43:32 +0000 (13:43 +0100)]
[MIPS] time: Merge lasat plat_timer_setup into plat_time_init.

Since the cp0 compare interrupt handler isn't initialized by the time
plat_time_init is called don't set IE_IRQ5 anymore, cevt-r4k.c will do
that a little later itself.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] time: Remove wrppmc's definition of plat_timer_setup.
Ralf Baechle [Fri, 26 Oct 2007 12:36:15 +0000 (13:36 +0100)]
[MIPS] time: Remove wrppmc's definition of plat_timer_setup.

The only thing it used to do is now done by cevt-r4k.c.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] time: Cause platform definitions of plat_timer_setup to cause error.
Ralf Baechle [Fri, 26 Oct 2007 12:24:06 +0000 (13:24 +0100)]
[MIPS] time: Cause platform definitions of plat_timer_setup to cause error.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] time: Remove declaration of plat_timer_setup, there is no caller.
Ralf Baechle [Fri, 26 Oct 2007 12:23:02 +0000 (13:23 +0100)]
[MIPS] time: Remove declaration of plat_timer_setup, there is no caller.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Alchemy: Convert from plat_timer_setup to plat_time_init.
Ralf Baechle [Fri, 26 Oct 2007 11:58:02 +0000 (12:58 +0100)]
[MIPS] Alchemy: Convert from plat_timer_setup to plat_time_init.

The old plat_timer_setup hook is no longer getting called so the Alchemy
time initialization was getting skipped.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] vpe: Use p_paddr instead of p_vaddr loader.
Ralf Baechle [Wed, 24 Oct 2007 14:54:32 +0000 (15:54 +0100)]
[MIPS] vpe: Use p_paddr instead of p_vaddr loader.

This subtle difference makes ELF overlays work.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Cleanup random difference between the lmo and kernel.org tree.
Ralf Baechle [Mon, 29 Oct 2007 19:35:33 +0000 (19:35 +0000)]
[MIPS] Cleanup random difference between the lmo and  tree.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] time: set clock before clockevent_delta2ns() in GT641xx.
Yoichi Yuasa [Tue, 23 Oct 2007 09:22:50 +0000 (18:22 +0900)]
[MIPS] time: set clock before clockevent_delta2ns() in GT641xx.

clockevent_delta2ns() use the shift and mult value, so
clockevent_set_clock() should be called first.
Pointed out by Atsushi Nemoto.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] time: Use non-interrupt locks in GT641xx clockevent driver
Yoichi Yuasa [Tue, 23 Oct 2007 09:19:13 +0000 (18:19 +0900)]
[MIPS] time: Use non-interrupt locks in GT641xx clockevent driver

set_next_event() and set_mode() are always called with interrupt disabled.
irqsave and irqrestore are not necessary for spinlock.
Pointed out by Atsushi Nemoto.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Alchemy: micro-optimizatize time code.
Ralf Baechle [Tue, 23 Oct 2007 02:04:19 +0000 (03:04 +0100)]
[MIPS] Alchemy: micro-optimizatize time code.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Alchemy: Nuke homebrew setup_irq(), it's broken and unnecessary.
Ralf Baechle [Tue, 23 Oct 2007 01:59:55 +0000 (02:59 +0100)]
[MIPS] Alchemy: Nuke homebrew setup_irq(), it's broken and unnecessary.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] SMTC: Allow control over TC assignment to vpe0.
Kevin D. Kissell [Wed, 21 Mar 2007 12:28:37 +0000 (13:28 +0100)]
[MIPS] SMTC: Allow control over TC assignment to vpe0.

Modify the SMTC initialization code to allow boot-time specification not
only of how many VPEs and TCs to use, but also how many TCs out of the
allowed pool are to be bound to VPE 0.  The new boot option is "vpe0tcs=N",
where N is an integer.  Using it in combination with the existing options
allows arbitrary assignments across the 2 VPEs of a 34K.  e.g. "maxtcs=3
 vpe0tcs=1" forces VPE0 to have 1 TC, while VPE1 has 2, and "maxtcs=4
vpe0tcs=3" forces VPE0 to have 3 TCs, while VPE1 gets 1.  If no vpe0tcs
option is specified, the traditional algorithm of evenly dividing TCs
between available VPEs, with the odd "slop" going to VPE0, is retained.

The reason for doing this is to allow a finer balancing of TCs which can
handle I/O interrupts on Malta (those on VPE 0) and those which cannot.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years agoMerge branch 'alpm' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
Linus Torvalds [Mon, 29 Oct 2007 19:12:34 +0000 (12:12 -0700)]
Merge branch 'alpm' of /linux/kernel/git/jgarzik/libata-dev

* 'alpm' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  [libata] AHCI: add hw link power management support
  [libata] Link power management infrastructure

17 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Mon, 29 Oct 2007 19:11:54 +0000 (12:11 -0700)]
Merge branch 'upstream-linus' of /linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  [libata] AHCI: fix newly introduced host-reset bug
  [libata] sata_nv: fix SWNCQ enabling
  libata: add MAXTOR 7V300F0/VA111900 to NCQ blacklist
  libata: no need to speed down if already at PIO0
  libata: relocate forcing PIO0 on reset
  pata_ns87415: define SUPERIO_IDE_MAX_RETRIES
  [libata] Address some checkpatch-spotted issues
  [libata] fix 'if(' and similar areas that lack whitespace
  libata: implement ata_wait_after_reset()
  libata: track SLEEP state and issue SRST to wake it up
  libata: relocate and fix post-command processing

17 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Mon, 29 Oct 2007 19:11:24 +0000 (12:11 -0700)]
Merge branch 'upstream-linus' of /linux/kernel/git/jgarzik/netdev-2.6

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (22 commits)
  Fix ethernet multicast for ucc_geth.
  netdrvr/pcmcia: use IRQ_TYPE_DYNAMIC_SHARING flag for irq.Attributes.
  FEC - fast ethernet controller for mpc52xx
  ehea: add kexec support
  e1000e: Remove legacy jumbo frame receive code
  e1000e: Re-enable SECRC - crc stripping
  e1000e: Fix PBA calculation for jumbo frame packets
  e1000e: Fix jumbo frame receive code.
  drivers/net/irda/au1k_ir: fix obvious irq handler bugs
  ipg: Kconfig whitepaces/tab damages
  ipg: missing Kconfig dependency
  r8169: remove poll_locked logic
  r8169: napi config
  [PATCH] iwl3945: fix direct scan problem
  [PATCH] iwl3945: cancel scan on rxon command
  [PATCH] iwl4965: fix scan problem
  [PATCH] iwl4965: fix driver hang related to hardware scan
  [PATCH] iwlwifi: fix sending probe request in iwl 4965
  [PATCH] rtl8187: Allow multicast frames
  [PATCH] b43/b43legacy: jiffies_round -> jiffies_round_relative
  ...

17 years agoMerge branch 'warnings-upstream' of master.kernel.org:/pub/scm/linux/kernel/git/jgarz...
Linus Torvalds [Mon, 29 Oct 2007 19:10:49 +0000 (12:10 -0700)]
Merge branch 'warnings-upstream' of /linux/kernel/git/jgarzik/misc-2.6

* 'warnings-upstream' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6:
  [ISDN] capidrv: address two longstanding warnings

17 years ago[libata] AHCI: add hw link power management support
Kristen Carlson Accardi [Thu, 25 Oct 2007 05:33:26 +0000 (01:33 -0400)]
[libata] AHCI: add hw link power management support

This patch will set the correct bits to turn on Aggressive
Link Power Management (ALPM) for the ahci driver.  This
will cause the controller and disk to negotiate a lower
power state for the link when there is no activity (see
the AHCI 1.x spec for details).  This feature is mutually
exclusive with Hot Plug, so when ALPM is enabled, Hot Plug
is disabled.  ALPM will be enabled by default, but it is
settable via the scsi host syfs interface.  Possible
settings for this feature are:

Setting         Effect
----------------------------------------------------------
min_power       ALPM is enabled, and link set to enter
                lowest power state (SLUMBER) when idle
                Hot plug not allowed.

max_performance ALPM is disabled, Hot Plug is allowed

medium_power    ALPM is enabled, and link set to enter
                second lowest power state (PARTIAL) when
                idle.  Hot plug not allowed.

Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years ago[libata] Link power management infrastructure
Kristen Carlson Accardi [Thu, 25 Oct 2007 04:58:59 +0000 (00:58 -0400)]
[libata] Link power management infrastructure

Device Initiated Power Management, which is defined
in SATA 2.5 can be enabled for disks which support it.
This patch enables DIPM when the user sets the link
power management policy to "min_power".

Additionally, libata drivers can define a function
(enable_pm) that will perform hardware specific actions to
enable whatever power management policy the user set up
for Host Initiated Power management (HIPM).
This power management policy will be activated after all
disks have been enumerated and intialized.  Drivers should
also define disable_pm, which will turn off link power
management, but not change link power management policy.

Documentation/scsi/link_power_management_policy.txt has additional
information.

Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agoNOMMU: mm/nommu.c needs linux/module.h
David Howells [Mon, 29 Oct 2007 13:15:39 +0000 (13:15 +0000)]
NOMMU: mm/nommu.c needs linux/module.h

mm/nommu.c needs to #include linux/module.h for it to understand EXPORT_*()
macros.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
Linus Torvalds [Mon, 29 Oct 2007 14:49:28 +0000 (07:49 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block

* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
  compat_ioctl: fix block device compat ioctl regression
  [BLOCK] Fix bad sharing of tag busy list on queues with shared tag maps
  Fix a build error when BLOCK=n
  block: use lock bitops for the tag map.
  cciss: update copyright notices
  cfq_get_queue: fix possible NULL pointer access
  blk_sync_queue() should cancel request_queue->unplug_work
  cfq_exit_queue() should cancel cfq_data->unplug_work
  block layer: remove a unused argument of drive_stat_acct()

17 years agoMerge branch 'sg' of git://git.kernel.dk/linux-2.6-block
Linus Torvalds [Mon, 29 Oct 2007 14:49:10 +0000 (07:49 -0700)]
Merge branch 'sg' of git://git.kernel.dk/linux-2.6-block

* 'sg' of git://git.kernel.dk/linux-2.6-block:
  Correction of "Update drivers to use sg helpers" patch for IMXMMC driver
  sg_init_table() should use unsigned loop index variable
  sg_last() should use unsigned loop index variable
  Initialise scatter/gather list in sg driver
  Initialise scatter/gather list in ata_sg_setup
  x86: fix pci-gart failure handling
  SG: s390-scsi: missing size parameter in zfcp_address_to_sg()
  SG: clear termination bit in sg_chain()

17 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-hrt
Linus Torvalds [Mon, 29 Oct 2007 14:47:05 +0000 (07:47 -0700)]
Merge git://git./linux/kernel/git/tglx/linux-2.6-hrt

* git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-hrt:
  Quieten hrtimer printk: "Switched to high resolution mode .."
  timer_list: Fix printk format strings
  clockevents: unexport tick_nohz_get_sleep_length

17 years ago[libata] AHCI: fix newly introduced host-reset bug
Jeff Garzik [Mon, 29 Oct 2007 14:43:55 +0000 (10:43 -0400)]
[libata] AHCI: fix newly introduced host-reset bug

The recent fix to host reset introduced a problem, whereby AHCI-enable
bit would be cleared upon reset, if it was not asserted prior to reset.

Unconditionally enable AHCI-enable bit.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agodeal with resource allocation bugs in arcmsr
Al Viro [Mon, 29 Oct 2007 05:08:38 +0000 (05:08 +0000)]
deal with resource allocation bugs in arcmsr

a) for type B we should _not_ iounmap() acb->pmu; it's not ioremapped.
b) for type B we should iounmap() two regions we _do_ ioremap.
c) if ioremap() fails, we need to bail out (and clean up).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agofix abuses of ptrdiff_t
Al Viro [Mon, 29 Oct 2007 05:11:28 +0000 (05:11 +0000)]
fix abuses of ptrdiff_t

Use of ptrdiff_t in places like

-                       if (!access_ok(VERIFY_WRITE, u_tmp->rx_buf, u_tmp->len))
+                       if (!access_ok(VERIFY_WRITE, (u8 __user *)
+                                               (ptrdiff_t) u_tmp->rx_buf,
+                                               u_tmp->len))

is wrong; for one thing, it's a bad C (it's what uintptr_t is for; in general
we are not even promised that ptrdiff_t is large enough to hold a pointer,
just enough to hold a difference between two pointers within the same object).
For another, it confuses the fsck out of sparse.

Use unsigned long or uintptr_t instead.  There are several places misusing
ptrdiff_t; fixed.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agofix reentrancy bug in arcmsr_get_iop_{r,w}qbuffer()
Al Viro [Mon, 29 Oct 2007 05:08:58 +0000 (05:08 +0000)]
fix reentrancy bug in arcmsr_get_iop_{r,w}qbuffer()

doh...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoarcmsr: endianness bug
Al Viro [Mon, 29 Oct 2007 05:08:48 +0000 (05:08 +0000)]
arcmsr: endianness bug

initializing a field in data shared with the card with
cpu_to_le32(something) | 0x100000 is broken - the field is, indeed,
little-endian and we need cpu_to_le32() on both parts.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agotrivial annotations in arcmsr
Al Viro [Mon, 29 Oct 2007 05:08:28 +0000 (05:08 +0000)]
trivial annotations in arcmsr

driver still has serious portability problems

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoSCTP endianness annotations regression
Al Viro [Mon, 29 Oct 2007 05:03:23 +0000 (05:03 +0000)]
SCTP endianness annotations regression

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agointel-iommu fixes
Al Viro [Mon, 29 Oct 2007 04:51:16 +0000 (04:51 +0000)]
intel-iommu fixes

 - off by one in dmar_get_fault_reason() (maximal index in array is
   ARRAY_SIZE()-1, not ARRAY_SIZE())
 - NULL noise removal
 - __iomem annotation fix

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agomisc uml annotation and section fixes
Al Viro [Mon, 29 Oct 2007 04:36:10 +0000 (04:36 +0000)]
misc uml annotation and section fixes

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agomissing atomic_read_long() in slub.c
Al Viro [Mon, 29 Oct 2007 04:42:55 +0000 (04:42 +0000)]
missing atomic_read_long() in slub.c

nr_slabs is atomic_long_t, not atomic_t

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoSUNRPC endianness annotations
Al Viro [Mon, 29 Oct 2007 04:37:58 +0000 (04:37 +0000)]
SUNRPC endianness annotations

rpcrdma stuff lacks endianness annotations for on-the-wire data.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agomore x86 merge fallout (uml, again)
Al Viro [Mon, 29 Oct 2007 04:34:31 +0000 (04:34 +0000)]
more x86 merge fallout (uml, again)

arch/i386/{Kconfig,Makefile}.cpu got moved

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agox86 merge fallout: uml
Al Viro [Mon, 29 Oct 2007 04:31:16 +0000 (04:31 +0000)]
x86 merge fallout: uml

Don't undef __i386__/__x86_64__ in uml anymore, make sure that (few) places
that required adjusting the ifdefs got those.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[libata] sata_nv: fix SWNCQ enabling
Jeff Garzik [Mon, 29 Oct 2007 10:49:24 +0000 (06:49 -0400)]
[libata] sata_nv: fix SWNCQ enabling

Adapted from patches by Kuan Lou @ NVIDIA and Bartlomiej Zolnierkiewicz.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agocompat_ioctl: fix block device compat ioctl regression
Philip Langdale [Sat, 27 Oct 2007 11:34:10 +0000 (13:34 +0200)]
compat_ioctl: fix block device compat ioctl regression

The conversion of handlers to compat_blkdev_ioctl accidentally
disabled handling of most ioctl numbers on block devices because
of a typo. Fix the one line to enable it all again.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jens Axboe <axboe@carl.home.kernel.dk>
17 years ago[BLOCK] Fix bad sharing of tag busy list on queues with shared tag maps
Jens Axboe [Thu, 25 Oct 2007 08:14:47 +0000 (10:14 +0200)]
[BLOCK] Fix bad sharing of tag busy list on queues with shared tag maps

For the locking to work, only the tag map and tag bit map may be shared
(incidentally, I was just explaining this to Nick yesterday, but I
apparently didn't review the code well enough myself). But we also share
the busy list!  The busy_list must be queue private, or we need a
block_queue_tag covering lock as well.

So we have to move the busy_list to the queue. This'll work fine, and
it'll actually also fix a problem with blk_queue_invalidate_tags() which
will invalidate tags across all shared queues. This is a bit confusing,
the low level driver should call it for each queue seperately since
otherwise you cannot kill tags on just a single queue for eg a hard
drive that stops responding. Since the function has no callers
currently, it's not an issue.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoFix a build error when BLOCK=n
Emil Medve [Wed, 24 Oct 2007 12:18:32 +0000 (14:18 +0200)]
Fix a build error when BLOCK=n

mm/filemap.c: In function '__filemap_fdatawrite_range':
mm/filemap.c:200: error: implicit declaration of function
'mapping_cap_writeback_dirty'

This happens when we don't use/have any block devices and a NFS root
filesystem is used.

mapping_cap_writeback_dirty() is defined in linux/backing-dev.h which
used to be provided in mm/filemap.c by linux/blkdev.h until commit
f5ff8422bbdd59f8c1f699df248e1b7a11073027 (Fix warnings with
!CONFIG_BLOCK).

Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoblock: use lock bitops for the tag map.
Nick Piggin [Wed, 24 Oct 2007 08:54:38 +0000 (10:54 +0200)]
block: use lock bitops for the tag map.

The block queue tag map can use lock bitops.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agocciss: update copyright notices
Mike Miller [Wed, 24 Oct 2007 08:30:34 +0000 (10:30 +0200)]
cciss: update copyright notices

This patch updates the copyright information for the cciss driver. It
includes extending the year to 2007 (how timely) and some minor corrections
deemed necessary by HP legal and the Open Source Review Board. Please
consider this patch for inclusion.

Signed-off-by: Mike Miller <mike.miller@hp.com>
--------------------------------------------------------------------------------
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agocfq_get_queue: fix possible NULL pointer access
Oleg Nesterov [Tue, 23 Oct 2007 13:08:21 +0000 (15:08 +0200)]
cfq_get_queue: fix possible NULL pointer access

cfq_get_queue()->cfq_find_alloc_queue() can fail, check the returned value.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Note that this isn't a bug at the moment, since the regular IO path
does not call this path without __GFP_WAIT set. However, it could be a
future bug, so I've applied it.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoblk_sync_queue() should cancel request_queue->unplug_work
Oleg Nesterov [Tue, 23 Oct 2007 13:08:19 +0000 (15:08 +0200)]
blk_sync_queue() should cancel request_queue->unplug_work

blk_sync_queue() cancels the timer, but forgets to cancel the work.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agocfq_exit_queue() should cancel cfq_data->unplug_work
Oleg Nesterov [Tue, 23 Oct 2007 13:08:18 +0000 (15:08 +0200)]
cfq_exit_queue() should cancel cfq_data->unplug_work

Spotted by Nick <gentuu@gmail.com>, perhaps explains the first trace in
http://bugzilla.kernel.org/show_bug.cgi?id=9180.

cfq_exit_queue() should cancel cfqd->unplug_work before freeing cfqd.
blk_sync_queue() seems unneeded, removed.

Q: why cfq_exit_queue() calls cfq_shutdown_timer_wq() twice?

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoblock layer: remove a unused argument of drive_stat_acct()
Jerome Marchand [Tue, 23 Oct 2007 13:05:46 +0000 (15:05 +0200)]
block layer: remove a unused argument of drive_stat_acct()

The nr_sector argument of drive_stat_acct() is not used anymore since the read and write sectors statistics are now updated in end_that_request_first(). This patch removes the useless argument.

Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agolibata: add MAXTOR 7V300F0/VA111900 to NCQ blacklist
Tejun Heo [Mon, 29 Oct 2007 08:57:44 +0000 (17:57 +0900)]
libata: add MAXTOR 7V300F0/VA111900 to NCQ blacklist

MAXTOR 7V300F0/VA111900 does spurious NCQ completions.  Add it to
blacklist.  This problem is reported by Carsten Otto.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Carsten Otto <c-otto@gmx.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: no need to speed down if already at PIO0
Tejun Heo [Mon, 29 Oct 2007 07:45:05 +0000 (16:45 +0900)]
libata: no need to speed down if already at PIO0

After reset, transfer mode is always PIO0 regardless of
dev->xfer_mask.  Check dev->pio_mode before trying to slow down after
configuration failure.  This prevents bogus speed down before device
is actually configured.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: relocate forcing PIO0 on reset
Tejun Heo [Mon, 29 Oct 2007 07:41:09 +0000 (16:41 +0900)]
libata: relocate forcing PIO0 on reset

Forcing PIO0 on reset was done inside ata_bus_softreset(), which is a
bit out of place as it should be applied to all resets - hard, soft
and implementation which don't use ata_bus_softreset().  Relocate it
such that...

* For new EH, it's done in ata_eh_reset() before calling prereset.

* For old EH, it's done before calling ap->ops->phy_reset() in
  ata_bus_probe().

This makes PIO0 forced after all resets.  Another difference is that
reset itself is done after PIO0 is forced.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agopata_ns87415: define SUPERIO_IDE_MAX_RETRIES
Frank Lichtenheld [Mon, 29 Oct 2007 01:49:20 +0000 (02:49 +0100)]
pata_ns87415: define SUPERIO_IDE_MAX_RETRIES

Code copied from drivers/ide/pci/ns87415.c uses this, so copy the
definition from there as well.

Fixes the following build error:
  CC [M]  drivers/ata/pata_ns87415.o
drivers/ata/pata_ns87415.c: In function ‘ns87560_read_buggy’:
drivers/ata/pata_ns87415.c:228: error: ‘SUPERIO_IDE_MAX_RETRIES’ undeclared (first use in this function)
drivers/ata/pata_ns87415.c:228: error: (Each undeclared identifier is reported only once
drivers/ata/pata_ns87415.c:228: error: for each function it appears in.)

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years ago[libata] Address some checkpatch-spotted issues
Jeff Garzik [Fri, 26 Oct 2007 04:03:37 +0000 (00:03 -0400)]
[libata] Address some checkpatch-spotted issues

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years ago[libata] fix 'if(' and similar areas that lack whitespace
Jeff Garzik [Fri, 26 Oct 2007 00:47:30 +0000 (20:47 -0400)]
[libata] fix 'if(' and similar areas that lack whitespace

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agolibata: implement ata_wait_after_reset()
Tejun Heo [Tue, 16 Oct 2007 21:21:24 +0000 (14:21 -0700)]
libata: implement ata_wait_after_reset()

On certain device/controller combination, 0xff status is asserted
after reset and doesn't get cleared during 150ms post-reset wait.  As
0xff status is interpreted as no device (for good reasons), this can
lead to misdetection on such cases.

This patch implements ata_wait_after_reset() which replaces the 150ms
sleep and waits upto ATA_TMOUT_FF_WAIT if status is 0xff.
ATA_TMOUT_FF_WAIT is currently 800ms which is enough for
HHD424020F7SV00 to get detected but not enough for Quantum GoVault
drive which is known to take upto 2s.

Without parallel probing, spending 2s on 0xff port would incur too
much delay on ata_piix's which use 0xff to indicate empty port and
doesn't have SCR register, so GoVault needs to wait till parallel
probing.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: track SLEEP state and issue SRST to wake it up
Tejun Heo [Thu, 25 Oct 2007 09:30:36 +0000 (18:30 +0900)]
libata: track SLEEP state and issue SRST to wake it up

ATA devices in SLEEP mode don't respond to any commands.  SRST is
necessary to wake it up.  Till now, when a command is issued to a
device in SLEEP mode, the command times out, which makes EH reset the
device and retry the command after that, causing a long delay.

This patch makes libata track SLEEP state and issue SRST automatically
if a command is about to be issued to a device in SLEEP.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Bruce Allen <ballen@gravity.phys.uwm.edu>
Cc: Andrew Paprocki <andrew@ishiboo.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: relocate and fix post-command processing
Tejun Heo [Thu, 25 Oct 2007 09:22:44 +0000 (18:22 +0900)]
libata: relocate and fix post-command processing

Some commands need post-processing after successful completion.  This
was done in ata_scsi_qc_complete() till now but this has the following
problems.

* Post-command processing gets executed when qc is completed from EH.
  Some qc's are retried from EH with zero err_mask and thus triggers
  unnecessary/incorrect post-command processing.

* Command post processing doesn't belong to SAT layer.

* Link-wide revalidation was scheduled where device revalidation
  suffices.

This patch moves post-command processing to success completion path of
ata_qc_complete() which is travelled iff the command is going to be
completed without passing through EH and updates post-command
processing such that device-specific action is used.  While at it,
restructure code a bit for readability.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoFix ethernet multicast for ucc_geth.
Joakim Tjernlund [Wed, 17 Oct 2007 09:05:41 +0000 (11:05 +0200)]
Fix ethernet multicast for ucc_geth.

hw_add_addr_in_hash() already swaps byte
order, don't do it in ucc_geth_set_multi() too.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Acked-by: ucc_geth maintainer
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agonetdrvr/pcmcia: use IRQ_TYPE_DYNAMIC_SHARING flag for irq.Attributes.
Komuro [Sun, 28 Oct 2007 02:26:17 +0000 (11:26 +0900)]
netdrvr/pcmcia: use IRQ_TYPE_DYNAMIC_SHARING flag for irq.Attributes.

The drivers below support IRQ-sharing.

3c574_cs, 3c589_cs, pcnet_cs,
axnet_cs, smc91c92_cs, fmvj18x_cs.
xirc2ps_cs, serial_cs.

Signed-off-by: Komuro <komurojun-mbn@nifty.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoFEC - fast ethernet controller for mpc52xx
Domen Puncer [Fri, 26 Oct 2007 16:07:49 +0000 (18:07 +0200)]
FEC - fast ethernet controller for mpc52xx

Driver for ethernet on mpc5200/mpc5200b SoCs (FEC).

Signed-off-by: Domen Puncer <domen.puncer@telargo.com>
Acked-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoMerge branch 'upstream-jeff' of git://git.kernel.org/pub/scm/linux/kernel/git/romieu...
Jeff Garzik [Mon, 29 Oct 2007 09:48:33 +0000 (05:48 -0400)]
Merge branch 'upstream-jeff' of git://git./linux/kernel/git/romieu/netdev-2.6 into upstream-fixes

17 years agoMerge branch 'fixes-jgarzik' of git://git.kernel.org/pub/scm/linux/kernel/git/linvill...
Jeff Garzik [Mon, 29 Oct 2007 09:48:00 +0000 (05:48 -0400)]
Merge branch 'fixes-jgarzik' of git://git./linux/kernel/git/linville/wireless-2.6 into upstream-fixes

17 years agoehea: add kexec support
Jan-Bernd Themann [Fri, 26 Oct 2007 12:37:28 +0000 (14:37 +0200)]
ehea: add kexec support

eHEA resources that are allocated via H_CALLs have a unique identifier each.
These identifiers are necessary to free the resources. A reboot notifier
is used to free all eHEA resources before the indentifiers get lost, i.e
before kexec starts a new kernel.

Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoe1000e: Remove legacy jumbo frame receive code
Auke Kok [Thu, 25 Oct 2007 20:58:03 +0000 (13:58 -0700)]
e1000e: Remove legacy jumbo frame receive code

The legacy jumbo frame receive code is no longer needed since all
hardware can do packet split and we're no longer offering a bypass
kernel config option to disable packet split. Remove the unused code.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoe1000e: Re-enable SECRC - crc stripping
Auke Kok [Thu, 25 Oct 2007 20:57:58 +0000 (13:57 -0700)]
e1000e: Re-enable SECRC - crc stripping

This workaround code performed software stripping instead of the
hardware which can do it much faster. None of the e1000e target
hardware has issues with this feature and should work fine. This
gives us some performance back on receive, and removes some
kludging stripping the 4 bytes.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoe1000e: Fix PBA calculation for jumbo frame packets
Auke Kok [Thu, 25 Oct 2007 20:57:53 +0000 (13:57 -0700)]
e1000e: Fix PBA calculation for jumbo frame packets

Upon inspection the rx FIFO size calculation code was found to have
2 significant flaws: A superfluous minus sign resulting in the
wrong size to be used for jumbo frames on 82573 and ich9, as well
as that this code rewrote the read-only adapter->pba variable
resulting in different values at each run.

Without this patch jumbo's will work but performance will be
awkward since the TX size is not adequate for two whole frames.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoe1000e: Fix jumbo frame receive code.
Auke Kok [Thu, 25 Oct 2007 20:57:44 +0000 (13:57 -0700)]
e1000e: Fix jumbo frame receive code.

Fix allocation and freeing of jumbo frames where several bugs
were recently introduced by cleanups after we forked this code
from e1000. This moves ps_pages to buffer_info where it really
belongs and makes it a dynamically allocated array. The penalty
is not that high since it's allocated outside of the buffer_info
struct anyway.

Without this patch all jumbo frames are completely broken and the
driver panics.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agodrivers/net/irda/au1k_ir: fix obvious irq handler bugs
Jeff Garzik [Mon, 29 Oct 2007 09:18:12 +0000 (05:18 -0400)]
drivers/net/irda/au1k_ir: fix obvious irq handler bugs

interrupt handlers return a return value these days.

Also, kill always-true test and unneeded void* cast.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years ago[ISDN] capidrv: address two longstanding warnings
Jeff Garzik [Fri, 26 Oct 2007 03:02:14 +0000 (23:02 -0400)]
[ISDN] capidrv: address two longstanding warnings

* change #warning to a code comment

* add comment and special ifdef'd 64-bit code for a situation where
  we must store a pointer into a CAPI field 'Data', which is fixed by
  the interface at 32 bits.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Acked-by: Karsten Keil <kkeil@suse.de>
17 years agoQuieten hrtimer printk: "Switched to high resolution mode .."
Michael Ellerman [Mon, 29 Oct 2007 05:35:29 +0000 (16:35 +1100)]
Quieten hrtimer printk: "Switched to high resolution mode .."

Change the hrtimer printk "Switched to high resolution mode .." to
be KERN_DEBUG, rather than KERN_INFO. If users need to see this they
can pass "loglevel" or "debug" on the command line, or check dmesg.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
 kernel/hrtimer.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)