Merge branch 'linus' into timers/hpet
This commit is contained in:
@@ -10,6 +10,7 @@ static inline u8 bitrev8(u8 byte)
|
||||
return byte_rev_table[byte];
|
||||
}
|
||||
|
||||
extern u16 bitrev16(u16 in);
|
||||
extern u32 bitrev32(u32 in);
|
||||
|
||||
#endif /* _LINUX_BITREV_H */
|
||||
|
@@ -55,6 +55,7 @@ enum blktrace_act {
|
||||
enum blktrace_notify {
|
||||
__BLK_TN_PROCESS = 0, /* establish pid/name mapping */
|
||||
__BLK_TN_TIMESTAMP, /* include system clock */
|
||||
__BLK_TN_MESSAGE, /* Character string message */
|
||||
};
|
||||
|
||||
|
||||
@@ -79,6 +80,7 @@ enum blktrace_notify {
|
||||
|
||||
#define BLK_TN_PROCESS (__BLK_TN_PROCESS | BLK_TC_ACT(BLK_TC_NOTIFY))
|
||||
#define BLK_TN_TIMESTAMP (__BLK_TN_TIMESTAMP | BLK_TC_ACT(BLK_TC_NOTIFY))
|
||||
#define BLK_TN_MESSAGE (__BLK_TN_MESSAGE | BLK_TC_ACT(BLK_TC_NOTIFY))
|
||||
|
||||
#define BLK_IO_TRACE_MAGIC 0x65617400
|
||||
#define BLK_IO_TRACE_VERSION 0x07
|
||||
@@ -119,6 +121,7 @@ struct blk_trace {
|
||||
int trace_state;
|
||||
struct rchan *rchan;
|
||||
unsigned long *sequence;
|
||||
unsigned char *msg_data;
|
||||
u16 act_mask;
|
||||
u64 start_lba;
|
||||
u64 end_lba;
|
||||
@@ -149,7 +152,28 @@ extern void blk_trace_shutdown(struct request_queue *);
|
||||
extern void __blk_add_trace(struct blk_trace *, sector_t, int, int, u32, int, int, void *);
|
||||
extern int do_blk_trace_setup(struct request_queue *q,
|
||||
char *name, dev_t dev, struct blk_user_trace_setup *buts);
|
||||
extern void __trace_note_message(struct blk_trace *, const char *fmt, ...);
|
||||
|
||||
/**
|
||||
* blk_add_trace_msg - Add a (simple) message to the blktrace stream
|
||||
* @q: queue the io is for
|
||||
* @fmt: format to print message in
|
||||
* args... Variable argument list for format
|
||||
*
|
||||
* Description:
|
||||
* Records a (simple) message onto the blktrace stream.
|
||||
*
|
||||
* NOTE: BLK_TN_MAX_MSG characters are output at most.
|
||||
* NOTE: Can not use 'static inline' due to presence of var args...
|
||||
*
|
||||
**/
|
||||
#define blk_add_trace_msg(q, fmt, ...) \
|
||||
do { \
|
||||
struct blk_trace *bt = (q)->blk_trace; \
|
||||
if (unlikely(bt)) \
|
||||
__trace_note_message(bt, fmt, ##__VA_ARGS__); \
|
||||
} while (0)
|
||||
#define BLK_TN_MAX_MSG 128
|
||||
|
||||
/**
|
||||
* blk_add_trace_rq - Add a trace for a request oriented action
|
||||
@@ -299,6 +323,8 @@ extern int blk_trace_remove(struct request_queue *q);
|
||||
#define blk_trace_setup(q, name, dev, arg) (-ENOTTY)
|
||||
#define blk_trace_startstop(q, start) (-ENOTTY)
|
||||
#define blk_trace_remove(q) (-ENOTTY)
|
||||
#define blk_add_trace_msg(q, fmt, ...) do { } while (0)
|
||||
|
||||
#endif /* CONFIG_BLK_DEV_IO_TRACE */
|
||||
#endif /* __KERNEL__ */
|
||||
#endif
|
||||
|
@@ -31,11 +31,11 @@ struct task_struct;
|
||||
#define _LINUX_CAPABILITY_VERSION_1 0x19980330
|
||||
#define _LINUX_CAPABILITY_U32S_1 1
|
||||
|
||||
#define _LINUX_CAPABILITY_VERSION_2 0x20071026
|
||||
#define _LINUX_CAPABILITY_VERSION_2 0x20071026 /* deprecated - use v3 */
|
||||
#define _LINUX_CAPABILITY_U32S_2 2
|
||||
|
||||
#define _LINUX_CAPABILITY_VERSION _LINUX_CAPABILITY_VERSION_2
|
||||
#define _LINUX_CAPABILITY_U32S _LINUX_CAPABILITY_U32S_2
|
||||
#define _LINUX_CAPABILITY_VERSION_3 0x20080522
|
||||
#define _LINUX_CAPABILITY_U32S_3 2
|
||||
|
||||
typedef struct __user_cap_header_struct {
|
||||
__u32 version;
|
||||
@@ -77,10 +77,23 @@ struct vfs_cap_data {
|
||||
} data[VFS_CAP_U32];
|
||||
};
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#ifndef __KERNEL__
|
||||
|
||||
/*
|
||||
* Backwardly compatible definition for source code - trapped in a
|
||||
* 32-bit world. If you find you need this, please consider using
|
||||
* libcap to untrap yourself...
|
||||
*/
|
||||
#define _LINUX_CAPABILITY_VERSION _LINUX_CAPABILITY_VERSION_1
|
||||
#define _LINUX_CAPABILITY_U32S _LINUX_CAPABILITY_U32S_1
|
||||
|
||||
#else
|
||||
|
||||
#define _KERNEL_CAPABILITY_VERSION _LINUX_CAPABILITY_VERSION_3
|
||||
#define _KERNEL_CAPABILITY_U32S _LINUX_CAPABILITY_U32S_3
|
||||
|
||||
typedef struct kernel_cap_struct {
|
||||
__u32 cap[_LINUX_CAPABILITY_U32S];
|
||||
__u32 cap[_KERNEL_CAPABILITY_U32S];
|
||||
} kernel_cap_t;
|
||||
|
||||
#define _USER_CAP_HEADER_SIZE (sizeof(struct __user_cap_header_struct))
|
||||
@@ -351,7 +364,7 @@ typedef struct kernel_cap_struct {
|
||||
*/
|
||||
|
||||
#define CAP_FOR_EACH_U32(__capi) \
|
||||
for (__capi = 0; __capi < _LINUX_CAPABILITY_U32S; ++__capi)
|
||||
for (__capi = 0; __capi < _KERNEL_CAPABILITY_U32S; ++__capi)
|
||||
|
||||
# define CAP_FS_MASK_B0 (CAP_TO_MASK(CAP_CHOWN) \
|
||||
| CAP_TO_MASK(CAP_DAC_OVERRIDE) \
|
||||
@@ -361,7 +374,7 @@ typedef struct kernel_cap_struct {
|
||||
|
||||
# define CAP_FS_MASK_B1 (CAP_TO_MASK(CAP_MAC_OVERRIDE))
|
||||
|
||||
#if _LINUX_CAPABILITY_U32S != 2
|
||||
#if _KERNEL_CAPABILITY_U32S != 2
|
||||
# error Fix up hand-coded capability macro initializers
|
||||
#else /* HAND-CODED capability initializers */
|
||||
|
||||
@@ -372,7 +385,7 @@ typedef struct kernel_cap_struct {
|
||||
# define CAP_NFSD_SET ((kernel_cap_t){{ CAP_FS_MASK_B0|CAP_TO_MASK(CAP_SYS_RESOURCE), \
|
||||
CAP_FS_MASK_B1 } })
|
||||
|
||||
#endif /* _LINUX_CAPABILITY_U32S != 2 */
|
||||
#endif /* _KERNEL_CAPABILITY_U32S != 2 */
|
||||
|
||||
#define CAP_INIT_INH_SET CAP_EMPTY_SET
|
||||
|
||||
|
@@ -82,6 +82,7 @@ struct cpuidle_state_kobj {
|
||||
};
|
||||
|
||||
struct cpuidle_device {
|
||||
unsigned int registered:1;
|
||||
unsigned int enabled:1;
|
||||
unsigned int cpu;
|
||||
|
||||
|
@@ -385,6 +385,9 @@ static inline const char *dev_name(struct device *dev)
|
||||
return dev->bus_id;
|
||||
}
|
||||
|
||||
extern int dev_set_name(struct device *dev, const char *name, ...)
|
||||
__attribute__((format(printf, 2, 3)));
|
||||
|
||||
#ifdef CONFIG_NUMA
|
||||
static inline int dev_to_node(struct device *dev)
|
||||
{
|
||||
|
@@ -2000,7 +2000,10 @@ extern int simple_fill_super(struct super_block *, int, struct tree_descr *);
|
||||
extern int simple_pin_fs(struct file_system_type *, struct vfsmount **mount, int *count);
|
||||
extern void simple_release_fs(struct vfsmount **mount, int *count);
|
||||
|
||||
extern ssize_t simple_read_from_buffer(void __user *, size_t, loff_t *, const void *, size_t);
|
||||
extern ssize_t simple_read_from_buffer(void __user *to, size_t count,
|
||||
loff_t *ppos, const void *from, size_t available);
|
||||
extern ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos,
|
||||
const void *from, size_t available);
|
||||
|
||||
#ifdef CONFIG_MIGRATION
|
||||
extern int buffer_migrate_page(struct address_space *,
|
||||
|
@@ -153,7 +153,7 @@ enum { ide_unknown, ide_generic, ide_pci,
|
||||
ide_qd65xx, ide_umc8672, ide_ht6560b,
|
||||
ide_rz1000, ide_trm290,
|
||||
ide_cmd646, ide_cy82c693, ide_4drives,
|
||||
ide_pmac, ide_etrax100, ide_acorn,
|
||||
ide_pmac, ide_acorn,
|
||||
ide_au1xxx, ide_palm3710
|
||||
};
|
||||
|
||||
|
@@ -10,19 +10,19 @@
|
||||
#define RTCF_NOPMTUDISC RTM_F_NOPMTUDISC
|
||||
|
||||
#define RTCF_NOTIFY 0x00010000
|
||||
#define RTCF_DIRECTDST 0x00020000
|
||||
#define RTCF_DIRECTDST 0x00020000 /* unused */
|
||||
#define RTCF_REDIRECTED 0x00040000
|
||||
#define RTCF_TPROXY 0x00080000
|
||||
#define RTCF_TPROXY 0x00080000 /* unused */
|
||||
|
||||
#define RTCF_FAST 0x00200000
|
||||
#define RTCF_MASQ 0x00400000
|
||||
#define RTCF_SNAT 0x00800000
|
||||
#define RTCF_FAST 0x00200000 /* unused */
|
||||
#define RTCF_MASQ 0x00400000 /* unused */
|
||||
#define RTCF_SNAT 0x00800000 /* unused */
|
||||
#define RTCF_DOREDIRECT 0x01000000
|
||||
#define RTCF_DIRECTSRC 0x04000000
|
||||
#define RTCF_DNAT 0x08000000
|
||||
#define RTCF_BROADCAST 0x10000000
|
||||
#define RTCF_MULTICAST 0x20000000
|
||||
#define RTCF_REJECT 0x40000000
|
||||
#define RTCF_REJECT 0x40000000 /* unused */
|
||||
#define RTCF_LOCAL 0x80000000
|
||||
|
||||
#define RTCF_NAT (RTCF_DNAT|RTCF_SNAT)
|
||||
|
@@ -117,7 +117,6 @@ struct in_ifaddr
|
||||
__be32 ifa_address;
|
||||
__be32 ifa_mask;
|
||||
__be32 ifa_broadcast;
|
||||
__be32 ifa_anycast;
|
||||
unsigned char ifa_scope;
|
||||
unsigned char ifa_flags;
|
||||
unsigned char ifa_prefixlen;
|
||||
|
@@ -637,7 +637,9 @@ struct input_absinfo {
|
||||
#define SW_LID 0x00 /* set = lid shut */
|
||||
#define SW_TABLET_MODE 0x01 /* set = tablet mode */
|
||||
#define SW_HEADPHONE_INSERT 0x02 /* set = inserted */
|
||||
#define SW_RADIO 0x03 /* set = radio enabled */
|
||||
#define SW_RFKILL_ALL 0x03 /* rfkill master switch, type "any"
|
||||
set = radio enabled */
|
||||
#define SW_RADIO SW_RFKILL_ALL /* deprecated */
|
||||
#define SW_MAX 0x0f
|
||||
#define SW_CNT (SW_MAX+1)
|
||||
|
||||
|
@@ -53,14 +53,14 @@ struct resource_list {
|
||||
#define IORESOURCE_AUTO 0x40000000
|
||||
#define IORESOURCE_BUSY 0x80000000 /* Driver has marked this resource busy */
|
||||
|
||||
/* ISA PnP IRQ specific bits (IORESOURCE_BITS) */
|
||||
/* PnP IRQ specific bits (IORESOURCE_BITS) */
|
||||
#define IORESOURCE_IRQ_HIGHEDGE (1<<0)
|
||||
#define IORESOURCE_IRQ_LOWEDGE (1<<1)
|
||||
#define IORESOURCE_IRQ_HIGHLEVEL (1<<2)
|
||||
#define IORESOURCE_IRQ_LOWLEVEL (1<<3)
|
||||
#define IORESOURCE_IRQ_SHAREABLE (1<<4)
|
||||
|
||||
/* ISA PnP DMA specific bits (IORESOURCE_BITS) */
|
||||
/* PnP DMA specific bits (IORESOURCE_BITS) */
|
||||
#define IORESOURCE_DMA_TYPE_MASK (3<<0)
|
||||
#define IORESOURCE_DMA_8BIT (0<<0)
|
||||
#define IORESOURCE_DMA_8AND16BIT (1<<0)
|
||||
@@ -76,7 +76,7 @@ struct resource_list {
|
||||
#define IORESOURCE_DMA_TYPEB (2<<6)
|
||||
#define IORESOURCE_DMA_TYPEF (3<<6)
|
||||
|
||||
/* ISA PnP memory I/O specific bits (IORESOURCE_BITS) */
|
||||
/* PnP memory I/O specific bits (IORESOURCE_BITS) */
|
||||
#define IORESOURCE_MEM_WRITEABLE (1<<0) /* dup: IORESOURCE_READONLY */
|
||||
#define IORESOURCE_MEM_CACHEABLE (1<<1) /* dup: IORESOURCE_CACHEABLE */
|
||||
#define IORESOURCE_MEM_RANGELENGTH (1<<2) /* dup: IORESOURCE_RANGELENGTH */
|
||||
|
@@ -396,8 +396,10 @@ static inline struct request_sock *inet6_reqsk_alloc(struct request_sock_ops *op
|
||||
{
|
||||
struct request_sock *req = reqsk_alloc(ops);
|
||||
|
||||
if (req != NULL)
|
||||
if (req != NULL) {
|
||||
inet_rsk(req)->inet6_rsk_offset = inet6_rsk_offset(req);
|
||||
inet6_rsk(req)->pktopts = NULL;
|
||||
}
|
||||
|
||||
return req;
|
||||
}
|
||||
|
@@ -919,6 +919,9 @@ struct journal_s
|
||||
struct proc_dir_entry *j_proc_entry;
|
||||
struct transaction_stats_s j_stats;
|
||||
|
||||
/* Failed journal commit ID */
|
||||
unsigned int j_failed_commit;
|
||||
|
||||
/*
|
||||
* An opaque pointer to fs-private information. ext3 puts its
|
||||
* superblock pointer here
|
||||
|
@@ -297,7 +297,7 @@ static inline gpa_t gfn_to_gpa(gfn_t gfn)
|
||||
return (gpa_t)gfn << PAGE_SHIFT;
|
||||
}
|
||||
|
||||
static inline void kvm_migrate_apic_timer(struct kvm_vcpu *vcpu)
|
||||
static inline void kvm_migrate_timers(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
set_bit(KVM_REQ_MIGRATE_TIMER, &vcpu->requests);
|
||||
}
|
||||
|
@@ -111,13 +111,10 @@ enum {
|
||||
/* various global constants */
|
||||
LIBATA_MAX_PRD = ATA_MAX_PRD / 2,
|
||||
LIBATA_DUMB_MAX_PRD = ATA_MAX_PRD / 4, /* Worst case */
|
||||
ATA_MAX_PORTS = 8,
|
||||
ATA_DEF_QUEUE = 1,
|
||||
/* tag ATA_MAX_QUEUE - 1 is reserved for internal commands */
|
||||
ATA_MAX_QUEUE = 32,
|
||||
ATA_TAG_INTERNAL = ATA_MAX_QUEUE - 1,
|
||||
ATA_MAX_BUS = 2,
|
||||
ATA_DEF_BUSY_WAIT = 10000,
|
||||
ATA_SHORT_PAUSE = (HZ >> 6) + 1,
|
||||
|
||||
ATAPI_MAX_DRAIN = 16 << 10,
|
||||
@@ -1435,7 +1432,8 @@ extern void ata_sff_qc_prep(struct ata_queued_cmd *qc);
|
||||
extern void ata_sff_dumb_qc_prep(struct ata_queued_cmd *qc);
|
||||
extern void ata_sff_dev_select(struct ata_port *ap, unsigned int device);
|
||||
extern u8 ata_sff_check_status(struct ata_port *ap);
|
||||
extern u8 ata_sff_altstatus(struct ata_port *ap);
|
||||
extern void ata_sff_pause(struct ata_port *ap);
|
||||
extern void ata_sff_dma_pause(struct ata_port *ap);
|
||||
extern int ata_sff_busy_sleep(struct ata_port *ap,
|
||||
unsigned long timeout_pat, unsigned long timeout);
|
||||
extern int ata_sff_wait_ready(struct ata_link *link, unsigned long deadline);
|
||||
@@ -1495,19 +1493,6 @@ extern int ata_pci_sff_init_one(struct pci_dev *pdev,
|
||||
struct scsi_host_template *sht, void *host_priv);
|
||||
#endif /* CONFIG_PCI */
|
||||
|
||||
/**
|
||||
* ata_sff_pause - Flush writes and pause 400 nanoseconds.
|
||||
* @ap: Port to wait for.
|
||||
*
|
||||
* LOCKING:
|
||||
* Inherited from caller.
|
||||
*/
|
||||
static inline void ata_sff_pause(struct ata_port *ap)
|
||||
{
|
||||
ata_sff_altstatus(ap);
|
||||
ndelay(400);
|
||||
}
|
||||
|
||||
/**
|
||||
* ata_sff_busy_wait - Wait for a port status register
|
||||
* @ap: Port to wait for.
|
||||
|
@@ -81,4 +81,25 @@ static inline s64 div_s64(s64 dividend, s32 divisor)
|
||||
}
|
||||
#endif
|
||||
|
||||
u32 iter_div_u64_rem(u64 dividend, u32 divisor, u64 *remainder);
|
||||
|
||||
static __always_inline u32
|
||||
__iter_div_u64_rem(u64 dividend, u32 divisor, u64 *remainder)
|
||||
{
|
||||
u32 ret = 0;
|
||||
|
||||
while (dividend >= divisor) {
|
||||
/* The following asm() prevents the compiler from
|
||||
optimising this loop into a modulo operation. */
|
||||
asm("" : "+rm"(dividend));
|
||||
|
||||
dividend -= divisor;
|
||||
ret++;
|
||||
}
|
||||
|
||||
*remainder = dividend;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif /* _LINUX_MATH64_H */
|
||||
|
@@ -77,14 +77,6 @@ extern int __add_pages(struct zone *zone, unsigned long start_pfn,
|
||||
extern int __remove_pages(struct zone *zone, unsigned long start_pfn,
|
||||
unsigned long nr_pages);
|
||||
|
||||
/*
|
||||
* Walk through all memory which is registered as resource.
|
||||
* arg is (start_pfn, nr_pages, private_arg_pointer)
|
||||
*/
|
||||
extern int walk_memory_resource(unsigned long start_pfn,
|
||||
unsigned long nr_pages, void *arg,
|
||||
int (*func)(unsigned long, unsigned long, void *));
|
||||
|
||||
#ifdef CONFIG_NUMA
|
||||
extern int memory_add_physaddr_to_nid(u64 start);
|
||||
#else
|
||||
@@ -199,6 +191,14 @@ static inline void register_page_bootmem_info_node(struct pglist_data *pgdat)
|
||||
|
||||
#endif /* ! CONFIG_MEMORY_HOTPLUG */
|
||||
|
||||
/*
|
||||
* Walk through all memory which is registered as resource.
|
||||
* arg is (start_pfn, nr_pages, private_arg_pointer)
|
||||
*/
|
||||
extern int walk_memory_resource(unsigned long start_pfn,
|
||||
unsigned long nr_pages, void *arg,
|
||||
int (*func)(unsigned long, unsigned long, void *));
|
||||
|
||||
extern int add_memory(int nid, u64 start, u64 size);
|
||||
extern int arch_add_memory(int nid, u64 start, u64 size);
|
||||
extern int remove_memory(u64 start, u64 size);
|
||||
|
@@ -760,16 +760,17 @@ unsigned long unmap_vmas(struct mmu_gather **tlb,
|
||||
* (see walk_page_range for more details)
|
||||
*/
|
||||
struct mm_walk {
|
||||
int (*pgd_entry)(pgd_t *, unsigned long, unsigned long, void *);
|
||||
int (*pud_entry)(pud_t *, unsigned long, unsigned long, void *);
|
||||
int (*pmd_entry)(pmd_t *, unsigned long, unsigned long, void *);
|
||||
int (*pte_entry)(pte_t *, unsigned long, unsigned long, void *);
|
||||
int (*pte_hole)(unsigned long, unsigned long, void *);
|
||||
int (*pgd_entry)(pgd_t *, unsigned long, unsigned long, struct mm_walk *);
|
||||
int (*pud_entry)(pud_t *, unsigned long, unsigned long, struct mm_walk *);
|
||||
int (*pmd_entry)(pmd_t *, unsigned long, unsigned long, struct mm_walk *);
|
||||
int (*pte_entry)(pte_t *, unsigned long, unsigned long, struct mm_walk *);
|
||||
int (*pte_hole)(unsigned long, unsigned long, struct mm_walk *);
|
||||
struct mm_struct *mm;
|
||||
void *private;
|
||||
};
|
||||
|
||||
int walk_page_range(const struct mm_struct *, unsigned long addr,
|
||||
unsigned long end, const struct mm_walk *walk,
|
||||
void *private);
|
||||
int walk_page_range(unsigned long addr, unsigned long end,
|
||||
struct mm_walk *walk);
|
||||
void free_pgd_range(struct mmu_gather **tlb, unsigned long addr,
|
||||
unsigned long end, unsigned long floor, unsigned long ceiling);
|
||||
void free_pgtables(struct mmu_gather **tlb, struct vm_area_struct *start_vma,
|
||||
|
@@ -57,12 +57,6 @@
|
||||
#define MSDOS_DOT ". " /* ".", padded to MSDOS_NAME chars */
|
||||
#define MSDOS_DOTDOT ".. " /* "..", padded to MSDOS_NAME chars */
|
||||
|
||||
/* media of boot sector */
|
||||
static inline int fat_valid_media(u8 media)
|
||||
{
|
||||
return 0xf8 <= media || media == 0xf0;
|
||||
}
|
||||
|
||||
#define FAT_FIRST_ENT(s, x) ((MSDOS_SB(s)->fat_bits == 32 ? 0x0FFFFF00 : \
|
||||
MSDOS_SB(s)->fat_bits == 16 ? 0xFF00 : 0xF00) | (x))
|
||||
|
||||
@@ -334,6 +328,12 @@ static inline void fatwchar_to16(__u8 *dst, const wchar_t *src, size_t len)
|
||||
#endif
|
||||
}
|
||||
|
||||
/* media of boot sector */
|
||||
static inline int fat_valid_media(u8 media)
|
||||
{
|
||||
return 0xf8 <= media || media == 0xf0;
|
||||
}
|
||||
|
||||
/* fat/cache.c */
|
||||
extern void fat_cache_inval_inode(struct inode *inode);
|
||||
extern int fat_get_cluster(struct inode *inode, int cluster,
|
||||
|
@@ -64,11 +64,11 @@ struct msginfo {
|
||||
#define MSGMNB 16384 /* <= INT_MAX */ /* default max size of a message queue */
|
||||
|
||||
/* unused */
|
||||
#define MSGPOOL (MSGMNI * MSGMNB) /* size in bytes of message pool */
|
||||
#define MSGPOOL (MSGMNI * MSGMNB / 1024) /* size in kbytes of message pool */
|
||||
#define MSGTQL MSGMNB /* number of system message headers */
|
||||
#define MSGMAP MSGMNB /* number of entries in message map */
|
||||
#define MSGSSZ 16 /* message segment size */
|
||||
#define __MSGSEG (MSGPOOL / MSGSSZ) /* max no. of segments */
|
||||
#define __MSGSEG ((MSGPOOL * 1024) / MSGSSZ) /* max no. of segments */
|
||||
#define MSGSEG (__MSGSEG <= 0xffff ? __MSGSEG : 0xffff)
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* linux/include/linux/mtd/nand.h
|
||||
*
|
||||
* Copyright (c) 2000 David Woodhouse <dwmw2@mvhi.com>
|
||||
* Copyright (c) 2000 David Woodhouse <dwmw2@infradead.org>
|
||||
* Steven J. Hill <sjhill@realitydiluted.com>
|
||||
* Thomas Gleixner <tglx@linutronix.de>
|
||||
*
|
||||
|
@@ -306,5 +306,29 @@ static inline void __ClearPageTail(struct page *page)
|
||||
}
|
||||
|
||||
#endif /* !PAGEFLAGS_EXTENDED */
|
||||
|
||||
#define PAGE_FLAGS (1 << PG_lru | 1 << PG_private | 1 << PG_locked | \
|
||||
1 << PG_buddy | 1 << PG_writeback | \
|
||||
1 << PG_slab | 1 << PG_swapcache | 1 << PG_active)
|
||||
|
||||
/*
|
||||
* Flags checked in bad_page(). Pages on the free list should not have
|
||||
* these flags set. It they are, there is a problem.
|
||||
*/
|
||||
#define PAGE_FLAGS_CLEAR_WHEN_BAD (PAGE_FLAGS | 1 << PG_reclaim | 1 << PG_dirty)
|
||||
|
||||
/*
|
||||
* Flags checked when a page is freed. Pages being freed should not have
|
||||
* these flags set. It they are, there is a problem.
|
||||
*/
|
||||
#define PAGE_FLAGS_CHECK_AT_FREE (PAGE_FLAGS | 1 << PG_reserved)
|
||||
|
||||
/*
|
||||
* Flags checked when a page is prepped for return by the page allocator.
|
||||
* Pages being prepped should not have these flags set. It they are, there
|
||||
* is a problem.
|
||||
*/
|
||||
#define PAGE_FLAGS_CHECK_AT_PREP (PAGE_FLAGS | 1 << PG_reserved | 1 << PG_dirty)
|
||||
|
||||
#endif /* !__GENERATING_BOUNDS_H */
|
||||
#endif /* PAGE_FLAGS_H */
|
||||
|
@@ -206,6 +206,7 @@ struct pci_dev {
|
||||
struct bin_attribute *rom_attr; /* attribute descriptor for sysfs ROM entry */
|
||||
int rom_attr_enabled; /* has display of the rom attribute been enabled? */
|
||||
struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */
|
||||
struct bin_attribute *res_attr_wc[DEVICE_COUNT_RESOURCE]; /* sysfs file for WC mapping of resources */
|
||||
#ifdef CONFIG_PCI_MSI
|
||||
struct list_head msi_list;
|
||||
#endif
|
||||
|
@@ -716,6 +716,7 @@
|
||||
#define PCI_DEVICE_ID_HP_CISSA 0x3220
|
||||
#define PCI_DEVICE_ID_HP_CISSC 0x3230
|
||||
#define PCI_DEVICE_ID_HP_CISSD 0x3238
|
||||
#define PCI_DEVICE_ID_HP_CISSE 0x323a
|
||||
#define PCI_DEVICE_ID_HP_ZX2_IOC 0x4031
|
||||
|
||||
#define PCI_VENDOR_ID_PCTECH 0x1042
|
||||
|
@@ -9,6 +9,8 @@
|
||||
|
||||
struct net;
|
||||
struct completion;
|
||||
struct mm_struct;
|
||||
|
||||
/*
|
||||
* The proc filesystem constants/structures
|
||||
*/
|
||||
@@ -101,8 +103,6 @@ extern spinlock_t proc_subdir_lock;
|
||||
extern void proc_root_init(void);
|
||||
extern void proc_misc_init(void);
|
||||
|
||||
struct mm_struct;
|
||||
|
||||
void proc_flush_task(struct task_struct *task);
|
||||
struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *);
|
||||
int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir);
|
||||
|
@@ -246,6 +246,7 @@ enum rt_class_t
|
||||
{
|
||||
RT_TABLE_UNSPEC=0,
|
||||
/* User defined values */
|
||||
RT_TABLE_COMPAT=252,
|
||||
RT_TABLE_DEFAULT=253,
|
||||
RT_TABLE_MAIN=254,
|
||||
RT_TABLE_LOCAL=255,
|
||||
@@ -267,10 +268,10 @@ enum rtattr_type_t
|
||||
RTA_PREFSRC,
|
||||
RTA_METRICS,
|
||||
RTA_MULTIPATH,
|
||||
RTA_PROTOINFO,
|
||||
RTA_PROTOINFO, /* no longer used */
|
||||
RTA_FLOW,
|
||||
RTA_CACHEINFO,
|
||||
RTA_SESSION,
|
||||
RTA_SESSION, /* no longer used */
|
||||
RTA_MP_ALGO, /* no longer used */
|
||||
RTA_TABLE,
|
||||
__RTA_MAX
|
||||
|
@@ -766,7 +766,6 @@ struct sched_domain {
|
||||
struct sched_domain *child; /* bottom domain must be null terminated */
|
||||
struct sched_group *groups; /* the balancing groups of the domain */
|
||||
cpumask_t span; /* span of all CPUs in this domain */
|
||||
int first_cpu; /* cache of the first cpu in this domain */
|
||||
unsigned long min_interval; /* Minimum balance interval ms */
|
||||
unsigned long max_interval; /* Maximum balance interval ms */
|
||||
unsigned int busy_factor; /* less balancing by factor if busy */
|
||||
@@ -2027,6 +2026,19 @@ static inline int fatal_signal_pending(struct task_struct *p)
|
||||
return signal_pending(p) && __fatal_signal_pending(p);
|
||||
}
|
||||
|
||||
static inline int signal_pending_state(long state, struct task_struct *p)
|
||||
{
|
||||
if (!(state & (TASK_INTERRUPTIBLE | TASK_WAKEKILL)))
|
||||
return 0;
|
||||
if (!signal_pending(p))
|
||||
return 0;
|
||||
|
||||
if (state & (__TASK_STOPPED | __TASK_TRACED))
|
||||
return 0;
|
||||
|
||||
return (state & TASK_INTERRUPTIBLE) || __fatal_signal_pending(p);
|
||||
}
|
||||
|
||||
static inline int need_resched(void)
|
||||
{
|
||||
return unlikely(test_thread_flag(TIF_NEED_RESCHED));
|
||||
|
@@ -192,6 +192,7 @@ struct uart_ops {
|
||||
void (*shutdown)(struct uart_port *);
|
||||
void (*set_termios)(struct uart_port *, struct ktermios *new,
|
||||
struct ktermios *old);
|
||||
void (*set_ldisc)(struct uart_port *);
|
||||
void (*pm)(struct uart_port *, unsigned int state,
|
||||
unsigned int oldstate);
|
||||
int (*set_wake)(struct uart_port *, unsigned int state);
|
||||
|
@@ -276,6 +276,17 @@ static inline void *kzalloc(size_t size, gfp_t flags)
|
||||
return kmalloc(size, flags | __GFP_ZERO);
|
||||
}
|
||||
|
||||
/**
|
||||
* kzalloc_node - allocate zeroed memory from a particular memory node.
|
||||
* @size: how many bytes of memory are required.
|
||||
* @flags: the type of memory to allocate (see kmalloc).
|
||||
* @node: memory node from which to allocate
|
||||
*/
|
||||
static inline void *kzalloc_node(size_t size, gfp_t flags, int node)
|
||||
{
|
||||
return kmalloc_node(size, flags | __GFP_ZERO, node);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SLABINFO
|
||||
extern const struct seq_operations slabinfo_op;
|
||||
ssize_t slabinfo_write(struct file *, const char __user *, size_t, loff_t *);
|
||||
|
@@ -1,6 +1,8 @@
|
||||
#ifndef __LINUX_SPI_MMC_SPI_H
|
||||
#define __LINUX_SPI_MMC_SPI_H
|
||||
|
||||
#include <linux/interrupt.h>
|
||||
|
||||
struct device;
|
||||
struct mmc_host;
|
||||
|
||||
|
@@ -100,7 +100,7 @@ extern char * nvram_get(const char *name);
|
||||
/* Get the device MAC address */
|
||||
static inline void ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr)
|
||||
{
|
||||
#ifdef CONFIG_BCM947XX
|
||||
#ifdef CONFIG_BCM47XX
|
||||
char *res = nvram_get("et0macaddr");
|
||||
if (res)
|
||||
memcpy(macaddr, res, 6);
|
||||
|
@@ -239,11 +239,6 @@ static inline struct tcp_request_sock *tcp_rsk(const struct request_sock *req)
|
||||
return (struct tcp_request_sock *)req;
|
||||
}
|
||||
|
||||
struct tcp_deferred_accept_info {
|
||||
struct sock *listen_sk;
|
||||
struct request_sock *request;
|
||||
};
|
||||
|
||||
struct tcp_sock {
|
||||
/* inet_connection_sock has to be the first member of tcp_sock */
|
||||
struct inet_connection_sock inet_conn;
|
||||
@@ -379,8 +374,6 @@ struct tcp_sock {
|
||||
unsigned int keepalive_intvl; /* time interval between keep alive probes */
|
||||
int linger2;
|
||||
|
||||
struct tcp_deferred_accept_info defer_tcp_accept;
|
||||
|
||||
unsigned long last_synq_overflow;
|
||||
|
||||
u32 tso_deferred;
|
||||
|
@@ -6,6 +6,7 @@
|
||||
#ifdef __KERNEL__
|
||||
# include <linux/cache.h>
|
||||
# include <linux/seqlock.h>
|
||||
# include <linux/math64.h>
|
||||
#endif
|
||||
|
||||
#ifndef _STRUCT_TIMESPEC
|
||||
@@ -169,18 +170,13 @@ extern struct timeval ns_to_timeval(const s64 nsec);
|
||||
* timespec_add_ns - Adds nanoseconds to a timespec
|
||||
* @a: pointer to timespec to be incremented
|
||||
* @ns: unsigned nanoseconds value to be added
|
||||
*
|
||||
* This must always be inlined because its used from the x86-64 vdso,
|
||||
* which cannot call other kernel functions.
|
||||
*/
|
||||
static inline void timespec_add_ns(struct timespec *a, u64 ns)
|
||||
static __always_inline void timespec_add_ns(struct timespec *a, u64 ns)
|
||||
{
|
||||
ns += a->tv_nsec;
|
||||
while(unlikely(ns >= NSEC_PER_SEC)) {
|
||||
/* The following asm() prevents the compiler from
|
||||
* optimising this loop into a modulo operation. */
|
||||
asm("" : "+r"(ns));
|
||||
|
||||
ns -= NSEC_PER_SEC;
|
||||
a->tv_sec++;
|
||||
}
|
||||
a->tv_sec += __iter_div_u64_rem(a->tv_nsec + ns, NSEC_PER_SEC, &ns);
|
||||
a->tv_nsec = ns;
|
||||
}
|
||||
#endif /* __KERNEL__ */
|
||||
|
@@ -166,7 +166,9 @@ void arch_update_cpu_topology(void);
|
||||
.busy_idx = 3, \
|
||||
.idle_idx = 3, \
|
||||
.flags = SD_LOAD_BALANCE \
|
||||
| SD_SERIALIZE, \
|
||||
| SD_BALANCE_NEWIDLE \
|
||||
| SD_WAKE_AFFINE \
|
||||
| SD_SERIALIZE, \
|
||||
.last_balance = jiffies, \
|
||||
.balance_interval = 64, \
|
||||
}
|
||||
|
@@ -36,7 +36,7 @@
|
||||
#define N_6PACK 7
|
||||
#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
|
||||
#define N_R3964 9 /* Reserved for Simatic R3964 module */
|
||||
#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
|
||||
#define N_PROFIBUS_FDL 10 /* Reserved for Profibus */
|
||||
#define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */
|
||||
#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data */
|
||||
/* cards about SMS messages */
|
||||
|
@@ -865,9 +865,9 @@ struct v4l2_querymenu
|
||||
#define V4L2_CID_HFLIP (V4L2_CID_BASE+20)
|
||||
#define V4L2_CID_VFLIP (V4L2_CID_BASE+21)
|
||||
|
||||
/* Deprecated, use V4L2_CID_PAN_RESET and V4L2_CID_TILT_RESET */
|
||||
#define V4L2_CID_HCENTER_DEPRECATED (V4L2_CID_BASE+22)
|
||||
#define V4L2_CID_VCENTER_DEPRECATED (V4L2_CID_BASE+23)
|
||||
/* Deprecated; use V4L2_CID_PAN_RESET and V4L2_CID_TILT_RESET */
|
||||
#define V4L2_CID_HCENTER (V4L2_CID_BASE+22)
|
||||
#define V4L2_CID_VCENTER (V4L2_CID_BASE+23)
|
||||
|
||||
#define V4L2_CID_POWER_LINE_FREQUENCY (V4L2_CID_BASE+24)
|
||||
enum v4l2_power_line_frequency {
|
||||
|
@@ -10,18 +10,19 @@
|
||||
#define VIRTIO_BLK_F_SIZE_MAX 1 /* Indicates maximum segment size */
|
||||
#define VIRTIO_BLK_F_SEG_MAX 2 /* Indicates maximum # of segments */
|
||||
#define VIRTIO_BLK_F_GEOMETRY 4 /* Legacy geometry available */
|
||||
#define VIRTIO_BLK_F_RO 5 /* Disk is read-only */
|
||||
|
||||
struct virtio_blk_config
|
||||
{
|
||||
/* The capacity (in 512-byte sectors). */
|
||||
__le64 capacity;
|
||||
__u64 capacity;
|
||||
/* The maximum segment size (if VIRTIO_BLK_F_SIZE_MAX) */
|
||||
__le32 size_max;
|
||||
__u32 size_max;
|
||||
/* The maximum number of segments (if VIRTIO_BLK_F_SEG_MAX) */
|
||||
__le32 seg_max;
|
||||
__u32 seg_max;
|
||||
/* geometry the device (if VIRTIO_BLK_F_GEOMETRY) */
|
||||
struct virtio_blk_geometry {
|
||||
__le16 cylinders;
|
||||
__u16 cylinders;
|
||||
__u8 heads;
|
||||
__u8 sectors;
|
||||
} geometry;
|
||||
|
@@ -15,6 +15,10 @@
|
||||
/* We've given up on this device. */
|
||||
#define VIRTIO_CONFIG_S_FAILED 0x80
|
||||
|
||||
/* Do we get callbacks when the ring is completely used, even if we've
|
||||
* suppressed them? */
|
||||
#define VIRTIO_F_NOTIFY_ON_EMPTY 24
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/virtio.h>
|
||||
|
||||
@@ -99,7 +103,7 @@ static inline bool virtio_has_feature(const struct virtio_device *vdev,
|
||||
* The return value is -ENOENT if the feature doesn't exist. Otherwise
|
||||
* the config value is copied into whatever is pointed to by v. */
|
||||
#define virtio_config_val(vdev, fbit, offset, v) \
|
||||
virtio_config_buf((vdev), (fbit), (offset), (v), sizeof(v))
|
||||
virtio_config_buf((vdev), (fbit), (offset), (v), sizeof(*v))
|
||||
|
||||
static inline int virtio_config_buf(struct virtio_device *vdev,
|
||||
unsigned int fbit,
|
||||
|
@@ -38,7 +38,7 @@ struct virtio_net_hdr
|
||||
#define VIRTIO_NET_HDR_GSO_ECN 0x80 // TCP has ECN set
|
||||
__u8 gso_type;
|
||||
__u16 hdr_len; /* Ethernet + IP + tcp/udp hdrs */
|
||||
__u16 gso_size; /* Bytes to append to gso_hdr_len per frame */
|
||||
__u16 gso_size; /* Bytes to append to hdr_len per frame */
|
||||
__u16 csum_start; /* Position to start checksumming from */
|
||||
__u16 csum_offset; /* Offset after that to place checksum */
|
||||
};
|
||||
|
8
include/linux/virtio_rng.h
Normal file
8
include/linux/virtio_rng.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#ifndef _LINUX_VIRTIO_RNG_H
|
||||
#define _LINUX_VIRTIO_RNG_H
|
||||
#include <linux/virtio_config.h>
|
||||
|
||||
/* The ID for virtio_rng */
|
||||
#define VIRTIO_ID_RNG 4
|
||||
|
||||
#endif /* _LINUX_VIRTIO_RNG_H */
|
@@ -100,6 +100,7 @@
|
||||
#define WM9713_ADCSEL_Y 0x0004 /* Y measurement */
|
||||
#define WM9713_ADCSEL_PRES 0x0008 /* Pressure measurement */
|
||||
#define WM9713_COO 0x0001 /* enable coordinate mode */
|
||||
#define WM9713_45W 0x1000 /* set for 5 wire panel */
|
||||
#define WM9713_PDEN 0x0800 /* measure only when pen down */
|
||||
#define WM9713_ADCSEL_MASK 0x00fe /* ADC selection mask */
|
||||
#define WM9713_WAIT 0x0200 /* coordinate wait */
|
||||
|
Reference in New Issue
Block a user