Merge branch 'writeback-for-2.6.34' into nfs-for-2.6.34
This commit is contained in:
@@ -43,6 +43,7 @@ header-y += blkpg.h
|
||||
header-y += bpqether.h
|
||||
header-y += bsg.h
|
||||
header-y += can.h
|
||||
header-y += cciss_defs.h
|
||||
header-y += cdk.h
|
||||
header-y += chio.h
|
||||
header-y += coda_psdev.h
|
||||
@@ -125,6 +126,7 @@ header-y += nfs2.h
|
||||
header-y += nfs4_mount.h
|
||||
header-y += nfs_mount.h
|
||||
header-y += nl80211.h
|
||||
header-y += omapfb.h
|
||||
header-y += param.h
|
||||
header-y += pci_regs.h
|
||||
header-y += perf_event.h
|
||||
@@ -362,6 +364,7 @@ unifdef-y += uio.h
|
||||
unifdef-y += unistd.h
|
||||
unifdef-y += usbdevice_fs.h
|
||||
unifdef-y += utsname.h
|
||||
unifdef-y += vhost.h
|
||||
unifdef-y += videodev2.h
|
||||
unifdef-y += videodev.h
|
||||
unifdef-y += virtio_config.h
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
/*
|
||||
* linux/include/asm-arm/hardware/amba.h
|
||||
* linux/include/amba/bus.h
|
||||
*
|
||||
* This device type deals with ARM PrimeCells and anything else that
|
||||
* presents a proper CID (0xB105F00D) at the end of the I/O register
|
||||
* region or that is derived from a PrimeCell.
|
||||
*
|
||||
* Copyright (C) 2003 Deep Blue Solutions Ltd, All Rights Reserved.
|
||||
*
|
||||
|
||||
+2
-1
@@ -841,7 +841,8 @@ static inline int ata_id_current_chs_valid(const u16 *id)
|
||||
|
||||
static inline int ata_id_is_cfa(const u16 *id)
|
||||
{
|
||||
if (id[ATA_ID_CONFIG] == 0x848A) /* Traditional CF */
|
||||
if ((id[ATA_ID_CONFIG] == 0x848A) || /* Traditional CF */
|
||||
(id[ATA_ID_CONFIG] == 0x844A)) /* Delkin Devices CF */
|
||||
return 1;
|
||||
/*
|
||||
* CF specs don't require specific value in the word 0 anymore and yet
|
||||
|
||||
@@ -424,7 +424,7 @@ extern void audit_syscall_exit(int failed, long return_code);
|
||||
extern void __audit_getname(const char *name);
|
||||
extern void audit_putname(const char *name);
|
||||
extern void __audit_inode(const char *name, const struct dentry *dentry);
|
||||
extern void __audit_inode_child(const char *dname, const struct dentry *dentry,
|
||||
extern void __audit_inode_child(const struct dentry *dentry,
|
||||
const struct inode *parent);
|
||||
extern void __audit_ptrace(struct task_struct *t);
|
||||
|
||||
@@ -442,11 +442,10 @@ static inline void audit_inode(const char *name, const struct dentry *dentry) {
|
||||
if (unlikely(!audit_dummy_context()))
|
||||
__audit_inode(name, dentry);
|
||||
}
|
||||
static inline void audit_inode_child(const char *dname,
|
||||
const struct dentry *dentry,
|
||||
static inline void audit_inode_child(const struct dentry *dentry,
|
||||
const struct inode *parent) {
|
||||
if (unlikely(!audit_dummy_context()))
|
||||
__audit_inode_child(dname, dentry, parent);
|
||||
__audit_inode_child(dentry, parent);
|
||||
}
|
||||
void audit_core_dumps(long signr);
|
||||
|
||||
@@ -544,9 +543,9 @@ extern int audit_signals;
|
||||
#define audit_getname(n) do { ; } while (0)
|
||||
#define audit_putname(n) do { ; } while (0)
|
||||
#define __audit_inode(n,d) do { ; } while (0)
|
||||
#define __audit_inode_child(d,i,p) do { ; } while (0)
|
||||
#define __audit_inode_child(i,p) do { ; } while (0)
|
||||
#define audit_inode(n,d) do { ; } while (0)
|
||||
#define audit_inode_child(d,i,p) do { ; } while (0)
|
||||
#define audit_inode_child(i,p) do { ; } while (0)
|
||||
#define audit_core_dumps(i) do { ; } while (0)
|
||||
#define auditsc_get_stamp(c,t,s) (0)
|
||||
#define audit_get_loginuid(t) (-1)
|
||||
|
||||
+27
-2
@@ -25,7 +25,7 @@
|
||||
static __inline__ int get_bitmask_order(unsigned int count)
|
||||
{
|
||||
int order;
|
||||
|
||||
|
||||
order = fls(count);
|
||||
return order; /* We could be slightly more clever with -1 here... */
|
||||
}
|
||||
@@ -33,7 +33,7 @@ static __inline__ int get_bitmask_order(unsigned int count)
|
||||
static __inline__ int get_count_order(unsigned int count)
|
||||
{
|
||||
int order;
|
||||
|
||||
|
||||
order = fls(count) - 1;
|
||||
if (count & (count - 1))
|
||||
order++;
|
||||
@@ -45,6 +45,31 @@ static inline unsigned long hweight_long(unsigned long w)
|
||||
return sizeof(w) == 4 ? hweight32(w) : hweight64(w);
|
||||
}
|
||||
|
||||
/*
|
||||
* Clearly slow versions of the hweightN() functions, their benefit is
|
||||
* of course compile time evaluation of constant arguments.
|
||||
*/
|
||||
#define HWEIGHT8(w) \
|
||||
( BUILD_BUG_ON_ZERO(!__builtin_constant_p(w)) + \
|
||||
(!!((w) & (1ULL << 0))) + \
|
||||
(!!((w) & (1ULL << 1))) + \
|
||||
(!!((w) & (1ULL << 2))) + \
|
||||
(!!((w) & (1ULL << 3))) + \
|
||||
(!!((w) & (1ULL << 4))) + \
|
||||
(!!((w) & (1ULL << 5))) + \
|
||||
(!!((w) & (1ULL << 6))) + \
|
||||
(!!((w) & (1ULL << 7))) )
|
||||
|
||||
#define HWEIGHT16(w) (HWEIGHT8(w) + HWEIGHT8((w) >> 8))
|
||||
#define HWEIGHT32(w) (HWEIGHT16(w) + HWEIGHT16((w) >> 16))
|
||||
#define HWEIGHT64(w) (HWEIGHT32(w) + HWEIGHT32((w) >> 32))
|
||||
|
||||
/*
|
||||
* Type invariant version that simply casts things to the
|
||||
* largest type.
|
||||
*/
|
||||
#define HWEIGHT(w) HWEIGHT64((u64)(w))
|
||||
|
||||
/**
|
||||
* rol32 - rotate a 32-bit value left
|
||||
* @word: value to rotate
|
||||
|
||||
+39
-30
@@ -316,8 +316,7 @@ struct queue_limits {
|
||||
unsigned int discard_alignment;
|
||||
|
||||
unsigned short logical_block_size;
|
||||
unsigned short max_hw_segments;
|
||||
unsigned short max_phys_segments;
|
||||
unsigned short max_segments;
|
||||
|
||||
unsigned char misaligned;
|
||||
unsigned char discard_misaligned;
|
||||
@@ -461,8 +460,8 @@ struct request_queue
|
||||
#define QUEUE_FLAG_NONROT 14 /* non-rotational device (SSD) */
|
||||
#define QUEUE_FLAG_VIRT QUEUE_FLAG_NONROT /* paravirt device */
|
||||
#define QUEUE_FLAG_IO_STAT 15 /* do IO stats */
|
||||
#define QUEUE_FLAG_CQ 16 /* hardware does queuing */
|
||||
#define QUEUE_FLAG_DISCARD 17 /* supports DISCARD */
|
||||
#define QUEUE_FLAG_DISCARD 16 /* supports DISCARD */
|
||||
#define QUEUE_FLAG_NOXMERGES 17 /* No extended merges */
|
||||
|
||||
#define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \
|
||||
(1 << QUEUE_FLAG_CLUSTER) | \
|
||||
@@ -586,9 +585,10 @@ enum {
|
||||
|
||||
#define blk_queue_plugged(q) test_bit(QUEUE_FLAG_PLUGGED, &(q)->queue_flags)
|
||||
#define blk_queue_tagged(q) test_bit(QUEUE_FLAG_QUEUED, &(q)->queue_flags)
|
||||
#define blk_queue_queuing(q) test_bit(QUEUE_FLAG_CQ, &(q)->queue_flags)
|
||||
#define blk_queue_stopped(q) test_bit(QUEUE_FLAG_STOPPED, &(q)->queue_flags)
|
||||
#define blk_queue_nomerges(q) test_bit(QUEUE_FLAG_NOMERGES, &(q)->queue_flags)
|
||||
#define blk_queue_noxmerges(q) \
|
||||
test_bit(QUEUE_FLAG_NOXMERGES, &(q)->queue_flags)
|
||||
#define blk_queue_nonrot(q) test_bit(QUEUE_FLAG_NONROT, &(q)->queue_flags)
|
||||
#define blk_queue_io_stat(q) test_bit(QUEUE_FLAG_IO_STAT, &(q)->queue_flags)
|
||||
#define blk_queue_flushing(q) ((q)->ordseq)
|
||||
@@ -920,10 +920,27 @@ extern struct request_queue *blk_init_queue(request_fn_proc *, spinlock_t *);
|
||||
extern void blk_cleanup_queue(struct request_queue *);
|
||||
extern void blk_queue_make_request(struct request_queue *, make_request_fn *);
|
||||
extern void blk_queue_bounce_limit(struct request_queue *, u64);
|
||||
extern void blk_queue_max_sectors(struct request_queue *, unsigned int);
|
||||
extern void blk_queue_max_hw_sectors(struct request_queue *, unsigned int);
|
||||
extern void blk_queue_max_phys_segments(struct request_queue *, unsigned short);
|
||||
extern void blk_queue_max_hw_segments(struct request_queue *, unsigned short);
|
||||
|
||||
/* Temporary compatibility wrapper */
|
||||
static inline void blk_queue_max_sectors(struct request_queue *q, unsigned int max)
|
||||
{
|
||||
blk_queue_max_hw_sectors(q, max);
|
||||
}
|
||||
|
||||
extern void blk_queue_max_segments(struct request_queue *, unsigned short);
|
||||
|
||||
static inline void blk_queue_max_phys_segments(struct request_queue *q, unsigned short max)
|
||||
{
|
||||
blk_queue_max_segments(q, max);
|
||||
}
|
||||
|
||||
static inline void blk_queue_max_hw_segments(struct request_queue *q, unsigned short max)
|
||||
{
|
||||
blk_queue_max_segments(q, max);
|
||||
}
|
||||
|
||||
|
||||
extern void blk_queue_max_segment_size(struct request_queue *, unsigned int);
|
||||
extern void blk_queue_max_discard_sectors(struct request_queue *q,
|
||||
unsigned int max_discard_sectors);
|
||||
@@ -1016,11 +1033,15 @@ extern int blk_verify_command(unsigned char *cmd, fmode_t has_write_perm);
|
||||
#define MAX_PHYS_SEGMENTS 128
|
||||
#define MAX_HW_SEGMENTS 128
|
||||
#define SAFE_MAX_SECTORS 255
|
||||
#define BLK_DEF_MAX_SECTORS 1024
|
||||
|
||||
#define MAX_SEGMENT_SIZE 65536
|
||||
|
||||
#define BLK_SEG_BOUNDARY_MASK 0xFFFFFFFFUL
|
||||
enum blk_default_limits {
|
||||
BLK_MAX_SEGMENTS = 128,
|
||||
BLK_SAFE_MAX_SECTORS = 255,
|
||||
BLK_DEF_MAX_SECTORS = 1024,
|
||||
BLK_MAX_SEGMENT_SIZE = 65536,
|
||||
BLK_SEG_BOUNDARY_MASK = 0xFFFFFFFFUL,
|
||||
};
|
||||
|
||||
#define blkdev_entry_to_request(entry) list_entry((entry), struct request, queuelist)
|
||||
|
||||
@@ -1044,14 +1065,9 @@ static inline unsigned int queue_max_hw_sectors(struct request_queue *q)
|
||||
return q->limits.max_hw_sectors;
|
||||
}
|
||||
|
||||
static inline unsigned short queue_max_hw_segments(struct request_queue *q)
|
||||
static inline unsigned short queue_max_segments(struct request_queue *q)
|
||||
{
|
||||
return q->limits.max_hw_segments;
|
||||
}
|
||||
|
||||
static inline unsigned short queue_max_phys_segments(struct request_queue *q)
|
||||
{
|
||||
return q->limits.max_phys_segments;
|
||||
return q->limits.max_segments;
|
||||
}
|
||||
|
||||
static inline unsigned int queue_max_segment_size(struct request_queue *q)
|
||||
@@ -1112,18 +1128,13 @@ static inline int queue_alignment_offset(struct request_queue *q)
|
||||
return q->limits.alignment_offset;
|
||||
}
|
||||
|
||||
static inline int queue_limit_alignment_offset(struct queue_limits *lim, sector_t offset)
|
||||
static inline int queue_limit_alignment_offset(struct queue_limits *lim, sector_t sector)
|
||||
{
|
||||
unsigned int granularity = max(lim->physical_block_size, lim->io_min);
|
||||
unsigned int alignment = (sector << 9) & (granularity - 1);
|
||||
|
||||
offset &= granularity - 1;
|
||||
return (granularity + lim->alignment_offset - offset) & (granularity - 1);
|
||||
}
|
||||
|
||||
static inline int queue_sector_alignment_offset(struct request_queue *q,
|
||||
sector_t sector)
|
||||
{
|
||||
return queue_limit_alignment_offset(&q->limits, sector << 9);
|
||||
return (granularity + lim->alignment_offset - alignment)
|
||||
& (granularity - 1);
|
||||
}
|
||||
|
||||
static inline int bdev_alignment_offset(struct block_device *bdev)
|
||||
@@ -1147,10 +1158,8 @@ static inline int queue_discard_alignment(struct request_queue *q)
|
||||
return q->limits.discard_alignment;
|
||||
}
|
||||
|
||||
static inline int queue_sector_discard_alignment(struct request_queue *q,
|
||||
sector_t sector)
|
||||
static inline int queue_limit_discard_alignment(struct queue_limits *lim, sector_t sector)
|
||||
{
|
||||
struct queue_limits *lim = &q->limits;
|
||||
unsigned int alignment = (sector << 9) & (lim->discard_granularity - 1);
|
||||
|
||||
return (lim->discard_granularity + lim->discard_alignment - alignment)
|
||||
|
||||
@@ -150,8 +150,8 @@ struct blk_user_trace_setup {
|
||||
struct blk_trace {
|
||||
int trace_state;
|
||||
struct rchan *rchan;
|
||||
unsigned long *sequence;
|
||||
unsigned char *msg_data;
|
||||
unsigned long __percpu *sequence;
|
||||
unsigned char __percpu *msg_data;
|
||||
u16 act_mask;
|
||||
u64 start_lba;
|
||||
u64 end_lba;
|
||||
|
||||
@@ -23,6 +23,7 @@ extern unsigned long max_pfn;
|
||||
extern unsigned long saved_max_pfn;
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_NO_BOOTMEM
|
||||
/*
|
||||
* node_bootmem_map is a map pointer - the bits represent all physical
|
||||
* memory pages (including holes) on the node.
|
||||
@@ -37,6 +38,7 @@ typedef struct bootmem_data {
|
||||
} bootmem_data_t;
|
||||
|
||||
extern bootmem_data_t bootmem_node_data[];
|
||||
#endif
|
||||
|
||||
extern unsigned long bootmem_bootmap_pages(unsigned long);
|
||||
|
||||
@@ -46,6 +48,7 @@ extern unsigned long init_bootmem_node(pg_data_t *pgdat,
|
||||
unsigned long endpfn);
|
||||
extern unsigned long init_bootmem(unsigned long addr, unsigned long memend);
|
||||
|
||||
unsigned long free_all_memory_core_early(int nodeid);
|
||||
extern unsigned long free_all_bootmem_node(pg_data_t *pgdat);
|
||||
extern unsigned long free_all_bootmem(void);
|
||||
|
||||
@@ -84,6 +87,10 @@ extern void *__alloc_bootmem_node(pg_data_t *pgdat,
|
||||
unsigned long size,
|
||||
unsigned long align,
|
||||
unsigned long goal);
|
||||
void *__alloc_bootmem_node_high(pg_data_t *pgdat,
|
||||
unsigned long size,
|
||||
unsigned long align,
|
||||
unsigned long goal);
|
||||
extern void *__alloc_bootmem_node_nopanic(pg_data_t *pgdat,
|
||||
unsigned long size,
|
||||
unsigned long align,
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
#define PHY_ID_BCM50610 0x0143bd60
|
||||
#define PHY_ID_BCM50610M 0x0143bd70
|
||||
#define PHY_ID_BCMAC131 0x0143bc70
|
||||
#define PHY_ID_BCM57780 0x03625d90
|
||||
|
||||
#define PHY_BCM_OUI_MASK 0xfffffc00
|
||||
#define PHY_BCM_OUI_1 0x00206000
|
||||
#define PHY_BCM_OUI_2 0x0143bc00
|
||||
#define PHY_BCM_OUI_3 0x03625c00
|
||||
|
||||
|
||||
#define PHY_BCM_FLAGS_MODE_COPPER 0x00000001
|
||||
#define PHY_BCM_FLAGS_MODE_1000BX 0x00000002
|
||||
#define PHY_BCM_FLAGS_INTF_SGMII 0x00000010
|
||||
|
||||
@@ -38,6 +38,7 @@ struct can_priv {
|
||||
|
||||
enum can_state state;
|
||||
u32 ctrlmode;
|
||||
u32 ctrlmode_supported;
|
||||
|
||||
int restart_ms;
|
||||
struct timer_list restart_timer;
|
||||
@@ -46,6 +47,8 @@ struct can_priv {
|
||||
int (*do_set_mode)(struct net_device *dev, enum can_mode mode);
|
||||
int (*do_get_state)(const struct net_device *dev,
|
||||
enum can_state *state);
|
||||
int (*do_get_berr_counter)(const struct net_device *dev,
|
||||
struct can_berr_counter *bec);
|
||||
|
||||
unsigned int echo_skb_max;
|
||||
struct sk_buff **echo_skb;
|
||||
@@ -60,6 +63,21 @@ struct can_priv {
|
||||
*/
|
||||
#define get_can_dlc(i) (min_t(__u8, (i), 8))
|
||||
|
||||
/* Drop a given socketbuffer if it does not contain a valid CAN frame. */
|
||||
static inline int can_dropped_invalid_skb(struct net_device *dev,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
const struct can_frame *cf = (struct can_frame *)skb->data;
|
||||
|
||||
if (unlikely(skb->len != sizeof(*cf) || cf->can_dlc > 8)) {
|
||||
kfree_skb(skb);
|
||||
dev->stats.tx_dropped++;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct net_device *alloc_candev(int sizeof_priv, unsigned int echo_skb_max);
|
||||
void free_candev(struct net_device *dev);
|
||||
|
||||
|
||||
@@ -69,6 +69,14 @@ enum can_state {
|
||||
CAN_STATE_MAX
|
||||
};
|
||||
|
||||
/*
|
||||
* CAN bus error counters
|
||||
*/
|
||||
struct can_berr_counter {
|
||||
__u16 txerr;
|
||||
__u16 rxerr;
|
||||
};
|
||||
|
||||
/*
|
||||
* CAN controller mode
|
||||
*/
|
||||
@@ -77,9 +85,11 @@ struct can_ctrlmode {
|
||||
__u32 flags;
|
||||
};
|
||||
|
||||
#define CAN_CTRLMODE_LOOPBACK 0x1 /* Loopback mode */
|
||||
#define CAN_CTRLMODE_LISTENONLY 0x2 /* Listen-only mode */
|
||||
#define CAN_CTRLMODE_3_SAMPLES 0x4 /* Triple sampling mode */
|
||||
#define CAN_CTRLMODE_LOOPBACK 0x01 /* Loopback mode */
|
||||
#define CAN_CTRLMODE_LISTENONLY 0x02 /* Listen-only mode */
|
||||
#define CAN_CTRLMODE_3_SAMPLES 0x04 /* Triple sampling mode */
|
||||
#define CAN_CTRLMODE_ONE_SHOT 0x08 /* One-Shot mode */
|
||||
#define CAN_CTRLMODE_BERR_REPORTING 0x10 /* Bus-error reporting */
|
||||
|
||||
/*
|
||||
* CAN device statistics
|
||||
@@ -105,6 +115,7 @@ enum {
|
||||
IFLA_CAN_CTRLMODE,
|
||||
IFLA_CAN_RESTART_MS,
|
||||
IFLA_CAN_RESTART,
|
||||
IFLA_CAN_BERR_COUNTER,
|
||||
__IFLA_CAN_MAX
|
||||
};
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#ifndef __CAN_PLATFORM_TI_HECC_H__
|
||||
#define __CAN_PLATFORM_TI_HECC_H__
|
||||
|
||||
/*
|
||||
* TI HECC (High End CAN Controller) driver platform header
|
||||
*
|
||||
@@ -23,6 +26,7 @@
|
||||
* @mbx_offset: Mailbox RAM offset
|
||||
* @int_line: Interrupt line to use - 0 or 1
|
||||
* @version: version for future use
|
||||
* @transceiver_switch: platform specific callback fn for transceiver control
|
||||
*
|
||||
* Platform data structure to get all platform specific settings.
|
||||
* this structure also accounts the fact that the IP may have different
|
||||
@@ -35,6 +39,6 @@ struct ti_hecc_platform_data {
|
||||
u32 mbx_offset;
|
||||
u32 int_line;
|
||||
u32 version;
|
||||
void (*transceiver_switch) (int);
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
#ifndef CCISS_DEFS_H
|
||||
#define CCISS_DEFS_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
/* general boundary definitions */
|
||||
#define SENSEINFOBYTES 32 /* note that this value may vary
|
||||
between host implementations */
|
||||
|
||||
/* Command Status value */
|
||||
#define CMD_SUCCESS 0x0000
|
||||
#define CMD_TARGET_STATUS 0x0001
|
||||
#define CMD_DATA_UNDERRUN 0x0002
|
||||
#define CMD_DATA_OVERRUN 0x0003
|
||||
#define CMD_INVALID 0x0004
|
||||
#define CMD_PROTOCOL_ERR 0x0005
|
||||
#define CMD_HARDWARE_ERR 0x0006
|
||||
#define CMD_CONNECTION_LOST 0x0007
|
||||
#define CMD_ABORTED 0x0008
|
||||
#define CMD_ABORT_FAILED 0x0009
|
||||
#define CMD_UNSOLICITED_ABORT 0x000A
|
||||
#define CMD_TIMEOUT 0x000B
|
||||
#define CMD_UNABORTABLE 0x000C
|
||||
|
||||
/* transfer direction */
|
||||
#define XFER_NONE 0x00
|
||||
#define XFER_WRITE 0x01
|
||||
#define XFER_READ 0x02
|
||||
#define XFER_RSVD 0x03
|
||||
|
||||
/* task attribute */
|
||||
#define ATTR_UNTAGGED 0x00
|
||||
#define ATTR_SIMPLE 0x04
|
||||
#define ATTR_HEADOFQUEUE 0x05
|
||||
#define ATTR_ORDERED 0x06
|
||||
#define ATTR_ACA 0x07
|
||||
|
||||
/* cdb type */
|
||||
#define TYPE_CMD 0x00
|
||||
#define TYPE_MSG 0x01
|
||||
|
||||
/* Type defs used in the following structs */
|
||||
#define BYTE __u8
|
||||
#define WORD __u16
|
||||
#define HWORD __u16
|
||||
#define DWORD __u32
|
||||
|
||||
#define CISS_MAX_LUN 1024
|
||||
|
||||
#define LEVEL2LUN 1 /* index into Target(x) structure, due to byte swapping */
|
||||
#define LEVEL3LUN 0
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
/* Command List Structure */
|
||||
typedef union _SCSI3Addr_struct {
|
||||
struct {
|
||||
BYTE Dev;
|
||||
BYTE Bus:6;
|
||||
BYTE Mode:2; /* b00 */
|
||||
} PeripDev;
|
||||
struct {
|
||||
BYTE DevLSB;
|
||||
BYTE DevMSB:6;
|
||||
BYTE Mode:2; /* b01 */
|
||||
} LogDev;
|
||||
struct {
|
||||
BYTE Dev:5;
|
||||
BYTE Bus:3;
|
||||
BYTE Targ:6;
|
||||
BYTE Mode:2; /* b10 */
|
||||
} LogUnit;
|
||||
} SCSI3Addr_struct;
|
||||
|
||||
typedef struct _PhysDevAddr_struct {
|
||||
DWORD TargetId:24;
|
||||
DWORD Bus:6;
|
||||
DWORD Mode:2;
|
||||
SCSI3Addr_struct Target[2]; /* 2 level target device addr */
|
||||
} PhysDevAddr_struct;
|
||||
|
||||
typedef struct _LogDevAddr_struct {
|
||||
DWORD VolId:30;
|
||||
DWORD Mode:2;
|
||||
BYTE reserved[4];
|
||||
} LogDevAddr_struct;
|
||||
|
||||
typedef union _LUNAddr_struct {
|
||||
BYTE LunAddrBytes[8];
|
||||
SCSI3Addr_struct SCSI3Lun[4];
|
||||
PhysDevAddr_struct PhysDev;
|
||||
LogDevAddr_struct LogDev;
|
||||
} LUNAddr_struct;
|
||||
|
||||
typedef struct _RequestBlock_struct {
|
||||
BYTE CDBLen;
|
||||
struct {
|
||||
BYTE Type:3;
|
||||
BYTE Attribute:3;
|
||||
BYTE Direction:2;
|
||||
} Type;
|
||||
HWORD Timeout;
|
||||
BYTE CDB[16];
|
||||
} RequestBlock_struct;
|
||||
|
||||
typedef union _MoreErrInfo_struct{
|
||||
struct {
|
||||
BYTE Reserved[3];
|
||||
BYTE Type;
|
||||
DWORD ErrorInfo;
|
||||
} Common_Info;
|
||||
struct{
|
||||
BYTE Reserved[2];
|
||||
BYTE offense_size; /* size of offending entry */
|
||||
BYTE offense_num; /* byte # of offense 0-base */
|
||||
DWORD offense_value;
|
||||
} Invalid_Cmd;
|
||||
} MoreErrInfo_struct;
|
||||
typedef struct _ErrorInfo_struct {
|
||||
BYTE ScsiStatus;
|
||||
BYTE SenseLen;
|
||||
HWORD CommandStatus;
|
||||
DWORD ResidualCnt;
|
||||
MoreErrInfo_struct MoreErrInfo;
|
||||
BYTE SenseInfo[SENSEINFOBYTES];
|
||||
} ErrorInfo_struct;
|
||||
|
||||
#pragma pack()
|
||||
|
||||
#endif /* CCISS_DEFS_H */
|
||||
+1
-127
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/ioctl.h>
|
||||
#include <linux/cciss_defs.h>
|
||||
|
||||
#define CCISS_IOC_MAGIC 'B'
|
||||
|
||||
@@ -36,133 +37,6 @@ typedef __u32 DriverVer_type;
|
||||
|
||||
#define MAX_KMALLOC_SIZE 128000
|
||||
|
||||
#ifndef CCISS_CMD_H
|
||||
// This defines are duplicated in cciss_cmd.h in the driver directory
|
||||
|
||||
//general boundary definitions
|
||||
#define SENSEINFOBYTES 32//note that this value may vary between host implementations
|
||||
|
||||
//Command Status value
|
||||
#define CMD_SUCCESS 0x0000
|
||||
#define CMD_TARGET_STATUS 0x0001
|
||||
#define CMD_DATA_UNDERRUN 0x0002
|
||||
#define CMD_DATA_OVERRUN 0x0003
|
||||
#define CMD_INVALID 0x0004
|
||||
#define CMD_PROTOCOL_ERR 0x0005
|
||||
#define CMD_HARDWARE_ERR 0x0006
|
||||
#define CMD_CONNECTION_LOST 0x0007
|
||||
#define CMD_ABORTED 0x0008
|
||||
#define CMD_ABORT_FAILED 0x0009
|
||||
#define CMD_UNSOLICITED_ABORT 0x000A
|
||||
#define CMD_TIMEOUT 0x000B
|
||||
#define CMD_UNABORTABLE 0x000C
|
||||
|
||||
//transfer direction
|
||||
#define XFER_NONE 0x00
|
||||
#define XFER_WRITE 0x01
|
||||
#define XFER_READ 0x02
|
||||
#define XFER_RSVD 0x03
|
||||
|
||||
//task attribute
|
||||
#define ATTR_UNTAGGED 0x00
|
||||
#define ATTR_SIMPLE 0x04
|
||||
#define ATTR_HEADOFQUEUE 0x05
|
||||
#define ATTR_ORDERED 0x06
|
||||
#define ATTR_ACA 0x07
|
||||
|
||||
//cdb type
|
||||
#define TYPE_CMD 0x00
|
||||
#define TYPE_MSG 0x01
|
||||
|
||||
// Type defs used in the following structs
|
||||
#define BYTE __u8
|
||||
#define WORD __u16
|
||||
#define HWORD __u16
|
||||
#define DWORD __u32
|
||||
|
||||
#define CISS_MAX_LUN 1024
|
||||
|
||||
#define LEVEL2LUN 1 // index into Target(x) structure, due to byte swapping
|
||||
#define LEVEL3LUN 0
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
//Command List Structure
|
||||
typedef union _SCSI3Addr_struct {
|
||||
struct {
|
||||
BYTE Dev;
|
||||
BYTE Bus:6;
|
||||
BYTE Mode:2; // b00
|
||||
} PeripDev;
|
||||
struct {
|
||||
BYTE DevLSB;
|
||||
BYTE DevMSB:6;
|
||||
BYTE Mode:2; // b01
|
||||
} LogDev;
|
||||
struct {
|
||||
BYTE Dev:5;
|
||||
BYTE Bus:3;
|
||||
BYTE Targ:6;
|
||||
BYTE Mode:2; // b10
|
||||
} LogUnit;
|
||||
} SCSI3Addr_struct;
|
||||
|
||||
typedef struct _PhysDevAddr_struct {
|
||||
DWORD TargetId:24;
|
||||
DWORD Bus:6;
|
||||
DWORD Mode:2;
|
||||
SCSI3Addr_struct Target[2]; //2 level target device addr
|
||||
} PhysDevAddr_struct;
|
||||
|
||||
typedef struct _LogDevAddr_struct {
|
||||
DWORD VolId:30;
|
||||
DWORD Mode:2;
|
||||
BYTE reserved[4];
|
||||
} LogDevAddr_struct;
|
||||
|
||||
typedef union _LUNAddr_struct {
|
||||
BYTE LunAddrBytes[8];
|
||||
SCSI3Addr_struct SCSI3Lun[4];
|
||||
PhysDevAddr_struct PhysDev;
|
||||
LogDevAddr_struct LogDev;
|
||||
} LUNAddr_struct;
|
||||
|
||||
typedef struct _RequestBlock_struct {
|
||||
BYTE CDBLen;
|
||||
struct {
|
||||
BYTE Type:3;
|
||||
BYTE Attribute:3;
|
||||
BYTE Direction:2;
|
||||
} Type;
|
||||
HWORD Timeout;
|
||||
BYTE CDB[16];
|
||||
} RequestBlock_struct;
|
||||
|
||||
typedef union _MoreErrInfo_struct{
|
||||
struct {
|
||||
BYTE Reserved[3];
|
||||
BYTE Type;
|
||||
DWORD ErrorInfo;
|
||||
}Common_Info;
|
||||
struct{
|
||||
BYTE Reserved[2];
|
||||
BYTE offense_size;//size of offending entry
|
||||
BYTE offense_num; //byte # of offense 0-base
|
||||
DWORD offense_value;
|
||||
}Invalid_Cmd;
|
||||
}MoreErrInfo_struct;
|
||||
typedef struct _ErrorInfo_struct {
|
||||
BYTE ScsiStatus;
|
||||
BYTE SenseLen;
|
||||
HWORD CommandStatus;
|
||||
DWORD ResidualCnt;
|
||||
MoreErrInfo_struct MoreErrInfo;
|
||||
BYTE SenseInfo[SENSEINFOBYTES];
|
||||
} ErrorInfo_struct;
|
||||
|
||||
#pragma pack()
|
||||
#endif /* CCISS_CMD_H */
|
||||
|
||||
typedef struct _IOCTL_Command_struct {
|
||||
LUNAddr_struct LUN_info;
|
||||
RequestBlock_struct Request;
|
||||
|
||||
@@ -28,6 +28,7 @@ struct css_id;
|
||||
extern int cgroup_init_early(void);
|
||||
extern int cgroup_init(void);
|
||||
extern void cgroup_lock(void);
|
||||
extern int cgroup_lock_is_held(void);
|
||||
extern bool cgroup_lock_live_group(struct cgroup *cgrp);
|
||||
extern void cgroup_unlock(void);
|
||||
extern void cgroup_fork(struct task_struct *p);
|
||||
@@ -486,7 +487,9 @@ static inline struct cgroup_subsys_state *cgroup_subsys_state(
|
||||
static inline struct cgroup_subsys_state *task_subsys_state(
|
||||
struct task_struct *task, int subsys_id)
|
||||
{
|
||||
return rcu_dereference(task->cgroups->subsys[subsys_id]);
|
||||
return rcu_dereference_check(task->cgroups->subsys[subsys_id],
|
||||
rcu_read_lock_held() ||
|
||||
cgroup_lock_is_held());
|
||||
}
|
||||
|
||||
static inline struct cgroup* task_cgroup(struct task_struct *task,
|
||||
|
||||
@@ -154,6 +154,7 @@ extern u64 timecounter_cyc2time(struct timecounter *tc,
|
||||
* @max_idle_ns: max idle time permitted by the clocksource (nsecs)
|
||||
* @flags: flags describing special properties
|
||||
* @vread: vsyscall based read
|
||||
* @suspend: suspend function for the clocksource, if necessary
|
||||
* @resume: resume function for the clocksource, if necessary
|
||||
*/
|
||||
struct clocksource {
|
||||
@@ -172,7 +173,8 @@ struct clocksource {
|
||||
u64 max_idle_ns;
|
||||
unsigned long flags;
|
||||
cycle_t (*vread)(void);
|
||||
void (*resume)(void);
|
||||
void (*suspend)(struct clocksource *cs);
|
||||
void (*resume)(struct clocksource *cs);
|
||||
#ifdef CONFIG_IA64
|
||||
void *fsys_mmio; /* used by fsyscall asm code */
|
||||
#define CLKSRC_FSYS_MMIO_SET(mmio, addr) ((mmio) = (addr))
|
||||
@@ -277,6 +279,7 @@ extern void clocksource_unregister(struct clocksource*);
|
||||
extern void clocksource_touch_watchdog(void);
|
||||
extern struct clocksource* clocksource_get_next(void);
|
||||
extern void clocksource_change_rating(struct clocksource *cs, int rating);
|
||||
extern void clocksource_suspend(void);
|
||||
extern void clocksource_resume(void);
|
||||
extern struct clocksource * __init __weak clocksource_default_clock(void);
|
||||
extern void clocksource_mark_unstable(struct clocksource *cs);
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#ifdef __CHECKER__
|
||||
# define __user __attribute__((noderef, address_space(1)))
|
||||
# define __kernel /* default address space */
|
||||
# define __kernel __attribute__((address_space(0)))
|
||||
# define __safe __attribute__((safe))
|
||||
# define __force __attribute__((force))
|
||||
# define __nocast __attribute__((nocast))
|
||||
|
||||
@@ -143,6 +143,8 @@ static inline unsigned int cpumask_any_but(const struct cpumask *mask,
|
||||
|
||||
#define for_each_cpu(cpu, mask) \
|
||||
for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask)
|
||||
#define for_each_cpu_not(cpu, mask) \
|
||||
for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask)
|
||||
#define for_each_cpu_and(cpu, mask, and) \
|
||||
for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask, (void)and)
|
||||
#else
|
||||
@@ -202,6 +204,18 @@ int cpumask_any_but(const struct cpumask *mask, unsigned int cpu);
|
||||
(cpu) = cpumask_next((cpu), (mask)), \
|
||||
(cpu) < nr_cpu_ids;)
|
||||
|
||||
/**
|
||||
* for_each_cpu_not - iterate over every cpu in a complemented mask
|
||||
* @cpu: the (optionally unsigned) integer iterator
|
||||
* @mask: the cpumask pointer
|
||||
*
|
||||
* After the loop, cpu is >= nr_cpu_ids.
|
||||
*/
|
||||
#define for_each_cpu_not(cpu, mask) \
|
||||
for ((cpu) = -1; \
|
||||
(cpu) = cpumask_next_zero((cpu), (mask)), \
|
||||
(cpu) < nr_cpu_ids;)
|
||||
|
||||
/**
|
||||
* for_each_cpu_and - iterate over every cpu in both masks
|
||||
* @cpu: the (optionally unsigned) integer iterator
|
||||
|
||||
@@ -280,7 +280,7 @@ static inline void put_cred(const struct cred *_cred)
|
||||
* task or by holding tasklist_lock to prevent it from being unlinked.
|
||||
*/
|
||||
#define __task_cred(task) \
|
||||
((const struct cred *)(rcu_dereference((task)->real_cred)))
|
||||
((const struct cred *)(rcu_dereference_check((task)->real_cred, rcu_read_lock_held() || lockdep_is_held(&tasklist_lock))))
|
||||
|
||||
/**
|
||||
* get_task_cred - Get another task's objective credentials
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* TI DaVinci EMAC platform support
|
||||
*
|
||||
* Author: Kevin Hilman, Deep Root Systems, LLC
|
||||
*
|
||||
* 2007 (c) Deep Root Systems, LLC. This file is licensed under
|
||||
* the terms of the GNU General Public License version 2. This program
|
||||
* is licensed "as is" without any warranty of any kind, whether express
|
||||
* or implied.
|
||||
*/
|
||||
#ifndef _LINUX_DAVINCI_EMAC_H
|
||||
#define _LINUX_DAVINCI_EMAC_H
|
||||
|
||||
#include <linux/if_ether.h>
|
||||
#include <linux/memory.h>
|
||||
|
||||
struct emac_platform_data {
|
||||
char mac_addr[ETH_ALEN];
|
||||
u32 ctrl_reg_offset;
|
||||
u32 ctrl_mod_reg_offset;
|
||||
u32 ctrl_ram_offset;
|
||||
u32 hw_ram_addr;
|
||||
u32 mdio_reg_offset;
|
||||
u32 ctrl_ram_size;
|
||||
u32 phy_mask;
|
||||
u32 mdio_max_freq;
|
||||
u8 rmii_en;
|
||||
u8 version;
|
||||
void (*interrupt_enable) (void);
|
||||
void (*interrupt_disable) (void);
|
||||
};
|
||||
|
||||
enum {
|
||||
EMAC_VERSION_1, /* DM644x */
|
||||
EMAC_VERSION_2, /* DM646x */
|
||||
};
|
||||
|
||||
void davinci_get_mac_addr(struct memory_accessor *mem_acc, void *context);
|
||||
#endif
|
||||
@@ -472,6 +472,23 @@ static inline int device_is_registered(struct device *dev)
|
||||
return dev->kobj.state_in_sysfs;
|
||||
}
|
||||
|
||||
static inline void device_enable_async_suspend(struct device *dev)
|
||||
{
|
||||
if (dev->power.status == DPM_ON)
|
||||
dev->power.async_suspend = true;
|
||||
}
|
||||
|
||||
static inline void device_disable_async_suspend(struct device *dev)
|
||||
{
|
||||
if (dev->power.status == DPM_ON)
|
||||
dev->power.async_suspend = false;
|
||||
}
|
||||
|
||||
static inline bool device_async_suspend_enabled(struct device *dev)
|
||||
{
|
||||
return !!dev->power.async_suspend;
|
||||
}
|
||||
|
||||
void driver_init(void);
|
||||
|
||||
/*
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
* if dma_cookie_t is >0 it's a DMA request cookie, <0 it's an error code
|
||||
*/
|
||||
typedef s32 dma_cookie_t;
|
||||
#define DMA_MIN_COOKIE 1
|
||||
#define DMA_MAX_COOKIE INT_MAX
|
||||
|
||||
#define dma_submit_error(cookie) ((cookie) < 0 ? 1 : 0)
|
||||
|
||||
@@ -162,7 +164,7 @@ struct dma_chan {
|
||||
struct dma_chan_dev *dev;
|
||||
|
||||
struct list_head device_node;
|
||||
struct dma_chan_percpu *local;
|
||||
struct dma_chan_percpu __percpu *local;
|
||||
int client_count;
|
||||
int table_count;
|
||||
void *private;
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
#ifndef _LINUX_EARLY_RES_H
|
||||
#define _LINUX_EARLY_RES_H
|
||||
#ifdef __KERNEL__
|
||||
|
||||
extern void reserve_early(u64 start, u64 end, char *name);
|
||||
extern void reserve_early_overlap_ok(u64 start, u64 end, char *name);
|
||||
extern void free_early(u64 start, u64 end);
|
||||
void free_early_partial(u64 start, u64 end);
|
||||
extern void early_res_to_bootmem(u64 start, u64 end);
|
||||
|
||||
void reserve_early_without_check(u64 start, u64 end, char *name);
|
||||
u64 find_early_area(u64 ei_start, u64 ei_last, u64 start, u64 end,
|
||||
u64 size, u64 align);
|
||||
u64 find_early_area_size(u64 ei_start, u64 ei_last, u64 start,
|
||||
u64 *sizep, u64 align);
|
||||
u64 find_fw_memmap_area(u64 start, u64 end, u64 size, u64 align);
|
||||
u64 get_max_mapped(void);
|
||||
#include <linux/range.h>
|
||||
int get_free_all_memory_range(struct range **rangep, int nodeid);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* _LINUX_EARLY_RES_H */
|
||||
+11
-1
@@ -349,7 +349,11 @@ typedef struct elf64_shdr {
|
||||
#define ELF_OSABI ELFOSABI_NONE
|
||||
#endif
|
||||
|
||||
/* Notes used in ET_CORE */
|
||||
/*
|
||||
* Notes used in ET_CORE. Architectures export some of the arch register sets
|
||||
* using the corresponding note types via the PTRACE_GETREGSET and
|
||||
* PTRACE_SETREGSET requests.
|
||||
*/
|
||||
#define NT_PRSTATUS 1
|
||||
#define NT_PRFPREG 2
|
||||
#define NT_PRPSINFO 3
|
||||
@@ -361,7 +365,13 @@ typedef struct elf64_shdr {
|
||||
#define NT_PPC_VSX 0x102 /* PowerPC VSX registers */
|
||||
#define NT_386_TLS 0x200 /* i386 TLS slots (struct user_desc) */
|
||||
#define NT_386_IOPERM 0x201 /* x86 io permission bitmap (1=deny) */
|
||||
#define NT_X86_XSTATE 0x202 /* x86 extended state using xsave */
|
||||
#define NT_S390_HIGH_GPRS 0x300 /* s390 upper register halves */
|
||||
#define NT_S390_TIMER 0x301 /* s390 timer register */
|
||||
#define NT_S390_TODCMP 0x302 /* s390 TOD clock comparator register */
|
||||
#define NT_S390_TODPREG 0x303 /* s390 TOD programmable register */
|
||||
#define NT_S390_CTRS 0x304 /* s390 control registers */
|
||||
#define NT_S390_PREFIX 0x305 /* s390 prefix register */
|
||||
|
||||
|
||||
/* Note header in a PT_NOTE section */
|
||||
|
||||
@@ -242,6 +242,7 @@ enum ethtool_stringset {
|
||||
ETH_SS_TEST = 0,
|
||||
ETH_SS_STATS,
|
||||
ETH_SS_PRIV_FLAGS,
|
||||
ETH_SS_NTUPLE_FILTERS,
|
||||
};
|
||||
|
||||
/* for passing string sets for data tagging */
|
||||
@@ -290,6 +291,7 @@ struct ethtool_perm_addr {
|
||||
*/
|
||||
enum ethtool_flags {
|
||||
ETH_FLAG_LRO = (1 << 15), /* LRO is enabled */
|
||||
ETH_FLAG_NTUPLE = (1 << 27), /* N-tuple filters enabled */
|
||||
};
|
||||
|
||||
/* The following structures are for supporting RX network flow
|
||||
@@ -363,6 +365,35 @@ struct ethtool_rxnfc {
|
||||
__u32 rule_locs[0];
|
||||
};
|
||||
|
||||
struct ethtool_rx_ntuple_flow_spec {
|
||||
__u32 flow_type;
|
||||
union {
|
||||
struct ethtool_tcpip4_spec tcp_ip4_spec;
|
||||
struct ethtool_tcpip4_spec udp_ip4_spec;
|
||||
struct ethtool_tcpip4_spec sctp_ip4_spec;
|
||||
struct ethtool_ah_espip4_spec ah_ip4_spec;
|
||||
struct ethtool_ah_espip4_spec esp_ip4_spec;
|
||||
struct ethtool_rawip4_spec raw_ip4_spec;
|
||||
struct ethtool_ether_spec ether_spec;
|
||||
struct ethtool_usrip4_spec usr_ip4_spec;
|
||||
__u8 hdata[64];
|
||||
} h_u, m_u; /* entry, mask */
|
||||
|
||||
__u16 vlan_tag;
|
||||
__u16 vlan_tag_mask;
|
||||
__u64 data; /* user-defined flow spec data */
|
||||
__u64 data_mask; /* user-defined flow spec mask */
|
||||
|
||||
/* signed to distinguish between queue and actions (DROP) */
|
||||
__s32 action;
|
||||
#define ETHTOOL_RXNTUPLE_ACTION_DROP -1
|
||||
};
|
||||
|
||||
struct ethtool_rx_ntuple {
|
||||
__u32 cmd;
|
||||
struct ethtool_rx_ntuple_flow_spec fs;
|
||||
};
|
||||
|
||||
#define ETHTOOL_FLASH_MAX_FILENAME 128
|
||||
enum ethtool_flash_op_type {
|
||||
ETHTOOL_FLASH_ALL_REGIONS = 0,
|
||||
@@ -377,6 +408,20 @@ struct ethtool_flash {
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#include <linux/rculist.h>
|
||||
|
||||
struct ethtool_rx_ntuple_flow_spec_container {
|
||||
struct ethtool_rx_ntuple_flow_spec fs;
|
||||
struct list_head list;
|
||||
};
|
||||
|
||||
struct ethtool_rx_ntuple_list {
|
||||
#define ETHTOOL_MAX_NTUPLE_LIST_ENTRY 1024
|
||||
#define ETHTOOL_MAX_NTUPLE_STRING_PER_ENTRY 14
|
||||
struct list_head list;
|
||||
unsigned int count;
|
||||
};
|
||||
|
||||
struct net_device;
|
||||
|
||||
/* Some generic methods drivers may use in their ethtool_ops */
|
||||
@@ -394,6 +439,7 @@ u32 ethtool_op_get_ufo(struct net_device *dev);
|
||||
int ethtool_op_set_ufo(struct net_device *dev, u32 data);
|
||||
u32 ethtool_op_get_flags(struct net_device *dev);
|
||||
int ethtool_op_set_flags(struct net_device *dev, u32 data);
|
||||
void ethtool_ntuple_flush(struct net_device *dev);
|
||||
|
||||
/**
|
||||
* ðtool_ops - Alter and report network device settings
|
||||
@@ -500,6 +546,8 @@ struct ethtool_ops {
|
||||
int (*set_rxnfc)(struct net_device *, struct ethtool_rxnfc *);
|
||||
int (*flash_device)(struct net_device *, struct ethtool_flash *);
|
||||
int (*reset)(struct net_device *, u32 *);
|
||||
int (*set_rx_ntuple)(struct net_device *, struct ethtool_rx_ntuple *);
|
||||
int (*get_rx_ntuple)(struct net_device *, u32 stringset, void *);
|
||||
};
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
@@ -559,6 +607,9 @@ struct ethtool_ops {
|
||||
#define ETHTOOL_FLASHDEV 0x00000033 /* Flash firmware to device */
|
||||
#define ETHTOOL_RESET 0x00000034 /* Reset hardware */
|
||||
|
||||
#define ETHTOOL_SRXNTUPLE 0x00000035 /* Add an n-tuple filter to device */
|
||||
#define ETHTOOL_GRXNTUPLE 0x00000036 /* Get n-tuple filters from device */
|
||||
|
||||
/* compatibility with older code */
|
||||
#define SPARC_ETH_GSET ETHTOOL_GSET
|
||||
#define SPARC_ETH_SSET ETHTOOL_SSET
|
||||
|
||||
@@ -877,7 +877,7 @@ int ext3_get_blocks_handle(handle_t *handle, struct inode *inode,
|
||||
int create);
|
||||
|
||||
extern struct inode *ext3_iget(struct super_block *, unsigned long);
|
||||
extern int ext3_write_inode (struct inode *, int);
|
||||
extern int ext3_write_inode (struct inode *, struct writeback_control *);
|
||||
extern int ext3_setattr (struct dentry *, struct iattr *);
|
||||
extern void ext3_delete_inode (struct inode *);
|
||||
extern int ext3_sync_inode (handle_t *, struct inode *);
|
||||
|
||||
@@ -543,6 +543,8 @@ struct fb_cursor_user {
|
||||
#define FB_EVENT_GET_REQ 0x0D
|
||||
/* Unbind from the console if possible */
|
||||
#define FB_EVENT_FB_UNBIND 0x0E
|
||||
/* CONSOLE-SPECIFIC: remap all consoles to new fb - for vga switcheroo */
|
||||
#define FB_EVENT_REMAP_ALL_CONSOLE 0x0F
|
||||
|
||||
struct fb_event {
|
||||
struct fb_info *info;
|
||||
|
||||
@@ -57,7 +57,14 @@ struct files_struct {
|
||||
struct file * fd_array[NR_OPEN_DEFAULT];
|
||||
};
|
||||
|
||||
#define files_fdtable(files) (rcu_dereference((files)->fdt))
|
||||
#define rcu_dereference_check_fdtable(files, fdtfd) \
|
||||
(rcu_dereference_check((fdtfd), \
|
||||
rcu_read_lock_held() || \
|
||||
lockdep_is_held(&(files)->file_lock) || \
|
||||
atomic_read(&(files)->count) == 1))
|
||||
|
||||
#define files_fdtable(files) \
|
||||
(rcu_dereference_check_fdtable((files), (files)->fdt))
|
||||
|
||||
struct file_operations;
|
||||
struct vfsmount;
|
||||
@@ -78,7 +85,7 @@ static inline struct file * fcheck_files(struct files_struct *files, unsigned in
|
||||
struct fdtable *fdt = files_fdtable(files);
|
||||
|
||||
if (fd < fdt->max_fds)
|
||||
file = rcu_dereference(fdt->fd[fd]);
|
||||
file = rcu_dereference_check_fdtable(files, fdt->fd[fd]);
|
||||
return file;
|
||||
}
|
||||
|
||||
|
||||
@@ -248,13 +248,20 @@ union fw_cdev_event {
|
||||
#define FW_CDEV_IOC_SEND_BROADCAST_REQUEST _IOW('#', 0x12, struct fw_cdev_send_request)
|
||||
#define FW_CDEV_IOC_SEND_STREAM_PACKET _IOW('#', 0x13, struct fw_cdev_send_stream_packet)
|
||||
|
||||
/* available since kernel version 2.6.34 */
|
||||
#define FW_CDEV_IOC_GET_CYCLE_TIMER2 _IOWR('#', 0x14, struct fw_cdev_get_cycle_timer2)
|
||||
|
||||
/*
|
||||
* FW_CDEV_VERSION History
|
||||
* 1 (2.6.22) - initial version
|
||||
* 2 (2.6.30) - changed &fw_cdev_event_iso_interrupt.header if
|
||||
* &fw_cdev_create_iso_context.header_size is 8 or more
|
||||
* (2.6.32) - added time stamp to xmit &fw_cdev_event_iso_interrupt
|
||||
* (2.6.33) - IR has always packet-per-buffer semantics now, not one of
|
||||
* dual-buffer or packet-per-buffer depending on hardware
|
||||
* 3 (2.6.34) - made &fw_cdev_get_cycle_timer reliable
|
||||
*/
|
||||
#define FW_CDEV_VERSION 2
|
||||
#define FW_CDEV_VERSION 3
|
||||
|
||||
/**
|
||||
* struct fw_cdev_get_info - General purpose information ioctl
|
||||
@@ -544,20 +551,43 @@ struct fw_cdev_stop_iso {
|
||||
/**
|
||||
* struct fw_cdev_get_cycle_timer - read cycle timer register
|
||||
* @local_time: system time, in microseconds since the Epoch
|
||||
* @cycle_timer: isochronous cycle timer, as per OHCI 1.1 clause 5.13
|
||||
* @cycle_timer: Cycle Time register contents
|
||||
*
|
||||
* The %FW_CDEV_IOC_GET_CYCLE_TIMER ioctl reads the isochronous cycle timer
|
||||
* and also the system clock. This allows to express the receive time of an
|
||||
* isochronous packet as a system time with microsecond accuracy.
|
||||
* and also the system clock (%CLOCK_REALTIME). This allows to express the
|
||||
* receive time of an isochronous packet as a system time.
|
||||
*
|
||||
* @cycle_timer consists of 7 bits cycleSeconds, 13 bits cycleCount, and
|
||||
* 12 bits cycleOffset, in host byte order.
|
||||
* 12 bits cycleOffset, in host byte order. Cf. the Cycle Time register
|
||||
* per IEEE 1394 or Isochronous Cycle Timer register per OHCI-1394.
|
||||
*
|
||||
* In version 1 and 2 of the ABI, this ioctl returned unreliable (non-
|
||||
* monotonic) @cycle_timer values on certain controllers.
|
||||
*/
|
||||
struct fw_cdev_get_cycle_timer {
|
||||
__u64 local_time;
|
||||
__u32 cycle_timer;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct fw_cdev_get_cycle_timer2 - read cycle timer register
|
||||
* @tv_sec: system time, seconds
|
||||
* @tv_nsec: system time, sub-seconds part in nanoseconds
|
||||
* @clk_id: input parameter, clock from which to get the system time
|
||||
* @cycle_timer: Cycle Time register contents
|
||||
*
|
||||
* The %FW_CDEV_IOC_GET_CYCLE_TIMER2 works like
|
||||
* %FW_CDEV_IOC_GET_CYCLE_TIMER but lets you choose a clock like with POSIX'
|
||||
* clock_gettime function. Supported @clk_id values are POSIX' %CLOCK_REALTIME
|
||||
* and %CLOCK_MONOTONIC and Linux' %CLOCK_MONOTONIC_RAW.
|
||||
*/
|
||||
struct fw_cdev_get_cycle_timer2 {
|
||||
__s64 tv_sec;
|
||||
__s32 tv_nsec;
|
||||
__s32 clk_id;
|
||||
__u32 cycle_timer;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct fw_cdev_allocate_iso_resource - (De)allocate a channel or bandwidth
|
||||
* @closure: Passed back to userspace in correponding iso resource events
|
||||
|
||||
@@ -65,12 +65,13 @@
|
||||
#define CSR_DIRECTORY_ID 0x20
|
||||
|
||||
struct fw_csr_iterator {
|
||||
u32 *p;
|
||||
u32 *end;
|
||||
const u32 *p;
|
||||
const u32 *end;
|
||||
};
|
||||
|
||||
void fw_csr_iterator_init(struct fw_csr_iterator *ci, u32 *p);
|
||||
void fw_csr_iterator_init(struct fw_csr_iterator *ci, const u32 *p);
|
||||
int fw_csr_iterator_next(struct fw_csr_iterator *ci, int *key, int *value);
|
||||
int fw_csr_string(const u32 *directory, int key, char *buf, size_t size);
|
||||
|
||||
extern struct bus_type fw_bus_type;
|
||||
|
||||
@@ -162,7 +163,7 @@ struct fw_device {
|
||||
struct mutex client_list_mutex;
|
||||
struct list_head client_list;
|
||||
|
||||
u32 *config_rom;
|
||||
const u32 *config_rom;
|
||||
size_t config_rom_length;
|
||||
int config_rom_retries;
|
||||
unsigned is_local:1;
|
||||
@@ -204,7 +205,7 @@ int fw_device_enable_phys_dma(struct fw_device *device);
|
||||
*/
|
||||
struct fw_unit {
|
||||
struct device device;
|
||||
u32 *directory;
|
||||
const u32 *directory;
|
||||
struct fw_attribute_group attribute_group;
|
||||
};
|
||||
|
||||
|
||||
+13
-17
@@ -729,6 +729,7 @@ struct inode {
|
||||
uid_t i_uid;
|
||||
gid_t i_gid;
|
||||
dev_t i_rdev;
|
||||
unsigned int i_blkbits;
|
||||
u64 i_version;
|
||||
loff_t i_size;
|
||||
#ifdef __NEED_I_SIZE_ORDERED
|
||||
@@ -738,7 +739,6 @@ struct inode {
|
||||
struct timespec i_mtime;
|
||||
struct timespec i_ctime;
|
||||
blkcnt_t i_blocks;
|
||||
unsigned int i_blkbits;
|
||||
unsigned short i_bytes;
|
||||
umode_t i_mode;
|
||||
spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */
|
||||
@@ -1305,6 +1305,8 @@ extern int send_sigurg(struct fown_struct *fown);
|
||||
#define MNT_FORCE 0x00000001 /* Attempt to forcibily umount */
|
||||
#define MNT_DETACH 0x00000002 /* Just detach from the tree */
|
||||
#define MNT_EXPIRE 0x00000004 /* Mark for expiry */
|
||||
#define UMOUNT_NOFOLLOW 0x00000008 /* Don't follow symlink on umount */
|
||||
#define UMOUNT_UNUSED 0x80000000 /* Flag guaranteed to be unused */
|
||||
|
||||
extern struct list_head super_blocks;
|
||||
extern spinlock_t sb_lock;
|
||||
@@ -1314,9 +1316,9 @@ extern spinlock_t sb_lock;
|
||||
struct super_block {
|
||||
struct list_head s_list; /* Keep this first */
|
||||
dev_t s_dev; /* search index; _not_ kdev_t */
|
||||
unsigned long s_blocksize;
|
||||
unsigned char s_blocksize_bits;
|
||||
unsigned char s_dirt;
|
||||
unsigned char s_blocksize_bits;
|
||||
unsigned long s_blocksize;
|
||||
loff_t s_maxbytes; /* Max file size */
|
||||
struct file_system_type *s_type;
|
||||
const struct super_operations *s_op;
|
||||
@@ -1357,16 +1359,16 @@ struct super_block {
|
||||
void *s_fs_info; /* Filesystem private info */
|
||||
fmode_t s_mode;
|
||||
|
||||
/* Granularity of c/m/atime in ns.
|
||||
Cannot be worse than a second */
|
||||
u32 s_time_gran;
|
||||
|
||||
/*
|
||||
* The next field is for VFS *only*. No filesystems have any business
|
||||
* even looking at it. You had been warned.
|
||||
*/
|
||||
struct mutex s_vfs_rename_mutex; /* Kludge */
|
||||
|
||||
/* Granularity of c/m/atime in ns.
|
||||
Cannot be worse than a second */
|
||||
u32 s_time_gran;
|
||||
|
||||
/*
|
||||
* Filesystem subtype. If non-empty the filesystem type field
|
||||
* in /proc/mounts will be "type.subtype"
|
||||
@@ -1555,7 +1557,7 @@ struct super_operations {
|
||||
void (*destroy_inode)(struct inode *);
|
||||
|
||||
void (*dirty_inode) (struct inode *);
|
||||
int (*write_inode) (struct inode *, int);
|
||||
int (*write_inode) (struct inode *, struct writeback_control *wbc);
|
||||
void (*drop_inode) (struct inode *);
|
||||
void (*delete_inode) (struct inode *);
|
||||
void (*put_super) (struct super_block *);
|
||||
@@ -1794,7 +1796,8 @@ extern int may_umount(struct vfsmount *);
|
||||
extern long do_mount(char *, char *, char *, unsigned long, void *);
|
||||
extern struct vfsmount *collect_mounts(struct path *);
|
||||
extern void drop_collected_mounts(struct vfsmount *);
|
||||
|
||||
extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *,
|
||||
struct vfsmount *);
|
||||
extern int vfs_statfs(struct dentry *, struct kstatfs *);
|
||||
|
||||
extern int current_umask(void);
|
||||
@@ -2058,12 +2061,6 @@ extern int invalidate_inodes(struct super_block *);
|
||||
unsigned long invalidate_mapping_pages(struct address_space *mapping,
|
||||
pgoff_t start, pgoff_t end);
|
||||
|
||||
static inline unsigned long __deprecated
|
||||
invalidate_inode_pages(struct address_space *mapping)
|
||||
{
|
||||
return invalidate_mapping_pages(mapping, 0, ~0UL);
|
||||
}
|
||||
|
||||
static inline void invalidate_remote_inode(struct inode *inode)
|
||||
{
|
||||
if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) ||
|
||||
@@ -2132,6 +2129,7 @@ extern struct file * open_exec(const char *);
|
||||
|
||||
/* fs/dcache.c -- generic fs support functions */
|
||||
extern int is_subdir(struct dentry *, struct dentry *);
|
||||
extern int path_is_under(struct path *, struct path *);
|
||||
extern ino_t find_inode_number(struct dentry *, struct qstr *);
|
||||
|
||||
#include <linux/err.h>
|
||||
@@ -2340,8 +2338,6 @@ extern int simple_rename(struct inode *, struct dentry *, struct inode *, struct
|
||||
extern int simple_sync_file(struct file *, struct dentry *, int);
|
||||
extern int simple_empty(struct dentry *);
|
||||
extern int simple_readpage(struct file *file, struct page *page);
|
||||
extern int simple_prepare_write(struct file *file, struct page *page,
|
||||
unsigned offset, unsigned to);
|
||||
extern int simple_write_begin(struct file *file, struct address_space *mapping,
|
||||
loff_t pos, unsigned len, unsigned flags,
|
||||
struct page **pagep, void **fsdata);
|
||||
|
||||
@@ -65,7 +65,7 @@ static inline void fsnotify_link_count(struct inode *inode)
|
||||
* fsnotify_move - file old_name at old_dir was moved to new_name at new_dir
|
||||
*/
|
||||
static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir,
|
||||
const char *old_name, const char *new_name,
|
||||
const char *old_name,
|
||||
int isdir, struct inode *target, struct dentry *moved)
|
||||
{
|
||||
struct inode *source = moved->d_inode;
|
||||
@@ -73,6 +73,7 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir,
|
||||
u32 fs_cookie = fsnotify_get_cookie();
|
||||
__u32 old_dir_mask = (FS_EVENT_ON_CHILD | FS_MOVED_FROM);
|
||||
__u32 new_dir_mask = (FS_EVENT_ON_CHILD | FS_MOVED_TO);
|
||||
const char *new_name = moved->d_name.name;
|
||||
|
||||
if (old_dir == new_dir)
|
||||
old_dir_mask |= FS_DN_RENAME;
|
||||
@@ -103,7 +104,7 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir,
|
||||
inotify_inode_queue_event(source, IN_MOVE_SELF, 0, NULL, NULL);
|
||||
fsnotify(source, FS_MOVE_SELF, moved->d_inode, FSNOTIFY_EVENT_INODE, NULL, 0);
|
||||
}
|
||||
audit_inode_child(new_name, moved, new_dir);
|
||||
audit_inode_child(moved, new_dir);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -146,7 +147,7 @@ static inline void fsnotify_create(struct inode *inode, struct dentry *dentry)
|
||||
{
|
||||
inotify_inode_queue_event(inode, IN_CREATE, 0, dentry->d_name.name,
|
||||
dentry->d_inode);
|
||||
audit_inode_child(dentry->d_name.name, dentry, inode);
|
||||
audit_inode_child(dentry, inode);
|
||||
|
||||
fsnotify(inode, FS_CREATE, dentry->d_inode, FSNOTIFY_EVENT_INODE, dentry->d_name.name, 0);
|
||||
}
|
||||
@@ -161,7 +162,7 @@ static inline void fsnotify_link(struct inode *dir, struct inode *inode, struct
|
||||
inotify_inode_queue_event(dir, IN_CREATE, 0, new_dentry->d_name.name,
|
||||
inode);
|
||||
fsnotify_link_count(inode);
|
||||
audit_inode_child(new_dentry->d_name.name, new_dentry, dir);
|
||||
audit_inode_child(new_dentry, dir);
|
||||
|
||||
fsnotify(dir, FS_CREATE, inode, FSNOTIFY_EVENT_INODE, new_dentry->d_name.name, 0);
|
||||
}
|
||||
@@ -175,7 +176,7 @@ static inline void fsnotify_mkdir(struct inode *inode, struct dentry *dentry)
|
||||
struct inode *d_inode = dentry->d_inode;
|
||||
|
||||
inotify_inode_queue_event(inode, mask, 0, dentry->d_name.name, d_inode);
|
||||
audit_inode_child(dentry->d_name.name, dentry, inode);
|
||||
audit_inode_child(dentry, inode);
|
||||
|
||||
fsnotify(inode, mask, d_inode, FSNOTIFY_EVENT_INODE, dentry->d_name.name, 0);
|
||||
}
|
||||
|
||||
+12
-1
@@ -134,6 +134,8 @@ extern void
|
||||
unregister_ftrace_function_probe_func(char *glob, struct ftrace_probe_ops *ops);
|
||||
extern void unregister_ftrace_function_probe_all(char *glob);
|
||||
|
||||
extern int ftrace_text_reserved(void *start, void *end);
|
||||
|
||||
enum {
|
||||
FTRACE_FL_FREE = (1 << 0),
|
||||
FTRACE_FL_FAILED = (1 << 1),
|
||||
@@ -141,7 +143,6 @@ enum {
|
||||
FTRACE_FL_ENABLED = (1 << 3),
|
||||
FTRACE_FL_NOTRACE = (1 << 4),
|
||||
FTRACE_FL_CONVERTED = (1 << 5),
|
||||
FTRACE_FL_FROZEN = (1 << 6),
|
||||
};
|
||||
|
||||
struct dyn_ftrace {
|
||||
@@ -250,6 +251,10 @@ static inline int unregister_ftrace_command(char *cmd_name)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
static inline int ftrace_text_reserved(void *start, void *end)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_DYNAMIC_FTRACE */
|
||||
|
||||
/* totally disable ftrace - can not re-enable after this */
|
||||
@@ -511,4 +516,10 @@ static inline void trace_hw_branch_oops(void) {}
|
||||
|
||||
#endif /* CONFIG_HW_BRANCH_TRACER */
|
||||
|
||||
#ifdef CONFIG_FTRACE_SYSCALLS
|
||||
|
||||
unsigned long arch_syscall_addr(int nr);
|
||||
|
||||
#endif /* CONFIG_FTRACE_SYSCALLS */
|
||||
|
||||
#endif /* _LINUX_FTRACE_H */
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <linux/trace_seq.h>
|
||||
#include <linux/percpu.h>
|
||||
#include <linux/hardirq.h>
|
||||
#include <linux/perf_event.h>
|
||||
|
||||
struct trace_array;
|
||||
struct tracer;
|
||||
@@ -121,9 +122,8 @@ struct ftrace_event_call {
|
||||
int (*regfunc)(struct ftrace_event_call *);
|
||||
void (*unregfunc)(struct ftrace_event_call *);
|
||||
int id;
|
||||
const char *print_fmt;
|
||||
int (*raw_init)(struct ftrace_event_call *);
|
||||
int (*show_format)(struct ftrace_event_call *,
|
||||
struct trace_seq *);
|
||||
int (*define_fields)(struct ftrace_event_call *);
|
||||
struct list_head fields;
|
||||
int filter_active;
|
||||
@@ -138,9 +138,6 @@ struct ftrace_event_call {
|
||||
|
||||
#define FTRACE_MAX_PROFILE_SIZE 2048
|
||||
|
||||
extern char *perf_trace_buf;
|
||||
extern char *perf_trace_buf_nmi;
|
||||
|
||||
#define MAX_FILTER_PRED 32
|
||||
#define MAX_FILTER_STR_VAL 256 /* Should handle KSYM_SYMBOL_LEN */
|
||||
|
||||
@@ -188,13 +185,27 @@ do { \
|
||||
__trace_printk(ip, fmt, ##args); \
|
||||
} while (0)
|
||||
|
||||
#ifdef CONFIG_EVENT_PROFILE
|
||||
#ifdef CONFIG_PERF_EVENTS
|
||||
struct perf_event;
|
||||
extern int ftrace_profile_enable(int event_id);
|
||||
extern void ftrace_profile_disable(int event_id);
|
||||
extern int ftrace_profile_set_filter(struct perf_event *event, int event_id,
|
||||
char *filter_str);
|
||||
extern void ftrace_profile_free_filter(struct perf_event *event);
|
||||
extern void *
|
||||
ftrace_perf_buf_prepare(int size, unsigned short type, int *rctxp,
|
||||
unsigned long *irq_flags);
|
||||
|
||||
static inline void
|
||||
ftrace_perf_buf_submit(void *raw_data, int size, int rctx, u64 addr,
|
||||
u64 count, unsigned long irq_flags)
|
||||
{
|
||||
struct trace_entry *entry = raw_data;
|
||||
|
||||
perf_tp_event(entry->type, addr, count, raw_data, size);
|
||||
perf_swevent_put_recursion_context(rctx);
|
||||
local_irq_restore(irq_flags);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _LINUX_FTRACE_EVENT_H */
|
||||
|
||||
@@ -46,7 +46,6 @@ struct gameport {
|
||||
struct mutex drv_mutex; /* protects serio->drv so attributes can pin driver */
|
||||
|
||||
struct device dev;
|
||||
unsigned int registered; /* port has been fully registered with driver core */
|
||||
|
||||
struct list_head node;
|
||||
};
|
||||
|
||||
@@ -101,7 +101,7 @@ struct hd_struct {
|
||||
unsigned long stamp;
|
||||
int in_flight[2];
|
||||
#ifdef CONFIG_SMP
|
||||
struct disk_stats *dkstats;
|
||||
struct disk_stats __percpu *dkstats;
|
||||
#else
|
||||
struct disk_stats dkstats;
|
||||
#endif
|
||||
|
||||
@@ -179,33 +179,6 @@ struct gfs2_rgrp {
|
||||
__u8 rg_reserved[80]; /* Several fields from gfs1 now reserved */
|
||||
};
|
||||
|
||||
/*
|
||||
* quota linked list: user quotas and group quotas form two separate
|
||||
* singly linked lists. ll_next stores uids or gids of next quotas in the
|
||||
* linked list.
|
||||
|
||||
Given the uid/gid, how to calculate the quota file offsets for the corresponding
|
||||
gfs2_quota structures on disk:
|
||||
|
||||
for user quotas, given uid,
|
||||
offset = uid * sizeof(struct gfs2_quota);
|
||||
|
||||
for group quotas, given gid,
|
||||
offset = (gid * sizeof(struct gfs2_quota)) + sizeof(struct gfs2_quota);
|
||||
|
||||
|
||||
uid:0 gid:0 uid:12 gid:12 uid:17 gid:17 uid:5142 gid:5142
|
||||
+-------+-------+ +-------+-------+ +-------+- - - -+ +- - - -+-------+
|
||||
| valid | valid | :: | valid | valid | :: | valid | inval | :: | inval | valid |
|
||||
+-------+-------+ +-------+-------+ +-------+- - - -+ +- - - -+-------+
|
||||
next:12 next:12 next:17 next:5142 next:NULL next:NULL
|
||||
| | | | |<-- user quota list |
|
||||
\______|___________/ \______|___________/ group quota list -->|
|
||||
| | |
|
||||
\__________________/ \_______________________________________/
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
* quota structure
|
||||
*/
|
||||
@@ -214,8 +187,7 @@ struct gfs2_quota {
|
||||
__be64 qu_limit;
|
||||
__be64 qu_warn;
|
||||
__be64 qu_value;
|
||||
__be32 qu_ll_next; /* location of next quota in list */
|
||||
__u8 qu_reserved[60];
|
||||
__u8 qu_reserved[64];
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -10,6 +10,7 @@ struct gpio_keys_button {
|
||||
int type; /* input event type (EV_KEY, EV_SW) */
|
||||
int wakeup; /* configure the button as a wake-up source */
|
||||
int debounce_interval; /* debounce ticks interval in msecs */
|
||||
bool can_disable;
|
||||
};
|
||||
|
||||
struct gpio_keys_platform_data {
|
||||
|
||||
+3
-2
@@ -501,7 +501,7 @@ struct hid_device { /* device report descriptor */
|
||||
void (*hiddev_report_event) (struct hid_device *, struct hid_report *);
|
||||
|
||||
/* handler for raw output data, used by hidraw */
|
||||
int (*hid_output_raw_report) (struct hid_device *, __u8 *, size_t);
|
||||
int (*hid_output_raw_report) (struct hid_device *, __u8 *, size_t, unsigned char);
|
||||
|
||||
/* debugging support via debugfs */
|
||||
unsigned short debug;
|
||||
@@ -663,7 +663,7 @@ struct hid_ll_driver {
|
||||
|
||||
/* Applications from HID Usage Tables 4/8/99 Version 1.1 */
|
||||
/* We ignore a few input applications that are not widely used */
|
||||
#define IS_INPUT_APPLICATION(a) (((a >= 0x00010000) && (a <= 0x00010008)) || (a == 0x00010080) || (a == 0x000c0001) || (a == 0x000d0002))
|
||||
#define IS_INPUT_APPLICATION(a) (((a >= 0x00010000) && (a <= 0x00010008)) || (a == 0x00010080) || (a == 0x000c0001) || ((a >= 0x000d0002) && (a <= 0x000d0006)))
|
||||
|
||||
/* HID core API */
|
||||
|
||||
@@ -690,6 +690,7 @@ int hid_input_report(struct hid_device *, int type, u8 *, int, int);
|
||||
int hidinput_find_field(struct hid_device *hid, unsigned int type, unsigned int code, struct hid_field **field);
|
||||
void hid_output_report(struct hid_report *report, __u8 *data);
|
||||
struct hid_device *hid_allocate_device(void);
|
||||
struct hid_report *hid_register_report(struct hid_device *device, unsigned type, unsigned id);
|
||||
int hid_parse_report(struct hid_device *hid, __u8 *start, unsigned size);
|
||||
int hid_check_keys_pressed(struct hid_device *hid);
|
||||
int hid_connect(struct hid_device *hid, unsigned int connect_mask);
|
||||
|
||||
@@ -17,6 +17,12 @@ static inline void flush_anon_page(struct vm_area_struct *vma, struct page *page
|
||||
static inline void flush_kernel_dcache_page(struct page *page)
|
||||
{
|
||||
}
|
||||
static inline void flush_kernel_vmap_range(void *vaddr, int size)
|
||||
{
|
||||
}
|
||||
static inline void invalidate_kernel_vmap_range(void *vaddr, int size)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#include <asm/kmap_types.h>
|
||||
|
||||
@@ -44,7 +44,7 @@ static inline int hw_breakpoint_type(struct perf_event *bp)
|
||||
return bp->attr.bp_type;
|
||||
}
|
||||
|
||||
static inline int hw_breakpoint_len(struct perf_event *bp)
|
||||
static inline unsigned long hw_breakpoint_len(struct perf_event *bp)
|
||||
{
|
||||
return bp->attr.bp_len;
|
||||
}
|
||||
|
||||
+8
-11
@@ -12,9 +12,8 @@
|
||||
#ifndef __I2C_PNX_H__
|
||||
#define __I2C_PNX_H__
|
||||
|
||||
#include <linux/pm.h>
|
||||
|
||||
struct platform_device;
|
||||
struct clk;
|
||||
|
||||
struct i2c_pnx_mif {
|
||||
int ret; /* Return value */
|
||||
@@ -26,20 +25,18 @@ struct i2c_pnx_mif {
|
||||
};
|
||||
|
||||
struct i2c_pnx_algo_data {
|
||||
u32 base;
|
||||
u32 ioaddr;
|
||||
int irq;
|
||||
void __iomem *ioaddr;
|
||||
struct i2c_pnx_mif mif;
|
||||
int last;
|
||||
struct clk *clk;
|
||||
struct i2c_pnx_data *i2c_pnx;
|
||||
struct i2c_adapter adapter;
|
||||
};
|
||||
|
||||
struct i2c_pnx_data {
|
||||
int (*suspend) (struct platform_device *pdev, pm_message_t state);
|
||||
int (*resume) (struct platform_device *pdev);
|
||||
u32 (*calculate_input_freq) (struct platform_device *pdev);
|
||||
int (*set_clock_run) (struct platform_device *pdev);
|
||||
int (*set_clock_stop) (struct platform_device *pdev);
|
||||
struct i2c_adapter *adapter;
|
||||
const char *name;
|
||||
u32 base;
|
||||
int irq;
|
||||
};
|
||||
|
||||
#endif /* __I2C_PNX_H__ */
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* i2c-smbus.h - SMBus extensions to the I2C protocol
|
||||
*
|
||||
* Copyright (C) 2010 Jean Delvare <khali@linux-fr.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_I2C_SMBUS_H
|
||||
#define _LINUX_I2C_SMBUS_H
|
||||
|
||||
#include <linux/i2c.h>
|
||||
|
||||
|
||||
/**
|
||||
* i2c_smbus_alert_setup - platform data for the smbus_alert i2c client
|
||||
* @alert_edge_triggered: whether the alert interrupt is edge (1) or level (0)
|
||||
* triggered
|
||||
* @irq: IRQ number, if the smbus_alert driver should take care of interrupt
|
||||
* handling
|
||||
*
|
||||
* If irq is not specified, the smbus_alert driver doesn't take care of
|
||||
* interrupt handling. In that case it is up to the I2C bus driver to either
|
||||
* handle the interrupts or to poll for alerts.
|
||||
*
|
||||
* If irq is specified then it it crucial that alert_edge_triggered is
|
||||
* properly set.
|
||||
*/
|
||||
struct i2c_smbus_alert_setup {
|
||||
unsigned int alert_edge_triggered:1;
|
||||
int irq;
|
||||
};
|
||||
|
||||
struct i2c_client *i2c_setup_smbus_alert(struct i2c_adapter *adapter,
|
||||
struct i2c_smbus_alert_setup *setup);
|
||||
int i2c_handle_smbus_alert(struct i2c_client *ara);
|
||||
|
||||
#endif /* _LINUX_I2C_SMBUS_H */
|
||||
@@ -53,6 +53,7 @@ struct i2c_board_info;
|
||||
* on a bus (or read from them). Apart from two basic transfer functions to
|
||||
* transmit one message at a time, a more complex version can be used to
|
||||
* transmit an arbitrary number of messages without interruption.
|
||||
* @count must be be less than 64k since msg.len is u16.
|
||||
*/
|
||||
extern int i2c_master_send(struct i2c_client *client, const char *buf,
|
||||
int count);
|
||||
@@ -152,6 +153,13 @@ struct i2c_driver {
|
||||
int (*suspend)(struct i2c_client *, pm_message_t mesg);
|
||||
int (*resume)(struct i2c_client *);
|
||||
|
||||
/* Alert callback, for example for the SMBus alert protocol.
|
||||
* The format and meaning of the data value depends on the protocol.
|
||||
* For the SMBus alert protocol, there is a single bit of data passed
|
||||
* as the alert response's low bit ("event flag").
|
||||
*/
|
||||
void (*alert)(struct i2c_client *, unsigned int data);
|
||||
|
||||
/* a ioctl like command that can be used to perform specific functions
|
||||
* with the device.
|
||||
*/
|
||||
|
||||
@@ -547,6 +547,10 @@ struct twl4030_codec_data {
|
||||
unsigned int audio_mclk;
|
||||
struct twl4030_codec_audio_data *audio;
|
||||
struct twl4030_codec_vibra_data *vibra;
|
||||
|
||||
/* twl6030 */
|
||||
int audpwron_gpio; /* audio power-on gpio */
|
||||
int naudint_irq; /* audio interrupt */
|
||||
};
|
||||
|
||||
struct twl4030_platform_data {
|
||||
|
||||
+1
-1
@@ -385,7 +385,7 @@
|
||||
/* defines for max_sectors and max_phys_segments */
|
||||
#define I2O_MAX_SECTORS 1024
|
||||
#define I2O_MAX_SECTORS_LIMITED 128
|
||||
#define I2O_MAX_PHYS_SEGMENTS MAX_PHYS_SEGMENTS
|
||||
#define I2O_MAX_PHYS_SEGMENTS BLK_MAX_SEGMENTS
|
||||
|
||||
/*
|
||||
* Message structures
|
||||
|
||||
@@ -174,8 +174,7 @@ struct icmp6_filter {
|
||||
|
||||
extern void icmpv6_send(struct sk_buff *skb,
|
||||
u8 type, u8 code,
|
||||
__u32 info,
|
||||
struct net_device *dev);
|
||||
__u32 info);
|
||||
|
||||
extern int icmpv6_init(void);
|
||||
extern int icmpv6_err_convert(u8 type, u8 code,
|
||||
|
||||
+4
-3
@@ -515,6 +515,8 @@ struct ide_drive_s {
|
||||
u8 init_speed; /* transfer rate set at boot */
|
||||
u8 current_speed; /* current transfer rate set */
|
||||
u8 desired_speed; /* desired transfer rate set */
|
||||
u8 pio_mode; /* for ->set_pio_mode _only_ */
|
||||
u8 dma_mode; /* for ->dma_pio_mode _only_ */
|
||||
u8 dn; /* now wide spread use */
|
||||
u8 acoustic; /* acoustic management */
|
||||
u8 media; /* disk, cdrom, tape, floppy, ... */
|
||||
@@ -622,8 +624,8 @@ extern const struct ide_tp_ops default_tp_ops;
|
||||
*/
|
||||
struct ide_port_ops {
|
||||
void (*init_dev)(ide_drive_t *);
|
||||
void (*set_pio_mode)(ide_drive_t *, const u8);
|
||||
void (*set_dma_mode)(ide_drive_t *, const u8);
|
||||
void (*set_pio_mode)(struct hwif_s *, ide_drive_t *);
|
||||
void (*set_dma_mode)(struct hwif_s *, ide_drive_t *);
|
||||
int (*reset_poll)(ide_drive_t *);
|
||||
void (*pre_reset)(ide_drive_t *);
|
||||
void (*resetproc)(ide_drive_t *);
|
||||
@@ -1494,7 +1496,6 @@ int ide_timing_compute(ide_drive_t *, u8, struct ide_timing *, int, int);
|
||||
#ifdef CONFIG_IDE_XFER_MODE
|
||||
int ide_scan_pio_blacklist(char *);
|
||||
const char *ide_xfer_verbose(u8);
|
||||
u8 ide_get_best_pio_mode(ide_drive_t *, u8, u8);
|
||||
int ide_pio_need_iordy(ide_drive_t *, const u8);
|
||||
int ide_set_pio_mode(ide_drive_t *, u8);
|
||||
int ide_set_dma_mode(ide_drive_t *, u8);
|
||||
|
||||
+97
-11
@@ -120,6 +120,26 @@
|
||||
#define IEEE80211_QOS_CTL_TID_MASK 0x000F
|
||||
#define IEEE80211_QOS_CTL_TAG1D_MASK 0x0007
|
||||
|
||||
/* U-APSD queue for WMM IEs sent by AP */
|
||||
#define IEEE80211_WMM_IE_AP_QOSINFO_UAPSD (1<<7)
|
||||
|
||||
/* U-APSD queues for WMM IEs sent by STA */
|
||||
#define IEEE80211_WMM_IE_STA_QOSINFO_AC_VO (1<<0)
|
||||
#define IEEE80211_WMM_IE_STA_QOSINFO_AC_VI (1<<1)
|
||||
#define IEEE80211_WMM_IE_STA_QOSINFO_AC_BK (1<<2)
|
||||
#define IEEE80211_WMM_IE_STA_QOSINFO_AC_BE (1<<3)
|
||||
#define IEEE80211_WMM_IE_STA_QOSINFO_AC_MASK 0x0f
|
||||
|
||||
/* U-APSD max SP length for WMM IEs sent by STA */
|
||||
#define IEEE80211_WMM_IE_STA_QOSINFO_SP_ALL 0x00
|
||||
#define IEEE80211_WMM_IE_STA_QOSINFO_SP_2 0x01
|
||||
#define IEEE80211_WMM_IE_STA_QOSINFO_SP_4 0x02
|
||||
#define IEEE80211_WMM_IE_STA_QOSINFO_SP_6 0x03
|
||||
#define IEEE80211_WMM_IE_STA_QOSINFO_SP_MASK 0x03
|
||||
#define IEEE80211_WMM_IE_STA_QOSINFO_SP_SHIFT 5
|
||||
|
||||
#define IEEE80211_HT_CTL_LEN 4
|
||||
|
||||
struct ieee80211_hdr {
|
||||
__le16 frame_control;
|
||||
__le16 duration_id;
|
||||
@@ -130,6 +150,25 @@ struct ieee80211_hdr {
|
||||
u8 addr4[6];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct ieee80211_hdr_3addr {
|
||||
__le16 frame_control;
|
||||
__le16 duration_id;
|
||||
u8 addr1[6];
|
||||
u8 addr2[6];
|
||||
u8 addr3[6];
|
||||
__le16 seq_ctrl;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct ieee80211_qos_hdr {
|
||||
__le16 frame_control;
|
||||
__le16 duration_id;
|
||||
u8 addr1[6];
|
||||
u8 addr2[6];
|
||||
u8 addr3[6];
|
||||
__le16 seq_ctrl;
|
||||
__le16 qos_ctrl;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/**
|
||||
* ieee80211_has_tods - check if IEEE80211_FCTL_TODS is set
|
||||
* @fc: frame control bytes in little-endian byteorder
|
||||
@@ -707,6 +746,10 @@ struct ieee80211_mgmt {
|
||||
u8 action;
|
||||
u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN];
|
||||
} __attribute__ ((packed)) sa_query;
|
||||
struct {
|
||||
u8 action;
|
||||
u8 smps_control;
|
||||
} __attribute__ ((packed)) ht_smps;
|
||||
} u;
|
||||
} __attribute__ ((packed)) action;
|
||||
} u;
|
||||
@@ -771,7 +814,10 @@ struct ieee80211_bar {
|
||||
/**
|
||||
* struct ieee80211_mcs_info - MCS information
|
||||
* @rx_mask: RX mask
|
||||
* @rx_highest: highest supported RX rate
|
||||
* @rx_highest: highest supported RX rate. If set represents
|
||||
* the highest supported RX data rate in units of 1 Mbps.
|
||||
* If this field is 0 this value should not be used to
|
||||
* consider the highest RX data rate supported.
|
||||
* @tx_params: TX parameters
|
||||
*/
|
||||
struct ieee80211_mcs_info {
|
||||
@@ -824,6 +870,7 @@ struct ieee80211_ht_cap {
|
||||
#define IEEE80211_HT_CAP_LDPC_CODING 0x0001
|
||||
#define IEEE80211_HT_CAP_SUP_WIDTH_20_40 0x0002
|
||||
#define IEEE80211_HT_CAP_SM_PS 0x000C
|
||||
#define IEEE80211_HT_CAP_SM_PS_SHIFT 2
|
||||
#define IEEE80211_HT_CAP_GRN_FLD 0x0010
|
||||
#define IEEE80211_HT_CAP_SGI_20 0x0020
|
||||
#define IEEE80211_HT_CAP_SGI_40 0x0040
|
||||
@@ -839,6 +886,7 @@ struct ieee80211_ht_cap {
|
||||
/* 802.11n HT capability AMPDU settings (for ampdu_params_info) */
|
||||
#define IEEE80211_HT_AMPDU_PARM_FACTOR 0x03
|
||||
#define IEEE80211_HT_AMPDU_PARM_DENSITY 0x1C
|
||||
#define IEEE80211_HT_AMPDU_PARM_DENSITY_SHIFT 2
|
||||
|
||||
/*
|
||||
* Maximum length of AMPDU that the STA can receive.
|
||||
@@ -922,12 +970,17 @@ struct ieee80211_ht_info {
|
||||
#define IEEE80211_MAX_AMPDU_BUF 0x40
|
||||
|
||||
|
||||
/* Spatial Multiplexing Power Save Modes */
|
||||
/* Spatial Multiplexing Power Save Modes (for capability) */
|
||||
#define WLAN_HT_CAP_SM_PS_STATIC 0
|
||||
#define WLAN_HT_CAP_SM_PS_DYNAMIC 1
|
||||
#define WLAN_HT_CAP_SM_PS_INVALID 2
|
||||
#define WLAN_HT_CAP_SM_PS_DISABLED 3
|
||||
|
||||
/* for SM power control field lower two bits */
|
||||
#define WLAN_HT_SMPS_CONTROL_DISABLED 0
|
||||
#define WLAN_HT_SMPS_CONTROL_STATIC 1
|
||||
#define WLAN_HT_SMPS_CONTROL_DYNAMIC 3
|
||||
|
||||
/* Authentication algorithms */
|
||||
#define WLAN_AUTH_OPEN 0
|
||||
#define WLAN_AUTH_SHARED_KEY 1
|
||||
@@ -1071,12 +1124,12 @@ enum ieee80211_eid {
|
||||
WLAN_EID_TIM = 5,
|
||||
WLAN_EID_IBSS_PARAMS = 6,
|
||||
WLAN_EID_CHALLENGE = 16,
|
||||
/* 802.11d */
|
||||
|
||||
WLAN_EID_COUNTRY = 7,
|
||||
WLAN_EID_HP_PARAMS = 8,
|
||||
WLAN_EID_HP_TABLE = 9,
|
||||
WLAN_EID_REQUEST = 10,
|
||||
/* 802.11e */
|
||||
|
||||
WLAN_EID_QBSS_LOAD = 11,
|
||||
WLAN_EID_EDCA_PARAM_SET = 12,
|
||||
WLAN_EID_TSPEC = 13,
|
||||
@@ -1099,7 +1152,7 @@ enum ieee80211_eid {
|
||||
WLAN_EID_PREP = 69,
|
||||
WLAN_EID_PERR = 70,
|
||||
WLAN_EID_RANN = 49, /* compatible with FreeBSD */
|
||||
/* 802.11h */
|
||||
|
||||
WLAN_EID_PWR_CONSTRAINT = 32,
|
||||
WLAN_EID_PWR_CAPABILITY = 33,
|
||||
WLAN_EID_TPC_REQUEST = 34,
|
||||
@@ -1110,20 +1163,41 @@ enum ieee80211_eid {
|
||||
WLAN_EID_MEASURE_REPORT = 39,
|
||||
WLAN_EID_QUIET = 40,
|
||||
WLAN_EID_IBSS_DFS = 41,
|
||||
/* 802.11g */
|
||||
|
||||
WLAN_EID_ERP_INFO = 42,
|
||||
WLAN_EID_EXT_SUPP_RATES = 50,
|
||||
/* 802.11n */
|
||||
|
||||
WLAN_EID_HT_CAPABILITY = 45,
|
||||
WLAN_EID_HT_INFORMATION = 61,
|
||||
/* 802.11i */
|
||||
|
||||
WLAN_EID_RSN = 48,
|
||||
WLAN_EID_TIMEOUT_INTERVAL = 56,
|
||||
WLAN_EID_MMIE = 76 /* 802.11w */,
|
||||
WLAN_EID_MMIE = 76,
|
||||
WLAN_EID_WPA = 221,
|
||||
WLAN_EID_GENERIC = 221,
|
||||
WLAN_EID_VENDOR_SPECIFIC = 221,
|
||||
WLAN_EID_QOS_PARAMETER = 222
|
||||
WLAN_EID_QOS_PARAMETER = 222,
|
||||
|
||||
WLAN_EID_AP_CHAN_REPORT = 51,
|
||||
WLAN_EID_NEIGHBOR_REPORT = 52,
|
||||
WLAN_EID_RCPI = 53,
|
||||
WLAN_EID_BSS_AVG_ACCESS_DELAY = 63,
|
||||
WLAN_EID_ANTENNA_INFO = 64,
|
||||
WLAN_EID_RSNI = 65,
|
||||
WLAN_EID_MEASUREMENT_PILOT_TX_INFO = 66,
|
||||
WLAN_EID_BSS_AVAILABLE_CAPACITY = 67,
|
||||
WLAN_EID_BSS_AC_ACCESS_DELAY = 68,
|
||||
WLAN_EID_RRM_ENABLED_CAPABILITIES = 70,
|
||||
WLAN_EID_MULTIPLE_BSSID = 71,
|
||||
|
||||
WLAN_EID_MOBILITY_DOMAIN = 54,
|
||||
WLAN_EID_FAST_BSS_TRANSITION = 55,
|
||||
WLAN_EID_TIMEOUT_INTERVAL = 56,
|
||||
WLAN_EID_RIC_DATA = 57,
|
||||
WLAN_EID_RIC_DESCRIPTOR = 75,
|
||||
|
||||
WLAN_EID_DSE_REGISTERED_LOCATION = 58,
|
||||
WLAN_EID_SUPPORTED_REGULATORY_CLASSES = 59,
|
||||
WLAN_EID_EXT_CHANSWITCH_ANN = 60,
|
||||
};
|
||||
|
||||
/* Action category code */
|
||||
@@ -1150,6 +1224,18 @@ enum ieee80211_spectrum_mgmt_actioncode {
|
||||
WLAN_ACTION_SPCT_CHL_SWITCH = 4,
|
||||
};
|
||||
|
||||
/* HT action codes */
|
||||
enum ieee80211_ht_actioncode {
|
||||
WLAN_HT_ACTION_NOTIFY_CHANWIDTH = 0,
|
||||
WLAN_HT_ACTION_SMPS = 1,
|
||||
WLAN_HT_ACTION_PSMP = 2,
|
||||
WLAN_HT_ACTION_PCO_PHASE = 3,
|
||||
WLAN_HT_ACTION_CSI = 4,
|
||||
WLAN_HT_ACTION_NONCOMPRESSED_BF = 5,
|
||||
WLAN_HT_ACTION_COMPRESSED_BF = 6,
|
||||
WLAN_HT_ACTION_ASEL_IDX_FEEDBACK = 7,
|
||||
};
|
||||
|
||||
/* Security key length */
|
||||
enum ieee80211_key_len {
|
||||
WLAN_KEY_LEN_WEP40 = 5,
|
||||
|
||||
@@ -78,6 +78,11 @@ enum {
|
||||
#define IFLA_LINKINFO IFLA_LINKINFO
|
||||
IFLA_NET_NS_PID,
|
||||
IFLA_IFALIAS,
|
||||
IFLA_NUM_VF, /* Number of VFs if device is SR-IOV PF */
|
||||
IFLA_VF_MAC, /* Hardware queue specific attributes */
|
||||
IFLA_VF_VLAN,
|
||||
IFLA_VF_TX_RATE, /* TX Bandwidth Allocation */
|
||||
IFLA_VFINFO,
|
||||
__IFLA_MAX
|
||||
};
|
||||
|
||||
@@ -196,4 +201,29 @@ enum macvlan_mode {
|
||||
MACVLAN_MODE_BRIDGE = 4, /* talk to bridge ports directly */
|
||||
};
|
||||
|
||||
/* SR-IOV virtual function managment section */
|
||||
|
||||
struct ifla_vf_mac {
|
||||
__u32 vf;
|
||||
__u8 mac[32]; /* MAX_ADDR_LEN */
|
||||
};
|
||||
|
||||
struct ifla_vf_vlan {
|
||||
__u32 vf;
|
||||
__u32 vlan; /* 0 - 4095, 0 disables VLAN filter */
|
||||
__u32 qos;
|
||||
};
|
||||
|
||||
struct ifla_vf_tx_rate {
|
||||
__u32 vf;
|
||||
__u32 rate; /* Max TX bandwidth in Mbps, 0 disables throttling */
|
||||
};
|
||||
|
||||
struct ifla_vf_info {
|
||||
__u32 vf;
|
||||
__u8 mac[32];
|
||||
__u32 vlan;
|
||||
__u32 qos;
|
||||
__u32 tx_rate;
|
||||
};
|
||||
#endif /* _LINUX_IF_LINK_H */
|
||||
|
||||
@@ -1,6 +1,90 @@
|
||||
#ifndef _LINUX_IF_MACVLAN_H
|
||||
#define _LINUX_IF_MACVLAN_H
|
||||
|
||||
#include <linux/if_link.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/netlink.h>
|
||||
#include <net/netlink.h>
|
||||
|
||||
#if defined(CONFIG_MACVTAP) || defined(CONFIG_MACVTAP_MODULE)
|
||||
struct socket *macvtap_get_socket(struct file *);
|
||||
#else
|
||||
#include <linux/err.h>
|
||||
#include <linux/errno.h>
|
||||
struct file;
|
||||
struct socket;
|
||||
static inline struct socket *macvtap_get_socket(struct file *f)
|
||||
{
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
#endif /* CONFIG_MACVTAP */
|
||||
|
||||
struct macvlan_port;
|
||||
struct macvtap_queue;
|
||||
|
||||
/**
|
||||
* struct macvlan_rx_stats - MACVLAN percpu rx stats
|
||||
* @rx_packets: number of received packets
|
||||
* @rx_bytes: number of received bytes
|
||||
* @multicast: number of received multicast packets
|
||||
* @rx_errors: number of errors
|
||||
*/
|
||||
struct macvlan_rx_stats {
|
||||
unsigned long rx_packets;
|
||||
unsigned long rx_bytes;
|
||||
unsigned long multicast;
|
||||
unsigned long rx_errors;
|
||||
};
|
||||
|
||||
struct macvlan_dev {
|
||||
struct net_device *dev;
|
||||
struct list_head list;
|
||||
struct hlist_node hlist;
|
||||
struct macvlan_port *port;
|
||||
struct net_device *lowerdev;
|
||||
struct macvlan_rx_stats __percpu *rx_stats;
|
||||
enum macvlan_mode mode;
|
||||
int (*receive)(struct sk_buff *skb);
|
||||
int (*forward)(struct net_device *dev, struct sk_buff *skb);
|
||||
struct macvtap_queue *tap;
|
||||
};
|
||||
|
||||
static inline void macvlan_count_rx(const struct macvlan_dev *vlan,
|
||||
unsigned int len, bool success,
|
||||
bool multicast)
|
||||
{
|
||||
struct macvlan_rx_stats *rx_stats;
|
||||
|
||||
rx_stats = per_cpu_ptr(vlan->rx_stats, smp_processor_id());
|
||||
if (likely(success)) {
|
||||
rx_stats->rx_packets++;;
|
||||
rx_stats->rx_bytes += len;
|
||||
if (multicast)
|
||||
rx_stats->multicast++;
|
||||
} else {
|
||||
rx_stats->rx_errors++;
|
||||
}
|
||||
}
|
||||
|
||||
extern int macvlan_common_newlink(struct net *src_net, struct net_device *dev,
|
||||
struct nlattr *tb[], struct nlattr *data[],
|
||||
int (*receive)(struct sk_buff *skb),
|
||||
int (*forward)(struct net_device *dev,
|
||||
struct sk_buff *skb));
|
||||
|
||||
extern void macvlan_count_rx(const struct macvlan_dev *vlan,
|
||||
unsigned int len, bool success,
|
||||
bool multicast);
|
||||
|
||||
extern void macvlan_dellink(struct net_device *dev, struct list_head *head);
|
||||
|
||||
extern int macvlan_link_register(struct rtnl_link_ops *ops);
|
||||
|
||||
extern netdev_tx_t macvlan_start_xmit(struct sk_buff *skb,
|
||||
struct net_device *dev);
|
||||
|
||||
|
||||
extern struct sk_buff *(*macvlan_handle_frame_hook)(struct sk_buff *);
|
||||
|
||||
#endif /* _LINUX_IF_MACVLAN_H */
|
||||
|
||||
@@ -46,6 +46,7 @@ struct sockaddr_ll {
|
||||
#define PACKET_RESERVE 12
|
||||
#define PACKET_TX_RING 13
|
||||
#define PACKET_LOSS 14
|
||||
#define PACKET_VNET_HDR 15
|
||||
|
||||
struct tpacket_stats {
|
||||
unsigned int tp_packets;
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/if_ether.h>
|
||||
#include <linux/filter.h>
|
||||
|
||||
/* Read queue size */
|
||||
#define TUN_READQ_SIZE 500
|
||||
@@ -48,6 +49,8 @@
|
||||
#define TUNGETIFF _IOR('T', 210, unsigned int)
|
||||
#define TUNGETSNDBUF _IOR('T', 211, int)
|
||||
#define TUNSETSNDBUF _IOW('T', 212, int)
|
||||
#define TUNATTACHFILTER _IOW('T', 213, struct sock_fprog)
|
||||
#define TUNDETACHFILTER _IOW('T', 214, struct sock_fprog)
|
||||
|
||||
/* TUNSETIFF ifr flags */
|
||||
#define IFF_TUN 0x0001
|
||||
@@ -86,4 +89,18 @@ struct tun_filter {
|
||||
__u8 addr[0][ETH_ALEN];
|
||||
};
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#if defined(CONFIG_TUN) || defined(CONFIG_TUN_MODULE)
|
||||
struct socket *tun_get_socket(struct file *);
|
||||
#else
|
||||
#include <linux/err.h>
|
||||
#include <linux/errno.h>
|
||||
struct file;
|
||||
struct socket;
|
||||
static inline struct socket *tun_get_socket(struct file *f)
|
||||
{
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
#endif /* CONFIG_TUN */
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* __IF_TUN_H */
|
||||
|
||||
@@ -153,6 +153,7 @@ extern int sysctl_igmp_max_msf;
|
||||
struct ip_sf_socklist {
|
||||
unsigned int sl_max;
|
||||
unsigned int sl_count;
|
||||
struct rcu_head rcu;
|
||||
__be32 sl_addr[0];
|
||||
};
|
||||
|
||||
@@ -170,6 +171,7 @@ struct ip_mc_socklist {
|
||||
struct ip_mreqn multi;
|
||||
unsigned int sfmode; /* MCAST_{INCLUDE,EXCLUDE} */
|
||||
struct ip_sf_socklist *sflist;
|
||||
struct rcu_head rcu;
|
||||
};
|
||||
|
||||
struct ip_sf_list {
|
||||
|
||||
@@ -84,6 +84,8 @@ struct in_addr {
|
||||
#define IP_ORIGDSTADDR 20
|
||||
#define IP_RECVORIGDSTADDR IP_ORIGDSTADDR
|
||||
|
||||
#define IP_MINTTL 21
|
||||
|
||||
/* IP_MTU_DISCOVER values */
|
||||
#define IP_PMTUDISC_DONT 0 /* Never send DF frames */
|
||||
#define IP_PMTUDISC_WANT 1 /* Use per route hints */
|
||||
|
||||
@@ -10,10 +10,40 @@
|
||||
#include <linux/timer.h>
|
||||
#include <linux/sysctl.h>
|
||||
|
||||
enum
|
||||
{
|
||||
IPV4_DEVCONF_FORWARDING=1,
|
||||
IPV4_DEVCONF_MC_FORWARDING,
|
||||
IPV4_DEVCONF_PROXY_ARP,
|
||||
IPV4_DEVCONF_ACCEPT_REDIRECTS,
|
||||
IPV4_DEVCONF_SECURE_REDIRECTS,
|
||||
IPV4_DEVCONF_SEND_REDIRECTS,
|
||||
IPV4_DEVCONF_SHARED_MEDIA,
|
||||
IPV4_DEVCONF_RP_FILTER,
|
||||
IPV4_DEVCONF_ACCEPT_SOURCE_ROUTE,
|
||||
IPV4_DEVCONF_BOOTP_RELAY,
|
||||
IPV4_DEVCONF_LOG_MARTIANS,
|
||||
IPV4_DEVCONF_TAG,
|
||||
IPV4_DEVCONF_ARPFILTER,
|
||||
IPV4_DEVCONF_MEDIUM_ID,
|
||||
IPV4_DEVCONF_NOXFRM,
|
||||
IPV4_DEVCONF_NOPOLICY,
|
||||
IPV4_DEVCONF_FORCE_IGMP_VERSION,
|
||||
IPV4_DEVCONF_ARP_ANNOUNCE,
|
||||
IPV4_DEVCONF_ARP_IGNORE,
|
||||
IPV4_DEVCONF_PROMOTE_SECONDARIES,
|
||||
IPV4_DEVCONF_ARP_ACCEPT,
|
||||
IPV4_DEVCONF_ARP_NOTIFY,
|
||||
IPV4_DEVCONF_ACCEPT_LOCAL,
|
||||
IPV4_DEVCONF_SRC_VMARK,
|
||||
IPV4_DEVCONF_PROXY_ARP_PVLAN,
|
||||
__IPV4_DEVCONF_MAX
|
||||
};
|
||||
|
||||
struct ipv4_devconf {
|
||||
void *sysctl;
|
||||
int data[__NET_IPV4_CONF_MAX - 1];
|
||||
DECLARE_BITMAP(state, __NET_IPV4_CONF_MAX - 1);
|
||||
int data[__IPV4_DEVCONF_MAX - 1];
|
||||
DECLARE_BITMAP(state, __IPV4_DEVCONF_MAX - 1);
|
||||
};
|
||||
|
||||
struct in_device {
|
||||
@@ -40,7 +70,7 @@ struct in_device {
|
||||
struct rcu_head rcu_head;
|
||||
};
|
||||
|
||||
#define IPV4_DEVCONF(cnf, attr) ((cnf).data[NET_IPV4_CONF_ ## attr - 1])
|
||||
#define IPV4_DEVCONF(cnf, attr) ((cnf).data[IPV4_DEVCONF_ ## attr - 1])
|
||||
#define IPV4_DEVCONF_ALL(net, attr) \
|
||||
IPV4_DEVCONF((*(net)->ipv4.devconf_all), attr)
|
||||
|
||||
@@ -60,13 +90,13 @@ static inline void ipv4_devconf_set(struct in_device *in_dev, int index,
|
||||
|
||||
static inline void ipv4_devconf_setall(struct in_device *in_dev)
|
||||
{
|
||||
bitmap_fill(in_dev->cnf.state, __NET_IPV4_CONF_MAX - 1);
|
||||
bitmap_fill(in_dev->cnf.state, __IPV4_DEVCONF_MAX - 1);
|
||||
}
|
||||
|
||||
#define IN_DEV_CONF_GET(in_dev, attr) \
|
||||
ipv4_devconf_get((in_dev), NET_IPV4_CONF_ ## attr)
|
||||
ipv4_devconf_get((in_dev), IPV4_DEVCONF_ ## attr)
|
||||
#define IN_DEV_CONF_SET(in_dev, attr, val) \
|
||||
ipv4_devconf_set((in_dev), NET_IPV4_CONF_ ## attr, (val))
|
||||
ipv4_devconf_set((in_dev), IPV4_DEVCONF_ ## attr, (val))
|
||||
|
||||
#define IN_DEV_ANDCONF(in_dev, attr) \
|
||||
(IPV4_DEVCONF_ALL(dev_net(in_dev->dev), attr) && \
|
||||
@@ -89,6 +119,7 @@ static inline void ipv4_devconf_setall(struct in_device *in_dev)
|
||||
|
||||
#define IN_DEV_LOG_MARTIANS(in_dev) IN_DEV_ORCONF((in_dev), LOG_MARTIANS)
|
||||
#define IN_DEV_PROXY_ARP(in_dev) IN_DEV_ORCONF((in_dev), PROXY_ARP)
|
||||
#define IN_DEV_PROXY_ARP_PVLAN(in_dev) IN_DEV_CONF_GET(in_dev, PROXY_ARP_PVLAN)
|
||||
#define IN_DEV_SHARED_MEDIA(in_dev) IN_DEV_ORCONF((in_dev), SHARED_MEDIA)
|
||||
#define IN_DEV_TX_REDIRECTS(in_dev) IN_DEV_ORCONF((in_dev), SEND_REDIRECTS)
|
||||
#define IN_DEV_SEC_REDIRECTS(in_dev) IN_DEV_ORCONF((in_dev), \
|
||||
|
||||
+56
-4
@@ -376,8 +376,9 @@ struct input_absinfo {
|
||||
#define KEY_DISPLAY_OFF 245 /* display device to off state */
|
||||
|
||||
#define KEY_WIMAX 246
|
||||
#define KEY_RFKILL 247 /* Key that controls all radios */
|
||||
|
||||
/* Range 248 - 255 is reserved for special needs of AT keyboard driver */
|
||||
/* Code 255 is reserved for special needs of AT keyboard driver */
|
||||
|
||||
#define BTN_MISC 0x100
|
||||
#define BTN_0 0x100
|
||||
@@ -596,6 +597,49 @@ struct input_absinfo {
|
||||
#define KEY_NUMERIC_POUND 0x20b
|
||||
|
||||
#define KEY_CAMERA_FOCUS 0x210
|
||||
#define KEY_WPS_BUTTON 0x211 /* WiFi Protected Setup key */
|
||||
|
||||
#define BTN_TRIGGER_HAPPY 0x2c0
|
||||
#define BTN_TRIGGER_HAPPY1 0x2c0
|
||||
#define BTN_TRIGGER_HAPPY2 0x2c1
|
||||
#define BTN_TRIGGER_HAPPY3 0x2c2
|
||||
#define BTN_TRIGGER_HAPPY4 0x2c3
|
||||
#define BTN_TRIGGER_HAPPY5 0x2c4
|
||||
#define BTN_TRIGGER_HAPPY6 0x2c5
|
||||
#define BTN_TRIGGER_HAPPY7 0x2c6
|
||||
#define BTN_TRIGGER_HAPPY8 0x2c7
|
||||
#define BTN_TRIGGER_HAPPY9 0x2c8
|
||||
#define BTN_TRIGGER_HAPPY10 0x2c9
|
||||
#define BTN_TRIGGER_HAPPY11 0x2ca
|
||||
#define BTN_TRIGGER_HAPPY12 0x2cb
|
||||
#define BTN_TRIGGER_HAPPY13 0x2cc
|
||||
#define BTN_TRIGGER_HAPPY14 0x2cd
|
||||
#define BTN_TRIGGER_HAPPY15 0x2ce
|
||||
#define BTN_TRIGGER_HAPPY16 0x2cf
|
||||
#define BTN_TRIGGER_HAPPY17 0x2d0
|
||||
#define BTN_TRIGGER_HAPPY18 0x2d1
|
||||
#define BTN_TRIGGER_HAPPY19 0x2d2
|
||||
#define BTN_TRIGGER_HAPPY20 0x2d3
|
||||
#define BTN_TRIGGER_HAPPY21 0x2d4
|
||||
#define BTN_TRIGGER_HAPPY22 0x2d5
|
||||
#define BTN_TRIGGER_HAPPY23 0x2d6
|
||||
#define BTN_TRIGGER_HAPPY24 0x2d7
|
||||
#define BTN_TRIGGER_HAPPY25 0x2d8
|
||||
#define BTN_TRIGGER_HAPPY26 0x2d9
|
||||
#define BTN_TRIGGER_HAPPY27 0x2da
|
||||
#define BTN_TRIGGER_HAPPY28 0x2db
|
||||
#define BTN_TRIGGER_HAPPY29 0x2dc
|
||||
#define BTN_TRIGGER_HAPPY30 0x2dd
|
||||
#define BTN_TRIGGER_HAPPY31 0x2de
|
||||
#define BTN_TRIGGER_HAPPY32 0x2df
|
||||
#define BTN_TRIGGER_HAPPY33 0x2e0
|
||||
#define BTN_TRIGGER_HAPPY34 0x2e1
|
||||
#define BTN_TRIGGER_HAPPY35 0x2e2
|
||||
#define BTN_TRIGGER_HAPPY36 0x2e3
|
||||
#define BTN_TRIGGER_HAPPY37 0x2e4
|
||||
#define BTN_TRIGGER_HAPPY38 0x2e5
|
||||
#define BTN_TRIGGER_HAPPY39 0x2e6
|
||||
#define BTN_TRIGGER_HAPPY40 0x2e7
|
||||
|
||||
/* We avoid low common keys in module aliases so they don't get huge. */
|
||||
#define KEY_MIN_INTERESTING KEY_MUTE
|
||||
@@ -1199,6 +1243,10 @@ struct input_handle;
|
||||
* @event: event handler. This method is being called by input core with
|
||||
* interrupts disabled and dev->event_lock spinlock held and so
|
||||
* it may not sleep
|
||||
* @filter: similar to @event; separates normal event handlers from
|
||||
* "filters".
|
||||
* @match: called after comparing device's id with handler's id_table
|
||||
* to perform fine-grained matching between device and handler
|
||||
* @connect: called when attaching a handler to an input device
|
||||
* @disconnect: disconnects a handler from input device
|
||||
* @start: starts handler for given handle. This function is called by
|
||||
@@ -1210,8 +1258,6 @@ struct input_handle;
|
||||
* @name: name of the handler, to be shown in /proc/bus/input/handlers
|
||||
* @id_table: pointer to a table of input_device_ids this driver can
|
||||
* handle
|
||||
* @blacklist: pointer to a table of input_device_ids this driver should
|
||||
* ignore even if they match @id_table
|
||||
* @h_list: list of input handles associated with the handler
|
||||
* @node: for placing the driver onto input_handler_list
|
||||
*
|
||||
@@ -1220,6 +1266,11 @@ struct input_handle;
|
||||
* same time. All of them will get their copy of input event generated by
|
||||
* the device.
|
||||
*
|
||||
* The very same structure is used to implement input filters. Input core
|
||||
* allows filters to run first and will not pass event to regular handlers
|
||||
* if any of the filters indicate that the event should be filtered (by
|
||||
* returning %true from their filter() method).
|
||||
*
|
||||
* Note that input core serializes calls to connect() and disconnect()
|
||||
* methods.
|
||||
*/
|
||||
@@ -1228,6 +1279,8 @@ struct input_handler {
|
||||
void *private;
|
||||
|
||||
void (*event)(struct input_handle *handle, unsigned int type, unsigned int code, int value);
|
||||
bool (*filter)(struct input_handle *handle, unsigned int type, unsigned int code, int value);
|
||||
bool (*match)(struct input_handler *handler, struct input_dev *dev);
|
||||
int (*connect)(struct input_handler *handler, struct input_dev *dev, const struct input_device_id *id);
|
||||
void (*disconnect)(struct input_handle *handle);
|
||||
void (*start)(struct input_handle *handle);
|
||||
@@ -1237,7 +1290,6 @@ struct input_handler {
|
||||
const char *name;
|
||||
|
||||
const struct input_device_id *id_table;
|
||||
const struct input_device_id *blacklist;
|
||||
|
||||
struct list_head h_list;
|
||||
struct list_head node;
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
#ifndef __SH_KEYSC_H__
|
||||
#define __SH_KEYSC_H__
|
||||
|
||||
#define SH_KEYSC_MAXKEYS 30
|
||||
#define SH_KEYSC_MAXKEYS 49
|
||||
|
||||
struct sh_keysc_info {
|
||||
enum { SH_KEYSC_MODE_1, SH_KEYSC_MODE_2, SH_KEYSC_MODE_3 } mode;
|
||||
enum { SH_KEYSC_MODE_1, SH_KEYSC_MODE_2, SH_KEYSC_MODE_3,
|
||||
SH_KEYSC_MODE_4, SH_KEYSC_MODE_5, SH_KEYSC_MODE_6 } mode;
|
||||
int scan_timing; /* 0 -> 7, see KYCR1, SCN[2:0] */
|
||||
int delay;
|
||||
int kycr2_delay;
|
||||
int keycodes[SH_KEYSC_MAXKEYS];
|
||||
int keycodes[SH_KEYSC_MAXKEYS]; /* KEYIN * KEYOUT */
|
||||
};
|
||||
|
||||
#endif /* __SH_KEYSC_H__ */
|
||||
|
||||
@@ -49,8 +49,8 @@ struct io_context {
|
||||
/*
|
||||
* For request batching
|
||||
*/
|
||||
unsigned long last_waited; /* Time last woken after wait for request */
|
||||
int nr_batch_requests; /* Number of requests left in the batch */
|
||||
unsigned long last_waited; /* Time last woken after wait for request */
|
||||
|
||||
struct radix_tree_root radix_root;
|
||||
struct hlist_head cic_list;
|
||||
|
||||
@@ -112,6 +112,7 @@ extern struct resource iomem_resource;
|
||||
|
||||
extern int request_resource(struct resource *root, struct resource *new);
|
||||
extern int release_resource(struct resource *new);
|
||||
void release_child_resources(struct resource *new);
|
||||
extern void reserve_region_with_split(struct resource *root,
|
||||
resource_size_t start, resource_size_t end,
|
||||
const char *name);
|
||||
@@ -120,8 +121,10 @@ extern void insert_resource_expand_to_fit(struct resource *root, struct resource
|
||||
extern int allocate_resource(struct resource *root, struct resource *new,
|
||||
resource_size_t size, resource_size_t min,
|
||||
resource_size_t max, resource_size_t align,
|
||||
void (*alignf)(void *, struct resource *,
|
||||
resource_size_t, resource_size_t),
|
||||
resource_size_t (*alignf)(void *,
|
||||
const struct resource *,
|
||||
resource_size_t,
|
||||
resource_size_t),
|
||||
void *alignf_data);
|
||||
int adjust_resource(struct resource *res, resource_size_t start,
|
||||
resource_size_t size);
|
||||
|
||||
+3
-1
@@ -90,7 +90,7 @@ struct msi_desc;
|
||||
* @startup: start up the interrupt (defaults to ->enable if NULL)
|
||||
* @shutdown: shut down the interrupt (defaults to ->disable if NULL)
|
||||
* @enable: enable the interrupt (defaults to chip->unmask if NULL)
|
||||
* @disable: disable the interrupt (defaults to chip->mask if NULL)
|
||||
* @disable: disable the interrupt
|
||||
* @ack: start of a new interrupt
|
||||
* @mask: mask an interrupt source
|
||||
* @mask_ack: ack and mask an interrupt source
|
||||
@@ -400,7 +400,9 @@ static inline int irq_has_action(unsigned int irq)
|
||||
|
||||
/* Dynamic irq helper functions */
|
||||
extern void dynamic_irq_init(unsigned int irq);
|
||||
void dynamic_irq_init_keep_chip_data(unsigned int irq);
|
||||
extern void dynamic_irq_cleanup(unsigned int irq);
|
||||
void dynamic_irq_cleanup_keep_chip_data(unsigned int irq);
|
||||
|
||||
/* Set/get chip/data for an IRQ: */
|
||||
extern int set_irq_chip(unsigned int irq, struct irq_chip *chip);
|
||||
|
||||
@@ -50,8 +50,7 @@ struct capi_ctr {
|
||||
u16 (*send_message)(struct capi_ctr *, struct sk_buff *skb);
|
||||
|
||||
char *(*procinfo)(struct capi_ctr *);
|
||||
int (*ctr_read_proc)(char *page, char **start, off_t off,
|
||||
int count, int *eof, struct capi_ctr *card);
|
||||
const struct file_operations *proc_fops;
|
||||
|
||||
/* filled in before calling ready callback */
|
||||
u8 manu[CAPI_MANUFACTURER_LEN]; /* CAPI_GET_MANUFACTURER */
|
||||
@@ -67,9 +66,10 @@ struct capi_ctr {
|
||||
unsigned long nsentdatapkt;
|
||||
|
||||
int cnr; /* controller number */
|
||||
volatile unsigned short cardstate; /* controller state */
|
||||
volatile int blocked; /* output blocked */
|
||||
unsigned short state; /* controller state */
|
||||
int blocked; /* output blocked */
|
||||
int traceflag; /* capi trace */
|
||||
wait_queue_head_t state_wait_queue;
|
||||
|
||||
struct proc_dir_entry *procent;
|
||||
char procfn[128];
|
||||
|
||||
@@ -69,15 +69,8 @@ extern u8 jbd2_journal_enable_debug;
|
||||
#define jbd_debug(f, a...) /**/
|
||||
#endif
|
||||
|
||||
static inline void *jbd2_alloc(size_t size, gfp_t flags)
|
||||
{
|
||||
return (void *)__get_free_pages(flags, get_order(size));
|
||||
}
|
||||
|
||||
static inline void jbd2_free(void *ptr, size_t size)
|
||||
{
|
||||
free_pages((unsigned long)ptr, get_order(size));
|
||||
};
|
||||
extern void *jbd2_alloc(size_t size, gfp_t flags);
|
||||
extern void jbd2_free(void *ptr, size_t size);
|
||||
|
||||
#define JBD2_MIN_JOURNAL_BLOCKS 1024
|
||||
|
||||
|
||||
@@ -161,7 +161,4 @@ static inline void con_schedule_flip(struct tty_struct *t)
|
||||
schedule_delayed_work(&t->buf.work, 0);
|
||||
}
|
||||
|
||||
/* mac_hid.c */
|
||||
extern int mac_hid_mouse_emulate_buttons(int, unsigned int, int);
|
||||
|
||||
#endif
|
||||
|
||||
+13
-2
@@ -44,6 +44,16 @@ extern const char linux_proc_banner[];
|
||||
|
||||
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
|
||||
|
||||
/*
|
||||
* This looks more complex than it should be. But we need to
|
||||
* get the type for the ~ right in round_down (it needs to be
|
||||
* as wide as the result!), and we want to evaluate the macro
|
||||
* arguments just once each.
|
||||
*/
|
||||
#define __round_mask(x, y) ((__typeof__(x))((y)-1))
|
||||
#define round_up(x, y) ((((x)-1) | __round_mask(x, y))+1)
|
||||
#define round_down(x, y) ((x) & ~__round_mask(x, y))
|
||||
|
||||
#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))
|
||||
@@ -124,7 +134,7 @@ extern int _cond_resched(void);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP
|
||||
void __might_sleep(char *file, int line, int preempt_offset);
|
||||
void __might_sleep(const char *file, int line, int preempt_offset);
|
||||
/**
|
||||
* might_sleep - annotation for functions that can sleep
|
||||
*
|
||||
@@ -138,7 +148,8 @@ extern int _cond_resched(void);
|
||||
# define might_sleep() \
|
||||
do { __might_sleep(__FILE__, __LINE__, 0); might_resched(); } while (0)
|
||||
#else
|
||||
static inline void __might_sleep(char *file, int line, int preempt_offset) { }
|
||||
static inline void __might_sleep(const char *file, int line,
|
||||
int preempt_offset) { }
|
||||
# define might_sleep() do { might_resched(); } while (0)
|
||||
#endif
|
||||
|
||||
|
||||
@@ -48,9 +48,7 @@ typedef struct kcapi_carddef {
|
||||
#include <linux/list.h>
|
||||
#include <linux/skbuff.h>
|
||||
#include <linux/workqueue.h>
|
||||
|
||||
#define KCI_CONTRUP 0 /* arg: struct capi_profile */
|
||||
#define KCI_CONTRDOWN 1 /* arg: NULL */
|
||||
#include <linux/notifier.h>
|
||||
|
||||
struct capi20_appl {
|
||||
u16 applid;
|
||||
@@ -67,11 +65,6 @@ struct capi20_appl {
|
||||
struct sk_buff_head recv_queue;
|
||||
struct work_struct recv_work;
|
||||
int release_in_progress;
|
||||
|
||||
/* ugly hack to allow for notification of added/removed
|
||||
* controllers. The Right Way (tm) is known. XXX
|
||||
*/
|
||||
void (*callback) (unsigned int cmd, __u32 contr, void *data);
|
||||
};
|
||||
|
||||
u16 capi20_isinstalled(void);
|
||||
@@ -84,11 +77,11 @@ u16 capi20_get_serial(u32 contr, u8 serial[CAPI_SERIAL_LEN]);
|
||||
u16 capi20_get_profile(u32 contr, struct capi_profile *profp);
|
||||
int capi20_manufacturer(unsigned int cmd, void __user *data);
|
||||
|
||||
/* temporary hack XXX */
|
||||
void capi20_set_callback(struct capi20_appl *ap,
|
||||
void (*callback) (unsigned int cmd, __u32 contr, void *data));
|
||||
|
||||
#define CAPICTR_UP 0
|
||||
#define CAPICTR_DOWN 1
|
||||
|
||||
int register_capictr_notifier(struct notifier_block *nb);
|
||||
int unregister_capictr_notifier(struct notifier_block *nb);
|
||||
|
||||
#define CAPI_NOERROR 0x0000
|
||||
|
||||
|
||||
@@ -199,7 +199,7 @@ extern struct kimage *kexec_crash_image;
|
||||
*/
|
||||
extern struct resource crashk_res;
|
||||
typedef u32 note_buf_t[KEXEC_NOTE_BYTES/4];
|
||||
extern note_buf_t *crash_notes;
|
||||
extern note_buf_t __percpu *crash_notes;
|
||||
extern u32 vmcoreinfo_note[VMCOREINFO_NOTE_SIZE/4];
|
||||
extern size_t vmcoreinfo_size;
|
||||
extern size_t vmcoreinfo_max_size;
|
||||
|
||||
@@ -124,7 +124,7 @@ extern __must_check unsigned int kfifo_out_peek(struct kfifo *fifo,
|
||||
*/
|
||||
static inline bool kfifo_initialized(struct kfifo *fifo)
|
||||
{
|
||||
return fifo->buffer != 0;
|
||||
return fifo->buffer != NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -122,6 +122,11 @@ struct kprobe {
|
||||
/* Kprobe status flags */
|
||||
#define KPROBE_FLAG_GONE 1 /* breakpoint has already gone */
|
||||
#define KPROBE_FLAG_DISABLED 2 /* probe is temporarily disabled */
|
||||
#define KPROBE_FLAG_OPTIMIZED 4 /*
|
||||
* probe is really optimized.
|
||||
* NOTE:
|
||||
* this flag is only for optimized_kprobe.
|
||||
*/
|
||||
|
||||
/* Has this kprobe gone ? */
|
||||
static inline int kprobe_gone(struct kprobe *p)
|
||||
@@ -134,6 +139,12 @@ static inline int kprobe_disabled(struct kprobe *p)
|
||||
{
|
||||
return p->flags & (KPROBE_FLAG_DISABLED | KPROBE_FLAG_GONE);
|
||||
}
|
||||
|
||||
/* Is this kprobe really running optimized path ? */
|
||||
static inline int kprobe_optimized(struct kprobe *p)
|
||||
{
|
||||
return p->flags & KPROBE_FLAG_OPTIMIZED;
|
||||
}
|
||||
/*
|
||||
* Special probe type that uses setjmp-longjmp type tricks to resume
|
||||
* execution at a specified entry with a matching prototype corresponding
|
||||
@@ -249,6 +260,39 @@ extern kprobe_opcode_t *get_insn_slot(void);
|
||||
extern void free_insn_slot(kprobe_opcode_t *slot, int dirty);
|
||||
extern void kprobes_inc_nmissed_count(struct kprobe *p);
|
||||
|
||||
#ifdef CONFIG_OPTPROBES
|
||||
/*
|
||||
* Internal structure for direct jump optimized probe
|
||||
*/
|
||||
struct optimized_kprobe {
|
||||
struct kprobe kp;
|
||||
struct list_head list; /* list for optimizing queue */
|
||||
struct arch_optimized_insn optinsn;
|
||||
};
|
||||
|
||||
/* Architecture dependent functions for direct jump optimization */
|
||||
extern int arch_prepared_optinsn(struct arch_optimized_insn *optinsn);
|
||||
extern int arch_check_optimized_kprobe(struct optimized_kprobe *op);
|
||||
extern int arch_prepare_optimized_kprobe(struct optimized_kprobe *op);
|
||||
extern void arch_remove_optimized_kprobe(struct optimized_kprobe *op);
|
||||
extern int arch_optimize_kprobe(struct optimized_kprobe *op);
|
||||
extern void arch_unoptimize_kprobe(struct optimized_kprobe *op);
|
||||
extern kprobe_opcode_t *get_optinsn_slot(void);
|
||||
extern void free_optinsn_slot(kprobe_opcode_t *slot, int dirty);
|
||||
extern int arch_within_optimized_kprobe(struct optimized_kprobe *op,
|
||||
unsigned long addr);
|
||||
|
||||
extern void opt_pre_handler(struct kprobe *p, struct pt_regs *regs);
|
||||
|
||||
#ifdef CONFIG_SYSCTL
|
||||
extern int sysctl_kprobes_optimization;
|
||||
extern int proc_kprobes_optimization_handler(struct ctl_table *table,
|
||||
int write, void __user *buffer,
|
||||
size_t *length, loff_t *ppos);
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_OPTPROBES */
|
||||
|
||||
/* Get the kprobe at this addr (if any) - called with preemption disabled */
|
||||
struct kprobe *get_kprobe(void *addr);
|
||||
void kretprobe_hash_lock(struct task_struct *tsk,
|
||||
|
||||
@@ -857,6 +857,7 @@ struct ata_port_operations {
|
||||
unsigned int (*sff_data_xfer)(struct ata_device *dev,
|
||||
unsigned char *buf, unsigned int buflen, int rw);
|
||||
u8 (*sff_irq_on)(struct ata_port *);
|
||||
bool (*sff_irq_check)(struct ata_port *);
|
||||
void (*sff_irq_clear)(struct ata_port *);
|
||||
|
||||
void (*bmdma_setup)(struct ata_queued_cmd *qc);
|
||||
@@ -1642,8 +1643,8 @@ extern int ata_pci_sff_activate_host(struct ata_host *host,
|
||||
irq_handler_t irq_handler,
|
||||
struct scsi_host_template *sht);
|
||||
extern int ata_pci_sff_init_one(struct pci_dev *pdev,
|
||||
const struct ata_port_info * const * ppi,
|
||||
struct scsi_host_template *sht, void *host_priv);
|
||||
const struct ata_port_info * const * ppi,
|
||||
struct scsi_host_template *sht, void *host_priv, int hflags);
|
||||
#endif /* CONFIG_PCI */
|
||||
|
||||
/**
|
||||
|
||||
@@ -205,6 +205,20 @@ static inline int list_empty_careful(const struct list_head *head)
|
||||
return (next == head) && (next == head->prev);
|
||||
}
|
||||
|
||||
/**
|
||||
* list_rotate_left - rotate the list to the left
|
||||
* @head: the head of the list
|
||||
*/
|
||||
static inline void list_rotate_left(struct list_head *head)
|
||||
{
|
||||
struct list_head *first;
|
||||
|
||||
if (!list_empty(head)) {
|
||||
first = head->next;
|
||||
list_move_tail(first, head);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* list_is_singular - tests whether a list has just one entry.
|
||||
* @head: the list to test.
|
||||
|
||||
@@ -36,6 +36,7 @@ enum llc_sockopts {
|
||||
LLC_OPT_BUSY_TMR_EXP, /* busy state expire time (secs). */
|
||||
LLC_OPT_TX_WIN, /* tx window size. */
|
||||
LLC_OPT_RX_WIN, /* rx window size. */
|
||||
LLC_OPT_PKTINFO, /* ancillary packet information. */
|
||||
LLC_OPT_MAX
|
||||
};
|
||||
|
||||
@@ -70,6 +71,12 @@ enum llc_sockopts {
|
||||
#define LLC_SAP_RM 0xD4 /* Resource Management */
|
||||
#define LLC_SAP_GLOBAL 0xFF /* Global SAP. */
|
||||
|
||||
struct llc_pktinfo {
|
||||
int lpi_ifindex;
|
||||
unsigned char lpi_sap;
|
||||
unsigned char lpi_mac[IFHWADDRLEN];
|
||||
};
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#define LLC_SAP_DYN_START 0xC0
|
||||
#define LLC_SAP_DYN_STOP 0xDE
|
||||
|
||||
@@ -42,6 +42,7 @@ extern void __init lmb_init(void);
|
||||
extern void __init lmb_analyze(void);
|
||||
extern long lmb_add(u64 base, u64 size);
|
||||
extern long lmb_remove(u64 base, u64 size);
|
||||
extern long __init lmb_free(u64 base, u64 size);
|
||||
extern long __init lmb_reserve(u64 base, u64 size);
|
||||
extern u64 __init lmb_alloc_nid(u64 size, u64 align, int nid,
|
||||
u64 (*nid_range)(u64, u64, int *));
|
||||
|
||||
@@ -534,4 +534,8 @@ do { \
|
||||
# define might_lock_read(lock) do { } while (0)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PROVE_RCU
|
||||
extern void lockdep_rcu_dereference(const char *file, const int line);
|
||||
#endif
|
||||
|
||||
#endif /* __LINUX_LOCKDEP_H */
|
||||
|
||||
@@ -52,7 +52,6 @@
|
||||
#define CGROUP_SUPER_MAGIC 0x27e0eb
|
||||
|
||||
#define FUTEXFS_SUPER_MAGIC 0xBAD1DEA
|
||||
#define INOTIFYFS_SUPER_MAGIC 0x2BAD1DEA
|
||||
|
||||
#define STACK_END_MAGIC 0x57AC6E9D
|
||||
|
||||
|
||||
@@ -108,6 +108,8 @@ int mc13783_adc_do_conversion(struct mc13783 *mc13783, unsigned int mode,
|
||||
#define MC13783_REGU_V2 28
|
||||
#define MC13783_REGU_V3 29
|
||||
#define MC13783_REGU_V4 30
|
||||
#define MC13783_REGU_PWGT1SPI 31
|
||||
#define MC13783_REGU_PWGT2SPI 32
|
||||
|
||||
#define MC13783_IRQ_ADCDONE 0
|
||||
#define MC13783_IRQ_ADCBISDONE 1
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#define HPET_MINOR 228
|
||||
#define FUSE_MINOR 229
|
||||
#define KVM_MINOR 232
|
||||
#define VHOST_NET_MINOR 233
|
||||
#define MISC_DYNAMIC_MINOR 255
|
||||
|
||||
struct device;
|
||||
|
||||
+14
-4
@@ -12,6 +12,7 @@
|
||||
#include <linux/prio_tree.h>
|
||||
#include <linux/debug_locks.h>
|
||||
#include <linux/mm_types.h>
|
||||
#include <linux/range.h>
|
||||
|
||||
struct mempolicy;
|
||||
struct anon_vma;
|
||||
@@ -265,6 +266,8 @@ static inline int get_page_unless_zero(struct page *page)
|
||||
return atomic_inc_not_zero(&page->_count);
|
||||
}
|
||||
|
||||
extern int page_is_ram(unsigned long pfn);
|
||||
|
||||
/* Support for virtually mapped pages */
|
||||
struct page *vmalloc_to_page(const void *addr);
|
||||
unsigned long vmalloc_to_pfn(const void *addr);
|
||||
@@ -1047,6 +1050,10 @@ extern void get_pfn_range_for_nid(unsigned int nid,
|
||||
extern unsigned long find_min_pfn_with_active_regions(void);
|
||||
extern void free_bootmem_with_active_regions(int nid,
|
||||
unsigned long max_low_pfn);
|
||||
int add_from_early_node_map(struct range *range, int az,
|
||||
int nr_range, int nid);
|
||||
void *__alloc_memory_core_early(int nodeid, u64 size, u64 align,
|
||||
u64 goal, u64 limit);
|
||||
typedef int (*work_fn_t)(unsigned long, unsigned long, void *);
|
||||
extern void work_with_active_regions(int nid, work_fn_t work_fn, void *data);
|
||||
extern void sparse_memory_present_with_active_regions(int nid);
|
||||
@@ -1079,11 +1086,7 @@ extern void si_meminfo(struct sysinfo * val);
|
||||
extern void si_meminfo_node(struct sysinfo *val, int nid);
|
||||
extern int after_bootmem;
|
||||
|
||||
#ifdef CONFIG_NUMA
|
||||
extern void setup_per_cpu_pageset(void);
|
||||
#else
|
||||
static inline void setup_per_cpu_pageset(void) {}
|
||||
#endif
|
||||
|
||||
extern void zone_pcp_update(struct zone *zone);
|
||||
|
||||
@@ -1319,12 +1322,19 @@ extern int randomize_va_space;
|
||||
const char * arch_vma_name(struct vm_area_struct *vma);
|
||||
void print_vma_addr(char *prefix, unsigned long rip);
|
||||
|
||||
void sparse_mem_maps_populate_node(struct page **map_map,
|
||||
unsigned long pnum_begin,
|
||||
unsigned long pnum_end,
|
||||
unsigned long map_count,
|
||||
int nodeid);
|
||||
|
||||
struct page *sparse_mem_map_populate(unsigned long pnum, int nid);
|
||||
pgd_t *vmemmap_pgd_populate(unsigned long addr, int node);
|
||||
pud_t *vmemmap_pud_populate(pgd_t *pgd, unsigned long addr, int node);
|
||||
pmd_t *vmemmap_pmd_populate(pud_t *pud, unsigned long addr, int node);
|
||||
pte_t *vmemmap_pte_populate(pmd_t *pmd, unsigned long addr, int node);
|
||||
void *vmemmap_alloc_block(unsigned long size, int node);
|
||||
void *vmemmap_alloc_block_buf(unsigned long size, int node);
|
||||
void vmemmap_verify(pte_t *, int, unsigned long, unsigned long);
|
||||
int vmemmap_populate_basepages(struct page *start_page,
|
||||
unsigned long pages, int node);
|
||||
|
||||
+4
-10
@@ -184,13 +184,7 @@ struct per_cpu_pageset {
|
||||
s8 stat_threshold;
|
||||
s8 vm_stat_diff[NR_VM_ZONE_STAT_ITEMS];
|
||||
#endif
|
||||
} ____cacheline_aligned_in_smp;
|
||||
|
||||
#ifdef CONFIG_NUMA
|
||||
#define zone_pcp(__z, __cpu) ((__z)->pageset[(__cpu)])
|
||||
#else
|
||||
#define zone_pcp(__z, __cpu) (&(__z)->pageset[(__cpu)])
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif /* !__GENERATING_BOUNDS.H */
|
||||
|
||||
@@ -306,10 +300,8 @@ struct zone {
|
||||
*/
|
||||
unsigned long min_unmapped_pages;
|
||||
unsigned long min_slab_pages;
|
||||
struct per_cpu_pageset *pageset[NR_CPUS];
|
||||
#else
|
||||
struct per_cpu_pageset pageset[NR_CPUS];
|
||||
#endif
|
||||
struct per_cpu_pageset __percpu *pageset;
|
||||
/*
|
||||
* free areas of different sizes
|
||||
*/
|
||||
@@ -620,7 +612,9 @@ typedef struct pglist_data {
|
||||
struct page_cgroup *node_page_cgroup;
|
||||
#endif
|
||||
#endif
|
||||
#ifndef CONFIG_NO_BOOTMEM
|
||||
struct bootmem_data *bdata;
|
||||
#endif
|
||||
#ifdef CONFIG_MEMORY_HOTPLUG
|
||||
/*
|
||||
* Must be held any time you expect node_start_pfn, node_present_pages
|
||||
|
||||
@@ -35,6 +35,7 @@ static inline void get_mnt_ns(struct mnt_namespace *ns)
|
||||
extern const struct seq_operations mounts_op;
|
||||
extern const struct seq_operations mountinfo_op;
|
||||
extern const struct seq_operations mountstats_op;
|
||||
extern int mnt_had_events(struct proc_mounts *);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+14
-23
@@ -17,7 +17,7 @@
|
||||
#include <linux/moduleparam.h>
|
||||
#include <linux/tracepoint.h>
|
||||
|
||||
#include <asm/local.h>
|
||||
#include <linux/percpu.h>
|
||||
#include <asm/module.h>
|
||||
|
||||
#include <trace/events/module.h>
|
||||
@@ -363,11 +363,9 @@ struct module
|
||||
/* Destruction function. */
|
||||
void (*exit)(void);
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
char *refptr;
|
||||
#else
|
||||
local_t ref;
|
||||
#endif
|
||||
struct module_ref {
|
||||
int count;
|
||||
} __percpu *refptr;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CONSTRUCTORS
|
||||
@@ -454,25 +452,16 @@ void __symbol_put(const char *symbol);
|
||||
#define symbol_put(x) __symbol_put(MODULE_SYMBOL_PREFIX #x)
|
||||
void symbol_put_addr(void *addr);
|
||||
|
||||
static inline local_t *__module_ref_addr(struct module *mod, int cpu)
|
||||
{
|
||||
#ifdef CONFIG_SMP
|
||||
return (local_t *) (mod->refptr + per_cpu_offset(cpu));
|
||||
#else
|
||||
return &mod->ref;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Sometimes we know we already have a refcount, and it's easier not
|
||||
to handle the error case (which only happens with rmmod --wait). */
|
||||
static inline void __module_get(struct module *module)
|
||||
{
|
||||
if (module) {
|
||||
unsigned int cpu = get_cpu();
|
||||
local_inc(__module_ref_addr(module, cpu));
|
||||
preempt_disable();
|
||||
__this_cpu_inc(module->refptr->count);
|
||||
trace_module_get(module, _THIS_IP_,
|
||||
local_read(__module_ref_addr(module, cpu)));
|
||||
put_cpu();
|
||||
__this_cpu_read(module->refptr->count));
|
||||
preempt_enable();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -481,15 +470,17 @@ static inline int try_module_get(struct module *module)
|
||||
int ret = 1;
|
||||
|
||||
if (module) {
|
||||
unsigned int cpu = get_cpu();
|
||||
preempt_disable();
|
||||
|
||||
if (likely(module_is_live(module))) {
|
||||
local_inc(__module_ref_addr(module, cpu));
|
||||
__this_cpu_inc(module->refptr->count);
|
||||
trace_module_get(module, _THIS_IP_,
|
||||
local_read(__module_ref_addr(module, cpu)));
|
||||
__this_cpu_read(module->refptr->count));
|
||||
}
|
||||
else
|
||||
ret = 0;
|
||||
put_cpu();
|
||||
|
||||
preempt_enable();
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
+13
-3
@@ -34,7 +34,18 @@ struct mnt_namespace;
|
||||
|
||||
#define MNT_SHARED 0x1000 /* if the vfsmount is a shared mount */
|
||||
#define MNT_UNBINDABLE 0x2000 /* if the vfsmount is a unbindable mount */
|
||||
#define MNT_PNODE_MASK 0x3000 /* propagation flag mask */
|
||||
/*
|
||||
* MNT_SHARED_MASK is the set of flags that should be cleared when a
|
||||
* mount becomes shared. Currently, this is only the flag that says a
|
||||
* mount cannot be bind mounted, since this is how we create a mount
|
||||
* that shares events with another mount. If you add a new MNT_*
|
||||
* flag, consider how it interacts with shared mounts.
|
||||
*/
|
||||
#define MNT_SHARED_MASK (MNT_UNBINDABLE)
|
||||
#define MNT_PROPAGATION_MASK (MNT_SHARED | MNT_UNBINDABLE)
|
||||
|
||||
|
||||
#define MNT_INTERNAL 0x4000
|
||||
|
||||
struct vfsmount {
|
||||
struct list_head mnt_hash;
|
||||
@@ -66,7 +77,7 @@ struct vfsmount {
|
||||
int mnt_pinned;
|
||||
int mnt_ghosts;
|
||||
#ifdef CONFIG_SMP
|
||||
int *mnt_writers;
|
||||
int __percpu *mnt_writers;
|
||||
#else
|
||||
int mnt_writers;
|
||||
#endif
|
||||
@@ -123,7 +134,6 @@ extern int do_add_mount(struct vfsmount *newmnt, struct path *path,
|
||||
|
||||
extern void mark_mounts_for_expiry(struct list_head *mounts);
|
||||
|
||||
extern spinlock_t vfsmount_lock;
|
||||
extern dev_t name_to_dev_t(char *name);
|
||||
|
||||
#endif /* _LINUX_MOUNT_H */
|
||||
|
||||
@@ -51,6 +51,8 @@
|
||||
#define _4ECCCNTEN (0x1 << 24)
|
||||
#define _4ECCEN (0x1 << 23)
|
||||
#define _4ECCCORRECT (0x1 << 22)
|
||||
#define SHBUSSEL (0x1 << 20)
|
||||
#define SEL_16BIT (0x1 << 19)
|
||||
#define SNAND_E (0x1 << 18) /* SNAND (0=512 1=2048)*/
|
||||
#define QTSEL_E (0x1 << 17)
|
||||
#define ENDIAN (0x1 << 16) /* 1 = little endian */
|
||||
@@ -96,6 +98,7 @@
|
||||
struct sh_flctl {
|
||||
struct mtd_info mtd;
|
||||
struct nand_chip chip;
|
||||
struct platform_device *pdev;
|
||||
void __iomem *reg;
|
||||
|
||||
uint8_t done_buff[2048 + 64]; /* max size 2048 + 64 */
|
||||
|
||||
@@ -174,18 +174,22 @@ struct proto_ops {
|
||||
struct poll_table_struct *wait);
|
||||
int (*ioctl) (struct socket *sock, unsigned int cmd,
|
||||
unsigned long arg);
|
||||
#ifdef CONFIG_COMPAT
|
||||
int (*compat_ioctl) (struct socket *sock, unsigned int cmd,
|
||||
unsigned long arg);
|
||||
#endif
|
||||
int (*listen) (struct socket *sock, int len);
|
||||
int (*shutdown) (struct socket *sock, int flags);
|
||||
int (*setsockopt)(struct socket *sock, int level,
|
||||
int optname, char __user *optval, unsigned int optlen);
|
||||
int (*getsockopt)(struct socket *sock, int level,
|
||||
int optname, char __user *optval, int __user *optlen);
|
||||
#ifdef CONFIG_COMPAT
|
||||
int (*compat_setsockopt)(struct socket *sock, int level,
|
||||
int optname, char __user *optval, unsigned int optlen);
|
||||
int (*compat_getsockopt)(struct socket *sock, int level,
|
||||
int optname, char __user *optval, int __user *optlen);
|
||||
#endif
|
||||
int (*sendmsg) (struct kiocb *iocb, struct socket *sock,
|
||||
struct msghdr *m, size_t total_len);
|
||||
int (*recvmsg) (struct kiocb *iocb, struct socket *sock,
|
||||
|
||||
+173
-13
@@ -28,6 +28,7 @@
|
||||
#include <linux/if.h>
|
||||
#include <linux/if_ether.h>
|
||||
#include <linux/if_packet.h>
|
||||
#include <linux/if_link.h>
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/timer.h>
|
||||
@@ -136,7 +137,7 @@ static inline bool dev_xmit_complete(int rc)
|
||||
* used.
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_WLAN_80211) || defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
|
||||
#if defined(CONFIG_WLAN) || defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
|
||||
# if defined(CONFIG_MAC80211_MESH)
|
||||
# define LL_MAX_HEADER 128
|
||||
# else
|
||||
@@ -263,6 +264,17 @@ struct netdev_hw_addr_list {
|
||||
int count;
|
||||
};
|
||||
|
||||
#define netdev_uc_count(dev) ((dev)->uc.count)
|
||||
#define netdev_uc_empty(dev) ((dev)->uc.count == 0)
|
||||
#define netdev_for_each_uc_addr(ha, dev) \
|
||||
list_for_each_entry(ha, &dev->uc.list, list)
|
||||
|
||||
#define netdev_mc_count(dev) ((dev)->mc_count)
|
||||
#define netdev_mc_empty(dev) (netdev_mc_count(dev) == 0)
|
||||
|
||||
#define netdev_for_each_mc_addr(mclist, dev) \
|
||||
for (mclist = dev->mc_list; mclist; mclist = mclist->next)
|
||||
|
||||
struct hh_cache {
|
||||
struct hh_cache *hh_next; /* Next entry */
|
||||
atomic_t hh_refcnt; /* number of users */
|
||||
@@ -610,6 +622,13 @@ struct netdev_queue {
|
||||
* this function is called when a VLAN id is unregistered.
|
||||
*
|
||||
* void (*ndo_poll_controller)(struct net_device *dev);
|
||||
*
|
||||
* SR-IOV management functions.
|
||||
* int (*ndo_set_vf_mac)(struct net_device *dev, int vf, u8* mac);
|
||||
* int (*ndo_set_vf_vlan)(struct net_device *dev, int vf, u16 vlan, u8 qos);
|
||||
* int (*ndo_set_vf_tx_rate)(struct net_device *dev, int vf, int rate);
|
||||
* int (*ndo_get_vf_config)(struct net_device *dev,
|
||||
* int vf, struct ifla_vf_info *ivf);
|
||||
*/
|
||||
#define HAVE_NET_DEVICE_OPS
|
||||
struct net_device_ops {
|
||||
@@ -621,30 +640,21 @@ struct net_device_ops {
|
||||
struct net_device *dev);
|
||||
u16 (*ndo_select_queue)(struct net_device *dev,
|
||||
struct sk_buff *skb);
|
||||
#define HAVE_CHANGE_RX_FLAGS
|
||||
void (*ndo_change_rx_flags)(struct net_device *dev,
|
||||
int flags);
|
||||
#define HAVE_SET_RX_MODE
|
||||
void (*ndo_set_rx_mode)(struct net_device *dev);
|
||||
#define HAVE_MULTICAST
|
||||
void (*ndo_set_multicast_list)(struct net_device *dev);
|
||||
#define HAVE_SET_MAC_ADDR
|
||||
int (*ndo_set_mac_address)(struct net_device *dev,
|
||||
void *addr);
|
||||
#define HAVE_VALIDATE_ADDR
|
||||
int (*ndo_validate_addr)(struct net_device *dev);
|
||||
#define HAVE_PRIVATE_IOCTL
|
||||
int (*ndo_do_ioctl)(struct net_device *dev,
|
||||
struct ifreq *ifr, int cmd);
|
||||
#define HAVE_SET_CONFIG
|
||||
int (*ndo_set_config)(struct net_device *dev,
|
||||
struct ifmap *map);
|
||||
#define HAVE_CHANGE_MTU
|
||||
int (*ndo_change_mtu)(struct net_device *dev,
|
||||
int new_mtu);
|
||||
int (*ndo_neigh_setup)(struct net_device *dev,
|
||||
struct neigh_parms *);
|
||||
#define HAVE_TX_TIMEOUT
|
||||
void (*ndo_tx_timeout) (struct net_device *dev);
|
||||
|
||||
struct net_device_stats* (*ndo_get_stats)(struct net_device *dev);
|
||||
@@ -656,9 +666,17 @@ struct net_device_ops {
|
||||
void (*ndo_vlan_rx_kill_vid)(struct net_device *dev,
|
||||
unsigned short vid);
|
||||
#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||
#define HAVE_NETDEV_POLL
|
||||
void (*ndo_poll_controller)(struct net_device *dev);
|
||||
#endif
|
||||
int (*ndo_set_vf_mac)(struct net_device *dev,
|
||||
int queue, u8 *mac);
|
||||
int (*ndo_set_vf_vlan)(struct net_device *dev,
|
||||
int queue, u16 vlan, u8 qos);
|
||||
int (*ndo_set_vf_tx_rate)(struct net_device *dev,
|
||||
int vf, int rate);
|
||||
int (*ndo_get_vf_config)(struct net_device *dev,
|
||||
int vf,
|
||||
struct ifla_vf_info *ivf);
|
||||
#if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE)
|
||||
int (*ndo_fcoe_enable)(struct net_device *dev);
|
||||
int (*ndo_fcoe_disable)(struct net_device *dev);
|
||||
@@ -745,6 +763,7 @@ struct net_device {
|
||||
#define NETIF_F_FCOE_CRC (1 << 24) /* FCoE CRC32 */
|
||||
#define NETIF_F_SCTP_CSUM (1 << 25) /* SCTP checksum offload */
|
||||
#define NETIF_F_FCOE_MTU (1 << 26) /* Supports max FCoE MTU, 2158 bytes*/
|
||||
#define NETIF_F_NTUPLE (1 << 27) /* N-tuple filters supported */
|
||||
|
||||
/* Segmentation offload features */
|
||||
#define NETIF_F_GSO_SHIFT 16
|
||||
@@ -905,7 +924,12 @@ struct net_device {
|
||||
NETREG_UNREGISTERED, /* completed unregister todo */
|
||||
NETREG_RELEASED, /* called free_netdev */
|
||||
NETREG_DUMMY, /* dummy device for NAPI poll */
|
||||
} reg_state;
|
||||
} reg_state:16;
|
||||
|
||||
enum {
|
||||
RTNL_LINK_INITIALIZED,
|
||||
RTNL_LINK_INITIALIZING,
|
||||
} rtnl_link_state:16;
|
||||
|
||||
/* Called from unregister, can be used to call free_netdev */
|
||||
void (*destructor)(struct net_device *dev);
|
||||
@@ -953,6 +977,8 @@ struct net_device {
|
||||
/* max exchange id for FCoE LRO by ddp */
|
||||
unsigned int fcoe_ddp_xid;
|
||||
#endif
|
||||
/* n-tuple filter list attached to this device */
|
||||
struct ethtool_rx_ntuple_list ethtool_ntuple_list;
|
||||
};
|
||||
#define to_net_dev(d) container_of(d, struct net_device, dev)
|
||||
|
||||
@@ -1009,6 +1035,15 @@ static inline bool netdev_uses_dsa_tags(struct net_device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifndef CONFIG_NET_NS
|
||||
static inline void skb_set_dev(struct sk_buff *skb, struct net_device *dev)
|
||||
{
|
||||
skb->dev = dev;
|
||||
}
|
||||
#else /* CONFIG_NET_NS */
|
||||
void skb_set_dev(struct sk_buff *skb, struct net_device *dev);
|
||||
#endif
|
||||
|
||||
static inline bool netdev_uses_trailer_tags(struct net_device *dev)
|
||||
{
|
||||
#ifdef CONFIG_NET_DSA_TAG_TRAILER
|
||||
@@ -1527,7 +1562,6 @@ extern int netif_rx(struct sk_buff *skb);
|
||||
extern int netif_rx_ni(struct sk_buff *skb);
|
||||
#define HAVE_NETIF_RECEIVE_SKB 1
|
||||
extern int netif_receive_skb(struct sk_buff *skb);
|
||||
extern void napi_gro_flush(struct napi_struct *napi);
|
||||
extern gro_result_t dev_gro_receive(struct napi_struct *napi,
|
||||
struct sk_buff *skb);
|
||||
extern gro_result_t napi_skb_finish(gro_result_t ret, struct sk_buff *skb);
|
||||
@@ -1553,7 +1587,9 @@ extern int dev_valid_name(const char *name);
|
||||
extern int dev_ioctl(struct net *net, unsigned int cmd, void __user *);
|
||||
extern int dev_ethtool(struct net *net, struct ifreq *);
|
||||
extern unsigned dev_get_flags(const struct net_device *);
|
||||
extern int __dev_change_flags(struct net_device *, unsigned int flags);
|
||||
extern int dev_change_flags(struct net_device *, unsigned);
|
||||
extern void __dev_notify_flags(struct net_device *, unsigned int old_flags);
|
||||
extern int dev_change_name(struct net_device *, const char *);
|
||||
extern int dev_set_alias(struct net_device *, const char *, size_t);
|
||||
extern int dev_change_net_namespace(struct net_device *,
|
||||
@@ -2083,6 +2119,130 @@ static inline u32 dev_ethtool_get_flags(struct net_device *dev)
|
||||
return 0;
|
||||
return dev->ethtool_ops->get_flags(dev);
|
||||
}
|
||||
|
||||
/* Logging, debugging and troubleshooting/diagnostic helpers. */
|
||||
|
||||
/* netdev_printk helpers, similar to dev_printk */
|
||||
|
||||
static inline const char *netdev_name(const struct net_device *dev)
|
||||
{
|
||||
if (dev->reg_state != NETREG_REGISTERED)
|
||||
return "(unregistered net_device)";
|
||||
return dev->name;
|
||||
}
|
||||
|
||||
#define netdev_printk(level, netdev, format, args...) \
|
||||
dev_printk(level, (netdev)->dev.parent, \
|
||||
"%s: " format, \
|
||||
netdev_name(netdev), ##args)
|
||||
|
||||
#define netdev_emerg(dev, format, args...) \
|
||||
netdev_printk(KERN_EMERG, dev, format, ##args)
|
||||
#define netdev_alert(dev, format, args...) \
|
||||
netdev_printk(KERN_ALERT, dev, format, ##args)
|
||||
#define netdev_crit(dev, format, args...) \
|
||||
netdev_printk(KERN_CRIT, dev, format, ##args)
|
||||
#define netdev_err(dev, format, args...) \
|
||||
netdev_printk(KERN_ERR, dev, format, ##args)
|
||||
#define netdev_warn(dev, format, args...) \
|
||||
netdev_printk(KERN_WARNING, dev, format, ##args)
|
||||
#define netdev_notice(dev, format, args...) \
|
||||
netdev_printk(KERN_NOTICE, dev, format, ##args)
|
||||
#define netdev_info(dev, format, args...) \
|
||||
netdev_printk(KERN_INFO, dev, format, ##args)
|
||||
|
||||
#if defined(DEBUG)
|
||||
#define netdev_dbg(__dev, format, args...) \
|
||||
netdev_printk(KERN_DEBUG, __dev, format, ##args)
|
||||
#elif defined(CONFIG_DYNAMIC_DEBUG)
|
||||
#define netdev_dbg(__dev, format, args...) \
|
||||
do { \
|
||||
dynamic_dev_dbg((__dev)->dev.parent, "%s: " format, \
|
||||
netdev_name(__dev), ##args); \
|
||||
} while (0)
|
||||
#else
|
||||
#define netdev_dbg(__dev, format, args...) \
|
||||
({ \
|
||||
if (0) \
|
||||
netdev_printk(KERN_DEBUG, __dev, format, ##args); \
|
||||
0; \
|
||||
})
|
||||
#endif
|
||||
|
||||
#if defined(VERBOSE_DEBUG)
|
||||
#define netdev_vdbg netdev_dbg
|
||||
#else
|
||||
|
||||
#define netdev_vdbg(dev, format, args...) \
|
||||
({ \
|
||||
if (0) \
|
||||
netdev_printk(KERN_DEBUG, dev, format, ##args); \
|
||||
0; \
|
||||
})
|
||||
#endif
|
||||
|
||||
/*
|
||||
* netdev_WARN() acts like dev_printk(), but with the key difference
|
||||
* of using a WARN/WARN_ON to get the message out, including the
|
||||
* file/line information and a backtrace.
|
||||
*/
|
||||
#define netdev_WARN(dev, format, args...) \
|
||||
WARN(1, "netdevice: %s\n" format, netdev_name(dev), ##args);
|
||||
|
||||
/* netif printk helpers, similar to netdev_printk */
|
||||
|
||||
#define netif_printk(priv, type, level, dev, fmt, args...) \
|
||||
do { \
|
||||
if (netif_msg_##type(priv)) \
|
||||
netdev_printk(level, (dev), fmt, ##args); \
|
||||
} while (0)
|
||||
|
||||
#define netif_emerg(priv, type, dev, fmt, args...) \
|
||||
netif_printk(priv, type, KERN_EMERG, dev, fmt, ##args)
|
||||
#define netif_alert(priv, type, dev, fmt, args...) \
|
||||
netif_printk(priv, type, KERN_ALERT, dev, fmt, ##args)
|
||||
#define netif_crit(priv, type, dev, fmt, args...) \
|
||||
netif_printk(priv, type, KERN_CRIT, dev, fmt, ##args)
|
||||
#define netif_err(priv, type, dev, fmt, args...) \
|
||||
netif_printk(priv, type, KERN_ERR, dev, fmt, ##args)
|
||||
#define netif_warn(priv, type, dev, fmt, args...) \
|
||||
netif_printk(priv, type, KERN_WARNING, dev, fmt, ##args)
|
||||
#define netif_notice(priv, type, dev, fmt, args...) \
|
||||
netif_printk(priv, type, KERN_NOTICE, dev, fmt, ##args)
|
||||
#define netif_info(priv, type, dev, fmt, args...) \
|
||||
netif_printk(priv, type, KERN_INFO, (dev), fmt, ##args)
|
||||
|
||||
#if defined(DEBUG)
|
||||
#define netif_dbg(priv, type, dev, format, args...) \
|
||||
netif_printk(priv, type, KERN_DEBUG, dev, format, ##args)
|
||||
#elif defined(CONFIG_DYNAMIC_DEBUG)
|
||||
#define netif_dbg(priv, type, netdev, format, args...) \
|
||||
do { \
|
||||
if (netif_msg_##type(priv)) \
|
||||
dynamic_dev_dbg((netdev)->dev.parent, \
|
||||
"%s: " format, \
|
||||
netdev_name(netdev), ##args); \
|
||||
} while (0)
|
||||
#else
|
||||
#define netif_dbg(priv, type, dev, format, args...) \
|
||||
({ \
|
||||
if (0) \
|
||||
netif_printk(priv, type, KERN_DEBUG, dev, format, ##args); \
|
||||
0; \
|
||||
})
|
||||
#endif
|
||||
|
||||
#if defined(VERBOSE_DEBUG)
|
||||
#define netif_vdbg netdev_dbg
|
||||
#else
|
||||
#define netif_vdbg(priv, type, dev, format, args...) \
|
||||
({ \
|
||||
if (0) \
|
||||
netif_printk(KERN_DEBUG, dev, format, ##args); \
|
||||
0; \
|
||||
})
|
||||
#endif
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* _LINUX_NETDEVICE_H */
|
||||
|
||||
+37
-26
@@ -114,15 +114,17 @@ struct nf_sockopt_ops {
|
||||
int set_optmin;
|
||||
int set_optmax;
|
||||
int (*set)(struct sock *sk, int optval, void __user *user, unsigned int len);
|
||||
#ifdef CONFIG_COMPAT
|
||||
int (*compat_set)(struct sock *sk, int optval,
|
||||
void __user *user, unsigned int len);
|
||||
|
||||
#endif
|
||||
int get_optmin;
|
||||
int get_optmax;
|
||||
int (*get)(struct sock *sk, int optval, void __user *user, int *len);
|
||||
#ifdef CONFIG_COMPAT
|
||||
int (*compat_get)(struct sock *sk, int optval,
|
||||
void __user *user, int *len);
|
||||
|
||||
#endif
|
||||
/* Use the module struct to lock set/get code in place */
|
||||
struct module *owner;
|
||||
};
|
||||
@@ -161,11 +163,8 @@ static inline int nf_hook_thresh(u_int8_t pf, unsigned int hook,
|
||||
struct sk_buff *skb,
|
||||
struct net_device *indev,
|
||||
struct net_device *outdev,
|
||||
int (*okfn)(struct sk_buff *), int thresh,
|
||||
int cond)
|
||||
int (*okfn)(struct sk_buff *), int thresh)
|
||||
{
|
||||
if (!cond)
|
||||
return 1;
|
||||
#ifndef CONFIG_NETFILTER_DEBUG
|
||||
if (list_empty(&nf_hooks[pf][hook]))
|
||||
return 1;
|
||||
@@ -177,7 +176,7 @@ static inline int nf_hook(u_int8_t pf, unsigned int hook, struct sk_buff *skb,
|
||||
struct net_device *indev, struct net_device *outdev,
|
||||
int (*okfn)(struct sk_buff *))
|
||||
{
|
||||
return nf_hook_thresh(pf, hook, skb, indev, outdev, okfn, INT_MIN, 1);
|
||||
return nf_hook_thresh(pf, hook, skb, indev, outdev, okfn, INT_MIN);
|
||||
}
|
||||
|
||||
/* Activate hook; either okfn or kfree_skb called, unless a hook
|
||||
@@ -197,36 +196,49 @@ static inline int nf_hook(u_int8_t pf, unsigned int hook, struct sk_buff *skb,
|
||||
coders :)
|
||||
*/
|
||||
|
||||
/* This is gross, but inline doesn't cut it for avoiding the function
|
||||
call in fast path: gcc doesn't inline (needs value tracking?). --RR */
|
||||
static inline int
|
||||
NF_HOOK_THRESH(uint8_t pf, unsigned int hook, struct sk_buff *skb,
|
||||
struct net_device *in, struct net_device *out,
|
||||
int (*okfn)(struct sk_buff *), int thresh)
|
||||
{
|
||||
int ret = nf_hook_thresh(pf, hook, skb, in, out, okfn, thresh);
|
||||
if (ret == 1)
|
||||
ret = okfn(skb);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* HX: It's slightly less gross now. */
|
||||
static inline int
|
||||
NF_HOOK_COND(uint8_t pf, unsigned int hook, struct sk_buff *skb,
|
||||
struct net_device *in, struct net_device *out,
|
||||
int (*okfn)(struct sk_buff *), bool cond)
|
||||
{
|
||||
int ret;
|
||||
|
||||
#define NF_HOOK_THRESH(pf, hook, skb, indev, outdev, okfn, thresh) \
|
||||
({int __ret; \
|
||||
if ((__ret=nf_hook_thresh(pf, hook, (skb), indev, outdev, okfn, thresh, 1)) == 1)\
|
||||
__ret = (okfn)(skb); \
|
||||
__ret;})
|
||||
if (!cond ||
|
||||
(ret = nf_hook_thresh(pf, hook, skb, in, out, okfn, INT_MIN) == 1))
|
||||
ret = okfn(skb);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#define NF_HOOK_COND(pf, hook, skb, indev, outdev, okfn, cond) \
|
||||
({int __ret; \
|
||||
if ((__ret=nf_hook_thresh(pf, hook, (skb), indev, outdev, okfn, INT_MIN, cond)) == 1)\
|
||||
__ret = (okfn)(skb); \
|
||||
__ret;})
|
||||
|
||||
#define NF_HOOK(pf, hook, skb, indev, outdev, okfn) \
|
||||
NF_HOOK_THRESH(pf, hook, skb, indev, outdev, okfn, INT_MIN)
|
||||
static inline int
|
||||
NF_HOOK(uint8_t pf, unsigned int hook, struct sk_buff *skb,
|
||||
struct net_device *in, struct net_device *out,
|
||||
int (*okfn)(struct sk_buff *))
|
||||
{
|
||||
return NF_HOOK_THRESH(pf, hook, skb, in, out, okfn, INT_MIN);
|
||||
}
|
||||
|
||||
/* Call setsockopt() */
|
||||
int nf_setsockopt(struct sock *sk, u_int8_t pf, int optval, char __user *opt,
|
||||
unsigned int len);
|
||||
int nf_getsockopt(struct sock *sk, u_int8_t pf, int optval, char __user *opt,
|
||||
int *len);
|
||||
|
||||
#ifdef CONFIG_COMPAT
|
||||
int compat_nf_setsockopt(struct sock *sk, u_int8_t pf, int optval,
|
||||
char __user *opt, unsigned int len);
|
||||
int compat_nf_getsockopt(struct sock *sk, u_int8_t pf, int optval,
|
||||
char __user *opt, int *len);
|
||||
#endif
|
||||
|
||||
/* Call this before modifying an existing packet: ensures it is
|
||||
modifiable and linear to the point you care about (writable_len).
|
||||
@@ -325,8 +337,7 @@ static inline int nf_hook_thresh(u_int8_t pf, unsigned int hook,
|
||||
struct sk_buff *skb,
|
||||
struct net_device *indev,
|
||||
struct net_device *outdev,
|
||||
int (*okfn)(struct sk_buff *), int thresh,
|
||||
int cond)
|
||||
int (*okfn)(struct sk_buff *), int thresh)
|
||||
{
|
||||
return okfn(skb);
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ header-y += nfnetlink_queue.h
|
||||
header-y += xt_CLASSIFY.h
|
||||
header-y += xt_CONNMARK.h
|
||||
header-y += xt_CONNSECMARK.h
|
||||
header-y += xt_CT.h
|
||||
header-y += xt_DSCP.h
|
||||
header-y += xt_LED.h
|
||||
header-y += xt_MARK.h
|
||||
|
||||
@@ -72,6 +72,28 @@ enum ip_conntrack_status {
|
||||
/* Connection has fixed timeout. */
|
||||
IPS_FIXED_TIMEOUT_BIT = 10,
|
||||
IPS_FIXED_TIMEOUT = (1 << IPS_FIXED_TIMEOUT_BIT),
|
||||
|
||||
/* Conntrack is a template */
|
||||
IPS_TEMPLATE_BIT = 11,
|
||||
IPS_TEMPLATE = (1 << IPS_TEMPLATE_BIT),
|
||||
};
|
||||
|
||||
/* Connection tracking event types */
|
||||
enum ip_conntrack_events {
|
||||
IPCT_NEW, /* new conntrack */
|
||||
IPCT_RELATED, /* related conntrack */
|
||||
IPCT_DESTROY, /* destroyed conntrack */
|
||||
IPCT_REPLY, /* connection has seen two-way traffic */
|
||||
IPCT_ASSURED, /* connection status has changed to assured */
|
||||
IPCT_PROTOINFO, /* protocol information has changed */
|
||||
IPCT_HELPER, /* new helper has been set */
|
||||
IPCT_MARK, /* new mark has been set */
|
||||
IPCT_NATSEQADJ, /* NAT is doing sequence adjustment */
|
||||
IPCT_SECMARK, /* new security mark has been set */
|
||||
};
|
||||
|
||||
enum ip_conntrack_expect_events {
|
||||
IPEXP_NEW, /* new expectation */
|
||||
};
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
@@ -14,6 +14,7 @@ enum sip_expectation_classes {
|
||||
SIP_EXPECT_SIGNALLING,
|
||||
SIP_EXPECT_AUDIO,
|
||||
SIP_EXPECT_VIDEO,
|
||||
SIP_EXPECT_IMAGE,
|
||||
__SIP_EXPECT_MAX
|
||||
};
|
||||
#define SIP_EXPECT_MAX (__SIP_EXPECT_MAX - 1)
|
||||
@@ -34,10 +35,10 @@ struct sdp_media_type {
|
||||
struct sip_handler {
|
||||
const char *method;
|
||||
unsigned int len;
|
||||
int (*request)(struct sk_buff *skb,
|
||||
int (*request)(struct sk_buff *skb, unsigned int dataoff,
|
||||
const char **dptr, unsigned int *datalen,
|
||||
unsigned int cseq);
|
||||
int (*response)(struct sk_buff *skb,
|
||||
int (*response)(struct sk_buff *skb, unsigned int dataoff,
|
||||
const char **dptr, unsigned int *datalen,
|
||||
unsigned int cseq, unsigned int code);
|
||||
};
|
||||
@@ -84,7 +85,8 @@ enum sip_header_types {
|
||||
SIP_HDR_FROM,
|
||||
SIP_HDR_TO,
|
||||
SIP_HDR_CONTACT,
|
||||
SIP_HDR_VIA,
|
||||
SIP_HDR_VIA_UDP,
|
||||
SIP_HDR_VIA_TCP,
|
||||
SIP_HDR_EXPIRES,
|
||||
SIP_HDR_CONTENT_LENGTH,
|
||||
};
|
||||
@@ -100,33 +102,40 @@ enum sdp_header_types {
|
||||
};
|
||||
|
||||
extern unsigned int (*nf_nat_sip_hook)(struct sk_buff *skb,
|
||||
unsigned int dataoff,
|
||||
const char **dptr,
|
||||
unsigned int *datalen);
|
||||
extern void (*nf_nat_sip_seq_adjust_hook)(struct sk_buff *skb, s16 off);
|
||||
extern unsigned int (*nf_nat_sip_expect_hook)(struct sk_buff *skb,
|
||||
unsigned int dataoff,
|
||||
const char **dptr,
|
||||
unsigned int *datalen,
|
||||
struct nf_conntrack_expect *exp,
|
||||
unsigned int matchoff,
|
||||
unsigned int matchlen);
|
||||
extern unsigned int (*nf_nat_sdp_addr_hook)(struct sk_buff *skb,
|
||||
const char **dptr,
|
||||
unsigned int dataoff,
|
||||
const char **dptr,
|
||||
unsigned int *datalen,
|
||||
unsigned int sdpoff,
|
||||
enum sdp_header_types type,
|
||||
enum sdp_header_types term,
|
||||
const union nf_inet_addr *addr);
|
||||
extern unsigned int (*nf_nat_sdp_port_hook)(struct sk_buff *skb,
|
||||
unsigned int dataoff,
|
||||
const char **dptr,
|
||||
unsigned int *datalen,
|
||||
unsigned int matchoff,
|
||||
unsigned int matchlen,
|
||||
u_int16_t port);
|
||||
extern unsigned int (*nf_nat_sdp_session_hook)(struct sk_buff *skb,
|
||||
const char **dptr,
|
||||
unsigned int dataoff,
|
||||
const char **dptr,
|
||||
unsigned int *datalen,
|
||||
unsigned int sdpoff,
|
||||
const union nf_inet_addr *addr);
|
||||
extern unsigned int (*nf_nat_sdp_media_hook)(struct sk_buff *skb,
|
||||
unsigned int dataoff,
|
||||
const char **dptr,
|
||||
unsigned int *datalen,
|
||||
struct nf_conntrack_expect *rtp_exp,
|
||||
|
||||
@@ -73,11 +73,11 @@ struct nfnetlink_subsystem {
|
||||
extern int nfnetlink_subsys_register(const struct nfnetlink_subsystem *n);
|
||||
extern int nfnetlink_subsys_unregister(const struct nfnetlink_subsystem *n);
|
||||
|
||||
extern int nfnetlink_has_listeners(unsigned int group);
|
||||
extern int nfnetlink_send(struct sk_buff *skb, u32 pid, unsigned group,
|
||||
extern int nfnetlink_has_listeners(struct net *net, unsigned int group);
|
||||
extern int nfnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, unsigned group,
|
||||
int echo, gfp_t flags);
|
||||
extern void nfnetlink_set_err(u32 pid, u32 group, int error);
|
||||
extern int nfnetlink_unicast(struct sk_buff *skb, u_int32_t pid, int flags);
|
||||
extern void nfnetlink_set_err(struct net *net, u32 pid, u32 group, int error);
|
||||
extern int nfnetlink_unicast(struct sk_buff *skb, struct net *net, u_int32_t pid, int flags);
|
||||
|
||||
extern void nfnl_lock(void);
|
||||
extern void nfnl_unlock(void);
|
||||
|
||||
@@ -40,6 +40,7 @@ enum ctattr_type {
|
||||
CTA_NAT_SEQ_ADJ_ORIG,
|
||||
CTA_NAT_SEQ_ADJ_REPLY,
|
||||
CTA_SECMARK,
|
||||
CTA_ZONE,
|
||||
__CTA_MAX
|
||||
};
|
||||
#define CTA_MAX (__CTA_MAX - 1)
|
||||
@@ -159,6 +160,7 @@ enum ctattr_expect {
|
||||
CTA_EXPECT_TIMEOUT,
|
||||
CTA_EXPECT_ID,
|
||||
CTA_EXPECT_HELP_NAME,
|
||||
CTA_EXPECT_ZONE,
|
||||
__CTA_EXPECT_MAX
|
||||
};
|
||||
#define CTA_EXPECT_MAX (__CTA_EXPECT_MAX - 1)
|
||||
|
||||
@@ -93,8 +93,7 @@ struct _xt_align {
|
||||
__u64 u64;
|
||||
};
|
||||
|
||||
#define XT_ALIGN(s) (((s) + (__alignof__(struct _xt_align)-1)) \
|
||||
& ~(__alignof__(struct _xt_align)-1))
|
||||
#define XT_ALIGN(s) ALIGN((s), __alignof__(struct _xt_align))
|
||||
|
||||
/* Standard return verdict, or do jump. */
|
||||
#define XT_STANDARD_TARGET ""
|
||||
@@ -121,6 +120,7 @@ struct xt_counters_info {
|
||||
|
||||
#define XT_INV_PROTO 0x40 /* Invert the sense of PROTO. */
|
||||
|
||||
#ifndef __KERNEL__
|
||||
/* fn returns 0 to continue iteration */
|
||||
#define XT_MATCH_ITERATE(type, e, fn, args...) \
|
||||
({ \
|
||||
@@ -164,6 +164,22 @@ struct xt_counters_info {
|
||||
#define XT_ENTRY_ITERATE(type, entries, size, fn, args...) \
|
||||
XT_ENTRY_ITERATE_CONTINUE(type, entries, size, 0, fn, args)
|
||||
|
||||
#endif /* !__KERNEL__ */
|
||||
|
||||
/* pos is normally a struct ipt_entry/ip6t_entry/etc. */
|
||||
#define xt_entry_foreach(pos, ehead, esize) \
|
||||
for ((pos) = (typeof(pos))(ehead); \
|
||||
(pos) < (typeof(pos))((char *)(ehead) + (esize)); \
|
||||
(pos) = (typeof(pos))((char *)(pos) + (pos)->next_offset))
|
||||
|
||||
/* can only be xt_entry_match, so no use of typeof here */
|
||||
#define xt_ematch_foreach(pos, entry) \
|
||||
for ((pos) = (struct xt_entry_match *)entry->elems; \
|
||||
(pos) < (struct xt_entry_match *)((char *)(entry) + \
|
||||
(entry)->target_offset); \
|
||||
(pos) = (struct xt_entry_match *)((char *)(pos) + \
|
||||
(pos)->u.match_size))
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#include <linux/netdevice.h>
|
||||
@@ -205,6 +221,7 @@ struct xt_match_param {
|
||||
* @hook_mask: via which hooks the new rule is reachable
|
||||
*/
|
||||
struct xt_mtchk_param {
|
||||
struct net *net;
|
||||
const char *table;
|
||||
const void *entryinfo;
|
||||
const struct xt_match *match;
|
||||
@@ -215,6 +232,7 @@ struct xt_mtchk_param {
|
||||
|
||||
/* Match destructor parameters */
|
||||
struct xt_mtdtor_param {
|
||||
struct net *net;
|
||||
const struct xt_match *match;
|
||||
void *matchinfo;
|
||||
u_int8_t family;
|
||||
@@ -247,6 +265,7 @@ struct xt_target_param {
|
||||
* Other fields see above.
|
||||
*/
|
||||
struct xt_tgchk_param {
|
||||
struct net *net;
|
||||
const char *table;
|
||||
const void *entryinfo;
|
||||
const struct xt_target *target;
|
||||
@@ -257,6 +276,7 @@ struct xt_tgchk_param {
|
||||
|
||||
/* Target destructor parameters */
|
||||
struct xt_tgdtor_param {
|
||||
struct net *net;
|
||||
const struct xt_target *target;
|
||||
void *targinfo;
|
||||
u_int8_t family;
|
||||
@@ -281,11 +301,11 @@ struct xt_match {
|
||||
|
||||
/* Called when entry of this type deleted. */
|
||||
void (*destroy)(const struct xt_mtdtor_param *);
|
||||
|
||||
#ifdef CONFIG_COMPAT
|
||||
/* Called when userspace align differs from kernel space one */
|
||||
void (*compat_from_user)(void *dst, void *src);
|
||||
int (*compat_to_user)(void __user *dst, void *src);
|
||||
|
||||
void (*compat_from_user)(void *dst, const void *src);
|
||||
int (*compat_to_user)(void __user *dst, const void *src);
|
||||
#endif
|
||||
/* Set this to THIS_MODULE if you are a module, otherwise NULL */
|
||||
struct module *me;
|
||||
|
||||
@@ -294,7 +314,9 @@ struct xt_match {
|
||||
|
||||
const char *table;
|
||||
unsigned int matchsize;
|
||||
#ifdef CONFIG_COMPAT
|
||||
unsigned int compatsize;
|
||||
#endif
|
||||
unsigned int hooks;
|
||||
unsigned short proto;
|
||||
|
||||
@@ -321,17 +343,19 @@ struct xt_target {
|
||||
|
||||
/* Called when entry of this type deleted. */
|
||||
void (*destroy)(const struct xt_tgdtor_param *);
|
||||
|
||||
#ifdef CONFIG_COMPAT
|
||||
/* Called when userspace align differs from kernel space one */
|
||||
void (*compat_from_user)(void *dst, void *src);
|
||||
int (*compat_to_user)(void __user *dst, void *src);
|
||||
|
||||
void (*compat_from_user)(void *dst, const void *src);
|
||||
int (*compat_to_user)(void __user *dst, const void *src);
|
||||
#endif
|
||||
/* Set this to THIS_MODULE if you are a module, otherwise NULL */
|
||||
struct module *me;
|
||||
|
||||
const char *table;
|
||||
unsigned int targetsize;
|
||||
#ifdef CONFIG_COMPAT
|
||||
unsigned int compatsize;
|
||||
#endif
|
||||
unsigned int hooks;
|
||||
unsigned short proto;
|
||||
|
||||
@@ -353,6 +377,7 @@ struct xt_table {
|
||||
struct module *me;
|
||||
|
||||
u_int8_t af; /* address/protocol family */
|
||||
int priority; /* hook order */
|
||||
|
||||
/* A unique name... */
|
||||
const char name[XT_TABLE_MAXNAMELEN];
|
||||
@@ -514,6 +539,9 @@ static inline unsigned long ifname_compare_aligned(const char *_a,
|
||||
return ret;
|
||||
}
|
||||
|
||||
extern struct nf_hook_ops *xt_hook_link(const struct xt_table *, nf_hookfn *);
|
||||
extern void xt_hook_unlink(const struct xt_table *, struct nf_hook_ops *);
|
||||
|
||||
#ifdef CONFIG_COMPAT
|
||||
#include <net/compat.h>
|
||||
|
||||
@@ -554,11 +582,7 @@ struct compat_xt_entry_target {
|
||||
* current task alignment */
|
||||
|
||||
struct compat_xt_counters {
|
||||
#if defined(CONFIG_X86_64) || defined(CONFIG_IA64)
|
||||
u_int32_t cnt[4];
|
||||
#else
|
||||
u_int64_t cnt[2];
|
||||
#endif
|
||||
compat_u64 pcnt, bcnt; /* Packet and byte counters */
|
||||
};
|
||||
|
||||
struct compat_xt_counters_info {
|
||||
@@ -567,26 +591,32 @@ struct compat_xt_counters_info {
|
||||
struct compat_xt_counters counters[0];
|
||||
};
|
||||
|
||||
#define COMPAT_XT_ALIGN(s) (((s) + (__alignof__(struct compat_xt_counters)-1)) \
|
||||
& ~(__alignof__(struct compat_xt_counters)-1))
|
||||
struct _compat_xt_align {
|
||||
__u8 u8;
|
||||
__u16 u16;
|
||||
__u32 u32;
|
||||
compat_u64 u64;
|
||||
};
|
||||
|
||||
#define COMPAT_XT_ALIGN(s) ALIGN((s), __alignof__(struct _compat_xt_align))
|
||||
|
||||
extern void xt_compat_lock(u_int8_t af);
|
||||
extern void xt_compat_unlock(u_int8_t af);
|
||||
|
||||
extern int xt_compat_add_offset(u_int8_t af, unsigned int offset, short delta);
|
||||
extern void xt_compat_flush_offsets(u_int8_t af);
|
||||
extern short xt_compat_calc_jump(u_int8_t af, unsigned int offset);
|
||||
extern int xt_compat_calc_jump(u_int8_t af, unsigned int offset);
|
||||
|
||||
extern int xt_compat_match_offset(const struct xt_match *match);
|
||||
extern int xt_compat_match_from_user(struct xt_entry_match *m,
|
||||
void **dstptr, unsigned int *size);
|
||||
extern int xt_compat_match_to_user(struct xt_entry_match *m,
|
||||
extern int xt_compat_match_to_user(const struct xt_entry_match *m,
|
||||
void __user **dstptr, unsigned int *size);
|
||||
|
||||
extern int xt_compat_target_offset(const struct xt_target *target);
|
||||
extern void xt_compat_target_from_user(struct xt_entry_target *t,
|
||||
void **dstptr, unsigned int *size);
|
||||
extern int xt_compat_target_to_user(struct xt_entry_target *t,
|
||||
extern int xt_compat_target_to_user(const struct xt_entry_target *t,
|
||||
void __user **dstptr, unsigned int *size);
|
||||
|
||||
#endif /* CONFIG_COMPAT */
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#ifndef _XT_CT_H
|
||||
#define _XT_CT_H
|
||||
|
||||
#define XT_CT_NOTRACK 0x1
|
||||
|
||||
struct xt_ct_target_info {
|
||||
u_int16_t flags;
|
||||
u_int16_t zone;
|
||||
u_int32_t ct_events;
|
||||
u_int32_t exp_events;
|
||||
char helper[16];
|
||||
|
||||
/* Used internally by the kernel */
|
||||
struct nf_conn *ct __attribute__((aligned(8)));
|
||||
};
|
||||
|
||||
#endif /* _XT_CT_H */
|
||||
@@ -211,9 +211,11 @@ static __inline__ struct arpt_entry_target *arpt_get_target(struct arpt_entry *e
|
||||
return (void *)e + e->target_offset;
|
||||
}
|
||||
|
||||
#ifndef __KERNEL__
|
||||
/* fn returns 0 to continue iteration */
|
||||
#define ARPT_ENTRY_ITERATE(entries, size, fn, args...) \
|
||||
XT_ENTRY_ITERATE(struct arpt_entry, entries, size, fn, ## args)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Main firewall chains definitions and global var's definitions.
|
||||
@@ -258,6 +260,7 @@ struct arpt_error {
|
||||
.target.errorname = "ERROR", \
|
||||
}
|
||||
|
||||
extern void *arpt_alloc_initial_table(const struct xt_table *);
|
||||
extern struct xt_table *arpt_register_table(struct net *net,
|
||||
const struct xt_table *table,
|
||||
const struct arpt_replace *repl);
|
||||
@@ -290,14 +293,6 @@ compat_arpt_get_target(struct compat_arpt_entry *e)
|
||||
|
||||
#define COMPAT_ARPT_ALIGN(s) COMPAT_XT_ALIGN(s)
|
||||
|
||||
/* fn returns 0 to continue iteration */
|
||||
#define COMPAT_ARPT_ENTRY_ITERATE(entries, size, fn, args...) \
|
||||
XT_ENTRY_ITERATE(struct compat_arpt_entry, entries, size, fn, ## args)
|
||||
|
||||
#define COMPAT_ARPT_ENTRY_ITERATE_CONTINUE(entries, size, n, fn, args...) \
|
||||
XT_ENTRY_ITERATE_CONTINUE(struct compat_arpt_entry, entries, size, n, \
|
||||
fn, ## args)
|
||||
|
||||
#endif /* CONFIG_COMPAT */
|
||||
#endif /*__KERNEL__*/
|
||||
#endif /* _ARPTABLES_H */
|
||||
|
||||
@@ -289,7 +289,7 @@ struct ebt_table {
|
||||
~(__alignof__(struct ebt_replace)-1))
|
||||
extern struct ebt_table *ebt_register_table(struct net *net,
|
||||
const struct ebt_table *table);
|
||||
extern void ebt_unregister_table(struct ebt_table *table);
|
||||
extern void ebt_unregister_table(struct net *net, struct ebt_table *table);
|
||||
extern unsigned int ebt_do_table(unsigned int hook, struct sk_buff *skb,
|
||||
const struct net_device *in, const struct net_device *out,
|
||||
struct ebt_table *table);
|
||||
|
||||
@@ -223,6 +223,7 @@ ipt_get_target(struct ipt_entry *e)
|
||||
return (void *)e + e->target_offset;
|
||||
}
|
||||
|
||||
#ifndef __KERNEL__
|
||||
/* fn returns 0 to continue iteration */
|
||||
#define IPT_MATCH_ITERATE(e, fn, args...) \
|
||||
XT_MATCH_ITERATE(struct ipt_entry, e, fn, ## args)
|
||||
@@ -230,6 +231,7 @@ ipt_get_target(struct ipt_entry *e)
|
||||
/* fn returns 0 to continue iteration */
|
||||
#define IPT_ENTRY_ITERATE(entries, size, fn, args...) \
|
||||
XT_ENTRY_ITERATE(struct ipt_entry, entries, size, fn, ## args)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Main firewall chains definitions and global var's definitions.
|
||||
@@ -242,7 +244,7 @@ extern void ipt_init(void) __init;
|
||||
extern struct xt_table *ipt_register_table(struct net *net,
|
||||
const struct xt_table *table,
|
||||
const struct ipt_replace *repl);
|
||||
extern void ipt_unregister_table(struct xt_table *table);
|
||||
extern void ipt_unregister_table(struct net *net, struct xt_table *table);
|
||||
|
||||
/* Standard entry. */
|
||||
struct ipt_standard {
|
||||
@@ -282,6 +284,7 @@ struct ipt_error {
|
||||
.target.errorname = "ERROR", \
|
||||
}
|
||||
|
||||
extern void *ipt_alloc_initial_table(const struct xt_table *);
|
||||
extern unsigned int ipt_do_table(struct sk_buff *skb,
|
||||
unsigned int hook,
|
||||
const struct net_device *in,
|
||||
@@ -312,19 +315,6 @@ compat_ipt_get_target(struct compat_ipt_entry *e)
|
||||
|
||||
#define COMPAT_IPT_ALIGN(s) COMPAT_XT_ALIGN(s)
|
||||
|
||||
/* fn returns 0 to continue iteration */
|
||||
#define COMPAT_IPT_MATCH_ITERATE(e, fn, args...) \
|
||||
XT_MATCH_ITERATE(struct compat_ipt_entry, e, fn, ## args)
|
||||
|
||||
/* fn returns 0 to continue iteration */
|
||||
#define COMPAT_IPT_ENTRY_ITERATE(entries, size, fn, args...) \
|
||||
XT_ENTRY_ITERATE(struct compat_ipt_entry, entries, size, fn, ## args)
|
||||
|
||||
/* fn returns 0 to continue iteration */
|
||||
#define COMPAT_IPT_ENTRY_ITERATE_CONTINUE(entries, size, n, fn, args...) \
|
||||
XT_ENTRY_ITERATE_CONTINUE(struct compat_ipt_entry, entries, size, n, \
|
||||
fn, ## args)
|
||||
|
||||
#endif /* CONFIG_COMPAT */
|
||||
#endif /*__KERNEL__*/
|
||||
#endif /* _IPTABLES_H */
|
||||
|
||||
@@ -280,6 +280,7 @@ ip6t_get_target(struct ip6t_entry *e)
|
||||
return (void *)e + e->target_offset;
|
||||
}
|
||||
|
||||
#ifndef __KERNEL__
|
||||
/* fn returns 0 to continue iteration */
|
||||
#define IP6T_MATCH_ITERATE(e, fn, args...) \
|
||||
XT_MATCH_ITERATE(struct ip6t_entry, e, fn, ## args)
|
||||
@@ -287,6 +288,7 @@ ip6t_get_target(struct ip6t_entry *e)
|
||||
/* fn returns 0 to continue iteration */
|
||||
#define IP6T_ENTRY_ITERATE(entries, size, fn, args...) \
|
||||
XT_ENTRY_ITERATE(struct ip6t_entry, entries, size, fn, ## args)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Main firewall chains definitions and global var's definitions.
|
||||
@@ -297,10 +299,11 @@ ip6t_get_target(struct ip6t_entry *e)
|
||||
#include <linux/init.h>
|
||||
extern void ip6t_init(void) __init;
|
||||
|
||||
extern void *ip6t_alloc_initial_table(const struct xt_table *);
|
||||
extern struct xt_table *ip6t_register_table(struct net *net,
|
||||
const struct xt_table *table,
|
||||
const struct ip6t_replace *repl);
|
||||
extern void ip6t_unregister_table(struct xt_table *table);
|
||||
extern void ip6t_unregister_table(struct net *net, struct xt_table *table);
|
||||
extern unsigned int ip6t_do_table(struct sk_buff *skb,
|
||||
unsigned int hook,
|
||||
const struct net_device *in,
|
||||
@@ -340,18 +343,6 @@ compat_ip6t_get_target(struct compat_ip6t_entry *e)
|
||||
|
||||
#define COMPAT_IP6T_ALIGN(s) COMPAT_XT_ALIGN(s)
|
||||
|
||||
/* fn returns 0 to continue iteration */
|
||||
#define COMPAT_IP6T_MATCH_ITERATE(e, fn, args...) \
|
||||
XT_MATCH_ITERATE(struct compat_ip6t_entry, e, fn, ## args)
|
||||
|
||||
/* fn returns 0 to continue iteration */
|
||||
#define COMPAT_IP6T_ENTRY_ITERATE(entries, size, fn, args...) \
|
||||
XT_ENTRY_ITERATE(struct compat_ip6t_entry, entries, size, fn, ## args)
|
||||
|
||||
#define COMPAT_IP6T_ENTRY_ITERATE_CONTINUE(entries, size, n, fn, args...) \
|
||||
XT_ENTRY_ITERATE_CONTINUE(struct compat_ip6t_entry, entries, size, n, \
|
||||
fn, ## args)
|
||||
|
||||
#endif /* CONFIG_COMPAT */
|
||||
#endif /*__KERNEL__*/
|
||||
#endif /* _IP6_TABLES_H */
|
||||
|
||||
@@ -21,15 +21,20 @@ struct netpoll {
|
||||
__be32 local_ip, remote_ip;
|
||||
u16 local_port, remote_port;
|
||||
u8 remote_mac[ETH_ALEN];
|
||||
|
||||
struct list_head rx; /* rx_np list element */
|
||||
};
|
||||
|
||||
struct netpoll_info {
|
||||
atomic_t refcnt;
|
||||
|
||||
int rx_flags;
|
||||
spinlock_t rx_lock;
|
||||
struct netpoll *rx_np; /* netpoll that registered an rx_hook */
|
||||
struct list_head rx_np; /* netpolls that registered an rx_hook */
|
||||
|
||||
struct sk_buff_head arp_tx; /* list of arp requests to reply to */
|
||||
struct sk_buff_head txq;
|
||||
|
||||
struct delayed_work tx_work;
|
||||
};
|
||||
|
||||
@@ -51,7 +56,7 @@ static inline int netpoll_rx(struct sk_buff *skb)
|
||||
unsigned long flags;
|
||||
int ret = 0;
|
||||
|
||||
if (!npinfo || (!npinfo->rx_np && !npinfo->rx_flags))
|
||||
if (!npinfo || (list_empty(&npinfo->rx_np) && !npinfo->rx_flags))
|
||||
return 0;
|
||||
|
||||
spin_lock_irqsave(&npinfo->rx_lock, flags);
|
||||
@@ -67,7 +72,7 @@ static inline int netpoll_rx_on(struct sk_buff *skb)
|
||||
{
|
||||
struct netpoll_info *npinfo = skb->dev->npinfo;
|
||||
|
||||
return npinfo && (npinfo->rx_np || npinfo->rx_flags);
|
||||
return npinfo && (!list_empty(&npinfo->rx_np) || npinfo->rx_flags);
|
||||
}
|
||||
|
||||
static inline int netpoll_receive_skb(struct sk_buff *skb)
|
||||
|
||||
+1
-13
@@ -33,9 +33,6 @@
|
||||
#define FLUSH_STABLE 4 /* commit to stable storage */
|
||||
#define FLUSH_LOWPRI 8 /* low priority background flush */
|
||||
#define FLUSH_HIGHPRI 16 /* high priority memory reclaim flush */
|
||||
#define FLUSH_NOCOMMIT 32 /* Don't send the NFSv3/v4 COMMIT */
|
||||
#define FLUSH_INVALIDATE 64 /* Invalidate the page cache */
|
||||
#define FLUSH_NOWRITEPAGE 128 /* Don't call writepage() */
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
@@ -166,6 +163,7 @@ struct nfs_inode {
|
||||
struct radix_tree_root nfs_page_tree;
|
||||
|
||||
unsigned long npages;
|
||||
unsigned long ncommit;
|
||||
|
||||
/* Open contexts for shared mmap writes */
|
||||
struct list_head open_files;
|
||||
@@ -349,7 +347,6 @@ extern int nfs_attribute_timeout(struct inode *inode);
|
||||
extern int nfs_revalidate_inode(struct nfs_server *server, struct inode *inode);
|
||||
extern int __nfs_revalidate_inode(struct nfs_server *, struct inode *);
|
||||
extern int nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping);
|
||||
extern int nfs_revalidate_mapping_nolock(struct inode *inode, struct address_space *mapping);
|
||||
extern int nfs_setattr(struct dentry *, struct iattr *);
|
||||
extern void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr);
|
||||
extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx);
|
||||
@@ -477,21 +474,12 @@ extern int nfs_writeback_done(struct rpc_task *, struct nfs_write_data *);
|
||||
* Try to write back everything synchronously (but check the
|
||||
* return value!)
|
||||
*/
|
||||
extern long nfs_sync_mapping_wait(struct address_space *, struct writeback_control *, int);
|
||||
extern int nfs_wb_all(struct inode *inode);
|
||||
extern int nfs_wb_nocommit(struct inode *inode);
|
||||
extern int nfs_wb_page(struct inode *inode, struct page* page);
|
||||
extern int nfs_wb_page_cancel(struct inode *inode, struct page* page);
|
||||
#if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4)
|
||||
extern int nfs_commit_inode(struct inode *, int);
|
||||
extern struct nfs_write_data *nfs_commitdata_alloc(void);
|
||||
extern void nfs_commit_free(struct nfs_write_data *wdata);
|
||||
#else
|
||||
static inline int
|
||||
nfs_commit_inode(struct inode *inode, int how)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline int
|
||||
|
||||
@@ -105,7 +105,7 @@ struct nfs_server {
|
||||
struct rpc_clnt * client; /* RPC client handle */
|
||||
struct rpc_clnt * client_acl; /* ACL RPC client handle */
|
||||
struct nlm_host *nlm_host; /* NLM client handle */
|
||||
struct nfs_iostats * io_stats; /* I/O statistics */
|
||||
struct nfs_iostats __percpu *io_stats; /* I/O statistics */
|
||||
struct backing_dev_info backing_dev_info;
|
||||
atomic_long_t writeback; /* number of writeback pages */
|
||||
int flags; /* various flags */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user