Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts: drivers/usb/input/hid.h
This commit is contained in:
commit
bef986502f
4033 changed files with 157167 additions and 79875 deletions
|
@ -60,8 +60,6 @@ header-y += fadvise.h
|
|||
header-y += fd.h
|
||||
header-y += fdreg.h
|
||||
header-y += fib_rules.h
|
||||
header-y += ftape-header-segment.h
|
||||
header-y += ftape-vendors.h
|
||||
header-y += fuse.h
|
||||
header-y += futex.h
|
||||
header-y += genetlink.h
|
||||
|
@ -193,7 +191,6 @@ unifdef-y += cuda.h
|
|||
unifdef-y += cyclades.h
|
||||
unifdef-y += dccp.h
|
||||
unifdef-y += dirent.h
|
||||
unifdef-y += divert.h
|
||||
unifdef-y += dlm.h
|
||||
unifdef-y += elfcore.h
|
||||
unifdef-y += errno.h
|
||||
|
@ -207,7 +204,6 @@ unifdef-y += fcntl.h
|
|||
unifdef-y += filter.h
|
||||
unifdef-y += flat.h
|
||||
unifdef-y += fs.h
|
||||
unifdef-y += ftape.h
|
||||
unifdef-y += gameport.h
|
||||
unifdef-y += generic_serial.h
|
||||
unifdef-y += genhd.h
|
||||
|
@ -225,6 +221,7 @@ unifdef-y += if_bridge.h
|
|||
unifdef-y += if_ec.h
|
||||
unifdef-y += if_eql.h
|
||||
unifdef-y += if_ether.h
|
||||
unifdef-y += if_fddi.h
|
||||
unifdef-y += if_frad.h
|
||||
unifdef-y += if_ltalk.h
|
||||
unifdef-y += if_pppox.h
|
||||
|
@ -286,6 +283,7 @@ unifdef-y += nvram.h
|
|||
unifdef-y += parport.h
|
||||
unifdef-y += patchkey.h
|
||||
unifdef-y += pci.h
|
||||
unifdef-y += personality.h
|
||||
unifdef-y += pktcdvd.h
|
||||
unifdef-y += pmu.h
|
||||
unifdef-y += poll.h
|
||||
|
@ -341,7 +339,7 @@ unifdef-y += videodev.h
|
|||
unifdef-y += wait.h
|
||||
unifdef-y += wanrouter.h
|
||||
unifdef-y += watchdog.h
|
||||
unifdef-y += wireless.h
|
||||
unifdef-y += xfrm.h
|
||||
unifdef-y += zftape.h
|
||||
|
||||
objhdr-y += version.h
|
||||
|
|
|
@ -119,6 +119,7 @@ struct acct_v3
|
|||
#ifdef CONFIG_BSD_PROCESS_ACCT
|
||||
struct vfsmount;
|
||||
struct super_block;
|
||||
struct pacct_struct;
|
||||
extern void acct_auto_close_mnt(struct vfsmount *m);
|
||||
extern void acct_auto_close(struct super_block *sb);
|
||||
extern void acct_init_pacct(struct pacct_struct *pacct);
|
||||
|
|
|
@ -111,7 +111,6 @@ struct kiocb {
|
|||
size_t ki_nbytes; /* copy of iocb->aio_nbytes */
|
||||
char __user *ki_buf; /* remaining iocb->aio_buf */
|
||||
size_t ki_left; /* remaining bytes */
|
||||
long ki_retried; /* just for testing */
|
||||
struct iovec ki_inline_vec; /* inline vector */
|
||||
struct iovec *ki_iovec;
|
||||
unsigned long ki_nr_segs;
|
||||
|
@ -194,7 +193,7 @@ struct kioctx {
|
|||
|
||||
struct aio_ring_info ring_info;
|
||||
|
||||
struct work_struct wq;
|
||||
struct delayed_work wq;
|
||||
};
|
||||
|
||||
/* prototypes */
|
||||
|
@ -238,7 +237,6 @@ do { \
|
|||
} while (0)
|
||||
|
||||
#define io_wait_to_kiocb(wait) container_of(wait, struct kiocb, ki_wait)
|
||||
#define is_retried_kiocb(iocb) ((iocb)->ki_retried > 1)
|
||||
|
||||
#include <linux/aio_abi.h>
|
||||
|
||||
|
|
|
@ -200,8 +200,9 @@ enum {
|
|||
ATA_CBL_NONE = 0,
|
||||
ATA_CBL_PATA40 = 1,
|
||||
ATA_CBL_PATA80 = 2,
|
||||
ATA_CBL_PATA_UNK = 3,
|
||||
ATA_CBL_SATA = 4,
|
||||
ATA_CBL_PATA40_SHORT = 3, /* 40 wire cable to high UDMA spec */
|
||||
ATA_CBL_PATA_UNK = 4,
|
||||
ATA_CBL_SATA = 5,
|
||||
|
||||
/* SATA Status and Control Registers */
|
||||
SCR_STATUS = 0,
|
||||
|
@ -342,6 +343,15 @@ static inline int ata_id_is_cfa(const u16 *id)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline int ata_drive_40wire(const u16 *dev_id)
|
||||
{
|
||||
if (ata_id_major_version(dev_id) >= 5 && ata_id_is_sata(dev_id))
|
||||
return 0; /* SATA */
|
||||
if (dev_id[93] & 0x4000)
|
||||
return 0; /* 80 wire */
|
||||
return 1;
|
||||
}
|
||||
|
||||
static inline int atapi_cdb_len(const u16 *dev_id)
|
||||
{
|
||||
u16 tmp = dev_id[0] & 0x3;
|
||||
|
|
|
@ -37,7 +37,7 @@ enum atmarp_ctrl_type {
|
|||
struct atmarp_ctrl {
|
||||
enum atmarp_ctrl_type type; /* message type */
|
||||
int itf_num;/* interface number (if present) */
|
||||
uint32_t ip; /* IP address (act_need only) */
|
||||
__be32 ip; /* IP address (act_need only) */
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -86,8 +86,8 @@ struct atm_backend_br2684 {
|
|||
* efficient per-if in/out filters, this support will be removed
|
||||
*/
|
||||
struct br2684_filter {
|
||||
__u32 prefix; /* network byte order */
|
||||
__u32 netmask; /* 0 = disable filter */
|
||||
__be32 prefix; /* network byte order */
|
||||
__be32 netmask; /* 0 = disable filter */
|
||||
};
|
||||
|
||||
struct br2684_filter_set {
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
struct atmmpc_ioc {
|
||||
int dev_num;
|
||||
uint32_t ipaddr; /* the IP address of the shortcut */
|
||||
__be32 ipaddr; /* the IP address of the shortcut */
|
||||
int type; /* ingress or egress */
|
||||
};
|
||||
|
||||
|
@ -21,8 +21,8 @@ typedef struct in_ctrl_info {
|
|||
uint8_t Last_NHRP_CIE_code;
|
||||
uint8_t Last_Q2931_cause_value;
|
||||
uint8_t eg_MPC_ATM_addr[ATM_ESA_LEN];
|
||||
uint32_t tag;
|
||||
uint32_t in_dst_ip; /* IP address this ingress MPC sends packets to */
|
||||
__be32 tag;
|
||||
__be32 in_dst_ip; /* IP address this ingress MPC sends packets to */
|
||||
uint16_t holding_time;
|
||||
uint32_t request_id;
|
||||
} in_ctrl_info;
|
||||
|
@ -30,10 +30,10 @@ typedef struct in_ctrl_info {
|
|||
typedef struct eg_ctrl_info {
|
||||
uint8_t DLL_header[256];
|
||||
uint8_t DH_length;
|
||||
uint32_t cache_id;
|
||||
uint32_t tag;
|
||||
uint32_t mps_ip;
|
||||
uint32_t eg_dst_ip; /* IP address to which ingress MPC sends packets */
|
||||
__be32 cache_id;
|
||||
__be32 tag;
|
||||
__be32 mps_ip;
|
||||
__be32 eg_dst_ip; /* IP address to which ingress MPC sends packets */
|
||||
uint8_t in_MPC_data_ATM_addr[ATM_ESA_LEN];
|
||||
uint16_t holding_time;
|
||||
} eg_ctrl_info;
|
||||
|
@ -49,7 +49,7 @@ struct mpc_parameters {
|
|||
|
||||
struct k_message {
|
||||
uint16_t type;
|
||||
uint32_t ip_mask;
|
||||
__be32 ip_mask;
|
||||
uint8_t MPS_ctrl[ATM_ESA_LEN];
|
||||
union {
|
||||
in_ctrl_info in_info;
|
||||
|
|
|
@ -101,6 +101,10 @@
|
|||
#define AUDIT_MAC_CIPSOV4_DEL 1408 /* NetLabel: del CIPSOv4 DOI entry */
|
||||
#define AUDIT_MAC_MAP_ADD 1409 /* NetLabel: add LSM domain mapping */
|
||||
#define AUDIT_MAC_MAP_DEL 1410 /* NetLabel: del LSM domain mapping */
|
||||
#define AUDIT_MAC_IPSEC_ADDSA 1411 /* Add a XFRM state */
|
||||
#define AUDIT_MAC_IPSEC_DELSA 1412 /* Delete a XFRM state */
|
||||
#define AUDIT_MAC_IPSEC_ADDSPD 1413 /* Add a XFRM policy */
|
||||
#define AUDIT_MAC_IPSEC_DELSPD 1414 /* Delete a XFRM policy */
|
||||
|
||||
#define AUDIT_FIRST_KERN_ANOM_MSG 1700
|
||||
#define AUDIT_LAST_KERN_ANOM_MSG 1799
|
||||
|
@ -377,6 +381,7 @@ extern void auditsc_get_stamp(struct audit_context *ctx,
|
|||
struct timespec *t, unsigned int *serial);
|
||||
extern int audit_set_loginuid(struct task_struct *task, uid_t loginuid);
|
||||
extern uid_t audit_get_loginuid(struct audit_context *ctx);
|
||||
extern void audit_log_task_context(struct audit_buffer *ab);
|
||||
extern int __audit_ipc_obj(struct kern_ipc_perm *ipcp);
|
||||
extern int __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode);
|
||||
extern int audit_bprm(struct linux_binprm *bprm);
|
||||
|
@ -449,6 +454,7 @@ extern int audit_n_rules;
|
|||
#define audit_inode_update(i) do { ; } while (0)
|
||||
#define auditsc_get_stamp(c,t,s) do { BUG(); } while (0)
|
||||
#define audit_get_loginuid(c) ({ -1; })
|
||||
#define audit_log_task_context(b) do { ; } while (0)
|
||||
#define audit_ipc_obj(i) ({ 0; })
|
||||
#define audit_ipc_set_perm(q,u,g,m) ({ 0; })
|
||||
#define audit_bprm(p) ({ 0; })
|
||||
|
|
|
@ -678,10 +678,11 @@ extern void __blk_stop_queue(request_queue_t *q);
|
|||
extern void blk_run_queue(request_queue_t *);
|
||||
extern void blk_start_queueing(request_queue_t *);
|
||||
extern void blk_queue_activity_fn(request_queue_t *, activity_fn *, void *);
|
||||
extern int blk_rq_map_user(request_queue_t *, struct request *, void __user *, unsigned int);
|
||||
extern int blk_rq_unmap_user(struct bio *, unsigned int);
|
||||
extern int blk_rq_map_user(request_queue_t *, struct request *, void __user *, unsigned long);
|
||||
extern int blk_rq_unmap_user(struct request *);
|
||||
extern int blk_rq_map_kern(request_queue_t *, struct request *, void *, unsigned int, gfp_t);
|
||||
extern int blk_rq_map_user_iov(request_queue_t *, struct request *, struct sg_iovec *, int);
|
||||
extern int blk_rq_map_user_iov(request_queue_t *, struct request *,
|
||||
struct sg_iovec *, int, unsigned int);
|
||||
extern int blk_execute_rq(request_queue_t *, struct gendisk *,
|
||||
struct request *, int);
|
||||
extern void blk_execute_rq_nowait(request_queue_t *, struct gendisk *,
|
||||
|
|
|
@ -49,6 +49,15 @@ enum blktrace_act {
|
|||
__BLK_TA_REMAP, /* bio was remapped */
|
||||
};
|
||||
|
||||
/*
|
||||
* Notify events.
|
||||
*/
|
||||
enum blktrace_notify {
|
||||
__BLK_TN_PROCESS = 0, /* establish pid/name mapping */
|
||||
__BLK_TN_TIMESTAMP, /* include system clock */
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Trace actions in full. Additionally, read or write is masked
|
||||
*/
|
||||
|
@ -68,6 +77,9 @@ enum blktrace_act {
|
|||
#define BLK_TA_BOUNCE (__BLK_TA_BOUNCE)
|
||||
#define BLK_TA_REMAP (__BLK_TA_REMAP | BLK_TC_ACT(BLK_TC_QUEUE))
|
||||
|
||||
#define BLK_TN_PROCESS (__BLK_TN_PROCESS | BLK_TC_ACT(BLK_TC_NOTIFY))
|
||||
#define BLK_TN_TIMESTAMP (__BLK_TN_TIMESTAMP | BLK_TC_ACT(BLK_TC_NOTIFY))
|
||||
|
||||
#define BLK_IO_TRACE_MAGIC 0x65617400
|
||||
#define BLK_IO_TRACE_VERSION 0x07
|
||||
|
||||
|
|
|
@ -119,8 +119,7 @@ extern void *alloc_large_system_hash(const char *tablename,
|
|||
unsigned int *_hash_mask,
|
||||
unsigned long limit);
|
||||
|
||||
#define HASH_HIGHMEM 0x00000001 /* Consider highmem? */
|
||||
#define HASH_EARLY 0x00000002 /* Allocating during early boot? */
|
||||
#define HASH_EARLY 0x00000001 /* Allocating during early boot? */
|
||||
|
||||
/* Only NUMA needs hash distribution.
|
||||
* IA64 is known to have sufficient vmalloc space.
|
||||
|
|
10
include/linux/bottom_half.h
Normal file
10
include/linux/bottom_half.h
Normal file
|
@ -0,0 +1,10 @@
|
|||
#ifndef _LINUX_BH_H
|
||||
#define _LINUX_BH_H
|
||||
|
||||
extern void local_bh_disable(void);
|
||||
extern void __local_bh_enable(void);
|
||||
extern void _local_bh_enable(void);
|
||||
extern void local_bh_enable(void);
|
||||
extern void local_bh_enable_ip(unsigned long ip);
|
||||
|
||||
#endif /* _LINUX_BH_H */
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* Fast, simple, yet decent quality random number generator based on
|
||||
* a paper by David G. Carta ("Two Fast Implementations of the
|
||||
* `Minimal Standard' Random Number Generator," Communications of the
|
||||
* ACM, January, 1990).
|
||||
*
|
||||
* Copyright (c) 2002-2006 Hewlett-Packard Development Company, L.P.
|
||||
* Contributed by Stephane Eranian <eranian@hpl.hp.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of version 2 of the GNU General Public
|
||||
* License as published by the Free Software Foundation.
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
#ifndef _LINUX_CARTA_RANDOM32_H_
|
||||
#define _LINUX_CARTA_RANDOM32_H_
|
||||
|
||||
u64 carta_random32(u64 seed);
|
||||
|
||||
#endif /* _LINUX_CARTA_RANDOM32_H_ */
|
|
@ -80,7 +80,7 @@ typedef __u32 DriverVer_type;
|
|||
#define HWORD __u16
|
||||
#define DWORD __u32
|
||||
|
||||
#define CISS_MAX_LUN 16
|
||||
#define CISS_MAX_LUN 1024
|
||||
|
||||
#define LEVEL2LUN 1 // index into Target(x) structure, due to byte swapping
|
||||
#define LEVEL3LUN 0
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
#define _LINUX_CDEV_H
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#include <linux/kobject.h>
|
||||
#include <linux/kdev_t.h>
|
||||
#include <linux/list.h>
|
||||
|
||||
struct cdev {
|
||||
struct kobject kobj;
|
||||
struct module *owner;
|
||||
|
|
|
@ -133,7 +133,7 @@ struct cn_callback_data {
|
|||
struct cn_callback_entry {
|
||||
struct list_head callback_entry;
|
||||
struct cn_callback *cb;
|
||||
struct work_struct work;
|
||||
struct delayed_work work;
|
||||
struct cn_queue_dev *pdev;
|
||||
|
||||
struct cn_callback_id id;
|
||||
|
@ -170,7 +170,7 @@ void cn_queue_free_dev(struct cn_queue_dev *dev);
|
|||
|
||||
int cn_cb_equal(struct cb_id *, struct cb_id *);
|
||||
|
||||
void cn_queue_wrapper(void *data);
|
||||
void cn_queue_wrapper(struct work_struct *work);
|
||||
|
||||
extern int cn_already_initialized;
|
||||
|
||||
|
|
|
@ -24,15 +24,24 @@
|
|||
#include <linux/compiler.h>
|
||||
#include <linux/cpumask.h>
|
||||
#include <asm/semaphore.h>
|
||||
#include <linux/mutex.h>
|
||||
|
||||
struct cpu {
|
||||
int node_id; /* The node which contains the CPU */
|
||||
int no_control; /* Should the sysfs control file be created? */
|
||||
int hotpluggable; /* creates sysfs control file if hotpluggable */
|
||||
struct sys_device sysdev;
|
||||
};
|
||||
|
||||
extern int register_cpu(struct cpu *cpu, int num);
|
||||
extern struct sys_device *get_cpu_sysdev(unsigned cpu);
|
||||
|
||||
extern int cpu_add_sysdev_attr(struct sysdev_attribute *attr);
|
||||
extern void cpu_remove_sysdev_attr(struct sysdev_attribute *attr);
|
||||
|
||||
extern int cpu_add_sysdev_attr_group(struct attribute_group *attrs);
|
||||
extern void cpu_remove_sysdev_attr_group(struct attribute_group *attrs);
|
||||
|
||||
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
extern void unregister_cpu(struct cpu *cpu);
|
||||
#endif
|
||||
|
@ -66,6 +75,17 @@ extern struct sysdev_class cpu_sysdev_class;
|
|||
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
/* Stop CPUs going up and down. */
|
||||
|
||||
static inline void cpuhotplug_mutex_lock(struct mutex *cpu_hp_mutex)
|
||||
{
|
||||
mutex_lock(cpu_hp_mutex);
|
||||
}
|
||||
|
||||
static inline void cpuhotplug_mutex_unlock(struct mutex *cpu_hp_mutex)
|
||||
{
|
||||
mutex_unlock(cpu_hp_mutex);
|
||||
}
|
||||
|
||||
extern void lock_cpu_hotplug(void);
|
||||
extern void unlock_cpu_hotplug(void);
|
||||
#define hotcpu_notifier(fn, pri) { \
|
||||
|
@ -77,17 +97,24 @@ extern void unlock_cpu_hotplug(void);
|
|||
#define unregister_hotcpu_notifier(nb) unregister_cpu_notifier(nb)
|
||||
int cpu_down(unsigned int cpu);
|
||||
#define cpu_is_offline(cpu) unlikely(!cpu_online(cpu))
|
||||
#else
|
||||
|
||||
#else /* CONFIG_HOTPLUG_CPU */
|
||||
|
||||
static inline void cpuhotplug_mutex_lock(struct mutex *cpu_hp_mutex)
|
||||
{ }
|
||||
static inline void cpuhotplug_mutex_unlock(struct mutex *cpu_hp_mutex)
|
||||
{ }
|
||||
|
||||
#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) do { } while (0)
|
||||
#define register_hotcpu_notifier(nb) do { } while (0)
|
||||
#define unregister_hotcpu_notifier(nb) do { } while (0)
|
||||
#define hotcpu_notifier(fn, pri) do { (void)(fn); } while (0)
|
||||
#define register_hotcpu_notifier(nb) do { (void)(nb); } while (0)
|
||||
#define unregister_hotcpu_notifier(nb) do { (void)(nb); } 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; }
|
||||
#endif
|
||||
#endif /* CONFIG_HOTPLUG_CPU */
|
||||
|
||||
#ifdef CONFIG_SUSPEND_SMP
|
||||
extern int disable_nonboot_cpus(void);
|
||||
|
|
|
@ -23,6 +23,7 @@ extern void cpuset_fork(struct task_struct *p);
|
|||
extern void cpuset_exit(struct task_struct *p);
|
||||
extern cpumask_t cpuset_cpus_allowed(struct task_struct *p);
|
||||
extern nodemask_t cpuset_mems_allowed(struct task_struct *p);
|
||||
#define cpuset_current_mems_allowed (current->mems_allowed)
|
||||
void cpuset_init_current_mems_allowed(void);
|
||||
void cpuset_update_task_memory_state(void);
|
||||
#define cpuset_nodes_subset_current_mems_allowed(nodes) \
|
||||
|
@ -45,7 +46,7 @@ extern int cpuset_excl_nodes_overlap(const struct task_struct *p);
|
|||
extern int cpuset_memory_pressure_enabled;
|
||||
extern void __cpuset_memory_pressure_bump(void);
|
||||
|
||||
extern struct file_operations proc_cpuset_operations;
|
||||
extern const struct file_operations proc_cpuset_operations;
|
||||
extern char *cpuset_task_status_allowed(struct task_struct *task, char *buffer);
|
||||
|
||||
extern void cpuset_lock(void);
|
||||
|
@ -83,6 +84,7 @@ static inline nodemask_t cpuset_mems_allowed(struct task_struct *p)
|
|||
return node_possible_map;
|
||||
}
|
||||
|
||||
#define cpuset_current_mems_allowed (node_online_map)
|
||||
static inline void cpuset_init_current_mems_allowed(void) {}
|
||||
static inline void cpuset_update_task_memory_state(void) {}
|
||||
#define cpuset_nodes_subset_current_mems_allowed(nodes) (1)
|
||||
|
|
|
@ -241,12 +241,8 @@ int crypto_unregister_alg(struct crypto_alg *alg);
|
|||
* Algorithm query interface.
|
||||
*/
|
||||
#ifdef CONFIG_CRYPTO
|
||||
int crypto_alg_available(const char *name, u32 flags)
|
||||
__deprecated_for_modules;
|
||||
int crypto_has_alg(const char *name, u32 type, u32 mask);
|
||||
#else
|
||||
static int crypto_alg_available(const char *name, u32 flags);
|
||||
__deprecated_for_modules;
|
||||
static inline int crypto_alg_available(const char *name, u32 flags)
|
||||
{
|
||||
return 0;
|
||||
|
@ -707,16 +703,6 @@ static inline void crypto_cipher_decrypt_one(struct crypto_cipher *tfm,
|
|||
dst, src);
|
||||
}
|
||||
|
||||
void crypto_digest_init(struct crypto_tfm *tfm) __deprecated_for_modules;
|
||||
void crypto_digest_update(struct crypto_tfm *tfm,
|
||||
struct scatterlist *sg, unsigned int nsg)
|
||||
__deprecated_for_modules;
|
||||
void crypto_digest_final(struct crypto_tfm *tfm, u8 *out)
|
||||
__deprecated_for_modules;
|
||||
void crypto_digest_digest(struct crypto_tfm *tfm,
|
||||
struct scatterlist *sg, unsigned int nsg, u8 *out)
|
||||
__deprecated_for_modules;
|
||||
|
||||
static inline struct crypto_hash *__crypto_hash_cast(struct crypto_tfm *tfm)
|
||||
{
|
||||
return (struct crypto_hash *)tfm;
|
||||
|
@ -729,14 +715,6 @@ static inline struct crypto_hash *crypto_hash_cast(struct crypto_tfm *tfm)
|
|||
return __crypto_hash_cast(tfm);
|
||||
}
|
||||
|
||||
static int crypto_digest_setkey(struct crypto_tfm *tfm, const u8 *key,
|
||||
unsigned int keylen) __deprecated;
|
||||
static inline int crypto_digest_setkey(struct crypto_tfm *tfm,
|
||||
const u8 *key, unsigned int keylen)
|
||||
{
|
||||
return tfm->crt_hash.setkey(crypto_hash_cast(tfm), key, keylen);
|
||||
}
|
||||
|
||||
static inline struct crypto_hash *crypto_alloc_hash(const char *alg_name,
|
||||
u32 type, u32 mask)
|
||||
{
|
||||
|
|
|
@ -30,7 +30,7 @@ struct dccp_hdr {
|
|||
#else
|
||||
#error "Adjust your <asm/byteorder.h> defines"
|
||||
#endif
|
||||
__u16 dccph_checksum;
|
||||
__sum16 dccph_checksum;
|
||||
#if defined(__LITTLE_ENDIAN_BITFIELD)
|
||||
__u8 dccph_x:1,
|
||||
dccph_type:4,
|
||||
|
@ -175,17 +175,21 @@ enum {
|
|||
DCCPC_CCID3 = 3,
|
||||
};
|
||||
|
||||
/* DCCP features */
|
||||
enum {
|
||||
DCCPF_RESERVED = 0,
|
||||
DCCPF_CCID = 1,
|
||||
DCCPF_SEQUENCE_WINDOW = 3,
|
||||
DCCPF_ACK_RATIO = 5,
|
||||
DCCPF_SEND_ACK_VECTOR = 6,
|
||||
DCCPF_SEND_NDP_COUNT = 7,
|
||||
/* 10-127 reserved */
|
||||
DCCPF_MIN_CCID_SPECIFIC = 128,
|
||||
DCCPF_MAX_CCID_SPECIFIC = 255,
|
||||
/* DCCP features (RFC 4340 section 6.4) */
|
||||
enum {
|
||||
DCCPF_RESERVED = 0,
|
||||
DCCPF_CCID = 1,
|
||||
DCCPF_SHORT_SEQNOS = 2, /* XXX: not yet implemented */
|
||||
DCCPF_SEQUENCE_WINDOW = 3,
|
||||
DCCPF_ECN_INCAPABLE = 4, /* XXX: not yet implemented */
|
||||
DCCPF_ACK_RATIO = 5,
|
||||
DCCPF_SEND_ACK_VECTOR = 6,
|
||||
DCCPF_SEND_NDP_COUNT = 7,
|
||||
DCCPF_MIN_CSUM_COVER = 8,
|
||||
DCCPF_DATA_CHECKSUM = 9, /* XXX: not yet implemented */
|
||||
/* 10-127 reserved */
|
||||
DCCPF_MIN_CCID_SPECIFIC = 128,
|
||||
DCCPF_MAX_CCID_SPECIFIC = 255,
|
||||
};
|
||||
|
||||
/* this structure is argument to DCCP_SOCKOPT_CHANGE_X */
|
||||
|
@ -196,13 +200,16 @@ struct dccp_so_feat {
|
|||
};
|
||||
|
||||
/* DCCP socket options */
|
||||
#define DCCP_SOCKOPT_PACKET_SIZE 1
|
||||
#define DCCP_SOCKOPT_PACKET_SIZE 1 /* XXX deprecated, without effect */
|
||||
#define DCCP_SOCKOPT_SERVICE 2
|
||||
#define DCCP_SOCKOPT_CHANGE_L 3
|
||||
#define DCCP_SOCKOPT_CHANGE_R 4
|
||||
#define DCCP_SOCKOPT_SEND_CSCOV 10
|
||||
#define DCCP_SOCKOPT_RECV_CSCOV 11
|
||||
#define DCCP_SOCKOPT_CCID_RX_INFO 128
|
||||
#define DCCP_SOCKOPT_CCID_TX_INFO 192
|
||||
|
||||
/* maximum number of services provided on the same listening port */
|
||||
#define DCCP_SERVICE_LIST_MAX_LEN 32
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
@ -256,6 +263,13 @@ static inline struct dccp_hdr *dccp_hdr(const struct sk_buff *skb)
|
|||
return (struct dccp_hdr *)skb->h.raw;
|
||||
}
|
||||
|
||||
static inline struct dccp_hdr *dccp_zeroed_hdr(struct sk_buff *skb, int headlen)
|
||||
{
|
||||
skb->h.raw = skb_push(skb, headlen);
|
||||
memset(skb->h.raw, 0, headlen);
|
||||
return dccp_hdr(skb);
|
||||
}
|
||||
|
||||
static inline struct dccp_hdr_ext *dccp_hdrx(const struct sk_buff *skb)
|
||||
{
|
||||
return (struct dccp_hdr_ext *)(skb->h.raw + sizeof(struct dccp_hdr));
|
||||
|
@ -342,6 +356,9 @@ static inline unsigned int dccp_hdr_len(const struct sk_buff *skb)
|
|||
* @dccpms_ccid - Congestion Control Id (CCID) (section 10)
|
||||
* @dccpms_send_ack_vector - Send Ack Vector Feature (section 11.5)
|
||||
* @dccpms_send_ndp_count - Send NDP Count Feature (7.7.2)
|
||||
* @dccpms_ack_ratio - Ack Ratio Feature (section 11.3)
|
||||
* @dccpms_pending - List of features being negotiated
|
||||
* @dccpms_conf -
|
||||
*/
|
||||
struct dccp_minisock {
|
||||
__u64 dccpms_sequence_window;
|
||||
|
@ -439,12 +456,25 @@ struct dccp_ackvec;
|
|||
* @dccps_gss - greatest sequence number sent
|
||||
* @dccps_gsr - greatest valid sequence number received
|
||||
* @dccps_gar - greatest valid ack number received on a non-Sync; initialized to %dccps_iss
|
||||
* @dccps_service - first (passive sock) or unique (active sock) service code
|
||||
* @dccps_service_list - second .. last service code on passive socket
|
||||
* @dccps_timestamp_time - time of latest TIMESTAMP option
|
||||
* @dccps_timestamp_echo - latest timestamp received on a TIMESTAMP option
|
||||
* @dccps_packet_size - Set thru setsockopt
|
||||
* @dccps_role - Role of this sock, one of %dccp_role
|
||||
* @dccps_l_ack_ratio -
|
||||
* @dccps_r_ack_ratio -
|
||||
* @dccps_pcslen - sender partial checksum coverage (via sockopt)
|
||||
* @dccps_pcrlen - receiver partial checksum coverage (via sockopt)
|
||||
* @dccps_ndp_count - number of Non Data Packets since last data packet
|
||||
* @dccps_mss_cache -
|
||||
* @dccps_minisock -
|
||||
* @dccps_hc_rx_ackvec - rx half connection ack vector
|
||||
* @dccps_hc_rx_ccid -
|
||||
* @dccps_hc_tx_ccid -
|
||||
* @dccps_options_received -
|
||||
* @dccps_epoch -
|
||||
* @dccps_role - Role of this sock, one of %dccp_role
|
||||
* @dccps_hc_rx_insert_options -
|
||||
* @dccps_hc_tx_insert_options -
|
||||
* @dccps_xmit_timer - timer for when CCID is not ready to send
|
||||
*/
|
||||
struct dccp_sock {
|
||||
|
@ -464,9 +494,10 @@ struct dccp_sock {
|
|||
struct dccp_service_list *dccps_service_list;
|
||||
struct timeval dccps_timestamp_time;
|
||||
__u32 dccps_timestamp_echo;
|
||||
__u32 dccps_packet_size;
|
||||
__u16 dccps_l_ack_ratio;
|
||||
__u16 dccps_r_ack_ratio;
|
||||
__u16 dccps_pcslen;
|
||||
__u16 dccps_pcrlen;
|
||||
unsigned long dccps_ndp_count;
|
||||
__u32 dccps_mss_cache;
|
||||
struct dccp_minisock dccps_minisock;
|
||||
|
|
|
@ -24,7 +24,7 @@ extern int debug_locks_off(void);
|
|||
int __ret = 0; \
|
||||
\
|
||||
if (unlikely(c)) { \
|
||||
if (debug_locks_off()) \
|
||||
if (debug_locks_silent || debug_locks_off()) \
|
||||
WARN_ON(1); \
|
||||
__ret = 1; \
|
||||
} \
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#ifdef CONFIG_TASK_DELAY_ACCT
|
||||
|
||||
extern int delayacct_on; /* Delay accounting turned on/off */
|
||||
extern kmem_cache_t *delayacct_cache;
|
||||
extern struct kmem_cache *delayacct_cache;
|
||||
extern void delayacct_init(void);
|
||||
extern void __delayacct_tsk_init(struct task_struct *);
|
||||
extern void __delayacct_tsk_exit(struct task_struct *);
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include <linux/pm.h>
|
||||
#include <asm/semaphore.h>
|
||||
#include <asm/atomic.h>
|
||||
#include <asm/device.h>
|
||||
|
||||
#define DEVICE_NAME_SIZE 50
|
||||
#define DEVICE_NAME_HALF __stringify(20) /* Less than half to accommodate slop */
|
||||
|
@ -42,6 +43,8 @@ struct bus_type {
|
|||
struct klist klist_devices;
|
||||
struct klist klist_drivers;
|
||||
|
||||
struct blocking_notifier_head bus_notifier;
|
||||
|
||||
struct bus_attribute * bus_attrs;
|
||||
struct device_attribute * dev_attrs;
|
||||
struct driver_attribute * drv_attrs;
|
||||
|
@ -75,6 +78,29 @@ int __must_check bus_for_each_drv(struct bus_type *bus,
|
|||
struct device_driver *start, void *data,
|
||||
int (*fn)(struct device_driver *, void *));
|
||||
|
||||
/*
|
||||
* Bus notifiers: Get notified of addition/removal of devices
|
||||
* and binding/unbinding of drivers to devices.
|
||||
* In the long run, it should be a replacement for the platform
|
||||
* notify hooks.
|
||||
*/
|
||||
struct notifier_block;
|
||||
|
||||
extern int bus_register_notifier(struct bus_type *bus,
|
||||
struct notifier_block *nb);
|
||||
extern int bus_unregister_notifier(struct bus_type *bus,
|
||||
struct notifier_block *nb);
|
||||
|
||||
/* All 4 notifers below get called with the target struct device *
|
||||
* as an argument. Note that those functions are likely to be called
|
||||
* with the device semaphore held in the core, so be careful.
|
||||
*/
|
||||
#define BUS_NOTIFY_ADD_DEVICE 0x00000001 /* device added */
|
||||
#define BUS_NOTIFY_DEL_DEVICE 0x00000002 /* device removed */
|
||||
#define BUS_NOTIFY_BOUND_DRIVER 0x00000003 /* driver bound to device */
|
||||
#define BUS_NOTIFY_UNBIND_DRIVER 0x00000004 /* driver about to be
|
||||
unbound */
|
||||
|
||||
/* driverfs interface for exporting bus attributes */
|
||||
|
||||
struct bus_attribute {
|
||||
|
@ -343,10 +369,11 @@ struct device {
|
|||
void *driver_data; /* data private to the driver */
|
||||
void *platform_data; /* Platform specific data, device
|
||||
core doesn't touch it */
|
||||
void *firmware_data; /* Firmware specific data (e.g. ACPI,
|
||||
BIOS data),reserved for device core*/
|
||||
struct dev_pm_info power;
|
||||
|
||||
#ifdef CONFIG_NUMA
|
||||
int numa_node; /* NUMA node this device is close to */
|
||||
#endif
|
||||
u64 *dma_mask; /* dma mask (if dma'able device) */
|
||||
u64 coherent_dma_mask;/* Like dma_mask, but for
|
||||
alloc_coherent mappings as
|
||||
|
@ -358,6 +385,8 @@ struct device {
|
|||
|
||||
struct dma_coherent_mem *dma_mem; /* internal for coherent mem
|
||||
override */
|
||||
/* arch specific additions */
|
||||
struct dev_archdata archdata;
|
||||
|
||||
/* class_device migration path */
|
||||
struct list_head node;
|
||||
|
@ -368,6 +397,25 @@ struct device {
|
|||
void (*release)(struct device * dev);
|
||||
};
|
||||
|
||||
#ifdef CONFIG_NUMA
|
||||
static inline int dev_to_node(struct device *dev)
|
||||
{
|
||||
return dev->numa_node;
|
||||
}
|
||||
static inline void set_dev_node(struct device *dev, int node)
|
||||
{
|
||||
dev->numa_node = node;
|
||||
}
|
||||
#else
|
||||
static inline int dev_to_node(struct device *dev)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
static inline void set_dev_node(struct device *dev, int node)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline void *
|
||||
dev_get_drvdata (struct device *dev)
|
||||
{
|
||||
|
@ -395,7 +443,10 @@ extern int __must_check device_add(struct device * dev);
|
|||
extern void device_del(struct device * dev);
|
||||
extern int device_for_each_child(struct device *, void *,
|
||||
int (*fn)(struct device *, void *));
|
||||
extern struct device *device_find_child(struct device *, void *data,
|
||||
int (*match)(struct device *, void *));
|
||||
extern int device_rename(struct device *dev, char *new_name);
|
||||
extern int device_move(struct device *dev, struct device *new_parent);
|
||||
|
||||
/*
|
||||
* Manual binding of a device to driver. See drivers/base/bus.c
|
||||
|
@ -415,8 +466,6 @@ extern struct device *device_create(struct class *cls, struct device *parent,
|
|||
__attribute__((format(printf,4,5)));
|
||||
extern void device_destroy(struct class *cls, dev_t devt);
|
||||
|
||||
extern int virtual_device_parent(struct device *dev);
|
||||
|
||||
/*
|
||||
* Platform "fixup" functions - allow the platform to have their say
|
||||
* about devices and actions that the general device layer doesn't
|
||||
|
|
|
@ -1,132 +0,0 @@
|
|||
/*
|
||||
* Frame Diversion, Benoit Locher <Benoit.Locher@skf.com>
|
||||
*
|
||||
* Changes:
|
||||
* 06/09/2000 BL: initial version
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_DIVERT_H
|
||||
#define _LINUX_DIVERT_H
|
||||
|
||||
#include <asm/types.h>
|
||||
|
||||
#define MAX_DIVERT_PORTS 8 /* Max number of ports to divert (tcp, udp) */
|
||||
|
||||
/* Divertable protocols */
|
||||
#define DIVERT_PROTO_NONE 0x0000
|
||||
#define DIVERT_PROTO_IP 0x0001
|
||||
#define DIVERT_PROTO_ICMP 0x0002
|
||||
#define DIVERT_PROTO_TCP 0x0004
|
||||
#define DIVERT_PROTO_UDP 0x0008
|
||||
|
||||
/*
|
||||
* This is an Ethernet Frame Diverter option block
|
||||
*/
|
||||
struct divert_blk
|
||||
{
|
||||
int divert; /* are we active */
|
||||
unsigned int protos; /* protocols */
|
||||
__u16 tcp_dst[MAX_DIVERT_PORTS]; /* specific tcp dst ports to divert */
|
||||
__u16 tcp_src[MAX_DIVERT_PORTS]; /* specific tcp src ports to divert */
|
||||
__u16 udp_dst[MAX_DIVERT_PORTS]; /* specific udp dst ports to divert */
|
||||
__u16 udp_src[MAX_DIVERT_PORTS]; /* specific udp src ports to divert */
|
||||
};
|
||||
|
||||
/*
|
||||
* Diversion control block, for configuration with the userspace tool
|
||||
* divert
|
||||
*/
|
||||
|
||||
typedef union _divert_cf_arg
|
||||
{
|
||||
__s16 int16;
|
||||
__u16 uint16;
|
||||
__s32 int32;
|
||||
__u32 uint32;
|
||||
__s64 int64;
|
||||
__u64 uint64;
|
||||
void __user *ptr;
|
||||
} divert_cf_arg;
|
||||
|
||||
|
||||
struct divert_cf
|
||||
{
|
||||
int cmd; /* Command */
|
||||
divert_cf_arg arg1,
|
||||
arg2,
|
||||
arg3;
|
||||
int dev_index; /* device index (eth0=0, etc...) */
|
||||
};
|
||||
|
||||
|
||||
/* Diversion commands */
|
||||
#define DIVCMD_DIVERT 1 /* ENABLE/DISABLE diversion */
|
||||
#define DIVCMD_IP 2 /* ENABLE/DISABLE whold IP diversion */
|
||||
#define DIVCMD_TCP 3 /* ENABLE/DISABLE whold TCP diversion */
|
||||
#define DIVCMD_TCPDST 4 /* ADD/REMOVE TCP DST port for diversion */
|
||||
#define DIVCMD_TCPSRC 5 /* ADD/REMOVE TCP SRC port for diversion */
|
||||
#define DIVCMD_UDP 6 /* ENABLE/DISABLE whole UDP diversion */
|
||||
#define DIVCMD_UDPDST 7 /* ADD/REMOVE UDP DST port for diversion */
|
||||
#define DIVCMD_UDPSRC 8 /* ADD/REMOVE UDP SRC port for diversion */
|
||||
#define DIVCMD_ICMP 9 /* ENABLE/DISABLE whole ICMP diversion */
|
||||
#define DIVCMD_GETSTATUS 10 /* GET the status of the diverter */
|
||||
#define DIVCMD_RESET 11 /* Reset the diverter on the specified dev */
|
||||
#define DIVCMD_GETVERSION 12 /* Retrieve the diverter code version (char[32]) */
|
||||
|
||||
/* General syntax of the commands:
|
||||
*
|
||||
* DIVCMD_xxxxxx(arg1, arg2, arg3, dev_index)
|
||||
*
|
||||
* SIOCSIFDIVERT:
|
||||
* DIVCMD_DIVERT(DIVARG1_ENABLE|DIVARG1_DISABLE, , ,ifindex)
|
||||
* DIVCMD_IP(DIVARG1_ENABLE|DIVARG1_DISABLE, , , ifindex)
|
||||
* DIVCMD_TCP(DIVARG1_ENABLE|DIVARG1_DISABLE, , , ifindex)
|
||||
* DIVCMD_TCPDST(DIVARG1_ADD|DIVARG1_REMOVE, port, , ifindex)
|
||||
* DIVCMD_TCPSRC(DIVARG1_ADD|DIVARG1_REMOVE, port, , ifindex)
|
||||
* DIVCMD_UDP(DIVARG1_ENABLE|DIVARG1_DISABLE, , , ifindex)
|
||||
* DIVCMD_UDPDST(DIVARG1_ADD|DIVARG1_REMOVE, port, , ifindex)
|
||||
* DIVCMD_UDPSRC(DIVARG1_ADD|DIVARG1_REMOVE, port, , ifindex)
|
||||
* DIVCMD_ICMP(DIVARG1_ENABLE|DIVARG1_DISABLE, , , ifindex)
|
||||
* DIVCMD_RESET(, , , ifindex)
|
||||
*
|
||||
* SIOGIFDIVERT:
|
||||
* DIVCMD_GETSTATUS(divert_blk, , , ifindex)
|
||||
* DIVCMD_GETVERSION(string[3])
|
||||
*/
|
||||
|
||||
|
||||
/* Possible values for arg1 */
|
||||
#define DIVARG1_ENABLE 0 /* ENABLE something */
|
||||
#define DIVARG1_DISABLE 1 /* DISABLE something */
|
||||
#define DIVARG1_ADD 2 /* ADD something */
|
||||
#define DIVARG1_REMOVE 3 /* REMOVE something */
|
||||
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
/* diverter functions */
|
||||
#include <linux/skbuff.h>
|
||||
|
||||
#ifdef CONFIG_NET_DIVERT
|
||||
#include <linux/netdevice.h>
|
||||
|
||||
int alloc_divert_blk(struct net_device *);
|
||||
void free_divert_blk(struct net_device *);
|
||||
int divert_ioctl(unsigned int cmd, struct divert_cf __user *arg);
|
||||
void divert_frame(struct sk_buff *skb);
|
||||
static inline void handle_diverter(struct sk_buff *skb)
|
||||
{
|
||||
/* if diversion is supported on device, then divert */
|
||||
if (skb->dev->divert && skb->dev->divert->divert)
|
||||
divert_frame(skb);
|
||||
}
|
||||
|
||||
#else
|
||||
# define alloc_divert_blk(dev) (0)
|
||||
# define free_divert_blk(dev) do {} while (0)
|
||||
# define divert_ioctl(cmd, arg) (-ENOPKG)
|
||||
# define handle_diverter(skb) do {} while (0)
|
||||
#endif
|
||||
#endif
|
||||
#endif /* _LINUX_DIVERT_H */
|
|
@ -300,8 +300,9 @@ extern int efi_mem_attribute_range (unsigned long phys_addr, unsigned long size,
|
|||
extern int __init efi_uart_console_only (void);
|
||||
extern void efi_initialize_iomem_resources(struct resource *code_resource,
|
||||
struct resource *data_resource);
|
||||
extern unsigned long __init efi_get_time(void);
|
||||
extern unsigned long efi_get_time(void);
|
||||
extern int __init efi_set_rtc_mmss(unsigned long nowtime);
|
||||
extern int is_available_memory(efi_memory_desc_t * md);
|
||||
extern struct efi_memory_map memmap;
|
||||
|
||||
/**
|
||||
|
|
|
@ -21,11 +21,11 @@ typedef void (elevator_completed_req_fn) (request_queue_t *, struct request *);
|
|||
typedef int (elevator_may_queue_fn) (request_queue_t *, int);
|
||||
|
||||
typedef int (elevator_set_req_fn) (request_queue_t *, struct request *, gfp_t);
|
||||
typedef void (elevator_put_req_fn) (request_queue_t *, struct request *);
|
||||
typedef void (elevator_put_req_fn) (struct request *);
|
||||
typedef void (elevator_activate_req_fn) (request_queue_t *, struct request *);
|
||||
typedef void (elevator_deactivate_req_fn) (request_queue_t *, struct request *);
|
||||
|
||||
typedef void *(elevator_init_fn) (request_queue_t *, elevator_t *);
|
||||
typedef void *(elevator_init_fn) (request_queue_t *);
|
||||
typedef void (elevator_exit_fn) (elevator_t *);
|
||||
|
||||
struct elevator_ops
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
#include <linux/elf-em.h>
|
||||
#include <asm/elf.h>
|
||||
|
||||
struct file;
|
||||
|
||||
#ifndef elf_read_implies_exec
|
||||
/* Executables for which elf_read_implies_exec() returns TRUE will
|
||||
have the READ_IMPLIES_EXEC personality flag set automatically.
|
||||
|
@ -358,6 +360,7 @@ extern Elf32_Dyn _DYNAMIC [];
|
|||
#define elfhdr elf32_hdr
|
||||
#define elf_phdr elf32_phdr
|
||||
#define elf_note elf32_note
|
||||
#define elf_addr_t Elf32_Off
|
||||
|
||||
#else
|
||||
|
||||
|
@ -365,8 +368,16 @@ extern Elf64_Dyn _DYNAMIC [];
|
|||
#define elfhdr elf64_hdr
|
||||
#define elf_phdr elf64_phdr
|
||||
#define elf_note elf64_note
|
||||
#define elf_addr_t Elf64_Off
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef ARCH_HAVE_EXTRA_ELF_NOTES
|
||||
static inline int arch_notes_size(void) { return 0; }
|
||||
static inline void arch_write_notes(struct file *file) { }
|
||||
|
||||
#define ELF_CORE_EXTRA_NOTES_SIZE arch_notes_size()
|
||||
#define ELF_CORE_WRITE_EXTRA_NOTES arch_write_notes(file)
|
||||
#endif /* ARCH_HAVE_EXTRA_ELF_NOTES */
|
||||
|
||||
#endif /* _LINUX_ELF_H */
|
||||
|
|
|
@ -109,74 +109,32 @@ int ext3_mark_inode_dirty(handle_t *handle, struct inode *inode);
|
|||
* been done yet.
|
||||
*/
|
||||
|
||||
void ext3_journal_abort_handle(const char *caller, const char *err_fn,
|
||||
struct buffer_head *bh, handle_t *handle, int err);
|
||||
|
||||
static inline int
|
||||
__ext3_journal_get_undo_access(const char *where, handle_t *handle,
|
||||
struct buffer_head *bh)
|
||||
{
|
||||
int err = journal_get_undo_access(handle, bh);
|
||||
if (err)
|
||||
ext3_journal_abort_handle(where, __FUNCTION__, bh, handle,err);
|
||||
return err;
|
||||
}
|
||||
|
||||
static inline int
|
||||
__ext3_journal_get_write_access(const char *where, handle_t *handle,
|
||||
struct buffer_head *bh)
|
||||
{
|
||||
int err = journal_get_write_access(handle, bh);
|
||||
if (err)
|
||||
ext3_journal_abort_handle(where, __FUNCTION__, bh, handle,err);
|
||||
return err;
|
||||
}
|
||||
|
||||
static inline void
|
||||
ext3_journal_release_buffer(handle_t *handle, struct buffer_head *bh)
|
||||
static inline void ext3_journal_release_buffer(handle_t *handle,
|
||||
struct buffer_head *bh)
|
||||
{
|
||||
journal_release_buffer(handle, bh);
|
||||
}
|
||||
|
||||
static inline int
|
||||
__ext3_journal_forget(const char *where, handle_t *handle, struct buffer_head *bh)
|
||||
{
|
||||
int err = journal_forget(handle, bh);
|
||||
if (err)
|
||||
ext3_journal_abort_handle(where, __FUNCTION__, bh, handle,err);
|
||||
return err;
|
||||
}
|
||||
void ext3_journal_abort_handle(const char *caller, const char *err_fn,
|
||||
struct buffer_head *bh, handle_t *handle, int err);
|
||||
|
||||
static inline int
|
||||
__ext3_journal_revoke(const char *where, handle_t *handle,
|
||||
unsigned long blocknr, struct buffer_head *bh)
|
||||
{
|
||||
int err = journal_revoke(handle, blocknr, bh);
|
||||
if (err)
|
||||
ext3_journal_abort_handle(where, __FUNCTION__, bh, handle,err);
|
||||
return err;
|
||||
}
|
||||
int __ext3_journal_get_undo_access(const char *where, handle_t *handle,
|
||||
struct buffer_head *bh);
|
||||
|
||||
static inline int
|
||||
__ext3_journal_get_create_access(const char *where,
|
||||
handle_t *handle, struct buffer_head *bh)
|
||||
{
|
||||
int err = journal_get_create_access(handle, bh);
|
||||
if (err)
|
||||
ext3_journal_abort_handle(where, __FUNCTION__, bh, handle,err);
|
||||
return err;
|
||||
}
|
||||
int __ext3_journal_get_write_access(const char *where, handle_t *handle,
|
||||
struct buffer_head *bh);
|
||||
|
||||
static inline int
|
||||
__ext3_journal_dirty_metadata(const char *where,
|
||||
handle_t *handle, struct buffer_head *bh)
|
||||
{
|
||||
int err = journal_dirty_metadata(handle, bh);
|
||||
if (err)
|
||||
ext3_journal_abort_handle(where, __FUNCTION__, bh, handle,err);
|
||||
return err;
|
||||
}
|
||||
int __ext3_journal_forget(const char *where, handle_t *handle,
|
||||
struct buffer_head *bh);
|
||||
|
||||
int __ext3_journal_revoke(const char *where, handle_t *handle,
|
||||
unsigned long blocknr, struct buffer_head *bh);
|
||||
|
||||
int __ext3_journal_get_create_access(const char *where,
|
||||
handle_t *handle, struct buffer_head *bh);
|
||||
|
||||
int __ext3_journal_dirty_metadata(const char *where,
|
||||
handle_t *handle, struct buffer_head *bh);
|
||||
|
||||
#define ext3_journal_get_undo_access(handle, bh) \
|
||||
__ext3_journal_get_undo_access(__FUNCTION__, (handle), (bh))
|
||||
|
|
|
@ -114,74 +114,32 @@ int ext4_mark_inode_dirty(handle_t *handle, struct inode *inode);
|
|||
* been done yet.
|
||||
*/
|
||||
|
||||
void ext4_journal_abort_handle(const char *caller, const char *err_fn,
|
||||
struct buffer_head *bh, handle_t *handle, int err);
|
||||
|
||||
static inline int
|
||||
__ext4_journal_get_undo_access(const char *where, handle_t *handle,
|
||||
struct buffer_head *bh)
|
||||
{
|
||||
int err = jbd2_journal_get_undo_access(handle, bh);
|
||||
if (err)
|
||||
ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err);
|
||||
return err;
|
||||
}
|
||||
|
||||
static inline int
|
||||
__ext4_journal_get_write_access(const char *where, handle_t *handle,
|
||||
struct buffer_head *bh)
|
||||
{
|
||||
int err = jbd2_journal_get_write_access(handle, bh);
|
||||
if (err)
|
||||
ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err);
|
||||
return err;
|
||||
}
|
||||
|
||||
static inline void
|
||||
ext4_journal_release_buffer(handle_t *handle, struct buffer_head *bh)
|
||||
static inline void ext4_journal_release_buffer(handle_t *handle,
|
||||
struct buffer_head *bh)
|
||||
{
|
||||
jbd2_journal_release_buffer(handle, bh);
|
||||
}
|
||||
|
||||
static inline int
|
||||
__ext4_journal_forget(const char *where, handle_t *handle, struct buffer_head *bh)
|
||||
{
|
||||
int err = jbd2_journal_forget(handle, bh);
|
||||
if (err)
|
||||
ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err);
|
||||
return err;
|
||||
}
|
||||
void ext4_journal_abort_handle(const char *caller, const char *err_fn,
|
||||
struct buffer_head *bh, handle_t *handle, int err);
|
||||
|
||||
static inline int
|
||||
__ext4_journal_revoke(const char *where, handle_t *handle,
|
||||
ext4_fsblk_t blocknr, struct buffer_head *bh)
|
||||
{
|
||||
int err = jbd2_journal_revoke(handle, blocknr, bh);
|
||||
if (err)
|
||||
ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err);
|
||||
return err;
|
||||
}
|
||||
int __ext4_journal_get_undo_access(const char *where, handle_t *handle,
|
||||
struct buffer_head *bh);
|
||||
|
||||
static inline int
|
||||
__ext4_journal_get_create_access(const char *where,
|
||||
handle_t *handle, struct buffer_head *bh)
|
||||
{
|
||||
int err = jbd2_journal_get_create_access(handle, bh);
|
||||
if (err)
|
||||
ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err);
|
||||
return err;
|
||||
}
|
||||
int __ext4_journal_get_write_access(const char *where, handle_t *handle,
|
||||
struct buffer_head *bh);
|
||||
|
||||
static inline int
|
||||
__ext4_journal_dirty_metadata(const char *where,
|
||||
handle_t *handle, struct buffer_head *bh)
|
||||
{
|
||||
int err = jbd2_journal_dirty_metadata(handle, bh);
|
||||
if (err)
|
||||
ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err);
|
||||
return err;
|
||||
}
|
||||
int __ext4_journal_forget(const char *where, handle_t *handle,
|
||||
struct buffer_head *bh);
|
||||
|
||||
int __ext4_journal_revoke(const char *where, handle_t *handle,
|
||||
ext4_fsblk_t blocknr, struct buffer_head *bh);
|
||||
|
||||
int __ext4_journal_get_create_access(const char *where,
|
||||
handle_t *handle, struct buffer_head *bh);
|
||||
|
||||
int __ext4_journal_dirty_metadata(const char *where,
|
||||
handle_t *handle, struct buffer_head *bh);
|
||||
|
||||
#define ext4_journal_get_undo_access(handle, bh) \
|
||||
__ext4_journal_get_undo_access(__FUNCTION__, (handle), (bh))
|
||||
|
|
|
@ -774,8 +774,8 @@ struct fb_info {
|
|||
#endif
|
||||
|
||||
struct fb_ops *fbops;
|
||||
struct device *device;
|
||||
struct class_device *class_device; /* sysfs per device attrs */
|
||||
struct device *device; /* This is the parent */
|
||||
struct device *dev; /* This is this fb device */
|
||||
int class_flag; /* private sysfs flags */
|
||||
#ifdef CONFIG_FB_TILEBLITTING
|
||||
struct fb_tile_ops *tileops; /* Tile Blitting */
|
||||
|
@ -910,8 +910,8 @@ static inline void __fb_pad_aligned_buffer(u8 *dst, u32 d_pitch,
|
|||
/* drivers/video/fbsysfs.c */
|
||||
extern struct fb_info *framebuffer_alloc(size_t size, struct device *dev);
|
||||
extern void framebuffer_release(struct fb_info *info);
|
||||
extern int fb_init_class_device(struct fb_info *fb_info);
|
||||
extern void fb_cleanup_class_device(struct fb_info *head);
|
||||
extern int fb_init_device(struct fb_info *fb_info);
|
||||
extern void fb_cleanup_device(struct fb_info *head);
|
||||
extern void fb_bl_default_curve(struct fb_info *fb_info, u8 off, u8 min, u8 max);
|
||||
|
||||
/* drivers/video/fbmon.c */
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
/* rule is permanent, and cannot be deleted */
|
||||
#define FIB_RULE_PERMANENT 1
|
||||
#define FIB_RULE_INVERT 2
|
||||
|
||||
struct fib_rule_hdr
|
||||
{
|
||||
|
@ -34,7 +35,7 @@ enum
|
|||
FRA_UNUSED3,
|
||||
FRA_UNUSED4,
|
||||
FRA_UNUSED5,
|
||||
FRA_FWMARK, /* netfilter mark */
|
||||
FRA_FWMARK, /* mark */
|
||||
FRA_FLOW, /* flow/class id */
|
||||
FRA_UNUSED6,
|
||||
FRA_UNUSED7,
|
||||
|
|
|
@ -64,6 +64,8 @@ struct files_struct {
|
|||
|
||||
#define files_fdtable(files) (rcu_dereference((files)->fdt))
|
||||
|
||||
extern struct kmem_cache *filp_cachep;
|
||||
|
||||
extern void FASTCALL(__fput(struct file *));
|
||||
extern void FASTCALL(fput(struct file *));
|
||||
|
||||
|
@ -114,4 +116,6 @@ struct files_struct *get_files_struct(struct task_struct *);
|
|||
void FASTCALL(put_files_struct(struct files_struct *fs));
|
||||
void reset_files_struct(struct task_struct *, struct files_struct *);
|
||||
|
||||
extern struct kmem_cache *files_cachep;
|
||||
|
||||
#endif /* __LINUX_FILE_H */
|
||||
|
|
87
include/linux/freezer.h
Normal file
87
include/linux/freezer.h
Normal file
|
@ -0,0 +1,87 @@
|
|||
/* Freezer declarations */
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
/*
|
||||
* Check if a process has been frozen
|
||||
*/
|
||||
static inline int frozen(struct task_struct *p)
|
||||
{
|
||||
return p->flags & PF_FROZEN;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check if there is a request to freeze a process
|
||||
*/
|
||||
static inline int freezing(struct task_struct *p)
|
||||
{
|
||||
return p->flags & PF_FREEZE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Request that a process be frozen
|
||||
* FIXME: SMP problem. We may not modify other process' flags!
|
||||
*/
|
||||
static inline void freeze(struct task_struct *p)
|
||||
{
|
||||
p->flags |= PF_FREEZE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Sometimes we may need to cancel the previous 'freeze' request
|
||||
*/
|
||||
static inline void do_not_freeze(struct task_struct *p)
|
||||
{
|
||||
p->flags &= ~PF_FREEZE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Wake up a frozen process
|
||||
*/
|
||||
static inline int thaw_process(struct task_struct *p)
|
||||
{
|
||||
if (frozen(p)) {
|
||||
p->flags &= ~PF_FROZEN;
|
||||
wake_up_process(p);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* freezing is complete, mark process as frozen
|
||||
*/
|
||||
static inline void frozen_process(struct task_struct *p)
|
||||
{
|
||||
p->flags = (p->flags & ~PF_FREEZE) | PF_FROZEN;
|
||||
}
|
||||
|
||||
extern void refrigerator(void);
|
||||
extern int freeze_processes(void);
|
||||
extern void thaw_processes(void);
|
||||
|
||||
static inline int try_to_freeze(void)
|
||||
{
|
||||
if (freezing(current)) {
|
||||
refrigerator();
|
||||
return 1;
|
||||
} else
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern void thaw_some_processes(int all);
|
||||
|
||||
#else
|
||||
static inline int frozen(struct task_struct *p) { return 0; }
|
||||
static inline int freezing(struct task_struct *p) { return 0; }
|
||||
static inline void freeze(struct task_struct *p) { BUG(); }
|
||||
static inline int thaw_process(struct task_struct *p) { return 1; }
|
||||
static inline void frozen_process(struct task_struct *p) { BUG(); }
|
||||
|
||||
static inline void refrigerator(void) {}
|
||||
static inline int freeze_processes(void) { BUG(); return 0; }
|
||||
static inline void thaw_processes(void) {}
|
||||
|
||||
static inline int try_to_freeze(void) { return 0; }
|
||||
|
||||
|
||||
#endif
|
|
@ -276,7 +276,7 @@ extern int dir_notify_enable;
|
|||
#include <linux/radix-tree.h>
|
||||
#include <linux/prio_tree.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/pid.h>
|
||||
#include <linux/mutex.h>
|
||||
|
||||
#include <asm/atomic.h>
|
||||
|
@ -543,19 +543,22 @@ struct inode {
|
|||
struct list_head i_dentry;
|
||||
unsigned long i_ino;
|
||||
atomic_t i_count;
|
||||
umode_t i_mode;
|
||||
unsigned int i_nlink;
|
||||
uid_t i_uid;
|
||||
gid_t i_gid;
|
||||
dev_t i_rdev;
|
||||
unsigned long i_version;
|
||||
loff_t i_size;
|
||||
#ifdef __NEED_I_SIZE_ORDERED
|
||||
seqcount_t i_size_seqcount;
|
||||
#endif
|
||||
struct timespec i_atime;
|
||||
struct timespec i_mtime;
|
||||
struct timespec i_ctime;
|
||||
unsigned int i_blkbits;
|
||||
unsigned long i_version;
|
||||
blkcnt_t i_blocks;
|
||||
unsigned short i_bytes;
|
||||
umode_t i_mode;
|
||||
spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */
|
||||
struct mutex i_mutex;
|
||||
struct rw_semaphore i_alloc_sem;
|
||||
|
@ -598,9 +601,6 @@ struct inode {
|
|||
void *i_security;
|
||||
#endif
|
||||
void *i_private; /* fs or device private pointer */
|
||||
#ifdef __NEED_I_SIZE_ORDERED
|
||||
seqcount_t i_size_seqcount;
|
||||
#endif
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -636,7 +636,7 @@ extern void inode_double_unlock(struct inode *inode1, struct inode *inode2);
|
|||
* cmpxchg8b without the need of the lock prefix). For SMP compiles
|
||||
* and 64bit archs it makes no difference if preempt is enabled or not.
|
||||
*/
|
||||
static inline loff_t i_size_read(struct inode *inode)
|
||||
static inline loff_t i_size_read(const struct inode *inode)
|
||||
{
|
||||
#if BITS_PER_LONG==32 && defined(CONFIG_SMP)
|
||||
loff_t i_size;
|
||||
|
@ -679,12 +679,12 @@ static inline void i_size_write(struct inode *inode, loff_t i_size)
|
|||
#endif
|
||||
}
|
||||
|
||||
static inline unsigned iminor(struct inode *inode)
|
||||
static inline unsigned iminor(const struct inode *inode)
|
||||
{
|
||||
return MINOR(inode->i_rdev);
|
||||
}
|
||||
|
||||
static inline unsigned imajor(struct inode *inode)
|
||||
static inline unsigned imajor(const struct inode *inode)
|
||||
{
|
||||
return MAJOR(inode->i_rdev);
|
||||
}
|
||||
|
@ -977,36 +977,13 @@ enum {
|
|||
#define vfs_check_frozen(sb, level) \
|
||||
wait_event((sb)->s_wait_unfrozen, ((sb)->s_frozen < (level)))
|
||||
|
||||
static inline void get_fs_excl(void)
|
||||
{
|
||||
atomic_inc(¤t->fs_excl);
|
||||
}
|
||||
#define get_fs_excl() atomic_inc(¤t->fs_excl)
|
||||
#define put_fs_excl() atomic_dec(¤t->fs_excl)
|
||||
#define has_fs_excl() atomic_read(¤t->fs_excl)
|
||||
|
||||
static inline void put_fs_excl(void)
|
||||
{
|
||||
atomic_dec(¤t->fs_excl);
|
||||
}
|
||||
|
||||
static inline int has_fs_excl(void)
|
||||
{
|
||||
return atomic_read(¤t->fs_excl);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Superblock locking.
|
||||
*/
|
||||
static inline void lock_super(struct super_block * sb)
|
||||
{
|
||||
get_fs_excl();
|
||||
mutex_lock(&sb->s_lock);
|
||||
}
|
||||
|
||||
static inline void unlock_super(struct super_block * sb)
|
||||
{
|
||||
put_fs_excl();
|
||||
mutex_unlock(&sb->s_lock);
|
||||
}
|
||||
/* not quite ready to be deprecated, but... */
|
||||
extern void lock_super(struct super_block *);
|
||||
extern void unlock_super(struct super_block *);
|
||||
|
||||
/*
|
||||
* VFS helper functions..
|
||||
|
@ -1504,7 +1481,9 @@ extern char * getname(const char __user *);
|
|||
extern void __init vfs_caches_init_early(void);
|
||||
extern void __init vfs_caches_init(unsigned long);
|
||||
|
||||
#define __getname() kmem_cache_alloc(names_cachep, SLAB_KERNEL)
|
||||
extern struct kmem_cache *names_cachep;
|
||||
|
||||
#define __getname() kmem_cache_alloc(names_cachep, GFP_KERNEL)
|
||||
#define __putname(name) kmem_cache_free(names_cachep, (void *)(name))
|
||||
#ifndef CONFIG_AUDITSYSCALL
|
||||
#define putname(name) __putname(name)
|
||||
|
|
|
@ -18,6 +18,8 @@ struct fs_struct {
|
|||
.umask = 0022, \
|
||||
}
|
||||
|
||||
extern struct kmem_cache *fs_cachep;
|
||||
|
||||
extern void exit_fs(struct task_struct *);
|
||||
extern void set_fs_altroot(void);
|
||||
extern void set_fs_root(struct fs_struct *, struct vfsmount *, struct dentry *);
|
||||
|
|
|
@ -1,122 +0,0 @@
|
|||
#ifndef _FTAPE_HEADER_SEGMENT_H
|
||||
#define _FTAPE_HEADER_SEGMENT_H
|
||||
|
||||
/*
|
||||
* Copyright (C) 1996-1997 Claus-Justus Heine.
|
||||
|
||||
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; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
*
|
||||
* $Source: /homes/cvs/ftape-stacked/include/linux/ftape-header-segment.h,v $
|
||||
* $Revision: 1.2 $
|
||||
* $Date: 1997/10/05 19:19:28 $
|
||||
*
|
||||
* This file defines some offsets into the header segment of a
|
||||
* floppy tape cartridge. For use with the QIC-40/80/3010/3020
|
||||
* floppy-tape driver "ftape" for Linux.
|
||||
*/
|
||||
|
||||
#define FT_SIGNATURE 0 /* must be 0xaa55aa55 */
|
||||
#define FT_FMT_CODE 4
|
||||
#define FT_REV_LEVEL 5 /* only for QIC-80 since. Rev. L (== 0x0c) */
|
||||
#define FT_HSEG_1 6 /* first header segment, except for format code 6 */
|
||||
#define FT_HSEG_2 8 /* second header segment, except for format code 6 */
|
||||
#define FT_FRST_SEG 10 /* first data segment, except for format code 6 */
|
||||
#define FT_LAST_SEG 12 /* last data segment, except for format code 6 */
|
||||
#define FT_FMT_DATE 14 /* date and time of most recent format, see below */
|
||||
#define FT_WR_DATE 18 /* date and time of most recent write or format */
|
||||
#define FT_SPT 24 /* segments per track */
|
||||
#define FT_TPC 26 /* tracks per cartridge */
|
||||
#define FT_FHM 27 /* floppy drive head (maximum of it) */
|
||||
#define FT_FTM 28 /* floppy track max. */
|
||||
#define FT_FSM 29 /* floppy sector max. (128) */
|
||||
#define FT_LABEL 30 /* floppy tape label */
|
||||
#define FT_LABEL_DATE 74 /* date and time the tape label was written */
|
||||
#define FT_LABEL_SZ (FT_LABEL_DATE - FT_LABEL)
|
||||
#define FT_CMAP_START 78 /* starting segment of compression map */
|
||||
#define FT_FMT_ERROR 128 /* must be set to 0xff if remainder gets lost during
|
||||
* tape format
|
||||
*/
|
||||
#define FT_SEG_CNT 130 /* number of seg. written, formatted or verified
|
||||
* through lifetime of tape (why not read?)
|
||||
*/
|
||||
#define FT_INIT_DATE 138 /* date and time of initial tape format */
|
||||
#define FT_FMT_CNT 142 /* number of times tape has been formatted */
|
||||
#define FT_FSL_CNT 144 /* number of segments in failed sector log */
|
||||
#define FT_MK_CODE 146 /* id string of tape manufacturer */
|
||||
#define FT_LOT_CODE 190 /* tape manufacturer lot code */
|
||||
#define FT_6_HSEG_1 234 /* first header segment for format code 6 */
|
||||
#define FT_6_HSEG_2 238 /* second header segment for format code 6 */
|
||||
#define FT_6_FRST_SEG 242 /* first data segment for format code 6 */
|
||||
#define FT_6_LAST_SEG 246 /* last data segment for format code 6 */
|
||||
|
||||
#define FT_FSL 256
|
||||
#define FT_HEADER_END 256 /* space beyond this point:
|
||||
* format codes 2, 3 and 5:
|
||||
* - failed sector log until byte 2047
|
||||
* - bad sector map in the reamining part of segment
|
||||
* format codes 4 and 6:
|
||||
* - bad sector map starts hear
|
||||
*/
|
||||
|
||||
|
||||
/* value to be stored at the FT_SIGNATURE offset
|
||||
*/
|
||||
#define FT_HSEG_MAGIC 0xaa55aa55
|
||||
#define FT_D2G_MAGIC 0x82288228 /* Ditto 2GB */
|
||||
|
||||
/* data and time encoding: */
|
||||
#define FT_YEAR_SHIFT 25
|
||||
#define FT_YEAR_MASK 0xfe000000
|
||||
#define FT_YEAR_0 1970
|
||||
#define FT_YEAR_MAX 127
|
||||
#define FT_YEAR(year) ((((year)-FT_YEAR_0)<<FT_YEAR_SHIFT)&FT_YEAR_MASK)
|
||||
|
||||
#define FT_TIME_SHIFT 0
|
||||
#define FT_TIME_MASK 0x01FFFFFF
|
||||
#define FT_TIME_MAX 0x01ea6dff /* last second of a year */
|
||||
#define FT_TIME(mo,d,h,m,s) \
|
||||
((((s)+60*((m)+60*((h)+24*((d)+31*(mo))))) & FT_TIME_MASK))
|
||||
|
||||
#define FT_TIME_STAMP(y,mo,d,h,m,s) (FT_YEAR(y) | FT_TIME(mo,d,h,m,s))
|
||||
|
||||
/* values for the format code field */
|
||||
typedef enum {
|
||||
fmt_normal = 2, /* QIC-80 post Rev. B 205Ft or 307Ft tape */
|
||||
fmt_1100ft = 3, /* QIC-80 post Rev. B 1100Ft tape */
|
||||
fmt_var = 4, /* QIC-80 post Rev. B variabel length format */
|
||||
fmt_425ft = 5, /* QIC-80 post Rev. B 425Ft tape */
|
||||
fmt_big = 6 /* QIC-3010/3020 variable length tape with more
|
||||
* than 2^16 segments per tape
|
||||
*/
|
||||
} ft_format_type;
|
||||
|
||||
/* definitions for the failed sector log */
|
||||
#define FT_FSL_SIZE (2 * FT_SECTOR_SIZE - FT_HEADER_END)
|
||||
#define FT_FSL_MAX_ENTRIES (FT_FSL_SIZE/sizeof(__u32))
|
||||
|
||||
typedef struct ft_fsl_entry {
|
||||
__u16 segment;
|
||||
__u16 date;
|
||||
} __attribute__ ((packed)) ft_fsl_entry;
|
||||
|
||||
|
||||
/* date encoding for the failed sector log
|
||||
* month: 1..12, day: 1..31, year: 1970..2097
|
||||
*/
|
||||
#define FT_FSL_TIME_STAMP(y,m,d) \
|
||||
(((((y) - FT_YEAR_0)<<9)&0xfe00) | (((m)<<5)&0x01e0) | ((d)&0x001f))
|
||||
|
||||
#endif /* _FTAPE_HEADER_SEGMENT_H */
|
|
@ -1,137 +0,0 @@
|
|||
#ifndef _FTAPE_VENDORS_H
|
||||
#define _FTAPE_VENDORS_H
|
||||
|
||||
/*
|
||||
* Copyright (C) 1993-1996 Bas Laarhoven,
|
||||
* (C) 1996-1997 Claus-Justus Heine.
|
||||
|
||||
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; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
*
|
||||
* $Source: /homes/cvs/ftape-stacked/include/linux/ftape-vendors.h,v $
|
||||
* $Revision: 1.6 $
|
||||
* $Date: 1997/10/09 15:38:11 $
|
||||
*
|
||||
* This file contains the supported drive types with their
|
||||
* QIC-117 spec. vendor code and drive dependent configuration
|
||||
* information.
|
||||
*/
|
||||
|
||||
typedef enum {
|
||||
unknown_wake_up = 0,
|
||||
no_wake_up,
|
||||
wake_up_colorado,
|
||||
wake_up_mountain,
|
||||
wake_up_insight,
|
||||
} wake_up_types;
|
||||
|
||||
typedef struct {
|
||||
wake_up_types wake_up; /* see wake_up_types */
|
||||
char *name; /* Text describing the drive */
|
||||
} wakeup_method;
|
||||
|
||||
/* Note: order of entries in WAKEUP_METHODS must be so that a variable
|
||||
* of type wake_up_types can be used as an index in the array.
|
||||
*/
|
||||
#define WAKEUP_METHODS { \
|
||||
{ unknown_wake_up, "Unknown" }, \
|
||||
{ no_wake_up, "None" }, \
|
||||
{ wake_up_colorado, "Colorado" }, \
|
||||
{ wake_up_mountain, "Mountain" }, \
|
||||
{ wake_up_insight, "Motor-on" }, \
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
unsigned int vendor_id; /* vendor id from drive */
|
||||
int speed; /* maximum tape transport speed (ips) */
|
||||
wake_up_types wake_up; /* see wake_up_types */
|
||||
char *name; /* Text describing the drive */
|
||||
} vendor_struct;
|
||||
|
||||
#define UNKNOWN_VENDOR (-1)
|
||||
|
||||
#define QIC117_VENDORS { \
|
||||
/* see _vendor_struct */ \
|
||||
{ 0x00000, 82, wake_up_colorado, "Colorado DJ-10 (old)" }, \
|
||||
{ 0x00047, 90, wake_up_colorado, "Colorado DJ-10/DJ-20" }, \
|
||||
{ 0x011c2, 84, wake_up_colorado, "Colorado 700" }, \
|
||||
{ 0x011c3, 90, wake_up_colorado, "Colorado 1400" }, \
|
||||
{ 0x011c4, 84, wake_up_colorado, "Colorado DJ-10/DJ-20 (new)" }, \
|
||||
{ 0x011c5, 84, wake_up_colorado, "HP Colorado T1000" }, \
|
||||
{ 0x011c6, 90, wake_up_colorado, "HP Colorado T3000" }, \
|
||||
{ 0x00005, 45, wake_up_mountain, "Archive 5580i" }, \
|
||||
{ 0x10005, 50, wake_up_insight, "Insight 80Mb, Irwin 80SX" }, \
|
||||
{ 0x00140, 74, wake_up_mountain, "Archive S.Hornet [Identity/Escom]" }, \
|
||||
{ 0x00146, 72, wake_up_mountain, "Archive 31250Q [Escom]" }, \
|
||||
{ 0x0014a, 100, wake_up_mountain, "Archive XL9250i [Conner/Escom]" }, \
|
||||
{ 0x0014c, 98, wake_up_mountain, "Conner C250MQT" }, \
|
||||
{ 0x0014e, 80, wake_up_mountain, "Conner C250MQ" }, \
|
||||
{ 0x00150, 80, wake_up_mountain, "Conner TSM420R/TST800R" }, \
|
||||
{ 0x00152, 80, wake_up_mountain, "Conner TSM850R" }, \
|
||||
{ 0x00156, 80, wake_up_mountain, "Conner TSM850R/1700R/TST3200R" }, \
|
||||
{ 0x00180, 0, wake_up_mountain, "Summit SE 150" }, \
|
||||
{ 0x00181, 85, wake_up_mountain, "Summit SE 250, Mountain FS8000" }, \
|
||||
{ 0x001c1, 82, no_wake_up, "Wangtek 3040F" }, \
|
||||
{ 0x001c8, 64, no_wake_up, "Wangtek 3080F" }, \
|
||||
{ 0x001c8, 64, wake_up_colorado, "Wangtek 3080F" }, \
|
||||
{ 0x001ca, 67, no_wake_up, "Wangtek 3080F (new)" }, \
|
||||
{ 0x001cc, 77, wake_up_colorado, "Wangtek 3200 / Teac 700" }, \
|
||||
{ 0x001cd, 75, wake_up_colorado, "Reveal TB1400" }, \
|
||||
{ 0x00380, 85, wake_up_colorado, "Exabyte Eagle-96" }, \
|
||||
{ 0x00381, 85, wake_up_colorado, "Exabyte Eagle TR-3" }, \
|
||||
{ 0x00382, 85, wake_up_colorado, "Exabyte Eagle TR-3" }, \
|
||||
{ 0x003ce, 77, wake_up_colorado, "Teac 800" }, \
|
||||
{ 0x003cf, 0, wake_up_colorado, "Teac FT3010TR" }, \
|
||||
{ 0x08880, 64, no_wake_up, "Iomega 250, Ditto 800" }, \
|
||||
{ 0x08880, 64, wake_up_colorado, "Iomega 250, Ditto 800" }, \
|
||||
{ 0x08880, 64, wake_up_insight, "Iomega 250, Ditto 800" }, \
|
||||
{ 0x08881, 80, wake_up_colorado, "Iomega 700" }, \
|
||||
{ 0x08882, 80, wake_up_colorado, "Iomega 3200" }, \
|
||||
{ 0x08883, 80, wake_up_colorado, "Iomega DITTO 2GB" }, \
|
||||
{ 0x00021, 70, no_wake_up, "AIWA CT-803" }, \
|
||||
{ 0x004c0, 80, no_wake_up, "AIWA TD-S1600" }, \
|
||||
{ 0x00021, 0, wake_up_mountain, "COREtape QIC80" }, \
|
||||
{ 0x00441, 0, wake_up_mountain, "ComByte DoublePlay" }, \
|
||||
{ 0x00481, 127, wake_up_mountain, "PERTEC MyTape 800" }, \
|
||||
{ 0x00483, 130, wake_up_mountain, "PERTEC MyTape 3200" }, \
|
||||
{ UNKNOWN_VENDOR, 0, no_wake_up, "unknown" } \
|
||||
}
|
||||
|
||||
#define QIC117_MAKE_CODES { \
|
||||
{ 0, "Unassigned" }, \
|
||||
{ 1, "Alloy Computer Products" }, \
|
||||
{ 2, "3M" }, \
|
||||
{ 3, "Tandberg Data" }, \
|
||||
{ 4, "Colorado" }, \
|
||||
{ 5, "Archive/Conner" }, \
|
||||
{ 6, "Mountain/Summit Memory Systems" }, \
|
||||
{ 7, "Wangtek/Rexon/Tecmar" }, \
|
||||
{ 8, "Sony" }, \
|
||||
{ 9, "Cipher Data Products" }, \
|
||||
{ 10, "Irwin Magnetic Systems" }, \
|
||||
{ 11, "Braemar" }, \
|
||||
{ 12, "Verbatim" }, \
|
||||
{ 13, "Core International" }, \
|
||||
{ 14, "Exabyte" }, \
|
||||
{ 15, "Teac" }, \
|
||||
{ 16, "Gigatek" }, \
|
||||
{ 17, "ComByte" }, \
|
||||
{ 18, "PERTEC Memories" }, \
|
||||
{ 19, "Aiwa" }, \
|
||||
{ 71, "Colorado" }, \
|
||||
{ 546, "Iomega Inc" }, \
|
||||
}
|
||||
|
||||
#endif /* _FTAPE_VENDORS_H */
|
|
@ -1,201 +0,0 @@
|
|||
#ifndef _FTAPE_H
|
||||
#define _FTAPE_H
|
||||
|
||||
/*
|
||||
* Copyright (C) 1994-1996 Bas Laarhoven,
|
||||
* (C) 1996-1997 Claus-Justus Heine.
|
||||
|
||||
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; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
*
|
||||
* $Source: /homes/cvs/ftape-stacked/include/linux/ftape.h,v $
|
||||
* $Revision: 1.17.6.4 $
|
||||
* $Date: 1997/11/25 01:52:54 $
|
||||
*
|
||||
* This file contains global definitions, typedefs and macro's
|
||||
* for the QIC-40/80/3010/3020 floppy-tape driver for Linux.
|
||||
*/
|
||||
|
||||
#define FTAPE_VERSION "ftape v3.04d 25/11/97"
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/mm.h>
|
||||
#endif
|
||||
#include <linux/types.h>
|
||||
#include <linux/mtio.h>
|
||||
|
||||
#define FT_SECTOR(x) (x+1) /* sector offset into real sector */
|
||||
#define FT_SECTOR_SIZE 1024
|
||||
#define FT_SECTORS_PER_SEGMENT 32
|
||||
#define FT_ECC_SECTORS 3
|
||||
#define FT_SEGMENT_SIZE ((FT_SECTORS_PER_SEGMENT - FT_ECC_SECTORS) * FT_SECTOR_SIZE)
|
||||
#define FT_BUFF_SIZE (FT_SECTORS_PER_SEGMENT * FT_SECTOR_SIZE)
|
||||
|
||||
/*
|
||||
* bits of the minor device number that define drive selection
|
||||
* methods. Could be used one day to access multiple tape
|
||||
* drives on the same controller.
|
||||
*/
|
||||
#define FTAPE_SEL_A 0
|
||||
#define FTAPE_SEL_B 1
|
||||
#define FTAPE_SEL_C 2
|
||||
#define FTAPE_SEL_D 3
|
||||
#define FTAPE_SEL_MASK 3
|
||||
#define FTAPE_SEL(unit) ((unit) & FTAPE_SEL_MASK)
|
||||
#define FTAPE_NO_REWIND 4 /* mask for minor nr */
|
||||
|
||||
/* the following two may be reported when MTIOCGET is requested ... */
|
||||
typedef union {
|
||||
struct {
|
||||
__u8 error;
|
||||
__u8 command;
|
||||
} error;
|
||||
long space;
|
||||
} ft_drive_error;
|
||||
typedef union {
|
||||
struct {
|
||||
__u8 drive_status;
|
||||
__u8 drive_config;
|
||||
__u8 tape_status;
|
||||
} status;
|
||||
long space;
|
||||
} ft_drive_status;
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#define FT_RQM_DELAY 12
|
||||
#define FT_MILLISECOND 1
|
||||
#define FT_SECOND 1000
|
||||
#define FT_FOREVER -1
|
||||
#ifndef HZ
|
||||
#error "HZ undefined."
|
||||
#endif
|
||||
#define FT_USPT (1000000/HZ) /* microseconds per tick */
|
||||
|
||||
/* This defines the number of retries that the driver will allow
|
||||
* before giving up (and letting a higher level handle the error).
|
||||
*/
|
||||
#ifdef TESTING
|
||||
#define FT_SOFT_RETRIES 1 /* number of low level retries */
|
||||
#define FT_RETRIES_ON_ECC_ERROR 3 /* ecc error when correcting segment */
|
||||
#else
|
||||
#define FT_SOFT_RETRIES 6 /* number of low level retries (triple) */
|
||||
#define FT_RETRIES_ON_ECC_ERROR 3 /* ecc error when correcting segment */
|
||||
#endif
|
||||
|
||||
#ifndef THE_FTAPE_MAINTAINER
|
||||
#define THE_FTAPE_MAINTAINER "the ftape maintainer"
|
||||
#endif
|
||||
|
||||
/* Initialize missing configuration parameters.
|
||||
*/
|
||||
#ifndef CONFIG_FT_NR_BUFFERS
|
||||
# define CONFIG_FT_NR_BUFFERS 3
|
||||
#endif
|
||||
#ifndef CONFIG_FT_FDC_THR
|
||||
# define CONFIG_FT_FDC_THR 8
|
||||
#endif
|
||||
#ifndef CONFIG_FT_FDC_MAX_RATE
|
||||
# define CONFIG_FT_FDC_MAX_RATE 2000
|
||||
#endif
|
||||
#ifndef CONFIG_FT_FDC_BASE
|
||||
# define CONFIG_FT_FDC_BASE 0
|
||||
#endif
|
||||
#ifndef CONFIG_FT_FDC_IRQ
|
||||
# define CONFIG_FT_FDC_IRQ 0
|
||||
#endif
|
||||
#ifndef CONFIG_FT_FDC_DMA
|
||||
# define CONFIG_FT_FDC_DMA 0
|
||||
#endif
|
||||
|
||||
/* Turn some booleans into numbers.
|
||||
*/
|
||||
#ifdef CONFIG_FT_PROBE_FC10
|
||||
# undef CONFIG_FT_PROBE_FC10
|
||||
# define CONFIG_FT_PROBE_FC10 1
|
||||
#else
|
||||
# define CONFIG_FT_PROBE_FC10 0
|
||||
#endif
|
||||
#ifdef CONFIG_FT_MACH2
|
||||
# undef CONFIG_FT_MACH2
|
||||
# define CONFIG_FT_MACH2 1
|
||||
#else
|
||||
# define CONFIG_FT_MACH2 0
|
||||
#endif
|
||||
|
||||
/* Insert default settings
|
||||
*/
|
||||
#if CONFIG_FT_PROBE_FC10 == 1
|
||||
# if CONFIG_FT_FDC_BASE == 0
|
||||
# undef CONFIG_FT_FDC_BASE
|
||||
# define CONFIG_FT_FDC_BASE 0x180
|
||||
# endif
|
||||
# if CONFIG_FT_FDC_IRQ == 0
|
||||
# undef CONFIG_FT_FDC_IRQ
|
||||
# define CONFIG_FT_FDC_IRQ 9
|
||||
# endif
|
||||
# if CONFIG_FT_FDC_DMA == 0
|
||||
# undef CONFIG_FT_FDC_DMA
|
||||
# define CONFIG_FT_FDC_DMA 3
|
||||
# endif
|
||||
#elif CONFIG_FT_MACH2 == 1 /* CONFIG_FT_PROBE_FC10 == 1 */
|
||||
# if CONFIG_FT_FDC_BASE == 0
|
||||
# undef CONFIG_FT_FDC_BASE
|
||||
# define CONFIG_FT_FDC_BASE 0x1E0
|
||||
# endif
|
||||
# if CONFIG_FT_FDC_IRQ == 0
|
||||
# undef CONFIG_FT_FDC_IRQ
|
||||
# define CONFIG_FT_FDC_IRQ 6
|
||||
# endif
|
||||
# if CONFIG_FT_FDC_DMA == 0
|
||||
# undef CONFIG_FT_FDC_DMA
|
||||
# define CONFIG_FT_FDC_DMA 2
|
||||
# endif
|
||||
#elif defined(CONFIG_FT_ALT_FDC) /* CONFIG_FT_MACH2 */
|
||||
# if CONFIG_FT_FDC_BASE == 0
|
||||
# undef CONFIG_FT_FDC_BASE
|
||||
# define CONFIG_FT_FDC_BASE 0x370
|
||||
# endif
|
||||
# if CONFIG_FT_FDC_IRQ == 0
|
||||
# undef CONFIG_FT_FDC_IRQ
|
||||
# define CONFIG_FT_FDC_IRQ 6
|
||||
# endif
|
||||
# if CONFIG_FT_FDC_DMA == 0
|
||||
# undef CONFIG_FT_FDC_DMA
|
||||
# define CONFIG_FT_FDC_DMA 2
|
||||
# endif
|
||||
#else /* CONFIG_FT_ALT_FDC */
|
||||
# if CONFIG_FT_FDC_BASE == 0
|
||||
# undef CONFIG_FT_FDC_BASE
|
||||
# define CONFIG_FT_FDC_BASE 0x3f0
|
||||
# endif
|
||||
# if CONFIG_FT_FDC_IRQ == 0
|
||||
# undef CONFIG_FT_FDC_IRQ
|
||||
# define CONFIG_FT_FDC_IRQ 6
|
||||
# endif
|
||||
# if CONFIG_FT_FDC_DMA == 0
|
||||
# undef CONFIG_FT_FDC_DMA
|
||||
# define CONFIG_FT_FDC_DMA 2
|
||||
# endif
|
||||
#endif /* standard FDC */
|
||||
|
||||
/* some useful macro's
|
||||
*/
|
||||
#define NR_ITEMS(x) (int)(sizeof(x)/ sizeof(*x))
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif
|
|
@ -15,7 +15,7 @@
|
|||
#define FUSE_KERNEL_VERSION 7
|
||||
|
||||
/** Minor version number of this interface */
|
||||
#define FUSE_KERNEL_MINOR_VERSION 7
|
||||
#define FUSE_KERNEL_MINOR_VERSION 8
|
||||
|
||||
/** The node ID of the root inode */
|
||||
#define FUSE_ROOT_ID 1
|
||||
|
@ -92,6 +92,11 @@ struct fuse_file_lock {
|
|||
#define FUSE_ASYNC_READ (1 << 0)
|
||||
#define FUSE_POSIX_LOCKS (1 << 1)
|
||||
|
||||
/**
|
||||
* Release flags
|
||||
*/
|
||||
#define FUSE_RELEASE_FLUSH (1 << 0)
|
||||
|
||||
enum fuse_opcode {
|
||||
FUSE_LOOKUP = 1,
|
||||
FUSE_FORGET = 2, /* no reply */
|
||||
|
@ -127,6 +132,8 @@ enum fuse_opcode {
|
|||
FUSE_ACCESS = 34,
|
||||
FUSE_CREATE = 35,
|
||||
FUSE_INTERRUPT = 36,
|
||||
FUSE_BMAP = 37,
|
||||
FUSE_DESTROY = 38,
|
||||
};
|
||||
|
||||
/* The read buffer is required to be at least 8k, but may be much larger */
|
||||
|
@ -205,12 +212,13 @@ struct fuse_open_out {
|
|||
struct fuse_release_in {
|
||||
__u64 fh;
|
||||
__u32 flags;
|
||||
__u32 padding;
|
||||
__u32 release_flags;
|
||||
__u64 lock_owner;
|
||||
};
|
||||
|
||||
struct fuse_flush_in {
|
||||
__u64 fh;
|
||||
__u32 flush_flags;
|
||||
__u32 unused;
|
||||
__u32 padding;
|
||||
__u64 lock_owner;
|
||||
};
|
||||
|
@ -296,6 +304,16 @@ struct fuse_interrupt_in {
|
|||
__u64 unique;
|
||||
};
|
||||
|
||||
struct fuse_bmap_in {
|
||||
__u64 block;
|
||||
__u32 blocksize;
|
||||
__u32 padding;
|
||||
};
|
||||
|
||||
struct fuse_bmap_out {
|
||||
__u64 block;
|
||||
};
|
||||
|
||||
struct fuse_in_header {
|
||||
__u32 len;
|
||||
__u32 opcode;
|
||||
|
|
|
@ -17,6 +17,9 @@ struct genlmsghdr {
|
|||
#define GENL_HDRLEN NLMSG_ALIGN(sizeof(struct genlmsghdr))
|
||||
|
||||
#define GENL_ADMIN_PERM 0x01
|
||||
#define GENL_CMD_CAP_DO 0x02
|
||||
#define GENL_CMD_CAP_DUMP 0x04
|
||||
#define GENL_CMD_CAP_HASPOL 0x08
|
||||
|
||||
/*
|
||||
* List of reserved static generic netlink identifiers:
|
||||
|
@ -58,9 +61,6 @@ enum {
|
|||
CTRL_ATTR_OP_UNSPEC,
|
||||
CTRL_ATTR_OP_ID,
|
||||
CTRL_ATTR_OP_FLAGS,
|
||||
CTRL_ATTR_OP_POLICY,
|
||||
CTRL_ATTR_OP_DOIT,
|
||||
CTRL_ATTR_OP_DUMPIT,
|
||||
__CTRL_ATTR_OP_MAX,
|
||||
};
|
||||
|
||||
|
|
|
@ -116,6 +116,9 @@ static inline enum zone_type gfp_zone(gfp_t flags)
|
|||
#ifndef HAVE_ARCH_FREE_PAGE
|
||||
static inline void arch_free_page(struct page *page, int order) { }
|
||||
#endif
|
||||
#ifndef HAVE_ARCH_ALLOC_PAGE
|
||||
static inline void arch_alloc_page(struct page *page, int order) { }
|
||||
#endif
|
||||
|
||||
extern struct page *
|
||||
FASTCALL(__alloc_pages(gfp_t, unsigned int, struct zonelist *));
|
||||
|
|
|
@ -54,8 +54,13 @@ struct gfs2_inum {
|
|||
__be64 no_addr;
|
||||
};
|
||||
|
||||
static inline int gfs2_inum_equal(const struct gfs2_inum *ino1,
|
||||
const struct gfs2_inum *ino2)
|
||||
struct gfs2_inum_host {
|
||||
__u64 no_formal_ino;
|
||||
__u64 no_addr;
|
||||
};
|
||||
|
||||
static inline int gfs2_inum_equal(const struct gfs2_inum_host *ino1,
|
||||
const struct gfs2_inum_host *ino2)
|
||||
{
|
||||
return ino1->no_formal_ino == ino2->no_formal_ino &&
|
||||
ino1->no_addr == ino2->no_addr;
|
||||
|
@ -89,6 +94,12 @@ struct gfs2_meta_header {
|
|||
__be32 __pad1; /* Was incarnation number in gfs1 */
|
||||
};
|
||||
|
||||
struct gfs2_meta_header_host {
|
||||
__u32 mh_magic;
|
||||
__u32 mh_type;
|
||||
__u32 mh_format;
|
||||
};
|
||||
|
||||
/*
|
||||
* super-block structure
|
||||
*
|
||||
|
@ -128,6 +139,23 @@ struct gfs2_sb {
|
|||
/* In gfs1, quota and license dinodes followed */
|
||||
};
|
||||
|
||||
struct gfs2_sb_host {
|
||||
struct gfs2_meta_header_host sb_header;
|
||||
|
||||
__u32 sb_fs_format;
|
||||
__u32 sb_multihost_format;
|
||||
|
||||
__u32 sb_bsize;
|
||||
__u32 sb_bsize_shift;
|
||||
|
||||
struct gfs2_inum_host sb_master_dir; /* Was jindex dinode in gfs1 */
|
||||
struct gfs2_inum_host sb_root_dir;
|
||||
|
||||
char sb_lockproto[GFS2_LOCKNAME_LEN];
|
||||
char sb_locktable[GFS2_LOCKNAME_LEN];
|
||||
/* In gfs1, quota and license dinodes followed */
|
||||
};
|
||||
|
||||
/*
|
||||
* resource index structure
|
||||
*/
|
||||
|
@ -145,6 +173,14 @@ struct gfs2_rindex {
|
|||
__u8 ri_reserved[64];
|
||||
};
|
||||
|
||||
struct gfs2_rindex_host {
|
||||
__u64 ri_addr; /* grp block disk address */
|
||||
__u64 ri_data0; /* first data location */
|
||||
__u32 ri_length; /* length of rgrp header in fs blocks */
|
||||
__u32 ri_data; /* num of data blocks in rgrp */
|
||||
__u32 ri_bitbytes; /* number of bytes in data bitmaps */
|
||||
};
|
||||
|
||||
/*
|
||||
* resource group header structure
|
||||
*/
|
||||
|
@ -176,6 +212,13 @@ struct gfs2_rgrp {
|
|||
__u8 rg_reserved[80]; /* Several fields from gfs1 now reserved */
|
||||
};
|
||||
|
||||
struct gfs2_rgrp_host {
|
||||
__u32 rg_flags;
|
||||
__u32 rg_free;
|
||||
__u32 rg_dinodes;
|
||||
__u64 rg_igeneration;
|
||||
};
|
||||
|
||||
/*
|
||||
* quota structure
|
||||
*/
|
||||
|
@ -187,6 +230,12 @@ struct gfs2_quota {
|
|||
__u8 qu_reserved[64];
|
||||
};
|
||||
|
||||
struct gfs2_quota_host {
|
||||
__u64 qu_limit;
|
||||
__u64 qu_warn;
|
||||
__u64 qu_value;
|
||||
};
|
||||
|
||||
/*
|
||||
* dinode structure
|
||||
*/
|
||||
|
@ -270,6 +319,27 @@ struct gfs2_dinode {
|
|||
__u8 di_reserved[56];
|
||||
};
|
||||
|
||||
struct gfs2_dinode_host {
|
||||
__u64 di_size; /* number of bytes in file */
|
||||
__u64 di_blocks; /* number of blocks in file */
|
||||
|
||||
/* This section varies from gfs1. Padding added to align with
|
||||
* remainder of dinode
|
||||
*/
|
||||
__u64 di_goal_meta; /* rgrp to alloc from next */
|
||||
__u64 di_goal_data; /* data block goal */
|
||||
__u64 di_generation; /* generation number for NFS */
|
||||
|
||||
__u32 di_flags; /* GFS2_DIF_... */
|
||||
__u16 di_height; /* height of metadata */
|
||||
|
||||
/* These only apply to directories */
|
||||
__u16 di_depth; /* Number of bits in the table */
|
||||
__u32 di_entries; /* The number of entries in the directory */
|
||||
|
||||
__u64 di_eattr; /* extended attribute block number */
|
||||
};
|
||||
|
||||
/*
|
||||
* directory structure - many of these per directory file
|
||||
*/
|
||||
|
@ -344,6 +414,16 @@ struct gfs2_log_header {
|
|||
__be32 lh_hash;
|
||||
};
|
||||
|
||||
struct gfs2_log_header_host {
|
||||
struct gfs2_meta_header_host lh_header;
|
||||
|
||||
__u64 lh_sequence; /* Sequence number of this transaction */
|
||||
__u32 lh_flags; /* GFS2_LOG_HEAD_... */
|
||||
__u32 lh_tail; /* Block number of log tail */
|
||||
__u32 lh_blkno;
|
||||
__u32 lh_hash;
|
||||
};
|
||||
|
||||
/*
|
||||
* Log type descriptor
|
||||
*/
|
||||
|
@ -384,6 +464,11 @@ struct gfs2_inum_range {
|
|||
__be64 ir_length;
|
||||
};
|
||||
|
||||
struct gfs2_inum_range_host {
|
||||
__u64 ir_start;
|
||||
__u64 ir_length;
|
||||
};
|
||||
|
||||
/*
|
||||
* Statfs change
|
||||
* Describes an change to the pool of free and allocated
|
||||
|
@ -396,6 +481,12 @@ struct gfs2_statfs_change {
|
|||
__be64 sc_dinodes;
|
||||
};
|
||||
|
||||
struct gfs2_statfs_change_host {
|
||||
__u64 sc_total;
|
||||
__u64 sc_free;
|
||||
__u64 sc_dinodes;
|
||||
};
|
||||
|
||||
/*
|
||||
* Quota change
|
||||
* Describes an allocation change for a particular
|
||||
|
@ -410,33 +501,38 @@ struct gfs2_quota_change {
|
|||
__be32 qc_id;
|
||||
};
|
||||
|
||||
struct gfs2_quota_change_host {
|
||||
__u64 qc_change;
|
||||
__u32 qc_flags; /* GFS2_QCF_... */
|
||||
__u32 qc_id;
|
||||
};
|
||||
|
||||
#ifdef __KERNEL__
|
||||
/* Translation functions */
|
||||
|
||||
extern void gfs2_inum_in(struct gfs2_inum *no, const void *buf);
|
||||
extern void gfs2_inum_out(const struct gfs2_inum *no, void *buf);
|
||||
extern void gfs2_sb_in(struct gfs2_sb *sb, const void *buf);
|
||||
extern void gfs2_rindex_in(struct gfs2_rindex *ri, const void *buf);
|
||||
extern void gfs2_rindex_out(const struct gfs2_rindex *ri, void *buf);
|
||||
extern void gfs2_rgrp_in(struct gfs2_rgrp *rg, const void *buf);
|
||||
extern void gfs2_rgrp_out(const struct gfs2_rgrp *rg, void *buf);
|
||||
extern void gfs2_quota_in(struct gfs2_quota *qu, const void *buf);
|
||||
extern void gfs2_quota_out(const struct gfs2_quota *qu, void *buf);
|
||||
extern void gfs2_dinode_in(struct gfs2_dinode *di, const void *buf);
|
||||
extern void gfs2_dinode_out(const struct gfs2_dinode *di, void *buf);
|
||||
extern void gfs2_inum_in(struct gfs2_inum_host *no, const void *buf);
|
||||
extern void gfs2_inum_out(const struct gfs2_inum_host *no, void *buf);
|
||||
extern void gfs2_sb_in(struct gfs2_sb_host *sb, const void *buf);
|
||||
extern void gfs2_rindex_in(struct gfs2_rindex_host *ri, const void *buf);
|
||||
extern void gfs2_rindex_out(const struct gfs2_rindex_host *ri, void *buf);
|
||||
extern void gfs2_rgrp_in(struct gfs2_rgrp_host *rg, const void *buf);
|
||||
extern void gfs2_rgrp_out(const struct gfs2_rgrp_host *rg, void *buf);
|
||||
extern void gfs2_quota_in(struct gfs2_quota_host *qu, const void *buf);
|
||||
struct gfs2_inode;
|
||||
extern void gfs2_dinode_out(const struct gfs2_inode *ip, void *buf);
|
||||
extern void gfs2_ea_header_in(struct gfs2_ea_header *ea, const void *buf);
|
||||
extern void gfs2_ea_header_out(const struct gfs2_ea_header *ea, void *buf);
|
||||
extern void gfs2_log_header_in(struct gfs2_log_header *lh, const void *buf);
|
||||
extern void gfs2_inum_range_in(struct gfs2_inum_range *ir, const void *buf);
|
||||
extern void gfs2_inum_range_out(const struct gfs2_inum_range *ir, void *buf);
|
||||
extern void gfs2_statfs_change_in(struct gfs2_statfs_change *sc, const void *buf);
|
||||
extern void gfs2_statfs_change_out(const struct gfs2_statfs_change *sc, void *buf);
|
||||
extern void gfs2_quota_change_in(struct gfs2_quota_change *qc, const void *buf);
|
||||
extern void gfs2_log_header_in(struct gfs2_log_header_host *lh, const void *buf);
|
||||
extern void gfs2_inum_range_in(struct gfs2_inum_range_host *ir, const void *buf);
|
||||
extern void gfs2_inum_range_out(const struct gfs2_inum_range_host *ir, void *buf);
|
||||
extern void gfs2_statfs_change_in(struct gfs2_statfs_change_host *sc, const void *buf);
|
||||
extern void gfs2_statfs_change_out(const struct gfs2_statfs_change_host *sc, void *buf);
|
||||
extern void gfs2_quota_change_in(struct gfs2_quota_change_host *qc, const void *buf);
|
||||
|
||||
/* Printing functions */
|
||||
|
||||
extern void gfs2_rindex_print(const struct gfs2_rindex *ri);
|
||||
extern void gfs2_dinode_print(const struct gfs2_dinode *di);
|
||||
extern void gfs2_rindex_print(const struct gfs2_rindex_host *ri);
|
||||
extern void gfs2_dinode_print(const struct gfs2_inode *ip);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include <linux/fs.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/uaccess.h>
|
||||
|
||||
#include <asm/cacheflush.h>
|
||||
|
||||
|
@ -41,9 +42,10 @@ static inline void *kmap(struct page *page)
|
|||
|
||||
#define kunmap(page) do { (void) (page); } while (0)
|
||||
|
||||
#define kmap_atomic(page, idx) page_address(page)
|
||||
#define kunmap_atomic(addr, idx) do { } while (0)
|
||||
#define kmap_atomic_pfn(pfn, idx) page_address(pfn_to_page(pfn))
|
||||
#define kmap_atomic(page, idx) \
|
||||
({ pagefault_disable(); page_address(page); })
|
||||
#define kunmap_atomic(addr, idx) do { pagefault_enable(); } while (0)
|
||||
#define kmap_atomic_pfn(pfn, idx) kmap_atomic(pfn_to_page(pfn), (idx))
|
||||
#define kmap_atomic_to_page(ptr) virt_to_page(ptr)
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,15 +1,23 @@
|
|||
#ifndef LINUX_HTIRQ_H
|
||||
#define LINUX_HTIRQ_H
|
||||
|
||||
struct ht_irq_msg {
|
||||
u32 address_lo; /* low 32 bits of the ht irq message */
|
||||
u32 address_hi; /* high 32 bits of the it irq message */
|
||||
};
|
||||
|
||||
/* Helper functions.. */
|
||||
void write_ht_irq_low(unsigned int irq, u32 data);
|
||||
void write_ht_irq_high(unsigned int irq, u32 data);
|
||||
u32 read_ht_irq_low(unsigned int irq);
|
||||
u32 read_ht_irq_high(unsigned int irq);
|
||||
void fetch_ht_irq_msg(unsigned int irq, struct ht_irq_msg *msg);
|
||||
void write_ht_irq_msg(unsigned int irq, struct ht_irq_msg *msg);
|
||||
void mask_ht_irq(unsigned int irq);
|
||||
void unmask_ht_irq(unsigned int irq);
|
||||
|
||||
/* The arch hook for getting things started */
|
||||
int arch_setup_ht_irq(unsigned int irq, struct pci_dev *dev);
|
||||
|
||||
/* For drivers of buggy hardware */
|
||||
typedef void (ht_irq_update_t)(struct pci_dev *dev, int irq,
|
||||
struct ht_irq_msg *msg);
|
||||
int __ht_create_irq(struct pci_dev *dev, int idx, ht_irq_update_t *update);
|
||||
|
||||
#endif /* LINUX_HTIRQ_H */
|
||||
|
|
|
@ -35,6 +35,7 @@ extern int sysctl_hugetlb_shm_group;
|
|||
|
||||
pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr);
|
||||
pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr);
|
||||
int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep);
|
||||
struct page *follow_huge_addr(struct mm_struct *mm, unsigned long address,
|
||||
int write);
|
||||
struct page *follow_huge_pmd(struct mm_struct *mm, unsigned long address,
|
||||
|
@ -60,8 +61,11 @@ void hugetlb_free_pgd_range(struct mmu_gather **tlb, unsigned long addr,
|
|||
* If the arch doesn't supply something else, assume that hugepage
|
||||
* size aligned regions are ok without further preparation.
|
||||
*/
|
||||
static inline int prepare_hugepage_range(unsigned long addr, unsigned long len)
|
||||
static inline int prepare_hugepage_range(unsigned long addr, unsigned long len,
|
||||
pgoff_t pgoff)
|
||||
{
|
||||
if (pgoff & (~HPAGE_MASK >> PAGE_SHIFT))
|
||||
return -EINVAL;
|
||||
if (len & ~HPAGE_MASK)
|
||||
return -EINVAL;
|
||||
if (addr & ~HPAGE_MASK)
|
||||
|
@ -69,7 +73,8 @@ static inline int prepare_hugepage_range(unsigned long addr, unsigned long len)
|
|||
return 0;
|
||||
}
|
||||
#else
|
||||
int prepare_hugepage_range(unsigned long addr, unsigned long len);
|
||||
int prepare_hugepage_range(unsigned long addr, unsigned long len,
|
||||
pgoff_t pgoff);
|
||||
#endif
|
||||
|
||||
#ifndef ARCH_HAS_SETCLEAR_HUGE_PTE
|
||||
|
@ -107,7 +112,7 @@ static inline unsigned long hugetlb_total_pages(void)
|
|||
#define hugetlb_report_meminfo(buf) 0
|
||||
#define hugetlb_report_node_meminfo(n, buf) 0
|
||||
#define follow_huge_pmd(mm, addr, pmd, write) NULL
|
||||
#define prepare_hugepage_range(addr, len) (-EINVAL)
|
||||
#define prepare_hugepage_range(addr,len,pgoff) (-EINVAL)
|
||||
#define pmd_huge(x) 0
|
||||
#define is_hugepage_only_range(mm, addr, len) 0
|
||||
#define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; })
|
||||
|
|
|
@ -1,29 +1,6 @@
|
|||
#ifndef _LINUX_I2C_ALGO_PXA_H
|
||||
#define _LINUX_I2C_ALGO_PXA_H
|
||||
|
||||
struct i2c_eeprom_emu_watcher {
|
||||
void (*write)(void *, unsigned int addr, unsigned char newval);
|
||||
};
|
||||
|
||||
struct i2c_eeprom_emu_watch {
|
||||
struct list_head node;
|
||||
unsigned int start;
|
||||
unsigned int end;
|
||||
struct i2c_eeprom_emu_watcher *ops;
|
||||
void *data;
|
||||
};
|
||||
|
||||
#define I2C_EEPROM_EMU_SIZE (256)
|
||||
|
||||
struct i2c_eeprom_emu {
|
||||
unsigned int size;
|
||||
unsigned int ptr;
|
||||
unsigned int seen_start;
|
||||
struct list_head watch;
|
||||
|
||||
unsigned char bytes[I2C_EEPROM_EMU_SIZE];
|
||||
};
|
||||
|
||||
typedef enum i2c_slave_event_e {
|
||||
I2C_SLAVE_EVENT_START_READ,
|
||||
I2C_SLAVE_EVENT_START_WRITE,
|
||||
|
@ -37,12 +14,4 @@ struct i2c_slave_client {
|
|||
void (*write)(void *ptr, unsigned int val);
|
||||
};
|
||||
|
||||
extern int i2c_eeprom_emu_addwatcher(struct i2c_eeprom_emu *, void *data,
|
||||
unsigned int addr, unsigned int size,
|
||||
struct i2c_eeprom_emu_watcher *);
|
||||
|
||||
extern void i2c_eeprom_emu_delwatcher(struct i2c_eeprom_emu *, void *data, struct i2c_eeprom_emu_watcher *watcher);
|
||||
|
||||
extern struct i2c_eeprom_emu *i2c_pxa_get_eeprom(void);
|
||||
|
||||
#endif /* _LINUX_I2C_ALGO_PXA_H */
|
||||
|
|
|
@ -461,7 +461,7 @@ struct i2o_driver {
|
|||
int (*reply) (struct i2o_controller *, u32, struct i2o_message *);
|
||||
|
||||
/* Event handler */
|
||||
void (*event) (struct i2o_event *);
|
||||
work_func_t event;
|
||||
|
||||
struct workqueue_struct *event_queue; /* Event queue */
|
||||
|
||||
|
@ -490,7 +490,7 @@ struct i2o_dma {
|
|||
*/
|
||||
struct i2o_pool {
|
||||
char *name;
|
||||
kmem_cache_t *slab;
|
||||
struct kmem_cache *slab;
|
||||
mempool_t *mempool;
|
||||
};
|
||||
|
||||
|
@ -986,7 +986,8 @@ extern void i2o_driver_unregister(struct i2o_driver *);
|
|||
|
||||
/**
|
||||
* i2o_driver_notify_controller_add - Send notification of added controller
|
||||
* to a single I2O driver
|
||||
* @drv: I2O driver
|
||||
* @c: I2O controller
|
||||
*
|
||||
* Send notification of added controller to a single registered driver.
|
||||
*/
|
||||
|
@ -998,8 +999,9 @@ static inline void i2o_driver_notify_controller_add(struct i2o_driver *drv,
|
|||
};
|
||||
|
||||
/**
|
||||
* i2o_driver_notify_controller_remove - Send notification of removed
|
||||
* controller to a single I2O driver
|
||||
* i2o_driver_notify_controller_remove - Send notification of removed controller
|
||||
* @drv: I2O driver
|
||||
* @c: I2O controller
|
||||
*
|
||||
* Send notification of removed controller to a single registered driver.
|
||||
*/
|
||||
|
@ -1011,8 +1013,9 @@ static inline void i2o_driver_notify_controller_remove(struct i2o_driver *drv,
|
|||
};
|
||||
|
||||
/**
|
||||
* i2o_driver_notify_device_add - Send notification of added device to a
|
||||
* single I2O driver
|
||||
* i2o_driver_notify_device_add - Send notification of added device
|
||||
* @drv: I2O driver
|
||||
* @i2o_dev: the added i2o_device
|
||||
*
|
||||
* Send notification of added device to a single registered driver.
|
||||
*/
|
||||
|
@ -1025,7 +1028,8 @@ static inline void i2o_driver_notify_device_add(struct i2o_driver *drv,
|
|||
|
||||
/**
|
||||
* i2o_driver_notify_device_remove - Send notification of removed device
|
||||
* to a single I2O driver
|
||||
* @drv: I2O driver
|
||||
* @i2o_dev: the added i2o_device
|
||||
*
|
||||
* Send notification of removed device to a single registered driver.
|
||||
*/
|
||||
|
@ -1148,7 +1152,7 @@ static inline void i2o_msg_post(struct i2o_controller *c,
|
|||
/**
|
||||
* i2o_msg_post_wait - Post and wait a message and wait until return
|
||||
* @c: controller
|
||||
* @m: message to post
|
||||
* @msg: message to post
|
||||
* @timeout: time in seconds to wait
|
||||
*
|
||||
* This API allows an OSM to post a message and then be told whether or
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
struct icmphdr {
|
||||
__u8 type;
|
||||
__u8 code;
|
||||
__be16 checksum;
|
||||
__sum16 checksum;
|
||||
union {
|
||||
struct {
|
||||
__be16 id;
|
||||
|
|
|
@ -7,17 +7,17 @@ struct icmp6hdr {
|
|||
|
||||
__u8 icmp6_type;
|
||||
__u8 icmp6_code;
|
||||
__u16 icmp6_cksum;
|
||||
__sum16 icmp6_cksum;
|
||||
|
||||
|
||||
union {
|
||||
__u32 un_data32[1];
|
||||
__u16 un_data16[2];
|
||||
__be32 un_data32[1];
|
||||
__be16 un_data16[2];
|
||||
__u8 un_data8[4];
|
||||
|
||||
struct icmpv6_echo {
|
||||
__u16 identifier;
|
||||
__u16 sequence;
|
||||
__be16 identifier;
|
||||
__be16 sequence;
|
||||
} u_echo;
|
||||
|
||||
struct icmpv6_nd_advt {
|
||||
|
@ -53,7 +53,7 @@ struct icmp6hdr {
|
|||
#else
|
||||
#error "Please fix <asm/byteorder.h>"
|
||||
#endif
|
||||
__u16 rt_lifetime;
|
||||
__be16 rt_lifetime;
|
||||
} u_nd_ra;
|
||||
|
||||
} icmp6_dataun;
|
||||
|
|
|
@ -1,17 +1,19 @@
|
|||
#ifndef __LINUX_IF_PACKET_H
|
||||
#define __LINUX_IF_PACKET_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
struct sockaddr_pkt
|
||||
{
|
||||
unsigned short spkt_family;
|
||||
unsigned char spkt_device[14];
|
||||
unsigned short spkt_protocol;
|
||||
__be16 spkt_protocol;
|
||||
};
|
||||
|
||||
struct sockaddr_ll
|
||||
{
|
||||
unsigned short sll_family;
|
||||
unsigned short sll_protocol;
|
||||
__be16 sll_protocol;
|
||||
int sll_ifindex;
|
||||
unsigned short sll_hatype;
|
||||
unsigned char sll_pkttype;
|
||||
|
|
|
@ -19,10 +19,10 @@ struct ip_tunnel_parm
|
|||
{
|
||||
char name[IFNAMSIZ];
|
||||
int link;
|
||||
__u16 i_flags;
|
||||
__u16 o_flags;
|
||||
__u32 i_key;
|
||||
__u32 o_key;
|
||||
__be16 i_flags;
|
||||
__be16 o_flags;
|
||||
__be32 i_key;
|
||||
__be32 o_key;
|
||||
struct iphdr iph;
|
||||
};
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ struct igmphdr
|
|||
{
|
||||
__u8 type;
|
||||
__u8 code; /* For newer IGMP */
|
||||
__be16 csum;
|
||||
__sum16 csum;
|
||||
__be32 group;
|
||||
};
|
||||
|
||||
|
@ -127,6 +127,7 @@ struct igmpv3_query {
|
|||
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/skbuff.h>
|
||||
#include <linux/timer.h>
|
||||
#include <linux/in.h>
|
||||
|
||||
extern int sysctl_igmp_max_memberships;
|
||||
|
@ -191,7 +192,7 @@ struct ip_mc_list
|
|||
#define IGMPV3_MASK(value, nb) ((nb)>=32 ? (value) : ((1<<(nb))-1) & (value))
|
||||
#define IGMPV3_EXP(thresh, nbmant, nbexp, value) \
|
||||
((value) < (thresh) ? (value) : \
|
||||
((IGMPV3_MASK(value, nbmant) | (1<<(nbmant+nbexp))) << \
|
||||
((IGMPV3_MASK(value, nbmant) | (1<<(nbmant))) << \
|
||||
(IGMPV3_MASK((value) >> (nbmant), nbexp) + (nbexp))))
|
||||
|
||||
#define IGMPV3_QQIC(value) IGMPV3_EXP(0x80, 4, 3, value)
|
||||
|
|
|
@ -45,6 +45,7 @@ enum {
|
|||
|
||||
IPPROTO_COMP = 108, /* Compression Header protocol */
|
||||
IPPROTO_SCTP = 132, /* Stream Control Transport Protocol */
|
||||
IPPROTO_UDPLITE = 136, /* UDP-Lite (RFC 3828) */
|
||||
|
||||
IPPROTO_RAW = 255, /* Raw IP packets */
|
||||
IPPROTO_MAX
|
||||
|
|
|
@ -54,7 +54,7 @@ extern const struct in6_addr in6addr_loopback;
|
|||
struct sockaddr_in6 {
|
||||
unsigned short int sin6_family; /* AF_INET6 */
|
||||
__be16 sin6_port; /* Transport layer port # */
|
||||
__u32 sin6_flowinfo; /* IPv6 flow information */
|
||||
__be32 sin6_flowinfo; /* IPv6 flow information */
|
||||
struct in6_addr sin6_addr; /* IPv6 address */
|
||||
__u32 sin6_scope_id; /* scope id (new in RFC2553) */
|
||||
};
|
||||
|
@ -72,7 +72,7 @@ struct ipv6_mreq {
|
|||
struct in6_flowlabel_req
|
||||
{
|
||||
struct in6_addr flr_dst;
|
||||
__u32 flr_label;
|
||||
__be32 flr_label;
|
||||
__u8 flr_action;
|
||||
__u8 flr_share;
|
||||
__u16 flr_flags;
|
||||
|
@ -225,7 +225,7 @@ struct in6_flowlabel_req
|
|||
#endif
|
||||
|
||||
/*
|
||||
* Netfilter
|
||||
* Netfilter (1)
|
||||
*
|
||||
* Following socket options are used in ip6_tables;
|
||||
* see include/linux/netfilter_ipv6/ip6_tables.h.
|
||||
|
@ -240,4 +240,14 @@ struct in6_flowlabel_req
|
|||
#define IPV6_RECVTCLASS 66
|
||||
#define IPV6_TCLASS 67
|
||||
|
||||
/*
|
||||
* Netfilter (2)
|
||||
*
|
||||
* Following socket options are used in ip6_tables;
|
||||
* see include/linux/netfilter_ipv6/ip6_tables.h.
|
||||
*
|
||||
* IP6T_SO_GET_REVISION_MATCH 68
|
||||
* IP6T_SO_GET_REVISION_TARGET 69
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
#include <linux/types.h>
|
||||
|
||||
extern __be32 in_aton(const char *str);
|
||||
extern int in4_pton(const char *src, int srclen, u8 *dst, char delim, const char **end);
|
||||
extern int in6_pton(const char *src, int srclen, u8 *dst, char delim, const char **end);
|
||||
extern int in4_pton(const char *src, int srclen, u8 *dst, int delim, const char **end);
|
||||
extern int in6_pton(const char *src, int srclen, u8 *dst, int delim, const char **end);
|
||||
#endif
|
||||
#endif /* _LINUX_INET_H */
|
||||
|
|
|
@ -124,12 +124,13 @@ static __inline__ int inet_ifa_match(__be32 addr, struct in_ifaddr *ifa)
|
|||
* Check if a mask is acceptable.
|
||||
*/
|
||||
|
||||
static __inline__ int bad_mask(u32 mask, u32 addr)
|
||||
static __inline__ int bad_mask(__be32 mask, __be32 addr)
|
||||
{
|
||||
__u32 hmask;
|
||||
if (addr & (mask = ~mask))
|
||||
return 1;
|
||||
mask = ntohl(mask);
|
||||
if (mask & (mask+1))
|
||||
hmask = ntohl(mask);
|
||||
if (hmask & (hmask+1))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
@ -190,11 +191,12 @@ static __inline__ __be32 inet_make_mask(int logmask)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static __inline__ int inet_mask_len(__u32 mask)
|
||||
static __inline__ int inet_mask_len(__be32 mask)
|
||||
{
|
||||
if (!(mask = ntohl(mask)))
|
||||
__u32 hmask = ntohl(mask);
|
||||
if (!hmask)
|
||||
return 0;
|
||||
return 32 - ffz(~mask);
|
||||
return 32 - ffz(~hmask);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -93,6 +93,14 @@ extern void setup_arch(char **);
|
|||
static initcall_t __initcall_##fn##id __attribute_used__ \
|
||||
__attribute__((__section__(".initcall" level ".init"))) = fn
|
||||
|
||||
/*
|
||||
* A "pure" initcall has no dependencies on anything else, and purely
|
||||
* initializes variables that couldn't be statically initialized.
|
||||
*
|
||||
* This only exists for built-in code, not for modules.
|
||||
*/
|
||||
#define pure_initcall(fn) __define_initcall("0",fn,1)
|
||||
|
||||
#define core_initcall(fn) __define_initcall("1",fn,1)
|
||||
#define core_initcall_sync(fn) __define_initcall("1s",fn,1s)
|
||||
#define postcore_initcall(fn) __define_initcall("2",fn,2)
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
extern struct nsproxy init_nsproxy;
|
||||
#define INIT_NSPROXY(nsproxy) { \
|
||||
.count = ATOMIC_INIT(1), \
|
||||
.nslock = SPIN_LOCK_UNLOCKED, \
|
||||
.nslock = __SPIN_LOCK_UNLOCKED(nsproxy.nslock), \
|
||||
.uts_ns = &init_uts_ns, \
|
||||
.namespace = NULL, \
|
||||
INIT_IPC_NS(ipc_ns) \
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include <linux/hardirq.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/irqflags.h>
|
||||
#include <linux/bottom_half.h>
|
||||
#include <asm/atomic.h>
|
||||
#include <asm/ptrace.h>
|
||||
#include <asm/system.h>
|
||||
|
@ -217,12 +218,6 @@ static inline void __deprecated save_and_cli(unsigned long *x)
|
|||
#define save_and_cli(x) save_and_cli(&x)
|
||||
#endif /* CONFIG_SMP */
|
||||
|
||||
extern void local_bh_disable(void);
|
||||
extern void __local_bh_enable(void);
|
||||
extern void _local_bh_enable(void);
|
||||
extern void local_bh_enable(void);
|
||||
extern void local_bh_enable_ip(unsigned long ip);
|
||||
|
||||
/* PLEASE, avoid to allocate new softirqs, if you need not _really_ high
|
||||
frequency threaded job scheduling. For almost all the purposes
|
||||
tasklets are more than enough. F.e. all serial device BHs et
|
||||
|
|
|
@ -89,6 +89,7 @@ struct resource_list {
|
|||
#define IORESOURCE_ROM_ENABLE (1<<0) /* ROM is enabled, same as PCI_ROM_ADDRESS_ENABLE */
|
||||
#define IORESOURCE_ROM_SHADOW (1<<1) /* ROM is copy at C000:0 */
|
||||
#define IORESOURCE_ROM_COPY (1<<2) /* ROM is alloc'd copy, resource field overlaid */
|
||||
#define IORESOURCE_ROM_BIOS_COPY (1<<3) /* ROM is BIOS copy, resource field overlaid */
|
||||
|
||||
/* PC/ISA/whatever - the normal PC address spaces: IO and memory */
|
||||
extern struct resource ioport_resource;
|
||||
|
|
|
@ -98,7 +98,7 @@ struct iphdr {
|
|||
__be16 frag_off;
|
||||
__u8 ttl;
|
||||
__u8 protocol;
|
||||
__be16 check;
|
||||
__sum16 check;
|
||||
__be32 saddr;
|
||||
__be32 daddr;
|
||||
/*The options start here. */
|
||||
|
|
|
@ -25,7 +25,7 @@ struct ip6_tnl_parm {
|
|||
__u8 proto; /* tunnel protocol */
|
||||
__u8 encap_limit; /* encapsulation limit for tunnel */
|
||||
__u8 hop_limit; /* hop limit for tunnel */
|
||||
__u32 flowinfo; /* traffic class and flowlabel for tunnel */
|
||||
__be32 flowinfo; /* traffic class and flowlabel for tunnel */
|
||||
__u32 flags; /* tunnel flags */
|
||||
struct in6_addr laddr; /* local tunnel end-point address */
|
||||
struct in6_addr raddr; /* remote tunnel end-point address */
|
||||
|
|
|
@ -208,6 +208,15 @@ struct kernel_ipmi_msg
|
|||
code as the first byte of the incoming data, unlike a response. */
|
||||
|
||||
|
||||
/*
|
||||
* Modes for ipmi_set_maint_mode() and the userland IOCTL. The AUTO
|
||||
* setting is the default and means it will be set on certain
|
||||
* commands. Hard setting it on and off will override automatic
|
||||
* operation.
|
||||
*/
|
||||
#define IPMI_MAINTENANCE_MODE_AUTO 0
|
||||
#define IPMI_MAINTENANCE_MODE_OFF 1
|
||||
#define IPMI_MAINTENANCE_MODE_ON 2
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
|
@ -373,6 +382,35 @@ int ipmi_unregister_for_cmd(ipmi_user_t user,
|
|||
unsigned char cmd,
|
||||
unsigned int chans);
|
||||
|
||||
/*
|
||||
* Go into a mode where the driver will not autonomously attempt to do
|
||||
* things with the interface. It will still respond to attentions and
|
||||
* interrupts, and it will expect that commands will complete. It
|
||||
* will not automatcially check for flags, events, or things of that
|
||||
* nature.
|
||||
*
|
||||
* This is primarily used for firmware upgrades. The idea is that
|
||||
* when you go into firmware upgrade mode, you do this operation
|
||||
* and the driver will not attempt to do anything but what you tell
|
||||
* it or what the BMC asks for.
|
||||
*
|
||||
* Note that if you send a command that resets the BMC, the driver
|
||||
* will still expect a response from that command. So the BMC should
|
||||
* reset itself *after* the response is sent. Resetting before the
|
||||
* response is just silly.
|
||||
*
|
||||
* If in auto maintenance mode, the driver will automatically go into
|
||||
* maintenance mode for 30 seconds if it sees a cold reset, a warm
|
||||
* reset, or a firmware NetFN. This means that code that uses only
|
||||
* firmware NetFN commands to do upgrades will work automatically
|
||||
* without change, assuming it sends a message every 30 seconds or
|
||||
* less.
|
||||
*
|
||||
* See the IPMI_MAINTENANCE_MODE_xxx defines for what the mode means.
|
||||
*/
|
||||
int ipmi_get_maintenance_mode(ipmi_user_t user);
|
||||
int ipmi_set_maintenance_mode(ipmi_user_t user, int mode);
|
||||
|
||||
/*
|
||||
* Allow run-to-completion mode to be set for the interface of
|
||||
* a specific user.
|
||||
|
@ -656,4 +694,11 @@ struct ipmi_timing_parms
|
|||
#define IPMICTL_GET_TIMING_PARMS_CMD _IOR(IPMI_IOC_MAGIC, 23, \
|
||||
struct ipmi_timing_parms)
|
||||
|
||||
/*
|
||||
* Set the maintenance mode. See ipmi_set_maintenance_mode() above
|
||||
* for a description of what this does.
|
||||
*/
|
||||
#define IPMICTL_GET_MAINTENANCE_MODE_CMD _IOR(IPMI_IOC_MAGIC, 30, int)
|
||||
#define IPMICTL_SET_MAINTENANCE_MODE_CMD _IOW(IPMI_IOC_MAGIC, 31, int)
|
||||
|
||||
#endif /* __LINUX_IPMI_H */
|
||||
|
|
|
@ -46,6 +46,8 @@
|
|||
#define IPMI_NETFN_APP_REQUEST 0x06
|
||||
#define IPMI_NETFN_APP_RESPONSE 0x07
|
||||
#define IPMI_GET_DEVICE_ID_CMD 0x01
|
||||
#define IPMI_COLD_RESET_CMD 0x02
|
||||
#define IPMI_WARM_RESET_CMD 0x03
|
||||
#define IPMI_CLEAR_MSG_FLAGS_CMD 0x30
|
||||
#define IPMI_GET_DEVICE_GUID_CMD 0x08
|
||||
#define IPMI_GET_MSG_FLAGS_CMD 0x31
|
||||
|
@ -60,21 +62,30 @@
|
|||
#define IPMI_NETFN_STORAGE_RESPONSE 0x0b
|
||||
#define IPMI_ADD_SEL_ENTRY_CMD 0x44
|
||||
|
||||
#define IPMI_NETFN_FIRMWARE_REQUEST 0x08
|
||||
#define IPMI_NETFN_FIRMWARE_RESPONSE 0x09
|
||||
|
||||
/* The default slave address */
|
||||
#define IPMI_BMC_SLAVE_ADDR 0x20
|
||||
|
||||
/* The BT interface on high-end HP systems supports up to 255 bytes in
|
||||
* one transfer. Its "virtual" BMC supports some commands that are longer
|
||||
* than 128 bytes. Use the full 256, plus NetFn/LUN, Cmd, cCode, plus
|
||||
* some overhead. It would be nice to base this on the "BT Capabilities"
|
||||
* but that's too hard to propagate to the rest of the driver. */
|
||||
* some overhead; it's not worth the effort to dynamically size this based
|
||||
* on the results of the "Get BT Capabilities" command. */
|
||||
#define IPMI_MAX_MSG_LENGTH 272 /* multiple of 16 */
|
||||
|
||||
#define IPMI_CC_NO_ERROR 0x00
|
||||
#define IPMI_NODE_BUSY_ERR 0xc0
|
||||
#define IPMI_INVALID_COMMAND_ERR 0xc1
|
||||
#define IPMI_TIMEOUT_ERR 0xc3
|
||||
#define IPMI_ERR_MSG_TRUNCATED 0xc6
|
||||
#define IPMI_REQ_LEN_INVALID_ERR 0xc7
|
||||
#define IPMI_REQ_LEN_EXCEEDED_ERR 0xc8
|
||||
#define IPMI_NOT_IN_MY_STATE_ERR 0xd5 /* IPMI 2.0 */
|
||||
#define IPMI_LOST_ARBITRATION_ERR 0x81
|
||||
#define IPMI_BUS_ERR 0x82
|
||||
#define IPMI_NAK_ON_WRITE_ERR 0x83
|
||||
#define IPMI_ERR_UNSPECIFIED 0xff
|
||||
|
||||
#define IPMI_CHANNEL_PROTOCOL_IPMB 1
|
||||
|
|
|
@ -115,6 +115,13 @@ struct ipmi_smi_handlers
|
|||
poll for operations during things like crash dumps. */
|
||||
void (*poll)(void *send_info);
|
||||
|
||||
/* Enable/disable firmware maintenance mode. Note that this
|
||||
is *not* the modes defined, this is simply an on/off
|
||||
setting. The message handler does the mode handling. Note
|
||||
that this is called from interupt context, so it cannot
|
||||
block. */
|
||||
void (*set_maintenance_mode)(void *send_info, int enable);
|
||||
|
||||
/* Tell the handler that we are using it/not using it. The
|
||||
message handler get the modules that this handler belongs
|
||||
to; this function lets the SMI claim any modules that it
|
||||
|
@ -173,6 +180,7 @@ int ipmi_register_smi(struct ipmi_smi_handlers *handlers,
|
|||
void *send_info,
|
||||
struct ipmi_device_id *device_id,
|
||||
struct device *dev,
|
||||
const char *sysfs_name,
|
||||
unsigned char slave_addr);
|
||||
|
||||
/*
|
||||
|
|
|
@ -274,7 +274,7 @@ struct ipv6_pinfo {
|
|||
struct in6_addr *saddr_cache;
|
||||
#endif
|
||||
|
||||
__u32 flow_label;
|
||||
__be32 flow_label;
|
||||
__u32 frag_size;
|
||||
__s16 hop_limit;
|
||||
__s16 mcast_hops;
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
|
||||
struct sockaddr_ipx {
|
||||
sa_family_t sipx_family;
|
||||
__u16 sipx_port;
|
||||
__u32 sipx_network;
|
||||
__be16 sipx_port;
|
||||
__be32 sipx_network;
|
||||
unsigned char sipx_node[IPX_NODE_LEN];
|
||||
__u8 sipx_type;
|
||||
unsigned char sipx_zero; /* 16 byte fill */
|
||||
|
@ -23,13 +23,13 @@ struct sockaddr_ipx {
|
|||
#define IPX_CRTITF 1
|
||||
|
||||
struct ipx_route_definition {
|
||||
__u32 ipx_network;
|
||||
__u32 ipx_router_network;
|
||||
__be32 ipx_network;
|
||||
__be32 ipx_router_network;
|
||||
unsigned char ipx_router_node[IPX_NODE_LEN];
|
||||
};
|
||||
|
||||
struct ipx_interface_definition {
|
||||
__u32 ipx_network;
|
||||
__be32 ipx_network;
|
||||
unsigned char ipx_device[16];
|
||||
unsigned char ipx_dlink_type;
|
||||
#define IPX_FRAME_NONE 0
|
||||
|
@ -55,8 +55,8 @@ struct ipx_config_data {
|
|||
*/
|
||||
|
||||
struct ipx_route_def {
|
||||
__u32 ipx_network;
|
||||
__u32 ipx_router_network;
|
||||
__be32 ipx_network;
|
||||
__be32 ipx_router_network;
|
||||
#define IPX_ROUTE_NO_ROUTER 0
|
||||
unsigned char ipx_router_node[IPX_NODE_LEN];
|
||||
unsigned char ipx_device[16];
|
||||
|
|
|
@ -315,7 +315,7 @@ typedef struct {
|
|||
* structures. If the freq0 variable is non-zero, the tone table contents
|
||||
* for the tone_index are updated to the frequencies and gains defined. It
|
||||
* should be noted that DTMF tones cannot be reassigned, so if DTMF tone
|
||||
* table indexs are used in a cadence the frequency and gain variables will
|
||||
* table indexes are used in a cadence the frequency and gain variables will
|
||||
* be ignored.
|
||||
*
|
||||
* If the array elements contain frequency parameters the driver will
|
||||
|
|
|
@ -839,7 +839,6 @@ struct journal_s
|
|||
*/
|
||||
|
||||
/* Filing buffers */
|
||||
extern void __journal_temp_unlink_buffer(struct journal_head *jh);
|
||||
extern void journal_unfile_buffer(journal_t *, struct journal_head *);
|
||||
extern void __journal_unfile_buffer(struct journal_head *);
|
||||
extern void __journal_refile_buffer(struct journal_head *);
|
||||
|
@ -949,7 +948,7 @@ void journal_put_journal_head(struct journal_head *jh);
|
|||
/*
|
||||
* handle management
|
||||
*/
|
||||
extern kmem_cache_t *jbd_handle_cache;
|
||||
extern struct kmem_cache *jbd_handle_cache;
|
||||
|
||||
static inline handle_t *jbd_alloc_handle(gfp_t gfp_flags)
|
||||
{
|
||||
|
|
|
@ -848,7 +848,6 @@ struct journal_s
|
|||
*/
|
||||
|
||||
/* Filing buffers */
|
||||
extern void __jbd2_journal_temp_unlink_buffer(struct journal_head *jh);
|
||||
extern void jbd2_journal_unfile_buffer(journal_t *, struct journal_head *);
|
||||
extern void __jbd2_journal_unfile_buffer(struct journal_head *);
|
||||
extern void __jbd2_journal_refile_buffer(struct journal_head *);
|
||||
|
@ -958,7 +957,7 @@ void jbd2_journal_put_journal_head(struct journal_head *jh);
|
|||
/*
|
||||
* handle management
|
||||
*/
|
||||
extern kmem_cache_t *jbd2_handle_cache;
|
||||
extern struct kmem_cache *jbd2_handle_cache;
|
||||
|
||||
static inline handle_t *jbd_alloc_handle(gfp_t gfp_flags)
|
||||
{
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
#define __jiffy_data __attribute__((section(".data")))
|
||||
|
||||
/*
|
||||
* The 64-bit value is not volatile - you MUST NOT read it
|
||||
* The 64-bit value is not atomic - you MUST NOT read it
|
||||
* without sampling the sequence number in xtime_lock.
|
||||
* get_jiffies_64() will do this for you as appropriate.
|
||||
*/
|
||||
|
|
|
@ -158,7 +158,7 @@ static inline void con_schedule_flip(struct tty_struct *t)
|
|||
if (t->buf.tail != NULL)
|
||||
t->buf.tail->commit = t->buf.tail->used;
|
||||
spin_unlock_irqrestore(&t->buf.lock, flags);
|
||||
schedule_work(&t->buf.work);
|
||||
schedule_delayed_work(&t->buf.work, 0);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -30,8 +30,10 @@ extern const char linux_banner[];
|
|||
|
||||
#define STACK_MAGIC 0xdeadbeef
|
||||
|
||||
#define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1)
|
||||
#define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask))
|
||||
|
||||
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
|
||||
#define ALIGN(x,a) (((x)+(a)-1UL)&~((a)-1UL))
|
||||
#define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
|
||||
#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
|
||||
#define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
|
||||
|
@ -63,7 +65,7 @@ struct user;
|
|||
* context (spinlock, irq-handler, ...).
|
||||
*
|
||||
* This is a useful debugging help to be able to catch problems early and not
|
||||
* be biten later when the calling function happens to sleep when it is not
|
||||
* be bitten later when the calling function happens to sleep when it is not
|
||||
* supposed to.
|
||||
*/
|
||||
#ifdef CONFIG_PREEMPT_VOLUNTARY
|
||||
|
|
|
@ -47,6 +47,8 @@ typedef struct kcapi_carddef {
|
|||
|
||||
#include <linux/list.h>
|
||||
#include <linux/skbuff.h>
|
||||
#include <linux/workqueue.h>
|
||||
#include <asm/semaphore.h>
|
||||
|
||||
#define KCI_CONTRUP 0 /* arg: struct capi_profile */
|
||||
#define KCI_CONTRDOWN 1 /* arg: NULL */
|
||||
|
|
|
@ -105,9 +105,14 @@ extern struct page *kimage_alloc_control_pages(struct kimage *image,
|
|||
unsigned int order);
|
||||
extern void crash_kexec(struct pt_regs *);
|
||||
int kexec_should_crash(struct task_struct *);
|
||||
void crash_save_cpu(struct pt_regs *regs, int cpu);
|
||||
extern struct kimage *kexec_image;
|
||||
extern struct kimage *kexec_crash_image;
|
||||
|
||||
#ifndef kexec_flush_icache_page
|
||||
#define kexec_flush_icache_page(page)
|
||||
#endif
|
||||
|
||||
#define KEXEC_ON_CRASH 0x00000001
|
||||
#define KEXEC_ARCH_MASK 0xffff0000
|
||||
|
||||
|
@ -122,6 +127,8 @@ extern struct kimage *kexec_crash_image;
|
|||
#define KEXEC_ARCH_IA_64 (50 << 16)
|
||||
#define KEXEC_ARCH_S390 (22 << 16)
|
||||
#define KEXEC_ARCH_SH (42 << 16)
|
||||
#define KEXEC_ARCH_MIPS_LE (10 << 16)
|
||||
#define KEXEC_ARCH_MIPS ( 8 << 16)
|
||||
|
||||
#define KEXEC_FLAGS (KEXEC_ON_CRASH) /* List of defined/legal kexec flags */
|
||||
|
||||
|
@ -131,6 +138,7 @@ extern struct resource crashk_res;
|
|||
typedef u32 note_buf_t[MAX_NOTE_BYTES/4];
|
||||
extern note_buf_t *crash_notes;
|
||||
|
||||
|
||||
#else /* !CONFIG_KEXEC */
|
||||
struct pt_regs;
|
||||
struct task_struct;
|
||||
|
|
|
@ -47,6 +47,7 @@ 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_MOVE = (__force kobject_action_t) 0x08, /* device move */
|
||||
};
|
||||
|
||||
struct kobject {
|
||||
|
@ -76,6 +77,7 @@ extern int __must_check kobject_add(struct kobject *);
|
|||
extern void kobject_del(struct kobject *);
|
||||
|
||||
extern int __must_check kobject_rename(struct kobject *, const char *new_name);
|
||||
extern int __must_check kobject_move(struct kobject *, struct kobject *);
|
||||
|
||||
extern int __must_check kobject_register(struct kobject *);
|
||||
extern void kobject_unregister(struct kobject *);
|
||||
|
@ -264,6 +266,8 @@ extern int __must_check subsys_create_file(struct subsystem * ,
|
|||
|
||||
#if defined(CONFIG_HOTPLUG)
|
||||
void kobject_uevent(struct kobject *kobj, enum kobject_action action);
|
||||
void kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
|
||||
char *envp[]);
|
||||
|
||||
int add_uevent_var(char **envp, int num_envp, int *cur_index,
|
||||
char *buffer, int buffer_size, int *cur_len,
|
||||
|
@ -271,6 +275,10 @@ int add_uevent_var(char **envp, int num_envp, int *cur_index,
|
|||
__attribute__((format (printf, 7, 8)));
|
||||
#else
|
||||
static inline void kobject_uevent(struct kobject *kobj, enum kobject_action action) { }
|
||||
static inline void kobject_uevent_env(struct kobject *kobj,
|
||||
enum kobject_action action,
|
||||
char *envp[])
|
||||
{ }
|
||||
|
||||
static inline int add_uevent_var(char **envp, int num_envp, int *cur_index,
|
||||
char *buffer, int buffer_size, int *cur_len,
|
||||
|
|
|
@ -165,7 +165,7 @@ extern void arch_disarm_kprobe(struct kprobe *p);
|
|||
extern int arch_init_kprobes(void);
|
||||
extern void show_registers(struct pt_regs *regs);
|
||||
extern kprobe_opcode_t *get_insn_slot(void);
|
||||
extern void free_insn_slot(kprobe_opcode_t *slot);
|
||||
extern void free_insn_slot(kprobe_opcode_t *slot, int dirty);
|
||||
extern void kprobes_inc_nmissed_count(struct kprobe *p);
|
||||
|
||||
/* Get the kprobe at this addr (if any) - called with preemption disabled */
|
||||
|
|
|
@ -248,9 +248,9 @@ static inline struct timeval ktime_to_timeval(const ktime_t kt)
|
|||
*
|
||||
* Returns the scalar nanoseconds representation of kt
|
||||
*/
|
||||
static inline u64 ktime_to_ns(const ktime_t kt)
|
||||
static inline s64 ktime_to_ns(const ktime_t kt)
|
||||
{
|
||||
return (u64) kt.tv.sec * NSEC_PER_SEC + kt.tv.nsec;
|
||||
return (s64) kt.tv.sec * NSEC_PER_SEC + kt.tv.nsec;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -140,6 +140,7 @@ enum {
|
|||
ATA_DFLAG_LBA48 = (1 << 1), /* device supports LBA48 */
|
||||
ATA_DFLAG_CDB_INTR = (1 << 2), /* device asserts INTRQ when ready for CDB */
|
||||
ATA_DFLAG_NCQ = (1 << 3), /* device supports NCQ */
|
||||
ATA_DFLAG_FLUSH_EXT = (1 << 4), /* do FLUSH_EXT instead of FLUSH */
|
||||
ATA_DFLAG_CFG_MASK = (1 << 8) - 1,
|
||||
|
||||
ATA_DFLAG_PIO = (1 << 8), /* device limited to PIO mode */
|
||||
|
@ -175,6 +176,7 @@ enum {
|
|||
ATA_FLAG_SKIP_D2H_BSY = (1 << 12), /* can't wait for the first D2H
|
||||
* Register FIS clearing BSY */
|
||||
ATA_FLAG_DEBUGMSG = (1 << 13),
|
||||
ATA_FLAG_SETXFER_POLLING= (1 << 14), /* use polling for SETXFER */
|
||||
|
||||
/* The following flag belongs to ap->pflags but is kept in
|
||||
* ap->flags because it's referenced in many LLDs and will be
|
||||
|
@ -283,6 +285,9 @@ enum {
|
|||
ATA_EHI_QUIET = (1 << 3), /* be quiet */
|
||||
|
||||
ATA_EHI_DID_RESET = (1 << 16), /* already reset this port */
|
||||
ATA_EHI_PRINTINFO = (1 << 17), /* print configuration info */
|
||||
ATA_EHI_SETMODE = (1 << 18), /* configure transfer mode */
|
||||
ATA_EHI_POST_SETMODE = (1 << 19), /* revaildating after setmode */
|
||||
|
||||
ATA_EHI_RESET_MODIFIER_MASK = ATA_EHI_RESUME_LINK,
|
||||
|
||||
|
@ -307,10 +312,11 @@ enum {
|
|||
(some horkage may be drive/controller pair dependant */
|
||||
|
||||
ATA_HORKAGE_DIAGNOSTIC = (1 << 0), /* Failed boot diag */
|
||||
ATA_HORKAGE_NODMA = (1 << 1), /* DMA problems */
|
||||
ATA_HORKAGE_NONCQ = (1 << 2), /* Don't use NCQ */
|
||||
};
|
||||
|
||||
enum hsm_task_states {
|
||||
HSM_ST_UNKNOWN, /* state unknown */
|
||||
HSM_ST_IDLE, /* no command on going */
|
||||
HSM_ST, /* (waiting the device to) transfer data */
|
||||
HSM_ST_LAST, /* (waiting the device to) complete command */
|
||||
|
@ -329,6 +335,7 @@ enum ata_completion_errors {
|
|||
AC_ERR_SYSTEM = (1 << 6), /* system error */
|
||||
AC_ERR_INVALID = (1 << 7), /* invalid argument */
|
||||
AC_ERR_OTHER = (1 << 8), /* unknown */
|
||||
AC_ERR_NODEV_HINT = (1 << 9), /* polling device detection hint */
|
||||
};
|
||||
|
||||
/* forward declarations */
|
||||
|
@ -568,8 +575,9 @@ struct ata_port {
|
|||
struct ata_host *host;
|
||||
struct device *dev;
|
||||
|
||||
struct work_struct port_task;
|
||||
struct work_struct hotplug_task;
|
||||
void *port_task_data;
|
||||
struct delayed_work port_task;
|
||||
struct delayed_work hotplug_task;
|
||||
struct work_struct scsi_rescan_task;
|
||||
|
||||
unsigned int hsm_task_state;
|
||||
|
@ -700,6 +708,8 @@ extern int sata_phy_debounce(struct ata_port *ap, const unsigned long *param);
|
|||
extern int sata_phy_resume(struct ata_port *ap, const unsigned long *param);
|
||||
extern int ata_std_prereset(struct ata_port *ap);
|
||||
extern int ata_std_softreset(struct ata_port *ap, unsigned int *classes);
|
||||
extern int sata_port_hardreset(struct ata_port *ap,
|
||||
const unsigned long *timing);
|
||||
extern int sata_std_hardreset(struct ata_port *ap, unsigned int *class);
|
||||
extern void ata_std_postreset(struct ata_port *ap, unsigned int *classes);
|
||||
extern void ata_port_disable(struct ata_port *);
|
||||
|
@ -744,10 +754,9 @@ extern int ata_scsi_device_suspend(struct scsi_device *, pm_message_t mesg);
|
|||
extern int ata_host_suspend(struct ata_host *host, pm_message_t mesg);
|
||||
extern void ata_host_resume(struct ata_host *host);
|
||||
extern int ata_ratelimit(void);
|
||||
extern unsigned int ata_busy_sleep(struct ata_port *ap,
|
||||
unsigned long timeout_pat,
|
||||
unsigned long timeout);
|
||||
extern void ata_port_queue_task(struct ata_port *ap, void (*fn)(void *),
|
||||
extern int ata_busy_sleep(struct ata_port *ap,
|
||||
unsigned long timeout_pat, unsigned long timeout);
|
||||
extern void ata_port_queue_task(struct ata_port *ap, work_func_t fn,
|
||||
void *data, unsigned long delay);
|
||||
extern u32 ata_wait_register(void __iomem *reg, u32 mask, u32 val,
|
||||
unsigned long interval_msec,
|
||||
|
@ -787,6 +796,7 @@ extern void ata_id_string(const u16 *id, unsigned char *s,
|
|||
unsigned int ofs, unsigned int len);
|
||||
extern void ata_id_c_string(const u16 *id, unsigned char *s,
|
||||
unsigned int ofs, unsigned int len);
|
||||
extern unsigned long ata_device_blacklisted(const struct ata_device *dev);
|
||||
extern void ata_bmdma_setup (struct ata_queued_cmd *qc);
|
||||
extern void ata_bmdma_start (struct ata_queued_cmd *qc);
|
||||
extern void ata_bmdma_stop(struct ata_queued_cmd *qc);
|
||||
|
@ -1061,7 +1071,7 @@ static inline u8 ata_busy_wait(struct ata_port *ap, unsigned int bits,
|
|||
udelay(10);
|
||||
status = ata_chk_status(ap);
|
||||
max--;
|
||||
} while ((status & bits) && (max > 0));
|
||||
} while (status != 0xff && (status & bits) && (max > 0));
|
||||
|
||||
return status;
|
||||
}
|
||||
|
@ -1082,7 +1092,7 @@ static inline u8 ata_wait_idle(struct ata_port *ap)
|
|||
{
|
||||
u8 status = ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000);
|
||||
|
||||
if (status & (ATA_BUSY | ATA_DRQ)) {
|
||||
if (status != 0xff && (status & (ATA_BUSY | ATA_DRQ))) {
|
||||
unsigned long l = ap->ioaddr.status_addr;
|
||||
if (ata_msg_warn(ap))
|
||||
printk(KERN_WARNING "ATA: abnormal status 0x%X on port 0x%lX\n",
|
||||
|
@ -1147,37 +1157,6 @@ static inline void ata_qc_reinit(struct ata_queued_cmd *qc)
|
|||
qc->result_tf.feature = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* ata_irq_on - Enable interrupts on a port.
|
||||
* @ap: Port on which interrupts are enabled.
|
||||
*
|
||||
* Enable interrupts on a legacy IDE device using MMIO or PIO,
|
||||
* wait for idle, clear any pending interrupts.
|
||||
*
|
||||
* LOCKING:
|
||||
* Inherited from caller.
|
||||
*/
|
||||
|
||||
static inline u8 ata_irq_on(struct ata_port *ap)
|
||||
{
|
||||
struct ata_ioports *ioaddr = &ap->ioaddr;
|
||||
u8 tmp;
|
||||
|
||||
ap->ctl &= ~ATA_NIEN;
|
||||
ap->last_ctl = ap->ctl;
|
||||
|
||||
if (ap->flags & ATA_FLAG_MMIO)
|
||||
writeb(ap->ctl, (void __iomem *) ioaddr->ctl_addr);
|
||||
else
|
||||
outb(ap->ctl, ioaddr->ctl_addr);
|
||||
tmp = ata_wait_idle(ap);
|
||||
|
||||
ap->ops->irq_clear(ap);
|
||||
|
||||
return tmp;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* ata_irq_ack - Acknowledge a device interrupt.
|
||||
* @ap: Port on which interrupts are enabled.
|
||||
|
|
|
@ -164,14 +164,12 @@ void nlmclnt_next_cookie(struct nlm_cookie *);
|
|||
*/
|
||||
struct nlm_host * nlmclnt_lookup_host(const struct sockaddr_in *, int, int, const char *, int);
|
||||
struct nlm_host * nlmsvc_lookup_host(struct svc_rqst *, const char *, int);
|
||||
struct nlm_host * nlm_lookup_host(int server, const struct sockaddr_in *, int, int, const char *, int);
|
||||
struct rpc_clnt * nlm_bind_host(struct nlm_host *);
|
||||
void nlm_rebind_host(struct nlm_host *);
|
||||
struct nlm_host * nlm_get_host(struct nlm_host *);
|
||||
void nlm_release_host(struct nlm_host *);
|
||||
void nlm_shutdown_hosts(void);
|
||||
extern void nlm_host_rebooted(const struct sockaddr_in *, const char *, int, u32);
|
||||
struct nsm_handle *nsm_find(const struct sockaddr_in *, const char *, int);
|
||||
void nsm_release(struct nsm_handle *);
|
||||
|
||||
|
||||
|
|
|
@ -193,7 +193,6 @@ extern void lockdep_free_key_range(void *start, unsigned long size);
|
|||
|
||||
extern void lockdep_off(void);
|
||||
extern void lockdep_on(void);
|
||||
extern int lockdep_internal(void);
|
||||
|
||||
/*
|
||||
* These methods are used by specific locking variants (spinlocks,
|
||||
|
@ -243,6 +242,8 @@ extern void lock_release(struct lockdep_map *lock, int nested,
|
|||
|
||||
# define INIT_LOCKDEP .lockdep_recursion = 0,
|
||||
|
||||
#define lockdep_depth(tsk) ((tsk)->lockdep_depth)
|
||||
|
||||
#else /* !LOCKDEP */
|
||||
|
||||
static inline void lockdep_off(void)
|
||||
|
@ -253,11 +254,6 @@ static inline void lockdep_on(void)
|
|||
{
|
||||
}
|
||||
|
||||
static inline int lockdep_internal(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
# define lock_acquire(l, s, t, r, c, i) do { } while (0)
|
||||
# define lock_release(l, n, i) do { } while (0)
|
||||
# define lockdep_init() do { } while (0)
|
||||
|
@ -277,6 +273,9 @@ static inline int lockdep_internal(void)
|
|||
* The class key takes no space if lockdep is disabled:
|
||||
*/
|
||||
struct lock_class_key { };
|
||||
|
||||
#define lockdep_depth(tsk) (0)
|
||||
|
||||
#endif /* !LOCKDEP */
|
||||
|
||||
#if defined(CONFIG_TRACE_IRQFLAGS) && defined(CONFIG_GENERIC_HARDIRQS)
|
||||
|
|
|
@ -31,15 +31,14 @@
|
|||
#define HPET_MINOR 228
|
||||
|
||||
struct device;
|
||||
struct class_device;
|
||||
|
||||
struct miscdevice {
|
||||
int minor;
|
||||
const char *name;
|
||||
const struct file_operations *fops;
|
||||
struct list_head list;
|
||||
struct device *dev;
|
||||
struct class_device *class;
|
||||
struct device *parent;
|
||||
struct device *this_device;
|
||||
};
|
||||
|
||||
extern int misc_register(struct miscdevice * misc);
|
||||
|
|
|
@ -114,6 +114,8 @@ struct vm_area_struct {
|
|||
#endif
|
||||
};
|
||||
|
||||
extern struct kmem_cache *vm_area_cachep;
|
||||
|
||||
/*
|
||||
* This struct defines the per-mm list of VMAs for uClinux. If CONFIG_MMU is
|
||||
* disabled, then there's a single shared list of VMAs maintained by the
|
||||
|
@ -293,6 +295,24 @@ void put_pages_list(struct list_head *pages);
|
|||
|
||||
void split_page(struct page *page, unsigned int order);
|
||||
|
||||
/*
|
||||
* Compound pages have a destructor function. Provide a
|
||||
* prototype for that function and accessor functions.
|
||||
* These are _only_ valid on the head of a PG_compound page.
|
||||
*/
|
||||
typedef void compound_page_dtor(struct page *);
|
||||
|
||||
static inline void set_compound_page_dtor(struct page *page,
|
||||
compound_page_dtor *dtor)
|
||||
{
|
||||
page[1].lru.next = (void *)dtor;
|
||||
}
|
||||
|
||||
static inline compound_page_dtor *get_compound_page_dtor(struct page *page)
|
||||
{
|
||||
return (compound_page_dtor *)page[1].lru.next;
|
||||
}
|
||||
|
||||
/*
|
||||
* Multiple processes may "see" the same page. E.g. for untouched
|
||||
* mappings of /dev/null, all processes see the same page full of
|
||||
|
@ -396,7 +416,9 @@ void split_page(struct page *page, unsigned int order);
|
|||
* We are going to use the flags for the page to node mapping if its in
|
||||
* there. This includes the case where there is no node, so it is implicit.
|
||||
*/
|
||||
#define FLAGS_HAS_NODE (NODES_WIDTH > 0 || NODES_SHIFT == 0)
|
||||
#if !(NODES_WIDTH > 0 || NODES_SHIFT == 0)
|
||||
#define NODE_NOT_IN_PAGE_FLAGS
|
||||
#endif
|
||||
|
||||
#ifndef PFN_SECTION_SHIFT
|
||||
#define PFN_SECTION_SHIFT 0
|
||||
|
@ -411,13 +433,18 @@ void split_page(struct page *page, unsigned int order);
|
|||
#define NODES_PGSHIFT (NODES_PGOFF * (NODES_WIDTH != 0))
|
||||
#define ZONES_PGSHIFT (ZONES_PGOFF * (ZONES_WIDTH != 0))
|
||||
|
||||
/* NODE:ZONE or SECTION:ZONE is used to lookup the zone from a page. */
|
||||
#if FLAGS_HAS_NODE
|
||||
#define ZONETABLE_SHIFT (NODES_SHIFT + ZONES_SHIFT)
|
||||
/* NODE:ZONE or SECTION:ZONE is used to ID a zone for the buddy allcator */
|
||||
#ifdef NODE_NOT_IN_PAGEFLAGS
|
||||
#define ZONEID_SHIFT (SECTIONS_SHIFT + ZONES_SHIFT)
|
||||
#else
|
||||
#define ZONETABLE_SHIFT (SECTIONS_SHIFT + ZONES_SHIFT)
|
||||
#define ZONEID_SHIFT (NODES_SHIFT + ZONES_SHIFT)
|
||||
#endif
|
||||
|
||||
#if ZONES_WIDTH > 0
|
||||
#define ZONEID_PGSHIFT ZONES_PGSHIFT
|
||||
#else
|
||||
#define ZONEID_PGSHIFT NODES_PGOFF
|
||||
#endif
|
||||
#define ZONETABLE_PGSHIFT ZONES_PGSHIFT
|
||||
|
||||
#if SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED
|
||||
#error SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED
|
||||
|
@ -426,26 +453,28 @@ void split_page(struct page *page, unsigned int order);
|
|||
#define ZONES_MASK ((1UL << ZONES_WIDTH) - 1)
|
||||
#define NODES_MASK ((1UL << NODES_WIDTH) - 1)
|
||||
#define SECTIONS_MASK ((1UL << SECTIONS_WIDTH) - 1)
|
||||
#define ZONETABLE_MASK ((1UL << ZONETABLE_SHIFT) - 1)
|
||||
#define ZONEID_MASK ((1UL << ZONEID_SHIFT) - 1)
|
||||
|
||||
static inline enum zone_type page_zonenum(struct page *page)
|
||||
{
|
||||
return (page->flags >> ZONES_PGSHIFT) & ZONES_MASK;
|
||||
}
|
||||
|
||||
struct zone;
|
||||
extern struct zone *zone_table[];
|
||||
|
||||
/*
|
||||
* The identification function is only used by the buddy allocator for
|
||||
* determining if two pages could be buddies. We are not really
|
||||
* identifying a zone since we could be using a the section number
|
||||
* id if we have not node id available in page flags.
|
||||
* We guarantee only that it will return the same value for two
|
||||
* combinable pages in a zone.
|
||||
*/
|
||||
static inline int page_zone_id(struct page *page)
|
||||
{
|
||||
return (page->flags >> ZONETABLE_PGSHIFT) & ZONETABLE_MASK;
|
||||
}
|
||||
static inline struct zone *page_zone(struct page *page)
|
||||
{
|
||||
return zone_table[page_zone_id(page)];
|
||||
BUILD_BUG_ON(ZONEID_PGSHIFT == 0 && ZONEID_MASK);
|
||||
return (page->flags >> ZONEID_PGSHIFT) & ZONEID_MASK;
|
||||
}
|
||||
|
||||
static inline unsigned long zone_to_nid(struct zone *zone)
|
||||
static inline int zone_to_nid(struct zone *zone)
|
||||
{
|
||||
#ifdef CONFIG_NUMA
|
||||
return zone->node;
|
||||
|
@ -454,13 +483,20 @@ static inline unsigned long zone_to_nid(struct zone *zone)
|
|||
#endif
|
||||
}
|
||||
|
||||
static inline unsigned long page_to_nid(struct page *page)
|
||||
#ifdef NODE_NOT_IN_PAGE_FLAGS
|
||||
extern int page_to_nid(struct page *page);
|
||||
#else
|
||||
static inline int page_to_nid(struct page *page)
|
||||
{
|
||||
if (FLAGS_HAS_NODE)
|
||||
return (page->flags >> NODES_PGSHIFT) & NODES_MASK;
|
||||
else
|
||||
return zone_to_nid(page_zone(page));
|
||||
return (page->flags >> NODES_PGSHIFT) & NODES_MASK;
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline struct zone *page_zone(struct page *page)
|
||||
{
|
||||
return &NODE_DATA(page_to_nid(page))->node_zones[page_zonenum(page)];
|
||||
}
|
||||
|
||||
static inline unsigned long page_to_section(struct page *page)
|
||||
{
|
||||
return (page->flags >> SECTIONS_PGSHIFT) & SECTIONS_MASK;
|
||||
|
@ -477,6 +513,7 @@ static inline void set_page_node(struct page *page, unsigned long node)
|
|||
page->flags &= ~(NODES_MASK << NODES_PGSHIFT);
|
||||
page->flags |= (node & NODES_MASK) << NODES_PGSHIFT;
|
||||
}
|
||||
|
||||
static inline void set_page_section(struct page *page, unsigned long section)
|
||||
{
|
||||
page->flags &= ~(SECTIONS_MASK << SECTIONS_PGSHIFT);
|
||||
|
@ -947,8 +984,6 @@ extern void mem_init(void);
|
|||
extern void show_mem(void);
|
||||
extern void si_meminfo(struct sysinfo * val);
|
||||
extern void si_meminfo_node(struct sysinfo *val, int nid);
|
||||
extern void zonetable_add(struct zone *zone, int nid, enum zone_type zid,
|
||||
unsigned long pfn, unsigned long size);
|
||||
|
||||
#ifdef CONFIG_NUMA
|
||||
extern void setup_per_cpu_pageset(void);
|
||||
|
|
|
@ -39,6 +39,10 @@ struct mmc_csd {
|
|||
write_misalign:1;
|
||||
};
|
||||
|
||||
struct mmc_ext_csd {
|
||||
unsigned int hs_max_dtr;
|
||||
};
|
||||
|
||||
struct sd_scr {
|
||||
unsigned char sda_vsn;
|
||||
unsigned char bus_widths;
|
||||
|
@ -46,6 +50,10 @@ struct sd_scr {
|
|||
#define SD_SCR_BUS_WIDTH_4 (1<<2)
|
||||
};
|
||||
|
||||
struct sd_switch_caps {
|
||||
unsigned int hs_max_dtr;
|
||||
};
|
||||
|
||||
struct mmc_host;
|
||||
|
||||
/*
|
||||
|
@ -62,12 +70,15 @@ struct mmc_card {
|
|||
#define MMC_STATE_BAD (1<<2) /* unrecognised device */
|
||||
#define MMC_STATE_SDCARD (1<<3) /* is an SD card */
|
||||
#define MMC_STATE_READONLY (1<<4) /* card is read-only */
|
||||
#define MMC_STATE_HIGHSPEED (1<<5) /* card is in high speed mode */
|
||||
u32 raw_cid[4]; /* raw card CID */
|
||||
u32 raw_csd[4]; /* raw card CSD */
|
||||
u32 raw_scr[2]; /* raw card SCR */
|
||||
struct mmc_cid cid; /* card identification */
|
||||
struct mmc_csd csd; /* card specific */
|
||||
struct mmc_ext_csd ext_csd; /* mmc v4 extended card specific */
|
||||
struct sd_scr scr; /* extra SD information */
|
||||
struct sd_switch_caps sw_caps; /* switch (CMD6) caps */
|
||||
};
|
||||
|
||||
#define mmc_card_present(c) ((c)->state & MMC_STATE_PRESENT)
|
||||
|
@ -75,12 +86,14 @@ struct mmc_card {
|
|||
#define mmc_card_bad(c) ((c)->state & MMC_STATE_BAD)
|
||||
#define mmc_card_sd(c) ((c)->state & MMC_STATE_SDCARD)
|
||||
#define mmc_card_readonly(c) ((c)->state & MMC_STATE_READONLY)
|
||||
#define mmc_card_highspeed(c) ((c)->state & MMC_STATE_HIGHSPEED)
|
||||
|
||||
#define mmc_card_set_present(c) ((c)->state |= MMC_STATE_PRESENT)
|
||||
#define mmc_card_set_dead(c) ((c)->state |= MMC_STATE_DEAD)
|
||||
#define mmc_card_set_bad(c) ((c)->state |= MMC_STATE_BAD)
|
||||
#define mmc_card_set_sd(c) ((c)->state |= MMC_STATE_SDCARD)
|
||||
#define mmc_card_set_readonly(c) ((c)->state |= MMC_STATE_READONLY)
|
||||
#define mmc_card_set_highspeed(c) ((c)->state |= MMC_STATE_HIGHSPEED)
|
||||
|
||||
#define mmc_card_name(c) ((c)->cid.prod_name)
|
||||
#define mmc_card_id(c) ((c)->dev.bus_id)
|
||||
|
|
|
@ -74,8 +74,8 @@ struct mmc_card;
|
|||
struct device;
|
||||
|
||||
struct mmc_host {
|
||||
struct device *dev;
|
||||
struct class_device class_dev;
|
||||
struct device *parent;
|
||||
struct device class_dev;
|
||||
int index;
|
||||
const struct mmc_host_ops *ops;
|
||||
unsigned int f_min;
|
||||
|
@ -110,7 +110,7 @@ struct mmc_host {
|
|||
struct mmc_card *card_busy; /* the MMC card claiming host */
|
||||
struct mmc_card *card_selected; /* the selected MMC card */
|
||||
|
||||
struct work_struct detect;
|
||||
struct delayed_work detect;
|
||||
|
||||
unsigned long private[0] ____cacheline_aligned;
|
||||
};
|
||||
|
@ -125,8 +125,8 @@ static inline void *mmc_priv(struct mmc_host *host)
|
|||
return (void *)host->private;
|
||||
}
|
||||
|
||||
#define mmc_dev(x) ((x)->dev)
|
||||
#define mmc_hostname(x) ((x)->class_dev.class_id)
|
||||
#define mmc_dev(x) ((x)->parent)
|
||||
#define mmc_hostname(x) ((x)->class_dev.bus_id)
|
||||
|
||||
extern int mmc_suspend_host(struct mmc_host *, pm_message_t);
|
||||
extern int mmc_resume_host(struct mmc_host *);
|
||||
|
|
|
@ -25,14 +25,16 @@
|
|||
#ifndef MMC_MMC_PROTOCOL_H
|
||||
#define MMC_MMC_PROTOCOL_H
|
||||
|
||||
/* Standard MMC commands (3.1) type argument response */
|
||||
/* Standard MMC commands (4.1) type argument response */
|
||||
/* class 1 */
|
||||
#define MMC_GO_IDLE_STATE 0 /* bc */
|
||||
#define MMC_SEND_OP_COND 1 /* bcr [31:0] OCR R3 */
|
||||
#define MMC_ALL_SEND_CID 2 /* bcr R2 */
|
||||
#define MMC_SET_RELATIVE_ADDR 3 /* ac [31:16] RCA R1 */
|
||||
#define MMC_SET_DSR 4 /* bc [31:16] RCA */
|
||||
#define MMC_SWITCH 6 /* ac [31:0] See below R1b */
|
||||
#define MMC_SELECT_CARD 7 /* ac [31:16] RCA R1 */
|
||||
#define MMC_SEND_EXT_CSD 8 /* adtc R1 */
|
||||
#define MMC_SEND_CSD 9 /* ac [31:16] RCA R2 */
|
||||
#define MMC_SEND_CID 10 /* ac [31:16] RCA R2 */
|
||||
#define MMC_READ_DAT_UNTIL_STOP 11 /* adtc [31:0] dadr R1 */
|
||||
|
@ -80,6 +82,7 @@
|
|||
/* class 8 */
|
||||
/* This is basically the same command as for MMC with some quirks. */
|
||||
#define SD_SEND_RELATIVE_ADDR 3 /* bcr R6 */
|
||||
#define SD_SWITCH 6 /* adtc [31:0] See below R1 */
|
||||
|
||||
/* Application commands */
|
||||
#define SD_APP_SET_BUS_WIDTH 6 /* ac [1:0] bus width R1 */
|
||||
|
@ -87,6 +90,30 @@
|
|||
#define SD_APP_OP_COND 41 /* bcr [31:0] OCR R3 */
|
||||
#define SD_APP_SEND_SCR 51 /* adtc R1 */
|
||||
|
||||
/*
|
||||
* MMC_SWITCH argument format:
|
||||
*
|
||||
* [31:26] Always 0
|
||||
* [25:24] Access Mode
|
||||
* [23:16] Location of target Byte in EXT_CSD
|
||||
* [15:08] Value Byte
|
||||
* [07:03] Always 0
|
||||
* [02:00] Command Set
|
||||
*/
|
||||
|
||||
/*
|
||||
* SD_SWITCH argument format:
|
||||
*
|
||||
* [31] Check (0) or switch (1)
|
||||
* [30:24] Reserved (0)
|
||||
* [23:20] Function group 6
|
||||
* [19:16] Function group 5
|
||||
* [15:12] Function group 4
|
||||
* [11:8] Function group 3
|
||||
* [7:4] Function group 2
|
||||
* [3:0] Function group 1
|
||||
*/
|
||||
|
||||
/*
|
||||
MMC status in R1
|
||||
Type
|
||||
|
@ -230,13 +257,54 @@ struct _mmc_csd {
|
|||
|
||||
#define CSD_STRUCT_VER_1_0 0 /* Valid for system specification 1.0 - 1.2 */
|
||||
#define CSD_STRUCT_VER_1_1 1 /* Valid for system specification 1.4 - 2.2 */
|
||||
#define CSD_STRUCT_VER_1_2 2 /* Valid for system specification 3.1 */
|
||||
#define CSD_STRUCT_VER_1_2 2 /* Valid for system specification 3.1 - 3.2 - 3.31 - 4.0 - 4.1 */
|
||||
#define CSD_STRUCT_EXT_CSD 3 /* Version is coded in CSD_STRUCTURE in EXT_CSD */
|
||||
|
||||
#define CSD_SPEC_VER_0 0 /* Implements system specification 1.0 - 1.2 */
|
||||
#define CSD_SPEC_VER_1 1 /* Implements system specification 1.4 */
|
||||
#define CSD_SPEC_VER_2 2 /* Implements system specification 2.0 - 2.2 */
|
||||
#define CSD_SPEC_VER_3 3 /* Implements system specification 3.1 */
|
||||
#define CSD_SPEC_VER_3 3 /* Implements system specification 3.1 - 3.2 - 3.31 */
|
||||
#define CSD_SPEC_VER_4 4 /* Implements system specification 4.0 - 4.1 */
|
||||
|
||||
/*
|
||||
* EXT_CSD fields
|
||||
*/
|
||||
|
||||
#define EXT_CSD_BUS_WIDTH 183 /* R/W */
|
||||
#define EXT_CSD_HS_TIMING 185 /* R/W */
|
||||
#define EXT_CSD_CARD_TYPE 196 /* RO */
|
||||
|
||||
/*
|
||||
* EXT_CSD field definitions
|
||||
*/
|
||||
|
||||
#define EXT_CSD_CMD_SET_NORMAL (1<<0)
|
||||
#define EXT_CSD_CMD_SET_SECURE (1<<1)
|
||||
#define EXT_CSD_CMD_SET_CPSECURE (1<<2)
|
||||
|
||||
#define EXT_CSD_CARD_TYPE_26 (1<<0) /* Card can run at 26MHz */
|
||||
#define EXT_CSD_CARD_TYPE_52 (1<<1) /* Card can run at 52MHz */
|
||||
|
||||
#define EXT_CSD_BUS_WIDTH_1 0 /* Card is in 1 bit mode */
|
||||
#define EXT_CSD_BUS_WIDTH_4 1 /* Card is in 4 bit mode */
|
||||
#define EXT_CSD_BUS_WIDTH_8 2 /* Card is in 8 bit mode */
|
||||
|
||||
/*
|
||||
* MMC_SWITCH access modes
|
||||
*/
|
||||
|
||||
#define MMC_SWITCH_MODE_CMD_SET 0x00 /* Change the command set */
|
||||
#define MMC_SWITCH_MODE_SET_BITS 0x01 /* Set bits which are 1 in value */
|
||||
#define MMC_SWITCH_MODE_CLEAR_BITS 0x02 /* Clear bits which are 1 in value */
|
||||
#define MMC_SWITCH_MODE_WRITE_BYTE 0x03 /* Set target to value */
|
||||
|
||||
/*
|
||||
* SCR field definitions
|
||||
*/
|
||||
|
||||
#define SCR_SPEC_VER_0 0 /* Implements system specification 1.0 - 1.01 */
|
||||
#define SCR_SPEC_VER_1 1 /* Implements system specification 1.10 */
|
||||
#define SCR_SPEC_VER_2 2 /* Implements system specification 2.00 */
|
||||
|
||||
/*
|
||||
* SD bus widths
|
||||
|
|
|
@ -278,7 +278,7 @@ struct zone {
|
|||
/*
|
||||
* rarely used fields:
|
||||
*/
|
||||
char *name;
|
||||
const char *name;
|
||||
} ____cacheline_internodealigned_in_smp;
|
||||
|
||||
/*
|
||||
|
@ -288,19 +288,94 @@ struct zone {
|
|||
*/
|
||||
#define DEF_PRIORITY 12
|
||||
|
||||
/* Maximum number of zones on a zonelist */
|
||||
#define MAX_ZONES_PER_ZONELIST (MAX_NUMNODES * MAX_NR_ZONES)
|
||||
|
||||
#ifdef CONFIG_NUMA
|
||||
/*
|
||||
* We cache key information from each zonelist for smaller cache
|
||||
* footprint when scanning for free pages in get_page_from_freelist().
|
||||
*
|
||||
* 1) The BITMAP fullzones tracks which zones in a zonelist have come
|
||||
* up short of free memory since the last time (last_fullzone_zap)
|
||||
* we zero'd fullzones.
|
||||
* 2) The array z_to_n[] maps each zone in the zonelist to its node
|
||||
* id, so that we can efficiently evaluate whether that node is
|
||||
* set in the current tasks mems_allowed.
|
||||
*
|
||||
* Both fullzones and z_to_n[] are one-to-one with the zonelist,
|
||||
* indexed by a zones offset in the zonelist zones[] array.
|
||||
*
|
||||
* The get_page_from_freelist() routine does two scans. During the
|
||||
* first scan, we skip zones whose corresponding bit in 'fullzones'
|
||||
* is set or whose corresponding node in current->mems_allowed (which
|
||||
* comes from cpusets) is not set. During the second scan, we bypass
|
||||
* this zonelist_cache, to ensure we look methodically at each zone.
|
||||
*
|
||||
* Once per second, we zero out (zap) fullzones, forcing us to
|
||||
* reconsider nodes that might have regained more free memory.
|
||||
* The field last_full_zap is the time we last zapped fullzones.
|
||||
*
|
||||
* This mechanism reduces the amount of time we waste repeatedly
|
||||
* reexaming zones for free memory when they just came up low on
|
||||
* memory momentarilly ago.
|
||||
*
|
||||
* The zonelist_cache struct members logically belong in struct
|
||||
* zonelist. However, the mempolicy zonelists constructed for
|
||||
* MPOL_BIND are intentionally variable length (and usually much
|
||||
* shorter). A general purpose mechanism for handling structs with
|
||||
* multiple variable length members is more mechanism than we want
|
||||
* here. We resort to some special case hackery instead.
|
||||
*
|
||||
* The MPOL_BIND zonelists don't need this zonelist_cache (in good
|
||||
* part because they are shorter), so we put the fixed length stuff
|
||||
* at the front of the zonelist struct, ending in a variable length
|
||||
* zones[], as is needed by MPOL_BIND.
|
||||
*
|
||||
* Then we put the optional zonelist cache on the end of the zonelist
|
||||
* struct. This optional stuff is found by a 'zlcache_ptr' pointer in
|
||||
* the fixed length portion at the front of the struct. This pointer
|
||||
* both enables us to find the zonelist cache, and in the case of
|
||||
* MPOL_BIND zonelists, (which will just set the zlcache_ptr to NULL)
|
||||
* to know that the zonelist cache is not there.
|
||||
*
|
||||
* The end result is that struct zonelists come in two flavors:
|
||||
* 1) The full, fixed length version, shown below, and
|
||||
* 2) The custom zonelists for MPOL_BIND.
|
||||
* The custom MPOL_BIND zonelists have a NULL zlcache_ptr and no zlcache.
|
||||
*
|
||||
* Even though there may be multiple CPU cores on a node modifying
|
||||
* fullzones or last_full_zap in the same zonelist_cache at the same
|
||||
* time, we don't lock it. This is just hint data - if it is wrong now
|
||||
* and then, the allocator will still function, perhaps a bit slower.
|
||||
*/
|
||||
|
||||
|
||||
struct zonelist_cache {
|
||||
unsigned short z_to_n[MAX_ZONES_PER_ZONELIST]; /* zone->nid */
|
||||
DECLARE_BITMAP(fullzones, MAX_ZONES_PER_ZONELIST); /* zone full? */
|
||||
unsigned long last_full_zap; /* when last zap'd (jiffies) */
|
||||
};
|
||||
#else
|
||||
struct zonelist_cache;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* One allocation request operates on a zonelist. A zonelist
|
||||
* is a list of zones, the first one is the 'goal' of the
|
||||
* allocation, the other zones are fallback zones, in decreasing
|
||||
* priority.
|
||||
*
|
||||
* Right now a zonelist takes up less than a cacheline. We never
|
||||
* modify it apart from boot-up, and only a few indices are used,
|
||||
* so despite the zonelist table being relatively big, the cache
|
||||
* footprint of this construct is very small.
|
||||
* If zlcache_ptr is not NULL, then it is just the address of zlcache,
|
||||
* as explained above. If zlcache_ptr is NULL, there is no zlcache.
|
||||
*/
|
||||
|
||||
struct zonelist {
|
||||
struct zone *zones[MAX_NUMNODES * MAX_NR_ZONES + 1]; // NULL delimited
|
||||
struct zonelist_cache *zlcache_ptr; // NULL or &zlcache
|
||||
struct zone *zones[MAX_ZONES_PER_ZONELIST + 1]; // NULL delimited
|
||||
#ifdef CONFIG_NUMA
|
||||
struct zonelist_cache zlcache; // optional ...
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef CONFIG_ARCH_POPULATES_NODE_MAP
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
* Rewritten by Richard Henderson <rth@tamu.edu> Dec 1996
|
||||
* Rewritten again by Rusty Russell, 2002
|
||||
*/
|
||||
#include <linux/sched.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/stat.h>
|
||||
|
@ -264,6 +263,7 @@ struct module
|
|||
struct module_attribute *modinfo_attrs;
|
||||
const char *version;
|
||||
const char *srcversion;
|
||||
struct kobject *drivers_dir;
|
||||
|
||||
/* Exported symbols */
|
||||
const struct kernel_symbol *syms;
|
||||
|
@ -410,17 +410,7 @@ static inline int try_module_get(struct module *module)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static inline void module_put(struct module *module)
|
||||
{
|
||||
if (module) {
|
||||
unsigned int cpu = get_cpu();
|
||||
local_dec(&module->ref[cpu].count);
|
||||
/* Maybe they're waiting for us to drop reference? */
|
||||
if (unlikely(!module_is_live(module)))
|
||||
wake_up_process(module->waiter);
|
||||
put_cpu();
|
||||
}
|
||||
}
|
||||
extern void module_put(struct module *module);
|
||||
|
||||
#else /*!CONFIG_MODULE_UNLOAD*/
|
||||
static inline int try_module_get(struct module *module)
|
||||
|
|
|
@ -63,6 +63,9 @@ struct kparam_array
|
|||
not there, read bits mean it's readable, write bits mean it's
|
||||
writable. */
|
||||
#define __module_param_call(prefix, name, set, get, arg, perm) \
|
||||
/* Default value instead of permissions? */ \
|
||||
static int __param_perm_check_##name __attribute__((unused)) = \
|
||||
BUILD_BUG_ON_ZERO((perm) < 0 || (perm) > 0777 || ((perm) & 2)); \
|
||||
static char __param_str_##name[] = prefix #name; \
|
||||
static struct kernel_param const __param_##name \
|
||||
__attribute_used__ \
|
||||
|
|
|
@ -18,8 +18,6 @@
|
|||
#ifndef _LINUX_MQUEUE_H
|
||||
#define _LINUX_MQUEUE_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#define MQ_PRIO_MAX 32768
|
||||
/* per-uid limit of kernel memory used by mqueue, in bytes */
|
||||
#define MQ_BYTES_MAX 819200
|
||||
|
|
|
@ -402,6 +402,8 @@ extern const struct file_operations fat_file_operations;
|
|||
extern struct inode_operations fat_file_inode_operations;
|
||||
extern int fat_notify_change(struct dentry * dentry, struct iattr * attr);
|
||||
extern void fat_truncate(struct inode *inode);
|
||||
extern int fat_getattr(struct vfsmount *mnt, struct dentry *dentry,
|
||||
struct kstat *stat);
|
||||
|
||||
/* fat/inode.c */
|
||||
extern void fat_attach(struct inode *inode, loff_t i_pos);
|
||||
|
|
|
@ -92,6 +92,12 @@ struct msg_queue {
|
|||
struct list_head q_senders;
|
||||
};
|
||||
|
||||
/* Helper routines for sys_msgsnd and sys_msgrcv */
|
||||
extern long do_msgsnd(int msqid, long mtype, void __user *mtext,
|
||||
size_t msgsz, int msgflg);
|
||||
extern long do_msgrcv(int msqid, long *pmtype, void __user *mtext,
|
||||
size_t msgsz, long msgtyp, int msgflg);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* _LINUX_MSG_H */
|
||||
|
|
|
@ -94,7 +94,7 @@ do { \
|
|||
|
||||
#define __MUTEX_INITIALIZER(lockname) \
|
||||
{ .count = ATOMIC_INIT(1) \
|
||||
, .wait_lock = SPIN_LOCK_UNLOCKED \
|
||||
, .wait_lock = __SPIN_LOCK_UNLOCKED(lockname.wait_lock) \
|
||||
, .wait_list = LIST_HEAD_INIT(lockname.wait_list) \
|
||||
__DEBUG_MUTEX_INITIALIZER(lockname) \
|
||||
__DEP_MAP_MUTEX_INITIALIZER(lockname) }
|
||||
|
|
|
@ -724,7 +724,7 @@
|
|||
#define MV643XX_ETH_RX_FIFO_URGENT_THRESHOLD_REG(port) (0x2470 + (port<<10))
|
||||
#define MV643XX_ETH_TX_FIFO_URGENT_THRESHOLD_REG(port) (0x2474 + (port<<10))
|
||||
#define MV643XX_ETH_RX_MINIMAL_FRAME_SIZE_REG(port) (0x247c + (port<<10))
|
||||
#define MV643XX_ETH_RX_DISCARDED_FRAMES_COUNTER(port) (0x2484 + (port<<10)
|
||||
#define MV643XX_ETH_RX_DISCARDED_FRAMES_COUNTER(port) (0x2484 + (port<<10))
|
||||
#define MV643XX_ETH_PORT_DEBUG_0_REG(port) (0x248c + (port<<10))
|
||||
#define MV643XX_ETH_PORT_DEBUG_1_REG(port) (0x2490 + (port<<10))
|
||||
#define MV643XX_ETH_PORT_INTERNAL_ADDR_ERROR_REG(port) (0x2494 + (port<<10))
|
||||
|
@ -1135,7 +1135,7 @@ struct mv64xxx_i2c_pdata {
|
|||
#define MV643XX_ETH_DEFAULT_RX_UDP_QUEUE_1 (1<<19)
|
||||
#define MV643XX_ETH_DEFAULT_RX_UDP_QUEUE_2 (1<<20)
|
||||
#define MV643XX_ETH_DEFAULT_RX_UDP_QUEUE_3 ((1<<20) | (1<<19))
|
||||
#define MV643XX_ETH_DEFAULT_RX_UDP_QUEUE_4 ((1<<21)
|
||||
#define MV643XX_ETH_DEFAULT_RX_UDP_QUEUE_4 (1<<21)
|
||||
#define MV643XX_ETH_DEFAULT_RX_UDP_QUEUE_5 ((1<<21) | (1<<19))
|
||||
#define MV643XX_ETH_DEFAULT_RX_UDP_QUEUE_6 ((1<<21) | (1<<20))
|
||||
#define MV643XX_ETH_DEFAULT_RX_UDP_QUEUE_7 ((1<<21) | (1<<20) | (1<<19))
|
||||
|
|
|
@ -64,6 +64,7 @@ struct nbd_device {
|
|||
struct gendisk *disk;
|
||||
int blksize;
|
||||
u64 bytesize;
|
||||
pid_t pid; /* pid of nbd-client, if attached */
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -127,10 +127,10 @@ struct ncp_server {
|
|||
} unexpected_packet;
|
||||
};
|
||||
|
||||
extern void ncp_tcp_rcv_proc(void *server);
|
||||
extern void ncp_tcp_tx_proc(void *server);
|
||||
extern void ncpdgram_rcv_proc(void *server);
|
||||
extern void ncpdgram_timeout_proc(void *server);
|
||||
extern void ncp_tcp_rcv_proc(struct work_struct *work);
|
||||
extern void ncp_tcp_tx_proc(struct work_struct *work);
|
||||
extern void ncpdgram_rcv_proc(struct work_struct *work);
|
||||
extern void ncpdgram_timeout_proc(struct work_struct *work);
|
||||
extern void ncpdgram_timeout_call(unsigned long server);
|
||||
extern void ncp_tcp_data_ready(struct sock* sk, int len);
|
||||
extern void ncp_tcp_write_space(struct sock* sk);
|
||||
|
|
|
@ -196,7 +196,7 @@ extern struct socket *sockfd_lookup(int fd, int *err);
|
|||
extern int net_ratelimit(void);
|
||||
|
||||
#define net_random() random32()
|
||||
#define net_srandom(seed) srandom32(seed)
|
||||
#define net_srandom(seed) srandom32((__force u32)seed)
|
||||
|
||||
extern int kernel_sendmsg(struct socket *sock, struct msghdr *msg,
|
||||
struct kvec *vec, size_t num, size_t len);
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include <linux/if_packet.h>
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/timer.h>
|
||||
#include <asm/atomic.h>
|
||||
#include <asm/cache.h>
|
||||
#include <asm/byteorder.h>
|
||||
|
@ -38,7 +39,6 @@
|
|||
#include <linux/percpu.h>
|
||||
#include <linux/dmaengine.h>
|
||||
|
||||
struct divert_blk;
|
||||
struct vlan_group;
|
||||
struct ethtool_ops;
|
||||
struct netpoll_info;
|
||||
|
@ -67,6 +67,10 @@ struct netpoll_info;
|
|||
#define NET_RX_CN_HIGH 4 /* The storm is here */
|
||||
#define NET_RX_BAD 5 /* packet dropped due to kernel error */
|
||||
|
||||
/* NET_XMIT_CN is special. It does not guarantee that this packet is lost. It
|
||||
* indicates that the device will soon be dropping packets, or already drops
|
||||
* some packets of the same priority; prompting us to send less aggressively. */
|
||||
#define net_xmit_eval(e) ((e) == NET_XMIT_CN? 0 : (e))
|
||||
#define net_xmit_errno(e) ((e) != NET_XMIT_CN ? -ENOBUFS : 0)
|
||||
|
||||
#endif
|
||||
|
@ -93,8 +97,10 @@ struct netpoll_info;
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_NET_IPIP) && \
|
||||
!defined(CONFIG_IPV6) && !defined(CONFIG_IPV6_MODULE)
|
||||
#if !defined(CONFIG_NET_IPIP) && !defined(CONFIG_NET_IPIP_MODULE) && \
|
||||
!defined(CONFIG_NET_IPGRE) && !defined(CONFIG_NET_IPGRE_MODULE) && \
|
||||
!defined(CONFIG_IPV6_SIT) && !defined(CONFIG_IPV6_SIT_MODULE) && \
|
||||
!defined(CONFIG_IPV6_TUNNEL) && !defined(CONFIG_IPV6_TUNNEL_MODULE)
|
||||
#define MAX_HEADER LL_MAX_HEADER
|
||||
#else
|
||||
#define MAX_HEADER (LL_MAX_HEADER + 48)
|
||||
|
@ -191,7 +197,7 @@ struct hh_cache
|
|||
* NOTE: For VLANs, this will be the
|
||||
* encapuslated type. --BLG
|
||||
*/
|
||||
int hh_len; /* length of header */
|
||||
u16 hh_len; /* length of header */
|
||||
int (*hh_output)(struct sk_buff *skb);
|
||||
rwlock_t hh_lock;
|
||||
|
||||
|
@ -515,11 +521,6 @@ struct net_device
|
|||
/* bridge stuff */
|
||||
struct net_bridge_port *br_port;
|
||||
|
||||
#ifdef CONFIG_NET_DIVERT
|
||||
/* this will get initialized at each interface type init routine */
|
||||
struct divert_blk *divert;
|
||||
#endif /* CONFIG_NET_DIVERT */
|
||||
|
||||
/* class/net/name entry */
|
||||
struct class_device class_dev;
|
||||
/* space for optional statistics and wireless sysfs groups */
|
||||
|
|
|
@ -117,6 +117,16 @@ void nf_unregister_hooks(struct nf_hook_ops *reg, unsigned int n);
|
|||
int nf_register_sockopt(struct nf_sockopt_ops *reg);
|
||||
void nf_unregister_sockopt(struct nf_sockopt_ops *reg);
|
||||
|
||||
#ifdef CONFIG_SYSCTL
|
||||
/* Sysctl registration */
|
||||
struct ctl_table_header *nf_register_sysctl_table(struct ctl_table *path,
|
||||
struct ctl_table *table);
|
||||
void nf_unregister_sysctl_table(struct ctl_table_header *header,
|
||||
struct ctl_table *table);
|
||||
extern struct ctl_table nf_net_netfilter_sysctl_path[];
|
||||
extern struct ctl_table nf_net_ipv4_netfilter_sysctl_path[];
|
||||
#endif /* CONFIG_SYSCTL */
|
||||
|
||||
extern struct list_head nf_hooks[NPROTO][NF_MAX_HOOKS];
|
||||
|
||||
/* those NF_LOG_* defines and struct nf_loginfo are legacy definitios that will
|
||||
|
@ -282,15 +292,31 @@ extern void nf_invalidate_cache(int pf);
|
|||
Returns true or false. */
|
||||
extern int skb_make_writable(struct sk_buff **pskb, unsigned int writable_len);
|
||||
|
||||
extern u_int16_t nf_csum_update(u_int32_t oldval, u_int32_t newval,
|
||||
u_int32_t csum);
|
||||
extern u_int16_t nf_proto_csum_update(struct sk_buff *skb,
|
||||
u_int32_t oldval, u_int32_t newval,
|
||||
u_int16_t csum, int pseudohdr);
|
||||
static inline void nf_csum_replace4(__sum16 *sum, __be32 from, __be32 to)
|
||||
{
|
||||
__be32 diff[] = { ~from, to };
|
||||
|
||||
*sum = csum_fold(csum_partial((char *)diff, sizeof(diff), ~csum_unfold(*sum)));
|
||||
}
|
||||
|
||||
static inline void nf_csum_replace2(__sum16 *sum, __be16 from, __be16 to)
|
||||
{
|
||||
nf_csum_replace4(sum, (__force __be32)from, (__force __be32)to);
|
||||
}
|
||||
|
||||
extern void nf_proto_csum_replace4(__sum16 *sum, struct sk_buff *skb,
|
||||
__be32 from, __be32 to, int pseudohdr);
|
||||
|
||||
static inline void nf_proto_csum_replace2(__sum16 *sum, struct sk_buff *skb,
|
||||
__be16 from, __be16 to, int pseudohdr)
|
||||
{
|
||||
nf_proto_csum_replace4(sum, skb, (__force __be32)from,
|
||||
(__force __be32)to, pseudohdr);
|
||||
}
|
||||
|
||||
struct nf_afinfo {
|
||||
unsigned short family;
|
||||
unsigned int (*checksum)(struct sk_buff *skb, unsigned int hook,
|
||||
__sum16 (*checksum)(struct sk_buff *skb, unsigned int hook,
|
||||
unsigned int dataoff, u_int8_t protocol);
|
||||
void (*saveroute)(const struct sk_buff *skb,
|
||||
struct nf_info *info);
|
||||
|
@ -305,12 +331,12 @@ static inline struct nf_afinfo *nf_get_afinfo(unsigned short family)
|
|||
return rcu_dereference(nf_afinfo[family]);
|
||||
}
|
||||
|
||||
static inline unsigned int
|
||||
static inline __sum16
|
||||
nf_checksum(struct sk_buff *skb, unsigned int hook, unsigned int dataoff,
|
||||
u_int8_t protocol, unsigned short family)
|
||||
{
|
||||
struct nf_afinfo *afinfo;
|
||||
unsigned int csum = 0;
|
||||
__sum16 csum = 0;
|
||||
|
||||
rcu_read_lock();
|
||||
afinfo = nf_get_afinfo(family);
|
||||
|
@ -331,7 +357,7 @@ extern void (*ip_nat_decode_session)(struct sk_buff *, struct flowi *);
|
|||
static inline void
|
||||
nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, int family)
|
||||
{
|
||||
#ifdef CONFIG_IP_NF_NAT_NEEDED
|
||||
#if defined(CONFIG_IP_NF_NAT_NEEDED) || defined(CONFIG_NF_NAT_NEEDED)
|
||||
void (*decodefn)(struct sk_buff *, struct flowi *);
|
||||
|
||||
if (family == AF_INET && (decodefn = ip_nat_decode_session) != NULL)
|
||||
|
|
|
@ -14,6 +14,7 @@ header-y += xt_dscp.h
|
|||
header-y += xt_DSCP.h
|
||||
header-y += xt_esp.h
|
||||
header-y += xt_helper.h
|
||||
header-y += xt_hashlimit.h
|
||||
header-y += xt_length.h
|
||||
header-y += xt_limit.h
|
||||
header-y += xt_mac.h
|
||||
|
@ -21,6 +22,7 @@ header-y += xt_mark.h
|
|||
header-y += xt_MARK.h
|
||||
header-y += xt_multiport.h
|
||||
header-y += xt_NFQUEUE.h
|
||||
header-y += xt_NFLOG.h
|
||||
header-y += xt_pkttype.h
|
||||
header-y += xt_policy.h
|
||||
header-y += xt_realm.h
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue