Merge branch 'upstream'

This commit is contained in:
Jeff Garzik 2006-02-13 00:13:48 -05:00
commit 3875e1945b
103 changed files with 777 additions and 588 deletions

View File

@ -2232,7 +2232,23 @@ P: Martin Schwidefsky
M: schwidefsky@de.ibm.com
M: linux390@de.ibm.com
L: linux-390@vm.marist.edu
W: http://oss.software.ibm.com/developerworks/opensource/linux390
W: http://www.ibm.com/developerworks/linux/linux390/
S: Supported
S390 NETWORK DRIVERS
P: Frank Pavlic
M: fpavlic@de.ibm.com
M: linux390@de.ibm.com
L: linux-390@vm.marist.edu
W: http://www.ibm.com/developerworks/linux/linux390/
S: Supported
S390 ZFCP DRIVER
P: Andreas Herrmann
M: aherrman@de.ibm.com
M: linux390@de.ibm.com
L: linux-390@vm.marist.edu
W: http://www.ibm.com/developerworks/linux/linux390/
S: Supported
SAA7146 VIDEO4LINUX-2 DRIVER

View File

@ -1,7 +1,7 @@
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 16
EXTRAVERSION =-rc2
EXTRAVERSION =-rc3
NAME=Sliding Snow Leopard
# *DOCUMENTATION*

View File

@ -398,7 +398,11 @@ ignore_int:
pushl 32(%esp)
pushl 40(%esp)
pushl $int_msg
#ifdef CONFIG_EARLY_PRINTK
call early_printk
#else
call printk
#endif
addl $(5*4),%esp
popl %ds
popl %es

View File

@ -299,7 +299,7 @@ ENTRY(sys_call_table)
.long sys_mknodat
.long sys_fchownat
.long sys_futimesat
.long sys_newfstatat /* 300 */
.long sys_fstatat64 /* 300 */
.long sys_unlinkat
.long sys_renameat
.long sys_linkat

View File

@ -131,9 +131,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
|BINDEC idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -60,9 +60,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
|BINSTR idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -152,9 +152,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
|BUGFIX idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -69,9 +69,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
|DECBIN idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -22,9 +22,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
DO_FUNC: |idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -5,9 +5,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
| fpsp.h --- stack frame offsets during FPSP exception handling
|

View File

@ -29,9 +29,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
GEN_EXCEPT: |idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -54,9 +54,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
GET_OP: |idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -12,9 +12,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
KERNEL_EX: |idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -16,9 +16,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
RES_FUNC: |idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -8,9 +8,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
|ROUND idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -38,9 +38,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
|SACOS idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -38,9 +38,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
|SASIN idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -43,9 +43,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
|satan idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -45,9 +45,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
|satanh idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -21,9 +21,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
|SCALE idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -49,9 +49,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
|SCOSH idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -331,9 +331,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
|setox idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -24,9 +24,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
|SGETEM idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -51,9 +51,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
|SINT idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -30,9 +30,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
|
| Modified for Linux-1.3.x by Jes Sorensen (jds@kom.auc.dk)

View File

@ -96,9 +96,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
|SLOG2 idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -63,9 +63,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
|slogn idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -15,9 +15,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
|SMOVECR idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -66,9 +66,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
SREM_MOD: |idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -83,9 +83,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
|SSIN idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -49,9 +49,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
|SSINH idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -50,9 +50,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
|STAN idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -49,9 +49,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
|STANH idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -19,9 +19,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
STO_RES: |idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -76,9 +76,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
|STWOTOX idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -17,9 +17,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
|TBLDO idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -16,9 +16,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
|UTIL idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -13,9 +13,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
X_BSUN: |idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -13,9 +13,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
X_FLINE: |idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -43,9 +43,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
X_OPERR: |idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -35,9 +35,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
X_OVFL: |idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -22,9 +22,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
X_SNAN: |idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -11,9 +11,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
X_STORE: |idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -21,9 +21,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
X_UNFL: |idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -22,9 +22,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
X_UNIMP: |idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -23,9 +23,8 @@
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
| The copyright notice above does not evidence any
| actual or intended publication of such source code.
| For details on the license for this file, please see the
| file, README, in this same directory.
X_UNSUPP: |idnt 2,1 | Motorola 040 Floating Point Software Package

View File

@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.16-rc1
# Thu Jan 19 10:58:53 2006
# Linux kernel version: 2.6.16-rc2
# Wed Feb 8 10:44:39 2006
#
CONFIG_MMU=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
@ -12,7 +12,6 @@ CONFIG_S390=y
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
CONFIG_CLEAN_COMPILE=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
@ -154,6 +153,7 @@ CONFIG_NET=y
#
# Networking options
#
# CONFIG_NETDEBUG is not set
CONFIG_PACKET=y
# CONFIG_PACKET_MMAP is not set
CONFIG_UNIX=y
@ -607,6 +607,7 @@ CONFIG_MSDOS_PARTITION=y
# Instrumentation Support
#
# CONFIG_PROFILING is not set
# CONFIG_STATISTICS is not set
#
# Kernel hacking
@ -624,7 +625,7 @@ CONFIG_DEBUG_MUTEXES=y
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
# CONFIG_DEBUG_KOBJECT is not set
# CONFIG_DEBUG_INFO is not set
# CONFIG_DEBUG_FS is not set
CONFIG_DEBUG_FS=y
# CONFIG_DEBUG_VM is not set
CONFIG_FORCED_INLINING=y
# CONFIG_RCU_TORTURE_TEST is not set

View File

@ -905,6 +905,26 @@ asmlinkage long sys32_fstat64(unsigned long fd, struct stat64_emu31 __user * sta
return ret;
}
asmlinkage long sys32_fstatat(unsigned int dfd, char __user *filename,
struct stat64_emu31 __user* statbuf, int flag)
{
struct kstat stat;
int error = -EINVAL;
if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0)
goto out;
if (flag & AT_SYMLINK_NOFOLLOW)
error = vfs_lstat_fd(dfd, filename, &stat);
else
error = vfs_stat_fd(dfd, filename, &stat);
if (!error)
error = cp_stat64(statbuf, &stat);
out:
return error;
}
/*
* Linux/i386 didn't use to be able to handle more than
* 4 system call parameters, so these system calls used a memory

View File

@ -1523,13 +1523,13 @@ compat_sys_futimesat_wrapper:
llgtr %r4,%r4 # struct timeval *
jg compat_sys_futimesat
.globl compat_sys_newfstatat_wrapper
compat_sys_newfstatat_wrapper:
.globl sys32_fstatat_wrapper
sys32_fstatat_wrapper:
llgfr %r2,%r2 # unsigned int
llgtr %r3,%r3 # char *
llgtr %r4,%r4 # struct stat *
llgtr %r4,%r4 # struct stat64 *
lgfr %r5,%r5 # int
jg compat_sys_newfstatat
jg sys32_fstatat
.globl sys_unlinkat_wrapper
sys_unlinkat_wrapper:
@ -1602,3 +1602,8 @@ compat_sys_ppoll_wrapper:
llgtr %r5,%r5 # const sigset_t *
llgfr %r6,%r6 # size_t
jg compat_sys_ppoll
.globl sys_unshare_wrapper
sys_unshare_wrapper:
llgfr %r2,%r2 # unsigned long
jg sys_unshare

View File

@ -12,15 +12,16 @@
* on the S390 architecture.
*/
#include <asm/cio.h>
#include <asm/setup.h>
#include <linux/device.h>
#include <linux/mm.h>
#include <linux/kexec.h>
#include <linux/delay.h>
#include <asm/cio.h>
#include <asm/setup.h>
#include <asm/pgtable.h>
#include <asm/pgalloc.h>
#include <asm/system.h>
#include <asm/smp.h>
static void kexec_halt_all_cpus(void *);

View File

@ -52,7 +52,7 @@ extern volatile int __cpu_logical_map[];
struct _lowcore *lowcore_ptr[NR_CPUS];
cpumask_t cpu_online_map;
cpumask_t cpu_possible_map;
cpumask_t cpu_possible_map = CPU_MASK_ALL;
static struct task_struct *current_set[NR_CPUS];
@ -514,9 +514,6 @@ __init smp_check_cpus(unsigned int max_cpus)
num_cpus++;
}
for (cpu = 1; cpu < max_cpus; cpu++)
cpu_set(cpu, cpu_possible_map);
printk("Detected %d CPU's\n",(int) num_cpus);
printk("Boot cpu address %2X\n", boot_cpu_addr);
}
@ -810,7 +807,6 @@ void __devinit smp_prepare_boot_cpu(void)
cpu_set(0, cpu_online_map);
cpu_set(0, cpu_present_map);
cpu_set(0, cpu_possible_map);
S390_lowcore.percpu_offset = __per_cpu_offset[0];
current_set[0] = current;
}

View File

@ -301,7 +301,7 @@ SYSCALL(sys_mkdirat,sys_mkdirat,sys_mkdirat_wrapper)
SYSCALL(sys_mknodat,sys_mknodat,sys_mknodat_wrapper) /* 290 */
SYSCALL(sys_fchownat,sys_fchownat,sys_fchownat_wrapper)
SYSCALL(sys_futimesat,sys_futimesat,compat_sys_futimesat_wrapper)
SYSCALL(sys_newfstatat,sys_newfstatat,compat_sys_newfstatat_wrapper)
SYSCALL(sys_fstatat64,sys_newfstatat,sys32_fstatat_wrapper)
SYSCALL(sys_unlinkat,sys_unlinkat,sys_unlinkat_wrapper)
SYSCALL(sys_renameat,sys_renameat,sys_renameat_wrapper) /* 295 */
SYSCALL(sys_linkat,sys_linkat,sys_linkat_wrapper)
@ -311,3 +311,4 @@ SYSCALL(sys_fchmodat,sys_fchmodat,sys_fchmodat_wrapper)
SYSCALL(sys_faccessat,sys_faccessat,sys_faccessat_wrapper) /* 300 */
SYSCALL(sys_pselect6,sys_pselect6,compat_sys_pselect6_wrapper)
SYSCALL(sys_ppoll,sys_ppoll,compat_sys_ppoll_wrapper)
SYSCALL(sys_unshare,sys_unshare,sys_unshare_wrapper)

View File

@ -677,7 +677,7 @@ ia32_sys_call_table:
.quad sys_mknodat
.quad sys_fchownat
.quad compat_sys_futimesat
.quad compat_sys_newfstatat /* 300 */
.quad sys32_fstatat /* 300 */
.quad sys_unlinkat
.quad sys_renameat
.quad sys_linkat

View File

@ -180,6 +180,28 @@ sys32_fstat64(unsigned int fd, struct stat64 __user *statbuf)
return ret;
}
asmlinkage long
sys32_fstatat(unsigned int dfd, char __user *filename,
struct stat64 __user* statbuf, int flag)
{
struct kstat stat;
int error = -EINVAL;
if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0)
goto out;
if (flag & AT_SYMLINK_NOFOLLOW)
error = vfs_lstat_fd(dfd, filename, &stat);
else
error = vfs_stat_fd(dfd, filename, &stat);
if (!error)
error = cp_stat64(statbuf, &stat);
out:
return error;
}
/*
* Linux/i386 didn't use to be able to handle more than
* 4 system call parameters, so these system calls used a memory

View File

@ -708,7 +708,7 @@ static void setup_APIC_timer(unsigned int clocks)
local_irq_save(flags);
/* wait for irq slice */
if (vxtime.hpet_address) {
if (vxtime.hpet_address && hpet_use_timer) {
int trigger = hpet_readl(HPET_T0_CMP);
while (hpet_readl(HPET_COUNTER) >= trigger)
/* do nothing */ ;

View File

@ -310,7 +310,7 @@ void gart_unmap_sg(struct device *dev, struct scatterlist *sg, int nents, int di
for (i = 0; i < nents; i++) {
struct scatterlist *s = &sg[i];
if (!s->dma_length || !s->length)
if (!s->dma_length)
break;
dma_unmap_single(dev, s->dma_address, s->dma_length, dir);
}
@ -364,7 +364,6 @@ static int __dma_map_cont(struct scatterlist *sg, int start, int stopat,
BUG_ON(i > start && s->offset);
if (i == start) {
*sout = *s;
sout->dma_address = iommu_bus_base;
sout->dma_address += iommu_page*PAGE_SIZE + s->offset;
sout->dma_length = s->length;
@ -379,7 +378,7 @@ static int __dma_map_cont(struct scatterlist *sg, int start, int stopat,
SET_LEAK(iommu_page);
addr += PAGE_SIZE;
iommu_page++;
}
}
}
BUG_ON(iommu_page - iommu_start != pages);
return 0;
@ -391,7 +390,6 @@ static inline int dma_map_cont(struct scatterlist *sg, int start, int stopat,
{
if (!need) {
BUG_ON(stopat - start != 1);
*sout = sg[start];
sout->dma_length = sg[start].length;
return 0;
}

View File

@ -59,7 +59,7 @@ static int notsc __initdata = 0;
unsigned int cpu_khz; /* TSC clocks / usec, not used here */
static unsigned long hpet_period; /* fsecs / HPET clock */
unsigned long hpet_tick; /* HPET clocks / interrupt */
static int hpet_use_timer; /* Use counter of hpet for time keeping, otherwise PIT */
int hpet_use_timer; /* Use counter of hpet for time keeping, otherwise PIT */
unsigned long vxtime_hz = PIT_TICK_RATE;
int report_lost_ticks; /* command line option */
unsigned long long monotonic_base;
@ -326,7 +326,10 @@ static noinline void handle_lost_ticks(int lost, struct pt_regs *regs)
print_symbol("rip %s\n", regs->rip);
if (vxtime.mode == VXTIME_TSC && vxtime.hpet_address) {
printk(KERN_WARNING "Falling back to HPET\n");
vxtime.last = hpet_readl(HPET_T0_CMP) - hpet_tick;
if (hpet_use_timer)
vxtime.last = hpet_readl(HPET_T0_CMP) - hpet_tick;
else
vxtime.last = hpet_readl(HPET_COUNTER);
vxtime.mode = VXTIME_HPET;
do_gettimeoffset = do_gettimeoffset_hpet;
}
@ -988,7 +991,10 @@ void __init time_init_gtod(void)
notsc = 1;
if (vxtime.hpet_address && notsc) {
timetype = hpet_use_timer ? "HPET" : "PIT/HPET";
vxtime.last = hpet_readl(HPET_T0_CMP) - hpet_tick;
if (hpet_use_timer)
vxtime.last = hpet_readl(HPET_T0_CMP) - hpet_tick;
else
vxtime.last = hpet_readl(HPET_COUNTER);
vxtime.mode = VXTIME_HPET;
do_gettimeoffset = do_gettimeoffset_hpet;
#ifdef CONFIG_X86_PM_TIMER

View File

@ -90,6 +90,20 @@ static inline void conditional_sti(struct pt_regs *regs)
local_irq_enable();
}
static inline void preempt_conditional_sti(struct pt_regs *regs)
{
preempt_disable();
if (regs->eflags & X86_EFLAGS_IF)
local_irq_enable();
}
static inline void preempt_conditional_cli(struct pt_regs *regs)
{
if (regs->eflags & X86_EFLAGS_IF)
local_irq_disable();
preempt_enable_no_resched();
}
static int kstack_depth_to_print = 10;
#ifdef CONFIG_KALLSYMS
@ -693,7 +707,7 @@ asmlinkage void __kprobes do_debug(struct pt_regs * regs,
SIGTRAP) == NOTIFY_STOP)
return;
conditional_sti(regs);
preempt_conditional_sti(regs);
/* Mask out spurious debug traps due to lazy DR7 setting */
if (condition & (DR_TRAP0|DR_TRAP1|DR_TRAP2|DR_TRAP3)) {
@ -738,11 +752,13 @@ asmlinkage void __kprobes do_debug(struct pt_regs * regs,
clear_dr7:
set_debugreg(0UL, 7);
preempt_conditional_cli(regs);
return;
clear_TF_reenable:
set_tsk_thread_flag(tsk, TIF_SINGLESTEP);
regs->eflags &= ~TF_MASK;
preempt_conditional_cli(regs);
}
static int kernel_math_error(struct pt_regs *regs, const char *str, int trapnr)

View File

@ -250,12 +250,17 @@ tipar_open(struct inode *inode, struct file *file)
{
unsigned int minor = iminor(inode) - TIPAR_MINOR;
if (minor > tp_count - 1)
if (tp_count == 0 || minor > tp_count - 1)
return -ENXIO;
if (test_and_set_bit(minor, &opened))
return -EBUSY;
if (!table[minor].dev) {
printk(KERN_ERR "%s: NULL device for minor %u\n",
__FUNCTION__, minor);
return -ENXIO;
}
parport_claim_or_block(table[minor].dev);
init_ti_parallel(minor);
parport_release(table[minor].dev);
@ -510,16 +515,20 @@ tipar_init_module(void)
err = PTR_ERR(tipar_class);
goto out_chrdev;
}
if (parport_register_driver(&tipar_driver)) {
if (parport_register_driver(&tipar_driver) || tp_count == 0) {
printk(KERN_ERR "tipar: unable to register with parport\n");
err = -EIO;
goto out;
goto out_class;
}
err = 0;
goto out;
out_class:
class_destroy(tipar_class);
out_chrdev:
devfs_remove("ticables/par");
unregister_chrdev(TIPAR_MAJOR, "tipar");
out:
return err;

View File

@ -49,29 +49,37 @@
* More info available at http://www.berkprod.com/ or http://www.pcwatchdog.com/
*/
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/types.h>
#include <linux/timer.h>
#include <linux/jiffies.h>
#include <linux/config.h>
#include <linux/wait.h>
#include <linux/slab.h>
#include <linux/ioport.h>
#include <linux/delay.h>
#include <linux/fs.h>
#include <linux/miscdevice.h>
#include <linux/watchdog.h>
#include <linux/notifier.h>
#include <linux/init.h>
#include <linux/spinlock.h>
#include <linux/reboot.h>
#include <linux/config.h> /* For CONFIG_WATCHDOG_NOWAYOUT/... */
#include <linux/module.h> /* For module specific items */
#include <linux/moduleparam.h> /* For new moduleparam's */
#include <linux/types.h> /* For standard types (like size_t) */
#include <linux/errno.h> /* For the -ENODEV/... values */
#include <linux/kernel.h> /* For printk/panic/... */
#include <linux/delay.h> /* For mdelay function */
#include <linux/timer.h> /* For timer related operations */
#include <linux/jiffies.h> /* For jiffies stuff */
#include <linux/miscdevice.h> /* For MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR) */
#include <linux/watchdog.h> /* For the watchdog specific items */
#include <linux/notifier.h> /* For notifier support */
#include <linux/reboot.h> /* For reboot_notifier stuff */
#include <linux/init.h> /* For __init/__exit/... */
#include <linux/fs.h> /* For file operations */
#include <linux/ioport.h> /* For io-port access */
#include <linux/spinlock.h> /* For spin_lock/spin_unlock/... */
#include <linux/sched.h> /* TASK_INTERRUPTIBLE, set_current_state() and friends */
#include <asm/uaccess.h>
#include <asm/io.h>
#include <linux/slab.h> /* For kmalloc */
#define WD_VER "1.16 (06/12/2004)"
#define PFX "pcwd: "
#include <asm/uaccess.h> /* For copy_to_user/put_user/... */
#include <asm/io.h> /* For inb/outb/... */
/* Module and version information */
#define WATCHDOG_VERSION "1.16"
#define WATCHDOG_DATE "03 Jan 2006"
#define WATCHDOG_DRIVER_NAME "ISA-PC Watchdog"
#define WATCHDOG_NAME "pcwd"
#define PFX WATCHDOG_NAME ": "
#define DRIVER_VERSION WATCHDOG_DRIVER_NAME " driver, v" WATCHDOG_VERSION " (" WATCHDOG_DATE ")\n"
#define WD_VER WATCHDOG_VERSION " (" WATCHDOG_DATE ")"
/*
* It should be noted that PCWD_REVISION_B was removed because A and B
@ -85,36 +93,38 @@
/*
* These are the defines that describe the control status bits for the
* PC Watchdog card, revision A.
*/
* PCI-PC Watchdog card.
*/
/* Port 1 : Control Status #1 for the PC Watchdog card, revision A. */
#define WD_WDRST 0x01 /* Previously reset state */
#define WD_T110 0x02 /* Temperature overheat sense */
#define WD_HRTBT 0x04 /* Heartbeat sense */
#define WD_RLY2 0x08 /* External relay triggered */
#define WD_SRLY2 0x80 /* Software external relay triggered */
/*
* These are the defines that describe the control status bits for the
* PC Watchdog card, revision C.
*/
/* Port 1 : Control Status #1 for the PC Watchdog card, revision C. */
#define WD_REVC_WTRP 0x01 /* Watchdog Trip status */
#define WD_REVC_HRBT 0x02 /* Watchdog Heartbeat */
#define WD_REVC_TTRP 0x04 /* Temperature Trip status */
/* Port 2 : Control Status #2 */
#define WD_WDIS 0x10 /* Watchdog Disabled */
#define WD_ENTP 0x20 /* Watchdog Enable Temperature Trip */
#define WD_SSEL 0x40 /* Watchdog Switch Select (1:SW1 <-> 0:SW2) */
#define WD_WCMD 0x80 /* Watchdog Command Mode */
/* max. time we give an ISA watchdog card to process a command */
/* 500ms for each 4 bit response (according to spec.) */
#define ISA_COMMAND_TIMEOUT 1000
/* Watchdog's internal commands */
#define CMD_ISA_IDLE 0x00
#define CMD_ISA_VERSION_INTEGER 0x01
#define CMD_ISA_VERSION_TENTH 0x02
#define CMD_ISA_VERSION_HUNDRETH 0x03
#define CMD_ISA_VERSION_MINOR 0x04
#define CMD_ISA_SWITCH_SETTINGS 0x05
#define CMD_ISA_DELAY_TIME_2SECS 0x0A
#define CMD_ISA_DELAY_TIME_4SECS 0x0B
#define CMD_ISA_DELAY_TIME_8SECS 0x0C
#define CMD_ISA_IDLE 0x00
#define CMD_ISA_VERSION_INTEGER 0x01
#define CMD_ISA_VERSION_TENTH 0x02
#define CMD_ISA_VERSION_HUNDRETH 0x03
#define CMD_ISA_VERSION_MINOR 0x04
#define CMD_ISA_SWITCH_SETTINGS 0x05
#define CMD_ISA_DELAY_TIME_2SECS 0x0A
#define CMD_ISA_DELAY_TIME_4SECS 0x0B
#define CMD_ISA_DELAY_TIME_8SECS 0x0C
/*
* We are using an kernel timer to do the pinging of the watchdog
@ -130,15 +140,17 @@ static int cards_found;
/* internal variables */
static atomic_t open_allowed = ATOMIC_INIT(1);
static char expect_close;
static struct timer_list timer;
static unsigned long next_heartbeat;
static int temp_panic;
static int revision; /* The card's revision */
static int supports_temp; /* Wether or not the card has a temperature device */
static int command_mode; /* Wether or not the card is in command mode */
static int initial_status; /* The card's boot status */
static int current_readport; /* The cards I/O address */
static spinlock_t io_lock;
static struct { /* this is private data for each ISA-PC watchdog card */
int revision; /* The card's revision */
int supports_temp; /* Wether or not the card has a temperature device */
int command_mode; /* Wether or not the card is in command mode */
int boot_status; /* The card's boot status */
int io_addr; /* The cards I/O address */
spinlock_t io_lock; /* the lock for io operations */
struct timer_list timer; /* The timer that pings the watchdog */
unsigned long next_heartbeat; /* the next_heartbeat for the timer */
} pcwd_private;
/* module parameters */
#define WATCHDOG_HEARTBEAT 60 /* 60 sec default heartbeat */
@ -161,14 +173,14 @@ static int send_isa_command(int cmd)
int port0, last_port0; /* Double read for stabilising */
/* The WCMD bit must be 1 and the command is only 4 bits in size */
control_status = (cmd & 0x0F) | 0x80;
outb_p(control_status, current_readport + 2);
control_status = (cmd & 0x0F) | WD_WCMD;
outb_p(control_status, pcwd_private.io_addr + 2);
udelay(ISA_COMMAND_TIMEOUT);
port0 = inb_p(current_readport);
port0 = inb_p(pcwd_private.io_addr);
for (i = 0; i < 25; ++i) {
last_port0 = port0;
port0 = inb_p(current_readport);
port0 = inb_p(pcwd_private.io_addr);
if (port0 == last_port0)
break; /* Data is stable */
@ -184,7 +196,7 @@ static int set_command_mode(void)
int i, found=0, count=0;
/* Set the card into command mode */
spin_lock(&io_lock);
spin_lock(&pcwd_private.io_lock);
while ((!found) && (count < 3)) {
i = send_isa_command(CMD_ISA_IDLE);
@ -192,15 +204,15 @@ static int set_command_mode(void)
found = 1;
else if (i == 0xF3) {
/* Card does not like what we've done to it */
outb_p(0x00, current_readport + 2);
outb_p(0x00, pcwd_private.io_addr + 2);
udelay(1200); /* Spec says wait 1ms */
outb_p(0x00, current_readport + 2);
outb_p(0x00, pcwd_private.io_addr + 2);
udelay(ISA_COMMAND_TIMEOUT);
}
count++;
}
spin_unlock(&io_lock);
command_mode = found;
spin_unlock(&pcwd_private.io_lock);
pcwd_private.command_mode = found;
return(found);
}
@ -208,12 +220,95 @@ static int set_command_mode(void)
static void unset_command_mode(void)
{
/* Set the card into normal mode */
spin_lock(&io_lock);
outb_p(0x00, current_readport + 2);
spin_lock(&pcwd_private.io_lock);
outb_p(0x00, pcwd_private.io_addr + 2);
udelay(ISA_COMMAND_TIMEOUT);
spin_unlock(&io_lock);
spin_unlock(&pcwd_private.io_lock);
command_mode = 0;
pcwd_private.command_mode = 0;
}
static inline void pcwd_check_temperature_support(void)
{
if (inb(pcwd_private.io_addr) != 0xF0)
pcwd_private.supports_temp = 1;
}
static inline char *get_firmware(void)
{
int one, ten, hund, minor;
char *ret;
ret = kmalloc(6, GFP_KERNEL);
if(ret == NULL)
return NULL;
if (set_command_mode()) {
one = send_isa_command(CMD_ISA_VERSION_INTEGER);
ten = send_isa_command(CMD_ISA_VERSION_TENTH);
hund = send_isa_command(CMD_ISA_VERSION_HUNDRETH);
minor = send_isa_command(CMD_ISA_VERSION_MINOR);
sprintf(ret, "%c.%c%c%c", one, ten, hund, minor);
}
else
sprintf(ret, "ERROR");
unset_command_mode();
return(ret);
}
static inline int pcwd_get_option_switches(void)
{
int option_switches=0;
if (set_command_mode()) {
/* Get switch settings */
option_switches = send_isa_command(CMD_ISA_SWITCH_SETTINGS);
}
unset_command_mode();
return(option_switches);
}
static void pcwd_show_card_info(void)
{
char *firmware;
int option_switches;
/* Get some extra info from the hardware (in command/debug/diag mode) */
if (pcwd_private.revision == PCWD_REVISION_A)
printk(KERN_INFO PFX "ISA-PC Watchdog (REV.A) detected at port 0x%04x\n", pcwd_private.io_addr);
else if (pcwd_private.revision == PCWD_REVISION_C) {
firmware = get_firmware();
printk(KERN_INFO PFX "ISA-PC Watchdog (REV.C) detected at port 0x%04x (Firmware version: %s)\n",
pcwd_private.io_addr, firmware);
kfree(firmware);
option_switches = pcwd_get_option_switches();
printk(KERN_INFO PFX "Option switches (0x%02x): Temperature Reset Enable=%s, Power On Delay=%s\n",
option_switches,
((option_switches & 0x10) ? "ON" : "OFF"),
((option_switches & 0x08) ? "ON" : "OFF"));
/* Reprogram internal heartbeat to 2 seconds */
if (set_command_mode()) {
send_isa_command(CMD_ISA_DELAY_TIME_2SECS);
unset_command_mode();
}
}
if (pcwd_private.supports_temp)
printk(KERN_INFO PFX "Temperature Option Detected\n");
if (pcwd_private.boot_status & WDIOF_CARDRESET)
printk(KERN_INFO PFX "Previous reboot was caused by the card\n");
if (pcwd_private.boot_status & WDIOF_OVERHEAT) {
printk(KERN_EMERG PFX "Card senses a CPU Overheat. Panicking!\n");
printk(KERN_EMERG PFX "CPU Overheat\n");
}
if (pcwd_private.boot_status == 0)
printk(KERN_INFO PFX "No previous trip detected - Cold boot or reset\n");
}
static void pcwd_timer_ping(unsigned long data)
@ -222,25 +317,25 @@ static void pcwd_timer_ping(unsigned long data)
/* If we got a heartbeat pulse within the WDT_INTERVAL
* we agree to ping the WDT */
if(time_before(jiffies, next_heartbeat)) {
if(time_before(jiffies, pcwd_private.next_heartbeat)) {
/* Ping the watchdog */
spin_lock(&io_lock);
if (revision == PCWD_REVISION_A) {
spin_lock(&pcwd_private.io_lock);
if (pcwd_private.revision == PCWD_REVISION_A) {
/* Rev A cards are reset by setting the WD_WDRST bit in register 1 */
wdrst_stat = inb_p(current_readport);
wdrst_stat = inb_p(pcwd_private.io_addr);
wdrst_stat &= 0x0F;
wdrst_stat |= WD_WDRST;
outb_p(wdrst_stat, current_readport + 1);
outb_p(wdrst_stat, pcwd_private.io_addr + 1);
} else {
/* Re-trigger watchdog by writing to port 0 */
outb_p(0x00, current_readport);
outb_p(0x00, pcwd_private.io_addr);
}
/* Re-set the timer interval */
mod_timer(&timer, jiffies + WDT_INTERVAL);
mod_timer(&pcwd_private.timer, jiffies + WDT_INTERVAL);
spin_unlock(&io_lock);
spin_unlock(&pcwd_private.io_lock);
} else {
printk(KERN_WARNING PFX "Heartbeat lost! Will not ping the watchdog\n");
}
@ -250,19 +345,19 @@ static int pcwd_start(void)
{
int stat_reg;
next_heartbeat = jiffies + (heartbeat * HZ);
pcwd_private.next_heartbeat = jiffies + (heartbeat * HZ);
/* Start the timer */
mod_timer(&timer, jiffies + WDT_INTERVAL);
mod_timer(&pcwd_private.timer, jiffies + WDT_INTERVAL);
/* Enable the port */
if (revision == PCWD_REVISION_C) {
spin_lock(&io_lock);
outb_p(0x00, current_readport + 3);
if (pcwd_private.revision == PCWD_REVISION_C) {
spin_lock(&pcwd_private.io_lock);
outb_p(0x00, pcwd_private.io_addr + 3);
udelay(ISA_COMMAND_TIMEOUT);
stat_reg = inb_p(current_readport + 2);
spin_unlock(&io_lock);
if (stat_reg & 0x10) {
stat_reg = inb_p(pcwd_private.io_addr + 2);
spin_unlock(&pcwd_private.io_lock);
if (stat_reg & WD_WDIS) {
printk(KERN_INFO PFX "Could not start watchdog\n");
return -EIO;
}
@ -275,18 +370,18 @@ static int pcwd_stop(void)
int stat_reg;
/* Stop the timer */
del_timer(&timer);
del_timer(&pcwd_private.timer);
/* Disable the board */
if (revision == PCWD_REVISION_C) {
spin_lock(&io_lock);
outb_p(0xA5, current_readport + 3);
if (pcwd_private.revision == PCWD_REVISION_C) {
spin_lock(&pcwd_private.io_lock);
outb_p(0xA5, pcwd_private.io_addr + 3);
udelay(ISA_COMMAND_TIMEOUT);
outb_p(0xA5, current_readport + 3);
outb_p(0xA5, pcwd_private.io_addr + 3);
udelay(ISA_COMMAND_TIMEOUT);
stat_reg = inb_p(current_readport + 2);
spin_unlock(&io_lock);
if ((stat_reg & 0x10) == 0) {
stat_reg = inb_p(pcwd_private.io_addr + 2);
spin_unlock(&pcwd_private.io_lock);
if ((stat_reg & WD_WDIS) == 0) {
printk(KERN_INFO PFX "Could not stop watchdog\n");
return -EIO;
}
@ -297,7 +392,7 @@ static int pcwd_stop(void)
static int pcwd_keepalive(void)
{
/* user land ping */
next_heartbeat = jiffies + (heartbeat * HZ);
pcwd_private.next_heartbeat = jiffies + (heartbeat * HZ);
return 0;
}
@ -315,23 +410,23 @@ static int pcwd_get_status(int *status)
int card_status;
*status=0;
spin_lock(&io_lock);
if (revision == PCWD_REVISION_A)
spin_lock(&pcwd_private.io_lock);
if (pcwd_private.revision == PCWD_REVISION_A)
/* Rev A cards return status information from
* the base register, which is used for the
* temperature in other cards. */
card_status = inb(current_readport);
card_status = inb(pcwd_private.io_addr);
else {
/* Rev C cards return card status in the base
* address + 1 register. And use different bits
* to indicate a card initiated reset, and an
* over-temperature condition. And the reboot
* status can be reset. */
card_status = inb(current_readport + 1);
card_status = inb(pcwd_private.io_addr + 1);
}
spin_unlock(&io_lock);
spin_unlock(&pcwd_private.io_lock);
if (revision == PCWD_REVISION_A) {
if (pcwd_private.revision == PCWD_REVISION_A) {
if (card_status & WD_WDRST)
*status |= WDIOF_CARDRESET;
@ -360,10 +455,10 @@ static int pcwd_get_status(int *status)
static int pcwd_clear_status(void)
{
if (revision == PCWD_REVISION_C) {
spin_lock(&io_lock);
outb_p(0x00, current_readport + 1); /* clear reset status */
spin_unlock(&io_lock);
if (pcwd_private.revision == PCWD_REVISION_C) {
spin_lock(&pcwd_private.io_lock);
outb_p(0x00, pcwd_private.io_addr + 1); /* clear reset status */
spin_unlock(&pcwd_private.io_lock);
}
return 0;
}
@ -371,20 +466,20 @@ static int pcwd_clear_status(void)
static int pcwd_get_temperature(int *temperature)
{
/* check that port 0 gives temperature info and no command results */
if (command_mode)
if (pcwd_private.command_mode)
return -1;
*temperature = 0;
if (!supports_temp)
if (!pcwd_private.supports_temp)
return -ENODEV;
/*
* Convert celsius to fahrenheit, since this was
* the decided 'standard' for this return value.
*/
spin_lock(&io_lock);
*temperature = ((inb(current_readport)) * 9 / 5) + 32;
spin_unlock(&io_lock);
spin_lock(&pcwd_private.io_lock);
*temperature = ((inb(pcwd_private.io_addr)) * 9 / 5) + 32;
spin_unlock(&pcwd_private.io_lock);
return 0;
}
@ -425,7 +520,7 @@ static int pcwd_ioctl(struct inode *inode, struct file *file,
return put_user(status, argp);
case WDIOC_GETBOOTSTATUS:
return put_user(initial_status, argp);
return put_user(pcwd_private.boot_status, argp);
case WDIOC_GETTEMP:
if (pcwd_get_temperature(&temperature))
@ -434,7 +529,7 @@ static int pcwd_ioctl(struct inode *inode, struct file *file,
return put_user(temperature, argp);
case WDIOC_SETOPTIONS:
if (revision == PCWD_REVISION_C)
if (pcwd_private.revision == PCWD_REVISION_C)
{
if(copy_from_user(&rv, argp, sizeof(int)))
return -EFAULT;
@ -550,7 +645,7 @@ static ssize_t pcwd_temp_read(struct file *file, char __user *buf, size_t count,
static int pcwd_temp_open(struct inode *inode, struct file *file)
{
if (!supports_temp)
if (!pcwd_private.supports_temp)
return -ENODEV;
return nonseekable_open(inode, file);
@ -616,68 +711,24 @@ static struct notifier_block pcwd_notifier = {
* Init & exit routines
*/
static inline void get_support(void)
{
if (inb(current_readport) != 0xF0)
supports_temp = 1;
}
static inline int get_revision(void)
{
int r = PCWD_REVISION_C;
spin_lock(&io_lock);
spin_lock(&pcwd_private.io_lock);
/* REV A cards use only 2 io ports; test
* presumes a floating bus reads as 0xff. */
if ((inb(current_readport + 2) == 0xFF) ||
(inb(current_readport + 3) == 0xFF))
if ((inb(pcwd_private.io_addr + 2) == 0xFF) ||
(inb(pcwd_private.io_addr + 3) == 0xFF))
r=PCWD_REVISION_A;
spin_unlock(&io_lock);
spin_unlock(&pcwd_private.io_lock);
return r;
}
static inline char *get_firmware(void)
{
int one, ten, hund, minor;
char *ret;
ret = kmalloc(6, GFP_KERNEL);
if(ret == NULL)
return NULL;
if (set_command_mode()) {
one = send_isa_command(CMD_ISA_VERSION_INTEGER);
ten = send_isa_command(CMD_ISA_VERSION_TENTH);
hund = send_isa_command(CMD_ISA_VERSION_HUNDRETH);
minor = send_isa_command(CMD_ISA_VERSION_MINOR);
sprintf(ret, "%c.%c%c%c", one, ten, hund, minor);
}
else
sprintf(ret, "ERROR");
unset_command_mode();
return(ret);
}
static inline int get_option_switches(void)
{
int rv=0;
if (set_command_mode()) {
/* Get switch settings */
rv = send_isa_command(CMD_ISA_SWITCH_SETTINGS);
}
unset_command_mode();
return(rv);
}
static int __devinit pcwatchdog_init(int base_addr)
{
int ret;
char *firmware;
int option_switches;
cards_found++;
if (cards_found == 1)
@ -692,104 +743,66 @@ static int __devinit pcwatchdog_init(int base_addr)
printk(KERN_ERR PFX "No I/O-Address for card detected\n");
return -ENODEV;
}
current_readport = base_addr;
pcwd_private.io_addr = base_addr;
/* Check card's revision */
revision = get_revision();
pcwd_private.revision = get_revision();
if (!request_region(current_readport, (revision == PCWD_REVISION_A) ? 2 : 4, "PCWD")) {
if (!request_region(pcwd_private.io_addr, (pcwd_private.revision == PCWD_REVISION_A) ? 2 : 4, "PCWD")) {
printk(KERN_ERR PFX "I/O address 0x%04x already in use\n",
current_readport);
current_readport = 0x0000;
pcwd_private.io_addr);
pcwd_private.io_addr = 0x0000;
return -EIO;
}
/* Initial variables */
supports_temp = 0;
pcwd_private.supports_temp = 0;
temp_panic = 0;
initial_status = 0x0000;
pcwd_private.boot_status = 0x0000;
/* get the boot_status */
pcwd_get_status(&initial_status);
pcwd_get_status(&pcwd_private.boot_status);
/* clear the "card caused reboot" flag */
pcwd_clear_status();
init_timer(&timer);
timer.function = pcwd_timer_ping;
timer.data = 0;
init_timer(&pcwd_private.timer);
pcwd_private.timer.function = pcwd_timer_ping;
pcwd_private.timer.data = 0;
/* Disable the board */
pcwd_stop();
/* Check whether or not the card supports the temperature device */
get_support();
pcwd_check_temperature_support();
/* Get some extra info from the hardware (in command/debug/diag mode) */
if (revision == PCWD_REVISION_A)
printk(KERN_INFO PFX "ISA-PC Watchdog (REV.A) detected at port 0x%04x\n", current_readport);
else if (revision == PCWD_REVISION_C) {
firmware = get_firmware();
printk(KERN_INFO PFX "ISA-PC Watchdog (REV.C) detected at port 0x%04x (Firmware version: %s)\n",
current_readport, firmware);
kfree(firmware);
option_switches = get_option_switches();
printk(KERN_INFO PFX "Option switches (0x%02x): Temperature Reset Enable=%s, Power On Delay=%s\n",
option_switches,
((option_switches & 0x10) ? "ON" : "OFF"),
((option_switches & 0x08) ? "ON" : "OFF"));
/* Reprogram internal heartbeat to 2 seconds */
if (set_command_mode()) {
send_isa_command(CMD_ISA_DELAY_TIME_2SECS);
unset_command_mode();
}
} else {
/* Should NEVER happen, unless get_revision() fails. */
printk(KERN_INFO PFX "Unable to get revision\n");
release_region(current_readport, (revision == PCWD_REVISION_A) ? 2 : 4);
current_readport = 0x0000;
return -1;
}
if (supports_temp)
printk(KERN_INFO PFX "Temperature Option Detected\n");
if (initial_status & WDIOF_CARDRESET)
printk(KERN_INFO PFX "Previous reboot was caused by the card\n");
if (initial_status & WDIOF_OVERHEAT) {
printk(KERN_EMERG PFX "Card senses a CPU Overheat. Panicking!\n");
printk(KERN_EMERG PFX "CPU Overheat\n");
}
if (initial_status == 0)
printk(KERN_INFO PFX "No previous trip detected - Cold boot or reset\n");
/* Show info about the card itself */
pcwd_show_card_info();
/* Check that the heartbeat value is within it's range ; if not reset to the default */
if (pcwd_set_heartbeat(heartbeat)) {
pcwd_set_heartbeat(WATCHDOG_HEARTBEAT);
printk(KERN_INFO PFX "heartbeat value must be 2<=heartbeat<=7200, using %d\n",
WATCHDOG_HEARTBEAT);
if (pcwd_set_heartbeat(heartbeat)) {
pcwd_set_heartbeat(WATCHDOG_HEARTBEAT);
printk(KERN_INFO PFX "heartbeat value must be 2<=heartbeat<=7200, using %d\n",
WATCHDOG_HEARTBEAT);
}
ret = register_reboot_notifier(&pcwd_notifier);
if (ret) {
printk(KERN_ERR PFX "cannot register reboot notifier (err=%d)\n",
ret);
release_region(current_readport, (revision == PCWD_REVISION_A) ? 2 : 4);
current_readport = 0x0000;
release_region(pcwd_private.io_addr, (pcwd_private.revision == PCWD_REVISION_A) ? 2 : 4);
pcwd_private.io_addr = 0x0000;
return ret;
}
if (supports_temp) {
if (pcwd_private.supports_temp) {
ret = misc_register(&temp_miscdev);
if (ret) {
printk(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n",
TEMP_MINOR, ret);
unregister_reboot_notifier(&pcwd_notifier);
release_region(current_readport, (revision == PCWD_REVISION_A) ? 2 : 4);
current_readport = 0x0000;
release_region(pcwd_private.io_addr, (pcwd_private.revision == PCWD_REVISION_A) ? 2 : 4);
pcwd_private.io_addr = 0x0000;
return ret;
}
}
@ -798,11 +811,11 @@ static int __devinit pcwatchdog_init(int base_addr)
if (ret) {
printk(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n",
WATCHDOG_MINOR, ret);
if (supports_temp)
if (pcwd_private.supports_temp)
misc_deregister(&temp_miscdev);
unregister_reboot_notifier(&pcwd_notifier);
release_region(current_readport, (revision == PCWD_REVISION_A) ? 2 : 4);
current_readport = 0x0000;
release_region(pcwd_private.io_addr, (pcwd_private.revision == PCWD_REVISION_A) ? 2 : 4);
pcwd_private.io_addr = 0x0000;
return ret;
}
@ -820,11 +833,12 @@ static void __devexit pcwatchdog_exit(void)
/* Deregister */
misc_deregister(&pcwd_miscdev);
if (supports_temp)
if (pcwd_private.supports_temp)
misc_deregister(&temp_miscdev);
unregister_reboot_notifier(&pcwd_notifier);
release_region(current_readport, (revision == PCWD_REVISION_A) ? 2 : 4);
current_readport = 0x0000;
release_region(pcwd_private.io_addr, (pcwd_private.revision == PCWD_REVISION_A) ? 2 : 4);
pcwd_private.io_addr = 0x0000;
cards_found--;
}
/*
@ -887,7 +901,7 @@ static int __init pcwd_init_module(void)
{
int i, found = 0;
spin_lock_init(&io_lock);
spin_lock_init(&pcwd_private.io_lock);
for (i = 0; pcwd_ioports[i] != 0; i++) {
if (pcwd_checkcard(pcwd_ioports[i])) {
@ -906,7 +920,7 @@ static int __init pcwd_init_module(void)
static void __exit pcwd_cleanup_module(void)
{
if (current_readport)
if (pcwd_private.io_addr)
pcwatchdog_exit();
return;
}

View File

@ -93,23 +93,25 @@ static int sa1100dog_ioctl(struct inode *inode, struct file *file,
{
int ret = -ENOIOCTLCMD;
int time;
void __user *argp = (void __user *)arg;
int __user *p = argp;
switch (cmd) {
case WDIOC_GETSUPPORT:
ret = copy_to_user((struct watchdog_info __user *)arg, &ident,
ret = copy_to_user(argp, &ident,
sizeof(ident)) ? -EFAULT : 0;
break;
case WDIOC_GETSTATUS:
ret = put_user(0, (int __user *)arg);
ret = put_user(0, p);
break;
case WDIOC_GETBOOTSTATUS:
ret = put_user(boot_status, (int __user *)arg);
ret = put_user(boot_status, p);
break;
case WDIOC_SETTIMEOUT:
ret = get_user(time, (int __user *)arg);
ret = get_user(time, p);
if (ret)
break;
@ -123,7 +125,7 @@ static int sa1100dog_ioctl(struct inode *inode, struct file *file,
/*fall through*/
case WDIOC_GETTIMEOUT:
ret = put_user(pre_margin / OSCR_FREQ, (int __user *)arg);
ret = put_user(pre_margin / OSCR_FREQ, p);
break;
case WDIOC_KEEPALIVE:

View File

@ -590,6 +590,7 @@ static struct pcmcia_device_id orinoco_cs_ids[] = {
PCMCIA_DEVICE_PROD_ID12("PROXIM", "LAN PC CARD HARMONY 80211B", 0xc6536a5e, 0x090c3cd9),
PCMCIA_DEVICE_PROD_ID12("PROXIM", "LAN PCI CARD HARMONY 80211B", 0xc6536a5e, 0x9f494e26),
PCMCIA_DEVICE_PROD_ID12("SAMSUNG", "11Mbps WLAN Card", 0x43d74cb4, 0x579bd91b),
PCMCIA_DEVICE_PROD_ID12("SMC", "SMC2532W-B EliteConnect Wireless Adapter", 0xc4f8b18b, 0x196bd757),
PCMCIA_DEVICE_PROD_ID12("SMC", "SMC2632W", 0xc4f8b18b, 0x474a1f2a),
PCMCIA_DEVICE_PROD_ID12("Symbol Technologies", "LA4111 Spectrum24 Wireless LAN PC Card", 0x3f02b4d6, 0x3663cb0e),
PCMCIA_DEVICE_PROD_ID123("The Linksys Group, Inc.", "Instant Wireless Network PC Card", "ISL37300P", 0xa5f472c2, 0x590eb502, 0xc9049a39),

View File

@ -85,11 +85,10 @@ static volatile enum sclp_mask_state_t {
/* Maximum retry counts */
#define SCLP_INIT_RETRY 3
#define SCLP_MASK_RETRY 3
#define SCLP_REQUEST_RETRY 3
/* Timeout intervals in seconds.*/
#define SCLP_BUSY_INTERVAL 2
#define SCLP_RETRY_INTERVAL 5
#define SCLP_BUSY_INTERVAL 10
#define SCLP_RETRY_INTERVAL 15
static void sclp_process_queue(void);
static int sclp_init_mask(int calculate);
@ -153,11 +152,9 @@ __sclp_start_request(struct sclp_req *req)
if (sclp_running_state != sclp_running_state_idle)
return 0;
del_timer(&sclp_request_timer);
if (req->start_count <= SCLP_REQUEST_RETRY) {
rc = service_call(req->command, req->sccb);
req->start_count++;
} else
rc = -EIO;
rc = service_call(req->command, req->sccb);
req->start_count++;
if (rc == 0) {
/* Sucessfully started request */
req->status = SCLP_REQ_RUNNING;

View File

@ -232,7 +232,7 @@ s390_subchannel_remove_chpid(struct device *dev, void *data)
return 0;
mask = 0x80 >> j;
spin_lock(&sch->lock);
spin_lock_irq(&sch->lock);
stsch(sch->schid, &schib);
if (!schib.pmcw.dnv)
@ -281,10 +281,10 @@ s390_subchannel_remove_chpid(struct device *dev, void *data)
if (sch->driver && sch->driver->verify)
sch->driver->verify(&sch->dev);
out_unlock:
spin_unlock(&sch->lock);
spin_unlock_irq(&sch->lock);
return 0;
out_unreg:
spin_unlock(&sch->lock);
spin_unlock_irq(&sch->lock);
sch->lpm = 0;
if (css_enqueue_subchannel_slow(sch->schid)) {
css_clear_subchannel_slow_list();
@ -652,7 +652,7 @@ __chp_add(struct subchannel_id schid, void *data)
if (!sch)
/* Check if the subchannel is now available. */
return __chp_add_new_sch(schid);
spin_lock(&sch->lock);
spin_lock_irq(&sch->lock);
for (i=0; i<8; i++)
if (sch->schib.pmcw.chpid[i] == chp->id) {
if (stsch(sch->schid, &sch->schib) != 0) {
@ -674,7 +674,7 @@ __chp_add(struct subchannel_id schid, void *data)
if (sch->driver && sch->driver->verify)
sch->driver->verify(&sch->dev);
spin_unlock(&sch->lock);
spin_unlock_irq(&sch->lock);
put_device(&sch->dev);
return 0;
}

View File

@ -211,7 +211,6 @@ static struct scsi_host_template ahci_sht = {
.can_queue = ATA_DEF_QUEUE,
.this_id = ATA_SHT_THIS_ID,
.sg_tablesize = AHCI_MAX_SG,
.max_sectors = ATA_MAX_SECTORS,
.cmd_per_lun = ATA_SHT_CMD_PER_LUN,
.emulated = ATA_SHT_EMULATED,
.use_clustering = AHCI_USE_CLUSTERING,
@ -617,7 +616,8 @@ static void ahci_qc_prep(struct ata_queued_cmd *qc)
ata_tf_to_fis(&qc->tf, pp->cmd_tbl, 0);
if (is_atapi) {
memset(pp->cmd_tbl + AHCI_CMD_TBL_CDB, 0, 32);
memcpy(pp->cmd_tbl + AHCI_CMD_TBL_CDB, qc->cdb, ap->cdb_len);
memcpy(pp->cmd_tbl + AHCI_CMD_TBL_CDB, qc->cdb,
qc->dev->cdb_len);
}
n_elem = 0;

View File

@ -185,7 +185,6 @@ static struct scsi_host_template piix_sht = {
.can_queue = ATA_DEF_QUEUE,
.this_id = ATA_SHT_THIS_ID,
.sg_tablesize = LIBATA_MAX_PRD,
.max_sectors = ATA_MAX_SECTORS,
.cmd_per_lun = ATA_SHT_CMD_PER_LUN,
.emulated = ATA_SHT_EMULATED,
.use_clustering = ATA_SHT_USE_CLUSTERING,
@ -415,9 +414,6 @@ static int piix_sata_probe (struct ata_port *ap)
int orig_mask, mask, i;
u8 pcs;
mask = (PIIX_PORT_PRESENT << ap->hard_port_no) |
(PIIX_PORT_ENABLED << ap->hard_port_no);
pci_read_config_byte(pdev, ICH5_PCS, &pcs);
orig_mask = (int) pcs & 0xff;

View File

@ -520,6 +520,49 @@ void ata_dev_id_string(const u16 *id, unsigned char *s,
}
}
/**
* ata_dev_id_c_string - Convert IDENTIFY DEVICE page into C string
* @id: IDENTIFY DEVICE results we will examine
* @s: string into which data is output
* @ofs: offset into identify device page
* @len: length of string to return. must be an odd number.
*
* This function is identical to ata_dev_id_string except that it
* trims trailing spaces and terminates the resulting string with
* null. @len must be actual maximum length (even number) + 1.
*
* LOCKING:
* caller.
*/
void ata_dev_id_c_string(const u16 *id, unsigned char *s,
unsigned int ofs, unsigned int len)
{
unsigned char *p;
WARN_ON(!(len & 1));
ata_dev_id_string(id, s, ofs, len - 1);
p = s + strnlen(s, len - 1);
while (p > s && p[-1] == ' ')
p--;
*p = '\0';
}
static u64 ata_id_n_sectors(const u16 *id)
{
if (ata_id_has_lba(id)) {
if (ata_id_has_lba48(id))
return ata_id_u64(id, 100);
else
return ata_id_u32(id, 60);
} else {
if (ata_id_current_chs_valid(id))
return ata_id_u32(id, 57);
else
return id[1] * id[3] * id[6];
}
}
/**
* ata_noop_dev_select - Select device 0/1 on ATA bus
@ -609,41 +652,41 @@ void ata_dev_select(struct ata_port *ap, unsigned int device,
/**
* ata_dump_id - IDENTIFY DEVICE info debugging output
* @dev: Device whose IDENTIFY DEVICE page we will dump
* @id: IDENTIFY DEVICE page to dump
*
* Dump selected 16-bit words from a detected device's
* IDENTIFY PAGE page.
* Dump selected 16-bit words from the given IDENTIFY DEVICE
* page.
*
* LOCKING:
* caller.
*/
static inline void ata_dump_id(const struct ata_device *dev)
static inline void ata_dump_id(const u16 *id)
{
DPRINTK("49==0x%04x "
"53==0x%04x "
"63==0x%04x "
"64==0x%04x "
"75==0x%04x \n",
dev->id[49],
dev->id[53],
dev->id[63],
dev->id[64],
dev->id[75]);
id[49],
id[53],
id[63],
id[64],
id[75]);
DPRINTK("80==0x%04x "
"81==0x%04x "
"82==0x%04x "
"83==0x%04x "
"84==0x%04x \n",
dev->id[80],
dev->id[81],
dev->id[82],
dev->id[83],
dev->id[84]);
id[80],
id[81],
id[82],
id[83],
id[84]);
DPRINTK("88==0x%04x "
"93==0x%04x\n",
dev->id[88],
dev->id[93]);
id[88],
id[93]);
}
/*
@ -877,12 +920,11 @@ static void ata_dev_identify(struct ata_port *ap, unsigned int device)
{
struct ata_device *dev = &ap->device[device];
unsigned int major_version;
u16 tmp;
unsigned long xfer_modes;
unsigned int using_edd;
struct ata_taskfile tf;
unsigned int err_mask;
int rc;
int i, rc;
if (!ata_dev_present(dev)) {
DPRINTK("ENTER/EXIT (host %u, dev %u) -- nodev\n",
@ -890,7 +932,8 @@ static void ata_dev_identify(struct ata_port *ap, unsigned int device)
return;
}
if (ap->flags & (ATA_FLAG_SRST | ATA_FLAG_SATA_RESET))
if (ap->ops->probe_reset ||
ap->flags & (ATA_FLAG_SRST | ATA_FLAG_SATA_RESET))
using_edd = 0;
else
using_edd = 1;
@ -970,18 +1013,17 @@ retry:
if (!xfer_modes)
xfer_modes = ata_pio_modes(dev);
ata_dump_id(dev);
ata_dump_id(dev->id);
/* ATA-specific feature tests */
if (dev->class == ATA_DEV_ATA) {
dev->n_sectors = ata_id_n_sectors(dev->id);
if (!ata_id_is_ata(dev->id)) /* sanity check */
goto err_out_nosup;
/* get major version */
tmp = dev->id[ATA_ID_MAJOR_VER];
for (major_version = 14; major_version >= 1; major_version--)
if (tmp & (1 << major_version))
break;
major_version = ata_id_major_version(dev->id);
/*
* The exact sequence expected by certain pre-ATA4 drives is:
@ -1003,12 +1045,8 @@ retry:
if (ata_id_has_lba(dev->id)) {
dev->flags |= ATA_DFLAG_LBA;
if (ata_id_has_lba48(dev->id)) {
if (ata_id_has_lba48(dev->id))
dev->flags |= ATA_DFLAG_LBA48;
dev->n_sectors = ata_id_u64(dev->id, 100);
} else {
dev->n_sectors = ata_id_u32(dev->id, 60);
}
/* print device info to dmesg */
printk(KERN_INFO "ata%u: dev %u ATA-%d, max %s, %Lu sectors:%s\n",
@ -1024,15 +1062,12 @@ retry:
dev->cylinders = dev->id[1];
dev->heads = dev->id[3];
dev->sectors = dev->id[6];
dev->n_sectors = dev->cylinders * dev->heads * dev->sectors;
if (ata_id_current_chs_valid(dev->id)) {
/* Current CHS translation is valid. */
dev->cylinders = dev->id[54];
dev->heads = dev->id[55];
dev->sectors = dev->id[56];
dev->n_sectors = ata_id_u32(dev->id, 57);
}
/* print device info to dmesg */
@ -1051,7 +1086,6 @@ retry:
ap->id, device, dev->multi_count);
}
ap->host->max_cmd_len = 16;
}
/* ATAPI-specific feature tests */
@ -1064,8 +1098,7 @@ retry:
printk(KERN_WARNING "ata%u: unsupported CDB len\n", ap->id);
goto err_out_nosup;
}
ap->cdb_len = (unsigned int) rc;
ap->host->max_cmd_len = (unsigned char) ap->cdb_len;
dev->cdb_len = (unsigned int) rc;
if (ata_id_cdb_intr(dev->id))
dev->flags |= ATA_DFLAG_CDB_INTR;
@ -1076,6 +1109,12 @@ retry:
ata_mode_string(xfer_modes));
}
ap->host->max_cmd_len = 0;
for (i = 0; i < ATA_MAX_DEVICES; i++)
ap->host->max_cmd_len = max_t(unsigned int,
ap->host->max_cmd_len,
ap->device[i].cdb_len);
DPRINTK("EXIT, drv_stat = 0x%x\n", ata_chk_status(ap));
return;
@ -1088,9 +1127,10 @@ err_out:
}
static inline u8 ata_dev_knobble(const struct ata_port *ap)
static inline u8 ata_dev_knobble(const struct ata_port *ap,
struct ata_device *dev)
{
return ((ap->cbl == ATA_CBL_SATA) && (!ata_id_is_sata(ap->device->id)));
return ((ap->cbl == ATA_CBL_SATA) && (!ata_id_is_sata(dev->id)));
}
/**
@ -1104,13 +1144,11 @@ static inline u8 ata_dev_knobble(const struct ata_port *ap)
void ata_dev_config(struct ata_port *ap, unsigned int i)
{
/* limit bridge transfers to udma5, 200 sectors */
if (ata_dev_knobble(ap)) {
if (ata_dev_knobble(ap, &ap->device[i])) {
printk(KERN_INFO "ata%u(%u): applying bridge limits\n",
ap->id, ap->device->devno);
ap->id, i);
ap->udma_mask &= ATA_UDMA5;
ap->host->max_sectors = ATA_MAX_SECTORS;
ap->host->hostt->max_sectors = ATA_MAX_SECTORS;
ap->device[i].flags |= ATA_DFLAG_LOCK_SECTORS;
ap->device[i].max_sectors = ATA_MAX_SECTORS;
}
if (ap->ops->dev_config)
@ -1144,8 +1182,11 @@ static int ata_bus_probe(struct ata_port *ap)
rc = ap->ops->probe_reset(ap, classes);
if (rc == 0) {
for (i = 0; i < ATA_MAX_DEVICES; i++)
for (i = 0; i < ATA_MAX_DEVICES; i++) {
if (classes[i] == ATA_DEV_UNKNOWN)
classes[i] = ATA_DEV_NONE;
ap->device[i].class = classes[i];
}
} else {
printk(KERN_ERR "ata%u: probe reset failed, "
"disabling port\n", ap->id);
@ -2272,24 +2313,14 @@ static const char * const ata_dma_blacklist [] = {
static int ata_dma_blacklisted(const struct ata_device *dev)
{
unsigned char model_num[40];
char *s;
unsigned int len;
unsigned char model_num[41];
int i;
ata_dev_id_string(dev->id, model_num, ATA_ID_PROD_OFS,
sizeof(model_num));
s = &model_num[0];
len = strnlen(s, sizeof(model_num));
/* ATAPI specifies that empty space is blank-filled; remove blanks */
while ((len > 0) && (s[len - 1] == ' ')) {
len--;
s[len] = 0;
}
ata_dev_id_c_string(dev->id, model_num, ATA_ID_PROD_OFS,
sizeof(model_num));
for (i = 0; i < ARRAY_SIZE(ata_dma_blacklist); i++)
if (!strncmp(ata_dma_blacklist[i], s, len))
if (!strcmp(ata_dma_blacklist[i], model_num))
return 1;
return 0;
@ -2485,7 +2516,7 @@ static void ata_dev_reread_id(struct ata_port *ap, struct ata_device *dev)
swap_buf_le16(dev->id, ATA_ID_WORDS);
ata_dump_id(dev);
ata_dump_id(dev->id);
DPRINTK("EXIT\n");
@ -5179,6 +5210,7 @@ EXPORT_SYMBOL_GPL(ata_scsi_release);
EXPORT_SYMBOL_GPL(ata_host_intr);
EXPORT_SYMBOL_GPL(ata_dev_classify);
EXPORT_SYMBOL_GPL(ata_dev_id_string);
EXPORT_SYMBOL_GPL(ata_dev_id_c_string);
EXPORT_SYMBOL_GPL(ata_dev_config);
EXPORT_SYMBOL_GPL(ata_scsi_simulate);
EXPORT_SYMBOL_GPL(ata_eh_qc_complete);

View File

@ -684,23 +684,23 @@ int ata_scsi_slave_config(struct scsi_device *sdev)
if (sdev->id < ATA_MAX_DEVICES) {
struct ata_port *ap;
struct ata_device *dev;
unsigned int max_sectors;
ap = (struct ata_port *) &sdev->host->hostdata[0];
dev = &ap->device[sdev->id];
/* TODO: 1024 is an arbitrary number, not the
/* TODO: 2048 is an arbitrary number, not the
* hardware maximum. This should be increased to
* 65534 when Jens Axboe's patch for dynamically
* determining max_sectors is merged.
*/
if ((dev->flags & ATA_DFLAG_LBA48) &&
((dev->flags & ATA_DFLAG_LOCK_SECTORS) == 0)) {
/*
* do not overwrite sdev->host->max_sectors, since
* other drives on this host may not support LBA48
*/
blk_queue_max_sectors(sdev->request_queue, 2048);
}
max_sectors = ATA_MAX_SECTORS;
if (dev->flags & ATA_DFLAG_LBA48)
max_sectors = 2048;
if (dev->max_sectors)
max_sectors = dev->max_sectors;
blk_queue_max_sectors(sdev->request_queue, max_sectors);
/*
* SATA DMA transfers must be multiples of 4 byte, so
@ -1806,15 +1806,12 @@ static int ata_dev_supports_fua(u16 *id)
if (!ata_id_has_fua(id))
return 0;
model[40] = '\0';
fw[8] = '\0';
ata_dev_id_c_string(id, model, ATA_ID_PROD_OFS, sizeof(model));
ata_dev_id_c_string(id, fw, ATA_ID_FW_REV_OFS, sizeof(fw));
ata_dev_id_string(id, model, ATA_ID_PROD_OFS, sizeof(model) - 1);
ata_dev_id_string(id, fw, ATA_ID_FW_REV_OFS, sizeof(fw) - 1);
if (strncmp(model, "Maxtor", 6))
if (strcmp(model, "Maxtor"))
return 1;
if (strncmp(fw, "BANC1G10", 8))
if (strcmp(fw, "BANC1G10"))
return 1;
return 0; /* blacklisted */
@ -2149,7 +2146,7 @@ static void atapi_request_sense(struct ata_queued_cmd *qc)
ata_sg_init_one(qc, cmd->sense_buffer, sizeof(cmd->sense_buffer));
qc->dma_dir = DMA_FROM_DEVICE;
memset(&qc->cdb, 0, ap->cdb_len);
memset(&qc->cdb, 0, qc->dev->cdb_len);
qc->cdb[0] = REQUEST_SENSE;
qc->cdb[4] = SCSI_SENSE_BUFFERSIZE;
@ -2251,7 +2248,7 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc, const u8 *scsicmd)
if (ata_check_atapi_dma(qc))
using_pio = 1;
memcpy(&qc->cdb, scsicmd, qc->ap->cdb_len);
memcpy(&qc->cdb, scsicmd, dev->cdb_len);
qc->complete_fn = atapi_qc_complete;

View File

@ -148,7 +148,6 @@ static struct scsi_host_template adma_ata_sht = {
.can_queue = ATA_DEF_QUEUE,
.this_id = ATA_SHT_THIS_ID,
.sg_tablesize = LIBATA_MAX_PRD,
.max_sectors = ATA_MAX_SECTORS,
.cmd_per_lun = ATA_SHT_CMD_PER_LUN,
.emulated = ATA_SHT_EMULATED,
.use_clustering = ENABLE_CLUSTERING,

View File

@ -383,7 +383,6 @@ static struct scsi_host_template mv_sht = {
.can_queue = MV_USE_Q_DEPTH,
.this_id = ATA_SHT_THIS_ID,
.sg_tablesize = MV_MAX_SG_CT / 2,
.max_sectors = ATA_MAX_SECTORS,
.cmd_per_lun = ATA_SHT_CMD_PER_LUN,
.emulated = ATA_SHT_EMULATED,
.use_clustering = ATA_SHT_USE_CLUSTERING,

View File

@ -234,7 +234,6 @@ static struct scsi_host_template nv_sht = {
.can_queue = ATA_DEF_QUEUE,
.this_id = ATA_SHT_THIS_ID,
.sg_tablesize = LIBATA_MAX_PRD,
.max_sectors = ATA_MAX_SECTORS,
.cmd_per_lun = ATA_SHT_CMD_PER_LUN,
.emulated = ATA_SHT_EMULATED,
.use_clustering = ATA_SHT_USE_CLUSTERING,

View File

@ -117,7 +117,6 @@ static struct scsi_host_template pdc_ata_sht = {
.can_queue = ATA_DEF_QUEUE,
.this_id = ATA_SHT_THIS_ID,
.sg_tablesize = LIBATA_MAX_PRD,
.max_sectors = ATA_MAX_SECTORS,
.cmd_per_lun = ATA_SHT_CMD_PER_LUN,
.emulated = ATA_SHT_EMULATED,
.use_clustering = ATA_SHT_USE_CLUSTERING,

View File

@ -137,7 +137,6 @@ static struct scsi_host_template qs_ata_sht = {
.can_queue = ATA_DEF_QUEUE,
.this_id = ATA_SHT_THIS_ID,
.sg_tablesize = QS_MAX_PRD,
.max_sectors = ATA_MAX_SECTORS,
.cmd_per_lun = ATA_SHT_CMD_PER_LUN,
.emulated = ATA_SHT_EMULATED,
//FIXME .use_clustering = ATA_SHT_USE_CLUSTERING,

View File

@ -140,7 +140,6 @@ static struct scsi_host_template sil_sht = {
.can_queue = ATA_DEF_QUEUE,
.this_id = ATA_SHT_THIS_ID,
.sg_tablesize = LIBATA_MAX_PRD,
.max_sectors = ATA_MAX_SECTORS,
.cmd_per_lun = ATA_SHT_CMD_PER_LUN,
.emulated = ATA_SHT_EMULATED,
.use_clustering = ATA_SHT_USE_CLUSTERING,
@ -337,22 +336,13 @@ static void sil_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val)
static void sil_dev_config(struct ata_port *ap, struct ata_device *dev)
{
unsigned int n, quirks = 0;
unsigned char model_num[40];
const char *s;
unsigned int len;
unsigned char model_num[41];
ata_dev_id_string(dev->id, model_num, ATA_ID_PROD_OFS,
sizeof(model_num));
s = &model_num[0];
len = strnlen(s, sizeof(model_num));
/* ATAPI specifies that empty space is blank-filled; remove blanks */
while ((len > 0) && (s[len - 1] == ' '))
len--;
ata_dev_id_c_string(dev->id, model_num, ATA_ID_PROD_OFS,
sizeof(model_num));
for (n = 0; sil_blacklist[n].product; n++)
if (!memcmp(sil_blacklist[n].product, s,
strlen(sil_blacklist[n].product))) {
if (!strcmp(sil_blacklist[n].product, model_num)) {
quirks = sil_blacklist[n].quirk;
break;
}
@ -363,16 +353,14 @@ static void sil_dev_config(struct ata_port *ap, struct ata_device *dev)
(quirks & SIL_QUIRK_MOD15WRITE))) {
printk(KERN_INFO "ata%u(%u): applying Seagate errata fix (mod15write workaround)\n",
ap->id, dev->devno);
ap->host->max_sectors = 15;
ap->host->hostt->max_sectors = 15;
dev->flags |= ATA_DFLAG_LOCK_SECTORS;
dev->max_sectors = 15;
return;
}
/* limit to udma5 */
if (quirks & SIL_QUIRK_UDMA5MAX) {
printk(KERN_INFO "ata%u(%u): applying Maxtor errata fix %s\n",
ap->id, dev->devno, s);
ap->id, dev->devno, model_num);
ap->udma_mask &= ATA_UDMA5;
return;
}

View File

@ -285,7 +285,6 @@ static struct scsi_host_template sil24_sht = {
.can_queue = ATA_DEF_QUEUE,
.this_id = ATA_SHT_THIS_ID,
.sg_tablesize = LIBATA_MAX_PRD,
.max_sectors = ATA_MAX_SECTORS,
.cmd_per_lun = ATA_SHT_CMD_PER_LUN,
.emulated = ATA_SHT_EMULATED,
.use_clustering = ATA_SHT_USE_CLUSTERING,
@ -371,7 +370,7 @@ static void sil24_dev_config(struct ata_port *ap, struct ata_device *dev)
{
void __iomem *port = (void __iomem *)ap->ioaddr.cmd_addr;
if (ap->cdb_len == 16)
if (dev->cdb_len == 16)
writel(PORT_CS_CDB16, port + PORT_CTRL_STAT);
else
writel(PORT_CS_CDB16, port + PORT_CTRL_CLR);
@ -543,7 +542,7 @@ static void sil24_qc_prep(struct ata_queued_cmd *qc)
prb = &cb->atapi.prb;
sge = cb->atapi.sge;
memset(cb->atapi.cdb, 0, 32);
memcpy(cb->atapi.cdb, qc->cdb, ap->cdb_len);
memcpy(cb->atapi.cdb, qc->cdb, qc->dev->cdb_len);
if (qc->tf.protocol != ATA_PROT_ATAPI_NODATA) {
if (qc->tf.flags & ATA_TFLAG_WRITE)

View File

@ -92,7 +92,6 @@ static struct scsi_host_template sis_sht = {
.can_queue = ATA_DEF_QUEUE,
.this_id = ATA_SHT_THIS_ID,
.sg_tablesize = ATA_MAX_PRD,
.max_sectors = ATA_MAX_SECTORS,
.cmd_per_lun = ATA_SHT_CMD_PER_LUN,
.emulated = ATA_SHT_EMULATED,
.use_clustering = ATA_SHT_USE_CLUSTERING,

View File

@ -293,7 +293,6 @@ static struct scsi_host_template k2_sata_sht = {
.can_queue = ATA_DEF_QUEUE,
.this_id = ATA_SHT_THIS_ID,
.sg_tablesize = LIBATA_MAX_PRD,
.max_sectors = ATA_MAX_SECTORS,
.cmd_per_lun = ATA_SHT_CMD_PER_LUN,
.emulated = ATA_SHT_EMULATED,
.use_clustering = ATA_SHT_USE_CLUSTERING,

View File

@ -187,7 +187,6 @@ static struct scsi_host_template pdc_sata_sht = {
.can_queue = ATA_DEF_QUEUE,
.this_id = ATA_SHT_THIS_ID,
.sg_tablesize = LIBATA_MAX_PRD,
.max_sectors = ATA_MAX_SECTORS,
.cmd_per_lun = ATA_SHT_CMD_PER_LUN,
.emulated = ATA_SHT_EMULATED,
.use_clustering = ATA_SHT_USE_CLUSTERING,

View File

@ -80,7 +80,6 @@ static struct scsi_host_template uli_sht = {
.can_queue = ATA_DEF_QUEUE,
.this_id = ATA_SHT_THIS_ID,
.sg_tablesize = LIBATA_MAX_PRD,
.max_sectors = ATA_MAX_SECTORS,
.cmd_per_lun = ATA_SHT_CMD_PER_LUN,
.emulated = ATA_SHT_EMULATED,
.use_clustering = ATA_SHT_USE_CLUSTERING,

View File

@ -99,7 +99,6 @@ static struct scsi_host_template svia_sht = {
.can_queue = ATA_DEF_QUEUE,
.this_id = ATA_SHT_THIS_ID,
.sg_tablesize = LIBATA_MAX_PRD,
.max_sectors = ATA_MAX_SECTORS,
.cmd_per_lun = ATA_SHT_CMD_PER_LUN,
.emulated = ATA_SHT_EMULATED,
.use_clustering = ATA_SHT_USE_CLUSTERING,

View File

@ -228,7 +228,6 @@ static struct scsi_host_template vsc_sata_sht = {
.can_queue = ATA_DEF_QUEUE,
.this_id = ATA_SHT_THIS_ID,
.sg_tablesize = LIBATA_MAX_PRD,
.max_sectors = ATA_MAX_SECTORS,
.cmd_per_lun = ATA_SHT_CMD_PER_LUN,
.emulated = ATA_SHT_EMULATED,
.use_clustering = ATA_SHT_USE_CLUSTERING,

View File

@ -525,11 +525,6 @@ config FB_GBE_MEM
This is the amount of memory reserved for the framebuffer,
which can be any value between 1MB and 8MB.
config BUS_I2C
bool
depends on (FB = y) && VISWS
default y
config FB_SUN3
bool "Sun3 framebuffer support"
depends on (FB = y) && (SUN3 || SUN3X) && BROKEN

View File

@ -1550,6 +1550,7 @@ int fb_get_options(char *name, char **option)
return retval;
}
#ifndef MODULE
/**
* video_setup - process command line options
* @options: string of options
@ -1593,6 +1594,7 @@ static int __init video_setup(char *options)
return 0;
}
__setup("video=", video_setup);
#endif
/*
* Visible symbols for modules

View File

@ -138,6 +138,8 @@ static struct pci_device_id nvidiafb_pci_tbl[] = {
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_420_8X,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_4000,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_448_GO,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_488_GO,

View File

@ -1751,11 +1751,15 @@ asmlinkage long compat_sys_select(int n, compat_ulong_t __user *inp,
ret = compat_core_sys_select(n, inp, outp, exp, &timeout);
if (tvp) {
struct compat_timeval rtv;
if (current->personality & STICKY_TIMEOUTS)
goto sticky;
tv.tv_usec = jiffies_to_usecs(do_div((*(u64*)&timeout), HZ));
tv.tv_sec = timeout;
if (copy_to_user(tvp, &tv, sizeof(tv))) {
rtv.tv_usec = jiffies_to_usecs(do_div((*(u64*)&timeout), HZ));
rtv.tv_sec = timeout;
if (compat_timeval_compare(&rtv, &tv) < 0)
rtv = tv;
if (copy_to_user(tvp, &rtv, sizeof(rtv))) {
sticky:
/*
* If an application puts its timeval in read-only
@ -1822,13 +1826,17 @@ asmlinkage long compat_sys_pselect7(int n, compat_ulong_t __user *inp,
} while (!ret && !timeout && tsp && (ts.tv_sec || ts.tv_nsec));
if (tsp && !(current->personality & STICKY_TIMEOUTS)) {
ts.tv_sec += timeout / HZ;
ts.tv_nsec += (timeout % HZ) * (1000000000/HZ);
if (ts.tv_nsec >= 1000000000) {
ts.tv_sec++;
ts.tv_nsec -= 1000000000;
struct compat_timespec rts;
rts.tv_sec = timeout / HZ;
rts.tv_nsec = (timeout % HZ) * (NSEC_PER_SEC/HZ);
if (rts.tv_nsec >= NSEC_PER_SEC) {
rts.tv_sec++;
rts.tv_nsec -= NSEC_PER_SEC;
}
(void)copy_to_user(tsp, &ts, sizeof(ts));
if (compat_timespec_compare(&rts, &ts) < 0)
rts = ts;
copy_to_user(tsp, &rts, sizeof(rts));
}
if (ret == -ERESTARTNOHAND) {
@ -1918,12 +1926,17 @@ asmlinkage long compat_sys_ppoll(struct pollfd __user *ufds,
sigprocmask(SIG_SETMASK, &sigsaved, NULL);
if (tsp && timeout >= 0) {
struct compat_timespec rts;
if (current->personality & STICKY_TIMEOUTS)
goto sticky;
/* Yes, we know it's actually an s64, but it's also positive. */
ts.tv_nsec = jiffies_to_usecs(do_div((*(u64*)&timeout), HZ)) * 1000;
ts.tv_sec = timeout;
if (copy_to_user(tsp, &ts, sizeof(ts))) {
rts.tv_nsec = jiffies_to_usecs(do_div((*(u64*)&timeout), HZ)) *
1000;
rts.tv_sec = timeout;
if (compat_timespec_compare(&rts, &ts) < 0)
rts = ts;
if (copy_to_user(tsp, &rts, sizeof(rts))) {
sticky:
/*
* If an application puts its timeval in read-only

View File

@ -1124,8 +1124,6 @@ static void handle_attrs(struct super_block *s)
"reiserfs: cannot support attributes until flag is set in super-block");
REISERFS_SB(s)->s_mount_opt &= ~(1 << REISERFS_ATTRS);
}
} else if (le32_to_cpu(rs->s_flags) & reiserfs_attrs_cleared) {
REISERFS_SB(s)->s_mount_opt |= (1 << REISERFS_ATTRS);
}
}

View File

@ -398,11 +398,15 @@ asmlinkage long sys_select(int n, fd_set __user *inp, fd_set __user *outp,
ret = core_sys_select(n, inp, outp, exp, &timeout);
if (tvp) {
struct timeval rtv;
if (current->personality & STICKY_TIMEOUTS)
goto sticky;
tv.tv_usec = jiffies_to_usecs(do_div((*(u64*)&timeout), HZ));
tv.tv_sec = timeout;
if (copy_to_user(tvp, &tv, sizeof(tv))) {
rtv.tv_usec = jiffies_to_usecs(do_div((*(u64*)&timeout), HZ));
rtv.tv_sec = timeout;
if (timeval_compare(&rtv, &tv) < 0)
rtv = tv;
if (copy_to_user(tvp, &rtv, sizeof(rtv))) {
sticky:
/*
* If an application puts its timeval in read-only
@ -460,11 +464,16 @@ asmlinkage long sys_pselect7(int n, fd_set __user *inp, fd_set __user *outp,
ret = core_sys_select(n, inp, outp, exp, &timeout);
if (tsp) {
struct timespec rts;
if (current->personality & STICKY_TIMEOUTS)
goto sticky;
ts.tv_nsec = jiffies_to_usecs(do_div((*(u64*)&timeout), HZ)) * 1000;
ts.tv_sec = timeout;
if (copy_to_user(tsp, &ts, sizeof(ts))) {
rts.tv_nsec = jiffies_to_usecs(do_div((*(u64*)&timeout), HZ)) *
1000;
rts.tv_sec = timeout;
if (timespec_compare(&rts, &ts) < 0)
rts = ts;
if (copy_to_user(tsp, &rts, sizeof(rts))) {
sticky:
/*
* If an application puts its timeval in read-only
@ -758,12 +767,17 @@ asmlinkage long sys_ppoll(struct pollfd __user *ufds, unsigned int nfds,
sigprocmask(SIG_SETMASK, &sigsaved, NULL);
if (tsp && timeout >= 0) {
struct timespec rts;
if (current->personality & STICKY_TIMEOUTS)
goto sticky;
/* Yes, we know it's actually an s64, but it's also positive. */
ts.tv_nsec = jiffies_to_usecs(do_div((*(u64*)&timeout), HZ)) * 1000;
ts.tv_sec = timeout;
if (copy_to_user(tsp, &ts, sizeof(ts))) {
rts.tv_nsec = jiffies_to_usecs(do_div((*(u64*)&timeout), HZ)) *
1000;
rts.tv_sec = timeout;
if (timespec_compare(&rts, &ts) < 0)
rts = ts;
if (copy_to_user(tsp, &rts, sizeof(rts))) {
sticky:
/*
* If an application puts its timeval in read-only

View File

@ -261,6 +261,7 @@ asmlinkage long sys_newlstat(char __user *filename, struct stat __user *statbuf)
return error;
}
#ifndef __ARCH_WANT_STAT64
asmlinkage long sys_newfstatat(int dfd, char __user *filename,
struct stat __user *statbuf, int flag)
{
@ -281,6 +282,7 @@ asmlinkage long sys_newfstatat(int dfd, char __user *filename,
out:
return error;
}
#endif
asmlinkage long sys_newfstat(unsigned int fd, struct stat __user *statbuf)
{
@ -395,6 +397,26 @@ asmlinkage long sys_fstat64(unsigned long fd, struct stat64 __user * statbuf)
return error;
}
asmlinkage long sys_fstatat64(int dfd, char __user *filename,
struct stat64 __user *statbuf, int flag)
{
struct kstat stat;
int error = -EINVAL;
if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0)
goto out;
if (flag & AT_SYMLINK_NOFOLLOW)
error = vfs_lstat_fd(dfd, filename, &stat);
else
error = vfs_stat_fd(dfd, filename, &stat);
if (!error)
error = cp_new_stat64(&stat, statbuf);
out:
return error;
}
#endif /* __ARCH_WANT_STAT64 */
void inode_add_bytes(struct inode *inode, loff_t bytes)

View File

@ -305,7 +305,7 @@
#define __NR_mknodat 297
#define __NR_fchownat 298
#define __NR_futimesat 299
#define __NR_newfstatat 300
#define __NR_fstatat64 300
#define __NR_unlinkat 301
#define __NR_renameat 302
#define __NR_linkat 303

View File

@ -518,8 +518,8 @@ static inline int __test_bit(unsigned long nr, const volatile unsigned long *ptr
static inline int
__constant_test_bit(unsigned long nr, const volatile unsigned long *addr) {
return ((((volatile char *) addr)
[(nr^(__BITOPS_WORDSIZE-8))>>3] & (1<<(nr&7)))) != 0;
return (((volatile char *) addr)
[(nr^(__BITOPS_WORDSIZE-8))>>3] & (1<<(nr&7))) != 0;
}
#define test_bit(nr,addr) \

View File

@ -8,6 +8,8 @@
#ifndef _ASM_S390_SETUP_H
#define _ASM_S390_SETUP_H
#ifdef __KERNEL__
#include <asm/types.h>
#define PARMAREA 0x10400
@ -114,7 +116,7 @@ extern u16 ipl_devno;
IPL_PARMBLOCK_ORIGIN)
#define IPL_PARMBLOCK_SIZE (IPL_PARMBLOCK_START->hdr.length)
#else
#else /* __ASSEMBLY__ */
#ifndef __s390x__
#define IPL_DEVICE 0x10404
@ -127,6 +129,6 @@ extern u16 ipl_devno;
#endif /* __s390x__ */
#define COMMAND_LINE 0x10480
#endif
#endif
#endif /* __ASSEMBLY__ */
#endif /* __KERNEL__ */
#endif /* _ASM_S390_SETUP_H */

View File

@ -101,6 +101,7 @@ smp_call_function_on(void (*func) (void *info), void *info,
func(info);
return 0;
}
#define smp_cpu_not_running(cpu) 1
#define smp_get_cpu(cpu) ({ 0; })
#define smp_put_cpu(cpu) ({ 0; })
#endif

View File

@ -285,7 +285,7 @@
#define __NR_mknodat 290
#define __NR_fchownat 291
#define __NR_futimesat 292
#define __NR_newfstatat 293
#define __NR_fstatat64 293
#define __NR_unlinkat 294
#define __NR_renameat 295
#define __NR_linkat 296
@ -295,8 +295,9 @@
#define __NR_faccessat 300
#define __NR_pselect6 301
#define __NR_ppoll 302
#define __NR_unshare 303
#define NR_syscalls 303
#define NR_syscalls 304
/*
* There are some system calls that are not present on 64 bit, some
@ -358,6 +359,7 @@
#undef __NR_fcntl64
#undef __NR_sendfile64
#undef __NR_fadvise64_64
#undef __NR_fstatat64
#define __NR_select 142
#define __NR_getrlimit 191 /* SuS compliant getrlimit */
@ -380,6 +382,7 @@
#define __NR_setgid 214
#define __NR_setfsuid 215
#define __NR_setfsgid 216
#define __NR_newfstatat 293
#endif

View File

@ -55,6 +55,8 @@ extern int is_hpet_enabled(void);
extern int hpet_rtc_timer_init(void);
extern int oem_force_hpet_timer(void);
extern int hpet_use_timer;
#ifdef CONFIG_HPET_EMULATE_RTC
extern int hpet_mask_rtc_irq_bit(unsigned long bit_mask);
extern int hpet_set_rtc_irq_bit(unsigned long bit_mask);

View File

@ -305,7 +305,7 @@
#define __NR_ia32_mknodat 297
#define __NR_ia32_fchownat 298
#define __NR_ia32_futimesat 299
#define __NR_ia32_newfstatat 300
#define __NR_ia32_fstatat64 300
#define __NR_ia32_unlinkat 301
#define __NR_ia32_renameat 302
#define __NR_ia32_linkat 303

View File

@ -270,6 +270,16 @@ struct ata_taskfile {
#define ata_id_cdb_intr(id) (((id)[0] & 0x60) == 0x20)
static inline unsigned int ata_id_major_version(const u16 *id)
{
unsigned int mver;
for (mver = 14; mver >= 1; mver--)
if (id[ATA_ID_MAJOR_VER] & (1 << mver))
break;
return mver;
}
static inline int ata_id_current_chs_valid(const u16 *id)
{
/* For ATA-1 devices, if the INITIALIZE DEVICE PARAMETERS command

View File

@ -161,5 +161,25 @@ int copy_siginfo_to_user32(struct compat_siginfo __user *to, siginfo_t *from);
int get_compat_sigevent(struct sigevent *event,
const struct compat_sigevent __user *u_event);
static inline int compat_timeval_compare(struct compat_timeval *lhs,
struct compat_timeval *rhs)
{
if (lhs->tv_sec < rhs->tv_sec)
return -1;
if (lhs->tv_sec > rhs->tv_sec)
return 1;
return lhs->tv_usec - rhs->tv_usec;
}
static inline int compat_timespec_compare(struct compat_timespec *lhs,
struct compat_timespec *rhs)
{
if (lhs->tv_sec < rhs->tv_sec)
return -1;
if (lhs->tv_sec > rhs->tv_sec)
return 1;
return lhs->tv_nsec - rhs->tv_nsec;
}
#endif /* CONFIG_COMPAT */
#endif /* _LINUX_COMPAT_H */

View File

@ -122,9 +122,8 @@ enum {
/* struct ata_device stuff */
ATA_DFLAG_LBA48 = (1 << 0), /* device supports LBA48 */
ATA_DFLAG_PIO = (1 << 1), /* device currently in PIO mode */
ATA_DFLAG_LOCK_SECTORS = (1 << 2), /* don't adjust max_sectors */
ATA_DFLAG_LBA = (1 << 3), /* device supports LBA */
ATA_DFLAG_CDB_INTR = (1 << 4), /* device asserts INTRQ when ready for CDB */
ATA_DFLAG_LBA = (1 << 2), /* device supports LBA */
ATA_DFLAG_CDB_INTR = (1 << 3), /* device asserts INTRQ when ready for CDB */
ATA_DEV_UNKNOWN = 0, /* unknown device */
ATA_DEV_ATA = 1, /* ATA device */
@ -353,6 +352,8 @@ struct ata_device {
unsigned int multi_count; /* sectors count for
READ/WRITE MULTIPLE */
unsigned int max_sectors; /* per-device max sectors */
unsigned int cdb_len;
/* for CHS addressing */
u16 cylinders; /* Number of cylinders */
@ -382,7 +383,6 @@ struct ata_port {
unsigned int mwdma_mask;
unsigned int udma_mask;
unsigned int cbl; /* cable type; ATA_CBL_xxx */
unsigned int cdb_len;
struct ata_device device[ATA_MAX_DEVICES];
@ -543,6 +543,8 @@ extern void ata_sg_init(struct ata_queued_cmd *qc, struct scatterlist *sg,
extern unsigned int ata_dev_classify(const struct ata_taskfile *tf);
extern void ata_dev_id_string(const u16 *id, unsigned char *s,
unsigned int ofs, unsigned int len);
extern void ata_dev_id_c_string(const u16 *id, unsigned char *s,
unsigned int ofs, unsigned int len);
extern void ata_dev_config(struct ata_port *ap, unsigned int i);
extern void ata_bmdma_setup (struct ata_queued_cmd *qc);
extern void ata_bmdma_start (struct ata_queued_cmd *qc);

View File

@ -1087,6 +1087,7 @@
#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_440_8X 0x0181
#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_440SE_8X 0x0182
#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_420_8X 0x0183
#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_4000 0x0185
#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_448_GO 0x0186
#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_488_GO 0x0187
#define PCI_DEVICE_ID_NVIDIA_QUADRO4_580_XGL 0x0188

View File

@ -557,6 +557,8 @@ asmlinkage long sys_openat(int dfd, const char __user *filename, int flags,
int mode);
asmlinkage long sys_newfstatat(int dfd, char __user *filename,
struct stat __user *statbuf, int flag);
asmlinkage long sys_fstatat64(int dfd, char __user *filename,
struct stat64 __user *statbuf, int flag);
asmlinkage long sys_readlinkat(int dfd, const char __user *path, char __user *buf,
int bufsiz);
asmlinkage long compat_sys_futimesat(unsigned int dfd, char __user *filename,

Some files were not shown because too many files have changed in this diff Show More