| Age | Commit message (Collapse) | Author | Files | Lines |
|
Use a register target for segment register saving
Pointed out by H.J.Lu
|
|
several pci-only drivers marked as dependent on PCI.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
|
|
dma-mapping.h needs to be included there; on i386 it works by accident
since there dma-mapping.h is indirectly brought in elsewhere.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
|
|
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
|
|
usblcd.c passes address of size_t variable to function that expects int
*. That breaks on 64bit big-endian, obviously. Fixed, along with the
usb-skeleton.c - that's where the bug had been copied from.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
|
|
a) jsm depends on PCI. Kconfig fixed.
b) spin_lock_irqsave() et.al. expect unsigned long, not u64.
c) pointer arithmetics works just fine without casts to u64, thank
you very much.
d) iomem annotations added.
e) jsm_get_mstat() lost bits - among other things it did
if (mstat & UART_MSR_DSR)
result |= TIOCM_DSR;
and ended with return result; since TIOCM_DSR is 256 on e.g. i386,
declaring result as unsigned char was a bad idea (function itself
returns int).
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
|
|
gs_wait_tx_flushed() should have its second argument (timeout) unsigned
long, not int. One of the callers passes it MAX_SCHEDULE_TIMEOUT and
function itself compares argument with that value. Since that's
LONG_MAX, we get breakage on all 64bit platforms.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
|
|
fs/coda/upcall.c includes both asm/signal.h and linux/signal.h.
For one thing, the former is included by the latter; for another, on
some platforms it actually relies on the stuff included earlier in
linux/signal.h (but not in upcall.c).
Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
This fixes a NULL pointer dereference Oops in my "Multimedia eXtension
Board" driver.
The tda9840 i2c driver dereferences the argument pointer, but the MXB
driver is supplying a NULL pointer for one of the commands. The patch
makes this one command behave like the others, ie. it expects an int
argument.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
kfree() handles NULL pointers fine - checking is redundant.
Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
Moved i_next_alloc_block and i_next_goal_block out from ext3_inod_info, and
put it together with the reservation structure into the
ext3_block_alloc_info structure, and dynamically allocate that structure
whenever need to allocation a block. This is also apply for noreservation
mount. Also cleanup ext3_find_goal() code.
Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
Since now the ei->truncate_sem is guarding the concurrent allocation and
the deallocation, there is no need to use the the rsv_seqlock lock in the
ext3_reserve_window_node, which was there to protect using/allocating
reservation window race between two threads allocating blocks at the same
time.
Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
Right now the ext3 reservation structure(ext3_reserve_window_node) is part of
the ext3 inode itself. This part of information is only needed for files that
need allocate blocks on disk. So, the attached patches reduce the ext3 inode
size by dynamically allocating the block allocation/reservation info
structure(called struct ext3_block_alloc_info) when it is needed(i.e. only
for files who need to allocate blocks)
The reservation structure is being allocated and linked to the ext3 inode at
ext3_get_block_handle(), and being freed and unlinked at the
iput_final->ext3_clear_inode().
The ei->truncate_sem which is currently used to protect concurrent
ext3_get_block() and ext3_truncate is used to protect reservation structure
allocation and deallocation.
Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
Nathan's patch "make OF node fixup code usable at runtim" is introducing a
snaky bug. We do 2 passes over this code, one to measure how much memory
will be needed so we can allocate a single block, and one to do the actual
fixup. However, the new code does some result-checking of prom_alloc()
which breaks this mecanism, as the first pass always starts at "0", thus we
fail to measure the additional size properly and allocate a block smaller
than what we'll actually use for the fixup. This cause us to override
whatever sits there, with variable results depending on the memory layout
of the machine (but typically crashes).
This patch fixes it by starting the "measure" pass with an initial size set
to 16 and not 0.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
This fix DRM build on ppc64 (even if DRM here is not yet functional, you'll
need the bleeding edge r300 stuff) by properly defining PAGE_AGP for the
ppc64 architecture.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
CONFIG_OPROFILE=m doesn't work on ppc64 if these aren't exported...
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
The call_prom routine in arch/ppc/syslib/prom_init.c, which does a client
call to Open Firmware, returns a void *, and we use void * for instance
handles and package handles that are returned from and used in OF calls.
This is a bad idea - we can't ever dereference those things, and we end up
with a lot of casts because arguments to and return values from OF calls
are sometimes handles and sometimes numbers.
This patch cleans things up by using u32 as the type for OF handles. The
return type of call_prom becomes int because the return value from an OF
call is often an int status code. The number of casts in prom_init.c is
reduced substantially by this patch.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
Since we have some syscalls with 6 arguments, it's useful to have a
definition of _syscall6 in asm-ppc/unistd.h. This patch adds a suitable
definition.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
This patch shuts up some more incorrect gcc warnings.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
This patch shuts up a couple of gcc "variable may be used uninitialized"
warnings. The warnings are invalid - the code is such that the variables
are in fact initialized before being used - but gcc isn't smart enough to
see that. This patch eliminates the warnings.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
We were using an internal sysrq function instead of the exported public
interface for registering a sysrq key in arch/ppc/xmon/start.c. This patch
fixes it (and eliminates a compiler warning).
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
Renamed head_e500.S to head_fsl_booke.S since the file is applicable to
other PowerPC Book-E implementations from Freescale, not just the e500.
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
The attached patch improves nommu mmap support; particularly in terms on
supporting private mappings. It does this by examining the device capability
mask now in the backing_dev_info structure.
Private mappings will now be backed by the underlying device directly if
possible, where "possible" is constrained by the protection mask parameter
and the device capabilities mask.
I've also split the do_mmap_pgoff() function contents into a number of
auxilliary functions to make it easier to understand.
The documentation is also updated; including the addition of a warning
about permitting direct mapping of flash chips and the problems of XIP vs
write.
Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
Not all x86 subarchitectures have support for hyperthreading, so every
piece you add for it has to be predicated on checks for CONFIG_X86_HT.
The patch corrects this hyperthreading leakage problem in intel_cacheinfo.c
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
This completes the Kconfig cleanup for all other archs.
CPU_FREQ_TABLE was moved to drivers/cpufreq/Kconfig and is selected as
needed.
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
|
|
Patch from Pavel Machek
This fixes u32 vs. pm_message_t confusion in arm. I was not able to
even compile it, but it should not cause any problems. Please apply,
|
|
* struct soc_cq split into two variants differing only in annotations -
ones we use for requests have ->pool pointing to normal memory, ones for
responses have it pointing to iomem.
* all instances of soc_cq were either always of request or always of
response variety; replaced with soc_cq_rsp and soc_cq_req resp.
* the rest consists of trivial adding __iomem where needed - the
only tricky bit had been soc_cq annotations.
Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
The new protocol registration locking uses a rwlock to limit access
to the protocol list. Unfortunately, the initialisation:
static rwlock_t proto_list_lock;
Only works to initialise the lock as unlocked on platforms whose unlock
signal is all zeros. On other platforms, they think it's already locked
and hang forever.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
With David Woodhouse <dwmw2@infradead.org>.
On resume from sleep, via_set_speed() doesn't reinstate the correct
mode, because it thinks the drive is already configured correctly.
Also kill redundant printk, ide_config_drive_speed() warns about errors.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
* add ide_drives list to list devices without a driver
* add __ide_add_setting() and use it for adding no auto remove entries
* kill ide-default pseudo-driver
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
* add ide_driver_t * to device drivers objects
* set it to point at driver's ide_driver_t
* store address of this entry in disk->private_data
* fix ide_{cd,disk,floppy,tape,scsi}_g accordingly
* use rq->rq_disk->private_data instead of drive->driver
to obtain driver (this allows us to kill ide-default)
ide_dma_intr() OOPS fixed by Tejun Heo <htejun@gmail.com>.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
* move ->disk from ide_drive_t to driver specific objects
* make drivers allocate struct gendisk and setup rq->rq_disk
(there is no need to do this for REQ_DRIVE_TASKFILE requests)
* add ide_init_disk() helper and kill alloc_disks() in ide-probe.c
* kill no longer needed ide_open() and ide_fops[] in ide.c
ide_init_disk() fixed by Andrew Morton <akpm@osdl.org>.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
Add ide_{un}register_region() and fix ide-{tape,scsi}.c to register
block device number ranges. In ata_probe() only probe for modules.
Behavior is unchanged because:
* if driver is already loaded and attached to drive ata_probe()
is not called et all
* if driver is loaded by ata_probe() it will register new number range
for a drive and this range will be found by kobj_lookup()
If this is not clear please read http://lwn.net/Articles/25711/
and see drivers/base/map.c.
This patch makes it possible to move drive->disk allocation from
ide-probe.c to device drivers.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
When this function is called device is already unbinded from a
driver so there are no driver /proc entries to remove.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
drive->dsc_overlap is supported only by ide-{cd,tape} drivers.
Add missing clearing of ->dsc_overlap to ide_{cd,tape}_release()
and move ->dsc_overlap setup from ide_register_subdriver() to
ide_cdrom_setup() (ide-tape enables it unconditionally).
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
It is drive's property independent of the driver being used so move
drive->nice1 setup from ide_register_subdriver() to probe_hwif() in
ide-probe.c. As a result changing a driver which controls the drive
no longer affects this flag.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
Patch from Ben Dooks
Since the RX3715 inits with fclk as the clock source,
and to allow the system to generate the baud-rates for
bluetooth control, this patch configures the platform
data for "fclk" as a clock source
Signed-off-by: Ben Dooks
Signed-off-by: Russell King
|
|
Patch from Richard Purdie
The Sharp SL series bootloader puts a parameter structure into
memory with important LCD parameters in it (amongst other things).
The structure is common to collie, corgi, poodle, tosa and other
models. This patch combines all the existing code into one place
and simplifies access to the data.
Signed-off-by: Richard Purdie
Signed-off-by: Russell King
|
|
Older UltraSPARC chips only have a 43-bit sign extended
TSB register. So we have to make sure the address we
end up with will produce a valid value within that range.
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Cset exclude: gregkh@suse.de|ChangeSet|20050317183046|30063
The patch doesn't do anything, and I'm not going to be trusting
any more SGI pci hotplug patches for a long time...
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
|
The recent additions to make gnet_stats_* useable for action
statistics dumping in two steps introcuded a few error prone
assumptions which can easly be forgotten. This patch fixes this
up by simplifying the process of adding new fields to struct
gnet_dump or adding additional backward compatibility TLVs.
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
used
Although this case is hypothetical at the moment, more advanced actions are
likely to need this in the future.
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
statistics are to be dumped
Fixes a stupid bug introcuded in my "Fix action statistics dumping in
compatibility mode" patch, no clue why it actually worked without this fix.
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
This trick requires that we PAGE_SIZE align the per-cpu
areas, but that is fine. Also, reduce the __per_cpu_offsets[]
array into just two values, a base and a shift.
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
This patch against -bk eliminates the use of i_sock by SELinux as it
appears to have been removed recently, breaking the build of SELinux in
-bk. Simply replacing the i_sock test with an S_ISSOCK test would be
unsafe in the SELinux code, as the latter will also return true for the
inodes of socket files in the filesystem, not just the actual socket
objects IIUC. Hence this patch reworks the SELinux code to avoid the
need to apply such a test in the first place, part of which was
obsoleted anyway by earlier changes to SELinux. Please apply.
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Grant Coady noticed that most hardware monitoring drivers are exposed to
a race condition when one writes to the sysfs files they create. While
the read calls properly request a lock on the internal data, write calls
manipulate the internal data without proper locking. This big patch
fixes that by adding locking wherever needed.
Affected drivers: adm1021, adm1025, asb100, ds1621, fscher, fscpos,
gl518sm, gl520sm, it87, lm63, lm75, lm77, lm78, lm80, lm83, lm87, lm90,
lm92, max1619, pc87360, pcf8591, sis5595, smsc47m1, via686a, w83627hf
and w83781d
The adm1026, adm1031 and lm85 were already locking on write calls, but
held the lock for code that did not require it, so they have been
modified too.
The smsc47b397 and w83l785ts drivers were not affected, because they are
read-only.
The patch should apply just fine on top of your stack, provided that you
applied all previous patches in order (in particular, there is one lm87
indentation patch which is needed).
Signed-off-by: Grant Coady <gcoady@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
|
So far, the functionality handling of i2c adapters was done in i2c-core
by two exported functions: i2c_get_functionality and
i2c_check_functionality. I found that both functions could be reduced to
one line each, and propose that we turn them into inline function in the
i2c.h header file, much like other i2c helper functions (e.g.
i2c_get_clientdata, i2c_set_clientdata and i2c_clientname).
The conversion of i2c_get_functionality suppresses a legacy check which
shouldn't be needed anymore. Only one driver (s3c2410) was still relying
on it, and was fixed some days ago.
The conversion lets us get rid of two exports. Not only i2c-core gets
smaller (by 458 bytes), but the client drivers using these functions get
smaller too (typically by 48 bytes). And of course the new way is likely
to be faster too, even if it wasn't my primary objective.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
|
While investigating the i2c chips drivers that were not properly
locking, we found that the pcf8574 driver does the exact contrary. It
uses a lock where it's not needed.
While we were there, we did some additional cleanups to the driver:
1* Merge pcf8574_update_client() in show_read(), as it was the only user
and the function became trivial once the locking was removed.
2* Add a validity check on values provided by user-space.
Aurelien Jarno tested the modified code for confirmation and it worked
just fine.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|