Commit Graph

158922 Commits

Author SHA1 Message Date
Matt Sealey
dabebaedfe mm: keep a guard page below a grow-down stack segment
This is a rather minimally invasive patch to solve the problem of the
user stack growing into a memory mapped area below it.  Whenever we fill
the first page of the stack segment, expand the segment down by one
page.

Now, admittedly some odd application might _want_ the stack to grow down
into the preceding memory mapping, and so we may at some point need to
make this a process tunable (some people might also want to have more
than a single page of guarding), but let's try the minimal approach
first.

Tested with trivial application that maps a single page just below the
stack, and then starts recursing.  Without this, we will get a SIGSEGV
_after_ the stack has smashed the mapping.  With this patch, we'll get a
nice SIGBUS just as the stack touches the page just above the mapping.

Requested-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Conflicts:

	mm/memory.c
2010-08-28 15:15:19 -05:00
Kay Sievers
9b99b7e4d7 Driver-Core: devtmpfs - reset inode permissions before unlinking
Before unlinking the inode, reset the current permissions of possible
references like hardlinks, so granted permissions can not be retained
across the device lifetime by creating hardlinks, in the unusual case
that there is a user-writable directory on the same filesystem.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-27 16:50:57 -05:00
Heiko Carstens
e2a87bc2c6 driver-core: fix devtmpfs crash on s390
On Mon, Jan 18, 2010 at 05:26:20PM +0530, Sachin Sant wrote:
> Hello Heiko,
>
> Today while trying to boot next-20100118 i came across
> the following Oops :
>
> Brought up 4 CPUs
> Unable to handle kernel pointer dereference at virtual kernel address 0000000000
> 543000
> Oops: 0004 #1 SMP
> Modules linked in:
> CPU: 0 Not tainted 2.6.33-rc4-autotest-next-20100118-5-default #1
> Process swapper (pid: 1, task: 00000000fd792038, ksp: 00000000fd797a30)
> Krnl PSW : 0704200180000000 00000000001eb0b8 (shmem_parse_options+0xc0/0x328)
>           R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:0 CC:2 PM:0 EA:3
> Krnl GPRS: 000000000054388a 000000000000003d 0000000000543836 000000000000003d
>           0000000000000000 0000000000483f28 0000000000536112 00000000fd797d00
>           00000000fd4ba100 0000000000000100 0000000000483978 0000000000543832
>           0000000000000000 0000000000465958 00000000001eb0b0 00000000fd797c58
> Krnl Code: 00000000001eb0aa: c0e5000994f1       brasl   %r14,31da8c
>           00000000001eb0b0: b9020022           ltgr    %r2,%r2
>           00000000001eb0b4: a784010b           brc     8,1eb2ca
>          >00000000001eb0b8: 92002000           mvi     0(%r2),0
>           00000000001eb0bc: a7080000           lhi     %r0,0
>           00000000001eb0c0: 41902001           la      %r9,1(%r2)
>           00000000001eb0c4: b9040016           lgr     %r1,%r6
>           00000000001eb0c8: b904002b           lgr     %r2,%r11
> Call Trace:
> (<00000000fd797c50> 0xfd797c50)
> <00000000001eb5da> shmem_fill_super+0x13a/0x25c
> <0000000000228cfa> get_sb_single+0xbe/0xdc
> <000000000034ffc0> dev_get_sb+0x2c/0x38
> <000000000066c602> devtmpfs_init+0x46/0xc0
> <000000000066c53e> driver_init+0x22/0x60
> <000000000064d40a> kernel_init+0x24e/0x3d0
> <000000000010a7ea> kernel_thread_starter+0x6/0xc
> <000000000010a7e4> kernel_thread_starter+0x0/0xc
>
> I never tried to boot a kernel with DEVTMPFS enabled on a s390 box.
> So am wondering if this is supported or not ? If you think this
> is supported i will send a mail to community on this.

There is nothing arch specific to devtmpfs. This part crashes because the
kernel tries to modify the data read-only section which is write protected
on s390.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-27 16:50:38 -05:00
Kay Sievers
fbadf4ad07 devtmpfs: unlock mutex in case of string allocation error
Reported-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-27 16:50:19 -05:00
Thomas Gleixner
ccd366ff9f devtmpfs: Convert dirlock to a mutex
devtmpfs has a rw_lock dirlock which serializes delete_path and
create_path.

This code was obviously never tested with the usual set of debugging
facilities enabled. In the dirlock held sections the code calls:

 - vfs functions which take mutexes
 - kmalloc(, GFP_KERNEL)

In both code pathes the might sleep warning triggers and spams dmesg.

Convert the rw_lock to a mutex. There is no reason why this needs to
be a rwlock.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-27 16:49:59 -05:00
Kay Sievers
7e7842a806 Driver-Core: devtmpfs - set root directory mode to 0755
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Cc: Mark Rosenstand <rosenstand@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-27 16:49:24 -05:00
Kay Sievers
e501c73a6b Driver Core: devtmpfs: do not remove non-kernel-created directories
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-27 16:49:09 -05:00
Kay Sievers
cb725fa003 Driver Core: devtmpfs: use sys_mount()
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-27 16:48:48 -05:00
Kay Sievers
c7025fa1b5 Driver core: devtmpfs: prevent concurrent subdirectory creation and removal
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-27 16:48:16 -05:00
Matt Sealey
c6c4096744 Driver Core: devtmpfs: ignore umask while setting file mode
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Conflicts:

	drivers/base/devtmpfs.c
2010-08-27 16:41:54 -05:00
Kay Sievers
a2accdb1d3 Driver Core: devtmpfs - kernel-maintained tmpfs-based /dev
Devtmpfs lets the kernel create a tmpfs instance called devtmpfs
very early at kernel initialization, before any driver-core device
is registered. Every device with a major/minor will provide a
device node in devtmpfs.

Devtmpfs can be changed and altered by userspace at any time,
and in any way needed - just like today's udev-mounted tmpfs.
Unmodified udev versions will run just fine on top of it, and will
recognize an already existing kernel-created device node and use it.
The default node permissions are root:root 0600. Proper permissions
and user/group ownership, meaningful symlinks, all other policy still
needs to be applied by userspace.

If a node is created by devtmps, devtmpfs will remove the device node
when the device goes away. If the device node was created by
userspace, or the devtmpfs created node was replaced by userspace, it
will no longer be removed by devtmpfs.

If it is requested to auto-mount it, it makes init=/bin/sh work
without any further userspace support. /dev will be fully populated
and dynamic, and always reflect the current device state of the kernel.
With the commonly used dynamic device numbers, it solves the problem
where static devices nodes may point to the wrong devices.

It is intended to make the initial bootup logic simpler and more robust,
by de-coupling the creation of the inital environment, to reliably run
userspace processes, from a complex userspace bootstrap logic to provide
a working /dev.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Jan Blunck <jblunck@suse.de>
Tested-By: Harald Hoyer <harald@redhat.com>
Tested-By: Scott James Remnant <scott@ubuntu.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-27 16:23:54 -05:00
Matt Sealey
d35eaa30a5 AoE and NBD are useful for build servers and thin clients. Enable them in the config. 2010-08-27 16:19:52 -05:00
Matt Sealey
21ec3b1b1a update efikamx defconfig for ext3 barrier=1 default 2010-08-26 11:10:01 -05:00
Matt Sealey
f809f20763 ext3: barrier=1 default. superblock uptodate fix. jbd commit interval 5->15s. 2010-08-25 20:21:51 -05:00
Matt Sealey
5ca1e7b5e3 rt2800lib.c reappears. 2010-08-25 20:09:35 -05:00
Matt Sealey
ac1b2eb6ff RT3070 driver update
1) remove mainline (net/wireless/usb versions) from config since they don't do anything but associate
2) port drivers/staging/ ralink drivers from Linus' tree to here
   includes update to hexdump.c and kernel.h for hex_to_bin (replaces nibble, ABI change)
   includes update to ralink driver source to modify usb_alloc/free_coherent to old usb_buffer_alloc/free
   add it to the defconfig

You will need to grab the "Firmware RT28XX/RT30XX USB series" firmware (v 22 or above) from

http://www.ralink.com.tw/support.php?s=2

Unzip the zip file, inside is a license and rt2870.bin (an 8192 byte file). Copy this to
/lib/firmware/rt3070.bin (note the name change!) and the driver should load and work. Tested
with multiple pings, traceroutes, file copies (SCP and CIFS), YouTube..
2010-08-24 13:14:49 -05:00
Matt Sealey
a055a4143e rt2x00 updates 2010-08-23 11:50:09 -05:00
Matt Sealey
7c83b01ec6 21302c771b broke Kconfig, restore it 2010-08-20 10:35:55 -05:00
Matt Sealey
402dd5c0d4 Update defconfig for LED trigger 2010-08-19 17:40:43 -05:00
Matt Sealey
21302c771b Fix LED trigger for PATA_FSL 2010-08-19 17:40:23 -05:00
Matt Sealey
4e478eafc0 fix audio clock rate bug 2010-08-19 17:40:02 -05:00
Matt Sealey
a8c4657dbb Workaround for pm_power_off being overwritten by PMIC code later in init. System should
properly shut down (i.e. power is turned off) and reboot (i.e. goes back to U-Boot) now.
2010-08-19 17:19:30 -05:00
Matt Sealey
b30832ab9c Fancy treats from ARM mainline:
Proper Prefetch Abort for v6 and v7
 Pass IFSR to do_prefetchabort
 Add arch_mmap and get rid of sys_arm_mremap
 Handle possible translation errors in v6 v7 coherent_user_range
2010-08-19 14:47:29 -05:00
Matt Sealey
4a5462af37 Accidentally ifed out an audio regulator while checking into Ubuntu upstream
Added a workaround for the reboot doesn't reboot issue.
2010-08-19 14:37:51 -05:00
Matt Sealey
9791015939 [REGRESSION,2.6.30,v2] sched: update load count only once per cpu in 10 tick update window
https://patchwork.kernel.org/patch/90257/
2010-08-19 13:24:14 -05:00
Matt Sealey
bde1764ce3 PMIC: Sync with Babbage
Implement SW AUTO on regulator to save power

Fix a few constraints

Fix a few whitespace foibles and spelling mistakes
2010-08-19 13:11:33 -05:00
Matt Sealey
448127386d pass DI clocks as platform data 2010-08-19 09:17:28 -05:00
Matt Sealey
f51e9f5509 From: Russell King <rmk+kernel@arm.linux.org.uk>
Date: Mon, 28 Sep 2009 10:41:51 +0000 (+0100)
Subject: ARM: Ensure do_cache_op takes mmap_sem
X-Git-Tag: v2.6.32-rc3~11^2~11
X-Git-Url: http://android.git.geo.kernel.org/?p=kernel%2Fcommon.git;a=commitdiff_plain;h=aa45ee8fc0ee87c1711b5fe8eb3556d06530c39e

ARM: Ensure do_cache_op takes mmap_sem

do_cache_op() uses find_vma() to validate its arguments without holding
any locking.  This means that the VMA could vanish beneath us.  Fix
this by taking a read lock on mmap_sem.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-08-18 14:26:16 -05:00
Matt Sealey
a4807bc91c Gitweb: http://git.kernel.org/linus/d80ade7b323152672bf66e74ec11c324332f6d1e
Commit:     d80ade7b323152672bf66e74ec11c324332f6d1e
Parent:     fac28e6df9b5fdfa0cf6b99eae022609dd1108d5
Author:     Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
AuthorDate: Sun Sep 27 17:40:03 2009 +0100
Committer:  Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
CommitDate: Mon Sep 28 18:06:19 2009 +0100

    ARM: Fix warning: #warning syscall migrate_pages not implemented

    We're not implementing this syscall (we're not NUMA) so we might as
    well silence this warning.

    Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
2010-08-18 14:06:27 -05:00
Matt Sealey
8644555aea [ Upstream Kernel Changes ]
* ARM: 5677/1: ARM support for
    TIF_RESTORE_SIGMASK/pselect6/ppoll/epoll_pwait
    - LP: #319729
  * leds/mc13892: Use workqueue for setting LED brightness
    - LP: #531696
  * ARM: 5882/1: ARM: Fix uncompress code compile for different defines of
    flush(void)
    - LP: #319240
  * ARM: 5884/1: arm: Fix DCC console for v7
    - LP: #319240
  * ARM: 5885/1: arm: Flush TLB entries in setup_mm_for_reboot()
    - LP: #319240
  * ARM: 5886/1: arm: Fix cpu_proc_fin() for proc-v7.S and make kexec work
    - LP: #319240
  * ARM: 5888/1: arm: Update comments in cacheflush.h and remove
    unnecessary V6 and V7 comments
    - LP: #319240
  * arm: disable L2 cache in the v7 finish function
  * arm: invalidate TLBs when enabling mmu
 -- Andy Whitcroft <email address hidden> Tue, 09 Mar 2010 13:52:16 +0000
2010-08-18 14:02:06 -05:00
Matt Sealey
01fcc9d9d9 * ARM: VFP: add support to sync the VFP state of the current thread
- LP: #507503
* ARM: VFP: preserve the HW context when calling signal handlers
  - LP: #507503
2010-08-18 13:44:12 -05:00
Matt Sealey
97b5586360 From a84f9016213ae497f51617478ab478a5f7028a1e Mon Sep 17 00:00:00 2001
From: Bryan Wu <bryan.wu@canonical.com>
Date: Tue, 26 Jan 2010 19:00:22 +0000
Subject: [PATCH] UBUNTU: SAUCE: IMX51: only export NEON flag to userspace on Freescale iMX51 rev3.x or later silicon

BugLink: http://bugs.launchpad.net/bugs/507416

NEON function is broken on old Freescale iMX51 silicons, such as rev1.x and
rev2.x. Since more and more iMX51 based products will move to rev3.x or later
silicon, we need to enable NEON on these newer silicons and disable NEON on
those old ones.

This patch will detect the silicon revision dynamically and only export NEON
flag to userspace on Freescale iMX51 rev3.x or later silicon. It was tested on
Babbage 3.0 board and Babbage 2.x board.

Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
2010-08-18 13:41:56 -05:00
Matt Sealey
9c0d03af74 sync a couple of options with Ubuntu upstream 2010-08-18 13:35:38 -05:00
Matt Sealey
5879524838 Added in clock changes
Differences from previous EfikaMX releases: less BSP patching!

Only clocks which are not explicitly reparented in mx51_clocks_init() have
been touched. They should probably be reparented by using clock_set_parent
instead. Touching ESDHC and HSI2C dividers has been removed: the ESDHC code
reset the divider twice for some reason and confuses the FSL code. HSI2C isn't
used on EfikaMX..

All of these changes probably need to be done in a pretty little mx51_efikamx_clock_fixup()
function or something. Any takers? :D
2010-08-17 00:27:00 -05:00
Matt Sealey
11ab3ec8f4 Fix a breakage when enabling MX51_GIGAHERTZ which can never happen, but.. better to be correct
Reduced number of structure changes to modify CPU voltages. Old code reset the voltages on TO2
for 1GHz, 800MHz and 166MHz but 1GHz and 800Mhz were already correct in the original structure.
Don't change it twice.

Enabled SCC device.
2010-08-16 23:20:23 -05:00
Matt Sealey
68657eb619 Workaround for monitor blank when xres > 1024 due to g_di_clk[disp] > ipu clock 2010-08-14 21:50:20 -05:00
Matt Sealey
2f4c643e12 Update DVFS platform data to match new BSP structure 2010-08-14 12:54:08 -05:00
Matt Sealey
8d7694083b fix tree breakage, typo removed line for audio init 2010-08-14 12:50:16 -05:00
Matt Sealey
b7dc0593a9 Update arch/arm makefile for modern GCC (armv7-a for Codesourcery 2009q1 and
beyond, and Ubuntu gcc)
2010-08-14 12:47:50 -05:00
Matt Sealey
33e93f9f84 EfikaMX defconfig for BSP 10.07.11 2010-08-14 12:41:40 -05:00
Matt Sealey
4a227175d3 Support for SII9022 transmitter
EDID updates for EDID 1.3, HDMI and CEA data
2010-08-14 12:35:09 -05:00
Matt Sealey
7fa0618862 Get i2c-imx up to a mainline revision (2.6.34) 2010-08-14 12:32:44 -05:00
Matt Sealey
8d96bbe76a Update EDID to handle EDID 1.3 and HDMI CEA data
Update framebuffer to support SII9022 and clock adjustment
2010-08-14 12:28:12 -05:00
Matt Sealey
112946c1bf LED trigger for IDE 2010-08-14 12:22:50 -05:00
Matt Sealey
5a003e91fa Efika MX platform support 2010-08-14 12:19:29 -05:00
Matt Sealey
28c1551b9b Update mach-types for new board names (LANGE51 -> EFIKAMX, KUNLUN -> EFIKASB) 2010-08-14 12:12:00 -05:00
Jie Zhou
03bc7b8a7a ENGR00125616 GPU: make sure device is stopped before close
When terminating some applications such as OpenGL ES2.0 conf. test,
kgsl_device_stop is not triggered. And run such kind of application
for several times, system hang happens for inconsistency of device
states. So make sure device is stopped in kgsl_device_close, which
is only called by last running caller process.

Signed-off-by: Jie Zhou <b30303@freescale.com>
2010-08-10 11:52:10 -05:00
Liu Ying
d21a3a6084 ENGR00125608-2 LDB:Return error when LDB probe fails
This patch avoids LDB custom suspend/resume functions to be called.

Signed-off-by: Liu Ying <b17645@freescale.com>
(cherry picked from commit d48bd2e1d1ecc166bdb23e2c2a60dd2e6ae0e772)
2010-08-10 11:52:10 -05:00
Liu Ying
50797e5954 ENGR00125608-1 TVE:Return error when TVE probe fails
This patch avoids TVE custom suspend/resume functions to be called.

Signed-off-by: Liu Ying <b17645@freescale.com>
(cherry picked from commit ec197f61d6dcc21393ab8ea3ffc5fe071914ccf2)
2010-08-10 11:52:09 -05:00
Hu hui
bf62e34178 ENGR00125521 USB: register/unregister gadget module cause system hang
In function of gadget unregister the phy will been put to lowpower
mode,however in function of gadget regisger the phy lowpower mode will
not been cleard when OTG pin detect enabled.

Signed-off-by: Huhui <b29976@freescale.com>
(cherry picked from commit 11dc51645fe5a196f53fb30369698b4cb4d1e296)
2010-08-10 11:52:08 -05:00