linux-2.6-microblaze.git
17 years ago[PATCH] sched: move load-calculation functions
Ingo Molnar [Thu, 2 Aug 2007 15:41:40 +0000 (17:41 +0200)]
[PATCH] sched: move load-calculation functions

move load-calculation functions so that they can use the per-policy
declarations and methods.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years ago[PATCH] sched: ->task_new cleanup
Ingo Molnar [Thu, 2 Aug 2007 15:41:40 +0000 (17:41 +0200)]
[PATCH] sched: ->task_new cleanup

make sched_class.task_new == NULL a 'default method', this
allows the removal of task_rt_new.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years ago[PATCH] sched: uninline inc/dec_nr_running()
Ingo Molnar [Thu, 2 Aug 2007 15:41:40 +0000 (17:41 +0200)]
[PATCH] sched: uninline inc/dec_nr_running()

uninline inc_nr_running() and dec_nr_running():

   text    data     bss     dec     hex filename
   29039    4162      24   33225    81c9 sched.o.before
   29027    4162      24   33213    81bd sched.o.after

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years ago[PATCH] sched: uninline calc_delta_mine()
Ingo Molnar [Thu, 2 Aug 2007 15:41:40 +0000 (17:41 +0200)]
[PATCH] sched: uninline calc_delta_mine()

uninline calc_delta_mine():

   text    data     bss     dec     hex filename
   29162    4162      24   33348    8244 sched.o.before
   29039    4162      24   33225    81c9 sched.o.after

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years ago[PATCH] sched: calc_delta_mine(): use fixed limit
Ingo Molnar [Thu, 2 Aug 2007 15:41:40 +0000 (17:41 +0200)]
[PATCH] sched: calc_delta_mine(): use fixed limit

use fixed limit in calc_delta_mine() - this saves an instruction :)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years ago[PATCH] sched: tidy up left over smpnice code
Peter Williams [Thu, 2 Aug 2007 15:41:40 +0000 (17:41 +0200)]
[PATCH] sched: tidy up left over smpnice code

1. The only place that RTPRIO_TO_LOAD_WEIGHT() is used is in the call to
move_tasks() in the function active_load_balance() and its purpose here
is just to make sure that the load to be moved is big enough to ensure
that exactly one task is moved (if there's one available).  This can be
accomplished by using ULONG_MAX instead and this allows
RTPRIO_TO_LOAD_WEIGHT() to be deleted.

2. This, in turn, allows PRIO_TO_LOAD_WEIGHT() to be deleted.

3. This allows load_weight() to be deleted which allows
TIME_SLICE_NICE_ZERO to be deleted along with the comment above it.

Signed-off-by: Peter Williams <pwil3058@bigpond.net.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years ago[PATCH] sched: remove cache_hot_time
Ingo Molnar [Thu, 2 Aug 2007 15:41:40 +0000 (17:41 +0200)]
[PATCH] sched: remove cache_hot_time

remove the last unused remains of cache_hot_time.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Thu, 2 Aug 2007 03:48:54 +0000 (20:48 -0700)]
Merge branch 'release' of git://git./linux/kernel/git/aegl/linux-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] ITC: Reduce rating for ITC clock if ITCs are drifty
  [IA64] SN2: Fix up sn2_rtc clock
  [IA64] Fix wrong access to irq_desc[] in iosapic_register_intr().
  [IA64] Fix possible race in destroy_and_reserve_irq()
  [IA64] Fix registered interrupt check
  [IA64] Remove a few duplicate includes
  [IA64] Allow smp_call_function_single() to current cpu
  [IA64] fix a few section mismatch warnings

17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6
Linus Torvalds [Thu, 2 Aug 2007 03:48:42 +0000 (20:48 -0700)]
Merge /pub/scm/linux/kernel/git/bart/ide-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6:
  scc_pata: PIO fixes
  piix/slc90e66: fix PIO1 handling in ->speedproc method (take 2)
  jmicron: PIO fixes
  it8213: PIO fixes (take 2)
  cs5535: PIO fixes
  cs5520: fix PIO auto-tuning in ->ide_dma_check method
  drivers/scsi/ide-scsi.c: kmalloc + memset conversion to kzalloc
  drivers/ide/arm/icside.c: kmalloc + memset conversion to kzalloc
  ide: eliminate warnings in ide-tape.c
  ide: fix runtogether printk's in cmd64x IDE driver
  sis5513: Add FSC Amilo A1630 PCI subvendor/dev to laptops
  alim15x3: Correct HP detect
  ide: Fix an overrun found in the CS5535 IDE driver

17 years agoFRV: Enable the MB86943 PCI arbiter correctly
David Howells [Wed, 1 Aug 2007 18:04:51 +0000 (19:04 +0100)]
FRV: Enable the MB86943 PCI arbiter correctly

Enable the MB93090 motherboard's MB86943 PCI arbiter correctly by assigning to
the register rather than comparing against it.  This is required to support
bus mastering.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Thu, 2 Aug 2007 03:47:00 +0000 (20:47 -0700)]
Merge branch 'upstream-linus' of /linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  pata_sis: fix MWDMA for <= UDMA66 chipsets and UDMA for UDMA33 chipsets
  libata: blacklist SAMSUNG HD401LJ / ZZ100-15 for NCQ
  ata_piix: add Tecra M3 to broken suspend blacklist
  ata_piix: implement piix_borken_suspend()
  pci: rename __pci_reenable_device() to pci_reenable_device()
  libata-sff; Unbreak non DMA capable controllers again
  pata_cmd64x: Correct the speed ranges

17 years agogenirq: temporary fix for level-triggered IRQ resend
Thomas Gleixner [Wed, 1 Aug 2007 15:13:19 +0000 (17:13 +0200)]
genirq: temporary fix for level-triggered IRQ resend

Marcin Slusarz reported a ne2k-pci "hung network interface" regression.

delayed disable relies on the ability to re-trigger the interrupt in the
case that a real interrupt happens after the software disable was set.
In this case we actually disable the interrupt on the hardware level
_after_ it occurred.

On enable_irq, we need to re-trigger the interrupt. On i386 this relies
on a hardware resend mechanism (send_IPI_self()).

Actually we only need the resend for edge type interrupts. Level type
interrupts come back once enable_irq() re-enables the interrupt line.

I assume that the interrupt in question is level triggered because it is
shared and above the legacy irqs 0-15:

17:         12   IO-APIC-fasteoi   eth1, eth0

Looking into the IO_APIC code, the resend via send_IPI_self() happens
unconditionally. So the resend is done for level and edge interrupts.
This makes the problem more mysterious.

The code in question lib8390.c does

disable_irq();
fiddle_with_the_network_card_hardware()
enable_irq();

The fiddle_with_the_network_card_hardware() might cause interrupts,
which are cleared in the same code path again,

Marcin found that when he disables the irq line on the hardware level
(removing the delayed disable) the card is kept alive.

So the difference is that we can get a resend on enable_irq, when an
interrupt happens during the time, where we are in the disabled region.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoFix WARN_ON() on bitfield ops for all other archs
Heiko Carstens [Wed, 1 Aug 2007 22:18:38 +0000 (00:18 +0200)]
Fix WARN_ON() on bitfield ops for all other archs

Fixes WARN_ON() on bitfiels ops for all architectures that have
been left out in 8d4fbcfbe0a4bfc73e7f0297c59ae514e1f1436f.

Cc: Alexey Dobriyan <adobriyan@sw.ru>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Matthew Wilcox <matthew@wil.cx>
Cc: Kyle McMartin <kyle@parisc-linux.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoscc_pata: PIO fixes
Bartlomiej Zolnierkiewicz [Wed, 1 Aug 2007 21:46:46 +0000 (23:46 +0200)]
scc_pata: PIO fixes

* Use pio == 255 == "auto-tune" in scc_config_drive_for_dma() instead of
  forcing PIO4 on PIO fallback.  Fix comment while at it.

* Rename scc_tuneproc() to scc_tune_pio() and add scc_tuneproc() wrapper.
  Move finding of the best PIO mode and setting of transfer mode on the device
  to the new wrapper.

* Fix scc_tune_chipset() to tune PIO modes.  Do a small cleanup while at it.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agopiix/slc90e66: fix PIO1 handling in ->speedproc method (take 2)
Bartlomiej Zolnierkiewicz [Wed, 1 Aug 2007 21:46:46 +0000 (23:46 +0200)]
piix/slc90e66: fix PIO1 handling in ->speedproc method (take 2)

* Don't call {piix,slc90e66}_dma_2_pio() for PIO modes in
  {piix,slc90e66}_tune_chipset().

* Add PIO1 handling to {piix,slc90e66}_tune_chipset().

* Bump driver version.

v2:
* Remove PIO modes from {piix,slc90e66}_dma_2_pio(), they are no longer needed
  there (Noticed by Sergei)

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agojmicron: PIO fixes
Bartlomiej Zolnierkiewicz [Wed, 1 Aug 2007 21:46:46 +0000 (23:46 +0200)]
jmicron: PIO fixes

* Set transfer mode on the device in jmicron_tuneproc(),
  also add pio == 255 == "auto-tune" handling.

* Use jmicron_tuneproc() in jmicron_config_drive_for_dma().

* Remove no longer needed config_jmicron_chipset_for_pio().

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoit8213: PIO fixes (take 2)
Bartlomiej Zolnierkiewicz [Wed, 1 Aug 2007 21:46:46 +0000 (23:46 +0200)]
it8213: PIO fixes (take 2)

* Rename it8213_tuneproc() to it8213_tune_pio() and add it8213_tuneproc()
  wrapper.  Move finding of the best PIO mode to the new wrapper.

* Add setting of transfer mode on the device to it8213_tuneproc().

* Don't call it8213_dma_2_pio() for PIO modes in it8213_tune_chipset().

* Use it8213_tuneproc() in it8213_config_drive_for_dma().

v2:
* Remove PIO modes from it8213_dma_2_pio(), they are no longer needed there
  (Noticed by Sergei)

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agocs5535: PIO fixes
Bartlomiej Zolnierkiewicz [Wed, 1 Aug 2007 21:46:45 +0000 (23:46 +0200)]
cs5535: PIO fixes

* Fix cs5535_tuneproc() to pass PIO transfer mode value instead of PIO mode
  number to cs5535_set_speed() (fixes random PIO timings being programmed
  and a possible OOPS).  Do a little cleanup while at it.

* Fix cs5535_set_speed() to check if the mate device is present (fixes PIO0
  taskfile timings being used if there is no other device on the cable).

* Use cs5535_tuneproc() in cs5535_dma_check().  The old code had the same
  issue as cs5535_tuneproc() and add additionally caused 0x00-0x04 transfer
  mode values (== default PIO, default PIO w/ IORDY + two invalid values)
  being set on the device instead of values 0x08-0x0c (XFER_PIO_[0,4]).

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agocs5520: fix PIO auto-tuning in ->ide_dma_check method
Bartlomiej Zolnierkiewicz [Wed, 1 Aug 2007 21:46:45 +0000 (23:46 +0200)]
cs5520: fix PIO auto-tuning in ->ide_dma_check method

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agodrivers/scsi/ide-scsi.c: kmalloc + memset conversion to kzalloc
Mariusz Kozlowski [Wed, 1 Aug 2007 21:46:45 +0000 (23:46 +0200)]
drivers/scsi/ide-scsi.c: kmalloc + memset conversion to kzalloc

 drivers/scsi/ide-scsi.c | 34642 -> 34536 (-106 bytes)
 drivers/scsi/ide-scsi.o | 171728 -> 171524 (-204 bytes)

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agodrivers/ide/arm/icside.c: kmalloc + memset conversion to kzalloc
Mariusz Kozlowski [Wed, 1 Aug 2007 21:46:44 +0000 (23:46 +0200)]
drivers/ide/arm/icside.c: kmalloc + memset conversion to kzalloc

Is this a bug? In original verison memset cleared sizeof(state) bytes
instead of sizeof(*state). If it was intentional then this patch is invalid.
If not intentional -> valid :) Please review.

Bart: Yes, it is a bug so this patch is a valid bugfix. :-)

 drivers/ide/arm/icside.c | 18883 -> 18849 (-34 bytes)

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: eliminate warnings in ide-tape.c
Stephen Rothwell [Wed, 1 Aug 2007 21:46:44 +0000 (23:46 +0200)]
ide: eliminate warnings in ide-tape.c

drivers/ide/ide-tape.c: In function '__idetape_kmalloc_stage':
drivers/ide/ide-tape.c:2588: warning: large integer implicitly truncated to unsigned type
drivers/ide/ide-tape.c:2616: warning: large integer implicitly truncated to unsigned type

b_size in struct idetape_bh is an unsigned short.  We sometimes assigne
PAGE_SIZE to it and PAGE_SIZE can be 64K or larger, so make it a u32.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: fix runtogether printk's in cmd64x IDE driver
Meelis Roos [Wed, 1 Aug 2007 21:46:44 +0000 (23:46 +0200)]
ide: fix runtogether printk's in cmd64x IDE driver

Fix a couple of runtogether printks in cmd64x.c IDE driver by adding
proper newlines.

Signed-off-by: Meelis Roos <mroos@linux.ee>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agosis5513: Add FSC Amilo A1630 PCI subvendor/dev to laptops
David Lamparter [Wed, 1 Aug 2007 21:46:44 +0000 (23:46 +0200)]
sis5513: Add FSC Amilo A1630 PCI subvendor/dev to laptops

Recognise the FSC Amilo A1630's incarnation of a SiS5513 chip as laptop to
get UDMA100 support.

Signed-off-by: David Lamparter <equinox@diac24.net>
Cc: Lionel Bouton <Lionel.Bouton@inet6.fr>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoalim15x3: Correct HP detect
Bartlomiej Zolnierkiewicz [Wed, 1 Aug 2007 21:46:43 +0000 (23:46 +0200)]
alim15x3: Correct HP detect

Direct port of Alan's fix for pata_ali.

Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: Fix an overrun found in the CS5535 IDE driver
Jordan Crouse [Wed, 1 Aug 2007 21:46:42 +0000 (23:46 +0200)]
ide: Fix an overrun found in the CS5535 IDE driver

As found by the Coverity checker, and reported by Adrian Bunk, this
fixes a overrun error in the CS5535 IDE driver.  Somebody got a little
excited with the if() statement - the CS5535 only supports UDMA 0-4.

Bart:
Not a bug per se since the upper layer will never feed this function
with speed > XFER_UDMA_4 (thanks to ->ultra_mask being set to 0x1f).

Worth fixing anyway.

Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Cc: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years ago[IA64] ITC: Reduce rating for ITC clock if ITCs are drifty
Christoph Lameter [Wed, 1 Aug 2007 20:49:45 +0000 (13:49 -0700)]
[IA64] ITC: Reduce rating for ITC clock if ITCs are drifty

Make sure to reduce the rating of the ITC clock if ITCs are drifty. If they
are drifting then we have not synchronized the ITC values, nor are we doing
the jitter compensation (useless since drift may increase the differentials
arbitrarily).

Without this patch it is possible that the ITC clock becomes selected as
the system clock on systems with drifty ITCs which will result in
nanosleep hanging.

One can still select the itc clock manually on such systems via

clocksource=itc

(Produces nice hangs on SGI Altix.)

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] SN2: Fix up sn2_rtc clock
Christoph Lameter [Wed, 1 Aug 2007 19:37:17 +0000 (12:37 -0700)]
[IA64] SN2: Fix up sn2_rtc clock

If the sn2_rtc clock is present then it is a must have since sn2_rtc
provides a synchronized time source on Altix systems. So elevate
the priority to 450. Otherwise the ITC would take precendence. Altix
systems currently do not boot because the ITC clocksource is broken. It
seems to assume that ITCs are synchronized and as a result nanosleep
hangs (may be fixed in a different patch).

While we are at it: Remove the sn2_mc definition. The sn2_rtc has a fixed
address. No point in reading the address from memory. Removing it avoids
touching one cacheline.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] Fix wrong access to irq_desc[] in iosapic_register_intr().
Kenji Kaneshige [Wed, 1 Aug 2007 12:18:44 +0000 (21:18 +0900)]
[IA64] Fix wrong access to irq_desc[] in iosapic_register_intr().

In error path we must unlock irq_desc[irq].lock before we change
'irq'.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years agopata_sis: fix MWDMA for <= UDMA66 chipsets and UDMA for UDMA33 chipsets
Bartlomiej Zolnierkiewicz [Tue, 31 Jul 2007 20:02:41 +0000 (22:02 +0200)]
pata_sis: fix MWDMA for <= UDMA66 chipsets and UDMA for UDMA33 chipsets

* Fix MWDMA timings setup in sis_old_set_dmamode() and sis_66_set_dmamode().

  The old timings were overclocked (even worse behavior than sis5513 IDE driver
  which depends on BIOS to program correct timings), the new timings are taken
  from the datasheet (they match timings from ATA spec).

* Fix UDMA timings setup in sis_old_set_dmamode().

  Misplaced pci_write_config_word() call resulted in UDMA timings never
  being set.

* Fix comments for sis_133_early_set_dmamode() and sis_133_set_dmamode():
  - only the former function handles early SiS 961 bridges
  - both functions lack MWDMA timings setup

* Fix typos in sis_100_set_piomode() and sis_133_set_piomode() comments.

* Bump driver version.

Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: blacklist SAMSUNG HD401LJ / ZZ100-15 for NCQ
Tejun Heo [Sat, 28 Jul 2007 07:25:25 +0000 (16:25 +0900)]
libata: blacklist SAMSUNG HD401LJ / ZZ100-15 for NCQ

SAMSUNG HD401LJ / ZZ100-15 does spurious completion of NCQ commands.
Disable NCQ.  Reported by Ulrich in bugzilla #8805.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Ulrich <stellplatz-nr.13a@datenparkplatz.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoata_piix: add Tecra M3 to broken suspend blacklist
Tejun Heo [Fri, 27 Jul 2007 05:55:07 +0000 (14:55 +0900)]
ata_piix: add Tecra M3 to broken suspend blacklist

Add Tecra M3 to the broken suspend blacklist.  Tecra M3 doesn't have
proper DMI_PRODUCT_NAME but has an OEM_STRING instead.  Match it.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoata_piix: implement piix_borken_suspend()
Tejun Heo [Fri, 27 Jul 2007 05:53:28 +0000 (14:53 +0900)]
ata_piix: implement piix_borken_suspend()

Separate out broken suspend blacklist matching into
piix_broken_suspend().

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agopci: rename __pci_reenable_device() to pci_reenable_device()
Tejun Heo [Fri, 27 Jul 2007 05:43:35 +0000 (14:43 +0900)]
pci: rename __pci_reenable_device() to pci_reenable_device()

Rename __pci_reenable_device() to pci_reenable_device().

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata-sff; Unbreak non DMA capable controllers again
Alan Cox [Thu, 26 Jul 2007 17:41:30 +0000 (18:41 +0100)]
libata-sff; Unbreak non DMA capable controllers again

Seems nobody else is checking/testing this case as it keeps getting
horked.

If we have no BAR4 mapping on an SFF controller this is *NOT* an error,
it just means it isn't doing BMDMA.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agopata_cmd64x: Correct the speed ranges
Alan Cox [Thu, 26 Jul 2007 17:43:01 +0000 (18:43 +0100)]
pata_cmd64x: Correct the speed ranges

I must have been half asleep when doing the original code

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoFix WARN_ON() on bitfield ops
Linus Torvalds [Wed, 1 Aug 2007 04:12:07 +0000 (21:12 -0700)]
Fix WARN_ON() on bitfield ops

Alexey Dobriyan noticed that the new WARN_ON() semantics that were
introduced by commit 684f978347deb42d180373ac4c427f82ef963171 (to also
return the value to be warned on) didn't compile when given a bitfield,
because the typeof doesn't work for bitfields.

So instead of the typeof trick, use an "int" variable together with a
"!!(x)" expression, as suggested by Al Viro.

To make matters more interesting, Paul Mackerras points out that that is
sub-optimal on Power, but the old asm-coded comparison seems to be buggy
anyway on 32-bit Power if the conditional was 64-bit, so I think there
are more problems there.

Regardless, the new WARN_ON() semantics may have been a bad idea.  But
this at least avoids the more serious complications.

Cc: Alexey Dobriyan <adobriyan@sw.ru>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Al Viro <viro@ftp.linux.org.uk>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
Linus Torvalds [Wed, 1 Aug 2007 03:43:52 +0000 (20:43 -0700)]
Merge git://git./linux/kernel/git/wim/linux-2.6-watchdog

* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog: (28 commits)
  [WATCHDOG] Fix pcwd_init_module crash
  [WATCHDOG] ICH9 support for iTCO_wdt
  [WATCHDOG] 631xESB/632xESB support for iTCO_wdt - add all LPC bridges
  [WATCHDOG] 631xESB/632xESB support for iTCO_wdt
  [WATCHDOG] omap_wdt.c - default error for IOCTL is -ENOTTY
  [WATCHDOG] Return value of nonseekable_open
  [WATCHDOG] mv64x60_wdt: Rework the timeout register manipulation
  [WATCHDOG] mv64x60_wdt: disable watchdog timer when driver is probed
  [WATCHDOG] mv64x60_wdt: Support the WDIOF_MAGICCLOSE feature
  [WATCHDOG] mv64x60_wdt: Add a module parameter to change nowayout setting
  [WATCHDOG] mv64x60_wdt: Add WDIOC_SETOPTIONS ioctl support
  [WATCHDOG] mv64x60_wdt: Support for WDIOC_SETTIMEOUT ioctl
  [WATCHDOG] mv64x60_wdt: Fix WDIOC_GETTIMEOUT return value
  [WATCHDOG] mv64x60_wdt: Check return value of nonseekable_open
  [WATCHDOG] mv64x60_wdt: Add arch/powerpc platform support
  [WATCHDOG] mv64x60_wdt: Get register address from platform data
  [WATCHDOG] mv64x60_wdt: set up platform_device in platform code
  [WATCHDOG] ensure mouse and keyboard ignored in w83627hf_wdt
  [WATCHDOG] s3c2410_wdt: fixup after arch include moves
  [WATCHDOG] git-watchdog-typo
  ...

17 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Wed, 1 Aug 2007 03:41:53 +0000 (20:41 -0700)]
Merge branch 'upstream' of git://ftp.linux-mips.org/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (50 commits)
  [MIPS] Add smp_call_function_single()
  [MIPS] thread_info.h: kmalloc + memset conversion to kzalloc
  [MIPS] Kexec: Fix several 64-bit bugs.
  [MIPS] Kexec: Fix several warnings.
  [MIPS] DDB5477: Remove support
  [MIPS] Fulong: Remove unneeded header file
  [MIPS] Cobalt: Enable UART on RaQ1
  [MIPS] Remove unused GROUP_TOSHIBA_NAMES
  [MIPS] remove some duplicate includes
  [MIPS] Oprofile: Fix rm9000 performance counter handler
  [MIPS] Use -Werror on subdirectories which build cleanly.
  [MIPS] Yosemite: Fix warning.
  [MIPS] PMON: Fix cpustart declaration.
  [MIPS] Yosemite: Only build ll_ht_smp_irq_handler() if HYPERTRANSPORT.
  [MIPS] Yosemite: Fix build error due to undeclared titan_mailbox_irq().
  [MIPS] Yosemite: Don't declare titan_mailbox_irq() as asmlinkage.
  [MIPS] Yosemite: Fix warnings in i2c-yoesmite by deleting the unused code.
  [MIPS] Delete unused arch/mips/gt64120/common/
  [MIPS] Fix build warning in unaligned load/store emulator.
  [MIPS] IP32: Don't ignore request_irq's return value.
  ...

17 years agoMerge branch 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6
Linus Torvalds [Wed, 1 Aug 2007 03:40:50 +0000 (20:40 -0700)]
Merge branch 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6

* 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6:
  hwmon: fscher read control bugfix
  hwmon: (adm1031) Fix broken links in documentation
  hwmon: make abituguru3_read_increment_offset() static
  hwmon: Fix regression caused by typo in lm90.c
  hwmon: (applesmc) add temperature sensors set for Macbook
  hwmon: fscher control update bugfix
  hwmon: fix dme1737 temp fault attribute
  hwmon: Add missing __devexit tags in various drivers
  hwmon: clean up duplicate includes
  hwmon: fix lm78 detection regression
  hwmon: fix array overruns in lm93.c
  hwmon: add support for THMC50 and ADM1022

17 years agoACPI: delete CONFIG_ACPI_PROCFS_SLEEP (again)
Len Brown [Wed, 1 Aug 2007 03:27:10 +0000 (23:27 -0400)]
ACPI: delete CONFIG_ACPI_PROCFS_SLEEP (again)

CONFIG_ACPI_PROCFS_SLEEP is a NO-OP -- delete it (again).

Apparently 296699de6bdc717189a331ab6bbe90e05c94db06 creating CONFIG_SUSPEND
and CONFIG_PM_SLEEP was based on an out-dated version of drivers/acpi/Kconfig,
as it erroneously restored this recently deleted config option.

Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoFix up "remove the arm26 port"
Andrew Morton [Tue, 31 Jul 2007 23:10:46 +0000 (16:10 -0700)]
Fix up "remove the arm26 port"

scripts/kconfig/conf -o arch/arm/Kconfig
arch/arm/Kconfig:994: can't open file "drivers/acorn/block/Kconfig"

Cc: Adrian Bunk <bunk@stusta.de>
Cc: Ian Molton <spyro@f2s.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
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/hpa/linux...
Linus Torvalds [Tue, 31 Jul 2007 22:51:37 +0000 (15:51 -0700)]
Merge branch 'for-linus' of git://git./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] EDD: Fix the computation of the MBR sector buffer
  [x86 setup] Newline after setup signature failure message
  x86 boot code comments typos

17 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Tue, 31 Jul 2007 22:51:00 +0000 (15:51 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (41 commits)
  [RTNETLINK]: Fix warning for !CONFIG_KMOD
  [IPV4] ip_options.c: kmalloc + memset conversion to kzalloc
  [DECNET]: kmalloc + memset conversion to kzalloc
  [NET]: ethtool_perm_addr only has one implementation
  [NET]: ethtool ops are the only way
  [PPPOE]: Improve hashing function in hash_item().
  [XFRM]: State selection update to use inner addresses.
  [IPSEC]: Ensure that state inner family is set
  [TCP]: Bidir flow must not disregard SACK blocks for lost marking
  [TCP]: Fix ratehalving with bidirectional flows
  [PPPOL2TP]: Add CONFIG_INET Kconfig dependency.
  [NET]: Page offsets and lengths need to be __u32.
  [AF_UNIX]: Make code static.
  [NETFILTER]: Make nf_ct_ipv6_skip_exthdr() static.
  [PKTGEN]: make get_ipsec_sa() static and non-inline
  [PPPoE]: move lock_sock() in pppoe_sendmsg() to the right location
  [PPPoX/E]: return ENOTTY on unknown ioctl requests
  [IPV6]: ipv6_addr_type() doesn't know about RFC4193 addresses.
  [NET]: Fix prio_tune() handling of root qdisc.
  [NET]: Fix sch_api to properly set sch->parent on the root.
  ...

17 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Tue, 31 Jul 2007 22:50:35 +0000 (15:50 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/sparc-2.6

* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [BBC_I2C]: kmalloc + memset conversion to kzalloc
  [BBC_ENVCTRL]: kmalloc + memset conversion to kzalloc
  [SPARC]: Fix exec failures on sun4c.
  [SPARC] Videopix Frame Grabber: Fix unreleased lock in vfc_debug()
  [SPARC64]: Add missing dma_get_cache_alignment().
  [SUNLANCE]: Fix sparc32 crashes by using of_*() interfaces.

17 years agortc-m48t59 driver NO_IRQ mode fixup
Mark Zhan [Tue, 31 Jul 2007 07:39:47 +0000 (00:39 -0700)]
rtc-m48t59 driver NO_IRQ mode fixup

Since irq in m48t59_private struct is defined as 'unsigned int', which will
make the following if sentence to be never true:

         if (m48t59->irq < 0)
                  m48t59->irq = NO_IRQ;

And thus it will make the m48t59_rtc_probe() is failed when the driver is
working in a no irq mode:

Signed-off-by: Mark Zhan <rongkai.zhan@windriver.com>
Acked-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 agoUse menuconfig objects: RTC
Jan Engelhardt [Tue, 31 Jul 2007 07:39:46 +0000 (00:39 -0700)]
Use menuconfig objects: RTC

Change Kconfig objects from "menu, config" into "menuconfig" so that the
user can disable the whole feature without having to enter the menu first.

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Cc: David Brownell <david-b@pacbell.net>
Cc: 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 agoRemove 'isdn_* is defined but unused' warnings
Charlie Shepherd [Tue, 31 Jul 2007 07:39:45 +0000 (00:39 -0700)]
Remove 'isdn_* is defined but unused' warnings

Move the #ifdef guard above these functions to remove the warnings.

Signed-off-by: Charlie Shepherd <masterdriverz@gentoo.org>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agospi device setup gets better error checking
David Brownell [Tue, 31 Jul 2007 07:39:45 +0000 (00:39 -0700)]
spi device setup gets better error checking

This updates some error reporting paths in SPI device setup:

 - Move validation logic for SPI chipselects to spi_new_device(),
   which is where it should always have been.

 - In spi_new_device(), emit error messages if the device can't
   be created.  This is LOTS better than a silent failure; though
   eventually, the calling convention should probably change to
   use the <linux/err.h> conventions.

 - Includes one previously-missing check:  SPI masters must always
   have at least one chipselect, even for dedicated busses which
   always keep it selected!

It also adds a FIXME (IDR for dynamic ID allocation) so the issue doesn't live
purely in my mailbox.

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 agospi kerneldoc update
David Brownell [Tue, 31 Jul 2007 07:39:44 +0000 (00:39 -0700)]
spi kerneldoc update

This adds kerneldoc to the SPI framework.  The "spi_driver" and
"spi_board_info" structs were previously not described.

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 agofix integer overflow warning in i2o_block
Meelis Roos [Tue, 31 Jul 2007 07:39:41 +0000 (00:39 -0700)]
fix integer overflow warning in i2o_block

drivers/message/i2o/i2o_block.c: In function 'i2o_block_transfer':
drivers/message/i2o/i2o_block.c:837: warning: integer overflow in expression

msg->u.head[1] = cpu_to_le32(I2O_CMD_PRIVATE << 24 | HOST_TID << 12 | tid);
and I2O_CMD_PRIVATE is defined as 0xFF.  This gets "0xFF0100 | tid" and fits
into 32-bit unsigned but not into 32-bit signed integer properly.  Target
value is defined as u32 so the claculation does not fit during computation.

Change local variable tid to u32 so the whole expression is of u32 type and
fits well into u32 result.

Signed-off-by: Meelis Roos <mroos@linux.ee>
Cc: "Salyzyn, Mark" <mark_salyzyn@adaptec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoip2main warning fix
Andrew Morton [Tue, 31 Jul 2007 07:39:41 +0000 (00:39 -0700)]
ip2main warning fix

CONFIG_PCI=n:

drivers/char/ip2/ip2main.c: In function `ip2_loadmain':
drivers/char/ip2/ip2main.c:503: warning: unused variable `status'

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoUDF: fix UID and GID mount option ignorance
Cyrill Gorcunov [Tue, 31 Jul 2007 07:39:40 +0000 (00:39 -0700)]
UDF: fix UID and GID mount option ignorance

This patch fix weird behaviour of UDF mounting procedure.  To get UID
changed (for now) we have to type

mount -t udf -o uid=some_user,uid=ignore /dev/device /mnt/moun_point

and specifying two uid at once is strange a bit.  So with the patch we are
able to mount without additional 'uid=ignore' option.  The same for GID
option is done.

This patch will not break current mount scheme (with two option).

Btw this does fix (I hope) the following

[BUG 6124] mount of UDF fs ignores UID and GID options
        http://bugzilla.kernel.org/show_bug.cgi?id=6124

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Jan Kara <jack@ucw.cz>
Cc: Michael <auslands-kv@gmx.de>
Cc: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agocciss: fix memory leak
Jesper Juhl [Tue, 31 Jul 2007 07:39:39 +0000 (00:39 -0700)]
cciss: fix memory leak

There's a memory leak in the cciss driver.

in alloc_cciss_hba() we may leak sizeof(ctlr_info_t) bytes if a
call to alloc_disk(1 << NWD_SHIFT) fails.
This patch should fix the issue.

Spotted by the Coverity checker.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: Mike Miller <mike.miller@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoKconfig: remove top level menu "Code maturity level options"
Al Boldi [Tue, 31 Jul 2007 07:39:23 +0000 (00:39 -0700)]
Kconfig: remove top level menu "Code maturity level options"

Remove the top level menu "Code maturity level options", and moves its
options into menu "General setup".

This makes Kconfig less cluttered and easier to setup.

Signed-off-by: Al Boldi <a1426z@gawab.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoVideopix Frame Grabber: Fix unreleased lock in vfc_debug()
Matthias Kaehlcke [Tue, 31 Jul 2007 07:39:23 +0000 (00:39 -0700)]
Videopix Frame Grabber: Fix unreleased lock in vfc_debug()

Videopix Frame Grabber: vfc_debug() doesn't release the device lock
when copy_from_user() fails

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Acked-by: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agorename setlease to generic_setlease
Christoph Hellwig [Tue, 31 Jul 2007 07:39:22 +0000 (00:39 -0700)]
rename setlease to generic_setlease

Make it a little more clear that this is the default implementation for
the setleast operation.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Steven Whitehouse <swhiteho@redhat.com>
Acked-by: "J. Bruce Fields" <bfields@fieldses.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agosb1250-duart: __maybe_unused, etc. fixes
Maciej W. Rozycki [Tue, 31 Jul 2007 07:39:22 +0000 (00:39 -0700)]
sb1250-duart: __maybe_unused, etc. fixes

This is a set of small fixes addressing points raised with the original
driver submission.  In particular, __maybe_unused is used rather than a
local hack and sbd_ops is made const.  Additionally I have made two local
string variables automatic as rodata space was wasted for pointers
unnecessarily.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
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 agox86_64: include asm/bugs.h in bugs.c for check_bugs prototype
Josh Triplett [Tue, 31 Jul 2007 07:39:21 +0000 (00:39 -0700)]
x86_64: include asm/bugs.h in bugs.c for check_bugs prototype

C files should include the header files that prototype their functions.

Eliminates a sparse warning:
warning: symbol 'check_bugs' was not declared. Should it be static?

Signed-off-by: Josh Triplett <josh@kernel.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 agoi386: include asm/bugs.h in bugs.c for check_bugs prototype
Josh Triplett [Tue, 31 Jul 2007 07:39:20 +0000 (00:39 -0700)]
i386: include asm/bugs.h in bugs.c for check_bugs prototype

C files should include the header files that prototype their functions.

Eliminates a sparse warning:
warning: symbol 'check_bugs' was not declared. Should it be static?

Signed-off-by: Josh Triplett <josh@kernel.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 agoTypo fixes errror -> error
Gabriel Craciunescu [Tue, 31 Jul 2007 07:39:19 +0000 (00:39 -0700)]
Typo fixes errror -> error

Typo fixes errror -> error

Signed-off-by: Gabriel Craciunescu <nix.or.die@googlemail.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoidr_remove_all: kill unused variable
Oleg Nesterov [Tue, 31 Jul 2007 07:39:19 +0000 (00:39 -0700)]
idr_remove_all: kill unused variable

"error" is always equal to 0.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoFix a use after free bug in kernel->userspace relay file support
Jesper Juhl [Tue, 31 Jul 2007 07:39:18 +0000 (00:39 -0700)]
Fix a use after free bug in kernel->userspace relay file support

Coverity spotted what looks like a real possible case of using a variable
after it has been freed.  The problem is in
kernel/relay.c::relay_open_buf()

If the code hits "goto free_buf;" it ends up in this code :

  free_buf:
     relay_destroy_buf(buf); <--- calls kfree() on 'buf'.
  free_name:
    kfree(tmpname);
  end:
   return buf; <-- use after free of 'buf'.

I read through the callers and they all handle a NULL return from this
function as an error (and hitting the 'free_buf' label only happens on
failure to chan->cb->create_buf_file(), so that looks like a clear error to
me).

The patch simply sets 'buf' to NULL after the call to
relay_destroy_buf(buf); - as far as I can see that should take care of the
problem.

The patch also corrects a reference to a documentation file while
I was at it.

Note from Mathieu: the documentation reference change should have been
done in a separate patch, but I guess no one will really care.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: "David J. Wilder" <wilder@us.ibm.com>
Tested-by: "David J. Wilder" <wilder@us.ibm.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Tom Zanussi <zanussi@us.ibm.com>
Cc: Karim Yaghmour <karim@opersys.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agokthread: silence bogus section mismatch warning
Satyam Sharma [Tue, 31 Jul 2007 07:39:16 +0000 (00:39 -0700)]
kthread: silence bogus section mismatch warning

WARNING: kernel/built-in.o(.text+0x16910): Section mismatch:
reference to .init.text: (between 'kthreadd' and 'init_waitqueue_head')

comes because kernel/kthread.c:kthreadd() is not __init but calls
kthreadd_setup() which is __init. But this is ok, because kthreadd_setup()
is only ever called at init time, and then kthreadd() proceeds into its
"for (;;)" loop. We could mark kthreadd __init_refok, but kthreadd_setup()
with just one callsite and 4 lines in it (it's been that small since
10ab825bdef8df51) doesn't need to be a separate function at all -- so let's
just move those four lines at beginning of kthreadd() itself.

Signed-off-by: Satyam Sharma <ssatyam@cse.iitk.ac.in>
Acked-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 agofs: 9p/conv.c error path fix
Mariusz Kozlowski [Tue, 31 Jul 2007 07:39:13 +0000 (00:39 -0700)]
fs: 9p/conv.c error path fix

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>
Cc: Latchesar Ionkov <lucho@ionkov.net>
Cc: Eric Van Hensbergen <ericvh@ericvh.myip.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 agoVFS: fix a race in lease-breaking during truncate
david m. richter [Tue, 31 Jul 2007 07:39:12 +0000 (00:39 -0700)]
VFS: fix a race in lease-breaking during truncate

It is possible that another process could acquire a new file lease right
after break_lease() is called during a truncate, but before lease-granting
is disabled by the subsequent get_write_access().  Merely switching the
order of the break_lease() and get_write_access() calls prevents this race.

Signed-off-by: David M. Richter <richterd@citi.umich.edu>
Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouse __val in __get_unaligned
Mike Frysinger [Tue, 31 Jul 2007 07:39:11 +0000 (00:39 -0700)]
use __val in __get_unaligned

Use "__val" rather than "val" in the __get_unaligned macro in
asm-generic/unaligned.h.  This way gcc wont warn if you happen to also name
something in the same scope "val".

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agohpet.txt: broken link fix
Dave Young [Tue, 31 Jul 2007 07:39:11 +0000 (00:39 -0700)]
hpet.txt: broken link fix

The specification link in hpet document is broken.

Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoANON_INODES shouldn't be user visible
Adrian Bunk [Tue, 31 Jul 2007 07:39:10 +0000 (00:39 -0700)]
ANON_INODES shouldn't be user visible

There doesn't seem to be a good reason for ANON_INODES being
an user visible option.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: 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 agoRemove one more leftover reference to devfs
Michael Tokarev [Tue, 31 Jul 2007 07:39:07 +0000 (00:39 -0700)]
Remove one more leftover reference to devfs

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agobroken lilo check on make install
Gabriel C [Tue, 31 Jul 2007 07:39:06 +0000 (00:39 -0700)]
broken lilo check on make install

On make install I get the this error:

...

sh /work/crazy/linux-git/linux-2.6/arch/i386/boot/install.sh
2.6.22-g4eb6bf6b arch/i386/boot/bzImage System.map "/boot"
/work/crazy/linux-git/linux-2.6/arch/i386/boot/install.sh: line 54:
/etc/lilo/install: No such file or directory
make[1]: *** [install] Error 127

...

I don't use and don't have lilo installed on this system. The attached
patch fixes the problem for me.

Signed-off-by: Gabriel Craciunescu <nix.or.die@googlemail.com>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Cc: 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 agoNCP: delete test of long-deceased CONFIG_NCPFS_DEBUGDENTRY
Robert P. J. Day [Tue, 31 Jul 2007 07:39:05 +0000 (00:39 -0700)]
NCP: delete test of long-deceased CONFIG_NCPFS_DEBUGDENTRY

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Acked-by: Petr Vandrovec <petr@vandrovec.name>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoipmi: Fix mem leak in try_init_dmi()
Jesper Juhl [Tue, 31 Jul 2007 07:39:05 +0000 (00:39 -0700)]
ipmi: Fix mem leak in try_init_dmi()

This is only called at init time and only happens if the BIOS screws
something up, so the leak is slight and it is probably not worth sending to
2.6.22.x.  The driver would not initialize the interface in the case, and I
have no reports of this happening.  I have booted and run tests on a system
with this patch.  Note that the original patch was munged by the mailer,
here's a new one.

If we ever hit the "default:" case in the switch in try_init_dmi(),
then we'll leak the storage allocated with kzalloc() and assigned
to 'info'.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agodocbook bad file references
Randy Dunlap [Tue, 31 Jul 2007 07:39:04 +0000 (00:39 -0700)]
docbook bad file references

Fix docbook warnings:

Warning(linux-2.6.22-git12//drivers/base/power/main.c): no structured comments found
Warning(linux-2.6.22-git12//include/linux/splice.h): no structured comments found

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 agoirq.h fix kernel-doc
Randy Dunlap [Tue, 31 Jul 2007 07:39:03 +0000 (00:39 -0700)]
irq.h fix kernel-doc

Add kernel-doc entry in <linux/irq.h> for:

Warning(linux-2.6.22-git12//include/linux/irq.h:177): No description found for parameter 'last_unhandled'

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 agoi2c.h kernel-doc additions
Randy Dunlap [Tue, 31 Jul 2007 07:39:02 +0000 (00:39 -0700)]
i2c.h kernel-doc additions

Add kernel-doc notation in <linux/i2c.h> for:

Warning(linux-2.6.22-git12//include/linux/i2c.h:183): No description found for parameter 'driver'
Warning(linux-2.6.22-git12//include/linux/i2c.h:183): No description found for parameter 'usage_count'
Warning(linux-2.6.22-git12//include/linux/i2c.h:183): No description found for parameter 'list'
Warning(linux-2.6.22-git12//include/linux/i2c.h:183): No description found for parameter 'released'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
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 agoserial: MPSC: Fix coding style and whitespace issues
Mark A. Greer [Tue, 31 Jul 2007 07:39:01 +0000 (00:39 -0700)]
serial: MPSC: Fix coding style and whitespace issues

Fix up mpsc.c to be aligned with Documentation/CodingStyle.  Also fix up some
whitespace issues.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoserial: MPSC: Remove duplicate SUPPORT_SYSRQ definition
Mark A. Greer [Tue, 31 Jul 2007 07:39:00 +0000 (00:39 -0700)]
serial: MPSC: Remove duplicate SUPPORT_SYSRQ definition

Remove the duplicate definition of SUPPORT_SYSRQ in mpsc driver.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoserial: MPSC: Stop rx engine when CREAD cleared
Stephane Chazelas [Tue, 31 Jul 2007 07:38:59 +0000 (00:38 -0700)]
serial: MPSC: Stop rx engine when CREAD cleared

Currently, the MPSC driver doesn't stop recieving characters when the CREAD
flag in termios->c_cflag is cleared.  It should.  Also, only start receiving
if its not already started.

Signed-off-by: Stephane Chazelas <stephane@artesyncp.com>
Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoserial: MPSC: Remove race between Rx stop & restart
Carlos Sanchez [Tue, 31 Jul 2007 07:38:59 +0000 (00:38 -0700)]
serial: MPSC: Remove race between Rx stop & restart

The patch in commit ID f7232056bff5fe2d3bfeab35252a66ebaeb5bbde stops (aborts)
the MPSC's receive engine just before restarting it.  Unfortunately, it
doesn't wait for the abort to complete before restarting it which creates a
race between the abort and the restart.  If the restart occurs first, the
in-progress abort stops it again and the rx engine remains stopped.

Instead, do the abort when the SDMA engine is being stopped.  Make sure to
wait for the abort to complete before continuing.

Signed-off-by: Carlos Sanchez <carlos.sanchez@gecoinc.com>
Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoisofs: mounting to regular file may succeed
Kirill Kuvaldin [Tue, 31 Jul 2007 07:38:58 +0000 (00:38 -0700)]
isofs: mounting to regular file may succeed

It turned out that mounting a corrupted ISO image to a regular file may
succeed, e.g.  if an image was prepared as follows:

$ dd if=correct.iso of=bad.iso bs=4k count=8

We then can mount it to a regular file:

# mount -o loop -t iso9660 bad.iso /tmp/file

But mounting it to a directory fails with -ENOTDIR, simply because
the root directory inode doesn't have S_IFDIR set and the condition
in graft_tree() is met:

if (S_ISDIR(nd->dentry->d_inode->i_mode) !=
      S_ISDIR(mnt->mnt_root->d_inode->i_mode))
return -ENOTDIR

This is because the root directory inode was read from an incorrect
block. It's supposed to be read from sbi->s_firstdatazone, which is
an absolute value and gets messed up in the case of an incorrect image.

In order to somehow circumvent this we have to check that the root
directory inode is actually a directory after all.

Signed-off-by: Kirill Kuvaldin <kuvkir@epsmu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoremove tx3912fb
Yoichi Yuasa [Tue, 31 Jul 2007 07:38:56 +0000 (00:38 -0700)]
remove tx3912fb

Remove tx3912fb.  Nino has already removed.  It is no longer needed.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Acked-by: Ralf Baechle <ralf@linux-mips.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 agoserial: fix vr41xx_siu serial console support
Yoichi Yuasa [Tue, 31 Jul 2007 07:38:56 +0000 (00:38 -0700)]
serial: fix vr41xx_siu serial console support

The serial console can select only SERIAL_VR41XX=y.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
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 agoserial: fix vr41xx_siu interface select
Yoichi Yuasa [Tue, 31 Jul 2007 07:38:55 +0000 (00:38 -0700)]
serial: fix vr41xx_siu interface select

only PORT_VR41XX_SIU can select interface.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
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 agoserial: fix section mismatch vr41xx_siu
Yoichi Yuasa [Tue, 31 Jul 2007 07:38:55 +0000 (00:38 -0700)]
serial: fix section mismatch vr41xx_siu

Fix section mismatch vr41xx_siu.

WARNING: drivers/built-in.o(.text+0x2ce4c): Section mismatch: reference to .init.text:uart_parse_options (between 'siu_console_setup' and 'siu_request_port')
WARNING: drivers/built-in.o(.text+0x2ce70): Section mismatch: reference to .init.text:uart_set_options (between 'siu_console_setup' and 'siu_request_port')

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
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 agopure_initcall ID inconsistency
Michael Buesch [Tue, 31 Jul 2007 07:38:54 +0000 (00:38 -0700)]
pure_initcall ID inconsistency

pure_initcall uses the same ID as core_initcall.  I guess that's a typo and
it should use its own ID.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoin-string typos of "error"
Eddy L O Jansson [Tue, 31 Jul 2007 07:38:53 +0000 (00:38 -0700)]
in-string typos of "error"

One patch for two trivial typos of 'error' with three R's, appearing in message strings.

There's a bunch more of the same in comments, not dealt with here.

Signed-off-by: Eddy L O Jansson <eddy@klopper.net>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoInclude serial_reg.h with userspace headers
Herton Ronaldo Krzesinski [Tue, 31 Jul 2007 07:38:52 +0000 (00:38 -0700)]
Include serial_reg.h with userspace headers

As reported by Gustavo de Nardin <gustavodn@mandriva.com.br>, while trying to
compile xosview (http://xosview.sourceforge.net/) with upstream kernel
headers being used you get the following errors:
serialmeter.cc:48:30: error: linux/serial_reg.h: No such file or directory
serialmeter.cc: In member function 'virtual void
SerialMeter::checkResources()':
serialmeter.cc:71: error: 'UART_LSR' was not declared in this scope
serialmeter.cc:71: error: 'UART_MSR' was not declared in this scope
...

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Cc: Gustavo de Nardin <gustavodn@mandriva.com.br>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agofutex: pass nr_wake2 to futex_wake_op
Andreas Schwab [Tue, 31 Jul 2007 07:38:51 +0000 (00:38 -0700)]
futex: pass nr_wake2 to futex_wake_op

The fourth argument of sys_futex is ignored when op == FUTEX_WAKE_OP,
but futex_wake_op expects it as its nr_wake2 parameter.

The only user of this operation in glibc is always passing 1, so this
bug had no consequences so far.

Signed-off-by: Andreas Schwab <schwab@suse.de>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Ulrich Drepper <drepper@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoFix leak on /proc/lockdep_stats
Alexey Dobriyan [Tue, 31 Jul 2007 07:38:50 +0000 (00:38 -0700)]
Fix leak on /proc/lockdep_stats

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoFix leaks on /proc/{*/sched,sched_debug,timer_list,timer_stats}
Alexey Dobriyan [Tue, 31 Jul 2007 07:38:50 +0000 (00:38 -0700)]
Fix leaks on /proc/{*/sched,sched_debug,timer_list,timer_stats}

On every open/close one struct seq_operations leaks.
Kudos to /proc/slab_allocators.

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoAFS: fix file locking
David Howells [Tue, 31 Jul 2007 07:38:49 +0000 (00:38 -0700)]
AFS: fix file locking

Fix file locking for AFS:

 (*) Start the lock manager thread under a mutex to avoid a race.

 (*) Made the locking non-fair: New readlocks will jump pending writelocks if
     there's a readlock currently granted on a file.  This makes the behaviour
     similar to Linux's VFS locking.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agobpqether: fix rcu usage
Paul E. McKenney [Tue, 31 Jul 2007 07:38:48 +0000 (00:38 -0700)]
bpqether: fix rcu usage

The rcu_dereference() primitive needs to be applied to an l-value in order to
ensure that compiler writers don't get an opportunity to apply reordering
optimizations that could result in multiple fetches or in other misbehavior.
This patch pulls the rcu_dereference() calls in bpq_seq_next() up to the point
at which the fetched pointers are still l-values, rather than after
list_entry() has transformed them into r-values.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Jeff Garzik <jeff@garzik.org>
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 agoFix user struct leakage with locked IPC shem segment
Pavel Emelianov [Tue, 31 Jul 2007 07:38:48 +0000 (00:38 -0700)]
Fix user struct leakage with locked IPC shem segment

When user locks an ipc shmem segmant with SHM_LOCK ctl and the segment is
already locked the shmem_lock() function returns 0.  After this the
subsequent code leaks the existing user struct:

== ipc/shm.c: sys_shmctl() ==
     ...
     err = shmem_lock(shp->shm_file, 1, user);
     if (!err) {
          shp->shm_perm.mode |= SHM_LOCKED;
          shp->mlock_user = user;
     }
     ...
==

Other results of this are:
1. the new shp->mlock_user is not get-ed and will point to freed
   memory when the task dies.
2. the RLIMIT_MEMLOCK is screwed on both user structs.

The exploit looks like this:

==
    id = shmget(...);
    setresuid(uid, 0, 0);
    shmctl(id, SHM_LOCK, NULL);
    setresuid(uid + 1, 0, 0);
    shmctl(id, SHM_LOCK, NULL);
==

My solution is to return 0 to the userspace and do not change the
segment's user.

Signed-off-by: Pavel Emelianov <xemul@openvz.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agokbuild: whitelist references from __dbe_table to .init
Ralf Baechle [Tue, 31 Jul 2007 07:38:47 +0000 (00:38 -0700)]
kbuild: whitelist references from __dbe_table to .init

This is needed on MIPS where the same mechanism as get_user() is used to
intercept bus error exceptions for some hardware probes.  Without this
patch modpost will throw spurious warnings:

  LD      vmlinux
  SYSMAP  System.map
  SYSMAP  .tmp_System.map
  MODPOST vmlinux
WARNING: arch/mips/sgi-ip22/built-in.o(__dbe_table+0x0): Section mismatch: reference to .init.text:

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agom68knommu: get rid of duplicate include
Jesper Juhl [Tue, 31 Jul 2007 07:38:46 +0000 (00:38 -0700)]
m68knommu: get rid of duplicate include

Remove the duplicate inclusion of asm/irq.h from
arch/m68knommu/platform/5206e/config.c

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agokdebug.h: forward-declare struct struct notifier_block
Andrew Morton [Tue, 31 Jul 2007 07:38:45 +0000 (00:38 -0700)]
kdebug.h: forward-declare struct struct notifier_block

alpha:

In file included from kernel/notifier.c:1:
include/linux/kdebug.h:14: warning: 'struct notifier_block' declared inside parameter list
include/linux/kdebug.h:14: warning: its scope is only this definition or declaration, which is probably not what you want
include/linux/kdebug.h:15: warning: 'struct notifier_block' declared inside parameter list
kernel/notifier.c:529: error: conflicting types for 'register_die_notifier'
include/linux/kdebug.h:14: error: previous declaration of 'register_die_notifier' was here
kernel/notifier.c:533: error: conflicting types for 'register_die_notifier'
include/linux/kdebug.h:14: error: previous declaration of 'register_die_notifier' was here
kernel/notifier.c:536: error: conflicting types for 'unregister_die_notifier'
include/linux/kdebug.h:15: error: previous declaration of 'unregister_die_notifier' was here
kernel/notifier.c:539: error: conflicting types for 'unregister_die_notifier'
include/linux/kdebug.h:15: error: previous declaration of 'unregister_die_notifier' was here

Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agospi_mpc83xx: support loopback mode
Anton Vorontsov [Tue, 31 Jul 2007 07:38:45 +0000 (00:38 -0700)]
spi_mpc83xx: support loopback mode

This exposes the hardware loopback mode to drivers, primarily for testing.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
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 agospidev_test utility
Anton Vorontsov [Tue, 31 Jul 2007 07:38:44 +0000 (00:38 -0700)]
spidev_test utility

This is a simple utility used to test SPI functionality.  It could stand
growing options to support using other test data patterns; this initial
version only issues full duplex transfers, which rules out 3WIRE or
Microwire links.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
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 agospidev supports more communications modes
Anton Vorontsov [Tue, 31 Jul 2007 07:38:43 +0000 (00:38 -0700)]
spidev supports more communications modes

The spidev driver doesn't currently expose all SPI communications modes to
userspace.  This passes them all through to the driver.

Two of them are potentially troublesome, in the sense that they could cause
hardware conflicts on shared busses.  It might be appropriate to add some
privilege checks for for those modes.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
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>