Russell King [Thu, 16 Jan 2003 15:09:58 +0000 (15:09 +0000)]
[ARM] Fix Integrator __virt_to_bus/__bus_to_virt
__virt_to_bus/__bus_to_virt depended on INTEGRATOR_HDR0_SDRAM_BASE
Unfortunately, this is defined in arch-integrator/platform.h, and
we really don't want to include it in memory.h.
We instead use BUS_OFFSET, which will eventually depend on the CPU
number in the system.
Russell King [Thu, 16 Jan 2003 14:59:45 +0000 (14:59 +0000)]
[ARM] Fix failure paths in fd1772.c initialisation
Ensure that we clean up properly after initialisation error,
releasing all claimed resources in an orderly manner and
returning the correct error code.
Martin J. Bligh [Thu, 16 Jan 2003 03:46:25 +0000 (19:46 -0800)]
[PATCH] (3/3) NUMA rebalancer
Patch from Erich Focht
This adds a hook to rebalance globally across nodes every NODE_BALANCE_RATE
iterations of the rebalancer. This allows us to easily tune on an architecture
specific basis how often we wish to rebalance - machines with higher NUMA
ratios (more expensive off-node access) will want to do this less often.
It's currently set to 100 for NUMA-Q and 10 for other machines. If the
imbalance between nodes is > 125%, we'll rebalance them. The hook for this
is added to the NUMA definition of cpus_to_balance, so again, no impact
on non-NUMA machines.
Martin J. Bligh [Thu, 16 Jan 2003 03:46:10 +0000 (19:46 -0800)]
[PATCH] (2/3) Initial load balancing
Patch from Michael Hohnbaum
This adds a hook, sched_balance_exec(), to the exec code, to make it
place the exec'ed task on the least loaded queue. We have less state
to move at exec time than fork time, so this is the cheapest point
to cross-node migrate. Experience in Dynix/PTX and testing on Linux
has confirmed that this is the cheapest time to move tasks between nodes.
It also macro-wraps changes to nr_running, to allow us to keep track of
per-node nr_running as well. Again, no impact on non-NUMA machines.
Martin J. Bligh [Thu, 16 Jan 2003 03:45:56 +0000 (19:45 -0800)]
[PATCH] (1/3) Minimal NUMA scheduler
Patch from Martin J. Bligh
This adds a small hook to the find_busiest_queue routine to allow us to
specify a mask of which CPUs to search over. In the NUMA case, it will
only balance inside the node (much cheaper to search, and stops tasks
from bouncing across nodes, which is very costly). The cpus_to_balance
routine is conditionally defined to ensure no impact to non-NUMA machines.
This is a tiny NUMA scheduler, but it needs the assistance of the second
and third patches in order to spread tasks across nodes.
Another left-over from ancient module code, it was supposed to return
non-zero if the module has a use count, but currently it always
evaluates to 0.
There are a few users of different types:
(1) ioctl that perform a while(MOD_IN_USE) MOD_DEC_USE_COUNT loop.
Just rip them out, we now have forced module unloading.
(2) printk's that moan if the use-count in not zero in the exitfunc.
Just rip them out, this can't happen.
(3) if(MOD_IN_USE) MOD_DEC_USE_COUNT constructs in ->close of a few
serial drivers. Just remove the conditional, we did a
MOD_INC_USE_COUNT in ->open.
(4) This one is interesting: drivers/sbus/char/display7seg.c uses
the module use count to track openers. Replace this with an
atomic_t.
In addition remove tons of stale comments in network driver that aren't
understandable for anyone who doesn't know ancient Linux module semantics.
Andi Kleen [Thu, 16 Jan 2003 03:36:37 +0000 (19:36 -0800)]
[PATCH] x86_64 update
x86-64 updates for 2.5.58. Changes only x86-64 specific files.
- Rewrote module allocation. Lots of bugs fixed. Module loading
should work now again.
- Kconfig help fixes from Randy Dunlap
- Makefile cleanups from Pavel Machek and Sam Ravnborg
- Assembly cleanups from Pavel
- defconfig update
- Better strlen_user/strnlen_user
- Merge with i386: new ptrace commands, 32bit vsyscall signal trampolines
new deactivate_mm, add asm/bug.h
- Make sure initramfs is freed after booting (thanks to Kai for the hint)
- User per cpu data for profile counters (Ravikiran Thirumalai)
- 32bit compat_* updates from Stephen Rothwell
- Fix race in context switch. The exception handler for bogus segment
loads in __switch_to needs to keep interrupts disabled, otherwise an
interrupt can deadlock on scheduler locks. Also make sure they don't
printk or set oops_in_progress during printk because printk does a
wake_up too.
- Disable 64bit GS base changes for processes. I cannot get it to work
reliably.
- Clear IOPL on kernel entry
Ivan Kokshaysky [Thu, 16 Jan 2003 02:33:03 +0000 (18:33 -0800)]
[PATCH] alpha irq proc update
From Jeff.Wiedemeier@hp.com:
- Only create smp_affinity /proc nodes if a set_affinity handler
is provided.
- Limit the number of irq nodes that will be created in /proc
to avoid overfilling the /proc inode space.
Marc Zyngier [Thu, 16 Jan 2003 03:19:30 +0000 (21:19 -0600)]
EISA naming database
Please note that the naming DB is now completely optional. If there is
no eisa.ids in the drivers/eisa/ directory, build will behave as if
CONFIG_EISA_NAMES is disabled. So this patch can be left out if there
is any objection.
Ivan Kokshaysky [Thu, 16 Jan 2003 01:54:38 +0000 (17:54 -0800)]
[PATCH] alpha PCI setup update
Until now, we were configuring all PCI resources from scratch.
This patch allows to use unchanged PCI setup on platforms
where the firmware does it reasonably well (titan and marvel).
[The patch to setup-bus.c that removes "FIXME" from here (ie makes
pci_assign_unassigned_resources to match its name) exists at least
for two months, but I've yet to convince Linus that it does the
right thing...]
This is a left-over from the old modules code, Rusty stubbed it out
to always return 0. Three scsi pcmcia driver check it for beeing non-NULL,
trying to work around their unload races. I've added #warnings there
and stubbed out the GET_USE_COUNT so we can remove it from the core.
[PATCH] fix signed/unsigned issue in SGI partitioning code
The Linux code for SGI partitions uses an int instead of an unsigned int
in the ondisk structure in two places, which breaks > TB partitions.
While porting the code over from an internal 2.4-based tree I've also
switched it to use the explicit uXX/sXX types everywhere and moved the
struct defintions above sgi_partition().
The input system in 2.5 is able to see the volume keys on inspiron
notebooks w/o help from i8k.c. This patch therefore removes the
new code from i8kutils-1.17 for feeding those keypresses to the
keyboard driver.
This leaves only MODULE_PARM(restricted, "i") as the useful addition
to what was in 2.5.58's i8k.c. This module parm restricts control of
the system fans to processes with CAP_SYS_ADMIN set.
kbuild: Make asm-generic/vmlinux.lds.h usable for IA-64
Allow for different LMA vs VMA (logical/virtual memory address).
IA-64 uses the LMA to tell the bootloader the physical location
of the image, whereas the VMA as always represents the address the
image gets mapped to.
The default (used for non IA-64) is LMA == VMA, which is what
the linker previously assumed anyway.
Also:
o remove duplicate .rodata1 section
o __vermagic doesn't need its own section in vmlinux, it can
just go into .rodata
o .kstrtab hasn't been used since the introduction of the new
module loader, so it should be deleted from the linker scripts
as well (except for arch/um, which does not seem up to date
w.r.t the new module loader yet)
o The kallsyms mechanism has changed to not need its own section,
so again the references in the linker scripts can go away
The current code reserves 60 bytes for the symbol string of every
exported symbol, unnecessarily wasting kernel memory since most symbols
are much shorter. We revert to the 2.4 solution where the actual strings
are saved out of line and only the pointers are kept.
The latest module-init-tools already handle this case, people who are
using older versions need to update to make sure depmod works
properly.
Mac/m68k NCR5380 SCSI updates (forward port of Ray Knight's changes in 2.4.x):
- Forward port of pseudo-DMA from 2.2.20
- Move SCSI host template definition from mac_scsi.h to mac_scsi.c
Q40/Q60 keyboard fixes:
- IRQ definitions were prepended with Q40_
- <asm/keyboard.h> no longer exists
- Let q40kbd_init() fails if not running on a Q40/Q60
- q40kbd_init() must return an error code
- Make q40kbd_{init,exit}() static
Jeff removed the swap_device member from struct swap_info_struct
(http://www.uwsg.iu.edu/hypermail/linux/kernel/0202.1/0258.html)
but it is still used in the m68k arch for the ST-RAM. The below
should remove it.
Frankly, I didn't try compiling... My original intent was to move the
swap_list definition from swap.h to mm/swapfile.c, but m68k still
uses it here :( so perhaps this isn't possible. And I just happened to
stumble upon this.
(from Marcus Alanen <maalanen@ra.abo.fi> through Rusty Trivial Russell)
M68k generic RTC driver updates:
- Revive help text for CONFIG_GEN_RTC
- Re-add lost config option for CONFIG_GEN_RTC_X
- Re-add lost mach_get_ss()
- Export mach_[gs]et_rtc_pll()
- Add implementation of mach_get_ss() and mach_[gs]et_rtc_pll() for Q40/Q60
- Add missing include
- Add implementation of get_rtc_ss()
Martin J. Bligh [Thu, 16 Jan 2003 00:03:24 +0000 (16:03 -0800)]
[PATCH] make vm_enough_memory more efficient
vm_enough_memory seems to call si_meminfo just to get the total
RAM, which seems far too expensive. This replaces the comment
saying "this is crap" with some code that's less crap.
Stephen Rothwell [Wed, 15 Jan 2003 23:51:38 +0000 (15:51 -0800)]
[PATCH] compat_{old_}sigset_t generic part
This creates compat_sigset_t and compat_old_sigset_t i.e. just the
types. This is just the generic part, the architecture specific parts
will be sent to respective maintainers.
Randy Dunlap [Wed, 15 Jan 2003 14:49:30 +0000 (06:49 -0800)]
[PATCH] update LOG BUF SIZE config.
The current LOG_BUF size is a bit confusing the first
time that "make oldconfig" is used. It's difficult to
select anything other than the default value.
Also, you (Linus) expressed a desire to have this
configurable only if DEBUG_KERNEL or "kernel hacking"
was enabled, so I've changed it to accomplish that.
This patch also uses Kconfig in a way that Roman intended
since a patch in 2.5.52 which enables default values if
a prompt is not enabled, but lets values be chosen when
the prompt is enabled. You also asked for this in setting
this config option.
Paul Mackerras [Fri, 17 Jan 2003 02:10:04 +0000 (13:10 +1100)]
PPC32: Better support for PPC 4xx debug facilities.
This provides for separate global and per-thread debug control
register value(s), which are switched as appropriate. This allows
us to use both an external JTAG debugger for debugging the kernel
as well as using gdb to debug user programs.
Patrick Mochel [Wed, 15 Jan 2003 11:41:35 +0000 (05:41 -0600)]
driver model: fix bogus driver binding error reporting and handling.
Some error checking was added ca. 2.5.58 that would remove a device from
its bus's list of devices if device_attach() returned an error. This
included errors returned from drv->probe(), and the -ENODEV error returned
if the device wasn't bound to any driver.
This was BAD since it was perfectly fine for a device not to bind to a
driver immediately, and for drivers to return an error on probe() if the
device doesn't exactly qualify as one it supports.
This changes device_attach() and driver_attach() to both return void,
instead of an error, since they really can never fail hard enough to cause
the device or driver to be removed from the bus.
The pci_enable_device() function will fail at least on i386 (see
arch/i386/pci/i386.c: pcibios_enable_resource (line 260)) if the
resources have not been assigned previously. Hence the ostensible
resource collisions.
I added a small comment (and modified another) so future janitors won't
move pci_enable above pci_assign_resource again.
Nick Holloway [Wed, 15 Jan 2003 06:52:55 +0000 (22:52 -0800)]
[PATCH] cpia driver update
Here are some minor fixes and cleanups to the cpia (Creative WebCam II et
al) driver. These have been extracted from the sourceforge CVS archive,
and I'd like to get these in before a larger change to the parallel port
code to support more transfer modes.
This patch contains:
* cpia: use the <linux/list.h> list implementation, instead of cpia specific
version.
* cpia_pp: don't clear camera list after cameras have been registered (as
this prevents them being deregistered, and oops after module
unload).
* hold cpia_pp list spinlock while walking list, not just during the
element removal.