Kevin Hilman [Thu, 14 Jun 2007 00:57:16 +0000 (17:57 -0700)]
ARM: OMAP: Kconfig cleanup: allow to compile on non-ARM
Remove 'source' of non-existant drivers/ssi/Kconfig. Having this
there results in a kernel with the OMAP patch not being able to
compile for other platforms.
Signed-off-by: Kevin Hilman <khilman@mvista.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Kevin Hilman [Thu, 21 Jun 2007 11:55:49 +0000 (04:55 -0700)]
ARM: OMAP: fix clock table walking for OMAP2 variants
The various places where the clock rate_table is walked are not all
checking whether the clock actually exists on the OMAP2 variant.
Among other things, this results in broken rounding for the OMAP2430
since the rounding code can potentially find matching speeds that are
marked as RATE_IN_242X.
It also results in confusing CPUfreq about what the current speed is.
Signed-off-by: Kevin Hilman <khilman@mvista.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Paul Walmsley [Tue, 19 Jun 2007 23:46:01 +0000 (17:46 -0600)]
OMAP2: Fix dss_54m_fck enable_bit
Fix an incorrect enable_bit for the OMAP2 clock dss_54m_fck; prevents
the LCD backlight from lighting up on 2430 SDP. Problem noted by Kevin
Hilman <khilman@mvista.com>; debugging assistance from Khasim Syed Mohammed
<x0khasim@ti.com> and Richard Woodruff <r-woodruff2@ti.com>.
Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
While testing low power refresh I noticed the DSS2 clock setting wasn't
being perserved across DVFS changes. The below makes sure to not change
the source for DSS2.
Signed-off-by: Richard Woodruff <r-woodruff2@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
WATCHDOG: use base address from platform resources and make 2430 boot again
Modfied watchdog driver to use base address provided in platform defn
Cleaned up a bunch of statics used.
Added 2430 baseaddress defn
Addressed review comments for patch1 and 2 reported by Trilok Soni and Tony
Signed-off-by: Nishanth Menon <menon.nishanth@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Jarkko Nikula [Mon, 2 Apr 2007 17:21:35 +0000 (13:21 -0400)]
SPI: Add support for TSC2301 protocol driver
This adds a driver for TSC2301 including support for audio, keypad and
touchscreen. Patch is originally developed for Nokia N800 by Imre Deak,
Jarkko Nikula, Jarkko Oikarinen and Juha Yrjola.
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
This adds a driver for the TSC2102 chip by Texas Instruments. This
driver is responsible for all communication with the chip and doesn't
export anything for user-space, but for other drivers controlling
devices connected to the chip.
Signed-off-by: Andrzej Zaborowski <balrog@zabor.org>
Timo Teräs [Mon, 5 Mar 2007 13:40:46 +0000 (05:40 -0800)]
NF: Add iptables IDLETIMER target
Each matching packet resets the timer associated with input and/or output
interfaces. Timer expiry causes a kobject uevent. Idle timer can be read via
sysfs.
Signed-off-by: Hiroshi DOYU <hiroshi.doyu@nokia.com> Signed-off-by: Juha Yrjölä <juha.yrjola@nokia.com>
Updated for 2.6.21-rc1 by Arnaud Patard.
Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org> Signed-off-by: Tony Lindgren <tony@atomide.com>
David Brownell [Thu, 7 Dec 2006 01:14:03 +0000 (17:14 -0800)]
ARM: OMAP: abstract debug card setup (smc, leds)
Additional cleanup for debug boards on H2/P2/H3/H4: move the init
code that's not board-specific into a new file where it can be easily
shared between all the different boards (avoiding code duplication,
and making it easier to support more devices). Make H4 use that.
This should be easy to drop in to the OMAP1 boards using these debug
cards; the only difference seems to be that the p2 does an extra reset
of the smc using the fpga (probably all boards could do that, if it's
necessary) and doesn't use the gpio mux or request APIs.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com>
David Brownell [Thu, 7 Dec 2006 01:13:55 +0000 (17:13 -0800)]
ARM: OMAP: omap2/gpmc updates
GPMC updates:
- bugfixes: wrong/missing flags, omitted write, wrong test
- don't map memory segments starting at zero
- improve debug messaging
- export gpmc_get_fclk_perio]d() since it's needed to calc timings
- expect gpmc_cs_set_timings() caller to have initialized sync vs async
Note that this API is glitchy; likely the best fix would be to add
a member to "struct gpmc_timings" to hold GPMC_CONFIG1, since that
holds one key aspect of the GPMC timings (the gpmc_fclk divisor,
and sync vs. async == whether that divisor matters).
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com>
This adds basic support for Siemens SX1. More patches are available,
with video driver, mixer, and serial ports working. That is enough to
do gsm calls with right userland.
Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Tony Lindgren <tony@atomide.com>
This adds support for the keypad on the top of the Amstrad Delta. It's
just a standard omap-keypad so all we need to do is add the keypad
layout and platform data to the board definition file.
Signed-off-by: Jonathan McDowell <noodles@earth.li> Signed-off-by: Tony Lindgren <tony@atomide.com>
General update of the board file for Palm Tungsten E. Registers the
platform devices contained in the PDA (ROM chip, keypad, infra-red)
and updates the configuration for USB and MMC, whose config values
were previously guessed in most cases due to lack of documentation
(and now are confirmed by a number of users). Macros for GPIO pins are
moved to a file in include/asm-arm/arch-omap.
Signed-off-by: Andrzej Zaborowski <balrog@zabor.org> Signed-off-by: Tony Lindgren <tony@atomide.com>
Imre Deak [Mon, 5 Mar 2007 15:34:05 +0000 (17:34 +0200)]
ARM: OMAP: add SoSSI clock (remove manual checking of SoSSI state from idle)
The SoSSI driver should already take care of this by enabling / disabling
its clock when necessary, so this legacy callout from the PM idle code
is not needed any more.
Signed-off-by: Imre Deak <imre.deak@solidboot.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
David Brownell [Mon, 2 Apr 2007 19:45:50 +0000 (12:45 -0700)]
ARM: OMAP: fix OMAP1 dmtimer build warning
Remove the OMAP1 version of omap_dm_timer_get_fclk(), and its associated
compile-time warning. It would only BUG() if called, while it's only
called on OMAP2.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com>
shm: fix the filename of hugetlb sysv shared memory
Some user space tools need to identify SYSV shared memory when examining
/proc/<pid>/maps. To do so they look for a block device with major zero, a
dentry named SYSV<sysv key>, and having the minor of the internal sysv
shared memory kernel mount.
To help these tools and to make it easier for people just browsing
/proc/<pid>/maps this patch modifies hugetlb sysv shared memory to use the
SYSV<key> dentry naming convention.
User space tools will still have to be aware that hugetlb sysv shared
memory lives on a different internal kernel mount and so has a different
block device minor number from the rest of sysv shared memory.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Cc: "Serge E. Hallyn" <serge@hallyn.com> Cc: Albert Cahalan <acahalan@gmail.com> Cc: Badari Pulavarty <pbadari@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Adam Litke [Sat, 16 Jun 2007 17:16:15 +0000 (10:16 -0700)]
hugetlb: fix get_policy for stacked shared memory files
Here's another breakage as a result of shared memory stacked files :(
The NUMA policy for a VMA is determined by checking the following (in the
order given):
1) vma->vm_ops->get_policy() (if defined)
2) vma->vm_policy (if defined)
3) task->mempolicy (if defined)
4) Fall back to default_policy
By switching to stacked files for shared memory, get_policy() is now always
set to shm_get_policy which is a wrapper function. This causes us to stop
at step 1, which yields NULL for hugetlb instead of task->mempolicy which
was the previous (and correct) result.
This patch modifies the shm_get_policy() wrapper to maintain steps 1-3 for
the wrapped vm_ops.
(akpm: the refcounting of mempolicies is busted and this patch does nothing to
improve it)
Signed-off-by: Adam Litke <agl@us.ibm.com> Acked-by: William Irwin <bill.irwin@oracle.com> Cc: dean gaudet <dean@arctic.org> Cc: Christoph Lameter <clameter@sgi.com> Cc: Andi Kleen <ak@suse.de> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jan Kara [Sat, 16 Jun 2007 17:16:14 +0000 (10:16 -0700)]
udf: fix possible leakage of blocks
We have to take care that when we call udf_discard_prealloc() from
udf_clear_inode() we have to write inode ourselves afterwards (otherwise,
some changes might be lost leading to leakage of blocks, use of free blocks
or improperly aligned extents).
Also udf_discard_prealloc() does two different things - it removes
preallocated blocks and truncates the last extent to exactly match i_size.
We move the latter functionality to udf_truncate_tail_extent(), call
udf_discard_prealloc() when last reference to a file is dropped and call
udf_truncate_tail_extent() when inode is being removed from inode cache
(udf_clear_inode() call).
We cannot call udf_truncate_tail_extent() earlier as subsequent open+write
would find the last block of the file mapped and happily write to the end
of it, although the last extent says it's shorter.
[akpm@linux-foundation.org: Make checkpatch.pl happier] Signed-off-by: Jan Kara <jack@suse.cz> Cc: Eric Sandeen <sandeen@sandeen.net> Cc: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
If ARCH_KMALLOC_MINALIGN is set to a value greater than 8 (SLUBs smallest
kmalloc cache) then SLUB may generate duplicate slabs in sysfs (yes again)
because the object size is padded to reach ARCH_KMALLOC_MINALIGN. Thus the
size of the small slabs is all the same.
No arch sets ARCH_KMALLOC_MINALIGN larger than 8 though except mips which
for some reason wants a 128 byte alignment.
This patch increases the size of the smallest cache if
ARCH_KMALLOC_MINALIGN is greater than 8. In that case more and more of the
smallest caches are disabled.
If we do that then the count of the active general caches that is displayed
on boot is not correct anymore since we may skip elements of the kmalloc
array. So count them separately.
This approach was tested by Havard yesterday.
Signed-off-by: Christoph Lameter <clameter@sgi.com> Cc: Haavard Skinnemoen <hskinnemoen@atmel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Some changes done a while ago to avoid pounding on ptep_set_access_flags and
update_mmu_cache in some race situations break sun4c which requires
update_mmu_cache() to always be called on minor faults.
This patch reworks ptep_set_access_flags() semantics, implementations and
callers so that it's now responsible for returning whether an update is
necessary or not (basically whether the PTE actually changed). This allow
fixing the sparc implementation to always return 1 on sun4c.
[akpm@linux-foundation.org: fixes, cleanups] Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Hugh Dickins <hugh@veritas.com> Cc: David Miller <davem@davemloft.net> Cc: Mark Fortescue <mark@mtfhpc.demon.co.uk> Acked-by: William Lee Irwin III <wli@holomorphy.com> Cc: "Luck, Tony" <tony.luck@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Matt Mackall [Sat, 16 Jun 2007 17:16:11 +0000 (10:16 -0700)]
random: fix output buffer folding
(As reported by linux@horizon.com)
Folding is done to minimize the theoretical possibility of systematic
weakness in the particular bits of the SHA1 hash output. The result of
this bug is that 16 out of 80 bits are un-folded. Without a major new
vulnerability being found in SHA1, this is harmless, but still worth
fixing.
Signed-off-by: Matt Mackall <mpm@selenic.com> Cc: <linux@horizon.com> Cc: Theodore Ts'o <tytso@mit.edu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 16 Jun 2007 17:16:10 +0000 (10:16 -0700)]
uml: kill x86_64 STACK_TOP_MAX
The x86_64 a.out.h got a definition of STACK_TOP_MAX, which interferes with
the UML version. So, just undef it like STACK_TOP.
Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Sat, 16 Jun 2007 17:16:09 +0000 (10:16 -0700)]
uml: remove PAGE_SIZE from libc code
Distros seem to be removing PAGE_SIZE from asm/page.h. So, the libc side of
UML should stop using it.
I replace it with UM_KERN_PAGE_SIZE, which is defined to be the same as
PAGE_SIZE on the kernel side of the house. I could also use getpagesize(),
but it's more important that UML have the same value of PAGE_SIZE everywhere.
It's conceivable that it could be built with a larger PAGE_SIZE, and use of
getpagesize() would break that badly.
PAGE_MASK got the same treatment, as it is closely tied to PAGE_SIZE.
Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David Brownell [Sat, 16 Jun 2007 17:16:08 +0000 (10:16 -0700)]
spi doc updates
Update two points in the SPI interface documentation:
- Update description of the "chip stays selected after message ends"
mode. In some cases it's required for correctness; it isn't just a
performance tweak. (Yes: to use this mode on mult-device busses, another
programming interface will be needed. One draft has been circulated
already.)
- Clarify spi_setup(), highlighting that callers must ensure that no
requests are queued (can't change configuration except between I/Os), and
that the device must be deselected when this returns (which is a key part
of why it's called during device init).
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Mike Accetta [Sat, 16 Jun 2007 17:16:07 +0000 (10:16 -0700)]
md: fix bug in error handling during raid1 repair
If raid1/repair (which reads all block and fixes any differences it finds)
hits a read error, it doesn't reset the bio for writing before writing
correct data back, so the read error isn't fixed, and the device probably
gets a zero-length write which it might complain about.
Signed-off-by: Neil Brown <neilb@suse.de> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
NeilBrown [Sat, 16 Jun 2007 17:16:06 +0000 (10:16 -0700)]
md: fix two raid10 bugs
1/ When resyncing a degraded raid10 which has more than 2 copies of each block,
garbage can get synced on top of good data.
2/ We round the wrong way in part of the device size calculation, which
can cause confusion.
Signed-off-by: Neil Brown <neilb@suse.de> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Fix oops caused by 'cat /dev/snapshot', reported by Arkadiusz Miskiewicz,
and make it impossible to thaw tasks with the help of the swsusp userland
interface while there is a snapshot image ready to save.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Randy Dunlap [Sat, 16 Jun 2007 17:16:02 +0000 (10:16 -0700)]
toshiba_acpi: fix section mismatch in allyesconfig
Fix section error (allyesconfig). The exit function is called from init,
so functions that are called by the exit function cannot be marked __exit.
WARNING: drivers/built-in.o(.text+0xe5bc6): Section mismatch: reference to .exit.
text: (between 'toshiba_acpi_exit' and 'hci_raw')
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Len Brown <len.brown@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Paul Jackson [Sat, 16 Jun 2007 17:16:01 +0000 (10:16 -0700)]
cpuset: zero malloc - fix for old cpusets
The cpuset code to present a list of tasks using a cpuset to user space could
write to an array that it had kmalloc'd, after a kmalloc request of zero size.
The problem was that the code didn't check for writes past the allocated end
of the array until -after- the first write.
This is a race condition that is likely rare -- it would only show up if a
cpuset went from being empty to having a task in it, during the brief time
between the allocation and the first write.
Prior to roughly 2.6.22 kernels, this was also a benign problem, because a
zero kmalloc returned a few usable bytes anyway, and no harm was done with the
bogus write.
With the 2.6.22 kernel changes to make issue a warning if code tries to write
to the location returned from a zero size allocation, this problem is no
longer benign. This cpuset code would occassionally trigger that warning.
The fix is trivial -- check before storing into the array, not after, whether
the array is big enough to hold the store.
Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: "Serge E. Hallyn" <serue@us.ibm.com> Cc: Balbir Singh <balbir@in.ibm.com> Cc: Dave Hansen <haveblue@us.ibm.com> Cc: Herbert Poetzl <herbert@13thfloor.at> Cc: Kirill Korotaev <dev@openvz.org> Cc: Paul Menage <menage@google.com> Cc: Srivatsa Vaddagiri <vatsa@in.ibm.com> Cc: Christoph Lameter <clameter@sgi.com> Signed-off-by: Paul Jackson <pj@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Hugh Dickins [Sat, 16 Jun 2007 17:15:59 +0000 (10:15 -0700)]
i386 mm: use pte_update() in ptep_test_and_clear_dirty()
It is not safe to use pte_update_defer() in ptep_test_and_clear_young():
its only user, /proc/<pid>/clear_refs, drops pte lock before flushing TLB.
Use the safe though less efficient pte_update() paravirtop in its place.
Likewise in ptep_test_and_clear_dirty(), though that has no current use.
These are macros (header file dependency stops them from becoming inline
functions), so be more liberal with the underscores and parentheses.
Signed-off-by: Hugh Dickins <hugh@veritas.com> Cc: Zachary Amsden <zach@vmware.com> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Badari Pulavarty [Sat, 16 Jun 2007 17:15:59 +0000 (10:15 -0700)]
Restore shmid as inode# to fix /proc/pid/maps ABI breakage
shmid used to be stored as inode# for shared memory segments. Some of
the proc-ps tools use this from /proc/pid/maps. Recent cleanups
to newseg() changed it. This patch sets inode number back to shared
memory id to fix breakage.
SLUB slab validation: Alloc while interrupts are disabled must use GFP_ATOMIC
The data structure to manage the information gathered about functions
allocating and freeing objects is allocated when the list_lock has already
been taken. We need to allocate with GFP_ATOMIC instead of GFP_KERNEL.
Signed-off-by: Christoph Lameter <clameter@sgi.com> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Björn Steinbrink [Sat, 16 Jun 2007 17:15:56 +0000 (10:15 -0700)]
i386: use the right wrapper to disable the NMI watchdog
When disabled through /proc/sys/kernel/nmi_watchdog, the NMI watchdog uses the
stop() method directly, which does not decrement the activity counter, leading
to a BUG(). Use the wrapper function instead to fix that.
Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This was reported in:
[Bug 8473] New: Oops: 0010 [1] SMP
The bug is caused by switching to hung_up_tty_fops in do_tty_hangup. An
ioctl call can be waiting on BLK after testing for existence of the locked
ioctl handler in the normal tty fops, but before calling the locked ioctl
handler. If a hangup occurs at that point, the locked ioctl fop is NULL
and an oops occurs.
(akpm: we can remove my debugging code from do_ioctl() now, but it'll be OK to
do that for 2.6.23)
Signed-off-by: Paul Fulghum <paulkf@microgate.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David Woodhouse [Sat, 16 Jun 2007 09:48:19 +0000 (10:48 +0100)]
fix radeon setparam on 32/64 systems, harder.
Commit 9b01bd5b284bbf519b726b39f1352023cb5e9e69 introduced a
compat_ioctl handler for RADEON_SETPARAM, the sole purpose of which was
to handle the fact that on i386, alignof(uint64_t)==4.
Unfortunately, this handler was installed for _all_ 64-bit
architectures, instead of only x86_64 and ia64. And thus it breaks
32-bit compatibility on every other arch, where 64-bit integers are
aligned to 8 bytes in 32-bit mode just the same as in 64-bit mode.
Arnd has a cunning plan to use 'compat_u64' with appropriate alignment
attributes according to the 32-bit ABI, but for now let's just make the
compat_radeon_cp_setparam routine entirely disappear on 64-bit machines
whose 32-bit compat support isn't for i386. It would be a no-op with
compat_u64 anyway.
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Dave Airlie <airlied@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>