提交 29219683 编写于 作者: I Ingo Molnar

Merge branches 'x86/apic', 'x86/cleanups', 'x86/mm', 'x86/pat', 'x86/setup'...

Merge branches 'x86/apic', 'x86/cleanups', 'x86/mm', 'x86/pat', 'x86/setup' and 'x86/signal'; commit 'v2.6.29' into x86/core
...@@ -3738,7 +3738,7 @@ S: 93149 Nittenau ...@@ -3738,7 +3738,7 @@ S: 93149 Nittenau
S: Germany S: Germany
N: Gertjan van Wingerde N: Gertjan van Wingerde
E: gwingerde@home.nl E: gwingerde@gmail.com
D: Ralink rt2x00 WLAN driver D: Ralink rt2x00 WLAN driver
D: Minix V2 file-system D: Minix V2 file-system
D: Misc fixes D: Misc fixes
......
...@@ -376,7 +376,8 @@ Implementations for: ...@@ -376,7 +376,8 @@ Implementations for:
Windows 95/98/NT/2000 http://www.chrysocome.net/explore2fs Windows 95/98/NT/2000 http://www.chrysocome.net/explore2fs
Windows 95 (*) http://www.yipton.net/content.html#FSDEXT2 Windows 95 (*) http://www.yipton.net/content.html#FSDEXT2
DOS client (*) ftp://metalab.unc.edu/pub/Linux/system/filesystems/ext2/ DOS client (*) ftp://metalab.unc.edu/pub/Linux/system/filesystems/ext2/
OS/2 (*) ftp://metalab.unc.edu/pub/Linux/system/filesystems/ext2/ OS/2 (+) ftp://metalab.unc.edu/pub/Linux/system/filesystems/ext2/
RISC OS client http://www.esw-heim.tu-clausthal.de/~marco/smorbrod/IscaFS/ RISC OS client http://www.esw-heim.tu-clausthal.de/~marco/smorbrod/IscaFS/
(*) no longer actively developed/supported (as of Mar 2009) (*) no longer actively developed/supported (as of Apr 2001)
(+) no longer actively developed/supported (as of Mar 2009)
...@@ -1478,6 +1478,13 @@ of problems on the network like duplicate address or bad checksums. Normally, ...@@ -1478,6 +1478,13 @@ of problems on the network like duplicate address or bad checksums. Normally,
this should be enabled, but if the problem persists the messages can be this should be enabled, but if the problem persists the messages can be
disabled. disabled.
netdev_budget
-------------
Maximum number of packets taken from all interfaces in one polling cycle (NAPI
poll). In one polling cycle interfaces which are registered to polling are
probed in a round-robin manner. The limit of packets in one such probe can be
set per-device via sysfs class/net/<device>/weight .
netdev_max_backlog netdev_max_backlog
------------------ ------------------
......
VERSION = 2 VERSION = 2
PATCHLEVEL = 6 PATCHLEVEL = 6
SUBLEVEL = 29 SUBLEVEL = 29
EXTRAVERSION = -rc8 EXTRAVERSION =
NAME = Erotic Pickled Herring NAME = Temporary Tasmanian Devil
# *DOCUMENTATION* # *DOCUMENTATION*
# To see a list of typical targets execute "make help" # To see a list of typical targets execute "make help"
...@@ -570,6 +570,9 @@ KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,) ...@@ -570,6 +570,9 @@ KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,)
# disable invalid "can't wrap" optimzations for signed / pointers # disable invalid "can't wrap" optimzations for signed / pointers
KBUILD_CFLAGS += $(call cc-option,-fwrapv) KBUILD_CFLAGS += $(call cc-option,-fwrapv)
# revert to pre-gcc-4.4 behaviour of .eh_frame
KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm)
# Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments # Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments
# But warn user when we do so # But warn user when we do so
warn-assign = \ warn-assign = \
......
#ifndef _M68K_PARAM_H
#define _M68K_PARAM_H
#ifdef __KERNEL__
# define HZ CONFIG_HZ /* Internal kernel timer frequency */
# define USER_HZ 100 /* .. some user interfaces are in "ticks" */
# define CLOCKS_PER_SEC (USER_HZ) /* like times() */
#endif
#ifndef HZ
#define HZ 100
#endif
#ifdef __uClinux__ #ifdef __uClinux__
#include "param_no.h" #define EXEC_PAGESIZE 4096
#else #else
#include "param_mm.h" #define EXEC_PAGESIZE 8192
#endif
#ifndef NOGROUP
#define NOGROUP (-1)
#endif #endif
#define MAXHOSTNAMELEN 64 /* max length of hostname */
#endif /* _M68K_PARAM_H */
#ifndef _M68K_PARAM_H
#define _M68K_PARAM_H
#ifdef __KERNEL__
# define HZ CONFIG_HZ /* Internal kernel timer frequency */
# define USER_HZ 100 /* .. some user interfaces are in "ticks" */
# define CLOCKS_PER_SEC (USER_HZ) /* like times() */
#endif
#ifndef HZ
#define HZ 100
#endif
#define EXEC_PAGESIZE 8192
#ifndef NOGROUP
#define NOGROUP (-1)
#endif
#define MAXHOSTNAMELEN 64 /* max length of hostname */
#endif /* _M68K_PARAM_H */
#ifndef _M68KNOMMU_PARAM_H
#define _M68KNOMMU_PARAM_H
#ifdef __KERNEL__
#define HZ CONFIG_HZ
#define USER_HZ HZ
#define CLOCKS_PER_SEC (USER_HZ)
#endif
#ifndef HZ
#define HZ 100
#endif
#define EXEC_PAGESIZE 4096
#ifndef NOGROUP
#define NOGROUP (-1)
#endif
#define MAXHOSTNAMELEN 64 /* max length of hostname */
#endif /* _M68KNOMMU_PARAM_H */
#ifdef __uClinux__ #ifndef _M68K_PTRACE_H
#include "ptrace_no.h" #define _M68K_PTRACE_H
#define PT_D1 0
#define PT_D2 1
#define PT_D3 2
#define PT_D4 3
#define PT_D5 4
#define PT_D6 5
#define PT_D7 6
#define PT_A0 7
#define PT_A1 8
#define PT_A2 9
#define PT_A3 10
#define PT_A4 11
#define PT_A5 12
#define PT_A6 13
#define PT_D0 14
#define PT_USP 15
#define PT_ORIG_D0 16
#define PT_SR 17
#define PT_PC 18
#ifndef __ASSEMBLY__
/* this struct defines the way the registers are stored on the
stack during a system call. */
struct pt_regs {
long d1;
long d2;
long d3;
long d4;
long d5;
long a0;
long a1;
long a2;
long d0;
long orig_d0;
long stkadj;
#ifdef CONFIG_COLDFIRE
unsigned format : 4; /* frame format specifier */
unsigned vector : 12; /* vector offset */
unsigned short sr;
unsigned long pc;
#else #else
#include "ptrace_mm.h" unsigned short sr;
unsigned long pc;
unsigned format : 4; /* frame format specifier */
unsigned vector : 12; /* vector offset */
#endif #endif
};
/*
* This is the extended stack used by signal handlers and the context
* switcher: it's pushed after the normal "struct pt_regs".
*/
struct switch_stack {
unsigned long d6;
unsigned long d7;
unsigned long a3;
unsigned long a4;
unsigned long a5;
unsigned long a6;
unsigned long retpc;
};
/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
#define PTRACE_GETREGS 12
#define PTRACE_SETREGS 13
#define PTRACE_GETFPREGS 14
#define PTRACE_SETFPREGS 15
#ifdef __KERNEL__
#ifndef PS_S
#define PS_S (0x2000)
#define PS_M (0x1000)
#endif
#define user_mode(regs) (!((regs)->sr & PS_S))
#define instruction_pointer(regs) ((regs)->pc)
#define profile_pc(regs) instruction_pointer(regs)
extern void show_regs(struct pt_regs *);
#endif /* __KERNEL__ */
#endif /* __ASSEMBLY__ */
#endif /* _M68K_PTRACE_H */
#ifndef _M68K_PTRACE_H
#define _M68K_PTRACE_H
#define PT_D1 0
#define PT_D2 1
#define PT_D3 2
#define PT_D4 3
#define PT_D5 4
#define PT_D6 5
#define PT_D7 6
#define PT_A0 7
#define PT_A1 8
#define PT_A2 9
#define PT_A3 10
#define PT_A4 11
#define PT_A5 12
#define PT_A6 13
#define PT_D0 14
#define PT_USP 15
#define PT_ORIG_D0 16
#define PT_SR 17
#define PT_PC 18
#ifndef __ASSEMBLY__
/* this struct defines the way the registers are stored on the
stack during a system call. */
struct pt_regs {
long d1;
long d2;
long d3;
long d4;
long d5;
long a0;
long a1;
long a2;
long d0;
long orig_d0;
long stkadj;
unsigned short sr;
unsigned long pc;
unsigned format : 4; /* frame format specifier */
unsigned vector : 12; /* vector offset */
};
/*
* This is the extended stack used by signal handlers and the context
* switcher: it's pushed after the normal "struct pt_regs".
*/
struct switch_stack {
unsigned long d6;
unsigned long d7;
unsigned long a3;
unsigned long a4;
unsigned long a5;
unsigned long a6;
unsigned long retpc;
};
/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
#define PTRACE_GETREGS 12
#define PTRACE_SETREGS 13
#define PTRACE_GETFPREGS 14
#define PTRACE_SETFPREGS 15
#ifdef __KERNEL__
#ifndef PS_S
#define PS_S (0x2000)
#define PS_M (0x1000)
#endif
#define user_mode(regs) (!((regs)->sr & PS_S))
#define instruction_pointer(regs) ((regs)->pc)
#define profile_pc(regs) instruction_pointer(regs)
extern void show_regs(struct pt_regs *);
#endif /* __KERNEL__ */
#endif /* __ASSEMBLY__ */
#endif /* _M68K_PTRACE_H */
#ifndef _M68K_PTRACE_H
#define _M68K_PTRACE_H
#define PT_D1 0
#define PT_D2 1
#define PT_D3 2
#define PT_D4 3
#define PT_D5 4
#define PT_D6 5
#define PT_D7 6
#define PT_A0 7
#define PT_A1 8
#define PT_A2 9
#define PT_A3 10
#define PT_A4 11
#define PT_A5 12
#define PT_A6 13
#define PT_D0 14
#define PT_USP 15
#define PT_ORIG_D0 16
#define PT_SR 17
#define PT_PC 18
#ifndef __ASSEMBLY__
/* this struct defines the way the registers are stored on the
stack during a system call. */
struct pt_regs {
long d1;
long d2;
long d3;
long d4;
long d5;
long a0;
long a1;
long a2;
long d0;
long orig_d0;
long stkadj;
#ifdef CONFIG_COLDFIRE
unsigned format : 4; /* frame format specifier */
unsigned vector : 12; /* vector offset */
unsigned short sr;
unsigned long pc;
#else
unsigned short sr;
unsigned long pc;
unsigned format : 4; /* frame format specifier */
unsigned vector : 12; /* vector offset */
#endif
};
/*
* This is the extended stack used by signal handlers and the context
* switcher: it's pushed after the normal "struct pt_regs".
*/
struct switch_stack {
unsigned long d6;
unsigned long d7;
unsigned long a3;
unsigned long a4;
unsigned long a5;
unsigned long a6;
unsigned long retpc;
};
/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
#define PTRACE_GETREGS 12
#define PTRACE_SETREGS 13
#define PTRACE_GETFPREGS 14
#define PTRACE_SETFPREGS 15
#ifdef __KERNEL__
#ifndef PS_S
#define PS_S (0x2000)
#define PS_M (0x1000)
#endif
#define user_mode(regs) (!((regs)->sr & PS_S))
#define instruction_pointer(regs) ((regs)->pc)
#define profile_pc(regs) instruction_pointer(regs)
extern void show_regs(struct pt_regs *);
#endif /* __KERNEL__ */
#endif /* __ASSEMBLY__ */
#endif /* _M68K_PTRACE_H */
#ifdef __uClinux__ /*
#include "setup_no.h" ** asm/setup.h -- Definition of the Linux/m68k setup information
**
** Copyright 1992 by Greg Harp
**
** This file is subject to the terms and conditions of the GNU General Public
** License. See the file COPYING in the main directory of this archive
** for more details.
**
** Created 09/29/92 by Greg Harp
**
** 5/2/94 Roman Hodek:
** Added bi_atari part of the machine dependent union bi_un; for now it
** contains just a model field to distinguish between TT and Falcon.
** 26/7/96 Roman Zippel:
** Renamed to setup.h; added some useful macros to allow gcc some
** optimizations if possible.
** 5/10/96 Geert Uytterhoeven:
** Redesign of the boot information structure; moved boot information
** structure to bootinfo.h
*/
#ifndef _M68K_SETUP_H
#define _M68K_SETUP_H
/*
* Linux/m68k Architectures
*/
#define MACH_AMIGA 1
#define MACH_ATARI 2
#define MACH_MAC 3
#define MACH_APOLLO 4
#define MACH_SUN3 5
#define MACH_MVME147 6
#define MACH_MVME16x 7
#define MACH_BVME6000 8
#define MACH_HP300 9
#define MACH_Q40 10
#define MACH_SUN3X 11
#define COMMAND_LINE_SIZE 256
#ifdef __KERNEL__
#define CL_SIZE COMMAND_LINE_SIZE
#ifndef __ASSEMBLY__
extern unsigned long m68k_machtype;
#endif /* !__ASSEMBLY__ */
#if !defined(CONFIG_AMIGA)
# define MACH_IS_AMIGA (0)
#elif defined(CONFIG_ATARI) || defined(CONFIG_MAC) || defined(CONFIG_APOLLO) \
|| defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \
|| defined(CONFIG_HP300) || defined(CONFIG_Q40) \
|| defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
# define MACH_IS_AMIGA (m68k_machtype == MACH_AMIGA)
#else #else
#include "setup_mm.h" # define MACH_AMIGA_ONLY
# define MACH_IS_AMIGA (1)
# define MACH_TYPE (MACH_AMIGA)
#endif #endif
#if !defined(CONFIG_ATARI)
# define MACH_IS_ATARI (0)
#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_APOLLO) \
|| defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \
|| defined(CONFIG_HP300) || defined(CONFIG_Q40) \
|| defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
# define MACH_IS_ATARI (m68k_machtype == MACH_ATARI)
#else
# define MACH_ATARI_ONLY
# define MACH_IS_ATARI (1)
# define MACH_TYPE (MACH_ATARI)
#endif
#if !defined(CONFIG_MAC)
# define MACH_IS_MAC (0)
#elif defined(CONFIG_AMIGA) || defined(CONFIG_ATARI) || defined(CONFIG_APOLLO) \
|| defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \
|| defined(CONFIG_HP300) || defined(CONFIG_Q40) \
|| defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
# define MACH_IS_MAC (m68k_machtype == MACH_MAC)
#else
# define MACH_MAC_ONLY
# define MACH_IS_MAC (1)
# define MACH_TYPE (MACH_MAC)
#endif
#if defined(CONFIG_SUN3)
#define MACH_IS_SUN3 (1)
#define MACH_SUN3_ONLY (1)
#define MACH_TYPE (MACH_SUN3)
#else
#define MACH_IS_SUN3 (0)
#endif
#if !defined (CONFIG_APOLLO)
# define MACH_IS_APOLLO (0)
#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
|| defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \
|| defined(CONFIG_HP300) || defined(CONFIG_Q40) \
|| defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
# define MACH_IS_APOLLO (m68k_machtype == MACH_APOLLO)
#else
# define MACH_APOLLO_ONLY
# define MACH_IS_APOLLO (1)
# define MACH_TYPE (MACH_APOLLO)
#endif
#if !defined (CONFIG_MVME147)
# define MACH_IS_MVME147 (0)
#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
|| defined(CONFIG_APOLLO) || defined(CONFIG_BVME6000) \
|| defined(CONFIG_HP300) || defined(CONFIG_Q40) \
|| defined(CONFIG_SUN3X) || defined(CONFIG_MVME16x)
# define MACH_IS_MVME147 (m68k_machtype == MACH_MVME147)
#else
# define MACH_MVME147_ONLY
# define MACH_IS_MVME147 (1)
# define MACH_TYPE (MACH_MVME147)
#endif
#if !defined (CONFIG_MVME16x)
# define MACH_IS_MVME16x (0)
#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
|| defined(CONFIG_APOLLO) || defined(CONFIG_BVME6000) \
|| defined(CONFIG_HP300) || defined(CONFIG_Q40) \
|| defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
# define MACH_IS_MVME16x (m68k_machtype == MACH_MVME16x)
#else
# define MACH_MVME16x_ONLY
# define MACH_IS_MVME16x (1)
# define MACH_TYPE (MACH_MVME16x)
#endif
#if !defined (CONFIG_BVME6000)
# define MACH_IS_BVME6000 (0)
#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
|| defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \
|| defined(CONFIG_HP300) || defined(CONFIG_Q40) \
|| defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
# define MACH_IS_BVME6000 (m68k_machtype == MACH_BVME6000)
#else
# define MACH_BVME6000_ONLY
# define MACH_IS_BVME6000 (1)
# define MACH_TYPE (MACH_BVME6000)
#endif
#if !defined (CONFIG_HP300)
# define MACH_IS_HP300 (0)
#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
|| defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \
|| defined(CONFIG_BVME6000) || defined(CONFIG_Q40) \
|| defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
# define MACH_IS_HP300 (m68k_machtype == MACH_HP300)
#else
# define MACH_HP300_ONLY
# define MACH_IS_HP300 (1)
# define MACH_TYPE (MACH_HP300)
#endif
#if !defined (CONFIG_Q40)
# define MACH_IS_Q40 (0)
#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
|| defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \
|| defined(CONFIG_BVME6000) || defined(CONFIG_HP300) \
|| defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
# define MACH_IS_Q40 (m68k_machtype == MACH_Q40)
#else
# define MACH_Q40_ONLY
# define MACH_IS_Q40 (1)
# define MACH_TYPE (MACH_Q40)
#endif
#if !defined (CONFIG_SUN3X)
# define MACH_IS_SUN3X (0)
#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
|| defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \
|| defined(CONFIG_BVME6000) || defined(CONFIG_HP300) \
|| defined(CONFIG_Q40) || defined(CONFIG_MVME147)
# define MACH_IS_SUN3X (m68k_machtype == MACH_SUN3X)
#else
# define CONFIG_SUN3X_ONLY
# define MACH_IS_SUN3X (1)
# define MACH_TYPE (MACH_SUN3X)
#endif
#ifndef MACH_TYPE
# define MACH_TYPE (m68k_machtype)
#endif
#endif /* __KERNEL__ */
/*
* CPU, FPU and MMU types
*
* Note: we may rely on the following equalities:
*
* CPU_68020 == MMU_68851
* CPU_68030 == MMU_68030
* CPU_68040 == FPU_68040 == MMU_68040
* CPU_68060 == FPU_68060 == MMU_68060
*/
#define CPUB_68020 0
#define CPUB_68030 1
#define CPUB_68040 2
#define CPUB_68060 3
#define CPU_68020 (1<<CPUB_68020)
#define CPU_68030 (1<<CPUB_68030)
#define CPU_68040 (1<<CPUB_68040)
#define CPU_68060 (1<<CPUB_68060)
#define FPUB_68881 0
#define FPUB_68882 1
#define FPUB_68040 2 /* Internal FPU */
#define FPUB_68060 3 /* Internal FPU */
#define FPUB_SUNFPA 4 /* Sun-3 FPA */
#define FPU_68881 (1<<FPUB_68881)
#define FPU_68882 (1<<FPUB_68882)
#define FPU_68040 (1<<FPUB_68040)
#define FPU_68060 (1<<FPUB_68060)
#define FPU_SUNFPA (1<<FPUB_SUNFPA)
#define MMUB_68851 0
#define MMUB_68030 1 /* Internal MMU */
#define MMUB_68040 2 /* Internal MMU */
#define MMUB_68060 3 /* Internal MMU */
#define MMUB_APOLLO 4 /* Custom Apollo */
#define MMUB_SUN3 5 /* Custom Sun-3 */
#define MMU_68851 (1<<MMUB_68851)
#define MMU_68030 (1<<MMUB_68030)
#define MMU_68040 (1<<MMUB_68040)
#define MMU_68060 (1<<MMUB_68060)
#define MMU_SUN3 (1<<MMUB_SUN3)
#define MMU_APOLLO (1<<MMUB_APOLLO)
#ifdef __KERNEL__
#ifndef __ASSEMBLY__
extern unsigned long m68k_cputype;
extern unsigned long m68k_fputype;
extern unsigned long m68k_mmutype;
#ifdef CONFIG_VME
extern unsigned long vme_brdtype;
#endif
/*
* m68k_is040or060 is != 0 for a '040 or higher;
* used numbers are 4 for 68040 and 6 for 68060.
*/
extern int m68k_is040or060;
#endif /* !__ASSEMBLY__ */
#if !defined(CONFIG_M68020)
# define CPU_IS_020 (0)
# define MMU_IS_851 (0)
# define MMU_IS_SUN3 (0)
#elif defined(CONFIG_M68030) || defined(CONFIG_M68040) || defined(CONFIG_M68060)
# define CPU_IS_020 (m68k_cputype & CPU_68020)
# define MMU_IS_851 (m68k_mmutype & MMU_68851)
# define MMU_IS_SUN3 (0) /* Sun3 not supported with other CPU enabled */
#else
# define CPU_M68020_ONLY
# define CPU_IS_020 (1)
#ifdef MACH_SUN3_ONLY
# define MMU_IS_SUN3 (1)
# define MMU_IS_851 (0)
#else
# define MMU_IS_SUN3 (0)
# define MMU_IS_851 (1)
#endif
#endif
#if !defined(CONFIG_M68030)
# define CPU_IS_030 (0)
# define MMU_IS_030 (0)
#elif defined(CONFIG_M68020) || defined(CONFIG_M68040) || defined(CONFIG_M68060)
# define CPU_IS_030 (m68k_cputype & CPU_68030)
# define MMU_IS_030 (m68k_mmutype & MMU_68030)
#else
# define CPU_M68030_ONLY
# define CPU_IS_030 (1)
# define MMU_IS_030 (1)
#endif
#if !defined(CONFIG_M68040)
# define CPU_IS_040 (0)
# define MMU_IS_040 (0)
#elif defined(CONFIG_M68020) || defined(CONFIG_M68030) || defined(CONFIG_M68060)
# define CPU_IS_040 (m68k_cputype & CPU_68040)
# define MMU_IS_040 (m68k_mmutype & MMU_68040)
#else
# define CPU_M68040_ONLY
# define CPU_IS_040 (1)
# define MMU_IS_040 (1)
#endif
#if !defined(CONFIG_M68060)
# define CPU_IS_060 (0)
# define MMU_IS_060 (0)
#elif defined(CONFIG_M68020) || defined(CONFIG_M68030) || defined(CONFIG_M68040)
# define CPU_IS_060 (m68k_cputype & CPU_68060)
# define MMU_IS_060 (m68k_mmutype & MMU_68060)
#else
# define CPU_M68060_ONLY
# define CPU_IS_060 (1)
# define MMU_IS_060 (1)
#endif
#if !defined(CONFIG_M68020) && !defined(CONFIG_M68030)
# define CPU_IS_020_OR_030 (0)
#else
# define CPU_M68020_OR_M68030
# if defined(CONFIG_M68040) || defined(CONFIG_M68060)
# define CPU_IS_020_OR_030 (!m68k_is040or060)
# else
# define CPU_M68020_OR_M68030_ONLY
# define CPU_IS_020_OR_030 (1)
# endif
#endif
#if !defined(CONFIG_M68040) && !defined(CONFIG_M68060)
# define CPU_IS_040_OR_060 (0)
#else
# define CPU_M68040_OR_M68060
# if defined(CONFIG_M68020) || defined(CONFIG_M68030)
# define CPU_IS_040_OR_060 (m68k_is040or060)
# else
# define CPU_M68040_OR_M68060_ONLY
# define CPU_IS_040_OR_060 (1)
# endif
#endif
#define CPU_TYPE (m68k_cputype)
#ifdef CONFIG_M68KFPU_EMU
# ifdef CONFIG_M68KFPU_EMU_ONLY
# define FPU_IS_EMU (1)
# else
# define FPU_IS_EMU (!m68k_fputype)
# endif
#else
# define FPU_IS_EMU (0)
#endif
/*
* Miscellaneous
*/
#define NUM_MEMINFO 4
#ifndef __ASSEMBLY__
struct mem_info {
unsigned long addr; /* physical address of memory chunk */
unsigned long size; /* length of memory chunk (in bytes) */
};
extern int m68k_num_memory; /* # of memory blocks found (and used) */
extern int m68k_realnum_memory; /* real # of memory blocks found */
extern struct mem_info m68k_memory[NUM_MEMINFO];/* memory description */
#endif
#endif /* __KERNEL__ */
#endif /* _M68K_SETUP_H */
/*
** asm/setup.h -- Definition of the Linux/m68k setup information
**
** Copyright 1992 by Greg Harp
**
** This file is subject to the terms and conditions of the GNU General Public
** License. See the file COPYING in the main directory of this archive
** for more details.
**
** Created 09/29/92 by Greg Harp
**
** 5/2/94 Roman Hodek:
** Added bi_atari part of the machine dependent union bi_un; for now it
** contains just a model field to distinguish between TT and Falcon.
** 26/7/96 Roman Zippel:
** Renamed to setup.h; added some useful macros to allow gcc some
** optimizations if possible.
** 5/10/96 Geert Uytterhoeven:
** Redesign of the boot information structure; moved boot information
** structure to bootinfo.h
*/
#ifndef _M68K_SETUP_H
#define _M68K_SETUP_H
/*
* Linux/m68k Architectures
*/
#define MACH_AMIGA 1
#define MACH_ATARI 2
#define MACH_MAC 3
#define MACH_APOLLO 4
#define MACH_SUN3 5
#define MACH_MVME147 6
#define MACH_MVME16x 7
#define MACH_BVME6000 8
#define MACH_HP300 9
#define MACH_Q40 10
#define MACH_SUN3X 11
#define COMMAND_LINE_SIZE 256
#ifdef __KERNEL__
#define CL_SIZE COMMAND_LINE_SIZE
#ifndef __ASSEMBLY__
extern unsigned long m68k_machtype;
#endif /* !__ASSEMBLY__ */
#if !defined(CONFIG_AMIGA)
# define MACH_IS_AMIGA (0)
#elif defined(CONFIG_ATARI) || defined(CONFIG_MAC) || defined(CONFIG_APOLLO) \
|| defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \
|| defined(CONFIG_HP300) || defined(CONFIG_Q40) \
|| defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
# define MACH_IS_AMIGA (m68k_machtype == MACH_AMIGA)
#else
# define MACH_AMIGA_ONLY
# define MACH_IS_AMIGA (1)
# define MACH_TYPE (MACH_AMIGA)
#endif
#if !defined(CONFIG_ATARI)
# define MACH_IS_ATARI (0)
#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_APOLLO) \
|| defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \
|| defined(CONFIG_HP300) || defined(CONFIG_Q40) \
|| defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
# define MACH_IS_ATARI (m68k_machtype == MACH_ATARI)
#else
# define MACH_ATARI_ONLY
# define MACH_IS_ATARI (1)
# define MACH_TYPE (MACH_ATARI)
#endif
#if !defined(CONFIG_MAC)
# define MACH_IS_MAC (0)
#elif defined(CONFIG_AMIGA) || defined(CONFIG_ATARI) || defined(CONFIG_APOLLO) \
|| defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \
|| defined(CONFIG_HP300) || defined(CONFIG_Q40) \
|| defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
# define MACH_IS_MAC (m68k_machtype == MACH_MAC)
#else
# define MACH_MAC_ONLY
# define MACH_IS_MAC (1)
# define MACH_TYPE (MACH_MAC)
#endif
#if defined(CONFIG_SUN3)
#define MACH_IS_SUN3 (1)
#define MACH_SUN3_ONLY (1)
#define MACH_TYPE (MACH_SUN3)
#else
#define MACH_IS_SUN3 (0)
#endif
#if !defined (CONFIG_APOLLO)
# define MACH_IS_APOLLO (0)
#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
|| defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \
|| defined(CONFIG_HP300) || defined(CONFIG_Q40) \
|| defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
# define MACH_IS_APOLLO (m68k_machtype == MACH_APOLLO)
#else
# define MACH_APOLLO_ONLY
# define MACH_IS_APOLLO (1)
# define MACH_TYPE (MACH_APOLLO)
#endif
#if !defined (CONFIG_MVME147)
# define MACH_IS_MVME147 (0)
#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
|| defined(CONFIG_APOLLO) || defined(CONFIG_BVME6000) \
|| defined(CONFIG_HP300) || defined(CONFIG_Q40) \
|| defined(CONFIG_SUN3X) || defined(CONFIG_MVME16x)
# define MACH_IS_MVME147 (m68k_machtype == MACH_MVME147)
#else
# define MACH_MVME147_ONLY
# define MACH_IS_MVME147 (1)
# define MACH_TYPE (MACH_MVME147)
#endif
#if !defined (CONFIG_MVME16x)
# define MACH_IS_MVME16x (0)
#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
|| defined(CONFIG_APOLLO) || defined(CONFIG_BVME6000) \
|| defined(CONFIG_HP300) || defined(CONFIG_Q40) \
|| defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
# define MACH_IS_MVME16x (m68k_machtype == MACH_MVME16x)
#else
# define MACH_MVME16x_ONLY
# define MACH_IS_MVME16x (1)
# define MACH_TYPE (MACH_MVME16x)
#endif
#if !defined (CONFIG_BVME6000)
# define MACH_IS_BVME6000 (0)
#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
|| defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \
|| defined(CONFIG_HP300) || defined(CONFIG_Q40) \
|| defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
# define MACH_IS_BVME6000 (m68k_machtype == MACH_BVME6000)
#else
# define MACH_BVME6000_ONLY
# define MACH_IS_BVME6000 (1)
# define MACH_TYPE (MACH_BVME6000)
#endif
#if !defined (CONFIG_HP300)
# define MACH_IS_HP300 (0)
#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
|| defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \
|| defined(CONFIG_BVME6000) || defined(CONFIG_Q40) \
|| defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
# define MACH_IS_HP300 (m68k_machtype == MACH_HP300)
#else
# define MACH_HP300_ONLY
# define MACH_IS_HP300 (1)
# define MACH_TYPE (MACH_HP300)
#endif
#if !defined (CONFIG_Q40)
# define MACH_IS_Q40 (0)
#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
|| defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \
|| defined(CONFIG_BVME6000) || defined(CONFIG_HP300) \
|| defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
# define MACH_IS_Q40 (m68k_machtype == MACH_Q40)
#else
# define MACH_Q40_ONLY
# define MACH_IS_Q40 (1)
# define MACH_TYPE (MACH_Q40)
#endif
#if !defined (CONFIG_SUN3X)
# define MACH_IS_SUN3X (0)
#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
|| defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \
|| defined(CONFIG_BVME6000) || defined(CONFIG_HP300) \
|| defined(CONFIG_Q40) || defined(CONFIG_MVME147)
# define MACH_IS_SUN3X (m68k_machtype == MACH_SUN3X)
#else
# define CONFIG_SUN3X_ONLY
# define MACH_IS_SUN3X (1)
# define MACH_TYPE (MACH_SUN3X)
#endif
#ifndef MACH_TYPE
# define MACH_TYPE (m68k_machtype)
#endif
#endif /* __KERNEL__ */
/*
* CPU, FPU and MMU types
*
* Note: we may rely on the following equalities:
*
* CPU_68020 == MMU_68851
* CPU_68030 == MMU_68030
* CPU_68040 == FPU_68040 == MMU_68040
* CPU_68060 == FPU_68060 == MMU_68060
*/
#define CPUB_68020 0
#define CPUB_68030 1
#define CPUB_68040 2
#define CPUB_68060 3
#define CPU_68020 (1<<CPUB_68020)
#define CPU_68030 (1<<CPUB_68030)
#define CPU_68040 (1<<CPUB_68040)
#define CPU_68060 (1<<CPUB_68060)
#define FPUB_68881 0
#define FPUB_68882 1
#define FPUB_68040 2 /* Internal FPU */
#define FPUB_68060 3 /* Internal FPU */
#define FPUB_SUNFPA 4 /* Sun-3 FPA */
#define FPU_68881 (1<<FPUB_68881)
#define FPU_68882 (1<<FPUB_68882)
#define FPU_68040 (1<<FPUB_68040)
#define FPU_68060 (1<<FPUB_68060)
#define FPU_SUNFPA (1<<FPUB_SUNFPA)
#define MMUB_68851 0
#define MMUB_68030 1 /* Internal MMU */
#define MMUB_68040 2 /* Internal MMU */
#define MMUB_68060 3 /* Internal MMU */
#define MMUB_APOLLO 4 /* Custom Apollo */
#define MMUB_SUN3 5 /* Custom Sun-3 */
#define MMU_68851 (1<<MMUB_68851)
#define MMU_68030 (1<<MMUB_68030)
#define MMU_68040 (1<<MMUB_68040)
#define MMU_68060 (1<<MMUB_68060)
#define MMU_SUN3 (1<<MMUB_SUN3)
#define MMU_APOLLO (1<<MMUB_APOLLO)
#ifdef __KERNEL__
#ifndef __ASSEMBLY__
extern unsigned long m68k_cputype;
extern unsigned long m68k_fputype;
extern unsigned long m68k_mmutype;
#ifdef CONFIG_VME
extern unsigned long vme_brdtype;
#endif
/*
* m68k_is040or060 is != 0 for a '040 or higher;
* used numbers are 4 for 68040 and 6 for 68060.
*/
extern int m68k_is040or060;
#endif /* !__ASSEMBLY__ */
#if !defined(CONFIG_M68020)
# define CPU_IS_020 (0)
# define MMU_IS_851 (0)
# define MMU_IS_SUN3 (0)
#elif defined(CONFIG_M68030) || defined(CONFIG_M68040) || defined(CONFIG_M68060)
# define CPU_IS_020 (m68k_cputype & CPU_68020)
# define MMU_IS_851 (m68k_mmutype & MMU_68851)
# define MMU_IS_SUN3 (0) /* Sun3 not supported with other CPU enabled */
#else
# define CPU_M68020_ONLY
# define CPU_IS_020 (1)
#ifdef MACH_SUN3_ONLY
# define MMU_IS_SUN3 (1)
# define MMU_IS_851 (0)
#else
# define MMU_IS_SUN3 (0)
# define MMU_IS_851 (1)
#endif
#endif
#if !defined(CONFIG_M68030)
# define CPU_IS_030 (0)
# define MMU_IS_030 (0)
#elif defined(CONFIG_M68020) || defined(CONFIG_M68040) || defined(CONFIG_M68060)
# define CPU_IS_030 (m68k_cputype & CPU_68030)
# define MMU_IS_030 (m68k_mmutype & MMU_68030)
#else
# define CPU_M68030_ONLY
# define CPU_IS_030 (1)
# define MMU_IS_030 (1)
#endif
#if !defined(CONFIG_M68040)
# define CPU_IS_040 (0)
# define MMU_IS_040 (0)
#elif defined(CONFIG_M68020) || defined(CONFIG_M68030) || defined(CONFIG_M68060)
# define CPU_IS_040 (m68k_cputype & CPU_68040)
# define MMU_IS_040 (m68k_mmutype & MMU_68040)
#else
# define CPU_M68040_ONLY
# define CPU_IS_040 (1)
# define MMU_IS_040 (1)
#endif
#if !defined(CONFIG_M68060)
# define CPU_IS_060 (0)
# define MMU_IS_060 (0)
#elif defined(CONFIG_M68020) || defined(CONFIG_M68030) || defined(CONFIG_M68040)
# define CPU_IS_060 (m68k_cputype & CPU_68060)
# define MMU_IS_060 (m68k_mmutype & MMU_68060)
#else
# define CPU_M68060_ONLY
# define CPU_IS_060 (1)
# define MMU_IS_060 (1)
#endif
#if !defined(CONFIG_M68020) && !defined(CONFIG_M68030)
# define CPU_IS_020_OR_030 (0)
#else
# define CPU_M68020_OR_M68030
# if defined(CONFIG_M68040) || defined(CONFIG_M68060)
# define CPU_IS_020_OR_030 (!m68k_is040or060)
# else
# define CPU_M68020_OR_M68030_ONLY
# define CPU_IS_020_OR_030 (1)
# endif
#endif
#if !defined(CONFIG_M68040) && !defined(CONFIG_M68060)
# define CPU_IS_040_OR_060 (0)
#else
# define CPU_M68040_OR_M68060
# if defined(CONFIG_M68020) || defined(CONFIG_M68030)
# define CPU_IS_040_OR_060 (m68k_is040or060)
# else
# define CPU_M68040_OR_M68060_ONLY
# define CPU_IS_040_OR_060 (1)
# endif
#endif
#define CPU_TYPE (m68k_cputype)
#ifdef CONFIG_M68KFPU_EMU
# ifdef CONFIG_M68KFPU_EMU_ONLY
# define FPU_IS_EMU (1)
# else
# define FPU_IS_EMU (!m68k_fputype)
# endif
#else
# define FPU_IS_EMU (0)
#endif
/*
* Miscellaneous
*/
#define NUM_MEMINFO 4
#ifndef __ASSEMBLY__
struct mem_info {
unsigned long addr; /* physical address of memory chunk */
unsigned long size; /* length of memory chunk (in bytes) */
};
extern int m68k_num_memory; /* # of memory blocks found (and used) */
extern int m68k_realnum_memory; /* real # of memory blocks found */
extern struct mem_info m68k_memory[NUM_MEMINFO];/* memory description */
#endif
#endif /* __KERNEL__ */
#endif /* _M68K_SETUP_H */
#ifdef __KERNEL__
#include <asm/setup_mm.h>
/* We have a bigger command line buffer. */
#undef COMMAND_LINE_SIZE
#endif /* __KERNEL__ */
#define COMMAND_LINE_SIZE 512
#ifndef _ASM_M68k_SIGCONTEXT_H
#define _ASM_M68k_SIGCONTEXT_H
struct sigcontext {
unsigned long sc_mask; /* old sigmask */
unsigned long sc_usp; /* old user stack pointer */
unsigned long sc_d0;
unsigned long sc_d1;
unsigned long sc_a0;
unsigned long sc_a1;
#ifdef __uClinux__ #ifdef __uClinux__
#include "sigcontext_no.h" unsigned long sc_a5;
#else #endif
#include "sigcontext_mm.h" unsigned short sc_sr;
unsigned long sc_pc;
unsigned short sc_formatvec;
#ifndef __uClinux__
unsigned long sc_fpregs[2*3]; /* room for two fp registers */
unsigned long sc_fpcntl[3];
unsigned char sc_fpstate[216];
#endif
};
#endif #endif
#ifndef _ASM_M68k_SIGCONTEXT_H
#define _ASM_M68k_SIGCONTEXT_H
struct sigcontext {
unsigned long sc_mask; /* old sigmask */
unsigned long sc_usp; /* old user stack pointer */
unsigned long sc_d0;
unsigned long sc_d1;
unsigned long sc_a0;
unsigned long sc_a1;
unsigned short sc_sr;
unsigned long sc_pc;
unsigned short sc_formatvec;
unsigned long sc_fpregs[2*3]; /* room for two fp registers */
unsigned long sc_fpcntl[3];
unsigned char sc_fpstate[216];
};
#endif
#ifndef _ASM_M68KNOMMU_SIGCONTEXT_H
#define _ASM_M68KNOMMU_SIGCONTEXT_H
struct sigcontext {
unsigned long sc_mask; /* old sigmask */
unsigned long sc_usp; /* old user stack pointer */
unsigned long sc_d0;
unsigned long sc_d1;
unsigned long sc_a0;
unsigned long sc_a1;
unsigned long sc_a5;
unsigned short sc_sr;
unsigned long sc_pc;
unsigned short sc_formatvec;
};
#endif
#ifdef __uClinux__ #ifndef _M68K_SIGINFO_H
#include "siginfo_no.h" #define _M68K_SIGINFO_H
#ifndef __uClinux__
#define HAVE_ARCH_SIGINFO_T
#define HAVE_ARCH_COPY_SIGINFO
#endif
#include <asm-generic/siginfo.h>
#ifndef __uClinux__
typedef struct siginfo {
int si_signo;
int si_errno;
int si_code;
union {
int _pad[SI_PAD_SIZE];
/* kill() */
struct {
__kernel_pid_t _pid; /* sender's pid */
__kernel_uid_t _uid; /* backwards compatibility */
__kernel_uid32_t _uid32; /* sender's uid */
} _kill;
/* POSIX.1b timers */
struct {
timer_t _tid; /* timer id */
int _overrun; /* overrun count */
char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)];
sigval_t _sigval; /* same as below */
int _sys_private; /* not to be passed to user */
} _timer;
/* POSIX.1b signals */
struct {
__kernel_pid_t _pid; /* sender's pid */
__kernel_uid_t _uid; /* backwards compatibility */
sigval_t _sigval;
__kernel_uid32_t _uid32; /* sender's uid */
} _rt;
/* SIGCHLD */
struct {
__kernel_pid_t _pid; /* which child */
__kernel_uid_t _uid; /* backwards compatibility */
int _status; /* exit code */
clock_t _utime;
clock_t _stime;
__kernel_uid32_t _uid32; /* sender's uid */
} _sigchld;
/* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
struct {
void *_addr; /* faulting insn/memory ref. */
} _sigfault;
/* SIGPOLL */
struct {
int _band; /* POLL_IN, POLL_OUT, POLL_MSG */
int _fd;
} _sigpoll;
} _sifields;
} siginfo_t;
#define UID16_SIGINFO_COMPAT_NEEDED
/*
* How these fields are to be accessed.
*/
#undef si_uid
#ifdef __KERNEL__
#define si_uid _sifields._kill._uid32
#define si_uid16 _sifields._kill._uid
#else #else
#include "siginfo_mm.h" #define si_uid _sifields._kill._uid
#endif
#ifdef __KERNEL__
#include <linux/string.h>
static inline void copy_siginfo(struct siginfo *to, struct siginfo *from)
{
if (from->si_code < 0)
memcpy(to, from, sizeof(*to));
else
/* _sigchld is currently the largest know union member */
memcpy(to, from, 3*sizeof(int) + sizeof(from->_sifields._sigchld));
}
#endif /* __KERNEL__ */
#endif /* !__uClinux__ */
#endif #endif
#ifndef _M68K_SIGINFO_H
#define _M68K_SIGINFO_H
#define HAVE_ARCH_SIGINFO_T
#define HAVE_ARCH_COPY_SIGINFO
#include <asm-generic/siginfo.h>
typedef struct siginfo {
int si_signo;
int si_errno;
int si_code;
union {
int _pad[SI_PAD_SIZE];
/* kill() */
struct {
__kernel_pid_t _pid; /* sender's pid */
__kernel_uid_t _uid; /* backwards compatibility */
__kernel_uid32_t _uid32; /* sender's uid */
} _kill;
/* POSIX.1b timers */
struct {
timer_t _tid; /* timer id */
int _overrun; /* overrun count */
char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)];
sigval_t _sigval; /* same as below */
int _sys_private; /* not to be passed to user */
} _timer;
/* POSIX.1b signals */
struct {
__kernel_pid_t _pid; /* sender's pid */
__kernel_uid_t _uid; /* backwards compatibility */
sigval_t _sigval;
__kernel_uid32_t _uid32; /* sender's uid */
} _rt;
/* SIGCHLD */
struct {
__kernel_pid_t _pid; /* which child */
__kernel_uid_t _uid; /* backwards compatibility */
int _status; /* exit code */
clock_t _utime;
clock_t _stime;
__kernel_uid32_t _uid32; /* sender's uid */
} _sigchld;
/* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
struct {
void *_addr; /* faulting insn/memory ref. */
} _sigfault;
/* SIGPOLL */
struct {
int _band; /* POLL_IN, POLL_OUT, POLL_MSG */
int _fd;
} _sigpoll;
} _sifields;
} siginfo_t;
#define UID16_SIGINFO_COMPAT_NEEDED
/*
* How these fields are to be accessed.
*/
#undef si_uid
#ifdef __KERNEL__
#define si_uid _sifields._kill._uid32
#define si_uid16 _sifields._kill._uid
#else
#define si_uid _sifields._kill._uid
#endif
#ifdef __KERNEL__
#include <linux/string.h>
static inline void copy_siginfo(struct siginfo *to, struct siginfo *from)
{
if (from->si_code < 0)
memcpy(to, from, sizeof(*to));
else
/* _sigchld is currently the largest know union member */
memcpy(to, from, 3*sizeof(int) + sizeof(from->_sifields._sigchld));
}
#endif /* __KERNEL__ */
#endif
#ifndef _M68KNOMMU_SIGINFO_H
#define _M68KNOMMU_SIGINFO_H
#include <asm-generic/siginfo.h>
#endif
#ifdef __uClinux__ #ifndef _M68K_SIGNAL_H
#include "signal_no.h" #define _M68K_SIGNAL_H
#include <linux/types.h>
/* Avoid too many header ordering problems. */
struct siginfo;
#ifdef __KERNEL__
/* Most things should be clean enough to redefine this at will, if care
is taken to make libc match. */
#define _NSIG 64
#define _NSIG_BPW 32
#define _NSIG_WORDS (_NSIG / _NSIG_BPW)
typedef unsigned long old_sigset_t; /* at least 32 bits */
typedef struct {
unsigned long sig[_NSIG_WORDS];
} sigset_t;
#else #else
#include "signal_mm.h" /* Here we must cater to libcs that poke about in kernel headers. */
#endif
#define NSIG 32
typedef unsigned long sigset_t;
#endif /* __KERNEL__ */
#define SIGHUP 1
#define SIGINT 2
#define SIGQUIT 3
#define SIGILL 4
#define SIGTRAP 5
#define SIGABRT 6
#define SIGIOT 6
#define SIGBUS 7
#define SIGFPE 8
#define SIGKILL 9
#define SIGUSR1 10
#define SIGSEGV 11
#define SIGUSR2 12
#define SIGPIPE 13
#define SIGALRM 14
#define SIGTERM 15
#define SIGSTKFLT 16
#define SIGCHLD 17
#define SIGCONT 18
#define SIGSTOP 19
#define SIGTSTP 20
#define SIGTTIN 21
#define SIGTTOU 22
#define SIGURG 23
#define SIGXCPU 24
#define SIGXFSZ 25
#define SIGVTALRM 26
#define SIGPROF 27
#define SIGWINCH 28
#define SIGIO 29
#define SIGPOLL SIGIO
/*
#define SIGLOST 29
*/
#define SIGPWR 30
#define SIGSYS 31
#define SIGUNUSED 31
/* These should not be considered constants from userland. */
#define SIGRTMIN 32
#define SIGRTMAX _NSIG
/*
* SA_FLAGS values:
*
* SA_ONSTACK indicates that a registered stack_t will be used.
* SA_RESTART flag to get restarting signals (which were the default long ago)
* SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
* SA_RESETHAND clears the handler when the signal is delivered.
* SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
* SA_NODEFER prevents the current signal from being masked in the handler.
*
* SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
* Unix names RESETHAND and NODEFER respectively.
*/
#define SA_NOCLDSTOP 0x00000001
#define SA_NOCLDWAIT 0x00000002
#define SA_SIGINFO 0x00000004
#define SA_ONSTACK 0x08000000
#define SA_RESTART 0x10000000
#define SA_NODEFER 0x40000000
#define SA_RESETHAND 0x80000000
#define SA_NOMASK SA_NODEFER
#define SA_ONESHOT SA_RESETHAND
/*
* sigaltstack controls
*/
#define SS_ONSTACK 1
#define SS_DISABLE 2
#define MINSIGSTKSZ 2048
#define SIGSTKSZ 8192
#include <asm-generic/signal.h>
#ifdef __KERNEL__
struct old_sigaction {
__sighandler_t sa_handler;
old_sigset_t sa_mask;
unsigned long sa_flags;
__sigrestore_t sa_restorer;
};
struct sigaction {
__sighandler_t sa_handler;
unsigned long sa_flags;
__sigrestore_t sa_restorer;
sigset_t sa_mask; /* mask last for extensibility */
};
struct k_sigaction {
struct sigaction sa;
};
#else
/* Here we must cater to libcs that poke about in kernel headers. */
struct sigaction {
union {
__sighandler_t _sa_handler;
void (*_sa_sigaction)(int, struct siginfo *, void *);
} _u;
sigset_t sa_mask;
unsigned long sa_flags;
void (*sa_restorer)(void);
};
#define sa_handler _u._sa_handler
#define sa_sigaction _u._sa_sigaction
#endif /* __KERNEL__ */
typedef struct sigaltstack {
void __user *ss_sp;
int ss_flags;
size_t ss_size;
} stack_t;
#ifdef __KERNEL__
#include <asm/sigcontext.h>
#ifndef __uClinux__
#define __HAVE_ARCH_SIG_BITOPS
static inline void sigaddset(sigset_t *set, int _sig)
{
asm ("bfset %0{%1,#1}"
: "+od" (*set)
: "id" ((_sig - 1) ^ 31)
: "cc");
}
static inline void sigdelset(sigset_t *set, int _sig)
{
asm ("bfclr %0{%1,#1}"
: "+od" (*set)
: "id" ((_sig - 1) ^ 31)
: "cc");
}
static inline int __const_sigismember(sigset_t *set, int _sig)
{
unsigned long sig = _sig - 1;
return 1 & (set->sig[sig / _NSIG_BPW] >> (sig % _NSIG_BPW));
}
static inline int __gen_sigismember(sigset_t *set, int _sig)
{
int ret;
asm ("bfextu %1{%2,#1},%0"
: "=d" (ret)
: "od" (*set), "id" ((_sig-1) ^ 31)
: "cc");
return ret;
}
#define sigismember(set,sig) \
(__builtin_constant_p(sig) ? \
__const_sigismember(set,sig) : \
__gen_sigismember(set,sig))
static inline int sigfindinword(unsigned long word)
{
asm ("bfffo %1{#0,#0},%0"
: "=d" (word)
: "d" (word & -word)
: "cc");
return word ^ 31;
}
struct pt_regs;
extern void ptrace_signal_deliver(struct pt_regs *regs, void *cookie);
#else
#undef __HAVE_ARCH_SIG_BITOPS
#define ptrace_signal_deliver(regs, cookie) do { } while (0)
#endif /* __uClinux__ */
#endif /* __KERNEL__ */
#endif /* _M68K_SIGNAL_H */
#ifndef _M68K_SIGNAL_H
#define _M68K_SIGNAL_H
#include <linux/types.h>
/* Avoid too many header ordering problems. */
struct siginfo;
#ifdef __KERNEL__
/* Most things should be clean enough to redefine this at will, if care
is taken to make libc match. */
#define _NSIG 64
#define _NSIG_BPW 32
#define _NSIG_WORDS (_NSIG / _NSIG_BPW)
typedef unsigned long old_sigset_t; /* at least 32 bits */
typedef struct {
unsigned long sig[_NSIG_WORDS];
} sigset_t;
#else
/* Here we must cater to libcs that poke about in kernel headers. */
#define NSIG 32
typedef unsigned long sigset_t;
#endif /* __KERNEL__ */
#define SIGHUP 1
#define SIGINT 2
#define SIGQUIT 3
#define SIGILL 4
#define SIGTRAP 5
#define SIGABRT 6
#define SIGIOT 6
#define SIGBUS 7
#define SIGFPE 8
#define SIGKILL 9
#define SIGUSR1 10
#define SIGSEGV 11
#define SIGUSR2 12
#define SIGPIPE 13
#define SIGALRM 14
#define SIGTERM 15
#define SIGSTKFLT 16
#define SIGCHLD 17
#define SIGCONT 18
#define SIGSTOP 19
#define SIGTSTP 20
#define SIGTTIN 21
#define SIGTTOU 22
#define SIGURG 23
#define SIGXCPU 24
#define SIGXFSZ 25
#define SIGVTALRM 26
#define SIGPROF 27
#define SIGWINCH 28
#define SIGIO 29
#define SIGPOLL SIGIO
/*
#define SIGLOST 29
*/
#define SIGPWR 30
#define SIGSYS 31
#define SIGUNUSED 31
/* These should not be considered constants from userland. */
#define SIGRTMIN 32
#define SIGRTMAX _NSIG
/*
* SA_FLAGS values:
*
* SA_ONSTACK indicates that a registered stack_t will be used.
* SA_RESTART flag to get restarting signals (which were the default long ago)
* SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
* SA_RESETHAND clears the handler when the signal is delivered.
* SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
* SA_NODEFER prevents the current signal from being masked in the handler.
*
* SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
* Unix names RESETHAND and NODEFER respectively.
*/
#define SA_NOCLDSTOP 0x00000001
#define SA_NOCLDWAIT 0x00000002
#define SA_SIGINFO 0x00000004
#define SA_ONSTACK 0x08000000
#define SA_RESTART 0x10000000
#define SA_NODEFER 0x40000000
#define SA_RESETHAND 0x80000000
#define SA_NOMASK SA_NODEFER
#define SA_ONESHOT SA_RESETHAND
/*
* sigaltstack controls
*/
#define SS_ONSTACK 1
#define SS_DISABLE 2
#define MINSIGSTKSZ 2048
#define SIGSTKSZ 8192
#include <asm-generic/signal.h>
#ifdef __KERNEL__
struct old_sigaction {
__sighandler_t sa_handler;
old_sigset_t sa_mask;
unsigned long sa_flags;
__sigrestore_t sa_restorer;
};
struct sigaction {
__sighandler_t sa_handler;
unsigned long sa_flags;
__sigrestore_t sa_restorer;
sigset_t sa_mask; /* mask last for extensibility */
};
struct k_sigaction {
struct sigaction sa;
};
#else
/* Here we must cater to libcs that poke about in kernel headers. */
struct sigaction {
union {
__sighandler_t _sa_handler;
void (*_sa_sigaction)(int, struct siginfo *, void *);
} _u;
sigset_t sa_mask;
unsigned long sa_flags;
void (*sa_restorer)(void);
};
#define sa_handler _u._sa_handler
#define sa_sigaction _u._sa_sigaction
#endif /* __KERNEL__ */
typedef struct sigaltstack {
void __user *ss_sp;
int ss_flags;
size_t ss_size;
} stack_t;
#ifdef __KERNEL__
#include <asm/sigcontext.h>
#define __HAVE_ARCH_SIG_BITOPS
static inline void sigaddset(sigset_t *set, int _sig)
{
asm ("bfset %0{%1,#1}"
: "+od" (*set)
: "id" ((_sig - 1) ^ 31)
: "cc");
}
static inline void sigdelset(sigset_t *set, int _sig)
{
asm ("bfclr %0{%1,#1}"
: "+od" (*set)
: "id" ((_sig - 1) ^ 31)
: "cc");
}
static inline int __const_sigismember(sigset_t *set, int _sig)
{
unsigned long sig = _sig - 1;
return 1 & (set->sig[sig / _NSIG_BPW] >> (sig % _NSIG_BPW));
}
static inline int __gen_sigismember(sigset_t *set, int _sig)
{
int ret;
asm ("bfextu %1{%2,#1},%0"
: "=d" (ret)
: "od" (*set), "id" ((_sig-1) ^ 31)
: "cc");
return ret;
}
#define sigismember(set,sig) \
(__builtin_constant_p(sig) ? \
__const_sigismember(set,sig) : \
__gen_sigismember(set,sig))
static inline int sigfindinword(unsigned long word)
{
asm ("bfffo %1{#0,#0},%0"
: "=d" (word)
: "d" (word & -word)
: "cc");
return word ^ 31;
}
struct pt_regs;
extern void ptrace_signal_deliver(struct pt_regs *regs, void *cookie);
#endif /* __KERNEL__ */
#endif /* _M68K_SIGNAL_H */
#ifndef _M68KNOMMU_SIGNAL_H
#define _M68KNOMMU_SIGNAL_H
#include <linux/types.h>
/* Avoid too many header ordering problems. */
struct siginfo;
#ifdef __KERNEL__
/* Most things should be clean enough to redefine this at will, if care
is taken to make libc match. */
#define _NSIG 64
#define _NSIG_BPW 32
#define _NSIG_WORDS (_NSIG / _NSIG_BPW)
typedef unsigned long old_sigset_t; /* at least 32 bits */
typedef struct {
unsigned long sig[_NSIG_WORDS];
} sigset_t;
#else
/* Here we must cater to libcs that poke about in kernel headers. */
#define NSIG 32
typedef unsigned long sigset_t;
#endif /* __KERNEL__ */
#define SIGHUP 1
#define SIGINT 2
#define SIGQUIT 3
#define SIGILL 4
#define SIGTRAP 5
#define SIGABRT 6
#define SIGIOT 6
#define SIGBUS 7
#define SIGFPE 8
#define SIGKILL 9
#define SIGUSR1 10
#define SIGSEGV 11
#define SIGUSR2 12
#define SIGPIPE 13
#define SIGALRM 14
#define SIGTERM 15
#define SIGSTKFLT 16
#define SIGCHLD 17
#define SIGCONT 18
#define SIGSTOP 19
#define SIGTSTP 20
#define SIGTTIN 21
#define SIGTTOU 22
#define SIGURG 23
#define SIGXCPU 24
#define SIGXFSZ 25
#define SIGVTALRM 26
#define SIGPROF 27
#define SIGWINCH 28
#define SIGIO 29
#define SIGPOLL SIGIO
/*
#define SIGLOST 29
*/
#define SIGPWR 30
#define SIGSYS 31
#define SIGUNUSED 31
/* These should not be considered constants from userland. */
#define SIGRTMIN 32
#define SIGRTMAX _NSIG
/*
* SA_FLAGS values:
*
* SA_ONSTACK indicates that a registered stack_t will be used.
* SA_RESTART flag to get restarting signals (which were the default long ago)
* SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
* SA_RESETHAND clears the handler when the signal is delivered.
* SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
* SA_NODEFER prevents the current signal from being masked in the handler.
*
* SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
* Unix names RESETHAND and NODEFER respectively.
*/
#define SA_NOCLDSTOP 0x00000001
#define SA_NOCLDWAIT 0x00000002
#define SA_SIGINFO 0x00000004
#define SA_ONSTACK 0x08000000
#define SA_RESTART 0x10000000
#define SA_NODEFER 0x40000000
#define SA_RESETHAND 0x80000000
#define SA_NOMASK SA_NODEFER
#define SA_ONESHOT SA_RESETHAND
/*
* sigaltstack controls
*/
#define SS_ONSTACK 1
#define SS_DISABLE 2
#define MINSIGSTKSZ 2048
#define SIGSTKSZ 8192
#include <asm-generic/signal.h>
#ifdef __KERNEL__
struct old_sigaction {
__sighandler_t sa_handler;
old_sigset_t sa_mask;
unsigned long sa_flags;
void (*sa_restorer)(void);
};
struct sigaction {
__sighandler_t sa_handler;
unsigned long sa_flags;
void (*sa_restorer)(void);
sigset_t sa_mask; /* mask last for extensibility */
};
struct k_sigaction {
struct sigaction sa;
};
#else
/* Here we must cater to libcs that poke about in kernel headers. */
struct sigaction {
union {
__sighandler_t _sa_handler;
void (*_sa_sigaction)(int, struct siginfo *, void *);
} _u;
sigset_t sa_mask;
unsigned long sa_flags;
void (*sa_restorer)(void);
};
#define sa_handler _u._sa_handler
#define sa_sigaction _u._sa_sigaction
#endif /* __KERNEL__ */
typedef struct sigaltstack {
void *ss_sp;
int ss_flags;
size_t ss_size;
} stack_t;
#ifdef __KERNEL__
#include <asm/sigcontext.h>
#undef __HAVE_ARCH_SIG_BITOPS
#define ptrace_signal_deliver(regs, cookie) do { } while (0)
#endif /* __KERNEL__ */
#endif /* _M68KNOMMU_SIGNAL_H */
#ifdef __uClinux__ #ifndef _M68K_SWAB_H
#include "swab_no.h" #define _M68K_SWAB_H
#else
#include "swab_mm.h" #include <asm/types.h>
#include <linux/compiler.h>
#define __SWAB_64_THRU_32__
#if defined (__mcfisaaplus__) || defined (__mcfisac__)
static inline __attribute_const__ __u32 __arch_swab32(__u32 val)
{
__asm__("byterev %0" : "=d" (val) : "0" (val));
return val;
}
#define __arch_swab32 __arch_swab32
#elif !defined(__uClinux__)
static inline __attribute_const__ __u32 __arch_swab32(__u32 val)
{
__asm__("rolw #8,%0; swap %0; rolw #8,%0" : "=d" (val) : "0" (val));
return val;
}
#define __arch_swab32 __arch_swab32
#endif #endif
#endif /* _M68K_SWAB_H */
#ifndef _M68K_SWAB_H
#define _M68K_SWAB_H
#include <asm/types.h>
#include <linux/compiler.h>
#define __SWAB_64_THRU_32__
static inline __attribute_const__ __u32 __arch_swab32(__u32 val)
{
__asm__("rolw #8,%0; swap %0; rolw #8,%0" : "=d" (val) : "0" (val));
return val;
}
#define __arch_swab32 __arch_swab32
#endif /* _M68K_SWAB_H */
#ifndef _M68KNOMMU_SWAB_H
#define _M68KNOMMU_SWAB_H
#include <linux/types.h>
#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__)
# define __SWAB_64_THRU_32__
#endif
#if defined (__mcfisaaplus__) || defined (__mcfisac__)
static inline __attribute_const__ __u32 __arch_swab32(__u32 val)
{
asm(
"byterev %0"
: "=d" (val)
: "0" (val)
);
return val;
}
#define __arch_swab32 __arch_swab32
#endif
#endif /* _M68KNOMMU_SWAB_H */
#ifdef __uClinux__ #ifndef _ASM_M68K_UNISTD_H_
#include "unistd_no.h" #define _ASM_M68K_UNISTD_H_
#else
#include "unistd_mm.h" /*
#endif * This file contains the system call numbers.
*/
#define __NR_restart_syscall 0
#define __NR_exit 1
#define __NR_fork 2
#define __NR_read 3
#define __NR_write 4
#define __NR_open 5
#define __NR_close 6
#define __NR_waitpid 7
#define __NR_creat 8
#define __NR_link 9
#define __NR_unlink 10
#define __NR_execve 11
#define __NR_chdir 12
#define __NR_time 13
#define __NR_mknod 14
#define __NR_chmod 15
#define __NR_chown 16
#define __NR_break 17
#define __NR_oldstat 18
#define __NR_lseek 19
#define __NR_getpid 20
#define __NR_mount 21
#define __NR_umount 22
#define __NR_setuid 23
#define __NR_getuid 24
#define __NR_stime 25
#define __NR_ptrace 26
#define __NR_alarm 27
#define __NR_oldfstat 28
#define __NR_pause 29
#define __NR_utime 30
#define __NR_stty 31
#define __NR_gtty 32
#define __NR_access 33
#define __NR_nice 34
#define __NR_ftime 35
#define __NR_sync 36
#define __NR_kill 37
#define __NR_rename 38
#define __NR_mkdir 39
#define __NR_rmdir 40
#define __NR_dup 41
#define __NR_pipe 42
#define __NR_times 43
#define __NR_prof 44
#define __NR_brk 45
#define __NR_setgid 46
#define __NR_getgid 47
#define __NR_signal 48
#define __NR_geteuid 49
#define __NR_getegid 50
#define __NR_acct 51
#define __NR_umount2 52
#define __NR_lock 53
#define __NR_ioctl 54
#define __NR_fcntl 55
#define __NR_mpx 56
#define __NR_setpgid 57
#define __NR_ulimit 58
#define __NR_oldolduname 59
#define __NR_umask 60
#define __NR_chroot 61
#define __NR_ustat 62
#define __NR_dup2 63
#define __NR_getppid 64
#define __NR_getpgrp 65
#define __NR_setsid 66
#define __NR_sigaction 67
#define __NR_sgetmask 68
#define __NR_ssetmask 69
#define __NR_setreuid 70
#define __NR_setregid 71
#define __NR_sigsuspend 72
#define __NR_sigpending 73
#define __NR_sethostname 74
#define __NR_setrlimit 75
#define __NR_getrlimit 76
#define __NR_getrusage 77
#define __NR_gettimeofday 78
#define __NR_settimeofday 79
#define __NR_getgroups 80
#define __NR_setgroups 81
#define __NR_select 82
#define __NR_symlink 83
#define __NR_oldlstat 84
#define __NR_readlink 85
#define __NR_uselib 86
#define __NR_swapon 87
#define __NR_reboot 88
#define __NR_readdir 89
#define __NR_mmap 90
#define __NR_munmap 91
#define __NR_truncate 92
#define __NR_ftruncate 93
#define __NR_fchmod 94
#define __NR_fchown 95
#define __NR_getpriority 96
#define __NR_setpriority 97
#define __NR_profil 98
#define __NR_statfs 99
#define __NR_fstatfs 100
#define __NR_ioperm 101
#define __NR_socketcall 102
#define __NR_syslog 103
#define __NR_setitimer 104
#define __NR_getitimer 105
#define __NR_stat 106
#define __NR_lstat 107
#define __NR_fstat 108
#define __NR_olduname 109
#define __NR_iopl /* 110 */ not supported
#define __NR_vhangup 111
#define __NR_idle /* 112 */ Obsolete
#define __NR_vm86 /* 113 */ not supported
#define __NR_wait4 114
#define __NR_swapoff 115
#define __NR_sysinfo 116
#define __NR_ipc 117
#define __NR_fsync 118
#define __NR_sigreturn 119
#define __NR_clone 120
#define __NR_setdomainname 121
#define __NR_uname 122
#define __NR_cacheflush 123
#define __NR_adjtimex 124
#define __NR_mprotect 125
#define __NR_sigprocmask 126
#define __NR_create_module 127
#define __NR_init_module 128
#define __NR_delete_module 129
#define __NR_get_kernel_syms 130
#define __NR_quotactl 131
#define __NR_getpgid 132
#define __NR_fchdir 133
#define __NR_bdflush 134
#define __NR_sysfs 135
#define __NR_personality 136
#define __NR_afs_syscall 137 /* Syscall for Andrew File System */
#define __NR_setfsuid 138
#define __NR_setfsgid 139
#define __NR__llseek 140
#define __NR_getdents 141
#define __NR__newselect 142
#define __NR_flock 143
#define __NR_msync 144
#define __NR_readv 145
#define __NR_writev 146
#define __NR_getsid 147
#define __NR_fdatasync 148
#define __NR__sysctl 149
#define __NR_mlock 150
#define __NR_munlock 151
#define __NR_mlockall 152
#define __NR_munlockall 153
#define __NR_sched_setparam 154
#define __NR_sched_getparam 155
#define __NR_sched_setscheduler 156
#define __NR_sched_getscheduler 157
#define __NR_sched_yield 158
#define __NR_sched_get_priority_max 159
#define __NR_sched_get_priority_min 160
#define __NR_sched_rr_get_interval 161
#define __NR_nanosleep 162
#define __NR_mremap 163
#define __NR_setresuid 164
#define __NR_getresuid 165
#define __NR_getpagesize 166
#define __NR_query_module 167
#define __NR_poll 168
#define __NR_nfsservctl 169
#define __NR_setresgid 170
#define __NR_getresgid 171
#define __NR_prctl 172
#define __NR_rt_sigreturn 173
#define __NR_rt_sigaction 174
#define __NR_rt_sigprocmask 175
#define __NR_rt_sigpending 176
#define __NR_rt_sigtimedwait 177
#define __NR_rt_sigqueueinfo 178
#define __NR_rt_sigsuspend 179
#define __NR_pread64 180
#define __NR_pwrite64 181
#define __NR_lchown 182
#define __NR_getcwd 183
#define __NR_capget 184
#define __NR_capset 185
#define __NR_sigaltstack 186
#define __NR_sendfile 187
#define __NR_getpmsg 188 /* some people actually want streams */
#define __NR_putpmsg 189 /* some people actually want streams */
#define __NR_vfork 190
#define __NR_ugetrlimit 191
#define __NR_mmap2 192
#define __NR_truncate64 193
#define __NR_ftruncate64 194
#define __NR_stat64 195
#define __NR_lstat64 196
#define __NR_fstat64 197
#define __NR_chown32 198
#define __NR_getuid32 199
#define __NR_getgid32 200
#define __NR_geteuid32 201
#define __NR_getegid32 202
#define __NR_setreuid32 203
#define __NR_setregid32 204
#define __NR_getgroups32 205
#define __NR_setgroups32 206
#define __NR_fchown32 207
#define __NR_setresuid32 208
#define __NR_getresuid32 209
#define __NR_setresgid32 210
#define __NR_getresgid32 211
#define __NR_lchown32 212
#define __NR_setuid32 213
#define __NR_setgid32 214
#define __NR_setfsuid32 215
#define __NR_setfsgid32 216
#define __NR_pivot_root 217
#define __NR_getdents64 220
#define __NR_gettid 221
#define __NR_tkill 222
#define __NR_setxattr 223
#define __NR_lsetxattr 224
#define __NR_fsetxattr 225
#define __NR_getxattr 226
#define __NR_lgetxattr 227
#define __NR_fgetxattr 228
#define __NR_listxattr 229
#define __NR_llistxattr 230
#define __NR_flistxattr 231
#define __NR_removexattr 232
#define __NR_lremovexattr 233
#define __NR_fremovexattr 234
#define __NR_futex 235
#define __NR_sendfile64 236
#define __NR_mincore 237
#define __NR_madvise 238
#define __NR_fcntl64 239
#define __NR_readahead 240
#define __NR_io_setup 241
#define __NR_io_destroy 242
#define __NR_io_getevents 243
#define __NR_io_submit 244
#define __NR_io_cancel 245
#define __NR_fadvise64 246
#define __NR_exit_group 247
#define __NR_lookup_dcookie 248
#define __NR_epoll_create 249
#define __NR_epoll_ctl 250
#define __NR_epoll_wait 251
#define __NR_remap_file_pages 252
#define __NR_set_tid_address 253
#define __NR_timer_create 254
#define __NR_timer_settime 255
#define __NR_timer_gettime 256
#define __NR_timer_getoverrun 257
#define __NR_timer_delete 258
#define __NR_clock_settime 259
#define __NR_clock_gettime 260
#define __NR_clock_getres 261
#define __NR_clock_nanosleep 262
#define __NR_statfs64 263
#define __NR_fstatfs64 264
#define __NR_tgkill 265
#define __NR_utimes 266
#define __NR_fadvise64_64 267
#define __NR_mbind 268
#define __NR_get_mempolicy 269
#define __NR_set_mempolicy 270
#define __NR_mq_open 271
#define __NR_mq_unlink 272
#define __NR_mq_timedsend 273
#define __NR_mq_timedreceive 274
#define __NR_mq_notify 275
#define __NR_mq_getsetattr 276
#define __NR_waitid 277
#define __NR_vserver 278
#define __NR_add_key 279
#define __NR_request_key 280
#define __NR_keyctl 281
#define __NR_ioprio_set 282
#define __NR_ioprio_get 283
#define __NR_inotify_init 284
#define __NR_inotify_add_watch 285
#define __NR_inotify_rm_watch 286
#define __NR_migrate_pages 287
#define __NR_openat 288
#define __NR_mkdirat 289
#define __NR_mknodat 290
#define __NR_fchownat 291
#define __NR_futimesat 292
#define __NR_fstatat64 293
#define __NR_unlinkat 294
#define __NR_renameat 295
#define __NR_linkat 296
#define __NR_symlinkat 297
#define __NR_readlinkat 298
#define __NR_fchmodat 299
#define __NR_faccessat 300
#define __NR_pselect6 301
#define __NR_ppoll 302
#define __NR_unshare 303
#define __NR_set_robust_list 304
#define __NR_get_robust_list 305
#define __NR_splice 306
#define __NR_sync_file_range 307
#define __NR_tee 308
#define __NR_vmsplice 309
#define __NR_move_pages 310
#define __NR_sched_setaffinity 311
#define __NR_sched_getaffinity 312
#define __NR_kexec_load 313
#define __NR_getcpu 314
#define __NR_epoll_pwait 315
#define __NR_utimensat 316
#define __NR_signalfd 317
#define __NR_timerfd_create 318
#define __NR_eventfd 319
#define __NR_fallocate 320
#define __NR_timerfd_settime 321
#define __NR_timerfd_gettime 322
#define __NR_signalfd4 323
#define __NR_eventfd2 324
#define __NR_epoll_create1 325
#define __NR_dup3 326
#define __NR_pipe2 327
#define __NR_inotify_init1 328
#ifdef __KERNEL__
#define NR_syscalls 329
#define __ARCH_WANT_IPC_PARSE_VERSION
#define __ARCH_WANT_OLD_READDIR
#define __ARCH_WANT_OLD_STAT
#define __ARCH_WANT_STAT64
#define __ARCH_WANT_SYS_ALARM
#define __ARCH_WANT_SYS_GETHOSTNAME
#define __ARCH_WANT_SYS_PAUSE
#define __ARCH_WANT_SYS_SGETMASK
#define __ARCH_WANT_SYS_SIGNAL
#define __ARCH_WANT_SYS_TIME
#define __ARCH_WANT_SYS_UTIME
#define __ARCH_WANT_SYS_WAITPID
#define __ARCH_WANT_SYS_SOCKETCALL
#define __ARCH_WANT_SYS_FADVISE64
#define __ARCH_WANT_SYS_GETPGRP
#define __ARCH_WANT_SYS_LLSEEK
#define __ARCH_WANT_SYS_NICE
#define __ARCH_WANT_SYS_OLD_GETRLIMIT
#define __ARCH_WANT_SYS_OLDUMOUNT
#define __ARCH_WANT_SYS_SIGPENDING
#define __ARCH_WANT_SYS_SIGPROCMASK
#define __ARCH_WANT_SYS_RT_SIGACTION
/*
* "Conditional" syscalls
*
* What we want is __attribute__((weak,alias("sys_ni_syscall"))),
* but it doesn't work on all toolchains, so we just do it by hand
*/
#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
#endif /* __KERNEL__ */
#endif /* _ASM_M68K_UNISTD_H_ */
#ifndef _ASM_M68K_UNISTD_H_
#define _ASM_M68K_UNISTD_H_
/*
* This file contains the system call numbers.
*/
#define __NR_restart_syscall 0
#define __NR_exit 1
#define __NR_fork 2
#define __NR_read 3
#define __NR_write 4
#define __NR_open 5
#define __NR_close 6
#define __NR_waitpid 7
#define __NR_creat 8
#define __NR_link 9
#define __NR_unlink 10
#define __NR_execve 11
#define __NR_chdir 12
#define __NR_time 13
#define __NR_mknod 14
#define __NR_chmod 15
#define __NR_chown 16
#define __NR_break 17
#define __NR_oldstat 18
#define __NR_lseek 19
#define __NR_getpid 20
#define __NR_mount 21
#define __NR_umount 22
#define __NR_setuid 23
#define __NR_getuid 24
#define __NR_stime 25
#define __NR_ptrace 26
#define __NR_alarm 27
#define __NR_oldfstat 28
#define __NR_pause 29
#define __NR_utime 30
#define __NR_stty 31
#define __NR_gtty 32
#define __NR_access 33
#define __NR_nice 34
#define __NR_ftime 35
#define __NR_sync 36
#define __NR_kill 37
#define __NR_rename 38
#define __NR_mkdir 39
#define __NR_rmdir 40
#define __NR_dup 41
#define __NR_pipe 42
#define __NR_times 43
#define __NR_prof 44
#define __NR_brk 45
#define __NR_setgid 46
#define __NR_getgid 47
#define __NR_signal 48
#define __NR_geteuid 49
#define __NR_getegid 50
#define __NR_acct 51
#define __NR_umount2 52
#define __NR_lock 53
#define __NR_ioctl 54
#define __NR_fcntl 55
#define __NR_mpx 56
#define __NR_setpgid 57
#define __NR_ulimit 58
#define __NR_oldolduname 59
#define __NR_umask 60
#define __NR_chroot 61
#define __NR_ustat 62
#define __NR_dup2 63
#define __NR_getppid 64
#define __NR_getpgrp 65
#define __NR_setsid 66
#define __NR_sigaction 67
#define __NR_sgetmask 68
#define __NR_ssetmask 69
#define __NR_setreuid 70
#define __NR_setregid 71
#define __NR_sigsuspend 72
#define __NR_sigpending 73
#define __NR_sethostname 74
#define __NR_setrlimit 75
#define __NR_getrlimit 76
#define __NR_getrusage 77
#define __NR_gettimeofday 78
#define __NR_settimeofday 79
#define __NR_getgroups 80
#define __NR_setgroups 81
#define __NR_select 82
#define __NR_symlink 83
#define __NR_oldlstat 84
#define __NR_readlink 85
#define __NR_uselib 86
#define __NR_swapon 87
#define __NR_reboot 88
#define __NR_readdir 89
#define __NR_mmap 90
#define __NR_munmap 91
#define __NR_truncate 92
#define __NR_ftruncate 93
#define __NR_fchmod 94
#define __NR_fchown 95
#define __NR_getpriority 96
#define __NR_setpriority 97
#define __NR_profil 98
#define __NR_statfs 99
#define __NR_fstatfs 100
#define __NR_ioperm 101
#define __NR_socketcall 102
#define __NR_syslog 103
#define __NR_setitimer 104
#define __NR_getitimer 105
#define __NR_stat 106
#define __NR_lstat 107
#define __NR_fstat 108
#define __NR_olduname 109
#define __NR_iopl /* 110 */ not supported
#define __NR_vhangup 111
#define __NR_idle /* 112 */ Obsolete
#define __NR_vm86 /* 113 */ not supported
#define __NR_wait4 114
#define __NR_swapoff 115
#define __NR_sysinfo 116
#define __NR_ipc 117
#define __NR_fsync 118
#define __NR_sigreturn 119
#define __NR_clone 120
#define __NR_setdomainname 121
#define __NR_uname 122
#define __NR_cacheflush 123
#define __NR_adjtimex 124
#define __NR_mprotect 125
#define __NR_sigprocmask 126
#define __NR_create_module 127
#define __NR_init_module 128
#define __NR_delete_module 129
#define __NR_get_kernel_syms 130
#define __NR_quotactl 131
#define __NR_getpgid 132
#define __NR_fchdir 133
#define __NR_bdflush 134
#define __NR_sysfs 135
#define __NR_personality 136
#define __NR_afs_syscall 137 /* Syscall for Andrew File System */
#define __NR_setfsuid 138
#define __NR_setfsgid 139
#define __NR__llseek 140
#define __NR_getdents 141
#define __NR__newselect 142
#define __NR_flock 143
#define __NR_msync 144
#define __NR_readv 145
#define __NR_writev 146
#define __NR_getsid 147
#define __NR_fdatasync 148
#define __NR__sysctl 149
#define __NR_mlock 150
#define __NR_munlock 151
#define __NR_mlockall 152
#define __NR_munlockall 153
#define __NR_sched_setparam 154
#define __NR_sched_getparam 155
#define __NR_sched_setscheduler 156
#define __NR_sched_getscheduler 157
#define __NR_sched_yield 158
#define __NR_sched_get_priority_max 159
#define __NR_sched_get_priority_min 160
#define __NR_sched_rr_get_interval 161
#define __NR_nanosleep 162
#define __NR_mremap 163
#define __NR_setresuid 164
#define __NR_getresuid 165
#define __NR_getpagesize 166
#define __NR_query_module 167
#define __NR_poll 168
#define __NR_nfsservctl 169
#define __NR_setresgid 170
#define __NR_getresgid 171
#define __NR_prctl 172
#define __NR_rt_sigreturn 173
#define __NR_rt_sigaction 174
#define __NR_rt_sigprocmask 175
#define __NR_rt_sigpending 176
#define __NR_rt_sigtimedwait 177
#define __NR_rt_sigqueueinfo 178
#define __NR_rt_sigsuspend 179
#define __NR_pread64 180
#define __NR_pwrite64 181
#define __NR_lchown 182
#define __NR_getcwd 183
#define __NR_capget 184
#define __NR_capset 185
#define __NR_sigaltstack 186
#define __NR_sendfile 187
#define __NR_getpmsg 188 /* some people actually want streams */
#define __NR_putpmsg 189 /* some people actually want streams */
#define __NR_vfork 190
#define __NR_ugetrlimit 191
#define __NR_mmap2 192
#define __NR_truncate64 193
#define __NR_ftruncate64 194
#define __NR_stat64 195
#define __NR_lstat64 196
#define __NR_fstat64 197
#define __NR_chown32 198
#define __NR_getuid32 199
#define __NR_getgid32 200
#define __NR_geteuid32 201
#define __NR_getegid32 202
#define __NR_setreuid32 203
#define __NR_setregid32 204
#define __NR_getgroups32 205
#define __NR_setgroups32 206
#define __NR_fchown32 207
#define __NR_setresuid32 208
#define __NR_getresuid32 209
#define __NR_setresgid32 210
#define __NR_getresgid32 211
#define __NR_lchown32 212
#define __NR_setuid32 213
#define __NR_setgid32 214
#define __NR_setfsuid32 215
#define __NR_setfsgid32 216
#define __NR_pivot_root 217
#define __NR_getdents64 220
#define __NR_gettid 221
#define __NR_tkill 222
#define __NR_setxattr 223
#define __NR_lsetxattr 224
#define __NR_fsetxattr 225
#define __NR_getxattr 226
#define __NR_lgetxattr 227
#define __NR_fgetxattr 228
#define __NR_listxattr 229
#define __NR_llistxattr 230
#define __NR_flistxattr 231
#define __NR_removexattr 232
#define __NR_lremovexattr 233
#define __NR_fremovexattr 234
#define __NR_futex 235
#define __NR_sendfile64 236
#define __NR_mincore 237
#define __NR_madvise 238
#define __NR_fcntl64 239
#define __NR_readahead 240
#define __NR_io_setup 241
#define __NR_io_destroy 242
#define __NR_io_getevents 243
#define __NR_io_submit 244
#define __NR_io_cancel 245
#define __NR_fadvise64 246
#define __NR_exit_group 247
#define __NR_lookup_dcookie 248
#define __NR_epoll_create 249
#define __NR_epoll_ctl 250
#define __NR_epoll_wait 251
#define __NR_remap_file_pages 252
#define __NR_set_tid_address 253
#define __NR_timer_create 254
#define __NR_timer_settime 255
#define __NR_timer_gettime 256
#define __NR_timer_getoverrun 257
#define __NR_timer_delete 258
#define __NR_clock_settime 259
#define __NR_clock_gettime 260
#define __NR_clock_getres 261
#define __NR_clock_nanosleep 262
#define __NR_statfs64 263
#define __NR_fstatfs64 264
#define __NR_tgkill 265
#define __NR_utimes 266
#define __NR_fadvise64_64 267
#define __NR_mbind 268
#define __NR_get_mempolicy 269
#define __NR_set_mempolicy 270
#define __NR_mq_open 271
#define __NR_mq_unlink 272
#define __NR_mq_timedsend 273
#define __NR_mq_timedreceive 274
#define __NR_mq_notify 275
#define __NR_mq_getsetattr 276
#define __NR_waitid 277
#define __NR_vserver 278
#define __NR_add_key 279
#define __NR_request_key 280
#define __NR_keyctl 281
#define __NR_ioprio_set 282
#define __NR_ioprio_get 283
#define __NR_inotify_init 284
#define __NR_inotify_add_watch 285
#define __NR_inotify_rm_watch 286
#define __NR_migrate_pages 287
#define __NR_openat 288
#define __NR_mkdirat 289
#define __NR_mknodat 290
#define __NR_fchownat 291
#define __NR_futimesat 292
#define __NR_fstatat64 293
#define __NR_unlinkat 294
#define __NR_renameat 295
#define __NR_linkat 296
#define __NR_symlinkat 297
#define __NR_readlinkat 298
#define __NR_fchmodat 299
#define __NR_faccessat 300
#define __NR_pselect6 301
#define __NR_ppoll 302
#define __NR_unshare 303
#define __NR_set_robust_list 304
#define __NR_get_robust_list 305
#define __NR_splice 306
#define __NR_sync_file_range 307
#define __NR_tee 308
#define __NR_vmsplice 309
#define __NR_move_pages 310
#define __NR_sched_setaffinity 311
#define __NR_sched_getaffinity 312
#define __NR_kexec_load 313
#define __NR_getcpu 314
#define __NR_epoll_pwait 315
#define __NR_utimensat 316
#define __NR_signalfd 317
#define __NR_timerfd_create 318
#define __NR_eventfd 319
#define __NR_fallocate 320
#define __NR_timerfd_settime 321
#define __NR_timerfd_gettime 322
#define __NR_signalfd4 323
#define __NR_eventfd2 324
#define __NR_epoll_create1 325
#define __NR_dup3 326
#define __NR_pipe2 327
#define __NR_inotify_init1 328
#ifdef __KERNEL__
#define NR_syscalls 329
#define __ARCH_WANT_IPC_PARSE_VERSION
#define __ARCH_WANT_OLD_READDIR
#define __ARCH_WANT_OLD_STAT
#define __ARCH_WANT_STAT64
#define __ARCH_WANT_SYS_ALARM
#define __ARCH_WANT_SYS_GETHOSTNAME
#define __ARCH_WANT_SYS_PAUSE
#define __ARCH_WANT_SYS_SGETMASK
#define __ARCH_WANT_SYS_SIGNAL
#define __ARCH_WANT_SYS_TIME
#define __ARCH_WANT_SYS_UTIME
#define __ARCH_WANT_SYS_WAITPID
#define __ARCH_WANT_SYS_SOCKETCALL
#define __ARCH_WANT_SYS_FADVISE64
#define __ARCH_WANT_SYS_GETPGRP
#define __ARCH_WANT_SYS_LLSEEK
#define __ARCH_WANT_SYS_NICE
#define __ARCH_WANT_SYS_OLD_GETRLIMIT
#define __ARCH_WANT_SYS_OLDUMOUNT
#define __ARCH_WANT_SYS_SIGPENDING
#define __ARCH_WANT_SYS_SIGPROCMASK
#define __ARCH_WANT_SYS_RT_SIGACTION
/*
* "Conditional" syscalls
*
* What we want is __attribute__((weak,alias("sys_ni_syscall"))),
* but it doesn't work on all toolchains, so we just do it by hand
*/
#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
#endif /* __KERNEL__ */
#endif /* _ASM_M68K_UNISTD_H_ */
#ifndef _ASM_M68K_UNISTD_H_
#define _ASM_M68K_UNISTD_H_
/*
* This file contains the system call numbers.
*/
#define __NR_restart_syscall 0
#define __NR_exit 1
#define __NR_fork 2
#define __NR_read 3
#define __NR_write 4
#define __NR_open 5
#define __NR_close 6
#define __NR_waitpid 7
#define __NR_creat 8
#define __NR_link 9
#define __NR_unlink 10
#define __NR_execve 11
#define __NR_chdir 12
#define __NR_time 13
#define __NR_mknod 14
#define __NR_chmod 15
#define __NR_chown 16
#define __NR_break 17
#define __NR_oldstat 18
#define __NR_lseek 19
#define __NR_getpid 20
#define __NR_mount 21
#define __NR_umount 22
#define __NR_setuid 23
#define __NR_getuid 24
#define __NR_stime 25
#define __NR_ptrace 26
#define __NR_alarm 27
#define __NR_oldfstat 28
#define __NR_pause 29
#define __NR_utime 30
#define __NR_stty 31
#define __NR_gtty 32
#define __NR_access 33
#define __NR_nice 34
#define __NR_ftime 35
#define __NR_sync 36
#define __NR_kill 37
#define __NR_rename 38
#define __NR_mkdir 39
#define __NR_rmdir 40
#define __NR_dup 41
#define __NR_pipe 42
#define __NR_times 43
#define __NR_prof 44
#define __NR_brk 45
#define __NR_setgid 46
#define __NR_getgid 47
#define __NR_signal 48
#define __NR_geteuid 49
#define __NR_getegid 50
#define __NR_acct 51
#define __NR_umount2 52
#define __NR_lock 53
#define __NR_ioctl 54
#define __NR_fcntl 55
#define __NR_mpx 56
#define __NR_setpgid 57
#define __NR_ulimit 58
#define __NR_oldolduname 59
#define __NR_umask 60
#define __NR_chroot 61
#define __NR_ustat 62
#define __NR_dup2 63
#define __NR_getppid 64
#define __NR_getpgrp 65
#define __NR_setsid 66
#define __NR_sigaction 67
#define __NR_sgetmask 68
#define __NR_ssetmask 69
#define __NR_setreuid 70
#define __NR_setregid 71
#define __NR_sigsuspend 72
#define __NR_sigpending 73
#define __NR_sethostname 74
#define __NR_setrlimit 75
#define __NR_getrlimit 76
#define __NR_getrusage 77
#define __NR_gettimeofday 78
#define __NR_settimeofday 79
#define __NR_getgroups 80
#define __NR_setgroups 81
#define __NR_select 82
#define __NR_symlink 83
#define __NR_oldlstat 84
#define __NR_readlink 85
#define __NR_uselib 86
#define __NR_swapon 87
#define __NR_reboot 88
#define __NR_readdir 89
#define __NR_mmap 90
#define __NR_munmap 91
#define __NR_truncate 92
#define __NR_ftruncate 93
#define __NR_fchmod 94
#define __NR_fchown 95
#define __NR_getpriority 96
#define __NR_setpriority 97
#define __NR_profil 98
#define __NR_statfs 99
#define __NR_fstatfs 100
#define __NR_ioperm 101
#define __NR_socketcall 102
#define __NR_syslog 103
#define __NR_setitimer 104
#define __NR_getitimer 105
#define __NR_stat 106
#define __NR_lstat 107
#define __NR_fstat 108
#define __NR_olduname 109
#define __NR_iopl /* 110 */ not supported
#define __NR_vhangup 111
#define __NR_idle /* 112 */ Obsolete
#define __NR_vm86 /* 113 */ not supported
#define __NR_wait4 114
#define __NR_swapoff 115
#define __NR_sysinfo 116
#define __NR_ipc 117
#define __NR_fsync 118
#define __NR_sigreturn 119
#define __NR_clone 120
#define __NR_setdomainname 121
#define __NR_uname 122
#define __NR_cacheflush 123
#define __NR_adjtimex 124
#define __NR_mprotect 125
#define __NR_sigprocmask 126
#define __NR_create_module 127
#define __NR_init_module 128
#define __NR_delete_module 129
#define __NR_get_kernel_syms 130
#define __NR_quotactl 131
#define __NR_getpgid 132
#define __NR_fchdir 133
#define __NR_bdflush 134
#define __NR_sysfs 135
#define __NR_personality 136
#define __NR_afs_syscall 137 /* Syscall for Andrew File System */
#define __NR_setfsuid 138
#define __NR_setfsgid 139
#define __NR__llseek 140
#define __NR_getdents 141
#define __NR__newselect 142
#define __NR_flock 143
#define __NR_msync 144
#define __NR_readv 145
#define __NR_writev 146
#define __NR_getsid 147
#define __NR_fdatasync 148
#define __NR__sysctl 149
#define __NR_mlock 150
#define __NR_munlock 151
#define __NR_mlockall 152
#define __NR_munlockall 153
#define __NR_sched_setparam 154
#define __NR_sched_getparam 155
#define __NR_sched_setscheduler 156
#define __NR_sched_getscheduler 157
#define __NR_sched_yield 158
#define __NR_sched_get_priority_max 159
#define __NR_sched_get_priority_min 160
#define __NR_sched_rr_get_interval 161
#define __NR_nanosleep 162
#define __NR_mremap 163
#define __NR_setresuid 164
#define __NR_getresuid 165
#define __NR_getpagesize 166
#define __NR_query_module 167
#define __NR_poll 168
#define __NR_nfsservctl 169
#define __NR_setresgid 170
#define __NR_getresgid 171
#define __NR_prctl 172
#define __NR_rt_sigreturn 173
#define __NR_rt_sigaction 174
#define __NR_rt_sigprocmask 175
#define __NR_rt_sigpending 176
#define __NR_rt_sigtimedwait 177
#define __NR_rt_sigqueueinfo 178
#define __NR_rt_sigsuspend 179
#define __NR_pread64 180
#define __NR_pwrite64 181
#define __NR_lchown 182
#define __NR_getcwd 183
#define __NR_capget 184
#define __NR_capset 185
#define __NR_sigaltstack 186
#define __NR_sendfile 187
#define __NR_getpmsg 188 /* some people actually want streams */
#define __NR_putpmsg 189 /* some people actually want streams */
#define __NR_vfork 190
#define __NR_ugetrlimit 191
#define __NR_mmap2 192
#define __NR_truncate64 193
#define __NR_ftruncate64 194
#define __NR_stat64 195
#define __NR_lstat64 196
#define __NR_fstat64 197
#define __NR_chown32 198
#define __NR_getuid32 199
#define __NR_getgid32 200
#define __NR_geteuid32 201
#define __NR_getegid32 202
#define __NR_setreuid32 203
#define __NR_setregid32 204
#define __NR_getgroups32 205
#define __NR_setgroups32 206
#define __NR_fchown32 207
#define __NR_setresuid32 208
#define __NR_getresuid32 209
#define __NR_setresgid32 210
#define __NR_getresgid32 211
#define __NR_lchown32 212
#define __NR_setuid32 213
#define __NR_setgid32 214
#define __NR_setfsuid32 215
#define __NR_setfsgid32 216
#define __NR_pivot_root 217
#define __NR_getdents64 220
#define __NR_gettid 221
#define __NR_tkill 222
#define __NR_setxattr 223
#define __NR_lsetxattr 224
#define __NR_fsetxattr 225
#define __NR_getxattr 226
#define __NR_lgetxattr 227
#define __NR_fgetxattr 228
#define __NR_listxattr 229
#define __NR_llistxattr 230
#define __NR_flistxattr 231
#define __NR_removexattr 232
#define __NR_lremovexattr 233
#define __NR_fremovexattr 234
#define __NR_futex 235
#define __NR_sendfile64 236
#define __NR_mincore 237
#define __NR_madvise 238
#define __NR_fcntl64 239
#define __NR_readahead 240
#define __NR_io_setup 241
#define __NR_io_destroy 242
#define __NR_io_getevents 243
#define __NR_io_submit 244
#define __NR_io_cancel 245
#define __NR_fadvise64 246
#define __NR_exit_group 247
#define __NR_lookup_dcookie 248
#define __NR_epoll_create 249
#define __NR_epoll_ctl 250
#define __NR_epoll_wait 251
#define __NR_remap_file_pages 252
#define __NR_set_tid_address 253
#define __NR_timer_create 254
#define __NR_timer_settime 255
#define __NR_timer_gettime 256
#define __NR_timer_getoverrun 257
#define __NR_timer_delete 258
#define __NR_clock_settime 259
#define __NR_clock_gettime 260
#define __NR_clock_getres 261
#define __NR_clock_nanosleep 262
#define __NR_statfs64 263
#define __NR_fstatfs64 264
#define __NR_tgkill 265
#define __NR_utimes 266
#define __NR_fadvise64_64 267
#define __NR_mbind 268
#define __NR_get_mempolicy 269
#define __NR_set_mempolicy 270
#define __NR_mq_open 271
#define __NR_mq_unlink 272
#define __NR_mq_timedsend 273
#define __NR_mq_timedreceive 274
#define __NR_mq_notify 275
#define __NR_mq_getsetattr 276
#define __NR_waitid 277
#define __NR_vserver 278
#define __NR_add_key 279
#define __NR_request_key 280
#define __NR_keyctl 281
#define __NR_ioprio_set 282
#define __NR_ioprio_get 283
#define __NR_inotify_init 284
#define __NR_inotify_add_watch 285
#define __NR_inotify_rm_watch 286
#define __NR_migrate_pages 287
#define __NR_openat 288
#define __NR_mkdirat 289
#define __NR_mknodat 290
#define __NR_fchownat 291
#define __NR_futimesat 292
#define __NR_fstatat64 293
#define __NR_unlinkat 294
#define __NR_renameat 295
#define __NR_linkat 296
#define __NR_symlinkat 297
#define __NR_readlinkat 298
#define __NR_fchmodat 299
#define __NR_faccessat 300
#define __NR_pselect6 301
#define __NR_ppoll 302
#define __NR_unshare 303
#define __NR_set_robust_list 304
#define __NR_get_robust_list 305
#define __NR_splice 306
#define __NR_sync_file_range 307
#define __NR_tee 308
#define __NR_vmsplice 309
#define __NR_move_pages 310
#define __NR_sched_setaffinity 311
#define __NR_sched_getaffinity 312
#define __NR_kexec_load 313
#define __NR_getcpu 314
#define __NR_epoll_pwait 315
#define __NR_utimensat 316
#define __NR_signalfd 317
#define __NR_timerfd_create 318
#define __NR_eventfd 319
#define __NR_fallocate 320
#define __NR_timerfd_settime 321
#define __NR_timerfd_gettime 322
#define __NR_signalfd4 323
#define __NR_eventfd2 324
#define __NR_epoll_create1 325
#define __NR_dup3 326
#define __NR_pipe2 327
#define __NR_inotify_init1 328
#ifdef __KERNEL__
#define NR_syscalls 329
#define __ARCH_WANT_IPC_PARSE_VERSION
#define __ARCH_WANT_OLD_READDIR
#define __ARCH_WANT_OLD_STAT
#define __ARCH_WANT_STAT64
#define __ARCH_WANT_SYS_ALARM
#define __ARCH_WANT_SYS_GETHOSTNAME
#define __ARCH_WANT_SYS_PAUSE
#define __ARCH_WANT_SYS_SGETMASK
#define __ARCH_WANT_SYS_SIGNAL
#define __ARCH_WANT_SYS_TIME
#define __ARCH_WANT_SYS_UTIME
#define __ARCH_WANT_SYS_WAITPID
#define __ARCH_WANT_SYS_SOCKETCALL
#define __ARCH_WANT_SYS_FADVISE64
#define __ARCH_WANT_SYS_GETPGRP
#define __ARCH_WANT_SYS_LLSEEK
#define __ARCH_WANT_SYS_NICE
#define __ARCH_WANT_SYS_OLD_GETRLIMIT
#define __ARCH_WANT_SYS_OLDUMOUNT
#define __ARCH_WANT_SYS_SIGPENDING
#define __ARCH_WANT_SYS_SIGPROCMASK
#define __ARCH_WANT_SYS_RT_SIGACTION
/*
* "Conditional" syscalls
*
* What we want is __attribute__((weak,alias("sys_ni_syscall"))),
* but it doesn't work on all toolchains, so we just do it by hand
*/
#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
#endif /* __KERNEL__ */
#endif /* _ASM_M68K_UNISTD_H_ */
...@@ -513,6 +513,9 @@ InstructionTLBMiss: ...@@ -513,6 +513,9 @@ InstructionTLBMiss:
rlwimi r3,r3,32-1,31,31 /* _PAGE_USER -> PP lsb */ rlwimi r3,r3,32-1,31,31 /* _PAGE_USER -> PP lsb */
ori r1,r1,0xe04 /* clear out reserved bits */ ori r1,r1,0xe04 /* clear out reserved bits */
andc r1,r3,r1 /* PP = user? (rw&dirty? 2: 3): 0 */ andc r1,r3,r1 /* PP = user? (rw&dirty? 2: 3): 0 */
BEGIN_FTR_SECTION
rlwinm r1,r1,0,~_PAGE_COHERENT /* clear M (coherence not required) */
END_FTR_SECTION_IFCLR(CPU_FTR_NEED_COHERENT)
mtspr SPRN_RPA,r1 mtspr SPRN_RPA,r1
mfspr r3,SPRN_IMISS mfspr r3,SPRN_IMISS
tlbli r3 tlbli r3
...@@ -587,6 +590,9 @@ DataLoadTLBMiss: ...@@ -587,6 +590,9 @@ DataLoadTLBMiss:
rlwimi r3,r3,32-1,31,31 /* _PAGE_USER -> PP lsb */ rlwimi r3,r3,32-1,31,31 /* _PAGE_USER -> PP lsb */
ori r1,r1,0xe04 /* clear out reserved bits */ ori r1,r1,0xe04 /* clear out reserved bits */
andc r1,r3,r1 /* PP = user? (rw&dirty? 2: 3): 0 */ andc r1,r3,r1 /* PP = user? (rw&dirty? 2: 3): 0 */
BEGIN_FTR_SECTION
rlwinm r1,r1,0,~_PAGE_COHERENT /* clear M (coherence not required) */
END_FTR_SECTION_IFCLR(CPU_FTR_NEED_COHERENT)
mtspr SPRN_RPA,r1 mtspr SPRN_RPA,r1
mfspr r3,SPRN_DMISS mfspr r3,SPRN_DMISS
tlbld r3 tlbld r3
...@@ -655,6 +661,9 @@ DataStoreTLBMiss: ...@@ -655,6 +661,9 @@ DataStoreTLBMiss:
rlwimi r3,r3,32-1,30,30 /* _PAGE_USER -> PP msb */ rlwimi r3,r3,32-1,30,30 /* _PAGE_USER -> PP msb */
li r1,0xe05 /* clear out reserved bits & PP lsb */ li r1,0xe05 /* clear out reserved bits & PP lsb */
andc r1,r3,r1 /* PP = user? 2: 0 */ andc r1,r3,r1 /* PP = user? 2: 0 */
BEGIN_FTR_SECTION
rlwinm r1,r1,0,~_PAGE_COHERENT /* clear M (coherence not required) */
END_FTR_SECTION_IFCLR(CPU_FTR_NEED_COHERENT)
mtspr SPRN_RPA,r1 mtspr SPRN_RPA,r1
mfspr r3,SPRN_DMISS mfspr r3,SPRN_DMISS
tlbld r3 tlbld r3
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#define PIL_DEVICE_IRQ 5 #define PIL_DEVICE_IRQ 5
#define PIL_SMP_CALL_FUNC_SNGL 6 #define PIL_SMP_CALL_FUNC_SNGL 6
#define PIL_DEFERRED_PCR_WORK 7 #define PIL_DEFERRED_PCR_WORK 7
#define PIL_KGDB_CAPTURE 8
#define PIL_NORMAL_MAX 14 #define PIL_NORMAL_MAX 14
#define PIL_NMI 15 #define PIL_NMI 15
......
...@@ -108,7 +108,7 @@ void gdb_regs_to_pt_regs(unsigned long *gdb_regs, struct pt_regs *regs) ...@@ -108,7 +108,7 @@ void gdb_regs_to_pt_regs(unsigned long *gdb_regs, struct pt_regs *regs)
} }
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
void smp_kgdb_capture_client(struct pt_regs *regs) void smp_kgdb_capture_client(int irq, struct pt_regs *regs)
{ {
unsigned long flags; unsigned long flags;
......
...@@ -368,7 +368,7 @@ static void pci_register_iommu_region(struct pci_pbm_info *pbm) ...@@ -368,7 +368,7 @@ static void pci_register_iommu_region(struct pci_pbm_info *pbm)
const u32 *vdma = of_get_property(pbm->op->node, "virtual-dma", NULL); const u32 *vdma = of_get_property(pbm->op->node, "virtual-dma", NULL);
if (vdma) { if (vdma) {
struct resource *rp = kmalloc(sizeof(*rp), GFP_KERNEL); struct resource *rp = kzalloc(sizeof(*rp), GFP_KERNEL);
if (!rp) { if (!rp) {
prom_printf("Cannot allocate IOMMU resource.\n"); prom_printf("Cannot allocate IOMMU resource.\n");
......
...@@ -64,7 +64,12 @@ tl0_irq6: TRAP_IRQ(smp_call_function_single_client, 6) ...@@ -64,7 +64,12 @@ tl0_irq6: TRAP_IRQ(smp_call_function_single_client, 6)
tl0_irq6: BTRAP(0x46) tl0_irq6: BTRAP(0x46)
#endif #endif
tl0_irq7: TRAP_IRQ(deferred_pcr_work_irq, 7) tl0_irq7: TRAP_IRQ(deferred_pcr_work_irq, 7)
tl0_irq8: BTRAP(0x48) BTRAP(0x49) #ifdef CONFIG_KGDB
tl0_irq8: TRAP_IRQ(smp_kgdb_capture_client, 8)
#else
tl0_irq8: BTRAP(0x48)
#endif
tl0_irq9: BTRAP(0x49)
tl0_irq10: BTRAP(0x4a) BTRAP(0x4b) BTRAP(0x4c) BTRAP(0x4d) tl0_irq10: BTRAP(0x4a) BTRAP(0x4b) BTRAP(0x4c) BTRAP(0x4d)
tl0_irq14: TRAP_IRQ(timer_interrupt, 14) tl0_irq14: TRAP_IRQ(timer_interrupt, 14)
tl0_irq15: TRAP_NMI_IRQ(perfctr_irq, 15) tl0_irq15: TRAP_NMI_IRQ(perfctr_irq, 15)
......
...@@ -679,28 +679,8 @@ xcall_new_mmu_context_version: ...@@ -679,28 +679,8 @@ xcall_new_mmu_context_version:
#ifdef CONFIG_KGDB #ifdef CONFIG_KGDB
.globl xcall_kgdb_capture .globl xcall_kgdb_capture
xcall_kgdb_capture: xcall_kgdb_capture:
661: rdpr %pstate, %g2 wr %g0, (1 << PIL_KGDB_CAPTURE), %set_softint
wrpr %g2, PSTATE_IG | PSTATE_AG, %pstate retry
.section .sun4v_2insn_patch, "ax"
.word 661b
nop
nop
.previous
rdpr %pil, %g2
wrpr %g0, PIL_NORMAL_MAX, %pil
sethi %hi(109f), %g7
ba,pt %xcc, etrap_irq
109: or %g7, %lo(109b), %g7
#ifdef CONFIG_TRACE_IRQFLAGS
call trace_hardirqs_off
nop
#endif
call smp_kgdb_capture_client
add %sp, PTREGS_OFF, %o0
/* Has to be a non-v9 branch due to the large distance. */
ba rtrap_xcall
ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1
#endif #endif
#endif /* CONFIG_SMP */ #endif /* CONFIG_SMP */
......
...@@ -90,6 +90,9 @@ int set_memory_4k(unsigned long addr, int numpages); ...@@ -90,6 +90,9 @@ int set_memory_4k(unsigned long addr, int numpages);
int set_memory_array_uc(unsigned long *addr, int addrinarray); int set_memory_array_uc(unsigned long *addr, int addrinarray);
int set_memory_array_wb(unsigned long *addr, int addrinarray); int set_memory_array_wb(unsigned long *addr, int addrinarray);
int set_pages_array_uc(struct page **pages, int addrinarray);
int set_pages_array_wb(struct page **pages, int addrinarray);
/* /*
* For legacy compatibility with the old APIs, a few functions * For legacy compatibility with the old APIs, a few functions
* are provided that work on a "struct page". * are provided that work on a "struct page".
......
#ifndef _ASM_X86_DMI_H #ifndef _ASM_X86_DMI_H
#define _ASM_X86_DMI_H #define _ASM_X86_DMI_H
#include <linux/compiler.h>
#include <linux/init.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/setup.h> #include <asm/setup.h>
static inline void *dmi_alloc(unsigned len) static __always_inline __init void *dmi_alloc(unsigned len)
{ {
return extend_brk(len, sizeof(int)); return extend_brk(len, sizeof(int));
} }
......
...@@ -3464,7 +3464,7 @@ int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) ...@@ -3464,7 +3464,7 @@ int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
int ret, sub_handle; int ret, sub_handle;
struct msi_desc *msidesc; struct msi_desc *msidesc;
unsigned int irq_want; unsigned int irq_want;
struct intel_iommu *iommu = 0; struct intel_iommu *iommu = NULL;
int index = 0; int index = 0;
irq_want = nr_irqs_gsi; irq_want = nr_irqs_gsi;
...@@ -3599,7 +3599,7 @@ static void hpet_msi_set_affinity(unsigned int irq, const struct cpumask *mask) ...@@ -3599,7 +3599,7 @@ static void hpet_msi_set_affinity(unsigned int irq, const struct cpumask *mask)
#endif /* CONFIG_SMP */ #endif /* CONFIG_SMP */
struct irq_chip hpet_msi_type = { static struct irq_chip hpet_msi_type = {
.name = "HPET_MSI", .name = "HPET_MSI",
.unmask = hpet_msi_unmask, .unmask = hpet_msi_unmask,
.mask = hpet_msi_mask, .mask = hpet_msi_mask,
......
...@@ -3,17 +3,17 @@ ...@@ -3,17 +3,17 @@
* *
*/ */
#include <linux/clockchips.h> #include <linux/clockchips.h>
#include <linux/init.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/spinlock.h>
#include <linux/jiffies.h> #include <linux/jiffies.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/spinlock.h> #include <linux/delay.h>
#include <linux/init.h>
#include <linux/io.h>
#include <asm/smp.h>
#include <asm/delay.h>
#include <asm/i8253.h> #include <asm/i8253.h>
#include <asm/io.h>
#include <asm/hpet.h> #include <asm/hpet.h>
#include <asm/smp.h>
DEFINE_SPINLOCK(i8253_lock); DEFINE_SPINLOCK(i8253_lock);
EXPORT_SYMBOL(i8253_lock); EXPORT_SYMBOL(i8253_lock);
...@@ -40,7 +40,7 @@ static void init_pit_timer(enum clock_event_mode mode, ...@@ -40,7 +40,7 @@ static void init_pit_timer(enum clock_event_mode mode,
{ {
spin_lock(&i8253_lock); spin_lock(&i8253_lock);
switch(mode) { switch (mode) {
case CLOCK_EVT_MODE_PERIODIC: case CLOCK_EVT_MODE_PERIODIC:
/* binary, mode 2, LSB/MSB, ch 0 */ /* binary, mode 2, LSB/MSB, ch 0 */
outb_pit(0x34, PIT_MODE); outb_pit(0x34, PIT_MODE);
...@@ -95,7 +95,7 @@ static int pit_next_event(unsigned long delta, struct clock_event_device *evt) ...@@ -95,7 +95,7 @@ static int pit_next_event(unsigned long delta, struct clock_event_device *evt)
* registered. This mechanism replaces the previous #ifdef LOCAL_APIC - * registered. This mechanism replaces the previous #ifdef LOCAL_APIC -
* !using_apic_timer decisions in do_timer_interrupt_hook() * !using_apic_timer decisions in do_timer_interrupt_hook()
*/ */
static struct clock_event_device pit_clockevent = { static struct clock_event_device pit_ce = {
.name = "pit", .name = "pit",
.features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
.set_mode = init_pit_timer, .set_mode = init_pit_timer,
...@@ -114,15 +114,13 @@ void __init setup_pit_timer(void) ...@@ -114,15 +114,13 @@ void __init setup_pit_timer(void)
* Start pit with the boot cpu mask and make it global after the * Start pit with the boot cpu mask and make it global after the
* IO_APIC has been initialized. * IO_APIC has been initialized.
*/ */
pit_clockevent.cpumask = cpumask_of(smp_processor_id()); pit_ce.cpumask = cpumask_of(smp_processor_id());
pit_clockevent.mult = div_sc(CLOCK_TICK_RATE, NSEC_PER_SEC, pit_ce.mult = div_sc(CLOCK_TICK_RATE, NSEC_PER_SEC, pit_ce.shift);
pit_clockevent.shift); pit_ce.max_delta_ns = clockevent_delta2ns(0x7FFF, &pit_ce);
pit_clockevent.max_delta_ns = pit_ce.min_delta_ns = clockevent_delta2ns(0xF, &pit_ce);
clockevent_delta2ns(0x7FFF, &pit_clockevent);
pit_clockevent.min_delta_ns = clockevents_register_device(&pit_ce);
clockevent_delta2ns(0xF, &pit_clockevent); global_clock_event = &pit_ce;
clockevents_register_device(&pit_clockevent);
global_clock_event = &pit_clockevent;
} }
#ifndef CONFIG_X86_64 #ifndef CONFIG_X86_64
...@@ -133,11 +131,11 @@ void __init setup_pit_timer(void) ...@@ -133,11 +131,11 @@ void __init setup_pit_timer(void)
*/ */
static cycle_t pit_read(void) static cycle_t pit_read(void)
{ {
static int old_count;
static u32 old_jifs;
unsigned long flags; unsigned long flags;
int count; int count;
u32 jifs; u32 jifs;
static int old_count;
static u32 old_jifs;
spin_lock_irqsave(&i8253_lock, flags); spin_lock_irqsave(&i8253_lock, flags);
/* /*
...@@ -179,9 +177,9 @@ static cycle_t pit_read(void) ...@@ -179,9 +177,9 @@ static cycle_t pit_read(void)
* Previous attempts to handle these cases intelligently were * Previous attempts to handle these cases intelligently were
* buggy, so we just do the simple thing now. * buggy, so we just do the simple thing now.
*/ */
if (count > old_count && jifs == old_jifs) { if (count > old_count && jifs == old_jifs)
count = old_count; count = old_count;
}
old_count = count; old_count = count;
old_jifs = jifs; old_jifs = jifs;
...@@ -192,13 +190,13 @@ static cycle_t pit_read(void) ...@@ -192,13 +190,13 @@ static cycle_t pit_read(void)
return (cycle_t)(jifs * LATCH) + count; return (cycle_t)(jifs * LATCH) + count;
} }
static struct clocksource clocksource_pit = { static struct clocksource pit_cs = {
.name = "pit", .name = "pit",
.rating = 110, .rating = 110,
.read = pit_read, .read = pit_read,
.mask = CLOCKSOURCE_MASK(32), .mask = CLOCKSOURCE_MASK(32),
.mult = 0, .mult = 0,
.shift = 20, .shift = 20,
}; };
static void pit_disable_clocksource(void) static void pit_disable_clocksource(void)
...@@ -206,9 +204,9 @@ static void pit_disable_clocksource(void) ...@@ -206,9 +204,9 @@ static void pit_disable_clocksource(void)
/* /*
* Use mult to check whether it is registered or not * Use mult to check whether it is registered or not
*/ */
if (clocksource_pit.mult) { if (pit_cs.mult) {
clocksource_unregister(&clocksource_pit); clocksource_unregister(&pit_cs);
clocksource_pit.mult = 0; pit_cs.mult = 0;
} }
} }
...@@ -222,13 +220,13 @@ static int __init init_pit_clocksource(void) ...@@ -222,13 +220,13 @@ static int __init init_pit_clocksource(void)
* - when local APIC timer is active (PIT is switched off) * - when local APIC timer is active (PIT is switched off)
*/ */
if (num_possible_cpus() > 1 || is_hpet_enabled() || if (num_possible_cpus() > 1 || is_hpet_enabled() ||
pit_clockevent.mode != CLOCK_EVT_MODE_PERIODIC) pit_ce.mode != CLOCK_EVT_MODE_PERIODIC)
return 0; return 0;
clocksource_pit.mult = clocksource_hz2mult(CLOCK_TICK_RATE, pit_cs.mult = clocksource_hz2mult(CLOCK_TICK_RATE, pit_cs.shift);
clocksource_pit.shift);
return clocksource_register(&clocksource_pit); return clocksource_register(&pit_cs);
} }
arch_initcall(init_pit_clocksource); arch_initcall(init_pit_clocksource);
#endif #endif /* !CONFIG_X86_64 */
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/init.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/init.h>
#include <linux/dmi.h> #include <linux/dmi.h>
#include <asm/io.h> #include <linux/io.h>
int io_delay_type __read_mostly = CONFIG_DEFAULT_IO_DELAY_TYPE; int io_delay_type __read_mostly = CONFIG_DEFAULT_IO_DELAY_TYPE;
...@@ -47,8 +47,7 @@ EXPORT_SYMBOL(native_io_delay); ...@@ -47,8 +47,7 @@ EXPORT_SYMBOL(native_io_delay);
static int __init dmi_io_delay_0xed_port(const struct dmi_system_id *id) static int __init dmi_io_delay_0xed_port(const struct dmi_system_id *id)
{ {
if (io_delay_type == CONFIG_IO_DELAY_TYPE_0X80) { if (io_delay_type == CONFIG_IO_DELAY_TYPE_0X80) {
printk(KERN_NOTICE "%s: using 0xed I/O delay port\n", pr_notice("%s: using 0xed I/O delay port\n", id->ident);
id->ident);
io_delay_type = CONFIG_IO_DELAY_TYPE_0XED; io_delay_type = CONFIG_IO_DELAY_TYPE_0XED;
} }
...@@ -64,40 +63,40 @@ static struct dmi_system_id __initdata io_delay_0xed_port_dmi_table[] = { ...@@ -64,40 +63,40 @@ static struct dmi_system_id __initdata io_delay_0xed_port_dmi_table[] = {
.callback = dmi_io_delay_0xed_port, .callback = dmi_io_delay_0xed_port,
.ident = "Compaq Presario V6000", .ident = "Compaq Presario V6000",
.matches = { .matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"), DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"),
DMI_MATCH(DMI_BOARD_NAME, "30B7") DMI_MATCH(DMI_BOARD_NAME, "30B7")
} }
}, },
{ {
.callback = dmi_io_delay_0xed_port, .callback = dmi_io_delay_0xed_port,
.ident = "HP Pavilion dv9000z", .ident = "HP Pavilion dv9000z",
.matches = { .matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"), DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"),
DMI_MATCH(DMI_BOARD_NAME, "30B9") DMI_MATCH(DMI_BOARD_NAME, "30B9")
} }
}, },
{ {
.callback = dmi_io_delay_0xed_port, .callback = dmi_io_delay_0xed_port,
.ident = "HP Pavilion dv6000", .ident = "HP Pavilion dv6000",
.matches = { .matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"), DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"),
DMI_MATCH(DMI_BOARD_NAME, "30B8") DMI_MATCH(DMI_BOARD_NAME, "30B8")
} }
}, },
{ {
.callback = dmi_io_delay_0xed_port, .callback = dmi_io_delay_0xed_port,
.ident = "HP Pavilion tx1000", .ident = "HP Pavilion tx1000",
.matches = { .matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"), DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"),
DMI_MATCH(DMI_BOARD_NAME, "30BF") DMI_MATCH(DMI_BOARD_NAME, "30BF")
} }
}, },
{ {
.callback = dmi_io_delay_0xed_port, .callback = dmi_io_delay_0xed_port,
.ident = "Presario F700", .ident = "Presario F700",
.matches = { .matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"), DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"),
DMI_MATCH(DMI_BOARD_NAME, "30D3") DMI_MATCH(DMI_BOARD_NAME, "30D3")
} }
}, },
{ } { }
......
...@@ -8,11 +8,11 @@ ...@@ -8,11 +8,11 @@
*/ */
#include <linux/debugfs.h> #include <linux/debugfs.h>
#include <linux/uaccess.h> #include <linux/uaccess.h>
#include <linux/stat.h> #include <linux/module.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/stat.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/module.h>
#include <asm/setup.h> #include <asm/setup.h>
...@@ -26,9 +26,8 @@ struct setup_data_node { ...@@ -26,9 +26,8 @@ struct setup_data_node {
u32 len; u32 len;
}; };
static ssize_t static ssize_t setup_data_read(struct file *file, char __user *user_buf,
setup_data_read(struct file *file, char __user *user_buf, size_t count, size_t count, loff_t *ppos)
loff_t *ppos)
{ {
struct setup_data_node *node = file->private_data; struct setup_data_node *node = file->private_data;
unsigned long remain; unsigned long remain;
...@@ -39,20 +38,21 @@ setup_data_read(struct file *file, char __user *user_buf, size_t count, ...@@ -39,20 +38,21 @@ setup_data_read(struct file *file, char __user *user_buf, size_t count,
if (pos < 0) if (pos < 0)
return -EINVAL; return -EINVAL;
if (pos >= node->len) if (pos >= node->len)
return 0; return 0;
if (count > node->len - pos) if (count > node->len - pos)
count = node->len - pos; count = node->len - pos;
pa = node->paddr + sizeof(struct setup_data) + pos; pa = node->paddr + sizeof(struct setup_data) + pos;
pg = pfn_to_page((pa + count - 1) >> PAGE_SHIFT); pg = pfn_to_page((pa + count - 1) >> PAGE_SHIFT);
if (PageHighMem(pg)) { if (PageHighMem(pg)) {
p = ioremap_cache(pa, count); p = ioremap_cache(pa, count);
if (!p) if (!p)
return -ENXIO; return -ENXIO;
} else { } else
p = __va(pa); p = __va(pa);
}
remain = copy_to_user(user_buf, p, count); remain = copy_to_user(user_buf, p, count);
...@@ -70,12 +70,13 @@ setup_data_read(struct file *file, char __user *user_buf, size_t count, ...@@ -70,12 +70,13 @@ setup_data_read(struct file *file, char __user *user_buf, size_t count,
static int setup_data_open(struct inode *inode, struct file *file) static int setup_data_open(struct inode *inode, struct file *file)
{ {
file->private_data = inode->i_private; file->private_data = inode->i_private;
return 0; return 0;
} }
static const struct file_operations fops_setup_data = { static const struct file_operations fops_setup_data = {
.read = setup_data_read, .read = setup_data_read,
.open = setup_data_open, .open = setup_data_open,
}; };
static int __init static int __init
...@@ -84,57 +85,50 @@ create_setup_data_node(struct dentry *parent, int no, ...@@ -84,57 +85,50 @@ create_setup_data_node(struct dentry *parent, int no,
{ {
struct dentry *d, *type, *data; struct dentry *d, *type, *data;
char buf[16]; char buf[16];
int error;
sprintf(buf, "%d", no); sprintf(buf, "%d", no);
d = debugfs_create_dir(buf, parent); d = debugfs_create_dir(buf, parent);
if (!d) { if (!d)
error = -ENOMEM; return -ENOMEM;
goto err_return;
}
type = debugfs_create_x32("type", S_IRUGO, d, &node->type); type = debugfs_create_x32("type", S_IRUGO, d, &node->type);
if (!type) { if (!type)
error = -ENOMEM;
goto err_dir; goto err_dir;
}
data = debugfs_create_file("data", S_IRUGO, d, node, &fops_setup_data); data = debugfs_create_file("data", S_IRUGO, d, node, &fops_setup_data);
if (!data) { if (!data)
error = -ENOMEM;
goto err_type; goto err_type;
}
return 0; return 0;
err_type: err_type:
debugfs_remove(type); debugfs_remove(type);
err_dir: err_dir:
debugfs_remove(d); debugfs_remove(d);
err_return: return -ENOMEM;
return error;
} }
static int __init create_setup_data_nodes(struct dentry *parent) static int __init create_setup_data_nodes(struct dentry *parent)
{ {
struct setup_data_node *node; struct setup_data_node *node;
struct setup_data *data; struct setup_data *data;
int error, no = 0; int error = -ENOMEM;
struct dentry *d; struct dentry *d;
struct page *pg; struct page *pg;
u64 pa_data; u64 pa_data;
int no = 0;
d = debugfs_create_dir("setup_data", parent); d = debugfs_create_dir("setup_data", parent);
if (!d) { if (!d)
error = -ENOMEM; return -ENOMEM;
goto err_return;
}
pa_data = boot_params.hdr.setup_data; pa_data = boot_params.hdr.setup_data;
while (pa_data) { while (pa_data) {
node = kmalloc(sizeof(*node), GFP_KERNEL); node = kmalloc(sizeof(*node), GFP_KERNEL);
if (!node) { if (!node)
error = -ENOMEM;
goto err_dir; goto err_dir;
}
pg = pfn_to_page((pa_data+sizeof(*data)-1) >> PAGE_SHIFT); pg = pfn_to_page((pa_data+sizeof(*data)-1) >> PAGE_SHIFT);
if (PageHighMem(pg)) { if (PageHighMem(pg)) {
data = ioremap_cache(pa_data, sizeof(*data)); data = ioremap_cache(pa_data, sizeof(*data));
...@@ -143,9 +137,8 @@ static int __init create_setup_data_nodes(struct dentry *parent) ...@@ -143,9 +137,8 @@ static int __init create_setup_data_nodes(struct dentry *parent)
error = -ENXIO; error = -ENXIO;
goto err_dir; goto err_dir;
} }
} else { } else
data = __va(pa_data); data = __va(pa_data);
}
node->paddr = pa_data; node->paddr = pa_data;
node->type = data->type; node->type = data->type;
...@@ -159,11 +152,11 @@ static int __init create_setup_data_nodes(struct dentry *parent) ...@@ -159,11 +152,11 @@ static int __init create_setup_data_nodes(struct dentry *parent)
goto err_dir; goto err_dir;
no++; no++;
} }
return 0; return 0;
err_dir: err_dir:
debugfs_remove(d); debugfs_remove(d);
err_return:
return error; return error;
} }
...@@ -175,28 +168,26 @@ static struct debugfs_blob_wrapper boot_params_blob = { ...@@ -175,28 +168,26 @@ static struct debugfs_blob_wrapper boot_params_blob = {
static int __init boot_params_kdebugfs_init(void) static int __init boot_params_kdebugfs_init(void)
{ {
struct dentry *dbp, *version, *data; struct dentry *dbp, *version, *data;
int error; int error = -ENOMEM;
dbp = debugfs_create_dir("boot_params", NULL); dbp = debugfs_create_dir("boot_params", NULL);
if (!dbp) { if (!dbp)
error = -ENOMEM; return -ENOMEM;
goto err_return;
}
version = debugfs_create_x16("version", S_IRUGO, dbp, version = debugfs_create_x16("version", S_IRUGO, dbp,
&boot_params.hdr.version); &boot_params.hdr.version);
if (!version) { if (!version)
error = -ENOMEM;
goto err_dir; goto err_dir;
}
data = debugfs_create_blob("data", S_IRUGO, dbp, data = debugfs_create_blob("data", S_IRUGO, dbp,
&boot_params_blob); &boot_params_blob);
if (!data) { if (!data)
error = -ENOMEM;
goto err_version; goto err_version;
}
error = create_setup_data_nodes(dbp); error = create_setup_data_nodes(dbp);
if (error) if (error)
goto err_data; goto err_data;
return 0; return 0;
err_data: err_data:
...@@ -205,10 +196,9 @@ static int __init boot_params_kdebugfs_init(void) ...@@ -205,10 +196,9 @@ static int __init boot_params_kdebugfs_init(void)
debugfs_remove(version); debugfs_remove(version);
err_dir: err_dir:
debugfs_remove(dbp); debugfs_remove(dbp);
err_return:
return error; return error;
} }
#endif #endif /* CONFIG_DEBUG_BOOT_PARAMS */
static int __init arch_kdebugfs_init(void) static int __init arch_kdebugfs_init(void)
{ {
......
...@@ -282,6 +282,14 @@ static void skip_entry(unsigned char **ptr, int *count, int size) ...@@ -282,6 +282,14 @@ static void skip_entry(unsigned char **ptr, int *count, int size)
*count += size; *count += size;
} }
static void __init smp_dump_mptable(struct mpc_table *mpc, unsigned char *mpt)
{
printk(KERN_ERR "Your mptable is wrong, contact your HW vendor!\n"
"type %x\n", *mpt);
print_hex_dump(KERN_ERR, " ", DUMP_PREFIX_ADDRESS, 16,
1, mpc, mpc->length, 1);
}
static int __init smp_read_mpc(struct mpc_table *mpc, unsigned early) static int __init smp_read_mpc(struct mpc_table *mpc, unsigned early)
{ {
char str[16]; char str[16];
...@@ -340,10 +348,7 @@ static int __init smp_read_mpc(struct mpc_table *mpc, unsigned early) ...@@ -340,10 +348,7 @@ static int __init smp_read_mpc(struct mpc_table *mpc, unsigned early)
break; break;
default: default:
/* wrong mptable */ /* wrong mptable */
printk(KERN_ERR "Your mptable is wrong, contact your HW vendor!\n"); smp_dump_mptable(mpc, mpt);
printk(KERN_ERR "type %x\n", *mpt);
print_hex_dump(KERN_ERR, " ", DUMP_PREFIX_ADDRESS, 16,
1, mpc, mpc->length, 1);
count = mpc->length; count = mpc->length;
break; break;
} }
...@@ -550,6 +555,55 @@ static unsigned long __init get_mpc_size(unsigned long physptr) ...@@ -550,6 +555,55 @@ static unsigned long __init get_mpc_size(unsigned long physptr)
return size; return size;
} }
static int __init check_physptr(struct mpf_intel *mpf, unsigned int early)
{
struct mpc_table *mpc;
unsigned long size;
size = get_mpc_size(mpf->physptr);
mpc = early_ioremap(mpf->physptr, size);
/*
* Read the physical hardware table. Anything here will
* override the defaults.
*/
if (!smp_read_mpc(mpc, early)) {
#ifdef CONFIG_X86_LOCAL_APIC
smp_found_config = 0;
#endif
printk(KERN_ERR "BIOS bug, MP table errors detected!...\n"
"... disabling SMP support. (tell your hw vendor)\n");
early_iounmap(mpc, size);
return -1;
}
early_iounmap(mpc, size);
if (early)
return -1;
#ifdef CONFIG_X86_IO_APIC
/*
* If there are no explicit MP IRQ entries, then we are
* broken. We set up most of the low 16 IO-APIC pins to
* ISA defaults and hope it will work.
*/
if (!mp_irq_entries) {
struct mpc_bus bus;
printk(KERN_ERR "BIOS bug, no explicit IRQ entries, "
"using default mptable. (tell your hw vendor)\n");
bus.type = MP_BUS;
bus.busid = 0;
memcpy(bus.bustype, "ISA ", 6);
MP_bus_info(&bus);
construct_default_ioirq_mptable(0);
}
#endif
return 0;
}
/* /*
* Scan the memory blocks for an SMP configuration block. * Scan the memory blocks for an SMP configuration block.
*/ */
...@@ -603,51 +657,8 @@ static void __init __get_smp_config(unsigned int early) ...@@ -603,51 +657,8 @@ static void __init __get_smp_config(unsigned int early)
construct_default_ISA_mptable(mpf->feature1); construct_default_ISA_mptable(mpf->feature1);
} else if (mpf->physptr) { } else if (mpf->physptr) {
struct mpc_table *mpc; if (check_physptr(mpf, early))
unsigned long size;
size = get_mpc_size(mpf->physptr);
mpc = early_ioremap(mpf->physptr, size);
/*
* Read the physical hardware table. Anything here will
* override the defaults.
*/
if (!smp_read_mpc(mpc, early)) {
#ifdef CONFIG_X86_LOCAL_APIC
smp_found_config = 0;
#endif
printk(KERN_ERR
"BIOS bug, MP table errors detected!...\n");
printk(KERN_ERR "... disabling SMP support. "
"(tell your hw vendor)\n");
early_iounmap(mpc, size);
return; return;
}
early_iounmap(mpc, size);
if (early)
return;
#ifdef CONFIG_X86_IO_APIC
/*
* If there are no explicit MP IRQ entries, then we are
* broken. We set up most of the low 16 IO-APIC pins to
* ISA defaults and hope it will work.
*/
if (!mp_irq_entries) {
struct mpc_bus bus;
printk(KERN_ERR "BIOS bug, no explicit IRQ entries, "
"using default mptable. "
"(tell your hw vendor)\n");
bus.type = MP_BUS;
bus.busid = 0;
memcpy(bus.bustype, "ISA ", 6);
MP_bus_info(&bus);
construct_default_ioirq_mptable(0);
}
#endif
} else } else
BUG(); BUG();
...@@ -910,10 +921,7 @@ static int __init replace_intsrc_all(struct mpc_table *mpc, ...@@ -910,10 +921,7 @@ static int __init replace_intsrc_all(struct mpc_table *mpc,
break; break;
default: default:
/* wrong mptable */ /* wrong mptable */
printk(KERN_ERR "Your mptable is wrong, contact your HW vendor!\n"); smp_dump_mptable(mpc, mpt);
printk(KERN_ERR "type %x\n", *mpt);
print_hex_dump(KERN_ERR, " ", DUMP_PREFIX_ADDRESS, 16,
1, mpc, mpc->length, 1);
goto out; goto out;
} }
} }
......
/* Fallback functions when the main IOMMU code is not compiled in. This /* Fallback functions when the main IOMMU code is not compiled in. This
code is roughly equivalent to i386. */ code is roughly equivalent to i386. */
#include <linux/mm.h>
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/string.h>
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <linux/scatterlist.h> #include <linux/scatterlist.h>
#include <linux/string.h>
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/mm.h>
#include <asm/iommu.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/iommu.h>
#include <asm/dma.h> #include <asm/dma.h>
static int static int
...@@ -79,11 +79,11 @@ static void nommu_free_coherent(struct device *dev, size_t size, void *vaddr, ...@@ -79,11 +79,11 @@ static void nommu_free_coherent(struct device *dev, size_t size, void *vaddr,
} }
struct dma_mapping_ops nommu_dma_ops = { struct dma_mapping_ops nommu_dma_ops = {
.alloc_coherent = dma_generic_alloc_coherent, .alloc_coherent = dma_generic_alloc_coherent,
.free_coherent = nommu_free_coherent, .free_coherent = nommu_free_coherent,
.map_single = nommu_map_single, .map_single = nommu_map_single,
.map_sg = nommu_map_sg, .map_sg = nommu_map_sg,
.is_phys = 1, .is_phys = 1,
}; };
void __init no_iommu_init(void) void __init no_iommu_init(void)
......
/* /*
* RTC related functions * RTC related functions
*/ */
#include <linux/platform_device.h>
#include <linux/mc146818rtc.h>
#include <linux/acpi.h> #include <linux/acpi.h>
#include <linux/bcd.h> #include <linux/bcd.h>
#include <linux/mc146818rtc.h>
#include <linux/platform_device.h>
#include <linux/pnp.h> #include <linux/pnp.h>
#include <asm/time.h>
#include <asm/vsyscall.h> #include <asm/vsyscall.h>
#include <asm/time.h>
#ifdef CONFIG_X86_32 #ifdef CONFIG_X86_32
/* /*
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
* register we are working with. It is required for NMI access to the * register we are working with. It is required for NMI access to the
* CMOS/RTC registers. See include/asm-i386/mc146818rtc.h for details. * CMOS/RTC registers. See include/asm-i386/mc146818rtc.h for details.
*/ */
volatile unsigned long cmos_lock = 0; volatile unsigned long cmos_lock;
EXPORT_SYMBOL(cmos_lock); EXPORT_SYMBOL(cmos_lock);
#endif #endif /* CONFIG_X86_32 */
/* For two digit years assume time is always after that */ /* For two digit years assume time is always after that */
#define CMOS_YEARS_OFFS 2000 #define CMOS_YEARS_OFFS 2000
...@@ -38,9 +38,9 @@ EXPORT_SYMBOL(rtc_lock); ...@@ -38,9 +38,9 @@ EXPORT_SYMBOL(rtc_lock);
*/ */
int mach_set_rtc_mmss(unsigned long nowtime) int mach_set_rtc_mmss(unsigned long nowtime)
{ {
int retval = 0;
int real_seconds, real_minutes, cmos_minutes; int real_seconds, real_minutes, cmos_minutes;
unsigned char save_control, save_freq_select; unsigned char save_control, save_freq_select;
int retval = 0;
/* tell the clock it's being set */ /* tell the clock it's being set */
save_control = CMOS_READ(RTC_CONTROL); save_control = CMOS_READ(RTC_CONTROL);
...@@ -72,8 +72,8 @@ int mach_set_rtc_mmss(unsigned long nowtime) ...@@ -72,8 +72,8 @@ int mach_set_rtc_mmss(unsigned long nowtime)
real_seconds = bin2bcd(real_seconds); real_seconds = bin2bcd(real_seconds);
real_minutes = bin2bcd(real_minutes); real_minutes = bin2bcd(real_minutes);
} }
CMOS_WRITE(real_seconds,RTC_SECONDS); CMOS_WRITE(real_seconds, RTC_SECONDS);
CMOS_WRITE(real_minutes,RTC_MINUTES); CMOS_WRITE(real_minutes, RTC_MINUTES);
} else { } else {
printk(KERN_WARNING printk(KERN_WARNING
"set_rtc_mmss: can't update from %d to %d\n", "set_rtc_mmss: can't update from %d to %d\n",
...@@ -151,6 +151,7 @@ unsigned char rtc_cmos_read(unsigned char addr) ...@@ -151,6 +151,7 @@ unsigned char rtc_cmos_read(unsigned char addr)
outb(addr, RTC_PORT(0)); outb(addr, RTC_PORT(0));
val = inb(RTC_PORT(1)); val = inb(RTC_PORT(1));
lock_cmos_suffix(addr); lock_cmos_suffix(addr);
return val; return val;
} }
EXPORT_SYMBOL(rtc_cmos_read); EXPORT_SYMBOL(rtc_cmos_read);
...@@ -166,8 +167,8 @@ EXPORT_SYMBOL(rtc_cmos_write); ...@@ -166,8 +167,8 @@ EXPORT_SYMBOL(rtc_cmos_write);
static int set_rtc_mmss(unsigned long nowtime) static int set_rtc_mmss(unsigned long nowtime)
{ {
int retval;
unsigned long flags; unsigned long flags;
int retval;
spin_lock_irqsave(&rtc_lock, flags); spin_lock_irqsave(&rtc_lock, flags);
retval = set_wallclock(nowtime); retval = set_wallclock(nowtime);
...@@ -242,6 +243,7 @@ static __init int add_rtc_cmos(void) ...@@ -242,6 +243,7 @@ static __init int add_rtc_cmos(void)
platform_device_register(&rtc_device); platform_device_register(&rtc_device);
dev_info(&rtc_device.dev, dev_info(&rtc_device.dev,
"registered platform RTC device (no PNP device found)\n"); "registered platform RTC device (no PNP device found)\n");
return 0; return 0;
} }
device_initcall(add_rtc_cmos); device_initcall(add_rtc_cmos);
...@@ -211,31 +211,27 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size, ...@@ -211,31 +211,27 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size,
{ {
/* Default to using normal stack */ /* Default to using normal stack */
unsigned long sp = regs->sp; unsigned long sp = regs->sp;
int onsigstack = on_sig_stack(sp);
#ifdef CONFIG_X86_64 #ifdef CONFIG_X86_64
/* redzone */ /* redzone */
sp -= 128; sp -= 128;
#endif /* CONFIG_X86_64 */ #endif /* CONFIG_X86_64 */
/* if (!onsigstack) {
* If we are on the alternate signal stack and would overflow it, don't. /* This is the X/Open sanctioned signal stack switching. */
* Return an always-bogus address instead so we will die with SIGSEGV. if (ka->sa.sa_flags & SA_ONSTACK) {
*/ if (sas_ss_flags(sp) == 0)
if (on_sig_stack(sp) && !likely(on_sig_stack(sp - frame_size))) sp = current->sas_ss_sp + current->sas_ss_size;
return (void __user *) -1L; } else {
/* This is the X/Open sanctioned signal stack switching. */
if (ka->sa.sa_flags & SA_ONSTACK) {
if (sas_ss_flags(sp) == 0)
sp = current->sas_ss_sp + current->sas_ss_size;
} else {
#ifdef CONFIG_X86_32 #ifdef CONFIG_X86_32
/* This is the legacy signal stack switching. */ /* This is the legacy signal stack switching. */
if ((regs->ss & 0xffff) != __USER_DS && if ((regs->ss & 0xffff) != __USER_DS &&
!(ka->sa.sa_flags & SA_RESTORER) && !(ka->sa.sa_flags & SA_RESTORER) &&
ka->sa.sa_restorer) ka->sa.sa_restorer)
sp = (unsigned long) ka->sa.sa_restorer; sp = (unsigned long) ka->sa.sa_restorer;
#endif /* CONFIG_X86_32 */ #endif /* CONFIG_X86_32 */
}
} }
if (used_math()) { if (used_math()) {
...@@ -244,12 +240,22 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size, ...@@ -244,12 +240,22 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size,
sp = round_down(sp, 64); sp = round_down(sp, 64);
#endif /* CONFIG_X86_64 */ #endif /* CONFIG_X86_64 */
*fpstate = (void __user *)sp; *fpstate = (void __user *)sp;
if (save_i387_xstate(*fpstate) < 0)
return (void __user *)-1L;
} }
return (void __user *)align_sigframe(sp - frame_size); sp = align_sigframe(sp - frame_size);
/*
* If we are on the alternate signal stack and would overflow it, don't.
* Return an always-bogus address instead so we will die with SIGSEGV.
*/
if (onsigstack && !likely(on_sig_stack(sp)))
return (void __user *)-1L;
/* save i387 state */
if (used_math() && save_i387_xstate(*fpstate) < 0)
return (void __user *)-1L;
return (void __user *)sp;
} }
#ifdef CONFIG_X86_32 #ifdef CONFIG_X86_32
......
...@@ -25,10 +25,10 @@ ...@@ -25,10 +25,10 @@
* *
* Send feedback to <colpatch@us.ibm.com> * Send feedback to <colpatch@us.ibm.com>
*/ */
#include <linux/init.h>
#include <linux/smp.h>
#include <linux/nodemask.h> #include <linux/nodemask.h>
#include <linux/mmzone.h> #include <linux/mmzone.h>
#include <linux/init.h>
#include <linux/smp.h>
#include <asm/cpu.h> #include <asm/cpu.h>
static DEFINE_PER_CPU(struct x86_cpu, cpu_devices); static DEFINE_PER_CPU(struct x86_cpu, cpu_devices);
...@@ -47,6 +47,7 @@ int __ref arch_register_cpu(int num) ...@@ -47,6 +47,7 @@ int __ref arch_register_cpu(int num)
*/ */
if (num) if (num)
per_cpu(cpu_devices, num).cpu.hotpluggable = 1; per_cpu(cpu_devices, num).cpu.hotpluggable = 1;
return register_cpu(&per_cpu(cpu_devices, num).cpu, num); return register_cpu(&per_cpu(cpu_devices, num).cpu, num);
} }
EXPORT_SYMBOL(arch_register_cpu); EXPORT_SYMBOL(arch_register_cpu);
...@@ -56,12 +57,13 @@ void arch_unregister_cpu(int num) ...@@ -56,12 +57,13 @@ void arch_unregister_cpu(int num)
unregister_cpu(&per_cpu(cpu_devices, num).cpu); unregister_cpu(&per_cpu(cpu_devices, num).cpu);
} }
EXPORT_SYMBOL(arch_unregister_cpu); EXPORT_SYMBOL(arch_unregister_cpu);
#else #else /* CONFIG_HOTPLUG_CPU */
static int __init arch_register_cpu(int num) static int __init arch_register_cpu(int num)
{ {
return register_cpu(&per_cpu(cpu_devices, num).cpu, num); return register_cpu(&per_cpu(cpu_devices, num).cpu, num);
} }
#endif /*CONFIG_HOTPLUG_CPU*/ #endif /* CONFIG_HOTPLUG_CPU */
static int __init topology_init(void) static int __init topology_init(void)
{ {
...@@ -70,11 +72,11 @@ static int __init topology_init(void) ...@@ -70,11 +72,11 @@ static int __init topology_init(void)
#ifdef CONFIG_NUMA #ifdef CONFIG_NUMA
for_each_online_node(i) for_each_online_node(i)
register_one_node(i); register_one_node(i);
#endif /* CONFIG_NUMA */ #endif
for_each_present_cpu(i) for_each_present_cpu(i)
arch_register_cpu(i); arch_register_cpu(i);
return 0; return 0;
} }
subsys_initcall(topology_init); subsys_initcall(topology_init);
...@@ -487,12 +487,7 @@ static int __init early_ioremap_debug_setup(char *str) ...@@ -487,12 +487,7 @@ static int __init early_ioremap_debug_setup(char *str)
early_param("early_ioremap_debug", early_ioremap_debug_setup); early_param("early_ioremap_debug", early_ioremap_debug_setup);
static __initdata int after_paging_init; static __initdata int after_paging_init;
#define __FIXADDR_TOP (-PAGE_SIZE) static pte_t bm_pte[PAGE_SIZE/sizeof(pte_t)] __page_aligned_bss;
static pte_t bm_pte[(__fix_to_virt(FIX_DBGP_BASE)
^ __fix_to_virt(FIX_BTMAP_BEGIN)) >> PMD_SHIFT
? PAGE_SIZE / sizeof(pte_t) : 0] __page_aligned_bss;
#undef __FIXADDR_TOP
static __initdata pte_t *bm_ptep;
static inline pmd_t * __init early_ioremap_pmd(unsigned long addr) static inline pmd_t * __init early_ioremap_pmd(unsigned long addr)
{ {
...@@ -507,8 +502,6 @@ static inline pmd_t * __init early_ioremap_pmd(unsigned long addr) ...@@ -507,8 +502,6 @@ static inline pmd_t * __init early_ioremap_pmd(unsigned long addr)
static inline pte_t * __init early_ioremap_pte(unsigned long addr) static inline pte_t * __init early_ioremap_pte(unsigned long addr)
{ {
if (!sizeof(bm_pte))
return &bm_ptep[pte_index(addr)];
return &bm_pte[pte_index(addr)]; return &bm_pte[pte_index(addr)];
} }
...@@ -526,14 +519,8 @@ void __init early_ioremap_init(void) ...@@ -526,14 +519,8 @@ void __init early_ioremap_init(void)
slot_virt[i] = fix_to_virt(FIX_BTMAP_BEGIN - NR_FIX_BTMAPS*i); slot_virt[i] = fix_to_virt(FIX_BTMAP_BEGIN - NR_FIX_BTMAPS*i);
pmd = early_ioremap_pmd(fix_to_virt(FIX_BTMAP_BEGIN)); pmd = early_ioremap_pmd(fix_to_virt(FIX_BTMAP_BEGIN));
if (sizeof(bm_pte)) { memset(bm_pte, 0, sizeof(bm_pte));
memset(bm_pte, 0, sizeof(bm_pte)); pmd_populate_kernel(&init_mm, pmd, bm_pte);
pmd_populate_kernel(&init_mm, pmd, bm_pte);
} else {
bm_ptep = pte_offset_kernel(pmd, 0);
if (early_ioremap_debug)
printk(KERN_INFO "bm_ptep=%p\n", bm_ptep);
}
/* /*
* The boot-ioremap range spans multiple pmds, for which * The boot-ioremap range spans multiple pmds, for which
......
...@@ -34,6 +34,7 @@ struct cpa_data { ...@@ -34,6 +34,7 @@ struct cpa_data {
unsigned long pfn; unsigned long pfn;
unsigned force_split : 1; unsigned force_split : 1;
int curpage; int curpage;
struct page **pages;
}; };
/* /*
...@@ -46,6 +47,7 @@ static DEFINE_SPINLOCK(cpa_lock); ...@@ -46,6 +47,7 @@ static DEFINE_SPINLOCK(cpa_lock);
#define CPA_FLUSHTLB 1 #define CPA_FLUSHTLB 1
#define CPA_ARRAY 2 #define CPA_ARRAY 2
#define CPA_PAGES_ARRAY 4
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
static unsigned long direct_pages_count[PG_LEVEL_NUM]; static unsigned long direct_pages_count[PG_LEVEL_NUM];
...@@ -202,10 +204,10 @@ static void cpa_flush_range(unsigned long start, int numpages, int cache) ...@@ -202,10 +204,10 @@ static void cpa_flush_range(unsigned long start, int numpages, int cache)
} }
} }
static void cpa_flush_array(unsigned long *start, int numpages, int cache) static void cpa_flush_array(unsigned long *start, int numpages, int cache,
int in_flags, struct page **pages)
{ {
unsigned int i, level; unsigned int i, level;
unsigned long *addr;
BUG_ON(irqs_disabled()); BUG_ON(irqs_disabled());
...@@ -226,14 +228,22 @@ static void cpa_flush_array(unsigned long *start, int numpages, int cache) ...@@ -226,14 +228,22 @@ static void cpa_flush_array(unsigned long *start, int numpages, int cache)
* will cause all other CPUs to flush the same * will cause all other CPUs to flush the same
* cachelines: * cachelines:
*/ */
for (i = 0, addr = start; i < numpages; i++, addr++) { for (i = 0; i < numpages; i++) {
pte_t *pte = lookup_address(*addr, &level); unsigned long addr;
pte_t *pte;
if (in_flags & CPA_PAGES_ARRAY)
addr = (unsigned long)page_address(pages[i]);
else
addr = start[i];
pte = lookup_address(addr, &level);
/* /*
* Only flush present addresses: * Only flush present addresses:
*/ */
if (pte && (pte_val(*pte) & _PAGE_PRESENT)) if (pte && (pte_val(*pte) & _PAGE_PRESENT))
clflush_cache_range((void *) *addr, PAGE_SIZE); clflush_cache_range((void *)addr, PAGE_SIZE);
} }
} }
...@@ -585,7 +595,9 @@ static int __change_page_attr(struct cpa_data *cpa, int primary) ...@@ -585,7 +595,9 @@ static int __change_page_attr(struct cpa_data *cpa, int primary)
unsigned int level; unsigned int level;
pte_t *kpte, old_pte; pte_t *kpte, old_pte;
if (cpa->flags & CPA_ARRAY) if (cpa->flags & CPA_PAGES_ARRAY)
address = (unsigned long)page_address(cpa->pages[cpa->curpage]);
else if (cpa->flags & CPA_ARRAY)
address = cpa->vaddr[cpa->curpage]; address = cpa->vaddr[cpa->curpage];
else else
address = *cpa->vaddr; address = *cpa->vaddr;
...@@ -688,7 +700,9 @@ static int cpa_process_alias(struct cpa_data *cpa) ...@@ -688,7 +700,9 @@ static int cpa_process_alias(struct cpa_data *cpa)
* No need to redo, when the primary call touched the direct * No need to redo, when the primary call touched the direct
* mapping already: * mapping already:
*/ */
if (cpa->flags & CPA_ARRAY) if (cpa->flags & CPA_PAGES_ARRAY)
vaddr = (unsigned long)page_address(cpa->pages[cpa->curpage]);
else if (cpa->flags & CPA_ARRAY)
vaddr = cpa->vaddr[cpa->curpage]; vaddr = cpa->vaddr[cpa->curpage];
else else
vaddr = *cpa->vaddr; vaddr = *cpa->vaddr;
...@@ -699,7 +713,7 @@ static int cpa_process_alias(struct cpa_data *cpa) ...@@ -699,7 +713,7 @@ static int cpa_process_alias(struct cpa_data *cpa)
alias_cpa = *cpa; alias_cpa = *cpa;
temp_cpa_vaddr = (unsigned long) __va(cpa->pfn << PAGE_SHIFT); temp_cpa_vaddr = (unsigned long) __va(cpa->pfn << PAGE_SHIFT);
alias_cpa.vaddr = &temp_cpa_vaddr; alias_cpa.vaddr = &temp_cpa_vaddr;
alias_cpa.flags &= ~CPA_ARRAY; alias_cpa.flags &= ~(CPA_PAGES_ARRAY | CPA_ARRAY);
ret = __change_page_attr_set_clr(&alias_cpa, 0); ret = __change_page_attr_set_clr(&alias_cpa, 0);
...@@ -725,7 +739,7 @@ static int cpa_process_alias(struct cpa_data *cpa) ...@@ -725,7 +739,7 @@ static int cpa_process_alias(struct cpa_data *cpa)
alias_cpa = *cpa; alias_cpa = *cpa;
temp_cpa_vaddr = (cpa->pfn << PAGE_SHIFT) + __START_KERNEL_map - phys_base; temp_cpa_vaddr = (cpa->pfn << PAGE_SHIFT) + __START_KERNEL_map - phys_base;
alias_cpa.vaddr = &temp_cpa_vaddr; alias_cpa.vaddr = &temp_cpa_vaddr;
alias_cpa.flags &= ~CPA_ARRAY; alias_cpa.flags &= ~(CPA_PAGES_ARRAY | CPA_ARRAY);
/* /*
* The high mapping range is imprecise, so ignore the return value. * The high mapping range is imprecise, so ignore the return value.
...@@ -746,7 +760,7 @@ static int __change_page_attr_set_clr(struct cpa_data *cpa, int checkalias) ...@@ -746,7 +760,7 @@ static int __change_page_attr_set_clr(struct cpa_data *cpa, int checkalias)
*/ */
cpa->numpages = numpages; cpa->numpages = numpages;
/* for array changes, we can't use large page */ /* for array changes, we can't use large page */
if (cpa->flags & CPA_ARRAY) if (cpa->flags & (CPA_ARRAY | CPA_PAGES_ARRAY))
cpa->numpages = 1; cpa->numpages = 1;
if (!debug_pagealloc) if (!debug_pagealloc)
...@@ -770,7 +784,7 @@ static int __change_page_attr_set_clr(struct cpa_data *cpa, int checkalias) ...@@ -770,7 +784,7 @@ static int __change_page_attr_set_clr(struct cpa_data *cpa, int checkalias)
*/ */
BUG_ON(cpa->numpages > numpages); BUG_ON(cpa->numpages > numpages);
numpages -= cpa->numpages; numpages -= cpa->numpages;
if (cpa->flags & CPA_ARRAY) if (cpa->flags & (CPA_PAGES_ARRAY | CPA_ARRAY))
cpa->curpage++; cpa->curpage++;
else else
*cpa->vaddr += cpa->numpages * PAGE_SIZE; *cpa->vaddr += cpa->numpages * PAGE_SIZE;
...@@ -787,7 +801,8 @@ static inline int cache_attr(pgprot_t attr) ...@@ -787,7 +801,8 @@ static inline int cache_attr(pgprot_t attr)
static int change_page_attr_set_clr(unsigned long *addr, int numpages, static int change_page_attr_set_clr(unsigned long *addr, int numpages,
pgprot_t mask_set, pgprot_t mask_clr, pgprot_t mask_set, pgprot_t mask_clr,
int force_split, int array) int force_split, int in_flag,
struct page **pages)
{ {
struct cpa_data cpa; struct cpa_data cpa;
int ret, cache, checkalias; int ret, cache, checkalias;
...@@ -802,15 +817,7 @@ static int change_page_attr_set_clr(unsigned long *addr, int numpages, ...@@ -802,15 +817,7 @@ static int change_page_attr_set_clr(unsigned long *addr, int numpages,
return 0; return 0;
/* Ensure we are PAGE_SIZE aligned */ /* Ensure we are PAGE_SIZE aligned */
if (!array) { if (in_flag & CPA_ARRAY) {
if (*addr & ~PAGE_MASK) {
*addr &= PAGE_MASK;
/*
* People should not be passing in unaligned addresses:
*/
WARN_ON_ONCE(1);
}
} else {
int i; int i;
for (i = 0; i < numpages; i++) { for (i = 0; i < numpages; i++) {
if (addr[i] & ~PAGE_MASK) { if (addr[i] & ~PAGE_MASK) {
...@@ -818,6 +825,18 @@ static int change_page_attr_set_clr(unsigned long *addr, int numpages, ...@@ -818,6 +825,18 @@ static int change_page_attr_set_clr(unsigned long *addr, int numpages,
WARN_ON_ONCE(1); WARN_ON_ONCE(1);
} }
} }
} else if (!(in_flag & CPA_PAGES_ARRAY)) {
/*
* in_flag of CPA_PAGES_ARRAY implies it is aligned.
* No need to cehck in that case
*/
if (*addr & ~PAGE_MASK) {
*addr &= PAGE_MASK;
/*
* People should not be passing in unaligned addresses:
*/
WARN_ON_ONCE(1);
}
} }
/* Must avoid aliasing mappings in the highmem code */ /* Must avoid aliasing mappings in the highmem code */
...@@ -833,6 +852,7 @@ static int change_page_attr_set_clr(unsigned long *addr, int numpages, ...@@ -833,6 +852,7 @@ static int change_page_attr_set_clr(unsigned long *addr, int numpages,
arch_flush_lazy_mmu_mode(); arch_flush_lazy_mmu_mode();
cpa.vaddr = addr; cpa.vaddr = addr;
cpa.pages = pages;
cpa.numpages = numpages; cpa.numpages = numpages;
cpa.mask_set = mask_set; cpa.mask_set = mask_set;
cpa.mask_clr = mask_clr; cpa.mask_clr = mask_clr;
...@@ -840,8 +860,8 @@ static int change_page_attr_set_clr(unsigned long *addr, int numpages, ...@@ -840,8 +860,8 @@ static int change_page_attr_set_clr(unsigned long *addr, int numpages,
cpa.curpage = 0; cpa.curpage = 0;
cpa.force_split = force_split; cpa.force_split = force_split;
if (array) if (in_flag & (CPA_ARRAY | CPA_PAGES_ARRAY))
cpa.flags |= CPA_ARRAY; cpa.flags |= in_flag;
/* No alias checking for _NX bit modifications */ /* No alias checking for _NX bit modifications */
checkalias = (pgprot_val(mask_set) | pgprot_val(mask_clr)) != _PAGE_NX; checkalias = (pgprot_val(mask_set) | pgprot_val(mask_clr)) != _PAGE_NX;
...@@ -867,9 +887,10 @@ static int change_page_attr_set_clr(unsigned long *addr, int numpages, ...@@ -867,9 +887,10 @@ static int change_page_attr_set_clr(unsigned long *addr, int numpages,
* wbindv): * wbindv):
*/ */
if (!ret && cpu_has_clflush) { if (!ret && cpu_has_clflush) {
if (cpa.flags & CPA_ARRAY) if (cpa.flags & (CPA_PAGES_ARRAY | CPA_ARRAY)) {
cpa_flush_array(addr, numpages, cache); cpa_flush_array(addr, numpages, cache,
else cpa.flags, pages);
} else
cpa_flush_range(*addr, numpages, cache); cpa_flush_range(*addr, numpages, cache);
} else } else
cpa_flush_all(cache); cpa_flush_all(cache);
...@@ -889,14 +910,28 @@ static inline int change_page_attr_set(unsigned long *addr, int numpages, ...@@ -889,14 +910,28 @@ static inline int change_page_attr_set(unsigned long *addr, int numpages,
pgprot_t mask, int array) pgprot_t mask, int array)
{ {
return change_page_attr_set_clr(addr, numpages, mask, __pgprot(0), 0, return change_page_attr_set_clr(addr, numpages, mask, __pgprot(0), 0,
array); (array ? CPA_ARRAY : 0), NULL);
} }
static inline int change_page_attr_clear(unsigned long *addr, int numpages, static inline int change_page_attr_clear(unsigned long *addr, int numpages,
pgprot_t mask, int array) pgprot_t mask, int array)
{ {
return change_page_attr_set_clr(addr, numpages, __pgprot(0), mask, 0, return change_page_attr_set_clr(addr, numpages, __pgprot(0), mask, 0,
array); (array ? CPA_ARRAY : 0), NULL);
}
static inline int cpa_set_pages_array(struct page **pages, int numpages,
pgprot_t mask)
{
return change_page_attr_set_clr(NULL, numpages, mask, __pgprot(0), 0,
CPA_PAGES_ARRAY, pages);
}
static inline int cpa_clear_pages_array(struct page **pages, int numpages,
pgprot_t mask)
{
return change_page_attr_set_clr(NULL, numpages, __pgprot(0), mask, 0,
CPA_PAGES_ARRAY, pages);
} }
int _set_memory_uc(unsigned long addr, int numpages) int _set_memory_uc(unsigned long addr, int numpages)
...@@ -1044,7 +1079,7 @@ int set_memory_np(unsigned long addr, int numpages) ...@@ -1044,7 +1079,7 @@ int set_memory_np(unsigned long addr, int numpages)
int set_memory_4k(unsigned long addr, int numpages) int set_memory_4k(unsigned long addr, int numpages)
{ {
return change_page_attr_set_clr(&addr, numpages, __pgprot(0), return change_page_attr_set_clr(&addr, numpages, __pgprot(0),
__pgprot(0), 1, 0); __pgprot(0), 1, 0, NULL);
} }
int set_pages_uc(struct page *page, int numpages) int set_pages_uc(struct page *page, int numpages)
...@@ -1055,6 +1090,35 @@ int set_pages_uc(struct page *page, int numpages) ...@@ -1055,6 +1090,35 @@ int set_pages_uc(struct page *page, int numpages)
} }
EXPORT_SYMBOL(set_pages_uc); EXPORT_SYMBOL(set_pages_uc);
int set_pages_array_uc(struct page **pages, int addrinarray)
{
unsigned long start;
unsigned long end;
int i;
int free_idx;
for (i = 0; i < addrinarray; i++) {
start = (unsigned long)page_address(pages[i]);
end = start + PAGE_SIZE;
if (reserve_memtype(start, end, _PAGE_CACHE_UC_MINUS, NULL))
goto err_out;
}
if (cpa_set_pages_array(pages, addrinarray,
__pgprot(_PAGE_CACHE_UC_MINUS)) == 0) {
return 0; /* Success */
}
err_out:
free_idx = i;
for (i = 0; i < free_idx; i++) {
start = (unsigned long)page_address(pages[i]);
end = start + PAGE_SIZE;
free_memtype(start, end);
}
return -EINVAL;
}
EXPORT_SYMBOL(set_pages_array_uc);
int set_pages_wb(struct page *page, int numpages) int set_pages_wb(struct page *page, int numpages)
{ {
unsigned long addr = (unsigned long)page_address(page); unsigned long addr = (unsigned long)page_address(page);
...@@ -1063,6 +1127,26 @@ int set_pages_wb(struct page *page, int numpages) ...@@ -1063,6 +1127,26 @@ int set_pages_wb(struct page *page, int numpages)
} }
EXPORT_SYMBOL(set_pages_wb); EXPORT_SYMBOL(set_pages_wb);
int set_pages_array_wb(struct page **pages, int addrinarray)
{
int retval;
unsigned long start;
unsigned long end;
int i;
retval = cpa_clear_pages_array(pages, addrinarray,
__pgprot(_PAGE_CACHE_MASK));
for (i = 0; i < addrinarray; i++) {
start = (unsigned long)page_address(pages[i]);
end = start + PAGE_SIZE;
free_memtype(start, end);
}
return retval;
}
EXPORT_SYMBOL(set_pages_array_wb);
int set_pages_x(struct page *page, int numpages) int set_pages_x(struct page *page, int numpages)
{ {
unsigned long addr = (unsigned long)page_address(page); unsigned long addr = (unsigned long)page_address(page);
......
...@@ -319,6 +319,9 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, ...@@ -319,6 +319,9 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
return -EINVAL; return -EINVAL;
} }
flags = new_flags; flags = new_flags;
vma->vm_page_prot = __pgprot(
(pgprot_val(vma->vm_page_prot) & ~_PAGE_CACHE_MASK) |
flags);
} }
if (((vma->vm_pgoff < max_low_pfn_mapped) || if (((vma->vm_pgoff < max_low_pfn_mapped) ||
......
/*
* Copyright(c) 2007 - 2009 Intel Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* The full GNU General Public License is included in this distribution in the
* file called COPYING.
*/
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/device.h> #include <linux/device.h>
......
...@@ -46,6 +46,9 @@ MODULE_PARM_DESC(cidmode, "Call-ID mode"); ...@@ -46,6 +46,9 @@ MODULE_PARM_DESC(cidmode, "Call-ID mode");
/* length limit according to Siemens 3070usb-protokoll.doc ch. 2.1 */ /* length limit according to Siemens 3070usb-protokoll.doc ch. 2.1 */
#define IF_WRITEBUF 264 #define IF_WRITEBUF 264
/* interrupt pipe message size according to ibid. ch. 2.2 */
#define IP_MSGSIZE 3
/* Values for the Gigaset 307x */ /* Values for the Gigaset 307x */
#define USB_GIGA_VENDOR_ID 0x0681 #define USB_GIGA_VENDOR_ID 0x0681
#define USB_3070_PRODUCT_ID 0x0001 #define USB_3070_PRODUCT_ID 0x0001
...@@ -110,7 +113,7 @@ struct bas_cardstate { ...@@ -110,7 +113,7 @@ struct bas_cardstate {
unsigned char *rcvbuf; /* AT reply receive buffer */ unsigned char *rcvbuf; /* AT reply receive buffer */
struct urb *urb_int_in; /* URB for interrupt pipe */ struct urb *urb_int_in; /* URB for interrupt pipe */
unsigned char int_in_buf[3]; unsigned char *int_in_buf;
spinlock_t lock; /* locks all following */ spinlock_t lock; /* locks all following */
int basstate; /* bitmap (BS_*) */ int basstate; /* bitmap (BS_*) */
...@@ -657,7 +660,7 @@ static void read_int_callback(struct urb *urb) ...@@ -657,7 +660,7 @@ static void read_int_callback(struct urb *urb)
} }
/* drop incomplete packets even if the missing bytes wouldn't matter */ /* drop incomplete packets even if the missing bytes wouldn't matter */
if (unlikely(urb->actual_length < 3)) { if (unlikely(urb->actual_length < IP_MSGSIZE)) {
dev_warn(cs->dev, "incomplete interrupt packet (%d bytes)\n", dev_warn(cs->dev, "incomplete interrupt packet (%d bytes)\n",
urb->actual_length); urb->actual_length);
goto resubmit; goto resubmit;
...@@ -2127,6 +2130,7 @@ static void gigaset_reinitbcshw(struct bc_state *bcs) ...@@ -2127,6 +2130,7 @@ static void gigaset_reinitbcshw(struct bc_state *bcs)
static void gigaset_freecshw(struct cardstate *cs) static void gigaset_freecshw(struct cardstate *cs)
{ {
/* timers, URBs and rcvbuf are disposed of in disconnect */ /* timers, URBs and rcvbuf are disposed of in disconnect */
kfree(cs->hw.bas->int_in_buf);
kfree(cs->hw.bas); kfree(cs->hw.bas);
cs->hw.bas = NULL; cs->hw.bas = NULL;
} }
...@@ -2140,6 +2144,12 @@ static int gigaset_initcshw(struct cardstate *cs) ...@@ -2140,6 +2144,12 @@ static int gigaset_initcshw(struct cardstate *cs)
pr_err("out of memory\n"); pr_err("out of memory\n");
return 0; return 0;
} }
ucs->int_in_buf = kmalloc(IP_MSGSIZE, GFP_KERNEL);
if (!ucs->int_in_buf) {
kfree(ucs);
pr_err("out of memory\n");
return 0;
}
ucs->urb_cmd_in = NULL; ucs->urb_cmd_in = NULL;
ucs->urb_cmd_out = NULL; ucs->urb_cmd_out = NULL;
...@@ -2292,7 +2302,7 @@ static int gigaset_probe(struct usb_interface *interface, ...@@ -2292,7 +2302,7 @@ static int gigaset_probe(struct usb_interface *interface,
usb_fill_int_urb(ucs->urb_int_in, udev, usb_fill_int_urb(ucs->urb_int_in, udev,
usb_rcvintpipe(udev, usb_rcvintpipe(udev,
(endpoint->bEndpointAddress) & 0x0f), (endpoint->bEndpointAddress) & 0x0f),
ucs->int_in_buf, 3, read_int_callback, cs, ucs->int_in_buf, IP_MSGSIZE, read_int_callback, cs,
endpoint->bInterval); endpoint->bInterval);
if ((rc = usb_submit_urb(ucs->urb_int_in, GFP_KERNEL)) != 0) { if ((rc = usb_submit_urb(ucs->urb_int_in, GFP_KERNEL)) != 0) {
dev_err(cs->dev, "could not submit interrupt URB: %s\n", dev_err(cs->dev, "could not submit interrupt URB: %s\n",
......
...@@ -1042,7 +1042,7 @@ config NI65 ...@@ -1042,7 +1042,7 @@ config NI65
config DNET config DNET
tristate "Dave ethernet support (DNET)" tristate "Dave ethernet support (DNET)"
depends on NET_ETHERNET depends on NET_ETHERNET && HAS_IOMEM
select PHYLIB select PHYLIB
help help
The Dave ethernet interface (DNET) is found on Qong Board FPGA. The Dave ethernet interface (DNET) is found on Qong Board FPGA.
......
...@@ -194,6 +194,7 @@ struct be_adapter { ...@@ -194,6 +194,7 @@ struct be_adapter {
struct be_eq_obj rx_eq; struct be_eq_obj rx_eq;
struct be_rx_obj rx_obj; struct be_rx_obj rx_obj;
u32 big_page_size; /* Compounded page size shared by rx wrbs */ u32 big_page_size; /* Compounded page size shared by rx wrbs */
bool rx_post_starved; /* Zero rx frags have been posted to BE */
struct vlan_group *vlan_grp; struct vlan_group *vlan_grp;
u16 num_vlans; u16 num_vlans;
......
...@@ -273,26 +273,6 @@ static void be_rx_eqd_update(struct be_adapter *adapter) ...@@ -273,26 +273,6 @@ static void be_rx_eqd_update(struct be_adapter *adapter)
rx_eq->cur_eqd = eqd; rx_eq->cur_eqd = eqd;
} }
static void be_worker(struct work_struct *work)
{
struct be_adapter *adapter =
container_of(work, struct be_adapter, work.work);
int status;
/* Check link */
be_link_status_update(adapter);
/* Get Stats */
status = be_cmd_get_stats(&adapter->ctrl, &adapter->stats.cmd);
if (!status)
netdev_stats_update(adapter);
/* Set EQ delay */
be_rx_eqd_update(adapter);
schedule_delayed_work(&adapter->work, msecs_to_jiffies(1000));
}
static struct net_device_stats *be_get_stats(struct net_device *dev) static struct net_device_stats *be_get_stats(struct net_device *dev)
{ {
struct be_adapter *adapter = netdev_priv(dev); struct be_adapter *adapter = netdev_priv(dev);
...@@ -493,7 +473,7 @@ static int be_change_mtu(struct net_device *netdev, int new_mtu) ...@@ -493,7 +473,7 @@ static int be_change_mtu(struct net_device *netdev, int new_mtu)
* program them in BE. If more than BE_NUM_VLANS_SUPPORTED are configured, * program them in BE. If more than BE_NUM_VLANS_SUPPORTED are configured,
* set the BE in promiscuous VLAN mode. * set the BE in promiscuous VLAN mode.
*/ */
static void be_vids_config(struct net_device *netdev) static void be_vid_config(struct net_device *netdev)
{ {
struct be_adapter *adapter = netdev_priv(netdev); struct be_adapter *adapter = netdev_priv(netdev);
u16 vtag[BE_NUM_VLANS_SUPPORTED]; u16 vtag[BE_NUM_VLANS_SUPPORTED];
...@@ -536,7 +516,7 @@ static void be_vlan_add_vid(struct net_device *netdev, u16 vid) ...@@ -536,7 +516,7 @@ static void be_vlan_add_vid(struct net_device *netdev, u16 vid)
adapter->num_vlans++; adapter->num_vlans++;
adapter->vlan_tag[vid] = 1; adapter->vlan_tag[vid] = 1;
be_vids_config(netdev); be_vid_config(netdev);
} }
static void be_vlan_rem_vid(struct net_device *netdev, u16 vid) static void be_vlan_rem_vid(struct net_device *netdev, u16 vid)
...@@ -547,7 +527,7 @@ static void be_vlan_rem_vid(struct net_device *netdev, u16 vid) ...@@ -547,7 +527,7 @@ static void be_vlan_rem_vid(struct net_device *netdev, u16 vid)
adapter->vlan_tag[vid] = 0; adapter->vlan_tag[vid] = 0;
vlan_group_set_device(adapter->vlan_grp, vid, NULL); vlan_group_set_device(adapter->vlan_grp, vid, NULL);
be_vids_config(netdev); be_vid_config(netdev);
} }
static void be_set_multicast_filter(struct net_device *netdev) static void be_set_multicast_filter(struct net_device *netdev)
...@@ -900,8 +880,11 @@ static void be_post_rx_frags(struct be_adapter *adapter) ...@@ -900,8 +880,11 @@ static void be_post_rx_frags(struct be_adapter *adapter)
page_info->last_page_user = true; page_info->last_page_user = true;
if (posted) { if (posted) {
be_rxq_notify(&adapter->ctrl, rxq->id, posted);
atomic_add(posted, &rxq->used); atomic_add(posted, &rxq->used);
be_rxq_notify(&adapter->ctrl, rxq->id, posted);
} else if (atomic_read(&rxq->used) == 0) {
/* Let be_worker replenish when memory is available */
adapter->rx_post_starved = true;
} }
return; return;
...@@ -1305,6 +1288,31 @@ int be_poll_tx(struct napi_struct *napi, int budget) ...@@ -1305,6 +1288,31 @@ int be_poll_tx(struct napi_struct *napi, int budget)
return 1; return 1;
} }
static void be_worker(struct work_struct *work)
{
struct be_adapter *adapter =
container_of(work, struct be_adapter, work.work);
int status;
/* Check link */
be_link_status_update(adapter);
/* Get Stats */
status = be_cmd_get_stats(&adapter->ctrl, &adapter->stats.cmd);
if (!status)
netdev_stats_update(adapter);
/* Set EQ delay */
be_rx_eqd_update(adapter);
if (adapter->rx_post_starved) {
adapter->rx_post_starved = false;
be_post_rx_frags(adapter);
}
schedule_delayed_work(&adapter->work, msecs_to_jiffies(1000));
}
static void be_msix_enable(struct be_adapter *adapter) static void be_msix_enable(struct be_adapter *adapter)
{ {
int i, status; int i, status;
...@@ -1422,6 +1430,8 @@ static int be_open(struct net_device *netdev) ...@@ -1422,6 +1430,8 @@ static int be_open(struct net_device *netdev)
if (status != 0) if (status != 0)
goto do_none; goto do_none;
be_vid_config(netdev);
status = be_cmd_set_flow_control(ctrl, true, true); status = be_cmd_set_flow_control(ctrl, true, true);
if (status != 0) if (status != 0)
goto if_destroy; goto if_destroy;
...@@ -1856,8 +1866,6 @@ static int be_resume(struct pci_dev *pdev) ...@@ -1856,8 +1866,6 @@ static int be_resume(struct pci_dev *pdev)
pci_set_power_state(pdev, 0); pci_set_power_state(pdev, 0);
pci_restore_state(pdev); pci_restore_state(pdev);
be_vids_config(netdev);
if (netif_running(netdev)) { if (netif_running(netdev)) {
rtnl_lock(); rtnl_lock();
be_open(netdev); be_open(netdev);
......
...@@ -57,8 +57,8 @@ ...@@ -57,8 +57,8 @@
#define DRV_MODULE_NAME "bnx2" #define DRV_MODULE_NAME "bnx2"
#define PFX DRV_MODULE_NAME ": " #define PFX DRV_MODULE_NAME ": "
#define DRV_MODULE_VERSION "1.9.2" #define DRV_MODULE_VERSION "1.9.3"
#define DRV_MODULE_RELDATE "Feb 11, 2009" #define DRV_MODULE_RELDATE "March 17, 2009"
#define RUN_AT(x) (jiffies + (x)) #define RUN_AT(x) (jiffies + (x))
...@@ -5843,9 +5843,6 @@ bnx2_enable_msix(struct bnx2 *bp, int msix_vecs) ...@@ -5843,9 +5843,6 @@ bnx2_enable_msix(struct bnx2 *bp, int msix_vecs)
for (i = 0; i < BNX2_MAX_MSIX_VEC; i++) { for (i = 0; i < BNX2_MAX_MSIX_VEC; i++) {
msix_ent[i].entry = i; msix_ent[i].entry = i;
msix_ent[i].vector = 0; msix_ent[i].vector = 0;
snprintf(bp->irq_tbl[i].name, len, "%s-%d", dev->name, i);
bp->irq_tbl[i].handler = bnx2_msi_1shot;
} }
rc = pci_enable_msix(bp->pdev, msix_ent, BNX2_MAX_MSIX_VEC); rc = pci_enable_msix(bp->pdev, msix_ent, BNX2_MAX_MSIX_VEC);
...@@ -5854,8 +5851,11 @@ bnx2_enable_msix(struct bnx2 *bp, int msix_vecs) ...@@ -5854,8 +5851,11 @@ bnx2_enable_msix(struct bnx2 *bp, int msix_vecs)
bp->irq_nvecs = msix_vecs; bp->irq_nvecs = msix_vecs;
bp->flags |= BNX2_FLAG_USING_MSIX | BNX2_FLAG_ONE_SHOT_MSI; bp->flags |= BNX2_FLAG_USING_MSIX | BNX2_FLAG_ONE_SHOT_MSI;
for (i = 0; i < BNX2_MAX_MSIX_VEC; i++) for (i = 0; i < BNX2_MAX_MSIX_VEC; i++) {
bp->irq_tbl[i].vector = msix_ent[i].vector; bp->irq_tbl[i].vector = msix_ent[i].vector;
snprintf(bp->irq_tbl[i].name, len, "%s-%d", dev->name, i);
bp->irq_tbl[i].handler = bnx2_msi_1shot;
}
} }
static void static void
......
...@@ -3537,11 +3537,26 @@ static int bond_slave_netdev_event(unsigned long event, struct net_device *slave ...@@ -3537,11 +3537,26 @@ static int bond_slave_netdev_event(unsigned long event, struct net_device *slave
} }
break; break;
case NETDEV_CHANGE: case NETDEV_CHANGE:
/* if (bond->params.mode == BOND_MODE_8023AD || bond_is_lb(bond)) {
* TODO: is this what we get if somebody struct slave *slave;
* sets up a hierarchical bond, then rmmod's
* one of the slave bonding devices? slave = bond_get_slave_by_dev(bond, slave_dev);
*/ if (slave) {
u16 old_speed = slave->speed;
u16 old_duplex = slave->duplex;
bond_update_speed_duplex(slave);
if (bond_is_lb(bond))
break;
if (old_speed != slave->speed)
bond_3ad_adapter_speed_changed(slave);
if (old_duplex != slave->duplex)
bond_3ad_adapter_duplex_changed(slave);
}
}
break; break;
case NETDEV_DOWN: case NETDEV_DOWN:
/* /*
......
...@@ -930,13 +930,15 @@ static irqreturn_t dm9000_interrupt(int irq, void *dev_id) ...@@ -930,13 +930,15 @@ static irqreturn_t dm9000_interrupt(int irq, void *dev_id)
struct net_device *dev = dev_id; struct net_device *dev = dev_id;
board_info_t *db = netdev_priv(dev); board_info_t *db = netdev_priv(dev);
int int_status; int int_status;
unsigned long flags;
u8 reg_save; u8 reg_save;
dm9000_dbg(db, 3, "entering %s\n", __func__); dm9000_dbg(db, 3, "entering %s\n", __func__);
/* A real interrupt coming */ /* A real interrupt coming */
spin_lock(&db->lock); /* holders of db->lock must always block IRQs */
spin_lock_irqsave(&db->lock, flags);
/* Save previous register address */ /* Save previous register address */
reg_save = readb(db->io_addr); reg_save = readb(db->io_addr);
...@@ -972,7 +974,7 @@ static irqreturn_t dm9000_interrupt(int irq, void *dev_id) ...@@ -972,7 +974,7 @@ static irqreturn_t dm9000_interrupt(int irq, void *dev_id)
/* Restore previous register address */ /* Restore previous register address */
writeb(reg_save, db->io_addr); writeb(reg_save, db->io_addr);
spin_unlock(&db->lock); spin_unlock_irqrestore(&db->lock, flags);
return IRQ_HANDLED; return IRQ_HANDLED;
} }
......
...@@ -280,11 +280,11 @@ static int dnet_mii_probe(struct net_device *dev) ...@@ -280,11 +280,11 @@ static int dnet_mii_probe(struct net_device *dev)
/* attach the mac to the phy */ /* attach the mac to the phy */
if (bp->capabilities & DNET_HAS_RMII) { if (bp->capabilities & DNET_HAS_RMII) {
phydev = phy_connect(dev, phydev->dev.bus_id, phydev = phy_connect(dev, dev_name(&phydev->dev),
&dnet_handle_link_change, 0, &dnet_handle_link_change, 0,
PHY_INTERFACE_MODE_RMII); PHY_INTERFACE_MODE_RMII);
} else { } else {
phydev = phy_connect(dev, phydev->dev.bus_id, phydev = phy_connect(dev, dev_name(&phydev->dev),
&dnet_handle_link_change, 0, &dnet_handle_link_change, 0,
PHY_INTERFACE_MODE_MII); PHY_INTERFACE_MODE_MII);
} }
...@@ -927,7 +927,7 @@ static int __devinit dnet_probe(struct platform_device *pdev) ...@@ -927,7 +927,7 @@ static int __devinit dnet_probe(struct platform_device *pdev)
phydev = bp->phy_dev; phydev = bp->phy_dev;
dev_info(&pdev->dev, "attached PHY driver [%s] " dev_info(&pdev->dev, "attached PHY driver [%s] "
"(mii_bus:phy_addr=%s, irq=%d)\n", "(mii_bus:phy_addr=%s, irq=%d)\n",
phydev->drv->name, phydev->dev.bus_id, phydev->irq); phydev->drv->name, dev_name(&phydev->dev), phydev->irq);
return 0; return 0;
......
...@@ -687,6 +687,7 @@ static irqreturn_t sh_eth_interrupt(int irq, void *netdev) ...@@ -687,6 +687,7 @@ static irqreturn_t sh_eth_interrupt(int irq, void *netdev)
{ {
struct net_device *ndev = netdev; struct net_device *ndev = netdev;
struct sh_eth_private *mdp = netdev_priv(ndev); struct sh_eth_private *mdp = netdev_priv(ndev);
irqreturn_t ret = IRQ_NONE;
u32 ioaddr, boguscnt = RX_RING_SIZE; u32 ioaddr, boguscnt = RX_RING_SIZE;
u32 intr_status = 0; u32 intr_status = 0;
...@@ -696,7 +697,13 @@ static irqreturn_t sh_eth_interrupt(int irq, void *netdev) ...@@ -696,7 +697,13 @@ static irqreturn_t sh_eth_interrupt(int irq, void *netdev)
/* Get interrpt stat */ /* Get interrpt stat */
intr_status = ctrl_inl(ioaddr + EESR); intr_status = ctrl_inl(ioaddr + EESR);
/* Clear interrupt */ /* Clear interrupt */
ctrl_outl(intr_status, ioaddr + EESR); if (intr_status & (EESR_FRC | EESR_RMAF | EESR_RRF |
EESR_RTLF | EESR_RTSF | EESR_PRE | EESR_CERF |
TX_CHECK | EESR_ERR_CHECK)) {
ctrl_outl(intr_status, ioaddr + EESR);
ret = IRQ_HANDLED;
} else
goto other_irq;
if (intr_status & (EESR_FRC | /* Frame recv*/ if (intr_status & (EESR_FRC | /* Frame recv*/
EESR_RMAF | /* Multi cast address recv*/ EESR_RMAF | /* Multi cast address recv*/
...@@ -723,9 +730,10 @@ static irqreturn_t sh_eth_interrupt(int irq, void *netdev) ...@@ -723,9 +730,10 @@ static irqreturn_t sh_eth_interrupt(int irq, void *netdev)
ndev->name, intr_status); ndev->name, intr_status);
} }
other_irq:
spin_unlock(&mdp->lock); spin_unlock(&mdp->lock);
return IRQ_HANDLED; return ret;
} }
static void sh_eth_timer(unsigned long data) static void sh_eth_timer(unsigned long data)
...@@ -844,7 +852,13 @@ static int sh_eth_open(struct net_device *ndev) ...@@ -844,7 +852,13 @@ static int sh_eth_open(struct net_device *ndev)
int ret = 0; int ret = 0;
struct sh_eth_private *mdp = netdev_priv(ndev); struct sh_eth_private *mdp = netdev_priv(ndev);
ret = request_irq(ndev->irq, &sh_eth_interrupt, 0, ndev->name, ndev); ret = request_irq(ndev->irq, &sh_eth_interrupt,
#if defined(CONFIG_CPU_SUBTYPE_SH7763) || defined(CONFIG_CPU_SUBTYPE_SH7764)
IRQF_SHARED,
#else
0,
#endif
ndev->name, ndev);
if (ret) { if (ret) {
printk(KERN_ERR "Can not assign IRQ number to %s\n", CARDNAME); printk(KERN_ERR "Can not assign IRQ number to %s\n", CARDNAME);
return ret; return ret;
......
...@@ -43,8 +43,8 @@ ...@@ -43,8 +43,8 @@
#define SH7763_SKB_ALIGN 32 #define SH7763_SKB_ALIGN 32
/* Chip Base Address */ /* Chip Base Address */
# define SH_TSU_ADDR 0xFFE01800 # define SH_TSU_ADDR 0xFEE01800
# define ARSTR 0xFFE01800 # define ARSTR SH_TSU_ADDR
/* Chip Registers */ /* Chip Registers */
/* E-DMAC */ /* E-DMAC */
......
...@@ -1225,6 +1225,10 @@ static int smsc911x_open(struct net_device *dev) ...@@ -1225,6 +1225,10 @@ static int smsc911x_open(struct net_device *dev)
dev_info(&dev->dev, "SMSC911x/921x identified at %#08lx, IRQ: %d\n", dev_info(&dev->dev, "SMSC911x/921x identified at %#08lx, IRQ: %d\n",
(unsigned long)pdata->ioaddr, dev->irq); (unsigned long)pdata->ioaddr, dev->irq);
/* Reset the last known duplex and carrier */
pdata->last_duplex = -1;
pdata->last_carrier = -1;
/* Bring the PHY up */ /* Bring the PHY up */
phy_start(pdata->phy_dev); phy_start(pdata->phy_dev);
......
...@@ -2998,8 +2998,11 @@ static const struct net_device_ops gem_netdev_ops = { ...@@ -2998,8 +2998,11 @@ static const struct net_device_ops gem_netdev_ops = {
.ndo_do_ioctl = gem_ioctl, .ndo_do_ioctl = gem_ioctl,
.ndo_tx_timeout = gem_tx_timeout, .ndo_tx_timeout = gem_tx_timeout,
.ndo_change_mtu = gem_change_mtu, .ndo_change_mtu = gem_change_mtu,
.ndo_set_mac_address = eth_mac_addr,
.ndo_validate_addr = eth_validate_addr, .ndo_validate_addr = eth_validate_addr,
.ndo_set_mac_address = gem_set_mac_address,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = gem_poll_controller,
#endif
}; };
static int __devinit gem_init_one(struct pci_dev *pdev, static int __devinit gem_init_one(struct pci_dev *pdev,
...@@ -3161,10 +3164,6 @@ static int __devinit gem_init_one(struct pci_dev *pdev, ...@@ -3161,10 +3164,6 @@ static int __devinit gem_init_one(struct pci_dev *pdev,
dev->watchdog_timeo = 5 * HZ; dev->watchdog_timeo = 5 * HZ;
dev->irq = pdev->irq; dev->irq = pdev->irq;
dev->dma = 0; dev->dma = 0;
dev->set_mac_address = gem_set_mac_address;
#ifdef CONFIG_NET_POLL_CONTROLLER
dev->poll_controller = gem_poll_controller;
#endif
/* Set that now, in case PM kicks in now */ /* Set that now, in case PM kicks in now */
pci_set_drvdata(pdev, dev); pci_set_drvdata(pdev, dev);
......
...@@ -255,6 +255,7 @@ const char tulip_media_cap[32] = ...@@ -255,6 +255,7 @@ const char tulip_media_cap[32] =
static void tulip_tx_timeout(struct net_device *dev); static void tulip_tx_timeout(struct net_device *dev);
static void tulip_init_ring(struct net_device *dev); static void tulip_init_ring(struct net_device *dev);
static void tulip_free_ring(struct net_device *dev);
static int tulip_start_xmit(struct sk_buff *skb, struct net_device *dev); static int tulip_start_xmit(struct sk_buff *skb, struct net_device *dev);
static int tulip_open(struct net_device *dev); static int tulip_open(struct net_device *dev);
static int tulip_close(struct net_device *dev); static int tulip_close(struct net_device *dev);
...@@ -502,16 +503,21 @@ tulip_open(struct net_device *dev) ...@@ -502,16 +503,21 @@ tulip_open(struct net_device *dev)
{ {
int retval; int retval;
if ((retval = request_irq(dev->irq, &tulip_interrupt, IRQF_SHARED, dev->name, dev)))
return retval;
tulip_init_ring (dev); tulip_init_ring (dev);
retval = request_irq(dev->irq, &tulip_interrupt, IRQF_SHARED, dev->name, dev);
if (retval)
goto free_ring;
tulip_up (dev); tulip_up (dev);
netif_start_queue (dev); netif_start_queue (dev);
return 0; return 0;
free_ring:
tulip_free_ring (dev);
return retval;
} }
...@@ -768,23 +774,11 @@ static void tulip_down (struct net_device *dev) ...@@ -768,23 +774,11 @@ static void tulip_down (struct net_device *dev)
tulip_set_power_state (tp, 0, 1); tulip_set_power_state (tp, 0, 1);
} }
static void tulip_free_ring (struct net_device *dev)
static int tulip_close (struct net_device *dev)
{ {
struct tulip_private *tp = netdev_priv(dev); struct tulip_private *tp = netdev_priv(dev);
void __iomem *ioaddr = tp->base_addr;
int i; int i;
netif_stop_queue (dev);
tulip_down (dev);
if (tulip_debug > 1)
printk (KERN_DEBUG "%s: Shutting down ethercard, status was %2.2x.\n",
dev->name, ioread32 (ioaddr + CSR5));
free_irq (dev->irq, dev);
/* Free all the skbuffs in the Rx queue. */ /* Free all the skbuffs in the Rx queue. */
for (i = 0; i < RX_RING_SIZE; i++) { for (i = 0; i < RX_RING_SIZE; i++) {
struct sk_buff *skb = tp->rx_buffers[i].skb; struct sk_buff *skb = tp->rx_buffers[i].skb;
...@@ -803,6 +797,7 @@ static int tulip_close (struct net_device *dev) ...@@ -803,6 +797,7 @@ static int tulip_close (struct net_device *dev)
dev_kfree_skb (skb); dev_kfree_skb (skb);
} }
} }
for (i = 0; i < TX_RING_SIZE; i++) { for (i = 0; i < TX_RING_SIZE; i++) {
struct sk_buff *skb = tp->tx_buffers[i].skb; struct sk_buff *skb = tp->tx_buffers[i].skb;
...@@ -814,6 +809,24 @@ static int tulip_close (struct net_device *dev) ...@@ -814,6 +809,24 @@ static int tulip_close (struct net_device *dev)
tp->tx_buffers[i].skb = NULL; tp->tx_buffers[i].skb = NULL;
tp->tx_buffers[i].mapping = 0; tp->tx_buffers[i].mapping = 0;
} }
}
static int tulip_close (struct net_device *dev)
{
struct tulip_private *tp = netdev_priv(dev);
void __iomem *ioaddr = tp->base_addr;
netif_stop_queue (dev);
tulip_down (dev);
if (tulip_debug > 1)
printk (KERN_DEBUG "%s: Shutting down ethercard, status was %2.2x.\n",
dev->name, ioread32 (ioaddr + CSR5));
free_irq (dev->irq, dev);
tulip_free_ring (dev);
return 0; return 0;
} }
......
...@@ -1536,32 +1536,15 @@ static void adjust_link(struct net_device *dev) ...@@ -1536,32 +1536,15 @@ static void adjust_link(struct net_device *dev)
static int init_phy(struct net_device *dev) static int init_phy(struct net_device *dev)
{ {
struct ucc_geth_private *priv = netdev_priv(dev); struct ucc_geth_private *priv = netdev_priv(dev);
struct device_node *np = priv->node; struct ucc_geth_info *ug_info = priv->ug_info;
struct device_node *phy, *mdio;
const phandle *ph;
char bus_name[MII_BUS_ID_SIZE];
const unsigned int *id;
struct phy_device *phydev; struct phy_device *phydev;
char phy_id[BUS_ID_SIZE];
priv->oldlink = 0; priv->oldlink = 0;
priv->oldspeed = 0; priv->oldspeed = 0;
priv->oldduplex = -1; priv->oldduplex = -1;
ph = of_get_property(np, "phy-handle", NULL); phydev = phy_connect(dev, ug_info->phy_bus_id, &adjust_link, 0,
phy = of_find_node_by_phandle(*ph); priv->phy_interface);
mdio = of_get_parent(phy);
id = of_get_property(phy, "reg", NULL);
of_node_put(phy);
of_node_put(mdio);
uec_mdio_bus_name(bus_name, mdio);
snprintf(phy_id, sizeof(phy_id), "%s:%02x",
bus_name, *id);
phydev = phy_connect(dev, phy_id, &adjust_link, 0, priv->phy_interface);
if (IS_ERR(phydev)) { if (IS_ERR(phydev)) {
printk("%s: Could not attach to PHY\n", dev->name); printk("%s: Could not attach to PHY\n", dev->name);
...@@ -3629,10 +3612,12 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma ...@@ -3629,10 +3612,12 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
ug_info->uf_info.irq = irq_of_parse_and_map(np, 0); ug_info->uf_info.irq = irq_of_parse_and_map(np, 0);
fixed_link = of_get_property(np, "fixed-link", NULL); fixed_link = of_get_property(np, "fixed-link", NULL);
if (fixed_link) { if (fixed_link) {
snprintf(ug_info->mdio_bus, MII_BUS_ID_SIZE, "0"); snprintf(ug_info->phy_bus_id, sizeof(ug_info->phy_bus_id),
ug_info->phy_address = fixed_link[0]; PHY_ID_FMT, "0", fixed_link[0]);
phy = NULL; phy = NULL;
} else { } else {
char bus_name[MII_BUS_ID_SIZE];
ph = of_get_property(np, "phy-handle", NULL); ph = of_get_property(np, "phy-handle", NULL);
phy = of_find_node_by_phandle(*ph); phy = of_find_node_by_phandle(*ph);
...@@ -3643,7 +3628,6 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma ...@@ -3643,7 +3628,6 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
prop = of_get_property(phy, "reg", NULL); prop = of_get_property(phy, "reg", NULL);
if (prop == NULL) if (prop == NULL)
return -1; return -1;
ug_info->phy_address = *prop;
/* Set the bus id */ /* Set the bus id */
mdio = of_get_parent(phy); mdio = of_get_parent(phy);
...@@ -3657,7 +3641,9 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma ...@@ -3657,7 +3641,9 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
if (err) if (err)
return -1; return -1;
snprintf(ug_info->mdio_bus, MII_BUS_ID_SIZE, "%x", res.start); uec_mdio_bus_name(bus_name, mdio);
snprintf(ug_info->phy_bus_id, sizeof(ug_info->phy_bus_id),
"%s:%02x", bus_name, *prop);
} }
/* get the phy interface type, or default to MII */ /* get the phy interface type, or default to MII */
......
...@@ -1091,8 +1091,7 @@ struct ucc_geth_info { ...@@ -1091,8 +1091,7 @@ struct ucc_geth_info {
u32 eventRegMask; u32 eventRegMask;
u16 pausePeriod; u16 pausePeriod;
u16 extensionField; u16 extensionField;
u8 phy_address; char phy_bus_id[BUS_ID_SIZE];
char mdio_bus[MII_BUS_ID_SIZE];
u8 weightfactor[NUM_TX_QUEUES]; u8 weightfactor[NUM_TX_QUEUES];
u8 interruptcoalescingmaxvalue[NUM_RX_QUEUES]; u8 interruptcoalescingmaxvalue[NUM_RX_QUEUES];
u8 l2qt[UCC_GETH_VLAN_PRIORITY_MAX]; u8 l2qt[UCC_GETH_VLAN_PRIORITY_MAX];
......
...@@ -612,6 +612,7 @@ static struct ethtool_ops virtnet_ethtool_ops = { ...@@ -612,6 +612,7 @@ static struct ethtool_ops virtnet_ethtool_ops = {
.set_tx_csum = virtnet_set_tx_csum, .set_tx_csum = virtnet_set_tx_csum,
.set_sg = ethtool_op_set_sg, .set_sg = ethtool_op_set_sg,
.set_tso = ethtool_op_set_tso, .set_tso = ethtool_op_set_tso,
.get_link = ethtool_op_get_link,
}; };
#define MIN_MTU 68 #define MIN_MTU 68
...@@ -739,6 +740,8 @@ static int virtnet_probe(struct virtio_device *vdev) ...@@ -739,6 +740,8 @@ static int virtnet_probe(struct virtio_device *vdev)
goto unregister; goto unregister;
} }
netif_carrier_on(dev);
pr_debug("virtnet: registered device %s\n", dev->name); pr_debug("virtnet: registered device %s\n", dev->name);
return 0; return 0;
......
...@@ -587,8 +587,8 @@ struct ath9k_country_entry { ...@@ -587,8 +587,8 @@ struct ath9k_country_entry {
u8 iso[3]; u8 iso[3];
}; };
#define REG_WRITE(_ah, _reg, _val) iowrite32(_val, _ah->ah_sh + _reg) #define REG_WRITE(_ah, _reg, _val) ath9k_iowrite32((_ah), (_reg), (_val))
#define REG_READ(_ah, _reg) ioread32(_ah->ah_sh + _reg) #define REG_READ(_ah, _reg) ath9k_ioread32((_ah), (_reg))
#define SM(_v, _f) (((_v) << _f##_S) & _f) #define SM(_v, _f) (((_v) << _f##_S) & _f)
#define MS(_v, _f) (((_v) & _f) >> _f##_S) #define MS(_v, _f) (((_v) & _f) >> _f##_S)
......
此差异已折叠。
此差异已折叠。
...@@ -1336,6 +1336,7 @@ static int ath_init(u16 devid, struct ath_softc *sc) ...@@ -1336,6 +1336,7 @@ static int ath_init(u16 devid, struct ath_softc *sc)
printk(KERN_ERR "Unable to create debugfs files\n"); printk(KERN_ERR "Unable to create debugfs files\n");
spin_lock_init(&sc->sc_resetlock); spin_lock_init(&sc->sc_resetlock);
spin_lock_init(&sc->sc_serial_rw);
mutex_init(&sc->mutex); mutex_init(&sc->mutex);
tasklet_init(&sc->intr_tq, ath9k_tasklet, (unsigned long)sc); tasklet_init(&sc->intr_tq, ath9k_tasklet, (unsigned long)sc);
tasklet_init(&sc->bcon_tasklet, ath9k_beacon_tasklet, tasklet_init(&sc->bcon_tasklet, ath9k_beacon_tasklet,
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册