Make the swap code conditional on CONFIG_SWAP. This is mostly for
uClinux, but !CONFIG_SWAP compiles and boots fine for i386, too -
the only problem I've seen is that X doesn't starts, it's probably
shm-related, thus it's disabled unconditionally for "normal" arches.
The patch makes three files in mm/ conditional on CONFIG_SWAP, reorganzies
include/linux/swap.h big time to provide stubs for the !CONFIG_SWAP case,
moves the remaining /proc/swaps code to swapfile.c and cleans up some
more MM code to compile fine without CONFIG_SWAP
Now that m68knommu and v850 are merged we need all other architectures
to define CONFIG_SWAP and CONFIG_MMU so that we can make code
conditional on it.
Russell King [Sat, 2 Nov 2002 15:26:37 +0000 (15:26 +0000)]
[SERIAL] Tidy up 8250 port type detection
The original port detection code was one large function with many
tests without any clear structure.
This cset cleans this up, splitting out the tests for 8250/16450
vs 16550 vs 16550A vs later ports, and adds comments about why
we test what we're testing.
Russell King [Sat, 2 Nov 2002 14:36:42 +0000 (14:36 +0000)]
[SERIAL] Make ALPHA_KLUDGE_MCR more generic for bluetooth modems, etc
In addition to the Alpha OUT1/OUT2 kludge, devices like Bluetooth
modems connected to serial ports make use of the modem control lines
in non-standard ways. Therefore, we implement a more flexible way to
allow the modem control outputs to be forced to particular values
irrespective of the normal usage of these signals.
Russell King [Sat, 2 Nov 2002 12:00:14 +0000 (12:00 +0000)]
[SERIAL] Fix up 8250 IRQ chain handling
- Unlink port from chain if request_irq fails
- Allow port to define whether we use shared IRQs
(this is required for PCMCIA serial cards where the serial
card shares the same IRQ as the socket status IRQ.)
- Convert remaining ASYNC_ flags to UPF_ flags
Russell King [Sat, 2 Nov 2002 11:24:58 +0000 (11:24 +0000)]
[SERIAL] Remove struct pci_board from init_fn
Traditionally, we allocated the private array of port parameters based on
the detected board->num_ports, and then called the init_fn with the board
pointer (which points into the global table.) Some init_fn implementations
modify num_ports, which therefore affects the global table. Unfortunately,
this means that if the init_fn increases num_ports (because we have two
almost identical cards, the first with a smaller number of ports than the
second), we will overwrite memory which hasn't been allocated to us.
This cset no longer passes the board pointer into the init_fn, but instead
allows the init_fn to return the number of ports found, or zero to use the
default value in board->num_ports, or negative error number.
Russell King [Sat, 2 Nov 2002 10:59:49 +0000 (10:59 +0000)]
[SERIAL] Rename uart_event() to uart_write_wakeup()
uart_event() only has one purpose, which is to wake up any pending
writers via the line discipline. Rename it to reflect its real
functionality, and drop EVT_WRITE_WAKEUP.
I finally had time to look at the Orlov patches, and found a memory
leak; sbi->s_debts wasn't getting freed when the filesystem was
getting unmounted, or in the error path.
This patch also makes the following cleanups/changes:
1) Use sbi->s_debts instead of sbi->debts --- all other fields in
struct ext2_sb_info are prefixed by "s_", so this makes things
consistent.
2) Add support for a new inode flag, EXT2_TOPDIR_FL, which tells tells
the Orlov allocator to treat that directory as the top of
directory hierarchies, so that new subdirectories created in
that directory should be spread apart. System administrators
should set this flag on directories like /usr/src, /usr/home, etc.
3) Add a mount-time flag, -o oldalloc, which forces the use of the old
inode (pre-Orlov) allocator. This makes it easier to do
comparison benchmarks, and in case people want to use the old
algorithm.
Russell King [Fri, 1 Nov 2002 23:59:33 +0000 (23:59 +0000)]
[ARM] 2.5.45 updates
- Convert to new configuration language and fix up HEX config symbols
- Fix build errors for !CONFIG_KALLSYMS case
- Add module list to oopsen.
- Add POLLREMOVE
Dave Jones [Fri, 1 Nov 2002 06:22:47 +0000 (22:22 -0800)]
[PATCH] Double x86 initialise fix.
For many moons, we've been executing identify_cpu()
on the boot processor twice on SMP kernels.
This is harmless, but has a few downsides..
- Extra cruft in bootlog/dmesg
- Spawns one too many timers for the mcheck handler
- possibly other wasteful things..
This seems to do the right thing here, and has been
acked (after some minor squibbles) on l-k.
Dave Jones [Fri, 1 Nov 2002 06:22:26 +0000 (22:22 -0800)]
[PATCH] Clean up capabilities printing.
The machine check initialisation prints some blurb
which makes the capabilities dumping a little untidy.
By initialising it slightly later, we get something that
looks a lot better.
Trond Myklebust [Fri, 1 Nov 2002 06:14:29 +0000 (22:14 -0800)]
[PATCH] another kmap imbalance in 2.4.x/2.5.x RPC
We've uncovered yet another kmap imbalance in the new RPC code. This
looks like it might be the last one (my debugging printks have been
unable to unearth any more). One line fix + 4 line comment appended.
John Stultz [Fri, 1 Nov 2002 04:06:50 +0000 (20:06 -0800)]
[PATCH] linux-2.5.45_notsc-warning_A0
This is a minor cleanup that removes two instances of CONFIG_X86_TSC
(lets the compiler optimize it out), and adds a warning message should
anyone pass "notsc" to a kernel compiled w/ CONFIG_X86_TSC (which
ignores it).
This is basically a forward port of a patch I got into 2.4 a while back.
Andrew Morton [Fri, 1 Nov 2002 04:02:41 +0000 (20:02 -0800)]
[PATCH] driverfs topology cleanup
From Matthew Dobson.
This final patch from Matthew cleans up a few leftovers which were noted
after the code had been reviewed and tested a bit in the -mm patchsets.
1) Update register_XXX and arch_register_XXX functions to return int
instead of void. Functions calling these functions should know if
they completed successfully to take appropriate further registration
action, or not bother.
2) Drop some pointless error checking in the arch_register_XXX
functions.
Andrew Morton [Fri, 1 Nov 2002 04:02:31 +0000 (20:02 -0800)]
[PATCH] create node_online_map
From Matthew Dobson.
Create and use node_online_map.
This patch creates a node_online_map, much like cpu_online_map. It
also creates the standard helper functions, ie: node_online(),
num_online_nodes(), node_set_online(), node_set_offline().
This is used by driverFS topology to keep track of which Nodes
are in the system and online.
Andrew Morton [Fri, 1 Nov 2002 04:02:20 +0000 (20:02 -0800)]
[PATCH] create memblk_online_map
From Matthew Dobson.
Create and use memblk_online_map.
This patch creates a memblk_online_map, much like cpu_online_map. It
also creates the standard helper functions, ie: memblk_online(),
num_online_memblks(), memblk_set_online(), memblk_set_offline().
This is used by driverFS topology to keep track of which memory blocks
are in the system and online.
Andrew Morton [Fri, 1 Nov 2002 04:01:58 +0000 (20:01 -0800)]
[PATCH] i386 driverfs Topology
From Matthew Dobson.
Update/Create i386 specific files for DriverFS Topology.
This patch creates the i386 specific files/functions/structures to
implement driverfs Topology. These structures have the generic
CPU/MemBlk/Node structures embedded in them.
This patch also creates the arch-specific initialization routine to
instantiate the topology.
Andrew Morton [Fri, 1 Nov 2002 04:01:48 +0000 (20:01 -0800)]
[PATCH] Update/Create core files for DriverFS Topology.
From Matthew Dobson.
Update/Create core files for DriverFS Topology.
This patch creates the generic structures that are (will be) embedded in
the per-arch structures. Also creates calls to register these generic
structures (CPUs, MemBlks, & Nodes).
Note that without arch-specific structures in which to embed these
structures, and an arch-specific initialization routine, these
functions/structures remain unused.
Andrew Morton [Fri, 1 Nov 2002 04:01:38 +0000 (20:01 -0800)]
[PATCH] page accounting atomicity fix
The global page accounting functions are currently using "+=" against a
ulong. But this can happen at interrupt time as well, and "+=" is not
atomic against interrupt-time modification of the same word.
Andrew Morton [Fri, 1 Nov 2002 04:01:27 +0000 (20:01 -0800)]
[PATCH] ext3 build fix
Patch from Andreas Dilger <adilger@clusterfs.com>
If you have ext2_fs.h and ext3_fs.h included at the same time, we are
missing one define used in ext3_should_journal_data() and
ext3_should_order_data() as part of the test_opt() macro (which
defaults to the ext2 definition if both are present).
Andrew Morton [Fri, 1 Nov 2002 04:01:17 +0000 (20:01 -0800)]
[PATCH] disable PF_MEMALLOC for interrupt allocations
If a task is running in state PF_MEMALLOC and is interrupted, the page
allocator will treat allocations by the interrupt handler as
PF_MEMALLOC as well.
Detect that, and stop it. Also tidies things up a little in there.
Andrew Morton [Fri, 1 Nov 2002 04:01:08 +0000 (20:01 -0800)]
[PATCH] improved space efficiency in dcache
Currently we are storing filenames which are 16-chars or less
inside struct dentry itself and then separately allocating
larger names.
But this leaves spare space in the dentry - the dentry slab cache
is using cacheline alignment. In my build, struct dentry is 112
bytes so there are at least an additional 16 bytes in there.
And the number of files which have names in the 16-32 char range
will be significant.
So Manfred's patch changes the dcache code to utilise _all_ the space
between the last member of the dentry and the start of the next cacheline.
Andrew Morton [Fri, 1 Nov 2002 04:00:46 +0000 (20:00 -0800)]
[PATCH] use bd_claim in the raw driver
Currently if you use the raw driver against /dev/hda1 while it has an
fs mounted, everything gets confused and the kernel locks up or oopses.
Al said to use bd_claim(). This prevents the raw driver from being
able to open the device under these circumstances.
There is value in being able to read the raw device while there's a
filesystem mounted: to poke around at the disk without interacting with
the kernel's caching. You can still do that, with an O_DIRECT open of
/dev/hda1.
Alan Cox [Fri, 1 Nov 2002 03:44:49 +0000 (19:44 -0800)]
[PATCH] 2.5.45 UCLinux merge M680x0 mmuless arch and include/asm
This is the M68K mmuless port code maintained by Greg Ungerer and used
by Snapgear for all sorts of bits of hardware. No shared files included
in this chunk of patches. This matches 2.5.45-uc1 which is the stuff that
has been in my tree for a bit combined with Kconfig changes
Alan Cox [Fri, 1 Nov 2002 03:44:12 +0000 (19:44 -0800)]
[PATCH] UCLINUX "flat" binary loader
This is much like the old m68k amiga/st loader world. Its a relocating
loader with optional compression. Shared libraries and A5 sharing stuff
is all handled by the userspace/libs
Alan Cox [Fri, 1 Nov 2002 03:43:49 +0000 (19:43 -0800)]
[PATCH] arch specific files for MMUless NEC v850 port
This is the V850 support maintained by Miles Bader at NEC
Again this is just arch and include/asm- files. It matches 2.5.45-uc1 + v850
fixes which is close to what was in my old tree (some clean up done since then)
plus Kconfig
Alexander Viro [Fri, 1 Nov 2002 03:26:31 +0000 (19:26 -0800)]
[PATCH] remaining uses of ->rq_dev
* in floppy drivers and ps2esdi - replaced with use of ->rq_disk;
floppy drivers already have information about "type" part of device number
- they had stored that information in floppy_open(), so all we need is a
"which drive" part. And that is available from ->rq_disk.
* DAC960: changed ->private_data initialization - instead of pointing
it to controller (which we already have as disk->queue.queuedata) we simply
store a disk number in there. That had simplified ->revalidate_disk() and
allowed to kill the use of ->rq_dev in request handler.