Setting a display timing parameter too high or too low may cause it to
wrap around and thus become completely wrong. Validate the timings in
atmel_lcdfb_check_var() and saturate to the highest or lowest possible
value if necessary.
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.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>
This third part of an extension to support more pca953x chips updates the
logic to handle the smaller register widths used by the 4-bit and 8-bit parts,
and to use the chip type to determine how many GPIOs it provides.
As long as we don't support interrupt and reset capabilities, those size
issues are the only software-visible differences between these parts.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> 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>
This second part of an extension to support more pca953x chips renames the C
and Kconfig symbols. All affected files were updated by sed, except for a
couple of obvious exceptions. It also updates the Kconfig helptext.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> 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>
Ville Syrjala [Wed, 6 Feb 2008 09:39:01 +0000 (01:39 -0800)]
w1-gpio: add GPIO w1 bus master driver
Add a GPIO 1-wire bus master driver. The driver used the GPIO API to
control the wire and the GPIO pin can be specified using platform data
similar to i2c-gpio. The driver was tested with AT91SAM9260 + DS2401.
Signed-off-by: Ville Syrjala <syrjala@sci.fi> Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
- Don't force use of RTT0 and GPBR0. Either resource may need
to be used for other purposes (like NO_HZ support).
- Update "AT91RM9200 RTC" Kconfig to allow it on SAM9RL chips
(it has both RTT and RTC).
Driver binding uses bus_find_device() to avoid needing any kind of "timer
library" code when there's more than one RTT module. (This timer can be used
as an RTC, to support NO_HZ operation, or potentially for other stuff. The
choice is a per-system policy.)
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Michel Benoit <murpme@gmail.com> Cc: Nicolas Ferre <nicolas.ferre@rfo.atmel.com> Cc: Andrew Victor <linux@maxim.org.za> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David Brownell [Wed, 6 Feb 2008 09:38:57 +0000 (01:38 -0800)]
rtc: remove more dev->power.power_state usage
Remove some more references to dev->power.power_state. That field is overdue
for removal, but we can't do that while it's still referenced in the kernel.
The only reason to update it was to make the /sys/devices/.../power/state
files (now removed) work better.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Russell King <rmk@arm.linux.org.uk> 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>
frederic Rodo [Wed, 6 Feb 2008 09:38:55 +0000 (01:38 -0800)]
rtc ds1307: ds_1340 change init
For DS140, clear the oscillator fault flag as needed.
Signed-off-by: Frederic RODO <f.rodo@til-technologies.fr>
[ And remove some "sparse" warnings. ] 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>
Bernhard Walle [Wed, 6 Feb 2008 09:38:52 +0000 (01:38 -0800)]
rtc: add HPET RTC emulation to RTC_DRV_CMOS
That patch adds the RTC emulation of the HPET timer to the new RTC_DRV_CMOS.
The old drivers/char/rtc.ko driver had that functionality and it's important
on new systems.
[akpm@linux-foundation.org: unbreak alpha build] Signed-off-by: Bernhard Walle <bwalle@suse.de> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: David Brownell <david-b@pacbell.net> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Andi Kleen <ak@suse.de> Cc: john stultz <johnstul@us.ibm.com> Cc: Robert Picco <Robert.Picco@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David Brownell [Wed, 6 Feb 2008 09:38:45 +0000 (01:38 -0800)]
rtc-cmos alarm acts as oneshot
Start making the rtc-cmos alarm act more like a oneshot alarm by disabling
that alarm after its IRQ fires. (ACPI hooks are also needed.)
The Linux RTC framework has previously been a bit vague in this area, but
any other behavior is problematic and not very portable. RTCs with full
YYYY-MM-DD HH:MM[:SS] alarms won't have a problem here. Only ones with
partial match criteria, with the most visible example being the PC RTC, get
confused. (Because the criteria will match repeatedly.)
Update comments relating to that oneshot behavior and timezone handling.
(Timezones are another issue that's mostly visible with rtc-cmos. That's
because PCs often dual-boot MS-Windows, which likes its RTC to match local
wall-clock time instead of UTC.)
Signed-off-by: David Brownell <dbrownell@users.sourceforge.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>
Paul Mundt [Wed, 6 Feb 2008 09:38:44 +0000 (01:38 -0800)]
rtc: ds1302 rtc support
This adds a basic ds1302 RTC driver, which is basically a cleanup and move
of the in-tree SH SecureEdge5410 code (which is currently located in
arch/sh/board/snapgear/rtc.c) to drivers/rtc.
This aims to be a building block that the M32R and CRIS code can be worked
on top of, so we can get rid of drivers/char/ds1302.c and
arch/cris/arch-v10/drivers/ds1302.c respectively, though more work is
needed for this.
[akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Paul Mundt <lethal@linux-sh.org> 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>
David Brownell [Wed, 6 Feb 2008 09:38:43 +0000 (01:38 -0800)]
rtc-cmos: export nvram in sysfs
This makes rtc-cmos export its NVRAM, like several other RTC drivers.
It still works within the limits of the current CMOS_READ/CMOS_WRITE calls,
which don't understand how to access multiple register banks. The primary
impact of that limitation is that Linux can't access the uppermost 128
bytes of NVRAM on many systems.
Note that this isn't aiming to be a drop-in replacement for the legacy
/dev/nvram support. (Presumably that has real users, and isn't just
getting carried forward automatically?) Userspace handles more work:
- When userspace code updates NVRAM, that will need to include
updating any platform-specific checksums that may apply.
- No /proc/driver/nvram file will parse and display NVRAM data
according to whichever boot firmware your board expects.
Also minor pnp-related updates: update a comment, remove dead code.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Alessandro Zummo <a.zummo@towertech.it> Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
rtc-s3c: Use is_power_of_2() macro for simplicity.
Use is_power_of_2() macro for simplicity.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Alessandro Zummo <a.zummo@towertech.it> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jean Delvare [Wed, 6 Feb 2008 09:38:41 +0000 (01:38 -0800)]
rtc-pcf8583: Don't abuse I2C_M_NOSTART
The rtc-pcf8583 driver is using the I2C_M_NOSTART flag but shouldn't. This
flag is only meant for broken chips and the PCF8583 RTC chip is not one of
these.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Alessandro Zummo <a.zummo@towertech.it> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Miklos Szeredi [Wed, 6 Feb 2008 09:38:39 +0000 (01:38 -0800)]
fuse: limit queued background requests
Libfuse basically creates a new thread for each new request. This is fine for
synchronous requests, which are naturally limited. However background
requests (especially writepage) can cause a thread creation storm.
To avoid this, limit the number of background requests available to userspace.
This is done by introducing another queue for background requests, and a
counter for the number of "active" requests, which are currently available for
userspace.
Eric Sandeen [Wed, 6 Feb 2008 09:38:37 +0000 (01:38 -0800)]
ecryptfs: check for existing key_tfm at mount time
Jeff Moyer pointed out that a mount; umount loop of ecryptfs, with the same
cipher & other mount options, created a new ecryptfs_key_tfm_cache item
each time, and the cache could grow quite large this way.
Looking at this with mhalcrow, we saw that ecryptfs_parse_options()
unconditionally called ecryptfs_add_new_key_tfm(), which is what was adding
these items.
Refactor ecryptfs_get_tfm_and_mutex_for_cipher_name() to create a new
helper function, ecryptfs_tfm_exists(), which checks for the cipher on the
cached key_tfm_list, and sets a pointer to it if it exists. This can then
be called from ecryptfs_parse_options(), and new key_tfm's can be added
only when a cached one is not found.
With list locking changes suggested by akpm.
Signed-off-by: Eric Sandeen <sandeen@redhat.com> Cc: Michael Halcrow <mhalcrow@us.ibm.com> Cc: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Eric Sandeen [Wed, 6 Feb 2008 09:38:34 +0000 (01:38 -0800)]
ecryptfs: remove debug as mount option, and warn if set via modprobe
ecryptfs_debug really should not be a mount option; it is not per-mount,
but rather sets a global "ecryptfs_verbosity" variable which affects all
mounted filesysytems. It's already settable as a module load option,
I think we can leave it at that.
Also, if set, since secret values come out in debug messages, kick
things off with a stern warning.
Signed-off-by: Eric Sandeen <sandeen@redhat.com> Acked-by: Mike Halcrow <mhalcrow@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Eric Sandeen [Wed, 6 Feb 2008 09:38:34 +0000 (01:38 -0800)]
ecryptfs: make show_options reflect actual mount options
Change ecryptfs_show_options to reflect the actual mount options in use.
Note that this does away with the "dir=" output, which is not a valid mount
option and appears to be unused.
Mount options such as "ecryptfs_verbose" and "ecryptfs_xattr_metadata" are
somewhat indeterminate for a given fs, but in any case the reported mount
options can be used in a new mount command to get the same behavior.
[akpm@linux-foundation.org: fix printk warning] Signed-off-by: Eric Sandeen <sandeen@redhat.com> Acked-by: Michael Halcrow <mhalcrow@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Trevor Highland [Wed, 6 Feb 2008 09:38:33 +0000 (01:38 -0800)]
eCryptfs: set inode key only once per crypto operation
There is no need to keep re-setting the same key for any given eCryptfs inode.
This patch optimizes the use of the crypto API and helps performance a bit.
Signed-off-by: Trevor Highland <trevor.highland@gmail.com> Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Michael Halcrow [Wed, 6 Feb 2008 09:38:32 +0000 (01:38 -0800)]
eCryptfs: track header bytes rather than extents
Remove internal references to header extents; just keep track of header bytes
instead. Headers can easily span multiple pages with the recent persistent
file changes.
Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Adrian Bunk [Wed, 6 Feb 2008 09:38:32 +0000 (01:38 -0800)]
fs/ecryptfs/: possible cleanups
- make the following needlessly global code static:
- crypto.c:ecryptfs_lower_offset_for_extent()
- crypto.c:key_tfm_list
- crypto.c:key_tfm_list_mutex
- inode.c:ecryptfs_getxattr()
- main.c:ecryptfs_init_persistent_file()
- remove the no longer used mmap.c:ecryptfs_lower_page_cache
- #if 0 the unused read_write.c:ecryptfs_read()
Signed-off-by: Adrian Bunk <bunk@kernel.org> Cc: Michael Halcrow <mhalcrow@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Andrew Morton [Wed, 6 Feb 2008 09:38:31 +0000 (01:38 -0800)]
drivers/isdn/hardware/eicon/debug.c: fix uninitialized var warning
drivers/isdn/hardware/eicon/debug.c: In function 'SuperTraceASSIGN':
drivers/isdn/hardware/eicon/debug.c:1191: warning: 'rx_dma_magic' may be used uninitialized in this function
Tilman Schmidt [Wed, 6 Feb 2008 09:38:30 +0000 (01:38 -0800)]
ser_gigaset: convert mutex to completion
The ser_gigaset ISDN driver was using a mutex in its close() method for
waiting for other running ldisc methods to finish. That's what completions
are for. Incidentally, this also avoids a spurious "BUG: lock held at task
exit time" message when the driver's userspace daemon daemonizes itself.
Tilman Schmidt [Wed, 6 Feb 2008 09:38:27 +0000 (01:38 -0800)]
usb_gigaset: suspend support
Add basic suspend/resume support to the usb_gigaset driver for the Siemens
Gigaset M105 USB DECT adapter.
Only the USB aspects are handled so far; the ISDN subsystem is not notified in
any way, for lack of information about how to do that. The driver does not
check for active connections before suspending. They will be dropped when the
device loses USB power.
Tilman Schmidt [Wed, 6 Feb 2008 09:38:26 +0000 (01:38 -0800)]
bas_gigaset: suspend support
Add basic suspend/resume support to the bas_gigaset ISDN driver for the
Siemens Gigaset SX255 series of ISDN DECT bases.
Only the USB aspects are handled so far; the ISDN subsystem is not notified in
any way, for lack of information about how to do that. The driver will refuse
to suspend if a connection is active.
Tilman Schmidt [Wed, 6 Feb 2008 09:38:24 +0000 (01:38 -0800)]
gigaset: code cleanups
Some cleanups to the bas-gigaset and usb-gigaset USB ISDN drivers:
- simplified error handling
- improved debug messages
- readability improvements
- removal of obsolete defines and comments
Abhishek Sagar [Wed, 6 Feb 2008 09:38:22 +0000 (01:38 -0800)]
kprobes: kretprobe user entry-handler
Provide support to add an optional user defined callback to be run at
function entry of a kretprobe'd function. Also modify the kprobe smoke
tests to include an entry-handler during the kretprobe sanity test.
Signed-off-by: Abhishek Sagar <sagar.abhishek@gmail.com> Cc: Prasanna S Panchamukhi <prasanna@in.ibm.com> Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> Acked-by: Jim Keniston <jkenisto@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David Brownell [Wed, 6 Feb 2008 09:38:21 +0000 (01:38 -0800)]
spi: remove more dev->power.power_state usage
Remove some more references to dev->power.power_state. That field is overdue
for removal, but we can't do that while it's still referenced in the kernel.
The only reason to update it was to make the /sys/devices/.../power/state
files (now removed) work better.
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>
Bryan Wu [Wed, 6 Feb 2008 09:38:18 +0000 (01:38 -0800)]
spi_bfin: wait for tx to complete on some cs_chg paths
PBX 2 SPI devices need the nonstandard "cs change per word" mechanism.
This patch is one of three updating this driver to make the last data bits get
sent before advancing the transfer ... in this case, before the chipselect
gets deactivated.
Signed-off-by: Bryan Wu <bryan.wu@analog.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>
Bryan Wu [Wed, 6 Feb 2008 09:38:17 +0000 (01:38 -0800)]
spi_bfin: use more useful GPIO labels
Use the SPI driver's name when requesting gpio lines. When there are gpio
conflicts, this helps to narrow down the problems; "bfin-spi" is not
informative.
Signed-off-by: Bryan Wu <bryan.wu@analog.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>
Girish [Wed, 6 Feb 2008 09:38:16 +0000 (01:38 -0800)]
spi: omap2_mcspi handles omap3 too
This adds driver OMAP SPI specific changes to support OMAP 3430
Signed-off-by: Girish S G <girishsg@ti.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>
Magnus Damm [Wed, 6 Feb 2008 09:38:15 +0000 (01:38 -0800)]
spi: SuperH SPI using SCI
Add support for SPI over SCI pins. SCI is a very simple serial controller
block that can be found on older SuperH processors. In theory it is
possible to use the SCI hardware block in syncronous mode, but this version
of the driver simply hooks up the bit banging code on the SCI pins.
Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David Brownell [Wed, 6 Feb 2008 09:38:13 +0000 (01:38 -0800)]
spi: s3c drivers shouldn't care about spi_board_info
The two S3C SPI master drivers got merged without much review, so I just
noticed that they're doing something that the SPI core code is responsible
for, rather than any adapter driver: they try to register SPI devices.
This removes that support from those drivers so they act normally.
Interestingly, none of the current boards are affected. So it's a net code
shrink with no loss of functionality.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
In atmel_spi_next_xfer, xfer can be NULL because the next transfer may
already have been submitted to the PDC (using DMA chaining). This can
cause an oops, since the debug message assumed it was never null. The
fix changes how those debug messages are issued, ensuring that one is
issued each time a transfer is started instead of once per call.
Also, properly indent the "can this transfer be chained" test so it's
not hidden as if it were non-conditional code.
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.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>
Silvester Erdeg [Wed, 6 Feb 2008 09:38:12 +0000 (01:38 -0800)]
atmel_spi: chain DMA transfers
Add support for chained transfers in the atmel_spi driver, letting the DMA
controller switch to the next buffer pair without CPU intervention. This
reduced I/O latencies by about 2% in one bulk I/O test. It should also help
work around several interrelated errata affecting chipselect 0 on at91rm9200
chips.
Almost all of the changes are in the reworked atmel_spi_next_xfer() function.
That's now called with the driver in one of three states:
1. It isn't transferring anything (in which case the first transfer
of the current message is going to be sent)
2. It has finished transfering a non-chainable transfer (in which
case it will go to the next transfer in the message)
3. It has finished transfering a chained transfer (in which case the
next transfer is already queued)
After that it will queue the next transfer if it can be chained.
Signed-off-by: Szilveszter Ordog <slipszi@gmail.com> Acked-by: Haavard Skinnemoen <hskinnemoen@atmel.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>
Don't insert (undesirable) delays between consecutive words (DLYBCT) or when
activating chipselects (DLYBS).
Removing the between-word delays improves the performance of bulk transfers
(such as mtd_dataflash, m25p80, mmc_spi) significantly. In one test, the
improvement was a factor of more than eight!
(The large DLYBCT value came from the legacy at91 SPI driver, and it's not
clear why it used such a huge value.)
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.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>
David Brownell [Wed, 6 Feb 2008 09:38:10 +0000 (01:38 -0800)]
spi core: stop updating dev->power.power_state
Don't update dev->power.power_state any more in the SPI core. The only
reason to update this scheduled-to-be-removed field was to make the
already-removed /sys/devices/.../power/state files work better.
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>
Driver core: convert block from raw kobjects to core devices
This moves the block devices to /sys/class/block. It will create a
flat list of all block devices, with the disks and partitions in one
directory. For compatibility /sys/block is created and contains symlinks
to the disks.
introduced a global disk_type variable in <linux/genhd.h>, causing the
following compile error on Atari:
drivers/block/ataflop.c:93: error: conflicting types for 'disk_type'
include/linux/genhd.h:21: error: previous declaration of 'disk_type' was here
Rename the local disk_type variable in drivers/block/ataflop.c to
atari_disk_type, to avoid the conflict.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Kay Sievers <kay.sievers@vrfy.org> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David Fries [Wed, 6 Feb 2008 09:38:09 +0000 (01:38 -0800)]
W1: w1_therm.c standardize units to millidegrees C
Standardize the temperature units to millidegrees C for the two sensor
conversion routines. Previously the routines were,
w1_DS18B20_convert_temp degrees C
w1_DS18S20_convert_temp millidegrees C
Unfortunately this will break any program using the ds18b20 value as it
will now be 1000 times bigger. Fortunately there can't be that many users
out there, or some of these bugs will have been fixed by now, such as the
negative C error (see previous patch) that makes me think the ds18b20 is
the better choice to change because of the current bugs.
Signed-off-by: David Fries <david@fries.net> Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David Fries [Wed, 6 Feb 2008 09:38:04 +0000 (01:38 -0800)]
system timer: fix crash in <100Hz system timer
The kernel has a divide by zero crash when trying to run the system timer
less than 100Hz. The problem is x/(HZ/USER_HZ) and related. Now
x*(USER_HZ/HZ) will be used if HZ<USER_HZ.
I'm running the Linux kernel under qemu and went to run a slower system
timer to take less CPU (and battery) on the host. I found that the kernel
paniced under emulation because of a divide by zero in three places. Here
is the patch. The base git was updated today 01-05-2008. I went for a
20Hz system time by adding config HZ_20 etc to kernel/Kconfig.hz. With
this patch I verified the system timer by looking at /proc/interrupts.
[akpm@linux-foundation.org: partially clean up the macro maze] Signed-off-by: David Fries <david@fries.net> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Joern Engel [Wed, 6 Feb 2008 09:38:02 +0000 (01:38 -0800)]
Claim maintainership for block2mtd and update email addresses
I have been prime author and maintainer of block2mtd from day one, but
neither MAINTAINERS nor the module source makes this fact clear. And while
I'm at it, update my email addresses tree-wide, as the old address
currently bounces and change my name to "joern" as unicode will likely
continue to cause trouble until the end of this century.
Signed-off-by: Joern Engel <joern@lazybastard.org> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Karsten Wiese [Wed, 6 Feb 2008 09:37:59 +0000 (01:37 -0800)]
make sys_poll() wait at least timeout ms
schedule_timeout(jiffies) waits for at least jiffies - 1. Add 1 jiffie to
the timeout_jiffies calculated in sys_poll() to wait at least
timeout_msecs, like poll() manpage says.
Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Joe Peterson [Wed, 6 Feb 2008 09:37:59 +0000 (01:37 -0800)]
Fix IXANY and restart after signal (e.g. ctrl-C) in n_tty line discipline
Fix two N_TTY line discipline issues related to resuming a stopped TTY
(typically done with ctrl-S):
1) Fix handling of character that resumes a stopped TTY (with IXANY)
With "stty ixany", the TTY line discipline would lose the first character
after the stop, so typing, for example, "hi^Sthere" resulted in "hihere"
(the 't' would cause the resume after ^S, but it would then be thrown away
rather than processed as an input character). This was inconsistent with
the behavior of other Unix systems.
2) Fix interrupt signal (e.g. ctrl-C) behavior in stopped TTYs
With "stty -ixany" (often the default), interrupt signals were ignored
in a stopped TTY until the TTY was resumed with the start char (typically
ctrl-Q), which was inconsistent with the behavior of other Unix systems.
Signed-off-by: Joe Peterson <joe@skyrush.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Eric Dumazet [Wed, 6 Feb 2008 09:37:57 +0000 (01:37 -0800)]
Use ilog2() in fs/namespace.c
We can use ilog2() in fs/namespace.c to compute hash_bits and hash_mask at
compile time, not runtime.
[akpm@linux-foundation.org: clean it all up] Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Eric Dumazet [Wed, 6 Feb 2008 09:37:56 +0000 (01:37 -0800)]
kernel/sys.c: get rid of expensive divides in groups_sort()
groups_sort() can be quite long if user loads a large gid table.
This is because GROUP_AT(group_info, some_integer) uses an integer divide.
So having to do XXX thousand divides during one syscall can lead to very
high latencies. (NGROUPS_MAX=65536)
In the past (25 Mar 2006), an analog problem was found in groups_search()
(commit d74beb9f33a5f16d2965f11b275e401f225c949d ) and at that time I
changed some variables to unsigned int.
I believe that a more generic fix is to make sure NGROUPS_PER_BLOCK is
unsigned.
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Adrian Bunk [Wed, 6 Feb 2008 09:37:51 +0000 (01:37 -0800)]
calibrate_delay() must be __cpuinit
calibrate_delay() must be __cpuinit, not __{dev,}init.
I've verified that this is correct for all users.
While doing the latter, I also did the following cleanups:
- remove pointless additional prototypes in C files
- ensure all users #include <linux/delay.h>
This fixes the following section mismatches with CONFIG_HOTPLUG=n,
CONFIG_HOTPLUG_CPU=y:
WARNING: vmlinux.o(.text+0x1128d): Section mismatch: reference to .init.text.1:calibrate_delay (between 'check_cx686_slop' and 'set_cx86_reorder')
WARNING: vmlinux.o(.text+0x25102): Section mismatch: reference to .init.text.1:calibrate_delay (between 'smp_callin' and 'cpu_coregroup_map')
Signed-off-by: Adrian Bunk <bunk@kernel.org> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Richard Henderson <rth@twiddle.net> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: Christian Zankel <chris@zankel.net> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
On loading only one serial port was present and it wasn't working. After
looking in the data sheet I realized that the base address was wrong. For
further reference here is lspci and relevant dmesg output:
02:00.0 Communication controller: NetMos Technology PCI 9855 Multi-I/O
Controller (rev 01) (prog-if 02)
Subsystem: LSI Logic / Symbios Logic Unknown device 0022
Flags: medium devsel, IRQ 19
I/O ports at df00 [size=8]
I/O ports at de00 [size=8]
I/O ports at dd00 [size=8]
I/O ports at dc00 [size=8]
I/O ports at db00 [size=8]
I/O ports at da00 [size=16]
parport1: PC-style at 0xdd00 [PCSPP,TRISTATE]
parport2: PC-style at 0xdf00 [PCSPP,TRISTATE,EPP]
0000:02:00.0: ttyS0 at I/O 0xdb00 (irq = 19) is a 16550A
0000:02:00.0: ttyS1 at I/O 0xda00 (irq = 19) is a 16550A
Signed-off-by: Christian Pellegrin <chripell@fsfe.org> Cc: Thomas Richter <thor@math.TU-Berlin.DE> Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Martin Schitter <ms@gewi.kfunigraz.ac.at> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
I converted some of the document to reflect mutex usage instead of
semaphore usage. Since we shouldin't be promoting semaphore usage when
it's on it's way out..
Signed-off-by: Daniel Walker <dwalker@mvista.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>