Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts: arch/sh/kernel/process_32.c Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
commit
b9afa3e015
|
@ -1024,6 +1024,10 @@ ThinkPad-specific interface. The driver will disable its native
|
|||
backlight brightness control interface if it detects that the standard
|
||||
ACPI interface is available in the ThinkPad.
|
||||
|
||||
If you want to use the thinkpad-acpi backlight brightness control
|
||||
instead of the generic ACPI video backlight brightness control for some
|
||||
reason, you should use the acpi_backlight=vendor kernel parameter.
|
||||
|
||||
The brightness_enable module parameter can be used to control whether
|
||||
the LCD brightness control feature will be enabled when available.
|
||||
brightness_enable=0 forces it to be disabled. brightness_enable=1
|
||||
|
|
|
@ -49,40 +49,13 @@ Table of Contents
|
|||
f) MDIO on GPIOs
|
||||
g) SPI busses
|
||||
|
||||
VII - Marvell Discovery mv64[345]6x System Controller chips
|
||||
1) The /system-controller node
|
||||
2) Child nodes of /system-controller
|
||||
a) Marvell Discovery MDIO bus
|
||||
b) Marvell Discovery ethernet controller
|
||||
c) Marvell Discovery PHY nodes
|
||||
d) Marvell Discovery SDMA nodes
|
||||
e) Marvell Discovery BRG nodes
|
||||
f) Marvell Discovery CUNIT nodes
|
||||
g) Marvell Discovery MPSCROUTING nodes
|
||||
h) Marvell Discovery MPSCINTR nodes
|
||||
i) Marvell Discovery MPSC nodes
|
||||
j) Marvell Discovery Watch Dog Timer nodes
|
||||
k) Marvell Discovery I2C nodes
|
||||
l) Marvell Discovery PIC (Programmable Interrupt Controller) nodes
|
||||
m) Marvell Discovery MPP (Multipurpose Pins) multiplexing nodes
|
||||
n) Marvell Discovery GPP (General Purpose Pins) nodes
|
||||
o) Marvell Discovery PCI host bridge node
|
||||
p) Marvell Discovery CPU Error nodes
|
||||
q) Marvell Discovery SRAM Controller nodes
|
||||
r) Marvell Discovery PCI Error Handler nodes
|
||||
s) Marvell Discovery Memory Controller nodes
|
||||
|
||||
VIII - Specifying interrupt information for devices
|
||||
VII - Specifying interrupt information for devices
|
||||
1) interrupts property
|
||||
2) interrupt-parent property
|
||||
3) OpenPIC Interrupt Controllers
|
||||
4) ISA Interrupt Controllers
|
||||
|
||||
IX - Specifying GPIO information for devices
|
||||
1) gpios property
|
||||
2) gpio-controller nodes
|
||||
|
||||
X - Specifying device power management information (sleep property)
|
||||
VIII - Specifying device power management information (sleep property)
|
||||
|
||||
Appendix A - Sample SOC node for MPC8540
|
||||
|
||||
|
|
|
@ -387,8 +387,9 @@ EXPORT_SYMBOL(dump_elf_task_fp);
|
|||
* sys_execve() executes a new program.
|
||||
*/
|
||||
asmlinkage int
|
||||
do_sys_execve(const char __user *ufilename, char __user * __user *argv,
|
||||
char __user * __user *envp, struct pt_regs *regs)
|
||||
do_sys_execve(const char __user *ufilename,
|
||||
const char __user *const __user *argv,
|
||||
const char __user *const __user *envp, struct pt_regs *regs)
|
||||
{
|
||||
int error;
|
||||
char *filename;
|
||||
|
|
|
@ -21,6 +21,9 @@ GZFLAGS :=-9
|
|||
# Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb:
|
||||
KBUILD_CFLAGS +=$(call cc-option,-marm,)
|
||||
|
||||
# Never generate .eh_frame
|
||||
KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm)
|
||||
|
||||
# Do not use arch/arm/defconfig - it's always outdated.
|
||||
# Select a platform tht is kept up-to-date
|
||||
KBUILD_DEFCONFIG := versatile_defconfig
|
||||
|
|
|
@ -158,15 +158,24 @@ struct pt_regs {
|
|||
*/
|
||||
static inline int valid_user_regs(struct pt_regs *regs)
|
||||
{
|
||||
if (user_mode(regs) && (regs->ARM_cpsr & PSR_I_BIT) == 0) {
|
||||
unsigned long mode = regs->ARM_cpsr & MODE_MASK;
|
||||
|
||||
/*
|
||||
* Always clear the F (FIQ) and A (delayed abort) bits
|
||||
*/
|
||||
regs->ARM_cpsr &= ~(PSR_F_BIT | PSR_A_BIT);
|
||||
|
||||
if ((regs->ARM_cpsr & PSR_I_BIT) == 0) {
|
||||
if (mode == USR_MODE)
|
||||
return 1;
|
||||
if (elf_hwcap & HWCAP_26BIT && mode == USR26_MODE)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Force CPSR to something logical...
|
||||
*/
|
||||
regs->ARM_cpsr &= PSR_f | PSR_s | (PSR_x & ~PSR_A_BIT) | PSR_T_BIT | MODE32_BIT;
|
||||
regs->ARM_cpsr &= PSR_f | PSR_s | PSR_x | PSR_T_BIT | MODE32_BIT;
|
||||
if (!(elf_hwcap & HWCAP_26BIT))
|
||||
regs->ARM_cpsr |= USR_MODE;
|
||||
|
||||
|
|
|
@ -392,6 +392,7 @@
|
|||
#define __NR_rt_tgsigqueueinfo (__NR_SYSCALL_BASE+363)
|
||||
#define __NR_perf_event_open (__NR_SYSCALL_BASE+364)
|
||||
#define __NR_recvmmsg (__NR_SYSCALL_BASE+365)
|
||||
#define __NR_accept4 (__NR_SYSCALL_BASE+366)
|
||||
|
||||
/*
|
||||
* The following SWIs are ARM private.
|
||||
|
|
|
@ -375,6 +375,7 @@
|
|||
CALL(sys_rt_tgsigqueueinfo)
|
||||
CALL(sys_perf_event_open)
|
||||
/* 365 */ CALL(sys_recvmmsg)
|
||||
CALL(sys_accept4)
|
||||
#ifndef syscalls_counted
|
||||
.equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls
|
||||
#define syscalls_counted
|
||||
|
|
|
@ -79,7 +79,7 @@ sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *task)
|
|||
return;
|
||||
|
||||
/* Initialize to zero */
|
||||
for (regno = 0; regno < GDB_MAX_REGS; regno++)
|
||||
for (regno = 0; regno < DBG_MAX_REG_NUM; regno++)
|
||||
gdb_regs[regno] = 0;
|
||||
|
||||
/* Otherwise, we have only some registers from switch_to() */
|
||||
|
|
|
@ -62,8 +62,9 @@ asmlinkage int sys_vfork(struct pt_regs *regs)
|
|||
/* sys_execve() executes a new program.
|
||||
* This is called indirectly via a small wrapper
|
||||
*/
|
||||
asmlinkage int sys_execve(const char __user *filenamei, char __user * __user *argv,
|
||||
char __user * __user *envp, struct pt_regs *regs)
|
||||
asmlinkage int sys_execve(const char __user *filenamei,
|
||||
const char __user *const __user *argv,
|
||||
const char __user *const __user *envp, struct pt_regs *regs)
|
||||
{
|
||||
int error;
|
||||
char * filename;
|
||||
|
@ -78,14 +79,17 @@ out:
|
|||
return error;
|
||||
}
|
||||
|
||||
int kernel_execve(const char *filename, char *const argv[], char *const envp[])
|
||||
int kernel_execve(const char *filename,
|
||||
const char *const argv[],
|
||||
const char *const envp[])
|
||||
{
|
||||
struct pt_regs regs;
|
||||
int ret;
|
||||
|
||||
memset(®s, 0, sizeof(struct pt_regs));
|
||||
ret = do_execve(filename, (char __user * __user *)argv,
|
||||
(char __user * __user *)envp, ®s);
|
||||
ret = do_execve(filename,
|
||||
(const char __user *const __user *)argv,
|
||||
(const char __user *const __user *)envp, ®s);
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
|
||||
|
|
|
@ -384,8 +384,9 @@ asmlinkage int sys_vfork(struct pt_regs *regs)
|
|||
}
|
||||
|
||||
asmlinkage int sys_execve(const char __user *ufilename,
|
||||
char __user *__user *uargv,
|
||||
char __user *__user *uenvp, struct pt_regs *regs)
|
||||
const char __user *const __user *uargv,
|
||||
const char __user *const __user *uenvp,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
int error;
|
||||
char *filename;
|
||||
|
|
|
@ -7,7 +7,9 @@
|
|||
*/
|
||||
#include <linux/unistd.h>
|
||||
|
||||
int kernel_execve(const char *file, char **argv, char **envp)
|
||||
int kernel_execve(const char *file,
|
||||
const char *const *argv,
|
||||
const char *const *envp)
|
||||
{
|
||||
register long scno asm("r8") = __NR_execve;
|
||||
register long sc1 asm("r12") = (long)file;
|
||||
|
|
|
@ -209,7 +209,9 @@ copy_thread(unsigned long clone_flags,
|
|||
/*
|
||||
* sys_execve() executes a new program.
|
||||
*/
|
||||
asmlinkage int sys_execve(const char __user *name, char __user * __user *argv, char __user * __user *envp)
|
||||
asmlinkage int sys_execve(const char __user *name,
|
||||
const char __user *const __user *argv,
|
||||
const char __user *const __user *envp)
|
||||
{
|
||||
int error;
|
||||
char *filename;
|
||||
|
|
|
@ -204,7 +204,9 @@ asmlinkage int sys_vfork(long r10, long r11, long r12, long r13, long mof, long
|
|||
/*
|
||||
* sys_execve() executes a new program.
|
||||
*/
|
||||
asmlinkage int sys_execve(const char *fname, char **argv, char **envp,
|
||||
asmlinkage int sys_execve(const char *fname,
|
||||
const char *const *argv,
|
||||
const char *const *envp,
|
||||
long r13, long mof, long srp,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
|
|
|
@ -218,7 +218,9 @@ sys_vfork(long r10, long r11, long r12, long r13, long mof, long srp,
|
|||
|
||||
/* sys_execve() executes a new program. */
|
||||
asmlinkage int
|
||||
sys_execve(const char *fname, char **argv, char **envp, long r13, long mof, long srp,
|
||||
sys_execve(const char *fname,
|
||||
const char *const *argv,
|
||||
const char *const *envp, long r13, long mof, long srp,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
int error;
|
||||
|
|
|
@ -250,8 +250,9 @@ int copy_thread(unsigned long clone_flags,
|
|||
/*
|
||||
* sys_execve() executes a new program.
|
||||
*/
|
||||
asmlinkage int sys_execve(const char __user *name, char __user * __user *argv,
|
||||
char __user * __user *envp)
|
||||
asmlinkage int sys_execve(const char __user *name,
|
||||
const char __user *const __user *argv,
|
||||
const char __user *const __user *envp)
|
||||
{
|
||||
int error;
|
||||
char * filename;
|
||||
|
|
|
@ -212,7 +212,10 @@ int copy_thread(unsigned long clone_flags,
|
|||
/*
|
||||
* sys_execve() executes a new program.
|
||||
*/
|
||||
asmlinkage int sys_execve(const char *name, char **argv, char **envp,int dummy,...)
|
||||
asmlinkage int sys_execve(const char *name,
|
||||
const char *const *argv,
|
||||
const char *const *envp,
|
||||
int dummy, ...)
|
||||
{
|
||||
int error;
|
||||
char * filename;
|
||||
|
|
|
@ -51,7 +51,9 @@ asmlinkage void syscall_print(void *dummy,...)
|
|||
* Do a system call from kernel instead of calling sys_execve so we
|
||||
* end up with proper pt_regs.
|
||||
*/
|
||||
int kernel_execve(const char *filename, char *const argv[], char *const envp[])
|
||||
int kernel_execve(const char *filename,
|
||||
const char *const argv[],
|
||||
const char *const envp[])
|
||||
{
|
||||
register long res __asm__("er0");
|
||||
register char *const *_c __asm__("er3") = envp;
|
||||
|
|
|
@ -356,8 +356,6 @@ asmlinkage unsigned long sys_mmap2(
|
|||
int fd, long pgoff);
|
||||
struct pt_regs;
|
||||
struct sigaction;
|
||||
long sys_execve(const char __user *filename, char __user * __user *argv,
|
||||
char __user * __user *envp, struct pt_regs *regs);
|
||||
asmlinkage long sys_ia64_pipe(void);
|
||||
asmlinkage long sys_rt_sigaction(int sig,
|
||||
const struct sigaction __user *act,
|
||||
|
|
|
@ -633,7 +633,9 @@ dump_fpu (struct pt_regs *pt, elf_fpregset_t dst)
|
|||
}
|
||||
|
||||
long
|
||||
sys_execve (const char __user *filename, char __user * __user *argv, char __user * __user *envp,
|
||||
sys_execve (const char __user *filename,
|
||||
const char __user *const __user *argv,
|
||||
const char __user *const __user *envp,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
char *fname;
|
||||
|
|
|
@ -289,8 +289,8 @@ asmlinkage int sys_vfork(unsigned long r0, unsigned long r1, unsigned long r2,
|
|||
* sys_execve() executes a new program.
|
||||
*/
|
||||
asmlinkage int sys_execve(const char __user *ufilename,
|
||||
char __user * __user *uargv,
|
||||
char __user * __user *uenvp,
|
||||
const char __user *const __user *uargv,
|
||||
const char __user *const __user *uenvp,
|
||||
unsigned long r3, unsigned long r4, unsigned long r5,
|
||||
unsigned long r6, struct pt_regs regs)
|
||||
{
|
||||
|
|
|
@ -93,7 +93,9 @@ asmlinkage int sys_cachectl(char *addr, int nbytes, int op)
|
|||
* Do a system call from kernel instead of calling sys_execve so we
|
||||
* end up with proper pt_regs.
|
||||
*/
|
||||
int kernel_execve(const char *filename, char *const argv[], char *const envp[])
|
||||
int kernel_execve(const char *filename,
|
||||
const char *const argv[],
|
||||
const char *const envp[])
|
||||
{
|
||||
register long __scno __asm__ ("r7") = __NR_execve;
|
||||
register long __arg3 __asm__ ("r2") = (long)(envp);
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
/*
|
||||
* linux/include/asm-m68k/ide.h
|
||||
*
|
||||
* Copyright (C) 1994-1996 Linus Torvalds & authors
|
||||
*/
|
||||
|
||||
|
@ -34,6 +32,8 @@
|
|||
#include <asm/io.h>
|
||||
#include <asm/irq.h>
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
|
||||
/*
|
||||
* Get rid of defs from io.h - ide has its private and conflicting versions
|
||||
* Since so far no single m68k platform uses ISA/PCI I/O space for IDE, we
|
||||
|
@ -53,5 +53,14 @@
|
|||
#define __ide_mm_outsw(port, addr, n) raw_outsw((u16 *)port, addr, n)
|
||||
#define __ide_mm_outsl(port, addr, n) raw_outsl((u32 *)port, addr, n)
|
||||
|
||||
#else
|
||||
|
||||
#define __ide_mm_insw(port, addr, n) io_insw((unsigned int)port, addr, n)
|
||||
#define __ide_mm_insl(port, addr, n) io_insl((unsigned int)port, addr, n)
|
||||
#define __ide_mm_outsw(port, addr, n) io_outsw((unsigned int)port, addr, n)
|
||||
#define __ide_mm_outsl(port, addr, n) io_outsl((unsigned int)port, addr, n)
|
||||
|
||||
#endif /* CONFIG_MMU */
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* _M68K_IDE_H */
|
||||
|
|
|
@ -315,7 +315,9 @@ EXPORT_SYMBOL(dump_fpu);
|
|||
/*
|
||||
* sys_execve() executes a new program.
|
||||
*/
|
||||
asmlinkage int sys_execve(const char __user *name, char __user * __user *argv, char __user * __user *envp)
|
||||
asmlinkage int sys_execve(const char __user *name,
|
||||
const char __user *const __user *argv,
|
||||
const char __user *const __user *envp)
|
||||
{
|
||||
int error;
|
||||
char * filename;
|
||||
|
|
|
@ -459,7 +459,9 @@ asmlinkage int sys_getpagesize(void)
|
|||
* Do a system call from kernel instead of calling sys_execve so we
|
||||
* end up with proper pt_regs.
|
||||
*/
|
||||
int kernel_execve(const char *filename, char *const argv[], char *const envp[])
|
||||
int kernel_execve(const char *filename,
|
||||
const char *const argv[],
|
||||
const char *const envp[])
|
||||
{
|
||||
register long __res asm ("%d0") = __NR_execve;
|
||||
register long __a asm ("%d1") = (long)(filename);
|
||||
|
|
|
@ -316,14 +316,14 @@ void dump(struct pt_regs *fp)
|
|||
fp->d0, fp->d1, fp->d2, fp->d3);
|
||||
printk(KERN_EMERG "d4: %08lx d5: %08lx a0: %08lx a1: %08lx\n",
|
||||
fp->d4, fp->d5, fp->a0, fp->a1);
|
||||
printk(KERN_EMERG "\nUSP: %08x TRAPFRAME: %08x\n",
|
||||
(unsigned int) rdusp(), (unsigned int) fp);
|
||||
printk(KERN_EMERG "\nUSP: %08x TRAPFRAME: %p\n",
|
||||
(unsigned int) rdusp(), fp);
|
||||
|
||||
printk(KERN_EMERG "\nCODE:");
|
||||
tp = ((unsigned char *) fp->pc) - 0x20;
|
||||
for (sp = (unsigned long *) tp, i = 0; (i < 0x40); i += 4) {
|
||||
if ((i % 0x10) == 0)
|
||||
printk(KERN_EMERG "%08x: ", (int) (tp + i));
|
||||
printk(KERN_EMERG "%p: ", tp + i);
|
||||
printk("%08x ", (int) *sp++);
|
||||
}
|
||||
printk(KERN_EMERG "\n");
|
||||
|
@ -332,7 +332,7 @@ void dump(struct pt_regs *fp)
|
|||
tp = ((unsigned char *) fp) - 0x40;
|
||||
for (sp = (unsigned long *) tp, i = 0; (i < 0xc0); i += 4) {
|
||||
if ((i % 0x10) == 0)
|
||||
printk(KERN_EMERG "%08x: ", (int) (tp + i));
|
||||
printk(KERN_EMERG "%p: ", tp + i);
|
||||
printk("%08x ", (int) *sp++);
|
||||
}
|
||||
printk(KERN_EMERG "\n");
|
||||
|
@ -341,7 +341,7 @@ void dump(struct pt_regs *fp)
|
|||
tp = (unsigned char *) (rdusp() - 0x10);
|
||||
for (sp = (unsigned long *) tp, i = 0; (i < 0x80); i += 4) {
|
||||
if ((i % 0x10) == 0)
|
||||
printk(KERN_EMERG "%08x: ", (int) (tp + i));
|
||||
printk(KERN_EMERG "%p: ", tp + i);
|
||||
printk("%08x ", (int) *sp++);
|
||||
}
|
||||
printk(KERN_EMERG "\n");
|
||||
|
@ -350,7 +350,9 @@ void dump(struct pt_regs *fp)
|
|||
/*
|
||||
* sys_execve() executes a new program.
|
||||
*/
|
||||
asmlinkage int sys_execve(const char *name, char **argv, char **envp)
|
||||
asmlinkage int sys_execve(const char *name,
|
||||
const char *const *argv,
|
||||
const char *const *envp)
|
||||
{
|
||||
int error;
|
||||
char * filename;
|
||||
|
|
|
@ -44,7 +44,9 @@ asmlinkage int sys_getpagesize(void)
|
|||
* Do a system call from kernel instead of calling sys_execve so we
|
||||
* end up with proper pt_regs.
|
||||
*/
|
||||
int kernel_execve(const char *filename, char *const argv[], char *const envp[])
|
||||
int kernel_execve(const char *filename,
|
||||
const char *const argv[],
|
||||
const char *const envp[])
|
||||
{
|
||||
register long __res asm ("%d0") = __NR_execve;
|
||||
register long __a asm ("%d1") = (long)(filename);
|
||||
|
|
|
@ -73,7 +73,7 @@ int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq)
|
|||
/* We can only get here if we hit a P2P bridge with no node,
|
||||
* let's do standard swizzling and try again
|
||||
*/
|
||||
lspec = of_irq_pci_swizzle(PCI_SLOT(pdev->devfn), lspec);
|
||||
lspec = pci_swizzle_interrupt_pin(pdev, lspec);
|
||||
pdev = ppdev;
|
||||
}
|
||||
|
||||
|
|
|
@ -47,8 +47,10 @@ asmlinkage long microblaze_clone(int flags, unsigned long stack, struct pt_regs
|
|||
return do_fork(flags, stack, regs, 0, NULL, NULL);
|
||||
}
|
||||
|
||||
asmlinkage long microblaze_execve(const char __user *filenamei, char __user *__user *argv,
|
||||
char __user *__user *envp, struct pt_regs *regs)
|
||||
asmlinkage long microblaze_execve(const char __user *filenamei,
|
||||
const char __user *const __user *argv,
|
||||
const char __user *const __user *envp,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
int error;
|
||||
char *filename;
|
||||
|
@ -77,7 +79,9 @@ asmlinkage long sys_mmap(unsigned long addr, unsigned long len,
|
|||
* Do a system call from kernel instead of calling sys_execve so we
|
||||
* end up with proper pt_regs.
|
||||
*/
|
||||
int kernel_execve(const char *filename, char *const argv[], char *const envp[])
|
||||
int kernel_execve(const char *filename,
|
||||
const char *const argv[],
|
||||
const char *const envp[])
|
||||
{
|
||||
register const char *__a __asm__("r5") = filename;
|
||||
register const void *__b __asm__("r6") = argv;
|
||||
|
|
|
@ -27,10 +27,11 @@
|
|||
#include <linux/irq.h>
|
||||
#include <linux/vmalloc.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_address.h>
|
||||
|
||||
#include <asm/processor.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/prom.h>
|
||||
#include <asm/pci-bridge.h>
|
||||
#include <asm/byteorder.h>
|
||||
|
||||
|
@ -1077,7 +1078,7 @@ void __devinit pcibios_setup_bus_devices(struct pci_bus *bus)
|
|||
struct dev_archdata *sd = &dev->dev.archdata;
|
||||
|
||||
/* Setup OF node pointer in archdata */
|
||||
sd->of_node = pci_device_to_OF_node(dev);
|
||||
dev->dev.of_node = pci_device_to_OF_node(dev);
|
||||
|
||||
/* Fixup NUMA node as it may not be setup yet by the generic
|
||||
* code and is needed by the DMA init
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/pci.h>
|
||||
#include <asm/io.h>
|
||||
|
||||
|
|
|
@ -258,8 +258,10 @@ asmlinkage int sys_execve(nabi_no_regargs struct pt_regs regs)
|
|||
error = PTR_ERR(filename);
|
||||
if (IS_ERR(filename))
|
||||
goto out;
|
||||
error = do_execve(filename, (char __user *__user *) (long)regs.regs[5],
|
||||
(char __user *__user *) (long)regs.regs[6], ®s);
|
||||
error = do_execve(filename,
|
||||
(const char __user *const __user *) (long)regs.regs[5],
|
||||
(const char __user *const __user *) (long)regs.regs[6],
|
||||
®s);
|
||||
putname(filename);
|
||||
|
||||
out:
|
||||
|
@ -436,7 +438,9 @@ asmlinkage void bad_stack(void)
|
|||
* Do a system call from kernel instead of calling sys_execve so we
|
||||
* end up with proper pt_regs.
|
||||
*/
|
||||
int kernel_execve(const char *filename, char *const argv[], char *const envp[])
|
||||
int kernel_execve(const char *filename,
|
||||
const char *const argv[],
|
||||
const char *const envp[])
|
||||
{
|
||||
register unsigned long __a0 asm("$4") = (unsigned long) filename;
|
||||
register unsigned long __a1 asm("$5") = (unsigned long) argv;
|
||||
|
|
|
@ -269,8 +269,8 @@ asmlinkage long sys_vfork(void)
|
|||
}
|
||||
|
||||
asmlinkage long sys_execve(const char __user *name,
|
||||
char __user * __user *argv,
|
||||
char __user * __user *envp)
|
||||
const char __user *const __user *argv,
|
||||
const char __user *const __user *envp)
|
||||
{
|
||||
char *filename;
|
||||
int error;
|
||||
|
|
|
@ -41,8 +41,10 @@ int hpux_execve(struct pt_regs *regs)
|
|||
if (IS_ERR(filename))
|
||||
goto out;
|
||||
|
||||
error = do_execve(filename, (char __user * __user *) regs->gr[25],
|
||||
(char __user * __user *) regs->gr[24], regs);
|
||||
error = do_execve(filename,
|
||||
(const char __user *const __user *) regs->gr[25],
|
||||
(const char __user *const __user *) regs->gr[24],
|
||||
regs);
|
||||
|
||||
putname(filename);
|
||||
|
||||
|
|
|
@ -348,17 +348,22 @@ asmlinkage int sys_execve(struct pt_regs *regs)
|
|||
error = PTR_ERR(filename);
|
||||
if (IS_ERR(filename))
|
||||
goto out;
|
||||
error = do_execve(filename, (char __user * __user *) regs->gr[25],
|
||||
(char __user * __user *) regs->gr[24], regs);
|
||||
error = do_execve(filename,
|
||||
(const char __user *const __user *) regs->gr[25],
|
||||
(const char __user *const __user *) regs->gr[24],
|
||||
regs);
|
||||
putname(filename);
|
||||
out:
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
extern int __execve(const char *filename, char *const argv[],
|
||||
char *const envp[], struct task_struct *task);
|
||||
int kernel_execve(const char *filename, char *const argv[], char *const envp[])
|
||||
extern int __execve(const char *filename,
|
||||
const char *const argv[],
|
||||
const char *const envp[], struct task_struct *task);
|
||||
int kernel_execve(const char *filename,
|
||||
const char *const argv[],
|
||||
const char *const envp[])
|
||||
{
|
||||
return __execve(filename, argv, envp, current);
|
||||
}
|
||||
|
|
|
@ -1034,8 +1034,9 @@ int sys_execve(unsigned long a0, unsigned long a1, unsigned long a2,
|
|||
flush_fp_to_thread(current);
|
||||
flush_altivec_to_thread(current);
|
||||
flush_spe_to_thread(current);
|
||||
error = do_execve(filename, (char __user * __user *) a1,
|
||||
(char __user * __user *) a2, regs);
|
||||
error = do_execve(filename,
|
||||
(const char __user *const __user *) a1,
|
||||
(const char __user *const __user *) a2, regs);
|
||||
putname(filename);
|
||||
out:
|
||||
return error;
|
||||
|
|
|
@ -267,8 +267,9 @@ asmlinkage void execve_tail(void)
|
|||
/*
|
||||
* sys_execve() executes a new program.
|
||||
*/
|
||||
SYSCALL_DEFINE3(execve, const char __user *, name, char __user * __user *, argv,
|
||||
char __user * __user *, envp)
|
||||
SYSCALL_DEFINE3(execve, const char __user *, name,
|
||||
const char __user *const __user *, argv,
|
||||
const char __user *const __user *, envp)
|
||||
{
|
||||
struct pt_regs *regs = task_pt_regs(current);
|
||||
char *filename;
|
||||
|
|
|
@ -99,8 +99,10 @@ score_execve(struct pt_regs *regs)
|
|||
if (IS_ERR(filename))
|
||||
return error;
|
||||
|
||||
error = do_execve(filename, (char __user *__user*)regs->regs[5],
|
||||
(char __user *__user *) regs->regs[6], regs);
|
||||
error = do_execve(filename,
|
||||
(const char __user *const __user *)regs->regs[5],
|
||||
(const char __user *const __user *)regs->regs[6],
|
||||
regs);
|
||||
|
||||
putname(filename);
|
||||
return error;
|
||||
|
@ -110,7 +112,9 @@ score_execve(struct pt_regs *regs)
|
|||
* Do a system call from kernel instead of calling sys_execve so we
|
||||
* end up with proper pt_regs.
|
||||
*/
|
||||
int kernel_execve(const char *filename, char *const argv[], char *const envp[])
|
||||
int kernel_execve(const char *filename,
|
||||
const char *const argv[],
|
||||
const char *const envp[])
|
||||
{
|
||||
register unsigned long __r4 asm("r4") = (unsigned long) filename;
|
||||
register unsigned long __r5 asm("r5") = (unsigned long) argv;
|
||||
|
|
|
@ -19,9 +19,10 @@ asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp,
|
|||
asmlinkage int sys_vfork(unsigned long r4, unsigned long r5,
|
||||
unsigned long r6, unsigned long r7,
|
||||
struct pt_regs __regs);
|
||||
asmlinkage int sys_execve(const char __user *ufilename, char __user * __user *uargv,
|
||||
char __user * __user *uenvp, unsigned long r7,
|
||||
struct pt_regs __regs);
|
||||
asmlinkage int sys_execve(const char __user *ufilename,
|
||||
const char __user *const __user *uargv,
|
||||
const char __user *const __user *uenvp,
|
||||
unsigned long r7, struct pt_regs __regs);
|
||||
asmlinkage int sys_sigsuspend(old_sigset_t mask, unsigned long r5,
|
||||
unsigned long r6, unsigned long r7,
|
||||
struct pt_regs __regs);
|
||||
|
|
|
@ -297,9 +297,9 @@ asmlinkage int sys_vfork(unsigned long r4, unsigned long r5,
|
|||
* sys_execve() executes a new program.
|
||||
*/
|
||||
asmlinkage int sys_execve(const char __user *ufilename,
|
||||
char __user * __user *uargv,
|
||||
char __user * __user *uenvp, unsigned long r7,
|
||||
struct pt_regs __regs)
|
||||
const char __user *const __user *uargv,
|
||||
const char __user *const __user *uenvp,
|
||||
unsigned long r7, struct pt_regs __regs)
|
||||
{
|
||||
struct pt_regs *regs = RELOC_HIDE(&__regs, 0);
|
||||
int error;
|
||||
|
|
|
@ -497,8 +497,8 @@ asmlinkage int sys_execve(const char *ufilename, char **uargv,
|
|||
goto out;
|
||||
|
||||
error = do_execve(filename,
|
||||
(char __user * __user *)uargv,
|
||||
(char __user * __user *)uenvp,
|
||||
(const char __user *const __user *)uargv,
|
||||
(const char __user *const __user *)uenvp,
|
||||
pregs);
|
||||
putname(filename);
|
||||
out:
|
||||
|
|
|
@ -71,7 +71,9 @@ asmlinkage int sys_fadvise64_64_wrapper(int fd, u32 offset0, u32 offset1,
|
|||
* Do a system call from kernel instead of calling sys_execve so we
|
||||
* end up with proper pt_regs.
|
||||
*/
|
||||
int kernel_execve(const char *filename, char *const argv[], char *const envp[])
|
||||
int kernel_execve(const char *filename,
|
||||
const char *const argv[],
|
||||
const char *const envp[])
|
||||
{
|
||||
register long __sc0 __asm__ ("r3") = __NR_execve;
|
||||
register long __sc4 __asm__ ("r4") = (long) filename;
|
||||
|
|
|
@ -33,7 +33,9 @@
|
|||
* Do a system call from kernel instead of calling sys_execve so we
|
||||
* end up with proper pt_regs.
|
||||
*/
|
||||
int kernel_execve(const char *filename, char *const argv[], char *const envp[])
|
||||
int kernel_execve(const char *filename,
|
||||
const char *const argv[],
|
||||
const char *const envp[])
|
||||
{
|
||||
register unsigned long __sc0 __asm__ ("r9") = ((0x13 << 16) | __NR_execve);
|
||||
register unsigned long __sc2 __asm__ ("r2") = (unsigned long) filename;
|
||||
|
|
|
@ -25,9 +25,9 @@ extern void atomic_sub(int, atomic_t *);
|
|||
extern void atomic64_sub(int, atomic64_t *);
|
||||
|
||||
extern int atomic_add_ret(int, atomic_t *);
|
||||
extern int atomic64_add_ret(int, atomic64_t *);
|
||||
extern long atomic64_add_ret(int, atomic64_t *);
|
||||
extern int atomic_sub_ret(int, atomic_t *);
|
||||
extern int atomic64_sub_ret(int, atomic64_t *);
|
||||
extern long atomic64_sub_ret(int, atomic64_t *);
|
||||
|
||||
#define atomic_dec_return(v) atomic_sub_ret(1, v)
|
||||
#define atomic64_dec_return(v) atomic64_sub_ret(1, v)
|
||||
|
@ -91,7 +91,7 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u)
|
|||
((__typeof__((v)->counter))cmpxchg(&((v)->counter), (o), (n)))
|
||||
#define atomic64_xchg(v, new) (xchg(&((v)->counter), new))
|
||||
|
||||
static inline int atomic64_add_unless(atomic64_t *v, long a, long u)
|
||||
static inline long atomic64_add_unless(atomic64_t *v, long a, long u)
|
||||
{
|
||||
long c, old;
|
||||
c = atomic64_read(v);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#ifndef _SPARC_FB_H_
|
||||
#define _SPARC_FB_H_
|
||||
#include <linux/console.h>
|
||||
#include <linux/fb.h>
|
||||
#include <linux/fs.h>
|
||||
#include <asm/page.h>
|
||||
|
@ -18,6 +19,9 @@ static inline int fb_is_primary_device(struct fb_info *info)
|
|||
struct device *dev = info->device;
|
||||
struct device_node *node;
|
||||
|
||||
if (console_set_on_cmdline)
|
||||
return 0;
|
||||
|
||||
node = dev->of_node;
|
||||
if (node &&
|
||||
node == of_console_device)
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#define RWSEM_UNLOCKED_VALUE 0x00000000
|
||||
#define RWSEM_ACTIVE_BIAS 0x00000001
|
||||
#define RWSEM_ACTIVE_MASK 0x0000ffff
|
||||
#define RWSEM_WAITING_BIAS 0xffff0000
|
||||
#define RWSEM_WAITING_BIAS (-0x00010000)
|
||||
#define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BIAS
|
||||
#define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS)
|
||||
|
||||
|
|
|
@ -397,8 +397,11 @@
|
|||
#define __NR_rt_tgsigqueueinfo 326
|
||||
#define __NR_perf_event_open 327
|
||||
#define __NR_recvmmsg 328
|
||||
#define __NR_fanotify_init 329
|
||||
#define __NR_fanotify_mark 330
|
||||
#define __NR_prlimit64 331
|
||||
|
||||
#define NR_syscalls 329
|
||||
#define NR_syscalls 332
|
||||
|
||||
#ifdef __32bit_syscall_numbers__
|
||||
/* Sparc 32-bit only has the "setresuid32", "getresuid32" variants,
|
||||
|
|
|
@ -633,8 +633,10 @@ asmlinkage int sparc_execve(struct pt_regs *regs)
|
|||
if(IS_ERR(filename))
|
||||
goto out;
|
||||
error = do_execve(filename,
|
||||
(char __user * __user *)regs->u_regs[base + UREG_I1],
|
||||
(char __user * __user *)regs->u_regs[base + UREG_I2],
|
||||
(const char __user *const __user *)
|
||||
regs->u_regs[base + UREG_I1],
|
||||
(const char __user *const __user *)
|
||||
regs->u_regs[base + UREG_I2],
|
||||
regs);
|
||||
putname(filename);
|
||||
out:
|
||||
|
|
|
@ -739,9 +739,9 @@ asmlinkage int sparc_execve(struct pt_regs *regs)
|
|||
if (IS_ERR(filename))
|
||||
goto out;
|
||||
error = do_execve(filename,
|
||||
(char __user * __user *)
|
||||
(const char __user *const __user *)
|
||||
regs->u_regs[base + UREG_I1],
|
||||
(char __user * __user *)
|
||||
(const char __user *const __user *)
|
||||
regs->u_regs[base + UREG_I2], regs);
|
||||
putname(filename);
|
||||
if (!error) {
|
||||
|
|
|
@ -330,6 +330,15 @@ do_sys_accept4: /* sys_accept4(int, struct sockaddr *, int *, int) */
|
|||
nop
|
||||
nop
|
||||
|
||||
.globl sys32_fanotify_mark
|
||||
sys32_fanotify_mark:
|
||||
sethi %hi(sys_fanotify_mark), %g1
|
||||
sllx %o2, 32, %o2
|
||||
or %o2, %o3, %o2
|
||||
mov %o4, %o3
|
||||
jmpl %g1 + %lo(sys_fanotify_mark), %g0
|
||||
mov %o5, %o4
|
||||
|
||||
.section __ex_table,"a"
|
||||
.align 4
|
||||
.word 1b, __retl_efault, 2b, __retl_efault
|
||||
|
|
|
@ -282,7 +282,9 @@ out:
|
|||
* Do a system call from kernel instead of calling sys_execve so we
|
||||
* end up with proper pt_regs.
|
||||
*/
|
||||
int kernel_execve(const char *filename, char *const argv[], char *const envp[])
|
||||
int kernel_execve(const char *filename,
|
||||
const char *const argv[],
|
||||
const char *const envp[])
|
||||
{
|
||||
long __res;
|
||||
register long __g1 __asm__ ("g1") = __NR_execve;
|
||||
|
|
|
@ -758,7 +758,9 @@ SYSCALL_DEFINE5(rt_sigaction, int, sig, const struct sigaction __user *, act,
|
|||
* Do a system call from kernel instead of calling sys_execve so we
|
||||
* end up with proper pt_regs.
|
||||
*/
|
||||
int kernel_execve(const char *filename, char *const argv[], char *const envp[])
|
||||
int kernel_execve(const char *filename,
|
||||
const char *const argv[],
|
||||
const char *const envp[])
|
||||
{
|
||||
long __res;
|
||||
register long __g1 __asm__ ("g1") = __NR_execve;
|
||||
|
|
|
@ -82,5 +82,6 @@ sys_call_table:
|
|||
/*310*/ .long sys_utimensat, sys_signalfd, sys_timerfd_create, sys_eventfd, sys_fallocate
|
||||
/*315*/ .long sys_timerfd_settime, sys_timerfd_gettime, sys_signalfd4, sys_eventfd2, sys_epoll_create1
|
||||
/*320*/ .long sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv
|
||||
/*325*/ .long sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg
|
||||
/*325*/ .long sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init
|
||||
/*330*/ .long sys_fanotify_mark, sys_prlimit64
|
||||
|
||||
|
|
|
@ -83,7 +83,8 @@ sys_call_table32:
|
|||
/*310*/ .word compat_sys_utimensat, compat_sys_signalfd, sys_timerfd_create, sys_eventfd, compat_sys_fallocate
|
||||
.word compat_sys_timerfd_settime, compat_sys_timerfd_gettime, compat_sys_signalfd4, sys_eventfd2, sys_epoll_create1
|
||||
/*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, compat_sys_preadv
|
||||
.word compat_sys_pwritev, compat_sys_rt_tgsigqueueinfo, sys_perf_event_open, compat_sys_recvmmsg
|
||||
.word compat_sys_pwritev, compat_sys_rt_tgsigqueueinfo, sys_perf_event_open, compat_sys_recvmmsg, sys_fanotify_init
|
||||
/*330*/ .word sys32_fanotify_mark, sys_prlimit64
|
||||
|
||||
#endif /* CONFIG_COMPAT */
|
||||
|
||||
|
@ -158,4 +159,5 @@ sys_call_table:
|
|||
/*310*/ .word sys_utimensat, sys_signalfd, sys_timerfd_create, sys_eventfd, sys_fallocate
|
||||
.word sys_timerfd_settime, sys_timerfd_gettime, sys_signalfd4, sys_eventfd2, sys_epoll_create1
|
||||
/*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv
|
||||
.word sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg
|
||||
.word sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init
|
||||
/*330*/ .word sys_fanotify_mark, sys_prlimit64
|
||||
|
|
|
@ -543,8 +543,9 @@ long _sys_vfork(struct pt_regs *regs)
|
|||
/*
|
||||
* sys_execve() executes a new program.
|
||||
*/
|
||||
long _sys_execve(char __user *path, char __user *__user *argv,
|
||||
char __user *__user *envp, struct pt_regs *regs)
|
||||
long _sys_execve(const char __user *path,
|
||||
const char __user *const __user *argv,
|
||||
const char __user *const __user *envp, struct pt_regs *regs)
|
||||
{
|
||||
long error;
|
||||
char *filename;
|
||||
|
|
|
@ -44,8 +44,9 @@ void start_thread(struct pt_regs *regs, unsigned long eip, unsigned long esp)
|
|||
PT_REGS_SP(regs) = esp;
|
||||
}
|
||||
|
||||
static long execve1(const char *file, char __user * __user *argv,
|
||||
char __user *__user *env)
|
||||
static long execve1(const char *file,
|
||||
const char __user *const __user *argv,
|
||||
const char __user *const __user *env)
|
||||
{
|
||||
long error;
|
||||
|
||||
|
|
|
@ -51,7 +51,9 @@ long old_mmap(unsigned long addr, unsigned long len,
|
|||
return err;
|
||||
}
|
||||
|
||||
int kernel_execve(const char *filename, char *const argv[], char *const envp[])
|
||||
int kernel_execve(const char *filename,
|
||||
const char *const argv[],
|
||||
const char *const envp[])
|
||||
{
|
||||
mm_segment_t fs;
|
||||
int ret;
|
||||
|
|
|
@ -23,8 +23,9 @@ long sys_iopl(unsigned int, struct pt_regs *);
|
|||
/* kernel/process.c */
|
||||
int sys_fork(struct pt_regs *);
|
||||
int sys_vfork(struct pt_regs *);
|
||||
long sys_execve(const char __user *, char __user * __user *,
|
||||
char __user * __user *, struct pt_regs *);
|
||||
long sys_execve(const char __user *,
|
||||
const char __user *const __user *,
|
||||
const char __user *const __user *, struct pt_regs *);
|
||||
long sys_clone(unsigned long, unsigned long, void __user *,
|
||||
void __user *, struct pt_regs *);
|
||||
|
||||
|
|
|
@ -194,7 +194,7 @@ static struct hw_breakpoint {
|
|||
unsigned long addr;
|
||||
int len;
|
||||
int type;
|
||||
struct perf_event **pev;
|
||||
struct perf_event * __percpu *pev;
|
||||
} breakinfo[HBP_NUM];
|
||||
|
||||
static unsigned long early_dr7;
|
||||
|
|
|
@ -301,8 +301,9 @@ EXPORT_SYMBOL(kernel_thread);
|
|||
/*
|
||||
* sys_execve() executes a new program.
|
||||
*/
|
||||
long sys_execve(const char __user *name, char __user * __user *argv,
|
||||
char __user * __user *envp, struct pt_regs *regs)
|
||||
long sys_execve(const char __user *name,
|
||||
const char __user *const __user *argv,
|
||||
const char __user *const __user *envp, struct pt_regs *regs)
|
||||
{
|
||||
long error;
|
||||
char *filename;
|
||||
|
|
|
@ -28,7 +28,9 @@
|
|||
* Do a system call from kernel instead of calling sys_execve so we
|
||||
* end up with proper pt_regs.
|
||||
*/
|
||||
int kernel_execve(const char *filename, char *const argv[], char *const envp[])
|
||||
int kernel_execve(const char *filename,
|
||||
const char *const argv[],
|
||||
const char *const envp[])
|
||||
{
|
||||
long __res;
|
||||
asm volatile ("push %%ebx ; movl %2,%%ebx ; int $0x80 ; pop %%ebx"
|
||||
|
|
|
@ -318,8 +318,9 @@ long xtensa_clone(unsigned long clone_flags, unsigned long newsp,
|
|||
*/
|
||||
|
||||
asmlinkage
|
||||
long xtensa_execve(const char __user *name, char __user * __user *argv,
|
||||
char __user * __user *envp,
|
||||
long xtensa_execve(const char __user *name,
|
||||
const char __user *const __user *argv,
|
||||
const char __user *const __user *envp,
|
||||
long a3, long a4, long a5,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
|
|
|
@ -1588,7 +1588,7 @@ static const struct ata_port_info sata_dwc_port_info[] = {
|
|||
},
|
||||
};
|
||||
|
||||
static int sata_dwc_probe(struct of_device *ofdev,
|
||||
static int sata_dwc_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct sata_dwc_device *hsdev;
|
||||
|
@ -1702,7 +1702,7 @@ error_out:
|
|||
return err;
|
||||
}
|
||||
|
||||
static int sata_dwc_remove(struct of_device *ofdev)
|
||||
static int sata_dwc_remove(struct platform_device *ofdev)
|
||||
{
|
||||
struct device *dev = &ofdev->dev;
|
||||
struct ata_host *host = dev_get_drvdata(dev);
|
||||
|
|
|
@ -94,6 +94,7 @@
|
|||
#include <linux/hdreg.h>
|
||||
#include <linux/platform_device.h>
|
||||
#if defined(CONFIG_OF)
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/of_platform.h>
|
||||
#endif
|
||||
|
|
|
@ -675,8 +675,8 @@ static int ptmx_open(struct inode *inode, struct file *filp)
|
|||
}
|
||||
|
||||
set_bit(TTY_PTY_LOCK, &tty->flags); /* LOCK THE SLAVE */
|
||||
filp->private_data = tty;
|
||||
file_move(filp, &tty->tty_files);
|
||||
|
||||
tty_add_file(tty, filp);
|
||||
|
||||
retval = devpts_pty_new(inode, tty->link);
|
||||
if (retval)
|
||||
|
|
|
@ -136,6 +136,9 @@ LIST_HEAD(tty_drivers); /* linked list of tty drivers */
|
|||
DEFINE_MUTEX(tty_mutex);
|
||||
EXPORT_SYMBOL(tty_mutex);
|
||||
|
||||
/* Spinlock to protect the tty->tty_files list */
|
||||
DEFINE_SPINLOCK(tty_files_lock);
|
||||
|
||||
static ssize_t tty_read(struct file *, char __user *, size_t, loff_t *);
|
||||
static ssize_t tty_write(struct file *, const char __user *, size_t, loff_t *);
|
||||
ssize_t redirected_tty_write(struct file *, const char __user *,
|
||||
|
@ -185,6 +188,41 @@ void free_tty_struct(struct tty_struct *tty)
|
|||
kfree(tty);
|
||||
}
|
||||
|
||||
static inline struct tty_struct *file_tty(struct file *file)
|
||||
{
|
||||
return ((struct tty_file_private *)file->private_data)->tty;
|
||||
}
|
||||
|
||||
/* Associate a new file with the tty structure */
|
||||
void tty_add_file(struct tty_struct *tty, struct file *file)
|
||||
{
|
||||
struct tty_file_private *priv;
|
||||
|
||||
/* XXX: must implement proper error handling in callers */
|
||||
priv = kmalloc(sizeof(*priv), GFP_KERNEL|__GFP_NOFAIL);
|
||||
|
||||
priv->tty = tty;
|
||||
priv->file = file;
|
||||
file->private_data = priv;
|
||||
|
||||
spin_lock(&tty_files_lock);
|
||||
list_add(&priv->list, &tty->tty_files);
|
||||
spin_unlock(&tty_files_lock);
|
||||
}
|
||||
|
||||
/* Delete file from its tty */
|
||||
void tty_del_file(struct file *file)
|
||||
{
|
||||
struct tty_file_private *priv = file->private_data;
|
||||
|
||||
spin_lock(&tty_files_lock);
|
||||
list_del(&priv->list);
|
||||
spin_unlock(&tty_files_lock);
|
||||
file->private_data = NULL;
|
||||
kfree(priv);
|
||||
}
|
||||
|
||||
|
||||
#define TTY_NUMBER(tty) ((tty)->index + (tty)->driver->name_base)
|
||||
|
||||
/**
|
||||
|
@ -235,11 +273,11 @@ static int check_tty_count(struct tty_struct *tty, const char *routine)
|
|||
struct list_head *p;
|
||||
int count = 0;
|
||||
|
||||
file_list_lock();
|
||||
spin_lock(&tty_files_lock);
|
||||
list_for_each(p, &tty->tty_files) {
|
||||
count++;
|
||||
}
|
||||
file_list_unlock();
|
||||
spin_unlock(&tty_files_lock);
|
||||
if (tty->driver->type == TTY_DRIVER_TYPE_PTY &&
|
||||
tty->driver->subtype == PTY_TYPE_SLAVE &&
|
||||
tty->link && tty->link->count)
|
||||
|
@ -497,6 +535,7 @@ void __tty_hangup(struct tty_struct *tty)
|
|||
struct file *cons_filp = NULL;
|
||||
struct file *filp, *f = NULL;
|
||||
struct task_struct *p;
|
||||
struct tty_file_private *priv;
|
||||
int closecount = 0, n;
|
||||
unsigned long flags;
|
||||
int refs = 0;
|
||||
|
@ -506,7 +545,7 @@ void __tty_hangup(struct tty_struct *tty)
|
|||
|
||||
|
||||
spin_lock(&redirect_lock);
|
||||
if (redirect && redirect->private_data == tty) {
|
||||
if (redirect && file_tty(redirect) == tty) {
|
||||
f = redirect;
|
||||
redirect = NULL;
|
||||
}
|
||||
|
@ -519,9 +558,10 @@ void __tty_hangup(struct tty_struct *tty)
|
|||
workqueue with the lock held */
|
||||
check_tty_count(tty, "tty_hangup");
|
||||
|
||||
file_list_lock();
|
||||
spin_lock(&tty_files_lock);
|
||||
/* This breaks for file handles being sent over AF_UNIX sockets ? */
|
||||
list_for_each_entry(filp, &tty->tty_files, f_u.fu_list) {
|
||||
list_for_each_entry(priv, &tty->tty_files, list) {
|
||||
filp = priv->file;
|
||||
if (filp->f_op->write == redirected_tty_write)
|
||||
cons_filp = filp;
|
||||
if (filp->f_op->write != tty_write)
|
||||
|
@ -530,7 +570,7 @@ void __tty_hangup(struct tty_struct *tty)
|
|||
__tty_fasync(-1, filp, 0); /* can't block */
|
||||
filp->f_op = &hung_up_tty_fops;
|
||||
}
|
||||
file_list_unlock();
|
||||
spin_unlock(&tty_files_lock);
|
||||
|
||||
tty_ldisc_hangup(tty);
|
||||
|
||||
|
@ -889,12 +929,10 @@ static ssize_t tty_read(struct file *file, char __user *buf, size_t count,
|
|||
loff_t *ppos)
|
||||
{
|
||||
int i;
|
||||
struct tty_struct *tty;
|
||||
struct inode *inode;
|
||||
struct inode *inode = file->f_path.dentry->d_inode;
|
||||
struct tty_struct *tty = file_tty(file);
|
||||
struct tty_ldisc *ld;
|
||||
|
||||
tty = file->private_data;
|
||||
inode = file->f_path.dentry->d_inode;
|
||||
if (tty_paranoia_check(tty, inode, "tty_read"))
|
||||
return -EIO;
|
||||
if (!tty || (test_bit(TTY_IO_ERROR, &tty->flags)))
|
||||
|
@ -1065,12 +1103,11 @@ void tty_write_message(struct tty_struct *tty, char *msg)
|
|||
static ssize_t tty_write(struct file *file, const char __user *buf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
struct tty_struct *tty;
|
||||
struct inode *inode = file->f_path.dentry->d_inode;
|
||||
ssize_t ret;
|
||||
struct tty_struct *tty = file_tty(file);
|
||||
struct tty_ldisc *ld;
|
||||
ssize_t ret;
|
||||
|
||||
tty = file->private_data;
|
||||
if (tty_paranoia_check(tty, inode, "tty_write"))
|
||||
return -EIO;
|
||||
if (!tty || !tty->ops->write ||
|
||||
|
@ -1424,9 +1461,9 @@ static void release_one_tty(struct work_struct *work)
|
|||
tty_driver_kref_put(driver);
|
||||
module_put(driver->owner);
|
||||
|
||||
file_list_lock();
|
||||
spin_lock(&tty_files_lock);
|
||||
list_del_init(&tty->tty_files);
|
||||
file_list_unlock();
|
||||
spin_unlock(&tty_files_lock);
|
||||
|
||||
put_pid(tty->pgrp);
|
||||
put_pid(tty->session);
|
||||
|
@ -1507,13 +1544,13 @@ static void release_tty(struct tty_struct *tty, int idx)
|
|||
|
||||
int tty_release(struct inode *inode, struct file *filp)
|
||||
{
|
||||
struct tty_struct *tty, *o_tty;
|
||||
struct tty_struct *tty = file_tty(filp);
|
||||
struct tty_struct *o_tty;
|
||||
int pty_master, tty_closing, o_tty_closing, do_sleep;
|
||||
int devpts;
|
||||
int idx;
|
||||
char buf[64];
|
||||
|
||||
tty = filp->private_data;
|
||||
if (tty_paranoia_check(tty, inode, "tty_release_dev"))
|
||||
return 0;
|
||||
|
||||
|
@ -1671,8 +1708,7 @@ int tty_release(struct inode *inode, struct file *filp)
|
|||
* - do_tty_hangup no longer sees this file descriptor as
|
||||
* something that needs to be handled for hangups.
|
||||
*/
|
||||
file_kill(filp);
|
||||
filp->private_data = NULL;
|
||||
tty_del_file(filp);
|
||||
|
||||
/*
|
||||
* Perform some housekeeping before deciding whether to return.
|
||||
|
@ -1839,8 +1875,8 @@ got_driver:
|
|||
return PTR_ERR(tty);
|
||||
}
|
||||
|
||||
filp->private_data = tty;
|
||||
file_move(filp, &tty->tty_files);
|
||||
tty_add_file(tty, filp);
|
||||
|
||||
check_tty_count(tty, "tty_open");
|
||||
if (tty->driver->type == TTY_DRIVER_TYPE_PTY &&
|
||||
tty->driver->subtype == PTY_TYPE_MASTER)
|
||||
|
@ -1916,11 +1952,10 @@ got_driver:
|
|||
|
||||
static unsigned int tty_poll(struct file *filp, poll_table *wait)
|
||||
{
|
||||
struct tty_struct *tty;
|
||||
struct tty_struct *tty = file_tty(filp);
|
||||
struct tty_ldisc *ld;
|
||||
int ret = 0;
|
||||
|
||||
tty = filp->private_data;
|
||||
if (tty_paranoia_check(tty, filp->f_path.dentry->d_inode, "tty_poll"))
|
||||
return 0;
|
||||
|
||||
|
@ -1933,11 +1968,10 @@ static unsigned int tty_poll(struct file *filp, poll_table *wait)
|
|||
|
||||
static int __tty_fasync(int fd, struct file *filp, int on)
|
||||
{
|
||||
struct tty_struct *tty;
|
||||
struct tty_struct *tty = file_tty(filp);
|
||||
unsigned long flags;
|
||||
int retval = 0;
|
||||
|
||||
tty = filp->private_data;
|
||||
if (tty_paranoia_check(tty, filp->f_path.dentry->d_inode, "tty_fasync"))
|
||||
goto out;
|
||||
|
||||
|
@ -2491,13 +2525,13 @@ EXPORT_SYMBOL(tty_pair_get_pty);
|
|||
*/
|
||||
long tty_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
struct tty_struct *tty, *real_tty;
|
||||
struct tty_struct *tty = file_tty(file);
|
||||
struct tty_struct *real_tty;
|
||||
void __user *p = (void __user *)arg;
|
||||
int retval;
|
||||
struct tty_ldisc *ld;
|
||||
struct inode *inode = file->f_dentry->d_inode;
|
||||
|
||||
tty = file->private_data;
|
||||
if (tty_paranoia_check(tty, inode, "tty_ioctl"))
|
||||
return -EINVAL;
|
||||
|
||||
|
@ -2619,7 +2653,7 @@ static long tty_compat_ioctl(struct file *file, unsigned int cmd,
|
|||
unsigned long arg)
|
||||
{
|
||||
struct inode *inode = file->f_dentry->d_inode;
|
||||
struct tty_struct *tty = file->private_data;
|
||||
struct tty_struct *tty = file_tty(file);
|
||||
struct tty_ldisc *ld;
|
||||
int retval = -ENOIOCTLCMD;
|
||||
|
||||
|
@ -2711,7 +2745,7 @@ void __do_SAK(struct tty_struct *tty)
|
|||
if (!filp)
|
||||
continue;
|
||||
if (filp->f_op->read == tty_read &&
|
||||
filp->private_data == tty) {
|
||||
file_tty(filp) == tty) {
|
||||
printk(KERN_NOTICE "SAK: killed process %d"
|
||||
" (%s): fd#%d opened to the tty\n",
|
||||
task_pid_nr(p), p->comm, i);
|
||||
|
|
|
@ -194,10 +194,11 @@ static DECLARE_WORK(console_work, console_callback);
|
|||
int fg_console;
|
||||
int last_console;
|
||||
int want_console = -1;
|
||||
int saved_fg_console;
|
||||
int saved_last_console;
|
||||
int saved_want_console;
|
||||
int saved_vc_mode;
|
||||
static int saved_fg_console;
|
||||
static int saved_last_console;
|
||||
static int saved_want_console;
|
||||
static int saved_vc_mode;
|
||||
static int saved_console_blanked;
|
||||
|
||||
/*
|
||||
* For each existing display, we have a pointer to console currently visible
|
||||
|
@ -3449,6 +3450,7 @@ int con_debug_enter(struct vc_data *vc)
|
|||
saved_last_console = last_console;
|
||||
saved_want_console = want_console;
|
||||
saved_vc_mode = vc->vc_mode;
|
||||
saved_console_blanked = console_blanked;
|
||||
vc->vc_mode = KD_TEXT;
|
||||
console_blanked = 0;
|
||||
if (vc->vc_sw->con_debug_enter)
|
||||
|
@ -3492,6 +3494,7 @@ int con_debug_leave(void)
|
|||
fg_console = saved_fg_console;
|
||||
last_console = saved_last_console;
|
||||
want_console = saved_want_console;
|
||||
console_blanked = saved_console_blanked;
|
||||
vc_cons[fg_console].d->vc_mode = saved_vc_mode;
|
||||
|
||||
vc = vc_cons[fg_console].d;
|
||||
|
|
|
@ -94,6 +94,7 @@
|
|||
|
||||
#ifdef CONFIG_OF
|
||||
/* For open firmware. */
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/of_platform.h>
|
||||
#endif
|
||||
|
|
|
@ -1299,6 +1299,7 @@ static const struct hid_device_id hid_blacklist[] = {
|
|||
{ HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0006) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH1) },
|
||||
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_BM084) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_EZKEY, USB_DEVICE_ID_BTC_8193) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR) },
|
||||
|
|
|
@ -159,6 +159,13 @@ static int egalax_event(struct hid_device *hid, struct hid_field *field,
|
|||
{
|
||||
struct egalax_data *td = hid_get_drvdata(hid);
|
||||
|
||||
/* Note, eGalax has two product lines: the first is resistive and
|
||||
* uses a standard parallel multitouch protocol (product ID ==
|
||||
* 48xx). The second is capacitive and uses an unusual "serial"
|
||||
* protocol with a different message for each multitouch finger
|
||||
* (product ID == 72xx). We do not yet generate a correct event
|
||||
* sequence for the capacitive/serial protocol.
|
||||
*/
|
||||
if (hid->claimed & HID_CLAIMED_INPUT) {
|
||||
struct input_dev *input = field->hidinput->input;
|
||||
|
||||
|
@ -246,6 +253,8 @@ static void egalax_remove(struct hid_device *hdev)
|
|||
static const struct hid_device_id egalax_devices[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
|
||||
USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
|
||||
USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH1) },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(hid, egalax_devices);
|
||||
|
|
|
@ -188,6 +188,7 @@
|
|||
#define USB_VENDOR_ID_DWAV 0x0eef
|
||||
#define USB_DEVICE_ID_EGALAX_TOUCHCONTROLLER 0x0001
|
||||
#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH 0x480d
|
||||
#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH1 0x720c
|
||||
|
||||
#define USB_VENDOR_ID_ELECOM 0x056e
|
||||
#define USB_DEVICE_ID_ELECOM_BM084 0x0061
|
||||
|
|
|
@ -547,11 +547,11 @@ static void picolcd_fb_destroy(struct fb_info *info)
|
|||
ref_cnt--;
|
||||
mutex_lock(&info->lock);
|
||||
(*ref_cnt)--;
|
||||
may_release = !ref_cnt;
|
||||
may_release = !*ref_cnt;
|
||||
mutex_unlock(&info->lock);
|
||||
if (may_release) {
|
||||
framebuffer_release(info);
|
||||
vfree((u8 *)info->fix.smem_start);
|
||||
framebuffer_release(info);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -266,13 +266,15 @@ static int hiddev_open(struct inode *inode, struct file *file)
|
|||
{
|
||||
struct hiddev_list *list;
|
||||
struct usb_interface *intf;
|
||||
struct hid_device *hid;
|
||||
struct hiddev *hiddev;
|
||||
int res;
|
||||
|
||||
intf = usb_find_interface(&hiddev_driver, iminor(inode));
|
||||
if (!intf)
|
||||
return -ENODEV;
|
||||
hiddev = usb_get_intfdata(intf);
|
||||
hid = usb_get_intfdata(intf);
|
||||
hiddev = hid->hiddev;
|
||||
|
||||
if (!(list = kzalloc(sizeof(struct hiddev_list), GFP_KERNEL)))
|
||||
return -ENOMEM;
|
||||
|
@ -587,7 +589,7 @@ static long hiddev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
|||
struct hiddev_list *list = file->private_data;
|
||||
struct hiddev *hiddev = list->hiddev;
|
||||
struct hid_device *hid = hiddev->hid;
|
||||
struct usb_device *dev = hid_to_usb_dev(hid);
|
||||
struct usb_device *dev;
|
||||
struct hiddev_collection_info cinfo;
|
||||
struct hiddev_report_info rinfo;
|
||||
struct hiddev_field_info finfo;
|
||||
|
@ -601,9 +603,11 @@ static long hiddev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
|||
/* Called without BKL by compat methods so no BKL taken */
|
||||
|
||||
/* FIXME: Who or what stop this racing with a disconnect ?? */
|
||||
if (!hiddev->exist)
|
||||
if (!hiddev->exist || !hid)
|
||||
return -EIO;
|
||||
|
||||
dev = hid_to_usb_dev(hid);
|
||||
|
||||
switch (cmd) {
|
||||
|
||||
case HIDIOCGVERSION:
|
||||
|
@ -888,7 +892,6 @@ int hiddev_connect(struct hid_device *hid, unsigned int force)
|
|||
hid->hiddev = hiddev;
|
||||
hiddev->hid = hid;
|
||||
hiddev->exist = 1;
|
||||
usb_set_intfdata(usbhid->intf, usbhid);
|
||||
retval = usb_register_dev(usbhid->intf, &hiddev_class);
|
||||
if (retval) {
|
||||
err_hid("Not able to get a minor for this device.");
|
||||
|
|
|
@ -2136,16 +2136,6 @@ static void sync_sbs(mddev_t * mddev, int nospares)
|
|||
* with the rest of the array)
|
||||
*/
|
||||
mdk_rdev_t *rdev;
|
||||
|
||||
/* First make sure individual recovery_offsets are correct */
|
||||
list_for_each_entry(rdev, &mddev->disks, same_set) {
|
||||
if (rdev->raid_disk >= 0 &&
|
||||
mddev->delta_disks >= 0 &&
|
||||
!test_bit(In_sync, &rdev->flags) &&
|
||||
mddev->curr_resync_completed > rdev->recovery_offset)
|
||||
rdev->recovery_offset = mddev->curr_resync_completed;
|
||||
|
||||
}
|
||||
list_for_each_entry(rdev, &mddev->disks, same_set) {
|
||||
if (rdev->sb_events == mddev->events ||
|
||||
(nospares &&
|
||||
|
@ -2167,12 +2157,27 @@ static void md_update_sb(mddev_t * mddev, int force_change)
|
|||
int sync_req;
|
||||
int nospares = 0;
|
||||
|
||||
mddev->utime = get_seconds();
|
||||
if (mddev->external)
|
||||
return;
|
||||
repeat:
|
||||
/* First make sure individual recovery_offsets are correct */
|
||||
list_for_each_entry(rdev, &mddev->disks, same_set) {
|
||||
if (rdev->raid_disk >= 0 &&
|
||||
mddev->delta_disks >= 0 &&
|
||||
!test_bit(In_sync, &rdev->flags) &&
|
||||
mddev->curr_resync_completed > rdev->recovery_offset)
|
||||
rdev->recovery_offset = mddev->curr_resync_completed;
|
||||
|
||||
}
|
||||
if (mddev->external || !mddev->persistent) {
|
||||
clear_bit(MD_CHANGE_DEVS, &mddev->flags);
|
||||
clear_bit(MD_CHANGE_CLEAN, &mddev->flags);
|
||||
wake_up(&mddev->sb_wait);
|
||||
return;
|
||||
}
|
||||
|
||||
spin_lock_irq(&mddev->write_lock);
|
||||
|
||||
mddev->utime = get_seconds();
|
||||
|
||||
set_bit(MD_CHANGE_PENDING, &mddev->flags);
|
||||
if (test_and_clear_bit(MD_CHANGE_DEVS, &mddev->flags))
|
||||
force_change = 1;
|
||||
|
@ -2221,19 +2226,6 @@ repeat:
|
|||
MD_BUG();
|
||||
mddev->events --;
|
||||
}
|
||||
|
||||
/*
|
||||
* do not write anything to disk if using
|
||||
* nonpersistent superblocks
|
||||
*/
|
||||
if (!mddev->persistent) {
|
||||
if (!mddev->external)
|
||||
clear_bit(MD_CHANGE_PENDING, &mddev->flags);
|
||||
|
||||
spin_unlock_irq(&mddev->write_lock);
|
||||
wake_up(&mddev->sb_wait);
|
||||
return;
|
||||
}
|
||||
sync_sbs(mddev, nospares);
|
||||
spin_unlock_irq(&mddev->write_lock);
|
||||
|
||||
|
|
|
@ -787,8 +787,8 @@ static int make_request(mddev_t *mddev, struct bio * bio)
|
|||
struct bio_list bl;
|
||||
struct page **behind_pages = NULL;
|
||||
const int rw = bio_data_dir(bio);
|
||||
const bool do_sync = (bio->bi_rw & REQ_SYNC);
|
||||
bool do_barriers;
|
||||
const unsigned long do_sync = (bio->bi_rw & REQ_SYNC);
|
||||
unsigned long do_barriers;
|
||||
mdk_rdev_t *blocked_rdev;
|
||||
|
||||
/*
|
||||
|
@ -1120,6 +1120,8 @@ static int raid1_spare_active(mddev_t *mddev)
|
|||
{
|
||||
int i;
|
||||
conf_t *conf = mddev->private;
|
||||
int count = 0;
|
||||
unsigned long flags;
|
||||
|
||||
/*
|
||||
* Find all failed disks within the RAID1 configuration
|
||||
|
@ -1131,15 +1133,16 @@ static int raid1_spare_active(mddev_t *mddev)
|
|||
if (rdev
|
||||
&& !test_bit(Faulty, &rdev->flags)
|
||||
&& !test_and_set_bit(In_sync, &rdev->flags)) {
|
||||
unsigned long flags;
|
||||
count++;
|
||||
sysfs_notify_dirent(rdev->sysfs_state);
|
||||
}
|
||||
}
|
||||
spin_lock_irqsave(&conf->device_lock, flags);
|
||||
mddev->degraded--;
|
||||
mddev->degraded -= count;
|
||||
spin_unlock_irqrestore(&conf->device_lock, flags);
|
||||
}
|
||||
}
|
||||
|
||||
print_conf(conf);
|
||||
return 0;
|
||||
return count;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1640,7 +1643,7 @@ static void raid1d(mddev_t *mddev)
|
|||
* We already have a nr_pending reference on these rdevs.
|
||||
*/
|
||||
int i;
|
||||
const bool do_sync = (r1_bio->master_bio->bi_rw & REQ_SYNC);
|
||||
const unsigned long do_sync = (r1_bio->master_bio->bi_rw & REQ_SYNC);
|
||||
clear_bit(R1BIO_BarrierRetry, &r1_bio->state);
|
||||
clear_bit(R1BIO_Barrier, &r1_bio->state);
|
||||
for (i=0; i < conf->raid_disks; i++)
|
||||
|
@ -1696,7 +1699,7 @@ static void raid1d(mddev_t *mddev)
|
|||
(unsigned long long)r1_bio->sector);
|
||||
raid_end_bio_io(r1_bio);
|
||||
} else {
|
||||
const bool do_sync = r1_bio->master_bio->bi_rw & REQ_SYNC;
|
||||
const unsigned long do_sync = r1_bio->master_bio->bi_rw & REQ_SYNC;
|
||||
r1_bio->bios[r1_bio->read_disk] =
|
||||
mddev->ro ? IO_BLOCKED : NULL;
|
||||
r1_bio->read_disk = disk;
|
||||
|
|
|
@ -799,7 +799,7 @@ static int make_request(mddev_t *mddev, struct bio * bio)
|
|||
int i;
|
||||
int chunk_sects = conf->chunk_mask + 1;
|
||||
const int rw = bio_data_dir(bio);
|
||||
const bool do_sync = (bio->bi_rw & REQ_SYNC);
|
||||
const unsigned long do_sync = (bio->bi_rw & REQ_SYNC);
|
||||
struct bio_list bl;
|
||||
unsigned long flags;
|
||||
mdk_rdev_t *blocked_rdev;
|
||||
|
@ -1116,6 +1116,8 @@ static int raid10_spare_active(mddev_t *mddev)
|
|||
int i;
|
||||
conf_t *conf = mddev->private;
|
||||
mirror_info_t *tmp;
|
||||
int count = 0;
|
||||
unsigned long flags;
|
||||
|
||||
/*
|
||||
* Find all non-in_sync disks within the RAID10 configuration
|
||||
|
@ -1126,15 +1128,16 @@ static int raid10_spare_active(mddev_t *mddev)
|
|||
if (tmp->rdev
|
||||
&& !test_bit(Faulty, &tmp->rdev->flags)
|
||||
&& !test_and_set_bit(In_sync, &tmp->rdev->flags)) {
|
||||
unsigned long flags;
|
||||
count++;
|
||||
sysfs_notify_dirent(tmp->rdev->sysfs_state);
|
||||
}
|
||||
}
|
||||
spin_lock_irqsave(&conf->device_lock, flags);
|
||||
mddev->degraded--;
|
||||
mddev->degraded -= count;
|
||||
spin_unlock_irqrestore(&conf->device_lock, flags);
|
||||
}
|
||||
}
|
||||
|
||||
print_conf(conf);
|
||||
return 0;
|
||||
return count;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1734,7 +1737,7 @@ static void raid10d(mddev_t *mddev)
|
|||
raid_end_bio_io(r10_bio);
|
||||
bio_put(bio);
|
||||
} else {
|
||||
const bool do_sync = (r10_bio->master_bio->bi_rw & REQ_SYNC);
|
||||
const unsigned long do_sync = (r10_bio->master_bio->bi_rw & REQ_SYNC);
|
||||
bio_put(bio);
|
||||
rdev = conf->mirrors[mirror].rdev;
|
||||
if (printk_ratelimit())
|
||||
|
|
|
@ -5330,6 +5330,8 @@ static int raid5_spare_active(mddev_t *mddev)
|
|||
int i;
|
||||
raid5_conf_t *conf = mddev->private;
|
||||
struct disk_info *tmp;
|
||||
int count = 0;
|
||||
unsigned long flags;
|
||||
|
||||
for (i = 0; i < conf->raid_disks; i++) {
|
||||
tmp = conf->disks + i;
|
||||
|
@ -5337,14 +5339,15 @@ static int raid5_spare_active(mddev_t *mddev)
|
|||
&& tmp->rdev->recovery_offset == MaxSector
|
||||
&& !test_bit(Faulty, &tmp->rdev->flags)
|
||||
&& !test_and_set_bit(In_sync, &tmp->rdev->flags)) {
|
||||
unsigned long flags;
|
||||
count++;
|
||||
sysfs_notify_dirent(tmp->rdev->sysfs_state);
|
||||
}
|
||||
}
|
||||
spin_lock_irqsave(&conf->device_lock, flags);
|
||||
mddev->degraded--;
|
||||
mddev->degraded -= count;
|
||||
spin_unlock_irqrestore(&conf->device_lock, flags);
|
||||
}
|
||||
}
|
||||
print_raid5_conf(conf);
|
||||
return 0;
|
||||
return count;
|
||||
}
|
||||
|
||||
static int raid5_remove_disk(mddev_t *mddev, int number)
|
||||
|
|
|
@ -86,7 +86,9 @@ struct mmc_host *mmc_alloc_host(int extra, struct device *dev)
|
|||
init_waitqueue_head(&host->wq);
|
||||
INIT_DELAYED_WORK(&host->detect, mmc_rescan);
|
||||
INIT_DELAYED_WORK_DEFERRABLE(&host->disable, mmc_host_deeper_disable);
|
||||
#ifdef CONFIG_PM
|
||||
host->pm_notify.notifier_call = mmc_pm_notify;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* By default, hosts do not support SGIO or large requests.
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include <linux/mtd/partitions.h>
|
||||
#include <linux/mtd/concat.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
#include <linux/netdevice.h>
|
||||
#include <linux/cache.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/pci-aspm.h>
|
||||
#include <linux/ethtool.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/slab.h>
|
||||
|
@ -476,6 +477,26 @@ ath5k_pci_probe(struct pci_dev *pdev,
|
|||
int ret;
|
||||
u8 csz;
|
||||
|
||||
/*
|
||||
* L0s needs to be disabled on all ath5k cards.
|
||||
*
|
||||
* For distributions shipping with CONFIG_PCIEASPM (this will be enabled
|
||||
* by default in the future in 2.6.36) this will also mean both L1 and
|
||||
* L0s will be disabled when a pre 1.1 PCIe device is detected. We do
|
||||
* know L1 works correctly even for all ath5k pre 1.1 PCIe devices
|
||||
* though but cannot currently undue the effect of a blacklist, for
|
||||
* details you can read pcie_aspm_sanity_check() and see how it adjusts
|
||||
* the device link capability.
|
||||
*
|
||||
* It may be possible in the future to implement some PCI API to allow
|
||||
* drivers to override blacklists for pre 1.1 PCIe but for now it is
|
||||
* best to accept that both L0s and L1 will be disabled completely for
|
||||
* distributions shipping with CONFIG_PCIEASPM rather than having this
|
||||
* issue present. Motivation for adding this new API will be to help
|
||||
* with power consumption for some of these devices.
|
||||
*/
|
||||
pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S);
|
||||
|
||||
ret = pci_enable_device(pdev);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "can't enable device\n");
|
||||
|
|
|
@ -191,6 +191,7 @@
|
|||
#define AR9287_EEP_NO_BACK_VER AR9287_EEP_MINOR_VER_1
|
||||
|
||||
#define AR9287_EEP_START_LOC 128
|
||||
#define AR9287_HTC_EEP_START_LOC 256
|
||||
#define AR9287_NUM_2G_CAL_PIERS 3
|
||||
#define AR9287_NUM_2G_CCK_TARGET_POWERS 3
|
||||
#define AR9287_NUM_2G_20_TARGET_POWERS 3
|
||||
|
|
|
@ -34,9 +34,14 @@ static bool ath9k_hw_ar9287_fill_eeprom(struct ath_hw *ah)
|
|||
struct ar9287_eeprom *eep = &ah->eeprom.map9287;
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
u16 *eep_data;
|
||||
int addr, eep_start_loc = AR9287_EEP_START_LOC;
|
||||
int addr, eep_start_loc;
|
||||
eep_data = (u16 *)eep;
|
||||
|
||||
if (ah->hw_version.devid == 0x7015)
|
||||
eep_start_loc = AR9287_HTC_EEP_START_LOC;
|
||||
else
|
||||
eep_start_loc = AR9287_EEP_START_LOC;
|
||||
|
||||
if (!ath9k_hw_use_flash(ah)) {
|
||||
ath_print(common, ATH_DBG_EEPROM,
|
||||
"Reading from EEPROM, not flash\n");
|
||||
|
|
|
@ -799,7 +799,7 @@ static int ath9k_hif_usb_download_fw(struct hif_device_usb *hif_dev)
|
|||
}
|
||||
kfree(buf);
|
||||
|
||||
if (hif_dev->device_id == 0x7010)
|
||||
if ((hif_dev->device_id == 0x7010) || (hif_dev->device_id == 0x7015))
|
||||
firm_offset = AR7010_FIRMWARE_TEXT;
|
||||
else
|
||||
firm_offset = AR9271_FIRMWARE_TEXT;
|
||||
|
@ -901,6 +901,7 @@ static int ath9k_hif_usb_probe(struct usb_interface *interface,
|
|||
|
||||
switch(hif_dev->device_id) {
|
||||
case 0x7010:
|
||||
case 0x7015:
|
||||
case 0x9018:
|
||||
if (le16_to_cpu(udev->descriptor.bcdDevice) == 0x0202)
|
||||
hif_dev->fw_name = FIRMWARE_AR7010_1_1;
|
||||
|
@ -912,11 +913,6 @@ static int ath9k_hif_usb_probe(struct usb_interface *interface,
|
|||
break;
|
||||
}
|
||||
|
||||
if (!hif_dev->fw_name) {
|
||||
dev_err(&udev->dev, "Can't determine firmware !\n");
|
||||
goto err_htc_hw_alloc;
|
||||
}
|
||||
|
||||
ret = ath9k_hif_usb_dev_init(hif_dev);
|
||||
if (ret) {
|
||||
ret = -EINVAL;
|
||||
|
|
|
@ -245,6 +245,7 @@ static int ath9k_init_htc_services(struct ath9k_htc_priv *priv, u16 devid)
|
|||
|
||||
switch(devid) {
|
||||
case 0x7010:
|
||||
case 0x7015:
|
||||
case 0x9018:
|
||||
priv->htc->credits = 45;
|
||||
break;
|
||||
|
|
|
@ -366,7 +366,8 @@ static void ath9k_htc_setup_rate(struct ath9k_htc_priv *priv,
|
|||
caps = WLAN_RC_HT_FLAG;
|
||||
if (sta->ht_cap.mcs.rx_mask[1])
|
||||
caps |= WLAN_RC_DS_FLAG;
|
||||
if (sta->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40)
|
||||
if ((sta->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) &&
|
||||
(conf_is_ht40(&priv->hw->conf)))
|
||||
caps |= WLAN_RC_40_FLAG;
|
||||
if (conf_is_ht40(&priv->hw->conf) &&
|
||||
(sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40))
|
||||
|
|
|
@ -78,18 +78,23 @@ int ath9k_htc_tx_start(struct ath9k_htc_priv *priv, struct sk_buff *skb)
|
|||
struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
|
||||
struct ieee80211_sta *sta = tx_info->control.sta;
|
||||
struct ath9k_htc_sta *ista;
|
||||
struct ath9k_htc_vif *avp;
|
||||
struct ath9k_htc_tx_ctl tx_ctl;
|
||||
enum htc_endpoint_id epid;
|
||||
u16 qnum;
|
||||
__le16 fc;
|
||||
u8 *tx_fhdr;
|
||||
u8 sta_idx;
|
||||
u8 sta_idx, vif_idx;
|
||||
|
||||
hdr = (struct ieee80211_hdr *) skb->data;
|
||||
fc = hdr->frame_control;
|
||||
|
||||
avp = (struct ath9k_htc_vif *) tx_info->control.vif->drv_priv;
|
||||
if (tx_info->control.vif &&
|
||||
(struct ath9k_htc_vif *) tx_info->control.vif->drv_priv)
|
||||
vif_idx = ((struct ath9k_htc_vif *)
|
||||
tx_info->control.vif->drv_priv)->index;
|
||||
else
|
||||
vif_idx = priv->nvifs;
|
||||
|
||||
if (sta) {
|
||||
ista = (struct ath9k_htc_sta *) sta->drv_priv;
|
||||
sta_idx = ista->index;
|
||||
|
@ -106,7 +111,7 @@ int ath9k_htc_tx_start(struct ath9k_htc_priv *priv, struct sk_buff *skb)
|
|||
memset(&tx_hdr, 0, sizeof(struct tx_frame_hdr));
|
||||
|
||||
tx_hdr.node_idx = sta_idx;
|
||||
tx_hdr.vif_idx = avp->index;
|
||||
tx_hdr.vif_idx = vif_idx;
|
||||
|
||||
if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) {
|
||||
tx_ctl.type = ATH9K_HTC_AMPDU;
|
||||
|
@ -169,7 +174,7 @@ int ath9k_htc_tx_start(struct ath9k_htc_priv *priv, struct sk_buff *skb)
|
|||
tx_ctl.type = ATH9K_HTC_NORMAL;
|
||||
|
||||
mgmt_hdr.node_idx = sta_idx;
|
||||
mgmt_hdr.vif_idx = avp->index;
|
||||
mgmt_hdr.vif_idx = vif_idx;
|
||||
mgmt_hdr.tidno = 0;
|
||||
mgmt_hdr.flags = 0;
|
||||
|
||||
|
|
|
@ -899,6 +899,7 @@
|
|||
|
||||
#define AR_DEVID_7010(_ah) \
|
||||
(((_ah)->hw_version.devid == 0x7010) || \
|
||||
((_ah)->hw_version.devid == 0x7015) || \
|
||||
((_ah)->hw_version.devid == 0x9018))
|
||||
|
||||
#define AR_RADIO_SREV_MAJOR 0xf0
|
||||
|
|
|
@ -6665,12 +6665,13 @@ static int __init ipw2100_init(void)
|
|||
printk(KERN_INFO DRV_NAME ": %s, %s\n", DRV_DESCRIPTION, DRV_VERSION);
|
||||
printk(KERN_INFO DRV_NAME ": %s\n", DRV_COPYRIGHT);
|
||||
|
||||
pm_qos_add_request(&ipw2100_pm_qos_req, PM_QOS_CPU_DMA_LATENCY,
|
||||
PM_QOS_DEFAULT_VALUE);
|
||||
|
||||
ret = pci_register_driver(&ipw2100_pci_driver);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
pm_qos_add_request(&ipw2100_pm_qos_req, PM_QOS_CPU_DMA_LATENCY,
|
||||
PM_QOS_DEFAULT_VALUE);
|
||||
#ifdef CONFIG_IPW2100_DEBUG
|
||||
ipw2100_debug_level = debug;
|
||||
ret = driver_create_file(&ipw2100_pci_driver.driver,
|
||||
|
|
|
@ -484,7 +484,7 @@ int wl1251_cmd_trigger_scan_to(struct wl1251 *wl, u32 timeout)
|
|||
|
||||
cmd->timeout = timeout;
|
||||
|
||||
ret = wl1251_cmd_send(wl, CMD_SCAN, cmd, sizeof(*cmd));
|
||||
ret = wl1251_cmd_send(wl, CMD_TRIGGER_SCAN_TO, cmd, sizeof(*cmd));
|
||||
if (ret < 0) {
|
||||
wl1251_error("cmd trigger scan to failed: %d", ret);
|
||||
goto out;
|
||||
|
|
|
@ -938,10 +938,11 @@ static int set_brightness(int value)
|
|||
/* SPLV laptop */
|
||||
if (hotk->methods->brightness_set) {
|
||||
if (!write_acpi_int(hotk->handle, hotk->methods->brightness_set,
|
||||
value, NULL))
|
||||
value, NULL)) {
|
||||
printk(KERN_WARNING
|
||||
"Asus ACPI: Error changing brightness\n");
|
||||
ret = -EIO;
|
||||
}
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
@ -953,11 +954,12 @@ static int set_brightness(int value)
|
|||
hotk->methods->brightness_down,
|
||||
NULL, NULL);
|
||||
(value > 0) ? value-- : value++;
|
||||
if (ACPI_FAILURE(status))
|
||||
if (ACPI_FAILURE(status)) {
|
||||
printk(KERN_WARNING
|
||||
"Asus ACPI: Error changing brightness\n");
|
||||
ret = -EIO;
|
||||
}
|
||||
}
|
||||
out:
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -840,6 +840,14 @@ static struct dmi_system_id __initdata compal_dmi_table[] = {
|
|||
},
|
||||
.callback = dmi_check_cb
|
||||
},
|
||||
{
|
||||
.ident = "Dell Mini 1012",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 1012"),
|
||||
},
|
||||
.callback = dmi_check_cb
|
||||
},
|
||||
{
|
||||
.ident = "Dell Inspiron 11z",
|
||||
.matches = {
|
||||
|
@ -1092,5 +1100,6 @@ MODULE_ALIAS("dmi:*:rnJHL90:rvrREFERENCE:*");
|
|||
MODULE_ALIAS("dmi:*:svnDellInc.:pnInspiron910:*");
|
||||
MODULE_ALIAS("dmi:*:svnDellInc.:pnInspiron1010:*");
|
||||
MODULE_ALIAS("dmi:*:svnDellInc.:pnInspiron1011:*");
|
||||
MODULE_ALIAS("dmi:*:svnDellInc.:pnInspiron1012:*");
|
||||
MODULE_ALIAS("dmi:*:svnDellInc.:pnInspiron1110:*");
|
||||
MODULE_ALIAS("dmi:*:svnDellInc.:pnInspiron1210:*");
|
||||
|
|
|
@ -121,6 +121,13 @@ static struct dmi_system_id __devinitdata dell_blacklist[] = {
|
|||
DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 1011"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.ident = "Dell Mini 1012",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 1012"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.ident = "Dell Inspiron 11z",
|
||||
.matches = {
|
||||
|
|
|
@ -1342,8 +1342,10 @@ static struct ips_mcp_limits *ips_detect_cpu(struct ips_driver *ips)
|
|||
limits = &ips_lv_limits;
|
||||
else if (strstr(boot_cpu_data.x86_model_id, "CPU U"))
|
||||
limits = &ips_ulv_limits;
|
||||
else
|
||||
else {
|
||||
dev_info(&ips->dev->dev, "No CPUID match found.\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
rdmsrl(TURBO_POWER_CURRENT_LIMIT, turbo_power);
|
||||
tdp = turbo_power & TURBO_TDP_MASK;
|
||||
|
@ -1432,6 +1434,12 @@ static int ips_probe(struct pci_dev *dev, const struct pci_device_id *id)
|
|||
|
||||
spin_lock_init(&ips->turbo_status_lock);
|
||||
|
||||
ret = pci_enable_device(dev);
|
||||
if (ret) {
|
||||
dev_err(&dev->dev, "can't enable PCI device, aborting\n");
|
||||
goto error_free;
|
||||
}
|
||||
|
||||
if (!pci_resource_start(dev, 0)) {
|
||||
dev_err(&dev->dev, "TBAR not assigned, aborting\n");
|
||||
ret = -ENXIO;
|
||||
|
@ -1444,11 +1452,6 @@ static int ips_probe(struct pci_dev *dev, const struct pci_device_id *id)
|
|||
goto error_free;
|
||||
}
|
||||
|
||||
ret = pci_enable_device(dev);
|
||||
if (ret) {
|
||||
dev_err(&dev->dev, "can't enable PCI device, aborting\n");
|
||||
goto error_free;
|
||||
}
|
||||
|
||||
ips->regmap = ioremap(pci_resource_start(dev, 0),
|
||||
pci_resource_len(dev, 0));
|
||||
|
|
|
@ -1911,6 +1911,17 @@ enum { /* hot key scan codes (derived from ACPI DSDT) */
|
|||
TP_ACPI_HOTKEYSCAN_VOLUMEDOWN,
|
||||
TP_ACPI_HOTKEYSCAN_MUTE,
|
||||
TP_ACPI_HOTKEYSCAN_THINKPAD,
|
||||
TP_ACPI_HOTKEYSCAN_UNK1,
|
||||
TP_ACPI_HOTKEYSCAN_UNK2,
|
||||
TP_ACPI_HOTKEYSCAN_UNK3,
|
||||
TP_ACPI_HOTKEYSCAN_UNK4,
|
||||
TP_ACPI_HOTKEYSCAN_UNK5,
|
||||
TP_ACPI_HOTKEYSCAN_UNK6,
|
||||
TP_ACPI_HOTKEYSCAN_UNK7,
|
||||
TP_ACPI_HOTKEYSCAN_UNK8,
|
||||
|
||||
/* Hotkey keymap size */
|
||||
TPACPI_HOTKEY_MAP_LEN
|
||||
};
|
||||
|
||||
enum { /* Keys/events available through NVRAM polling */
|
||||
|
@ -3082,6 +3093,8 @@ static const struct tpacpi_quirk tpacpi_hotkey_qtable[] __initconst = {
|
|||
TPACPI_Q_IBM('1', 'D', TPACPI_HK_Q_INIMASK), /* X22, X23, X24 */
|
||||
};
|
||||
|
||||
typedef u16 tpacpi_keymap_t[TPACPI_HOTKEY_MAP_LEN];
|
||||
|
||||
static int __init hotkey_init(struct ibm_init_struct *iibm)
|
||||
{
|
||||
/* Requirements for changing the default keymaps:
|
||||
|
@ -3113,9 +3126,17 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
|
|||
* If the above is too much to ask, don't change the keymap.
|
||||
* Ask the thinkpad-acpi maintainer to do it, instead.
|
||||
*/
|
||||
static u16 ibm_keycode_map[] __initdata = {
|
||||
|
||||
enum keymap_index {
|
||||
TPACPI_KEYMAP_IBM_GENERIC = 0,
|
||||
TPACPI_KEYMAP_LENOVO_GENERIC,
|
||||
};
|
||||
|
||||
static const tpacpi_keymap_t tpacpi_keymaps[] __initconst = {
|
||||
/* Generic keymap for IBM ThinkPads */
|
||||
[TPACPI_KEYMAP_IBM_GENERIC] = {
|
||||
/* Scan Codes 0x00 to 0x0B: ACPI HKEY FN+F1..F12 */
|
||||
KEY_FN_F1, KEY_FN_F2, KEY_COFFEE, KEY_SLEEP,
|
||||
KEY_FN_F1, KEY_BATTERY, KEY_COFFEE, KEY_SLEEP,
|
||||
KEY_WLAN, KEY_FN_F6, KEY_SWITCHVIDEOMODE, KEY_FN_F8,
|
||||
KEY_FN_F9, KEY_FN_F10, KEY_FN_F11, KEY_SUSPEND,
|
||||
|
||||
|
@ -3146,11 +3167,13 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
|
|||
/* (assignments unknown, please report if found) */
|
||||
KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN,
|
||||
KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN,
|
||||
};
|
||||
static u16 lenovo_keycode_map[] __initdata = {
|
||||
},
|
||||
|
||||
/* Generic keymap for Lenovo ThinkPads */
|
||||
[TPACPI_KEYMAP_LENOVO_GENERIC] = {
|
||||
/* Scan Codes 0x00 to 0x0B: ACPI HKEY FN+F1..F12 */
|
||||
KEY_FN_F1, KEY_COFFEE, KEY_BATTERY, KEY_SLEEP,
|
||||
KEY_WLAN, KEY_FN_F6, KEY_SWITCHVIDEOMODE, KEY_FN_F8,
|
||||
KEY_WLAN, KEY_CAMERA, KEY_SWITCHVIDEOMODE, KEY_FN_F8,
|
||||
KEY_FN_F9, KEY_FN_F10, KEY_FN_F11, KEY_SUSPEND,
|
||||
|
||||
/* Scan codes 0x0C to 0x1F: Other ACPI HKEY hot keys */
|
||||
|
@ -3189,11 +3212,25 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
|
|||
/* (assignments unknown, please report if found) */
|
||||
KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN,
|
||||
KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN,
|
||||
},
|
||||
};
|
||||
|
||||
#define TPACPI_HOTKEY_MAP_LEN ARRAY_SIZE(ibm_keycode_map)
|
||||
#define TPACPI_HOTKEY_MAP_SIZE sizeof(ibm_keycode_map)
|
||||
#define TPACPI_HOTKEY_MAP_TYPESIZE sizeof(ibm_keycode_map[0])
|
||||
static const struct tpacpi_quirk tpacpi_keymap_qtable[] __initconst = {
|
||||
/* Generic maps (fallback) */
|
||||
{
|
||||
.vendor = PCI_VENDOR_ID_IBM,
|
||||
.bios = TPACPI_MATCH_ANY, .ec = TPACPI_MATCH_ANY,
|
||||
.quirks = TPACPI_KEYMAP_IBM_GENERIC,
|
||||
},
|
||||
{
|
||||
.vendor = PCI_VENDOR_ID_LENOVO,
|
||||
.bios = TPACPI_MATCH_ANY, .ec = TPACPI_MATCH_ANY,
|
||||
.quirks = TPACPI_KEYMAP_LENOVO_GENERIC,
|
||||
},
|
||||
};
|
||||
|
||||
#define TPACPI_HOTKEY_MAP_SIZE sizeof(tpacpi_keymap_t)
|
||||
#define TPACPI_HOTKEY_MAP_TYPESIZE sizeof(tpacpi_keymap_t[0])
|
||||
|
||||
int res, i;
|
||||
int status;
|
||||
|
@ -3202,6 +3239,7 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
|
|||
bool tabletsw_state = false;
|
||||
|
||||
unsigned long quirks;
|
||||
unsigned long keymap_id;
|
||||
|
||||
vdbg_printk(TPACPI_DBG_INIT | TPACPI_DBG_HKEY,
|
||||
"initializing hotkey subdriver\n");
|
||||
|
@ -3342,7 +3380,6 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
|
|||
goto err_exit;
|
||||
|
||||
/* Set up key map */
|
||||
|
||||
hotkey_keycode_map = kmalloc(TPACPI_HOTKEY_MAP_SIZE,
|
||||
GFP_KERNEL);
|
||||
if (!hotkey_keycode_map) {
|
||||
|
@ -3352,17 +3389,14 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
|
|||
goto err_exit;
|
||||
}
|
||||
|
||||
if (tpacpi_is_lenovo()) {
|
||||
keymap_id = tpacpi_check_quirks(tpacpi_keymap_qtable,
|
||||
ARRAY_SIZE(tpacpi_keymap_qtable));
|
||||
BUG_ON(keymap_id >= ARRAY_SIZE(tpacpi_keymaps));
|
||||
dbg_printk(TPACPI_DBG_INIT | TPACPI_DBG_HKEY,
|
||||
"using Lenovo default hot key map\n");
|
||||
memcpy(hotkey_keycode_map, &lenovo_keycode_map,
|
||||
"using keymap number %lu\n", keymap_id);
|
||||
|
||||
memcpy(hotkey_keycode_map, &tpacpi_keymaps[keymap_id],
|
||||
TPACPI_HOTKEY_MAP_SIZE);
|
||||
} else {
|
||||
dbg_printk(TPACPI_DBG_INIT | TPACPI_DBG_HKEY,
|
||||
"using IBM default hot key map\n");
|
||||
memcpy(hotkey_keycode_map, &ibm_keycode_map,
|
||||
TPACPI_HOTKEY_MAP_SIZE);
|
||||
}
|
||||
|
||||
input_set_capability(tpacpi_inputdev, EV_MSC, MSC_SCAN);
|
||||
tpacpi_inputdev->keycodesize = TPACPI_HOTKEY_MAP_TYPESIZE;
|
||||
|
@ -3469,7 +3503,8 @@ static bool hotkey_notify_hotkey(const u32 hkey,
|
|||
*send_acpi_ev = true;
|
||||
*ignore_acpi_ev = false;
|
||||
|
||||
if (scancode > 0 && scancode < 0x21) {
|
||||
/* HKEY event 0x1001 is scancode 0x00 */
|
||||
if (scancode > 0 && scancode <= TPACPI_HOTKEY_MAP_LEN) {
|
||||
scancode--;
|
||||
if (!(hotkey_source_mask & (1 << scancode))) {
|
||||
tpacpi_input_send_key_masked(scancode);
|
||||
|
@ -6080,13 +6115,18 @@ static struct backlight_ops ibm_backlight_data = {
|
|||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Call _BCL method of video device. On some ThinkPads this will
|
||||
* switch the firmware to the ACPI brightness control mode.
|
||||
*/
|
||||
|
||||
static int __init tpacpi_query_bcl_levels(acpi_handle handle)
|
||||
{
|
||||
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
|
||||
union acpi_object *obj;
|
||||
int rc;
|
||||
|
||||
if (ACPI_SUCCESS(acpi_evaluate_object(handle, NULL, NULL, &buffer))) {
|
||||
if (ACPI_SUCCESS(acpi_evaluate_object(handle, "_BCL", NULL, &buffer))) {
|
||||
obj = (union acpi_object *)buffer.pointer;
|
||||
if (!obj || (obj->type != ACPI_TYPE_PACKAGE)) {
|
||||
printk(TPACPI_ERR "Unknown _BCL data, "
|
||||
|
@ -6103,55 +6143,22 @@ static int __init tpacpi_query_bcl_levels(acpi_handle handle)
|
|||
return rc;
|
||||
}
|
||||
|
||||
static acpi_status __init tpacpi_acpi_walk_find_bcl(acpi_handle handle,
|
||||
u32 lvl, void *context, void **rv)
|
||||
{
|
||||
char name[ACPI_PATH_SEGMENT_LENGTH];
|
||||
struct acpi_buffer buffer = { sizeof(name), &name };
|
||||
|
||||
if (ACPI_SUCCESS(acpi_get_name(handle, ACPI_SINGLE_NAME, &buffer)) &&
|
||||
!strncmp("_BCL", name, sizeof(name) - 1)) {
|
||||
BUG_ON(!rv || !*rv);
|
||||
**(int **)rv = tpacpi_query_bcl_levels(handle);
|
||||
return AE_CTRL_TERMINATE;
|
||||
} else {
|
||||
return AE_OK;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns 0 (no ACPI _BCL or _BCL invalid), or size of brightness map
|
||||
*/
|
||||
static unsigned int __init tpacpi_check_std_acpi_brightness_support(void)
|
||||
{
|
||||
int status;
|
||||
acpi_handle video_device;
|
||||
int bcl_levels = 0;
|
||||
void *bcl_ptr = &bcl_levels;
|
||||
|
||||
if (!vid_handle)
|
||||
TPACPI_ACPIHANDLE_INIT(vid);
|
||||
tpacpi_acpi_handle_locate("video", ACPI_VIDEO_HID, &video_device);
|
||||
if (video_device)
|
||||
bcl_levels = tpacpi_query_bcl_levels(video_device);
|
||||
|
||||
if (!vid_handle)
|
||||
return 0;
|
||||
tp_features.bright_acpimode = (bcl_levels > 0);
|
||||
|
||||
/*
|
||||
* Search for a _BCL method, and execute it. This is safe on all
|
||||
* ThinkPads, and as a side-effect, _BCL will place a Lenovo Vista
|
||||
* BIOS in ACPI backlight control mode. We do NOT have to care
|
||||
* about calling the _BCL method in an enabled video device, any
|
||||
* will do for our purposes.
|
||||
*/
|
||||
|
||||
status = acpi_walk_namespace(ACPI_TYPE_METHOD, vid_handle, 3,
|
||||
tpacpi_acpi_walk_find_bcl, NULL, NULL,
|
||||
&bcl_ptr);
|
||||
|
||||
if (ACPI_SUCCESS(status) && bcl_levels > 2) {
|
||||
tp_features.bright_acpimode = 1;
|
||||
return bcl_levels - 2;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return (bcl_levels > 2) ? (bcl_levels - 2) : 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -6244,28 +6251,6 @@ static int __init brightness_init(struct ibm_init_struct *iibm)
|
|||
if (tp_features.bright_unkfw)
|
||||
return 1;
|
||||
|
||||
if (tp_features.bright_acpimode) {
|
||||
if (acpi_video_backlight_support()) {
|
||||
if (brightness_enable > 1) {
|
||||
printk(TPACPI_NOTICE
|
||||
"Standard ACPI backlight interface "
|
||||
"available, not loading native one.\n");
|
||||
return 1;
|
||||
} else if (brightness_enable == 1) {
|
||||
printk(TPACPI_NOTICE
|
||||
"Backlight control force enabled, even if standard "
|
||||
"ACPI backlight interface is available\n");
|
||||
}
|
||||
} else {
|
||||
if (brightness_enable > 1) {
|
||||
printk(TPACPI_NOTICE
|
||||
"Standard ACPI backlight interface not "
|
||||
"available, thinkpad_acpi native "
|
||||
"brightness control enabled\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!brightness_enable) {
|
||||
dbg_printk(TPACPI_DBG_INIT | TPACPI_DBG_BRGHT,
|
||||
"brightness support disabled by "
|
||||
|
@ -6273,6 +6258,26 @@ static int __init brightness_init(struct ibm_init_struct *iibm)
|
|||
return 1;
|
||||
}
|
||||
|
||||
if (acpi_video_backlight_support()) {
|
||||
if (brightness_enable > 1) {
|
||||
printk(TPACPI_INFO
|
||||
"Standard ACPI backlight interface "
|
||||
"available, not loading native one.\n");
|
||||
return 1;
|
||||
} else if (brightness_enable == 1) {
|
||||
printk(TPACPI_WARN
|
||||
"Cannot enable backlight brightness support, "
|
||||
"ACPI is already handling it. Refer to the "
|
||||
"acpi_backlight kernel parameter\n");
|
||||
return 1;
|
||||
}
|
||||
} else if (tp_features.bright_acpimode && brightness_enable > 1) {
|
||||
printk(TPACPI_NOTICE
|
||||
"Standard ACPI backlight interface not "
|
||||
"available, thinkpad_acpi native "
|
||||
"brightness control enabled\n");
|
||||
}
|
||||
|
||||
/*
|
||||
* Check for module parameter bogosity, note that we
|
||||
* init brightness_mode to TPACPI_BRGHT_MODE_MAX in order to be
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
#include <linux/delay.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/timer.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/aer.h>
|
||||
#include <asm/dma.h>
|
||||
|
|
|
@ -14,11 +14,10 @@
|
|||
#include <linux/slab.h>
|
||||
#include <linux/serial_core.h>
|
||||
#include <linux/serial_8250.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/nwpserial.h>
|
||||
|
||||
#include <asm/prom.h>
|
||||
|
||||
struct of_serial_info {
|
||||
int type;
|
||||
int line;
|
||||
|
|
|
@ -55,7 +55,12 @@ EXPORT_SYMBOL(sunserial_unregister_minors);
|
|||
int sunserial_console_match(struct console *con, struct device_node *dp,
|
||||
struct uart_driver *drv, int line, bool ignore_line)
|
||||
{
|
||||
if (!con || of_console_device != dp)
|
||||
if (!con)
|
||||
return 0;
|
||||
|
||||
drv->cons = con;
|
||||
|
||||
if (of_console_device != dp)
|
||||
return 0;
|
||||
|
||||
if (!ignore_line) {
|
||||
|
@ -69,12 +74,10 @@ int sunserial_console_match(struct console *con, struct device_node *dp,
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (!console_set_on_cmdline) {
|
||||
con->index = line;
|
||||
drv->cons = con;
|
||||
|
||||
if (!console_set_on_cmdline)
|
||||
add_preferred_console(con->name, line, NULL);
|
||||
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
EXPORT_SYMBOL(sunserial_console_match);
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include <linux/interrupt.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/io.h>
|
||||
|
|
|
@ -44,9 +44,9 @@ int pohmelfs_construct_path_string(struct pohmelfs_inode *pi, void *data, int le
|
|||
return -ENOENT;
|
||||
}
|
||||
|
||||
read_lock(¤t->fs->lock);
|
||||
spin_lock(¤t->fs->lock);
|
||||
path.mnt = mntget(current->fs->root.mnt);
|
||||
read_unlock(¤t->fs->lock);
|
||||
spin_unlock(¤t->fs->lock);
|
||||
|
||||
path.dentry = d;
|
||||
|
||||
|
@ -91,9 +91,9 @@ int pohmelfs_path_length(struct pohmelfs_inode *pi)
|
|||
return -ENOENT;
|
||||
}
|
||||
|
||||
read_lock(¤t->fs->lock);
|
||||
spin_lock(¤t->fs->lock);
|
||||
root = dget(current->fs->root.dentry);
|
||||
read_unlock(¤t->fs->lock);
|
||||
spin_unlock(¤t->fs->lock);
|
||||
|
||||
spin_lock(&dcache_lock);
|
||||
|
||||
|
|
|
@ -80,7 +80,10 @@ static void clcdfb_disable(struct clcd_fb *fb)
|
|||
/*
|
||||
* Disable CLCD clock source.
|
||||
*/
|
||||
if (fb->clk_enabled) {
|
||||
fb->clk_enabled = false;
|
||||
clk_disable(fb->clk);
|
||||
}
|
||||
}
|
||||
|
||||
static void clcdfb_enable(struct clcd_fb *fb, u32 cntl)
|
||||
|
@ -88,7 +91,10 @@ static void clcdfb_enable(struct clcd_fb *fb, u32 cntl)
|
|||
/*
|
||||
* Enable the CLCD clock source.
|
||||
*/
|
||||
if (!fb->clk_enabled) {
|
||||
fb->clk_enabled = true;
|
||||
clk_enable(fb->clk);
|
||||
}
|
||||
|
||||
/*
|
||||
* Bring up by first enabling..
|
||||
|
|
|
@ -108,7 +108,7 @@ static int load_misc_binary(struct linux_binprm *bprm, struct pt_regs *regs)
|
|||
Node *fmt;
|
||||
struct file * interp_file = NULL;
|
||||
char iname[BINPRM_BUF_SIZE];
|
||||
char *iname_addr = iname;
|
||||
const char *iname_addr = iname;
|
||||
int retval;
|
||||
int fd_binary = -1;
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue