David Woodhouse [Wed, 20 Oct 2004 01:13:00 +0000 (18:13 -0700)]
[PATCH] JFFS2: work around uninitialised use of usercompr field by old code.
We didn't use the 'usercompr' field before recently. Unfortunately we didn't
set it to zero either, so there's a lot of file systems out there with it set
to 0x5a. Deal with that rather than getting confused.
Signed-Off-By: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Randy Dunlap [Wed, 20 Oct 2004 01:12:46 +0000 (18:12 -0700)]
[PATCH] x86_64/io_apic init section fixups
Code section errors in i386/io_apic.c found by scripts/reference_init.pl.
Looks like they could cause problems for a few drivers or in a real hotplug
environment.
Error: ./arch/i386/kernel/io_apic.o .text refers to 000018ff R_386_PC32 .init.text
Error: ./arch/i386/kernel/io_apic.o .text refers to 00001967 R_386_PC32 .init.text
(as above thru {A}, then:)
IO_APIC_irq_trigger
irq_trigger
MPBIOS_trigger >> removing __init from this led to
needing to remove __init from
EISA_ELCR also.
Signed-off-by: Randy Dunlap <rddunlap@osdl.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Gordon Jin [Wed, 20 Oct 2004 01:12:34 +0000 (18:12 -0700)]
[PATCH] x86_64: correct copy_user_generic return value when exception happens
Fix a bug that arch/x86_64/lib/copy_user:copy_user_generic will return a
wrong value when exception happens.
In the case the address is not 8-byte aligned (i.e. go into
Lbad_alignment), if exception happens in Ls11, %rdx will be wrong number of
copied bytes, then copy_user_generic returns wrong value. It also fixed a
bug of zeroing wrong number of bytes of destination at this situation. (In
Lzero_rest)
Signed-off-by: Yanmin Zhang <yanmin.zhang@intel.com> Signed-off-by: Nanhai Zou <nanhai.zou@intel.com> Signed-off-by: Gordon Jin <gordon.jin@intel.com> Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Wed, 20 Oct 2004 01:12:05 +0000 (18:12 -0700)]
[PATCH] x86_64: fix IOAPIC on Nvidia boards
Originally suggested by Zwane Mwaikumbo
Ignore all ACPI timer overrides on all Nvidia boards. The fallback doesn't
work and no Nvidia boards needs a timer override. But some buggy BIOS have
it anyways.
Also enable IO-APIC mode by default for Nvidia then.
Andi Kleen [Wed, 20 Oct 2004 01:11:26 +0000 (18:11 -0700)]
[PATCH] x86_64: use TSC on SMP EM64T machines
x86-64 MP kernels always used HPET timing when available. This was done
because AMD systems don't have synchronized TSCs in all cases. On Intel
this is not true (except Summit), so use faster TSC timing for those.
Also only enable HPET gettimeofday when there is more than one CPU online.
Andi Kleen [Wed, 20 Oct 2004 01:10:56 +0000 (18:10 -0700)]
[PATCH] x86_64: drop old APIC workaround
Suggested by Ingo Molnar.
Drop APIC level workaround for old IO-APICs on x86-64 because it is a
significant part of interrupt handling time. x86-64 only runs on modern
chipsets that probably don't have this bug.
Rusty Russell [Wed, 20 Oct 2004 01:10:43 +0000 (18:10 -0700)]
[PATCH] module_param_array() should take a pointer
module_param_array() takes a variable to put the number of elements in.
Looking through the uses, many people don't care, so they declare a dummy
or share one variable between several parameters. The latter is
problematic because sysfs uses that number to decide how many to display.
The solution is to change the variable arg to a pointer, and if the pointer
is NULL, use the "max" value. This change is fairly small, but fixing up
the callers is a lot of (trivial) churn.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Robin Holt [Tue, 19 Oct 2004 20:38:23 +0000 (20:38 +0000)]
[IA64-SGI] Distribute useage of BTE interfaces.
During peak utilization periods, the first interface on a node has
an inordinately large amount of contention. This is due to all
cpus starting their scan for an interface at 0. This patch distributes
that based upon the slice the requesting cpu is attached to.
Signed-off-by: Robin Holt Signed-off-by: Tony Luck <tony.luck@intel.com>
Robin Holt [Tue, 19 Oct 2004 20:36:01 +0000 (20:36 +0000)]
[IA64-SGI] Correct BTE notification timeouts on SN2.
The SN2 Block Transfer Engine occassionally fails to send a notification
that it has completed a transfer to the kernel. This patch adds a
timeout mechanism which will detect the failure, reset the interface,
and then retry the transfer.
Signed-off-by: Robin Holt Signed-off-by: Tony Luck <tony.luck@intel.com>
Robin Holt [Tue, 19 Oct 2004 17:33:58 +0000 (17:33 +0000)]
[IA64-SGI] Double spin_unlock in bte.c
If all bte interfaces are in use, the current code will leave the
bte pointer set when exiting from the loop trying to locate an
interface to use. This results in two processes using the same
interface and both trying to free the same one. With a
premptible kernel, this results in the preempt count getting
off.
Signed-off-by: Robin Holt <holt@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Russell King [Tue, 19 Oct 2004 17:11:22 +0000 (18:11 +0100)]
[SERIAL] Keep trying to register our console device.
Some serial drivers receive their serial port device information via
the device model. This unfortunately means that the selected port
may not be available when the console subsystem initialises, so we
must keep trying to register the console after each port is added.
Russell King [Tue, 19 Oct 2004 16:50:24 +0000 (17:50 +0100)]
[SERIAL] Add new port registration/unregistration functions.
serial8250_register_port()/serial8250_unregister_port() has the
capability of registering ports with their struct device nodes,
which allows sysfs to indicate which tty devices belong to which
hardware devices.
We also add a serial8250 platform device driver in an initial
attempt at PM for ISA ports. However, I'm leaving out the
platform device for the time being since adding that would cause
potential oops issues.
Russell King [Tue, 19 Oct 2004 16:22:21 +0000 (17:22 +0100)]
[SERIAL] Make port autoprobing set up->capabilities.
Convert port autoprobing to set up->capabilities as it discovers
various capabilities of the port. Warn when the detected
capabilities do not match those in the uart_config table.
Russell King [Tue, 19 Oct 2004 16:00:01 +0000 (17:00 +0100)]
[SERIAL] Clean up handling of LSR in receive function.
It's pointless accessing the LSR value via a pointer all the time -
it prevents the compiler optimising it. Also, ensure that we
recognise a break sent during a kernel printk correctly.
Gerd Knorr [Tue, 19 Oct 2004 09:19:10 +0000 (02:19 -0700)]
[PATCH] I2C: i2c bus power management support
The patch below adds power management support to the i2c bus.
It adds just two small functions which call down to the devices
power management functions if they are present, so the i2c device
drivers will receive the suspend and resume events.
Jean Delvare [Tue, 19 Oct 2004 08:24:45 +0000 (01:24 -0700)]
[PATCH] I2C: lm87 driver ported to Linux 2.6
This is my port of the lm87 driver to Linux 2.6. It is based on the
preliminary work of Jeff Oliver. I then significantly improved the code,
added functionality, tested the whole thing on a real motherboard, fixed
a couple remaining bugs, and here we are.
I'll port a number of improvements and fixes back to the 2.4 version of
the driver after lm_sensors 2.8.8 is released (i.e. soon).
Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Jean Delvare [Tue, 19 Oct 2004 08:22:05 +0000 (01:22 -0700)]
[PATCH] I2C: Clean up i2c-amd756 and i2c-prosavage messages
A number of messages in the i2c-amd756 and i2c-prosavage drivers have a
leading ": " (especially the former). This is a legacy from lm_sensors'
printks of the 2.4 times. This patch cleans them up. While I was there,
I dropped a couple useless white spaces and dots as well.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Jean Delvare [Tue, 19 Oct 2004 08:21:48 +0000 (01:21 -0700)]
[PATCH] I2C: Fix amd756 name
This sets the proper name for busses supported by the i2c-amd756 driver.
So far, all busses were named AMD756 regardless of the real hardware.
Setting the real name is certainly less confusing for the user, and the
sensors-detect script expects this too.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Jean Delvare [Tue, 19 Oct 2004 08:21:33 +0000 (01:21 -0700)]
[PATCH] I2C: Update Kconfig for AMD bus drivers
This updates the AMD entries i2c/busses/Kconfig in two ways:
* Add missing PCI dependancy.
* Reword the help so that users know exactly what is supported by each
driver.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
[PATCH] I2C: replace schedule_timeout() with msleep_interruptible() in i2c-ibm_iic.c
Use msleep_interruptible() instead of schedule_timeout() to
guarantee the task delays as expected. Remove the unnecessary
set_current_state() following the if, as schedule_timeout() [and thus,
mlseep_interruptible()] is guaranteed to return in TASK_RUNNING.
Rudolf Marek [Tue, 19 Oct 2004 08:20:59 +0000 (01:20 -0700)]
[PATCH] I2C: fix it8712 detection
Following patch fixes the bug introduced by me in VID VRM patch.
Spotted (and later reviewed) by Jean Delvare. This bug is non-fatal,
it8712 will be just treated as it was before my VID VRM patch.
Tested on it8705 and it8712 hardware.
Signed-off-by: Rudolf Marek <r.marek@sh.cvut.cz> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Jean Delvare [Tue, 19 Oct 2004 08:20:22 +0000 (01:20 -0700)]
[PATCH] I2C: Fourth auto-fan control interface proposal
Here comes my fourth (and hopefully last) sysfs interface proposal for
implementing auto-fan control in 2.6. Previous proposals have been
discussed here:
Renamed files from fan[1-*]_auto_channels to
pwm[1-*]_auto_channels_temp. The change from fan tp pwm is to match the
recent renaming suggested by Mark M. Hoffman [5]. The "_temp" suffix is
to leave some room for a "_fan" suffix at a later time if new chips
drive auto pwm according to fan speeds instead of temperature.
Trip points are now numbered (point1, point2, etc...) instead of named
(_off, _min, _max, _full...). This solves the problem of various chips
having a different number of trip points. The interface is still chip
independent in that it doesn't require chip-specific knowledge to be
used by user-space apps.
The reason for this change is that newer chips tend to have more trip
points. the LM63 has 8, the LM93 has no less than 12. Also, I read in
the LM63 datasheet that ideal pwm vs temperature curve were parabolic in
shape. Seems hard to achieve this if we arbitrarily lock the number of
trip points to 3 ;)
I also introduced an optional hysteresis temperature for trip points.
The LM63 has this. Since it makes full sense I'd expect other chips to
propose this as well.
As before, there are two sets of files, each chip driver picks the one
matching its internal model: trip points are either temperature
channel-dependent (ADM1031...) or pwm channel-dependent (IT87xx...). If
we ever come accross fan speed-driven pwm outputs where trip points are
fan channel-dependent we may have to offer a third set of files. We'll
see when/if this happens.
I hope I have taken everyone's comments and advice into account and we
can make this interface proposal part of the sysfs interface standard
now. I'm sorry it took so long. Comments welcome.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Jean Delvare [Tue, 19 Oct 2004 08:14:51 +0000 (01:14 -0700)]
[PATCH] I2C: Spare 1 byte in lm90 driver
I just noticed the other day that the lm90 driver uses an u16 to store
the value of the 8-bit alarms register. This is most probably due to the
fact that I originally copied the lm90 driver from the lm83 driver,
which actually has two 8-bit registers for alarms, and obviously forgot
to change the variable type.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
* split off ->dma_exec_cmd() from ->ide_dma_[read,write] functions
* choose command to execute by ->dma_exec_cmd() in higher layers
and remove ->ide_dma_[read,write]
* in Etrax ide.c driver REQ_DRIVE_TASKFILE requests weren't
handled properly for drive->addressing == 0
* in trm290.c read and write commands were interchanged
* in sgiioc4.c commands weren't sent to disk devices
* tag REQ_DRIVE_TASKFILE write requests with REQ_RW
* split off ->dma_setup() from ->ide_dma_[read,write] functions
* use ->dma_setup() directly in ATAPI drivers and remove media
checks from ->ide_dma_[read,write]
* ->ide_dma_[read,write,begin] cannot fail now
* in Etrax ide.c setup DMA for ATAPI devices before sending
command to drive (so setup order is the same as for disks)
Russell King [Tue, 19 Oct 2004 20:36:16 +0000 (21:36 +0100)]
[ARM] Add generic RTC implementation.
This provides a number of helper functions and data structures
for RTC implementations to make use of, including a standard
implemention for /proc/driver/rtc and the rtc miscdevice. It
supports runtime registration of RTC timekeeping sources.
Russell King [Tue, 19 Oct 2004 19:02:21 +0000 (20:02 +0100)]
[ARM] Sanitise Footbridge machine class.
Footbridge was suffering from a little lack of care and attention;
it still had the nasty arch.c file with all the associated #ifdef
gross-ness that entailed.
Re-jig footbridge support so that each machine type contains all
the necessary support code, with a separate common implementation
which they all share.
Russell King [Tue, 19 Oct 2004 17:53:05 +0000 (18:53 +0100)]
[ARM] Rehash iwmmxt signal handling.
In the near future, VFP will want to save state onto the user stack.
Therefore, separate out the iwmmxt specific parts, and implement
a generic "safe copy to user space using random CPU instructions".
This is necessary because iwmmxt and VFP both use special CPU
instructions to load and/or save their state.