GitHub/moto-9609/android_kernel_motorola_exynos9610.git
17 years agoProvide timespec to guests rather than jiffies clock.
Rusty Russell [Fri, 27 Jul 2007 03:42:52 +0000 (13:42 +1000)]
Provide timespec to guests rather than jiffies clock.

A non-periodic clock_event_device and the "jiffies" clock don't mix well:
tick_handle_periodic() can go into an infinite loop.

Currently lguest guests use the jiffies clock when the TSC is
unusable.  Instead, make the Host write the current time into the lguest
page on every interrupt.  This doesn't cost much but is more precise
and at least as accurate as the jiffies clock.  It also gets rid of
the GET_WALLCLOCK hypercall.

Also, delay setting sched_clock until our clock is set up, otherwise
the early printk timestamps can go backwards (not harmful, just ugly).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoFix lguest bzImage loading with CONFIG_RELOCATABLE=y
Rusty Russell [Fri, 27 Jul 2007 03:35:43 +0000 (13:35 +1000)]
Fix lguest bzImage loading with CONFIG_RELOCATABLE=y

Jason Yeh sent his crashing .config: bzImages made with
CONFIG_RELOCATABLE=y put the relocs where the BSS is expected, and we
crash with unusual results such as:

lguest: unhandled trap 14 at 0xc0122ae1 (0xa9)

Relying on BSS being zero was merely laziness on my part, and
unfortunately, lguest doesn't go through the normal startup path (which
does this in asm).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agom68knommu: remove crap from machdep.h
Greg Ungerer [Fri, 27 Jul 2007 00:38:16 +0000 (10:38 +1000)]
m68knommu: remove crap from machdep.h

Removed unused dead crap from machdep.h header.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agom68knommu: fix declaration of mach_sched_init
Greg Ungerer [Fri, 27 Jul 2007 00:38:01 +0000 (10:38 +1000)]
m68knommu: fix declaration of mach_sched_init

Make declaration of mach_sched_init match definition
(which is in arch/m68knommu/kernel/setup.c).

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoFix procfs compat_ioctl regression
David Miller [Sat, 28 Jul 2007 05:58:37 +0000 (22:58 -0700)]
Fix procfs compat_ioctl regression

It is important to only provide the compat_ioctl method
if the downstream de->proc_fops does too, otherwise this
utterly confuses the logic in fs/compat_ioctl.c and we
end up doing the wrong thing.

Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Alexey Dobriyan <adobriyan@sw.ru>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoaudit: fix two bugs in the new execve audit code
Peter Zijlstra [Fri, 27 Jul 2007 22:55:18 +0000 (00:55 +0200)]
audit: fix two bugs in the new execve audit code

copy_from_user() returns the number of bytes not copied, hence 0 is the
expected output.

axi->mm might not be valid anymore when not equal to current->mm, do not
dereference before checking that - thanks to Al for spotting that.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Tested-by: Steve Grubb <sgrubb@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agorip some includes from linux/interrupt.h
Al Viro [Fri, 27 Jul 2007 13:24:33 +0000 (14:24 +0100)]
rip some includes from linux/interrupt.h

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agofix preprocessor idiocy in reiserfs
Al Viro [Fri, 27 Jul 2007 13:23:44 +0000 (14:23 +0100)]
fix preprocessor idiocy in reiserfs

#x blocks expansion of macro argument, but it won't do you any
good if it's already been expanded...  As it is, RFALSE(cond, ....)
ended up with stringified _expanded_ cond.  Real fun when cond contains
something like le32_to_cpu() and you are on a big-endian box...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agomore include order horrors
Al Viro [Fri, 27 Jul 2007 13:19:52 +0000 (14:19 +0100)]
more include order horrors

... because somebody had added preempt.h -> list.h, resulting in
asm/system.h -> hardirq.h -> preempt.h -> list.h -> asm/system.h on m68k,
with smp_wmb() used in list.h and defined in asm/system.h below the include
of hardirq.h.

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://git390.osdl.marist.edu/pub/scm/linux-2.6
Linus Torvalds [Sun, 29 Jul 2007 02:33:23 +0000 (19:33 -0700)]
Merge branch 'for-linus' of git://git390.osdl.marist.edu/linux-2.6

* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
  [S390] Fix sclp_vt220 error handling.
  [S390] cio: Reorganize initialization.
  [S390] cio: Make CIO_* macros safe if dbfs are not available.
  [S390] cio: Clean up messages.
  [S390] Fix IRQ tracing.
  [S390] vmur: fix diag14_read.
  [S390] Wire up sys_fallocate.
  [S390] add types.h include to s390_ext.h
  [S390] cio: Remove deprecated rdc/rcd.
  [S390] Get rid of new section mismatch warnings.
  [S390] sclp: kill unused SCLP config option.
  [S390] cio: Remove remains of _ccw_device_get_device_number().
  [S390] cio: css_sch_device_register() can be made static.
  [S390] Improve __smp_call_function_map.
  [S390] Convert to smp_call_function_single.

17 years agoMerge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/cooloney...
Linus Torvalds [Sun, 29 Jul 2007 02:33:04 +0000 (19:33 -0700)]
Merge branch 'for-linus' of /linux/kernel/git/cooloney/blackfin-2.6

* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/cooloney/blackfin-2.6:
  Input Serio: Blackfin doesnt support I8042 - make sure it doesnt get selected
  Blackfin arch: add BF54x I2C/TWI TWI0 driver support
  Blackfin On-Chip RTC driver update for supporting BF54x
  Blackfin Ethernet MAC driver: fix bug Report returned -ENOMEM upwards (in case L1/uncached memory alloc fails)
  Blackfin arch: add error message when IRQ no available
  Blackfin arch: Initialize the exception vectors early in the boot process
  Blackfin arch: fix a compiling warning about dma-mapping
  Blackfin arch: switch to using proper defines this time THREAD_SIZE and PAGE_SIZE instead of just PAGE_SIZE everywhere
  Blackfin arch: fix bug which unaligns the init thread's stack and causes the current macro to fail.
  Blackfin arch: Load P0 before storing through it
  Blackfin arch: fix KGDB bug, dont forget last parameter.
  Blackfin arch: add selections for BF544 and BF542
  Blackfin arch: use bfin_read_SWRST() now that BF561 provides it
  Blackfin arch: setup aliases for some core Core A MMRs

17 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
Linus Torvalds [Sun, 29 Jul 2007 02:31:13 +0000 (19:31 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block

* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
  docbook: add pipes, other fixes
  blktrace: use cpu_clock() instead of sched_clock()
  bsg: Fix build for CONFIG_BLOCK=n
  [patch] QUEUE_FLAG_READFULL QUEUE_FLAG_WRITEFULL comment fix

17 years agoMerge branch 'agp-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Sun, 29 Jul 2007 02:30:24 +0000 (19:30 -0700)]
Merge branch 'agp-patches' of git://git./linux/kernel/git/airlied/agp-2.6

* 'agp-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/agp-2.6:
  agp: AMD AGP is used on UP1100 & UP1500 alpha boxen
  intel_agp: really fix 945/965GME
  agp: don't lock pages
  AGP: document boot options
  Fix "use after free" / "double free" bug in ati_create_gatt_pages / ati_free_gatt_pages

17 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Sun, 29 Jul 2007 02:29:37 +0000 (19:29 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 4527/1: pxa: fix pxa27x ac97 cold reset in ASoC due to CKEN change
  [ARM] 4530/1: MXC: fix elf_hwcap compile breakage as in iop13xx
  [ARM] 4529/1: [HP Jornada 7XX] - Fix jornada720.c to use SSP driver
  [ARM] 4528/1: [HP Jornada 7XX] - Fix typo in jornada720_ssp.c
  [ARM] Remove CONFIG_IGNORE_FIQ
  [ARM] 4526/1: pxa: make ARCH_PXA select GENERIC_CLOCKEVENTS
  [ARM] setup_profiling_timer must not be __init

17 years ago[ARM] 4527/1: pxa: fix pxa27x ac97 cold reset in ASoC due to CKEN change
Eric Miao [Thu, 26 Jul 2007 01:01:04 +0000 (02:01 +0100)]
[ARM] 4527/1: pxa: fix pxa27x ac97 cold reset in ASoC due to CKEN change

due to CKEN_xxx definition and pxa_set_cken() change,  the pxa27x
ac97 cold reset is broken in ASoC, fixed to use bit index instead
of bit mask

Signed-off-by: eric miao <eric.y.miao@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] 4530/1: MXC: fix elf_hwcap compile breakage as in iop13xx
Quinn Jensen [Fri, 27 Jul 2007 22:30:55 +0000 (23:30 +0100)]
[ARM] 4530/1: MXC: fix elf_hwcap compile breakage as in iop13xx

MXC needs the same change as IOP.  See [ARM] 4494/1
or commit 7dea1b20066cd30fb54da7e686b16b5e38b46b2d

An undefined reference to elf_hwcap prevents linkage, due
to changes made by f884b1cf578e079f01682514ae1ae64c74586602
and d1cbbd6b413510c6512f4f80ffd48db1a8dd554a

Removing processor.h removes the extern definition of
elf_hwcap, which fixes the link issue, but forgets cpu_relax().
So, instead, we'll call barrier() directly.

Cc: Lennert Buytenhek <kernel@wantstofly.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Ross Wille <wille@freescale.com>
Signed-off-by: Quinn Jensen <quinn.jensen@freescale.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] 4529/1: [HP Jornada 7XX] - Fix jornada720.c to use SSP driver
Kristoffer Ericson [Thu, 26 Jul 2007 06:46:17 +0000 (07:46 +0100)]
[ARM] 4529/1: [HP Jornada 7XX] - Fix jornada720.c to use SSP driver

This fixes the jornada720.c file :

* ifdef for CONFIG_SA1100_JORNADA720_SSP since we dont want to include anything not selected in menyconfig.
* add documentation for init for future reference
* change platform driver name from jornada720_mcu ->
jornada_ssp.
* change maintainer in file.

Signed-off-by: Kristoffer Ericson <Kristoffer.Ericson@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[IA64] Compare pointer against NULL, not '0'
Yoann Padioleau [Fri, 27 Jul 2007 09:44:42 +0000 (11:44 +0200)]
[IA64] Compare pointer against NULL, not '0'

When comparing a pointer, it's clearer to compare it to NULL than to 0.

Signed-off-by: Yoann Padioleau <padator@wanadoo.fr>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] Fix build failure in fs/quota.c
Tony Luck [Fri, 27 Jul 2007 22:35:43 +0000 (15:35 -0700)]
[IA64] Fix build failure in fs/quota.c

b716395e2b8e450e294537de0c91476ded2f0395 added code to handle
a compatability issue with 32bit quota tools, but the new compat
routines are only needed when CONFIG_COMPAT=y (and with this set
to 'n' there are compilation problems since some new typedefs are
not visible).

Reported by Doug Chapman.  Fix tuned by a cast of thousands (Andi,
Andreas, Arthur, HPA, Willy)

Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] Use new acpi_device_id struct for HID init in ia64/hp/common/sba_iommu.c
Thomas Renninger [Fri, 27 Jul 2007 22:38:31 +0000 (15:38 -0700)]
[IA64] Use new acpi_device_id struct for HID init in ia64/hp/common/sba_iommu.c

Forgot to adjust this one with the acpi autoloading patches
in commit 8c8eb78f673c07b60f31751e1e47ac367c60c6b7

Acked-by: Myron Stowe <myron.stowe@hp.com>
Acked-by: Len Brown <len.brown@intel.com>
Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[S390] Fix sclp_vt220 error handling.
Heiko Carstens [Fri, 27 Jul 2007 10:29:22 +0000 (12:29 +0200)]
[S390] Fix sclp_vt220 error handling.

Also convert to slab_is_available() as an indicator if
get_zeroed_page() will work or not.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] cio: Reorganize initialization.
Cornelia Huck [Fri, 27 Jul 2007 10:29:21 +0000 (12:29 +0200)]
[S390] cio: Reorganize initialization.

- Localize more of the init calls in init_channel_subsystem().
- Print a warning if init_channel_subsystem() failed.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] cio: Make CIO_* macros safe if dbfs are not available.
Cornelia Huck [Fri, 27 Jul 2007 10:29:20 +0000 (12:29 +0200)]
[S390] cio: Make CIO_* macros safe if dbfs are not available.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] cio: Clean up messages.
Cornelia Huck [Fri, 27 Jul 2007 10:29:19 +0000 (12:29 +0200)]
[S390] cio: Clean up messages.

- Remove unneeded messages.
- Move some messages into the debug feature.
- Use dev_* where appropriate.
- Use "cio: " prefix consistently.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Fix IRQ tracing.
Heiko Carstens [Fri, 27 Jul 2007 10:29:18 +0000 (12:29 +0200)]
[S390] Fix IRQ tracing.

If a machine check is pending and the external or I/O interrupt handler
returns to userspace io_mcck_pending is going to call s390_handle_mcck.
Before this happens a call to TRACE_IRQS_ON was already made since we
know that we are going back to userspace and hence interrupts will be
enabled. So there was an indication that interrupts are enabled while
in reality they are still disabled.
s390_handle_mcck will do a local_irq_save/restore pair and confuse
lockdep which later complains about inconsistent irq tracing.
To solve this just call trace_hardirqs_off before calling
s390_handle_mcck and trace_hardirqs_on afterwards.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] vmur: fix diag14_read.
Frank Munzert [Fri, 27 Jul 2007 10:29:17 +0000 (12:29 +0200)]
[S390] vmur: fix diag14_read.

Record length of spool file must be only stored in 1st SPLINK record

Signed-off-by: Frank Munzert <munzert@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Wire up sys_fallocate.
Martin Schwidefsky [Fri, 27 Jul 2007 10:29:16 +0000 (12:29 +0200)]
[S390] Wire up sys_fallocate.

This patch implements support of fallocate system call on s390(x)
platform.  A wrapper is added to address the issue which s390 ABI has with
the arguments of this system call.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] add types.h include to s390_ext.h
Christian Borntraeger [Fri, 27 Jul 2007 10:29:15 +0000 (12:29 +0200)]
[S390] add types.h include to s390_ext.h

The header file for external interrupts uses the _u16 type. Make sure
that _u16 is defined by including linux/types.h. This prevents compile
failures, if asm/s390_ext.h is the first include file.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] cio: Remove deprecated rdc/rcd.
Cornelia Huck [Fri, 27 Jul 2007 10:29:14 +0000 (12:29 +0200)]
[S390] cio: Remove deprecated rdc/rcd.

http://marc.info/?l=linux-kernel&m=118481061928246&w=2 seems to
indicate disfavour of "deprecated", so let's just kill it now.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Get rid of new section mismatch warnings.
Heiko Carstens [Fri, 27 Jul 2007 10:29:13 +0000 (12:29 +0200)]
[S390] Get rid of new section mismatch warnings.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] sclp: kill unused SCLP config option.
Heiko Carstens [Fri, 27 Jul 2007 10:29:12 +0000 (12:29 +0200)]
[S390] sclp: kill unused SCLP config option.

sclp is always compiled in.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] cio: Remove remains of _ccw_device_get_device_number().
Cornelia Huck [Fri, 27 Jul 2007 10:29:11 +0000 (12:29 +0200)]
[S390] cio: Remove remains of _ccw_device_get_device_number().

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] cio: css_sch_device_register() can be made static.
Cornelia Huck [Fri, 27 Jul 2007 10:29:10 +0000 (12:29 +0200)]
[S390] cio: css_sch_device_register() can be made static.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Improve __smp_call_function_map.
Heiko Carstens [Fri, 27 Jul 2007 10:29:09 +0000 (12:29 +0200)]
[S390] Improve __smp_call_function_map.

There is no need to disable bottom halves when holding call_lock. Also
this could imply that it is legal to call smp_call_function* from
bh context, which it is not.
Also test if func will be executed locally before disabling
and aterwards enabling interrupts again. It's not necessary to disable
and enable interrupts each time __smp_call_function_map gets called.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Convert to smp_call_function_single.
Heiko Carstens [Fri, 27 Jul 2007 10:29:08 +0000 (12:29 +0200)]
[S390] Convert to smp_call_function_single.

smp_call_function_single now has the same semantics as s390's
smp_call_function_on. Therefore convert to the *single variant
and get rid of some architecture specific code.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years agodocbook: add pipes, other fixes
Randy Dunlap [Fri, 27 Jul 2007 06:08:51 +0000 (08:08 +0200)]
docbook: add pipes, other fixes

Fix some typos in pipe.c and splice.c.
Add pipes API to kernel-api.tmpl.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoblktrace: use cpu_clock() instead of sched_clock()
Ingo Molnar [Wed, 25 Jul 2007 11:07:10 +0000 (13:07 +0200)]
blktrace: use cpu_clock() instead of sched_clock()

use cpu_clock() instead of sched_clock(). (the latter is not a proper
clock-source)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agobsg: Fix build for CONFIG_BLOCK=n
Paul Mundt [Wed, 25 Jul 2007 08:02:30 +0000 (10:02 +0200)]
bsg: Fix build for CONFIG_BLOCK=n

BLK_DEV_BSG was added outside of the if BLOCK check, which allows it to
be enabled when CONFIG_BLOCK=n. This leads to many screenlengths of
errors, starting with a parse error on the request_queue_t definition.
Obviously this wasn't intended for CONFIG_BLOCK=n usage, so just move the
option back in to the block.

Caught with a randconfig on sh.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
--

 block/Kconfig |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years ago[patch] QUEUE_FLAG_READFULL QUEUE_FLAG_WRITEFULL comment fix
Qi Yong [Wed, 25 Jul 2007 06:45:51 +0000 (08:45 +0200)]
[patch] QUEUE_FLAG_READFULL QUEUE_FLAG_WRITEFULL comment fix

The two comments were transposed.

Signed-off-by: Qi Yong <qiyong@mail.fc-cn.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoagp: AMD AGP is used on UP1100 & UP1500 alpha boxen
Alan Hourihane [Fri, 27 Jul 2007 00:56:43 +0000 (10:56 +1000)]
agp: AMD AGP is used on UP1100 & UP1500 alpha boxen

Signed-off-by: Dave Airlie <airlied@redhat.com>
17 years agointel_agp: really fix 945/965GME
Zhenyu Wang [Thu, 26 Jul 2007 01:18:09 +0000 (09:18 +0800)]
intel_agp: really fix 945/965GME

Fix some missing places to check with device id info, which
should probe the device gart correctly.

Signed-off-by: Wang Zhenyu <zhenyu.z.wang@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
17 years agoagp: don't lock pages
Nick Piggin [Wed, 25 Jul 2007 11:19:22 +0000 (13:19 +0200)]
agp: don't lock pages

AGP should not need to lock pages. They are not protecting any race
because there is no lock_page calls, only SetPageLocked.

This is causing hangs with d00806b183152af6d24f46f0c33f14162ca1262a.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
17 years agoAGP: document boot options
Chuck Ebbert [Fri, 27 Jul 2007 00:46:20 +0000 (10:46 +1000)]
AGP: document boot options

Add documentation for AGP boot options.

Signed-off-by: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
17 years agoFix "use after free" / "double free" bug in ati_create_gatt_pages / ati_free_gatt_pages
Jesper Juhl [Sat, 21 Jul 2007 15:39:11 +0000 (17:39 +0200)]
Fix "use after free" / "double free" bug in ati_create_gatt_pages / ati_free_gatt_pages

Hi,

Coverity spotted a "use after free" bug in
drivers/char/agp/ati-agp.c::ati_create_gatt_pages().

The same one that was in
  drivers/char/agp/amd-k7-agp.c::amd_create_gatt_pages()

The problem is this:
       If "entry = kzalloc(sizeof(struct ati_page_map), GFP_KERNEL);"
fails, then there's a loop in the function to free all entries
allocated so far and break out of the allocation loop. That in itself
is pretty sane, but then the (now freed) 'tables' is assigned to
ati_generic_private.gatt_pages and 'retval' is set to -ENOMEM which
causes ati_free_gatt_pages(); to be called at the end of the function.
The problem with this is that ati_free_gatt_pages() will then loop
'ati_generic_private.num_tables' times and try to free each entry in
tables[] - this is bad since tables has already been freed and
furthermore it will call kfree(tables) at the end - a double free.

This patch removes the freeing loop in ati_create_gatt_pages() and
instead relies entirely on the call to ati_free_gatt_pages() to free
everything we allocated in case of an error. It also sets
ati_generic_private.num_tables to the actual number of entries
allocated instead of just using the value passed in from the caller -
this ensures that ati_free_gatt_pages() will only attempt to free
stuff that was actually allocated.

Note: I'm in no way intimate with this code and I have no way to
actually test this patch (besides compile test it), so while I've
tried to be careful in reading the code and make sure the patch
does the right thing an ACK from someone who actually knows the
code in-depth would be very much appreciated.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
17 years ago[IA64] Fix wrong return value in parse_vector_domain
Kenji Kaneshige [Thu, 26 Jul 2007 06:32:38 +0000 (15:32 +0900)]
[IA64] Fix wrong return value in parse_vector_domain

Fix wrong return value in parse_vector_domain().

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] Fix wrong assumption in acpi_gsi_to_irq
Kenji Kaneshige [Thu, 26 Jul 2007 06:31:34 +0000 (15:31 +0900)]
[IA64] Fix wrong assumption in acpi_gsi_to_irq

The ia64's acpi_gsi_to_irq() function assumes irq == vector. But in
fact irq can be different from vector. This patch fix this wrong
assumption.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] Add sanity check into __bind_irq_vector
Kenji Kaneshige [Thu, 26 Jul 2007 06:30:45 +0000 (15:30 +0900)]
[IA64] Add sanity check into __bind_irq_vector

Add some sanity checks into __bind_irq_vector().

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
Linus Torvalds [Thu, 26 Jul 2007 21:00:56 +0000 (14:00 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/drzeus/mmc

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
  drivers/mmc/core/: make 3 functions static
  mmc: add missing printk levels
  mmc: remove redundant debug information from sdhci and wbsd
  mmc: proper debugging output in core
  mmc: be more verbose about card insertions/removal
  mmc: Don't hold lock when releasing an added card
  mmc: add a might_sleep() to mmc_claim_host()
  mmc: update kerneldoc
  mmc: update header file paths
  sdhci: add support to ENE-CB714
  mmc: check error bits before command completion

17 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
Linus Torvalds [Thu, 26 Jul 2007 21:00:09 +0000 (14:00 -0700)]
Merge branch 'merge' of git://git./linux/kernel/git/paulus/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (21 commits)
  [POWERPC] spusched: Fix initial timeslice calculation
  [POWERPC] spufs: Fix incorrect initialization of cbe_spu_info.spus
  [POWERPC] Fix Maple platform ISA bus
  [POWERPC] Make pci_iounmap actually unmap things
  [POWERPC] Add function to check if address is an IO port
  [POWERPC] Fix Pegasos keyboard detection
  [POWERPC] iSeries: Fix section mismatch warning in lpevents
  [POWERPC] iSeries: Fix section mismatch warnings
  [POWERPC] iSeries: We need vio_enable_interrupts
  [POWERPC] Fix RTC and device tree on linkstation machines
  [POWERPC] Add of_register_i2c_devices()
  [POWERPC] Fix loop with unsigned long counter variable
  [POWERPC] Fix register labels on show_regs() message for 4xx/Book-E
  [POWERPC] Only allow building of BootX text support on PPC_MULTIPLATFORM
  [POWERPC] Fix the ability to reset on MPC8544 DS and MPC8568 MDS boards
  [POWERPC] Fix mpc7448hpc2 tsi108 device_type bug
  [POWREPC] Fixup a number of modpost warnings on ppc32
  [POWERPC] Fix ethernet PHY support on MPC8544 DS
  [POWERPC] Don't try to allocate resources for a Freescale POWERPC PHB
  Revert "[POWERPC] Don't complain if size-cells == 0 in prom_parse()"
  ...

17 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched
Linus Torvalds [Thu, 26 Jul 2007 20:59:59 +0000 (13:59 -0700)]
Merge git://git./linux/kernel/git/mingo/linux-2.6-sched

* git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched:
  [PATCH] sched: debug feature - make the sched-domains tree runtime-tweakable
  [PATCH] sched: add above_background_load() function
  [PATCH] sched: update Documentation/sched-stats.txt
  [PATCH] sched: mark sysrq_sched_debug_show() static
  [PATCH] sched: make cpu_clock() not use the rq clock
  [PATCH] sched: remove unused rq->load_balance_class
  [PATCH] sched: arch preempt notifier mechanism
  [PATCH] sched: increase SCHED_LOAD_SCALE_FUZZ

17 years agoDon't force-enable suspend/hibernate support just for ACPI
Linus Torvalds [Thu, 26 Jul 2007 20:44:58 +0000 (13:44 -0700)]
Don't force-enable suspend/hibernate support just for ACPI

It's a totally independent decision for the user whether he wants
suspend and/or hibernation support, and ACPI shouldn't care.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoFix ThinkPad T42 poweroff failure introduced by by "PM: Introduce pm_power_off_prepare"
Rafael J. Wysocki [Thu, 26 Jul 2007 14:29:55 +0000 (16:29 +0200)]
Fix ThinkPad T42 poweroff failure introduced by by "PM: Introduce pm_power_off_prepare"

Commit bd804eba1c8597cbb7cd5a5f9fe886aae16a079a ("PM: Introduce
pm_power_off_prepare") caused problems in the poweroff path, as reported by
YOSHIFUJI Hideaki / 吉藤英明.

Generally, sysdev_shutdown() should be called after the ACPI preparation for
powering the system off.  To make it happen, we can separate sysdev_shutdown()
from device_shutdown() and call it directly wherever necessary.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Tested-by: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoRevert most of "x86: Fix alternatives and kprobes to remap write-protected kernel...
Linus Torvalds [Thu, 26 Jul 2007 19:07:21 +0000 (12:07 -0700)]
Revert most of "x86: Fix alternatives and kprobes to remap write-protected kernel text"

This reverts most of commit 19d36ccdc34f5ed444f8a6af0cbfdb6790eb1177.

The way to DEBUG_RODATA interactions with KPROBES and CPU hotplug is to
just not mark the text as being write-protected in the first place.
Both of those facilities depend on rewriting instructions.

Having "helpful" debug facilities that just cause more problem is not
being helpful.  It just adds complexity and bugs. Not worth it.

Reported-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Andi Kleen <ak@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoPNP: fix up after Lindent
Bjorn Helgaas [Thu, 26 Jul 2007 17:41:21 +0000 (10:41 -0700)]
PNP: fix up after Lindent

These are manual fixups after running Lindent.  No functional change.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Len Brown <lenb@kernel.org>
Cc: Adam Belay <ambx1@neo.rr.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoPNP: Lindent all source files
Bjorn Helgaas [Thu, 26 Jul 2007 17:41:20 +0000 (10:41 -0700)]
PNP: Lindent all source files

Run Lindent on all PNP source files.

Produced by:

    $ quilt new pnp-lindent
    $ find drivers/pnp -name \*.[ch] | xargs quilt add
    $ quilt add include/linux/{pnp.h,pnpbios.h}
    $ scripts/Lindent drivers/pnp/*.c drivers/pnp/*/*.c include/linux/pnp*.h
    $ quilt refresh --sort

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Len Brown <lenb@kernel.org>
Cc: Adam Belay <ambx1@neo.rr.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agox86_64: cleanup tsc.c merge artifact
Thomas Gleixner [Thu, 26 Jul 2007 17:41:19 +0000 (10:41 -0700)]
x86_64: cleanup tsc.c merge artifact

tsc_unstable is declared twice.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
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 agom32r: Fix ei_tx_timeout() in drivers/net/lib8390.c
Hirokazu Takata [Thu, 26 Jul 2007 17:41:19 +0000 (10:41 -0700)]
m32r: Fix ei_tx_timeout() in drivers/net/lib8390.c

Change INT0 trigger mode from edge-sense mode to level-sense mode,
in order to fix the following timeout error:
  'NETDEV WATCHDOG: eth0: transmit timed out'.

This patch is required only for the Mappi platform.

Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Cc: Hitoshi Yamamoto <hitoshiy@linux-m32r.org>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoAllow nodes to exist that only contain ZONE_MOVABLE
Mel Gorman [Thu, 26 Jul 2007 17:41:18 +0000 (10:41 -0700)]
Allow nodes to exist that only contain ZONE_MOVABLE

With the introduction of kernelcore=, a configurable zone is created on
request.  In some cases, this value will be small enough that some nodes
contain only ZONE_MOVABLE.  On some NUMA configurations when this occurs,
arch-independent zone-sizing will get the size of the memory holes within
the node incorrect.  The value of present_pages goes negative and the boot
fails.

This patch fixes the bug in the calculation of the size of the hole.  The
test case is to boot test a NUMA machine with a low value of kernelcore=
before and after the patch is applied.  While this bug exists in early
kernel it cannot be triggered in practice.

This patch has been boot-tested on a variety machines with and without
kernelcore= set.

Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoChar: cyclades, select FW_LOADER
Jiri Slaby [Thu, 26 Jul 2007 17:41:17 +0000 (10:41 -0700)]
Char: cyclades, select FW_LOADER

Fix link errors below by selecting FW_LOADER
  LD      .tmp_vmlinux1
drivers/built-in.o: In function `cyz_load_fw':
drivers/char/cyclades.c:4908: undefined reference to `request_firmware'
drivers/char/cyclades.c:4979: undefined reference to `release_firmware'

Cc: <toralf.foerster@gmx.de>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agox86_64: fix section mismatch warnings in tce
Sam Ravnborg [Thu, 26 Jul 2007 17:41:16 +0000 (10:41 -0700)]
x86_64: fix section mismatch warnings in tce

Fix the following two section mismatch warnings:

WARNING: vmlinux.o(.text+0x1ce84): Section mismatch: reference to .init.text:free_bootmem (between 'free_tce_table' and 'build_tce_table')
WARNING: vmlinux.o(.text+0x1d04d): Section mismatch: reference to .init.text:__alloc_bootmem_low (between 'alloc_tce_table' and 'kretprobe_trampoline_holder')

In both cases the functions was used only from __init
context so mark them __init.

Signed-off-by: Sam Ravnborg <sam@ravnborg.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 agodrivers/edac: fix pasemi kconfig depends
Doug Thompson [Thu, 26 Jul 2007 17:41:16 +0000 (10:41 -0700)]
drivers/edac: fix pasemi kconfig depends

Fixed 'depends on PPC_PASEMI' in EDAC Kconfig.  Module PASEMI depends ONLY on
the PASEMI on PPC.

Was previously enabled for ALL PPC

Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Egor N. Martovetsky <egor@pasemi.com>
Signed-off-by: Doug Thompson <dougthompson@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoinclude/asm-:mips add missing edac h file
Doug Thompson [Thu, 26 Jul 2007 17:41:15 +0000 (10:41 -0700)]
include/asm-:mips add missing edac h file

EDAC has a foundation to perform software memory scrubbing, but it requires a
per architecture (atomic_scrub) function for performing an atomic update
operation.  Under X86, this is done with a

lock:  add  [addr],0

in the file asm-x86/edac.h

This patch provides the MIPS arch with that atomic function, atomic_scrub() in

asm-mips/edac.h

Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Doug Thompson <dougthompson@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agodrivers/edac: fix edac_pci sysfs
Doug Thompson [Thu, 26 Jul 2007 17:41:15 +0000 (10:41 -0700)]
drivers/edac: fix edac_pci sysfs

This patch fixes sysfs exit code for the EDAC PCI device in a similiar manner
and the previous fixes for EDAC_MC and EDAC_DEVICE.

It removes the old (and incorrect) completion model and uses reference counts
on per instance kobjects and on the edac core module.

This pattern was applied to the edac_mc and edac_device code, but the EDAC PCI
code was missed.  In addition, this fixes a system hang after a low level
driver was unloaded.  (A cleanup function was called twice, which really
screwed things up)

Cc: Greg KH <greg@kroah.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Doug Thompson <dougthompson@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agodrivers/edac: fix reset edac_mc pollmsec
Doug Thompson [Thu, 26 Jul 2007 17:41:14 +0000 (10:41 -0700)]
drivers/edac: fix reset edac_mc pollmsec

This fixes a deadlock that could occur on a 'setup' and 'teardown' sequence of
the workq for a edac_mc control structure instance.  A similiar fix was
previously implemented for the edac_device code.

In addition, the edac_mc device code there was missing code to allow the workq
period valu to be altered via sysfs control.

This patch adds that fix on the code, and allows for the changing of the
period value as well.

Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Doug Thompson <dougthompson@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agofix 'dynreloc miscount' link error on Powerpc
Sam Ravnborg [Thu, 26 Jul 2007 17:41:13 +0000 (10:41 -0700)]
fix 'dynreloc miscount' link error on Powerpc

Nathan Lynch <ntl@pobox.com> reported:
2.6.23-rc1 breaks the build for 64-bit powerpc for me (using
maple_defconfig):

  LD      vmlinux.o
powerpc64-unknown-linux-gnu-ld: dynreloc miscount for
kernel/built-in.o, section .opd
powerpc64-unknown-linux-gnu-ld: can not edit opd Bad value
make: *** [vmlinux.o] Error 1

However, I see a possibly related binutils patch:
http://article.gmane.org/gmane.comp.gnu.binutils/33650

It was tracked down to be caused by the weak prototype
declaration in mm.h:
__attribute__((weak)) const char *arch_vma_name(struct vm_area_struct *vma);

But there is no need to make the declaration weak - only the definition
needs to be marked weak.  So drop the weak declaration.  And in the process
drop the duplicate definition in page.h for powerpc.

Note: the arch_vma_name fix for x86_64 needs to be applied first to avoid
breaking x86_64

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Nathan Lynch <ntl@pobox.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agox86_64: fix arch_vma_name
Roland McGrath [Thu, 26 Jul 2007 17:41:12 +0000 (10:41 -0700)]
x86_64: fix arch_vma_name

The function arch_vma_name() is declared weak and thus it was
not noticed that x86_64 had two almost identical implementations.

It was introduced in syscall32.c by: c633090e3105e779c97d4978e5e3d7d66b291cfb
It was introduced in mm/init.c by: 2aae950b21e4bc789d1fc6668faf67e8748300b7

Signed-off-by: Roland McGrath <roland@redhat.com>
Acked-by: Sam Ravnborg <sam@ravnborg.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 agochipsfb: use correct pm state
Rafael J. Wysocki [Thu, 26 Jul 2007 17:41:12 +0000 (10:41 -0700)]
chipsfb: use correct pm state

chipsfb.c shouldn't use PM_SUSPEND_MEM in there, but PM_EVENT_SUSPEND.

Cc: Cedric Le Goater <clg@fr.ibm.com>
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 agofix inode_table test in ext234_check_descriptors
Eric Sandeen [Thu, 26 Jul 2007 17:41:11 +0000 (10:41 -0700)]
fix inode_table test in ext234_check_descriptors

ext[234]_check_descriptors sanity checks block group descriptor geometry at
mount time, testing whether the block bitmap, inode bitmap, and inode table
reside wholly within the blockgroup.  However, the inode table test is off
by one so that if the last block in the inode table resides on the last
block of the block group, the test incorrectly fails.  This is because it
tests the last block as (start + length) rather than (start + length - 1).

This can be seen by trying to mount a filesystem made such as:

 mkfs.ext2 -F -b 1024 -m 0 -g 256 -N 3744 fsfile 1024

which yields:

 EXT2-fs error (device loop0): ext2_check_descriptors: Inode table for group 0 not in group (block 101)!
 EXT2-fs: group descriptors corrupted!

There is a similar bug in e2fsprogs, patch already sent for that.

(I wonder if inside(), outside(), and/or in_range() should someday be
used in this and other tests throughout the ext filesystems...)

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoxenbus_xs.c: fix a use-after-free
Adrian Bunk [Thu, 26 Jul 2007 17:41:10 +0000 (10:41 -0700)]
xenbus_xs.c: fix a use-after-free

This patch fixes an obvious use-after-free spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoedac is bust on mips
Andrew Morton [Thu, 26 Jul 2007 17:41:10 +0000 (10:41 -0700)]
edac is bust on mips

drivers/edac/edac_stub.c:15:22: asm/edac.h: No such file or directory

was it even supposed to work?

Cc: Douglas Thompson <dougthompson@xmission.com>
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 agoi2c: ds1682 warning fix
Andrew Morton [Thu, 26 Jul 2007 17:41:09 +0000 (10:41 -0700)]
i2c: ds1682 warning fix

ia64:

drivers/i2c/chips/ds1682.c: In function `ds1682_show':
drivers/i2c/chips/ds1682.c:78: warning: long long unsigned int format, long unsigned int arg (arg 3)
drivers/i2c/chips/ds1682.c:78: warning: long long unsigned int format, long unsigned int arg (arg 3)

Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoReorder RTC Makefile
Alessandro Zummo [Thu, 26 Jul 2007 17:41:08 +0000 (10:41 -0700)]
Reorder RTC Makefile

Alphabetic reordering of the drivers in the rtc subsys makefile.

(akpm: merge this asap!  Makefiles are the source of many patch conflicts..)

Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agomemory unplug: isolate_lru_page fix
KAMEZAWA Hiroyuki [Thu, 26 Jul 2007 17:41:08 +0000 (10:41 -0700)]
memory unplug: isolate_lru_page fix

release_pages() in mm/swap.c changes page_count() to be 0 without removing
PageLRU flag...

This means isolate_lru_page() can see a page, PageLRU() &&
page_count(page)==0..  This is BUG.  (get_page() will be called against
count=0 page.)

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agomemory unplug: migration by kernel
KAMEZAWA Hiroyuki [Thu, 26 Jul 2007 17:41:07 +0000 (10:41 -0700)]
memory unplug: migration by kernel

In usual, migrate_pages(page,,) is called with holding mm->sem by system call.
(mm here is a mm_struct which maps the migration target page.)
This semaphore helps avoiding some race conditions.

But, if we want to migrate a page by some kernel codes, we have to avoid
some races. This patch adds check code for following race condition.

1. A page which page->mapping==NULL can be target of migration. Then, we have
   to check page->mapping before calling try_to_unmap().

2. anon_vma can be freed while page is unmapped, but page->mapping remains as
   it was. We drop page->mapcount to be 0. Then we cannot trust page->mapping.
   So, use rcu_read_lock() to prevent anon_vma pointed by page->mapping from
   being freed during migration.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agomake timerfd return a u64 and fix the __put_user
Davide Libenzi [Thu, 26 Jul 2007 17:41:07 +0000 (10:41 -0700)]
make timerfd return a u64 and fix the __put_user

Davi fixed a missing cast in the __put_user(), that was making timerfd
return a single byte instead of the full value.

Talking with Michael about the timerfd man page, we think it'd be better to
use a u64 for the returned value, to align it with the eventfd
implementation.

This is an ABI change.  The timerfd code is new in 2.6.22 and if we merge this
into 2.6.23 then we should also merge it into 2.6.22.x.  That will leave a few
early 2.6.22 kernels out in the wild which might misbehave when a future
timerfd-enabled glibc is run on them.

mtk says: The difference would be that read() will only return 4 bytes, while
the application will expect 8.  If the application is checking the size of
returned value, as it should, then it will be able to detect the problem (it
could even be sophisticated enough to know that if this is a 4-byte return,
then it is running on an old 2.6.22 kernel).  If the application is not
checking the return from read(), then its 8-byte buffer will not be filled --
the contents of the last 4 bytes will be undefined, so the u64 value as a
whole will be junk.

Signed-off-by: Davide Libenzi <davidel@xmailserver.org>
Cc: Michael Kerrisk <mtk-manpages@gmx.net>
Cc: Davi Arnaut <davi@haxent.com.br>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoX86_POWERNOW_K8_ACPI must depend on ACPI
Adrian Bunk [Thu, 26 Jul 2007 17:41:05 +0000 (10:41 -0700)]
X86_POWERNOW_K8_ACPI must depend on ACPI

This patch fixes the following compile error introduced by
commit e8666b2718fdb5bf0ea7c3126f7e292bbbf2946b and reported
by Alexey Dobriyan:

<--  snip  -->

   CC      arch/i386/kernel/acpi/cstate.o
In file included from arch/i386/kernel/acpi/cstate.c:17:
include/acpi/processor.h:88: error: expected specifier-qualifier-list before 'acpi_integer'

<--  snip  -->

If you select something you must ensure that the dependencies of what
you are selecting are fulfilled.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Alexey Dobriyan <adobriyan@sw.ru>
Cc: Joshua Hoblitt <jhoblitt@ifa.hawaii.edu>
Cc: Dave Jones <davej@redhat.com>
Cc: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Cc: Len Brown <lenb@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agolguest: documentation VII: FIXMEs
Rusty Russell [Thu, 26 Jul 2007 17:41:05 +0000 (10:41 -0700)]
lguest: documentation VII: FIXMEs

Documentation: The FIXMEs

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agolguest: documentation VI: Switcher
Rusty Russell [Thu, 26 Jul 2007 17:41:04 +0000 (10:41 -0700)]
lguest: documentation VI: Switcher

Documentation: The Switcher

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agolguest: documentation V: Host
Rusty Russell [Thu, 26 Jul 2007 17:41:04 +0000 (10:41 -0700)]
lguest: documentation V: Host

Documentation: The Host

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agolguest: documentation IV: Launcher
Rusty Russell [Thu, 26 Jul 2007 17:41:03 +0000 (10:41 -0700)]
lguest: documentation IV: Launcher

Documentation: The Launcher

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agolguest: documentation III: Drivers
Rusty Russell [Thu, 26 Jul 2007 17:41:03 +0000 (10:41 -0700)]
lguest: documentation III: Drivers

Documentation: The Drivers

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agolguest: documentation II: Guest
Rusty Russell [Thu, 26 Jul 2007 17:41:02 +0000 (10:41 -0700)]
lguest: documentation II: Guest

Documentation: The Guest

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agolguest: documentation I: Preparation
Rusty Russell [Thu, 26 Jul 2007 17:41:02 +0000 (10:41 -0700)]
lguest: documentation I: Preparation

The netfilter code had very good documentation: the Netfilter Hacking HOWTO.
Noone ever read it.

So this time I'm trying something different, using a bit of Knuthiness.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoxen: xen/page.h compile fix
Jeremy Fitzhardinge [Thu, 26 Jul 2007 17:41:01 +0000 (10:41 -0700)]
xen: xen/page.h compile fix

Fix:
linux/include/xen/page.h: In function mfn_pte:
linux/include/xen/page.h:149: error: __supported_pte_mask undeclared (first use in this function)
linux/include/xen/page.h:149: error: (Each undeclared identifier is reported only once
linux/include/xen/page.h:149: error: for each function it appears in.)

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agortc-ds1307: typo fix found by coverity
David Brownell [Thu, 26 Jul 2007 17:41:00 +0000 (10:41 -0700)]
rtc-ds1307: typo fix found by coverity

Fix a typo turned up by a Coverity check:  referring to the wrong register,
which could cause problems with DS1338 RTCs whose oscillators halted.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agofixup s3c24xx build after arch moves
Ben Dooks [Thu, 26 Jul 2007 17:40:59 +0000 (10:40 -0700)]
fixup s3c24xx build after arch moves

Fix the include files moved around during the s3c24xx arch moves.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoPM: fix compiler error of PPC dart_iommu
Ryusuke Konishi [Thu, 26 Jul 2007 17:40:59 +0000 (10:40 -0700)]
PM: fix compiler error of PPC dart_iommu

A dummy inline function of register_nosave_region_late was accidentally
removed by the recent PM patch that introduced suspend notifiers.
This elimination causes the following compiler error on PPC machines.

  CC      arch/powerpc/sysdev/dart_iommu.o
arch/powerpc/sysdev/dart_iommu.c: In function 'iommu_init_late_dart':
arch/powerpc/sysdev/dart_iommu.c:376: error: implicit declaration of function
'register_nosave_region_late'
make[1]: *** [arch/powerpc/sysdev/dart_iommu.o] Error 1
make: *** [arch/powerpc/sysdev] Error 2

This patch fixes the problem.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoSlab maintainer & Credits update
Christoph Lameter [Thu, 26 Jul 2007 17:40:56 +0000 (10:40 -0700)]
Slab maintainer & Credits update

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agokernel-doc fix for kmod.c
Randy Dunlap [Thu, 26 Jul 2007 17:40:56 +0000 (10:40 -0700)]
kernel-doc fix for kmod.c

Fix kmod.c:
Warning(linux-2.6.23-rc1//kernel/kmod.c:364): No description found for parameter 'envp'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agotiny signalfd cleanup
Ulrich Drepper [Thu, 26 Jul 2007 17:40:55 +0000 (10:40 -0700)]
tiny signalfd cleanup

This is probably a leftover from a time when the return wasn't there yet.
Now the extra assignment is just irritating.

Signed-off-by: Ulrich Drepper <drepper@redhat.com>
Cc: Davide Libenzi <davidel@xmailserver.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agomore reiserfs endianness annotations
Al Viro [Thu, 26 Jul 2007 16:47:03 +0000 (17:47 +0100)]
more reiserfs endianness annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoarm unaligned.h annotations
Al Viro [Thu, 26 Jul 2007 16:46:19 +0000 (17:46 +0100)]
arm unaligned.h annotations

Have put_unaligned() warn if types would be wrong
for assignment, slap force-casts where needed.  Cast the
result of get_unaligned to typeof(*ptr).  With that in
place we get proper typechecking, both from gcc and from sparse,
including that for bitwise types.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agom68k {in,out}_le{16,32} endianness misannotation
Al Viro [Thu, 26 Jul 2007 16:42:59 +0000 (17:42 +0100)]
m68k {in,out}_le{16,32} endianness misannotation

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoax88796 (address space): cast to unsigned long, not long
Al Viro [Thu, 26 Jul 2007 16:36:29 +0000 (17:36 +0100)]
ax88796 (address space): cast to unsigned long, not long

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoraw1394 __user annotation
Al Viro [Thu, 26 Jul 2007 16:36:19 +0000 (17:36 +0100)]
raw1394 __user annotation

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agodrivers/ misc __iomem annotations
Al Viro [Thu, 26 Jul 2007 16:36:09 +0000 (17:36 +0100)]
drivers/ misc __iomem annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoxfs ioctl __user annotations
Al Viro [Thu, 26 Jul 2007 16:35:59 +0000 (17:35 +0100)]
xfs ioctl __user annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agomake powerpc BUG_ON() OK with pointers and bitwise
Al Viro [Thu, 26 Jul 2007 16:35:49 +0000 (17:35 +0100)]
make powerpc BUG_ON() OK with pointers and bitwise

Since powerpc insists on printing the _value_ of condition
and on casting it to long...  At least let's make it a force-cast.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoamd64: fix get_user() on bitwise
Al Viro [Thu, 26 Jul 2007 16:35:39 +0000 (17:35 +0100)]
amd64: fix get_user() on bitwise

We really need force-cast when converting to final result type;
unsigned long can be silently converted to integer types and
to pointers, but not to bitwise.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agomake __chk_{user,io}_ptr() accept pointers to volatile
Al Viro [Thu, 26 Jul 2007 16:35:29 +0000 (17:35 +0100)]
make __chk_{user,io}_ptr() accept pointers to volatile

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>