]> xenbits.xensource.com Git - people/ssmith/netchannel2-pvops.git/log
people/ssmith/netchannel2-pvops.git
16 years agoMerge branch 'x86/mm'
Ingo Molnar [Tue, 12 May 2009 09:17:16 +0000 (11:17 +0200)]
Merge branch 'x86/mm'

16 years agox86: process.c, remove useless headers
Amerigo Wang [Tue, 12 May 2009 03:29:09 +0000 (23:29 -0400)]
x86: process.c, remove useless headers

<stdarg.h> is not needed by these files, remove them.

[ Impact: cleanup ]

Signed-off-by: WANG Cong <amwang@redhat.com>
Cc: akpm@linux-foundation.org
LKML-Reference: <20090512032956.5040.77055.sendpatchset@localhost.localdomain>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoMerge branch 'x86/mm'
Ingo Molnar [Tue, 12 May 2009 09:14:03 +0000 (11:14 +0200)]
Merge branch 'x86/mm'

16 years agox86: make sparse mem work in non-NUMA mode
Shaohua Li [Tue, 12 May 2009 08:40:00 +0000 (16:40 +0800)]
x86: make sparse mem work in non-NUMA mode

With sparse memory, holes should not be marked present for memmap.
This patch makes sure sparsemem really works on SMP mode (!NUMA).

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Sheng Yang <sheng.yang@intel.com>
LKML-Reference: <1242117600.22431.0.camel@sli10-desk.sh.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: merge process.c a bit
Amerigo Wang [Tue, 12 May 2009 02:05:28 +0000 (22:05 -0400)]
x86: merge process.c a bit

Merge arch_align_stack() and arch_randomize_brk(), since
they are the same.

Tested on x86_64.

[ Impact: cleanup ]

Signed-off-by: Amerigo Wang <amwang@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoMerge branch 'x86/microcode'
Ingo Molnar [Tue, 12 May 2009 08:39:21 +0000 (10:39 +0200)]
Merge branch 'x86/microcode'

16 years agoMerge branch 'tracing/core'
Ingo Molnar [Tue, 12 May 2009 08:39:19 +0000 (10:39 +0200)]
Merge branch 'tracing/core'

16 years agoMerge branch 'timers/ntp'
Ingo Molnar [Tue, 12 May 2009 08:39:16 +0000 (10:39 +0200)]
Merge branch 'timers/ntp'

16 years agox86: microcode: use smp_call_function_single instead of set_cpus_allowed, cleanup...
Dmitry Adamushko [Mon, 11 May 2009 21:48:27 +0000 (23:48 +0200)]
x86: microcode: use smp_call_function_single instead of set_cpus_allowed, cleanup of synchronization logic

* Solve issues described in 6f66cbc63081fd70e3191b4dbb796746780e5ae1
  in a way that doesn't resort to set_cpus_allowed();

* in fact, only collect_cpu_info and apply_microcode callbacks
  must run on a target cpu, others will do just fine on any other.
  smp_call_function_single() (as suggested by Ingo) is used to run
  these callbacks on a target cpu.

* cleanup of synchronization logic of the 'microcode_core' part

  The generic 'microcode_core' part guarantees that only a single cpu
  (be it a full-fledged cpu, one of the cores or HT)
  is being updated at any particular moment of time.

  In general, there is no need for any additional sync. mechanism in
  arch-specific parts (the patch removes existing spinlocks).

  See also the "Synchronization" section in microcode_core.c.

* return -EINVAL instead of -1 (which is translated into -EPERM) in
  microcode_write(), reload_cpu() and mc_sysdev_add(). Other suggestions
  for an error code?

* use 'enum ucode_state' as return value of request_microcode_{fw, user}
  to gain more flexibility by distinguishing between real error cases
  and situations when an appropriate ucode was not found (which is not an
  error per-se).

* some minor cleanups

Thanks a lot to Hugh Dickins for review/suggestions/testing!

   Reference: http://marc.info/?l=linux-kernel&m=124025889012541&w=2

[ Impact: refactor and clean up microcode driver locking code ]

Signed-off-by: Dmitry Adamushko <dmitry.adamushko@gmail.com>
Acked-by: Hugh Dickins <hugh@veritas.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andreas Herrmann <andreas.herrmann3@amd.com>
Cc: Peter Oruba <peter.oruba@amd.com>
Cc: Arjan van de Ven <arjan@infradead.org>
LKML-Reference: <1242078507.5560.9.camel@earth>
[ did some more cleanups ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
 arch/x86/include/asm/microcode.h  |   25 ++
 arch/x86/kernel/microcode_amd.c   |   58 ++----
 arch/x86/kernel/microcode_core.c  |  326 +++++++++++++++++++++-----------------
 arch/x86/kernel/microcode_intel.c |   92 +++-------
 4 files changed, 261 insertions(+), 240 deletions(-)

(~20 new comment lines)

16 years agontp: fix comment typos
john stultz [Tue, 12 May 2009 01:13:13 +0000 (18:13 -0700)]
ntp: fix comment typos

Bernhard Schiffner noticed I had a few comment typos in this patch,
(note: to save embarrassment, when making typos, avoid copying and
pasting them) so this patch corrects them.

[ Impact: cleanup ]

Reported-by: Bernhard Schiffner <bernhard@schiffner-limbach.de>
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Cc: riel@redhat.com
Cc: akpm@linux-foundation.org
LKML-Reference: <1242090794.7214.131.camel@localhost.localdomain>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoMerge branch 'auto-latest'
Ingo Molnar [Tue, 12 May 2009 08:24:47 +0000 (10:24 +0200)]
Merge branch 'auto-latest'

16 years agoMerge branch 'auto-perfcounters-next' into auto-latest
Ingo Molnar [Tue, 12 May 2009 07:26:58 +0000 (09:26 +0200)]
Merge branch 'auto-perfcounters-next' into auto-latest

Conflicts:
arch/x86/kernel/irqinit.c
arch/x86/kernel/irqinit_64.c
arch/x86/kernel/traps.c
arch/x86/mm/fault.c

16 years agoMerge branch 'auto-warnings-next' into auto-latest
Ingo Molnar [Tue, 12 May 2009 07:25:53 +0000 (09:25 +0200)]
Merge branch 'auto-warnings-next' into auto-latest

16 years agoMerge branch 'auto-iommu-next' into auto-latest
Ingo Molnar [Tue, 12 May 2009 07:25:51 +0000 (09:25 +0200)]
Merge branch 'auto-iommu-next' into auto-latest

16 years agoMerge branch 'auto-sparseirq-next' into auto-latest
Ingo Molnar [Tue, 12 May 2009 07:25:49 +0000 (09:25 +0200)]
Merge branch 'auto-sparseirq-next' into auto-latest

16 years agoMerge branch 'auto-oprofile-next' into auto-latest
Ingo Molnar [Tue, 12 May 2009 07:25:46 +0000 (09:25 +0200)]
Merge branch 'auto-oprofile-next' into auto-latest

16 years agomanual merge of auto-kmemcheck-next
Ingo Molnar [Tue, 12 May 2009 07:25:29 +0000 (09:25 +0200)]
manual merge of auto-kmemcheck-next

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoMerge branch 'auto-safe-poison-pointers-next' into auto-latest
Ingo Molnar [Tue, 12 May 2009 07:25:24 +0000 (09:25 +0200)]
Merge branch 'auto-safe-poison-pointers-next' into auto-latest

16 years agoMerge branch 'auto-core-next' into auto-latest
Ingo Molnar [Tue, 12 May 2009 07:25:20 +0000 (09:25 +0200)]
Merge branch 'auto-core-next' into auto-latest

16 years agoMerge branch 'auto-genirq-next' into auto-latest
Ingo Molnar [Tue, 12 May 2009 07:25:18 +0000 (09:25 +0200)]
Merge branch 'auto-genirq-next' into auto-latest

16 years agoMerge branch 'auto-timers-next' into auto-latest
Ingo Molnar [Tue, 12 May 2009 07:25:17 +0000 (09:25 +0200)]
Merge branch 'auto-timers-next' into auto-latest

16 years agoMerge branch 'auto-tracing-next' into auto-latest
Ingo Molnar [Tue, 12 May 2009 07:25:15 +0000 (09:25 +0200)]
Merge branch 'auto-tracing-next' into auto-latest

16 years agoMerge branch 'auto-sched-next' into auto-latest
Ingo Molnar [Tue, 12 May 2009 07:25:14 +0000 (09:25 +0200)]
Merge branch 'auto-sched-next' into auto-latest

16 years agoMerge branch 'irq/numa' into auto-genirq-next
Ingo Molnar [Tue, 12 May 2009 07:24:30 +0000 (09:24 +0200)]
Merge branch 'irq/numa' into auto-genirq-next

16 years agoMerge branch 'irq/genirq' into auto-genirq-next
Ingo Molnar [Tue, 12 May 2009 07:24:28 +0000 (09:24 +0200)]
Merge branch 'irq/genirq' into auto-genirq-next

16 years agoMerge branch 'linus' into out-of-tree
Ingo Molnar [Tue, 12 May 2009 07:16:27 +0000 (09:16 +0200)]
Merge branch 'linus' into out-of-tree

16 years agoMerge branch 'kmemcheck' into auto-kmemcheck-next
Ingo Molnar [Tue, 12 May 2009 07:11:22 +0000 (09:11 +0200)]
Merge branch 'kmemcheck' into auto-kmemcheck-next

16 years agoMerge commit 'v2.6.30-rc5' into kmemcheck
Ingo Molnar [Tue, 12 May 2009 07:07:41 +0000 (09:07 +0200)]
Merge commit 'v2.6.30-rc5' into kmemcheck

Conflicts:
arch/x86/mm/init.c
kernel/sysctl.c

Merge reason: refresh the branch to .30-rc5 and resolve conflicts.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoMerge branch 'timers/core' into auto-timers-next
Ingo Molnar [Tue, 12 May 2009 07:05:46 +0000 (09:05 +0200)]
Merge branch 'timers/core' into auto-timers-next

16 years agoMerge branch 'timers/ntp' into auto-timers-next
Ingo Molnar [Tue, 12 May 2009 07:05:38 +0000 (09:05 +0200)]
Merge branch 'timers/ntp' into auto-timers-next

16 years agoMerge branch 'timers/clocksource' into auto-timers-next
Ingo Molnar [Tue, 12 May 2009 07:05:31 +0000 (09:05 +0200)]
Merge branch 'timers/clocksource' into auto-timers-next

16 years agoMerge branch 'timers/clockevents' into auto-timers-next
Ingo Molnar [Tue, 12 May 2009 07:05:30 +0000 (09:05 +0200)]
Merge branch 'timers/clockevents' into auto-timers-next

16 years agoMerge branch 'sched/docs' into auto-sched-next
Ingo Molnar [Tue, 12 May 2009 07:05:25 +0000 (09:05 +0200)]
Merge branch 'sched/docs' into auto-sched-next

16 years agoMerge branch 'core/rcu' into auto-sched-next
Ingo Molnar [Tue, 12 May 2009 07:05:05 +0000 (09:05 +0200)]
Merge branch 'core/rcu' into auto-sched-next

16 years agoMerge branch 'sched/core' into auto-sched-next
Ingo Molnar [Tue, 12 May 2009 07:05:04 +0000 (09:05 +0200)]
Merge branch 'sched/core' into auto-sched-next

16 years agoMerge branch 'sched/urgent' into auto-sched-next
Ingo Molnar [Tue, 12 May 2009 07:05:03 +0000 (09:05 +0200)]
Merge branch 'sched/urgent' into auto-sched-next

16 years agoMerge branch 'perfcounters/core' into auto-perfcounters-next
Ingo Molnar [Tue, 12 May 2009 07:04:55 +0000 (09:04 +0200)]
Merge branch 'perfcounters/core' into auto-perfcounters-next

16 years agoMerge branch 'oprofile' into auto-oprofile-next
Ingo Molnar [Tue, 12 May 2009 07:04:44 +0000 (09:04 +0200)]
Merge branch 'oprofile' into auto-oprofile-next

16 years agoMerge branch 'core/iommu' into auto-iommu-next
Ingo Molnar [Tue, 12 May 2009 07:04:37 +0000 (09:04 +0200)]
Merge branch 'core/iommu' into auto-iommu-next

16 years agoMerge branch 'core/rcu' into auto-core-next
Ingo Molnar [Tue, 12 May 2009 07:03:14 +0000 (09:03 +0200)]
Merge branch 'core/rcu' into auto-core-next

16 years agoMerge branch 'core/signal' into auto-core-next
Ingo Molnar [Tue, 12 May 2009 07:03:09 +0000 (09:03 +0200)]
Merge branch 'core/signal' into auto-core-next

16 years agoMerge branch 'core/futexes' into auto-core-next
Ingo Molnar [Tue, 12 May 2009 07:02:59 +0000 (09:02 +0200)]
Merge branch 'core/futexes' into auto-core-next

16 years agoMerge branch 'core/printk' into auto-core-next
Ingo Molnar [Tue, 12 May 2009 07:02:49 +0000 (09:02 +0200)]
Merge branch 'core/printk' into auto-core-next

16 years agoMerge branch 'core/percpu' into auto-core-next
Ingo Molnar [Tue, 12 May 2009 07:02:47 +0000 (09:02 +0200)]
Merge branch 'core/percpu' into auto-core-next

16 years agoMerge branch 'core/locking' into auto-core-next
Ingo Molnar [Tue, 12 May 2009 07:02:45 +0000 (09:02 +0200)]
Merge branch 'core/locking' into auto-core-next

16 years agoMerge branch 'tracing/mm' into auto-tracing-next
Ingo Molnar [Tue, 12 May 2009 07:02:11 +0000 (09:02 +0200)]
Merge branch 'tracing/mm' into auto-tracing-next

16 years agoMerge branch 'tracing/core' into auto-tracing-next
Ingo Molnar [Tue, 12 May 2009 07:01:48 +0000 (09:01 +0200)]
Merge branch 'tracing/core' into auto-tracing-next

16 years agoMerge branch 'x86/kbuild-phys' into auto-x86-next
Ingo Molnar [Tue, 12 May 2009 06:52:53 +0000 (08:52 +0200)]
Merge branch 'x86/kbuild-phys' into auto-x86-next

16 years agoMerge branch 'x86/kbuild' into auto-x86-next
Ingo Molnar [Tue, 12 May 2009 06:52:51 +0000 (08:52 +0200)]
Merge branch 'x86/kbuild' into auto-x86-next

16 years agoMerge branch 'x86/asm' into auto-x86-next
Ingo Molnar [Tue, 12 May 2009 06:52:43 +0000 (08:52 +0200)]
Merge branch 'x86/asm' into auto-x86-next

16 years agoMerge branch 'x86/cpufeature' into auto-x86-next
Ingo Molnar [Tue, 12 May 2009 06:52:36 +0000 (08:52 +0200)]
Merge branch 'x86/cpufeature' into auto-x86-next

16 years agoMerge branch 'x86/mm' into auto-x86-next
Ingo Molnar [Tue, 12 May 2009 06:52:35 +0000 (08:52 +0200)]
Merge branch 'x86/mm' into auto-x86-next

16 years agoMerge branch 'x86/fpu' into auto-x86-next
Ingo Molnar [Tue, 12 May 2009 06:51:44 +0000 (08:51 +0200)]
Merge branch 'x86/fpu' into auto-x86-next

16 years agoMerge branch 'x86/setup' into auto-x86-next
Ingo Molnar [Tue, 12 May 2009 06:50:46 +0000 (08:50 +0200)]
Merge branch 'x86/setup' into auto-x86-next

16 years agoMerge branch 'x86/xen' into auto-x86-next
Ingo Molnar [Tue, 12 May 2009 06:50:45 +0000 (08:50 +0200)]
Merge branch 'x86/xen' into auto-x86-next

16 years agoMerge branch 'x86/cpu' into auto-x86-next
Ingo Molnar [Tue, 12 May 2009 06:50:27 +0000 (08:50 +0200)]
Merge branch 'x86/cpu' into auto-x86-next

16 years agoMerge branch 'x86/cleanups' into auto-x86-next
Ingo Molnar [Tue, 12 May 2009 06:50:23 +0000 (08:50 +0200)]
Merge branch 'x86/cleanups' into auto-x86-next

16 years agoMerge branch 'x86/apic' into auto-x86-next
Ingo Molnar [Tue, 12 May 2009 06:50:17 +0000 (08:50 +0200)]
Merge branch 'x86/apic' into auto-x86-next

16 years agoMerge branch 'x86/urgent' into auto-x86-next
Ingo Molnar [Tue, 12 May 2009 06:50:12 +0000 (08:50 +0200)]
Merge branch 'x86/urgent' into auto-x86-next

16 years agoring-buffer: move code around to remove some branches
Steven Rostedt [Tue, 12 May 2009 02:11:05 +0000 (22:11 -0400)]
ring-buffer: move code around to remove some branches

This is a bit of micro-optimizations. But since the ring buffer is used
in tracing every function call, it is an extreme hot path. Every nanosecond
counts.

This change shows over 5% improvement in the ring-buffer-benchmark.

[ Impact: more efficient code ]

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
16 years agoring-buffer: use internal time stamp function
Steven Rostedt [Mon, 11 May 2009 20:28:23 +0000 (16:28 -0400)]
ring-buffer: use internal time stamp function

The ring_buffer_time_stamp that is exported adds a little more overhead
than is needed for using it internally. This patch adds an internal
timestamp function that can be inlined (a single line function)
and used internally for the ring buffer.

[ Impact: a little less overhead to the ring buffer ]

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
16 years agoring-buffer: small optimizations
Steven Rostedt [Mon, 11 May 2009 20:08:00 +0000 (16:08 -0400)]
ring-buffer: small optimizations

Doing some small changes in the fast path of the ring buffer recording
saves over 3% in the ring-buffer-benchmark test.

[ Impact: a little faster ring buffer recording ]

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
16 years agox86, 32-bit: fix kernel_trap_sp()
Masami Hiramatsu [Mon, 11 May 2009 21:03:00 +0000 (17:03 -0400)]
x86, 32-bit: fix kernel_trap_sp()

Use &regs->sp instead of regs for getting the top of stack in kernel mode.
(on x86-64, regs->sp always points the top of stack)

[ Impact: Oprofile decodes only stack for backtracing on i386 ]

Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
[ v2: rename the API to kernel_stack_pointer(), move variable inside ]
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: systemtap@sources.redhat.com
Cc: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Jan Blunck <jblunck@suse.de>
Cc: Christoph Hellwig <hch@infradead.org>
LKML-Reference: <20090511210300.17332.67549.stgit@localhost.localdomain>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: Don't export sched_mc_power_savings on multi-socket single core system
Vaidyanathan Srinivasan [Mon, 11 May 2009 14:39:14 +0000 (20:09 +0530)]
sched: Don't export sched_mc_power_savings on multi-socket single core system

Fix to prevent sched_mc_power_saving from being exported through sysfs
for multi-scoket single core system. Max cores should be always greater than
one (1). My earlier patch that introduced fix for not exporting
'sched_mc_power_saving' on laptops  broke it on multi-socket single core
system. This fix addresses issue on both laptop and multi-socket single
core system.
Below are the Test results:

1. Single socket - multi-core
       Before Patch: Does not export 'sched_mc_power_saving'
       After Patch: Does not export 'sched_mc_power_saving'
       Result: Pass

2. Multi Socket - single core
      Before Patch: exports 'sched_mc_power_saving'
      After Patch: Does not export 'sched_mc_power_saving'
      Result: Pass

3. Multi Socket - Multi core
      Before Patch: exports 'sched_mc_power_saving'
      After Patch: exports 'sched_mc_power_saving'

[ Impact: make the sched_mc_power_saving control available more consistently ]

Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Cc: Suresh B Siddha <suresh.b.siddha@intel.com>
Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20090511143914.GB4853@dirshya.in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoring-buffer: move calculation of event length
Steven Rostedt [Mon, 11 May 2009 18:42:53 +0000 (14:42 -0400)]
ring-buffer: move calculation of event length

The event length is calculated and passed in to rb_reserve_next_event
in two different locations. Having rb_reserve_next_event do the
calculations directly makes only one location to do the change and
causes the calculation to be inlined by gcc.

Before:
   text    data     bss     dec     hex filename
  16538      24      12   16574    40be kernel/trace/ring_buffer.o

After:
   text    data     bss     dec     hex filename
  16490      24      12   16526    408e kernel/trace/ring_buffer.o

[ Impact: smaller more efficient code ]

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
16 years agoring-buffer: remove type parameter from rb_reserve_next_event
Steven Rostedt [Mon, 11 May 2009 18:08:09 +0000 (14:08 -0400)]
ring-buffer: remove type parameter from rb_reserve_next_event

The rb_reserve_next_event is only called for the data type (type = 0).
There is no reason to pass in the type to the function.

Before:
   text    data     bss     dec     hex filename
  16554      24      12   16590    40ce kernel/trace/ring_buffer.o

After:
   text    data     bss     dec     hex filename
  16538      24      12   16574    40be kernel/trace/ring_buffer.o

[ Impact: cleaner, smaller and slightly more efficient code ]

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
16 years agoring-buffer: check for divide by zero in ring-buffer-benchmark
Steven Rostedt [Fri, 8 May 2009 15:03:57 +0000 (11:03 -0400)]
ring-buffer: check for divide by zero in ring-buffer-benchmark

Although we check if "missed" is not zero, we divide by hit + missed,
and the addition can possible overflow and become a divide by zero.

This patch checks for this case, and will report it when it happens
then modify "hit" to make the calculation be non zero.

[ Impact: prevent possible divide by zero in ring-buffer-benchmark ]

Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
16 years agoring-buffer: replace constants with time macros in ring-buffer-benchmark
Steven Rostedt [Fri, 8 May 2009 14:56:33 +0000 (10:56 -0400)]
ring-buffer: replace constants with time macros in ring-buffer-benchmark

The use of numeric constants is discouraged. It is cleaner and more
descriptive to use macros for constant time conversions.

This patch also removes an extra new line.

[ Impact: more descriptive time conversions ]

Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
16 years agox86: fix percpu_{to,from}_op()
Jan Beulich [Mon, 11 May 2009 15:49:28 +0000 (16:49 +0100)]
x86: fix percpu_{to,from}_op()

- the byte operand constraints were wrong for 32-bit
- the to-op's input operands weren't properly parenthesized

[ Impact: fix possible miscompilation or build failure ]

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
16 years agox86, 64-bit: ifdef out struct thread_struct::ip
Alexey Dobriyan [Sun, 3 May 2009 23:30:15 +0000 (03:30 +0400)]
x86, 64-bit: ifdef out struct thread_struct::ip

struct thread_struct::ip isn't used on x86_64, struct pt_regs::ip is used
instead.

kgdb should be reading 0 always, but I can't check it.

[ Impact: (potentially) reduce thread_struct size on 64-bit ]

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: containers@lists.linux-foundation.org
LKML-Reference: <20090503233015.GJ16631@x200.localdomain>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86, 32-bit: ifdef out struct thread_struct::fs
Alexey Dobriyan [Sun, 3 May 2009 23:29:52 +0000 (03:29 +0400)]
x86, 32-bit: ifdef out struct thread_struct::fs

After commit 464d1a78fbf8cf6c7fd970e7b3e2db50a320ce28 aka
"[PATCH] i386: Convert i386 PDA code to use %fs"
%fs saved during context switch moved from thread_struct to pt_regs
and value on thread_struct became unused.

[ Impact: reduce thread_struct size on 32-bit ]

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: containers@lists.linux-foundation.org
LKML-Reference: <20090503232952.GI16631@x200.localdomain>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: apic: Fixmap apic address even if apic disabled
Cyrill Gorcunov [Mon, 11 May 2009 13:41:40 +0000 (17:41 +0400)]
x86: apic: Fixmap apic address even if apic disabled

In case if apic were disabled by boot option
we still need read_apic operation. So fixmap
a fake apic area if needed.

[ Impact: fix boot crash ]

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: yinghai@kernel.org
Cc: eswierk@aristanetworks.com
LKML-Reference: <20090511134140.GH4624@lenovo>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoMerge commit 'v2.6.30-rc5' into core/iommu
Ingo Molnar [Mon, 11 May 2009 12:44:27 +0000 (14:44 +0200)]
Merge commit 'v2.6.30-rc5' into core/iommu

Merge reason: core/iommu was on an .30-rc1 base,
              update it to .30-rc5 to refresh.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: display extended apic registers with print_local_APIC and cpu_debug code
Andreas Herrmann [Fri, 8 May 2009 16:23:50 +0000 (18:23 +0200)]
x86: display extended apic registers with print_local_APIC and cpu_debug code

Both print_local_APIC (used when apic=debug kernel param is set) and
cpu_debug code missed support for some extended APIC registers that
I'd like to see.

This adds support to show:

 - extended APIC feature register
 - extended APIC control register
 - extended LVT registers

[ Impact: print more debug info ]

Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Cc: Jaswinder Singh Rajput <jaswinder@kernel.org>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
LKML-Reference: <20090508162350.GO29045@alberich.amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: Provide _sdata in the vmlinux.lds.S file
Catalin Marinas [Mon, 11 May 2009 12:22:00 +0000 (13:22 +0100)]
x86: Provide _sdata in the vmlinux.lds.S file

_sdata is a common symbol defined by many architectures and made
available to the kernel via asm-generic/sections.h. Kmemleak uses this
symbol when scanning the data sections.

[ Impact: add new global symbol ]

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
LKML-Reference: <20090511122105.26556.96593.stgit@pc1117.cambridge.arm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoMerge commit 'v2.6.30-rc5' into x86/kbuild
Ingo Molnar [Mon, 11 May 2009 12:27:56 +0000 (14:27 +0200)]
Merge commit 'v2.6.30-rc5' into x86/kbuild

Merge reason: x86/kbuild was based on .30-rc1, refresh it with -rc5
              fixes before queueing up more changes

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoblktrace: from-sector redundant in trace_block_remap, cleanup
Li Zefan [Mon, 11 May 2009 07:06:46 +0000 (15:06 +0800)]
blktrace: from-sector redundant in trace_block_remap, cleanup

The last argument of block_remap prober is the original sector
before remap, so it should be 'from', not 'to'.

[ Impact: clean up ]

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: "Alan D. Brunelle" <Alan.Brunelle@hp.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
LKML-Reference: <4A07CE86.5090301@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoMerge commit 'v2.6.30-rc5' into sched/core
Ingo Molnar [Mon, 11 May 2009 10:59:32 +0000 (12:59 +0200)]
Merge commit 'v2.6.30-rc5' into sched/core

Merge reason: sched/core was on .30-rc1 before, update to latest fixes

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoblktrace: pdu_buf of pc events should be unsigned
Li Zefan [Mon, 11 May 2009 06:33:23 +0000 (14:33 +0800)]
blktrace: pdu_buf of pc events should be unsigned

I got this:
  8,0    1   305.417782332  2037  I   R 32 (ffffff9e 10 00 ...) [bash]

It should be:
  8,0    1   305.417782332  2037  I   R 32 (9e 10 00 ...) [bash]

[ Impact: fix output of pc events ]

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <4A07C6B3.9080802@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoperf_counter: call atomic64_set for counter->count
Paul Mackerras [Mon, 11 May 2009 05:50:21 +0000 (15:50 +1000)]
perf_counter: call atomic64_set for counter->count

A compile warning triggered because we are calling
atomic_set(&counter->count). But since counter->count
is an atomic64_t, we have to use atomic64_set.

So the count can be set short, resulting in the reset ioctl
only resetting the low word.

[ Impact: clear counter properly during the reset ioctl ]

Signed-off-by: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
LKML-Reference: <18951.48285.270311.981806@drongo.ozlabs.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoperf_counter: don't count scheduler ticks as context switches
Paul Mackerras [Mon, 11 May 2009 05:46:10 +0000 (15:46 +1000)]
perf_counter: don't count scheduler ticks as context switches

The context-switch software counter gives inflated values at present
because each scheduler tick and each process-wide counter
enable/disable prctl gets counted as a context switch.

This happens because perf_counter_task_tick, perf_counter_task_disable
and perf_counter_task_enable all call perf_counter_task_sched_out,
which calls perf_swcounter_event to record a context switch event.

This fixes it by introducing a variant of perf_counter_task_sched_out
with two underscores in front for internal use within the perf_counter
code, and makes perf_counter_task_{tick,disable,enable} call it.  This
variant doesn't record a context switch event, and takes a struct
perf_counter_context *.  This adds the new variant rather than
changing the behaviour or interface of perf_counter_task_sched_out
because that is called from other code.

[ Impact: fix inflated context-switch event counts ]

Signed-off-by: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
LKML-Reference: <18951.48034.485580.498953@drongo.ozlabs.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoperf_counter: Put whole group on when enabling group leader
Paul Mackerras [Mon, 11 May 2009 02:08:02 +0000 (12:08 +1000)]
perf_counter: Put whole group on when enabling group leader

Currently, if you have a group where the leader is disabled and there
are siblings that are enabled, and then you enable the leader, we only
put the leader on the PMU, and not its enabled siblings.  This is
incorrect, since the enabled group members should be all on or all off
at any given point.

This fixes it by adding a call to group_sched_in in
__perf_counter_enable in the case where we're enabling a group leader.

To avoid the need for a forward declaration this also moves
group_sched_in up before __perf_counter_enable.  The actual content of
group_sched_in is unchanged by this patch.

[ Impact: fix bug in counter enable code ]

Signed-off-by: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
LKML-Reference: <18951.34946.451546.691693@drongo.ozlabs.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoperf_counter, x86: clean up throttling printk
Mike Galbraith [Sun, 10 May 2009 08:53:05 +0000 (10:53 +0200)]
perf_counter, x86: clean up throttling printk

s/PERFMON/perfcounters for perfcounter interrupt throttling warning.

'perfmon' is the CPU feature name that is Intel-only, while we do
throttling in a generic way.

[ Impact: cleanup ]

Signed-off-by: Mike Galbraith <efault@gmx.de>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile...
Ingo Molnar [Mon, 11 May 2009 09:58:31 +0000 (11:58 +0200)]
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile into oprofile

16 years agox86: use sparse_memory_present_with_active_regions() on UMA
Pekka Enberg [Thu, 7 May 2009 12:35:42 +0000 (15:35 +0300)]
x86: use sparse_memory_present_with_active_regions() on UMA

There's no need to use call memory_present() manually on UMA because
initmem_init() sets up early_node_map by calling
e820_register_active_regions().

[ Impact: cleanup ]

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
LKML-Reference: <1241699742.17846.31.camel@penberg-laptop>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: unify 64-bit UMA and NUMA paging_init()
Pekka Enberg [Thu, 7 May 2009 12:35:41 +0000 (15:35 +0300)]
x86: unify 64-bit UMA and NUMA paging_init()

64-bit UMA and NUMA versions of paging_init() are almost identical.
Therefore, merge the copy in mm/numa_64.c to mm/init_64.c to remove
duplicate code.

[ Impact: cleanup ]

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
LKML-Reference: <1241699741.17846.30.camel@penberg-laptop>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: mtrr: Fix high_width computation when phys-addr is >= 44bit
Yinghai Lu [Thu, 7 May 2009 04:36:16 +0000 (21:36 -0700)]
x86: mtrr: Fix high_width computation when phys-addr is >= 44bit

found one system where cpu address line is 44bits, mtrr printout
is not right:

 [    0.000000] MTRR variable ranges enabled:
 [    0.000000]   0 base 0   00000000 mask FF0 00000000 write-back
 [    0.000000]   1 base 10  00000000 mask FFF 80000000 write-back
 [    0.000000]   2 base 0   80000000 mask FFF 80000000 uncachable
 [    0.000000]   3 base 0   7F800000 mask FFF FF800000 uncachable

Li Zefan and Frederic pointed out the high_width could be -4 some how.

It turns out when phys_addr is 44bit, size_or_mask will be
ffffffff,00000000 so ffs(size_or_mask) will be 0.

Try to check low 32 bit, to get correct high_width.

Signed-off-by: Yinghai Lu <yinghai@kerne.org>
Also-analyzed-by: Frederic Weisbecker <fweisbec@gmail.com>
Also-analyzed-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Zhaolei <zhaolei@cn.fujitsu.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Vegard Nossum <vegard.nossum@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
LKML-Reference: <4A026540.8060504@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: Allow 1MB of slack between the e820 map and SRAT, not 4GB
Yinghai Lu [Fri, 8 May 2009 07:37:34 +0000 (00:37 -0700)]
x86: Allow 1MB of slack between the e820 map and SRAT, not 4GB

It is expected that there might be slight differences between the e820
map and the SRAT table and the intention was that 1MB of slack be allowed.

The calculation comparing e820ram and pxmram assumes the units are bytes,
when they are in fact pages. This means 4GB of slack is being allowed,
not 1MB. This patch makes the correct comparison.

comment is from Mel.

[ Impact: don't accept buggy SRATs that could dump up to 4G of RAM ]

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Cc: Andrew Morton <akpm@linux-foundation.org>
LKML-Reference: <4A03E13E.6050107@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: Sanity check the e820 against the SRAT table using e820 map only
Yinghai Lu [Fri, 8 May 2009 07:36:44 +0000 (00:36 -0700)]
x86: Sanity check the e820 against the SRAT table using e820 map only

node_cover_memory() sanity checks the SRAT table by ensuring that all
PXMs cover the memory reported in the e820.

However, when calculating the size of the holes in the e820, it uses
the early_node_map[] which contains information taken from both SRAT
and e820. If the SRAT is missing an entry, then it is not detected
that the SRAT table is incorrect and missing entries.

This patch uses the e820 map to calculate the holes instead of
early_node_map[].

comment is from Mel.

[ Impact: reject incorrect SRAT tables ]

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Cc: Andrew Morton <akpm@linux-foundation.org>
LKML-Reference: <4A03E10C.60906@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: read apic ID in the !acpi_lapic case
Yinghai Lu [Sat, 2 May 2009 17:40:57 +0000 (10:40 -0700)]
x86: read apic ID in the !acpi_lapic case

Ed found that on 32-bit, boot_cpu_physical_apicid is not read right,
when the mptable is broken.

Interestingly, actually three paths use/set it:

 1. acpi: at that time that is already read from reg
 2. mptable: only read from mptable
 3. no madt, and no mptable, that use default apic id 0 for 64-bit, -1 for 32-bit

so we could read the apic id for the 2/3 path. We trust the hardware
register more than we trust a BIOS data structure (the mptable).

We can also avoid the double set_fixmap() when acpi_lapic
is used, and also need to move cpu_has_apic earlier and
call apic_disable().

Also when need to update the apic id, we'd better read and
set the apic version as well - so that quirks are applied precisely.

v2: make path 3 with 64bit, use -1 as apic id, so could read it later.
v3: fix whitespace problem pointed out by Ed Swierk

[ Impact: get correct apic id for bsp other than acpi path ]

Reported-by: Ed Swierk <eswierk@aristanetworks.com>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
LKML-Reference: <49FC85A9.2070702@kernel.org>
[ v4: sanity-check in the ACPI case too ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: clean up and and print out initial max_pfn_mapped
Yinghai Lu [Sun, 10 May 2009 06:47:42 +0000 (23:47 -0700)]
x86: clean up and and print out initial max_pfn_mapped

Do this so we can check the range that is mapped before
init_memory_mapping().

To be able to print out meaningful info, we first have to fix
64-bit to have max_pfn_mapped assigned before that call. This
also unifies the code-path a bit.

[ Impact: print more debug info, cleanup ]

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <49BF0978.40605@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: clean up and fix setup_clear/force_cpu_cap handling
Yinghai Lu [Sun, 10 May 2009 06:47:42 +0000 (23:47 -0700)]
x86: clean up and fix setup_clear/force_cpu_cap handling

setup_force_cpu_cap() only have one user (Xen guest code),
but it should not reuse cleared_cpu_cpus, otherwise it
will have problems on SMP.

Need to have a separate cpu_cpus_set array too, for forced-on
flags, beyond the forced-off flags.

Also need to setup handling before all cpus caps are combined.

[ Impact: fix the forced-set CPU feature flag logic ]

Cc: H. Peter Anvin <hpa@linux.intel.com>
Cc: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Yinghai Lu <yinghai.lu@kernel.org>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: apic: Check rev 3 fadt correctly for physical_apic bit
Yinghai Lu [Sun, 10 May 2009 06:47:42 +0000 (23:47 -0700)]
x86: apic: Check rev 3 fadt correctly for physical_apic bit

Impact: fix fadt version checking

FADT2_REVISION_ID has value 3 aka rev 3 FADT. So need to use >= instead
of >, as other places in the code do.

[ Impact: extend scope of APIC boot quirk ]

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoMerge commit 'v2.6.30-rc5' into x86/apic
Ingo Molnar [Mon, 11 May 2009 07:33:06 +0000 (09:33 +0200)]
Merge commit 'v2.6.30-rc5' into x86/apic

Merge reason: this branch was on a .30-rc2 base - sync it up with
              all the latest fixes.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86/pci: remove rounding quirk from e820_setup_gap()
Yinghai Lu [Wed, 6 May 2009 15:07:52 +0000 (08:07 -0700)]
x86/pci: remove rounding quirk from e820_setup_gap()

Now that the e820 code explicitly reserves 'potentially dangerous'
free physical memory address space to protect ACPI stolen RAM,
there's no need for the rounding quirk in the PCI allocator anymore.

Also, this quirk was open-ended iteration that could end up reserving
a lot of free space and potentially breaking drivers - such as the one
reported by Yannick Roehlly <yannick.roehlly@free.fr> where there's
a PCI device with a large memory resource.

So remove it.

[ Impact: make more of the PCI hole available for assigning pci devices ]

Reported-by: Yannick Roehlly <yannick.roehlly@free.fr>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Acked-by: Jesse Barnes <jesse.barnes@intel.com>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
LKML-Reference: <4A01A7C8.5090701@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86, e820, pci: reserve extra free space near end of RAM
Linus Torvalds [Wed, 6 May 2009 15:06:44 +0000 (08:06 -0700)]
x86, e820, pci: reserve extra free space near end of RAM

The point is to take all RAM resources we have, and
_after_ we've added all the resources we've seen in
the E820 tree, we then _also_ try to add fake reserved
entries for any "round up to X" at the end of the RAM
resources.

[ Impact: improve PCI mem-resource allocation robustness, protect "stolen RAM" ]

Reported-by: Yannick Roehlly <yannick.roehlly@free.fr>
Acked-by: Jesse Barnes <jesse.barnes@intel.com>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: yannick.roehlly@free.fr
LKML-Reference: <4A01A784.2050407@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoMerge commit 'v2.6.30-rc5' into x86/mm
Ingo Molnar [Mon, 11 May 2009 07:33:06 +0000 (09:33 +0200)]
Merge commit 'v2.6.30-rc5' into x86/mm

Merge reason: this branch was on a .30-rc2 base - sync it up with
              all the latest fixes.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
Linus Torvalds [Sun, 10 May 2009 17:49:53 +0000 (10:49 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6:
  Staging: comedi: David doesn't want to get comedi patches
  Staging: rtl8187se: Fix compilation warnings and procfs directory leak
  Staging: rt2870: new device id
  Staging: w35und: unregister device from the ieee80211 stack upon ->disconnect()

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Sun, 10 May 2009 17:49:41 +0000 (10:49 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  usb-serial: ftdi_sio: fix reference counting of ftdi_private
  USB: unusual_devs: extend nokia 6288 bcd range
  USB: Gadget: fix UTF conversion in the usbstring library
  USB: Fix makefile so that CONFIG_WDM and CONFIG_TMC work.
  USB: ftdi_sio: add vendor/product id for the Marvell SheevaPlug
  USB: cxacru: Fix negative dB output

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
Linus Torvalds [Sun, 10 May 2009 17:49:31 +0000 (10:49 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
  Revert driver core: move platform_data into platform_device
  Revert driver core: fix passing platform_data
  Remove old PRINTK_DEBUG config item
  Doc/sysfs-rules: Swap the order of the words so the sentence makes more sense
  Driver core: platform: fix kernel-doc warnings