Dave Jones [Sat, 8 Mar 2003 07:38:32 +0000 (06:38 -0100)]
[CPUFREQ] add support for ICH4-M chipset in speedstep driver
Intel ICH4-M soutbridges use exactly the same register interface for SpeedStep
as ICH2-M and ICH3-M southbridges -- which makes adding support for this
bridge (almost) trivial
Dave Jones [Sat, 8 Mar 2003 07:37:39 +0000 (06:37 -0100)]
[CPUFREQ] updated cpufreq ref-counting and locking scheme
This patch takes use of the now-working cpufreq_interface.kset and
cpufreq_policy.kobj to use reference counting within the cpufreq core
wherever this is more appropriate than the previous approach -- using one
semaphore. Additionally, the callbacks to the driver modules are protected
now.
Dave Jones [Sat, 8 Mar 2003 07:36:56 +0000 (06:36 -0100)]
[CPUFREQ] remove unneeded code
- no cpufreq driver uses the frequency table helper "setpolicy" any more
("target" is much more appropriate for them anyways) - so remove
that helper
- all cpufreq drivers use the advanced registration process, so some
compatibility code can safely be removed.
Dave Jones [Sat, 8 Mar 2003 07:36:30 +0000 (06:36 -0100)]
[CPUFREQ] fix userspace governor.
Let's put the sysfs file exported by the cpufreq userspace governor also
into the cpufreq/ - subdirectory of /sys/devices/sys/cpu0/.
Dave Jones [Sat, 8 Mar 2003 07:35:48 +0000 (06:35 -0100)]
[CPUFREQ] fix cpufreq core breakage(s)
- update two more cpufreq-related sysfs files to the new interface
code
- always store the new, user-requested policy in another struct
cpufreq_policy so that we can safely fall back to the old one in
case something fails (this equals the behaviour before Pat's patch)
- the kobject which was registered in cpufreq_add_dev was inside a variable
private to this function -- so the whole cpufreq sysfs interface returned
-EINVAL.
Steve French [Fri, 7 Mar 2003 11:01:46 +0000 (05:01 -0600)]
Fix oops in getdfs when null path passed in on mount. Fix oops when changed readsize caused readpages problem. Add support for altering rsize so can reduce pages read across net
below default of 4
Ingo Molnar [Fri, 7 Mar 2003 04:19:30 +0000 (20:19 -0800)]
[PATCH] "interactivity changes", sched-2.5.64-B2
This fixes the SMP runqueue locking bug when updating the wakers
priority. It also includes:
- only update the priority and do a requeueing if the sleep average has
changed. (this does not happen for pure CPU hogs or pure interactive
tasks, so no need to requeue/recalc-prio in that case.) [All the
necessary values are available at that point already, so gcc should
have an easy job making this branch really cheap.]
- do not do a full task activation in the migration-thread path - that is
supposed to be near-atomic anyway.
- fix up comments
I solved the SMP locking bug by moving the requeueing outside of
try_to_wake_up(). It does not matter that the priority update is not
atomically done now, since the current process wont do anything
inbetween. (well, it could get preempted in a preemptible kernel, but
even that wont do any harm.)
Ingo Molnar [Fri, 7 Mar 2003 02:41:00 +0000 (18:41 -0800)]
[PATCH] more "interactivity changes", sched-B2
- fix a (now-) bug in kernel/softirq.c, it did a wakeup outside any
atomic regions, which falsely identified random processes as a
non-atomic wakeup, and which causes random priority boost to be
distributed.
- reset the initial idle thread's priority back to PRIO_MAX after doing
the wakeup_forked_process() - correct preemption relies on this.
- update current->prio immediately after a backboost.
- clean up effective_prio() & sleep_avg calculations so that there are
fewer RT-task special cases. This has the advantage of the sleep_avg
being maintained even for RT tasks - this could be advantegous for
tasks that briefly enter/exit RT mode.
Zwane Mwaikambo [Thu, 6 Mar 2003 23:43:51 +0000 (15:43 -0800)]
[PATCH] noirqbalance still doesn't do anything
This one simply sets TARGET_CPUS to cpu_callout_map instead of
cpu_online_map so that when we finally do boot we actually use the other
cpus for servicing interrupts.
David Gibson [Thu, 6 Mar 2003 23:43:30 +0000 (15:43 -0800)]
[PATCH] Squash warning in ohci-pci.c on PowerBooks
Apple PowerBooks want <asm/prom.h> in ohci-pci.c for the prototype of
pci_device_to_OF_node(). This patch adds it to the already present
list of PowerBook specific #includes:
Patrick Mochel [Thu, 6 Mar 2003 14:21:40 +0000 (08:21 -0600)]
sysfs: Fix binary file handling.
From Rusty Lynch:
* makes sysfs cleanup the buffer->data allocated by the attribute write
functions
* fixes a bug that causes the kernel to oops when somebody attempts to
write to the file.
Patrick Mochel [Thu, 6 Mar 2003 14:19:40 +0000 (08:19 -0600)]
sysfs: fix up directory removal, once and for all.
This patch was previously integrated, but dropped erroneously by a bk
merge.
This fixes file cleanup during a sysfs directory removal by deleting files
from ->d_subdirs as they're iterated over, then checking if we can get a
reference on them.
Linus Torvalds [Thu, 6 Mar 2003 13:29:33 +0000 (05:29 -0800)]
Fix a very theoretical race between the new RCU lookup and
concurrent renames in another directory.
I doubt this can be triggered in practice, and the fix is
a bit heavy-handed, but let's see if numbers can show that
the simple fix doesn't show any real lock contention.
H. Peter Anvin [Thu, 6 Mar 2003 09:57:26 +0000 (01:57 -0800)]
[PATCH] bootsect removal
This is the "boot sector removal" patch for i386 updated for Linux
2.5.63-bk7. The only change against the 2.5.59 version is that the
FDOPTS Makefile variable, which lets one create a floppy image with
arbitrary kernel options, has been merged from the x86-64 version, and
the comments have been updated.
The patch removes the in-kernel boot sector, which these days rarely
work correctly (it only supports up to 1 MB kernels, and only work on
legacy floppies -- not on IDE or USB devices, nor on any kind of
emulated devices like El Torito), replaces it with a placeholder stub,
and sets up the Makefile targets to create floppies or floppy images
using SYSLINUX. The FDOPTS Makefile variable can be used to set
kernel command line options (thanks to a suggestion by Andi Kleen.)
Note that the same change has already been applied to the x86-64
architecture. The last hunk of the patch corrects a comment in that
architecture.
Russell King [Thu, 6 Mar 2003 09:49:37 +0000 (01:49 -0800)]
[PATCH] Fix up pci_scan_bridge and friends
Now we tackle pci_add_new_bus and pci_scan_bridge. The hotplug code
currently uses this, but I'd like it to die off; pci_scan_bridge()
should be used to scan behind bridges. This may mean hotplug needs
some changes to pci_scan_bridge - if so, we need to find out what
changes are required and fix it.
pci_alloc_child_bus() does what pci_add_new_bus() did, except it
doesn't attach the new bus to the parents list of child buses. The
only way this bus can be reached from the parent bus is by scanning
the parents devices list, and locating a device with a non-NULL
subordinate bus. The only code which should be doing this is the
PCI code.
Since the new bus will have an empty list head for bus->node, we can
detect unattached buses prety easily. (see pci-3.diff.)
pci_scan_bridge() changes slightly - we use our new pci_scan_child_bus()
function from pci-3.diff, which doesn't attach devices to the global
tree. This means callers of pci_scan_child_bus() and pci_scan_bridge()
(ie, hotplug) will need to call pci_bus_add_devices().
Russell King [Thu, 6 Mar 2003 09:49:30 +0000 (01:49 -0800)]
[PATCH] Convert setup-bus resource allocation to use bus->devices
- Convert setup-bus.c resource allocation to scan bus->devices rather
than bus->children. As noted previously, newly discovered child
buses will not be on the parents list of children buses, so when
we're trying to assign resources, we need to scan the bus for
devices with subordinate buses rather than using the list of children
buses.
Russell King [Thu, 6 Mar 2003 09:49:22 +0000 (01:49 -0800)]
[PATCH] Only add devices to bus->devices while scanning...
The pci_find* functions search using the following lists:
bus->children (for subordinate buses)
pci_root_buses (for all root buses)
pci_devices (for devices)
This leaves one list which we can add devices to without any drivers
finding the new devices before we've finished with them.
- initialise bus->node list head.
- pci_scan_slot will scan the specified slot, and add the discovered
devices to the bus->devices list only. These devices will not
appear on the global device list, and do not show in sysfs, procfs.
pci_scan_slot returns the number of functions found. If you want
to find the devices, you have to scan bus->devices and look for
devices where list_empty(&dev->global_list) is true.
- new function "pci_bus_add_devices" adds newly discovered devices
to the global device lists, and handles the sysfs and procfs
stuff, making the devices available to drivers. All our buses
which have an empty list head are treated as "new" (since they
are not attached to the parent buses list of children) and are
also added. Currently, no buses will be in this state when this
function is called.
- new function "pci_scan_child_bus" scans a complete bus, building
a list of devices on bus->devices only, performing bus fixups
via pcibios_fixup_bus() and scanning behind bridges. It does
make devices externally visible.
- pci_do_scan_bus retains its original behaviour - ie, it scans
and makes devices available immediately.
Russell King [Thu, 6 Mar 2003 09:49:14 +0000 (01:49 -0800)]
[PATCH] Eliminate stack allocation of struct pci_dev...
- Eliminate the stack allocation of a struct pci_dev, and make
pci_scan_slot() take a bus and a devfn argument.
- Add "dev->multifunction" to indicate whether this is a multifunction
device.
- Run header fixups before inserting the new pci device into any
device lists or announcing it to the drivers.
- Convert some more stuff to use the list_for_each* macro(s).
Alan Cox [Thu, 6 Mar 2003 09:43:28 +0000 (01:43 -0800)]
[PATCH] bring ide-disk driver into line with 2.4.21pre
This doesn't have the new -ac testing stuff from 2.4.21pre5-ac but it
has the stuff I now trust in it. This fixes the cache flush stuff and
also means ide-disk now should be safe shared IRQ
Alan Cox [Thu, 6 Mar 2003 09:43:18 +0000 (01:43 -0800)]
[PATCH] clean up all the console inits using an initcall variant
Dave Woodhouse did this a while ago and its been kicking around in my
tree just fine. This gets rid of a lot of the init lists of functions
still left in the kernel by having an __init type array built up for the
consoles as well
Alan Cox [Thu, 6 Mar 2003 09:42:55 +0000 (01:42 -0800)]
[PATCH] update PCI quirks
ALi Magik requires workarounds for TV chips
IDE controllers require proper handling in legacy mode
PXB must be disabled on C0 450NX or the IDE will corrupt memory
VIA northbridge devices require the interrupt line is written
NEC_CBUS_2/3 require ISA DMA workarounds
platform_device_register may only be called after all class-specific
device data is initialized, or else the class-type add_device call (which
enables the pcmcia sockets) will fail.
imm.c: spelling
scsi.h: remove old and now incorrect comment
scsi_scan.c: remove superfluous final return
scsi_error.c: apart from similar trivialities the only change:
If a command fails (e.g. because it belongs to a newer
SCSI version than the device), it is fed to
scsi_decide_disposition(). That routine must return
SUCCESS, unless the error handler should be invoked.
In the situation where host_byte is DID_OK, and message_byte
is COMMAND_COMPLETE, and status is CHECK_CONDITION, there is
no reason at all to invoke aborts and resets. The situation
is normal. I see here UNIT ATTENTION, Power on occurred
and ILLEGAL REQUEST, Invalid field in cdb.
The 2.5.64 code does not return SUCCESS, but it returns the
return code of scsi_check_sense(), and that may be FAILED
in case we do not have valid sense.
Andrew Morton [Thu, 6 Mar 2003 09:14:13 +0000 (01:14 -0800)]
[PATCH] remove __pgd_offset
Patch from Dave Hansen <haveblue@us.ibm.com>
__pgd_offset() and pgd_offset() are completely different functions.
__pgd_offset() is really just a helper to figure out which entry in a
pgd an address would fall into. pgd_offset() does all the leg work and
actually fetches the real pgd entry.
pgd_index() is a much saner name for what __pgd_offset() does. In fact,
we do this:
#define __pgd_offset(address) pgd_index(address)
The attached patch removes all instances of __pgd_offset and just
replaces them with pgd_index.
Andrew Morton [Thu, 6 Mar 2003 09:14:05 +0000 (01:14 -0800)]
[PATCH] fix inode reclaim imbalance
Well I thought we were shooting down unused inodes a bit aggressively. With
30,000 inodes total and 1000 unused, the 1000 are getting reclaimed
instantly.
shrink_icache_memory() needs to return the number of reclaimable inodes to
page reclaim, not the total number.