Merge branch 'master' of /home/trondmy/kernel/linux-2.6/
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#define LINUX_ATMDEV_H
|
||||
|
||||
|
||||
#include <linux/device.h>
|
||||
#include <linux/atmapi.h>
|
||||
#include <linux/atm.h>
|
||||
#include <linux/atmioc.h>
|
||||
@@ -358,6 +359,7 @@ struct atm_dev {
|
||||
struct proc_dir_entry *proc_entry; /* proc entry */
|
||||
char *proc_name; /* proc entry name */
|
||||
#endif
|
||||
struct class_device class_dev; /* sysfs class device */
|
||||
struct list_head dev_list; /* linkage */
|
||||
};
|
||||
|
||||
@@ -459,7 +461,7 @@ static inline void atm_dev_put(struct atm_dev *dev)
|
||||
BUG_ON(!test_bit(ATM_DF_REMOVED, &dev->flags));
|
||||
if (dev->ops->dev_close)
|
||||
dev->ops->dev_close(dev);
|
||||
kfree(dev);
|
||||
class_device_put(&dev->class_dev);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+20
-5
@@ -122,10 +122,17 @@
|
||||
/* Rule structure sizes -- if these change, different AUDIT_ADD and
|
||||
* AUDIT_LIST commands must be implemented. */
|
||||
#define AUDIT_MAX_FIELDS 64
|
||||
#define AUDIT_MAX_KEY_LEN 32
|
||||
#define AUDIT_BITMASK_SIZE 64
|
||||
#define AUDIT_WORD(nr) ((__u32)((nr)/32))
|
||||
#define AUDIT_BIT(nr) (1 << ((nr) - AUDIT_WORD(nr)*32))
|
||||
|
||||
#define AUDIT_SYSCALL_CLASSES 16
|
||||
#define AUDIT_CLASS_DIR_WRITE 0
|
||||
#define AUDIT_CLASS_DIR_WRITE_32 1
|
||||
#define AUDIT_CLASS_CHATTR 2
|
||||
#define AUDIT_CLASS_CHATTR_32 3
|
||||
|
||||
/* This bitmask is used to validate user input. It represents all bits that
|
||||
* are currently used in an audit field constant understood by the kernel.
|
||||
* If you are adding a new #define AUDIT_<whatever>, please ensure that
|
||||
@@ -150,12 +157,17 @@
|
||||
#define AUDIT_PERS 10
|
||||
#define AUDIT_ARCH 11
|
||||
#define AUDIT_MSGTYPE 12
|
||||
#define AUDIT_SE_USER 13 /* security label user */
|
||||
#define AUDIT_SE_ROLE 14 /* security label role */
|
||||
#define AUDIT_SE_TYPE 15 /* security label type */
|
||||
#define AUDIT_SE_SEN 16 /* security label sensitivity label */
|
||||
#define AUDIT_SE_CLR 17 /* security label clearance label */
|
||||
#define AUDIT_SUBJ_USER 13 /* security label user */
|
||||
#define AUDIT_SUBJ_ROLE 14 /* security label role */
|
||||
#define AUDIT_SUBJ_TYPE 15 /* security label type */
|
||||
#define AUDIT_SUBJ_SEN 16 /* security label sensitivity label */
|
||||
#define AUDIT_SUBJ_CLR 17 /* security label clearance label */
|
||||
#define AUDIT_PPID 18
|
||||
#define AUDIT_OBJ_USER 19
|
||||
#define AUDIT_OBJ_ROLE 20
|
||||
#define AUDIT_OBJ_TYPE 21
|
||||
#define AUDIT_OBJ_LEV_LOW 22
|
||||
#define AUDIT_OBJ_LEV_HIGH 23
|
||||
|
||||
/* These are ONLY useful when checking
|
||||
* at syscall exit time (AUDIT_AT_EXIT). */
|
||||
@@ -171,6 +183,8 @@
|
||||
#define AUDIT_ARG2 (AUDIT_ARG0+2)
|
||||
#define AUDIT_ARG3 (AUDIT_ARG0+3)
|
||||
|
||||
#define AUDIT_FILTERKEY 210
|
||||
|
||||
#define AUDIT_NEGATE 0x80000000
|
||||
|
||||
/* These are the supported operators.
|
||||
@@ -299,6 +313,7 @@ struct mqstat;
|
||||
#define AUDITSC_SUCCESS 1
|
||||
#define AUDITSC_FAILURE 2
|
||||
#define AUDITSC_RESULT(x) ( ((long)(x))<0?AUDITSC_FAILURE:AUDITSC_SUCCESS )
|
||||
extern int __init audit_register_class(int class, unsigned *list);
|
||||
#ifdef CONFIG_AUDITSYSCALL
|
||||
/* These are defined in auditsc.c */
|
||||
/* Public API */
|
||||
|
||||
@@ -567,11 +567,6 @@ COMPATIBLE_IOCTL(AUTOFS_IOC_PROTOSUBVER)
|
||||
COMPATIBLE_IOCTL(AUTOFS_IOC_ASKREGHOST)
|
||||
COMPATIBLE_IOCTL(AUTOFS_IOC_TOGGLEREGHOST)
|
||||
COMPATIBLE_IOCTL(AUTOFS_IOC_ASKUMOUNT)
|
||||
/* DEVFS */
|
||||
COMPATIBLE_IOCTL(DEVFSDIOC_GET_PROTO_REV)
|
||||
COMPATIBLE_IOCTL(DEVFSDIOC_SET_EVENT_MASK)
|
||||
COMPATIBLE_IOCTL(DEVFSDIOC_RELEASE_EVENT_QUEUE)
|
||||
COMPATIBLE_IOCTL(DEVFSDIOC_SET_DEBUG_MASK)
|
||||
/* Raw devices */
|
||||
COMPATIBLE_IOCTL(RAW_SETBIND)
|
||||
COMPATIBLE_IOCTL(RAW_GETBIND)
|
||||
|
||||
+3
-3
@@ -87,9 +87,9 @@ int cpu_down(unsigned int cpu);
|
||||
#define lock_cpu_hotplug() do { } while (0)
|
||||
#define unlock_cpu_hotplug() do { } while (0)
|
||||
#define lock_cpu_hotplug_interruptible() 0
|
||||
#define hotcpu_notifier(fn, pri)
|
||||
#define register_hotcpu_notifier(nb)
|
||||
#define unregister_hotcpu_notifier(nb)
|
||||
#define hotcpu_notifier(fn, pri) do { } while (0)
|
||||
#define register_hotcpu_notifier(nb) do { } while (0)
|
||||
#define unregister_hotcpu_notifier(nb) do { } while (0)
|
||||
|
||||
/* CPUs don't go offline once they're online w/o CONFIG_HOTPLUG_CPU */
|
||||
static inline int cpu_is_offline(int cpu) { return 0; }
|
||||
|
||||
@@ -100,8 +100,10 @@ struct cpufreq_policy {
|
||||
#define CPUFREQ_INCOMPATIBLE (1)
|
||||
#define CPUFREQ_NOTIFY (2)
|
||||
|
||||
#define CPUFREQ_SHARED_TYPE_ALL (0) /* All dependent CPUs should set freq */
|
||||
#define CPUFREQ_SHARED_TYPE_ANY (1) /* Freq can be set from any dependent CPU */
|
||||
#define CPUFREQ_SHARED_TYPE_NONE (0) /* None */
|
||||
#define CPUFREQ_SHARED_TYPE_HW (1) /* HW does needed coordination */
|
||||
#define CPUFREQ_SHARED_TYPE_ALL (2) /* All dependent CPUs should set freq */
|
||||
#define CPUFREQ_SHARED_TYPE_ANY (3) /* Freq can be set from any dependent CPU*/
|
||||
|
||||
/******************** cpufreq transition notifiers *******************/
|
||||
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
#ifndef _LINUX_DEVFS_FS_H
|
||||
#define _LINUX_DEVFS_FS_H
|
||||
|
||||
#include <linux/ioctl.h>
|
||||
|
||||
#define DEVFSD_PROTOCOL_REVISION_KERNEL 5
|
||||
|
||||
#define DEVFSD_IOCTL_BASE 'd'
|
||||
|
||||
/* These are the various ioctls */
|
||||
#define DEVFSDIOC_GET_PROTO_REV _IOR(DEVFSD_IOCTL_BASE, 0, int)
|
||||
#define DEVFSDIOC_SET_EVENT_MASK _IOW(DEVFSD_IOCTL_BASE, 2, int)
|
||||
#define DEVFSDIOC_RELEASE_EVENT_QUEUE _IOW(DEVFSD_IOCTL_BASE, 3, int)
|
||||
#define DEVFSDIOC_SET_DEBUG_MASK _IOW(DEVFSD_IOCTL_BASE, 4, int)
|
||||
|
||||
#define DEVFSD_NOTIFY_REGISTERED 0
|
||||
#define DEVFSD_NOTIFY_UNREGISTERED 1
|
||||
#define DEVFSD_NOTIFY_ASYNC_OPEN 2
|
||||
#define DEVFSD_NOTIFY_CLOSE 3
|
||||
#define DEVFSD_NOTIFY_LOOKUP 4
|
||||
#define DEVFSD_NOTIFY_CHANGE 5
|
||||
#define DEVFSD_NOTIFY_CREATE 6
|
||||
#define DEVFSD_NOTIFY_DELETE 7
|
||||
|
||||
#define DEVFS_PATHLEN 1024 /* Never change this otherwise the
|
||||
binary interface will change */
|
||||
|
||||
struct devfsd_notify_struct { /* Use native C types to ensure same types in kernel and user space */
|
||||
unsigned int type; /* DEVFSD_NOTIFY_* value */
|
||||
unsigned int mode; /* Mode of the inode or device entry */
|
||||
unsigned int major; /* Major number of device entry */
|
||||
unsigned int minor; /* Minor number of device entry */
|
||||
unsigned int uid; /* Uid of process, inode or device entry */
|
||||
unsigned int gid; /* Gid of process, inode or device entry */
|
||||
unsigned int overrun_count; /* Number of lost events */
|
||||
unsigned int namelen; /* Number of characters not including '\0' */
|
||||
/* The device name MUST come last */
|
||||
char devname[DEVFS_PATHLEN]; /* This will be '\0' terminated */
|
||||
};
|
||||
|
||||
#endif /* _LINUX_DEVFS_FS_H */
|
||||
@@ -1,57 +0,0 @@
|
||||
#ifndef _LINUX_DEVFS_FS_KERNEL_H
|
||||
#define _LINUX_DEVFS_FS_KERNEL_H
|
||||
|
||||
#include <linux/fs.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
#include <asm/semaphore.h>
|
||||
|
||||
#define DEVFS_SUPER_MAGIC 0x1373
|
||||
|
||||
#ifdef CONFIG_DEVFS_FS
|
||||
extern int devfs_mk_bdev(dev_t dev, umode_t mode, const char *fmt, ...)
|
||||
__attribute__ ((format(printf, 3, 4)));
|
||||
extern int devfs_mk_cdev(dev_t dev, umode_t mode, const char *fmt, ...)
|
||||
__attribute__ ((format(printf, 3, 4)));
|
||||
extern int devfs_mk_symlink(const char *name, const char *link);
|
||||
extern int devfs_mk_dir(const char *fmt, ...)
|
||||
__attribute__ ((format(printf, 1, 2)));
|
||||
extern void devfs_remove(const char *fmt, ...)
|
||||
__attribute__ ((format(printf, 1, 2)));
|
||||
extern int devfs_register_tape(const char *name);
|
||||
extern void devfs_unregister_tape(int num);
|
||||
extern void mount_devfs_fs(void);
|
||||
#else /* CONFIG_DEVFS_FS */
|
||||
static inline int devfs_mk_bdev(dev_t dev, umode_t mode, const char *fmt, ...)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline int devfs_mk_cdev(dev_t dev, umode_t mode, const char *fmt, ...)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline int devfs_mk_symlink(const char *name, const char *link)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline int devfs_mk_dir(const char *fmt, ...)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline void devfs_remove(const char *fmt, ...)
|
||||
{
|
||||
}
|
||||
static inline int devfs_register_tape(const char *name)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
static inline void devfs_unregister_tape(int num)
|
||||
{
|
||||
}
|
||||
static inline void mount_devfs_fs(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endif /* CONFIG_DEVFS_FS */
|
||||
#endif /* _LINUX_DEVFS_FS_KERNEL_H */
|
||||
@@ -125,14 +125,14 @@ typedef struct fs_disk_quota {
|
||||
|
||||
/*
|
||||
* fs_quota_stat is the struct returned in Q_XGETQSTAT for a given file system.
|
||||
* Provides a centralized way to get meta infomation about the quota subsystem.
|
||||
* Provides a centralized way to get meta information about the quota subsystem.
|
||||
* eg. space taken up for user and group quotas, number of dquots currently
|
||||
* incore.
|
||||
*/
|
||||
#define FS_QSTAT_VERSION 1 /* fs_quota_stat.qs_version */
|
||||
|
||||
/*
|
||||
* Some basic infomation about 'quota files'.
|
||||
* Some basic information about 'quota files'.
|
||||
*/
|
||||
typedef struct fs_qfilestat {
|
||||
__u64 qfs_ino; /* inode number */
|
||||
|
||||
@@ -11,7 +11,12 @@
|
||||
#define EM_486 6 /* Perhaps disused */
|
||||
#define EM_860 7
|
||||
#define EM_MIPS 8 /* MIPS R3000 (officially, big-endian only) */
|
||||
/* Next two are historical and binaries and
|
||||
modules of these types will be rejected by
|
||||
Linux. */
|
||||
#define EM_MIPS_RS3_LE 10 /* MIPS R3000 little-endian */
|
||||
#define EM_MIPS_RS4_BE 10 /* MIPS R4000 big-endian */
|
||||
|
||||
#define EM_PARISC 15 /* HPPA */
|
||||
#define EM_SPARC32PLUS 18 /* Sun's "v8plus" */
|
||||
#define EM_PPC 20 /* PowerPC */
|
||||
|
||||
+3
-1
@@ -13,7 +13,9 @@
|
||||
* This should be a per-architecture thing, to allow different
|
||||
* error and pointer decisions.
|
||||
*/
|
||||
#define IS_ERR_VALUE(x) unlikely((x) > (unsigned long)-1000L)
|
||||
#define MAX_ERRNO 4095
|
||||
|
||||
#define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO)
|
||||
|
||||
static inline void *ERR_PTR(long error)
|
||||
{
|
||||
|
||||
+1
-2
@@ -380,7 +380,6 @@ struct fb_cursor {
|
||||
#include <linux/tty.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/devfs_fs_kernel.h>
|
||||
#include <linux/notifier.h>
|
||||
#include <linux/list.h>
|
||||
#include <asm/io.h>
|
||||
@@ -558,7 +557,7 @@ struct fb_pixmap {
|
||||
* Frame buffer operations
|
||||
*
|
||||
* LOCKING NOTE: those functions must _ALL_ be called with the console
|
||||
* semaphore held, this is the only suitable locking mecanism we have
|
||||
* semaphore held, this is the only suitable locking mechanism we have
|
||||
* in 2.6. Some may be called at interrupt time at this point though.
|
||||
*/
|
||||
|
||||
|
||||
@@ -112,8 +112,6 @@ struct gendisk {
|
||||
sector_t capacity;
|
||||
|
||||
int flags;
|
||||
char devfs_name[64]; /* devfs crap */
|
||||
int number; /* more of the same */
|
||||
struct device *driverfs_dev;
|
||||
struct kobject kobj;
|
||||
struct kobject *holder_dir;
|
||||
|
||||
@@ -552,7 +552,6 @@ typedef struct ide_drive_s {
|
||||
struct hd_driveid *id; /* drive model identification info */
|
||||
struct proc_dir_entry *proc; /* /proc/ide/ directory entry */
|
||||
struct ide_settings_s *settings;/* /proc/ide/ drive settings */
|
||||
char devfs_name[64]; /* devfs crap */
|
||||
|
||||
struct hwif_s *hwif; /* actually (ide_hwif_t *) */
|
||||
|
||||
|
||||
@@ -14,6 +14,55 @@
|
||||
#include <asm/ptrace.h>
|
||||
#include <asm/system.h>
|
||||
|
||||
/*
|
||||
* These correspond to the IORESOURCE_IRQ_* defines in
|
||||
* linux/ioport.h to select the interrupt line behaviour. When
|
||||
* requesting an interrupt without specifying a IRQF_TRIGGER, the
|
||||
* setting should be assumed to be "as already configured", which
|
||||
* may be as per machine or firmware initialisation.
|
||||
*/
|
||||
#define IRQF_TRIGGER_NONE 0x00000000
|
||||
#define IRQF_TRIGGER_RISING 0x00000001
|
||||
#define IRQF_TRIGGER_FALLING 0x00000002
|
||||
#define IRQF_TRIGGER_HIGH 0x00000004
|
||||
#define IRQF_TRIGGER_LOW 0x00000008
|
||||
#define IRQF_TRIGGER_MASK (IRQF_TRIGGER_HIGH | IRQF_TRIGGER_LOW | \
|
||||
IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING)
|
||||
#define IRQF_TRIGGER_PROBE 0x00000010
|
||||
|
||||
/*
|
||||
* These flags used only by the kernel as part of the
|
||||
* irq handling routines.
|
||||
*
|
||||
* IRQF_DISABLED - keep irqs disabled when calling the action handler
|
||||
* IRQF_SAMPLE_RANDOM - irq is used to feed the random generator
|
||||
* IRQF_SHARED - allow sharing the irq among several devices
|
||||
* IRQF_PROBE_SHARED - set by callers when they expect sharing mismatches to occur
|
||||
* IRQF_TIMER - Flag to mark this interrupt as timer interrupt
|
||||
*/
|
||||
#define IRQF_DISABLED 0x00000020
|
||||
#define IRQF_SAMPLE_RANDOM 0x00000040
|
||||
#define IRQF_SHARED 0x00000080
|
||||
#define IRQF_PROBE_SHARED 0x00000100
|
||||
#define IRQF_TIMER 0x00000200
|
||||
#define IRQF_PERCPU 0x00000400
|
||||
|
||||
/*
|
||||
* Migration helpers. Scheduled for removal in 1/2007
|
||||
* Do not use for new code !
|
||||
*/
|
||||
#define SA_INTERRUPT IRQF_DISABLED
|
||||
#define SA_SAMPLE_RANDOM IRQF_SAMPLE_RANDOM
|
||||
#define SA_SHIRQ IRQF_SHARED
|
||||
#define SA_PROBEIRQ IRQF_PROBE_SHARED
|
||||
#define SA_PERCPU IRQF_PERCPU
|
||||
|
||||
#define SA_TRIGGER_LOW IRQF_TRIGGER_LOW
|
||||
#define SA_TRIGGER_HIGH IRQF_TRIGGER_HIGH
|
||||
#define SA_TRIGGER_FALLING IRQF_TRIGGER_FALLING
|
||||
#define SA_TRIGGER_RISING IRQF_TRIGGER_RISING
|
||||
#define SA_TRIGGER_MASK IRQF_TRIGGER_MASK
|
||||
|
||||
struct irqaction {
|
||||
irqreturn_t (*handler)(int, void *, struct pt_regs *);
|
||||
unsigned long flags;
|
||||
@@ -36,6 +85,20 @@ extern void free_irq(unsigned int, void *);
|
||||
extern void disable_irq_nosync(unsigned int irq);
|
||||
extern void disable_irq(unsigned int irq);
|
||||
extern void enable_irq(unsigned int irq);
|
||||
|
||||
/* IRQ wakeup (PM) control: */
|
||||
extern int set_irq_wake(unsigned int irq, unsigned int on);
|
||||
|
||||
static inline int enable_irq_wake(unsigned int irq)
|
||||
{
|
||||
return set_irq_wake(irq, 1);
|
||||
}
|
||||
|
||||
static inline int disable_irq_wake(unsigned int irq)
|
||||
{
|
||||
return set_irq_wake(irq, 0);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef __ARCH_SET_SOFTIRQ_PENDING
|
||||
|
||||
+16
-11
@@ -9,13 +9,15 @@
|
||||
#define _LINUX_IOPORT_H
|
||||
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/types.h>
|
||||
/*
|
||||
* Resources are tree-like, allowing
|
||||
* nesting etc..
|
||||
*/
|
||||
struct resource {
|
||||
resource_size_t start;
|
||||
resource_size_t end;
|
||||
const char *name;
|
||||
unsigned long start, end;
|
||||
unsigned long flags;
|
||||
struct resource *parent, *sibling, *child;
|
||||
};
|
||||
@@ -96,14 +98,13 @@ extern struct resource * ____request_resource(struct resource *root, struct reso
|
||||
extern int release_resource(struct resource *new);
|
||||
extern __deprecated_for_modules int insert_resource(struct resource *parent, struct resource *new);
|
||||
extern int allocate_resource(struct resource *root, struct resource *new,
|
||||
unsigned long size,
|
||||
unsigned long min, unsigned long max,
|
||||
unsigned long align,
|
||||
resource_size_t size, resource_size_t min,
|
||||
resource_size_t max, resource_size_t align,
|
||||
void (*alignf)(void *, struct resource *,
|
||||
unsigned long, unsigned long),
|
||||
resource_size_t, resource_size_t),
|
||||
void *alignf_data);
|
||||
int adjust_resource(struct resource *res, unsigned long start,
|
||||
unsigned long size);
|
||||
int adjust_resource(struct resource *res, resource_size_t start,
|
||||
resource_size_t size);
|
||||
|
||||
/* get registered SYSTEM_RAM resources in specified area */
|
||||
extern int find_next_system_ram(struct resource *res);
|
||||
@@ -113,17 +114,21 @@ extern int find_next_system_ram(struct resource *res);
|
||||
#define request_mem_region(start,n,name) __request_region(&iomem_resource, (start), (n), (name))
|
||||
#define rename_region(region, newname) do { (region)->name = (newname); } while (0)
|
||||
|
||||
extern struct resource * __request_region(struct resource *, unsigned long start, unsigned long n, const char *name);
|
||||
extern struct resource * __request_region(struct resource *,
|
||||
resource_size_t start,
|
||||
resource_size_t n, const char *name);
|
||||
|
||||
/* Compatibility cruft */
|
||||
#define release_region(start,n) __release_region(&ioport_resource, (start), (n))
|
||||
#define check_mem_region(start,n) __check_region(&iomem_resource, (start), (n))
|
||||
#define release_mem_region(start,n) __release_region(&iomem_resource, (start), (n))
|
||||
|
||||
extern int __check_region(struct resource *, unsigned long, unsigned long);
|
||||
extern void __release_region(struct resource *, unsigned long, unsigned long);
|
||||
extern int __check_region(struct resource *, resource_size_t, resource_size_t);
|
||||
extern void __release_region(struct resource *, resource_size_t,
|
||||
resource_size_t);
|
||||
|
||||
static inline int __deprecated check_region(unsigned long s, unsigned long n)
|
||||
static inline int __deprecated check_region(resource_size_t s,
|
||||
resource_size_t n)
|
||||
{
|
||||
return __check_region(&ioport_resource, s, n);
|
||||
}
|
||||
|
||||
+288
-84
@@ -1,5 +1,5 @@
|
||||
#ifndef __irq_h
|
||||
#define __irq_h
|
||||
#ifndef _LINUX_IRQ_H
|
||||
#define _LINUX_IRQ_H
|
||||
|
||||
/*
|
||||
* Please do not include this file in generic code. There is currently
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include <linux/smp.h>
|
||||
|
||||
#if !defined(CONFIG_S390)
|
||||
#ifndef CONFIG_S390
|
||||
|
||||
#include <linux/linkage.h>
|
||||
#include <linux/cache.h>
|
||||
@@ -24,84 +24,172 @@
|
||||
|
||||
/*
|
||||
* IRQ line status.
|
||||
*
|
||||
* Bits 0-16 are reserved for the IRQF_* bits in linux/interrupt.h
|
||||
*
|
||||
* IRQ types
|
||||
*/
|
||||
#define IRQ_INPROGRESS 1 /* IRQ handler active - do not enter! */
|
||||
#define IRQ_DISABLED 2 /* IRQ disabled - do not enter! */
|
||||
#define IRQ_PENDING 4 /* IRQ pending - replay on enable */
|
||||
#define IRQ_REPLAY 8 /* IRQ has been replayed but not acked yet */
|
||||
#define IRQ_AUTODETECT 16 /* IRQ is being autodetected */
|
||||
#define IRQ_WAITING 32 /* IRQ not yet seen - for autodetection */
|
||||
#define IRQ_LEVEL 64 /* IRQ level triggered */
|
||||
#define IRQ_MASKED 128 /* IRQ masked - shouldn't be seen again */
|
||||
#if defined(ARCH_HAS_IRQ_PER_CPU)
|
||||
# define IRQ_PER_CPU 256 /* IRQ is per CPU */
|
||||
#define IRQ_TYPE_NONE 0x00000000 /* Default, unspecified type */
|
||||
#define IRQ_TYPE_EDGE_RISING 0x00000001 /* Edge rising type */
|
||||
#define IRQ_TYPE_EDGE_FALLING 0x00000002 /* Edge falling type */
|
||||
#define IRQ_TYPE_EDGE_BOTH (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING)
|
||||
#define IRQ_TYPE_LEVEL_HIGH 0x00000004 /* Level high type */
|
||||
#define IRQ_TYPE_LEVEL_LOW 0x00000008 /* Level low type */
|
||||
#define IRQ_TYPE_SENSE_MASK 0x0000000f /* Mask of the above */
|
||||
#define IRQ_TYPE_PROBE 0x00000010 /* Probing in progress */
|
||||
|
||||
/* Internal flags */
|
||||
#define IRQ_INPROGRESS 0x00010000 /* IRQ handler active - do not enter! */
|
||||
#define IRQ_DISABLED 0x00020000 /* IRQ disabled - do not enter! */
|
||||
#define IRQ_PENDING 0x00040000 /* IRQ pending - replay on enable */
|
||||
#define IRQ_REPLAY 0x00080000 /* IRQ has been replayed but not acked yet */
|
||||
#define IRQ_AUTODETECT 0x00100000 /* IRQ is being autodetected */
|
||||
#define IRQ_WAITING 0x00200000 /* IRQ not yet seen - for autodetection */
|
||||
#define IRQ_LEVEL 0x00400000 /* IRQ level triggered */
|
||||
#define IRQ_MASKED 0x00800000 /* IRQ masked - shouldn't be seen again */
|
||||
#ifdef CONFIG_IRQ_PER_CPU
|
||||
# define IRQ_PER_CPU 0x01000000 /* IRQ is per CPU */
|
||||
# define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU)
|
||||
#else
|
||||
# define CHECK_IRQ_PER_CPU(var) 0
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Interrupt controller descriptor. This is all we need
|
||||
* to describe about the low-level hardware.
|
||||
#define IRQ_NOPROBE 0x02000000 /* IRQ is not valid for probing */
|
||||
#define IRQ_NOREQUEST 0x04000000 /* IRQ cannot be requested */
|
||||
#define IRQ_NOAUTOEN 0x08000000 /* IRQ will not be enabled on request irq */
|
||||
#define IRQ_DELAYED_DISABLE 0x10000000 /* IRQ disable (masking) happens delayed. */
|
||||
|
||||
struct proc_dir_entry;
|
||||
|
||||
/**
|
||||
* struct irq_chip - hardware interrupt chip descriptor
|
||||
*
|
||||
* @name: name for /proc/interrupts
|
||||
* @startup: start up the interrupt (defaults to ->enable if NULL)
|
||||
* @shutdown: shut down the interrupt (defaults to ->disable if NULL)
|
||||
* @enable: enable the interrupt (defaults to chip->unmask if NULL)
|
||||
* @disable: disable the interrupt (defaults to chip->mask if NULL)
|
||||
* @ack: start of a new interrupt
|
||||
* @mask: mask an interrupt source
|
||||
* @mask_ack: ack and mask an interrupt source
|
||||
* @unmask: unmask an interrupt source
|
||||
* @eoi: end of interrupt - chip level
|
||||
* @end: end of interrupt - flow level
|
||||
* @set_affinity: set the CPU affinity on SMP machines
|
||||
* @retrigger: resend an IRQ to the CPU
|
||||
* @set_type: set the flow type (IRQ_TYPE_LEVEL/etc.) of an IRQ
|
||||
* @set_wake: enable/disable power-management wake-on of an IRQ
|
||||
*
|
||||
* @release: release function solely used by UML
|
||||
* @typename: obsoleted by name, kept as migration helper
|
||||
*/
|
||||
struct hw_interrupt_type {
|
||||
const char * typename;
|
||||
unsigned int (*startup)(unsigned int irq);
|
||||
void (*shutdown)(unsigned int irq);
|
||||
void (*enable)(unsigned int irq);
|
||||
void (*disable)(unsigned int irq);
|
||||
void (*ack)(unsigned int irq);
|
||||
void (*end)(unsigned int irq);
|
||||
void (*set_affinity)(unsigned int irq, cpumask_t dest);
|
||||
struct irq_chip {
|
||||
const char *name;
|
||||
unsigned int (*startup)(unsigned int irq);
|
||||
void (*shutdown)(unsigned int irq);
|
||||
void (*enable)(unsigned int irq);
|
||||
void (*disable)(unsigned int irq);
|
||||
|
||||
void (*ack)(unsigned int irq);
|
||||
void (*mask)(unsigned int irq);
|
||||
void (*mask_ack)(unsigned int irq);
|
||||
void (*unmask)(unsigned int irq);
|
||||
void (*eoi)(unsigned int irq);
|
||||
|
||||
void (*end)(unsigned int irq);
|
||||
void (*set_affinity)(unsigned int irq, cpumask_t dest);
|
||||
int (*retrigger)(unsigned int irq);
|
||||
int (*set_type)(unsigned int irq, unsigned int flow_type);
|
||||
int (*set_wake)(unsigned int irq, unsigned int on);
|
||||
|
||||
/* Currently used only by UML, might disappear one day.*/
|
||||
#ifdef CONFIG_IRQ_RELEASE_METHOD
|
||||
void (*release)(unsigned int irq, void *dev_id);
|
||||
void (*release)(unsigned int irq, void *dev_id);
|
||||
#endif
|
||||
/*
|
||||
* For compatibility, ->typename is copied into ->name.
|
||||
* Will disappear.
|
||||
*/
|
||||
const char *typename;
|
||||
};
|
||||
|
||||
typedef struct hw_interrupt_type hw_irq_controller;
|
||||
|
||||
/*
|
||||
* This is the "IRQ descriptor", which contains various information
|
||||
* about the irq, including what kind of hardware handling it has,
|
||||
* whether it is disabled etc etc.
|
||||
/**
|
||||
* struct irq_desc - interrupt descriptor
|
||||
*
|
||||
* @handle_irq: highlevel irq-events handler [if NULL, __do_IRQ()]
|
||||
* @chip: low level interrupt hardware access
|
||||
* @handler_data: per-IRQ data for the irq_chip methods
|
||||
* @chip_data: platform-specific per-chip private data for the chip
|
||||
* methods, to allow shared chip implementations
|
||||
* @action: the irq action chain
|
||||
* @status: status information
|
||||
* @depth: disable-depth, for nested irq_disable() calls
|
||||
* @irq_count: stats field to detect stalled irqs
|
||||
* @irqs_unhandled: stats field for spurious unhandled interrupts
|
||||
* @lock: locking for SMP
|
||||
* @affinity: IRQ affinity on SMP
|
||||
* @cpu: cpu index useful for balancing
|
||||
* @pending_mask: pending rebalanced interrupts
|
||||
* @move_irq: need to re-target IRQ destination
|
||||
* @dir: /proc/irq/ procfs entry
|
||||
* @affinity_entry: /proc/irq/smp_affinity procfs entry on SMP
|
||||
*
|
||||
* Pad this out to 32 bytes for cache and indexing reasons.
|
||||
*/
|
||||
typedef struct irq_desc {
|
||||
hw_irq_controller *handler;
|
||||
void *handler_data;
|
||||
struct irqaction *action; /* IRQ action list */
|
||||
unsigned int status; /* IRQ status */
|
||||
unsigned int depth; /* nested irq disables */
|
||||
unsigned int irq_count; /* For detecting broken interrupts */
|
||||
unsigned int irqs_unhandled;
|
||||
spinlock_t lock;
|
||||
#if defined (CONFIG_GENERIC_PENDING_IRQ) || defined (CONFIG_IRQBALANCE)
|
||||
unsigned int move_irq; /* Flag need to re-target intr dest*/
|
||||
struct irq_desc {
|
||||
void fastcall (*handle_irq)(unsigned int irq,
|
||||
struct irq_desc *desc,
|
||||
struct pt_regs *regs);
|
||||
struct irq_chip *chip;
|
||||
void *handler_data;
|
||||
void *chip_data;
|
||||
struct irqaction *action; /* IRQ action list */
|
||||
unsigned int status; /* IRQ status */
|
||||
|
||||
unsigned int depth; /* nested irq disables */
|
||||
unsigned int irq_count; /* For detecting broken IRQs */
|
||||
unsigned int irqs_unhandled;
|
||||
spinlock_t lock;
|
||||
#ifdef CONFIG_SMP
|
||||
cpumask_t affinity;
|
||||
unsigned int cpu;
|
||||
#endif
|
||||
} ____cacheline_aligned irq_desc_t;
|
||||
#if defined(CONFIG_GENERIC_PENDING_IRQ) || defined(CONFIG_IRQBALANCE)
|
||||
cpumask_t pending_mask;
|
||||
unsigned int move_irq; /* need to re-target IRQ dest */
|
||||
#endif
|
||||
#ifdef CONFIG_PROC_FS
|
||||
struct proc_dir_entry *dir;
|
||||
#endif
|
||||
} ____cacheline_aligned;
|
||||
|
||||
extern irq_desc_t irq_desc [NR_IRQS];
|
||||
extern struct irq_desc irq_desc[NR_IRQS];
|
||||
|
||||
/* Return a pointer to the irq descriptor for IRQ. */
|
||||
static inline irq_desc_t *
|
||||
irq_descp (int irq)
|
||||
{
|
||||
return irq_desc + irq;
|
||||
}
|
||||
/*
|
||||
* Migration helpers for obsolete names, they will go away:
|
||||
*/
|
||||
#define hw_interrupt_type irq_chip
|
||||
typedef struct irq_chip hw_irq_controller;
|
||||
#define no_irq_type no_irq_chip
|
||||
typedef struct irq_desc irq_desc_t;
|
||||
|
||||
#include <asm/hw_irq.h> /* the arch dependent stuff */
|
||||
/*
|
||||
* Pick up the arch-dependent methods:
|
||||
*/
|
||||
#include <asm/hw_irq.h>
|
||||
|
||||
extern int setup_irq(unsigned int irq, struct irqaction * new);
|
||||
extern int setup_irq(unsigned int irq, struct irqaction *new);
|
||||
|
||||
#ifdef CONFIG_GENERIC_HARDIRQS
|
||||
extern cpumask_t irq_affinity[NR_IRQS];
|
||||
|
||||
#ifndef handle_dynamic_tick
|
||||
# define handle_dynamic_tick(a) do { } while (0)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
static inline void set_native_irq_info(int irq, cpumask_t mask)
|
||||
{
|
||||
irq_affinity[irq] = mask;
|
||||
irq_desc[irq].affinity = mask;
|
||||
}
|
||||
#else
|
||||
static inline void set_native_irq_info(int irq, cpumask_t mask)
|
||||
@@ -111,8 +199,7 @@ static inline void set_native_irq_info(int irq, cpumask_t mask)
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
|
||||
#if defined (CONFIG_GENERIC_PENDING_IRQ) || defined (CONFIG_IRQBALANCE)
|
||||
extern cpumask_t pending_irq_cpumask[NR_IRQS];
|
||||
#if defined(CONFIG_GENERIC_PENDING_IRQ) || defined(CONFIG_IRQBALANCE)
|
||||
|
||||
void set_pending_irq(unsigned int irq, cpumask_t mask);
|
||||
void move_native_irq(int irq);
|
||||
@@ -133,7 +220,7 @@ static inline void set_irq_info(int irq, cpumask_t mask)
|
||||
{
|
||||
}
|
||||
|
||||
#else // CONFIG_PCI_MSI
|
||||
#else /* CONFIG_PCI_MSI */
|
||||
|
||||
static inline void move_irq(int irq)
|
||||
{
|
||||
@@ -144,26 +231,36 @@ static inline void set_irq_info(int irq, cpumask_t mask)
|
||||
{
|
||||
set_native_irq_info(irq, mask);
|
||||
}
|
||||
#endif // CONFIG_PCI_MSI
|
||||
|
||||
#else // CONFIG_GENERIC_PENDING_IRQ || CONFIG_IRQBALANCE
|
||||
#endif /* CONFIG_PCI_MSI */
|
||||
|
||||
#else /* CONFIG_GENERIC_PENDING_IRQ || CONFIG_IRQBALANCE */
|
||||
|
||||
static inline void move_irq(int irq)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void move_native_irq(int irq)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void set_pending_irq(unsigned int irq, cpumask_t mask)
|
||||
{
|
||||
}
|
||||
|
||||
#define move_irq(x)
|
||||
#define move_native_irq(x)
|
||||
#define set_pending_irq(x,y)
|
||||
static inline void set_irq_info(int irq, cpumask_t mask)
|
||||
{
|
||||
set_native_irq_info(irq, mask);
|
||||
}
|
||||
|
||||
#endif // CONFIG_GENERIC_PENDING_IRQ
|
||||
#endif /* CONFIG_GENERIC_PENDING_IRQ */
|
||||
|
||||
#else // CONFIG_SMP
|
||||
#else /* CONFIG_SMP */
|
||||
|
||||
#define move_irq(x)
|
||||
#define move_native_irq(x)
|
||||
|
||||
#endif // CONFIG_SMP
|
||||
#endif /* CONFIG_SMP */
|
||||
|
||||
#ifdef CONFIG_IRQBALANCE
|
||||
extern void set_balance_irq_affinity(unsigned int irq, cpumask_t mask);
|
||||
@@ -173,32 +270,139 @@ static inline void set_balance_irq_affinity(unsigned int irq, cpumask_t mask)
|
||||
}
|
||||
#endif
|
||||
|
||||
extern int no_irq_affinity;
|
||||
extern int noirqdebug_setup(char *str);
|
||||
|
||||
extern fastcall irqreturn_t handle_IRQ_event(unsigned int irq, struct pt_regs *regs,
|
||||
struct irqaction *action);
|
||||
extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs);
|
||||
extern void note_interrupt(unsigned int irq, irq_desc_t *desc,
|
||||
int action_ret, struct pt_regs *regs);
|
||||
extern int can_request_irq(unsigned int irq, unsigned long irqflags);
|
||||
|
||||
extern void init_irq_proc(void);
|
||||
|
||||
#ifdef CONFIG_AUTO_IRQ_AFFINITY
|
||||
extern int select_smp_affinity(unsigned int irq);
|
||||
#else
|
||||
static inline int
|
||||
select_smp_affinity(unsigned int irq)
|
||||
static inline int select_smp_affinity(unsigned int irq)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
extern int no_irq_affinity;
|
||||
|
||||
extern hw_irq_controller no_irq_type; /* needed in every arch ? */
|
||||
/* Handle irq action chains: */
|
||||
extern int handle_IRQ_event(unsigned int irq, struct pt_regs *regs,
|
||||
struct irqaction *action);
|
||||
|
||||
#endif
|
||||
/*
|
||||
* Built-in IRQ handlers for various IRQ types,
|
||||
* callable via desc->chip->handle_irq()
|
||||
*/
|
||||
extern void fastcall
|
||||
handle_level_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs);
|
||||
extern void fastcall
|
||||
handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc,
|
||||
struct pt_regs *regs);
|
||||
extern void fastcall
|
||||
handle_edge_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs);
|
||||
extern void fastcall
|
||||
handle_simple_irq(unsigned int irq, struct irq_desc *desc,
|
||||
struct pt_regs *regs);
|
||||
extern void fastcall
|
||||
handle_percpu_irq(unsigned int irq, struct irq_desc *desc,
|
||||
struct pt_regs *regs);
|
||||
extern void fastcall
|
||||
handle_bad_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs);
|
||||
|
||||
#endif /* __irq_h */
|
||||
/*
|
||||
* Get a descriptive string for the highlevel handler, for
|
||||
* /proc/interrupts output:
|
||||
*/
|
||||
extern const char *
|
||||
handle_irq_name(void fastcall (*handle)(unsigned int, struct irq_desc *,
|
||||
struct pt_regs *));
|
||||
|
||||
/*
|
||||
* Monolithic do_IRQ implementation.
|
||||
* (is an explicit fastcall, because i386 4KSTACKS calls it from assembly)
|
||||
*/
|
||||
extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs);
|
||||
|
||||
/*
|
||||
* Architectures call this to let the generic IRQ layer
|
||||
* handle an interrupt. If the descriptor is attached to an
|
||||
* irqchip-style controller then we call the ->handle_irq() handler,
|
||||
* and it calls __do_IRQ() if it's attached to an irqtype-style controller.
|
||||
*/
|
||||
static inline void generic_handle_irq(unsigned int irq, struct pt_regs *regs)
|
||||
{
|
||||
struct irq_desc *desc = irq_desc + irq;
|
||||
|
||||
if (likely(desc->handle_irq))
|
||||
desc->handle_irq(irq, desc, regs);
|
||||
else
|
||||
__do_IRQ(irq, regs);
|
||||
}
|
||||
|
||||
/* Handling of unhandled and spurious interrupts: */
|
||||
extern void note_interrupt(unsigned int irq, struct irq_desc *desc,
|
||||
int action_ret, struct pt_regs *regs);
|
||||
|
||||
/* Resending of interrupts :*/
|
||||
void check_irq_resend(struct irq_desc *desc, unsigned int irq);
|
||||
|
||||
/* Initialize /proc/irq/ */
|
||||
extern void init_irq_proc(void);
|
||||
|
||||
/* Enable/disable irq debugging output: */
|
||||
extern int noirqdebug_setup(char *str);
|
||||
|
||||
/* Checks whether the interrupt can be requested by request_irq(): */
|
||||
extern int can_request_irq(unsigned int irq, unsigned long irqflags);
|
||||
|
||||
/* Dummy irq-chip implementations: */
|
||||
extern struct irq_chip no_irq_chip;
|
||||
extern struct irq_chip dummy_irq_chip;
|
||||
|
||||
extern void
|
||||
set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip,
|
||||
void fastcall (*handle)(unsigned int,
|
||||
struct irq_desc *,
|
||||
struct pt_regs *));
|
||||
extern void
|
||||
__set_irq_handler(unsigned int irq,
|
||||
void fastcall (*handle)(unsigned int, struct irq_desc *,
|
||||
struct pt_regs *),
|
||||
int is_chained);
|
||||
|
||||
/*
|
||||
* Set a highlevel flow handler for a given IRQ:
|
||||
*/
|
||||
static inline void
|
||||
set_irq_handler(unsigned int irq,
|
||||
void fastcall (*handle)(unsigned int, struct irq_desc *,
|
||||
struct pt_regs *))
|
||||
{
|
||||
__set_irq_handler(irq, handle, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Set a highlevel chained flow handler for a given IRQ.
|
||||
* (a chained handler is automatically enabled and set to
|
||||
* IRQ_NOREQUEST and IRQ_NOPROBE)
|
||||
*/
|
||||
static inline void
|
||||
set_irq_chained_handler(unsigned int irq,
|
||||
void fastcall (*handle)(unsigned int, struct irq_desc *,
|
||||
struct pt_regs *))
|
||||
{
|
||||
__set_irq_handler(irq, handle, 1);
|
||||
}
|
||||
|
||||
/* Set/get chip/data for an IRQ: */
|
||||
|
||||
extern int set_irq_chip(unsigned int irq, struct irq_chip *chip);
|
||||
extern int set_irq_data(unsigned int irq, void *data);
|
||||
extern int set_irq_chip_data(unsigned int irq, void *data);
|
||||
extern int set_irq_type(unsigned int irq, unsigned int type);
|
||||
|
||||
#define get_irq_chip(irq) (irq_desc[irq].chip)
|
||||
#define get_irq_chip_data(irq) (irq_desc[irq].chip_data)
|
||||
#define get_irq_data(irq) (irq_desc[irq].handler_data)
|
||||
|
||||
#endif /* CONFIG_GENERIC_HARDIRQS */
|
||||
|
||||
#endif /* !CONFIG_S390 */
|
||||
|
||||
#endif /* _LINUX_IRQ_H */
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
/* $Id: tpam.h,v 1.1.2.1 2001/06/08 08:23:46 kai Exp $
|
||||
*
|
||||
* Turbo PAM ISDN driver for Linux. (Kernel Driver)
|
||||
*
|
||||
* Copyright 2001 Stelian Pop <stelian.pop@fr.alcove.com>, Alcôve
|
||||
*
|
||||
* For all support questions please contact: <support@auvertech.fr>
|
||||
*
|
||||
* 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, 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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _TPAM_H_
|
||||
#define _TPAM_H_
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
/* IOCTL commands */
|
||||
#define TPAM_CMD_DSPLOAD 0x0001
|
||||
#define TPAM_CMD_DSPSAVE 0x0002
|
||||
#define TPAM_CMD_DSPRUN 0x0003
|
||||
#define TPAM_CMD_LOOPMODEON 0x0004
|
||||
#define TPAM_CMD_LOOPMODEOFF 0x0005
|
||||
|
||||
/* addresses of debug information zones on board */
|
||||
#define TPAM_TRAPAUDIT_REGISTER 0x005493e4
|
||||
#define TPAM_NCOAUDIT_REGISTER 0x00500000
|
||||
#define TPAM_MSGAUDIT_REGISTER 0x008E30F0
|
||||
|
||||
/* length of debug information zones on board */
|
||||
#define TPAM_TRAPAUDIT_LENGTH 10000
|
||||
#define TPAM_NCOAUDIT_LENGTH 300000
|
||||
#define TPAM_NCOAUDIT_COUNT 30
|
||||
#define TPAM_MSGAUDIT_LENGTH 60000
|
||||
|
||||
/* IOCTL load/save parameter */
|
||||
typedef struct tpam_dsp_ioctl {
|
||||
__u32 address; /* address to load/save data */
|
||||
__u32 data_len; /* size of data to be loaded/saved */
|
||||
__u8 data[0]; /* data */
|
||||
} tpam_dsp_ioctl;
|
||||
|
||||
#endif /* _TPAM_H_ */
|
||||
+7
-1
@@ -177,7 +177,8 @@ struct key {
|
||||
/*
|
||||
* kernel managed key type definition
|
||||
*/
|
||||
typedef int (*request_key_actor_t)(struct key *key, struct key *authkey, const char *op);
|
||||
typedef int (*request_key_actor_t)(struct key *key, struct key *authkey,
|
||||
const char *op, void *aux);
|
||||
|
||||
struct key_type {
|
||||
/* name of the type */
|
||||
@@ -285,6 +286,11 @@ extern struct key *request_key(struct key_type *type,
|
||||
const char *description,
|
||||
const char *callout_info);
|
||||
|
||||
extern struct key *request_key_with_auxdata(struct key_type *type,
|
||||
const char *description,
|
||||
const char *callout_info,
|
||||
void *aux);
|
||||
|
||||
extern int key_validate(struct key *key);
|
||||
|
||||
extern key_ref_t key_create_or_update(key_ref_t keyring,
|
||||
|
||||
@@ -46,6 +46,8 @@ enum kobject_action {
|
||||
KOBJ_UMOUNT = (__force kobject_action_t) 0x05, /* umount event for block devices (broken) */
|
||||
KOBJ_OFFLINE = (__force kobject_action_t) 0x06, /* device offline */
|
||||
KOBJ_ONLINE = (__force kobject_action_t) 0x07, /* device online */
|
||||
KOBJ_UNDOCK = (__force kobject_action_t) 0x08, /* undocking */
|
||||
KOBJ_DOCK = (__force kobject_action_t) 0x09, /* dock */
|
||||
};
|
||||
|
||||
struct kobject {
|
||||
|
||||
@@ -40,7 +40,6 @@ struct miscdevice {
|
||||
struct list_head list;
|
||||
struct device *dev;
|
||||
struct class_device *class;
|
||||
char devfs_name[64];
|
||||
};
|
||||
|
||||
extern int misc_register(struct miscdevice * misc);
|
||||
|
||||
+5
-1
@@ -36,7 +36,6 @@ extern int sysctl_legacy_va_layout;
|
||||
#include <asm/page.h>
|
||||
#include <asm/pgtable.h>
|
||||
#include <asm/processor.h>
|
||||
#include <asm/atomic.h>
|
||||
|
||||
#define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n))
|
||||
|
||||
@@ -515,6 +514,11 @@ static inline void set_page_links(struct page *page, unsigned long zone,
|
||||
set_page_section(page, pfn_to_section_nr(pfn));
|
||||
}
|
||||
|
||||
/*
|
||||
* Some inline functions in vmstat.h depend on page_zone()
|
||||
*/
|
||||
#include <linux/vmstat.h>
|
||||
|
||||
#ifndef CONFIG_DISCONTIGMEM
|
||||
/* The array of struct pages - for discontigmem use pgdat->lmem_map */
|
||||
extern struct page *mem_map;
|
||||
|
||||
+25
-13
@@ -46,6 +46,27 @@ struct zone_padding {
|
||||
#define ZONE_PADDING(name)
|
||||
#endif
|
||||
|
||||
enum zone_stat_item {
|
||||
NR_ANON_PAGES, /* Mapped anonymous pages */
|
||||
NR_FILE_MAPPED, /* pagecache pages mapped into pagetables.
|
||||
only modified from process context */
|
||||
NR_FILE_PAGES,
|
||||
NR_SLAB, /* Pages used by slab allocator */
|
||||
NR_PAGETABLE, /* used for pagetables */
|
||||
NR_FILE_DIRTY,
|
||||
NR_WRITEBACK,
|
||||
NR_UNSTABLE_NFS, /* NFS unstable pages */
|
||||
NR_BOUNCE,
|
||||
#ifdef CONFIG_NUMA
|
||||
NUMA_HIT, /* allocated in intended node */
|
||||
NUMA_MISS, /* allocated in non intended node */
|
||||
NUMA_FOREIGN, /* was intended here, hit elsewhere */
|
||||
NUMA_INTERLEAVE_HIT, /* interleaver preferred this zone */
|
||||
NUMA_LOCAL, /* allocation from local node */
|
||||
NUMA_OTHER, /* allocation from other node */
|
||||
#endif
|
||||
NR_VM_ZONE_STAT_ITEMS };
|
||||
|
||||
struct per_cpu_pages {
|
||||
int count; /* number of pages in the list */
|
||||
int high; /* high watermark, emptying needed */
|
||||
@@ -55,13 +76,8 @@ struct per_cpu_pages {
|
||||
|
||||
struct per_cpu_pageset {
|
||||
struct per_cpu_pages pcp[2]; /* 0: hot. 1: cold */
|
||||
#ifdef CONFIG_NUMA
|
||||
unsigned long numa_hit; /* allocated in intended node */
|
||||
unsigned long numa_miss; /* allocated in non intended node */
|
||||
unsigned long numa_foreign; /* was intended here, hit elsewhere */
|
||||
unsigned long interleave_hit; /* interleaver prefered this zone */
|
||||
unsigned long local_node; /* allocation from local node */
|
||||
unsigned long other_node; /* allocation from other node */
|
||||
#ifdef CONFIG_SMP
|
||||
s8 vm_stat_diff[NR_VM_ZONE_STAT_ITEMS];
|
||||
#endif
|
||||
} ____cacheline_aligned_in_smp;
|
||||
|
||||
@@ -165,12 +181,8 @@ struct zone {
|
||||
/* A count of how many reclaimers are scanning this zone */
|
||||
atomic_t reclaim_in_progress;
|
||||
|
||||
/*
|
||||
* timestamp (in jiffies) of the last zone reclaim that did not
|
||||
* result in freeing of pages. This is used to avoid repeated scans
|
||||
* if all memory in the zone is in use.
|
||||
*/
|
||||
unsigned long last_unsuccessful_zone_reclaim;
|
||||
/* Zone statistics */
|
||||
atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS];
|
||||
|
||||
/*
|
||||
* prev_priority holds the scanning priority for this zone. It is
|
||||
|
||||
@@ -61,6 +61,7 @@ typedef enum {
|
||||
#define SOCK_ASYNC_WAITDATA 1
|
||||
#define SOCK_NOSPACE 2
|
||||
#define SOCK_PASSCRED 3
|
||||
#define SOCK_PASSSEC 4
|
||||
|
||||
#ifndef ARCH_HAS_SOCKET_TYPES
|
||||
/**
|
||||
|
||||
@@ -313,8 +313,12 @@ struct net_device
|
||||
|
||||
/* Segmentation offload features */
|
||||
#define NETIF_F_GSO_SHIFT 16
|
||||
#define NETIF_F_GSO_MASK 0xffff0000
|
||||
#define NETIF_F_TSO (SKB_GSO_TCPV4 << NETIF_F_GSO_SHIFT)
|
||||
#define NETIF_F_UFO (SKB_GSO_UDPV4 << NETIF_F_GSO_SHIFT)
|
||||
#define NETIF_F_UFO (SKB_GSO_UDP << NETIF_F_GSO_SHIFT)
|
||||
#define NETIF_F_GSO_ROBUST (SKB_GSO_DODGY << NETIF_F_GSO_SHIFT)
|
||||
#define NETIF_F_TSO_ECN (SKB_GSO_TCP_ECN << NETIF_F_GSO_SHIFT)
|
||||
#define NETIF_F_TSO6 (SKB_GSO_TCPV6 << NETIF_F_GSO_SHIFT)
|
||||
|
||||
#define NETIF_F_GEN_CSUM (NETIF_F_NO_CSUM | NETIF_F_HW_CSUM)
|
||||
#define NETIF_F_ALL_CSUM (NETIF_F_IP_CSUM | NETIF_F_GEN_CSUM)
|
||||
@@ -543,7 +547,8 @@ struct packet_type {
|
||||
struct net_device *,
|
||||
struct packet_type *,
|
||||
struct net_device *);
|
||||
struct sk_buff *(*gso_segment)(struct sk_buff *skb, int sg);
|
||||
struct sk_buff *(*gso_segment)(struct sk_buff *skb,
|
||||
int features);
|
||||
void *af_packet_priv;
|
||||
struct list_head list;
|
||||
};
|
||||
@@ -968,7 +973,7 @@ extern int netdev_max_backlog;
|
||||
extern int weight_p;
|
||||
extern int netdev_set_master(struct net_device *dev, struct net_device *master);
|
||||
extern int skb_checksum_help(struct sk_buff *skb, int inward);
|
||||
extern struct sk_buff *skb_gso_segment(struct sk_buff *skb, int sg);
|
||||
extern struct sk_buff *skb_gso_segment(struct sk_buff *skb, int features);
|
||||
#ifdef CONFIG_BUG
|
||||
extern void netdev_rx_csum_fault(struct net_device *dev);
|
||||
#else
|
||||
@@ -988,11 +993,21 @@ extern void dev_seq_stop(struct seq_file *seq, void *v);
|
||||
|
||||
extern void linkwatch_run_queue(void);
|
||||
|
||||
static inline int net_gso_ok(int features, int gso_type)
|
||||
{
|
||||
int feature = gso_type << NETIF_F_GSO_SHIFT;
|
||||
return (features & feature) == feature;
|
||||
}
|
||||
|
||||
static inline int skb_gso_ok(struct sk_buff *skb, int features)
|
||||
{
|
||||
return net_gso_ok(features, skb_shinfo(skb)->gso_size ?
|
||||
skb_shinfo(skb)->gso_type : 0);
|
||||
}
|
||||
|
||||
static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb)
|
||||
{
|
||||
int feature = skb_shinfo(skb)->gso_type << NETIF_F_GSO_SHIFT;
|
||||
return skb_shinfo(skb)->gso_size &&
|
||||
(dev->features & feature) != feature;
|
||||
return !skb_gso_ok(skb, dev->features);
|
||||
}
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
#ifndef _LINUX_NFS_FS_H
|
||||
#define _LINUX_NFS_FS_H
|
||||
|
||||
#include <linux/config.h>
|
||||
#include <linux/in.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/pagemap.h>
|
||||
|
||||
+12
-137
@@ -5,12 +5,8 @@
|
||||
#ifndef PAGE_FLAGS_H
|
||||
#define PAGE_FLAGS_H
|
||||
|
||||
#include <linux/percpu.h>
|
||||
#include <linux/cache.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
#include <asm/pgtable.h>
|
||||
|
||||
/*
|
||||
* Various page->flags bits:
|
||||
*
|
||||
@@ -102,134 +98,6 @@
|
||||
#define PG_uncached 31 /* Page has been mapped as uncached */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Global page accounting. One instance per CPU. Only unsigned longs are
|
||||
* allowed.
|
||||
*
|
||||
* - Fields can be modified with xxx_page_state and xxx_page_state_zone at
|
||||
* any time safely (which protects the instance from modification by
|
||||
* interrupt.
|
||||
* - The __xxx_page_state variants can be used safely when interrupts are
|
||||
* disabled.
|
||||
* - The __xxx_page_state variants can be used if the field is only
|
||||
* modified from process context and protected from preemption, or only
|
||||
* modified from interrupt context. In this case, the field should be
|
||||
* commented here.
|
||||
*/
|
||||
struct page_state {
|
||||
unsigned long nr_dirty; /* Dirty writeable pages */
|
||||
unsigned long nr_writeback; /* Pages under writeback */
|
||||
unsigned long nr_unstable; /* NFS unstable pages */
|
||||
unsigned long nr_page_table_pages;/* Pages used for pagetables */
|
||||
unsigned long nr_mapped; /* mapped into pagetables.
|
||||
* only modified from process context */
|
||||
unsigned long nr_slab; /* In slab */
|
||||
#define GET_PAGE_STATE_LAST nr_slab
|
||||
|
||||
/*
|
||||
* The below are zeroed by get_page_state(). Use get_full_page_state()
|
||||
* to add up all these.
|
||||
*/
|
||||
unsigned long pgpgin; /* Disk reads */
|
||||
unsigned long pgpgout; /* Disk writes */
|
||||
unsigned long pswpin; /* swap reads */
|
||||
unsigned long pswpout; /* swap writes */
|
||||
|
||||
unsigned long pgalloc_high; /* page allocations */
|
||||
unsigned long pgalloc_normal;
|
||||
unsigned long pgalloc_dma32;
|
||||
unsigned long pgalloc_dma;
|
||||
|
||||
unsigned long pgfree; /* page freeings */
|
||||
unsigned long pgactivate; /* pages moved inactive->active */
|
||||
unsigned long pgdeactivate; /* pages moved active->inactive */
|
||||
|
||||
unsigned long pgfault; /* faults (major+minor) */
|
||||
unsigned long pgmajfault; /* faults (major only) */
|
||||
|
||||
unsigned long pgrefill_high; /* inspected in refill_inactive_zone */
|
||||
unsigned long pgrefill_normal;
|
||||
unsigned long pgrefill_dma32;
|
||||
unsigned long pgrefill_dma;
|
||||
|
||||
unsigned long pgsteal_high; /* total highmem pages reclaimed */
|
||||
unsigned long pgsteal_normal;
|
||||
unsigned long pgsteal_dma32;
|
||||
unsigned long pgsteal_dma;
|
||||
|
||||
unsigned long pgscan_kswapd_high;/* total highmem pages scanned */
|
||||
unsigned long pgscan_kswapd_normal;
|
||||
unsigned long pgscan_kswapd_dma32;
|
||||
unsigned long pgscan_kswapd_dma;
|
||||
|
||||
unsigned long pgscan_direct_high;/* total highmem pages scanned */
|
||||
unsigned long pgscan_direct_normal;
|
||||
unsigned long pgscan_direct_dma32;
|
||||
unsigned long pgscan_direct_dma;
|
||||
|
||||
unsigned long pginodesteal; /* pages reclaimed via inode freeing */
|
||||
unsigned long slabs_scanned; /* slab objects scanned */
|
||||
unsigned long kswapd_steal; /* pages reclaimed by kswapd */
|
||||
unsigned long kswapd_inodesteal;/* reclaimed via kswapd inode freeing */
|
||||
unsigned long pageoutrun; /* kswapd's calls to page reclaim */
|
||||
unsigned long allocstall; /* direct reclaim calls */
|
||||
|
||||
unsigned long pgrotated; /* pages rotated to tail of the LRU */
|
||||
unsigned long nr_bounce; /* pages for bounce buffers */
|
||||
};
|
||||
|
||||
extern void get_page_state(struct page_state *ret);
|
||||
extern void get_page_state_node(struct page_state *ret, int node);
|
||||
extern void get_full_page_state(struct page_state *ret);
|
||||
extern unsigned long read_page_state_offset(unsigned long offset);
|
||||
extern void mod_page_state_offset(unsigned long offset, unsigned long delta);
|
||||
extern void __mod_page_state_offset(unsigned long offset, unsigned long delta);
|
||||
|
||||
#define read_page_state(member) \
|
||||
read_page_state_offset(offsetof(struct page_state, member))
|
||||
|
||||
#define mod_page_state(member, delta) \
|
||||
mod_page_state_offset(offsetof(struct page_state, member), (delta))
|
||||
|
||||
#define __mod_page_state(member, delta) \
|
||||
__mod_page_state_offset(offsetof(struct page_state, member), (delta))
|
||||
|
||||
#define inc_page_state(member) mod_page_state(member, 1UL)
|
||||
#define dec_page_state(member) mod_page_state(member, 0UL - 1)
|
||||
#define add_page_state(member,delta) mod_page_state(member, (delta))
|
||||
#define sub_page_state(member,delta) mod_page_state(member, 0UL - (delta))
|
||||
|
||||
#define __inc_page_state(member) __mod_page_state(member, 1UL)
|
||||
#define __dec_page_state(member) __mod_page_state(member, 0UL - 1)
|
||||
#define __add_page_state(member,delta) __mod_page_state(member, (delta))
|
||||
#define __sub_page_state(member,delta) __mod_page_state(member, 0UL - (delta))
|
||||
|
||||
#define page_state(member) (*__page_state(offsetof(struct page_state, member)))
|
||||
|
||||
#define state_zone_offset(zone, member) \
|
||||
({ \
|
||||
unsigned offset; \
|
||||
if (is_highmem(zone)) \
|
||||
offset = offsetof(struct page_state, member##_high); \
|
||||
else if (is_normal(zone)) \
|
||||
offset = offsetof(struct page_state, member##_normal); \
|
||||
else if (is_dma32(zone)) \
|
||||
offset = offsetof(struct page_state, member##_dma32); \
|
||||
else \
|
||||
offset = offsetof(struct page_state, member##_dma); \
|
||||
offset; \
|
||||
})
|
||||
|
||||
#define __mod_page_state_zone(zone, member, delta) \
|
||||
do { \
|
||||
__mod_page_state_offset(state_zone_offset(zone, member), (delta)); \
|
||||
} while (0)
|
||||
|
||||
#define mod_page_state_zone(zone, member, delta) \
|
||||
do { \
|
||||
mod_page_state_offset(state_zone_offset(zone, member), (delta)); \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
* Manipulation of page state flags
|
||||
*/
|
||||
@@ -254,7 +122,14 @@ extern void __mod_page_state_offset(unsigned long offset, unsigned long delta);
|
||||
#define TestClearPageReferenced(page) test_and_clear_bit(PG_referenced, &(page)->flags)
|
||||
|
||||
#define PageUptodate(page) test_bit(PG_uptodate, &(page)->flags)
|
||||
#ifndef SetPageUptodate
|
||||
#ifdef CONFIG_S390
|
||||
#define SetPageUptodate(_page) \
|
||||
do { \
|
||||
struct page *__page = (_page); \
|
||||
if (!test_and_set_bit(PG_uptodate, &__page->flags)) \
|
||||
page_test_and_clear_dirty(_page); \
|
||||
} while (0)
|
||||
#else
|
||||
#define SetPageUptodate(page) set_bit(PG_uptodate, &(page)->flags)
|
||||
#endif
|
||||
#define ClearPageUptodate(page) clear_bit(PG_uptodate, &(page)->flags)
|
||||
@@ -306,7 +181,7 @@ extern void __mod_page_state_offset(unsigned long offset, unsigned long delta);
|
||||
do { \
|
||||
if (!test_and_set_bit(PG_writeback, \
|
||||
&(page)->flags)) \
|
||||
inc_page_state(nr_writeback); \
|
||||
inc_zone_page_state(page, NR_WRITEBACK); \
|
||||
} while (0)
|
||||
#define TestSetPageWriteback(page) \
|
||||
({ \
|
||||
@@ -314,14 +189,14 @@ extern void __mod_page_state_offset(unsigned long offset, unsigned long delta);
|
||||
ret = test_and_set_bit(PG_writeback, \
|
||||
&(page)->flags); \
|
||||
if (!ret) \
|
||||
inc_page_state(nr_writeback); \
|
||||
inc_zone_page_state(page, NR_WRITEBACK); \
|
||||
ret; \
|
||||
})
|
||||
#define ClearPageWriteback(page) \
|
||||
do { \
|
||||
if (test_and_clear_bit(PG_writeback, \
|
||||
&(page)->flags)) \
|
||||
dec_page_state(nr_writeback); \
|
||||
dec_zone_page_state(page, NR_WRITEBACK); \
|
||||
} while (0)
|
||||
#define TestClearPageWriteback(page) \
|
||||
({ \
|
||||
@@ -329,7 +204,7 @@ extern void __mod_page_state_offset(unsigned long offset, unsigned long delta);
|
||||
ret = test_and_clear_bit(PG_writeback, \
|
||||
&(page)->flags); \
|
||||
if (ret) \
|
||||
dec_page_state(nr_writeback); \
|
||||
dec_zone_page_state(page, NR_WRITEBACK); \
|
||||
ret; \
|
||||
})
|
||||
|
||||
|
||||
@@ -113,51 +113,6 @@ int add_to_page_cache_lru(struct page *page, struct address_space *mapping,
|
||||
extern void remove_from_page_cache(struct page *page);
|
||||
extern void __remove_from_page_cache(struct page *page);
|
||||
|
||||
extern atomic_t nr_pagecache;
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
|
||||
#define PAGECACHE_ACCT_THRESHOLD max(16, NR_CPUS * 2)
|
||||
DECLARE_PER_CPU(long, nr_pagecache_local);
|
||||
|
||||
/*
|
||||
* pagecache_acct implements approximate accounting for pagecache.
|
||||
* vm_enough_memory() do not need high accuracy. Writers will keep
|
||||
* an offset in their per-cpu arena and will spill that into the
|
||||
* global count whenever the absolute value of the local count
|
||||
* exceeds the counter's threshold.
|
||||
*
|
||||
* MUST be protected from preemption.
|
||||
* current protection is mapping->page_lock.
|
||||
*/
|
||||
static inline void pagecache_acct(int count)
|
||||
{
|
||||
long *local;
|
||||
|
||||
local = &__get_cpu_var(nr_pagecache_local);
|
||||
*local += count;
|
||||
if (*local > PAGECACHE_ACCT_THRESHOLD || *local < -PAGECACHE_ACCT_THRESHOLD) {
|
||||
atomic_add(*local, &nr_pagecache);
|
||||
*local = 0;
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static inline void pagecache_acct(int count)
|
||||
{
|
||||
atomic_add(count, &nr_pagecache);
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline unsigned long get_page_cache_size(void)
|
||||
{
|
||||
int ret = atomic_read(&nr_pagecache);
|
||||
if (unlikely(ret < 0))
|
||||
ret = 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return byte-offset into filesystem object for page.
|
||||
*/
|
||||
|
||||
+7
-6
@@ -404,8 +404,8 @@ int pcibios_enable_device(struct pci_dev *, int mask);
|
||||
char *pcibios_setup (char *str);
|
||||
|
||||
/* Used only when drivers/pci/setup.c is used */
|
||||
void pcibios_align_resource(void *, struct resource *,
|
||||
unsigned long, unsigned long);
|
||||
void pcibios_align_resource(void *, struct resource *, resource_size_t,
|
||||
resource_size_t);
|
||||
void pcibios_update_irq(struct pci_dev *, int irq);
|
||||
|
||||
/* Generic PCI functions used internally */
|
||||
@@ -532,10 +532,10 @@ void pci_release_region(struct pci_dev *, int);
|
||||
|
||||
/* drivers/pci/bus.c */
|
||||
int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res,
|
||||
unsigned long size, unsigned long align,
|
||||
unsigned long min, unsigned int type_mask,
|
||||
resource_size_t size, resource_size_t align,
|
||||
resource_size_t min, unsigned int type_mask,
|
||||
void (*alignf)(void *, struct resource *,
|
||||
unsigned long, unsigned long),
|
||||
resource_size_t, resource_size_t),
|
||||
void *alignf_data);
|
||||
void pci_enable_bridges(struct pci_bus *bus);
|
||||
|
||||
@@ -730,7 +730,8 @@ static inline char *pci_name(struct pci_dev *pdev)
|
||||
*/
|
||||
#ifndef HAVE_ARCH_PCI_RESOURCE_TO_USER
|
||||
static inline void pci_resource_to_user(const struct pci_dev *dev, int bar,
|
||||
const struct resource *rsrc, u64 *start, u64 *end)
|
||||
const struct resource *rsrc, resource_size_t *start,
|
||||
resource_size_t *end)
|
||||
{
|
||||
*start = rsrc->start;
|
||||
*end = rsrc->end;
|
||||
|
||||
@@ -728,7 +728,9 @@
|
||||
#define PCI_DEVICE_ID_TI_TVP4020 0x3d07
|
||||
#define PCI_DEVICE_ID_TI_4450 0x8011
|
||||
#define PCI_DEVICE_ID_TI_XX21_XX11 0x8031
|
||||
#define PCI_DEVICE_ID_TI_XX21_XX11_SD 0x8034
|
||||
#define PCI_DEVICE_ID_TI_X515 0x8036
|
||||
#define PCI_DEVICE_ID_TI_XX12 0x8039
|
||||
#define PCI_DEVICE_ID_TI_1130 0xac12
|
||||
#define PCI_DEVICE_ID_TI_1031 0xac13
|
||||
#define PCI_DEVICE_ID_TI_1131 0xac15
|
||||
@@ -1441,6 +1443,7 @@
|
||||
#define PCI_DEVICE_ID_RICOH_RL5C475 0x0475
|
||||
#define PCI_DEVICE_ID_RICOH_RL5C476 0x0476
|
||||
#define PCI_DEVICE_ID_RICOH_RL5C478 0x0478
|
||||
#define PCI_DEVICE_ID_RICOH_R5C822 0x0822
|
||||
|
||||
#define PCI_VENDOR_ID_DLINK 0x1186
|
||||
#define PCI_DEVICE_ID_DLINK_DGE510T 0x4c00
|
||||
|
||||
+5
-2
@@ -389,7 +389,8 @@ int pnp_start_dev(struct pnp_dev *dev);
|
||||
int pnp_stop_dev(struct pnp_dev *dev);
|
||||
int pnp_activate_dev(struct pnp_dev *dev);
|
||||
int pnp_disable_dev(struct pnp_dev *dev);
|
||||
void pnp_resource_change(struct resource *resource, unsigned long start, unsigned long size);
|
||||
void pnp_resource_change(struct resource *resource, resource_size_t start,
|
||||
resource_size_t size);
|
||||
|
||||
/* protocol helpers */
|
||||
int pnp_is_active(struct pnp_dev * dev);
|
||||
@@ -434,7 +435,9 @@ static inline int pnp_start_dev(struct pnp_dev *dev) { return -ENODEV; }
|
||||
static inline int pnp_stop_dev(struct pnp_dev *dev) { return -ENODEV; }
|
||||
static inline int pnp_activate_dev(struct pnp_dev *dev) { return -ENODEV; }
|
||||
static inline int pnp_disable_dev(struct pnp_dev *dev) { return -ENODEV; }
|
||||
static inline void pnp_resource_change(struct resource *resource, unsigned long start, unsigned long size) { }
|
||||
static inline void pnp_resource_change(struct resource *resource,
|
||||
resource_size_t start,
|
||||
resource_size_t size) { }
|
||||
|
||||
/* protocol helpers */
|
||||
static inline int pnp_is_active(struct pnp_dev * dev) { return 0; }
|
||||
|
||||
@@ -163,14 +163,22 @@ extern int rcu_needs_cpu(int cpu);
|
||||
*
|
||||
* It is illegal to block while in an RCU read-side critical section.
|
||||
*/
|
||||
#define rcu_read_lock() preempt_disable()
|
||||
#define rcu_read_lock() \
|
||||
do { \
|
||||
preempt_disable(); \
|
||||
__acquire(RCU); \
|
||||
} while(0)
|
||||
|
||||
/**
|
||||
* rcu_read_unlock - marks the end of an RCU read-side critical section.
|
||||
*
|
||||
* See rcu_read_lock() for more information.
|
||||
*/
|
||||
#define rcu_read_unlock() preempt_enable()
|
||||
#define rcu_read_unlock() \
|
||||
do { \
|
||||
__release(RCU); \
|
||||
preempt_enable(); \
|
||||
} while(0)
|
||||
|
||||
/*
|
||||
* So where is rcu_write_lock()? It does not exist, as there is no
|
||||
@@ -193,14 +201,22 @@ extern int rcu_needs_cpu(int cpu);
|
||||
* can use just rcu_read_lock().
|
||||
*
|
||||
*/
|
||||
#define rcu_read_lock_bh() local_bh_disable()
|
||||
#define rcu_read_lock_bh() \
|
||||
do { \
|
||||
local_bh_disable(); \
|
||||
__acquire(RCU_BH); \
|
||||
} while(0)
|
||||
|
||||
/*
|
||||
* rcu_read_unlock_bh - marks the end of a softirq-only RCU critical section
|
||||
*
|
||||
* See rcu_read_lock_bh() for more information.
|
||||
*/
|
||||
#define rcu_read_unlock_bh() local_bh_enable()
|
||||
#define rcu_read_unlock_bh() \
|
||||
do { \
|
||||
__release(RCU_BH); \
|
||||
local_bh_enable(); \
|
||||
} while(0)
|
||||
|
||||
/**
|
||||
* rcu_dereference - fetch an RCU-protected pointer in an
|
||||
|
||||
+2
-2
@@ -34,8 +34,8 @@ struct rtc_time {
|
||||
* alarm API.
|
||||
*/
|
||||
struct rtc_wkalrm {
|
||||
unsigned char enabled; /* 0 = alarm disable, 1 = alarm disabled */
|
||||
unsigned char pending; /* 0 = alarm pending, 1 = alarm not pending */
|
||||
unsigned char enabled; /* 0 = alarm disabled, 1 = alarm enabled */
|
||||
unsigned char pending; /* 0 = alarm not pending, 1 = alarm pending */
|
||||
struct rtc_time time; /* time the alarm is set to */
|
||||
};
|
||||
|
||||
|
||||
@@ -1153,7 +1153,7 @@ extern int force_sig_info(int, struct siginfo *, struct task_struct *);
|
||||
extern int __kill_pg_info(int sig, struct siginfo *info, pid_t pgrp);
|
||||
extern int kill_pg_info(int, struct siginfo *, pid_t);
|
||||
extern int kill_proc_info(int, struct siginfo *, pid_t);
|
||||
extern int kill_proc_info_as_uid(int, struct siginfo *, pid_t, uid_t, uid_t);
|
||||
extern int kill_proc_info_as_uid(int, struct siginfo *, pid_t, uid_t, uid_t, u32);
|
||||
extern void do_notify_parent(struct task_struct *, int);
|
||||
extern void force_sig(int, struct task_struct *);
|
||||
extern void force_sig_specific(int, struct task_struct *);
|
||||
|
||||
+41
-10
@@ -67,7 +67,7 @@ struct xfrm_state;
|
||||
struct xfrm_user_sec_ctx;
|
||||
|
||||
extern int cap_netlink_send(struct sock *sk, struct sk_buff *skb);
|
||||
extern int cap_netlink_recv(struct sk_buff *skb);
|
||||
extern int cap_netlink_recv(struct sk_buff *skb, int cap);
|
||||
|
||||
/*
|
||||
* Values used in the task_security_ops calls
|
||||
@@ -567,6 +567,9 @@ struct swap_info_struct;
|
||||
* @p.
|
||||
* @p contains the task_struct for the process.
|
||||
* Return 0 if permission is granted.
|
||||
* @task_getsecid:
|
||||
* Retrieve the security identifier of the process @p.
|
||||
* @p contains the task_struct for the process and place is into @secid.
|
||||
* @task_setgroups:
|
||||
* Check permission before setting the supplementary group set of the
|
||||
* current process.
|
||||
@@ -582,6 +585,10 @@ struct swap_info_struct;
|
||||
* @p contains the task_struct of process.
|
||||
* @ioprio contains the new ioprio value
|
||||
* Return 0 if permission is granted.
|
||||
* @task_getioprio
|
||||
* Check permission before getting the ioprio value of @p.
|
||||
* @p contains the task_struct of process.
|
||||
* Return 0 if permission is granted.
|
||||
* @task_setrlimit:
|
||||
* Check permission before setting the resource limits of the current
|
||||
* process for @resource to @new_rlim. The old resource limit values can
|
||||
@@ -615,6 +622,7 @@ struct swap_info_struct;
|
||||
* @p contains the task_struct for process.
|
||||
* @info contains the signal information.
|
||||
* @sig contains the signal value.
|
||||
* @secid contains the sid of the process where the signal originated
|
||||
* Return 0 if permission is granted.
|
||||
* @task_wait:
|
||||
* Check permission before allowing a process to reap a child process @p
|
||||
@@ -656,6 +664,7 @@ struct swap_info_struct;
|
||||
* Check permission before processing the received netlink message in
|
||||
* @skb.
|
||||
* @skb contains the sk_buff structure for the netlink message.
|
||||
* @cap indicates the capability required
|
||||
* Return 0 if permission is granted.
|
||||
*
|
||||
* Security hooks for Unix domain networking.
|
||||
@@ -1218,16 +1227,18 @@ struct security_operations {
|
||||
int (*task_setpgid) (struct task_struct * p, pid_t pgid);
|
||||
int (*task_getpgid) (struct task_struct * p);
|
||||
int (*task_getsid) (struct task_struct * p);
|
||||
void (*task_getsecid) (struct task_struct * p, u32 * secid);
|
||||
int (*task_setgroups) (struct group_info *group_info);
|
||||
int (*task_setnice) (struct task_struct * p, int nice);
|
||||
int (*task_setioprio) (struct task_struct * p, int ioprio);
|
||||
int (*task_getioprio) (struct task_struct * p);
|
||||
int (*task_setrlimit) (unsigned int resource, struct rlimit * new_rlim);
|
||||
int (*task_setscheduler) (struct task_struct * p, int policy,
|
||||
struct sched_param * lp);
|
||||
int (*task_getscheduler) (struct task_struct * p);
|
||||
int (*task_movememory) (struct task_struct * p);
|
||||
int (*task_kill) (struct task_struct * p,
|
||||
struct siginfo * info, int sig);
|
||||
struct siginfo * info, int sig, u32 secid);
|
||||
int (*task_wait) (struct task_struct * p);
|
||||
int (*task_prctl) (int option, unsigned long arg2,
|
||||
unsigned long arg3, unsigned long arg4,
|
||||
@@ -1266,7 +1277,7 @@ struct security_operations {
|
||||
struct sembuf * sops, unsigned nsops, int alter);
|
||||
|
||||
int (*netlink_send) (struct sock * sk, struct sk_buff * skb);
|
||||
int (*netlink_recv) (struct sk_buff * skb);
|
||||
int (*netlink_recv) (struct sk_buff * skb, int cap);
|
||||
|
||||
/* allow module stacking */
|
||||
int (*register_security) (const char *name,
|
||||
@@ -1838,6 +1849,11 @@ static inline int security_task_getsid (struct task_struct *p)
|
||||
return security_ops->task_getsid (p);
|
||||
}
|
||||
|
||||
static inline void security_task_getsecid (struct task_struct *p, u32 *secid)
|
||||
{
|
||||
security_ops->task_getsecid (p, secid);
|
||||
}
|
||||
|
||||
static inline int security_task_setgroups (struct group_info *group_info)
|
||||
{
|
||||
return security_ops->task_setgroups (group_info);
|
||||
@@ -1853,6 +1869,11 @@ static inline int security_task_setioprio (struct task_struct *p, int ioprio)
|
||||
return security_ops->task_setioprio (p, ioprio);
|
||||
}
|
||||
|
||||
static inline int security_task_getioprio (struct task_struct *p)
|
||||
{
|
||||
return security_ops->task_getioprio (p);
|
||||
}
|
||||
|
||||
static inline int security_task_setrlimit (unsigned int resource,
|
||||
struct rlimit *new_rlim)
|
||||
{
|
||||
@@ -1877,9 +1898,10 @@ static inline int security_task_movememory (struct task_struct *p)
|
||||
}
|
||||
|
||||
static inline int security_task_kill (struct task_struct *p,
|
||||
struct siginfo *info, int sig)
|
||||
struct siginfo *info, int sig,
|
||||
u32 secid)
|
||||
{
|
||||
return security_ops->task_kill (p, info, sig);
|
||||
return security_ops->task_kill (p, info, sig, secid);
|
||||
}
|
||||
|
||||
static inline int security_task_wait (struct task_struct *p)
|
||||
@@ -2032,9 +2054,9 @@ static inline int security_netlink_send(struct sock *sk, struct sk_buff * skb)
|
||||
return security_ops->netlink_send(sk, skb);
|
||||
}
|
||||
|
||||
static inline int security_netlink_recv(struct sk_buff * skb)
|
||||
static inline int security_netlink_recv(struct sk_buff * skb, int cap)
|
||||
{
|
||||
return security_ops->netlink_recv(skb);
|
||||
return security_ops->netlink_recv(skb, cap);
|
||||
}
|
||||
|
||||
/* prototypes */
|
||||
@@ -2490,6 +2512,9 @@ static inline int security_task_getsid (struct task_struct *p)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void security_task_getsecid (struct task_struct *p, u32 *secid)
|
||||
{ }
|
||||
|
||||
static inline int security_task_setgroups (struct group_info *group_info)
|
||||
{
|
||||
return 0;
|
||||
@@ -2505,6 +2530,11 @@ static inline int security_task_setioprio (struct task_struct *p, int ioprio)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int security_task_getioprio (struct task_struct *p)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int security_task_setrlimit (unsigned int resource,
|
||||
struct rlimit *new_rlim)
|
||||
{
|
||||
@@ -2529,7 +2559,8 @@ static inline int security_task_movememory (struct task_struct *p)
|
||||
}
|
||||
|
||||
static inline int security_task_kill (struct task_struct *p,
|
||||
struct siginfo *info, int sig)
|
||||
struct siginfo *info, int sig,
|
||||
u32 secid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -2670,9 +2701,9 @@ static inline int security_netlink_send (struct sock *sk, struct sk_buff *skb)
|
||||
return cap_netlink_send (sk, skb);
|
||||
}
|
||||
|
||||
static inline int security_netlink_recv (struct sk_buff *skb)
|
||||
static inline int security_netlink_recv (struct sk_buff *skb, int cap)
|
||||
{
|
||||
return cap_netlink_recv (skb);
|
||||
return cap_netlink_recv (skb, cap);
|
||||
}
|
||||
|
||||
static inline struct dentry *securityfs_create_dir(const char *name,
|
||||
|
||||
@@ -336,7 +336,6 @@ struct uart_driver {
|
||||
struct module *owner;
|
||||
const char *driver_name;
|
||||
const char *dev_name;
|
||||
const char *devfs_name;
|
||||
int major;
|
||||
int minor;
|
||||
int nr;
|
||||
|
||||
@@ -8,32 +8,6 @@
|
||||
#include <linux/list.h>
|
||||
#include <linux/spinlock.h>
|
||||
|
||||
/*
|
||||
* These values of sa_flags are used only by the kernel as part of the
|
||||
* irq handling routines.
|
||||
*
|
||||
* SA_INTERRUPT is also used by the irq handling routines.
|
||||
* SA_SHIRQ is for shared interrupt support on PCI and EISA.
|
||||
* SA_PROBEIRQ is set by callers when they expect sharing mismatches to occur
|
||||
*/
|
||||
#define SA_SAMPLE_RANDOM SA_RESTART
|
||||
#define SA_SHIRQ 0x04000000
|
||||
#define SA_PROBEIRQ 0x08000000
|
||||
|
||||
/*
|
||||
* As above, these correspond to the IORESOURCE_IRQ_* defines in
|
||||
* linux/ioport.h to select the interrupt line behaviour. When
|
||||
* requesting an interrupt without specifying a SA_TRIGGER, the
|
||||
* setting should be assumed to be "as already configured", which
|
||||
* may be as per machine or firmware initialisation.
|
||||
*/
|
||||
#define SA_TRIGGER_LOW 0x00000008
|
||||
#define SA_TRIGGER_HIGH 0x00000004
|
||||
#define SA_TRIGGER_FALLING 0x00000002
|
||||
#define SA_TRIGGER_RISING 0x00000001
|
||||
#define SA_TRIGGER_MASK (SA_TRIGGER_HIGH|SA_TRIGGER_LOW|\
|
||||
SA_TRIGGER_RISING|SA_TRIGGER_FALLING)
|
||||
|
||||
/*
|
||||
* Real Time signals may be queued.
|
||||
*/
|
||||
|
||||
+10
-3
@@ -171,7 +171,15 @@ enum {
|
||||
|
||||
enum {
|
||||
SKB_GSO_TCPV4 = 1 << 0,
|
||||
SKB_GSO_UDPV4 = 1 << 1,
|
||||
SKB_GSO_UDP = 1 << 1,
|
||||
|
||||
/* This indicates the skb is from an untrusted source. */
|
||||
SKB_GSO_DODGY = 1 << 2,
|
||||
|
||||
/* This indicates the tcp segment has CWR set. */
|
||||
SKB_GSO_TCP_ECN = 1 << 3,
|
||||
|
||||
SKB_GSO_TCPV6 = 1 << 4,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1298,8 +1306,7 @@ extern void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to);
|
||||
extern void skb_split(struct sk_buff *skb,
|
||||
struct sk_buff *skb1, const u32 len);
|
||||
|
||||
extern void skb_release_data(struct sk_buff *skb);
|
||||
extern struct sk_buff *skb_segment(struct sk_buff *skb, int sg);
|
||||
extern struct sk_buff *skb_segment(struct sk_buff *skb, int features);
|
||||
|
||||
static inline void *skb_header_pointer(const struct sk_buff *skb, int offset,
|
||||
int len, void *buffer)
|
||||
|
||||
@@ -125,4 +125,6 @@ static inline void smp_send_reschedule(int cpu) { }
|
||||
#define put_cpu() preempt_enable()
|
||||
#define put_cpu_no_resched() preempt_enable_no_resched()
|
||||
|
||||
void smp_setup_processor_id(void);
|
||||
|
||||
#endif /* __LINUX_SMP_H */
|
||||
|
||||
@@ -159,7 +159,9 @@ struct svc_rqst {
|
||||
* determine what device number
|
||||
* to report (real or virtual)
|
||||
*/
|
||||
|
||||
int rq_sendfile_ok; /* turned off in gss privacy
|
||||
* to prevent encrypting page
|
||||
* cache pages */
|
||||
wait_queue_head_t rq_wait; /* synchronization */
|
||||
};
|
||||
|
||||
|
||||
@@ -189,7 +189,6 @@ extern long vm_total_pages;
|
||||
|
||||
#ifdef CONFIG_NUMA
|
||||
extern int zone_reclaim_mode;
|
||||
extern int zone_reclaim_interval;
|
||||
extern int zone_reclaim(struct zone *, gfp_t, unsigned int);
|
||||
#else
|
||||
#define zone_reclaim_mode 0
|
||||
|
||||
@@ -157,7 +157,6 @@ struct tty_driver {
|
||||
struct cdev cdev;
|
||||
struct module *owner;
|
||||
const char *driver_name;
|
||||
const char *devfs_name;
|
||||
const char *name;
|
||||
int name_base; /* offset of printed name */
|
||||
int major; /* major device number */
|
||||
@@ -242,8 +241,15 @@ void tty_set_operations(struct tty_driver *driver, struct tty_operations *op);
|
||||
* is also a promise, if the above case is true, not to signal
|
||||
* overruns, either.)
|
||||
*
|
||||
* TTY_DRIVER_NO_DEVFS --- if set, do not create devfs entries. This
|
||||
* is only used by tty_register_driver().
|
||||
* TTY_DRIVER_DYNAMIC_DEV --- if set, the individual tty devices need
|
||||
* to be registered with a call to tty_register_driver() when the
|
||||
* device is found in the system and unregistered with a call to
|
||||
* tty_unregister_device() so the devices will be show up
|
||||
* properly in sysfs. If not set, driver->num entries will be
|
||||
* created by the tty core in sysfs when tty_register_driver() is
|
||||
* called. This is to be used by drivers that have tty devices
|
||||
* that can appear and disappear while the main tty driver is
|
||||
* registered with the tty core.
|
||||
*
|
||||
* TTY_DRIVER_DEVPTS_MEM -- don't use the standard arrays, instead
|
||||
* use dynamic memory keyed through the devpts filesystem. This
|
||||
@@ -252,7 +258,7 @@ void tty_set_operations(struct tty_driver *driver, struct tty_operations *op);
|
||||
#define TTY_DRIVER_INSTALLED 0x0001
|
||||
#define TTY_DRIVER_RESET_TERMIOS 0x0002
|
||||
#define TTY_DRIVER_REAL_RAW 0x0004
|
||||
#define TTY_DRIVER_NO_DEVFS 0x0008
|
||||
#define TTY_DRIVER_DYNAMIC_DEV 0x0008
|
||||
#define TTY_DRIVER_DEVPTS_MEM 0x0010
|
||||
|
||||
/* tty driver types */
|
||||
|
||||
@@ -177,8 +177,15 @@ typedef __u64 __bitwise __be64;
|
||||
|
||||
#ifdef __KERNEL__
|
||||
typedef unsigned __bitwise__ gfp_t;
|
||||
|
||||
#ifdef CONFIG_RESOURCES_64BIT
|
||||
typedef u64 resource_size_t;
|
||||
#else
|
||||
typedef u32 resource_size_t;
|
||||
#endif
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
struct ustat {
|
||||
__kernel_daddr_t f_tfree;
|
||||
__kernel_ino_t f_tinode;
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ struct udp_sock {
|
||||
unsigned int corkflag; /* Cork is required */
|
||||
__u16 encap_type; /* Is this an Encapsulation socket? */
|
||||
/*
|
||||
* Following member retains the infomation to create a UDP header
|
||||
* Following member retains the information to create a UDP header
|
||||
* when the socket is uncorked.
|
||||
*/
|
||||
__u16 len; /* total length of pending frames */
|
||||
|
||||
@@ -993,7 +993,7 @@ extern void ufs_panic (struct super_block *, const char *, const char *, ...) __
|
||||
extern struct inode_operations ufs_fast_symlink_inode_operations;
|
||||
|
||||
/* truncate.c */
|
||||
extern void ufs_truncate (struct inode *);
|
||||
extern int ufs_truncate (struct inode *, loff_t);
|
||||
|
||||
static inline struct ufs_sb_info *UFS_SB(struct super_block *sb)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,215 @@
|
||||
#ifndef _LINUX_VMSTAT_H
|
||||
#define _LINUX_VMSTAT_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/percpu.h>
|
||||
#include <linux/config.h>
|
||||
#include <linux/mmzone.h>
|
||||
#include <asm/atomic.h>
|
||||
|
||||
#ifdef CONFIG_VM_EVENT_COUNTERS
|
||||
/*
|
||||
* Light weight per cpu counter implementation.
|
||||
*
|
||||
* Counters should only be incremented and no critical kernel component
|
||||
* should rely on the counter values.
|
||||
*
|
||||
* Counters are handled completely inline. On many platforms the code
|
||||
* generated will simply be the increment of a global address.
|
||||
*/
|
||||
|
||||
#define FOR_ALL_ZONES(x) x##_DMA, x##_DMA32, x##_NORMAL, x##_HIGH
|
||||
|
||||
enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
|
||||
FOR_ALL_ZONES(PGALLOC),
|
||||
PGFREE, PGACTIVATE, PGDEACTIVATE,
|
||||
PGFAULT, PGMAJFAULT,
|
||||
FOR_ALL_ZONES(PGREFILL),
|
||||
FOR_ALL_ZONES(PGSTEAL),
|
||||
FOR_ALL_ZONES(PGSCAN_KSWAPD),
|
||||
FOR_ALL_ZONES(PGSCAN_DIRECT),
|
||||
PGINODESTEAL, SLABS_SCANNED, KSWAPD_STEAL, KSWAPD_INODESTEAL,
|
||||
PAGEOUTRUN, ALLOCSTALL, PGROTATED,
|
||||
NR_VM_EVENT_ITEMS
|
||||
};
|
||||
|
||||
struct vm_event_state {
|
||||
unsigned long event[NR_VM_EVENT_ITEMS];
|
||||
};
|
||||
|
||||
DECLARE_PER_CPU(struct vm_event_state, vm_event_states);
|
||||
|
||||
static inline void __count_vm_event(enum vm_event_item item)
|
||||
{
|
||||
__get_cpu_var(vm_event_states.event[item])++;
|
||||
}
|
||||
|
||||
static inline void count_vm_event(enum vm_event_item item)
|
||||
{
|
||||
get_cpu_var(vm_event_states.event[item])++;
|
||||
put_cpu();
|
||||
}
|
||||
|
||||
static inline void __count_vm_events(enum vm_event_item item, long delta)
|
||||
{
|
||||
__get_cpu_var(vm_event_states.event[item]) += delta;
|
||||
}
|
||||
|
||||
static inline void count_vm_events(enum vm_event_item item, long delta)
|
||||
{
|
||||
get_cpu_var(vm_event_states.event[item])++;
|
||||
put_cpu();
|
||||
}
|
||||
|
||||
extern void all_vm_events(unsigned long *);
|
||||
extern void vm_events_fold_cpu(int cpu);
|
||||
|
||||
#else
|
||||
|
||||
/* Disable counters */
|
||||
#define get_cpu_vm_events(e) 0L
|
||||
#define count_vm_event(e) do { } while (0)
|
||||
#define count_vm_events(e,d) do { } while (0)
|
||||
#define __count_vm_event(e) do { } while (0)
|
||||
#define __count_vm_events(e,d) do { } while (0)
|
||||
#define vm_events_fold_cpu(x) do { } while (0)
|
||||
|
||||
#endif /* CONFIG_VM_EVENT_COUNTERS */
|
||||
|
||||
#define __count_zone_vm_events(item, zone, delta) \
|
||||
__count_vm_events(item##_DMA + zone_idx(zone), delta)
|
||||
|
||||
/*
|
||||
* Zone based page accounting with per cpu differentials.
|
||||
*/
|
||||
extern atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS];
|
||||
|
||||
static inline void zone_page_state_add(long x, struct zone *zone,
|
||||
enum zone_stat_item item)
|
||||
{
|
||||
atomic_long_add(x, &zone->vm_stat[item]);
|
||||
atomic_long_add(x, &vm_stat[item]);
|
||||
}
|
||||
|
||||
static inline unsigned long global_page_state(enum zone_stat_item item)
|
||||
{
|
||||
long x = atomic_long_read(&vm_stat[item]);
|
||||
#ifdef CONFIG_SMP
|
||||
if (x < 0)
|
||||
x = 0;
|
||||
#endif
|
||||
return x;
|
||||
}
|
||||
|
||||
static inline unsigned long zone_page_state(struct zone *zone,
|
||||
enum zone_stat_item item)
|
||||
{
|
||||
long x = atomic_long_read(&zone->vm_stat[item]);
|
||||
#ifdef CONFIG_SMP
|
||||
if (x < 0)
|
||||
x = 0;
|
||||
#endif
|
||||
return x;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NUMA
|
||||
/*
|
||||
* Determine the per node value of a stat item. This function
|
||||
* is called frequently in a NUMA machine, so try to be as
|
||||
* frugal as possible.
|
||||
*/
|
||||
static inline unsigned long node_page_state(int node,
|
||||
enum zone_stat_item item)
|
||||
{
|
||||
struct zone *zones = NODE_DATA(node)->node_zones;
|
||||
|
||||
return
|
||||
#ifndef CONFIG_DMA_IS_NORMAL
|
||||
#if !defined(CONFIG_DMA_IS_DMA32) && BITS_PER_LONG >= 64
|
||||
zone_page_state(&zones[ZONE_DMA32], item) +
|
||||
#endif
|
||||
zone_page_state(&zones[ZONE_NORMAL], item) +
|
||||
#endif
|
||||
#ifdef CONFIG_HIGHMEM
|
||||
zone_page_state(&zones[ZONE_HIGHMEM], item) +
|
||||
#endif
|
||||
zone_page_state(&zones[ZONE_DMA], item);
|
||||
}
|
||||
|
||||
extern void zone_statistics(struct zonelist *, struct zone *);
|
||||
|
||||
#else
|
||||
|
||||
#define node_page_state(node, item) global_page_state(item)
|
||||
#define zone_statistics(_zl,_z) do { } while (0)
|
||||
|
||||
#endif /* CONFIG_NUMA */
|
||||
|
||||
#define __add_zone_page_state(__z, __i, __d) \
|
||||
__mod_zone_page_state(__z, __i, __d)
|
||||
#define __sub_zone_page_state(__z, __i, __d) \
|
||||
__mod_zone_page_state(__z, __i,-(__d))
|
||||
|
||||
#define add_zone_page_state(__z, __i, __d) mod_zone_page_state(__z, __i, __d)
|
||||
#define sub_zone_page_state(__z, __i, __d) mod_zone_page_state(__z, __i, -(__d))
|
||||
|
||||
static inline void zap_zone_vm_stats(struct zone *zone)
|
||||
{
|
||||
memset(zone->vm_stat, 0, sizeof(zone->vm_stat));
|
||||
}
|
||||
|
||||
extern void inc_zone_state(struct zone *, enum zone_stat_item);
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
void __mod_zone_page_state(struct zone *, enum zone_stat_item item, int);
|
||||
void __inc_zone_page_state(struct page *, enum zone_stat_item);
|
||||
void __dec_zone_page_state(struct page *, enum zone_stat_item);
|
||||
|
||||
void mod_zone_page_state(struct zone *, enum zone_stat_item, int);
|
||||
void inc_zone_page_state(struct page *, enum zone_stat_item);
|
||||
void dec_zone_page_state(struct page *, enum zone_stat_item);
|
||||
|
||||
extern void inc_zone_state(struct zone *, enum zone_stat_item);
|
||||
|
||||
void refresh_cpu_vm_stats(int);
|
||||
void refresh_vm_stats(void);
|
||||
|
||||
#else /* CONFIG_SMP */
|
||||
|
||||
/*
|
||||
* We do not maintain differentials in a single processor configuration.
|
||||
* The functions directly modify the zone and global counters.
|
||||
*/
|
||||
static inline void __mod_zone_page_state(struct zone *zone,
|
||||
enum zone_stat_item item, int delta)
|
||||
{
|
||||
zone_page_state_add(delta, zone, item);
|
||||
}
|
||||
|
||||
static inline void __inc_zone_page_state(struct page *page,
|
||||
enum zone_stat_item item)
|
||||
{
|
||||
atomic_long_inc(&page_zone(page)->vm_stat[item]);
|
||||
atomic_long_inc(&vm_stat[item]);
|
||||
}
|
||||
|
||||
static inline void __dec_zone_page_state(struct page *page,
|
||||
enum zone_stat_item item)
|
||||
{
|
||||
atomic_long_dec(&page_zone(page)->vm_stat[item]);
|
||||
atomic_long_dec(&vm_stat[item]);
|
||||
}
|
||||
|
||||
/*
|
||||
* We only use atomic operations to update counters. So there is no need to
|
||||
* disable interrupts.
|
||||
*/
|
||||
#define inc_zone_page_state __inc_zone_page_state
|
||||
#define dec_zone_page_state __dec_zone_page_state
|
||||
#define mod_zone_page_state __mod_zone_page_state
|
||||
|
||||
static inline void refresh_cpu_vm_stats(int cpu) { }
|
||||
static inline void refresh_vm_stats(void) { }
|
||||
#endif
|
||||
|
||||
#endif /* _LINUX_VMSTAT_H */
|
||||
Reference in New Issue
Block a user