Mark McLoughlin [Tue, 3 Oct 2006 08:15:25 +0000 (01:15 -0700)]
[PATCH] dm snapshot: allow zero chunk_size
The chunk size of snapshots cannot be changed so it is redundant to require it
as a parameter when activating an existing snapshot. Allow a value of zero in
this case and ignore it. For a new snapshot, use a default value if zero is
specified.
Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Milan Broz [Tue, 3 Oct 2006 08:15:22 +0000 (01:15 -0700)]
[PATCH] dm: support ioctls on mapped devices: fix with fake file
The new ioctl code passes the wrong file pointer to the underlying device.
No file pointer is available so make a temporary fake one.
ioctl_by_bdev() does set_fs(KERNEL_DS) so it's for ioctls originating
within the kernel and unsuitable here. We are processing ioctls that
originated in userspace and mapping them to different devices. Fixing the
existing callers that pass a NULL file struct and consolidating the
fake_file users are separate matters to solve in later patches.
Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
If we get as far as the device-mapper ioctl handler, we know the ioctl is not
a standard block layer BLK* one, so we don't need to check for them a second
time and can call blkdev_driver_ioctl() directly.
Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Milan Broz [Tue, 3 Oct 2006 08:15:20 +0000 (01:15 -0700)]
[PATCH] dm mpath: support ioctls
When an ioctl is performed on a multipath device simply pass it on to the
underlying block device through current_path. If current path is not yet
selected, select it.
Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Milan Broz [Tue, 3 Oct 2006 08:15:15 +0000 (01:15 -0700)]
[PATCH] dm: support ioctls on mapped devices
Extend the core device-mapper infrastructure to accept arbitrary ioctls on a
mapped device provided that it has exactly one target and it is capable of
supporting ioctls.
[We can't use unlocked_ioctl because we need 'inode': 'file' might be NULL.
Is it worth changing this?]
Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Arnd Bergmann <arnd@arndb.de> wrote:
> Am Wednesday 21 June 2006 21:31 schrieb Alasdair G Kergon:
> > static struct block_device_operations dm_blk_dops = {
> > .open = dm_blk_open,
> > .release = dm_blk_close,
> > +.ioctl = dm_blk_ioctl,
> > .getgeo = dm_blk_getgeo,
> > .owner = THIS_MODULE
>
> I guess this also needs a ->compat_ioctl method, otherwise it won't
> work for ioctl numbers that have a compat_ioctl implementation in the
> low-level device driver.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Paul Mackerras [Tue, 3 Oct 2006 08:15:14 +0000 (01:15 -0700)]
[PATCH] nvidia fbdev: fix powerpc xmon scribbles
xmon writes garbage on the screen because the nvidia console driver has
changed the line pitch from what the firmware set it to. Fix it by making
the nvidia driver inform the btext engine (which xmon uses if the screen is
its output device) about changes to display resolution.
Signed-off-by: Paul Mackerras <paulus@samba.org> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] radeonfb supend/resume support for Acer Aspire 2010
This patch adds suspend/resume support for the graphics chip in the
Acer Aspire 2010: ATI Technologies Inc RV350 [Mobility Radeon 9600 M10]
01:00.0 0300: 1002:4e50 (prog-if 00 [VGA])
Subsystem: 1025:0061
Flags: bus master, 66MHz, medium devsel, latency 128, IRQ 16
Memory at a8000000 (32-bit, prefetchable) [size=128M]
I/O ports at c100 [size=256]
Memory at e0010000 (32-bit, non-prefetchable) [size=64K]
[virtual] Expansion ROM at a0000000 [disabled] [size=128K]
Capabilities: [58] AGP version 2.0
Capabilities: [50] Power Management version 2
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@mgx.net> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: "Benjamin A. Okopnik" <ben@linuxgazette.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Alan Cox [Tue, 3 Oct 2006 08:15:07 +0000 (01:15 -0700)]
[PATCH] sstfb: cleanups
- Remove 24/32bit unused support (the chips don't do 24/32bit anyway)
- Clean up printk obfuscation
- Clean up lispitus in the if(())()) stuff
- Minor tidying
No functionality changes, may have a crack at hardware scrolling based
on my X driver once the cleanups are in.
Signed-off-by: Alan Cox <alan@redhat.com> Cc: Antonino A. Daplas <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Raphael Assenat [Tue, 3 Oct 2006 08:15:03 +0000 (01:15 -0700)]
[PATCH] mbxfb: Fix a chip bug? resulting in wrong pixclock
This is a workaround for what I think is a bug in the 2700G chip.
The PLL output frequency is adustable using 3 values (M, N and P. See code
for formula). The N value range is documented to be 1 to 7 but when it is set
to 1, the output frequency is lower than it should be (divided by 2), giving
unexpected results such as no sync on a CRT display.
This patch prevents N=1 when searching for the best value for the requested
pixclock.
Adrian Bunk [Tue, 3 Oct 2006 08:15:02 +0000 (01:15 -0700)]
[PATCH] atyfb: Possible cleanups
- make the following needlessly global function static:
- mach64_ct.c: aty_st_pll_ct()
- proper prototypes for the following functions:
- atyfb_base.c: atyfb_copyarea()
- atyfb_base.c: atyfb_fillrect()
- atyfb_base.c: atyfb_imageblit()
Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Antonino Daplas <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Dave Jones [Tue, 3 Oct 2006 08:14:47 +0000 (01:14 -0700)]
[PATCH] fbcon: Use persistent allocation for cursor blinking
Every time the console cursor blinks, we do a kmalloc/kfree pair. This
patch turns that into a single allocation.
This allocation was the most frequent kmalloc I saw on my test box.
[adaplas]
Per Alan's suggestion, move global variables to fbcon's private structure.
This would also avoid resource leaks when fbcon is unloaded.
Signed-off-by: Dave Jones <davej@redhat.com> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Antonino Daplas <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Dennis Munsie [Tue, 3 Oct 2006 08:14:42 +0000 (01:14 -0700)]
[PATCH] fbdev: Add generic ddc read functionality
Adds functionality to read the EDID information over the DDC bus in a generic
way. This code is based on the DDC implementation in the radeon driver.
[adaplas]
- separate from fbmon.c and place in new file fb_ddc.c
- remove dependency to CONFIG_I2C and CONFIG_I2C_ALGOBIT, otherwise, feature
will not compile if i2c support is compiled as a module
- feature is selectable only by drivers needing it. It must have a
'select FB_DDC if xxx' in Kconfig
- change printk's to dev_*, the i2c people prefers it
Signed-off-by: Dennis Munsie <dmunsie@cecropia.com> Signed-off-by: Antonino Daplas <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] Allow ide_generic_all to be used modular and built in
Allow ide/pci/generic to claim chipsets as a a module or when built-in. It
requires using "all_generic_ide" as a boot option.
Signed-off-by: Patrick Jefferson <henj@hp.com> Acked-by: Alan Cox <alan@redhat.com>
Closes-Bug: 7017 Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Alan Cox [Tue, 3 Oct 2006 08:14:33 +0000 (01:14 -0700)]
[PATCH] ide: Fix crash on repeated reset
Michal Miroslaw reported a problem (bugzilla #7023) where a user initiated
reset while the IDE layer was already resetting the channel caused a crash,
and provided a rough fix.
This is a slightly cleaner version of the fix which tracks the reset state
and blocks further reset requests while a reset is in progress.
Note this is not a security issue - random end users can't access the
ioctl in question anyway.
Signed-off-by: Alan Cox <alan@redhat.com> Cc: Michal Miroslaw <mirq-linux@rere.qmqm.pl> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jason Lunz [Tue, 3 Oct 2006 08:14:26 +0000 (01:14 -0700)]
[PATCH] ide: reprogram disk pio timings on resume
Add a step to the IDE PM state machine that reprograms disk PIO timings
as the first step on resume. This prevents ide deadlock on
resume-from-ram on my nforce3-based laptop.
An earlier implementation was written entirely within the amd74xx ide
driver, but Alan helpfully pointed out that this is the correct thing to
do globally. Still, I'm only calling hwif->tuneproc() for disks, based
on two things:
- The existing state machine is already passed over for non-disk drives
- Previous testing on my laptop shows that the hangs are related only
to the disk - suspend/resume from a livecd showed that there's no
need for this on the cdrom.
Signed-off-by: Jason Lunz <lunz@falooley.org> Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: Pavel Machek <pavel@ucw.cz> Cc: Brad Campbell <brad@wasp.net.au> Cc: David Brownell <david-b@pacbell.net> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Alan Cox [Tue, 3 Oct 2006 08:14:23 +0000 (01:14 -0700)]
[PATCH] ide: backport piix fixes from libata into the legacy driver
There are three flags being set by default by the PIIX driver for speeds >
PIO 1, and one not being cleared properly on fallback to PIO0. The most
important one is the prefetch/post write control which only works for ATA
and can do bad things with ATAPI.
The patch does its best to set the flags correctly for drivers/ide. Its
not 100% perfect but its closer than the original. 100% perfect requires
proper IORDY handling but this isn't critical (and its not right in libata
either .. yet)
BTW, there's quite obvious error here which leads to access outside of
timings[] if somebody passes PIO mode 5 (or autotuning code finds out that
drive supports PIO mode 5). Could have been fixed while at it... Those drives
should be rare, though...
Tobias Oed [Tue, 3 Oct 2006 08:14:17 +0000 (01:14 -0700)]
[PATCH] Enable cdrom dma access with pdc20265_old
This patch allows me to use dma with my cd/dvd attached to my on board
pdc20265 ide controller
Alan sayeth:
Looks sane. Would be nice to know if there is any documentation
supporting this hack being safe but the logic makes sense. The LBA48 case
faces the same problem - the state machine gets confused about the transfer
length and needs kicking
Signed-off-by: Tobias Oed <tobiasoed@hotmail.com> Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl> Cc: Jens Axboe <axboe@suse.de> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Sergei Shtylyov [Tue, 3 Oct 2006 08:14:17 +0000 (01:14 -0700)]
[PATCH] ide_dma_speed() fixes
ide_dma_speed() fails to actually honor the IDE drivers' mode support
masks) because of the bogus checks -- thus, selecting the DMA transfer mode
that the driver explicitly refuses to support is possible. Additionally,
there is no check for validity of the UltraDMA mode data in the drive ID,
and the function is misdocumented.
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Hua Zhong [Tue, 3 Oct 2006 08:14:15 +0000 (01:14 -0700)]
[PATCH] IDE error handling fixes
In 2.6.15.1 I encountered some IDE crashes when unplugging IDE cables to
emulate disk errors. Below is a patch against 2.6.16 which I think still
applies.
1. The first BUG_ON could trigger when a PREFLUSH IO fails (it would
fail the original barrier request which hasn't been marked REQ_STARTED
yet).
2. the rq could have been dequeued already (same as 1).
3. HWGROUP(drive)->rq could be NULL because of the ide_error() several
lines earlier.
Signed-off-by: Hua Zhong <hzhong@gmail.com> Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Release the DMA engine for the custom mapping IDE drivers also (for
example, siimage.c does allocate it in both I/O-mapped and custom-mapped
modes). Remove useless code from the error path of
ide_allocate_dma_engine().
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Alan Cox [Tue, 3 Oct 2006 08:14:12 +0000 (01:14 -0700)]
[PATCH] non-libata driver for Jmicron devices
Less functional than libata this just uses the merged interface provided for
dumb legacy OS's. This is basically a bridge for people not yet ready to use
libata for some reason or another.
Port visibility is entirely dependant on the BIOS setup.
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] scheduler: NUMA aware placement of sched_group_allnodes
When the per cpu sched domains are build then they also need to be placed
on the node where the cpu resides otherwise we will have frequent off node
accesses which will slow down the system.
Signed-off-by: Christoph Lameter <clameter@sgi.com> Acked-by: Ingo Molnar <mingo@elte.hu> Acked-by: Nick Piggin <nickpiggin@yahoo.com.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Up to now sched group's cpu_power for each sched domain is initialized
independently. This made the setup code ugly as the new sched domains are
getting added.
Make the sched group cpu_power setup code generic, by using domain child
field and new domain flag in sched_domain. For most of the sched
domains(except NUMA), sched group's cpu_power is now computed generically
using the domain properties of itself and of the child domain.
sched groups in NUMA domains are setup little differently and hence they
don't use this generic mechanism.
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Acked-by: Ingo Molnar <mingo@elte.hu> Acked-by: Nick Piggin <nickpiggin@yahoo.com.au> Cc: Paul Jackson <pj@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Dave Jones [Tue, 3 Oct 2006 08:14:07 +0000 (01:14 -0700)]
[PATCH] sched: don't print migration cost when only 1 CPU
If only a single CPU is present, printing this doesn't make much sense.
Signed-off-by: Dave Jones <davej@redhat.com> Acked-by: Ingo Molnar <mingo@elte.hu> Acked-by: Nick Piggin <nickpiggin@yahoo.com.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] sched: remove unnecessary sched group allocations
Remove dynamic sched group allocations for MC and SMP domains. These
allocations can easily fail on big systems(1024 or so CPUs) and we can live
with out these dynamic allocations.
Nick Piggin [Tue, 3 Oct 2006 08:14:04 +0000 (01:14 -0700)]
[PATCH] sched: force /sbin/init off isolated cpus
Force /sbin/init off isolated cpus (unless every CPU is specified as an
isolcpu).
Users seem to think that the isolated CPUs shouldn't have much running on
them to begin with. That's fair enough: intuitive, I guess. It also means
that the cpu affinity masks of tasks will not include isolcpus by default,
which is also more intuitive, perhaps.
/sbin/init is spawned from the boot CPU's idle thread, and /sbin/init
starts the rest of userspace. So if the boot CPU is specified to be an
isolcpu, then prior to this patch, all of userspace will be run there.
(throw in a couple of plausible devinit -> cpuinit conversions I spotted
while we're here).
Signed-off-by: Nick Piggin <npiggin@suse.de> Cc: Dimitri Sivanich <sivanich@sgi.com> Acked-by: Paul Jackson <pj@sgi.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Bjorn Helgaas [Tue, 3 Oct 2006 08:14:00 +0000 (01:14 -0700)]
[PATCH] ia64: note requirement for 8250_pnp, now that 8250_acpi is gone
We removed 8250_acpi in 2.6.17. If we don't have PNPACPI turned on, we
won't find any ACPI serial devices, so mention this requirement in the
troubleshooting part of the documentation.
CONFIG_PNPACPI is already turned on in all the relevant defconfigs.
Corey Minyard [Tue, 3 Oct 2006 08:13:59 +0000 (01:13 -0700)]
[PATCH] IPMI: allow user to override the kernel IPMI daemon enable
After the previous patch to disable the kernel IPMI daemon if interrupts
were available, the issue of broken hardware was raised, and a reasonable
request to add an override was mode. So here it is.
Allow the user to force the kernel ipmi daemon on or off. This way,
hardware with broken interrupts or users that are not concerned with
performance can turn it on or off to their liking.
[akpm@osdl.org: save 4 bytes in vmlinux] Signed-off-by: Corey Minyard <minyard@acm.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Olaf Hering [Tue, 3 Oct 2006 08:13:56 +0000 (01:13 -0700)]
[PATCH] restore parport_pc probing on powermac
The last change for partport_pc did fix the common case for all PowerMacs,
but it broke the case for PCI multiport IO cards. In fact, the config
option CONFIG_PARPORT_PC_SUPERIO=y lead to a hard crash when cups probed
the parport driver. It enables the winbond and smsc probing.
Remove the PARPORT_BASE check again, parport_pc_find_nonpci_ports() will
take care of it. All powerpc configs should have
CONFIG_PARPORT_PC_SUPERIO=n, the code did not find anything on the chrp
boards we tested it on.
Tested on a G4/466 with a PCI card:
0001:10:13.0 Serial controller: Timedia Technology Co Ltd PCI2S550 (Dual 16550 UART) (rev 01) (prog-if 02 [16550])
Subsystem: Timedia Technology Co Ltd Unknown device 5079
Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping+ SERR- FastB2B-
Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Interrupt: pin A routed to IRQ 53
Region 0: I/O ports at f2000800 [size=32]
Region 2: I/O ports at f2000870 [size=8]
Region 3: I/O ports at f2000860 [size=8]
Signed-off-by: Olaf Hering <olaf@aepfle.de> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Adam Belay <ambx1@neo.rr.com> Cc: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Alan Cox [Tue, 3 Oct 2006 08:13:55 +0000 (01:13 -0700)]
[PATCH] ISDN warning fixes
Clean up warnings in drivers/isdn by using long not int for the values
where we pass void * and cast to integer types. The code is ok (ok passing
the stuff this way isn't pretty but the code is valid). In all the cases I
checked out the right thing happens anyway but this removes all the
warnings.
Signed-off-by: Alan Cox <alan@redhat.com> Cc: Jeff Garzik <jeff@garzik.org> Acked-by: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Garzik [Tue, 3 Oct 2006 08:13:53 +0000 (01:13 -0700)]
[PATCH] drivers/char/ip2: kill unused code, label
Kill warning:
drivers/char/ip2/ip2main.c: In function â\80\98ip2_loadmainâ\80\99:
drivers/char/ip2/ip2main.c:782: warning: label â\80\98out_classâ\80\99 defined but not used
This driver's initialization (and cleanup of errors during init) is
extremely convoluted, and could stand to be transformed into the standard
unwinding-goto style of error cleanup.
Signed-off-by: Jeff Garzik <jeff@garzik.org> Acked-by: Michael H. Warfield <mhw@wittsend.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Garzik [Tue, 3 Oct 2006 08:13:52 +0000 (01:13 -0700)]
[PATCH] ipmi: fix uninitialized data bug
gcc issues the following warning:
drivers/char/ipmi/ipmi_si_intf.c: In function â\80\98init_ipmi_siâ\80\99:
drivers/char/ipmi/ipmi_si_intf.c:1729: warning: â\80\98data.irqâ\80\99 may be used uninitialized in this function
This is indeed a bug. data.irq is completely uninitialized in some code
paths. Worse than that, data from a previous decode_dmi() run can easily
leak through successive calls.
Signed-off-by: Jeff Garzik <jeff@garzik.org> Acked-by: Corey Minyard <minyard@acm.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
While reviewing the 'may be used uninitialized' bogus gcc warnings, I
noticed that an error code assignment was only needed if an error had
actually occured.
Signed-off-by: Jeff Garzik <jeff@garzik.org> Cc: Davide Libenzi <davidel@xmailserver.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
keios [Tue, 3 Oct 2006 08:13:49 +0000 (01:13 -0700)]
[PATCH] low performance of lib/sort.c
It is a non-standard heap-sort algorithm implementation because the index
of child node is wrong . The sort function still outputs right result, but
the performance is O( n * ( log(n) + 1 ) ) , about 10% ~ 20% worse than
standard algorithm.
Signed-off-by: keios <keios.cn@gmail.com> Acked-by: Matt Mackall <mpm@selenic.com> Acked-by: Zou Nan hai <nanhai.zou@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Franck Bui-Huu [Tue, 3 Oct 2006 08:13:48 +0000 (01:13 -0700)]
[PATCH] Create kallsyms_lookup_size_offset()
Some uses of kallsyms_lookup() do not need to find out the name of a symbol
and its module's name it belongs. This is specially true in arch specific
code, which needs to unwind the stack to show the back trace during oops
(mips is an example). In this specific case, we just need to retreive the
function's size and the offset of the active intruction inside it.
Adds a new entry "kallsyms_lookup_size_offset()" This new entry does
exactly the same as kallsyms_lookup() but does not require any buffers to
store any names.
It returns 0 if it fails otherwise 1.
Signed-off-by: Franck Bui-Huu <vagabon.xyz@gmail.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
David Howells [Tue, 3 Oct 2006 08:13:46 +0000 (01:13 -0700)]
[PATCH] VFS: Make filldir_t and struct kstat deal in 64-bit inode numbers
These patches make the kernel pass 64-bit inode numbers internally when
communicating to userspace, even on a 32-bit system. They are required
because some filesystems have intrinsic 64-bit inode numbers: NFS3+ and XFS
for example. The 64-bit inode numbers are then propagated to userspace
automatically where the arch supports it.
Problems have been seen with userspace (eg: ld.so) using the 64-bit inode
number returned by stat64() or getdents64() to differentiate files, and
failing because the 64-bit inode number space was compressed to 32-bits, and
so overlaps occur.
This patch:
Make filldir_t take a 64-bit inode number and struct kstat carry a 64-bit
inode number so that 64-bit inode numbers can be passed back to userspace.
The stat functions then returns the full 64-bit inode number where
available and where possible. If it is not possible to represent the inode
number supplied by the filesystem in the field provided by userspace, then
error EOVERFLOW will be issued.
Similarly, the getdents/readdir functions now pass the full 64-bit inode
number to userspace where possible, returning EOVERFLOW instead when a
directory entry is encountered that can't be properly represented.
Note that this means that some inodes will not be stat'able on a 32-bit
system with old libraries where they were before - but it does mean that
there will be no ambiguity over what a 32-bit inode number refers to.
Note similarly that directory scans may be cut short with an error on a
32-bit system with old libraries where the scan would work before for the
same reasons.
It is judged unlikely that this situation will occur because modern glibc
uses 64-bit capable versions of stat and getdents class functions
exclusively, and that older systems are unlikely to encounter
unrepresentable inode numbers anyway.
[akpm: alpha build fix] Signed-off-by: David Howells <dhowells@redhat.com> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Garzik [Tue, 3 Oct 2006 01:08:22 +0000 (21:08 -0400)]
[PATCH] hp100: fix conditional compilation mess
The previous hp100 changeset attempted to kill warnings, but was only
tested on !CONFIG_ISA platforms. The correct conditional compilation
setup involves tested CONFIG_ISA rather than just MODULE.
Fixes link on CONFIG_ISA platforms (i386) in current -git.
Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Move the call to ib_register_device() later, since a device should not
be registered until it is completely read to be used. This fixes
crashes that occur if an upper-layer driver such as IPoIB is loaded
before the ehca module.
Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Reorganize code relating to cma_get_net_info() and rdam_create_id() to
optimize error case handling (no need to alloc memory/etc. as part of
rdma_create_id() if input parameters are wrong).
Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com> Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>