pandora-kernel.git
15 years agoperf_counter, x86: remove unused function argument in intel_pmu_get_status()
Robert Richter [Wed, 29 Apr 2009 10:47:25 +0000 (12:47 +0200)]
perf_counter, x86: remove unused function argument in intel_pmu_get_status()

The mask argument is unused and thus can be removed.

[ Impact: cleanup ]

Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Paul Mackerras <paulus@samba.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1241002046-8832-29-git-send-email-robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoperf_counter, x86: remove vendor check in fixed_mode_idx()
Robert Richter [Wed, 29 Apr 2009 10:47:24 +0000 (12:47 +0200)]
perf_counter, x86: remove vendor check in fixed_mode_idx()

The function fixed_mode_idx() is used generically. Now it checks the
num_counters_fixed value instead of the vendor to decide if fixed
counters are present.

[ Impact: generalize code ]

Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Paul Mackerras <paulus@samba.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1241002046-8832-28-git-send-email-robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoperf_counter, x86: introduce max_period variable
Robert Richter [Wed, 29 Apr 2009 10:47:23 +0000 (12:47 +0200)]
perf_counter, x86: introduce max_period variable

In x86 pmus the allowed counter period to programm differs. This
introduces a max_period value and allows the generic implementation
for all models to check the max period.

[ Impact: generalize code ]

Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Paul Mackerras <paulus@samba.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1241002046-8832-27-git-send-email-robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoperf_counter, x86: return raw count with x86_perf_counter_update()
Robert Richter [Wed, 29 Apr 2009 10:47:22 +0000 (12:47 +0200)]
perf_counter, x86: return raw count with x86_perf_counter_update()

To check on AMD cpus if a counter overflows, the upper bit of the raw
counter value must be checked. This value is already internally
available in x86_perf_counter_update(). Now, the value is returned so
that it can be used directly to check for overflows.

[ Impact: micro-optimization ]

Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Paul Mackerras <paulus@samba.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1241002046-8832-26-git-send-email-robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoperf_counter, x86: implement the interrupt handler for AMD cpus
Robert Richter [Wed, 29 Apr 2009 10:47:21 +0000 (12:47 +0200)]
perf_counter, x86: implement the interrupt handler for AMD cpus

This patch implements the interrupt handler for AMD performance
counters. In difference to the Intel pmu, there is no single status
register and also there are no fixed counters. This makes the handler
very different and it is useful to make the handler vendor
specific. To check if a counter is overflowed the upper bit of the
counter is checked. Only counters where the active bit is set are
checked.

With this patch throttling is enabled for AMD performance counters.

This patch also reenables Linux performance counters on AMD cpus.

[ Impact: re-enable perfcounters on AMD CPUs ]

Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Paul Mackerras <paulus@samba.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1241002046-8832-25-git-send-email-robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoperf_counter, x86: change and remove pmu initialization checks
Robert Richter [Wed, 29 Apr 2009 10:47:20 +0000 (12:47 +0200)]
perf_counter, x86: change and remove pmu initialization checks

Some functions are only called if the pmu was proper initialized. That
initalization checks can be removed. The way to check initialization
changed too. Now, the pointer to the interrupt handler is checked. If
it exists the pmu is initialized. This also removes a static variable
and uses struct x86_pmu as only data source for the check.

[ Impact: simplify code ]

Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Paul Mackerras <paulus@samba.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1241002046-8832-24-git-send-email-robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoperf_counter, x86: rework counter disable functions
Robert Richter [Wed, 29 Apr 2009 10:47:19 +0000 (12:47 +0200)]
perf_counter, x86: rework counter disable functions

As for the enable function, this patch reworks the disable functions
and introduces x86_pmu_disable_counter(). The internal function i/f in
struct x86_pmu changed too.

[ Impact: refactor and generalize code ]

Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Paul Mackerras <paulus@samba.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1241002046-8832-23-git-send-email-robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoperf_counter, x86: rework counter enable functions
Robert Richter [Wed, 29 Apr 2009 10:47:18 +0000 (12:47 +0200)]
perf_counter, x86: rework counter enable functions

There is vendor specific code in generic x86 code, and there is vendor
specific code that could be generic. This patch introduces
x86_pmu_enable_counter() for x86 generic code. Fixed counter code for
Intel is moved to Intel only functions. In the end, checks and calls
via function pointers were reduced to the necessary. Also, the
internal function i/f changed.

[ Impact: refactor and generalize code ]

Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Paul Mackerras <paulus@samba.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1241002046-8832-22-git-send-email-robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoperf_counter, x86: consistent use of type int for counter index
Robert Richter [Wed, 29 Apr 2009 10:47:17 +0000 (12:47 +0200)]
perf_counter, x86: consistent use of type int for counter index

The type of counter index is sometimes implemented as unsigned
int. This patch changes this to have a consistent usage of int.

[ Impact: cleanup ]

Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Paul Mackerras <paulus@samba.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1241002046-8832-21-git-send-email-robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoperf_counter, x86: generic use of cpuc->active
Robert Richter [Wed, 29 Apr 2009 10:47:16 +0000 (12:47 +0200)]
perf_counter, x86: generic use of cpuc->active

cpuc->active will now be used to indicate an enabled counter which
implies also valid pointers of cpuc->counters[]. In contrast,
cpuc->used only locks the counter, but it can be still uninitialized.

[ Impact: refactor and generalize code ]

Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Paul Mackerras <paulus@samba.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1241002046-8832-20-git-send-email-robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoperf_counter, x86: rename cpuc->active_mask
Robert Richter [Wed, 29 Apr 2009 10:47:15 +0000 (12:47 +0200)]
perf_counter, x86: rename cpuc->active_mask

This is to have a consistent naming scheme with cpuc->used.

[ Impact: cleanup ]

Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Paul Mackerras <paulus@samba.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1241002046-8832-19-git-send-email-robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoperf_counter, x86: make x86_pmu_read() static inline
Robert Richter [Wed, 29 Apr 2009 10:47:14 +0000 (12:47 +0200)]
perf_counter, x86: make x86_pmu_read() static inline

[ Impact: micro-optimization ]

Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Paul Mackerras <paulus@samba.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1241002046-8832-18-git-send-email-robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoperf_counter, x86: make pmu version generic
Robert Richter [Wed, 29 Apr 2009 10:47:13 +0000 (12:47 +0200)]
perf_counter, x86: make pmu version generic

This makes the use of the version variable generic. Also, some debug
messages have been generalized.

[ Impact: refactor and generalize code ]

Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Paul Mackerras <paulus@samba.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1241002046-8832-17-git-send-email-robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoperf_counter, x86: move counter parameters to struct x86_pmu
Robert Richter [Wed, 29 Apr 2009 10:47:12 +0000 (12:47 +0200)]
perf_counter, x86: move counter parameters to struct x86_pmu

[ Impact: refactor and generalize code ]

Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Paul Mackerras <paulus@samba.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1241002046-8832-16-git-send-email-robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoperf_counter, x86: make x86_pmu data a static struct
Robert Richter [Wed, 29 Apr 2009 10:47:11 +0000 (12:47 +0200)]
perf_counter, x86: make x86_pmu data a static struct

Instead of using a pointer to reference to the x86 pmu we now have one
single data structure that is initialized at the beginning. This saves
the pointer access when using this memory.

[ Impact: micro-optimization ]

Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Paul Mackerras <paulus@samba.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1241002046-8832-15-git-send-email-robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoperf_counter, x86: modify initialization of struct x86_pmu
Robert Richter [Wed, 29 Apr 2009 10:47:10 +0000 (12:47 +0200)]
perf_counter, x86: modify initialization of struct x86_pmu

This patch adds an error handler and changes initialization of struct
x86_pmu. No functional changes. Needed for follow-on patches.

[ Impact: cleanup ]

Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Paul Mackerras <paulus@samba.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1241002046-8832-14-git-send-email-robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoperf_counter, x86: rename intel only functions
Robert Richter [Wed, 29 Apr 2009 10:47:09 +0000 (12:47 +0200)]
perf_counter, x86: rename intel only functions

[ Impact: cleanup ]

Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Paul Mackerras <paulus@samba.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1241002046-8832-13-git-send-email-robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoperf_counter, x86: rename __hw_perf_counter_set_period into x86_perf_counter_set_period
Robert Richter [Wed, 29 Apr 2009 10:47:08 +0000 (12:47 +0200)]
perf_counter, x86: rename __hw_perf_counter_set_period into x86_perf_counter_set_period

[ Impact: cleanup ]

Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Paul Mackerras <paulus@samba.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1241002046-8832-12-git-send-email-robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoperf_counter, x86: remove ack_status() from struct x86_pmu
Robert Richter [Wed, 29 Apr 2009 10:47:07 +0000 (12:47 +0200)]
perf_counter, x86: remove ack_status() from struct x86_pmu

This function is Intel only and not necessary for AMD cpus.

[ Impact: simplify code ]

Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Paul Mackerras <paulus@samba.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1241002046-8832-11-git-send-email-robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoperf_counter, x86: remove get_status() from struct x86_pmu
Robert Richter [Wed, 29 Apr 2009 10:47:06 +0000 (12:47 +0200)]
perf_counter, x86: remove get_status() from struct x86_pmu

This function is Intel only and not necessary for AMD cpus.

[ Impact: simplify code ]

Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Paul Mackerras <paulus@samba.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1241002046-8832-10-git-send-email-robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoperf_counter, x86: make interrupt handler model specific
Robert Richter [Wed, 29 Apr 2009 10:47:05 +0000 (12:47 +0200)]
perf_counter, x86: make interrupt handler model specific

This separates the perfcounter interrupt handler for AMD and Intel
cpus. The AMD interrupt handler implementation is a follow-on patch.

[ Impact: refactor and clean up code ]

Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Paul Mackerras <paulus@samba.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1241002046-8832-9-git-send-email-robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoperf_counter, x86: rename struct pmc_x86_ops into struct x86_pmu
Robert Richter [Wed, 29 Apr 2009 10:47:04 +0000 (12:47 +0200)]
perf_counter, x86: rename struct pmc_x86_ops into struct x86_pmu

This patch renames struct pmc_x86_ops into struct x86_pmu. It
introduces a structure to describe an x86 model specific pmu
(performance monitoring unit). It may contain ops and data. The new
name of the structure fits better, is shorter, and thus better to
handle. Where it was appropriate, names of function and variable have
been changed too.

[ Impact: cleanup ]

Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Paul Mackerras <paulus@samba.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1241002046-8832-8-git-send-email-robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoperfcounters: rename struct hw_perf_counter_ops into struct pmu
Robert Richter [Wed, 29 Apr 2009 10:47:03 +0000 (12:47 +0200)]
perfcounters: rename struct hw_perf_counter_ops into struct pmu

This patch renames struct hw_perf_counter_ops into struct pmu. It
introduces a structure to describe a cpu specific pmu (performance
monitoring unit). It may contain ops and data. The new name of the
structure fits better, is shorter, and thus better to handle. Where it
was appropriate, names of function and variable have been changed too.

[ Impact: cleanup ]

Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Paul Mackerras <paulus@samba.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1241002046-8832-7-git-send-email-robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoperf_counter, x86: protect per-cpu variables with compile barriers only
Robert Richter [Wed, 29 Apr 2009 10:47:02 +0000 (12:47 +0200)]
perf_counter, x86: protect per-cpu variables with compile barriers only

Per-cpu variables needn't to be protected with cpu barriers
(smp_wmb()). Protection is only needed for preemption on the same cpu
(rescheduling or the nmi handler). This can be done using a compiler
barrier only.

[ Impact: micro-optimization ]

Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Paul Mackerras <paulus@samba.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1241002046-8832-6-git-send-email-robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoperf_counter, x86: rework pmc_amd_save_disable_all() and pmc_amd_restore_all()
Robert Richter [Wed, 29 Apr 2009 10:47:01 +0000 (12:47 +0200)]
perf_counter, x86: rework pmc_amd_save_disable_all() and pmc_amd_restore_all()

MSR reads and writes are expensive. This patch adds checks to avoid
its usage where possible.

[ Impact: micro-optimization on AMD CPUs ]

Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Paul Mackerras <paulus@samba.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1241002046-8832-5-git-send-email-robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoperf_counter, x86: add default path to cpu detection
Robert Richter [Wed, 29 Apr 2009 10:47:00 +0000 (12:47 +0200)]
perf_counter, x86: add default path to cpu detection

This quits hw counter initialization immediately if no cpu is
detected.

[ Impact: cleanup ]

Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Paul Mackerras <paulus@samba.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1241002046-8832-4-git-send-email-robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoperf_counter, x86: declare perf_max_counters only for CONFIG_PERF_COUNTERS
Robert Richter [Wed, 29 Apr 2009 10:46:59 +0000 (12:46 +0200)]
perf_counter, x86: declare perf_max_counters only for CONFIG_PERF_COUNTERS

This is only needed for CONFIG_PERF_COUNTERS enabled.

[ Impact: cleanup ]

Signed-off-by: Robert Richter <robert.richter@amd.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1241002046-8832-3-git-send-email-robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoperf_counter, x86: remove X86_FEATURE_ARCH_PERFMON flag for AMD cpus
Robert Richter [Wed, 29 Apr 2009 10:46:58 +0000 (12:46 +0200)]
perf_counter, x86: remove X86_FEATURE_ARCH_PERFMON flag for AMD cpus

X86_FEATURE_ARCH_PERFMON is an Intel hardware feature that does not
work on AMD CPUs. The flag is now only used in Intel specific code
(especially initialization).

[ Impact: refactor code ]

Signed-off-by: Robert Richter <robert.richter@amd.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1241002046-8832-2-git-send-email-robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge branch 'linus' into perfcounters/core
Ingo Molnar [Wed, 29 Apr 2009 12:46:59 +0000 (14:46 +0200)]
Merge branch 'linus' into perfcounters/core

Merge reason: This brach was on -rc1, refresh it to almost-rc4 to pick up
              the latest upstream fixes.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge branch 'drm-intel-next' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt...
Linus Torvalds [Wed, 29 Apr 2009 00:21:20 +0000 (17:21 -0700)]
Merge branch 'drm-intel-next' of git://git./linux/kernel/git/anholt/drm-intel

* 'drm-intel-next' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel:
  drm/i915: fix up error path leak in i915_cmdbuffer
  drm/i915: fix unpaired i915 device mutex on entervt failure.
  drm/i915: add support for G41 chipset
  drm/i915: Enable ASLE if present
  drm/i915: Unregister ACPI video driver when exiting
  drm/i915: Register ACPI video even when not modesetting
  drm/i915: fix transition to I915_TILING_NONE
  drm/i915: Don't let an oops get triggered from irq_emit without dma init.
  drm/i915: allow tiled front buffers on 965+

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Wed, 29 Apr 2009 00:21:07 +0000 (17:21 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: (21 commits)
  RDMA/nes: Update iw_nes version
  RDMA/nes: Fix error path in nes_accept()
  RDMA/nes: Fix hang issues for large cluster dynamic connections
  RDMA/nes: Increase rexmit timeout interval
  RDMA/nes: Check for sequence number wrap-around
  RDMA/nes: Do not set apbvt entry for loopback
  RDMA/nes: Fix unused variable compile warning when INFINIBAND_NES_DEBUG=n
  RDMA/nes: Fix fw_ver in /sys
  RDMA/nes: Set trace length to 1 inch for SFP_D
  RDMA/nes: Enable repause timer for port 1
  RDMA/nes: Correct CDR loop filter setting for port 1
  RDMA/nes: Modify thermo mitigation to flip SerDes1 ref clk to internal
  RDMA/nes: Fix resource issues in nes_create_cq() and nes_destroy_cq()
  RDMA/nes: Remove root_256()'s unused pbl_count_256 parameter
  mlx4_core: Fix memory leak in mlx4_enable_msi_x()
  IB/mthca: Fix timeout for INIT_HCA and a few other commands
  RDMA/cxgb3: Don't zero QP attrs when moving to IDLE
  RDMA/nes: Fix bugs in nes_reg_phys_mr()
  RDMA/nes: Fix compiler warning at nes_verbs.c:1955
  IPoIB: Disable NAPI while CQ is being drained
  ...

15 years agom68k: arch/m68k/kernel/sun3-head.S needs <linux/init.h>
Geert Uytterhoeven [Tue, 28 Apr 2009 19:20:11 +0000 (21:20 +0200)]
m68k: arch/m68k/kernel/sun3-head.S needs <linux/init.h>

Fix this:

  arch/m68k/kernel/sun3-head.S: Assembler messages:
  arch/m68k/kernel/sun3-head.S:32: Error: Unknown operator -- statement `__head' ignored

Introduced by commit 6f335cab0431d5df4995bcd4fd952d4c746d5a86 ("m68k:
convert to use __HEAD and HEAD_TEXT macros."), which started using
__HEAD without adding the appropriate include.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
Linus Torvalds [Tue, 28 Apr 2009 23:06:48 +0000 (16:06 -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:
  bio: fix memcpy corruption in bio_copy_user_iov()
  hd: fix locking
  mg_disk: fix CONFIG_LBD=y warning
  mg_disk: fix locking

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6
Linus Torvalds [Tue, 28 Apr 2009 23:06:33 +0000 (16:06 -0700)]
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:
  regulator: Fix default constraints for fixed voltage regulators
  regulator/bq24022: fix bug in is_enabled function
  regulator/virtual: fix strings compare predicates
  regulator core: fix double-free in regulator_register() error path
  drivers/regulator: fix when type is different from REGULATOR_VOLTAGE or REGULATOR_CURRENT
  unreachable code in drms_uA_update()
  regulator: fix header file missing kernel-doc

15 years agoMerge branches 'cxgb3', 'ipoib', 'mthca', 'mlx4' and 'nes' into for-linus
Roland Dreier [Tue, 28 Apr 2009 23:01:31 +0000 (16:01 -0700)]
Merge branches 'cxgb3', 'ipoib', 'mthca', 'mlx4' and 'nes' into for-linus

15 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
Linus Torvalds [Tue, 28 Apr 2009 22:55:32 +0000 (15:55 -0700)]
Merge branch 'merge' of git://git./linux/kernel/git/paulus/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  powerpc/ps3: Fix build error on UP
  powerpc/cell: Select PCI for IBM_CELL_BLADE AND CELLEB
  powerpc: ppc32 needs elf_read_implies_exec()
  powerpc/86xx: Add device_type entry to soc for ppc9a
  powerpc/44x: Correct memory size calculation for denali-based boards
  maintainers: Fix PowerPC 4xx git tree
  powerpc: fix for long standing bug noticed by gcc 4.4.0
  Revert "powerpc: Add support for early tlbilx opcode"

15 years agopowerpc: Revert switch to TEXT_TEXT in linker script
Tim Abbott [Tue, 28 Apr 2009 15:47:15 +0000 (11:47 -0400)]
powerpc: Revert switch to TEXT_TEXT in linker script

Commit edada399 broke the build on 64-bit powerpc because it moved the
__ftr_alt_* sections of a file away from the .text section, causing
link failures due to relative conditional branch targets being too far
away from the branch instructions.  This happens on pretty much all
64-bit powerpc configs.

This change reverts commit edada399 while preserving the update from
the *.refok sections to .ref.text that has happened since.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Requested-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agobio: fix memcpy corruption in bio_copy_user_iov()
FUJITA Tomonori [Tue, 28 Apr 2009 18:24:29 +0000 (20:24 +0200)]
bio: fix memcpy corruption in bio_copy_user_iov()

st driver uses blk_rq_map_user() in order to just build a request out
of page frames. In this case, map_data->offset is a non zero value and
iov[0].iov_base is NULL. We need to increase nr_pages for that.

Cc: stable@kernel.org
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agohd: fix locking
Tejun Heo [Tue, 28 Apr 2009 03:38:33 +0000 (12:38 +0900)]
hd: fix locking

hd dance around local irq and HD_IRQ enable without achieving much.
It ends up transferring data from irq handler with both local irq and
HD_IRQ disabled.  The only place it actually does something is while
transferring the first block of a request which it does with HD_IRQ
disabled but local irq enabled.

Unfortunately, the dancing is horribly broken from locking POV.  IRQ
and timeout handlers access block queue without grabbing the queue
lock and running the driver in SMP configuration crashes the whole
machine pretty quickly.

Remove meaningless irq enable/disable dancing and add proper locking
in issue, irq and timeout paths.

Signed-off-by: Tejun Heo <tj@kernel.org>
15 years agomg_disk: fix CONFIG_LBD=y warning
Bartlomiej Zolnierkiewicz [Tue, 28 Apr 2009 03:38:33 +0000 (12:38 +0900)]
mg_disk: fix CONFIG_LBD=y warning

drivers/block/mg_disk.c: In function ‘mg_dump_status’:
drivers/block/mg_disk.c:265: warning: format ‘%ld’ expects type ‘long int’, but
argument 2 has type ‘sector_t’

[ Impact: kill build warning ]

Cc: unsik Kim <donari75@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
15 years agomg_disk: fix locking
Tejun Heo [Tue, 28 Apr 2009 03:38:32 +0000 (12:38 +0900)]
mg_disk: fix locking

IRQ and timeout handlers call functions which expect locked queue lock
without locking it.  Fix it.

While at it, convert 0s used as null pointer constant to NULLs.

[ Impact: fix locking, cleanup ]

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: unsik Kim <donari75@gmail.com>
15 years agoregulator: Fix default constraints for fixed voltage regulators
Mark Brown [Tue, 28 Apr 2009 10:09:38 +0000 (11:09 +0100)]
regulator: Fix default constraints for fixed voltage regulators

Default voltage constraints were being provided for fixed voltage
regulator where board constraints were not provided but these constraints
used INT_MIN as the default minimum voltage which is not a valid value
since it is less than zero. Use 1uV instead.

Also set the default values we set in the constraints themselves since
otherwise the max_uV constraint we determine will not be stored in the
actual constraint strucutre and will therefore not be used.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
15 years agoregulator/bq24022: fix bug in is_enabled function
Philipp Zabel [Tue, 28 Apr 2009 11:34:14 +0000 (13:34 +0200)]
regulator/bq24022: fix bug in is_enabled function

This seems to be fallout from last October's regulator core rework.
It got noticed only because of recent regulator framework changes.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
15 years agoregulator/virtual: fix strings compare predicates
Mike Rapoport [Sun, 26 Apr 2009 08:49:30 +0000 (11:49 +0300)]
regulator/virtual: fix strings compare predicates

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
15 years agoregulator core: fix double-free in regulator_register() error path
Paul Walmsley [Sat, 25 Apr 2009 11:28:36 +0000 (05:28 -0600)]
regulator core: fix double-free in regulator_register() error path

During regulator registration, any error after device_register() will
cause a double-free on the struct regulator_dev 'rdev'.  The bug is in
drivers/regulator/core.c:regulator_register():

...
scrub:
device_unregister(&rdev->dev);
clean:
kfree(rdev);                           <---
rdev = ERR_PTR(ret);
goto out;
...

device_unregister() calls regulator_dev_release() which frees rdev.  The
subsequent kfree corrupts memory and causes some OMAP3 systems to oops on
boot in regulator_get().

Applies against 2.6.30-rc3.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
15 years agodrivers/regulator: fix when type is different from REGULATOR_VOLTAGE or REGULATOR_CURRENT
Diego Liziero [Tue, 14 Apr 2009 01:04:47 +0000 (03:04 +0200)]
drivers/regulator: fix when type is different from REGULATOR_VOLTAGE or REGULATOR_CURRENT

When regulator_desc->type is something different from REGULATOR_VOLTAGE or REGULATOR_CURRENT
the if should probably return ERR_PTR(-EINVAL)

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

@@ expression E; constant C; @@
(
- !E == C
+ E != C
)

Signed-off-by: Diego Liziero <diegoliz@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
15 years agounreachable code in drms_uA_update()
Dan Carpenter [Wed, 8 Apr 2009 10:52:39 +0000 (13:52 +0300)]
unreachable code in drms_uA_update()

I removed the extra semi-colon and indented the return statement.

The unreachable code was found by smatch (http://repo.or.cz/w/smatch.git).
The patch was compile tested.

regards,
dan carpenter

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
15 years agoregulator: fix header file missing kernel-doc
Randy Dunlap [Sat, 4 Apr 2009 04:31:30 +0000 (21:31 -0700)]
regulator: fix header file missing kernel-doc

Add regulator header file missing kernel-doc:

Warning(include/linux/regulator/driver.h:117): No description found for parameter 'set_mode'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
cc: Liam Girdwood <lrg@slimlogic.co.uk>
cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
15 years agoperf_counter tools: fix Documentation/perf_counter build error
Peter Zijlstra [Tue, 28 Apr 2009 12:56:18 +0000 (14:56 +0200)]
perf_counter tools: fix Documentation/perf_counter build error

Mike Galbraith reported:

> marge:..Documentation/perf_counter # make
>     CC builtin-stat.o
> In file included from builtin-stat.c:71:
> /usr/include/ctype.h:102: error: expected expression before ‘]’ token

Remove the ctype.h include.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agopowerpc/ps3: Fix build error on UP
Geoff Levand [Thu, 16 Apr 2009 09:05:37 +0000 (09:05 +0000)]
powerpc/ps3: Fix build error on UP

A non-SMP version of smp_send_stop() is now included in smp.h.
Remove the unneeded definition in the PS3 smp.c.

Fixes build errors like these when CONFIG_SMP=n:

  arch/powerpc/platforms/ps3/setup.c:49: error: redefinition of 'smp_send_stop'
  include/linux/smp.h:125: error: previous definition of 'smp_send_stop' was here

Reported-by: Subrata Modak <subrata@linux.vnet.ibm.com>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc/cell: Select PCI for IBM_CELL_BLADE AND CELLEB
Michael Ellerman [Wed, 22 Apr 2009 22:43:03 +0000 (22:43 +0000)]
powerpc/cell: Select PCI for IBM_CELL_BLADE AND CELLEB

Currently PPC_CELL_NATIVE selects PPC_OF_PLATFORM_PCI, but does not
select PCI. This can lead to a config with the former and the latter
disabled, which does not build.

To fix this PPC_CELL_NATIVE should select PCI. However, that would
force PCI on for QPACE, which also selects PPC_CELL_NATIVE. So
instead move the select of PPC_OF_PLATFORM_PCI and PCI under both
IBM_CELL_BLADE and CELLEB.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc: ppc32 needs elf_read_implies_exec()
Kumar Gala [Fri, 17 Apr 2009 08:03:01 +0000 (08:03 +0000)]
powerpc: ppc32 needs elf_read_implies_exec()

On ppc64 we implemented elf_read_implies_exec() for 32-bit binaries
because old toolchains had bugs where they didn't mark program
segments executable that needed to be.  For some reason we didn't do
this on ppc32 builds.  This hadn't been an issue until commit 8d30c14c
("powerpc/mm: Rework I$/D$ coherency (v3)"), which had as a side
effect that we are now enforcing execute permissions to some extent on
32-bit 4xx and Book E processors.

This fixes it by defining elf_read_implies_exec on 32-bit to turn on
the read-implies-exec behaviour on programs that are sufficiently old
that they don't have a PT_GNU_STACK program header.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agoRemove unused support code for refok sections.
Tim Abbott [Mon, 27 Apr 2009 18:02:27 +0000 (14:02 -0400)]
Remove unused support code for refok sections.

The old refok sections

  .text.init.refok
  .data.init.refok
  .exit.text.refok

have been deprecated since commit
312b1485fb509c9bc32eda28ad29537896658cb8.  After the other patches in
this patch series nothing is put in these sections, so clean things up
by eliminating all the remaining references to them.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agosparc: cleanup references to deprecated .text.init* sections.
Tim Abbott [Mon, 27 Apr 2009 18:02:26 +0000 (14:02 -0400)]
sparc: cleanup references to deprecated .text.init* sections.

The section .text.init.refok is deprecated and __REF (.ref.text)
should be used in assembly files instead.  This patch cleans up a few
uses of .text.init.refok in the sparc architecture.

Also fix a reference to .text.init in a comment that wasn't updated to
.init.text.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: David S. Miller <davem@davemloft.net>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agosh: Use __INIT macro instead of .text.init.
Tim Abbott [Mon, 27 Apr 2009 18:02:25 +0000 (14:02 -0400)]
sh: Use __INIT macro instead of .text.init.

The sh architecture has some code in the .text.init section, but it
does not reference that section in its linker scripts.

This change moves this code from the .text.init section to the
.init.text section, which is presumably where it belongs.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agopowerpc: Use __REF macro instead of old .text.init.refok.
Tim Abbott [Mon, 27 Apr 2009 18:02:24 +0000 (14:02 -0400)]
powerpc: Use __REF macro instead of old .text.init.refok.

The section .text.init.refok is deprecated and __REF (.ref.text)
should be used in assembly files instead.  This patch cleans up a few
uses of .text.init.refok in the powerpc architecture.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agopowerpc: Use TEXT_TEXT macro in linker script.
Tim Abbott [Mon, 27 Apr 2009 18:02:23 +0000 (14:02 -0400)]
powerpc: Use TEXT_TEXT macro in linker script.

Rather than adding .ref.text to the powerpc linker script so that we
can use __REF on the powerpc architecture, it seems simpler to switch
to using the generic TEXT_TEXT macro.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoarm: Use __INIT macro instead of .text.init.
Tim Abbott [Mon, 27 Apr 2009 18:02:22 +0000 (14:02 -0400)]
arm: Use __INIT macro instead of .text.init.

arm is placing some code in the .text.init section, but it does not
reference that section in its linker scripts.

This change moves this code from the .text.init section to the
.init.text section, which is presumably where it belongs.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoFRV: Use __INIT macro instead of .text.init.
Tim Abbott [Mon, 27 Apr 2009 23:37:58 +0000 (00:37 +0100)]
FRV: Use __INIT macro instead of .text.init.

FRV is placing some code in the .text.init section but does not reference that
section in its linker scripts.

This change moves this code from the .text.init section to the .init.text
section, which is presumably where it belongs.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoFRV: Remove unused header asm/init.h.
Tim Abbott [Mon, 27 Apr 2009 23:37:53 +0000 (00:37 +0100)]
FRV: Remove unused header asm/init.h.

It seems nothing has included the frv asm/init.h header for some time, and its
actual contents are out of date with include/linux/init.h.  So just delete it.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/powerpc...
Paul Mackerras [Tue, 28 Apr 2009 00:47:16 +0000 (10:47 +1000)]
Merge branch 'merge' of git://git./linux/kernel/git/jwboyer/powerpc-4xx into merge

15 years agoRDMA/nes: Update iw_nes version
Chien Tung [Mon, 27 Apr 2009 20:46:29 +0000 (13:46 -0700)]
RDMA/nes: Update iw_nes version

Update version number to 1.5.0.0

Signed-off-by: Chien Tung <chien.tin.tung@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
15 years agoRDMA/nes: Fix error path in nes_accept()
Faisal Latif [Mon, 27 Apr 2009 20:45:19 +0000 (13:45 -0700)]
RDMA/nes: Fix error path in nes_accept()

If reg_phys_mem() fails, we need to free memory allocated for MPA
frame with private data before returning the error. Also move
nes_add_ref() after the reg_phys_mem() is successful.

Signed-off-by: Faisal Latif <faisal.latif@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
15 years agoRDMA/nes: Fix hang issues for large cluster dynamic connections
Faisal Latif [Mon, 27 Apr 2009 20:41:06 +0000 (13:41 -0700)]
RDMA/nes: Fix hang issues for large cluster dynamic connections

Running large cluster setup, we are hanging after many hours of
testing.  Fixing this required going over the code and making sure the
rexmit entry was properly removed based on the cm_node's state and
packet received.  Also when receiving a FIN packet, check seq# and
make sure there were no errors before calling handle_fin().

Following are the changes done in nes_cm.c:

* handle_ack_pkt() needs to return error value, so in case of error,
  handle_fin() is not called. Some cleanup done while going over the code.

* handle_rst_pkt(), handling of cm_node's NES_CM_STATE_LAST_ACK is missing.

* process_packet(), in case of FIN only packet is received, call
  check_seq() before processing.

* in handle_fin_pkt(), we are calling cleanup_retrans_entry() for all
  conditions, even if the packets need to be dropped.

Signed-off-by: Faisal Latif <faisal.latif@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
15 years agoRDMA/nes: Increase rexmit timeout interval
Faisal Latif [Mon, 27 Apr 2009 20:39:36 +0000 (13:39 -0700)]
RDMA/nes: Increase rexmit timeout interval

Under heavy load with large cluster testing, it may take longer to
receive a response to MPA requests.  Change the driver to wait longer
after each rexmit to max time value.

Signed-off-by: Faisal Latif <faisal.latif@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
15 years agoRDMA/nes: Check for sequence number wrap-around
Faisal Latif [Mon, 27 Apr 2009 20:38:31 +0000 (13:38 -0700)]
RDMA/nes: Check for sequence number wrap-around

check_seq() was not checking if the seq#s have wrapped.  Fix it.

Signed-off-by: Faisal Latif <faisal.latif@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
15 years agoRDMA/nes: Do not set apbvt entry for loopback
Faisal Latif [Mon, 27 Apr 2009 20:37:34 +0000 (13:37 -0700)]
RDMA/nes: Do not set apbvt entry for loopback

When a connect request comes, apbvt should only be set for
non-loopback connections.

Signed-off-by: Faisal Latif <faisal.latif@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
15 years agoRDMA/nes: Fix unused variable compile warning when INFINIBAND_NES_DEBUG=n
Chien Tung [Mon, 27 Apr 2009 20:36:03 +0000 (13:36 -0700)]
RDMA/nes: Fix unused variable compile warning when INFINIBAND_NES_DEBUG=n

Remove the NES_DEBUG that is causing the compile warning about an
unused variable when INFINIBAND_NES_DEBUG is not enabled.

Signed-off-by: Chien Tung <chien.tin.tung@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
15 years agoRDMA/nes: Fix fw_ver in /sys
Chien Tung [Mon, 27 Apr 2009 20:33:48 +0000 (13:33 -0700)]
RDMA/nes: Fix fw_ver in /sys

/sys/class/infiniband/nes?/fw_ver is not displaying firmware version
properly (it shows 0.0.0 with the current code).  Fill in the correct
firmware version number.

Signed-off-by: Chien Tung <chien.tin.tung@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
15 years agoRDMA/nes: Set trace length to 1 inch for SFP_D
Chien Tung [Mon, 27 Apr 2009 20:30:35 +0000 (13:30 -0700)]
RDMA/nes: Set trace length to 1 inch for SFP_D

With updated PHY firmware for SFP_D, setting the trace length to 1
inch for SFP_D provides a more stable link.

Signed-off-by: Chien Tung <chien.tin.tung@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
15 years agoRDMA/nes: Enable repause timer for port 1
Chien Tung [Mon, 27 Apr 2009 20:29:42 +0000 (13:29 -0700)]
RDMA/nes: Enable repause timer for port 1

Enable repause timer for port 1.  Without this setting, under stress,
the chip may misbehave.

Signed-off-by: Chien Tung <chien.tin.tung@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
15 years agoRDMA/nes: Correct CDR loop filter setting for port 1
Chien Tung [Mon, 27 Apr 2009 20:28:41 +0000 (13:28 -0700)]
RDMA/nes: Correct CDR loop filter setting for port 1

In commit 1b949324 ("RDMA/nes: Fix SFP+ PHY initialization") there is
a mistake in the clean up code that removed port 1 CDR loop filter
settings for 10G cards other than CX4.  Put the correct setting back
for appropriate PHY types.

Signed-off-by: Chien Tung <chien.tin.tung@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
15 years agoRDMA/nes: Modify thermo mitigation to flip SerDes1 ref clk to internal
Chien Tung [Mon, 27 Apr 2009 20:27:21 +0000 (13:27 -0700)]
RDMA/nes: Modify thermo mitigation to flip SerDes1 ref clk to internal

Change thermo mitigation code to flip the SerDes1 reference clock to
internal, to match the change in commit a4849fc1 ("RDMA/nes: Add
wide_ppm_offset parm for switch compatibility").

Signed-off-by: Chien Tung <chien.tin.tung@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
15 years agoRevert "linux.conf.au 2009: Tuz"
Linus Torvalds [Mon, 27 Apr 2009 19:00:27 +0000 (12:00 -0700)]
Revert "linux.conf.au 2009: Tuz"

This reverts commit 8032b526d1a3bd91ad633dd3a3b5fdbc47ad54f1.

Hey, it was only meant to be a single release.  Now they can all die as
far as I'm concerned.

[ Just kidding.  They're cute and cuddly.

  Except when they have horrible nasty facial diseases.  Oh, and I guess
  they're not actually that cuddly even when disease-free. ]

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/jbarnes...
Linus Torvalds [Mon, 27 Apr 2009 18:59:46 +0000 (11:59 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jbarnes/pci-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
  PCI: only save/restore existent registers in the PCIe capability
  x86/PCI: don't bother with root quirks if _CRS is used
  docbooks: add/fix PCI kernel-doc
  PCI: cleanup debug output resources
  x86/PCI: set_pci_bus_resources_arch_default cleanups
  x86/PCI: Move set_pci_bus_resources_arch_default into arch/x86
  x86/PCI: don't call e820_all_mapped with -1 in the mmconfig case
  PCI quirk: disable MSI on VIA VT3364 chipsets

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable
Linus Torvalds [Mon, 27 Apr 2009 18:16:33 +0000 (11:16 -0700)]
Merge git://git./linux/kernel/git/mason/btrfs-unstable

* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
  Btrfs: look for acls during btrfs_read_locked_inode
  Btrfs: fix acl caching
  Btrfs: Fix a bunch of printk() warnings.
  Btrfs: Fix a trivial warning using max() of u64 vs ULL.
  Btrfs: remove unused btrfs_bit_radix slab
  Btrfs: ratelimit IO error printks
  Btrfs: remove #if 0 code
  Btrfs: When shrinking, only update disk size on success
  Btrfs: fix deadlocks and stalls on dead root removal
  Btrfs: fix fallocate deadlock on inode extent lock
  Btrfs: kill btrfs_cache_create
  Btrfs: don't export symbols
  Btrfs: simplify makefile
  Btrfs: try to keep a healthy ratio of metadata vs data block groups

15 years agopowerpc/86xx: Add device_type entry to soc for ppc9a
Martyn Welch [Mon, 27 Apr 2009 16:24:28 +0000 (17:24 +0100)]
powerpc/86xx: Add device_type entry to soc for ppc9a

The 'device_type = "soc";' line *is* needed in the DTS for get_immrbase()
to return the correct address.

Signed-off-by: Martyn Welch <martyn.welch@gefanuc.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
15 years agoBtrfs: look for acls during btrfs_read_locked_inode
Chris Mason [Mon, 27 Apr 2009 15:47:50 +0000 (11:47 -0400)]
Btrfs: look for acls during btrfs_read_locked_inode

This changes btrfs_read_locked_inode() to peek ahead in the btree for acl items.
If it is certain a given inode has no acls, it will set the in memory acl
fields to null to avoid acl lookups completely.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agoBtrfs: fix acl caching
Chris Mason [Mon, 27 Apr 2009 14:49:53 +0000 (10:49 -0400)]
Btrfs: fix acl caching

Linus noticed the btrfs code to cache acls wasn't properly caching
a NULL acl when the inode didn't have any acls.  This meant the common
case of no acls resulted in expensive btree searches every time the
kernel checked permissions (which is quite often).

This is a modified version of Linus' original patch:

Properly set initial acl fields to BTRFS_ACL_NOT_CACHED in the inode.
This forces an acl lookup when permission checks are done.

Fix btrfs_get_acl to avoid lookups and locking when the inode acls fields
are set to null.

Fix btrfs_get_acl to use the right return value from __btrfs_getxattr
when deciding to cache a NULL acl.  It was storing a NULL acl when
__btrfs_getxattr return -ENOENT, but __btrfs_getxattr was actually returning
-ENODATA for this case.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Mon, 27 Apr 2009 15:54:43 +0000 (08:54 -0700)]
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:
  ALSA: Fix Trivial Warnining in sound/pci/cmipci.c
  ALSA: snd-usb-caiaq: fix reported elapsed periods
  ASoC: s3c-i2s-v2 needs to declare a license for modular builds
  ALSA: hda - Fix init verbs of AD1884A mobile model
  ASoC: remove non-existing referece to CONFIG_SND_SOC_CODEC_WM8991
  ASoC: Fix WM8580 volume update handling for large register changes
  ASoC: Fix offset of freqmode in WM8580 PLL configuration

15 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux...
Linus Torvalds [Mon, 27 Apr 2009 15:40:00 +0000 (08:40 -0700)]
Merge branch 'for_linus' of git://git./linux/kernel/git/jack/linux-quota-2.6

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-quota-2.6:
  ext2: missing unlock in ext2_quota_write()
  quota: remove obsolete comments in fs/quota/Makefile

15 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Linus Torvalds [Mon, 27 Apr 2009 15:39:02 +0000 (08:39 -0700)]
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: Do not try to validate extents on special files
  ext4: Ignore i_file_acl_high unless EXT4_FEATURE_INCOMPAT_64BIT is present
  ext4: Fix softlockup caused by illegal i_file_acl value in on-disk inode

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Mon, 27 Apr 2009 15:38:51 +0000 (08:38 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jmorris/security-testing-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
  ptrace: ptrace_attach: fix the usage of ->cred_exec_mutex

15 years agoMerge branch 'sh/for-2.6.30' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal...
Linus Torvalds [Mon, 27 Apr 2009 15:38:15 +0000 (08:38 -0700)]
Merge branch 'sh/for-2.6.30' of git://git./linux/kernel/git/lethal/sh-2.6

* 'sh/for-2.6.30' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
  sh: Fix up unsigned syscall_nr in SH-5 pt_regs.
  maple: input: fix up maple mouse driver
  sh: sh7785lcr: fix defconfig for 29-bit mode

15 years agoMerge branch 'fix/misc' into for-linus
Takashi Iwai [Mon, 27 Apr 2009 15:15:44 +0000 (17:15 +0200)]
Merge branch 'fix/misc' into for-linus

* fix/misc:
  ALSA: Fix Trivial Warnining in sound/pci/cmipci.c

15 years agoMerge branch 'fix/caiaq' into for-linus
Takashi Iwai [Mon, 27 Apr 2009 15:15:41 +0000 (17:15 +0200)]
Merge branch 'fix/caiaq' into for-linus

* fix/caiaq:
  ALSA: snd-usb-caiaq: fix reported elapsed periods

15 years agoMerge branch 'fix/hda' into for-linus
Takashi Iwai [Mon, 27 Apr 2009 15:15:35 +0000 (17:15 +0200)]
Merge branch 'fix/hda' into for-linus

* fix/hda:
  ALSA: hda - Fix init verbs of AD1884A mobile model

15 years agoMerge branch 'fix/asoc' into for-linus
Takashi Iwai [Mon, 27 Apr 2009 15:15:32 +0000 (17:15 +0200)]
Merge branch 'fix/asoc' into for-linus

* fix/asoc:
  ASoC: s3c-i2s-v2 needs to declare a license for modular builds
  ASoC: remove non-existing referece to CONFIG_SND_SOC_CODEC_WM8991
  ASoC: Fix WM8580 volume update handling for large register changes
  ASoC: Fix offset of freqmode in WM8580 PLL configuration

15 years agoFRV: Stop gcc from generating uninitialised variable warnings after BUG()
David Howells [Mon, 27 Apr 2009 10:55:23 +0000 (11:55 +0100)]
FRV: Stop gcc from generating uninitialised variable warnings after BUG()

Stop gcc from generating uninitialised variable warnings after BUG().
The problem is that FRV's call into its gdbstub appears to return (if
the function is marked noreturn, then the compiler is under no
obligation to pass it a return address, and so GDB won't know where the
bug happened).

To get around this, we make the do...while wrapper in _debug_bug_trap()
an endless loop from which there's no escape.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoFRV: Wire up new syscalls
David Howells [Mon, 27 Apr 2009 10:55:17 +0000 (11:55 +0100)]
FRV: Wire up new syscalls

Wire up new system calls for the FRV arch (preadv and pwritev).

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoext2: missing unlock in ext2_quota_write()
Dan Carpenter [Thu, 9 Apr 2009 16:07:10 +0000 (18:07 +0200)]
ext2: missing unlock in ext2_quota_write()

The inode->i_mutex should be unlocked.

Found by smatch (http://repo.or.cz/w/smatch.git).  Compile tested.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
15 years agoquota: remove obsolete comments in fs/quota/Makefile
Christoph Hellwig [Tue, 7 Apr 2009 16:10:06 +0000 (18:10 +0200)]
quota: remove obsolete comments in fs/quota/Makefile

Get rid of useless comments and the equally useless obj-y
initialization.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jan Kara <jack@suse.cz>
15 years agoBtrfs: Fix a bunch of printk() warnings.
Joel Becker [Tue, 21 Apr 2009 19:38:29 +0000 (12:38 -0700)]
Btrfs: Fix a bunch of printk() warnings.

Just happened to notice a bunch of %llu vs u64 warnings.  Here's a patch
to cast them all.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agoBtrfs: Fix a trivial warning using max() of u64 vs ULL.
Joel Becker [Tue, 21 Apr 2009 19:38:30 +0000 (12:38 -0700)]
Btrfs: Fix a trivial warning using max() of u64 vs ULL.

A small warning popped up on ia64 because inode-map.c was comparing a
u64 object id with the ULL FIRST_FREE_OBJECTID.  My first thought was
that all the OBJECTID constants should contain the u64 cast because
btrfs code deals entirely in u64s.  But then I saw how large that was,
and figured I'd just fix the max() call.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agoBtrfs: remove unused btrfs_bit_radix slab
Chris Mason [Mon, 27 Apr 2009 11:49:10 +0000 (07:49 -0400)]
Btrfs: remove unused btrfs_bit_radix slab

Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agoALSA: Fix Trivial Warnining in sound/pci/cmipci.c
Subrata Modak [Mon, 27 Apr 2009 11:12:37 +0000 (16:42 +0530)]
ALSA: Fix Trivial Warnining in sound/pci/cmipci.c

Fixed the compile warning below by initializatin iomidi variable properly.
  sound/pci/cmipci.c: In function ‘snd_cmipci_probe’:
  sound/pci/cmipci.c:3017: warning: ‘iomidi’ may be used uninitialized in this function

Signed-off-by: Subrata Modak <subrata@linux.vnet.ibm.com>
Cc: linux-pci <linux-pci@atrey.karlin.mff.cuni.cz>
Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: Sachin P Sant <sachinp@linux.vnet.ibm.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoBtrfs: ratelimit IO error printks
Chris Mason [Mon, 27 Apr 2009 11:29:05 +0000 (07:29 -0400)]
Btrfs: ratelimit IO error printks

Btrfs has printks for various IO errors, including bad checksums and
mismatches between what we expect the block headers to contain and what
we actually find on the disk.

Longer term we need a real reporting mechanism for this, but for now
printk is going to have to do.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agoBtrfs: remove #if 0 code
Chris Mason [Mon, 27 Apr 2009 11:29:04 +0000 (07:29 -0400)]
Btrfs: remove #if 0 code

Btrfs had some old code sitting around under #if 0, this drops it.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agoBtrfs: When shrinking, only update disk size on success
Chris Ball [Mon, 27 Apr 2009 11:29:03 +0000 (07:29 -0400)]
Btrfs: When shrinking, only update disk size on success

Previously, we updated a device's size prior to attempting a shrink
operation.  This patch moves the device resizing logic to only happen if
the shrink completes successfully.  In the process, it introduces a new
field to btrfs_device -- disk_total_bytes -- to track the on-disk size.

Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agoALSA: snd-usb-caiaq: fix reported elapsed periods
Daniel Mack [Mon, 27 Apr 2009 10:18:05 +0000 (12:18 +0200)]
ALSA: snd-usb-caiaq: fix reported elapsed periods

Reset the internal period position counter upon stream startup. This
fixes initial aplay underruns and problems related to latency picky
applications such as pulseaudio.

Bumped the version number to 1.3.14.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>