Commit graph

1480 commits

Author SHA1 Message Date
Andi Kleen b41e29398a [PATCH] x86_64: 386/x86-64 Further AMD dual core fixes
- Remove duplicated ifdef
- Make core_id match what Intel uses
- Initialize phys_proc_id correctly for non DC case
- Handle non power of two core numbers.

Fixes for both i386 and x86-64

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-20 15:48:20 -07:00
Paul Jackson b39c4fab25 [PATCH] cpusets+hotplug+preepmt broken
This patch removes the entwining of cpusets and hotplug code in the "No
more Mr.  Nice Guy" case of sched.c move_task_off_dead_cpu().

Since the hotplug code is holding a spinlock at this point, we cannot take
the cpuset semaphore, cpuset_sem, as would seem to be required either to
update the tasks cpuset, or to scan up the nested cpuset chain, looking for
the nearest cpuset ancestor that still has some CPUs that are online.  So
we just punt and blast the tasks cpus_allowed with all bits allowed.

This reverts these lines of code to what they were before the cpuset patch.
 And it updates the cpuset Doc file, to match.

The one known alternative to this that seems to work came from Dinakar
Guniguntala, and required the hotplug code to take the cpuset_sem semaphore
much earlier in its processing.  So far as we know, the increased locking
entanglement between cpusets and hot plug of this alternative approach is
not worth doing in this case.

Signed-off-by: Paul Jackson <pj@sgi.com>
Acked-by: Nathan Lynch <ntl@pobox.com>
Acked-by: Dinakar Guniguntala <dino@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-20 15:48:19 -07:00
Matt Porter b2665f92ae [PATCH] ppc32: fix CONFIG_TASK_SIZE handling on 44x
This patch fixed CONFIG_TASK_SIZE handling on 44x.  Currently head_44x.S
hardcodes 0x80000000, which breaks if user chooses to change TASK_SIZE
(e.g.  for 3G user-space).  Tested on Ocotea in 3G/1G configuration.

Signed-off-by: Eugene Surovegin <ebs@ebshome.net>
Signed-off-by: Matt Porter <mporter@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-20 15:48:19 -07:00
Kumar Gala 7f8cd80fb2 [PATCH] ppc32: Fix platform device initialization of 8250 serial ports
Initialization of 8250 serial ports that are platform devices require that
at empty entry exists in the array of plat_serial8250_port.  With out an
empty entry we can get some pretty random behavior.

Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-20 15:48:19 -07:00
Jeff Dike 84ddaa8c86 [PATCH] uml: Change printf to printk in console driver
From: Al Viro - we have error messages with KERN_ERR in them, so they
should be printk-ed rather than printf-ed.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-20 15:48:19 -07:00
Jeff Dike 12f49643bc [PATCH] uml: fixrange_init 3-level page table support
From: Al Viro - add three-level page table support to fixrange_init.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-20 15:48:18 -07:00
Jeff Dike 7b9014c1da [PATCH] uml: Remove ubd-mmap support
Finally rip out the ubd-mmap code, which turned out to be broken by design.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-20 15:48:18 -07:00
Jeff Dike 9b67a3c4cd [PATCH] uml: initrd cleanup
The serial UML OS-abstraction layer patch (um/kernel dir).

This moves all systemcalls from initrd_user.c file under os-Linux dir and join
initrd_user.c and initrd_kern.c files in new file initrd.c

Signed-off-by: Gennady Sharapov <Gennady.V.Sharapov@intel.com>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-20 15:48:18 -07:00
Jeff Dike 41a9cf8ebe [PATCH] uml: Export clear_user_*
From: Oleg Drokin: This patch is needed to support kernel modules that want to
use clear_user() (that is exported symbol on all other architectures).

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-20 15:48:18 -07:00
Jeff Dike 7c00c31fc0 [PATCH] uml: multicast driver cleanup
Byte-swapping of the port and IP address passed in to the multicast driver by
the user used to happen in different places, which was a bug in itself.  The
port also was swapped before being printk-ed, which led to a misleading
message.  This patch moves the port swapping to the same place as the IP
address swapping.  It also cleans up the error paths of mcast_open.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-20 15:48:17 -07:00
Jeff Dike 060e352236 [PATCH] uml: Delay loop cleanups
This patch cleans up the delay implementations a bit, makes the loops
unoptimizable, and exports __udelay and __const_udelay.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-20 15:48:17 -07:00
Jeff Dike 13479d52c7 [PATCH] uml: Page fault fixes
Any access to a PROT_NONE page should segfault the process.  A JVM seems to do
this on purpose.  Also, Al noticed some bogus code, which is now deleted.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-20 15:48:17 -07:00
Jeff Dike ba9950c820 [PATCH] uml: small fixes left over from rc4
Some changes that I sent in didn't make 2.6.12-rc4 for some reason.  This
adds them back.  We have
	an x86_64 definition of TOP_ADDR
	a reimplementation of the x86_64 csum_partial_copy_from_user
	some syntax fixes in arch/um/kernel/ptrace.c
	removal of a CFLAGS definition in the x86_64 Makefile
	some include changes in the x86_64 ptrace.c and user-offsets.h
	a syntax fix in elf-x86_64.h
Also moved an include in the i386 and x86_64 Makefiles to make the symlinks
work, and some small fixes from Al Viro.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-20 15:48:17 -07:00
Peter Osterlund 46f4e1b7d5 [PATCH] packet driver permission checking fix
If you tried to open a packet device first in read-only mode and then a
second time in read-write mode, the second open succeeded even though the
device was not correctly set up for writing.  If you then tried to write
data to the device, the writes would fail with I/O errors.

This patch prevents that problem by making the second open fail with
-EBUSY.

Signed-off-by: Peter Osterlund <petero2@telia.com>
Cc: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-20 15:48:16 -07:00
James Bottomley 2bf2c568c8 [SCSI] aic7xxx: fix U160 mode
The new period/dt setting routines don't get the coupling of these
parameters correct.  This means that Domain Validation never gets DT
set, and thus the drive gets restricted to U80.

Fix this by restoring the couplings in the set routines.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20 16:43:51 -05:00
James Bottomley fb3089dfb5 [SCSI] aic7xxx: add back locking
Tampering with the settings has to be done under the host lock ...
slave_alloc isn't called under any lock, so this has to be done
explicitly.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20 15:54:43 -05:00
James Bottomley c7525233d2 [SCSI] aic7xxx: make correct use of slave_alloc/destroy and remove the per device timer
The allocation of all of our components should be done in slave alloc.
Currently it's rather fancifully refcounted in the queuecommand
callback.  This patch moves allocation and destroy to their correct
places in slave_alloc/slave_destory.  Now we can guarantee that
everywhere a device is requested, it's actually been allocated, so don't
check for this anymore.

Additionally, the per device busy timer was the only source of potential
use after free.  It's been deleted because Linux does the correct thing
with busy returns, so there's no need to implement a separate timer in
the driver.

Finally, implement code that forces all the device parameters to zero
(i.e. async and narrow) in the slave alloc, inform the spi class of the
bios recorded maximums and wait until slave configure before trying
anything more adventurous.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20 15:54:42 -05:00
James Bottomley 8e45ebcc66 [SCSI] aic7xxx: remove the completeq
This should finish the spurious queue removal from aic7xxx (there are
other queues that are probably unnecessary, but at least the major and
obviously unnecessary ones are done with).

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20 15:54:40 -05:00
James Bottomley 38c29ce06d [SCSI] aic7xxx: remove the last vestiges of the runq
This was rendered obsolete by the busyq removal; remove some of the last
remnants of its presence.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20 15:54:39 -05:00
Christoph Hellwig 013791ee01 [SCSI] aic7xxx: remove usage of obsolete typedefs
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20 15:54:38 -05:00
Christoph Hellwig 7dfa0f2673 [SCSI] remove dma_mask hacks
pci_alloc_consistent is under 4G by default.  Also simplify the
definition of bus_dmamap_t.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20 15:54:37 -05:00
Christoph Hellwig dedd831081 [SCSI] aic7xxx: remove Linux 2.4 ifdefs
There's not much sense in sharing code anymore now that aic7xxx uses
various transport class facilities.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20 15:54:36 -05:00
Christoph Hellwig c06716fe1c [SCSI] aic7xxx: remove some DV leftovers
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20 15:54:35 -05:00
James Bottomley e4e360c325 [SCSI] remove aic7xxx busyq
The aic7xxx driver has two spurious queues in it's linux glue code: the
busyq which queues incoming commands to the driver and the completeq
which queues finished commands before sending them back to the mid-layer

This patch just removes the busyq and makes the aic finally return the
correct status to get the mid-layer to manage its queueing, so a command
is either committed to the sequencer or returned to the midlayer for
requeue.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20 15:54:34 -05:00
James Bottomley fad01ef88d [SCSI] correct aic7xxx period setting routines
This is similar to the previous sym2 problem.  For Domain Validation to
work we can't allow any period setting to turn wide on if it was
previously off.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20 15:54:33 -05:00
James Bottomley 62a8612972 [SCSI] implement parameter limits in the SPI transport class
There's a basic need not to have parameters go under or over certain
values when doing domain validation.  The basic ones are

max_offset, max_width and min_period

This patch makes the transport class take and enforce these three
limits.  Currently they can be set by the user, although they could
obviously be read from the HBA's on-board NVRAM area during
slave_configure (if it has one).

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20 15:54:32 -05:00
Mark Haverkamp 7c00ffa314 [SCSI] 2.6 aacraid: Variable FIB size (updated patch)
New code from the Adaptec driver.  Performance enhancement for newer
adapters.  I hope that this isn't too big for a single patch.  I believe
that other than the few small cleanups mentioned, that the changes are
all related.

- Added Variable FIB size negotiation for new adapters.
- Added support to maximize scatter gather tables and thus permit
  requests larger than 64KB/each.
- Limit Scatter Gather to 34 elements for ROMB platforms.
- aac_printf is only enabled with AAC_QUIRK_34SG
- Large FIB ioctl support
- some minor cleanup

Passes sparse check.
I have tested it on x86 and ppc64 machines.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20 15:48:00 -05:00
Ju, Seokmann 672b2d38da [SCSI] megaraid version 2.20.4.6
Signed-off by: Seokmann Ju <sju@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20 15:47:59 -05:00
Moore, Eric Dean 7e8a226147 [SCSI] fusion - bump driver version to 3.03.02
Bump driver version to 3.03.02

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20 15:47:58 -05:00
Moore, Eric Dean c1a71d1c04 [SCSI] fusion - mpi headers version 1.5.9
This patch contains update for mpi headers 1.5.9.

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20 15:47:57 -05:00
Moore, Eric Dean 51bbc9c3e8 [SCSI] fusion-kconfig-cleanup
* This patch clarifies help section in FUSION_MAX_SGE entry.

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20 15:47:55 -05:00
Moore, Eric Dean d485eb8305 [SCSI] fusion-kfree-cleanup
This patch is originally From: Jesper Juhl <juhl-lkml@dif.dk>

This patch gets rid of redundant NULL checks prior to calling kfree() in
drivers/message/* There are also a few small whitespace changes in there.

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20 15:47:54 -05:00
Moore, Eric Dean 3fadc59d60 [SCSI] fusion - Adding pci recog support for Fibre 949X and 939X chips
* adding pci id support for new Fibre chips, 949X and 939X
* adding errata workaround - disabling PIO access except during fwdlb.

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20 15:47:53 -05:00
Patrick Mansfield 793698ce28 [SCSI] saved and restore result for timed out commands
Save and restore the scmd->result, so that timed out commands do not
return the result of the TEST UNIT READY or the start/stop commands. Code
is already in place to save and restore the result for the request sense
case.

The previous version of this patch erroneously removed the "if" check,
instead add a comment as to why the "if" is needed.

Signed-off-by: Patrick Mansfield <patmans@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20 15:47:52 -05:00
Linus Torvalds 1c7878f024 Remove some left-over empty files
Hopefully the addition of -E to my applypatch script
will mean that I won't have these kinds of leftovers
in the future.
2005-05-20 13:36:19 -07:00
James Bottomley ad34ea2cc3 merge by hand - fix up rejections in Documentation/DocBook/Makefile 2005-05-20 15:27:44 -05:00
David S. Miller a228dfd5dc [SPARC64]: Fix bad performance side effect of strbuf timeout changes.
The recent change to add a timeout to strbuf flushing had
a negative performance impact.  The udelay()'s are too long,
and they were done in the wrong order wrt. the register read
checks.  Fix both, and things are happy again.

There are more possible improvements in this area.  In fact,
PCI streaming buffer flushing seems to be part of the bottleneck
in network receive performance on my SunBlade1000 box.

Signed-off-by: David S. Miller <davem@davemloft.net>
2005-05-20 11:40:32 -07:00
Christoph Hellwig 90356ac319 [SCSI] remove Documentation/DocBook/scsidrivers.tmpl
This document is rather rudimentary and totally outdated.  Fortunately
Documentation/scsi/scsi_mid_low_api.txt replaces it quite nicely.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20 12:53:55 -05:00
Tejun Heo d8c37e7b9a [SCSI] remove a timer race in scsi_queue_insert()
scsi_queue_insert() has four callers.  Three callers call with
timer disabled and one (the second invocation in
scsi_dispatch_cmd()) calls with timer activated.
scsi_queue_insert() used to always call scsi_delete_timer()
and ignore the return value.  This results in race with timer
expiration.  Remove scsi_delete_timer() call from
scsi_queue_insert() and make the caller delete timer and check
the return value.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20 12:53:54 -05:00
Tejun Heo 5b8ef84258 [SCSI] remove spurious if tests from scsi_eh_{times_out|done}
'if' tests which check if eh_action isn't NULL in both
functions are always true.  Remove the redundant if's as it
can give wrong impressions.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20 12:53:53 -05:00
Tejun Heo 0155a37ea5 [SCSI] remove unnecessary scsi_delete_timer() call in scsi_reset_provider()
scsi_reset_provider() calls scsi_delete_timer() on exit which
isn't necessary.  Remove it.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20 12:53:52 -05:00
Gerd Knorr 21feb5ccd5 [SCSI] convert scsi changer driver from class simple
Here is a incremental patch which switches the driver over to
the new non-simple functions.  Compile-tested.

Signed-off-by: Gerd Knorr <kraxel@bytesex.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20 12:53:51 -05:00
Gerd Knorr daa6eda65a [SCSI] add scsi changer driver
This patch adds a device driver for scsi media changer devices.

Signed-off-by: Gerd Knorr <kraxel@bytesex.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20 12:53:50 -05:00
brking@us.ibm.com 5cbf5eaef7 [SCSI] ipr: Fix ipr PCI hotplug hang with CDROM attach
Currently, during PCI hotplug remove, if the upper layer
drivers of the attached devices send commands down as part
of the remove action, like a CDROM, the hotplug action
will hang forever due to the ipr driver returning
SCSI_MLQUEUE_HOST_BUSY. Patch fixes this.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20 12:53:48 -05:00
Adrian Bunk 380c3877ae [SCSI] drivers/scsi/sym53c416.c: fix a wrong check
The Coverity checker found that this for loop was wrong.

This patch changes it to what seems to be intended.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20 12:53:47 -05:00
Kai Makisara 16c4b3e207 [SCSI] SCSI tape: fix permissions for SG_IO, etc.
This patch is against 2.6.12-rc3 + linus-patch from April 30. The patch
contains the following fixes:

- CAP_SYS_RAWIO is used instead of CAP_SYS_ADMIN; fix from Alan Cox
- only direct sending of SCSI commands requires this permission
- the st status is modified is successful unload is performed using
  SCSI_IOCTL_STOP_UNIT

Signed-off-by: Kai Makisara <kai.makisara@kolumbus.fi>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20 12:53:46 -05:00
brking@us.ibm.com f80ed13934 [SCSI] ipr: Driver version 2.0.14
Bump driver version

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20 12:53:45 -05:00
brking@us.ibm.com 1b69f645f2 [SCSI] ipr: Array error logging fix
Bugme 4547. The following patch fixes a bug in ipr's error logging.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20 12:53:44 -05:00
Jeremy Higdon 7d0e11fb20 [SCSI] qla1280.c - fix result for device Busy and Queue Full
I discovered that the qla1280 driver does not send the correct status
to the midlayer when it gets Queue Full or Busy from a device.

Signed-off-by: Jeremy Higdon <jeremy@sgi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20 12:53:43 -05:00
Moore, Eric Dean d335cc38c7 [SCSI] mptfusion: fix panic loading driver statically compiled
Adjust link ordering in the Makefile.  Also, the ioc->DoneCtx handles
for mptspi/mptfc in the message frame.  And I'm now not seeing the
panic.

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20 12:53:42 -05:00