Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: Staging: poch: fix verification of memory area Staging: usbip: usbip_start_threads(): handle kernel_thread failure staging: agnx: drivers/staging/agnx/agnx.h needs <linux/io.h> Staging: android: task_get_unused_fd_flags: fix the wrong usage of tsk->signal Staging: android: Add lowmemorykiller documentation. Staging: android: fix build error on 64bit boxes Staging: android: timed_gpio: Fix build to build on kernels after 2.6.25. Staging: android: binder: fix arm build errors Staging: meilhaus: fix Kbuild Staging: comedi: fix Kbuild
This commit is contained in:
commit
ca493d171b
|
@ -1,6 +1,8 @@
|
||||||
#ifndef AGNX_H_
|
#ifndef AGNX_H_
|
||||||
#define AGNX_H_
|
#define AGNX_H_
|
||||||
|
|
||||||
|
#include <linux/io.h>
|
||||||
|
|
||||||
#include "xmit.h"
|
#include "xmit.h"
|
||||||
|
|
||||||
#define PFX KBUILD_MODNAME ": "
|
#define PFX KBUILD_MODNAME ": "
|
||||||
|
|
|
@ -319,6 +319,7 @@ int task_get_unused_fd_flags(struct task_struct *tsk, int flags)
|
||||||
int fd, error;
|
int fd, error;
|
||||||
struct fdtable *fdt;
|
struct fdtable *fdt;
|
||||||
unsigned long rlim_cur;
|
unsigned long rlim_cur;
|
||||||
|
unsigned long irqs;
|
||||||
|
|
||||||
if (files == NULL)
|
if (files == NULL)
|
||||||
return -ESRCH;
|
return -ESRCH;
|
||||||
|
@ -335,12 +336,11 @@ repeat:
|
||||||
* N.B. For clone tasks sharing a files structure, this test
|
* N.B. For clone tasks sharing a files structure, this test
|
||||||
* will limit the total number of files that can be opened.
|
* will limit the total number of files that can be opened.
|
||||||
*/
|
*/
|
||||||
rcu_read_lock();
|
rlim_cur = 0;
|
||||||
if (tsk->signal)
|
if (lock_task_sighand(tsk, &irqs)) {
|
||||||
rlim_cur = tsk->signal->rlim[RLIMIT_NOFILE].rlim_cur;
|
rlim_cur = tsk->signal->rlim[RLIMIT_NOFILE].rlim_cur;
|
||||||
else
|
unlock_task_sighand(tsk, &irqs);
|
||||||
rlim_cur = 0;
|
}
|
||||||
rcu_read_unlock();
|
|
||||||
if (fd >= rlim_cur)
|
if (fd >= rlim_cur)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
@ -2649,14 +2649,14 @@ static void binder_vma_open(struct vm_area_struct *vma)
|
||||||
{
|
{
|
||||||
struct binder_proc *proc = vma->vm_private_data;
|
struct binder_proc *proc = vma->vm_private_data;
|
||||||
if (binder_debug_mask & BINDER_DEBUG_OPEN_CLOSE)
|
if (binder_debug_mask & BINDER_DEBUG_OPEN_CLOSE)
|
||||||
printk(KERN_INFO "binder: %d open vm area %lx-%lx (%ld K) vma %lx pagep %lx\n", proc->pid, vma->vm_start, vma->vm_end, (vma->vm_end - vma->vm_start) / SZ_1K, vma->vm_flags, vma->vm_page_prot.pgprot);
|
printk(KERN_INFO "binder: %d open vm area %lx-%lx (%ld K) vma %lx pagep %lx\n", proc->pid, vma->vm_start, vma->vm_end, (vma->vm_end - vma->vm_start) / SZ_1K, vma->vm_flags, pgprot_val(vma->vm_page_prot));
|
||||||
dump_stack();
|
dump_stack();
|
||||||
}
|
}
|
||||||
static void binder_vma_close(struct vm_area_struct *vma)
|
static void binder_vma_close(struct vm_area_struct *vma)
|
||||||
{
|
{
|
||||||
struct binder_proc *proc = vma->vm_private_data;
|
struct binder_proc *proc = vma->vm_private_data;
|
||||||
if (binder_debug_mask & BINDER_DEBUG_OPEN_CLOSE)
|
if (binder_debug_mask & BINDER_DEBUG_OPEN_CLOSE)
|
||||||
printk(KERN_INFO "binder: %d close vm area %lx-%lx (%ld K) vma %lx pagep %lx\n", proc->pid, vma->vm_start, vma->vm_end, (vma->vm_end - vma->vm_start) / SZ_1K, vma->vm_flags, vma->vm_page_prot.pgprot);
|
printk(KERN_INFO "binder: %d close vm area %lx-%lx (%ld K) vma %lx pagep %lx\n", proc->pid, vma->vm_start, vma->vm_end, (vma->vm_end - vma->vm_start) / SZ_1K, vma->vm_flags, pgprot_val(vma->vm_page_prot));
|
||||||
proc->vma = NULL;
|
proc->vma = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2677,7 +2677,7 @@ static int binder_mmap(struct file *filp, struct vm_area_struct *vma)
|
||||||
vma->vm_end = vma->vm_start + SZ_4M;
|
vma->vm_end = vma->vm_start + SZ_4M;
|
||||||
|
|
||||||
if (binder_debug_mask & BINDER_DEBUG_OPEN_CLOSE)
|
if (binder_debug_mask & BINDER_DEBUG_OPEN_CLOSE)
|
||||||
printk(KERN_INFO "binder_mmap: %d %lx-%lx (%ld K) vma %lx pagep %lx\n", proc->pid, vma->vm_start, vma->vm_end, (vma->vm_end - vma->vm_start) / SZ_1K, vma->vm_flags, vma->vm_page_prot.pgprot);
|
printk(KERN_INFO "binder_mmap: %d %lx-%lx (%ld K) vma %lx pagep %lx\n", proc->pid, vma->vm_start, vma->vm_end, (vma->vm_end - vma->vm_start) / SZ_1K, vma->vm_flags, pgprot_val(vma->vm_page_prot));
|
||||||
|
|
||||||
if (vma->vm_flags & FORBIDDEN_MMAP_FLAGS) {
|
if (vma->vm_flags & FORBIDDEN_MMAP_FLAGS) {
|
||||||
ret = -EPERM;
|
ret = -EPERM;
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
The lowmemorykiller driver lets user-space specify a set of memory thresholds
|
||||||
|
where processes with a range of oom_adj values will get killed. Specify the
|
||||||
|
minimum oom_adj values in /sys/module/lowmemorykiller/parameters/adj and the
|
||||||
|
number of free pages in /sys/module/lowmemorykiller/parameters/minfree. Both
|
||||||
|
files take a comma separated list of numbers in ascending order.
|
||||||
|
|
||||||
|
For example, write "0,8" to /sys/module/lowmemorykiller/parameters/adj and
|
||||||
|
"1024,4096" to /sys/module/lowmemorykiller/parameters/minfree to kill processes
|
||||||
|
with a oom_adj value of 8 or higher when the free memory drops below 4096 pages
|
||||||
|
and kill processes with a oom_adj value of 0 or higher when the free memory
|
||||||
|
drops below 1024 pages.
|
||||||
|
|
||||||
|
The driver considers memory used for caches to be free, but if a large
|
||||||
|
percentage of the cached memory is locked this can be very inaccurate
|
||||||
|
and processes may not get killed until the normal oom killer is triggered.
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/hrtimer.h>
|
#include <linux/hrtimer.h>
|
||||||
#include <linux/err.h>
|
#include <linux/err.h>
|
||||||
#include <asm/arch/gpio.h>
|
#include <linux/gpio.h>
|
||||||
|
|
||||||
#include "timed_gpio.h"
|
#include "timed_gpio.h"
|
||||||
|
|
||||||
|
@ -49,7 +49,8 @@ static ssize_t gpio_enable_show(struct device *dev, struct device_attribute *att
|
||||||
|
|
||||||
if (hrtimer_active(&gpio_data->timer)) {
|
if (hrtimer_active(&gpio_data->timer)) {
|
||||||
ktime_t r = hrtimer_get_remaining(&gpio_data->timer);
|
ktime_t r = hrtimer_get_remaining(&gpio_data->timer);
|
||||||
remaining = r.tv.sec * 1000 + r.tv.nsec / 1000000;
|
struct timeval t = ktime_to_timeval(r);
|
||||||
|
remaining = t.tv_sec * 1000 + t.tv_usec;
|
||||||
} else
|
} else
|
||||||
remaining = 0;
|
remaining = 0;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
config COMEDI
|
config COMEDI
|
||||||
tristate "Data Acquision support (comedi)"
|
tristate "Data Acquision support (comedi)"
|
||||||
default N
|
default N
|
||||||
|
depends on m
|
||||||
---help---
|
---help---
|
||||||
Enable support a wide range of data acquision devices
|
Enable support a wide range of data acquision devices
|
||||||
for Linux.
|
for Linux.
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
menuconfig MEILHAUS
|
menuconfig MEILHAUS
|
||||||
tristate "Meilhaus support"
|
tristate "Meilhaus support"
|
||||||
|
depends on m
|
||||||
---help---
|
---help---
|
||||||
If you have a Meilhaus card, say Y (or M) here.
|
If you have a Meilhaus card, say Y (or M) here.
|
||||||
|
|
||||||
|
@ -18,7 +19,7 @@ if MEILHAUS
|
||||||
config ME0600
|
config ME0600
|
||||||
tristate "Meilhaus ME-600 support"
|
tristate "Meilhaus ME-600 support"
|
||||||
default n
|
default n
|
||||||
depends on PCI
|
depends on PCI && m
|
||||||
help
|
help
|
||||||
This driver supports the Meilhaus ME-600 family of boards
|
This driver supports the Meilhaus ME-600 family of boards
|
||||||
that do data collection and multipurpose I/O.
|
that do data collection and multipurpose I/O.
|
||||||
|
@ -29,7 +30,7 @@ config ME0600
|
||||||
config ME0900
|
config ME0900
|
||||||
tristate "Meilhaus ME-900 support"
|
tristate "Meilhaus ME-900 support"
|
||||||
default n
|
default n
|
||||||
depends on PCI
|
depends on PCI && m
|
||||||
help
|
help
|
||||||
This driver supports the Meilhaus ME-900 family of boards
|
This driver supports the Meilhaus ME-900 family of boards
|
||||||
that do data collection and multipurpose I/O.
|
that do data collection and multipurpose I/O.
|
||||||
|
@ -40,7 +41,7 @@ config ME0900
|
||||||
config ME1000
|
config ME1000
|
||||||
tristate "Meilhaus ME-1000 support"
|
tristate "Meilhaus ME-1000 support"
|
||||||
default n
|
default n
|
||||||
depends on PCI
|
depends on PCI && m
|
||||||
help
|
help
|
||||||
This driver supports the Meilhaus ME-1000 family of boards
|
This driver supports the Meilhaus ME-1000 family of boards
|
||||||
that do data collection and multipurpose I/O.
|
that do data collection and multipurpose I/O.
|
||||||
|
@ -51,7 +52,7 @@ config ME1000
|
||||||
config ME1400
|
config ME1400
|
||||||
tristate "Meilhaus ME-1400 support"
|
tristate "Meilhaus ME-1400 support"
|
||||||
default n
|
default n
|
||||||
depends on PCI
|
depends on PCI && m
|
||||||
help
|
help
|
||||||
This driver supports the Meilhaus ME-1400 family of boards
|
This driver supports the Meilhaus ME-1400 family of boards
|
||||||
that do data collection and multipurpose I/O.
|
that do data collection and multipurpose I/O.
|
||||||
|
@ -62,7 +63,7 @@ config ME1400
|
||||||
config ME1600
|
config ME1600
|
||||||
tristate "Meilhaus ME-1600 support"
|
tristate "Meilhaus ME-1600 support"
|
||||||
default n
|
default n
|
||||||
depends on PCI
|
depends on PCI && m
|
||||||
help
|
help
|
||||||
This driver supports the Meilhaus ME-1600 family of boards
|
This driver supports the Meilhaus ME-1600 family of boards
|
||||||
that do data collection and multipurpose I/O.
|
that do data collection and multipurpose I/O.
|
||||||
|
@ -73,7 +74,7 @@ config ME1600
|
||||||
config ME4600
|
config ME4600
|
||||||
tristate "Meilhaus ME-4600 support"
|
tristate "Meilhaus ME-4600 support"
|
||||||
default n
|
default n
|
||||||
depends on PCI
|
depends on PCI && m
|
||||||
help
|
help
|
||||||
This driver supports the Meilhaus ME-4600 family of boards
|
This driver supports the Meilhaus ME-4600 family of boards
|
||||||
that do data collection and multipurpose I/O.
|
that do data collection and multipurpose I/O.
|
||||||
|
@ -84,7 +85,7 @@ config ME4600
|
||||||
config ME6000
|
config ME6000
|
||||||
tristate "Meilhaus ME-6000 support"
|
tristate "Meilhaus ME-6000 support"
|
||||||
default n
|
default n
|
||||||
depends on PCI
|
depends on PCI && m
|
||||||
help
|
help
|
||||||
This driver supports the Meilhaus ME-6000 family of boards
|
This driver supports the Meilhaus ME-6000 family of boards
|
||||||
that do data collection and multipurpose I/O.
|
that do data collection and multipurpose I/O.
|
||||||
|
@ -95,7 +96,7 @@ config ME6000
|
||||||
config ME8100
|
config ME8100
|
||||||
tristate "Meilhaus ME-8100 support"
|
tristate "Meilhaus ME-8100 support"
|
||||||
default n
|
default n
|
||||||
depends on PCI
|
depends on PCI && m
|
||||||
help
|
help
|
||||||
This driver supports the Meilhaus ME-8100 family of boards
|
This driver supports the Meilhaus ME-8100 family of boards
|
||||||
that do data collection and multipurpose I/O.
|
that do data collection and multipurpose I/O.
|
||||||
|
@ -106,7 +107,7 @@ config ME8100
|
||||||
config ME8200
|
config ME8200
|
||||||
tristate "Meilhaus ME-8200 support"
|
tristate "Meilhaus ME-8200 support"
|
||||||
default n
|
default n
|
||||||
depends on PCI
|
depends on PCI && m
|
||||||
help
|
help
|
||||||
This driver supports the Meilhaus ME-8200 family of boards
|
This driver supports the Meilhaus ME-8200 family of boards
|
||||||
that do data collection and multipurpose I/O.
|
that do data collection and multipurpose I/O.
|
||||||
|
@ -117,7 +118,7 @@ config ME8200
|
||||||
config MEDUMMY
|
config MEDUMMY
|
||||||
tristate "Meilhaus dummy driver"
|
tristate "Meilhaus dummy driver"
|
||||||
default n
|
default n
|
||||||
depends on PCI
|
depends on PCI && m
|
||||||
help
|
help
|
||||||
This provides a dummy driver for the Meilhaus driver package
|
This provides a dummy driver for the Meilhaus driver package
|
||||||
|
|
||||||
|
|
|
@ -1026,7 +1026,7 @@ static int poch_ioctl(struct inode *inode, struct file *filp,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case POCH_IOC_GET_COUNTERS:
|
case POCH_IOC_GET_COUNTERS:
|
||||||
if (access_ok(VERIFY_WRITE, argp, sizeof(struct poch_counters)))
|
if (!access_ok(VERIFY_WRITE, argp, sizeof(struct poch_counters)))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
spin_lock_irq(&channel->counters_lock);
|
spin_lock_irq(&channel->counters_lock);
|
||||||
|
|
|
@ -406,8 +406,20 @@ void usbip_start_threads(struct usbip_device *ud)
|
||||||
/*
|
/*
|
||||||
* threads are invoked per one device (per one connection).
|
* threads are invoked per one device (per one connection).
|
||||||
*/
|
*/
|
||||||
kernel_thread(usbip_thread, (void *)&ud->tcp_rx, 0);
|
int retval;
|
||||||
kernel_thread(usbip_thread, (void *)&ud->tcp_tx, 0);
|
|
||||||
|
retval = kernel_thread(usbip_thread, (void *)&ud->tcp_rx, 0);
|
||||||
|
if (retval < 0) {
|
||||||
|
printk(KERN_ERR "Creating tcp_rx thread for ud %p failed.\n",
|
||||||
|
ud);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
retval = kernel_thread(usbip_thread, (void *)&ud->tcp_tx, 0);
|
||||||
|
if (retval < 0) {
|
||||||
|
printk(KERN_ERR "Creating tcp_tx thread for ud %p failed.\n",
|
||||||
|
ud);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* confirm threads are starting */
|
/* confirm threads are starting */
|
||||||
wait_for_completion(&ud->tcp_rx.thread_done);
|
wait_for_completion(&ud->tcp_rx.thread_done);
|
||||||
|
|
Loading…
Reference in New Issue