Pekka Enberg [Mon, 7 Nov 2005 09:01:08 +0000 (01:01 -0800)]
[PATCH] VFS: update overview document
This patch updates the Documentation/filesystems/vfs.txt document. I
rearranged and rewrote parts of the introduction chapter and added better
headings for each section. I also added a description for the inode
rename() operation which was missing and added links to some useful
external VFS documentation.
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Randy Dunlap [Mon, 7 Nov 2005 09:01:07 +0000 (01:01 -0800)]
[PATCH] kernel-docs: fix kernel-doc format problems
Convert to proper kernel-doc format.
Some have extra blank lines (not allowed immed. after the function name)
or need blank lines (after all parameters). Function summary must be only
one line.
Colon (":") in a function description does weird things (causes kernel-doc
to think that it's a new section head sadly).
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Randy Dunlap [Mon, 7 Nov 2005 09:01:06 +0000 (01:01 -0800)]
[PATCH] more kernel-doc cleanups, additions
Various core kernel-doc cleanups:
- add missing function parameters in ipc, irq/manage, kernel/sys,
kernel/sysctl, and mm/slab;
- move description to just above function for kernel_restart()
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Randy Dunlap [Mon, 7 Nov 2005 09:01:05 +0000 (01:01 -0800)]
[PATCH] kernel-doc: fix some kernel-api warnings
Fix various warnings in kernel-doc:
Warning(linux-2614-rc4//include/linux/net.h:89): Enum value 'SOCK_DCCP' not described in enum 'sock_type'
usercopy.c: should use !E instead of !I for exported symbols:
Warning(linux-2614-rc4//arch/i386/lib/usercopy.c): no structured comments found
fs.h does not need to use !E since it has no exported symbols:
Warning(linux-2614-rc4//include/linux/fs.h:1182): No description found for parameter 'find_exported_dentry'
Warning(linux-2614-rc4//include/linux/fs.h): no structured comments found
irq/manage.c should use !E for its exported symbols:
Warning(linux-2614-rc4//kernel/irq/manage.c): no structured comments found
macmodes.c should use !E for its exported symbols:
Warning(linux-2614-rc4//drivers/video/macmodes.c): no structured comments found
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Randy Dunlap [Mon, 7 Nov 2005 09:01:04 +0000 (01:01 -0800)]
[PATCH] jbd doc: fix some kernel-doc warnings
Add structure fields kernel-doc for 2 fields in struct journal_s.
Warning(/var/linsrc/linux-2614-rc4//include/linux/jbd.h:808): No description found for parameter 'j_wbuf'
Warning(/var/linsrc/linux-2614-rc4//include/linux/jbd.h:808): No description found for parameter 'j_wbufsize'
Convert fs/jbd/recovery.c non-static functions to kernel-doc format.
fs/jbd/recovery.c doesn't export any symbols, so it should use
!I instead of !E to eliminate this warning message:
Warning(/var/linsrc/linux-2614-rc4//fs/jbd/recovery.c): no structured comments found
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
I've recently added this documentation, Alasdair gave some corrections, and
here are some further corrections on top of his work (partly style issue,
partly a technical error due to different past experience, partly a note
which I've added - i.e. transient snapshots are lighter).
Cc: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Ville Syrjälä [Mon, 7 Nov 2005 09:01:00 +0000 (01:01 -0800)]
[PATCH] matroxfb: Set maxhipri to 0
The current init code sets hiprilvl to 0 and maxhipri to 5. According to the
specs those values are illegal on both G200 and G400. It also causes
distortions on the TV-out at least when CRTC2 is in YUV mode as is the case
with DirectFB. This patch resets both values to 0.
Signed-off-by: Ville Syrjälä <syrjala@sci.fi> Signed-off-by: Petr Vandrovec <petr@vandrovec.name> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Ville Syrjälä [Mon, 7 Nov 2005 09:00:58 +0000 (01:00 -0800)]
[PATCH] matroxfb: Use CACHEFLUSH on all chips
Use the CACHEFLUSH register on all chip types. The register is listed in all
other specs except 2064W. However I have verified that the register does work
on a 2064W despite being marked reserved in the specs. There were no
noticeable side effects after writing to the register.
Signed-off-by: Ville Syrjälä <syrjala@sci.fi> Signed-off-by: Petr Vandrovec <petr@vandrovec.name> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Ville Syrjälä [Mon, 7 Nov 2005 09:00:57 +0000 (01:00 -0800)]
[PATCH] matroxfb: Add support for Mystique AGP
Add new entries for Mystique AGP with the PCI ID 0x051e.
I don't actually have such boards but according to google they do exist.
Curiosly X.Org doesn't recognize that PCI ID. And what's even more
interesting is that Matrox's own Windows drivers don't recognize it either.
After going through about a dozen different versions I did find one older
driver that does list this particular ID. It is also listed in the pci.ids
file.
I'm not sure if non-220 AGP chips exist. I left the chip revision check
intact for AGP chips nonetheless.
Signed-off-by: Ville Syrjälä <syrjala@sci.fi> Signed-off-by: Petr Vandrovec <petr@vandrovec.name> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] fbdev: Add helper to get an appropriate initial mode
Add new helper, fb_find_best_display(), which will search the modelist for the
best mode for the attached display. This requires an EDID block that is
converted to struct fb_monspecs and a private modelist. The search will be
done in this manner:
- if 1st detailed timing is preferred, use that
- else if dimensions of the display are known, use that to estimate xres and
- else if modelist has detailed timings, use the first detailed timing
- else, use the very first entry from the modelist
Rearrange mode database entries such that preferred timings are entered first,
and less preferred timings are entered last. (Detailed, VESA,
established/standard).
Zach Smith [Mon, 7 Nov 2005 09:00:52 +0000 (01:00 -0800)]
[PATCH] fbcon: Add rl (Roman Large) font
I converted the "rl" console font from the kbd utility to be a built-in font
for the framebuffer console, and I was wondering if you would be OK with
including it. I've generated a font_rl.c file and related minor
modifications. I find it's the most visually appealing of the kbd fonts which
is why I use it and selected it for conversion. I believe the font is GPL'd.
vesafb occassionally gets the size wrong when setting the mtrr. When X or DRI
attempts to set the mtrr, it will fail due to range overlap significantly
affecting their performance. Disable mtrr and let the user explicitly enable
it with the mtrr:n option.
[PATCH] fbdev: fix the fb_find_nearest_mode() function
Currently the fb_find_nearest_mode() function finds a mode with screen
resolution closest to that described by the 'var' argument and with some
arbitrary refresh rate (eg. in the following sequence of refresh rates: 70 60
53 85 75, 53 is selected).
This patch fixes the function so that it looks for the closest mode as far as
both resolution and refresh rate are concerned. The function's first argument
is changed to fb_videomode so that the refresh rate can be specified by the
caller, as fb_var_screeninfo doesn't have any fields that could directly hold
this data.
Signed-off-by: Michal Januszewski <spock@gentoo.org> Signed-off-by: Antonino Daplas <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Some EDID blocks set the flag "prefer first detailed timing" without providing
any detailed timing at all. Clear this flag if the block does not provide
detailed timings.
[PATCH] pm2fb: Manual configuration of timings for Elsa Winner 2000 Office
Attached is a small patch which configures the correct memory clock and
timings on the Elsa Winner 2000 Office pm2 based card. This is necessary when
the card is used on a platform which does not support PC style BIOS
initialization.
"I've tried with video=atyfb:debug and video=atyfb:debug,mode:1280x600, \
nomtrr.
In both case, the screen stays black, but seems divided into 4 vertical bands.
Some white lines pop up randomly on each vertical band."
The problem is a combination of an incorrect xclk plus lack of timing
information. The adapter is attached to an LCD device that can do 1280x600
(which is not a standard resolution). The global mode database does not have
an entry for it. Fortunately, the Video BIOS contains the complete timing
info for this display, however, atyfb is not making use of it.
Add support to get the timing information from the BIOS, if available.
[PATCH] fbdev: Remove software clipping from drawing functions
Remove software clipping from imageblit, fillrect and copyarea. Clipping is
not needed because the console layer assures that reads/writes doest not
happen beyond the extents of the framebuffer. And software clipping tends to
hide bugs, if they do exist.
[PATCH] fbcon: Initialize new driver when old driver is released
If machine has more than 1 driver installed, and they all drive the same
hardware, it's possible that the driver's fb_release() method will attempt to
restore the hardware state to the initial state. This will leave the new
driver in an undefined state. To prevent this problem, initialize the new
driver by calling fb_set_par() when the old driver is released by fbcon.
[PATCH] fbcon/fbdev: Move softcursor out of fbdev to fbcon
According to Jon Smirl, filling in the field fb_cursor with soft_cursor for
drivers that do not support hardware cursors is redundant. The soft_cursor
function is usable by all drivers because it is just a wrapper around
fb_imageblit. And because soft_cursor is an fbcon-specific hook, the file is
moved to the console directory.
Thus, drivers that do not support hardware cursors can leave the fb_cursor
field blank. For drivers that do, they can fill up this field with their own
version.
The end result is a smaller code size. And if the framebuffer console is not
loaded, module/kernel size is also reduced because the soft_cursor module will
also not be loaded.
nvidiafb didn't fully hook-up the code it borrowed from X for doing flat
panel dithering (this is useful for 6 bits panels). This adds a driver
option to force it, and by default "reads" the current value from the chip
to get the firmware setting. It significantly improves the quality of
images on the iMac G5 I have here (though the X driver doesn't yet "read"
the current value and defaults to 0, so you have to add Option "FBDither"
"true" to your X config file to get that, I'll try to fix X.org to "read"
the default unless specified asap).
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: "Antonino A. Daplas" <adaplas@hotpop.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/video/nvidia/nv_setup.c: In function `NVCommonSetup':
drivers/video/nvidia/nv_setup.c:408: warning: statement with no effect
drivers/video/nvidia/nv_setup.c:496: warning: statement with no effect
drivers/video/nvidia/nv_setup.c:504: warning: statement with no effect
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: "Antonino A. Daplas" <adaplas@hotpop.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This patch fixes nvifiafb mode setting code to be closer to what the X
driver does, which actually makes it work on the 5200FX I have access to.
It also fix the routine that gets the EDID from Open Firmware on PPC, it
was broken in various ways and would crash at boot. Compared to the patch
I posted to linux-fbdev last week, this one just changes a printk to be
closer to the other ones in the driver.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: "Antonino A. Daplas" <adaplas@hotpop.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Randy Dunlap [Mon, 7 Nov 2005 09:00:29 +0000 (01:00 -0800)]
[PATCH] fb: straighten up fb drivers menu
Arrange frame buffer menu:
- puts all Epson drivers together
- removes split of FB_PXA and FB_PXA_PARAMETERS by FB_W100
- results in PXA, W100, Epson, S3C2410, & Virtual FB drivers being
presented at the same menu level as all other FB drivers
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Acked-by: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Randy.Dunlap [Mon, 7 Nov 2005 09:00:28 +0000 (01:00 -0800)]
[PATCH] framebuffer: add some help text in Kconfig
Frame buffer driver help text changes:
- Move S3 Trio next to S3 Savage;
- add or clarify help text for several FB drivers;
- add help text for FB console;
- add help text for bootup logos;
Acked-by: Antonino Daplas <adaplas@pol.net> Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Mon, 7 Nov 2005 09:00:27 +0000 (01:00 -0800)]
[PATCH] knfsd: make sure svc_process call the correct pg_authenticate for multi-service port
If an RPC socket is serving multiple programs, then the pg_authenticate of
the first program in the list is called, instead of pg_authenticate for the
program to be run.
This does not cause a problem with any programs in the current kernel, but
could confuse future code.
Also set pg_authenticate for nfsd_acl_program incase it ever gets used.
Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Mon, 7 Nov 2005 09:00:26 +0000 (01:00 -0800)]
[PATCH] knfsd: Fix some minor sign problems in nfsd/xdr
There are a couple of tests which could possibly be confused by extremely
large numbers appearing in 'xdr' packets. I think the closest to an exploit
you could get would be writing random data from a free page into a file - i.e.
leak data out of kernel space.
I'm fairly sure they cannot be used for remote compromise.
Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Mon, 7 Nov 2005 09:00:25 +0000 (01:00 -0800)]
[PATCH] knfsd: Allow run-time selection of NFS versions to export
Provide a file in the NFSD filesystem that allows setting and querying of
which version of NFS are being exported. Changes are only allowed while no
server is running.
Signed-off-by: Steve Dickson <steved@redhat.com> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Mon, 7 Nov 2005 09:00:24 +0000 (01:00 -0800)]
[PATCH] knfsd: Restore functionality to read from file in /proc/fs/nfsd/
Most files in the nfsd filesystems are transaction files. You write a
request, and read a response.
For some (e.g. 'threads') it makes sense to just be able to read and get the
current value.
This functionality did exist but was broken recently when someone modified
nfsctl.c without going through the maintainer. This patch fixes the
regression.
Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This is a somewhat cosmetic fix to keep the SpecFS validation test from
complaining.
SpecFS want's to try chmod on symlinks, and ext3 and reiser (at least) return
ENOTSUPP.
Probably both sides are being silly, but it is easiest to simply make it a
non-issue and filter out chmod requests on symlinks at the nfsd level.
Signed-off-by: Olaf Kirch <okir@suse.de> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Fix the warning "Debug: sleeping function called from invalid context at
include/asm/semaphore.h:102" that the zr36067 driver emits every time an
application using JPEG capture starts up (e.g. mjpegtools' lavrec).
The warning is harmless, but clogs up the dmesg output. This was logged as
bugzilla #5403. (Thanks to Christian Casteyde for helping me in fixing
this long-standing annoyance.)
Signed-off-by: Ronald S. Bultje <rbultje@ronald.bitfreak.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Matt Porter [Mon, 7 Nov 2005 09:00:15 +0000 (01:00 -0800)]
[PATCH] RapidIO support: core base
Adds a RapidIO subsystem to the kernel. RIO is a switched fabric interconnect
used in higher-end embedded applications. The curious can look at the specs
over at http://www.rapidio.org
The core code implements enumeration/discovery, management of
devices/resources, and interfaces for RIO drivers.
There's a lot more to do to take advantages of all the hardware features.
However, this should provide a good base for folks with RIO hardware to start
contributing.
Signed-off-by: Matt Porter <mporter@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Reorganize the preempt_disable/enable calls to eliminate the extra preempt
depth. Changes based on Paul McKenney's review suggestions for the kprobes
RCU changeset.
Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] Kprobes: Use RCU for (un)register synchronization - arch changes
Changes to the arch kprobes infrastructure to take advantage of the locking
changes introduced by usage of RCU for synchronization. All handlers are now
run without any locks held, so they have to be re-entrant or provide their own
synchronization.
Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] Kprobes: Use RCU for (un)register synchronization - base changes
Changes to the base kprobes infrastructure to use RCU for synchronization
during kprobe registration and unregistration. These changes coupled with the
arch kprobe changes (next in series):
a. serialize registration and unregistration of kprobes.
b. enable lockless execution of handlers. Handlers can now run in parallel.
Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] Kprobes: Track kprobe on a per_cpu basis - x86_64 changes
x86_64 changes to track kprobe execution on a per-cpu basis. We now track the
kprobe state machine independently on each cpu using a arch specific kprobe
control block.
Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] Kprobes: Track kprobe on a per_cpu basis - sparc64 changes
Sparc64 changes to track kprobe execution on a per-cpu basis. We now track
the kprobe state machine independently on each cpu using an arch specific
kprobe control block.
Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] Kprobes: Track kprobe on a per_cpu basis - ppc64 changes
PPC64 changes to track kprobe execution on a per-cpu basis. We now track the
kprobe state machine independently on each cpu using an arch specific kprobe
control block.
Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] Kprobes: Track kprobe on a per_cpu basis - ia64 changes
IA64 changes to track kprobe execution on a per-cpu basis. We now track the
kprobe state machine independently on each cpu using an arch specific kprobe
control block.
Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] Kprobes: Track kprobe on a per_cpu basis - i386 changes
I386 changes to track kprobe execution on a per-cpu basis. We now track the
kprobe state machine independently on each cpu, using an arch specific kprobe
control block.
Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
The following set of patches are aimed at improving kprobes scalability. We
currently serialize kprobe registration, unregistration and handler execution
using a single spinlock - kprobe_lock.
With these changes, kprobe handlers can run without any locks held. It also
allows for simultaneous kprobe handler executions on different processors as
we now track kprobe execution on a per processor basis. It is now necessary
that the handlers be re-entrant since handlers can run concurrently on
multiple processors.
All changes have been tested on i386, ia64, ppc64 and x86_64, while sparc64
has been compile tested only.
The patches can be viewed as 3 logical chunks:
patch 1: Reorder preempt_(dis/en)able calls
patches 2-7: Introduce per_cpu data areas to track kprobe execution
patches 8-9: Use RCU to synchronize kprobe (un)registration and handler
execution.
Thanks to Maneesh Soni, James Keniston and Anil Keshavamurthy for their
review and suggestions. Thanks again to Anil, Hien Nguyen and Kevin Stafford
for testing the patches.
This patch:
Reorder preempt_disable/enable() calls in arch kprobes files in preparation to
introduce locking changes. No functional changes introduced by this patch.
Signed-off-by: Ananth N Mavinakayahanalli <ananth@in.ibm.com> Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Corey Minyard [Mon, 7 Nov 2005 09:00:05 +0000 (01:00 -0800)]
[PATCH] ipmi: fix watchdog timeout panic handling
If a panic came from the IPMI watchdog pretimeout and that was reported via
an NMI, it would also be reported via the standard IPMI flags, which would
get picked up when reporting panic events and cause another panic. This
adds an atomic to avoid calling panic twice.
Corey Minyard [Mon, 7 Nov 2005 09:00:05 +0000 (01:00 -0800)]
[PATCH] ipmi: use rcu lock for using command receivers
Use rcu_read_lock for the cmd_rcvrs list, since that was what what
intended, anyway. This means that all the users of the cmd_rcvrs_lock are
tasks, so the irq disables are no longer required for that lock and it can
become a semaphore.
Signed-off-by: Corey Minyard <minyard@acm.org> Acked-by: "Paul E. McKenney" <paulmck@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Corey Minyard [Mon, 7 Nov 2005 09:00:03 +0000 (01:00 -0800)]
[PATCH] ipmi: add timer thread
We must poll for responses to commands when interrupts aren't in use. The
default poll interval is based on using a kernel timer, which varies with HZ.
For character-based interfaces like KCS and SMIC though, that can be way too
slow (>15 minutes to flash a new firmware with KCS, >20 seconds to retrieve
the sensor list).
This creates a low-priority kernel thread to poll more often. If the state
machine is idle, so is the kernel thread. But if there's an active command,
it polls quite rapidly. This decrease a firmware flash time from 15 minutes
to 1.5 minutes, and the sensor list time to 4.5 seconds, on a Dell PowerEdge
x8x system.
The timer-based polling remains, to ensure some amount of responsiveness even
under high user process CPU load.
Checking for a stopped timer at rmmod now uses atomics and del_timer_sync() to
ensure safe stoppage.
Signed-off-by: Matt Domsch <Matt_Domsch@dell.com> Signed-off-by: Corey Minyard <minyard@acm.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Corey Minyard [Mon, 7 Nov 2005 09:00:02 +0000 (01:00 -0800)]
[PATCH] ipmi: kcs error0 delay
BMCs can get into ERROR0 state while flashing new firmware, particularly while
the BMC is erasing the next flash block, which may take a just under 2 seconds
on a Dell PowerEdge 2800 (1.75 seconds typical), during which time the
single-threaded firmware may not be able to process new commands. In
particular, clearing OBF may not take effect immediately.
We want it to delay in ERROR0 after clearing OBF a bit waiting for OBF to
actually be clear before proceeding.
This introduces a new return value from the LLDD's event loop,
SI_SM_CALL_WITH_TICK_DELAY. This means the calling thread/timer should
schedule_timeout() at least 1 tick, rather than busy-wait. This is a longer
delay than SI_SM_CALL_WITH_DELAY, which is typically a 250us busy-wait.
Signed-off-by: Matt Domsch <Matt_Domsch@dell.com> Signed-off-by: Corey Minyard <minyard@acm.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Corey Minyard [Mon, 7 Nov 2005 09:00:01 +0000 (01:00 -0800)]
[PATCH] ipmi: bt restart reset fixes
The current BT retry/reset mechanism fails to succeed on a PowerEdge 1650,
when the controller is wedged with B2H_ATN asserted at XACTION_START. If this
occurs, no further commands will ever succeed unless the state of the
controller is first cleared out.
Furthermore, the soft reset would only occur if the first command after insmod
was the one that timed out, not if a later command timed out.
This patch changes the retry/reset mechanism to be as follows:
Before retrying a command, clear the state of the BT controller such that the
flags represent ready for a new transaction. This increases the chance of
success of the restarted transaction.
After 2 retries, issue a soft reset and retry one more time before giving up
and reporting back a failure.
Signed-off-by: Matt Domsch <Matt_Domsch@dell.com> Acked-by: Rocky Craig <rocky.craig@hp.com> Signed-off-by: Corey Minyard <minyard@acm.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Corey Minyard [Mon, 7 Nov 2005 08:59:59 +0000 (00:59 -0800)]
[PATCH] ipmi: si start transaction hook
Some commands, on some system BMCs, don't respond at at all. This is seen on
Dell PowerEdge x6xx and x7xx systems with IPMI 1.0 BT controllers when a "Get
SDR" command is issued, with a length field of 0x3A, which happens to be the
length of about SDR entries. If another length is passed, this command
succeeds.
This patch adds general infrastructure for receiving commands before they're
passed down to the low-level drivers, such that they can be completed
immediately, or modified, prior to being sent to ->start_transaction().
Signed-off-by: Matt Domsch <Matt_Domsch@dell.com> Signed-off-by: Corey Minyard <minyard@acm.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Corey Minyard [Mon, 7 Nov 2005 08:59:57 +0000 (00:59 -0800)]
[PATCH] ipmi: watchdog parms in sysfs
Modify the IPMI watchdog parameters (the ones that make sense) to be exported
from sysfs. This is somewhat complicated because these parameters have
side-effects that must be handled.
Signed-off-by: Corey Minyard <minyard@acm.org> Cc: Matt Domsch <Matt_Domsch@dell.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Corey Minyard [Mon, 7 Nov 2005 08:59:56 +0000 (00:59 -0800)]
[PATCH] ipmi: various si cleanup
A number of small changes for the various system interface drivers,
consolidated from a number of patches from Matt Domsch.
Clear B2H_ATN and drain the BMC message buffer on command timeout. This
prevents further commands from failing after a timeout.
Add bt_debug and smic_debug module parameters, expose them in sysfs. This
lets you enable and disable debugging messages at runtime.
Unsigned jiffies math in ipmi_si_intf.c causes a too-large value to be passed
to ->event() after jiffies wrap-around. The BT driver had caught this, but
didn't know how to fix it. Now all calls to ->event() use a sane value for
time.
Increase timeout for commands handed to the BT driver from 2 seconds to 5
seconds. This is necessary particularly when the previous command was a
"Clear SEL", as that command completes, yet the BMC isn't really ready to
handle another command yet.
Silence BT debugging messages which were being printed on the console.
Increase SMIC timeout form 1/10s to 2s. This is needed on Dell PowerEdge 2650
and PowerEdge 750 with ERA/O cards to allow commands to complete without
timing out.
Adds kcs_debug module param, to match behavior of BT and SMIC. This also
prevents messages from being sent to the console unless explicitly requested.
Signed-off-by: Matt Domsch <Matt_Domsch@dell.com> Signed-off-by: Corey Minyard <minyard@acm.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Corey Minyard [Mon, 7 Nov 2005 08:59:54 +0000 (00:59 -0800)]
[PATCH] ipmi: use refcount in message handler
This patch is rather large, but it really can't be done in smaller chunks
easily and I believe it is an important change. This has been out and tested
for a while in the latest IPMI driver release. There are no functional
changes, just changes as necessary to convert the locking over (and a few
minor style updates).
The IPMI driver uses read/write locks to ensure that things exist while they
are in use. This is bad from a number of points of view. This patch removes
the rwlocks and uses refcounts and RCU lists to manage what the locks did.
Signed-off-by: Corey Minyard <minyard@acm.org> Cc: Matt Domsch <Matt_Domsch@dell.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Nick Piggin [Mon, 7 Nov 2005 08:59:53 +0000 (00:59 -0800)]
[PATCH] as: cooperating processes
Introduce the notion of cooperating processes (those that submit requests
close to one another), and use these statistics to make better choices about
whether or not to do anticipatory waiting.
Help and analysis from Seetharami Seelam <seelam@cs.utep.edu>
Performance testing from Seelam:
I set up my system and executed a couple of tests that I used for OLS. I
tested with AS, cooperative process patch merged in -mm tree (which I called
Nick, below) and the cooperative patch with modifications to as_update_iohist
(which I called Seelam).
I used a dual-processor (2.28GHz Pentium 4 Xeon) system, with 1 GB main memory
and 1 MB L2 cache, running Linux 2.6.9. Only a single processor is used for
the experiments. I used 7.2K RPM Maxtor 10GB drive configured with ext2 file
system.
Experiment 1 (ex1) consists of reading one Linux source trees using
find . -type f -exec cat '{}' ';' > /dev/null.
Experiment 2 (ex2) consists of reading two disjoint Linux source trees
using
find . -type f -exec cat '{}' ';' > /dev/null.
Experiment 3 (ex3) consists of streaming read of a 2GB file in the background
and 1 instance of the chunk reads in Experiment 1.
Timings for reading the Linux source are shown below:
AS Nick Seelam
ex1: 0m25.813s 0m27.859s 0m27.640s
ex2: 1m11.468s 1m13.918s 1m5.869s
ex3: 81m44.352s 10m38.572s 6m47.994s
The difference between the numbers in Experiment 3 must be due to the code in
as_update_iohist. (akpm: that's not part of this patch. So this patch is
"Nick").
Signed-off-by: Nick Piggin <npiggin@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Miklos Szeredi [Mon, 7 Nov 2005 08:59:52 +0000 (00:59 -0800)]
[PATCH] FUSE: pass file handle in setattr
This patch passes the file handle supplied in iattr to userspace, in case the
->setattr() was invoked from sys_ftruncate(). This solves the permission
checking (or lack thereof) in ftruncate() for the class of filesystems served
by an unprivileged userspace process.
Miklos Szeredi [Mon, 7 Nov 2005 08:59:51 +0000 (00:59 -0800)]
[PATCH] FUSE: atomic create+open
This patch adds an atomic create+open operation. This does not yet work if
the file type changes between lookup and create+open, but solves the
permission checking problems for the separte create and open methods.
Miklos Szeredi [Mon, 7 Nov 2005 08:59:50 +0000 (00:59 -0800)]
[PATCH] FUSE: add access call
Add a new access call, which will only be called if ->permission is invoked
from sys_access(). In all other cases permission checking is delayed until
the actual filesystem operation.
Miklos Szeredi [Mon, 7 Nov 2005 08:59:49 +0000 (00:59 -0800)]
[PATCH] FUSE: bump interface minor version
Though the following changes are all backward compatible (from the kernel's as
well as the library's POV) change the minor version, so interested
applications can detect new features.
The sys_ptrace boilerplate code (everything outside the big switch
statement for the arch-specific requests) is shared by most architectures.
This patch moves it to kernel/ptrace.c and leaves the arch-specific code as
arch_ptrace.
Some architectures have a too different ptrace so we have to exclude them.
They continue to keep their implementations. For sh64 I had to add a
sh64_ptrace wrapper because it does some initialization on the first call.
For um I removed an ifdefed SUBARCH_PTRACE_SPECIAL block, but
SUBARCH_PTRACE_SPECIAL isn't defined anywhere in the tree.
Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Paul Mackerras <paulus@samba.org> Acked-by: Ralf Baechle <ralf@linux-mips.org> Acked-By: David Howells <dhowells@redhat.com> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Tim Schmielau [Mon, 7 Nov 2005 08:59:43 +0000 (00:59 -0800)]
[PATCH] fix remaining missing includes
Fix more include file problems that surfaced since I submitted the previous
fix-missing-includes.patch. This should now allow not to include sched.h
from module.h, which is done by a followup patch.
Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Peter Staubach [Mon, 7 Nov 2005 08:59:42 +0000 (00:59 -0800)]
[PATCH] memory leak in dentry_open()
There is a memory leak possible in dentry_open(). If get_empty_filp()
fails, then the references to dentry and mnt need to be released. The
attached patch adds the calls to dput() and mntput() to release these two
references.
Signed-off-by: Peter Staubach <staubach@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Adrian Bunk [Mon, 7 Nov 2005 08:59:35 +0000 (00:59 -0800)]
[PATCH] quota: small cleanups
- "extern inline" -> "static inline"
- every file should #include the headers containing the prototypes for
it's global functions
Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Marcelo Tosatti [Mon, 7 Nov 2005 08:59:34 +0000 (00:59 -0800)]
[PATCH] Only disallow _setting_ of function key string
Mikael Pettersson <mikpe@csd.uu.se> noted that the current 2.6-git (and 2.4)
patch to disallow KDSKBSENT for unpriviledged users should be less restrictive
allowing reading of current function key string entry, but not writing.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
David Gibson [Mon, 7 Nov 2005 08:59:33 +0000 (00:59 -0800)]
[PATCH] FUTEX_WAKE_OP: enhanced error handling
The code for FUTEX_WAKE_OP calls an arch callback,
futex_atomic_op_inuser(). That callback can return an error code, but
currently the caller assumes any error is EFAULT, and will try various
things to resolve the fault before eventually giving up with EFAULT
(regardless of the original error code). This is not a theoretical case -
arch callbacks currently return -ENOSYS if the opcode they are given is
bogus.
This patch alters the code to detect non-EFAULT errors and return them
directly to the user.
Of course, whether -ENOSYS is the correct return value for the bogus opcode
case, or whether EINVAL would be more appropriate is another question.
Signed-off-by: David Gibson <dwg@au1.ibm.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Ingo Molnar <mingo@elte.hu> Cc: Jamie Lokier <jamie@shareable.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Zach Brown [Mon, 7 Nov 2005 08:59:31 +0000 (00:59 -0800)]
[PATCH] aio: remove aio_max_nr accounting race
AIO was adding a new context's max requests to the global total before
testing if that resulting total was over the global limit. This let
innocent tasks get their new limit tested along with a racing guilty task
that was crossing the limit. This serializes the _nr accounting with a
spinlock It also switches to using unsigned long for the global totals.
Individual contexts are still limited to an unsigned int's worth of
requests by the syscall interface.
The problem and fix were verified with a simple program that spun creating
and destroying a context while holding on to another long lived context.
Before the patch a task creating a tiny context could get a spurious EAGAIN
if it raced with a task creating a very large context that overran the
limit.
Signed-off-by: Zach Brown <zach.brown@oracle.com> Cc: Benjamin LaHaise <bcrl@kvack.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
David Howells [Mon, 7 Nov 2005 08:59:30 +0000 (00:59 -0800)]
[PATCH] Keys: Remove incorrect and obsolete '!' operators
The attached patch removes a couple of incorrect and obsolete '!' operators
left over from the conversion of the key permission functions from
true/false returns to zero/error returns.
Signed-Off-By: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>