]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
17 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
Linus Torvalds [Sat, 25 Aug 2007 14:54:38 +0000 (07:54 -0700)]
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (30 commits)
  ACPI: work around duplicate name "VID" problem on T61
  acpiphp_ibm: add missing '\n' to error message
  ACPI: add dump_stack() to trace acpi_format_exception programming errors
  make drivers/acpi/scan.c:create_modalias() static
  ACPI: Fix a warning of discarding qualifiers from pointer target type
  ACPI: "ACPI handle has no context!" should be KERN_DEBUG
  ACPI video hotkey: export missing ACPI video hotkey events via input layer
  ACPI: Validate XSDT, use RSDT if XSDT fails
  ACPI: /proc/acpi/thermal_zone trip points are now read-only, mark them as such
  ACPI: fix ia64 allnoconfig build
  PNP: remove null pointer checks
  PNP: remove MODULE infrastructure
  ISAPNP: removed unused isapnp_detected and ISAPNP_DEBUG
  PNPACPI: remove unnecessary casts of "void *"
  PNPACPI: simplify irq_flags()
  PNP: fix up after Lindent
  ACPI: enable GPEs before calling _WAK on resume
  asus-laptop: Fix rmmod of asus_laptop
  sony-laptop: call sonypi_compat_init earlier
  sony-laptop: enable Vaio FZ events
  ...

17 years agoPull bugzilla-8798 into release branch
Len Brown [Sat, 25 Aug 2007 06:24:03 +0000 (02:24 -0400)]
Pull bugzilla-8798 into release branch

17 years agoACPI: work around duplicate name "VID" problem on T61
Zhang Rui [Sat, 25 Aug 2007 06:23:31 +0000 (02:23 -0400)]
ACPI: work around duplicate name "VID" problem on T61

This can only fix the problem that more than one video bus device
have the same AML name "VID".
ie. the proc I/F for the second "VID" video bus device is located under
/proc/acpi/video/VID1/...

As this is really rare and the ACPI proc I/F is a legacy feature that
we are planning to remove.
We won't provide a generic solution for this problem.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoPull events into release branch
Len Brown [Sat, 25 Aug 2007 05:44:01 +0000 (01:44 -0400)]
Pull events into release branch

Conflicts:

drivers/acpi/video.c

Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoPull misc into release branch
Len Brown [Sat, 25 Aug 2007 05:40:27 +0000 (01:40 -0400)]
Pull misc into release branch

17 years agoacpiphp_ibm: add missing '\n' to error message
Jeremy Fitzhardinge [Sat, 25 Aug 2007 05:31:45 +0000 (01:31 -0400)]
acpiphp_ibm: add missing '\n' to error message

Add missing \n to error in ibm_find_acpi_device.

Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Adrian Bunk <trivial@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoACPI: add dump_stack() to trace acpi_format_exception programming errors
Andrew Morton [Sat, 25 Aug 2007 05:28:20 +0000 (01:28 -0400)]
ACPI: add dump_stack() to trace acpi_format_exception programming errors

Dump the stack so we can find the secretive caller to acpi_format_exception().

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agomake drivers/acpi/scan.c:create_modalias() static
Adrian Bunk [Tue, 14 Aug 2007 21:22:35 +0000 (23:22 +0200)]
make drivers/acpi/scan.c:create_modalias() static

This patch makes the needlessly global create_modalias() static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoACPI: Fix a warning of discarding qualifiers from pointer target type
Al Viro [Tue, 21 Aug 2007 15:18:20 +0000 (16:18 +0100)]
ACPI: Fix a warning of discarding qualifiers from pointer target type

drivers/acpi/ec.c: In function `acpi_ec_ecdt_probe':
drivers/acpi/ec.c:873: warning: passing arg 1 of `acpi_get_devices' discards qualifiers from pointer target type

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoACPI: "ACPI handle has no context!" should be KERN_DEBUG
Shaohua Li [Thu, 23 Aug 2007 07:01:13 +0000 (15:01 +0800)]
ACPI: "ACPI handle has no context!" should be KERN_DEBUG

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoPull suspend into release branch
Len Brown [Sat, 25 Aug 2007 05:36:18 +0000 (01:36 -0400)]
Pull suspend into release branch

17 years agoPull video into release branch
Len Brown [Sat, 25 Aug 2007 02:26:27 +0000 (22:26 -0400)]
Pull video into release branch

17 years agoPull thermal into release branch
Len Brown [Sat, 25 Aug 2007 02:26:19 +0000 (22:26 -0400)]
Pull thermal into release branch

17 years agoACPI video hotkey: export missing ACPI video hotkey events via input layer
Luming Yu [Mon, 20 Aug 2007 10:23:53 +0000 (18:23 +0800)]
ACPI video hotkey: export missing ACPI video hotkey events via input layer

Signed-off-by: Yu Luming <luming.yu@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoPull sony into release branch
Len Brown [Sat, 25 Aug 2007 02:20:31 +0000 (22:20 -0400)]
Pull sony into release branch

17 years agoPull pnp into release branch
Len Brown [Sat, 25 Aug 2007 02:20:22 +0000 (22:20 -0400)]
Pull pnp into release branch

17 years agoPull ec into release branch
Len Brown [Sat, 25 Aug 2007 02:19:44 +0000 (22:19 -0400)]
Pull ec into release branch

17 years agoPull bugzilla-8630 into release branch
Len Brown [Sat, 25 Aug 2007 02:19:20 +0000 (22:19 -0400)]
Pull bugzilla-8630 into release branch

17 years agoPull bugzilla-1641 into release branch
Len Brown [Sat, 25 Aug 2007 02:19:05 +0000 (22:19 -0400)]
Pull bugzilla-1641 into release branch

17 years agoPull battery into release branch
Len Brown [Sat, 25 Aug 2007 02:18:51 +0000 (22:18 -0400)]
Pull battery into release branch

17 years agoPull asus into release branch
Len Brown [Sat, 25 Aug 2007 02:18:44 +0000 (22:18 -0400)]
Pull asus into release branch

17 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched
Linus Torvalds [Fri, 24 Aug 2007 23:11:13 +0000 (16:11 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched

* git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched:
  sched: fix startup penalty calculation
  sched: simplify bonus calculation #2
  sched: simplify bonus calculation #1
  sched: tidy up and simplify the bonus balance
  sched: optimize task_tick_rt() a bit
  sched: simplify can_migrate_task()
  sched: remove HZ dependency from the granularity default
  sched: CONFIG_SCHED_GROUP_FAIR=y fixlet

17 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux...
Linus Torvalds [Fri, 24 Aug 2007 23:10:56 +0000 (16:10 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-x86setup

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-x86setup:
  [x86 setup] Make sure AH=00h when setting a video mode
  [x86 setup] Volatilize asm() statements

17 years agoDM_MULTIPATH_RDAC: "scsi_normalize_sense" undefined
Randy Dunlap [Fri, 24 Aug 2007 22:35:15 +0000 (15:35 -0700)]
DM_MULTIPATH_RDAC: "scsi_normalize_sense" undefined

DM_MULTIPATH_RDAC uses SCSI API(s) and is for a SCSI device,
so add SCSI to its depends on to prevent build errors.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
[ Tested and Verified by Chandra Seetharaman ]
Acked-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoACPI: Validate XSDT, use RSDT if XSDT fails
Zhao Yakui [Fri, 24 Aug 2007 08:18:16 +0000 (16:18 +0800)]
ACPI: Validate XSDT, use RSDT if XSDT fails

ACPI 1.0 used an RSDT with 32-bit physical addresses.
ACPI 2.0 adds an XSDT with 32-bit physical addresses.
An ACPI 2.0 aware OS is supposed to use the XSDT
(when present) instead of the RSDT.

However, several systems have failed because the XSDT
contains NULL entries -- while it is missing pointers
to needed tables, such as SSDTs.

When we find an XSDT with NULL entries, discard it
and use the ACPI 1.0 RSDT instead.

http://bugzilla.kernel.org/show_bug.cgi?id=8630

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoACPI: /proc/acpi/thermal_zone trip points are now read-only, mark them as such
Pavel Machek [Fri, 24 Aug 2007 09:45:50 +0000 (11:45 +0200)]
ACPI: /proc/acpi/thermal_zone trip points are now read-only, mark them as such

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agosched: fix startup penalty calculation
Ingo Molnar [Fri, 24 Aug 2007 18:39:10 +0000 (20:39 +0200)]
sched: fix startup penalty calculation

fix task startup penalty miscalculation: sysctl_sched_granularity is
unsigned int and wait_runtime is long so we first have to convert it
to long before turning it negative ...

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: simplify bonus calculation #2
Peter Zijlstra [Fri, 24 Aug 2007 18:39:10 +0000 (20:39 +0200)]
sched: simplify bonus calculation #2

current code:

 delta = calc_delta_mine(delta_exec, curr->load.weight, lw);
 delta = min((u64)delta, cfs_rq->sleeper_bonus);

Notice that this calc_delta_mine() line is exactly delta_mine, which
gives:

 delta = min((u64)delta_mine, cfs_rq->sleeper_bonus);

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: simplify bonus calculation #1
Peter Zijlstra [Fri, 24 Aug 2007 18:39:10 +0000 (20:39 +0200)]
sched: simplify bonus calculation #1

current code:

 delta = min(cfs_rq->sleeper_bonus, (u64)delta_exec);
 delta = calc_delta_mine(delta, curr->load.weight, lw);
 delta = min((u64)delta, cfs_rq->sleeper_bonus);

drop the first min(), because we clip against sleeper_bonus in the 3rd line
again. That gives:

 delta = calc_delta_mine(delta_exec, curr->load.weight, lw);
 delta = min((u64)delta, cfs_rq->sleeper_bonus);

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: tidy up and simplify the bonus balance
Ingo Molnar [Fri, 24 Aug 2007 18:39:10 +0000 (20:39 +0200)]
sched: tidy up and simplify the bonus balance

make the bonus balance more consistent: do not hand out a bonus if
there's too much in flight already, and only deduct as much from a
runner as it has the capacity. This makes the bonus engine a zero-sum
game (as intended).

this also simplifies the code:

   text    data     bss     dec     hex filename
  34770    2998      24   37792    93a0 sched.o.before
  34749    2998      24   37771    938b sched.o.after

and it also avoids overscheduling in sleep-happy workloads like
hackbench.c.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: optimize task_tick_rt() a bit
Dmitry Adamushko [Fri, 24 Aug 2007 18:39:10 +0000 (20:39 +0200)]
sched: optimize task_tick_rt() a bit

Mitchell Erblich suggested a quality-of-implementation change to
not requeue SCHED_RR tasks if there's only a single task on the
runqueue, by checking for rq->nr_running == 1.

provide a more efficient implementation of that, to check that
particular RT priority-queue only.

[ From: mingo@elte.hu ]

Also first requeue the task then set need_resched - results in slightly
better machine-instruction ordering. Also clean up the code a bit.

Signed-off-by: Dmitry Adamushko <dmitry.adamushko@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: simplify can_migrate_task()
Sven-Thorsten Dietrich [Fri, 24 Aug 2007 18:39:10 +0000 (20:39 +0200)]
sched: simplify can_migrate_task()

Remove trivial conditional branch in Linux scheduler's
can_migrate_task() function.

   text    data     bss     dec     hex filename
   34770    2998      24   37792    93a0 sched.o.before
   34757    2998      24   37779    9393 sched.o.after

Signed-off-by: Sven-Thorsten Dietrich <sven@thebigcorporation.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: remove HZ dependency from the granularity default
Ingo Molnar [Fri, 24 Aug 2007 18:39:10 +0000 (20:39 +0200)]
sched: remove HZ dependency from the granularity default

remove HZ dependency from the granularity default. Use 10 msec for
the base granularity, 1 msec for wakeup granularity and 25 msec for
batch wakeup granularity. (These defaults are close to the values
that the default HZ=250 setting got previously, and thus it's the
most common setting.)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: CONFIG_SCHED_GROUP_FAIR=y fixlet
Bruce Ashfield [Fri, 24 Aug 2007 18:39:10 +0000 (20:39 +0200)]
sched: CONFIG_SCHED_GROUP_FAIR=y fixlet

when I built with CONFIG_FAIR_GROUP_SCHED=y, I need the following change
to make things right.

[ From: mingo@elte.hu ]

this config option is not upstream-configurable right now but lets fix
this for completeness.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoACPI: fix ia64 allnoconfig build
Len Brown [Fri, 24 Aug 2007 07:06:33 +0000 (03:06 -0400)]
ACPI: fix ia64 allnoconfig build

drivers/acpi/event.c:238: error: conflicting types for ‘acpi_bus_generate_netlink_event’
include/acpi/acpi_bus.h:324: error: previous declaration of ‘acpi_bus_generate_netlink_event’ was here

Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoPNP: remove null pointer checks
Bjorn Helgaas [Wed, 15 Aug 2007 16:32:13 +0000 (10:32 -0600)]
PNP: remove null pointer checks

Remove some null pointer checks.  Null pointers in these areas indicate
programming errors, and I think it's better to oops immediately rather
than return an error that is easily ignored.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Acked-by: Adam Belay <abelay@novell.com>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoPNP: remove MODULE infrastructure
Bjorn Helgaas [Wed, 15 Aug 2007 16:32:12 +0000 (10:32 -0600)]
PNP: remove MODULE infrastructure

We don't support building any part of PNP as a module (*drivers* can be
modules, of course, but the PNP infrastructure itself can not).  Since
MODULE will never be defined, remove the ifdefs and dead code.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Acked-by: Adam Belay <abelay@novell.com>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoISAPNP: removed unused isapnp_detected and ISAPNP_DEBUG
Bjorn Helgaas [Wed, 15 Aug 2007 16:32:11 +0000 (10:32 -0600)]
ISAPNP: removed unused isapnp_detected and ISAPNP_DEBUG

ISAPNP_DEBUG isn't used at all.  isapnp_detected is set but never read.
So remove them both.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Acked-by: Adam Belay <abelay@novell.com>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoPNPACPI: remove unnecessary casts of "void *"
Bjorn Helgaas [Wed, 15 Aug 2007 16:32:10 +0000 (10:32 -0600)]
PNPACPI: remove unnecessary casts of "void *"

Remove unnecessary casts of void pointers.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Acked-by: Adam Belay <abelay@novell.com>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoPNPACPI: simplify irq_flags()
Bjorn Helgaas [Wed, 15 Aug 2007 16:32:09 +0000 (10:32 -0600)]
PNPACPI: simplify irq_flags()

No need for a temporary variable; just return the flags once we know them.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Acked-by: Adam Belay <abelay@novell.com>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoPNP: fix up after Lindent
Bjorn Helgaas [Wed, 15 Aug 2007 16:32:08 +0000 (10:32 -0600)]
PNP: fix up after Lindent

More manual fixups after Lindent.  No functional change.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Acked-by: Adam Belay <abelay@novell.com>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoACPI: enable GPEs before calling _WAK on resume
Thomas Renninger [Fri, 24 Aug 2007 05:24:47 +0000 (01:24 -0400)]
ACPI: enable GPEs before calling _WAK on resume

It seems it's required to enable GPEs before _WAK.  E.g.  X60 triggers a
LID related GPE instead of doing a Notify in WAK.  Now the GPE reaches the
kernel and the Notify for LID status change gets thrown from there.

Signed-off-by: Thomas Renninger <trenn@suse.de>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoasus-laptop: Fix rmmod of asus_laptop
Guillaume Chazarain [Thu, 16 Aug 2007 16:18:53 +0000 (18:18 +0200)]
asus-laptop: Fix rmmod of asus_laptop

The asus laptop driver conditionnaly registers leds in asus_led_register()
depending on their availability, but unconditionnaly unregisters them all at
exit time or when the module fails to load. Unregistering not registered leds
result in the following Oops. So we should check before unregistering.

 [<c032d2f9>] do_page_fault+0x511/0x5e9
 [<c032bae2>] error_code+0x6a/0x70
 [<c026abf8>] device_unregister+0x26/0x32
 [<f8864218>] led_classdev_unregister+0x58/0x94 [led_class]
 [<f88a90f8>] asus_led_exit+0x17/0x41 [asus_laptop]
 [<f88a91c9>] asus_laptop_exit+0xd/0x3f [asus_laptop]
 [<c013cee1>] sys_delete_module+0x17b/0x1a2
 [<c0106eae>] sysenter_past_esp+0x6b/0xa1

EIP: [<c026a9a3>] device_del+0xb/0x23a SS:ESP 0068:f594ef0c

Signed-off-by: Guillaume Chazarain <guichaz@yahoo.fr>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agosony-laptop: call sonypi_compat_init earlier
Mattia Dongili [Sun, 12 Aug 2007 07:20:27 +0000 (16:20 +0900)]
sony-laptop: call sonypi_compat_init earlier

sonypi_compat uses a kfifo that needs to be present before _SRS is
called to be able to cope with the IRQs triggered when setting
resources.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agosony-laptop: enable Vaio FZ events
Mattia Dongili [Sun, 12 Aug 2007 07:20:26 +0000 (16:20 +0900)]
sony-laptop: enable Vaio FZ events

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Fri, 24 Aug 2007 04:40:33 +0000 (21:40 -0700)]
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  libata: don't check n_sectors during revalidation if zero
  pata_via: Add Arima W730-K8 and other rebadgings
  pata_sis: Add the FSC Amilo and friends
  pata_pdc2027x: PLL detection fixes
  libata: fix n_sectors failure handling during revalidation

17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6.23
Linus Torvalds [Fri, 24 Aug 2007 04:40:07 +0000 (21:40 -0700)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6.23

* master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6.23:
  sh: missing symbol fix for sh4-202
  sh: Fix DSP opcode regression for SH3-DSP parts.

17 years agotty: dont needlessly cast kmalloc() return value
Jesper Juhl [Fri, 24 Aug 2007 00:28:42 +0000 (02:28 +0200)]
tty: dont needlessly cast kmalloc() return value

kmalloc() hands us a void pointer, we don't need to cast it.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Fri, 24 Aug 2007 04:38:54 +0000 (21:38 -0700)]
Merge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb

* 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb:
  V4L/DVB (6070): Fix a warning at dvb_net
  V4L/DVB (6042): b2c2-flexcop: fix Airstar HD5000 tuning regression

17 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched
Linus Torvalds [Fri, 24 Aug 2007 04:38:39 +0000 (21:38 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched

* git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched:
  sched: tweak the sched_runtime_limit tunable
  sched: skip updating rq's next_balance under null SD
  sched: fix broken SMT/MC optimizations
  sched: accounting regression since rc1
  sched: fix sysctl directory permissions
  sched: sched_clock_idle_[sleep|wakeup]_event()

17 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh...
Linus Torvalds [Fri, 24 Aug 2007 04:38:21 +0000 (21:38 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
  9p: fix bad error path in conversion routines
  9p: remove deprecated v9fs_fid_lookup_remove()
  9p: update maintainers and documentation
  9p: fix use after free

17 years agoRenumber AUDIT_TTY_[GS]ET
Miloslav Trmac [Thu, 23 Aug 2007 09:19:53 +0000 (10:19 +0100)]
Renumber AUDIT_TTY_[GS]ET

Renumber AUDIT_TTY_[GS]ET to avoid a conflict with netlink message types
already used in the wild.

Signed-off-by: Miloslav Trmac <mitr@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
Linus Torvalds [Fri, 24 Aug 2007 04:36:13 +0000 (21:36 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
  sdhci: tell which spurious interrupt we got
  sdhci: handle data interrupts during command
  mmc: ignore bad max block size in sdhci
  sdhci: be more cautious about block count register
  drivers/mmc/core/host.c: kmalloc + memset conversion to kzalloc
  drivers/mmc/core/bus.c: kmalloc + memset conversion to kzalloc

17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
Linus Torvalds [Fri, 24 Aug 2007 04:35:45 +0000 (21:35 -0700)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6:
  PCI: Run k8t_sound_hostbridge quirk only when needed
  PCI: disable MSI on RX790
  PCI: disable MSI on RD580
  PCI: disable MSI on RS690
  PCI: make pcie_get_readrq visible in pci.h
  PCI: lets kill the 'PCI hidden behind bridge' message
  pci/hotplug/cpqphp_ctrl.c: remove stale BKL use
  PCI: Document pci_iomap()
  PCI: quirk_e100_interrupt() called too early
  PCI: Move prototypes for pci_bus_find_capability to include/linux/pci.h

17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Fri, 24 Aug 2007 04:35:04 +0000 (21:35 -0700)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (35 commits)
  usb: add PRODUCT, TYPE to usb-interface events
  USB: resubmission unusual_devs modification for Nikon D80
  usb quirks: Add Canon EOS 5D (PC Connection mode) to the autosuspend blacklist
  USB: make EHCI initialize properly on PPC SOCs
  UEAGLE: Remove sysfs files on error case
  USB: fsl_usb2_udc: fix bug in processing setup requests
  USB: g_file_storage: fix bug in DMA buffer handling
  USB: update last_busy field correctly
  USB: fix DoS in pwc USB video driver
  USB: allow retry on descriptor fetch errors
  USB: unkill cxacru atm driver
  USB: Adding support for HTC Smartphones to ipaq
  USB: another quirky device
  USB: quirky mass storage device
  USB: ohci, fix oddball gcc warning
  usb-storage: fix bugs in the disconnect pathway
  usb: typo in usb R8A66597 HCD config
  USB: accept 1-byte Device Status replies, fixing some b0rken devices
  USB: blacklist Samsung ML-2010 printer
  usb-serial: fix oti6858.c segfault in termios handling
  ...

17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
Linus Torvalds [Fri, 24 Aug 2007 04:34:43 +0000 (21:34 -0700)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6:
  sysfs: don't warn on removal of a nonexistent binary file
  HOWTO: latest lxr url address changed
  HOWTO: korean translation of Documentation/HOWTO
  Fix Off-by-one in /sys/module/*/refcnt
  sysfs: fix locking in sysfs_lookup() and sysfs_rename_dir()

17 years agom68knommu: include linux/fs.h for do_pipe()
Greg Ungerer [Thu, 23 Aug 2007 23:26:12 +0000 (09:26 +1000)]
m68knommu: include linux/fs.h for do_pipe()

Include linux/fs.h to get the prototype for do_pipe().
Build fix.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agom68knommu: include asm-generic/pgtable.h
Greg Ungerer [Thu, 23 Aug 2007 23:25:59 +0000 (09:25 +1000)]
m68knommu: include asm-generic/pgtable.h

Include asm-generic/pgtable.h to pick up the lazy_mmu_mode and
lazy_cpu_mode macros. Won't build without them.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agom68knommu: include linux/fs.h for getname()
Greg Ungerer [Thu, 23 Aug 2007 23:26:06 +0000 (09:26 +1000)]
m68knommu: include linux/fs.h for getname()

Include linux/fs.h to get the prototype for getname().
Build fix.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agopata_it821x: Fix regression/corruptor
Alan Cox [Thu, 23 Aug 2007 19:18:55 +0000 (20:18 +0100)]
pata_it821x: Fix regression/corruptor

Whoever did the PCI revision patch slipped up on the it821x, and I
didn't spot this at the time either.  They moved the check for the
errata from the 0x10 revision to 0x11.  Put it back

This one is important for 2.6.23 final as in some cases bad things will
occur if 0x10 revision boards don't get the fixups.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoACPI: EC: revert fix for bugzilla 8709
Alexey Starikovskiy [Fri, 24 Aug 2007 04:10:11 +0000 (08:10 +0400)]
ACPI: EC: revert fix for bugzilla 8709

This is a manual revert of 7c010de7506954e973abfab5c5999c5a97f7a73e,
a fix that broke another ASUS in 8909 and 8919.

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agolguest should depend on CONFIG_FUTEX
Alexey Dobriyan [Thu, 23 Aug 2007 20:03:47 +0000 (00:03 +0400)]
lguest should depend on CONFIG_FUTEX

It uses get_futex_key().

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoACPI video hotkey: remove invalid events handler for video output devices
Zhang Rui [Mon, 20 Aug 2007 10:23:51 +0000 (18:23 +0800)]
ACPI video hotkey: remove invalid events handler for video output devices

Both ACPI_VIDEO_NOTIFY_SWITCH and ACPI_VIDEO_NOTIFY_PROBE
are valid for video bus devices only. Actually ACPI video output
device should never be notified for a output device switch/probe.

ACPI bus devices notify handler already has the code to
handle these kinds of events.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoACPI: video: Add keycode for ACPI video driver hotkey events.
Yu Luming [Fri, 24 Aug 2007 03:05:55 +0000 (23:05 -0400)]
ACPI: video: Add keycode for ACPI video driver hotkey events.

Signed-off-by: Luming Yu <luming.yu@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years ago[x86 setup] Make sure AH=00h when setting a video mode
H. Peter Anvin [Thu, 23 Aug 2007 16:28:42 +0000 (09:28 -0700)]
[x86 setup] Make sure AH=00h when setting a video mode

Passing a u8 into a register doesn't mean gcc will zero-extend it.
Also, don't depend on thhe register not to change.

Per bug report from Saul Tamari.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
17 years ago[x86 setup] Volatilize asm() statements
H. Peter Anvin [Wed, 22 Aug 2007 23:28:01 +0000 (16:28 -0700)]
[x86 setup] Volatilize asm() statements

asm() statements need to be volatile when:

a. They have side effects (other than value returned).
b. When the value returned can vary over time.
c. When they have ordering constraints that cannot be expressed to gcc.

In particular, the keyboard and timer reads were violating constraint (b),
which resulted in the keyboard/timeout poll getting
loop-invariant-removed when compiling with gcc 4.2.0.

Thanks to an anonymous bug reporter for pointing this out.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
17 years agoACPI: Schedule /proc/acpi/event for removal
Len Brown [Thu, 23 Aug 2007 19:20:26 +0000 (15:20 -0400)]
ACPI: Schedule /proc/acpi/event for removal

Schedule /proc/acpi/event for removal in 6 months.

Re-name acpi_bus_generate_event() to acpi_bus_generate_proc_event()
to make sure there is no confusion that it is for /proc/acpi/event only.

Add CONFIG_ACPI_PROC_EVENT to allow removal of /proc/acpi/event.
There is no functional change if CONFIG_ACPI_PROC_EVENT=y

Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoACPI: don't duplicate input events on netlink
Zhang Rui [Wed, 22 Aug 2007 17:24:31 +0000 (01:24 +0800)]
ACPI: don't duplicate input events on netlink

The previous events patch added a netlink event for every
user of the legacy /proc/acpi/event interface.

However, some users of /proc/acpi/event are really input events,
and they already report their events via the input layer.

Introduce a new interface, acpi_bus_generate_netlink_event(),
which is explicitly called by devices that want to repoprt
events via netlink.  This allows the input-like events
to opt-out of generating netlink events.  In summary:

events that are sent via netlink:
ac/battery/sbs
thermal
processor
thinkpad_acpi dock/bay

events that are sent via input layer:
button
video hotkey
thinkpad_acpi hotkey
asus_acpi/asus-laptop hotkey
sonypi/sonylaptop

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoV4L/DVB (6070): Fix a warning at dvb_net
Mauro Carvalho Chehab [Mon, 20 Aug 2007 19:45:35 +0000 (16:45 -0300)]
V4L/DVB (6070): Fix a warning at dvb_net

static function dvb_net_sec declares input arg "pkt" as u8. However, the
same argument at dvb_net_sec_callback is defined as "const u8". When
calling dvb_net_sec, this is casted as just "u8".

gcc 4.2.1 generates a warning about that:

  CC [M]  drivers/media/dvb/dvb-core/dvb_net.o
drivers/media/dvb/dvb-core/dvb_net.c: In function "dvb_net_sec_callback":
drivers/media/dvb/dvb-core/dvb_net.c:905: warning: passing argument 2 of
"dvb_net_sec" discards qualifiers from pointer target type

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6042): b2c2-flexcop: fix Airstar HD5000 tuning regression
Trent Piepho [Sun, 19 Aug 2007 08:05:54 +0000 (05:05 -0300)]
V4L/DVB (6042): b2c2-flexcop: fix Airstar HD5000 tuning regression

Git changeset 6bdcc6e6dbab8daffd05e5026486f34ba41a6c72 dropped the
stand-alone lgh06xf module, whose functionality was absorbed into the
dvb-pll module. However, there was a minor difference between the code
in lgh06xf and dvb-pll, which caused a regression in b2c2-flexcop
devices using the LG-H06xF NIM.

dvb-pll will probe for the presence of an i2c pll chip by performing a
single byte read, the lgh06xf driver did not do this. Unfortunately, the
code in flexcop-i2c.c does not currently support 1 byte or 0 byte reads
as a probe.  Such probes with the current code will always fail.

In order to work around this problem, and restore proper functionality
of the Airstar HD5000 device, this hack was created to make the probe
appear to succeed.  The single byte read in dvb_pll_attach is the only
place where such a probe would ever occur, so this change is safe, and
will not affect any other devices.

Of course, if one knew how to actually perform the read operation, it
would be better to go that route.  In the meantime, however, we must
apply this workaround, in order to prevent the regression that causes
tuning to fail on the Airstar HD5000 ATSC device.

Thanks to Jarod Wilson, who had originally reported this regression, and
to Geoffrey Hausheer, whose original workaround patch led us to find the
actual cause of the problem.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Cc: Geoffrey Hausheer <inli3epy93n@phracturedblue.com>
Acked-by: Jarod Wilson <jwilson@redhat.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years ago9p: fix bad error path in conversion routines
Mariusz Kozlowski [Thu, 23 Aug 2007 15:24:28 +0000 (10:24 -0500)]
9p: fix bad error path in conversion routines

When buf_check_overflow() returns != 0 we will hit kfree(ERR_PTR(err))
and it will not be happy about it.

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
17 years ago9p: remove deprecated v9fs_fid_lookup_remove()
Eric Van Hensbergen [Thu, 23 Aug 2007 15:08:45 +0000 (10:08 -0500)]
9p: remove deprecated v9fs_fid_lookup_remove()

This patch removes the v9fs_fid_lookup_remove which is no longer used.

Based on original patch from Adrian Bunk <bunk@stusta.de> which
used #if 0 to isolate the code.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
17 years ago9p: update maintainers and documentation
Eric Van Hensbergen [Mon, 23 Jul 2007 18:06:13 +0000 (13:06 -0500)]
9p: update maintainers and documentation

Updates to the MAINTAINERS file and documentation for 9p to point to the
swik wiki versus the outdated sf.net page.  Also updated some email addresses
and added pointers to papers which better describe the implementation and
application of the Linux 9p client.

Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
17 years ago9p: fix use after free
Eric Van Hensbergen [Thu, 26 Jul 2007 19:04:54 +0000 (14:04 -0500)]
9p: fix use after free

On 7/22/07, Adrian Bunk <bunk@stusta.de> wrote:
     The Coverity checker spotted the following use-after-free
     in net/9p/mux.c:

     <--  snip  -->

     ...
     struct p9_conn *p9_conn_create(struct p9_transport *trans, int msize,
                                         unsigned char *extended)
     {
     ...
             if (!m->tagpool) {
                     kfree(m);
                     return ERR_PTR(PTR_ERR(m->tagpool));
             }
     ...

     <--  snip  -->

Also spotted was a leak of the same structure further down in the function.

Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
17 years agosched: tweak the sched_runtime_limit tunable
Ingo Molnar [Thu, 23 Aug 2007 13:18:02 +0000 (15:18 +0200)]
sched: tweak the sched_runtime_limit tunable

Michael Gerdau reported reniced task CPU usage weirdnesses.
Such symptoms can be caused by limit underruns so double the
sched_runtime_limit.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: skip updating rq's next_balance under null SD
Suresh Siddha [Thu, 23 Aug 2007 13:18:02 +0000 (15:18 +0200)]
sched: skip updating rq's next_balance under null SD

Was playing with sched_smt_power_savings/sched_mc_power_savings and
found out that while the scheduler domains are reconstructed when sysfs
settings change, rebalance_domains() can get triggered with null domain
on other cpus, which is setting next_balance to jiffies + 60*HZ.
Resulting in no idle/busy balancing for 60 seconds.

Fix this.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: fix broken SMT/MC optimizations
Suresh Siddha [Thu, 23 Aug 2007 13:18:02 +0000 (15:18 +0200)]
sched: fix broken SMT/MC optimizations

On a four package system with HT - HT load balancing optimizations were
broken.  For example, if two tasks end up running on two logical threads
of one of the packages, scheduler is not able to pull one of the tasks
to a completely idle package.

In this scenario, for nice-0 tasks, imbalance calculated by scheduler
will be 512 and find_busiest_queue() will return 0 (as each cpu's load
is 1024 > imbalance and has only one task running).

Similarly MC scheduler optimizations also get fixed with this patch.

[ mingo@elte.hu: restored fair balancing by increasing the fuzz and
                 adding it back to the power decision, without the /2
                 factor. ]

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: accounting regression since rc1
Christian Borntraeger [Thu, 23 Aug 2007 13:18:02 +0000 (15:18 +0200)]
sched: accounting regression since rc1

Fix the accounting regression for CONFIG_VIRT_CPU_ACCOUNTING.  It
reverts parts of commit b27f03d4bdc145a09fb7b0c0e004b29f1ee555fa by
converting fs/proc/array.c back to cputime_t.  The new functions
task_utime and task_stime now return cputime_t instead of clock_t.  If
CONFIG_VIRT_CPU_ACCOUTING is set, task->utime and task->stime are
returned directly instead of using sum_exec_runtime.

Patch is tested on s390x with and without VIRT_CPU_ACCOUTING as well as
on i386.

[ mingo@elte.hu: cleanups, comments. ]

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: fix sysctl directory permissions
Eric W. Biederman [Thu, 23 Aug 2007 13:18:02 +0000 (15:18 +0200)]
sched: fix sysctl directory permissions

There are two remaining gotchas:

- The directories have impossible permissions (writeable).

- The ctl_name for the kernel directory is inconsistent with
  everything else.  It should be CTL_KERN.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosched: sched_clock_idle_[sleep|wakeup]_event()
Ingo Molnar [Thu, 23 Aug 2007 13:18:02 +0000 (15:18 +0200)]
sched: sched_clock_idle_[sleep|wakeup]_event()

construct a more or less wall-clock time out of sched_clock(), by
using ACPI-idle's existing knowledge about how much time we spent
idling. This allows the rq clock to work around TSC-stops-in-C2,
TSC-gets-corrupted-in-C3 type of problems.

( Besides the scheduler's statistics this also benefits blktrace and
  printk-timestamps as well. )

Furthermore, the precise before-C2/C3-sleep and after-C2/C3-wakeup
callbacks allow the scheduler to get out the most of the period where
the CPU has a reliable TSC. This results in slightly more precise
task statistics.

the ACPI bits were acked by Len.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Len Brown <len.brown@intel.com>
17 years agolibata: don't check n_sectors during revalidation if zero
Tejun Heo [Fri, 17 Aug 2007 09:46:51 +0000 (18:46 +0900)]
libata: don't check n_sectors during revalidation if zero

If the initial configuration fails early, n_sectors is left at zero.
Checking against it during revalidation makes retried configuration
fail due to n_sectors mismatch.  Ignore zero n_sectors during
revalidation.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agopata_via: Add Arima W730-K8 and other rebadgings
Alan Cox [Wed, 22 Aug 2007 21:57:48 +0000 (22:57 +0100)]
pata_via: Add Arima W730-K8 and other rebadgings

More cable funnies

Signed-off-by: Alan Cox <alan@redhat.com>
Tested-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agopata_sis: Add the FSC Amilo and friends
Alan Cox [Wed, 22 Aug 2007 21:56:43 +0000 (22:56 +0100)]
pata_sis: Add the FSC Amilo and friends

More short cables

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agopata_pdc2027x: PLL detection fixes
Mikael Pettersson [Sat, 18 Aug 2007 20:58:53 +0000 (22:58 +0200)]
pata_pdc2027x: PLL detection fixes

Previously I reported that the pata_pdc2027x PLL detection changes
in kernel 2.6.22 broke the driver on my PowerMac:

>pata_pdc2027x: Invalid PLL input clock 1691742kHz, give up!

This is followed by a number of errors and speed reduction
steps on the affected ports.

There are two bugs in pata_pdc2027x's PLL detection code:

1. The PLL counter's start value is read before the chip is
   put in "test mode". Outside of test mode the counter is
   halted, and on the PowerMac the counter is zero because
   the chip hasn't been initialised by its BIOS.

   The fix is to move the read of the start value to after
   test mode is started, but before the mdelay() in test mode.
   This also improves the precision of the PLL detection.

2. The code to compute the number of PLL decrements during the
   mdelay() in test mode fails to consider that the PLL counter
   only is 30 bits wide. If there is a wraparound, it will compute
   an incorrect and much too large value. On the PowerMac, the
   start count is zero, the end count is a large 30-bit value, so
   wraparound occurs and an out of bounds PLL clock is detected.

   The fix is to mask the (start - end) computation to 30 bits.

While debugging this I also noticed that pdc_read_counter()
reads the two halves of the 30-bit PLL counter as 16-bit values,
and then combines them as if the halves only are 15 bits wide.
To avoid confusion, the halves should be read as 15-bit values.

This patch implements all three changes. It fixes the PLL detection
failure on my PowerMac, and doesn't cause any regressions on an x86
with an identical card.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: fix n_sectors failure handling during revalidation
Tejun Heo [Wed, 15 Aug 2007 18:02:22 +0000 (03:02 +0900)]
libata: fix n_sectors failure handling during revalidation

If revalidation fails because device has different n_sectors after
configuration the original n_sectors should be restored before failing
revalidation.  Without this fix, n_sectors difference will incorrectly
and silently pass revalidation when revalidation is retried.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosdhci: tell which spurious interrupt we got
Pierre Ossman [Sun, 12 Aug 2007 15:29:47 +0000 (17:29 +0200)]
sdhci: tell which spurious interrupt we got

When we get unexpected interrupts, also print which interrupt it was.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agosdhci: handle data interrupts during command
Pierre Ossman [Sun, 12 Aug 2007 14:46:32 +0000 (16:46 +0200)]
sdhci: handle data interrupts during command

It is fully legal for a controller to start issuing data related
interrupts before it has signalled that the command has completed.
Make sure the driver actually can handle this.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agommc: ignore bad max block size in sdhci
David Vrabel [Fri, 10 Aug 2007 12:25:03 +0000 (13:25 +0100)]
mmc: ignore bad max block size in sdhci

Some SDHC cards report an invalid maximum block size, in these cases
assume they support block sizes up to 512 bytes instead of returning
an error.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agosdhci: be more cautious about block count register
Pierre Ossman [Sun, 12 Aug 2007 11:13:24 +0000 (13:13 +0200)]
sdhci: be more cautious about block count register

The block count register shouldn't be trusted for single block transfers,
so avoid using it completely when calculating transferred bytes.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agodrivers/mmc/core/host.c: kmalloc + memset conversion to kzalloc
Mariusz Kozlowski [Fri, 10 Aug 2007 21:00:50 +0000 (14:00 -0700)]
drivers/mmc/core/host.c: kmalloc + memset conversion to kzalloc

 drivers/mmc/core/host.c | 3509 -> 3457 (-52 bytes)
 drivers/mmc/core/host.o | 92400 -> 92136 (-264 bytes)

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agodrivers/mmc/core/bus.c: kmalloc + memset conversion to kzalloc
Mariusz Kozlowski [Fri, 10 Aug 2007 21:00:47 +0000 (14:00 -0700)]
drivers/mmc/core/bus.c: kmalloc + memset conversion to kzalloc

 drivers/mmc/core/bus.c | 5663 -> 5619 (-44 bytes)
 drivers/mmc/core/bus.o | 70899 -> 70731 (-168 bytes)

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agoApply memory policies to top two highest zones when highest zone is ZONE_MOVABLE
Mel Gorman [Wed, 22 Aug 2007 21:02:05 +0000 (14:02 -0700)]
Apply memory policies to top two highest zones when highest zone is ZONE_MOVABLE

The NUMA layer only supports NUMA policies for the highest zone.  When
ZONE_MOVABLE is configured with kernelcore=, the the highest zone becomes
ZONE_MOVABLE.  The result is that policies are only applied to allocations
like anonymous pages and page cache allocated from ZONE_MOVABLE when the
zone is used.

This patch applies policies to the two highest zones when the highest zone
is ZONE_MOVABLE.  As ZONE_MOVABLE consists of pages from the highest "real"
zone, it's always functionally equivalent.

The patch has been tested on a variety of machines both NUMA and non-NUMA
covering x86, x86_64 and ppc64.  No abnormal results were seen in
kernbench, tbench, dbench or hackbench.  It passes regression tests from
the numactl package with and without kernelcore= once numactl tests are
patched to wait for vmstat counters to update.

akpm: this is the nasty hack to fix NUMA mempolicies in the presence of
ZONE_MOVABLE and kernelcore= in 2.6.23.  Christoph says "For .24 either merge
the mobility or get the other solution that Mel is working on.  That solution
would only use a single zonelist per node and filter on the fly.  That may
help performance and also help to make memory policies work better."

Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Acked-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Tested-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Acked-by: Christoph Lameter <clameter@sgi.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoau1100fb: move au1100fb_fb_blank() beforce au1100fb_setmode()
Yoichi Yuasa [Wed, 22 Aug 2007 21:02:03 +0000 (14:02 -0700)]
au1100fb: move au1100fb_fb_blank() beforce au1100fb_setmode()

au1100fb_fb_blank() should come before au1100fb_setmode().

drivers/video/au1100fb.c: In function 'au1100fb_setmode':
drivers/video/au1100fb.c:211: error: implicit declaration of function 'au1100fb_fb_blank'

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agonewport_con warning fix
Andrew Morton [Wed, 22 Aug 2007 21:02:01 +0000 (14:02 -0700)]
newport_con warning fix

drivers/video/console/newport_con.c: In function `newport_console_init':
drivers/video/console/newport_con.c:743: warning: return makes integer from pointer without a cast

Although one wonders whether that should have been -ENODEV...

Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoselection.h: add tty_struct forward declaration
Andrew Morton [Wed, 22 Aug 2007 21:02:01 +0000 (14:02 -0700)]
selection.h: add tty_struct forward declaration

In file included from drivers/video/console/newport_con.c:16:
include/linux/selection.h:16: warning: "struct tty_struct" declared inside parameter list
include/linux/selection.h:16: warning: its scope is only this definition or declaration, which is probably not what you want

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoCheck for PPC32 in imsttfb
Stephen Rothwell [Wed, 22 Aug 2007 21:02:00 +0000 (14:02 -0700)]
Check for PPC32 in imsttfb

This is the correct fix according to Paul Mackerras and allows an
allyesconfig on PPC64 to build.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Paul Mackerras <paulus@samba.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoXen i386 xen-head.S fix sections mixup
Mathieu Desnoyers [Wed, 22 Aug 2007 21:01:59 +0000 (14:01 -0700)]
Xen i386 xen-head.S fix sections mixup

Xen i386 xen-head.S fix sections mixup

xen-head.S does not come back to the data section, leaving the text section
as current section. It causes problems with a slightly enhanced DEBUG_RODATA
that supports CONFIG_HOTPLUG and bringing a CPU up after the text has been
marked read-only: reference to early_gdt_descr causes a page fault.

Updates:

- It should be using pushsection/popsection.
- Actually, the push/popsections around the ELFNOTEs are redundant; ELFNOTE()
  does its own push/popsection to put things into the appropriate .note* section
  anyway.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Acked-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Chris Wright <chrisw@sous-sol.org>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoexec: kill unsafe BUG_ON(sig->count) checks
Oleg Nesterov [Wed, 22 Aug 2007 21:01:58 +0000 (14:01 -0700)]
exec: kill unsafe BUG_ON(sig->count) checks

de_thread:

if (atomic_read(&oldsighand->count) <= 1)
BUG_ON(atomic_read(&sig->count) != 1);

This is not safe without the rmb() in between.  The results of two
correctly ordered __exit_signal()->atomic_dec_and_test()'s could be seen
out of order on our CPU.

The same is true for the "thread_group_empty()" case, __unhash_process()'s
changes could be seen before atomic_dec_and_test(&sig->count).

On some platforms (including i386) atomic_read() doesn't provide even the
compiler barrier, in that case these checks are simply racy.

Remove these BUG_ON()'s. Alternatively, we can do something like

BUG_ON( ({ smp_rmb(); atomic_read(&sig->count) != 1; }) );

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agortc-max6902 minor fixes
David Brownell [Wed, 22 Aug 2007 21:01:57 +0000 (14:01 -0700)]
rtc-max6902 minor fixes

Minor tweaks to rtc-max6902: make it hotplug correctly, and fix a few
space-before-tab whitespace botches.  This driver has no current in-tree
users, so the hotplug fix changes the driver name.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoSLUB: do not fail on broken memory configurations
Christoph Lameter [Wed, 22 Aug 2007 21:01:57 +0000 (14:01 -0700)]
SLUB: do not fail on broken memory configurations

Print a big fat warning and do what is necessary to continue if a node is
marked as up (meaning either node is online (upstream) or node has memory
(Andrew's tree)) but allocations from the node do not succeed.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>