diff options
Diffstat (limited to 'include/linux')
56 files changed, 523 insertions, 191 deletions
diff --git a/include/linux/capability.h b/include/linux/capability.h index 68d56effc32..d10b7ed595b 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h @@ -360,11 +360,11 @@ struct cpu_vfs_cap_data {  #define CAP_WAKE_ALARM            35 -/* Allow preventing system suspends while epoll events are pending */ +/* Allow preventing system suspends */ -#define CAP_EPOLLWAKEUP      36 +#define CAP_BLOCK_SUSPEND    36 -#define CAP_LAST_CAP         CAP_EPOLLWAKEUP +#define CAP_LAST_CAP         CAP_BLOCK_SUSPEND  #define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP) diff --git a/include/linux/ceph/messenger.h b/include/linux/ceph/messenger.h index 2521a95fa6d..44c87e731e9 100644 --- a/include/linux/ceph/messenger.h +++ b/include/linux/ceph/messenger.h @@ -163,16 +163,8 @@ struct ceph_connection {  	/* connection negotiation temps */  	char in_banner[CEPH_BANNER_MAX_LEN]; -	union { -		struct {  /* outgoing connection */ -			struct ceph_msg_connect out_connect; -			struct ceph_msg_connect_reply in_reply; -		}; -		struct {  /* incoming */ -			struct ceph_msg_connect in_connect; -			struct ceph_msg_connect_reply out_reply; -		}; -	}; +	struct ceph_msg_connect out_connect; +	struct ceph_msg_connect_reply in_reply;  	struct ceph_entity_addr actual_peer_addr;  	/* message out temps */ diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index 6c26a3da0e0..89dcd30ac8e 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h @@ -34,6 +34,7 @@ struct cpuidle_driver;  struct cpuidle_state_usage {  	void		*driver_data; +	unsigned long long	disable;  	unsigned long long	usage;  	unsigned long long	time; /* in US */  }; @@ -46,7 +47,7 @@ struct cpuidle_state {  	unsigned int	exit_latency; /* in US */  	int		power_usage; /* in mW */  	unsigned int	target_residency; /* in US */ -	unsigned int    disable; +	bool		disabled; /* disabled on all CPUs */  	int (*enter)	(struct cpuidle_device *dev,  			struct cpuidle_driver *drv, @@ -136,13 +137,17 @@ struct cpuidle_driver {  extern void disable_cpuidle(void);  extern int cpuidle_idle_call(void);  extern int cpuidle_register_driver(struct cpuidle_driver *drv); -struct cpuidle_driver *cpuidle_get_driver(void); +extern struct cpuidle_driver *cpuidle_get_driver(void); +extern struct cpuidle_driver *cpuidle_driver_ref(void); +extern void cpuidle_driver_unref(void);  extern void cpuidle_unregister_driver(struct cpuidle_driver *drv);  extern int cpuidle_register_device(struct cpuidle_device *dev);  extern void cpuidle_unregister_device(struct cpuidle_device *dev);  extern void cpuidle_pause_and_lock(void);  extern void cpuidle_resume_and_unlock(void); +extern void cpuidle_pause(void); +extern void cpuidle_resume(void);  extern int cpuidle_enable_device(struct cpuidle_device *dev);  extern void cpuidle_disable_device(struct cpuidle_device *dev);  extern int cpuidle_wrap_enter(struct cpuidle_device *dev, @@ -157,6 +162,8 @@ static inline int cpuidle_idle_call(void) { return -ENODEV; }  static inline int cpuidle_register_driver(struct cpuidle_driver *drv)  {return -ENODEV; }  static inline struct cpuidle_driver *cpuidle_get_driver(void) {return NULL; } +static inline struct cpuidle_driver *cpuidle_driver_ref(void) {return NULL; } +static inline void cpuidle_driver_unref(void) {}  static inline void cpuidle_unregister_driver(struct cpuidle_driver *drv) { }  static inline int cpuidle_register_device(struct cpuidle_device *dev)  {return -ENODEV; } @@ -164,6 +171,8 @@ static inline void cpuidle_unregister_device(struct cpuidle_device *dev) { }  static inline void cpuidle_pause_and_lock(void) { }  static inline void cpuidle_resume_and_unlock(void) { } +static inline void cpuidle_pause(void) { } +static inline void cpuidle_resume(void) { }  static inline int cpuidle_enable_device(struct cpuidle_device *dev)  {return -ENODEV; }  static inline void cpuidle_disable_device(struct cpuidle_device *dev) { } @@ -202,14 +211,7 @@ struct cpuidle_governor {  extern int cpuidle_register_governor(struct cpuidle_governor *gov);  extern void cpuidle_unregister_governor(struct cpuidle_governor *gov); -#ifdef CONFIG_INTEL_IDLE -extern int intel_idle_cpu_init(int cpu);  #else -static inline int intel_idle_cpu_init(int cpu) { return -1; } -#endif - -#else -static inline int intel_idle_cpu_init(int cpu) { return -1; }  static inline int cpuidle_register_governor(struct cpuidle_governor *gov)  {return 0;} diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 094789ff3e9..caa34e50537 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -128,7 +128,7 @@ struct dentry {  	 	struct rcu_head d_rcu;  	} d_u;  	struct list_head d_subdirs;	/* our children */ -	struct list_head d_alias;	/* inode alias list */ +	struct hlist_node d_alias;	/* inode alias list */  };  /* @@ -144,7 +144,7 @@ enum dentry_d_lock_class  };  struct dentry_operations { -	int (*d_revalidate)(struct dentry *, struct nameidata *); +	int (*d_revalidate)(struct dentry *, unsigned int);  	int (*d_hash)(const struct dentry *, const struct inode *,  			struct qstr *);  	int (*d_compare)(const struct dentry *, const struct inode *, diff --git a/include/linux/device.h b/include/linux/device.h index 161d96241b1..6de94151ff6 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -865,8 +865,6 @@ extern int (*platform_notify_remove)(struct device *dev);  extern struct device *get_device(struct device *dev);  extern void put_device(struct device *dev); -extern void wait_for_device_probe(void); -  #ifdef CONFIG_DEVTMPFS  extern int devtmpfs_create_node(struct device *dev);  extern int devtmpfs_delete_node(struct device *dev); diff --git a/include/linux/dw_apb_timer.h b/include/linux/dw_apb_timer.h index 07261d52a6d..1148575fd13 100644 --- a/include/linux/dw_apb_timer.h +++ b/include/linux/dw_apb_timer.h @@ -53,4 +53,5 @@ void dw_apb_clocksource_start(struct dw_apb_clocksource *dw_cs);  cycle_t dw_apb_clocksource_read(struct dw_apb_clocksource *dw_cs);  void dw_apb_clocksource_unregister(struct dw_apb_clocksource *dw_cs); +extern struct sys_timer dw_apb_timer;  #endif /* __DW_APB_TIMER_H__ */ diff --git a/include/linux/eventpoll.h b/include/linux/eventpoll.h index 6f8be328770..f4bb378ccf6 100644 --- a/include/linux/eventpoll.h +++ b/include/linux/eventpoll.h @@ -34,7 +34,7 @@   * re-allowed until epoll_wait is called again after consuming the wakeup   * event(s).   * - * Requires CAP_EPOLLWAKEUP + * Requires CAP_BLOCK_SUSPEND   */  #define EPOLLWAKEUP (1 << 29) diff --git a/include/linux/file.h b/include/linux/file.h index 58bf158c53d..a22408bac0d 100644 --- a/include/linux/file.h +++ b/include/linux/file.h @@ -39,4 +39,7 @@ extern void put_unused_fd(unsigned int fd);  extern void fd_install(unsigned int fd, struct file *file); +extern void flush_delayed_fput(void); +extern void __fput_sync(struct file *); +  #endif /* __LINUX_FILE_H */ diff --git a/include/linux/fs.h b/include/linux/fs.h index 17fd887c798..8fabb037a48 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -826,7 +826,7 @@ struct inode {  	struct list_head	i_lru;		/* inode LRU list */  	struct list_head	i_sb_list;  	union { -		struct list_head	i_dentry; +		struct hlist_head	i_dentry;  		struct rcu_head		i_rcu;  	};  	u64			i_version; @@ -1571,7 +1571,7 @@ extern void unlock_super(struct super_block *);  /*   * VFS helper functions..   */ -extern int vfs_create(struct inode *, struct dentry *, umode_t, struct nameidata *); +extern int vfs_create(struct inode *, struct dentry *, umode_t, bool);  extern int vfs_mkdir(struct inode *, struct dentry *, umode_t);  extern int vfs_mknod(struct inode *, struct dentry *, umode_t, dev_t);  extern int vfs_symlink(struct inode *, struct dentry *, const char *); @@ -1666,7 +1666,7 @@ struct file_operations {  };  struct inode_operations { -	struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *); +	struct dentry * (*lookup) (struct inode *,struct dentry *, unsigned int);  	void * (*follow_link) (struct dentry *, struct nameidata *);  	int (*permission) (struct inode *, int);  	struct posix_acl * (*get_acl)(struct inode *, int); @@ -1674,7 +1674,7 @@ struct inode_operations {  	int (*readlink) (struct dentry *, char __user *,int);  	void (*put_link) (struct dentry *, struct nameidata *, void *); -	int (*create) (struct inode *,struct dentry *,umode_t,struct nameidata *); +	int (*create) (struct inode *,struct dentry *, umode_t, bool);  	int (*link) (struct dentry *,struct inode *,struct dentry *);  	int (*unlink) (struct inode *,struct dentry *);  	int (*symlink) (struct inode *,struct dentry *,const char *); @@ -1693,6 +1693,9 @@ struct inode_operations {  	int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start,  		      u64 len);  	int (*update_time)(struct inode *, struct timespec *, int); +	int (*atomic_open)(struct inode *, struct dentry *, +			   struct file *, unsigned open_flag, +			   umode_t create_mode, int *opened);  } ____cacheline_aligned;  struct seq_file; @@ -1911,7 +1914,7 @@ void free_anon_bdev(dev_t);  struct super_block *sget(struct file_system_type *type,  			int (*test)(struct super_block *,void *),  			int (*set)(struct super_block *,void *), -			void *data); +			int flags, void *data);  extern struct dentry *mount_pseudo(struct file_system_type *, char *,  	const struct super_operations *ops,  	const struct dentry_operations *dops, @@ -2057,10 +2060,17 @@ extern long do_sys_open(int dfd, const char __user *filename, int flags,  extern struct file *filp_open(const char *, int, umode_t);  extern struct file *file_open_root(struct dentry *, struct vfsmount *,  				   const char *, int); -extern struct file * dentry_open(struct dentry *, struct vfsmount *, int, -				 const struct cred *); +extern struct file * dentry_open(const struct path *, int, const struct cred *);  extern int filp_close(struct file *, fl_owner_t id);  extern char * getname(const char __user *); +enum { +	FILE_CREATED = 1, +	FILE_OPENED = 2 +}; +extern int finish_open(struct file *file, struct dentry *dentry, +			int (*open)(struct inode *, struct file *), +			int *opened); +extern int finish_no_open(struct file *file, struct dentry *dentry);  /* fs/ioctl.c */ @@ -2091,6 +2101,7 @@ extern sector_t blkdev_max_block(struct block_device *bdev);  extern void bd_forget(struct inode *inode);  extern void bdput(struct block_device *);  extern void invalidate_bdev(struct block_device *); +extern void iterate_bdevs(void (*)(struct block_device *, void *), void *);  extern int sync_blockdev(struct block_device *bdev);  extern void kill_bdev(struct block_device *);  extern struct super_block *freeze_bdev(struct block_device *); @@ -2112,6 +2123,10 @@ static inline int thaw_bdev(struct block_device *bdev, struct super_block *sb)  {  	return 0;  } + +static inline void iterate_bdevs(void (*f)(struct block_device *, void *), void *arg) +{ +}  #endif  extern int sync_filesystem(struct super_block *);  extern const struct file_operations def_blk_fops; @@ -2438,7 +2453,7 @@ extern loff_t noop_llseek(struct file *file, loff_t offset, int origin);  extern loff_t no_llseek(struct file *file, loff_t offset, int origin);  extern loff_t generic_file_llseek(struct file *file, loff_t offset, int origin);  extern loff_t generic_file_llseek_size(struct file *file, loff_t offset, -		int origin, loff_t maxsize); +		int origin, loff_t maxsize, loff_t eof);  extern int generic_file_open(struct inode * inode, struct file * filp);  extern int nonseekable_open(struct inode * inode, struct file * filp); @@ -2560,7 +2575,7 @@ extern int simple_write_end(struct file *file, struct address_space *mapping,  			loff_t pos, unsigned len, unsigned copied,  			struct page *page, void *fsdata); -extern struct dentry *simple_lookup(struct inode *, struct dentry *, struct nameidata *); +extern struct dentry *simple_lookup(struct inode *, struct dentry *, unsigned int flags);  extern ssize_t generic_read_dir(struct file *, char __user *, size_t, loff_t *);  extern const struct file_operations simple_dir_operations;  extern const struct inode_operations simple_dir_inode_operations; diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index 176a939d154..af961d6f7ab 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h @@ -65,7 +65,7 @@ struct trace_iterator {  	void			*private;  	int			cpu_file;  	struct mutex		mutex; -	struct ring_buffer_iter	*buffer_iter[NR_CPUS]; +	struct ring_buffer_iter	**buffer_iter;  	unsigned long		iter_flags;  	/* trace_seq for __print_flags() and __print_symbolic() etc. */ @@ -207,6 +207,9 @@ struct ftrace_event_call {  	 *   bit 1:		enabled  	 *   bit 2:		filter_active  	 *   bit 3:		enabled cmd record +	 *   bit 4:		allow trace by non root (cap any) +	 *   bit 5:		failed to apply filter +	 *   bit 6:		ftrace internal event (do not enable)  	 *  	 * Changes to flags must hold the event_mutex.  	 * diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h index 3993477103a..555382660bc 100644 --- a/include/linux/i2c/twl.h +++ b/include/linux/i2c/twl.h @@ -683,7 +683,6 @@ struct twl4030_audio_data {  };  struct twl4030_platform_data { -	unsigned				irq_base, irq_end;  	struct twl4030_clock_init_data		*clock;  	struct twl4030_bci_platform_data	*bci;  	struct twl4030_gpio_platform_data	*gpio; diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 9e65eff6af3..8a747618699 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h @@ -168,8 +168,8 @@ extern struct cred init_cred;  	.children	= LIST_HEAD_INIT(tsk.children),			\  	.sibling	= LIST_HEAD_INIT(tsk.sibling),			\  	.group_leader	= &tsk,						\ -	RCU_INIT_POINTER(.real_cred, &init_cred),			\ -	RCU_INIT_POINTER(.cred, &init_cred),				\ +	RCU_POINTER_INITIALIZER(real_cred, &init_cred),			\ +	RCU_POINTER_INITIALIZER(cred, &init_cred),			\  	.comm		= INIT_TASK_COMM,				\  	.thread		= INIT_THREAD,					\  	.fs		= &init_fs,					\ diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h index e6ca56de993..78e2ada50cd 100644 --- a/include/linux/intel-iommu.h +++ b/include/linux/intel-iommu.h @@ -308,6 +308,8 @@ enum {  struct intel_iommu {  	void __iomem	*reg; /* Pointer to hardware regs, virtual addr */ +	u64 		reg_phys; /* physical address of hw register set */ +	u64		reg_size; /* size of hw register set */  	u64		cap;  	u64		ecap;  	u32		gcmd; /* Holds TE, EAFL. Don't need SRTP, SFL, WBF */ diff --git a/include/linux/irq.h b/include/linux/irq.h index a5261e3d2e3..553fb66da13 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h @@ -150,9 +150,7 @@ struct irq_data {  	void			*handler_data;  	void			*chip_data;  	struct msi_desc		*msi_desc; -#ifdef CONFIG_SMP  	cpumask_var_t		affinity; -#endif  };  /* diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h index c513a40510f..0976fc46d1e 100644 --- a/include/linux/jump_label.h +++ b/include/linux/jump_label.h @@ -42,8 +42,7 @@   * allowed.   *   * Not initializing the key (static data is initialized to 0s anyway) is the - * same as using STATIC_KEY_INIT_FALSE and static_key_false() is - * equivalent with static_branch(). + * same as using STATIC_KEY_INIT_FALSE.   *  */ @@ -107,12 +106,6 @@ static __always_inline bool static_key_true(struct static_key *key)  	return !static_key_false(key);  } -/* Deprecated. Please use 'static_key_false() instead. */ -static __always_inline bool static_branch(struct static_key *key) -{ -	return arch_static_branch(key); -} -  extern struct jump_entry __start___jump_table[];  extern struct jump_entry __stop___jump_table[]; @@ -166,14 +159,6 @@ static __always_inline bool static_key_true(struct static_key *key)  	return false;  } -/* Deprecated. Please use 'static_key_false() instead. */ -static __always_inline bool static_branch(struct static_key *key) -{ -	if (unlikely(atomic_read(&key->enabled)) > 0) -		return true; -	return false; -} -  static inline void static_key_slow_inc(struct static_key *key)  {  	atomic_inc(&key->enabled); diff --git a/include/linux/kernel.h b/include/linux/kernel.h index e07f5e0c5df..604382143bc 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -377,7 +377,6 @@ extern enum system_states {  	SYSTEM_HALT,  	SYSTEM_POWER_OFF,  	SYSTEM_RESTART, -	SYSTEM_SUSPEND_DISK,  } system_state;  #define TAINT_PROPRIETARY_MODULE	0 diff --git a/include/linux/key.h b/include/linux/key.h index 4cd22ed627e..cef3b315ba7 100644 --- a/include/linux/key.h +++ b/include/linux/key.h @@ -303,7 +303,9 @@ static inline bool key_is_instantiated(const struct key *key)  				   rwsem_is_locked(&((struct key *)(KEY))->sem)))  #define rcu_assign_keypointer(KEY, PAYLOAD)				\ -	(rcu_assign_pointer((KEY)->payload.rcudata, PAYLOAD)) +do {									\ +	rcu_assign_pointer((KEY)->payload.rcudata, (PAYLOAD));		\ +} while (0)  #ifdef CONFIG_SYSCTL  extern ctl_table key_sysctls[]; diff --git a/include/linux/kmsg_dump.h b/include/linux/kmsg_dump.h index d6bd50110ec..2e7a1e032c7 100644 --- a/include/linux/kmsg_dump.h +++ b/include/linux/kmsg_dump.h @@ -55,12 +55,17 @@ struct kmsg_dumper {  #ifdef CONFIG_PRINTK  void kmsg_dump(enum kmsg_dump_reason reason); +bool kmsg_dump_get_line_nolock(struct kmsg_dumper *dumper, bool syslog, +			       char *line, size_t size, size_t *len); +  bool kmsg_dump_get_line(struct kmsg_dumper *dumper, bool syslog,  			char *line, size_t size, size_t *len);  bool kmsg_dump_get_buffer(struct kmsg_dumper *dumper, bool syslog,  			  char *buf, size_t size, size_t *len); +void kmsg_dump_rewind_nolock(struct kmsg_dumper *dumper); +  void kmsg_dump_rewind(struct kmsg_dumper *dumper);  int kmsg_dump_register(struct kmsg_dumper *dumper); @@ -71,6 +76,13 @@ static inline void kmsg_dump(enum kmsg_dump_reason reason)  {  } +static inline bool kmsg_dump_get_line_nolock(struct kmsg_dumper *dumper, +					     bool syslog, const char *line, +					     size_t size, size_t *len) +{ +	return false; +} +  static inline bool kmsg_dump_get_line(struct kmsg_dumper *dumper, bool syslog,  				const char *line, size_t size, size_t *len)  { @@ -83,6 +95,10 @@ static inline bool kmsg_dump_get_buffer(struct kmsg_dumper *dumper, bool syslog,  	return false;  } +static inline void kmsg_dump_rewind_nolock(struct kmsg_dumper *dumper) +{ +} +  static inline void kmsg_dump_rewind(struct kmsg_dumper *dumper)  {  } diff --git a/include/linux/mfd/s5m87xx/s5m-core.h b/include/linux/mfd/s5m87xx/s5m-core.h index 21603b42f22..0b2e0ed309f 100644 --- a/include/linux/mfd/s5m87xx/s5m-core.h +++ b/include/linux/mfd/s5m87xx/s5m-core.h @@ -347,6 +347,7 @@ struct s5m_platform_data {  	bool				buck_voltage_lock;  	int				buck_gpios[3]; +	int				buck_ds[3];  	int				buck2_voltage[8];  	bool				buck2_gpiodvs;  	int				buck3_voltage[8]; @@ -369,6 +370,10 @@ struct s5m_platform_data {  	bool                            buck2_ramp_enable;  	bool                            buck3_ramp_enable;  	bool                            buck4_ramp_enable; + +	int				buck2_init; +	int				buck3_init; +	int				buck4_init;  };  #endif /*  __LINUX_MFD_S5M_CORE_H */ diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h index f5171dbf885..d83af39815a 100644 --- a/include/linux/mfd/tmio.h +++ b/include/linux/mfd/tmio.h @@ -101,6 +101,7 @@ struct tmio_mmc_host;  struct tmio_mmc_data {  	unsigned int			hclk;  	unsigned long			capabilities; +	unsigned long			capabilities2;  	unsigned long			flags;  	u32				ocr_mask;	/* available voltages */  	struct tmio_mmc_dma		*dma; @@ -110,6 +111,9 @@ struct tmio_mmc_data {  	void (*set_clk_div)(struct platform_device *host, int state);  	int (*get_cd)(struct platform_device *host);  	int (*write16_hook)(struct tmio_mmc_host *host, int addr); +	/* clock management callbacks */ +	int (*clk_enable)(struct platform_device *pdev, unsigned int *f); +	void (*clk_disable)(struct platform_device *pdev);  };  /* diff --git a/include/linux/mfd/tps65217.h b/include/linux/mfd/tps65217.h index e030ef9a64e..12c06870829 100644 --- a/include/linux/mfd/tps65217.h +++ b/include/linux/mfd/tps65217.h @@ -217,7 +217,8 @@ enum tps65217_regulator_id {   * Board data may be used to initialize regulator.   */  struct tps65217_board { -	struct regulator_init_data *tps65217_init_data; +	struct regulator_init_data *tps65217_init_data[TPS65217_NUM_REGULATOR]; +	struct device_node *of_node[TPS65217_NUM_REGULATOR];  };  /** @@ -227,11 +228,6 @@ struct tps65217_board {   * @max_uV:		minimum micro volts   * @vsel_to_uv:		Function pointer to get voltage from selector   * @uv_to_vsel:		Function pointer to get selector from voltage - * @table:		Table for non-uniform voltage step-size - * @table_len:		Length of the voltage table - * @enable_mask:	Regulator enable mask bits - * @set_vout_reg:	Regulator output voltage set register - * @set_vout_mask:	Regulator output voltage set mask   *   * This data is used to check the regualtor voltage limits while setting.   */ @@ -241,11 +237,6 @@ struct tps_info {  	int max_uV;  	int (*vsel_to_uv)(unsigned int vsel);  	int (*uv_to_vsel)(int uV, unsigned int *vsel); -	const int *table; -	unsigned int table_len; -	unsigned int enable_mask; -	unsigned int set_vout_reg; -	unsigned int set_vout_mask;  };  /** diff --git a/include/linux/mfd/tps65910.h b/include/linux/mfd/tps65910.h index dd8dc0a6c46..6c4c478e21a 100644 --- a/include/linux/mfd/tps65910.h +++ b/include/linux/mfd/tps65910.h @@ -880,4 +880,10 @@ static inline int tps65910_reg_clear_bits(struct tps65910 *tps65910, u8 reg,  	return regmap_update_bits(tps65910->regmap, reg, mask, 0);  } +static inline int tps65910_reg_update_bits(struct tps65910 *tps65910, u8 reg, +					   u8 mask, u8 val) +{ +	return regmap_update_bits(tps65910->regmap, reg, mask, val); +} +  #endif /*  __LINUX_MFD_TPS65910_H */ diff --git a/include/linux/mm.h b/include/linux/mm.h index b36d08ce5c5..f9f279cf5b1 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -1591,6 +1591,7 @@ void vmemmap_populate_print_last(void);  enum mf_flags {  	MF_COUNT_INCREASED = 1 << 0,  	MF_ACTION_REQUIRED = 1 << 1, +	MF_MUST_KILL = 1 << 2,  };  extern int memory_failure(unsigned long pfn, int trapno, int flags);  extern void memory_failure_queue(unsigned long pfn, int trapno, int flags); diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index d76513b5b26..111aca5e97f 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h @@ -149,6 +149,7 @@ struct sd_switch_caps {  #define SD_SET_CURRENT_LIMIT_400	1  #define SD_SET_CURRENT_LIMIT_600	2  #define SD_SET_CURRENT_LIMIT_800	3 +#define SD_SET_CURRENT_NO_CHANGE	(-1)  #define SD_MAX_CURRENT_200	(1 << SD_SET_CURRENT_LIMIT_200)  #define SD_MAX_CURRENT_400	(1 << SD_SET_CURRENT_LIMIT_400) diff --git a/include/linux/mmc/cd-gpio.h b/include/linux/mmc/cd-gpio.h deleted file mode 100644 index cefaba038cc..00000000000 --- a/include/linux/mmc/cd-gpio.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Generic GPIO card-detect helper header - * - * Copyright (C) 2011, Guennadi Liakhovetski <g.liakhovetski@gmx.de> - * - * 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. - */ - -#ifndef MMC_CD_GPIO_H -#define MMC_CD_GPIO_H - -struct mmc_host; -int mmc_cd_gpio_request(struct mmc_host *host, unsigned int gpio); -void mmc_cd_gpio_free(struct mmc_host *host); - -#endif diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 0707d228d7f..f578a71d82a 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -11,6 +11,7 @@  #define LINUX_MMC_HOST_H  #include <linux/leds.h> +#include <linux/mutex.h>  #include <linux/sched.h>  #include <linux/device.h>  #include <linux/fault-inject.h> @@ -150,11 +151,31 @@ struct mmc_async_req {  	int (*err_check) (struct mmc_card *, struct mmc_async_req *);  }; -struct mmc_hotplug { -	unsigned int irq; +/** + * struct mmc_slot - MMC slot functions + * + * @cd_irq:		MMC/SD-card slot hotplug detection IRQ or -EINVAL + * @lock:		protect the @handler_priv pointer + * @handler_priv:	MMC/SD-card slot context + * + * Some MMC/SD host controllers implement slot-functions like card and + * write-protect detection natively. However, a large number of controllers + * leave these functions to the CPU. This struct provides a hook to attach + * such slot-function drivers. + */ +struct mmc_slot { +	int cd_irq; +	struct mutex lock;  	void *handler_priv;  }; +struct regulator; + +struct mmc_supply { +	struct regulator *vmmc;		/* Card power supply */ +	struct regulator *vqmmc;	/* Optional Vccq supply */ +}; +  struct mmc_host {  	struct device		*parent;  	struct device		class_dev; @@ -168,6 +189,9 @@ struct mmc_host {  	u32			ocr_avail_sd;	/* SD-specific OCR */  	u32			ocr_avail_mmc;	/* MMC-specific OCR */  	struct notifier_block	pm_notify; +	u32			max_current_330; +	u32			max_current_300; +	u32			max_current_180;  #define MMC_VDD_165_195		0x00000080	/* VDD voltage 1.65 - 1.95 */  #define MMC_VDD_20_21		0x00000100	/* VDD voltage 2.0 ~ 2.1 */ @@ -211,16 +235,9 @@ struct mmc_host {  #define MMC_CAP_UHS_SDR50	(1 << 17)	/* Host supports UHS SDR50 mode */  #define MMC_CAP_UHS_SDR104	(1 << 18)	/* Host supports UHS SDR104 mode */  #define MMC_CAP_UHS_DDR50	(1 << 19)	/* Host supports UHS DDR50 mode */ -#define MMC_CAP_SET_XPC_330	(1 << 20)	/* Host supports >150mA current at 3.3V */ -#define MMC_CAP_SET_XPC_300	(1 << 21)	/* Host supports >150mA current at 3.0V */ -#define MMC_CAP_SET_XPC_180	(1 << 22)	/* Host supports >150mA current at 1.8V */  #define MMC_CAP_DRIVER_TYPE_A	(1 << 23)	/* Host supports Driver Type A */  #define MMC_CAP_DRIVER_TYPE_C	(1 << 24)	/* Host supports Driver Type C */  #define MMC_CAP_DRIVER_TYPE_D	(1 << 25)	/* Host supports Driver Type D */ -#define MMC_CAP_MAX_CURRENT_200	(1 << 26)	/* Host max current limit is 200mA */ -#define MMC_CAP_MAX_CURRENT_400	(1 << 27)	/* Host max current limit is 400mA */ -#define MMC_CAP_MAX_CURRENT_600	(1 << 28)	/* Host max current limit is 600mA */ -#define MMC_CAP_MAX_CURRENT_800	(1 << 29)	/* Host max current limit is 800mA */  #define MMC_CAP_CMD23		(1 << 30)	/* CMD23 supported. */  #define MMC_CAP_HW_RESET	(1 << 31)	/* Hardware reset */ @@ -238,6 +255,8 @@ struct mmc_host {  #define MMC_CAP2_BROKEN_VOLTAGE	(1 << 7)	/* Use the broken voltage */  #define MMC_CAP2_DETECT_ON_ERR	(1 << 8)	/* On I/O err check card removal */  #define MMC_CAP2_HC_ERASE_SZ	(1 << 9)	/* High-capacity erase size */ +#define MMC_CAP2_CD_ACTIVE_HIGH	(1 << 10)	/* Card-detect signal active high */ +#define MMC_CAP2_RO_ACTIVE_HIGH	(1 << 11)	/* Write-protect signal active high */  	mmc_pm_flag_t		pm_caps;	/* supported pm features */  	unsigned int        power_notify_type; @@ -290,7 +309,7 @@ struct mmc_host {  	struct delayed_work	detect;  	int			detect_change;	/* card detect flag */ -	struct mmc_hotplug	hotplug; +	struct mmc_slot		slot;  	const struct mmc_bus_ops *bus_ops;	/* current bus driver */  	unsigned int		bus_refs;	/* reference counter */ @@ -309,6 +328,7 @@ struct mmc_host {  #ifdef CONFIG_REGULATOR  	bool			regulator_enabled; /* regulator state */  #endif +	struct mmc_supply	supply;  	struct dentry		*debugfs_root; @@ -357,13 +377,12 @@ static inline void mmc_signal_sdio_irq(struct mmc_host *host)  	wake_up_process(host->sdio_irq_thread);  } -struct regulator; -  #ifdef CONFIG_REGULATOR  int mmc_regulator_get_ocrmask(struct regulator *supply);  int mmc_regulator_set_ocr(struct mmc_host *mmc,  			struct regulator *supply,  			unsigned short vdd_bit); +int mmc_regulator_get_supply(struct mmc_host *mmc);  #else  static inline int mmc_regulator_get_ocrmask(struct regulator *supply)  { @@ -376,6 +395,11 @@ static inline int mmc_regulator_set_ocr(struct mmc_host *mmc,  {  	return 0;  } + +static inline int mmc_regulator_get_supply(struct mmc_host *mmc) +{ +	return 0; +}  #endif  int mmc_card_awake(struct mmc_host *host); diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h index e9051e1cb1c..ac83b105bed 100644 --- a/include/linux/mmc/sdhci.h +++ b/include/linux/mmc/sdhci.h @@ -122,6 +122,7 @@ struct sdhci_host {  #define SDHCI_PV_ENABLED	(1<<8)	/* Preset value enabled */  #define SDHCI_SDIO_IRQ_ENABLED	(1<<9)	/* SDIO irq enabled */  #define SDHCI_HS200_NEEDS_TUNING (1<<10)	/* HS200 needs tuning */ +#define SDHCI_USING_RETUNING_TIMER (1<<11)	/* Host is using a retuning timer for the card */  	unsigned int version;	/* SDHCI spec. version */ @@ -155,7 +156,8 @@ struct sdhci_host {  	struct timer_list timer;	/* Timer for timeouts */ -	unsigned int caps;	/* Alternative capabilities */ +	unsigned int caps;	/* Alternative CAPABILITY_0 */ +	unsigned int caps1;	/* Alternative CAPABILITY_1 */  	unsigned int            ocr_avail_sdio;	/* OCR bit masks */  	unsigned int            ocr_avail_sd; diff --git a/include/linux/mmc/sh_mmcif.h b/include/linux/mmc/sh_mmcif.h index 05f0e3db1c1..c2f73cbb4d5 100644 --- a/include/linux/mmc/sh_mmcif.h +++ b/include/linux/mmc/sh_mmcif.h @@ -44,6 +44,8 @@ struct sh_mmcif_plat_data {  	struct sh_mmcif_dma	*dma;		/* Deprecated. Instead */  	unsigned int		slave_id_tx;	/* use embedded slave_id_[tr]x */  	unsigned int		slave_id_rx; +	bool			use_cd_gpio : 1; +	unsigned int		cd_gpio;  	u8			sup_pclk;	/* 1 :SH7757, 0: SH7724/SH7372 */  	unsigned long		caps;  	u32			ocr; diff --git a/include/linux/mmc/sh_mobile_sdhi.h b/include/linux/mmc/sh_mobile_sdhi.h index e94e620aedd..b65679ffa88 100644 --- a/include/linux/mmc/sh_mobile_sdhi.h +++ b/include/linux/mmc/sh_mobile_sdhi.h @@ -23,6 +23,7 @@ struct sh_mobile_sdhi_info {  	int dma_slave_rx;  	unsigned long tmio_flags;  	unsigned long tmio_caps; +	unsigned long tmio_caps2;  	u32 tmio_ocr_mask;	/* available MMC voltages */  	unsigned int cd_gpio;  	struct tmio_mmc_data *pdata; diff --git a/include/linux/mmc/slot-gpio.h b/include/linux/mmc/slot-gpio.h new file mode 100644 index 00000000000..7d88d27bfaf --- /dev/null +++ b/include/linux/mmc/slot-gpio.h @@ -0,0 +1,24 @@ +/* + * Generic GPIO card-detect helper header + * + * Copyright (C) 2011, Guennadi Liakhovetski <g.liakhovetski@gmx.de> + * + * 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. + */ + +#ifndef MMC_SLOT_GPIO_H +#define MMC_SLOT_GPIO_H + +struct mmc_host; + +int mmc_gpio_get_ro(struct mmc_host *host); +int mmc_gpio_request_ro(struct mmc_host *host, unsigned int gpio); +void mmc_gpio_free_ro(struct mmc_host *host); + +int mmc_gpio_get_cd(struct mmc_host *host); +int mmc_gpio_request_cd(struct mmc_host *host, unsigned int gpio); +void mmc_gpio_free_cd(struct mmc_host *host); + +#endif diff --git a/include/linux/mxsfb.h b/include/linux/mxsfb.h new file mode 100644 index 00000000000..f14943d5531 --- /dev/null +++ b/include/linux/mxsfb.h @@ -0,0 +1,49 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef __LINUX_MXSFB_H +#define __LINUX_MXSFB_H + +#include <linux/fb.h> + +#define STMLCDIF_8BIT 1	/** pixel data bus to the display is of 8 bit width */ +#define STMLCDIF_16BIT 0 /** pixel data bus to the display is of 16 bit width */ +#define STMLCDIF_18BIT 2 /** pixel data bus to the display is of 18 bit width */ +#define STMLCDIF_24BIT 3 /** pixel data bus to the display is of 24 bit width */ + +#define FB_SYNC_DATA_ENABLE_HIGH_ACT	(1 << 6) +#define FB_SYNC_DOTCLK_FAILING_ACT	(1 << 7) /* failing/negtive edge sampling */ + +struct mxsfb_platform_data { +	struct fb_videomode *mode_list; +	unsigned mode_count; + +	unsigned default_bpp; + +	unsigned dotclk_delay;	/* refer manual HW_LCDIF_VDCTRL4 register */ +	unsigned ld_intf_width;	/* refer STMLCDIF_* macros */ + +	unsigned fb_size;	/* Size of the video memory. If zero a +				 * default will be used +				 */ +	unsigned long fb_phys;	/* physical address for the video memory. If +				 * zero the framebuffer memory will be dynamically +				 * allocated. If specified,fb_size must also be specified. +				 * fb_phys must be unused by Linux. +				 */ +}; + +#endif /* __LINUX_MXSFB_H */ diff --git a/include/linux/namei.h b/include/linux/namei.h index ffc02135c48..d2ef8b34b96 100644 --- a/include/linux/namei.h +++ b/include/linux/namei.h @@ -7,12 +7,6 @@  struct vfsmount; -struct open_intent { -	int	flags; -	int	create_mode; -	struct file *file; -}; -  enum { MAX_NESTED_LINKS = 8 };  struct nameidata { @@ -25,11 +19,6 @@ struct nameidata {  	int		last_type;  	unsigned	depth;  	char *saved_names[MAX_NESTED_LINKS + 1]; - -	/* Intent data */ -	union { -		struct open_intent open; -	} intent;  };  /* @@ -78,13 +67,10 @@ extern int kern_path(const char *, unsigned, struct path *);  extern struct dentry *kern_path_create(int, const char *, struct path *, int);  extern struct dentry *user_path_create(int, const char __user *, struct path *, int); -extern int kern_path_parent(const char *, struct nameidata *); +extern struct dentry *kern_path_locked(const char *, struct path *);  extern int vfs_path_lookup(struct dentry *, struct vfsmount *,  			   const char *, unsigned int, struct path *); -extern struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry *dentry, -		int (*open)(struct inode *, struct file *)); -  extern struct dentry *lookup_one_len(const char *, struct dentry *, int);  extern int follow_down_one(struct path *); @@ -94,6 +80,8 @@ extern int follow_up(struct path *);  extern struct dentry *lock_rename(struct dentry *, struct dentry *);  extern void unlock_rename(struct dentry *, struct dentry *); +extern void nd_jump_link(struct nameidata *nd, struct path *path); +  static inline void nd_set_link(struct nameidata *nd, char *path)  {  	nd->saved_names[nd->depth] = path; diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 8aadd90b808..d3b7c18b18f 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h @@ -1374,7 +1374,7 @@ struct nfs_rpc_ops {  	int	(*readlink)(struct inode *, struct page *, unsigned int,  			    unsigned int);  	int	(*create)  (struct inode *, struct dentry *, -			    struct iattr *, int, struct nfs_open_context *); +			    struct iattr *, int);  	int	(*remove)  (struct inode *, struct qstr *);  	void	(*unlink_setup)  (struct rpc_message *, struct inode *dir);  	void	(*unlink_rpc_prepare) (struct rpc_task *, struct nfs_unlinkdata *); diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index ab741b0d007..fc352607734 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -517,6 +517,7 @@  #define PCI_DEVICE_ID_AMD_11H_NB_DRAM	0x1302  #define PCI_DEVICE_ID_AMD_11H_NB_MISC	0x1303  #define PCI_DEVICE_ID_AMD_11H_NB_LINK	0x1304 +#define PCI_DEVICE_ID_AMD_15H_M10H_F3	0x1403  #define PCI_DEVICE_ID_AMD_15H_NB_F0	0x1600  #define PCI_DEVICE_ID_AMD_15H_NB_F1	0x1601  #define PCI_DEVICE_ID_AMD_15H_NB_F2	0x1602 @@ -2755,6 +2756,17 @@  #define PCI_DEVICE_ID_INTEL_IOAT_SNB7	0x3c27  #define PCI_DEVICE_ID_INTEL_IOAT_SNB8	0x3c2e  #define PCI_DEVICE_ID_INTEL_IOAT_SNB9	0x3c2f +#define PCI_DEVICE_ID_INTEL_UNC_HA	0x3c46 +#define PCI_DEVICE_ID_INTEL_UNC_IMC0	0x3cb0 +#define PCI_DEVICE_ID_INTEL_UNC_IMC1	0x3cb1 +#define PCI_DEVICE_ID_INTEL_UNC_IMC2	0x3cb4 +#define PCI_DEVICE_ID_INTEL_UNC_IMC3	0x3cb5 +#define PCI_DEVICE_ID_INTEL_UNC_QPI0	0x3c41 +#define PCI_DEVICE_ID_INTEL_UNC_QPI1	0x3c42 +#define PCI_DEVICE_ID_INTEL_UNC_R2PCIE	0x3c43 +#define PCI_DEVICE_ID_INTEL_UNC_R3QPI0	0x3c44 +#define PCI_DEVICE_ID_INTEL_UNC_R3QPI1	0x3c45 +#define PCI_DEVICE_ID_INTEL_JAKETOWN_UBOX	0x3ce0  #define PCI_DEVICE_ID_INTEL_IOAT_SNB	0x402f  #define PCI_DEVICE_ID_INTEL_5100_16	0x65f0  #define PCI_DEVICE_ID_INTEL_5100_21	0x65f5 diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 45db49f64bb..76c5c8b724a 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h @@ -677,6 +677,7 @@ struct hw_perf_event {  			u64		last_tag;  			unsigned long	config_base;  			unsigned long	event_base; +			int		event_base_rdpmc;  			int		idx;  			int		last_cpu; @@ -1106,6 +1107,8 @@ perf_event_create_kernel_counter(struct perf_event_attr *attr,  				struct task_struct *task,  				perf_overflow_handler_t callback,  				void *context); +extern void perf_pmu_migrate_context(struct pmu *pmu, +				int src_cpu, int dst_cpu);  extern u64 perf_event_read_value(struct perf_event *event,  				 u64 *enabled, u64 *running); diff --git a/include/linux/platform_data/clk-nomadik.h b/include/linux/platform_data/clk-nomadik.h new file mode 100644 index 00000000000..5713c87b247 --- /dev/null +++ b/include/linux/platform_data/clk-nomadik.h @@ -0,0 +1,2 @@ +/* Minimal platform data header */ +void nomadik_clk_init(void); diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h index 30f794eb382..a7d6172922d 100644 --- a/include/linux/pm_domain.h +++ b/include/linux/pm_domain.h @@ -15,6 +15,7 @@  #include <linux/err.h>  #include <linux/of.h>  #include <linux/notifier.h> +#include <linux/cpuidle.h>  enum gpd_status {  	GPD_STATE_ACTIVE = 0,	/* PM domain is active */ @@ -45,6 +46,11 @@ struct gpd_dev_ops {  	bool (*active_wakeup)(struct device *dev);  }; +struct gpd_cpu_data { +	unsigned int saved_exit_latency; +	struct cpuidle_state *idle_state; +}; +  struct generic_pm_domain {  	struct dev_pm_domain domain;	/* PM domain operations */  	struct list_head gpd_list_node;	/* Node in the global PM domains list */ @@ -75,6 +81,7 @@ struct generic_pm_domain {  	bool max_off_time_changed;  	bool cached_power_down_ok;  	struct device_node *of_node; /* Node in device tree */ +	struct gpd_cpu_data *cpu_data;  };  static inline struct generic_pm_domain *pd_to_genpd(struct dev_pm_domain *pd) @@ -105,6 +112,7 @@ struct generic_pm_domain_data {  	struct gpd_timing_data td;  	struct notifier_block nb;  	struct mutex lock; +	unsigned int refcount;  	bool need_restore;  	bool always_on;  }; @@ -155,6 +163,8 @@ extern int pm_genpd_add_callbacks(struct device *dev,  				  struct gpd_dev_ops *ops,  				  struct gpd_timing_data *td);  extern int __pm_genpd_remove_callbacks(struct device *dev, bool clear_td); +extern int genpd_attach_cpuidle(struct generic_pm_domain *genpd, int state); +extern int genpd_detach_cpuidle(struct generic_pm_domain *genpd);  extern void pm_genpd_init(struct generic_pm_domain *genpd,  			  struct dev_power_governor *gov, bool is_off); @@ -211,6 +221,14 @@ static inline int __pm_genpd_remove_callbacks(struct device *dev, bool clear_td)  {  	return -ENOSYS;  } +static inline int genpd_attach_cpuidle(struct generic_pm_domain *genpd, int st) +{ +	return -ENOSYS; +} +static inline int genpd_detach_cpuidle(struct generic_pm_domain *genpd) +{ +	return -ENOSYS; +}  static inline void pm_genpd_init(struct generic_pm_domain *genpd,  				 struct dev_power_governor *gov, bool is_off)  { diff --git a/include/linux/pm_qos.h b/include/linux/pm_qos.h index 233149cb19f..9924ea1f22e 100644 --- a/include/linux/pm_qos.h +++ b/include/linux/pm_qos.h @@ -66,7 +66,7 @@ enum pm_qos_req_action {  static inline int dev_pm_qos_request_active(struct dev_pm_qos_request *req)  { -	return req->dev != 0; +	return req->dev != NULL;  }  int pm_qos_update_target(struct pm_qos_constraints *c, struct plist_node *node, diff --git a/include/linux/quota.h b/include/linux/quota.h index c09fa042b5e..524ede8a160 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h @@ -333,7 +333,7 @@ struct quotactl_ops {  	int (*quota_on)(struct super_block *, int, int, struct path *);  	int (*quota_on_meta)(struct super_block *, int, int);  	int (*quota_off)(struct super_block *, int); -	int (*quota_sync)(struct super_block *, int, int); +	int (*quota_sync)(struct super_block *, int);  	int (*get_info)(struct super_block *, int, struct if_dqinfo *);  	int (*set_info)(struct super_block *, int, struct if_dqinfo *);  	int (*get_dqblk)(struct super_block *, int, qid_t, struct fs_disk_quota *); diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h index 17b977304a0..ec6b65feaab 100644 --- a/include/linux/quotaops.h +++ b/include/linux/quotaops.h @@ -83,7 +83,8 @@ int dquot_quota_on(struct super_block *sb, int type, int format_id,  int dquot_quota_on_mount(struct super_block *sb, char *qf_name,   	int format_id, int type);  int dquot_quota_off(struct super_block *sb, int type); -int dquot_quota_sync(struct super_block *sb, int type, int wait); +int dquot_writeback_dquots(struct super_block *sb, int type); +int dquot_quota_sync(struct super_block *sb, int type);  int dquot_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii);  int dquot_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii);  int dquot_get_dqblk(struct super_block *sb, int type, qid_t id, @@ -255,6 +256,11 @@ static inline int dquot_resume(struct super_block *sb, int type)  #define dquot_file_open		generic_file_open +static inline int dquot_writeback_dquots(struct super_block *sb, int type) +{ +	return 0; +} +  #endif /* CONFIG_QUOTA */  static inline int dquot_alloc_space_nodirty(struct inode *inode, qsize_t nr) diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 9cac722b169..115ead2b515 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h @@ -147,6 +147,7 @@ extern void synchronize_sched(void);  extern void __rcu_read_lock(void);  extern void __rcu_read_unlock(void); +extern void rcu_read_unlock_special(struct task_struct *t);  void synchronize_rcu(void);  /* @@ -255,6 +256,10 @@ static inline void destroy_rcu_head_on_stack(struct rcu_head *head)  }  #endif	/* #else !CONFIG_DEBUG_OBJECTS_RCU_HEAD */ +#if defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_SMP) +extern int rcu_is_cpu_idle(void); +#endif /* #if defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_SMP) */ +  #if defined(CONFIG_HOTPLUG_CPU) && defined(CONFIG_PROVE_RCU)  bool rcu_lockdep_current_cpu_online(void);  #else /* #if defined(CONFIG_HOTPLUG_CPU) && defined(CONFIG_PROVE_RCU) */ @@ -266,15 +271,6 @@ static inline bool rcu_lockdep_current_cpu_online(void)  #ifdef CONFIG_DEBUG_LOCK_ALLOC -#ifdef CONFIG_PROVE_RCU -extern int rcu_is_cpu_idle(void); -#else /* !CONFIG_PROVE_RCU */ -static inline int rcu_is_cpu_idle(void) -{ -	return 0; -} -#endif /* else !CONFIG_PROVE_RCU */ -  static inline void rcu_lock_acquire(struct lockdep_map *map)  {  	lock_acquire(map, 0, 0, 2, 1, NULL, _THIS_IP_); @@ -431,8 +427,7 @@ extern int rcu_my_thread_group_empty(void);  static inline void rcu_preempt_sleep_check(void)  {  	rcu_lockdep_assert(!lock_is_held(&rcu_lock_map), -			   "Illegal context switch in RCU read-side " -			   "critical section"); +			   "Illegal context switch in RCU read-side critical section");  }  #else /* #ifdef CONFIG_PROVE_RCU */  static inline void rcu_preempt_sleep_check(void) @@ -513,10 +508,10 @@ static inline void rcu_preempt_sleep_check(void)  		(_________p1); \  	})  #define __rcu_assign_pointer(p, v, space) \ -	({ \ +	do { \  		smp_wmb(); \  		(p) = (typeof(*v) __force space *)(v); \ -	}) +	} while (0)  /** @@ -851,7 +846,7 @@ static inline notrace void rcu_read_unlock_sched_notrace(void)   *   * Assigns the specified value to the specified RCU-protected   * pointer, ensuring that any concurrent RCU readers will see - * any prior initialization.  Returns the value assigned. + * any prior initialization.   *   * Inserts memory barriers on architectures that require them   * (which is most of them), and also prevents the compiler from @@ -903,25 +898,17 @@ static inline notrace void rcu_read_unlock_sched_notrace(void)   * the reader-accessible portions of the linked structure.   */  #define RCU_INIT_POINTER(p, v) \ -		p = (typeof(*v) __force __rcu *)(v) - -static __always_inline bool __is_kfree_rcu_offset(unsigned long offset) -{ -	return offset < 4096; -} - -static __always_inline -void __kfree_rcu(struct rcu_head *head, unsigned long offset) -{ -	typedef void (*rcu_callback)(struct rcu_head *); - -	BUILD_BUG_ON(!__builtin_constant_p(offset)); - -	/* See the kfree_rcu() header comment. */ -	BUILD_BUG_ON(!__is_kfree_rcu_offset(offset)); +	do { \ +		p = (typeof(*v) __force __rcu *)(v); \ +	} while (0) -	kfree_call_rcu(head, (rcu_callback)offset); -} +/** + * RCU_POINTER_INITIALIZER() - statically initialize an RCU protected pointer + * + * GCC-style initialization for an RCU-protected pointer in a structure field. + */ +#define RCU_POINTER_INITIALIZER(p, v) \ +		.p = (typeof(*v) __force __rcu *)(v)  /*   * Does the specified offset indicate that the corresponding rcu_head @@ -935,7 +922,7 @@ void __kfree_rcu(struct rcu_head *head, unsigned long offset)  #define __kfree_rcu(head, offset) \  	do { \  		BUILD_BUG_ON(!__is_kfree_rcu_offset(offset)); \ -		call_rcu(head, (void (*)(struct rcu_head *))(unsigned long)(offset)); \ +		kfree_call_rcu(head, (void (*)(struct rcu_head *))(unsigned long)(offset)); \  	} while (0)  /** diff --git a/include/linux/regmap.h b/include/linux/regmap.h index 56af22ec9ab..7f7e00df3ad 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h @@ -14,12 +14,14 @@   */  #include <linux/list.h> +#include <linux/rbtree.h>  struct module;  struct device;  struct i2c_client;  struct spi_device;  struct regmap; +struct regmap_range_cfg;  /* An enum of all the supported cache types */  enum regcache_type { @@ -43,6 +45,14 @@ struct reg_default {  #ifdef CONFIG_REGMAP +enum regmap_endian { +	/* Unspecified -> 0 -> Backwards compatible default */ +	REGMAP_ENDIAN_DEFAULT = 0, +	REGMAP_ENDIAN_BIG, +	REGMAP_ENDIAN_LITTLE, +	REGMAP_ENDIAN_NATIVE, +}; +  /**   * Configuration for the register map of a device.   * @@ -84,6 +94,15 @@ struct reg_default {   * @reg_defaults_raw: Power on reset values for registers (for use with   *                    register cache support).   * @num_reg_defaults_raw: Number of elements in reg_defaults_raw. + * @reg_format_endian: Endianness for formatted register addresses. If this is + *                     DEFAULT, the @reg_format_endian_default value from the + *                     regmap bus is used. + * @val_format_endian: Endianness for formatted register values. If this is + *                     DEFAULT, the @reg_format_endian_default value from the + *                     regmap bus is used. + * + * @ranges: Array of configuration entries for virtual address ranges. + * @num_ranges: Number of range configuration entries.   */  struct regmap_config {  	const char *name; @@ -109,6 +128,43 @@ struct regmap_config {  	u8 write_flag_mask;  	bool use_single_rw; + +	enum regmap_endian reg_format_endian; +	enum regmap_endian val_format_endian; + +	const struct regmap_range_cfg *ranges; +	unsigned int n_ranges; +}; + +/** + * Configuration for indirectly accessed or paged registers. + * Registers, mapped to this virtual range, are accessed in two steps: + *     1. page selector register update; + *     2. access through data window registers. + * + * @range_min: Address of the lowest register address in virtual range. + * @range_max: Address of the highest register in virtual range. + * + * @page_sel_reg: Register with selector field. + * @page_sel_mask: Bit shift for selector value. + * @page_sel_shift: Bit mask for selector value. + * + * @window_start: Address of first (lowest) register in data window. + * @window_len: Number of registers in data window. + */ +struct regmap_range_cfg { +	/* Registers of virtual address range */ +	unsigned int range_min; +	unsigned int range_max; + +	/* Page selector for indirect addressing */ +	unsigned int selector_reg; +	unsigned int selector_mask; +	int selector_shift; + +	/* Data window (per each page) */ +	unsigned int window_start; +	unsigned int window_len;  };  typedef int (*regmap_hw_write)(void *context, const void *data, @@ -133,6 +189,12 @@ typedef void (*regmap_hw_free_context)(void *context);   *         data.   * @read_flag_mask: Mask to be set in the top byte of the register when doing   *                  a read. + * @reg_format_endian_default: Default endianness for formatted register + *     addresses. Used when the regmap_config specifies DEFAULT. If this is + *     DEFAULT, BIG is assumed. + * @val_format_endian_default: Default endianness for formatted register + *     values. Used when the regmap_config specifies DEFAULT. If this is + *     DEFAULT, BIG is assumed.   */  struct regmap_bus {  	bool fast_io; @@ -141,6 +203,8 @@ struct regmap_bus {  	regmap_hw_read read;  	regmap_hw_free_context free_context;  	u8 read_flag_mask; +	enum regmap_endian reg_format_endian_default; +	enum regmap_endian val_format_endian_default;  };  struct regmap *regmap_init(struct device *dev, @@ -219,6 +283,7 @@ struct regmap_irq {   * @status_base: Base status register address.   * @mask_base:   Base mask register address.   * @ack_base:    Base ack address.  If zero then the chip is clear on read. + * @wake_base:   Base address for wake enables.  If zero unsupported.   * @irq_reg_stride:  Stride to use for chips where registers are not contiguous.   *   * @num_regs:    Number of registers in each control bank. @@ -232,6 +297,7 @@ struct regmap_irq_chip {  	unsigned int status_base;  	unsigned int mask_base;  	unsigned int ack_base; +	unsigned int wake_base;  	unsigned int irq_reg_stride;  	int num_regs; @@ -243,7 +309,7 @@ struct regmap_irq_chip {  struct regmap_irq_chip_data;  int regmap_add_irq_chip(struct regmap *map, int irq, int irq_flags, -			int irq_base, struct regmap_irq_chip *chip, +			int irq_base, const struct regmap_irq_chip *chip,  			struct regmap_irq_chip_data **data);  void regmap_del_irq_chip(int irq, struct regmap_irq_chip_data *data);  int regmap_irq_chip_get_base(struct regmap_irq_chip_data *data); @@ -361,7 +427,6 @@ static inline int regmap_register_patch(struct regmap *map,  static inline struct regmap *dev_get_regmap(struct device *dev,  					    const char *name)  { -	WARN_ONCE(1, "regmap API is disabled");  	return NULL;  } diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index 4ed1b30ac5f..da339fd8c75 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h @@ -291,6 +291,12 @@ static inline int regulator_set_voltage(struct regulator *regulator,  static inline int regulator_get_voltage(struct regulator *regulator)  { +	return -EINVAL; +} + +static inline int regulator_is_supported_voltage(struct regulator *regulator, +				   int min_uV, int max_uV) +{  	return 0;  } diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index b0432cc2b16..bac4c871f3b 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h @@ -32,6 +32,8 @@ enum regulator_status {  	REGULATOR_STATUS_NORMAL,  	REGULATOR_STATUS_IDLE,  	REGULATOR_STATUS_STANDBY, +	/* in case that any other status doesn't apply */ +	REGULATOR_STATUS_UNDEFINED,  };  /** @@ -67,6 +69,8 @@ enum regulator_status {   *   * @enable_time: Time taken for the regulator voltage output voltage to   *               stabilise after being enabled, in microseconds. + * @set_ramp_delay: Set the ramp delay for the regulator. The driver should + *		select ramp delay equal to or less than(closest) ramp_delay.   * @set_voltage_time_sel: Time taken for the regulator voltage output voltage   *               to stabilise after being set to a new value, in microseconds.   *               The function provides the from and to voltage selector, the @@ -113,6 +117,7 @@ struct regulator_ops {  	/* Time taken to enable or set voltage on the regulator */  	int (*enable_time) (struct regulator_dev *); +	int (*set_ramp_delay) (struct regulator_dev *, int ramp_delay);  	int (*set_voltage_time_sel) (struct regulator_dev *,  				     unsigned int old_selector,  				     unsigned int new_selector); @@ -170,11 +175,15 @@ enum regulator_type {   *   * @min_uV: Voltage given by the lowest selector (if linear mapping)   * @uV_step: Voltage increase with each selector (if linear mapping) + * @ramp_delay: Time to settle down after voltage change (unit: uV/us) + * @volt_table: Voltage mapping table (if table based mapping)   *   * @vsel_reg: Register for selector when using regulator_regmap_X_voltage_   * @vsel_mask: Mask for register bitfield used for selector   * @enable_reg: Register for control when using regmap enable/disable ops   * @enable_mask: Mask for control when using regmap enable/disable ops + * + * @enable_time: Time taken for initial enable of regulator (in uS).   */  struct regulator_desc {  	const char *name; @@ -188,11 +197,16 @@ struct regulator_desc {  	unsigned int min_uV;  	unsigned int uV_step; +	unsigned int ramp_delay; + +	const unsigned int *volt_table;  	unsigned int vsel_reg;  	unsigned int vsel_mask;  	unsigned int enable_reg;  	unsigned int enable_mask; + +	unsigned int enable_time;  };  /** @@ -208,6 +222,9 @@ struct regulator_desc {   * @of_node: OpenFirmware node to parse for device tree bindings (may be   *           NULL).   * @regmap: regmap to use for core regmap helpers + * @ena_gpio: GPIO controlling regulator enable. + * @ena_gpio_invert: Sense for GPIO enable control. + * @ena_gpio_flags: Flags to use when calling gpio_request_one()   */  struct regulator_config {  	struct device *dev; @@ -215,6 +232,10 @@ struct regulator_config {  	void *driver_data;  	struct device_node *of_node;  	struct regmap *regmap; + +	int ena_gpio; +	unsigned int ena_gpio_invert:1; +	unsigned int ena_gpio_flags;  };  /* @@ -253,6 +274,10 @@ struct regulator_dev {  	void *reg_data;		/* regulator_dev data */  	struct dentry *debugfs; + +	int ena_gpio; +	unsigned int ena_gpio_invert:1; +	unsigned int ena_gpio_state:1;  };  struct regulator_dev * @@ -271,6 +296,8 @@ int regulator_mode_to_status(unsigned int);  int regulator_list_voltage_linear(struct regulator_dev *rdev,  				  unsigned int selector); +int regulator_list_voltage_table(struct regulator_dev *rdev, +				  unsigned int selector);  int regulator_map_voltage_linear(struct regulator_dev *rdev,  				  int min_uV, int max_uV);  int regulator_map_voltage_iterate(struct regulator_dev *rdev, @@ -280,6 +307,9 @@ int regulator_set_voltage_sel_regmap(struct regulator_dev *rdev, unsigned sel);  int regulator_is_enabled_regmap(struct regulator_dev *rdev);  int regulator_enable_regmap(struct regulator_dev *rdev);  int regulator_disable_regmap(struct regulator_dev *rdev); +int regulator_set_voltage_time_sel(struct regulator_dev *rdev, +				   unsigned int old_selector, +				   unsigned int new_selector);  void *regulator_get_init_drvdata(struct regulator_init_data *reg_init_data); diff --git a/include/linux/regulator/fixed.h b/include/linux/regulator/fixed.h index f83f7440b48..48918be649d 100644 --- a/include/linux/regulator/fixed.h +++ b/include/linux/regulator/fixed.h @@ -22,6 +22,7 @@ struct regulator_init_data;  /**   * struct fixed_voltage_config - fixed_voltage_config structure   * @supply_name:	Name of the regulator supply + * @input_supply:	Name of the input regulator supply   * @microvolts:		Output voltage of regulator   * @gpio:		GPIO to use for enable control   * 			set to -EINVAL if not used @@ -46,6 +47,7 @@ struct regulator_init_data;   */  struct fixed_voltage_config {  	const char *supply_name; +	const char *input_supply;  	int microvolts;  	int gpio;  	unsigned startup_delay; @@ -58,14 +60,17 @@ struct fixed_voltage_config {  struct regulator_consumer_supply;  #if IS_ENABLED(CONFIG_REGULATOR) -struct platform_device *regulator_register_fixed(int id, -		struct regulator_consumer_supply *supplies, int num_supplies); +struct platform_device *regulator_register_always_on(int id, const char *name, +		struct regulator_consumer_supply *supplies, int num_supplies, int uv);  #else -static inline struct platform_device *regulator_register_fixed(int id, -		struct regulator_consumer_supply *supplies, int num_supplies) +static inline struct platform_device *regulator_register_always_on(int id, const char *name, +		struct regulator_consumer_supply *supplies, int num_supplies, int uv)  {  	return NULL;  }  #endif +#define regulator_register_fixed(id, s, ns) regulator_register_always_on(id, \ +						"fixed-dummy", s, ns, 0) +  #endif diff --git a/include/linux/regulator/lp872x.h b/include/linux/regulator/lp872x.h new file mode 100644 index 00000000000..132e05c4666 --- /dev/null +++ b/include/linux/regulator/lp872x.h @@ -0,0 +1,90 @@ +/* + * Copyright 2012 Texas Instruments + * + * Author: Milo(Woogyom) Kim <milo.kim@ti.com> + * + * 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. + * + */ + +#ifndef __LP872X_REGULATOR_H__ +#define __LP872X_REGULATOR_H__ + +#include <linux/regulator/machine.h> +#include <linux/platform_device.h> +#include <linux/gpio.h> + +#define LP872X_MAX_REGULATORS		9 + +enum lp872x_regulator_id { +	LP8720_ID_BASE, +	LP8720_ID_LDO1 = LP8720_ID_BASE, +	LP8720_ID_LDO2, +	LP8720_ID_LDO3, +	LP8720_ID_LDO4, +	LP8720_ID_LDO5, +	LP8720_ID_BUCK, + +	LP8725_ID_BASE, +	LP8725_ID_LDO1 = LP8725_ID_BASE, +	LP8725_ID_LDO2, +	LP8725_ID_LDO3, +	LP8725_ID_LDO4, +	LP8725_ID_LDO5, +	LP8725_ID_LILO1, +	LP8725_ID_LILO2, +	LP8725_ID_BUCK1, +	LP8725_ID_BUCK2, + +	LP872X_ID_MAX, +}; + +enum lp872x_dvs_state { +	DVS_LOW  = GPIOF_OUT_INIT_LOW, +	DVS_HIGH = GPIOF_OUT_INIT_HIGH, +}; + +enum lp872x_dvs_sel { +	SEL_V1, +	SEL_V2, +}; + +/** + * lp872x_dvs + * @gpio       : gpio pin number for dvs control + * @vsel       : dvs selector for buck v1 or buck v2 register + * @init_state : initial dvs pin state + */ +struct lp872x_dvs { +	int gpio; +	enum lp872x_dvs_sel vsel; +	enum lp872x_dvs_state init_state; +}; + +/** + * lp872x_regdata + * @id        : regulator id + * @init_data : init data for each regulator + */ +struct lp872x_regulator_data { +	enum lp872x_regulator_id id; +	struct regulator_init_data *init_data; +}; + +/** + * lp872x_platform_data + * @general_config    : the value of LP872X_GENERAL_CFG register + * @update_config     : if LP872X_GENERAL_CFG register is updated, set true + * @regulator_data    : platform regulator id and init data + * @dvs               : dvs data for buck voltage control + */ +struct lp872x_platform_data { +	u8 general_config; +	bool update_config; +	struct lp872x_regulator_data regulator_data[LP872X_MAX_REGULATORS]; +	struct lp872x_dvs *dvs; +}; + +#endif diff --git a/include/linux/regulator/machine.h b/include/linux/regulator/machine.h index b02108446be..40dd0a394cf 100644 --- a/include/linux/regulator/machine.h +++ b/include/linux/regulator/machine.h @@ -92,6 +92,7 @@ struct regulator_state {   *                 mode.   * @initial_state: Suspend state to set by default.   * @initial_mode: Mode to set at startup. + * @ramp_delay: Time to settle down after voltage change (unit: uV/us)   */  struct regulation_constraints { @@ -125,6 +126,8 @@ struct regulation_constraints {  	/* mode to set on startup */  	unsigned int initial_mode; +	unsigned int ramp_delay; +  	/* constraint flags */  	unsigned always_on:1;	/* regulator never off when system is on */  	unsigned boot_on:1;	/* bootloader/firmware enabled regulator */ diff --git a/include/linux/sched.h b/include/linux/sched.h index 4a1f493e0fe..1a2ebd39b80 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1405,7 +1405,7 @@ struct task_struct {  	int (*notifier)(void *priv);  	void *notifier_data;  	sigset_t *notifier_mask; -	struct hlist_head task_works; +	struct callback_head *task_works;  	struct audit_context *audit_context;  #ifdef CONFIG_AUDITSYSCALL @@ -1546,7 +1546,6 @@ struct task_struct {  	unsigned long timer_slack_ns;  	unsigned long default_timer_slack_ns; -	struct list_head	*scm_work_list;  #ifdef CONFIG_FUNCTION_GRAPH_TRACER  	/* Index of current stored address in ret_stack */  	int curr_ret_stack; @@ -1581,7 +1580,6 @@ struct task_struct {  #endif  #ifdef CONFIG_UPROBES  	struct uprobe_task *utask; -	int uprobe_srcu_id;  #endif  }; diff --git a/include/linux/smp.h b/include/linux/smp.h index 717fb746c9a..dd6f06be3c9 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h @@ -90,10 +90,6 @@ void kick_all_cpus_sync(void);  void __init call_function_init(void);  void generic_smp_call_function_single_interrupt(void);  void generic_smp_call_function_interrupt(void); -void ipi_call_lock(void); -void ipi_call_unlock(void); -void ipi_call_lock_irq(void); -void ipi_call_unlock_irq(void);  #else  static inline void call_function_init(void) { }  #endif @@ -181,7 +177,6 @@ static inline int up_smp_call_function(smp_call_func_t func, void *info)  	} while (0)  static inline void smp_send_reschedule(int cpu) { } -#define num_booting_cpus()			1  #define smp_prepare_boot_cpu()			do {} while (0)  #define smp_call_function_many(mask, func, info, wait) \  			(up_smp_call_function(func, info)) diff --git a/include/linux/suspend.h b/include/linux/suspend.h index cd83059fb59..0c808d7fa57 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h @@ -408,6 +408,12 @@ static inline void unlock_system_sleep(void) {}  #endif /* !CONFIG_PM_SLEEP */ +#ifdef CONFIG_PM_SLEEP_DEBUG +extern bool pm_print_times_enabled; +#else +#define pm_print_times_enabled	(false) +#endif +  #ifdef CONFIG_PM_AUTOSLEEP  /* kernel/power/autosleep.c */ diff --git a/include/linux/task_work.h b/include/linux/task_work.h index 294d5d5e90b..fb46b03b185 100644 --- a/include/linux/task_work.h +++ b/include/linux/task_work.h @@ -4,29 +4,21 @@  #include <linux/list.h>  #include <linux/sched.h> -struct task_work; -typedef void (*task_work_func_t)(struct task_work *); - -struct task_work { -	struct hlist_node hlist; -	task_work_func_t func; -	void *data; -}; +typedef void (*task_work_func_t)(struct callback_head *);  static inline void -init_task_work(struct task_work *twork, task_work_func_t func, void *data) +init_task_work(struct callback_head *twork, task_work_func_t func)  {  	twork->func = func; -	twork->data = data;  } -int task_work_add(struct task_struct *task, struct task_work *twork, bool); -struct task_work *task_work_cancel(struct task_struct *, task_work_func_t); +int task_work_add(struct task_struct *task, struct callback_head *twork, bool); +struct callback_head *task_work_cancel(struct task_struct *, task_work_func_t);  void task_work_run(void);  static inline void exit_task_work(struct task_struct *task)  { -	if (unlikely(!hlist_empty(&task->task_works))) +	if (unlikely(task->task_works))  		task_work_run();  } diff --git a/include/linux/tick.h b/include/linux/tick.h index ab8be90b5cc..f37fceb69b7 100644 --- a/include/linux/tick.h +++ b/include/linux/tick.h @@ -31,10 +31,10 @@ enum tick_nohz_mode {   * struct tick_sched - sched tick emulation and no idle tick control/stats   * @sched_timer:	hrtimer to schedule the periodic tick in high   *			resolution mode - * @idle_tick:		Store the last idle tick expiry time when the tick - *			timer is modified for idle sleeps. This is necessary + * @last_tick:		Store the last tick expiry time when the tick + *			timer is modified for nohz sleeps. This is necessary   *			to resume the tick timer operation in the timeline - *			when the CPU returns from idle + *			when the CPU returns from nohz sleep.   * @tick_stopped:	Indicator that the idle tick has been stopped   * @idle_jiffies:	jiffies at the entry to idle for idle time accounting   * @idle_calls:		Total number of idle calls @@ -51,7 +51,7 @@ struct tick_sched {  	struct hrtimer			sched_timer;  	unsigned long			check_clocks;  	enum tick_nohz_mode		nohz_mode; -	ktime_t				idle_tick; +	ktime_t				last_tick;  	int				inidle;  	int				tick_stopped;  	unsigned long			idle_jiffies; diff --git a/include/linux/time-armada-370-xp.h b/include/linux/time-armada-370-xp.h new file mode 100644 index 00000000000..dfdfdc03115 --- /dev/null +++ b/include/linux/time-armada-370-xp.h @@ -0,0 +1,18 @@ +/* + * Marvell Armada 370/XP SoC timer handling. + * + * Copyright (C) 2012 Marvell + * + * Lior Amsalem <alior@marvell.com> + * Gregory CLEMENT <gregory.clement@free-electrons.com> + * Thomas Petazzoni <thomas.petazzoni@free-electrons.com> + * + */ +#ifndef __TIME_ARMADA_370_XPPRCMU_H +#define __TIME_ARMADA_370_XPPRCMU_H + +#include <linux/init.h> + +void __init armada_370_xp_timer_init(void); + +#endif diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h index 6a4d82bedb0..1e98b553042 100644 --- a/include/linux/tracehook.h +++ b/include/linux/tracehook.h @@ -192,7 +192,7 @@ static inline void tracehook_notify_resume(struct pt_regs *regs)  	 * hlist_add_head(task->task_works);  	 */  	smp_mb__after_clear_bit(); -	if (unlikely(!hlist_empty(¤t->task_works))) +	if (unlikely(current->task_works))  		task_work_run();  } diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index bd96ecd0e05..802de56c41e 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h @@ -153,7 +153,7 @@ static inline void tracepoint_synchronize_unregister(void)  	}								\  	static inline void trace_##name##_rcuidle(proto)		\  	{								\ -		if (static_branch(&__tracepoint_##name.key))		\ +		if (static_key_false(&__tracepoint_##name.key))		\  			__DO_TRACE(&__tracepoint_##name,		\  				TP_PROTO(data_proto),			\  				TP_ARGS(data_args),			\ diff --git a/include/linux/types.h b/include/linux/types.h index 9c1bd539ea7..bf0dd7524b2 100644 --- a/include/linux/types.h +++ b/include/linux/types.h @@ -246,14 +246,15 @@ struct ustat {  };  /** - * struct rcu_head - callback structure for use with RCU + * struct callback_head - callback structure for use with RCU and task_work   * @next: next update requests in a list   * @func: actual update function to call after the grace period.   */ -struct rcu_head { -	struct rcu_head *next; -	void (*func)(struct rcu_head *head); +struct callback_head { +	struct callback_head *next; +	void (*func)(struct callback_head *head);  }; +#define rcu_head callback_head  #endif	/* __KERNEL__ */  #endif /*  __ASSEMBLY__ */  |