Dave Jones [Thu, 27 May 2004 15:28:39 +0000 (16:28 +0100)]
[AGPGART] SIS AGP updates
Signed-off-by: Dave Jones <davej@redhat.com>
From: "Heilmann, Oliver" <Oliver.Heilmann@drkw.com>
* renamed sis_648_enable to sis_delayed_enable and removed chipset
references
* All chipsets that require the sis delay-hack are listed in
sis_broken_chipsets (and no other place).
* There are two new module options to force agp3-spec compliant
initialisation and/or the delay hack. As I only have a 648FX chipset to
test on, I figured this might be useful to experiment with on other
chipsets (i.e.746[FX]).
Basically, if you have an SiS chipset and your machine freezes when you
start X, try the -agp_sis_force_delay=1 option. If this fixes your
problem add your PCI ID to sis_broken_chipsets in sis-agp.c
Note to 746[FX] people: I'm still not sure what the differences between
the two 746 versions and the 648 series are. If this patch does not work
for you try playing with the agp_sis_agp_spec module option. Any
feedback is greatly appreciated.
Dave Jones [Sun, 23 May 2004 14:02:45 +0000 (15:02 +0100)]
[AGPGART] Fix a potential leak in intel driver.
It's not leaking anything currently, as agp_alloc_bridge() doesn't do any
actual allocations right now, but if/when things get changed to support
multiple bridges, these error paths need to free up the allocation.
Dave Jones [Wed, 12 May 2004 12:50:18 +0000 (13:50 +0100)]
[AGPGART] Various Intel/EM64T AGP fixes.
From Andi Kleen.
- Add full PCI IDs to the module table for intel-agp and intel-mch-agp.
Don't use PCI_ANY_ID for device, since the drivers cannot handle unknown
devices anyways.
This fixes the problems with them loading both when compiled in and
also helps external tools that use the module PCI table to find the
correct driver.
- Remove wrong hack in intel-mch-agp that checked for long mode.
EM64T capability has nothing to do with the MCH version.
To avoid double probing the fix above is better.
- Handle the case of no AGP capability (unlikely, but better to handle it)
Dave Jones [Tue, 6 Apr 2004 23:12:22 +0000 (00:12 +0100)]
[AGPGART] Fix SiS 746 again.
Turns out that this chipset won't work in AGPv3 mode with the generic AGPv3 routines.
*somehow*, it works in AGPv3 mode with AGPv2 aperture sizing etc. Very, very strange.
Still, until we get some docs from SiS, some support is better than none.
Dave Jones [Fri, 2 Apr 2004 11:44:51 +0000 (12:44 +0100)]
[AGPGART] EM64T driver should only run when we have a supported CPU.
Otherwise we see strange things at boottime if we compile in all drivers, like this..
Dave Jones [Thu, 1 Apr 2004 19:59:24 +0000 (20:59 +0100)]
Merge delerium.codemonkey.org.uk:/mnt/nfs/sepia/bar/src/kernel/2.6/trees/bk-linus
into delerium.codemonkey.org.uk:/mnt/nfs/sepia/bar/src/kernel/2.6/trees/agpgart
Andrew Morton [Wed, 31 Mar 2004 00:34:59 +0000 (16:34 -0800)]
[PATCH] ppc64: clean up virtual <-> absolute code
From: Anton Blanchard <anton@samba.org>
Rusty Russell <rusty@rustcorp.com.au>
The iSeries has an arch-specific mapping from physical <-> absolute
addresses. Fortunately this is only used in a few places. However, the
following arch-specific macros/functions are provided in addition to the
standard macros:
Reduce them to these, with slightly shorter names, and taking either pointers
or unsigned long (as per __va and __pa) rather than making the caller cast:
abs_to_phys()
phys_to_abs()
And helper macros:
virt_to_abs()
abs_to_virt()
As is standard, virtual addresses are returned as void *, physical and
absolute as unsigned long.
Note that the change the iSeries_setup is a little subtle: ea is set to
__va(pa) above, so "phys_to_abs(pa)" is the same as "virt_to_abs(ea)".
Also, REALADDR is renamed to ISERIES_HV_ADDR and used in a couple of places
where appropriate.
This backs out Maneesh's sysfs patch that was recently added to the
kernel.
In its defense, the original patch did solve some fixes that could be
duplicated on SMP machines, but the side affect of the patch caused lots
of problems. Basically it caused kobjects to get their references
incremented when files that are not present in the kobject are asked for
(udev can easily trigger this when it looks for files call "dev" in
directories that do not have that file). This can cause easy oopses
when the VFS later ages out those old dentries and the kobject has its
reference finally released (usually after the module that the kobject
lived in was removed.)
I will continue to work with Maneesh to try to solve the original bug,
but for now, this patch needs to be applied.
[PATCH] ppc64: Add a sync in context switch on SMP
For the same reason as ppc32, we need to ensure that all stores
done on a CPU has reached the coherency domain and are visible
to loads done by another CPU when context switching as the same
thread may be rescheduled almost right away there.
On ppc32, CONFIG_PREEMPT wasn't settable along with CONFIG_SMP
for historical reasons (smp_processor_id() races). Those races have
been fixes since then (well, should have been at least) so it's now
safe to allow both options.
This fixes a few issues with context switch on ppc32:
- Makes sure we properly flush out all stores to the coherency domain
when switching out, since the same thread could be switched back in
on another CPU right away, those stores must be visible to all other
CPUs.
- Remove dssall in the assembly calls and do it now once in switch_mm
(stop vmx streams). Assume the G5 doesn't need a sync after dssall.
- Remove bogus isync in the loop setting the userland segment registers
- Do not switch the userland segments when the mm stays the same
Add a warning if enable_kernel_{fp,altivec} is called with preempt
enabled since this is always an error, and make sure the alignement
exception handler properly disables preempt when doing FP operations.
Andrew Morton [Tue, 30 Mar 2004 02:41:57 +0000 (18:41 -0800)]
[PATCH] Make pdflush run at nice 0
Since pdflush was converted to be launched by the kthread infrastructure it
has inherited keventd's `nice -10' setting. That hurts interactivity when
pdflush is doing lots of work writing back through the dm-crypt layer.
Andrew Morton [Tue, 30 Mar 2004 02:41:44 +0000 (18:41 -0800)]
[PATCH] catch errors when completing bio pairs
From: Mike Christie <michaelc@cs.wisc.edu>
A couple of drivers can sometimes fail the first segments in a bio then
requeue the rest of the request. In this situation, if the last part of
the bio completes successfully bio_pair_end_* will miss that the beginging
of the bio had failed becuase they just return one when bi_size is not yet
zero. The attached patch moves the error value test before the bi_size to
catch the above case.
Andrew Morton [Tue, 30 Mar 2004 02:41:31 +0000 (18:41 -0800)]
[PATCH] Fix BLKPREP_KILL
From: Jens Axboe <axboe@suse.de>
Samuel Rydh wrote:
If a MODE_SENSE(6) command is sent to an IDE cd using the CDROM_SEND_PACKET
ioctl, then the kernel freezes solidly. To reproduce this, one can take the
SCSI cmd [1a 08 31 00 10 00] and a 16 byte data buffer.
After some bug hunting, I found out that the following is what happens:
- ide-cd recognizes that MODE_SENSE(6) isn't supported and tries
to abort the request from ide_cdrom_prep_pc by returning BLKPREP_KILL.
- in elv_next_request(), the kill request is handled by
the following code:
while (end_that_request_first(rq, 0, rq->nr_sectors))
;
end_that_request_last(rq);
The while loop never exits. The end_that_request_first() doesn't do anything
since rq->nr_sectors is 0; it just returns "not-done" after handling those 0
bytes (rq->bio->bi_size is 16).
Jaroslav Kysela [Mon, 29 Mar 2004 14:26:33 +0000 (16:26 +0200)]
ALSA CVS update - Clemens Ladisch <clemens@ladisch.de>
AC97 Codec Core
don't clobber other bits in SERIAL_CFG register with AD codecs when changing codec selection bits
Jaroslav Kysela [Mon, 29 Mar 2004 14:21:17 +0000 (16:21 +0200)]
ALSA CVS update - Jaroslav Kysela <perex@suse.cz>
PCM Midlevel
Fix in snd_pcm_timer_resolution_change() - it no longer oops when
32-bit value overflows.
Jaroslav Kysela [Mon, 29 Mar 2004 14:20:32 +0000 (16:20 +0200)]
ALSA CVS update - Jaroslav Kysela <perex@suse.cz>
Sound Core PDAudioCF driver
Adrian Bunk <bunk@fs.tum.de>
Fix warnings (SNDRV_GET_ID is not required since these files don't use get_id).
Jaroslav Kysela [Mon, 29 Mar 2004 14:17:10 +0000 (16:17 +0200)]
ALSA CVS update - Clemens Ladisch <clemens@ladisch.de>
USB generic driver
replace usage of interface index with calls to usb_ifnum_to_if (forgot this in 1.88)
Jaroslav Kysela [Mon, 29 Mar 2004 14:16:47 +0000 (16:16 +0200)]
ALSA CVS update - Clemens Ladisch <clemens@ladisch.de>
USB generic driver
remove calls to usb_driver_release_interface
(not needed when disconnect is called)
Harald Welte [Mon, 29 Mar 2004 12:26:56 +0000 (04:26 -0800)]
[NETFILTER]: Fix DELETE_LIST oopses.
We've now narrowed down the issue of kernel oopses in combination with
'LIST_DELETE' syslog messages happening in certain setups.
Apparently people who do not enable CONFIG_IP_NF_NAT_LOCAL and do
DNAT/REDIRECT and want to connect locally from the gateway via DNAT to
the DNAT'ed address experience the bug ;)
Patch courtesy of KOVACS Krisztian and Henrik Nordstrom
Jeff Garzik [Mon, 29 Mar 2004 08:17:18 +0000 (00:17 -0800)]
[PATCH] fix SATA simulation of 6-byte read/write
Here's one for -rc... either this bit is assumed on most modern drives,
or nobody uses the 6-byte commands for read/write (which is very
likely). Either way it definitely wants fixing.
Since we use the modern "LBA" method of addressing sectors, this bit
must be present in the Device register when issuing a read or write.
There are three code paths that need this bit, and only two of them
actually set it. This patch fixes the third (and apparently never used)
code path.
Russell King [Mon, 29 Mar 2004 20:48:20 +0000 (21:48 +0100)]
[ARM] Clean up coherent DMA allocator from previous changes.
- Since the coherent DMA allocator is not currently compatible with
HUGETLB, ensure that we fail at compile time should this option be
selected.
- Move struct device/dma mask handling into consistent_alloc().
- Complain if someone tries to allocate coherent memory larger than
their DMA mask will permit.
- Rename consistent_alloc() to __dma_alloc() to ensure that there
is no confusion that consistent_alloc() has gone.
- Ensure warnings and errors report the correct function name.
Russell King [Mon, 29 Mar 2004 12:16:20 +0000 (13:16 +0100)]
[ARM] Extend DMA API on ARM for DMA-able writecombining memory.
This is mainly for ARM framebuffer drivers, some of which are
presently either open-coding this functionality, or using some
internal ARM architecture function to get what they want.
Andrew Morton [Mon, 29 Mar 2004 06:52:25 +0000 (22:52 -0800)]
[PATCH] inode dirtying timestamp fix
It's a bit late in 2.6.5-rc for this, but it does fix a significant bug: for
the first five minutes after boot, prior to the jiffy wrap, /bin/sync doesn't
write all of the dirty data.
We currently record an inode's time-of-first-dirtying in the address_space.
This causes a few problems with dirty block special inodes: when the device
node for /dev/hda1 needs to be written back we bogusly inspect the timestamp
for the address_space, which belongs to a different inode.
So move the inode's dirtying time up into the inode itself.
This means that for block-special inodes, inode->dirtied_when represents the
time at which the inode itself was dirtied.
For regular files it represents the time at which the inode or its pages were
dirtied.
For blockdevs, the time-of-first-dirtying is recorded in the kernel-internal
blockdev inode. Only I_DIRTY_PAGES makes sense on these inodes.
The reason all this works is that when dirtying a page we always run
__mark_inode_dirty(page->mapping->host);
which refers to the kernel-internal blockdev inode.