diff options
Diffstat (limited to 'include/linux')
80 files changed, 502 insertions, 233 deletions
diff --git a/include/linux/amba/bus.h b/include/linux/amba/bus.h index 6816be6c3f7..8b103860783 100644 --- a/include/linux/amba/bus.h +++ b/include/linux/amba/bus.h @@ -14,6 +14,9 @@  #ifndef ASMARM_AMBA_H  #define ASMARM_AMBA_H +#include <linux/device.h> +#include <linux/resource.h> +  #define AMBA_NR_IRQS	2  struct amba_device { diff --git a/include/linux/amba/clcd.h b/include/linux/amba/clcd.h index 29c0448265c..ca16c3801a1 100644 --- a/include/linux/amba/clcd.h +++ b/include/linux/amba/clcd.h @@ -21,22 +21,21 @@  #define CLCD_UBAS 		0x00000010  #define CLCD_LBAS 		0x00000014 -#if !defined(CONFIG_ARCH_VERSATILE) && !defined(CONFIG_ARCH_REALVIEW) -#define CLCD_IENB 		0x00000018 -#define CLCD_CNTL 		0x0000001c -#else -/* - * Someone rearranged these two registers on the Versatile - * platform... - */ -#define CLCD_IENB 		0x0000001c -#define CLCD_CNTL 		0x00000018 -#endif +#define CLCD_PL110_IENB		0x00000018 +#define CLCD_PL110_CNTL		0x0000001c +#define CLCD_PL110_STAT		0x00000020 +#define CLCD_PL110_INTR 	0x00000024 +#define CLCD_PL110_UCUR		0x00000028 +#define CLCD_PL110_LCUR		0x0000002C + +#define CLCD_PL111_CNTL		0x00000018 +#define CLCD_PL111_IENB		0x0000001c +#define CLCD_PL111_RIS		0x00000020 +#define CLCD_PL111_MIS		0x00000024 +#define CLCD_PL111_ICR		0x00000028 +#define CLCD_PL111_UCUR		0x0000002c +#define CLCD_PL111_LCUR		0x00000030 -#define CLCD_STAT 		0x00000020 -#define CLCD_INTR 		0x00000024 -#define CLCD_UCUR 		0x00000028 -#define CLCD_LCUR 		0x0000002C  #define CLCD_PALL 		0x00000200  #define CLCD_PALETTE		0x00000200 @@ -147,6 +146,8 @@ struct clcd_fb {  	struct clcd_board	*board;  	void			*board_data;  	void __iomem		*regs; +	u16			off_ienb; +	u16			off_cntl;  	u32			clcd_cntl;  	u32			cmap[16];  }; diff --git a/include/linux/amba/pl061.h b/include/linux/amba/pl061.h index b4fbd986260..5ddd9ad4b19 100644 --- a/include/linux/amba/pl061.h +++ b/include/linux/amba/pl061.h @@ -1,3 +1,5 @@ +#include <linux/types.h> +  /* platform data for the PL061 GPIO driver */  struct pl061_platform_data { diff --git a/include/linux/ata.h b/include/linux/ata.h index b4c85e2adef..700c5b9b358 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h @@ -1025,8 +1025,8 @@ static inline int ata_ok(u8 status)  static inline int lba_28_ok(u64 block, u32 n_block)  { -	/* check the ending block number */ -	return ((block + n_block) < ((u64)1 << 28)) && (n_block <= 256); +	/* check the ending block number: must be LESS THAN 0x0fffffff */ +	return ((block + n_block) < ((1 << 28) - 1)) && (n_block <= 256);  }  static inline int lba_48_ok(u64 block, u32 n_block) diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index fcbc26af00e..bd0e3c6f323 100644 --- a/include/linux/backing-dev.h +++ b/include/linux/backing-dev.h @@ -101,6 +101,7 @@ int bdi_register(struct backing_dev_info *bdi, struct device *parent,  		const char *fmt, ...);  int bdi_register_dev(struct backing_dev_info *bdi, dev_t dev);  void bdi_unregister(struct backing_dev_info *bdi); +int bdi_setup_and_register(struct backing_dev_info *, char *, unsigned int);  void bdi_start_writeback(struct backing_dev_info *bdi, struct super_block *sb,  				long nr_pages);  int bdi_writeback_task(struct bdi_writeback *wb); @@ -246,6 +247,7 @@ int bdi_set_max_ratio(struct backing_dev_info *bdi, unsigned int max_ratio);  #endif  extern struct backing_dev_info default_backing_dev_info; +extern struct backing_dev_info noop_backing_dev_info;  void default_unplug_io_fn(struct backing_dev_info *bdi, struct page *page);  int writeback_in_progress(struct backing_dev_info *bdi); diff --git a/include/linux/backlight.h b/include/linux/backlight.h index 8c4f884db6b..4a3d52e545e 100644 --- a/include/linux/backlight.h +++ b/include/linux/backlight.h @@ -36,18 +36,18 @@ struct backlight_device;  struct fb_info;  struct backlight_ops { -	const unsigned int options; +	unsigned int options;  #define BL_CORE_SUSPENDRESUME	(1 << 0)  	/* Notify the backlight driver some property has changed */ -	int (* const update_status)(struct backlight_device *); +	int (*update_status)(struct backlight_device *);  	/* Return the current backlight brightness (accounting for power,  	   fb_blank etc.) */ -	int (* const get_brightness)(struct backlight_device *); +	int (*get_brightness)(struct backlight_device *);  	/* Check if given framebuffer device is the one bound to this backlight;  	   return 0 if not, !=0 if it is. If NULL, backlight always matches the fb. */ -	int (* const check_fb)(struct fb_info *); +	int (*check_fb)(struct backlight_device *, struct fb_info *);  };  /* This structure defines all the properties of a backlight */ @@ -103,7 +103,8 @@ static inline void backlight_update_status(struct backlight_device *bd)  }  extern struct backlight_device *backlight_device_register(const char *name, -	struct device *dev, void *devdata, const struct backlight_ops *ops); +	struct device *dev, void *devdata, const struct backlight_ops *ops, +	const struct backlight_properties *props);  extern void backlight_device_unregister(struct backlight_device *bd);  extern void backlight_force_update(struct backlight_device *bd,  				   enum backlight_update_reason reason); diff --git a/include/linux/bitops.h b/include/linux/bitops.h index b7938987923..b796eab5ca7 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h @@ -21,9 +21,6 @@  	     (bit) < (size); \  	     (bit) = find_next_bit((addr), (size), (bit) + 1)) -/* Temporary */ -#define for_each_bit(bit, addr, size) for_each_set_bit(bit, addr, size) -  static __inline__ int get_bitmask_order(unsigned int count)  {  	int order; diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index ebd22dbed86..6690e8bae7b 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -158,7 +158,6 @@ enum rq_flag_bits {  struct request {  	struct list_head queuelist;  	struct call_single_data csd; -	int cpu;  	struct request_queue *q; @@ -166,9 +165,11 @@ struct request {  	enum rq_cmd_type_bits cmd_type;  	unsigned long atomic_flags; +	int cpu; +  	/* the following two fields are internal, NEVER access directly */ -	sector_t __sector;		/* sector cursor */  	unsigned int __data_len;	/* total data len */ +	sector_t __sector;		/* sector cursor */  	struct bio *bio;  	struct bio *biotail; @@ -201,20 +202,20 @@ struct request {  	unsigned short ioprio; +	int ref_count; +  	void *special;		/* opaque pointer available for LLD use */  	char *buffer;		/* kaddr of the current segment if available */  	int tag;  	int errors; -	int ref_count; -  	/*  	 * when request is used as a packet command carrier  	 */ -	unsigned short cmd_len;  	unsigned char __cmd[BLK_MAX_CDB];  	unsigned char *cmd; +	unsigned short cmd_len;  	unsigned int extra_len;	/* length of alignment and padding */  	unsigned int sense_len; @@ -921,26 +922,7 @@ 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_hw_sectors(struct request_queue *, unsigned int); - -/* 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); @@ -1030,11 +1012,6 @@ static inline int sb_issue_discard(struct super_block *sb,  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 MAX_SEGMENT_SIZE	65536 -  enum blk_default_limits {  	BLK_MAX_SEGMENTS	= 128,  	BLK_SAFE_MAX_SECTORS	= 255, diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index b8ad1ea9958..8f78073d7ca 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h @@ -530,6 +530,7 @@ static inline struct cgroup_subsys_state *task_subsys_state(  {  	return rcu_dereference_check(task->cgroups->subsys[subsys_id],  				     rcu_read_lock_held() || +				     lockdep_is_held(&task->alloc_lock) ||  				     cgroup_lock_is_held());  } diff --git a/include/linux/circ_buf.h b/include/linux/circ_buf.h index a2ed0591fb1..90f2471dc6f 100644 --- a/include/linux/circ_buf.h +++ b/include/linux/circ_buf.h @@ -1,3 +1,7 @@ +/* + * See Documentation/circular-buffers.txt for more information. + */ +  #ifndef _LINUX_CIRC_BUF_H  #define _LINUX_CIRC_BUF_H 1 diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h index 0cf725bdd2a..fc53492b6ad 100644 --- a/include/linux/clockchips.h +++ b/include/linux/clockchips.h @@ -73,6 +73,7 @@ enum clock_event_nofitiers {   * @list:		list head for the management code   * @mode:		operating mode assigned by the management code   * @next_event:		local storage for the next event in oneshot mode + * @retries:		number of forced programming retries   */  struct clock_event_device {  	const char		*name; @@ -93,6 +94,7 @@ struct clock_event_device {  	struct list_head	list;  	enum clock_event_mode	mode;  	ktime_t			next_event; +	unsigned long		retries;  };  /* diff --git a/include/linux/coda_psdev.h b/include/linux/coda_psdev.h index 5b5d4731f95..8859e2ede9f 100644 --- a/include/linux/coda_psdev.h +++ b/include/linux/coda_psdev.h @@ -7,6 +7,8 @@  #define MAX_CODADEVS  5	   /* how many do we allow */  #ifdef __KERNEL__ +#include <linux/backing-dev.h> +  struct kstatfs;  /* communication pending/processing queues */ @@ -17,6 +19,7 @@ struct venus_comm {  	struct list_head    vc_processing;  	int                 vc_inuse;  	struct super_block *vc_sb; +	struct backing_dev_info bdi;  }; diff --git a/include/linux/delayacct.h b/include/linux/delayacct.h index 5076fe0c8a9..6cee17c2231 100644 --- a/include/linux/delayacct.h +++ b/include/linux/delayacct.h @@ -18,6 +18,7 @@  #define _LINUX_DELAYACCT_H  #include <linux/sched.h> +#include <linux/slab.h>  /*   * Per-task flags relevant to delay accounting diff --git a/include/linux/drbd.h b/include/linux/drbd.h index 78962272338..4341b1a97a3 100644 --- a/include/linux/drbd.h +++ b/include/linux/drbd.h @@ -56,7 +56,7 @@ extern const char *drbd_buildtag(void);  #define REL_VERSION "8.3.7"  #define API_VERSION 88  #define PRO_VERSION_MIN 86 -#define PRO_VERSION_MAX 91 +#define PRO_VERSION_MAX 92  enum drbd_io_error_p { diff --git a/include/linux/drbd_nl.h b/include/linux/drbd_nl.h index a4d82f89599..f7431a4ca60 100644 --- a/include/linux/drbd_nl.h +++ b/include/linux/drbd_nl.h @@ -12,7 +12,7 @@  #endif  NL_PACKET(primary, 1, -       NL_BIT(		1,	T_MAY_IGNORE,	overwrite_peer) +       NL_BIT(		1,	T_MAY_IGNORE,	primary_force)  )  NL_PACKET(secondary, 2, ) @@ -63,6 +63,7 @@ NL_PACKET(net_conf, 5,  	NL_BIT(		41,	T_MAY_IGNORE,	always_asbp)  	NL_BIT(		61,	T_MAY_IGNORE,	no_cork)  	NL_BIT(		62,	T_MANDATORY,	auto_sndbuf_size) +	NL_BIT(		70,	T_MANDATORY,	dry_run)  )  NL_PACKET(disconnect, 6, ) diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index cac84b00666..5f494b46509 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h @@ -565,17 +565,17 @@ enum {  static inline int ext3_test_inode_state(struct inode *inode, int bit)  { -	return test_bit(bit, &EXT3_I(inode)->i_state); +	return test_bit(bit, &EXT3_I(inode)->i_state_flags);  }  static inline void ext3_set_inode_state(struct inode *inode, int bit)  { -	set_bit(bit, &EXT3_I(inode)->i_state); +	set_bit(bit, &EXT3_I(inode)->i_state_flags);  }  static inline void ext3_clear_inode_state(struct inode *inode, int bit)  { -	clear_bit(bit, &EXT3_I(inode)->i_state); +	clear_bit(bit, &EXT3_I(inode)->i_state_flags);  }  #else  /* Assume that user mode programs are passing in an ext3fs superblock, not diff --git a/include/linux/ext3_fs_i.h b/include/linux/ext3_fs_i.h index 7679acdb519..f42c098aed8 100644 --- a/include/linux/ext3_fs_i.h +++ b/include/linux/ext3_fs_i.h @@ -87,7 +87,7 @@ struct ext3_inode_info {  	 * near to their parent directory's inode.  	 */  	__u32	i_block_group; -	unsigned long	i_state;	/* Dynamic state flags for ext3 */ +	unsigned long	i_state_flags;	/* Dynamic state flags for ext3 */  	/* block reservation info */  	struct ext3_block_alloc_info *i_block_alloc_info; diff --git a/include/linux/firewire-cdev.h b/include/linux/firewire-cdev.h index 40b11013408..68f883b30a5 100644 --- a/include/linux/firewire-cdev.h +++ b/include/linux/firewire-cdev.h @@ -1,21 +1,26 @@  /*   * Char device interface.   * - * Copyright (C) 2005-2006  Kristian Hoegsberg <krh@bitplanet.net> + * Copyright (C) 2005-2007  Kristian Hoegsberg <krh@bitplanet.net>   * - * 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. + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions:   * - * 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. + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software.   * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE.   */  #ifndef _LINUX_FIREWIRE_CDEV_H @@ -438,7 +443,7 @@ struct fw_cdev_remove_descriptor {   * @type:	%FW_CDEV_ISO_CONTEXT_TRANSMIT or %FW_CDEV_ISO_CONTEXT_RECEIVE   * @header_size: Header size to strip for receive contexts   * @channel:	Channel to bind to - * @speed:	Speed to transmit at + * @speed:	Speed for transmit contexts   * @closure:	To be returned in &fw_cdev_event_iso_interrupt   * @handle:	Handle to context, written back by kernel   * @@ -451,6 +456,9 @@ struct fw_cdev_remove_descriptor {   * If a context was successfully created, the kernel writes back a handle to the   * context, which must be passed in for subsequent operations on that context.   * + * For receive contexts, @header_size must be at least 4 and must be a multiple + * of 4. + *   * Note that the effect of a @header_size > 4 depends on   * &fw_cdev_get_info.version, as documented at &fw_cdev_event_iso_interrupt.   */ @@ -481,10 +489,34 @@ struct fw_cdev_create_iso_context {   *   * &struct fw_cdev_iso_packet is used to describe isochronous packet queues.   * - * Use the FW_CDEV_ISO_ macros to fill in @control.  The sy and tag fields are - * specified by IEEE 1394a and IEC 61883. + * Use the FW_CDEV_ISO_ macros to fill in @control. + * + * For transmit packets, the header length must be a multiple of 4 and specifies + * the numbers of bytes in @header that will be prepended to the packet's + * payload; these bytes are copied into the kernel and will not be accessed + * after the ioctl has returned.  The sy and tag fields are copied to the iso + * packet header (these fields are specified by IEEE 1394a and IEC 61883-1). + * The skip flag specifies that no packet is to be sent in a frame; when using + * this, all other fields except the interrupt flag must be zero. + * + * For receive packets, the header length must be a multiple of the context's + * header size; if the header length is larger than the context's header size, + * multiple packets are queued for this entry.  The sy and tag fields are + * ignored.  If the sync flag is set, the context drops all packets until + * a packet with a matching sy field is received (the sync value to wait for is + * specified in the &fw_cdev_start_iso structure).  The payload length defines + * how many payload bytes can be received for one packet (in addition to payload + * quadlets that have been defined as headers and are stripped and returned in + * the &fw_cdev_event_iso_interrupt structure).  If more bytes are received, the + * additional bytes are dropped.  If less bytes are received, the remaining + * bytes in this part of the payload buffer will not be written to, not even by + * the next packet, i.e., packets received in consecutive frames will not + * necessarily be consecutive in memory.  If an entry has queued multiple + * packets, the payload length is divided equally among them.   * - * FIXME - finish this documentation + * When a packet with the interrupt flag set has been completed, the + * &fw_cdev_event_iso_interrupt event will be sent.  An entry that has queued + * multiple receive packets is completed when its last packet is completed.   */  struct fw_cdev_iso_packet {  	__u32 control; @@ -501,7 +533,7 @@ struct fw_cdev_iso_packet {   * Queue a number of isochronous packets for reception or transmission.   * This ioctl takes a pointer to an array of &fw_cdev_iso_packet structs,   * which describe how to transmit from or receive into a contiguous region - * of a mmap()'ed payload buffer.  As part of the packet descriptors, + * of a mmap()'ed payload buffer.  As part of transmit packet descriptors,   * a series of headers can be supplied, which will be prepended to the   * payload during DMA.   * @@ -620,8 +652,8 @@ struct fw_cdev_get_cycle_timer2 {   * instead of allocated.   * An %FW_CDEV_EVENT_ISO_RESOURCE_DEALLOCATED event concludes this operation.   * - * To summarize, %FW_CDEV_IOC_DEALLOCATE_ISO_RESOURCE allocates iso resources - * for the lifetime of the fd or handle. + * To summarize, %FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE allocates iso resources + * for the lifetime of the fd or @handle.   * In contrast, %FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE_ONCE allocates iso resources   * for the duration of a bus generation.   * diff --git a/include/linux/firewire-constants.h b/include/linux/firewire-constants.h index b316770a43f..9b4bb5fbba4 100644 --- a/include/linux/firewire-constants.h +++ b/include/linux/firewire-constants.h @@ -1,3 +1,28 @@ +/* + * IEEE 1394 constants. + * + * Copyright (C) 2005-2007  Kristian Hoegsberg <krh@bitplanet.net> + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ +  #ifndef _LINUX_FIREWIRE_CONSTANTS_H  #define _LINUX_FIREWIRE_CONSTANTS_H @@ -21,7 +46,7 @@  #define EXTCODE_WRAP_ADD		0x6  #define EXTCODE_VENDOR_DEPENDENT	0x7 -/* Juju specific tcodes */ +/* Linux firewire-core (Juju) specific tcodes */  #define TCODE_LOCK_MASK_SWAP		(0x10 | EXTCODE_MASK_SWAP)  #define TCODE_LOCK_COMPARE_SWAP		(0x10 | EXTCODE_COMPARE_SWAP)  #define TCODE_LOCK_FETCH_ADD		(0x10 | EXTCODE_FETCH_ADD) @@ -36,7 +61,7 @@  #define RCODE_TYPE_ERROR		0x6  #define RCODE_ADDRESS_ERROR		0x7 -/* Juju specific rcodes */ +/* Linux firewire-core (Juju) specific rcodes */  #define RCODE_SEND_ERROR		0x10  #define RCODE_CANCELLED			0x11  #define RCODE_BUSY			0x12 diff --git a/include/linux/freezer.h b/include/linux/freezer.h index 5a361f85cfe..da7e52b099f 100644 --- a/include/linux/freezer.h +++ b/include/linux/freezer.h @@ -64,9 +64,12 @@ extern bool freeze_task(struct task_struct *p, bool sig_only);  extern void cancel_freezing(struct task_struct *p);  #ifdef CONFIG_CGROUP_FREEZER -extern int cgroup_frozen(struct task_struct *task); +extern int cgroup_freezing_or_frozen(struct task_struct *task);  #else /* !CONFIG_CGROUP_FREEZER */ -static inline int cgroup_frozen(struct task_struct *task) { return 0; } +static inline int cgroup_freezing_or_frozen(struct task_struct *task) +{ +	return 0; +}  #endif /* !CONFIG_CGROUP_FREEZER */  /* diff --git a/include/linux/fs.h b/include/linux/fs.h index 10b8dedcd18..44f35aea2f1 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -2212,6 +2212,7 @@ extern int generic_segment_checks(const struct iovec *iov,  /* fs/block_dev.c */  extern ssize_t blkdev_aio_write(struct kiocb *iocb, const struct iovec *iov,  				unsigned long nr_segs, loff_t pos); +extern int blkdev_fsync(struct file *filp, struct dentry *dentry, int datasync);  /* fs/splice.c */  extern ssize_t generic_file_splice_read(struct file *, loff_t *, @@ -2314,8 +2315,9 @@ extern int vfs_fstatat(int , char __user *, struct kstat *, int);  extern int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd,  		    unsigned long arg);  extern int __generic_block_fiemap(struct inode *inode, -				  struct fiemap_extent_info *fieinfo, u64 start, -				  u64 len, get_block_t *get_block); +				  struct fiemap_extent_info *fieinfo, +				  loff_t start, loff_t len, +				  get_block_t *get_block);  extern int generic_block_fiemap(struct inode *inode,  				struct fiemap_extent_info *fieinfo, u64 start,  				u64 len, get_block_t *get_block); diff --git a/include/linux/fscache-cache.h b/include/linux/fscache-cache.h index 7be0c6fbe88..c57db27ac86 100644 --- a/include/linux/fscache-cache.h +++ b/include/linux/fscache-cache.h @@ -105,7 +105,7 @@ struct fscache_operation {  	/* operation releaser */  	fscache_operation_release_t release; -#ifdef CONFIG_SLOW_WORK_PROC +#ifdef CONFIG_SLOW_WORK_DEBUG  	const char *name;		/* operation name */  	const char *state;		/* operation state */  #define fscache_set_op_name(OP, N)	do { (OP)->name  = (N); } while(0) diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index df8fd9a3b21..01755909ce8 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h @@ -15,6 +15,7 @@  #include <linux/inotify.h>  #include <linux/fsnotify_backend.h>  #include <linux/audit.h> +#include <linux/slab.h>  /*   * fsnotify_d_instantiate - instantiate a dentry for inode diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index 6b7c444ab8f..c0f4b364c71 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h @@ -131,12 +131,12 @@ struct ftrace_event_call {  	void			*mod;  	void			*data; -	int			profile_count; -	int			(*profile_enable)(struct ftrace_event_call *); -	void			(*profile_disable)(struct ftrace_event_call *); +	int			perf_refcount; +	int			(*perf_event_enable)(struct ftrace_event_call *); +	void			(*perf_event_disable)(struct ftrace_event_call *);  }; -#define FTRACE_MAX_PROFILE_SIZE	2048 +#define PERF_MAX_TRACE_SIZE	2048  #define MAX_FILTER_PRED		32  #define MAX_FILTER_STR_VAL	256	/* Should handle KSYM_SYMBOL_LEN */ @@ -187,22 +187,25 @@ do {									\  #ifdef CONFIG_PERF_EVENTS  struct perf_event; -extern int ftrace_profile_enable(int event_id); -extern void ftrace_profile_disable(int event_id); + +DECLARE_PER_CPU(struct pt_regs, perf_trace_regs); + +extern int perf_trace_enable(int event_id); +extern void perf_trace_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, +perf_trace_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) +perf_trace_buf_submit(void *raw_data, int size, int rctx, u64 addr, +		       u64 count, unsigned long irq_flags, struct pt_regs *regs)  {  	struct trace_entry *entry = raw_data; -	perf_tp_event(entry->type, addr, count, raw_data, size); +	perf_tp_event(entry->type, addr, count, raw_data, size, regs);  	perf_swevent_put_recursion_context(rctx);  	local_irq_restore(irq_flags);  } diff --git a/include/linux/gameport.h b/include/linux/gameport.h index 48e68da097f..361d1cc288d 100644 --- a/include/linux/gameport.h +++ b/include/linux/gameport.h @@ -16,6 +16,7 @@  #include <linux/mutex.h>  #include <linux/device.h>  #include <linux/timer.h> +#include <linux/slab.h>  struct gameport { diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 56b50514ab2..5f2f4c4d8fb 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h @@ -109,7 +109,7 @@ struct hd_struct {  };  #define GENHD_FL_REMOVABLE			1 -#define GENHD_FL_DRIVERFS			2 +/* 2 is unused */  #define GENHD_FL_MEDIA_CHANGE_NOTIFY		4  #define GENHD_FL_CD				8  #define GENHD_FL_UP				16 diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 0a5da639b32..6ed1d59bfb1 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -355,6 +355,8 @@ struct i2c_adapter {  	int nr;  	char name[48];  	struct completion dev_released; + +	struct list_head userspace_clients;  };  #define to_i2c_adapter(d) container_of(d, struct i2c_adapter, dev) diff --git a/include/linux/i2o.h b/include/linux/i2o.h index 87018dc5527..9e7a12d6385 100644 --- a/include/linux/i2o.h +++ b/include/linux/i2o.h @@ -782,7 +782,6 @@ extern int i2o_exec_lct_get(struct i2o_controller *);  #define to_i2o_driver(drv) container_of(drv,struct i2o_driver, driver)  #define to_i2o_device(dev) container_of(dev, struct i2o_device, device)  #define to_i2o_controller(dev) container_of(dev, struct i2o_controller, device) -#define kobj_to_i2o_device(kobj) to_i2o_device(container_of(kobj, struct device, kobj))  /**   *	i2o_out_to_virt - Turn an I2O message to a virtual address diff --git a/include/linux/ide.h b/include/linux/ide.h index 97e6ab43518..3239d1c10ac 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h @@ -1169,6 +1169,7 @@ extern void ide_stall_queue(ide_drive_t *drive, unsigned long timeout);  extern void ide_timer_expiry(unsigned long);  extern irqreturn_t ide_intr(int irq, void *dev_id);  extern void do_ide_request(struct request_queue *); +extern void ide_requeue_and_plug(ide_drive_t *drive, struct request *rq);  void ide_init_disk(struct gendisk *, ide_drive_t *); diff --git a/include/linux/if_tunnel.h b/include/linux/if_tunnel.h index 1822d635be6..16b92d008be 100644 --- a/include/linux/if_tunnel.h +++ b/include/linux/if_tunnel.h @@ -2,6 +2,7 @@  #define _IF_TUNNEL_H_  #include <linux/types.h> +#include <asm/byteorder.h>  #ifdef __KERNEL__  #include <linux/ip.h> diff --git a/include/linux/input/matrix_keypad.h b/include/linux/input/matrix_keypad.h index 3bd018baae2..c964cd7f436 100644 --- a/include/linux/input/matrix_keypad.h +++ b/include/linux/input/matrix_keypad.h @@ -44,6 +44,7 @@ struct matrix_keymap_data {   * @active_low: gpio polarity   * @wakeup: controls whether the device should be set up as wakeup   *	source + * @no_autorepeat: disable key autorepeat   *   * This structure represents platform-specific data that use used by   * matrix_keypad driver to perform proper initialization. @@ -64,6 +65,7 @@ struct matrix_keypad_platform_data {  	bool		active_low;  	bool		wakeup; +	bool		no_autorepeat;  };  /** diff --git a/include/linux/io-mapping.h b/include/linux/io-mapping.h index 97eb928b492..25085ddd955 100644 --- a/include/linux/io-mapping.h +++ b/include/linux/io-mapping.h @@ -19,6 +19,7 @@  #define _LINUX_IO_MAPPING_H  #include <linux/types.h> +#include <linux/slab.h>  #include <asm/io.h>  #include <asm/page.h>  #include <asm/iomap.h> diff --git a/include/linux/ioport.h b/include/linux/ioport.h index 71ab79da7e7..26fad187d66 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h @@ -112,12 +112,14 @@ struct resource_list {  extern struct resource ioport_resource;  extern struct resource iomem_resource; +extern struct resource *request_resource_conflict(struct resource *root, struct resource *new);  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); +extern struct resource *insert_resource_conflict(struct resource *parent, struct resource *new);  extern int insert_resource(struct resource *parent, struct resource *new);  extern void insert_resource_expand_to_fit(struct resource *root, struct resource *new);  extern int allocate_resource(struct resource *root, struct resource *new, diff --git a/include/linux/iscsi_ibft.h b/include/linux/iscsi_ibft.h index 6092487e295..d2e4042f8f5 100644 --- a/include/linux/iscsi_ibft.h +++ b/include/linux/iscsi_ibft.h @@ -42,9 +42,13 @@ extern struct ibft_table_header *ibft_addr;   * mapped address is set in the ibft_addr variable.   */  #ifdef CONFIG_ISCSI_IBFT_FIND -extern void __init reserve_ibft_region(void); +unsigned long find_ibft_region(unsigned long *sizep);  #else -static inline void reserve_ibft_region(void) { } +static inline unsigned long find_ibft_region(unsigned long *sizep) +{ +	*sizep = 0; +	return 0; +}  #endif  #endif /* ISCSI_IBFT_H */ diff --git a/include/linux/jbd.h b/include/linux/jbd.h index f3aa59cb675..516a2a27e87 100644 --- a/include/linux/jbd.h +++ b/include/linux/jbd.h @@ -31,6 +31,7 @@  #include <linux/mutex.h>  #include <linux/timer.h>  #include <linux/lockdep.h> +#include <linux/slab.h>  #define journal_oom_retry 1 diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 1ec87635818..a4d2e9f7088 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h @@ -30,6 +30,7 @@  #include <linux/bit_spinlock.h>  #include <linux/mutex.h>  #include <linux/timer.h> +#include <linux/slab.h>  #endif  #define journal_oom_retry 1 diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 7f070746336..9365227dbaf 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -426,7 +426,7 @@ static inline char *pack_hex_byte(char *buf, u8 byte)  		.burst = DEFAULT_RATELIMIT_BURST,       \  	};                                              \  							\ -	if (!__ratelimit(&_rs))                         \ +	if (__ratelimit(&_rs))                          \  		printk(fmt, ##__VA_ARGS__);		\  })  #else diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h index bc0fc795bd3..e117b1aee69 100644 --- a/include/linux/kfifo.h +++ b/include/linux/kfifo.h @@ -86,7 +86,8 @@ union { \   */  #define INIT_KFIFO(name) \  	name = __kfifo_initializer(sizeof(name##kfifo_buffer) - \ -				sizeof(struct kfifo), name##kfifo_buffer) +				sizeof(struct kfifo), \ +				name##kfifo_buffer + sizeof(struct kfifo))  /**   * DEFINE_KFIFO - macro to define and initialize a kfifo @@ -102,8 +103,6 @@ union { \  	unsigned char name##kfifo_buffer[size]; \  	struct kfifo name = __kfifo_initializer(size, name##kfifo_buffer) -#undef __kfifo_initializer -  extern void kfifo_init(struct kfifo *fifo, void *buffer,  			unsigned int size);  extern __must_check int kfifo_alloc(struct kfifo *fifo, unsigned int size, diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index a3fd0f91d94..169d07758ee 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -54,7 +54,7 @@ extern struct kmem_cache *kvm_vcpu_cache;   */  struct kvm_io_bus {  	int                   dev_count; -#define NR_IOBUS_DEVS 6 +#define NR_IOBUS_DEVS 200  	struct kvm_io_device *devs[NR_IOBUS_DEVS];  }; @@ -119,6 +119,11 @@ struct kvm_memory_slot {  	int user_alloc;  }; +static inline unsigned long kvm_dirty_bitmap_bytes(struct kvm_memory_slot *memslot) +{ +	return ALIGN(memslot->npages, BITS_PER_LONG) / 8; +} +  struct kvm_kernel_irq_routing_entry {  	u32 gsi;  	u32 type; diff --git a/include/linux/lcm.h b/include/linux/lcm.h new file mode 100644 index 00000000000..7bf01d779b4 --- /dev/null +++ b/include/linux/lcm.h @@ -0,0 +1,8 @@ +#ifndef _LCM_H +#define _LCM_H + +#include <linux/compiler.h> + +unsigned long lcm(unsigned long a, unsigned long b) __attribute_const__; + +#endif /* _LCM_H */ diff --git a/include/linux/libata.h b/include/linux/libata.h index f8ea71e6d0e..b2f2003b92e 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -146,6 +146,7 @@ enum {  	ATA_DFLAG_SLEEPING	= (1 << 15), /* device is sleeping */  	ATA_DFLAG_DUBIOUS_XFER	= (1 << 16), /* data transfer not verified */  	ATA_DFLAG_NO_UNLOAD	= (1 << 17), /* device doesn't support unload */ +	ATA_DFLAG_UNLOCK_HPA	= (1 << 18), /* unlock HPA */  	ATA_DFLAG_INIT_MASK	= (1 << 24) - 1,  	ATA_DFLAG_DETACH	= (1 << 24), diff --git a/include/linux/memory.h b/include/linux/memory.h index 1adfe779eb9..85582e1bcee 100644 --- a/include/linux/memory.h +++ b/include/linux/memory.h @@ -36,6 +36,8 @@ struct memory_block {  	struct sys_device sysdev;  }; +int arch_get_memory_phys_device(unsigned long start_pfn); +  /* These states are exposed to userspace as text strings in sysfs */  #define	MEM_ONLINE		(1<<0) /* exposed to userspace */  #define	MEM_GOING_OFFLINE	(1<<1) /* exposed to userspace */ diff --git a/include/linux/mm.h b/include/linux/mm.h index e70f21beb4b..462acaf36f3 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -783,8 +783,8 @@ 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 *); -	int (*hugetlb_entry)(pte_t *, unsigned long, unsigned long, -			     struct mm_walk *); +	int (*hugetlb_entry)(pte_t *, unsigned long, +			     unsigned long, unsigned long, struct mm_walk *);  	struct mm_struct *mm;  	void *private;  }; diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index c02c8db7370..8a49cbf0376 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h @@ -268,6 +268,7 @@ struct _mmc_csd {  #define EXT_CSD_CARD_TYPE_26	(1<<0)	/* Card can run at 26MHz */  #define EXT_CSD_CARD_TYPE_52	(1<<1)	/* Card can run at 52MHz */ +#define EXT_CSD_CARD_TYPE_MASK	0x3	/* Mask out reserved and DDR bits */  #define EXT_CSD_BUS_WIDTH_1	0	/* Card is in 1 bit mode */  #define EXT_CSD_BUS_WIDTH_4	1	/* Card is in 4 bit mode */ diff --git a/include/linux/module.h b/include/linux/module.h index 5e869ffd34a..515d53ae6a7 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -330,8 +330,11 @@ struct module  	struct module_notes_attrs *notes_attrs;  #endif +#ifdef CONFIG_SMP  	/* Per-cpu data. */ -	void *percpu; +	void __percpu *percpu; +	unsigned int percpu_size; +#endif  	/* The command line arguments (may be mangled).  People like  	   keeping pointers to this stuff */ @@ -365,7 +368,8 @@ struct module  	void (*exit)(void);  	struct module_ref { -		int count; +		unsigned int incs; +		unsigned int decs;  	} __percpu *refptr;  #endif @@ -392,6 +396,7 @@ static inline int module_is_live(struct module *mod)  struct module *__module_text_address(unsigned long addr);  struct module *__module_address(unsigned long addr);  bool is_module_address(unsigned long addr); +bool is_module_percpu_address(unsigned long addr);  bool is_module_text_address(unsigned long addr);  static inline int within_module_core(unsigned long addr, struct module *mod) @@ -459,9 +464,9 @@ static inline void __module_get(struct module *module)  {  	if (module) {  		preempt_disable(); -		__this_cpu_inc(module->refptr->count); +		__this_cpu_inc(module->refptr->incs);  		trace_module_get(module, _THIS_IP_, -				 __this_cpu_read(module->refptr->count)); +				 __this_cpu_read(module->refptr->incs));  		preempt_enable();  	}  } @@ -474,11 +479,10 @@ static inline int try_module_get(struct module *module)  		preempt_disable();  		if (likely(module_is_live(module))) { -			__this_cpu_inc(module->refptr->count); +			__this_cpu_inc(module->refptr->incs);  			trace_module_get(module, _THIS_IP_, -				__this_cpu_read(module->refptr->count)); -		} -		else +				__this_cpu_read(module->refptr->incs)); +		} else  			ret = 0;  		preempt_enable(); @@ -563,6 +567,11 @@ static inline bool is_module_address(unsigned long addr)  	return false;  } +static inline bool is_module_percpu_address(unsigned long addr) +{ +	return false; +} +  static inline bool is_module_text_address(unsigned long addr)  {  	return false; diff --git a/include/linux/ncp_fs_sb.h b/include/linux/ncp_fs_sb.h index 6330fc76b00..5ec9ca67168 100644 --- a/include/linux/ncp_fs_sb.h +++ b/include/linux/ncp_fs_sb.h @@ -12,6 +12,7 @@  #include <linux/ncp_mount.h>  #include <linux/net.h>  #include <linux/mutex.h> +#include <linux/backing-dev.h>  #ifdef __KERNEL__ @@ -127,6 +128,7 @@ struct ncp_server {  		size_t len;  		__u8 data[128];  	} unexpected_packet; +	struct backing_dev_info bdi;  };  extern void ncp_tcp_rcv_proc(struct work_struct *work); diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index c79a88be7c3..fa8b4763799 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -2059,12 +2059,12 @@ static inline void skb_bond_set_mac_by_master(struct sk_buff *skb,   * duplicates except for 802.3ad ETH_P_SLOW, alb non-mcast/bcast, and   * ARP on active-backup slaves with arp_validate enabled.   */ -static inline int skb_bond_should_drop(struct sk_buff *skb) +static inline int skb_bond_should_drop(struct sk_buff *skb, +				       struct net_device *master)  { -	struct net_device *dev = skb->dev; -	struct net_device *master = dev->master; -  	if (master) { +		struct net_device *dev = skb->dev; +  		if (master->priv_flags & IFF_MASTER_ARPMON)  			dev->last_rx = jiffies; diff --git a/include/linux/netfilter/nfnetlink.h b/include/linux/netfilter/nfnetlink.h index 53923868c9b..361d6b5630e 100644 --- a/include/linux/netfilter/nfnetlink.h +++ b/include/linux/netfilter/nfnetlink.h @@ -76,7 +76,7 @@ extern int nfnetlink_subsys_unregister(const struct nfnetlink_subsystem *n);  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(struct net *net, u32 pid, u32 group, int error); +extern int 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); diff --git a/include/linux/netfilter_ipv6.h b/include/linux/netfilter_ipv6.h index d654873aa25..1f7e300094c 100644 --- a/include/linux/netfilter_ipv6.h +++ b/include/linux/netfilter_ipv6.h @@ -59,6 +59,7 @@  enum nf_ip6_hook_priorities {  	NF_IP6_PRI_FIRST = INT_MIN,  	NF_IP6_PRI_CONNTRACK_DEFRAG = -400, +	NF_IP6_PRI_RAW = -300,  	NF_IP6_PRI_SELINUX_FIRST = -225,  	NF_IP6_PRI_CONNTRACK = -200,  	NF_IP6_PRI_MANGLE = -150, diff --git a/include/linux/netlink.h b/include/linux/netlink.h index fde27c01732..6eaca5e1e8c 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h @@ -188,7 +188,7 @@ extern int netlink_has_listeners(struct sock *sk, unsigned int group);  extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock);  extern int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 pid,  			     __u32 group, gfp_t allocation); -extern void netlink_set_err(struct sock *ssk, __u32 pid, __u32 group, int code); +extern int netlink_set_err(struct sock *ssk, __u32 pid, __u32 group, int code);  extern int netlink_register_notifier(struct notifier_block *nb);  extern int netlink_unregister_notifier(struct notifier_block *nb); diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 1a0b85aa151..07ce4609fe5 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h @@ -209,6 +209,7 @@ struct nfs_inode {  #define NFS_INO_FLUSHING	(4)		/* inode is flushing out data */  #define NFS_INO_FSCACHE		(5)		/* inode can be cached by FS-Cache */  #define NFS_INO_FSCACHE_LOCK	(6)		/* FS-Cache cookie management lock */ +#define NFS_INO_COMMIT		(7)		/* inode is committing unstable writes */  static inline struct nfs_inode *NFS_I(const struct inode *inode)  { diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index 717a5e54eb1..e82957acea5 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h @@ -176,6 +176,7 @@ struct nfs_server {  #define NFS_CAP_ATIME		(1U << 11)  #define NFS_CAP_CTIME		(1U << 12)  #define NFS_CAP_MTIME		(1U << 13) +#define NFS_CAP_POSIX_LOCK	(1U << 14)  /* maximum number of slots to use */ diff --git a/include/linux/of.h b/include/linux/of.h index f6d9cbc39c9..a367e19bb3a 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -127,7 +127,7 @@ static inline unsigned long of_read_ulong(const __be32 *cell, int size)  /* Default string compare functions, Allow arch asm/prom.h to override */  #if !defined(of_compat_cmp) -#define of_compat_cmp(s1, s2, l)	strncasecmp((s1), (s2), (l)) +#define of_compat_cmp(s1, s2, l)	strcasecmp((s1), (s2))  #define of_prop_cmp(s1, s2)		strcmp((s1), (s2))  #define of_node_cmp(s1, s2)		strcasecmp((s1), (s2))  #endif diff --git a/include/linux/page_cgroup.h b/include/linux/page_cgroup.h index 30b08136fdf..aef22ae2af4 100644 --- a/include/linux/page_cgroup.h +++ b/include/linux/page_cgroup.h @@ -39,6 +39,7 @@ enum {  	PCG_CACHE, /* charged as cache */  	PCG_USED, /* this object is in use. */  	PCG_ACCT_LRU, /* page has been accounted for */ +	PCG_FILE_MAPPED, /* page is accounted as "mapped" */  };  #define TESTPCGFLAG(uname, lname)			\ @@ -73,6 +74,11 @@ CLEARPCGFLAG(AcctLRU, ACCT_LRU)  TESTPCGFLAG(AcctLRU, ACCT_LRU)  TESTCLEARPCGFLAG(AcctLRU, ACCT_LRU) + +SETPCGFLAG(FileMapped, FILE_MAPPED) +CLEARPCGFLAG(FileMapped, FILE_MAPPED) +TESTPCGFLAG(FileMapped, FILE_MAPPED) +  static inline int page_cgroup_nid(struct page_cgroup *pc)  {  	return page_to_nid(pc->page); diff --git a/include/linux/percpu.h b/include/linux/percpu.h index a93e5bfdccb..d3a38d68710 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h @@ -2,10 +2,10 @@  #define __LINUX_PERCPU_H  #include <linux/preempt.h> -#include <linux/slab.h> /* For kmalloc() */  #include <linux/smp.h>  #include <linux/cpumask.h>  #include <linux/pfn.h> +#include <linux/init.h>  #include <asm/percpu.h> @@ -135,9 +135,7 @@ extern int __init pcpu_page_first_chunk(size_t reserved_size,  #define per_cpu_ptr(ptr, cpu)	SHIFT_PERCPU_PTR((ptr), per_cpu_offset((cpu)))  extern void __percpu *__alloc_reserved_percpu(size_t size, size_t align); -extern void __percpu *__alloc_percpu(size_t size, size_t align); -extern void free_percpu(void __percpu *__pdata); -extern phys_addr_t per_cpu_ptr_to_phys(void *addr); +extern bool is_kernel_percpu_address(unsigned long addr);  #ifndef CONFIG_HAVE_SETUP_PER_CPU_AREA  extern void __init setup_per_cpu_areas(void); @@ -147,25 +145,10 @@ extern void __init setup_per_cpu_areas(void);  #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); }) -static inline void __percpu *__alloc_percpu(size_t size, size_t align) +/* can't distinguish from other static vars, always false */ +static inline bool is_kernel_percpu_address(unsigned long addr)  { -	/* -	 * Can't easily make larger alignment work with kmalloc.  WARN -	 * on it.  Larger alignment should only be used for module -	 * percpu sections on SMP for which this path isn't used. -	 */ -	WARN_ON_ONCE(align > SMP_CACHE_BYTES); -	return kzalloc(size, GFP_KERNEL); -} - -static inline void free_percpu(void __percpu *p) -{ -	kfree(p); -} - -static inline phys_addr_t per_cpu_ptr_to_phys(void *addr) -{ -	return __pa(addr); +	return false;  }  static inline void __init setup_per_cpu_areas(void) { } @@ -177,6 +160,10 @@ static inline void *pcpu_lpage_remapped(void *kaddr)  #endif /* CONFIG_SMP */ +extern void __percpu *__alloc_percpu(size_t size, size_t align); +extern void free_percpu(void __percpu *__pdata); +extern phys_addr_t per_cpu_ptr_to_phys(void *addr); +  #define alloc_percpu(type)	\  	(typeof(type) __percpu *)__alloc_percpu(sizeof(type), __alignof__(type)) diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 6f8cd7da1a0..c8e37544040 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h @@ -452,6 +452,8 @@ enum perf_callchain_context {  #include <linux/fs.h>  #include <linux/pid_namespace.h>  #include <linux/workqueue.h> +#include <linux/ftrace.h> +#include <linux/cpu.h>  #include <asm/atomic.h>  #define PERF_MAX_STACK_DEPTH		255 @@ -840,11 +842,56 @@ extern atomic_t perf_swevent_enabled[PERF_COUNT_SW_MAX];  extern void __perf_sw_event(u32, u64, int, struct pt_regs *, u64); +extern void +perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int skip); + +/* + * Take a snapshot of the regs. Skip ip and frame pointer to + * the nth caller. We only need a few of the regs: + * - ip for PERF_SAMPLE_IP + * - cs for user_mode() tests + * - bp for callchains + * - eflags, for future purposes, just in case + */ +static inline void perf_fetch_caller_regs(struct pt_regs *regs, int skip) +{ +	unsigned long ip; + +	memset(regs, 0, sizeof(*regs)); + +	switch (skip) { +	case 1 : +		ip = CALLER_ADDR0; +		break; +	case 2 : +		ip = CALLER_ADDR1; +		break; +	case 3 : +		ip = CALLER_ADDR2; +		break; +	case 4: +		ip = CALLER_ADDR3; +		break; +	/* No need to support further for now */ +	default: +		ip = 0; +	} + +	return perf_arch_fetch_caller_regs(regs, ip, skip); +} +  static inline void  perf_sw_event(u32 event_id, u64 nr, int nmi, struct pt_regs *regs, u64 addr)  { -	if (atomic_read(&perf_swevent_enabled[event_id])) +	if (atomic_read(&perf_swevent_enabled[event_id])) { +		struct pt_regs hot_regs; + +		if (!regs) { +			perf_fetch_caller_regs(&hot_regs, 1); +			regs = &hot_regs; +		}  		__perf_sw_event(event_id, nr, nmi, regs, addr); +	}  }  extern void __perf_event_mmap(struct vm_area_struct *vma); @@ -880,7 +927,8 @@ static inline bool perf_paranoid_kernel(void)  }  extern void perf_event_init(void); -extern void perf_tp_event(int event_id, u64 addr, u64 count, void *record, int entry_size); +extern void perf_tp_event(int event_id, u64 addr, u64 count, void *record, +			  int entry_size, struct pt_regs *regs);  extern void perf_bp_event(struct perf_event *event, void *data);  #ifndef perf_misc_flags @@ -936,5 +984,21 @@ static inline void perf_event_disable(struct perf_event *event)		{ }  #define perf_output_put(handle, x) \  	perf_output_copy((handle), &(x), sizeof(x)) +/* + * This has to have a higher priority than migration_notifier in sched.c. + */ +#define perf_cpu_notifier(fn)					\ +do {								\ +	static struct notifier_block fn##_nb __cpuinitdata =	\ +		{ .notifier_call = fn, .priority = 20 };	\ +	fn(&fn##_nb, (unsigned long)CPU_UP_PREPARE,		\ +		(void *)(unsigned long)smp_processor_id());	\ +	fn(&fn##_nb, (unsigned long)CPU_STARTING,		\ +		(void *)(unsigned long)smp_processor_id());	\ +	fn(&fn##_nb, (unsigned long)CPU_ONLINE,			\ +		(void *)(unsigned long)smp_processor_id());	\ +	register_cpu_notifier(&fn##_nb);			\ +} while (0) +  #endif /* __KERNEL__ */  #endif /* _LINUX_PERF_EVENT_H */ diff --git a/include/linux/poison.h b/include/linux/poison.h index 2110a81c5e2..34066ffd893 100644 --- a/include/linux/poison.h +++ b/include/linux/poison.h @@ -48,6 +48,15 @@  #define POISON_FREE	0x6b	/* for use-after-free poisoning */  #define	POISON_END	0xa5	/* end-byte of poisoning */ +/********** mm/hugetlb.c **********/ +/* + * Private mappings of hugetlb pages use this poisoned value for + * page->mapping. The core VM should not be doing anything with this mapping + * but futex requires the existence of some page->mapping value even though it + * is unused if PAGE_MAPPING_ANON is set. + */ +#define HUGETLB_POISON	((void *)(0x00300300 + POISON_POINTER_DELTA + PAGE_MAPPING_ANON)) +  /********** arch/$ARCH/mm/init.c **********/  #define POISON_FREE_INITMEM	0xcc diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h index c5da7491809..55ca73cf25e 100644 --- a/include/linux/radix-tree.h +++ b/include/linux/radix-tree.h @@ -121,6 +121,13 @@ do {									\   * (Note, rcu_assign_pointer and rcu_dereference are not needed to control   * access to data items when inserting into or looking up from the radix tree)   * + * Note that the value returned by radix_tree_tag_get() may not be relied upon + * if only the RCU read lock is held.  Functions to set/clear tags and to + * delete nodes running concurrently with it may affect its result such that + * two consecutive reads in the same locked section may return different + * values.  If reliability is required, modification functions must also be + * excluded from concurrency. + *   * radix_tree_tagged is able to be called without locking or RCU.   */ diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 3024050c82a..db266bbed23 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h @@ -101,10 +101,7 @@ extern struct lockdep_map rcu_sched_lock_map;  # define rcu_read_release_sched() \  		lock_release(&rcu_sched_lock_map, 1, _THIS_IP_) -static inline int debug_lockdep_rcu_enabled(void) -{ -	return likely(rcu_scheduler_active && debug_locks); -} +extern int debug_lockdep_rcu_enabled(void);  /**   * rcu_read_lock_held - might we be in RCU read-side critical section? @@ -123,22 +120,11 @@ static inline int rcu_read_lock_held(void)  	return lock_is_held(&rcu_lock_map);  } -/** - * rcu_read_lock_bh_held - might we be in RCU-bh read-side critical section? - * - * If CONFIG_PROVE_LOCKING is selected and enabled, returns nonzero iff in - * an RCU-bh read-side critical section.  In absence of CONFIG_PROVE_LOCKING, - * this assumes we are in an RCU-bh read-side critical section unless it can - * prove otherwise. - * - * Check rcu_scheduler_active to prevent false positives during boot. +/* + * rcu_read_lock_bh_held() is defined out of line to avoid #include-file + * hell.   */ -static inline int rcu_read_lock_bh_held(void) -{ -	if (!debug_lockdep_rcu_enabled()) -		return 1; -	return lock_is_held(&rcu_bh_lock_map); -} +extern int rcu_read_lock_bh_held(void);  /**   * rcu_read_lock_sched_held - might we be in RCU-sched read-side critical section? @@ -160,7 +146,7 @@ static inline int rcu_read_lock_sched_held(void)  		return 1;  	if (debug_locks)  		lockdep_opinion = lock_is_held(&rcu_sched_lock_map); -	return lockdep_opinion || preempt_count() != 0; +	return lockdep_opinion || preempt_count() != 0 || irqs_disabled();  }  #else /* #ifdef CONFIG_PREEMPT */  static inline int rcu_read_lock_sched_held(void) @@ -191,7 +177,7 @@ static inline int rcu_read_lock_bh_held(void)  #ifdef CONFIG_PREEMPT  static inline int rcu_read_lock_sched_held(void)  { -	return !rcu_scheduler_active || preempt_count() != 0; +	return !rcu_scheduler_active || preempt_count() != 0 || irqs_disabled();  }  #else /* #ifdef CONFIG_PREEMPT */  static inline int rcu_read_lock_sched_held(void) @@ -204,14 +190,34 @@ static inline int rcu_read_lock_sched_held(void)  #ifdef CONFIG_PROVE_RCU +extern int rcu_my_thread_group_empty(void); +  /**   * rcu_dereference_check - rcu_dereference with debug checking + * @p: The pointer to read, prior to dereferencing + * @c: The conditions under which the dereference will take place + * + * Do an rcu_dereference(), but check that the conditions under which the + * dereference will take place are correct.  Typically the conditions indicate + * the various locking conditions that should be held at that point.  The check + * should return true if the conditions are satisfied.   * - * Do an rcu_dereference(), but check that the context is correct. - * For example, rcu_dereference_check(gp, rcu_read_lock_held()) to - * ensure that the rcu_dereference_check() executes within an RCU - * read-side critical section.  It is also possible to check for - * locks being held, for example, by using lockdep_is_held(). + * For example: + * + *	bar = rcu_dereference_check(foo->bar, rcu_read_lock_held() || + *					      lockdep_is_held(&foo->lock)); + * + * could be used to indicate to lockdep that foo->bar may only be dereferenced + * if either the RCU read lock is held, or that the lock required to replace + * the bar struct at foo->bar is held. + * + * Note that the list of conditions may also include indications of when a lock + * need not be held, for example during initialisation or destruction of the + * target struct: + * + *	bar = rcu_dereference_check(foo->bar, rcu_read_lock_held() || + *					      lockdep_is_held(&foo->lock) || + *					      atomic_read(&foo->usage) == 0);   */  #define rcu_dereference_check(p, c) \  	({ \ @@ -220,13 +226,45 @@ static inline int rcu_read_lock_sched_held(void)  		rcu_dereference_raw(p); \  	}) +/** + * rcu_dereference_protected - fetch RCU pointer when updates prevented + * + * Return the value of the specified RCU-protected pointer, but omit + * both the smp_read_barrier_depends() and the ACCESS_ONCE().  This + * is useful in cases where update-side locks prevent the value of the + * pointer from changing.  Please note that this primitive does -not- + * prevent the compiler from repeating this reference or combining it + * with other references, so it should not be used without protection + * of appropriate locks. + */ +#define rcu_dereference_protected(p, c) \ +	({ \ +		if (debug_lockdep_rcu_enabled() && !(c)) \ +			lockdep_rcu_dereference(__FILE__, __LINE__); \ +		(p); \ +	}) +  #else /* #ifdef CONFIG_PROVE_RCU */  #define rcu_dereference_check(p, c)	rcu_dereference_raw(p) +#define rcu_dereference_protected(p, c) (p)  #endif /* #else #ifdef CONFIG_PROVE_RCU */  /** + * rcu_access_pointer - fetch RCU pointer with no dereferencing + * + * Return the value of the specified RCU-protected pointer, but omit the + * smp_read_barrier_depends() and keep the ACCESS_ONCE().  This is useful + * when the value of this pointer is accessed, but the pointer is not + * dereferenced, for example, when testing an RCU-protected pointer against + * NULL.  This may also be used in cases where update-side locks prevent + * the value of the pointer from changing, but rcu_dereference_protected() + * is a lighter-weight primitive for this use case. + */ +#define rcu_access_pointer(p)	ACCESS_ONCE(p) + +/**   * rcu_read_lock - mark the beginning of an RCU read-side critical section.   *   * When synchronize_rcu() is invoked on one CPU while other CPUs diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index 28c9fd020d3..ebd74726529 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h @@ -183,9 +183,13 @@ static inline struct regulator *__must_check regulator_get(struct device *dev,  {  	/* Nothing except the stubbed out regulator API should be  	 * looking at the value except to check if it is an error -	 * value so the actual return value doesn't matter. +	 * value. Drivers are free to handle NULL specifically by +	 * skipping all regulator API calls, but they don't have to. +	 * Drivers which don't, should make sure they properly handle +	 * corner cases of the API, such as regulator_get_voltage() +	 * returning 0.  	 */ -	return (struct regulator *)id; +	return NULL;  }  static inline void regulator_put(struct regulator *regulator)  { diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h index 99928dce37e..7fa02b4af83 100644 --- a/include/linux/reiserfs_xattr.h +++ b/include/linux/reiserfs_xattr.h @@ -70,6 +70,11 @@ int reiserfs_security_write(struct reiserfs_transaction_handle *th,  void reiserfs_security_free(struct reiserfs_security_handle *sec);  #endif +static inline int reiserfs_xattrs_initialized(struct super_block *sb) +{ +	return REISERFS_SB(sb)->priv_root != NULL; +} +  #define xattr_size(size) ((size) + sizeof(struct reiserfs_xattr_header))  static inline loff_t reiserfs_xattr_nblocks(struct inode *inode, loff_t size)  { diff --git a/include/linux/security.h b/include/linux/security.h index 233d20b52c1..3158dd982d2 100644 --- a/include/linux/security.h +++ b/include/linux/security.h @@ -33,7 +33,7 @@  #include <linux/sched.h>  #include <linux/key.h>  #include <linux/xfrm.h> -#include <linux/gfp.h> +#include <linux/slab.h>  #include <net/flow.h>  /* Maximum number of letters for an LSM name string */ diff --git a/include/linux/serial_sci.h b/include/linux/serial_sci.h index 1b177d29a7f..193d4bfe42f 100644 --- a/include/linux/serial_sci.h +++ b/include/linux/serial_sci.h @@ -2,7 +2,9 @@  #define __LINUX_SERIAL_SCI_H  #include <linux/serial_core.h> +#ifdef CONFIG_SERIAL_SH_SCI_DMA  #include <asm/dmaengine.h> +#endif  /*   * Generic header for SuperH SCI(F) (used by sh/sh64/h8300 and related parts) @@ -30,8 +32,10 @@ struct plat_sci_port {  	upf_t		flags;			/* UPF_* flags */  	char		*clk;			/* clock string */  	struct device	*dma_dev; +#ifdef CONFIG_SERIAL_SH_SCI_DMA  	enum sh_dmae_slave_chan_id dma_slave_tx;  	enum sh_dmae_slave_chan_id dma_slave_rx; +#endif  };  #endif /* __LINUX_SERIAL_SCI_H */ diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 03f816a9b65..124f90cd5a3 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -190,9 +190,6 @@ struct skb_shared_info {  	atomic_t	dataref;  	unsigned short	nr_frags;  	unsigned short	gso_size; -#ifdef CONFIG_HAS_DMA -	dma_addr_t	dma_head; -#endif  	/* Warning: this field is not always filled in (UFO)! */  	unsigned short	gso_segs;  	unsigned short  gso_type; @@ -201,9 +198,6 @@ struct skb_shared_info {  	struct sk_buff	*frag_list;  	struct skb_shared_hwtstamps hwtstamps;  	skb_frag_t	frags[MAX_SKB_FRAGS]; -#ifdef CONFIG_HAS_DMA -	dma_addr_t	dma_maps[MAX_SKB_FRAGS]; -#endif  	/* Intermediate layers must ensure that destructor_arg  	 * remains valid until skb destructor */  	void *		destructor_arg; diff --git a/include/linux/slab.h b/include/linux/slab.h index 488446289ca..49d1247cd6d 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h @@ -106,6 +106,7 @@ int kmem_cache_shrink(struct kmem_cache *);  void kmem_cache_free(struct kmem_cache *, void *);  unsigned int kmem_cache_size(struct kmem_cache *);  const char *kmem_cache_name(struct kmem_cache *); +int kern_ptr_validate(const void *ptr, unsigned long size);  int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr);  /* diff --git a/include/linux/smb_fs_sb.h b/include/linux/smb_fs_sb.h index 8a060a7040d..bb947dd1fba 100644 --- a/include/linux/smb_fs_sb.h +++ b/include/linux/smb_fs_sb.h @@ -10,6 +10,7 @@  #define _SMB_FS_SB  #include <linux/types.h> +#include <linux/backing-dev.h>  #include <linux/smb.h>  /* @@ -74,6 +75,8 @@ struct smb_sb_info {  	struct smb_ops *ops;  	struct super_block *super_block; + +	struct backing_dev_info bdi;  };  static inline int diff --git a/include/linux/socket.h b/include/linux/socket.h index 7b3aae2052a..354cc5617f8 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h @@ -255,6 +255,7 @@ struct ucred {  #define MSG_ERRQUEUE	0x2000	/* Fetch message from error queue */  #define MSG_NOSIGNAL	0x4000	/* Do not generate SIGPIPE */  #define MSG_MORE	0x8000	/* Sender will send more */ +#define MSG_WAITFORONE	0x10000	/* recvmmsg(): block until 1+ packets avail */  #define MSG_EOF         MSG_FIN diff --git a/include/linux/spi/l4f00242t03.h b/include/linux/spi/l4f00242t03.h new file mode 100644 index 00000000000..aee1dbda4ed --- /dev/null +++ b/include/linux/spi/l4f00242t03.h @@ -0,0 +1,31 @@ +/* + * l4f00242t03.h -- Platform glue for Epson L4F00242T03 LCD + * + * Copyright (c) 2009 Alberto Panizzo <maramaopercheseimorto@gmail.com> + * Based on Marek Vasut work in lms283gf05.h + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA +*/ + +#ifndef _INCLUDE_LINUX_SPI_L4F00242T03_H_ +#define _INCLUDE_LINUX_SPI_L4F00242T03_H_ + +struct l4f00242t03_pdata { +	unsigned int	reset_gpio; +	unsigned int	data_enable_gpio; +	const char 	*io_supply;	/* will be set to 1.8 V */ +	const char 	*core_supply;	/* will be set to 2.8 V */ +}; + +#endif /* _INCLUDE_LINUX_SPI_L4F00242T03_H_ */ diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 97b60b37f44..af56071b06f 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h @@ -21,6 +21,7 @@  #include <linux/device.h>  #include <linux/mod_devicetable.h> +#include <linux/slab.h>  /*   * INTERFACES between SPI master-side drivers and SPI infrastructure. diff --git a/include/linux/sunrpc/bc_xprt.h b/include/linux/sunrpc/bc_xprt.h index d7152b451e2..7c91260c44a 100644 --- a/include/linux/sunrpc/bc_xprt.h +++ b/include/linux/sunrpc/bc_xprt.h @@ -36,7 +36,6 @@ struct rpc_rqst *xprt_alloc_bc_request(struct rpc_xprt *xprt);  void xprt_free_bc_request(struct rpc_rqst *req);  int xprt_setup_backchannel(struct rpc_xprt *, unsigned int min_reqs);  void xprt_destroy_backchannel(struct rpc_xprt *, int max_reqs); -void bc_release_request(struct rpc_task *);  int bc_send(struct rpc_rqst *req);  /* @@ -59,6 +58,10 @@ static inline int svc_is_backchannel(const struct svc_rqst *rqstp)  {  	return 0;  } + +static inline void xprt_free_bc_request(struct rpc_rqst *req) +{ +}  #endif /* CONFIG_NFS_V4_1 */  #endif /* _LINUX_SUNRPC_BC_XPRT_H */ diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 44f2ad0e882..057929b0a65 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -105,18 +105,18 @@ struct perf_event_attr;  #ifdef CONFIG_PERF_EVENTS -#define TRACE_SYS_ENTER_PROFILE_INIT(sname)				       \ -	.profile_enable = prof_sysenter_enable,				       \ -	.profile_disable = prof_sysenter_disable, +#define TRACE_SYS_ENTER_PERF_INIT(sname)				       \ +	.perf_event_enable = perf_sysenter_enable,			       \ +	.perf_event_disable = perf_sysenter_disable, -#define TRACE_SYS_EXIT_PROFILE_INIT(sname)				       \ -	.profile_enable = prof_sysexit_enable,				       \ -	.profile_disable = prof_sysexit_disable, +#define TRACE_SYS_EXIT_PERF_INIT(sname)					       \ +	.perf_event_enable = perf_sysexit_enable,			       \ +	.perf_event_disable = perf_sysexit_disable,  #else -#define TRACE_SYS_ENTER_PROFILE(sname) -#define TRACE_SYS_ENTER_PROFILE_INIT(sname) -#define TRACE_SYS_EXIT_PROFILE(sname) -#define TRACE_SYS_EXIT_PROFILE_INIT(sname) +#define TRACE_SYS_ENTER_PERF(sname) +#define TRACE_SYS_ENTER_PERF_INIT(sname) +#define TRACE_SYS_EXIT_PERF(sname) +#define TRACE_SYS_EXIT_PERF_INIT(sname)  #endif /* CONFIG_PERF_EVENTS */  #ifdef CONFIG_FTRACE_SYSCALLS @@ -153,7 +153,7 @@ struct perf_event_attr;  		.regfunc		= reg_event_syscall_enter,	\  		.unregfunc		= unreg_event_syscall_enter,	\  		.data			= (void *)&__syscall_meta_##sname,\ -		TRACE_SYS_ENTER_PROFILE_INIT(sname)			\ +		TRACE_SYS_ENTER_PERF_INIT(sname)			\  	}  #define SYSCALL_TRACE_EXIT_EVENT(sname)					\ @@ -175,7 +175,7 @@ struct perf_event_attr;  		.regfunc		= reg_event_syscall_exit,	\  		.unregfunc		= unreg_event_syscall_exit,	\  		.data			= (void *)&__syscall_meta_##sname,\ -		TRACE_SYS_EXIT_PROFILE_INIT(sname)			\ +		TRACE_SYS_EXIT_PERF_INIT(sname)			\  	}  #define SYSCALL_METADATA(sname, nb)				\ @@ -688,7 +688,7 @@ asmlinkage long sys_shmat(int shmid, char __user *shmaddr, int shmflg);  asmlinkage long sys_shmget(key_t key, size_t size, int flag);  asmlinkage long sys_shmdt(char __user *shmaddr);  asmlinkage long sys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf); -asmlinkage long sys_ipc(unsigned int call, int first, int second, +asmlinkage long sys_ipc(unsigned int call, int first, unsigned long second,  		unsigned long third, void __user *ptr, long fifth);  asmlinkage long sys_mq_open(const char __user *name, int oflag, mode_t mode, struct mq_attr __user *attr); diff --git a/include/linux/taskstats_kern.h b/include/linux/taskstats_kern.h index b6523c1427c..58de6edf751 100644 --- a/include/linux/taskstats_kern.h +++ b/include/linux/taskstats_kern.h @@ -9,6 +9,7 @@  #include <linux/taskstats.h>  #include <linux/sched.h> +#include <linux/slab.h>  #ifdef CONFIG_TASKSTATS  extern struct kmem_cache *taskstats_cache; diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index f59604ed0ec..78b4bd3be49 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h @@ -49,7 +49,7 @@ struct tracepoint {  		void **it_func;						\  									\  		rcu_read_lock_sched_notrace();				\ -		it_func = rcu_dereference((tp)->funcs);			\ +		it_func = rcu_dereference_sched((tp)->funcs);		\  		if (it_func) {						\  			do {						\  				((void(*)(proto))(*it_func))(args);	\ diff --git a/include/linux/tty.h b/include/linux/tty.h index 568369a8630..4409967db0c 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h @@ -70,12 +70,13 @@ struct tty_buffer {  /*   * We default to dicing tty buffer allocations to this many characters - * in order to avoid multiple page allocations. We assume tty_buffer itself - * is under 256 bytes. See tty_buffer_find for the allocation logic this - * must match + * in order to avoid multiple page allocations. We know the size of + * tty_buffer itself but it must also be taken into account that the + * the buffer is 256 byte aligned. See tty_buffer_find for the allocation + * logic this must match   */ -#define TTY_BUFFER_PAGE		((PAGE_SIZE  - 256) / 2) +#define TTY_BUFFER_PAGE	(((PAGE_SIZE - sizeof(struct tty_buffer)) / 2) & ~0xFF)  struct tty_bufhead { @@ -223,6 +224,7 @@ struct tty_port {  	wait_queue_head_t	close_wait;	/* Close waiters */  	wait_queue_head_t	delta_msr_wait;	/* Modem status change */  	unsigned long		flags;		/* TTY flags ASY_*/ +	unsigned char		console:1;	/* port is a console */  	struct mutex		mutex;		/* Locking */  	struct mutex		buf_mutex;	/* Buffer alloc lock */  	unsigned char		*xmit_buf;	/* Optional buffer */ diff --git a/include/linux/usb.h b/include/linux/usb.h index 8c9f053111b..739f1fd1cc1 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -1055,7 +1055,8 @@ typedef void (*usb_complete_t)(struct urb *);   * @number_of_packets: Lists the number of ISO transfer buffers.   * @interval: Specifies the polling interval for interrupt or isochronous   *	transfers.  The units are frames (milliseconds) for full and low - *	speed devices, and microframes (1/8 millisecond) for highspeed ones. + *	speed devices, and microframes (1/8 millisecond) for highspeed + *	and SuperSpeed devices.   * @error_count: Returns the number of ISO transfers that reported errors.   * @context: For use in completion functions.  This normally points to   *	request-specific driver context. @@ -1084,7 +1085,7 @@ typedef void (*usb_complete_t)(struct urb *);   * Alternatively, drivers may pass the URB_NO_xxx_DMA_MAP transfer flags,   * which tell the host controller driver that no such mapping is needed since   * the device driver is DMA-aware.  For example, a device driver might - * allocate a DMA buffer with usb_buffer_alloc() or call usb_buffer_map(). + * allocate a DMA buffer with usb_alloc_coherent() or call usb_buffer_map().   * When these transfer flags are provided, host controller drivers will   * attempt to use the dma addresses found in the transfer_dma and/or   * setup_dma fields rather than determining a dma address themselves. @@ -1286,9 +1287,16 @@ static inline void usb_fill_bulk_urb(struct urb *urb,   *   * Initializes a interrupt urb with the proper information needed to submit   * it to a device. - * Note that high speed interrupt endpoints use a logarithmic encoding of - * the endpoint interval, and express polling intervals in microframes - * (eight per millisecond) rather than in frames (one per millisecond). + * + * Note that High Speed and SuperSpeed interrupt endpoints use a logarithmic + * encoding of the endpoint interval, and express polling intervals in + * microframes (eight per millisecond) rather than in frames (one per + * millisecond). + * + * Wireless USB also uses the logarithmic encoding, but specifies it in units of + * 128us instead of 125us.  For Wireless USB devices, the interval is passed + * through to the host controller, rather than being translated into microframe + * units.   */  static inline void usb_fill_int_urb(struct urb *urb,  				    struct usb_device *dev, @@ -1305,7 +1313,7 @@ static inline void usb_fill_int_urb(struct urb *urb,  	urb->transfer_buffer_length = buffer_length;  	urb->complete = complete_fn;  	urb->context = context; -	if (dev->speed == USB_SPEED_HIGH) +	if (dev->speed == USB_SPEED_HIGH || dev->speed == USB_SPEED_SUPER)  		urb->interval = 1 << (interval - 1);  	else  		urb->interval = interval; @@ -1358,11 +1366,23 @@ static inline int usb_urb_dir_out(struct urb *urb)  	return (urb->transfer_flags & URB_DIR_MASK) == URB_DIR_OUT;  } -void *usb_buffer_alloc(struct usb_device *dev, size_t size, +void *usb_alloc_coherent(struct usb_device *dev, size_t size,  	gfp_t mem_flags, dma_addr_t *dma); -void usb_buffer_free(struct usb_device *dev, size_t size, +void usb_free_coherent(struct usb_device *dev, size_t size,  	void *addr, dma_addr_t dma); +/* Compatible macros while we switch over */ +static inline void *usb_buffer_alloc(struct usb_device *dev, size_t size, +				     gfp_t mem_flags, dma_addr_t *dma) +{ +	return usb_alloc_coherent(dev, size, mem_flags, dma); +} +static inline void usb_buffer_free(struct usb_device *dev, size_t size, +				   void *addr, dma_addr_t dma) +{ +	return usb_free_coherent(dev, size, addr, dma); +} +  #if 0  struct urb *usb_buffer_map(struct urb *urb);  void usb_buffer_dmasync(struct urb *urb); diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index bbf45d500b6..f4b7ca516cd 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h @@ -15,6 +15,8 @@  #ifndef __LINUX_USB_GADGET_H  #define __LINUX_USB_GADGET_H +#include <linux/slab.h> +  struct usb_ep;  /** diff --git a/include/linux/virtio_console.h b/include/linux/virtio_console.h index ae4f039515b..92228a8fbcb 100644 --- a/include/linux/virtio_console.h +++ b/include/linux/virtio_console.h @@ -12,37 +12,14 @@  /* Feature bits */  #define VIRTIO_CONSOLE_F_SIZE	0	/* Does host provide console size? */ -#define VIRTIO_CONSOLE_F_MULTIPORT 1	/* Does host provide multiple ports? */  struct virtio_console_config {  	/* colums of the screens */  	__u16 cols;  	/* rows of the screens */  	__u16 rows; -	/* max. number of ports this device can hold */ -	__u32 max_nr_ports; -	/* number of ports added so far */ -	__u32 nr_ports;  } __attribute__((packed)); -/* - * A message that's passed between the Host and the Guest for a - * particular port. - */ -struct virtio_console_control { -	__u32 id;		/* Port number */ -	__u16 event;		/* The kind of control event (see below) */ -	__u16 value;		/* Extra information for the key */ -}; - -/* Some events for control messages */ -#define VIRTIO_CONSOLE_PORT_READY	0 -#define VIRTIO_CONSOLE_CONSOLE_PORT	1 -#define VIRTIO_CONSOLE_RESIZE		2 -#define VIRTIO_CONSOLE_PORT_OPEN	3 -#define VIRTIO_CONSOLE_PORT_NAME	4 -#define VIRTIO_CONSOLE_PORT_REMOVE	5 -  #ifdef __KERNEL__  int __init virtio_cons_early_init(int (*put_chars)(u32, const char *, int));  #endif /* __KERNEL__ */ diff --git a/include/linux/vt.h b/include/linux/vt.h index 778b7b2a47d..d5dd0bc408f 100644 --- a/include/linux/vt.h +++ b/include/linux/vt.h @@ -27,7 +27,7 @@ struct vt_mode {  #define VT_SETMODE	0x5602	/* set mode of active vt */  #define		VT_AUTO		0x00	/* auto vt switching */  #define		VT_PROCESS	0x01	/* process controls switching */ -#define		VT_PROCESS_AUTO 0x02	/* process is notified of switching */ +#define		VT_ACKACQ	0x02	/* acknowledge switch */  struct vt_stat {  	unsigned short v_active;	/* active vt */ @@ -38,7 +38,6 @@ struct vt_stat {  #define VT_SENDSIG	0x5604	/* signal to send to bitmask of vts */  #define VT_RELDISP	0x5605	/* release display */ -#define		VT_ACKACQ	0x02	/* acknowledge switch */  #define VT_ACTIVATE	0x5606	/* make vt active */  #define VT_WAITACTIVE	0x5607	/* wait for vt active */ diff --git a/include/linux/wimax/debug.h b/include/linux/wimax/debug.h index db8096e8853..57031b4d12f 100644 --- a/include/linux/wimax/debug.h +++ b/include/linux/wimax/debug.h @@ -155,6 +155,7 @@  #include <linux/types.h>  #include <linux/device.h> +#include <linux/slab.h>  /* Backend stuff */ diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 76e8903cd20..36520ded3e0 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h @@ -34,6 +34,9 @@ struct writeback_control {  	enum writeback_sync_modes sync_mode;  	unsigned long *older_than_this;	/* If !NULL, only write back inodes  					   older than this */ +	unsigned long wb_start;         /* Time writeback_inodes_wb was +					   called. This is needed to avoid +					   extra jobs and livelock */  	long nr_to_write;		/* Write this many pages, and decrement  					   this for each page written */  	long pages_skipped;		/* Pages which were not written */  |