]> pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
17 years agousb gadget: link fixes for storage gadget
David Brownell [Tue, 19 Aug 2008 00:43:25 +0000 (17:43 -0700)]
usb gadget: link fixes for storage gadget

Change how the file storage gadget driver builds:  don't
use separate compilation, since it works poorly when key
parts are library code (with init sections etc).  Instead
be as close as we can to "gcc --combine ...".

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agousb gadget: link fixes for printer gadget
David Brownell [Tue, 19 Aug 2008 00:42:49 +0000 (17:42 -0700)]
usb gadget: link fixes for printer gadget

Change how the printer gadget driver builds:  don't use
separate compilation, since it works poorly when key parts
are library code (with init sections etc).  Instead be as
close as we can to "gcc --combine ...".

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agousb gadget: link fixes for MIDI gadget
David Brownell [Tue, 19 Aug 2008 00:42:04 +0000 (17:42 -0700)]
usb gadget: link fixes for MIDI gadget

Change how the MIDI gadget driver builds:  don't use separate
compilation, since it works poorly when key parts are library
code (with init sections etc).  Instead be as close as we can
to "gcc --combine ...".

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agousb gadget: link fixes for gadget zero
David Brownell [Tue, 19 Aug 2008 00:41:31 +0000 (17:41 -0700)]
usb gadget: link fixes for gadget zero

Change how the Gadget Zero driver builds:  don't use
separate compilation, since it works poorly when key
parts are library code (with init sections etc).
Instead be as close as we can to "gcc --combine ...".

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agousb gadget: link fixes for serial gadget
David Brownell [Tue, 19 Aug 2008 00:41:02 +0000 (17:41 -0700)]
usb gadget: link fixes for serial gadget

Change how the serial gadget driver builds:  don't use
separate compilation, since it works poorly when key parts
are library code (with init sections etc).  Instead be as
close as we can to "gcc --combine ...".

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agodevice create: remove device_create_drvdata
Greg Kroah-Hartman [Tue, 22 Jul 2008 03:03:34 +0000 (20:03 -0700)]
device create: remove device_create_drvdata

Now that the tree is cleaned up, device_create_drvdata can be safely
removed.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agodevice create: ide: convert device_create_drvdata to device_create
Greg Kroah-Hartman [Tue, 22 Jul 2008 03:03:34 +0000 (20:03 -0700)]
device create: ide: convert device_create_drvdata to device_create

Now that device_create() has been audited, rename things back to the
original call to be sane.

Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agodevice create: video: convert device_create_drvdata to device_create
Greg Kroah-Hartman [Tue, 22 Jul 2008 03:03:34 +0000 (20:03 -0700)]
device create: video: convert device_create_drvdata to device_create

Now that device_create() has been audited, rename things back to the
original call to be sane.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agodevice create: usb: convert device_create_drvdata to device_create
Greg Kroah-Hartman [Tue, 22 Jul 2008 03:03:34 +0000 (20:03 -0700)]
device create: usb: convert device_create_drvdata to device_create

Now that device_create() has been audited, rename things back to the
original call to be sane.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agodevice create: sound: convert device_create_drvdata to device_create
Greg Kroah-Hartman [Tue, 22 Jul 2008 03:03:34 +0000 (20:03 -0700)]
device create: sound: convert device_create_drvdata to device_create

Now that device_create() has been audited, rename things back to the
original call to be sane.

Cc: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agodevice create: scsi: convert device_create_drvdata to device_create
Greg Kroah-Hartman [Tue, 22 Jul 2008 03:03:34 +0000 (20:03 -0700)]
device create: scsi: convert device_create_drvdata to device_create

Now that device_create() has been audited, rename things back to the
original call to be sane.

Cc: James E.J. Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agodevice create: s390: convert device_create_drvdata to device_create
Greg Kroah-Hartman [Tue, 22 Jul 2008 03:03:34 +0000 (20:03 -0700)]
device create: s390: convert device_create_drvdata to device_create

Now that device_create() has been audited, rename things back to the
original call to be sane.

Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agodevice create: net: convert device_create_drvdata to device_create
Greg Kroah-Hartman [Tue, 22 Jul 2008 03:03:34 +0000 (20:03 -0700)]
device create: net: convert device_create_drvdata to device_create

Now that device_create() has been audited, rename things back to the
original call to be sane.

Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agodevice create: misc: convert device_create_drvdata to device_create
Greg Kroah-Hartman [Tue, 22 Jul 2008 03:03:34 +0000 (20:03 -0700)]
device create: misc: convert device_create_drvdata to device_create

Now that device_create() has been audited, rename things back to the
original call to be sane.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agodevice create: infiniband: convert device_create_drvdata to device_create
Greg Kroah-Hartman [Tue, 22 Jul 2008 03:03:34 +0000 (20:03 -0700)]
device create: infiniband: convert device_create_drvdata to device_create

Now that device_create() has been audited, rename things back to the
original call to be sane.

Cc: Roland Dreier <rolandd@cisco.com>
Cc: Sean Hefty <sean.hefty@intel.com>
Cc: Hal Rosenstock <hal.rosenstock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agodevice create: ieee1394: convert device_create_drvdata to device_create
Greg Kroah-Hartman [Tue, 22 Jul 2008 03:03:34 +0000 (20:03 -0700)]
device create: ieee1394: convert device_create_drvdata to device_create

Now that device_create() has been audited, rename things back to the
original call to be sane.

Cc: Ben Collins <ben.collins@ubuntu.com>
Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agodevice create: char: convert device_create_drvdata to device_create
Greg Kroah-Hartman [Tue, 22 Jul 2008 03:03:34 +0000 (20:03 -0700)]
device create: char: convert device_create_drvdata to device_create

Now that device_create() has been audited, rename things back to the
original call to be sane.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agodevice create: block: convert device_create_drvdata to device_create
Greg Kroah-Hartman [Tue, 22 Jul 2008 03:03:34 +0000 (20:03 -0700)]
device create: block: convert device_create_drvdata to device_create

Now that device_create() has been audited, rename things back to the
original call to be sane.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agosysfs: crash debugging
Andrew Morton [Fri, 24 Aug 2007 23:11:54 +0000 (16:11 -0700)]
sysfs: crash debugging

Print the name of the last-accessed sysfs file when we oops, to help track
down oopses which occur in sysfs store/read handlers.  Because these oopses
tend to not leave any trace of the offending code in the stack traces.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agomodules: fix module "notes" kobject leak
Alexey Dobriyan [Tue, 23 Sep 2008 19:51:11 +0000 (23:51 +0400)]
modules: fix module "notes" kobject leak

Fix "notes" kobject leak

It happens every rmmod if KALLSYMS=y and SYSFS=y.

# modprobe foo

kobject: 'foo' (ffffffffa00743d0): kobject_add_internal: parent: 'module', set: 'module'
kobject: 'holders' (ffff88017e7c5770): kobject_add_internal: parent: 'foo', set: '<NULL>'
kobject: 'foo' (ffffffffa00743d0): kobject_uevent_env
kobject: 'foo' (ffffffffa00743d0): fill_kobj_path: path = '/module/foo'
kobject: 'notes' (ffff88017fa9b668): kobject_add_internal: parent: 'foo', set: '<NULL>'
  ^^^^^

# rmmod foo

kobject: 'holders' (ffff88017e7c5770): kobject_cleanup
kobject: 'holders' (ffff88017e7c5770): auto cleanup kobject_del
kobject: 'holders' (ffff88017e7c5770): calling ktype release
kobject: (ffff88017e7c5770): dynamic_kobj_release
kobject: 'holders': free name
kobject: 'foo' (ffffffffa00743d0): kobject_cleanup
kobject: 'foo' (ffffffffa00743d0): does not have a release() function, it is broken and must be fixed.
kobject: 'foo' (ffffffffa00743d0): auto cleanup 'remove' event
kobject: 'foo' (ffffffffa00743d0): kobject_uevent_env
kobject: 'foo' (ffffffffa00743d0): fill_kobj_path: path = '/module/foo'
kobject: 'foo' (ffffffffa00743d0): auto cleanup kobject_del
kobject: 'foo': free name

[whooops]

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoBlackfin arch: make sure cycles is marked as volatile so gcc doesnt reorder on us
Mike Frysinger [Thu, 16 Oct 2008 15:55:41 +0000 (23:55 +0800)]
Blackfin arch: make sure cycles is marked as volatile so gcc doesnt reorder on us

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
17 years agoBlackfin arch: disable CONFIG_HW_RANDOM and CONFIG_DAB in defconfig files
Mike Frysinger [Thu, 16 Oct 2008 15:54:43 +0000 (23:54 +0800)]
Blackfin arch: disable CONFIG_HW_RANDOM and CONFIG_DAB in defconfig files

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
17 years ago[ARM] S3C24XX: Fix redefine of DEFINE_TIMER() in s3c24xx pwm-clock.c
Nelson Castillo [Thu, 16 Oct 2008 15:46:10 +0000 (16:46 +0100)]
[ARM] S3C24XX: Fix redefine of DEFINE_TIMER() in s3c24xx pwm-clock.c

Do not redefine the DEFINE_TIMER macro. Renamed the local macro
to DEFINE_S3C_TIMER.

Signed-off-by: Nelson Castillo <nelsoneci@gmail.com>
[ben-linux@fluff.org: spelling and subject fix]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
17 years ago[ARM] S3C2443: Fix HCLK rate
Ben Dooks [Thu, 16 Oct 2008 15:46:09 +0000 (16:46 +0100)]
[ARM] S3C2443: Fix HCLK rate

Fix the calculation of HCLK on the S3C2443, it should not
have been passed through S3C2443_CLKDIV0_HALF_HCLK.

Re-work of original patch from Wei Shuai <cpuwolf@gmail.com>

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
17 years ago[ARM] S3C24XX: Serial driver debug depends on DEBUG_LL
Ben Dooks [Thu, 16 Oct 2008 15:46:08 +0000 (16:46 +0100)]
[ARM] S3C24XX: Serial driver debug depends on DEBUG_LL

The SERIAL_SAMSUNG_DEBUG used printascii() to avoid debugging
through itself when selected as a console. Disable this option
when DEBUG_LL is not set (printascii is unavailable).

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
17 years ago[ARM] S3C24XX: pwm-clock set_parent mask fix
Dallas Foley [Thu, 16 Oct 2008 15:46:07 +0000 (16:46 +0100)]
[ARM] S3C24XX: pwm-clock set_parent mask fix

Fix s3c24xx pwm-clock supports use of the wrong clock when calculating
the bitmask when configuring the parent clock from the set_parent call.

Signed-off-by: Dallas Foley <dfoley@techsol.ca>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
17 years agoBlackfin arch: update cache flush prototypes with argument names to make them less...
Mike Frysinger [Thu, 16 Oct 2008 15:39:12 +0000 (23:39 +0800)]
Blackfin arch: update cache flush prototypes with argument names to make them less mysterious

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
17 years agomodule: remove CONFIG_KMOD in comment after #endif
Rusty Russell [Fri, 17 Oct 2008 07:38:36 +0000 (02:38 -0500)]
module: remove CONFIG_KMOD in comment after #endif

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
17 years agoremove CONFIG_KMOD from fs
Johannes Berg [Wed, 9 Jul 2008 08:28:40 +0000 (10:28 +0200)]
remove CONFIG_KMOD from fs

Just always compile the code when the kernel is modular.
Convert load_nls to use try_then_request_module to tidy
up the code.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
17 years agoremove CONFIG_KMOD from drivers
Johannes Berg [Wed, 9 Jul 2008 08:28:38 +0000 (10:28 +0200)]
remove CONFIG_KMOD from drivers

Straight forward conversions to CONFIG_MODULE; many drivers
include <linux/kmod.h> conditionally and then don't have any
other conditional code so remove it from those.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: video4linux-list@redhat.com
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: linux-ppp@vger.kernel.org
Cc: dm-devel@redhat.com
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
17 years agoBlackfin arch: move bfin_addr_dcachable() and friends into the cacheflush header...
Mike Frysinger [Thu, 16 Oct 2008 15:33:53 +0000 (23:33 +0800)]
Blackfin arch: move bfin_addr_dcachable() and friends into the cacheflush header where it belongs

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
17 years agoBlackfin arch: use the new bfin_addr_dcachable() function
Mike Frysinger [Thu, 16 Oct 2008 15:25:34 +0000 (23:25 +0800)]
Blackfin arch: use the new bfin_addr_dcachable() function

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
17 years agooprofile: fixing whitespaces in arch/x86/oprofile/*
Robert Richter [Thu, 16 Oct 2008 13:01:40 +0000 (15:01 +0200)]
oprofile: fixing whitespaces in arch/x86/oprofile/*

Signed-off-by: Robert Richter <robert.richter@amd.com>
17 years agoBlackfin arch: fix bug - build kernel failed at head.S when reprogram clock on all...
Robin Getz [Thu, 16 Oct 2008 15:05:28 +0000 (23:05 +0800)]
Blackfin arch: fix bug - build kernel failed at head.S when reprogram clock on all platforms

Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
17 years agointr_remapping: fix typo
Ingo Molnar [Thu, 16 Oct 2008 15:05:27 +0000 (17:05 +0200)]
intr_remapping: fix typo

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoBlackfin arch: unify/cleanup cache code
Mike Frysinger [Thu, 16 Oct 2008 15:01:24 +0000 (23:01 +0800)]
Blackfin arch: unify/cleanup cache code

 - to be correct wrt to end ranges
 - to be optimal with a one-instruction hardware loop

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
17 years agoBlackfin arch: update AD7879 platform resources in board file
Michael Hennerich [Thu, 16 Oct 2008 15:23:18 +0000 (23:23 +0800)]
Blackfin arch: update AD7879 platform resources in board file

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
17 years agoio_apic: make irq_mis_count available on 64-bit too
Ingo Molnar [Thu, 16 Oct 2008 15:04:22 +0000 (17:04 +0200)]
io_apic: make irq_mis_count available on 64-bit too

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agogenirq: fix name space collisions of nr_irqs in arch/*
Thomas Gleixner [Thu, 16 Oct 2008 13:33:18 +0000 (15:33 +0200)]
genirq: fix name space collisions of nr_irqs in arch/*

local shadows of global variables are _bad_

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agogenirq: fix name space collision of nr_irqs in autoprobe.c
Thomas Gleixner [Thu, 16 Oct 2008 13:33:18 +0000 (15:33 +0200)]
genirq: fix name space collision of nr_irqs in autoprobe.c

probe_irq_off() is disfunctional as the local nr_irqs is referenced
instead of the global one for the for_each_irq_desc() iterator.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agogenirq: use iterators for irq_desc loops
Thomas Gleixner [Thu, 16 Oct 2008 12:19:04 +0000 (14:19 +0200)]
genirq: use iterators for irq_desc loops

Use for_each_irq_desc[_reverse] for all the iteration loops.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agoproc: fixup irq iterator
Thomas Gleixner [Thu, 16 Oct 2008 12:50:27 +0000 (14:50 +0200)]
proc: fixup irq iterator

There is no need for irq_desc here. Even for sparse_irq we can
handle this clever in for_each_irq_nr().

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agogenirq: add reverse iterator for irq_desc
Thomas Gleixner [Thu, 16 Oct 2008 12:16:11 +0000 (14:16 +0200)]
genirq: add reverse iterator for irq_desc

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: move ack_bad_irq() to irq.c
Thomas Gleixner [Thu, 16 Oct 2008 10:18:50 +0000 (12:18 +0200)]
x86: move ack_bad_irq() to irq.c

Share more duplicated code.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: unify show_interrupts() and proc helpers
Thomas Gleixner [Thu, 16 Oct 2008 09:32:24 +0000 (11:32 +0200)]
x86: unify show_interrupts() and proc helpers

show_interrupts() and proc helpers are basically the same for
32 and 64 bit. Move them to a shared source file.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: cleanup show_interrupts
Thomas Gleixner [Thu, 16 Oct 2008 09:15:28 +0000 (11:15 +0200)]
x86: cleanup show_interrupts

The sparseirq patches introduced some more ugliness in show_interrupts().
Clean it up all together and make the code easier to read by splitting out
the "tail" function  which prints the special interrupts.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agogenirq: cleanup the sparseirq modifications
Thomas Gleixner [Thu, 16 Oct 2008 07:55:00 +0000 (09:55 +0200)]
genirq: cleanup the sparseirq modifications

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agogenirq: remove artifacts from sparseirq removal
Ingo Molnar [Wed, 15 Oct 2008 17:29:15 +0000 (19:29 +0200)]
genirq: remove artifacts from sparseirq removal

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agogenirq: revert dynarray
Thomas Gleixner [Wed, 15 Oct 2008 13:27:23 +0000 (15:27 +0200)]
genirq: revert dynarray

Revert the dynarray changes. They need more thought and polishing.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agogenirq: remove irq_to_desc_alloc
Thomas Gleixner [Wed, 15 Oct 2008 12:34:09 +0000 (14:34 +0200)]
genirq: remove irq_to_desc_alloc

Remove the leftover of sparseirqs.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agogenirq: remove sparse irq code
Thomas Gleixner [Wed, 15 Oct 2008 12:16:55 +0000 (14:16 +0200)]
genirq: remove sparse irq code

This code is not ready, but we need to rip it out instead of rebasing
as we would lose the APIC/IO_APIC unification otherwise.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agogenirq: use inline function for irq_to_desc
Thomas Gleixner [Wed, 15 Oct 2008 12:31:29 +0000 (14:31 +0200)]
genirq: use inline function for irq_to_desc

For the non sparse irq case an inline function is perfectly fine.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agogenirq: consolidate nr_irqs and for_each_irq_desc()
Thomas Gleixner [Wed, 15 Oct 2008 13:39:27 +0000 (15:39 +0200)]
genirq: consolidate nr_irqs and for_each_irq_desc()

Move all of those to linux/irq.h where they belong.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: remove sparse irq from Kconfig
Thomas Gleixner [Wed, 15 Oct 2008 11:16:00 +0000 (13:16 +0200)]
x86: remove sparse irq from Kconfig

This code is not ready yet.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agogenirq: define nr_irqs for architectures with GENERIC_HARDIRQS=n
Thomas Gleixner [Wed, 15 Oct 2008 11:07:35 +0000 (13:07 +0200)]
genirq: define nr_irqs for architectures with GENERIC_HARDIRQS=n

Revert the sparse irq changes in m68k/s390/sparc and just define
nr_irqs as NR_IRQS for those architectures.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: apic - unify APIC_DIVISOR
Cyrill Gorcunov [Fri, 10 Oct 2008 15:00:17 +0000 (19:00 +0400)]
x86: apic - unify APIC_DIVISOR

Use APIC_DIVISOR being set to 16 for both 32/64bit
mode. To escape APIC timer underflow during calibration
set it to the maximum possible value.

Also typo error (CONFG instead of proper CONFIG) fixed.
The error was caught by Venkatesh Pallipadi, thanks a lot Venkatesh!

See details on http://lkml.org/lkml/2008/10/9/425

Reported-by: Venkatesh Pallipad <venkatesh.pallipadi@intel.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Acked-by: "Maciej W. Rozycki" <macro@linux-mips.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: sparse_irq: fix typo in debug print out
Yinghai Lu [Sat, 4 Oct 2008 22:52:15 +0000 (15:52 -0700)]
x86: sparse_irq: fix typo in debug print out

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: Add sysfs entries for UV v4
Russ Anderson [Fri, 3 Oct 2008 16:59:50 +0000 (11:59 -0500)]
x86: Add sysfs entries for UV v4

Create /sys/firmware/sgi_uv sysfs entries for partition_id and coherence_id.

Signed-off-by: Russ Anderson <rja@sgi.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: Add UV partition call v4
Russ Anderson [Fri, 3 Oct 2008 16:59:33 +0000 (11:59 -0500)]
x86: Add UV partition call v4

Add a bios call to return partitioning related info.

Signed-off-by: Russ Anderson <rja@sgi.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: Add UV bios call infrastructure v4
Russ Anderson [Fri, 3 Oct 2008 16:59:15 +0000 (11:59 -0500)]
x86: Add UV bios call infrastructure v4

Add the EFI callback function and associated wrapper code.
Initialize SAL system table entry info at boot time.

Signed-off-by: Russ Anderson <rja@sgi.com>
Signed-off-by: Paul Jackson <pj@sgi.com>
Acked-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: Add UV EFI table entry v4
Russ Anderson [Fri, 3 Oct 2008 16:58:54 +0000 (11:58 -0500)]
x86: Add UV EFI table entry v4

Look for a UV entry in the EFI tables.

Signed-off-by: Russ Anderson <rja@sgi.com>
Signed-off-by: Paul Jackson <pj@sgi.com>
Acked-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86, UV: add uv_setup_irq() and uv_teardown_irq() functions, v3, fix
Ingo Molnar [Fri, 3 Oct 2008 09:38:37 +0000 (11:38 +0200)]
x86, UV: add uv_setup_irq() and uv_teardown_irq() functions, v3, fix

fix:

 arch/x86/kernel/uv_irq.c: In function 'uv_ack_apic':
 arch/x86/kernel/uv_irq.c:26: error: implicit declaration of function 'ack_APIC_irq'

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86, UV: add uv_setup_irq() and uv_teardown_irq() functions, v3
Dean Nelson [Thu, 2 Oct 2008 17:18:21 +0000 (12:18 -0500)]
x86, UV: add uv_setup_irq() and uv_teardown_irq() functions, v3

Provide a means for UV interrupt MMRs to be setup with the message to be sent
when an MSI is raised.

Signed-off-by: Dean Nelson <dcn@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agohpet: clean up warning
Venki Pallipadi [Wed, 24 Sep 2008 17:03:17 +0000 (10:03 -0700)]
hpet: clean up warning

Fix the below compile warnings due to recent HPET MSI changes

arch/x86/kernel/hpet.c:48: warning: 'hpet_devs' defined but not used
arch/x86/kernel/hpet.c:50: warning: 'per_cpu__cpu_hpet_dev' defined but not used

Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: print out irq nr for msi/ht, v3
Yinghai Lu [Thu, 25 Sep 2008 18:53:11 +0000 (11:53 -0700)]
x86: print out irq nr for msi/ht, v3

v2: fix hpet compiling error
v3: Bjorn want to use dev_printk instead

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: io-apic - interrupt remapping fix
Cyrill Gorcunov [Tue, 23 Sep 2008 19:00:02 +0000 (23:00 +0400)]
x86: io-apic - interrupt remapping fix

Clean up obscure for() cycle with straight while() form

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: "Maciej W. Rozycki" <macro@linux-mips.org>
Acked-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: irq no should not use hex in /proc/interrupts
Yinghai Lu [Thu, 25 Sep 2008 02:04:36 +0000 (19:04 -0700)]
x86: irq no should not use hex in /proc/interrupts

Arjan van de Ven noticed that we changed IRQ numbers from decimal
to hex in /proc/interrupts - that can break user-space utilities
like irqbalanced.

Reported-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: fix typo in irq_desc array
Yinghai Lu [Thu, 25 Sep 2008 02:04:35 +0000 (19:04 -0700)]
x86: fix typo in irq_desc array

when SPARSE_IRQ is not used, should still use irq_desc->lock

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86, uv: fix ordering of calls to uv_system_init & uv_cpu_init
Jack Steiner [Tue, 23 Sep 2008 13:42:05 +0000 (08:42 -0500)]
x86, uv: fix ordering of calls to uv_system_init & uv_cpu_init

Fix problem caused by reordering of the calls to uv_cpu_init() &
uv_system_init. Originally, uv_cpu_init() was called AFTER uv_system_init.
This order was recently broken as a side-effect of other patches.

With this patch, initialization of cpu 0 is now done by the system_init
call.

Signed-off-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: io-apic - interrupt remapping fix
Cyrill Gorcunov [Thu, 18 Sep 2008 19:37:57 +0000 (23:37 +0400)]
x86: io-apic - interrupt remapping fix

Interrupt remapping could lead to NULL dereference in case of
kzalloc failed and memory leak in other way. So fix the
both cases.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: "Maciej W. Rozycki" <macro@linux-mips.org>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agofix warning: "x86: sparse_irq needs spin_lock in allocations"
Andrew Morton [Thu, 18 Sep 2008 23:10:48 +0000 (16:10 -0700)]
fix warning: "x86: sparse_irq needs spin_lock in allocations"

caused by

commit a532e19680ada3b8579b81e67e76d3ebd19c340f
Author: Yinghai Lu <yhlu.kernel@gmail.com>
Date:   Wed Aug 20 20:46:25 2008 -0700

    x86: sparse_irq needs spin_lock in allocations

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosparseirq: remove some debug print out
Yinghai Lu [Fri, 19 Sep 2008 07:12:26 +0000 (00:12 -0700)]
sparseirq: remove some debug print out

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoirq: fix irqpoll && sparseirq
Yinghai Lu [Mon, 15 Sep 2008 08:53:50 +0000 (01:53 -0700)]
irq: fix irqpoll && sparseirq

Steven Noonan reported a boot hang when using irqpoll and
CONFIG_HAVE_SPARSE_IRQ=y.

The irqpoll loop needs to be updated to not iterate from 1 to nr_irqs
but to iterate via for_each_irq_desc(). (in the former case desc can
be NULL which crashes the box)

Reported-by: Steven Noonan <steven@uplinklabs.net>
Tested-by: Steven Noonan <steven@uplinklabs.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: io-apic - do not use KERN_DEBUG marker too much, fix
Cyrill Gorcunov [Sat, 13 Sep 2008 09:11:16 +0000 (13:11 +0400)]
x86: io-apic - do not use KERN_DEBUG marker too much, fix

Yinghai Lu reported:

| >  0 add_pin_to_irq: irq 15 --> apic 0 pin 15
| > IOAPIC[0]: Set routing entry (8-15 -> 0x3f -> IRQ 15 Mode:0 Active:0)
| >  8-16 8-17 8-18 8-19 8-20 8-21 8-22 8-23 (apicid-pin) not connected
| >  9-0 9-1 9-2 9-3 9-4 9-5 9-6 9-7 9-8 9-9 9-10 9-11 9-12 9-13 9-14 9-15
| > 9-16 9-17 9-18 9-19 9-20 9-21 9-22 9-23 (apicid-pin) not connected
| >
|
| only first one not connected at first, and ...

here is a quick fix for this.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: apic - fix unused vars warning in calibrate_APIC_clock
Cyrill Gorcunov [Fri, 12 Sep 2008 19:58:24 +0000 (23:58 +0400)]
x86: apic - fix unused vars warning in calibrate_APIC_clock

If we don't have CONFIG_X86_PM_TIMER=y compiler warns about
unused variables. Move PM timer based calibration into a
separate function and make the code cleaner and the compiler
happy as well.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: apic - skip writting ESR register if we dont have on
Cyrill Gorcunov [Sun, 14 Sep 2008 07:55:38 +0000 (11:55 +0400)]
x86: apic - skip writting ESR register if we dont have on

On 82489DX we don't have ESR register so we should not
write it.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: apic - lapic_setup_esr does not handle esr_disable - fix it
Cyrill Gorcunov [Sun, 14 Sep 2008 07:55:37 +0000 (11:55 +0400)]
x86: apic - lapic_setup_esr does not handle esr_disable - fix it

lapic_setup_esr doesn't handle esr_disable inquire.
The error brought in during unification process.
Fix it.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agodyn_array: use %pF instead of print_fn_descriptor_symbol
Yinghai Lu [Sun, 14 Sep 2008 09:33:11 +0000 (02:33 -0700)]
dyn_array: use %pF instead of print_fn_descriptor_symbol

... and tidy up the printouts. Suggested by Andrew Morton.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: print out apic id in hex format
Yinghai Lu [Thu, 11 Sep 2008 04:56:46 +0000 (21:56 -0700)]
x86: print out apic id in hex format

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: io-apic - get rid of __DO_ACTION macro
Cyrill Gorcunov [Wed, 10 Sep 2008 18:19:50 +0000 (22:19 +0400)]
x86: io-apic - get rid of __DO_ACTION macro

Replace __DO_ACTION macro with io_apic_modify_irq function.
This allow us to 'grep' definitions being hided by
__DO_ACTION macro:

__unmask_IO_APIC_irq
__mask_IO_APIC_irq
__mask_and_edge_IO_APIC_irq
__unmask_and_level_IO_APIC_irq

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Acked-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: fix HPET compiler error when not using CONFIG_PCI_MSI
Steven Noonan [Mon, 8 Sep 2008 23:19:09 +0000 (16:19 -0700)]
x86: fix HPET compiler error when not using CONFIG_PCI_MSI

Added dummy function for hpet_setup_msi_irq().

Signed-off-by: Steven Noonan <steven@uplinklabs.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: using HPET in MSI mode and setting up per CPU HPET timers, fix
Venki Pallipadi [Mon, 8 Sep 2008 17:18:40 +0000 (10:18 -0700)]
x86: using HPET in MSI mode and setting up per CPU HPET timers, fix

On Sat, Sep 06, 2008 at 06:03:53AM -0700, Ingo Molnar wrote:
>
> it crashes two testsystems, the fault on a NULL pointer in hpet init,
> with:
>
> initcall print_all_ICs+0x0/0x520 returned 0 after 26 msecs
> calling  hpet_late_init+0x0/0x1c0
> BUG: unable to handle kernel NULL pointer dereference at 000000000000008c
> IP: [<ffffffff80d228be>] hpet_late_init+0xfe/0x1c0
> PGD 0
> Oops: 0000 [1] SMP
> CPU 0
> Modules linked in:
> Pid: 1, comm: swapper Not tainted 2.6.27-rc5 #29725
> RIP: 0010:[<ffffffff80d228be>]  [<ffffffff80d228be>] hpet_late_init+0xfe/0x1c0
> RSP: 0018:ffff88003fa07dd0  EFLAGS: 00010246
> RAX: 0000000000000000 RBX: 0000000000000003 RCX: 0000000000000000
> RDX: ffffc20000000160 RSI: 0000000000000000 RDI: 0000000000000003
> RBP: ffff88003fa07e90 R08: 0000000000000000 R09: ffff88003fa07dd0
> R10: 0000000000000001 R11: 0000000000000000 R12: ffff88003fa07dd0
> R13: 0000000000000002 R14: ffffc20000000000 R15: 000000006f57e511
> FS:  0000000000000000(0000) GS:ffffffff80cf6a80(0000) knlGS:0000000000000000
> CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
> CR2: 000000000000008c CR3: 0000000000201000 CR4: 00000000000006e0
> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
> Process swapper (pid: 1, threadinfo ffff88003fa06000, task ffff88003fa08000)
> Stack:  00000000fed00000 ffffc20000000000 0000000100000003 0000000800000002
>  0000000000000000 0000000000000000 0000000000000000 0000000000000000
>  0000000000000000 0000000000000000 0000000000000000 0000000000000000
> Call Trace:
>  [<ffffffff80d227c0>] ? hpet_late_init+0x0/0x1c0
>  [<ffffffff80209045>] do_one_initcall+0x45/0x190
>  [<ffffffff80296f39>] ? register_irq_proc+0x19/0xe0
>  [<ffffffff80d0d140>] ? early_idt_handler+0x0/0x73
>  [<ffffffff80d0dabc>] kernel_init+0x14c/0x1b0
>  [<ffffffff80942ac1>] ? trace_hardirqs_on_thunk+0x3a/0x3f
>  [<ffffffff8020dbd9>] child_rip+0xa/0x11
>  [<ffffffff8020ceee>] ? restore_args+0x0/0x30
>  [<ffffffff80d0d970>] ? kernel_init+0x0/0x1b0
>  [<ffffffff8020dbcf>] ? child_rip+0x0/0x11
> Code: 20 48 83 c1 01 48 39 f1 75 e3 44 89 e8 4c 8b 05 29 29 22 00 31 f6 48 8d 78 01 66 66 90 89 f0 48 8d 04 80 48 c1 e0 05 4a 8d 0c 00 <f6> 81 8c 00 00 00 08 74 26 8b 81 80 00 00 00 8b 91 88 00 00 00
> RIP  [<ffffffff80d228be>] hpet_late_init+0xfe/0x1c0
>  RSP <ffff88003fa07dd0>
> CR2: 000000000000008c
> Kernel panic - not syncing: Fatal exception

There was one code path, with CONFIG_PCI_MSI disabled, where we were accessing
hpet_devs without initialization. That resulted in the above crash. The change
below adds a check for hpet_devs.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: io-apic - do not use KERN_DEBUG marker too much
Cyrill Gorcunov [Mon, 8 Sep 2008 15:38:06 +0000 (19:38 +0400)]
x86: io-apic - do not use KERN_DEBUG marker too much

Do not use KERN_DEBUG several times on the same line being printed.
Introduced by mine previous patch, sorry.

Reported-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: lapic address print out like io apic addr
Yinghai Lu [Mon, 8 Sep 2008 00:58:57 +0000 (17:58 -0700)]
x86: lapic address print out like io apic addr

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agodyn_array: remove one panic
Yinghai Lu [Sat, 6 Sep 2008 17:26:50 +0000 (10:26 -0700)]
dyn_array: remove one panic

Andrew said, we don't need duplicated panic.
because __alloc_bootmem already have that.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: io-apic - code style cleaning for setup_IO_APIC_irqs
Cyrill Gorcunov [Sat, 6 Sep 2008 10:15:33 +0000 (14:15 +0400)]
x86: io-apic - code style cleaning for setup_IO_APIC_irqs

By changing printout form we are able to shrink (and clean up) code a bit.

Former printout example:

init IO_APIC IRQs
 IO-APIC (apicid-pin) 1-1, 1-2, 1-3 not connected.
 IO-APIC (apicid-pin) 2-1, 2-2, 2-3 not connected.

New printout example:

init IO_APIC IRQs
 1-1 1-2 1-3 (apicid-pin) not connected
 2-1 2-2 2-3 (apicid-pin) not connected

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: HPET_MSI Initialise per-cpu HPET timers
venkatesh.pallipadi@intel.com [Sat, 6 Sep 2008 01:02:18 +0000 (18:02 -0700)]
x86: HPET_MSI Initialise per-cpu HPET timers

Initialize a per CPU HPET MSI timer when possible. We retain the HPET
timer 0 (IRQ 0) and timer 1 (IRQ 8) as is when legacy mode is being used. We
setup the remaining HPET timers as per CPU MSI based timers. This per CPU
timer will eliminate the need for timer broadcasting with IRQ 0 when there
is non-functional LAPIC timer across CPU deep C-states.

If there are more CPUs than number of available timers, CPUs that do not
find any timer to use will continue using LAPIC and IRQ 0 broadcast.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: HPET_MSI Basic HPET_MSI setup code, cleanups
Ingo Molnar [Sat, 6 Sep 2008 12:19:17 +0000 (14:19 +0200)]
x86: HPET_MSI Basic HPET_MSI setup code, cleanups

small style cleanups.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: HPET_MSI Basic HPET_MSI setup code
venkatesh.pallipadi@intel.com [Sat, 6 Sep 2008 01:02:17 +0000 (18:02 -0700)]
x86: HPET_MSI Basic HPET_MSI setup code

Basic HPET MSI setup code. Routines to perform basic MSI read write
in HPET memory map and setting up irq_chip for HPET MSI.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: HPET_MSI Refactor code in preparation for HPET_MSI
venkatesh.pallipadi@intel.com [Sat, 6 Sep 2008 01:02:16 +0000 (18:02 -0700)]
x86: HPET_MSI Refactor code in preparation for HPET_MSI

Preparatory patch before the actual HPET MSI changes. Sets up hpet_set_mode
and hpet_next_event for the MSI related changes. Just the code
refactoring and should be zero functional change.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: HPET_MSI change IRQ affinity in process context when it is disabled
venkatesh.pallipadi@intel.com [Sat, 6 Sep 2008 01:02:15 +0000 (18:02 -0700)]
x86: HPET_MSI change IRQ affinity in process context when it is disabled

Change the IRQ affinity in the process context when the IRQ is disabled.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoirq: error missed ifndef CONFIG_HAVE_SPARSE_IRQ, v2
Yinghai Lu [Fri, 5 Sep 2008 17:03:37 +0000 (10:03 -0700)]
irq: error missed ifndef CONFIG_HAVE_SPARSE_IRQ, v2

need to change irq to int too

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoirq: set_irq_chip() has redundant call to irq_to_desc()
Dean Nelson [Fri, 5 Sep 2008 14:10:40 +0000 (09:10 -0500)]
irq: set_irq_chip() has redundant call to irq_to_desc()

Extraneous call to irq_to_desc().

Signed-off-by: Dean Nelson <dcn@sgi.com>
Cc: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoirq: error missed ifndef CONFIG_HAVE_SPARSE_IRQ
Dean Nelson [Fri, 5 Sep 2008 14:07:20 +0000 (09:07 -0500)]
irq: error missed ifndef CONFIG_HAVE_SPARSE_IRQ

An error return from create_irq_nr() is 0, but an error return from
create_irq() is -1.

Signed-off-by: Dean Nelson <dcn@sgi.com>
Cc: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: io-apic - declare irq_cfg_lock for SPARSE_IRQ only
Cyrill Gorcunov [Thu, 4 Sep 2008 18:37:50 +0000 (22:37 +0400)]
x86: io-apic - declare irq_cfg_lock for SPARSE_IRQ only

We use irq_cfg_lock lock in SPARSE_IRQ only context so
move it under #ifdef and compiler will be happy.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: io-apic - use ARRAY_SIZE macro
Cyrill Gorcunov [Thu, 4 Sep 2008 18:37:49 +0000 (22:37 +0400)]
x86: io-apic - use ARRAY_SIZE macro

Make the code width a bit shorter with ARRAY_SIZE macro.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agodyn_array: fix typo
Yinghai Lu [Thu, 4 Sep 2008 18:57:13 +0000 (20:57 +0200)]
dyn_array: fix typo

Andrew found the typo could break some platforms.

also fix a checkpatch warning.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: print out if acpi want physical flat of all
Yinghai Lu [Thu, 4 Sep 2008 18:57:11 +0000 (20:57 +0200)]
x86: print out if acpi want physical flat of all

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agodyn_array: don't break compiling for !CONFIG_SMP
H. Peter Anvin [Thu, 4 Sep 2008 16:56:10 +0000 (09:56 -0700)]
dyn_array: don't break compiling for !CONFIG_SMP

Impact: build failure on uniprocessor

When compiling for !CONFIG_SMP, per_cpu_alloc_dyn_array() would fail
to compile, since it uses per_cpu_offset, which is not defined for
uniprocessor builds.

Hence, do not compile per_cpu_alloc_dyn_array() for !CONFIG_SMP.
Attempting to call this function in a uniprocessor configuration would
be simply wrong in the first place.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
17 years agodmar: fix dmar_parse_dev() devices_cnt error condition check
Suresh Siddha [Wed, 3 Sep 2008 23:58:35 +0000 (16:58 -0700)]
dmar: fix dmar_parse_dev() devices_cnt error condition check

It is possible that,
instead of PCI endpoint/sub-hierarchy structures, only IO-APIC/HPET
devices may be reported under device scope structures. Fix the devices_cnt
error check, which cares about only PCI structures and removes the
dma-remapping unit structure (dmaru) when the devices_cnt is zero
and include_all flag is not set.

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>