Andrew Morton [Wed, 19 May 2004 09:32:36 +0000 (02:32 -0700)]
[PATCH] system_state splitup
Split the system_state state `SYSTEM_SHUTDOWN' into SYSTEM_HALT,
SYSTEM_POWER_OFF and SYSTEM_RESTART and export system_state to modules.
This allows driver shutdown routines to know why they are being shutdown. The
IDE subsystem wants this so that it knows to not spin the disks down across a
reboot.
This allows building the math-emu code as a module only when
CONFIG_SMP is not set. The fp trap handler cannot be preempted
on a single-CPU (as CONFIG_PREEMPT is not going to be supported
on alpha), so the module can be safely unloaded at any time.
Chris Mason [Wed, 19 May 2004 00:18:07 +0000 (17:18 -0700)]
[PATCH] Fix reiserfs inode size update race
reiserfs_file_write unlocks the pages it operated on before updating
i_size. This can lead to races with writepage, who checks i_size when
deciding how much of the file to zero out.
This patch also replaces SetPageReferenced with mark_page_accessed() in
reiserfs_file_write
This was verified to fix the BitKeeper data corruption problems that
Steven Cole has been debugging, where concurrent writes to a file and
writebacks to disk would cause zeroes in the file when CONFIG_PREEMPT
was enabled.
- fix arch/arm/Kconfig to allow IDE only on platforms supporting it
- introduce IDE_ARCH_OBSOLETE_INIT and ide_default_io_ctl() so
we can use generic ide_init_hwif_ports() and kill no longer needed
<asm-arm/arch-*/ide.h> (leave broken lh7a40x and sa1100 versions)
Add drivers/ide/arm/ide_arm.c for simple default IDE interfaces
and clean obsolete ide_init_default_hwifs() implementations
in asm-arm/arch-{cl7500,rpc,shark}/ide.h and asm-arm26/ide.h.
This allows us to kill ide_init_default_hwifs() completely
in the next patch (because lh7a40x and sa1100 are broken).
Scott Feldman [Tue, 18 May 2004 16:39:57 +0000 (12:39 -0400)]
[PATCH] e100: fix for incoherent arches
* Changed mapping on Rx skb to bi-directional. skb->data holds both the
RFD structure and the packet data, and the RFD is read/written by
HW. Issue found on Xscale HW that doesn't handle cache syncs auto-
matically. Other changes in patch are whitespace/spelling.
Andrew Morton [Tue, 18 May 2004 15:01:15 +0000 (08:01 -0700)]
[PATCH] ppc64: fix rtas error log location
From: Anton Blanchard <anton@samba.org>
From: Nathan Lynch <nathanl@austin.ibm.com>
Somehow we've been placing the rtas error_log file at /proc/ppc64/error_log,
which breaks at least one application I know of. It is supposed to be at
/proc/ppc64/rtas/error_log (this is the 2.4 behavior).
On machines with Altivec (i.e. G4 and G5 processors), the altivec
floating-point instructions can operate in two modes: one where
denormalized inputs or outputs are truncated to zero, and one where they
aren't. In the latter mode the processor can take an exception when it
encounters denormalized floating-point inputs or outputs rather than
dealing with them in hardware.
This patch adds code to deal properly with the exception, by emulating the
instruction that caused the exception. Previously the kernel just switched
the altivec unit into the truncate-to-zero mode, which works but is a bit
gross. Fortunately there are only a limited set of altivec instructions
which can generate the assist exception, so we don't have to emulate the
whole altivec instruction set.
This patch also makes sure that we always have a handler for the altivec
unavailable exception. Without this, if you run a kernel that is not
configured for altivec support on a machine with altivec, it works fine
until a user process tries to execute an altivec instruction. At that
point the kernel thinks it has taken an unknown exception and panics. With
this patch it sends a SIGILL to the process instead.
Andrew Morton [Tue, 18 May 2004 14:59:23 +0000 (07:59 -0700)]
[PATCH] ppc32: some whitespace fixes
From: Paul Mackerras <paulus@samba.org>
This patch does nothing but fix up whitespace in three files in arch/ppc.
It deletes trailing blanks and tabs in several places and joins two lines
that didn't need to be split.
Andrew Morton [Tue, 18 May 2004 14:59:11 +0000 (07:59 -0700)]
[PATCH] ppc32: IBM PowerPC 750GX Support
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
From: Bryan Rittmeyer <bryan@staidm.org>
This patch adds preliminary support for the IBM PowerPC 750GX. In summary
this part is a PPC750FX ramped to 1 GHz with a 1MB 4-way L2 and more
advanced I/O pipelining. It is beginning to appear in embedded systems and
was rumored to be under evaluation inside Apple. Tested on PVR 70020101;
please merge.
Olof Johansson [Mon, 17 May 2004 14:12:36 +0000 (07:12 -0700)]
[PATCH] ppc64: fix non-SMP build break
arch/ppc64/lib/locks.c was recently added by Paulus' lock rewrite. It's
always compiled, which breaks non-SMP builds. Below patch makes it depend
on CONFIG_SMP.
Russell King [Mon, 17 May 2004 23:28:23 +0000 (00:28 +0100)]
[ARM] Update atomic.h
This re-jigs atomic.h by providing atomic_add_return and
atomic_sub_return as other architectures do. This allows us to
implement the atomic ops that test the new value without having
to write the underlying atomic operation in various forms.
Ian Campbell [Mon, 17 May 2004 21:02:14 +0000 (22:02 +0100)]
[ARM] Fix use of page->count
Patch from: Ian Campbell
This changes the atomic_t in struct page named count into a private
member _count which breaks arch/arm/mm/init.c at line 80 which reads
page->count directly in show_mem().
The comments in the above changeset suggest that page_count(page) is
precisely equal to the old page->count semantics, even though the
semantics of _count are different, so I think the following is correct
David Brownell [Mon, 17 May 2004 08:33:22 +0000 (01:33 -0700)]
[PATCH] USB: ethernet/rndis gadget address params
This resolves a FIXME by adding module parameters that can
be used to provide stable (vs random) addresses, and gets
rid of a runtime error from obsolete module parameter usage
in the RNDIS code.
The stable ethernet addresses are nice to hosts, which will
normally want to save them away in config databases. For
example, without stable addresses Windows XP will end up
recording quite a lot of RNDIS devices.
David Brownell [Mon, 17 May 2004 08:32:03 +0000 (01:32 -0700)]
[PATCH] USB: RNDIS (and CDC) filter flag handling
This should fix the problem David Meggy found, where RNDIS was setting
the OID_GEN_CURRENT_PACKET_FILTER state incorrectly. It's the same
issue Andrew Morton noticed a while back, for that matter, but with
more than just a "now compiles on 64 bit" fix.
Basically the code needs to interpret 32 bits provided in the request
from the (Windows) host, rather than 8 bits of other memory that's got
some irrelevant value.
The fix is just to save the 32 bits. I did the same thing with the
CDC Ethernet filter, which should eventually be used the same way: to
limit what packets get sent to the host. Also defined a couple more
of the CDC requests.
David Brownell [Mon, 17 May 2004 04:13:32 +0000 (21:13 -0700)]
[PATCH] USB: fix MSEC_TO_JIFFIES in usb code
Here are some MSEC_TO_JIFFIES() fixes missed by whoever did it,
plus a minor fix to grab root_hub->serialize() during OHCI
suspend. (I forgot to cut/paste those lines from resume.)
(gdb) list *serial_open+0x38
0xc046a188 is in serial_open (drivers/usb/serial/usb-serial.c:465).
460
461 /* get the serial object associated with this tty pointer */
462 serial = usb_serial_get_by_index(tty->index);
463
464 /* set up our port structure making the tty driver remember our port object, and us it */
465 portNumber = tty->index - serial->minor;
466 port = serial->port[portNumber];
467 tty->driver_data = port;
468
469 port->tty = tty;
Jeff Garzik [Sun, 16 May 2004 21:41:56 +0000 (17:41 -0400)]
[libata] replace ATA_QCFLAG_ATAPI with inline helper
Detection of an ATAPI taskfile is possible using a simple test
on existing information, so there is no need to cache this value
in a separate flag (ATA_QCFLAG_ATAPI). Instead, create and use
a new helper function is_atapi_taskfile().
* SEEK(6), SEEK(10), and REZERO_UNIT are no-ops. Unconditionally
complete these commands with success.
* MODE SENSE caching page work:
* correct page length
* set bit, if read-ahead is disabled
* set bit, if writeback caching is enabled
(previously, this bit was never set, even if
writeback caching was enabled)
* add MODE SENSE r/w error recovery page
Jeff Garzik [Sun, 16 May 2004 18:19:19 +0000 (14:19 -0400)]
[libata] comments and constants
* note a nasty problem with shared interrupts that must be fixed
before we turn on certain code paths.
* add a few comments to the READ CAPACITY scsi simulator
* remove a FIXME comment from the TEST UNIT READY scsi simulator
* add constant for ATA command CHECK POWER MODE, and associated
"mandatory" power management feature set bit.
The SCSI T10 committee is working on a document describing a standard
method for translating ATA<->SCSI, since it being done quite often
these days. Some of the recommendations are reasonable, and we implement
two here:
* Mirror that ATA 'removeable media' bit into INQUIRY output.
* Change behavior of INQUIRY output field 'product revision' from
the libata software version number to the first 4 bytes of the
ATA device's firmware revision number.
Rather than cache the firmware revision in struct ata_device, as was/is
done with two other strings, I took the opportunity to eliminate the
caching of the two other strings, 'vendor' and 'product'. These strings
are now retrieved as needed from the IDENTIFY [PACKET] DEVICE info page,
since we cache its entire contents.
Retrieving a string from the identify-device page is done via the
helper function ata_dev_id_string(), which is now exported.
This patch winds up making struct ata_device 40 bytes smaller, and
the libata core gets a bit smaller as well.
Jeff Garzik [Sun, 16 May 2004 14:48:08 +0000 (10:48 -0400)]
[libata] remove redundant use of ATA_QCFLAG_SG in ATAPI packet translation
ata_scsi_translate() sets this flag for all ATA->SCSI translated
commands, so it need not be done in atapi_xlat(). The now-removed
use in atapi_xlat() was also inconsistent WRT PIO versus DMA.
Jeff Garzik [Sun, 16 May 2004 14:35:15 +0000 (10:35 -0400)]
[libata] DMADIR support
DMADIR bit is necessary for some PATA->SATA bridges. These
bridges require the OS driver to specify the data xfer direction,
for PACKET (a.k.a. scsi) commands.
A reliable DMADIR detection method hasn't yet been developed,
and ATAPI is still a WIP, so DMADIR is enabled with an ifdef for
now.
Russell King [Sun, 16 May 2004 13:08:21 +0000 (14:08 +0100)]
[SERIAL] Remove base_baud default from 8250_pci
Since all boards specify base_baud, the code to default base_baud to
the architecture-defined BASE_BAUD is redundant. Also, defaulting
to the architecture-defined BASE_BAUD is wrong since the UARTs on a
serial PCI card will be clocked at the same rate no matter what the
architecture of the host machine.