Rusty Russell [Wed, 1 Jan 2003 11:02:38 +0000 (03:02 -0800)]
[PATCH] Modules 3/3: Sort sections
RTH's final complaint (so far 8) was that we should sort the module
sections: archs might require some sections to be adjacent, so they can
all be reached by a relative pointer (ie. GOT pointer). This
implements that reordering, and simplfies the module interface for
architectures as well.
Previously an arch could specify it wanted extra space, but not where
that space would be. The new method (used only by PPC so far) is to
allocate an empty section (in asm/module.h or by setting LDFLAGS_MODULE
to use an arch specific linker script), and expand that to the desired
size in "module_frob_arch_sections()".
Rusty Russell [Wed, 1 Jan 2003 11:02:32 +0000 (03:02 -0800)]
[PATCH] Modules 2/3: Use sh_addr instead of sh_offset
From: Richard Henderson <rth@twiddle.net>
Richard points out that we should be using sh_addr to hold the address,
The original patch used to overload sh_offset to a pointer to the
location of the section. This uses sh_addr, which is more correct
and less surprising.
Andrew Morton [Wed, 1 Jan 2003 08:46:22 +0000 (00:46 -0800)]
[PATCH] quota locking update
I've been carrying this since Jan sent it out a month or two ago.
I don't know if anyone has tested it though. The sort of people
who use quotas tend to like nice stable kernels. I read through it,
but can't say that I know enough about quotas to know if it makes sense.
The wait_on_dquot() synchronisation is a bit odd.
I do need to do a round of stability testing with this and ext3 - the
interaction between quotas and ext3 is an area where we've had deadlocks
in the past.
But the quota locking is definitely looking crufty, and I'd suggest that
we run with this..
Patch from Jan Kara <jack@suse.cz>
"I'm resending you the patch with new quota SMP locking. The patch removes
BKL and replaces it with two spinlocks protecting quota lists and data
stored in dquot structures. Also non-SMP locking was changed a bit make SMP
locking easier (eg. we got rid of not very nice dq_dup_ref counters). The
patch is against 2.5.48 but applies well also to 2.5.49. Would you please
apply the patch?"
- Change dqoff_sem from a semaphore to an rwsem.
- Convert dqi_flags from an int to a ulong and use test_bit/set_bit rather
thatn &/|
- The various exported quota operations now run without lock_kernel().
This means that things like DQUOT_ALLOC_SPACE no longer take lock_kernel()
in out high-perfomance filesystems. Nice.
- Replace lock_kernel() in the quota code with two quota-private global
locks.
- Replace all the open-coded waitqueue management with a semaphore
(wait_on_dquot())
There's a bunch of useless MOD_INC_USE_COUNT/MOD_DEC_USE_COUNT in
ppp-related code when it manipulates the use count in functions
that are only called from other modules, i.e. it's locked in by
the depencies anyway. Get rid of it.
As already state in the thread about Adam's devfs reimplementation there
is much devfs functionality that is unused or only used by the
arch/ia64/sn/ code that currently doesn't even compile in 2.5 and that
will get it's own filesystem that fits the needs better when SGI moves
to 2.6.
(the first hunk is the only exception to the above rule, but it's just
a debug printk :))
Pam Delaney [Wed, 1 Jan 2003 03:56:26 +0000 (19:56 -0800)]
[PATCH] Fusion-MPT Update (2.03.01.01)
This upgrades the Fusion-MPT driver from 2.03.00.02 to 2.03.01.01.
Bug Fixes:
o Added back missing queuecommand entry point define ?!
o Added to code to break marriage of two controllers during unload
(could cause a panic)
o SCSI driver will de-register with base driver if no SCSI-capable
adapters found
Minor Changes:
o Removed errant spaces at ends of lines (most of the changes)
o Moved code around (and in-lined) some functions for performance reasons.
o Modified /proc functionality to facilitate testing with 2.5
o Added a call to synchronize_irq on unload (HP request)
o Modified load of base to close a potential hole
o Added code to set the FW IO coalescing depth (IBM request)
o Changed return when mptctl driver registration fails (Kernel.org request)
o SCSI driver detect routine calls a generic spinlock for all kernels
(Kernel.org request)
o Controller RAID page dynamic instead of static
Currently running a multi-disk stress test w/ 2.5.53, this patch and driver
built-in. Verified basic reset handling is working properly.
James Simmons [Tue, 31 Dec 2002 10:09:03 +0000 (02:09 -0800)]
Showing the logo on every open became annoying. I leave it up to the driver writers when they want to display the logo. Fo embeded devices it probably is wise to have them set there mode themselves then display the logo to let them know if the hartdware worked. FOnt header file location changed.
[PATCH] Atari NCR5380 SCSI: bitops operate on long
Atari NCR5380 SCSI driver tag bitmap updates:
- Use DECLARE_BITMAP() to declare the tag bitmap
- Remove `MAX_TAGS must be a multiple of 32', which is no longer true
- Declare and use CLEAR_BITMAP() to set all bits in a bitmap to zero
- Fix bitops call problems that got unnoticed before
Now that we have a unique suffix for kernel modules (.ko), we
can extend to former "make some/object.o" to work for kernel modules
as well, even composite ones.
Sam Ravnborg [Mon, 30 Dec 2002 19:11:46 +0000 (13:11 -0600)]
kbuild: Move archhelp to arch/$(ARCH)/Makefile
arch/$(ARCH)/Makefile already contains the kbuild required additions
to allow the kernel to be built for the architecture in question.
Moving archhelp centralise this information, and no longer require a
boot directory to exist to utilise this feature.
Update i386 to define archhelp in arch/$(ARCH)/Makefile
Other architectures will be updated in next cset.
Sam Ravnborg [Mon, 30 Dec 2002 19:09:26 +0000 (13:09 -0600)]
kbuild: $(build) and $(clean) macros for make invocation
The former macro $(descend ...) hide for make the fact that a recursively make was
invoked. The replacement $(Q)$(MAKE) -f scripts/Makefile.build obj=dir was too verbose.
Introduced $(build) and $(clean) allowing the following syntax:
$(Q)$(MAKE) $(build)=arch/i386/boot target
and similar for clean.
Introduced $(build) and $(clean) in general, and for i386 architecture.
Speeds up rendering of text by around 7x for 8bpp cards,
as you'd expect from the difference in the volume of data
passed across the bus. Thus the win should be about 31x
for 32bpp cards.
The generated .tmp_kallsyms.S needs to use .long / .quad for
32/64 bit archs. To know which arch we're compiling for, we
use the preprocessor and BITS_PER_LONG from <asm/types.h>.
Unfortunately, asm/types.h was not safe to include from assembler
files, so lots of #ifndef __ASSEMBLY__ needed to be added - should
be fine now, untested for != i386, though.
Justin T. Gibbs [Mon, 30 Dec 2002 11:57:48 +0000 (04:57 -0700)]
Add a failsafe mechanism to configure devices that have inquiry data
but somehow are not handled by the DV state machine. This ensures that
the behavior seen before DV is restored in the event of a DV state machine
failure.
Justin T. Gibbs [Mon, 30 Dec 2002 11:43:35 +0000 (04:43 -0700)]
Preface the "asserting atn" diagnostic with controller/target information.
Restore a call to ahc_assert_atn() that was inadvertantly lost when the
asserting atn diagnostic was added. This, among other things, resulted
in driver negotiation failures with devices that initiated negotiation
(e.g. most IBM drives).
Justin T. Gibbs [Mon, 30 Dec 2002 11:38:17 +0000 (04:38 -0700)]
Remove incorrect dependency on SCSI_AIC7XXX_BUILD_FIRMWARE and
AIC7XXX_REG_PRETTY_PRINT. The constant rebuild is due to the build
process deciding that the pretty_print.c file is an intermediate file
and that problem lies elsewhere.
Justin T. Gibbs [Mon, 30 Dec 2002 11:35:45 +0000 (04:35 -0700)]
Correct leading whitespace.
Remove incorrect dependency on SCSI_AIC7XXX_BUILD_FIRMWARE (the
wrong driver noless) and AIC79XX_REG_PRETTY_PRINT. The constant
rebuild is due to the build process deciding that the pretty_print.c
file is an intermediate file and that problem lies elsewhere.
David Brownell [Mon, 30 Dec 2002 09:16:25 +0000 (01:16 -0800)]
[PATCH] cleanup after dead hc needs task context
Simple patch to invoke hcd->stop() in task context, as
required. When Cardbus works again (broken in 2.5.53
unless it's just me), this will get rid of some oopsing
when folk physically eject the device, with no shutdown.
As well as making other "hc died" faults behave better.
Andrew Morton [Mon, 30 Dec 2002 05:41:23 +0000 (21:41 -0800)]
[PATCH] Reduce context switch rate due to the random driver
add_disk_randomness() is causing a context switch per disk request. It
is scheduling process-context work one timer tick in the future for
every request.
But is has a buffer for this, so change it to not set up the
process-context work until that buffer is half full.
The patch reduces the context switch rate during a 20 megabyte/sec
write to scsi from 150/sec to 50/sec.
Andrew Morton [Mon, 30 Dec 2002 05:41:16 +0000 (21:41 -0800)]
[PATCH] don't call console drivers on non-online CPUs
George Anzinger identified the following problem: when a secondary CPU is
coming up, it calls printk() before it is "online". It calls the console
drivers before its per-cpu storage has been prepared. And the vga console
driver does a mod_timer(). This CPU's timers have not yet been initialised;
it is not clear why this doesn't oops - George thinks it is because virtual
address zero is still accessible at that time.
I believe the right way to fix this is to change printk so that a not-online
CPU will not call the console drivers. Because printk should always be
callable. If the CPU is not online the message is buffered, so the next
caller to printk who is online will actually display it.
ia64 has been doing exactly this for ages, so we can remove the
arch_consoles_callable() hook and just open-code the cpu_online() test in
printk.
That fixes things up for the secondary CPUs. But this change causes a
problem for the boot CPU: it is being marked online very late in boot, so the
printk buffer is being displayed much later than we would like.
I believe that the solution to this is to mark the boot CPU online much
earlier. So in this patch we call the new arch-provided function
smp_prepare_boot_cpu() immediately after the boot CPU's per-cpu areas are set
up. Its mandate is to (at least) mark the boot CPU "online".
The change has been reviewed by davem and rth. No comments were received
from the other arch maintainers.
Andrew Morton [Mon, 30 Dec 2002 05:40:44 +0000 (21:40 -0800)]
[PATCH] Don't cacheline-align vm_area_struct
Some workloads (Oracle...) use a huge number of VMA's. They are
currently a tidy 64 bytes in size, and padding them out to 128 on P4's
is not worthwhile.
Andrew Morton [Mon, 30 Dec 2002 05:40:37 +0000 (21:40 -0800)]
[PATCH] kmalloc_percpu -- stripped down version
Patch from Ravikiran G Thirumalai <kiran@in.ibm.com>
Creates a simple "kmalloc for each CPU" API. This will be used for net
statistics, disk statistics, etc. (davem has acked the net patches which use
this code).
kmalloc_per_cpu() is available to modules, unlike the current static per-cpu
infrastructure.
Andrew Morton [Mon, 30 Dec 2002 05:40:31 +0000 (21:40 -0800)]
[PATCH] add drain_local_pages() for CONFIG_SOFTWARE_SUSPEND
swsusp gets confused when pages which it freed do not appear in the
buddy lists. So provide a function which will drain the calling CPU's
per-cpu-pages into the buddy.
The patch has been tested by Pavel. Presence of the new code is
conditional on CONFIG_SOFTWARE_SUSPEND.
Andrew Morton [Mon, 30 Dec 2002 05:40:19 +0000 (21:40 -0800)]
[PATCH] BIN_TO_BCD consolidation
Cleanup patch from Hollis Blanchard <hollis@austin.ibm.com>
We have a large number of private implementations of BIN_TO_BCD and
BCD_TO_BIN, which are all the same. And a lot of them are inflexible because
they modify their arg:
Andrew Morton [Mon, 30 Dec 2002 05:40:06 +0000 (21:40 -0800)]
[PATCH] Docs: fix explanation of file-nr
Patch from Paul Jakma <paulj@alphyra.ie>
Documentation/sysctl/fs.txt is incorrect wrt to the middle number of
/proc/sys/fs/file-nr. The current docs state it is the number of
in-use file-handles, from observation this number is actually the
number of /unused/ file-handles - we've observe that when it hits 0 we
get file handle problems (rather than when it hits == file-max as docs
imply).
Rusty Russell [Mon, 30 Dec 2002 05:04:02 +0000 (21:04 -0800)]
[PATCH] MODULE_PARM "c" support
Turns out there was an undocumented "c" flag for MODULE_PARM.
This implementation is a little ugly, but it works, and will do for
compatibility (I haven't implemented such a two-dimensional array
primitive, but the whole point of the module_parm et al is that they are
extensible).
[PATCH] rename CONFIG_VOYAGER to CONFIG_X86_VOYAGER
The name is just a bit too generic, and we already use the _X86 prefix
for lots of other stuff in that area. Dito for the never use CONFIG_PC
and CONFIG_VISWS.
Brian Murphy [Mon, 30 Dec 2002 04:33:32 +0000 (20:33 -0800)]
[PATCH] crc32 speedup/use anywhere
This patch combines my patch which statically initialises the crc32
tables so they can be used at any time (during initialisation) and
Joakim Tjernlund's patch to speed up the crc calculations by doing word
operations instead of exclusively byte.
The crc routines are used extensively in jffs2 where speed is very
important.
I need the crc32 routines to calculate a checksum on values read from an
eeprom which contain cpu speed and memory size information - so they are
needed very much earlier in the initialisation process than they are
currently available.