]> pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
17 years agopkt_sched: Manage qdisc list inside of root qdisc.
David S. Miller [Sat, 19 Jul 2008 05:50:15 +0000 (22:50 -0700)]
pkt_sched: Manage qdisc list inside of root qdisc.

Idea is from Patrick McHardy.

Instead of managing the list of qdiscs on the device level, manage it
in the root qdisc of a netdev_queue.  This solves all kinds of
visibility issues during qdisc destruction.

The way to iterate over all qdiscs of a netdev_queue is to visit
the netdev_queue->qdisc, and then traverse it's list.

The only special case is to ignore builting qdiscs at the root when
dumping or doing a qdisc_lookup().  That was not needed previously
because builtin qdiscs were not added to the device's qdisc_list.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoInput: add switch for dock events
Matthew Garrett [Sat, 19 Jul 2008 04:43:54 +0000 (00:43 -0400)]
Input: add switch for dock events

Add a SW_DOCK switch to input.h.  ACPI docks currently send their docking
status as a uevent, but not all docks are ACPI or correspond to a device.
In that case, it makes more sense to simply generate an input event on
docking or undocking.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
17 years agoInput: add microphone insert switch definition
Mark Brown [Sat, 19 Jul 2008 04:40:25 +0000 (00:40 -0400)]
Input: add microphone insert switch definition

Add a new switch type to the input API for reporting microphone
insertion. This will be used by the ALSA jack reporting API.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
17 years agoInput: i8042 - add Arima-Rioworks HDAMB board to noloop list
Dmitry Torokhov [Sat, 19 Jul 2008 04:35:43 +0000 (00:35 -0400)]
Input: i8042 - add Arima-Rioworks HDAMB board to noloop list

The board does not raise AUX IRQ in response to AUX LOOP command.

Reported-by: Guillaume Morin <guillaume@morinfr.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
17 years agoInput: sgi_btns - add support for SGI Indy volume buttons
Thomas Bogendoerfer [Sat, 19 Jul 2008 04:14:26 +0000 (00:14 -0400)]
Input: sgi_btns - add support for SGI Indy volume buttons

Also rename sgio2_btns to sgi_btns since the driver is not only
for SGI O2 anymore.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
17 years agoInput: add option to disable HP SDC driver
Helge Deller [Mon, 14 Jul 2008 14:28:32 +0000 (10:28 -0400)]
Input: add option to disable HP SDC driver

Add "no_hpsdc" kernel module option to the hp_sdc driver, so that
the driver can be instructed to not enable the HP SDC port.

This is useful on some older HPPA boxes with HIL keyboard
and HIL mouse where the new HP SDC HIL drivers don't work
yet. By disabling the new hp_sdc driver users are able to use
the older hilkbd driver instead.

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
17 years agopkt_sched: Get rid of u32_list.
David S. Miller [Sat, 19 Jul 2008 03:54:17 +0000 (20:54 -0700)]
pkt_sched: Get rid of u32_list.

The u32_list is just an indirect way of maintaining a reference
to a U32 node on a per-qdisc basis.

Just add an explicit node pointer for u32 to struct Qdisc an do
away with this global list.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agopacket: add PACKET_RESERVE sockopt
Patrick McHardy [Sat, 19 Jul 2008 01:05:19 +0000 (18:05 -0700)]
packet: add PACKET_RESERVE sockopt

Add new sockopt to reserve some headroom in the mmaped ring frames in
front of the packet payload. This can be used f.i. when the VLAN header
needs to be (re)constructed to avoid moving the entire payload.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agobnx2: Update version to 1.7.9.
Benjamin Li [Sat, 19 Jul 2008 00:58:57 +0000 (17:58 -0700)]
bnx2: Update version to 1.7.9.

Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agobnx2: Fix Sparse warnings
Benjamin Li [Sat, 19 Jul 2008 00:57:26 +0000 (17:57 -0700)]
bnx2: Fix Sparse warnings

This patch will fix the following sparse warnings:

/home/benli/sparse/bnx2.c:297:8: warning: symbol 'val' shadows an earlier one
/home/benli/sparse/bnx2.c:286:60: originally declared here
/home/benli/sparse/bnx2.c:7461:7: warning: symbol 'i' shadows an earlier one
/home/benli/sparse/bnx2.c:7265:10: originally declared here

Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agobnx2: Add TX multiqueue support.
Benjamin Li [Sat, 19 Jul 2008 00:55:11 +0000 (17:55 -0700)]
bnx2: Add TX multiqueue support.

Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agobnx2: Update TPAT firmware
Benjamin Li [Sat, 19 Jul 2008 00:54:17 +0000 (17:54 -0700)]
bnx2: Update TPAT firmware

This change allows the first TX ring (CID 16) and the first TSS TX ring
(CID 32) to be used concurrently.  Before this change, we could get TSO
errors when both TX rings were used concurrently.

Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoe1000: resolve tx multiqueue bug
Ben Hutchings [Sat, 19 Jul 2008 00:50:57 +0000 (17:50 -0700)]
e1000: resolve tx multiqueue bug

With the recent changes to tx mutiqueue, e1000 was not calling
netif_start_queue() before calling netif_wake_queue().
This causes an oops during loading of the driver.

(Based on commit d55b53fff0c2ddb639dca04c3f5a0854f292d982
("igb/ixgbe/e1000e: resolve tx multiqueue bug").)

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agox86: remove arch_get_ram_range
Yinghai Lu [Sat, 19 Jul 2008 00:28:40 +0000 (17:28 -0700)]
x86: remove arch_get_ram_range

no user now

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
17 years agox86: Add a debugfs interface to dump PAT memtype
venkatesh.pallipadi@intel.com [Fri, 18 Jul 2008 23:08:14 +0000 (16:08 -0700)]
x86: Add a debugfs interface to dump PAT memtype

Add a debugfs interface to list out all the PAT memtype reservations.
Appears at debugfs x86/pat_memtype_list and output format is
type @ <start addr>-<end addr>

We do not hold the lock while printing the entire list. So, the list may not be
a consistent copy in case where regions are getting added or deleted
at the same time.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
17 years agox86: Add a arch directory for x86 under debugfs
venkatesh.pallipadi@intel.com [Fri, 18 Jul 2008 23:08:13 +0000 (16:08 -0700)]
x86: Add a arch directory for x86 under debugfs

Add a directory for x86 arch under debugfs. Can be used to accumulate all
x86 specific debugfs files.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
17 years agox86: i386: reduce boot fixmap space
Jan Beulich [Fri, 18 Jul 2008 12:29:00 +0000 (13:29 +0100)]
x86: i386: reduce boot fixmap space

As 256 entries are needed, aligning to a 256-entry boundary is
sufficient and still guarantees the single pte table requirement.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
17 years agoi386/xen: add proper unwind annotations to xen_sysenter_target
Jan Beulich [Fri, 18 Jul 2008 12:32:23 +0000 (13:32 +0100)]
i386/xen: add proper unwind annotations to xen_sysenter_target

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
17 years agox86: reduce force_mwait visibility
Jan Beulich [Fri, 18 Jul 2008 12:45:20 +0000 (13:45 +0100)]
x86: reduce force_mwait visibility

It's not used anywhere outside its single referencing file.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
17 years agox86: reduce forbid_dac's visibility
Jan Beulich [Fri, 18 Jul 2008 12:44:16 +0000 (13:44 +0100)]
x86: reduce forbid_dac's visibility

It's not used anywhere outside its declaring file.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
17 years agox86: move dma32_reserve_bootmem() after reserve_crashkernel()
Bernhard Walle [Fri, 18 Jul 2008 17:07:53 +0000 (19:07 +0200)]
x86: move dma32_reserve_bootmem() after reserve_crashkernel()

On a x86-64 machine (nothing special I could encounter) I had the problem that
crashkernel reservation with the usual "64M@16M" failed. While debugging that,
I encountered that dma32_reserve_bootmem() reserves a memory region which is in
that area.

Because dma32_reserve_bootmem() does not rely on a specific offset but
crashkernel does, it makes sense to move the dma32_reserve_bootmem()
reservation down a bit. I tested that patch and it works without problems. I
don't see any negative effects of that move, but maybe I oversaw something ...

While we strictly don't need that patch in 2.6.27 because we have the
automatic, dynamic offset detection, it makes sense to also include it here
because:

  - it's easier to get it in -stable then,
  - many people are still used to the 'crashkernel=...@16M' syntax,
  - not everybody may be using a reloatable kernel.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
Cc: kexec@lists.infradead.org
Cc: vgoyal@redhat.com
Cc: akpm@linux-foundation.org
Cc: Bernhard Walle <bwalle@suse.de>
Cc: yhlu.kernel@gmail.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: fix two modpost warnings
Jan Beulich [Fri, 18 Jul 2008 12:37:53 +0000 (13:37 +0100)]
x86: fix two modpost warnings

Even though it's only the difference of the two __initdata symbols
that's being calculated, modpost still doesn't like this. So rather
calculate the size once in an __init function and store it for later
use.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
17 years agox86: check function status in EDD boot code
Jan Beulich [Fri, 18 Jul 2008 12:35:37 +0000 (13:35 +0100)]
x86: check function status in EDD boot code

Without checking the return value of get_edd_info() and adding the
entry only in the success case, 6 devices show up under
/sys/firmware/edd/, no matter how many devices are actually present.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
17 years agoMerge branch 'x86/uv' into x86/x2apic
Ingo Molnar [Fri, 18 Jul 2008 21:01:04 +0000 (23:01 +0200)]
Merge branch 'x86/uv' into x86/x2apic

Conflicts:

arch/x86/kernel/Makefile

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoMerge branch 'x86/apic' into x86/x2apic
Ingo Molnar [Fri, 18 Jul 2008 21:00:05 +0000 (23:00 +0200)]
Merge branch 'x86/apic' into x86/x2apic

Conflicts:

arch/x86/kernel/paravirt.c
arch/x86/kernel/smpboot.c
arch/x86/kernel/vmi_32.c
arch/x86/lguest/boot.c
arch/x86/xen/enlighten.c
include/asm-x86/apic.h
include/asm-x86/paravirt.h

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoMerge branch 'linus' into x86/x2apic
Ingo Molnar [Fri, 18 Jul 2008 20:50:34 +0000 (22:50 +0200)]
Merge branch 'linus' into x86/x2apic

17 years agoMerge branch 'linus' into pci-for-jesse
Ingo Molnar [Fri, 18 Jul 2008 20:39:59 +0000 (22:39 +0200)]
Merge branch 'linus' into pci-for-jesse

17 years agocpumask: Optimize cpumask_of_cpu in lib/smp_processor_id.c, fix
Ingo Molnar [Fri, 18 Jul 2008 20:34:00 +0000 (22:34 +0200)]
cpumask: Optimize cpumask_of_cpu in lib/smp_processor_id.c, fix

fix typo.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86_64: ia32_signal.c: remove signal number conversion
Hiroshi Shimamoto [Thu, 17 Jul 2008 02:21:31 +0000 (19:21 -0700)]
x86_64: ia32_signal.c: remove signal number conversion

This was old code that was needed for iBCS and x86-64 never supported that.

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agocpumask: Use optimized CPUMASK_ALLOC macros in the centrino_target
Mike Travis [Tue, 15 Jul 2008 21:14:37 +0000 (14:14 -0700)]
cpumask: Use optimized CPUMASK_ALLOC macros in the centrino_target

  * Use the CPUMASK_ALLOC macros in the centrino_target() function.

Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agocpumask: Provide a generic set of CPUMASK_ALLOC macros
Mike Travis [Tue, 15 Jul 2008 21:14:36 +0000 (14:14 -0700)]
cpumask: Provide a generic set of CPUMASK_ALLOC macros

  * Provide a generic set of CPUMASK_ALLOC macros patterned after the
    SCHED_CPUMASK_ALLOC macros.  This is used where multiple cpumask_t
    variables are declared on the stack to reduce the amount of stack
    space required.

Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agocpumask: Optimize cpumask_of_cpu in lib/smp_processor_id.c
Mike Travis [Tue, 15 Jul 2008 21:14:35 +0000 (14:14 -0700)]
cpumask: Optimize cpumask_of_cpu in lib/smp_processor_id.c

  * Optimize various places where a pointer to the cpumask_of_cpu value
    will result in reducing stack pressure.

Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agocpumask: Optimize cpumask_of_cpu in kernel/time/tick-common.c
Mike Travis [Tue, 15 Jul 2008 21:14:34 +0000 (14:14 -0700)]
cpumask: Optimize cpumask_of_cpu in kernel/time/tick-common.c

  * Optimize various places where a pointer to the cpumask_of_cpu value
    will result in reducing stack pressure.

Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agocpumask: Optimize cpumask_of_cpu in drivers/misc/sgi-xp/xpc_main.c
Mike Travis [Tue, 15 Jul 2008 21:14:33 +0000 (14:14 -0700)]
cpumask: Optimize cpumask_of_cpu in drivers/misc/sgi-xp/xpc_main.c

  * Optimize various places where a pointer to the cpumask_of_cpu value
    will result in reducing stack pressure.

Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agocpumask: Optimize cpumask_of_cpu in arch/x86/kernel/ldt.c
Mike Travis [Tue, 15 Jul 2008 21:14:32 +0000 (14:14 -0700)]
cpumask: Optimize cpumask_of_cpu in arch/x86/kernel/ldt.c

  * Optimize various places where a pointer to the cpumask_of_cpu value
    will result in reducing stack pressure.

Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agocpumask: Optimize cpumask_of_cpu in arch/x86/kernel/io_apic_64.c
Mike Travis [Tue, 15 Jul 2008 21:14:31 +0000 (14:14 -0700)]
cpumask: Optimize cpumask_of_cpu in arch/x86/kernel/io_apic_64.c

  * Optimize various places where a pointer to the cpumask_of_cpu value
    will result in reducing stack pressure.

Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agocpumask: Replace cpumask_of_cpu with cpumask_of_cpu_ptr
Mike Travis [Tue, 15 Jul 2008 21:14:30 +0000 (14:14 -0700)]
cpumask: Replace cpumask_of_cpu with cpumask_of_cpu_ptr

  * This patch replaces the dangerous lvalue version of cpumask_of_cpu
    with new cpumask_of_cpu_ptr macros.  These are patterned after the
    node_to_cpumask_ptr macros.

    In general terms, if there is a cpumask_of_cpu_map[] then a pointer to
    the cpumask_of_cpu_map[cpu] entry is used.  The cpumask_of_cpu_map
    is provided when there is a large NR_CPUS count, reducing
    greatly the amount of code generated and stack space used for
    cpumask_of_cpu().  The pointer to the cpumask_t value is needed for
    calling set_cpus_allowed_ptr() to reduce the amount of stack space
    needed to pass the cpumask_t value.

    If there isn't a cpumask_of_cpu_map[], then a temporary variable is
    declared and filled in with value from cpumask_of_cpu(cpu) as well as
    a pointer variable pointing to this temporary variable.  Afterwards,
    the pointer is used to reference the cpumask value.  The compiler
    will optimize out the extra dereference through the pointer as well
    as the stack space used for the pointer, resulting in identical code.

    A good example of the orthogonal usages is in net/sunrpc/svc.c:

case SVC_POOL_PERCPU:
{
unsigned int cpu = m->pool_to[pidx];
cpumask_of_cpu_ptr(cpumask, cpu);

*oldmask = current->cpus_allowed;
set_cpus_allowed_ptr(current, cpumask);
return 1;
}
case SVC_POOL_PERNODE:
{
unsigned int node = m->pool_to[pidx];
node_to_cpumask_ptr(nodecpumask, node);

*oldmask = current->cpus_allowed;
set_cpus_allowed_ptr(current, nodecpumask);
return 1;
}

Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoMerge branch 'linus' into cpus4096
Ingo Molnar [Fri, 18 Jul 2008 20:00:54 +0000 (22:00 +0200)]
Merge branch 'linus' into cpus4096

Conflicts:

drivers/acpi/processor_throttling.c

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agonfsd: nfs4xdr.c do-while is not a compound statement
Harvey Harrison [Fri, 18 Jul 2008 04:33:04 +0000 (21:33 -0700)]
nfsd: nfs4xdr.c do-while is not a compound statement

The WRITEMEM macro produces sparse warnings of the form:
fs/nfsd/nfs4xdr.c:2668:2: warning: do-while statement is not a compound statement

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
17 years agoSh: use generic per-device coherent dma allocator
Dmitry Baryshkov [Fri, 18 Jul 2008 09:30:31 +0000 (13:30 +0400)]
Sh: use generic per-device coherent dma allocator

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoARM: support generic per-device coherent dma mem
Dmitry Baryshkov [Fri, 18 Jul 2008 09:30:14 +0000 (13:30 +0400)]
ARM: support generic per-device coherent dma mem

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoGeneric dma-coherent: fix DMA_MEMORY_EXCLUSIVE
Dmitry Baryshkov [Fri, 18 Jul 2008 09:29:57 +0000 (13:29 +0400)]
Generic dma-coherent: fix DMA_MEMORY_EXCLUSIVE

Don't rewrite successfull allocation return values
in case the memory was marked with DMA_MEMORY_EXCLUSIVE.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoMerge branch 'linus' into core/generic-dma-coherent
Ingo Molnar [Fri, 18 Jul 2008 19:13:20 +0000 (21:13 +0200)]
Merge branch 'linus' into core/generic-dma-coherent

Conflicts:

kernel/Makefile

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agonfsd: Use C99 initializers in fs/nfsd/nfs4xdr.c
J. Bruce Fields [Fri, 18 Jul 2008 19:04:16 +0000 (15:04 -0400)]
nfsd: Use C99 initializers in fs/nfsd/nfs4xdr.c

Thanks to problem report and original patch from Harvey Harrison.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Cc: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Benny Halevy <bhalevy@panasas.com>
17 years agoMerge branch 'linus' into timers/nohz
Ingo Molnar [Fri, 18 Jul 2008 17:53:16 +0000 (19:53 +0200)]
Merge branch 'linus' into timers/nohz

17 years agox86, pci: introduce config option for pci reroute quirks (was: [PATCH 0/3] Boot IRQ...
Stefan Assmann [Tue, 15 Jul 2008 11:48:55 +0000 (13:48 +0200)]
x86, pci: introduce config option for pci reroute quirks (was: [PATCH 0/3] Boot IRQ quirks for Broadcom and AMD/ATI)

This is against linux-2.6-tip, branch pci-ioapic-boot-irq-quirks.

From: Stefan Assmann <sassmann@suse.de>
Subject: Introduce config option for pci reroute quirks

The config option X86_REROUTE_FOR_BROKEN_BOOT_IRQS is introduced to
enable (or disable) the redirection of the interrupt handler to the boot
interrupt line by default. Depending on the existence of interrupt
masking / threaded interrupt handling in the kernel (vanilla, rt, ...)
and the maturity of the rerouting patch, users can enable or disable the
redirection by default.

This means that the reroute quirk can be applied to any kernel without
changing it.

Interrupt sharing could be increased if this option is enabled. However this
option is vital for threaded interrupt handling, as done by the RT kernel.
It should simplify the consolidation with the RT kernel.

The option can be overridden by either pci=ioapicreroute or
pci=noioapicreroute.

Signed-off-by: Stefan Assmann <sassmann@suse.de>
Signed-off-by: Olaf Dabrunz <od@suse.de>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Jon Masters <jonathan@jonmasters.org>
Cc: Ihno Krumreich <ihno@suse.de>
Cc: Sven Dietrich <sdietrich@suse.de>
Cc: Daniel Gollub <dgollub@suse.de>
Cc: Felix Foerster <ffoerster@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoMerge branch 'linus' into x86/pci-ioapic-boot-irq-quirks
Ingo Molnar [Fri, 18 Jul 2008 17:31:12 +0000 (19:31 +0200)]
Merge branch 'linus' into x86/pci-ioapic-boot-irq-quirks

Conflicts:

drivers/pci/quirks.c

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoarch/x86/kernel/cpu/common_64.c: remove double inclusions
Alexander Beregalov [Wed, 9 Jul 2008 18:28:24 +0000 (22:28 +0400)]
arch/x86/kernel/cpu/common_64.c: remove double inclusions

x86: remove double inclusions in arch/x86/kernel/cpu/common_64.c

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Cc: yhlu.kernel@gmail.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agogenirq: enable polling for disabled screaming irqs
Eric W. Biederman [Thu, 10 Jul 2008 21:48:54 +0000 (14:48 -0700)]
genirq: enable polling for disabled screaming irqs

When we disable a screaming irq we never see it again.  If the irq
line is shared or if the driver half works this is a real pain.  So
periodically poll the handlers for screaming interrupts.

I use a timer instead of the classic irq poll technique of working off
the timer interrupt because when we use the local apic timers
note_interrupt is never called (bug?).  Further on a system with
dynamic ticks the timer interrupt might not even fire unless there is
a timer telling it it needs to.

I forced this case on my test system with an e1000 nic and my ssh
session remained responsive despite the interrupt handler only being
called every 10th of a second.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: apic_ops for lguest
Suresh Siddha [Mon, 14 Jul 2008 16:49:14 +0000 (09:49 -0700)]
x86: apic_ops for lguest

apic_ops for lguest.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Acked-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: let 32bit use apic_ops too - fix
Suresh Siddha [Fri, 18 Jul 2008 16:59:40 +0000 (09:59 -0700)]
x86: let 32bit use apic_ops too - fix

Fix VMI apic_ops.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Acked-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86_32: remove redundant KERN_INFO
Hiroshi Shimamoto [Thu, 3 Jul 2008 20:12:13 +0000 (13:12 -0700)]
x86_32: remove redundant KERN_INFO

This printk has a KERN_ facility level in the format string.

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoftrace: only trace preempt off with preempt tracer
Steven Rostedt [Tue, 15 Jul 2008 13:53:37 +0000 (09:53 -0400)]
ftrace: only trace preempt off with preempt tracer

When PREEMPT_TRACER and IRQSOFF_TRACER are both configured and irqsoff
tracer is running, the preempt_off sections might also be traced.

Thanks to Andrew Morton for pointing out my mistake of spin_lock disabling
interrupts while he was reviewing ftrace.txt. Seems that my example I used
actually hit this bug.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: introducing asm-x86/traps.h
Jaswinder Singh [Tue, 15 Jul 2008 15:39:13 +0000 (21:09 +0530)]
x86: introducing asm-x86/traps.h

Declaring x86 traps under one hood.
Declaring x86 do_traps before defining them.

Signed-off-by: Jaswinder Singh <jaswinder@infradead.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agokthread: reduce stack pressure in create_kthread and kthreadd
Mike Travis [Tue, 8 Jul 2008 22:55:48 +0000 (15:55 -0700)]
kthread: reduce stack pressure in create_kthread and kthreadd

  * Replace:

   set_cpus_allowed(..., CPU_MASK_ALL)

    with:

   set_cpus_allowed_ptr(..., CPU_MASK_ALL_PTR)

    to remove excessive stack requirements when NR_CPUS=4096.

Signed-off-by: Mike Travis <travis@sgi.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoAMD IOMMU: set iommu for device from ACPI code too
Joerg Roedel [Mon, 14 Jul 2008 18:11:18 +0000 (20:11 +0200)]
AMD IOMMU: set iommu for device from ACPI code too

The device<->iommu relationship has to be set from the information in the ACPI
table too. This patch adds this logic to the driver.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Cc: iommu@lists.linux-foundation.org
Cc: bhavna.sarathy@amd.com
Cc: robert.richter@amd.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoMerge branch 'linus' into x86/amd-iommu
Ingo Molnar [Fri, 18 Jul 2008 16:43:08 +0000 (18:43 +0200)]
Merge branch 'linus' into x86/amd-iommu

17 years agox86: consolidate the definition of the force_mwait variable
Thomas Petazzoni [Thu, 10 Jul 2008 15:13:19 +0000 (17:13 +0200)]
x86: consolidate the definition of the force_mwait variable

The force_mwait variable iss defined either in
arch/x86/kernel/cpu/amd.c or in arch/x86/kernel/setup_64.c, but it is
only initialized and used in arch/x86/kernel/process.c. This patch
moves the declaration to arch/x86/kernel/process.c.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: michael@free-electrons.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosoftlockup: fix invalid proc_handler for softlockup_panic
Hiroshi Shimamoto [Tue, 8 Jul 2008 01:37:04 +0000 (18:37 -0700)]
softlockup: fix invalid proc_handler for softlockup_panic

The type of softlockup_panic is int, but the proc_handler is
proc_doulongvec_minmax(). This handler is for unsigned long.

This handler should be proc_dointvec_minmax().

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86 setup.c: cleanup includes
Alexander Beregalov [Sun, 6 Jul 2008 16:13:49 +0000 (20:13 +0400)]
x86 setup.c: cleanup includes

x86: remove double includes in setup.c

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Cc: yhlu.kernel@gmail.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agonohz: prevent tick stop outside of the idle loop
Thomas Gleixner [Fri, 18 Jul 2008 15:27:28 +0000 (17:27 +0200)]
nohz: prevent tick stop outside of the idle loop

Jack Ren and Eric Miao tracked down the following long standing
problem in the NOHZ code:

scheduler switch to idle task
enable interrupts

Window starts here

----> interrupt happens (does not set NEED_RESCHED)
       irq_exit() stops the tick

----> interrupt happens (does set NEED_RESCHED)

return from schedule()

cpu_idle(): preempt_disable();

Window ends here

The interrupts can happen at any point inside the race window. The
first interrupt stops the tick, the second one causes the scheduler to
rerun and switch away from idle again and we end up with the tick
disabled.

The fact that it needs two interrupts where the first one does not set
NEED_RESCHED and the second one does made the bug obscure and extremly
hard to reproduce and analyse. Kudos to Jack and Eric.

Solution: Limit the NOHZ functionality to the idle loop to make sure
that we can not run into such a situation ever again.

cpu_idle()
{
preempt_disable();

while(1) {
 tick_nohz_stop_sched_tick(1); <- tell NOHZ code that we
            are in the idle loop

 while (!need_resched())
       halt();

 tick_nohz_restart_sched_tick(); <- disables NOHZ mode
 preempt_enable_no_resched();
 schedule();
 preempt_disable();
}
}

In hindsight we should have done this forever, but ...

/me grabs a large brown paperbag.

Debugged-by: Jack Ren <jack.ren@marvell.com>,
Debugged-by: eric miao <eric.y.miao@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agoFix typos from signal_32/64.h merge
Herton Ronaldo Krzesinski [Mon, 14 Jul 2008 20:40:23 +0000 (17:40 -0300)]
Fix typos from signal_32/64.h merge

Fallout from commit 33185c504f8e521b398536b5a8d415779a24593c ("x86:
merge signal_32/64.h")

Thanks to Dick Streefland who provided an useful testcase on
http://lkml.org/lkml/2008/3/17/205 (only applicable to 2.6.24.x), that
helped a lot as a deterministic way to bisect an issue that leaded to
this fix.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Cc: Roland McGrath <roland@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86, intel_cacheinfo: fix use-after-free cache_kobject
Akinobu Mita [Tue, 15 Jul 2008 08:09:03 +0000 (17:09 +0900)]
x86, intel_cacheinfo: fix use-after-free cache_kobject

This avoids calling kobject_uevent() with cache_kobject that has
already been deallocated in an error path.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: re-enable OPTIMIZE_INLINING
Ingo Molnar [Fri, 18 Jul 2008 14:30:05 +0000 (16:30 +0200)]
x86: re-enable OPTIMIZE_INLINING

re-enable OPTIMIZE_INLINING more widely. Jeff Dike fixed the remaining
outstanding issue in this commit:

| commit 4f81c5350b44bcc501ab6f8a089b16d064b4d2f6
| Author: Jeff Dike <jdike@addtoit.com>
| Date:   Mon Jul 7 13:36:56 2008 -0400
|
|     [UML] fix gcc ICEs and unresolved externs
[...]
|    This patch reintroduces unit-at-a-time for gcc >= 4.0, bringing back the
|    possibility of Uli's crash.  If that happens, we'll debug it.

it's still default-off and thus opt-in.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: traps_xx: modify x86_64 to use _log_lvl variants
Alexander van Heukelum [Thu, 10 Jul 2008 19:16:39 +0000 (21:16 +0200)]
x86: traps_xx: modify x86_64 to use _log_lvl variants

i386 has show_trace_log_lvl and show_stack_log_lvl, allowing
traces to be emitted with log-level annotations. This patch
introduces them to x86_64, but log_lvl is only ever set to
an empty string. Output of traces is unchanged.

i386-chunk is whitespace-only.

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: traps_xx: refactor die() like in x86_64
Alexander van Heukelum [Thu, 10 Jul 2008 19:14:52 +0000 (21:14 +0200)]
x86: traps_xx: refactor die() like in x86_64

Make the diff between the traps_32.c and traps_64.c a bit smaller.

Change traps_32.c to look more like traps_64.c:
 - move lock information to file scope
 - split out oops_begin() and oops_end() from die()
 - increment nest counter in oops_begin

Only whitespace change in traps_64.c

No functional changes intended.

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Acked-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agorcu classic: new algorithm for callbacks-processing(v2)
Lai Jiangshan [Sun, 6 Jul 2008 09:23:59 +0000 (17:23 +0800)]
rcu classic: new algorithm for callbacks-processing(v2)

This is v2, it's a little deference from v1 that I
had send to lkml.
use ACCESS_ONCE
use rcu_batch_after/rcu_batch_before for batch # comparison.

rcutorture test result:
(hotplugs: do cpu-online/offline once per second)

No CONFIG_NO_HZ:           OK, 12hours
No CONFIG_NO_HZ, hotplugs: OK, 12hours
CONFIG_NO_HZ=y:            OK, 24hours
CONFIG_NO_HZ=y, hotplugs:  Failed.
(Failed also without my patch applied, exactly the same bug occurred,
http://lkml.org/lkml/2008/7/3/24)

v1's email thread:
http://lkml.org/lkml/2008/6/2/539

v1's description:

The code/algorithm of the implement of current callbacks-processing
is very efficient and technical. But when I studied it and I found
a disadvantage:

In multi-CPU systems, when a new RCU callback is being
queued(call_rcu[_bh]), this callback will be invoked after the grace
period for the batch with batch number = rcp->cur+2 has completed
very very likely in current implement. Actually, this callback can be
invoked after the grace period for the batch with
batch number = rcp->cur+1 has completed. The delay of invocation means
that latency of synchronize_rcu() is extended. But more important thing
is that the callbacks usually free memory, and these works are delayed
too! it's necessary for reclaimer to free memory as soon as
possible when left memory is few.

A very simple way can solve this problem:
a field(struct rcu_head::batch) is added to record the batch number for
the RCU callback. And when a new RCU callback is being queued, we
determine the batch number for this callback(head->batch = rcp->cur+1)
and we move this callback to rdp->donelist if we find
that head->batch <= rcp->completed when we process callbacks.
This simple way reduces the wait time for invocation a lot. (about
2.5Grace Period -> 1.5Grace Period in average in multi-CPU systems)

This is my algorithm. But I do not add any field for struct rcu_head
in my implement. We just need to memorize the last 2 batches and
their batch number, because these 2 batches include all entries that
for whom the grace period hasn't completed. So we use a special
linked-list rather than add a field.
Please see the comment of struct rcu_data.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Dipankar Sarma <dipankar@in.ibm.com>
Cc: Gautham Shenoy <ego@in.ibm.com>
Cc: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agorcu classic: simplify the next pending batch
Lai Jiangshan [Sun, 6 Jul 2008 09:23:55 +0000 (17:23 +0800)]
rcu classic: simplify the next pending batch

use a batch number(rcp->pending) instead of a flag(rcp->next_pending)

rcu_start_batch() need to change this flag, so mb()s is needed
for memory-access safe.

but(after this patch applied) rcu_start_batch() do not change
this batch number(rcp->pending), rcp->pending is managed by
__rcu_process_callbacks only, and troublesome mb()s are eliminated.

And codes look simpler and clearer.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Dipankar Sarma <dipankar@in.ibm.com>
Cc: Gautham Shenoy <ego@in.ibm.com>
Cc: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agofix core/stacktrace changes on avr32, mips, sh
Heiko Carstens [Mon, 14 Jul 2008 21:32:32 +0000 (23:32 +0200)]
fix core/stacktrace changes on avr32, mips, sh

Fixes this type of problem:

  CC      arch/s390/kernel/stacktrace.o
arch/s390/kernel/stacktrace.c:84: warning: data definition has no type or storage class
arch/s390/kernel/stacktrace.c:84: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL'
arch/s390/kernel/stacktrace.c:84: warning: parameter names (without types) in function declaration
arch/s390/kernel/stacktrace.c:97: warning: data definition has no type or storage class
arch/s390/kernel/stacktrace.c:97: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL'
arch/s390/kernel/stacktrace.c:97: warning: parameter names (without types) in function declaration

caused by "stacktrace: export save_stack_trace[_tsk]"

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86 BIOS interface for RTC on SGI UV
Russ Anderson [Wed, 9 Jul 2008 20:27:19 +0000 (15:27 -0500)]
x86 BIOS interface for RTC on SGI UV

Real-time code needs to know the number of cycles per second
on SGI UV.  The information is provided via a run time BIOS
call.  This patch provides the linux side of that interface.
This is the first of several run time BIOS calls to be defined
in uv/bios.h and bios_uv.c.

Note that BIOS_CALL() is just a stub for now.  The bios
side is being worked on.

Signed-off-by: Russ Anderson <rja@sgi.com>
Cc: Jack Steiner <steiner@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86, cleanup: fix description of __fls(): __fls(0) is undefined
Alexander van Heukelum [Sat, 5 Jul 2008 17:53:46 +0000 (19:53 +0200)]
x86, cleanup: fix description of __fls(): __fls(0) is undefined

Ricardo M. Correia spotted that the use of __fls() in fls64() did
not seem to make sense. In fact fls64()'s implementation is fine,
but the description of __fls() was wrong. Fix that.

Reported-by: "Ricardo M. Correia" <Ricardo.M.Correia@Sun.COM>
Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: more apic debugging
Maciej W. Rozycki [Fri, 18 Jul 2008 00:47:44 +0000 (01:47 +0100)]
x86: more apic debugging

[ mingo@elte.hu: picked up this patch from Maciej, lets make apic=debug
                 print out more info - we had a lot of APIC changes ]

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: I/O APIC: Always report how the timer has been set up
Maciej W. Rozycki [Mon, 14 Jul 2008 18:08:13 +0000 (19:08 +0100)]
x86: I/O APIC: Always report how the timer has been set up

Following recent (and less so) issues with the 8254 timer when routed
through the I/O or local APIC, always report which configurations have
been tried and which one has been set up eventually.  This is so that logs
posted by people for some other reason can be used as a cross-reference
when investigating any possible future problems.

The change unifies messages printed on 32-bit and 64-bit platforms and
adds trailing newlines (removes leading ones), so that proper log level
annotation can be used and any possible interspersed output will not cause
a mess.

I have chosen to use apic_printk(APIC_QUIET, ...) rather than printk(...)
so that the distinction of these messages is maintained making possible
future decisions about changes in this area easier.  A change posted
separately making apic_verbosity unsigned removes any extra code that
would otherwise be generated as a result of this design decision.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: APIC: Make apic_verbosity unsigned
Maciej W. Rozycki [Mon, 14 Jul 2008 17:44:51 +0000 (18:44 +0100)]
x86: APIC: Make apic_verbosity unsigned

As a microoptimisation, make apic_verbosity unsigned.  This will make
apic_printk(APIC_QUIET, ...) expand into just printk(...) with the
surrounding condition and a reference to apic_verbosity removed.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: I/O APIC: Include <asm/i8259.h> required by some code
Maciej W. Rozycki [Mon, 14 Jul 2008 16:18:04 +0000 (17:18 +0100)]
x86: I/O APIC: Include <asm/i8259.h> required by some code

Include <asm/i8259.h> for i8259A_lock used in print_PIC() -- #if-0-ed out
by default.  The 32-bit version gets it right already.

The plan is to enable this code with "apic=debug" eventually.  This will
aid with debugging strange problems without the need to ask people to
apply patches.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: apic_32 - introduce calibrate_APIC_clock
Cyrill Gorcunov [Tue, 15 Jul 2008 17:02:55 +0000 (21:02 +0400)]
x86: apic_32 - introduce calibrate_APIC_clock

Introduce calibrate_APIC_clock so it could help in further 32/64bit
apic code merging.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: macro@linux-mips.org
Cc: yhlu.kernel@gmail.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: apic_64 - make calibrate_APIC_clock to return error code
Cyrill Gorcunov [Tue, 15 Jul 2008 17:02:54 +0000 (21:02 +0400)]
x86: apic_64 - make calibrate_APIC_clock to return error code

Make calibration_result to return error and check calibration_result
to be sufficient inside calibrate_APIC_clock.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: macro@linux-mips.org
Cc: yhlu.kernel@gmail.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: enable memory tester support on 32-bit
Yinghai Lu [Tue, 15 Jul 2008 07:03:44 +0000 (00:03 -0700)]
x86: enable memory tester support on 32-bit

only supports memory below max_low_pfn.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: seperate memtest from init_64.c
Yinghai Lu [Tue, 15 Jul 2008 07:02:28 +0000 (00:02 -0700)]
x86: seperate memtest from init_64.c

it's separate functionality that deserves its own file.

This also prepares 32-bit memtest support.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: fix build error, provide partition_sched_domains() unconditionally
Ingo Molnar [Fri, 18 Jul 2008 12:01:39 +0000 (14:01 +0200)]
sched: fix build error, provide partition_sched_domains() unconditionally

provide an empty partition_sched_domains() definition for the UP case:

 include/linux/cpuset.h: In function â€˜rebuild_sched_domains':
 include/linux/cpuset.h:163: error: implicit declaration of function â€˜partition_sched_domains'

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: fix warning in inc_rt_tasks() to not declare variable 'rq' if it's not needed
David Howells [Fri, 11 Jul 2008 12:34:54 +0000 (13:34 +0100)]
sched: fix warning in inc_rt_tasks() to not declare variable 'rq' if it's not needed

Fix inc_rt_tasks() to not declare variable 'rq' if it's not needed.  It is
declared if CONFIG_SMP or CONFIG_RT_GROUP_SCHED, but only used if CONFIG_SMP.

This is a consequence of patch 1f11eb6a8bc92536d9e93ead48fa3ffbd1478571 plus
patch 1100ac91b6af02d8639d518fad5b434b1bf44ed6.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86_64: ia32_signal.c: use macro instead of immediate
Hiroshi Shimamoto [Mon, 14 Jul 2008 22:34:09 +0000 (15:34 -0700)]
x86_64: ia32_signal.c: use macro instead of immediate

Make and use macro FIX_EFLAGS, instead of immediate value 0x40DD5 in
ia32_restore_sigcontext().

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Acked-by: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoMerge branch 'linus' into x86/cleanups
Ingo Molnar [Fri, 18 Jul 2008 11:53:16 +0000 (13:53 +0200)]
Merge branch 'linus' into x86/cleanups

17 years agoxen: report hypervisor version
Jeremy Fitzhardinge [Tue, 15 Jul 2008 20:42:34 +0000 (13:42 -0700)]
xen: report hypervisor version

Various versions of the hypervisor have differences in what ABIs and
features they support.  Print some details into the boot log to help
with remote debugging.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoftrace: fix 4d3702b6 (post-v2.6.26): WARNING: at kernel/lockdep.c:2731 check_flags...
Steven Rostedt [Wed, 16 Jul 2008 04:13:45 +0000 (00:13 -0400)]
ftrace: fix 4d3702b6 (post-v2.6.26): WARNING: at kernel/lockdep.c:2731 check_flags (ftrace)

On Wed, 16 Jul 2008, Vegard Nossum wrote:

> When booting 4d3702b6, I got this huge thing:
>
> Testing tracer wakeup: <4>------------[ cut here ]------------
> WARNING: at kernel/lockdep.c:2731 check_flags+0x123/0x160()
> Modules linked in:
> Pid: 1, comm: swapper Not tainted 2.6.26-crashing-02127-g4d3702b6 #30
>  [<c015c349>] warn_on_slowpath+0x59/0xb0
>  [<c01276c6>] ? ftrace_call+0x5/0x8
>  [<c012d800>] ? native_read_tsc+0x0/0x20
>  [<c0158de2>] ? sub_preempt_count+0x12/0xf0
>  [<c01814eb>] ? trace_hardirqs_off+0xb/0x10
>  [<c0182fbc>] ? __lock_acquire+0x2cc/0x1120
>  [<c01814eb>] ? trace_hardirqs_off+0xb/0x10
>  [<c01276af>] ? mcount_call+0x5/0xa
>  [<c017ff53>] check_flags+0x123/0x160
>  [<c0183e61>] lock_acquire+0x51/0xd0
>  [<c01276c6>] ? ftrace_call+0x5/0x8
>  [<c0613d4f>] _spin_lock_irqsave+0x5f/0xa0
>  [<c01a8d45>] ? ftrace_record_ip+0xf5/0x220
>  [<c02d5413>] ? debug_locks_off+0x3/0x50
>  [<c01a8d45>] ftrace_record_ip+0xf5/0x220
>  [<c01276af>] mcount_call+0x5/0xa
>  [<c02d5418>] ? debug_locks_off+0x8/0x50
>  [<c017ff27>] check_flags+0xf7/0x160
>  [<c0183e61>] lock_acquire+0x51/0xd0
>  [<c01276c6>] ? ftrace_call+0x5/0x8
>  [<c0613d4f>] _spin_lock_irqsave+0x5f/0xa0
>  [<c01affcd>] ? wakeup_tracer_call+0x6d/0xf0
>  [<c01625e2>] ? _local_bh_enable+0x62/0xb0
>  [<c0158ddd>] ? sub_preempt_count+0xd/0xf0
>  [<c01affcd>] wakeup_tracer_call+0x6d/0xf0
>  [<c0162724>] ? __do_softirq+0xf4/0x110
>  [<c01afff1>] ? wakeup_tracer_call+0x91/0xf0
>  [<c01276c6>] ftrace_call+0x5/0x8
>  [<c0162724>] ? __do_softirq+0xf4/0x110
>  [<c0158de2>] ? sub_preempt_count+0x12/0xf0
>  [<c01625e2>] _local_bh_enable+0x62/0xb0
>  [<c0162724>] __do_softirq+0xf4/0x110
>  [<c01627ed>] do_softirq+0xad/0xb0
>  [<c0162a15>] irq_exit+0xa5/0xb0
>  [<c013a506>] smp_apic_timer_interrupt+0x66/0xa0
>  [<c02d3fac>] ? trace_hardirqs_off_thunk+0xc/0x10
>  [<c0127449>] apic_timer_interrupt+0x2d/0x34
>  [<c018007b>] ? find_usage_backwards+0xb/0xf0
>  [<c0613a09>] ? _spin_unlock_irqrestore+0x69/0x80
>  [<c014ef32>] tg_shares_up+0x132/0x1d0
>  [<c014d2a2>] walk_tg_tree+0x62/0xa0
>  [<c014ee00>] ? tg_shares_up+0x0/0x1d0
>  [<c014a860>] ? tg_nop+0x0/0x10
>  [<c015499d>] update_shares+0x5d/0x80
>  [<c0154a2f>] try_to_wake_up+0x6f/0x280
>  [<c01a8b90>] ? __ftrace_modify_code+0x0/0xc0
>  [<c01a8b90>] ? __ftrace_modify_code+0x0/0xc0
>  [<c0154c94>] wake_up_process+0x14/0x20
>  [<c01725f6>] kthread_create+0x66/0xb0
>  [<c0195400>] ? do_stop+0x0/0x200
>  [<c0195320>] ? __stop_machine_run+0x30/0xb0
>  [<c0195340>] __stop_machine_run+0x50/0xb0
>  [<c0195400>] ? do_stop+0x0/0x200
>  [<c01a8b90>] ? __ftrace_modify_code+0x0/0xc0
>  [<c061242d>] ? mutex_unlock+0xd/0x10
>  [<c01953cc>] stop_machine_run+0x2c/0x60
>  [<c01a94d3>] unregister_ftrace_function+0x103/0x180
>  [<c01b0517>] stop_wakeup_tracer+0x17/0x60
>  [<c01b056f>] wakeup_tracer_ctrl_update+0xf/0x30
>  [<c01ab8d5>] trace_selftest_startup_wakeup+0xb5/0x130
>  [<c01ab950>] ? trace_wakeup_test_thread+0x0/0x70
>  [<c01aadf5>] register_tracer+0x135/0x1b0
>  [<c0877d02>] init_wakeup_tracer+0xd/0xf
>  [<c085d437>] kernel_init+0x1a9/0x2ce
>  [<c061397b>] ? _spin_unlock_irq+0x3b/0x60
>  [<c02d3f9c>] ? trace_hardirqs_on_thunk+0xc/0x10
>  [<c0877cf5>] ? init_wakeup_tracer+0x0/0xf
>  [<c0182646>] ? trace_hardirqs_on_caller+0x126/0x180
>  [<c02d3f9c>] ? trace_hardirqs_on_thunk+0xc/0x10
>  [<c01269c8>] ? restore_nocheck_notrace+0x0/0xe
>  [<c085d28e>] ? kernel_init+0x0/0x2ce
>  [<c085d28e>] ? kernel_init+0x0/0x2ce
>  [<c01275fb>] kernel_thread_helper+0x7/0x10
>  =======================
> ---[ end trace a7919e7f17c0a725 ]---
> irq event stamp: 579530
> hardirqs last  enabled at (579528): [<c01826ab>] trace_hardirqs_on+0xb/0x10
> hardirqs last disabled at (579529): [<c01814eb>] trace_hardirqs_off+0xb/0x10
> softirqs last  enabled at (579530): [<c0162724>] __do_softirq+0xf4/0x110
> softirqs last disabled at (579517): [<c01627ed>] do_softirq+0xad/0xb0
> irq event stamp: 579530
> hardirqs last  enabled at (579528): [<c01826ab>] trace_hardirqs_on+0xb/0x10
> hardirqs last disabled at (579529): [<c01814eb>] trace_hardirqs_off+0xb/0x10
> softirqs last  enabled at (579530): [<c0162724>] __do_softirq+0xf4/0x110
> softirqs last disabled at (579517): [<c01627ed>] do_softirq+0xad/0xb0
> PASSED
>
> Incidentally, the kernel also hung while I was typing in this report.

Things get weird between lockdep and ftrace because ftrace can be called
within lockdep internal code (via the mcount pointer) and lockdep can be
called with ftrace (via spin_locks).

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Tested-by: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: suppress sparse returning void warnings
Harvey Harrison [Thu, 17 Jul 2008 21:22:34 +0000 (14:22 -0700)]
x86: suppress sparse returning void warnings

include/asm/paravirt.h:1404:2: warning: returning void-valued expression
include/asm/paravirt.h:1414:2: warning: returning void-valued expression

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoMerge branch 'linus' into x86/paravirt-spinlocks
Ingo Molnar [Fri, 18 Jul 2008 11:41:27 +0000 (13:41 +0200)]
Merge branch 'linus' into x86/paravirt-spinlocks

Conflicts:

arch/x86/kernel/Makefile

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoigb/ixgbe/e1000e: resolve tx multiqueue bug
Jeff Kirsher [Fri, 18 Jul 2008 11:33:03 +0000 (04:33 -0700)]
igb/ixgbe/e1000e: resolve tx multiqueue bug

With the recent changes to tx mutiqueue, igb/ixgbe/e1000e was not calling
netif_tx_start_all_queues() before calling netif_tx_wake_all_queues().
This causes an issue during loading of the driver.

In addition, updated e1000e to use the updated tx mutliqueue api.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agocpu hotplug: Make cpu_active_map synchronization dependency clear
Max Krasnyansky [Wed, 16 Jul 2008 03:56:26 +0000 (20:56 -0700)]
cpu hotplug: Make cpu_active_map synchronization dependency clear

This goes on top of the cpu_active_map (take 2) patch.

Currently we depend on the stop_machine to provide nescessesary
synchronization for the cpu_active_map updates.
As Dmitry Adamushko pointed this is fragile and is not much clearer
than the previous scheme. In other words we do not want to depend on
the internal stop machine operation here.
So make the synchronization rules clear by doing synchronize_sched()
after clearing out cpu active bit.

Tested on quad-Core2 with:

   while true; do
      for i in 1 2 3; do
        echo 0 > /sys/devices/system/cpu/cpu$i/online
      done
      for i in 1 2 3; do
        echo 1 > /sys/devices/system/cpu/cpu$i/online
      done
   done
and
   stress -c 200

No lockdep, preempt or other complaints.

Signed-off-by: Max Krasnyansky <maxk@qualcomm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agocpu hotplug, sched: Introduce cpu_active_map and redo sched domain managment (take 2)
Max Krasnyansky [Tue, 15 Jul 2008 11:43:49 +0000 (04:43 -0700)]
cpu hotplug, sched: Introduce cpu_active_map and redo sched domain managment (take 2)

This is based on Linus' idea of creating cpu_active_map that prevents
scheduler load balancer from migrating tasks to the cpu that is going
down.

It allows us to simplify domain management code and avoid unecessary
domain rebuilds during cpu hotplug event handling.

Please ignore the cpusets part for now. It needs some more work in order
to avoid crazy lock nesting. Although I did simplfy and unify domain
reinitialization logic. We now simply call partition_sched_domains() in
all the cases. This means that we're using exact same code paths as in
cpusets case and hence the test below cover cpusets too.
Cpuset changes to make rebuild_sched_domains() callable from various
contexts are in the separate patch (right next after this one).

This not only boots but also easily handles
while true; do make clean; make -j 8; done
and
while true; do on-off-cpu 1; done
at the same time.
(on-off-cpu 1 simple does echo 0/1 > /sys/.../cpu1/online thing).

Suprisingly the box (dual-core Core2) is quite usable. In fact I'm typing
this on right now in gnome-terminal and things are moving just fine.

Also this is running with most of the debug features enabled (lockdep,
mutex, etc) no BUG_ONs or lockdep complaints so far.

I believe I addressed all of the Dmitry's comments for original Linus'
version. I changed both fair and rt balancer to mask out non-active cpus.
And replaced cpu_is_offline() with !cpu_active() in the main scheduler
code where it made sense (to me).

Signed-off-by: Max Krasnyanskiy <maxk@qualcomm.com>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Gregory Haskins <ghaskins@novell.com>
Cc: dmitry.adamushko@gmail.com
Cc: pj@sgi.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoftrace: copy + paste typo in asm/ftrace.h
Sebastian Siewior [Wed, 16 Jul 2008 21:31:17 +0000 (23:31 +0200)]
ftrace: copy + paste typo in asm/ftrace.h

Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de>
Cc: Steven Rostedt <srostedt@redhat.co>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoproc: consolidate per-net single-release callers
Pavel Emelyanov [Fri, 18 Jul 2008 11:07:44 +0000 (04:07 -0700)]
proc: consolidate per-net single-release callers

They are symmetrical to single_open ones :)

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoproc: consolidate per-net single_open callers
Pavel Emelyanov [Fri, 18 Jul 2008 11:07:21 +0000 (04:07 -0700)]
proc: consolidate per-net single_open callers

There are already 7 of them - time to kill some duplicate code.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoproc: clean the ip_misc_proc_init and ip_proc_init_net error paths
Pavel Emelyanov [Fri, 18 Jul 2008 11:06:50 +0000 (04:06 -0700)]
proc: clean the ip_misc_proc_init and ip_proc_init_net error paths

After all this stuff is moved outside, this function can look better.

Besides, I tuned the error path in ip_proc_init_net to make it have
only 2 exit points, not 3.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoproc: show per-net ip_devconf.forwarding in /proc/net/snmp
Pavel Emelyanov [Fri, 18 Jul 2008 11:06:26 +0000 (04:06 -0700)]
proc: show per-net ip_devconf.forwarding in /proc/net/snmp

This one has become per-net long ago, but the appropriate file
is per-net only now.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoproc: create /proc/net/snmp file in each net
Pavel Emelyanov [Fri, 18 Jul 2008 11:06:04 +0000 (04:06 -0700)]
proc: create /proc/net/snmp file in each net

All the statistics shown in this file have been made per-net already.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoproc: create /proc/net/netstat file in each net
Pavel Emelyanov [Fri, 18 Jul 2008 11:05:17 +0000 (04:05 -0700)]
proc: create /proc/net/netstat file in each net

Now all the shown in it statistics is netnsizated, time to
show it in appropriate net.

The appropriate net init/exit ops already exist - they make
the sockstat file per net - so just extend them.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoipv4: clean the init_ipv4_mibs error paths
Pavel Emelyanov [Fri, 18 Jul 2008 11:04:51 +0000 (04:04 -0700)]
ipv4: clean the init_ipv4_mibs error paths

After moving all the stuff outside this function it looks
a bit ugly - make it look better.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agomib: put icmpmsg statistics on struct net
Pavel Emelyanov [Fri, 18 Jul 2008 11:04:22 +0000 (04:04 -0700)]
mib: put icmpmsg statistics on struct net

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agomib: put icmp statistics on struct net
Pavel Emelyanov [Fri, 18 Jul 2008 11:04:02 +0000 (04:04 -0700)]
mib: put icmp statistics on struct net

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>