David S. Miller [Tue, 18 Jul 2006 04:39:09 +0000 (21:39 -0700)]
[SPARC]: Fix initialization of sun4d SBUS interrupts.
1) Explicitly traverse to the root looking for the "sbi".
2) Grab the "board#" property from the sbi's parent and
verify that this parent is an "io-unit" node.
3) Skip IRQ initialization when device lacks "reg" property.
Signed-off-by: David S. Miller <davem@davemloft.net>
Bob Breuer [Tue, 18 Jul 2006 00:05:56 +0000 (17:05 -0700)]
[SPARC]: Fix property name acquisition in prom.c
On sparc32 the prom_{first,next}prop() interfaces work
a little differently. The buffer argument is ignored on
sparc32 and the firmware just returns a raw pointer to
the property name.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 17 Jul 2006 05:10:44 +0000 (22:10 -0700)]
[SPARC64]: Fix more of_device layer IRQ bugs, and correct PROMREG_MAX.
Sabre and Psycho PCI controllers can have partial interrupt-map
properties, meaning that on-board devices don't match up to any
entries. Instead, they are fully specified from the beginning and
we should pass them directly to the IRQ translator as-is.
Also, fill in the necessary translator slots for the "graphics"
and "expansion UPA" interrupts on Sabre, Psycho, and SYSIO SBUS.
Increase PROMREG_MAX to 24, as seen on SUNW,ffb devices.
Finally, prevent accidentally writing past the end of the of_device
struct resource[] and irqs[] arrays. Spit out a log message when
we ignore some entries because there are too many of them.
Signed-off-by: David S. Miller <davem@davemloft.net>
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: (38 commits)
[SCSI] More buffer->request_buffer changes
[SCSI] mptfusion: bump version to 3.04.01
[SCSI] mptfusion: misc fix's
[SCSI] mptfusion: firmware download boot fix's
[SCSI] mptfusion: task abort fix's
[SCSI] mptfusion: sas nexus loss support
[SCSI] mptfusion: sas loginfo update
[SCSI] mptfusion: mptctl panic when loading
[SCSI] mptfusion: sas enclosures with smart drive
[SCSI] NCR_D700: misc fixes (section and argument ordering)
[SCSI] scsi_debug: must_check fixes
[SCSI] scsi_transport_sas: kill the use of channel
[SCSI] scsi_transport_sas: add expander backlink
[SCSI] hide EH backup data outside the scsi_cmnd
[SCSI] ibmvscsi: handle inactive SCSI target during probe
[SCSI] ibmvscsi: allocate lpevents for ibmvscsi on iseries
[SCSI] aic7[9x]xx: Remove last vestiges of reverse_scan
[SCSI] aha152x: stop poking at saved scsi_cmnd members
[SCSI] st.c: Improve sense output
[SCSI] lpfc 8.1.7: Change version number to 8.1.7
...
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
[PATCH] spidernet: rework tx queue handling
[PATCH] spidernet: bug fix for init code
[PATCH] sky2: NAPI poll fix
[NET] ethtool: fix oops by testing correct struct member
e1000: bump version to 7.1.9-k4
e1000: fix panic on large frame receive when mtu=default
e1000: remove CRC bytes from measured packet length
e1000: Redo netpoll fix to address community concerns
With this patch TX queue descriptors are not chained per default any more.
The pointer to next descriptor is set only when next descriptor is prepaired
for transfer. Also the mechanism of checking wether Spider is ready has been
changed: it checks not for CARDOWNED flag in status of previous descriptor
but for a TXDMAENABLED flag in Spider's register.
When sky2 driver gets lots of received packets at once, it can get stuck.
The NAPI poll routine gets called back to keep going, but since no IRQ bits
are set it doesn't make progress.
Increase version, since this is serious enough problem that I want to be
able to tell new from old problems.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Prior to this patch, the driver would do this for each port:
read 8-bit PCS
write 8-bit PCS
read 8-bit PCS
write 8-bit PCS
In the field, flaky behavior has been observed related to this register.
In particular, these overzealous register writes can cause misdetection
problems.
Update to do the following once (not once per port) at boot:
read 16-bit PCS
if needs changing,
write 16-bit PCS
And thereafter, we only perform a 'read 16-bit PCS' per port.
This should eliminate all PCS writes in many cases, and be more friendly
in the cases where we do need to enable ports.
Tejun Heo [Wed, 28 Jun 2006 16:58:28 +0000 (01:58 +0900)]
[PATCH] ata_piix: add host_set private structure
Add host_set private structure piix_host_priv. Currently the only
field is ->map which used to be stored directly at
host_set->private_data. This change allows more host_set private
fields to be added.
Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Jeff Dike [Fri, 14 Jul 2006 19:52:23 +0000 (15:52 -0400)]
[PATCH] UML - fix utsname build breakage
Some -mm-only material leaked into a patch destined for mainline, and I didn't
notice.
This was the replacement of system_utsname with utsname() that's required by
the uts namespace patch. This patch reverts those changes (which are correct
in -mm) so that mainline UML builds again.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This just turns off chmod() on the /proc/<pid>/ files, since there is no
good reason to allow it, and had we disallowed it originally, the nasty
/proc race exploit wouldn't have been possible.
The other patches already fixed the problem chmod() could cause, so this
is really just some final mop-up..
This particular version is based off a patch by Eugene and Marcel which
had much better naming than my original equivalent one.
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
[VLAN]: __vlan_hwaccel_rx can use the faster ether_compare_addr
[PKT_SCHED] HTB: initialize upper bound properly
[IPV4]: Clear skb cb on IP input
[NET]: Update frag_list in pskb_trim
Steven Rostedt [Fri, 14 Jul 2006 20:05:03 +0000 (16:05 -0400)]
[PATCH] remove set_wmb - arch removal
set_wmb should not be used in the kernel because it just confuses the
code more and has no benefit. Since it is not currently used in the
kernel this patch removes it so that new code does not include it.
All archs define set_wmb(var, value) to do { var = value; wmb(); }
while(0) except ia64 and sparc which use a mb() instead. But this is
still moot since it is not used anyway.
Hasn't been tested on any archs but x86 and x86_64 (and only compiled
tested)
Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] Remove down_write() from taskstats code invoked on the exit() path
In send_cpu_listeners(), which is called on the exit path, a down_write()
was protecting operations like skb_clone() and genlmsg_unicast() that do
GFP_KERNEL allocations. If the oom-killer decides to kill tasks to satisfy
the allocations,the exit of those tasks could block on the same semphore.
The down_write() was only needed to allow removal of invalid listeners from
the listener list. The patch converts the down_write to a down_read and
defers the removal to a separate critical region. This ensures that even
if the oom-killer is called, no other task's exit is blocked as it can
still acquire another down_read.
Thanks to Andrew Morton & Herbert Xu for pointing out the oom related
pitfalls, and to Chandra Seetharaman for suggesting this fix instead of
using something more complex like RCU.
[PATCH] per-task delay accounting taskstats interface: control exit data through cpumasks
On systems with a large number of cpus, with even a modest rate of tasks
exiting per cpu, the volume of taskstats data sent on thread exit can
overflow a userspace listener's buffers.
One approach to avoiding overflow is to allow listeners to get data for a
limited and specific set of cpus. By scaling the number of listeners
and/or the cpus they monitor, userspace can handle the statistical data
overload more gracefully.
In this patch, each listener registers to listen to a specific set of cpus
by specifying a cpumask. The interest is recorded per-cpu. When a task
exits on a cpu, its taskstats data is unicast to each listener interested
in that cpu.
Thanks to Andrew Morton for pointing out the various scalability and
general concerns of previous attempts and for suggesting this design.
[PATCH] per-task delay accounting: avoid send without listeners
Don't send taskstats (per-pid or per-tgid) on thread exit when no one is
listening for such data.
Currently the taskstats interface allocates a structure, fills it in and
calls netlink to send out per-pid and per-tgid stats regardless of whether
a userspace listener for the data exists (netlink layer would check for
that and avoid the multicast).
As a result of this patch, the check for the no-listener case is performed
early, avoiding the redundant allocation and filling up of the taskstats
structures.
Signed-off-by: Balbir Singh <balbir@in.ibm.com> Signed-off-by: Shailabh Nagar <nagar@watson.ibm.com> Cc: Jay Lan <jlan@engr.sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] delay accounting taskstats interface send tgid once
Send per-tgid data only once during exit of a thread group instead of once
with each member thread exit.
Currently, when a thread exits, besides its per-tid data, the per-tgid data
of its thread group is also sent out, if its thread group is non-empty.
The per-tgid data sent consists of the sum of per-tid stats for all
*remaining* threads of the thread group.
This patch modifies this sending in two ways:
- the per-tgid data is sent only when the last thread of a thread group
exits. This cuts down heavily on the overhead of sending/receiving
per-tgid data, especially when other exploiters of the taskstats
interface aren't interested in per-tgid stats
- the semantics of the per-tgid data sent are changed. Instead of being
the sum of per-tid data for remaining threads, the value now sent is the
true total accumalated statistics for all threads that are/were part of
the thread group.
The patch also addresses a minor issue where failure of one accounting
subsystem to fill in the taskstats structure was causing the send of
taskstats to not be sent at all.
The patch has been tested for stability and run cerberus for over 4 hours
on an SMP.
[akpm@osdl.org: bugfixes] Signed-off-by: Shailabh Nagar <nagar@watson.ibm.com> Signed-off-by: Balbir Singh <balbir@in.ibm.com> Cc: Jay Lan <jlan@engr.sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] per-task-delay-accounting: /proc export of aggregated block I/O delays
Export I/O delays seen by a task through /proc/<tgid>/stats for use in top
etc.
Note that delays for I/O done for swapping in pages (swapin I/O) is clubbed
together with all other I/O here (this is not the case in the netlink
interface where the swapin I/O is kept distinct)
[akpm@osdl.org: printk warning fix] Signed-off-by: Shailabh Nagar <nagar@watson.ibm.com> Signed-off-by: Balbir Singh <balbir@in.ibm.com> Cc: Jes Sorensen <jes@sgi.com> Cc: Peter Chubb <peterc@gelato.unsw.edu.au> Cc: Erich Focht <efocht@ess.nec.de> Cc: Levent Serinol <lserinol@gmail.com> Cc: Jay Lan <jlan@engr.sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Create a "taskstats" interface based on generic netlink (NETLINK_GENERIC
family), for getting statistics of tasks and thread groups during their
lifetime and when they exit. The interface is intended for use by multiple
accounting packages though it is being created in the context of delay
accounting.
This patch creates the interface without populating the fields of the data
that is sent to the user in response to a command or upon the exit of a task.
Each accounting package interested in using taskstats has to provide an
additional patch to add its stats to the common structure.
[akpm@osdl.org: cleanups, Kconfig fix] Signed-off-by: Shailabh Nagar <nagar@us.ibm.com> Signed-off-by: Balbir Singh <balbir@in.ibm.com> Cc: Jes Sorensen <jes@sgi.com> Cc: Peter Chubb <peterc@gelato.unsw.edu.au> Cc: Erich Focht <efocht@ess.nec.de> Cc: Levent Serinol <lserinol@gmail.com> Cc: Jay Lan <jlan@engr.sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] per-task-delay-accounting: cpu delay collection via schedstats
Make the task-related schedstats functions callable by delay accounting even
if schedstats collection isn't turned on. This removes the dependency of
delay accounting on schedstats.
Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com> Signed-off-by: Shailabh Nagar <nagar@watson.ibm.com> Signed-off-by: Balbir Singh <balbir@in.ibm.com> Cc: Jes Sorensen <jes@sgi.com> Cc: Peter Chubb <peterc@gelato.unsw.edu.au> Cc: Erich Focht <efocht@ess.nec.de> Cc: Levent Serinol <lserinol@gmail.com> Cc: Jay Lan <jlan@engr.sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] per-task-delay-accounting: sync block I/O and swapin delay collection
Unlike earlier iterations of the delay accounting patches, now delays are only
collected for the actual I/O waits rather than try and cover the delays seen
in I/O submission paths.
Account separately for block I/O delays incurred as a result of swapin page
faults whose frequency can be affected by the task/process' rss limit. Hence
swapin delays can act as feedback for rss limit changes independent of I/O
priority changes.
Signed-off-by: Shailabh Nagar <nagar@watson.ibm.com> Signed-off-by: Balbir Singh <balbir@in.ibm.com> Cc: Jes Sorensen <jes@sgi.com> Cc: Peter Chubb <peterc@gelato.unsw.edu.au> Cc: Erich Focht <efocht@ess.nec.de> Cc: Levent Serinol <lserinol@gmail.com> Cc: Jay Lan <jlan@engr.sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Initialization code related to collection of per-task "delay" statistics which
measure how long it had to wait for cpu, sync block io, swapping etc. The
collection of statistics and the interface are in other patches. This patch
sets up the data structures and allows the statistics collection to be
disabled through a kernel boot parameter.
Signed-off-by: Shailabh Nagar <nagar@watson.ibm.com> Signed-off-by: Balbir Singh <balbir@in.ibm.com> Cc: Jes Sorensen <jes@sgi.com> Cc: Peter Chubb <peterc@gelato.unsw.edu.au> Cc: Erich Focht <efocht@ess.nec.de> Cc: Levent Serinol <lserinol@gmail.com> Cc: Jay Lan <jlan@engr.sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Mike Rapoport [Fri, 14 Jul 2006 07:24:34 +0000 (00:24 -0700)]
[PATCH] mbxfb: Add framebuffer driver for the Intel 2700G
Add frame buffer driver for the 2700G LCD controller present on CompuLab
CM-X270 computer module.
[adaplas]
- Add more informative help text to Kconfig
- Make DEBUG a Kconfig option as FB_MBX_DEBUG
- Remove #include mbxdebug.c, this is frowned upon
- Remove redundant casts
- Arrange #include's alphabetically
- Trivial whitespace
Signed-off-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Antonino Daplas <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Eric Paris [Fri, 14 Jul 2006 07:24:33 +0000 (00:24 -0700)]
[PATCH] Fix security check for joint context= and fscontext= mount options
After some discussion on the actual meaning of the filesystem class
security check in try context mount it was determined that the checks for
the context= mount options were not correct if fscontext mount option had
already been used.
When labeling the superblock we should be checking relabel_from and
relabel_to. But if the superblock has already been labeled (with
fscontext) then context= is actually labeling the inodes, and so we should
be checking relabel_from and associate. This patch fixes which checks are
called depending on the mount options.
Signed-off-by: Eric Paris <eparis@redhat.com> Acked-by: Stephen Smalley <sds@tycho.nsa.gov> Acked-by: James Morris <jmorris@namei.org> Cc: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Adrian Bunk [Fri, 14 Jul 2006 07:24:32 +0000 (00:24 -0700)]
[PATCH] let the the lockdep options depend on DEBUG_KERNEL
The lockdep options should depend on DEBUG_KERNEL since:
- they are kernel debugging options and
- they do otherwise break the DEBUG_KERNEL menu structure
Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Kylene Jo Hall [Fri, 14 Jul 2006 07:24:31 +0000 (00:24 -0700)]
[PATCH] tpm: Add force device probe option
Some machine manufacturers are not sticking to the TCG specifications and
including an ACPI DSDT entry for the TPM which allows PNP discovery of the
device.
Signed-off-by: Kylene Hall <kjhall@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Randy Dunlap [Fri, 14 Jul 2006 07:24:28 +0000 (00:24 -0700)]
[PATCH] TPM: fix failure path leak
kfree(devname) on the misc_register() failure path. Otherwise it is lost
forever.
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Cc: Kylene Jo Hall <kjhall@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] lockdep: core, fix rq-lock handling on __ARCH_WANT_UNLOCKED_CTXSW
On platforms that have __ARCH_WANT_UNLOCKED_CTXSW set and want to implement
lock validator support there's a bug in rq->lock handling: in this case we
dont 'carry over' the runqueue lock into another task - but still we did a
spinlock_release() of it. Fix this by making the spinlock_release() in
context_switch() dependent on !__ARCH_WANT_UNLOCKED_CTXSW.
(Reported by Ralf Baechle on MIPS, which has __ARCH_WANT_UNLOCKED_CTXSW.
This fixes a lockdep-internal BUG message on such platforms.)
Signed-off-by: Ingo Molnar <mingo@elte.hu> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jim Cromie [Fri, 14 Jul 2006 07:24:26 +0000 (00:24 -0700)]
[PATCH] gpio: rename exported vtables to better match purpose
- rename EXPORTed gpio vtables from {scx200,pc8736x}_access to _gpio_ops new
name is much closer to the vtable-name struct nsc_gpio_ops, should be
clearer. Also rename the _fops vtable var to _fileops to better
disambiguate it from the gpio vtable.
Signed-off-by: Jim Cromie <jim.cromie@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jim Cromie [Fri, 14 Jul 2006 07:24:26 +0000 (00:24 -0700)]
[PATCH] gpio: cosmetics: remove needless newlines
- pure cosmetics: lose needless newlines.
- rename EXPORTed gpio vtables from {scx200,pc8736x}_access to _gpio_ops new
name is much closer to the vtable-name struct nsc_gpio_ops, should be
clearer. Also rename the _fops vtable var to _fileops to better
disambiguate it from the gpio vtable.
Signed-off-by: Jim Cromie <jim.cromie@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jim Cromie [Fri, 14 Jul 2006 07:24:25 +0000 (00:24 -0700)]
[PATCH] gpio: drop vtable members .gpio_set_high .gpio_set_low gpio_set is enough
drops gpio_set_high, gpio_set_low from the nsc_gpio_ops vtable. While we
can't drop them from scx200_gpio (or can we?), we dont need them for new users
of the exported vtable; gpio_set(1), gpio_set(0) work fine.
Signed-off-by: Jim Cromie <jim.cromie@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] Remove pci_dac_set_dma_mask() from Documentation/DMA-mapping.txt
pci_dac_set_dma_mask() gives only a single match in the whole kernel tree
and that's in this doc file. The best candidate for replacement is
pci_dac_dma_supported().
Roland Dreier [Fri, 14 Jul 2006 07:24:23 +0000 (00:24 -0700)]
[PATCH] Convert idr's internal locking to _irqsave variant
Currently, the code in lib/idr.c uses a bare spin_lock(&idp->lock) to do
internal locking. This is a nasty trap for code that might call idr
functions from different contexts; for example, it seems perfectly
reasonable to call idr_get_new() from process context and idr_remove() from
interrupt context -- but with the current locking this would lead to a
potential deadlock.
The simplest fix for this is to just convert the idr locking to use
spin_lock_irqsave().
In particular, this fixes a very complicated locking issue detected by
lockdep, involving the ib_ipoib driver's priv->lock and dev->_xmit_lock,
which get involved with the ib_sa module's query_idr.lock.
Cc: Arjan van de Ven <arjan@infradead.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: Zach Brown <zach.brown@oracle.com>, Signed-off-by: Roland Dreier <rolandd@cisco.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Mahoney [Fri, 14 Jul 2006 07:24:22 +0000 (00:24 -0700)]
[PATCH] reiserfs: fix handling of device names with /'s in them
On systems with block devices containing a slash (virtual dasd, cciss,
etc), reiserfs will fail to initialize /proc/fs/reiserfs/<dev> due to it
being interpreted as a subdirectory. The generic block device code changes
the / to ! for use in the sysfs tree. This patch uses that convention.
Tested by making dm devices use dm/<number> rather than dm-<number>
[akpm@osdl.org: name variables consistently] Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Chris Boot [Fri, 14 Jul 2006 07:24:21 +0000 (00:24 -0700)]
[PATCH] net48xx LED cleanups
Add the DRVNAME define to remove the two separate references of the driver
name by string, and move the .driver.owner into the existing .driver
sub-structure.
Signed-off-by: Chris Boot <bootc@bootc.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
john stultz [Fri, 14 Jul 2006 07:24:17 +0000 (00:24 -0700)]
[PATCH] improve timekeeping resume robustness
Resolve problems seen w/ APM suspend.
Due to resume initialization ordering, its possible we could get a timer
interrupt before the timekeeping resume() function is called. This patch
ensures we don't do any timekeeping accounting before we're fully resumed.
(akpm: fixes the machine-freezes-on-APM-resume bug)
Signed-off-by: John Stultz <johnstul@us.ibm.com> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jim Cromie [Fri, 14 Jul 2006 07:24:16 +0000 (00:24 -0700)]
[PATCH] scx200_gpio: 1 cdev for N minors: cleanup, prep
this patch is mostly cleanup of scx200_gpio :
- drop #include <linux/config.h>
- s/DEVNAME/DRVNAME/ apparently a convention
- replace variable num_pins with #define MAX_PINS
- s/dev/devid/ to clarify that its a dev_t, not a struct device dev.
- move devid = MKDEV(major,0) into branch where its needed.
2 minor 'changes' :
- reduced MAX_PINS from 64 to 32. Ive never tested other pins, and
theyre all multiplexed with other functions, some of which may be in use
on my soekris 4801, so I dont know what testing should yield.
- +EXPORT_SYMBOL(scx200_access);
This exposes the driver's vtable, which another driver can use along
with #include <linux/nsc_gpio.h>, to manipulate a gpio-pin.
Signed-off-by Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Adrian Bunk [Fri, 14 Jul 2006 07:24:15 +0000 (00:24 -0700)]
[PATCH] unexport open_softirq
Christoph Hellwig:
open_softirq just enables a softirq. The softirq array is statically
allocated so to add a new one you would have to patch the kernel. So
there's no point to keep this export at all as any user would have to
patch the enum in include/linux/interrupt.h anyway.
Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Adrian Bunk [Fri, 14 Jul 2006 07:24:14 +0000 (00:24 -0700)]
[PATCH] drivers/block/cpqarray.c: remove an unused variable
Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Mike Miller <mike.miller@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
When CONFIG_RT_MUTEX_TESTER is enabled kernel refuses to suspend the
machine because it's unable to freeze the rt-test-* threads.
Add try_to_freeze() after schedule() so that the threads will be freezed
correctly; I've tested the patch and it lets the notebook suspends and
resumes nicely.
Signed-off-by: Luca Tettamanti <kronos.it@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Acked-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Arjan van de Ven [Fri, 14 Jul 2006 07:24:12 +0000 (00:24 -0700)]
[PATCH] lockdep: annotate the BLKPG_DEL_PARTITION ioctl
The delete partition IOCTL takes the bd_mutex for both the disk and the
partition; these have an obvious hierarchical relationship and this patch
annotates this relationship for lockdep.
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Nathan Scott [Fri, 14 Jul 2006 07:24:10 +0000 (00:24 -0700)]
[PATCH] ramdisk blocksize Kconfig entry
Make the ramdisk blocksize configurable at kernel compilation time rather
than only at boot or module load time, like a couple of the other ramdisk
options. I found this handy awhile back but thought little of it, until
recently asked by a few of the testing folks here to be able to do the same
thing for their automated test setups.
The Kconfig comment is largely lifted from comments in rd.c, and hopefully
this will increase the chances of making folks aware that the default value
often isn't a great choice here (for increasing values of PAGE_SIZE, even
moreso).
Signed-off-by: Nathan Scott <nathans@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Luke Yang [Fri, 14 Jul 2006 07:24:09 +0000 (00:24 -0700)]
[PATCH] nommu: export two symbols for drivers to use
nommu.c needs to export two more symbols for drivers to use:
remap_pfn_range and unmap_mapping_range.
Signed-off-by: Luke Yang <luke.adi@gmail.com> Cc: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
David Woodhouse [Fri, 14 Jul 2006 07:24:08 +0000 (00:24 -0700)]
[PATCH] hdrinstall: remove asm/io.h from user visibility
There's no excuse for userspace abusing this kernel header -- the kernel's
headers are not intended to provide a library of helper routines for
userspace. Using <asm/io.h> from userspace is broken on most architectures
anyway. Just say 'no'.
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
David Woodhouse [Fri, 14 Jul 2006 07:24:07 +0000 (00:24 -0700)]
[PATCH] hdrinstall: remove asm/atomic.h from user visibility
This isn't suitable for userspace to see -- the kernel headers are not a
random library of stuff for userspace; they're only there to define the
kernel<->user ABI for system libraries and tools. Anything which _was_
abusing asm/atomic.h from userspace was probably broken anyway -- as it often
didn't even give atomic operation.
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Got a customer bug report (https://bugzilla.novell.com/190296) about kernel
symbols longer than 127 characters which end up in a string buffer that is
not NULL terminated, leading to garbage in /proc/kallsyms. Using strlcpy
prevents this from happening, even though such symbols still won't come out
right.
A better fix would be to not use a fixed-size buffer, but it's probably not
worth the trouble. (Modversion'ed symbols even have a length limit of 60.)
[bunk@stusta.de: build fix] Signed-off-by: Andreas Gruenbacher <agruen@suse.de> Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Dike [Fri, 14 Jul 2006 07:24:03 +0000 (00:24 -0700)]
[PATCH] uml: tidy biarch gcc support
On top of the previous biarch changes for UML, this makes the preprocessor
changes a bit cleaner. Specify the 64-bit build in CPPFLAGS on the x86_64
SUBARCH, rather than #undef'ing i386. Compile-tested with i386 and x86_64
SUBARCHs.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Signed-off-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Dike [Fri, 14 Jul 2006 07:24:02 +0000 (00:24 -0700)]
[PATCH] uml: tidy longjmp macro
The UML_SETJMP macro was requiring its users to pass in a argument which it
could supply itself, since it wasn't used outside that invocation of the
macro.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] i386: remove redundant might_sleep() in user accessors.
On i386, the user space accessor functions copy_from/to_user() both invoke
might_sleep(), do a quick sanity check, and then pass the work on to their
__copy_from/to_user() counterparts, which again invoke might_sleep().
Given that no actual work happens between these two calls, it is best to
eliminate one of the redundant might_sleep()s.
[PATCH] i386 kexec: allow the kexec on panic support to compile on voyager
This patch removes the foolish assumption that SMP implied local apics.
That assumption is not-true on the Voyager subarch. This makes that
dependency explicit, and allows the code to build.
What gets disabled is just an optimization to get better crash dumps so the
support should work if there is a kernel that will initialization on the
voyager subarch under those harsh conditions.
Hopefully we can figure out how to initialize apics in init_IRQ and remove
the need to disable io_apics and this dependency.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] i386: handle_BUG(): don't print garbage if debug info unavailable
handle_BUG() tries to print file and line number even when they're not
available (CONFIG_DEBUG_BUGVERBOSE is not set.) Change this to print a
message stating info is unavailable instead of printing a misleading
message.
There is a race condition that showed up in a threaded JIT environment.
The situation is that a process with a JIT code page forks, so the page is
marked read-only, then some threads are created in the child. One of the
threads attempts to add a new code block to the JIT page, so a
copy-on-write fault is taken, and the kernel allocates a new page, copies
the data, installs the new pte, and then calls lazy_mmu_prot_update() to
flush caches to make sure that the icache and dcache are in sync.
Unfortunately, the other thread runs right after the new pte is installed,
but before the caches have been flushed. It tries to execute some old JIT
code that was already in this page, but it sees some garbage in the i-cache
from the previous users of the new physical page.
Fix: we must make the caches consistent before installing the pte. This is
an ia64 only fix because lazy_mmu_prot_update() is a no-op on all other
architectures.
Signed-off-by: Anil Keshavamurthy <anil.s.keshavamurthy@intel.com> Signed-off-by: Tony Luck <tony.luck@intel.com> Cc: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jan Kiszka [Fri, 14 Jul 2006 07:23:56 +0000 (00:23 -0700)]
[PATCH] mm: fix oom roll-back of __vmalloc_area_node
__vunmap must not rely on area->nr_pages when picking the release methode
for area->pages. It may be too small when __vmalloc_area_node failed early
due to lacking memory. Instead, use a flag in vmstruct to differentiate.
Signed-off-by: Jan Kiszka <jan.kiszka@web.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
ib_fmr_pool_map_phys gets the virtual address by pointer but never writes
there, and users (e.g. srp) seem to assume this and ignore the value
returned. This patch cleans up the API to get the VA by value, and updates
all users.
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Acked-by: Roland Dreier <rolandd@cisco.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Ira Weiny [Fri, 14 Jul 2006 07:23:54 +0000 (00:23 -0700)]
[PATCH] IB/cm: set private data length for reject messages
Set private data length for reject messages to the correct size. Fix from
openib svn r8483.
Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Cc: Roland Dreier <rolandd@cisco.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>