diff options
Diffstat (limited to 'include')
54 files changed, 1173 insertions, 192 deletions
diff --git a/include/asm-generic/ioctls.h b/include/asm-generic/ioctls.h index a3216655d657..3f3f2d189fb8 100644 --- a/include/asm-generic/ioctls.h +++ b/include/asm-generic/ioctls.h | |||
| @@ -67,6 +67,7 @@ | |||
| 67 | #endif | 67 | #endif |
| 68 | #define TIOCGPTN _IOR('T', 0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | 68 | #define TIOCGPTN _IOR('T', 0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ |
| 69 | #define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */ | 69 | #define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */ |
| 70 | #define TIOCGDEV _IOR('T', 0x32, unsigned int) /* Get primary device node of /dev/console */ | ||
| 70 | #define TCGETX 0x5432 /* SYS5 TCGETX compatibility */ | 71 | #define TCGETX 0x5432 /* SYS5 TCGETX compatibility */ |
| 71 | #define TCSETX 0x5433 | 72 | #define TCSETX 0x5433 |
| 72 | #define TCSETXF 0x5434 | 73 | #define TCSETXF 0x5434 |
diff --git a/include/asm-generic/irq_regs.h b/include/asm-generic/irq_regs.h index 5ae1d07d4a12..6bf9355fa7eb 100644 --- a/include/asm-generic/irq_regs.h +++ b/include/asm-generic/irq_regs.h | |||
| @@ -22,15 +22,15 @@ DECLARE_PER_CPU(struct pt_regs *, __irq_regs); | |||
| 22 | 22 | ||
| 23 | static inline struct pt_regs *get_irq_regs(void) | 23 | static inline struct pt_regs *get_irq_regs(void) |
| 24 | { | 24 | { |
| 25 | return __get_cpu_var(__irq_regs); | 25 | return __this_cpu_read(__irq_regs); |
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | static inline struct pt_regs *set_irq_regs(struct pt_regs *new_regs) | 28 | static inline struct pt_regs *set_irq_regs(struct pt_regs *new_regs) |
| 29 | { | 29 | { |
| 30 | struct pt_regs *old_regs, **pp_regs = &__get_cpu_var(__irq_regs); | 30 | struct pt_regs *old_regs; |
| 31 | 31 | ||
| 32 | old_regs = *pp_regs; | 32 | old_regs = __this_cpu_read(__irq_regs); |
| 33 | *pp_regs = new_regs; | 33 | __this_cpu_write(__irq_regs, new_regs); |
| 34 | return old_regs; | 34 | return old_regs; |
| 35 | } | 35 | } |
| 36 | 36 | ||
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index bd69d79208de..05cbad03c5ab 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
| @@ -67,7 +67,8 @@ | |||
| 67 | * Align to a 32 byte boundary equal to the | 67 | * Align to a 32 byte boundary equal to the |
| 68 | * alignment gcc 4.5 uses for a struct | 68 | * alignment gcc 4.5 uses for a struct |
| 69 | */ | 69 | */ |
| 70 | #define STRUCT_ALIGN() . = ALIGN(32) | 70 | #define STRUCT_ALIGNMENT 32 |
| 71 | #define STRUCT_ALIGN() . = ALIGN(STRUCT_ALIGNMENT) | ||
| 71 | 72 | ||
| 72 | /* The actual configuration determine if the init/exit sections | 73 | /* The actual configuration determine if the init/exit sections |
| 73 | * are handled as text/data or they can be discarded (which | 74 | * are handled as text/data or they can be discarded (which |
| @@ -146,6 +147,13 @@ | |||
| 146 | #define TRACE_SYSCALLS() | 147 | #define TRACE_SYSCALLS() |
| 147 | #endif | 148 | #endif |
| 148 | 149 | ||
| 150 | |||
| 151 | #define KERNEL_DTB() \ | ||
| 152 | STRUCT_ALIGN(); \ | ||
| 153 | VMLINUX_SYMBOL(__dtb_start) = .; \ | ||
| 154 | *(.dtb.init.rodata) \ | ||
| 155 | VMLINUX_SYMBOL(__dtb_end) = .; | ||
| 156 | |||
| 149 | /* .data section */ | 157 | /* .data section */ |
| 150 | #define DATA_DATA \ | 158 | #define DATA_DATA \ |
| 151 | *(.data) \ | 159 | *(.data) \ |
| @@ -468,7 +476,8 @@ | |||
| 468 | MCOUNT_REC() \ | 476 | MCOUNT_REC() \ |
| 469 | DEV_DISCARD(init.rodata) \ | 477 | DEV_DISCARD(init.rodata) \ |
| 470 | CPU_DISCARD(init.rodata) \ | 478 | CPU_DISCARD(init.rodata) \ |
| 471 | MEM_DISCARD(init.rodata) | 479 | MEM_DISCARD(init.rodata) \ |
| 480 | KERNEL_DTB() | ||
| 472 | 481 | ||
| 473 | #define INIT_TEXT \ | 482 | #define INIT_TEXT \ |
| 474 | *(.init.text) \ | 483 | *(.init.text) \ |
diff --git a/include/keys/encrypted-type.h b/include/keys/encrypted-type.h new file mode 100644 index 000000000000..95855017a32b --- /dev/null +++ b/include/keys/encrypted-type.h | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2010 IBM Corporation | ||
| 3 | * Author: Mimi Zohar <zohar@us.ibm.com> | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License as published by | ||
| 7 | * the Free Software Foundation, version 2 of the License. | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef _KEYS_ENCRYPTED_TYPE_H | ||
| 11 | #define _KEYS_ENCRYPTED_TYPE_H | ||
| 12 | |||
| 13 | #include <linux/key.h> | ||
| 14 | #include <linux/rcupdate.h> | ||
| 15 | |||
| 16 | struct encrypted_key_payload { | ||
| 17 | struct rcu_head rcu; | ||
| 18 | char *master_desc; /* datablob: master key name */ | ||
| 19 | char *datalen; /* datablob: decrypted key length */ | ||
| 20 | u8 *iv; /* datablob: iv */ | ||
| 21 | u8 *encrypted_data; /* datablob: encrypted data */ | ||
| 22 | unsigned short datablob_len; /* length of datablob */ | ||
| 23 | unsigned short decrypted_datalen; /* decrypted data length */ | ||
| 24 | u8 decrypted_data[0]; /* decrypted data + datablob + hmac */ | ||
| 25 | }; | ||
| 26 | |||
| 27 | extern struct key_type key_type_encrypted; | ||
| 28 | |||
| 29 | #endif /* _KEYS_ENCRYPTED_TYPE_H */ | ||
diff --git a/include/keys/trusted-type.h b/include/keys/trusted-type.h new file mode 100644 index 000000000000..56f82e5c9975 --- /dev/null +++ b/include/keys/trusted-type.h | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2010 IBM Corporation | ||
| 3 | * Author: David Safford <safford@us.ibm.com> | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License as published by | ||
| 7 | * the Free Software Foundation, version 2 of the License. | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef _KEYS_TRUSTED_TYPE_H | ||
| 11 | #define _KEYS_TRUSTED_TYPE_H | ||
| 12 | |||
| 13 | #include <linux/key.h> | ||
| 14 | #include <linux/rcupdate.h> | ||
| 15 | |||
| 16 | #define MIN_KEY_SIZE 32 | ||
| 17 | #define MAX_KEY_SIZE 128 | ||
| 18 | #define MAX_BLOB_SIZE 320 | ||
| 19 | |||
| 20 | struct trusted_key_payload { | ||
| 21 | struct rcu_head rcu; | ||
| 22 | unsigned int key_len; | ||
| 23 | unsigned int blob_len; | ||
| 24 | unsigned char migratable; | ||
| 25 | unsigned char key[MAX_KEY_SIZE + 1]; | ||
| 26 | unsigned char blob[MAX_BLOB_SIZE]; | ||
| 27 | }; | ||
| 28 | |||
| 29 | extern struct key_type key_type_trusted; | ||
| 30 | |||
| 31 | #endif /* _KEYS_TRUSTED_TYPE_H */ | ||
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index a354c199ab98..d1580c17cab3 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
| @@ -20,15 +20,18 @@ header-y += wimax/ | |||
| 20 | objhdr-y += version.h | 20 | objhdr-y += version.h |
| 21 | 21 | ||
| 22 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \ | 22 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \ |
| 23 | $(srctree)/include/asm-$(SRCARCH)/a.out.h),) | 23 | $(srctree)/include/asm-$(SRCARCH)/a.out.h \ |
| 24 | $(INSTALL_HDR_PATH)/include/asm-*/a.out.h),) | ||
| 24 | header-y += a.out.h | 25 | header-y += a.out.h |
| 25 | endif | 26 | endif |
| 26 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h \ | 27 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h \ |
| 27 | $(srctree)/include/asm-$(SRCARCH)/kvm.h),) | 28 | $(srctree)/include/asm-$(SRCARCH)/kvm.h \ |
| 29 | $(INSTALL_HDR_PATH)/include/asm-*/kvm.h),) | ||
| 28 | header-y += kvm.h | 30 | header-y += kvm.h |
| 29 | endif | 31 | endif |
| 30 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h \ | 32 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h \ |
| 31 | $(srctree)/include/asm-$(SRCARCH)/kvm_para.h),) | 33 | $(srctree)/include/asm-$(SRCARCH)/kvm_para.h \ |
| 34 | $(INSTALL_HDR_PATH)/include/asm-*/kvm_para.h),) | ||
| 32 | header-y += kvm_para.h | 35 | header-y += kvm_para.h |
| 33 | endif | 36 | endif |
| 34 | 37 | ||
diff --git a/include/linux/audit.h b/include/linux/audit.h index 8b5c0620abf9..359df0487690 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
| @@ -372,6 +372,7 @@ struct audit_buffer; | |||
| 372 | struct audit_context; | 372 | struct audit_context; |
| 373 | struct inode; | 373 | struct inode; |
| 374 | struct netlink_skb_parms; | 374 | struct netlink_skb_parms; |
| 375 | struct path; | ||
| 375 | struct linux_binprm; | 376 | struct linux_binprm; |
| 376 | struct mq_attr; | 377 | struct mq_attr; |
| 377 | struct mqstat; | 378 | struct mqstat; |
diff --git a/include/linux/capability.h b/include/linux/capability.h index 90012b9ddbf3..fb16a3699b99 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h | |||
| @@ -246,7 +246,6 @@ struct cpu_vfs_cap_data { | |||
| 246 | /* Allow configuration of the secure attention key */ | 246 | /* Allow configuration of the secure attention key */ |
| 247 | /* Allow administration of the random device */ | 247 | /* Allow administration of the random device */ |
| 248 | /* Allow examination and configuration of disk quotas */ | 248 | /* Allow examination and configuration of disk quotas */ |
| 249 | /* Allow configuring the kernel's syslog (printk behaviour) */ | ||
| 250 | /* Allow setting the domainname */ | 249 | /* Allow setting the domainname */ |
| 251 | /* Allow setting the hostname */ | 250 | /* Allow setting the hostname */ |
| 252 | /* Allow calling bdflush() */ | 251 | /* Allow calling bdflush() */ |
| @@ -352,7 +351,11 @@ struct cpu_vfs_cap_data { | |||
| 352 | 351 | ||
| 353 | #define CAP_MAC_ADMIN 33 | 352 | #define CAP_MAC_ADMIN 33 |
| 354 | 353 | ||
| 355 | #define CAP_LAST_CAP CAP_MAC_ADMIN | 354 | /* Allow configuring the kernel's syslog (printk behaviour) */ |
| 355 | |||
| 356 | #define CAP_SYSLOG 34 | ||
| 357 | |||
| 358 | #define CAP_LAST_CAP CAP_SYSLOG | ||
| 356 | 359 | ||
| 357 | #define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP) | 360 | #define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP) |
| 358 | 361 | ||
diff --git a/include/linux/console.h b/include/linux/console.h index 95cf6f08a59d..9774fe6a1a97 100644 --- a/include/linux/console.h +++ b/include/linux/console.h | |||
| @@ -126,6 +126,12 @@ struct console { | |||
| 126 | struct console *next; | 126 | struct console *next; |
| 127 | }; | 127 | }; |
| 128 | 128 | ||
| 129 | /* | ||
| 130 | * for_each_console() allows you to iterate on each console | ||
| 131 | */ | ||
| 132 | #define for_each_console(con) \ | ||
| 133 | for (con = console_drivers; con != NULL; con = con->next) | ||
| 134 | |||
| 129 | extern int console_set_on_cmdline; | 135 | extern int console_set_on_cmdline; |
| 130 | 136 | ||
| 131 | extern int add_preferred_console(char *name, int idx, char *options); | 137 | extern int add_preferred_console(char *name, int idx, char *options); |
| @@ -145,7 +151,7 @@ extern int is_console_locked(void); | |||
| 145 | extern int braille_register_console(struct console *, int index, | 151 | extern int braille_register_console(struct console *, int index, |
| 146 | char *console_options, char *braille_options); | 152 | char *console_options, char *braille_options); |
| 147 | extern int braille_unregister_console(struct console *); | 153 | extern int braille_unregister_console(struct console *); |
| 148 | 154 | extern void console_sysfs_notify(void); | |
| 149 | extern int console_suspend_enabled; | 155 | extern int console_suspend_enabled; |
| 150 | 156 | ||
| 151 | /* Suspend and resume console messages over PM events */ | 157 | /* Suspend and resume console messages over PM events */ |
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index bd07758943e0..59fcd24b1468 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
| @@ -307,7 +307,7 @@ extern struct dentry *__d_lookup_rcu(struct dentry *parent, struct qstr *name, | |||
| 307 | * __d_rcu_to_refcount - take a refcount on dentry if sequence check is ok | 307 | * __d_rcu_to_refcount - take a refcount on dentry if sequence check is ok |
| 308 | * @dentry: dentry to take a ref on | 308 | * @dentry: dentry to take a ref on |
| 309 | * @seq: seqcount to verify against | 309 | * @seq: seqcount to verify against |
| 310 | * @Returns: 0 on failure, else 1. | 310 | * Returns: 0 on failure, else 1. |
| 311 | * | 311 | * |
| 312 | * __d_rcu_to_refcount operates on a dentry,seq pair that was returned | 312 | * __d_rcu_to_refcount operates on a dentry,seq pair that was returned |
| 313 | * by __d_lookup_rcu, to get a reference on an rcu-walk dentry. | 313 | * by __d_lookup_rcu, to get a reference on an rcu-walk dentry. |
diff --git a/include/linux/dcookies.h b/include/linux/dcookies.h index 24c806f12a6c..5ac3bdd5cee6 100644 --- a/include/linux/dcookies.h +++ b/include/linux/dcookies.h | |||
| @@ -13,10 +13,10 @@ | |||
| 13 | #ifdef CONFIG_PROFILING | 13 | #ifdef CONFIG_PROFILING |
| 14 | 14 | ||
| 15 | #include <linux/dcache.h> | 15 | #include <linux/dcache.h> |
| 16 | #include <linux/path.h> | ||
| 17 | #include <linux/types.h> | 16 | #include <linux/types.h> |
| 18 | 17 | ||
| 19 | struct dcookie_user; | 18 | struct dcookie_user; |
| 19 | struct path; | ||
| 20 | 20 | ||
| 21 | /** | 21 | /** |
| 22 | * dcookie_register - register a user of dcookies | 22 | * dcookie_register - register a user of dcookies |
diff --git a/include/linux/device.h b/include/linux/device.h index dd4895313468..d96af9701d60 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
| @@ -197,6 +197,7 @@ struct class { | |||
| 197 | 197 | ||
| 198 | struct class_attribute *class_attrs; | 198 | struct class_attribute *class_attrs; |
| 199 | struct device_attribute *dev_attrs; | 199 | struct device_attribute *dev_attrs; |
| 200 | struct bin_attribute *dev_bin_attrs; | ||
| 200 | struct kobject *dev_kobj; | 201 | struct kobject *dev_kobj; |
| 201 | 202 | ||
| 202 | int (*dev_uevent)(struct device *dev, struct kobj_uevent_env *env); | 203 | int (*dev_uevent)(struct device *dev, struct kobj_uevent_env *env); |
| @@ -508,13 +509,13 @@ static inline int device_is_registered(struct device *dev) | |||
| 508 | 509 | ||
| 509 | static inline void device_enable_async_suspend(struct device *dev) | 510 | static inline void device_enable_async_suspend(struct device *dev) |
| 510 | { | 511 | { |
| 511 | if (dev->power.status == DPM_ON) | 512 | if (!dev->power.in_suspend) |
| 512 | dev->power.async_suspend = true; | 513 | dev->power.async_suspend = true; |
| 513 | } | 514 | } |
| 514 | 515 | ||
| 515 | static inline void device_disable_async_suspend(struct device *dev) | 516 | static inline void device_disable_async_suspend(struct device *dev) |
| 516 | { | 517 | { |
| 517 | if (dev->power.status == DPM_ON) | 518 | if (!dev->power.in_suspend) |
| 518 | dev->power.async_suspend = false; | 519 | dev->power.async_suspend = false; |
| 519 | } | 520 | } |
| 520 | 521 | ||
diff --git a/include/linux/elevator.h b/include/linux/elevator.h index 4fd978e7eb83..4d857973d2c9 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h | |||
| @@ -195,15 +195,9 @@ enum { | |||
| 195 | /* | 195 | /* |
| 196 | * io context count accounting | 196 | * io context count accounting |
| 197 | */ | 197 | */ |
| 198 | #define elv_ioc_count_mod(name, __val) \ | 198 | #define elv_ioc_count_mod(name, __val) this_cpu_add(name, __val) |
| 199 | do { \ | 199 | #define elv_ioc_count_inc(name) this_cpu_inc(name) |
| 200 | preempt_disable(); \ | 200 | #define elv_ioc_count_dec(name) this_cpu_dec(name) |
| 201 | __get_cpu_var(name) += (__val); \ | ||
| 202 | preempt_enable(); \ | ||
| 203 | } while (0) | ||
| 204 | |||
| 205 | #define elv_ioc_count_inc(name) elv_ioc_count_mod(name, 1) | ||
| 206 | #define elv_ioc_count_dec(name) elv_ioc_count_mod(name, -1) | ||
| 207 | 201 | ||
| 208 | #define elv_ioc_count_read(name) \ | 202 | #define elv_ioc_count_read(name) \ |
| 209 | ({ \ | 203 | ({ \ |
diff --git a/include/linux/firewire.h b/include/linux/firewire.h index 1cd637ef62d2..9a3f5f9383f6 100644 --- a/include/linux/firewire.h +++ b/include/linux/firewire.h | |||
| @@ -302,9 +302,9 @@ struct fw_packet { | |||
| 302 | struct fw_transaction { | 302 | struct fw_transaction { |
| 303 | int node_id; /* The generation is implied; it is always the current. */ | 303 | int node_id; /* The generation is implied; it is always the current. */ |
| 304 | int tlabel; | 304 | int tlabel; |
| 305 | int timestamp; | ||
| 306 | struct list_head link; | 305 | struct list_head link; |
| 307 | struct fw_card *card; | 306 | struct fw_card *card; |
| 307 | bool is_split_transaction; | ||
| 308 | struct timer_list split_timeout_timer; | 308 | struct timer_list split_timeout_timer; |
| 309 | 309 | ||
| 310 | struct fw_packet packet; | 310 | struct fw_packet packet; |
diff --git a/include/linux/firmware-map.h b/include/linux/firmware-map.h index c6dcc1dfe781..43fe52fcef0f 100644 --- a/include/linux/firmware-map.h +++ b/include/linux/firmware-map.h | |||
| @@ -17,7 +17,6 @@ | |||
| 17 | #define _LINUX_FIRMWARE_MAP_H | 17 | #define _LINUX_FIRMWARE_MAP_H |
| 18 | 18 | ||
| 19 | #include <linux/list.h> | 19 | #include <linux/list.h> |
| 20 | #include <linux/kobject.h> | ||
| 21 | 20 | ||
| 22 | /* | 21 | /* |
| 23 | * provide a dummy interface if CONFIG_FIRMWARE_MEMMAP is disabled | 22 | * provide a dummy interface if CONFIG_FIRMWARE_MEMMAP is disabled |
diff --git a/include/linux/flex_array.h b/include/linux/flex_array.h index 631b77f2ac70..70e4efabe0fb 100644 --- a/include/linux/flex_array.h +++ b/include/linux/flex_array.h | |||
| @@ -71,7 +71,7 @@ void *flex_array_get(struct flex_array *fa, unsigned int element_nr); | |||
| 71 | int flex_array_shrink(struct flex_array *fa); | 71 | int flex_array_shrink(struct flex_array *fa); |
| 72 | 72 | ||
| 73 | #define flex_array_put_ptr(fa, nr, src, gfp) \ | 73 | #define flex_array_put_ptr(fa, nr, src, gfp) \ |
| 74 | flex_array_put(fa, nr, &(void *)(src), gfp) | 74 | flex_array_put(fa, nr, (void *)&(src), gfp) |
| 75 | 75 | ||
| 76 | void *flex_array_get_ptr(struct flex_array *fa, unsigned int element_nr); | 76 | void *flex_array_get_ptr(struct flex_array *fa, unsigned int element_nr); |
| 77 | 77 | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index baf3e556ff0e..f84d9928bdb1 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -382,7 +382,6 @@ struct inodes_stat_t { | |||
| 382 | #include <linux/path.h> | 382 | #include <linux/path.h> |
| 383 | #include <linux/stat.h> | 383 | #include <linux/stat.h> |
| 384 | #include <linux/cache.h> | 384 | #include <linux/cache.h> |
| 385 | #include <linux/kobject.h> | ||
| 386 | #include <linux/list.h> | 385 | #include <linux/list.h> |
| 387 | #include <linux/radix-tree.h> | 386 | #include <linux/radix-tree.h> |
| 388 | #include <linux/prio_tree.h> | 387 | #include <linux/prio_tree.h> |
| @@ -402,6 +401,7 @@ struct hd_geometry; | |||
| 402 | struct iovec; | 401 | struct iovec; |
| 403 | struct nameidata; | 402 | struct nameidata; |
| 404 | struct kiocb; | 403 | struct kiocb; |
| 404 | struct kobject; | ||
| 405 | struct pipe_inode_info; | 405 | struct pipe_inode_info; |
| 406 | struct poll_table_struct; | 406 | struct poll_table_struct; |
| 407 | struct kstatfs; | 407 | struct kstatfs; |
diff --git a/include/linux/fuse.h b/include/linux/fuse.h index c3c578e09833..d464de53db43 100644 --- a/include/linux/fuse.h +++ b/include/linux/fuse.h | |||
| @@ -41,6 +41,12 @@ | |||
| 41 | * 7.15 | 41 | * 7.15 |
| 42 | * - add store notify | 42 | * - add store notify |
| 43 | * - add retrieve notify | 43 | * - add retrieve notify |
| 44 | * | ||
| 45 | * 7.16 | ||
| 46 | * - add BATCH_FORGET request | ||
| 47 | * - FUSE_IOCTL_UNRESTRICTED shall now return with array of 'struct | ||
| 48 | * fuse_ioctl_iovec' instead of ambiguous 'struct iovec' | ||
| 49 | * - add FUSE_IOCTL_32BIT flag | ||
| 44 | */ | 50 | */ |
| 45 | 51 | ||
| 46 | #ifndef _LINUX_FUSE_H | 52 | #ifndef _LINUX_FUSE_H |
| @@ -72,7 +78,7 @@ | |||
| 72 | #define FUSE_KERNEL_VERSION 7 | 78 | #define FUSE_KERNEL_VERSION 7 |
| 73 | 79 | ||
| 74 | /** Minor version number of this interface */ | 80 | /** Minor version number of this interface */ |
| 75 | #define FUSE_KERNEL_MINOR_VERSION 15 | 81 | #define FUSE_KERNEL_MINOR_VERSION 16 |
| 76 | 82 | ||
| 77 | /** The node ID of the root inode */ | 83 | /** The node ID of the root inode */ |
| 78 | #define FUSE_ROOT_ID 1 | 84 | #define FUSE_ROOT_ID 1 |
| @@ -200,12 +206,14 @@ struct fuse_file_lock { | |||
| 200 | * FUSE_IOCTL_COMPAT: 32bit compat ioctl on 64bit machine | 206 | * FUSE_IOCTL_COMPAT: 32bit compat ioctl on 64bit machine |
| 201 | * FUSE_IOCTL_UNRESTRICTED: not restricted to well-formed ioctls, retry allowed | 207 | * FUSE_IOCTL_UNRESTRICTED: not restricted to well-formed ioctls, retry allowed |
| 202 | * FUSE_IOCTL_RETRY: retry with new iovecs | 208 | * FUSE_IOCTL_RETRY: retry with new iovecs |
| 209 | * FUSE_IOCTL_32BIT: 32bit ioctl | ||
| 203 | * | 210 | * |
| 204 | * FUSE_IOCTL_MAX_IOV: maximum of in_iovecs + out_iovecs | 211 | * FUSE_IOCTL_MAX_IOV: maximum of in_iovecs + out_iovecs |
| 205 | */ | 212 | */ |
| 206 | #define FUSE_IOCTL_COMPAT (1 << 0) | 213 | #define FUSE_IOCTL_COMPAT (1 << 0) |
| 207 | #define FUSE_IOCTL_UNRESTRICTED (1 << 1) | 214 | #define FUSE_IOCTL_UNRESTRICTED (1 << 1) |
| 208 | #define FUSE_IOCTL_RETRY (1 << 2) | 215 | #define FUSE_IOCTL_RETRY (1 << 2) |
| 216 | #define FUSE_IOCTL_32BIT (1 << 3) | ||
| 209 | 217 | ||
| 210 | #define FUSE_IOCTL_MAX_IOV 256 | 218 | #define FUSE_IOCTL_MAX_IOV 256 |
| 211 | 219 | ||
| @@ -256,6 +264,7 @@ enum fuse_opcode { | |||
| 256 | FUSE_IOCTL = 39, | 264 | FUSE_IOCTL = 39, |
| 257 | FUSE_POLL = 40, | 265 | FUSE_POLL = 40, |
| 258 | FUSE_NOTIFY_REPLY = 41, | 266 | FUSE_NOTIFY_REPLY = 41, |
| 267 | FUSE_BATCH_FORGET = 42, | ||
| 259 | 268 | ||
| 260 | /* CUSE specific operations */ | 269 | /* CUSE specific operations */ |
| 261 | CUSE_INIT = 4096, | 270 | CUSE_INIT = 4096, |
| @@ -290,6 +299,16 @@ struct fuse_forget_in { | |||
| 290 | __u64 nlookup; | 299 | __u64 nlookup; |
| 291 | }; | 300 | }; |
| 292 | 301 | ||
| 302 | struct fuse_forget_one { | ||
| 303 | __u64 nodeid; | ||
| 304 | __u64 nlookup; | ||
| 305 | }; | ||
| 306 | |||
| 307 | struct fuse_batch_forget_in { | ||
| 308 | __u32 count; | ||
| 309 | __u32 dummy; | ||
| 310 | }; | ||
| 311 | |||
| 293 | struct fuse_getattr_in { | 312 | struct fuse_getattr_in { |
| 294 | __u32 getattr_flags; | 313 | __u32 getattr_flags; |
| 295 | __u32 dummy; | 314 | __u32 dummy; |
| @@ -510,6 +529,11 @@ struct fuse_ioctl_in { | |||
| 510 | __u32 out_size; | 529 | __u32 out_size; |
| 511 | }; | 530 | }; |
| 512 | 531 | ||
| 532 | struct fuse_ioctl_iovec { | ||
| 533 | __u64 base; | ||
| 534 | __u64 len; | ||
| 535 | }; | ||
| 536 | |||
| 513 | struct fuse_ioctl_out { | 537 | struct fuse_ioctl_out { |
| 514 | __s32 result; | 538 | __s32 result; |
| 515 | __u32 flags; | 539 | __u32 flags; |
diff --git a/include/linux/hid.h b/include/linux/hid.h index bb0f56f5c01e..20b9801f669b 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
| @@ -820,6 +820,49 @@ static inline void hid_hw_stop(struct hid_device *hdev) | |||
| 820 | hdev->ll_driver->stop(hdev); | 820 | hdev->ll_driver->stop(hdev); |
| 821 | } | 821 | } |
| 822 | 822 | ||
| 823 | /** | ||
| 824 | * hid_hw_open - signal underlaying HW to start delivering events | ||
| 825 | * | ||
| 826 | * @hdev: hid device | ||
| 827 | * | ||
| 828 | * Tell underlying HW to start delivering events from the device. | ||
| 829 | * This function should be called sometime after successful call | ||
| 830 | * to hid_hiw_start(). | ||
| 831 | */ | ||
| 832 | static inline int __must_check hid_hw_open(struct hid_device *hdev) | ||
| 833 | { | ||
| 834 | return hdev->ll_driver->open(hdev); | ||
| 835 | } | ||
| 836 | |||
| 837 | /** | ||
| 838 | * hid_hw_close - signal underlaying HW to stop delivering events | ||
| 839 | * | ||
| 840 | * @hdev: hid device | ||
| 841 | * | ||
| 842 | * This function indicates that we are not interested in the events | ||
| 843 | * from this device anymore. Delivery of events may or may not stop, | ||
| 844 | * depending on the number of users still outstanding. | ||
| 845 | */ | ||
| 846 | static inline void hid_hw_close(struct hid_device *hdev) | ||
| 847 | { | ||
| 848 | hdev->ll_driver->close(hdev); | ||
| 849 | } | ||
| 850 | |||
| 851 | /** | ||
| 852 | * hid_hw_power - requests underlying HW to go into given power mode | ||
| 853 | * | ||
| 854 | * @hdev: hid device | ||
| 855 | * @level: requested power level (one of %PM_HINT_* defines) | ||
| 856 | * | ||
| 857 | * This function requests underlying hardware to enter requested power | ||
| 858 | * mode. | ||
| 859 | */ | ||
| 860 | |||
| 861 | static inline int hid_hw_power(struct hid_device *hdev, int level) | ||
| 862 | { | ||
| 863 | return hdev->ll_driver->power ? hdev->ll_driver->power(hdev, level) : 0; | ||
| 864 | } | ||
| 865 | |||
| 823 | void hid_report_raw_event(struct hid_device *hid, int type, u8 *data, int size, | 866 | void hid_report_raw_event(struct hid_device *hid, int type, u8 *data, int size, |
| 824 | int interrupt); | 867 | int interrupt); |
| 825 | 868 | ||
| @@ -838,12 +881,32 @@ int hid_pidff_init(struct hid_device *hid); | |||
| 838 | #define hid_pidff_init NULL | 881 | #define hid_pidff_init NULL |
| 839 | #endif | 882 | #endif |
| 840 | 883 | ||
| 841 | #define dbg_hid(format, arg...) if (hid_debug) \ | 884 | #define dbg_hid(format, arg...) \ |
| 842 | printk(KERN_DEBUG "%s: " format ,\ | 885 | do { \ |
| 843 | __FILE__ , ## arg) | 886 | if (hid_debug) \ |
| 844 | #define err_hid(format, arg...) printk(KERN_ERR "%s: " format "\n" , \ | 887 | printk(KERN_DEBUG "%s: " format, __FILE__, ##arg); \ |
| 845 | __FILE__ , ## arg) | 888 | } while (0) |
| 846 | #endif /* HID_FF */ | 889 | |
| 890 | #define hid_printk(level, hid, fmt, arg...) \ | ||
| 891 | dev_printk(level, &(hid)->dev, fmt, ##arg) | ||
| 892 | #define hid_emerg(hid, fmt, arg...) \ | ||
| 893 | dev_emerg(&(hid)->dev, fmt, ##arg) | ||
| 894 | #define hid_crit(hid, fmt, arg...) \ | ||
| 895 | dev_crit(&(hid)->dev, fmt, ##arg) | ||
| 896 | #define hid_alert(hid, fmt, arg...) \ | ||
| 897 | dev_alert(&(hid)->dev, fmt, ##arg) | ||
| 898 | #define hid_err(hid, fmt, arg...) \ | ||
| 899 | dev_err(&(hid)->dev, fmt, ##arg) | ||
| 900 | #define hid_notice(hid, fmt, arg...) \ | ||
| 901 | dev_notice(&(hid)->dev, fmt, ##arg) | ||
| 902 | #define hid_warn(hid, fmt, arg...) \ | ||
| 903 | dev_warn(&(hid)->dev, fmt, ##arg) | ||
| 904 | #define hid_info(hid, fmt, arg...) \ | ||
| 905 | dev_info(&(hid)->dev, fmt, ##arg) | ||
| 906 | #define hid_dbg(hid, fmt, arg...) \ | ||
| 907 | dev_dbg(&(hid)->dev, fmt, ##arg) | ||
| 908 | |||
| 909 | #endif /* __KERNEL__ */ | ||
| 847 | 910 | ||
| 848 | #endif | 911 | #endif |
| 849 | 912 | ||
diff --git a/include/linux/highmem.h b/include/linux/highmem.h index b676c585574e..3a93f73a8acc 100644 --- a/include/linux/highmem.h +++ b/include/linux/highmem.h | |||
| @@ -81,7 +81,8 @@ DECLARE_PER_CPU(int, __kmap_atomic_idx); | |||
| 81 | 81 | ||
| 82 | static inline int kmap_atomic_idx_push(void) | 82 | static inline int kmap_atomic_idx_push(void) |
| 83 | { | 83 | { |
| 84 | int idx = __get_cpu_var(__kmap_atomic_idx)++; | 84 | int idx = __this_cpu_inc_return(__kmap_atomic_idx) - 1; |
| 85 | |||
| 85 | #ifdef CONFIG_DEBUG_HIGHMEM | 86 | #ifdef CONFIG_DEBUG_HIGHMEM |
| 86 | WARN_ON_ONCE(in_irq() && !irqs_disabled()); | 87 | WARN_ON_ONCE(in_irq() && !irqs_disabled()); |
| 87 | BUG_ON(idx > KM_TYPE_NR); | 88 | BUG_ON(idx > KM_TYPE_NR); |
| @@ -91,16 +92,18 @@ static inline int kmap_atomic_idx_push(void) | |||
| 91 | 92 | ||
| 92 | static inline int kmap_atomic_idx(void) | 93 | static inline int kmap_atomic_idx(void) |
| 93 | { | 94 | { |
| 94 | return __get_cpu_var(__kmap_atomic_idx) - 1; | 95 | return __this_cpu_read(__kmap_atomic_idx) - 1; |
| 95 | } | 96 | } |
| 96 | 97 | ||
| 97 | static inline int kmap_atomic_idx_pop(void) | 98 | static inline void kmap_atomic_idx_pop(void) |
| 98 | { | 99 | { |
| 99 | int idx = --__get_cpu_var(__kmap_atomic_idx); | ||
| 100 | #ifdef CONFIG_DEBUG_HIGHMEM | 100 | #ifdef CONFIG_DEBUG_HIGHMEM |
| 101 | int idx = __this_cpu_dec_return(__kmap_atomic_idx); | ||
| 102 | |||
| 101 | BUG_ON(idx < 0); | 103 | BUG_ON(idx < 0); |
| 104 | #else | ||
| 105 | __this_cpu_dec(__kmap_atomic_idx); | ||
| 102 | #endif | 106 | #endif |
| 103 | return idx; | ||
| 104 | } | 107 | } |
| 105 | 108 | ||
| 106 | #endif | 109 | #endif |
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 330586ffffbb..f376ddc64c4d 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
| @@ -131,7 +131,6 @@ struct hrtimer_sleeper { | |||
| 131 | * @index: clock type index for per_cpu support when moving a | 131 | * @index: clock type index for per_cpu support when moving a |
| 132 | * timer to a base on another cpu. | 132 | * timer to a base on another cpu. |
| 133 | * @active: red black tree root node for the active timers | 133 | * @active: red black tree root node for the active timers |
| 134 | * @first: pointer to the timer node which expires first | ||
| 135 | * @resolution: the resolution of the clock, in nanoseconds | 134 | * @resolution: the resolution of the clock, in nanoseconds |
| 136 | * @get_time: function to retrieve the current time of the clock | 135 | * @get_time: function to retrieve the current time of the clock |
| 137 | * @softirq_time: the time when running the hrtimer queue in the softirq | 136 | * @softirq_time: the time when running the hrtimer queue in the softirq |
diff --git a/include/linux/i2c/ds620.h b/include/linux/i2c/ds620.h new file mode 100644 index 000000000000..736bb87ac0fc --- /dev/null +++ b/include/linux/i2c/ds620.h | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | #ifndef _LINUX_DS620_H | ||
| 2 | #define _LINUX_DS620_H | ||
| 3 | |||
| 4 | #include <linux/types.h> | ||
| 5 | #include <linux/i2c.h> | ||
| 6 | |||
| 7 | /* platform data for the DS620 temperature sensor and thermostat */ | ||
| 8 | |||
| 9 | struct ds620_platform_data { | ||
| 10 | /* | ||
| 11 | * Thermostat output pin PO mode: | ||
| 12 | * 0 = always low (default) | ||
| 13 | * 1 = PO_LOW | ||
| 14 | * 2 = PO_HIGH | ||
| 15 | * | ||
| 16 | * (see Documentation/hwmon/ds620) | ||
| 17 | */ | ||
| 18 | int pomode; | ||
| 19 | }; | ||
| 20 | |||
| 21 | #endif /* _LINUX_DS620_H */ | ||
diff --git a/include/linux/input.h b/include/linux/input.h index f7a6e1966df3..c4e9d91ec979 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
| @@ -112,6 +112,7 @@ struct input_keymap_entry { | |||
| 112 | #define EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x06, len) /* get device name */ | 112 | #define EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x06, len) /* get device name */ |
| 113 | #define EVIOCGPHYS(len) _IOC(_IOC_READ, 'E', 0x07, len) /* get physical location */ | 113 | #define EVIOCGPHYS(len) _IOC(_IOC_READ, 'E', 0x07, len) /* get physical location */ |
| 114 | #define EVIOCGUNIQ(len) _IOC(_IOC_READ, 'E', 0x08, len) /* get unique identifier */ | 114 | #define EVIOCGUNIQ(len) _IOC(_IOC_READ, 'E', 0x08, len) /* get unique identifier */ |
| 115 | #define EVIOCGPROP(len) _IOC(_IOC_READ, 'E', 0x09, len) /* get device properties */ | ||
| 115 | 116 | ||
| 116 | #define EVIOCGKEY(len) _IOC(_IOC_READ, 'E', 0x18, len) /* get global key state */ | 117 | #define EVIOCGKEY(len) _IOC(_IOC_READ, 'E', 0x18, len) /* get global key state */ |
| 117 | #define EVIOCGLED(len) _IOC(_IOC_READ, 'E', 0x19, len) /* get all LEDs */ | 118 | #define EVIOCGLED(len) _IOC(_IOC_READ, 'E', 0x19, len) /* get all LEDs */ |
| @@ -129,6 +130,18 @@ struct input_keymap_entry { | |||
| 129 | #define EVIOCGRAB _IOW('E', 0x90, int) /* Grab/Release device */ | 130 | #define EVIOCGRAB _IOW('E', 0x90, int) /* Grab/Release device */ |
| 130 | 131 | ||
| 131 | /* | 132 | /* |
| 133 | * Device properties and quirks | ||
| 134 | */ | ||
| 135 | |||
| 136 | #define INPUT_PROP_POINTER 0x00 /* needs a pointer */ | ||
| 137 | #define INPUT_PROP_DIRECT 0x01 /* direct input devices */ | ||
| 138 | #define INPUT_PROP_BUTTONPAD 0x02 /* has button(s) under pad */ | ||
| 139 | #define INPUT_PROP_SEMI_MT 0x03 /* touch rectangle only */ | ||
| 140 | |||
| 141 | #define INPUT_PROP_MAX 0x1f | ||
| 142 | #define INPUT_PROP_CNT (INPUT_PROP_MAX + 1) | ||
| 143 | |||
| 144 | /* | ||
| 132 | * Event types | 145 | * Event types |
| 133 | */ | 146 | */ |
| 134 | 147 | ||
| @@ -760,11 +773,12 @@ struct input_keymap_entry { | |||
| 760 | #define ABS_MT_BLOB_ID 0x38 /* Group a set of packets as a blob */ | 773 | #define ABS_MT_BLOB_ID 0x38 /* Group a set of packets as a blob */ |
| 761 | #define ABS_MT_TRACKING_ID 0x39 /* Unique ID of initiated contact */ | 774 | #define ABS_MT_TRACKING_ID 0x39 /* Unique ID of initiated contact */ |
| 762 | #define ABS_MT_PRESSURE 0x3a /* Pressure on contact area */ | 775 | #define ABS_MT_PRESSURE 0x3a /* Pressure on contact area */ |
| 776 | #define ABS_MT_DISTANCE 0x3b /* Contact hover distance */ | ||
| 763 | 777 | ||
| 764 | #ifdef __KERNEL__ | 778 | #ifdef __KERNEL__ |
| 765 | /* Implementation details, userspace should not care about these */ | 779 | /* Implementation details, userspace should not care about these */ |
| 766 | #define ABS_MT_FIRST ABS_MT_TOUCH_MAJOR | 780 | #define ABS_MT_FIRST ABS_MT_TOUCH_MAJOR |
| 767 | #define ABS_MT_LAST ABS_MT_PRESSURE | 781 | #define ABS_MT_LAST ABS_MT_DISTANCE |
| 768 | #endif | 782 | #endif |
| 769 | 783 | ||
| 770 | #define ABS_MAX 0x3f | 784 | #define ABS_MAX 0x3f |
| @@ -875,6 +889,7 @@ struct input_keymap_entry { | |||
| 875 | */ | 889 | */ |
| 876 | #define MT_TOOL_FINGER 0 | 890 | #define MT_TOOL_FINGER 0 |
| 877 | #define MT_TOOL_PEN 1 | 891 | #define MT_TOOL_PEN 1 |
| 892 | #define MT_TOOL_MAX 1 | ||
| 878 | 893 | ||
| 879 | /* | 894 | /* |
| 880 | * Values describing the status of a force-feedback effect | 895 | * Values describing the status of a force-feedback effect |
| @@ -1110,19 +1125,12 @@ struct ff_effect { | |||
| 1110 | #include <linux/mod_devicetable.h> | 1125 | #include <linux/mod_devicetable.h> |
| 1111 | 1126 | ||
| 1112 | /** | 1127 | /** |
| 1113 | * struct input_mt_slot - represents the state of an input MT slot | ||
| 1114 | * @abs: holds current values of ABS_MT axes for this slot | ||
| 1115 | */ | ||
| 1116 | struct input_mt_slot { | ||
| 1117 | int abs[ABS_MT_LAST - ABS_MT_FIRST + 1]; | ||
| 1118 | }; | ||
| 1119 | |||
| 1120 | /** | ||
| 1121 | * struct input_dev - represents an input device | 1128 | * struct input_dev - represents an input device |
| 1122 | * @name: name of the device | 1129 | * @name: name of the device |
| 1123 | * @phys: physical path to the device in the system hierarchy | 1130 | * @phys: physical path to the device in the system hierarchy |
| 1124 | * @uniq: unique identification code for the device (if device has it) | 1131 | * @uniq: unique identification code for the device (if device has it) |
| 1125 | * @id: id of the device (struct input_id) | 1132 | * @id: id of the device (struct input_id) |
| 1133 | * @propbit: bitmap of device properties and quirks | ||
| 1126 | * @evbit: bitmap of types of events supported by the device (EV_KEY, | 1134 | * @evbit: bitmap of types of events supported by the device (EV_KEY, |
| 1127 | * EV_REL, etc.) | 1135 | * EV_REL, etc.) |
| 1128 | * @keybit: bitmap of keys/buttons this device has | 1136 | * @keybit: bitmap of keys/buttons this device has |
| @@ -1157,6 +1165,7 @@ struct input_mt_slot { | |||
| 1157 | * of tracked contacts | 1165 | * of tracked contacts |
| 1158 | * @mtsize: number of MT slots the device uses | 1166 | * @mtsize: number of MT slots the device uses |
| 1159 | * @slot: MT slot currently being transmitted | 1167 | * @slot: MT slot currently being transmitted |
| 1168 | * @trkid: stores MT tracking ID for the current contact | ||
| 1160 | * @absinfo: array of &struct input_absinfo elements holding information | 1169 | * @absinfo: array of &struct input_absinfo elements holding information |
| 1161 | * about absolute axes (current value, min, max, flat, fuzz, | 1170 | * about absolute axes (current value, min, max, flat, fuzz, |
| 1162 | * resolution) | 1171 | * resolution) |
| @@ -1205,6 +1214,8 @@ struct input_dev { | |||
| 1205 | const char *uniq; | 1214 | const char *uniq; |
| 1206 | struct input_id id; | 1215 | struct input_id id; |
| 1207 | 1216 | ||
| 1217 | unsigned long propbit[BITS_TO_LONGS(INPUT_PROP_CNT)]; | ||
| 1218 | |||
| 1208 | unsigned long evbit[BITS_TO_LONGS(EV_CNT)]; | 1219 | unsigned long evbit[BITS_TO_LONGS(EV_CNT)]; |
| 1209 | unsigned long keybit[BITS_TO_LONGS(KEY_CNT)]; | 1220 | unsigned long keybit[BITS_TO_LONGS(KEY_CNT)]; |
| 1210 | unsigned long relbit[BITS_TO_LONGS(REL_CNT)]; | 1221 | unsigned long relbit[BITS_TO_LONGS(REL_CNT)]; |
| @@ -1241,6 +1252,7 @@ struct input_dev { | |||
| 1241 | struct input_mt_slot *mt; | 1252 | struct input_mt_slot *mt; |
| 1242 | int mtsize; | 1253 | int mtsize; |
| 1243 | int slot; | 1254 | int slot; |
| 1255 | int trkid; | ||
| 1244 | 1256 | ||
| 1245 | struct input_absinfo *absinfo; | 1257 | struct input_absinfo *absinfo; |
| 1246 | 1258 | ||
| @@ -1490,11 +1502,6 @@ static inline void input_mt_sync(struct input_dev *dev) | |||
| 1490 | input_event(dev, EV_SYN, SYN_MT_REPORT, 0); | 1502 | input_event(dev, EV_SYN, SYN_MT_REPORT, 0); |
| 1491 | } | 1503 | } |
| 1492 | 1504 | ||
| 1493 | static inline void input_mt_slot(struct input_dev *dev, int slot) | ||
| 1494 | { | ||
| 1495 | input_event(dev, EV_ABS, ABS_MT_SLOT, slot); | ||
| 1496 | } | ||
| 1497 | |||
| 1498 | void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int code); | 1505 | void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int code); |
| 1499 | 1506 | ||
| 1500 | /** | 1507 | /** |
| @@ -1607,8 +1614,5 @@ int input_ff_erase(struct input_dev *dev, int effect_id, struct file *file); | |||
| 1607 | int input_ff_create_memless(struct input_dev *dev, void *data, | 1614 | int input_ff_create_memless(struct input_dev *dev, void *data, |
| 1608 | int (*play_effect)(struct input_dev *, void *, struct ff_effect *)); | 1615 | int (*play_effect)(struct input_dev *, void *, struct ff_effect *)); |
| 1609 | 1616 | ||
| 1610 | int input_mt_create_slots(struct input_dev *dev, unsigned int num_slots); | ||
| 1611 | void input_mt_destroy_slots(struct input_dev *dev); | ||
| 1612 | |||
| 1613 | #endif | 1617 | #endif |
| 1614 | #endif | 1618 | #endif |
diff --git a/include/linux/input/cma3000.h b/include/linux/input/cma3000.h new file mode 100644 index 000000000000..cbbaac27d311 --- /dev/null +++ b/include/linux/input/cma3000.h | |||
| @@ -0,0 +1,59 @@ | |||
| 1 | /* | ||
| 2 | * VTI CMA3000_Dxx Accelerometer driver | ||
| 3 | * | ||
| 4 | * Copyright (C) 2010 Texas Instruments | ||
| 5 | * Author: Hemanth V <hemanthv@ti.com> | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify it | ||
| 8 | * under the terms of the GNU General Public License version 2 as published by | ||
| 9 | * the Free Software Foundation. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
| 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 14 | * more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License along with | ||
| 17 | * this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 18 | */ | ||
| 19 | |||
| 20 | #ifndef _LINUX_CMA3000_H | ||
| 21 | #define _LINUX_CMA3000_H | ||
| 22 | |||
| 23 | #define CMAMODE_DEFAULT 0 | ||
| 24 | #define CMAMODE_MEAS100 1 | ||
| 25 | #define CMAMODE_MEAS400 2 | ||
| 26 | #define CMAMODE_MEAS40 3 | ||
| 27 | #define CMAMODE_MOTDET 4 | ||
| 28 | #define CMAMODE_FF100 5 | ||
| 29 | #define CMAMODE_FF400 6 | ||
| 30 | #define CMAMODE_POFF 7 | ||
| 31 | |||
| 32 | #define CMARANGE_2G 2000 | ||
| 33 | #define CMARANGE_8G 8000 | ||
| 34 | |||
| 35 | /** | ||
| 36 | * struct cma3000_i2c_platform_data - CMA3000 Platform data | ||
| 37 | * @fuzz_x: Noise on X Axis | ||
| 38 | * @fuzz_y: Noise on Y Axis | ||
| 39 | * @fuzz_z: Noise on Z Axis | ||
| 40 | * @g_range: G range in milli g i.e 2000 or 8000 | ||
| 41 | * @mode: Operating mode | ||
| 42 | * @mdthr: Motion detect threshold value | ||
| 43 | * @mdfftmr: Motion detect and free fall time value | ||
| 44 | * @ffthr: Free fall threshold value | ||
| 45 | */ | ||
| 46 | |||
| 47 | struct cma3000_platform_data { | ||
| 48 | int fuzz_x; | ||
| 49 | int fuzz_y; | ||
| 50 | int fuzz_z; | ||
| 51 | int g_range; | ||
| 52 | uint8_t mode; | ||
| 53 | uint8_t mdthr; | ||
| 54 | uint8_t mdfftmr; | ||
| 55 | uint8_t ffthr; | ||
| 56 | unsigned long irqflags; | ||
| 57 | }; | ||
| 58 | |||
| 59 | #endif | ||
diff --git a/include/linux/input/mt.h b/include/linux/input/mt.h new file mode 100644 index 000000000000..b3ac06a4435d --- /dev/null +++ b/include/linux/input/mt.h | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | #ifndef _INPUT_MT_H | ||
| 2 | #define _INPUT_MT_H | ||
| 3 | |||
| 4 | /* | ||
| 5 | * Input Multitouch Library | ||
| 6 | * | ||
| 7 | * Copyright (c) 2010 Henrik Rydberg | ||
| 8 | * | ||
| 9 | * This program is free software; you can redistribute it and/or modify it | ||
| 10 | * under the terms of the GNU General Public License version 2 as published by | ||
| 11 | * the Free Software Foundation. | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <linux/input.h> | ||
| 15 | |||
| 16 | #define TRKID_MAX 0xffff | ||
| 17 | |||
| 18 | /** | ||
| 19 | * struct input_mt_slot - represents the state of an input MT slot | ||
| 20 | * @abs: holds current values of ABS_MT axes for this slot | ||
| 21 | */ | ||
| 22 | struct input_mt_slot { | ||
| 23 | int abs[ABS_MT_LAST - ABS_MT_FIRST + 1]; | ||
| 24 | }; | ||
| 25 | |||
| 26 | static inline void input_mt_set_value(struct input_mt_slot *slot, | ||
| 27 | unsigned code, int value) | ||
| 28 | { | ||
| 29 | slot->abs[code - ABS_MT_FIRST] = value; | ||
| 30 | } | ||
| 31 | |||
| 32 | static inline int input_mt_get_value(const struct input_mt_slot *slot, | ||
| 33 | unsigned code) | ||
| 34 | { | ||
| 35 | return slot->abs[code - ABS_MT_FIRST]; | ||
| 36 | } | ||
| 37 | |||
| 38 | int input_mt_init_slots(struct input_dev *dev, unsigned int num_slots); | ||
| 39 | void input_mt_destroy_slots(struct input_dev *dev); | ||
| 40 | |||
| 41 | static inline int input_mt_new_trkid(struct input_dev *dev) | ||
| 42 | { | ||
| 43 | return dev->trkid++ & TRKID_MAX; | ||
| 44 | } | ||
| 45 | |||
| 46 | static inline void input_mt_slot(struct input_dev *dev, int slot) | ||
| 47 | { | ||
| 48 | input_event(dev, EV_ABS, ABS_MT_SLOT, slot); | ||
| 49 | } | ||
| 50 | |||
| 51 | void input_mt_report_slot_state(struct input_dev *dev, | ||
| 52 | unsigned int tool_type, bool active); | ||
| 53 | |||
| 54 | void input_mt_report_finger_count(struct input_dev *dev, int count); | ||
| 55 | void input_mt_report_pointer_emulation(struct input_dev *dev, bool use_count); | ||
| 56 | |||
| 57 | #endif | ||
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index b6de9a6f7018..d0fbc043de60 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -56,6 +56,8 @@ | |||
| 56 | 56 | ||
| 57 | #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) | 57 | #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) |
| 58 | #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) | 58 | #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) |
| 59 | |||
| 60 | /* The `const' in roundup() prevents gcc-3.3 from calling __divdi3 */ | ||
| 59 | #define roundup(x, y) ( \ | 61 | #define roundup(x, y) ( \ |
| 60 | { \ | 62 | { \ |
| 61 | const typeof(y) __y = y; \ | 63 | const typeof(y) __y = y; \ |
| @@ -263,6 +265,7 @@ static inline char *pack_hex_byte(char *buf, u8 byte) | |||
| 263 | } | 265 | } |
| 264 | 266 | ||
| 265 | extern int hex_to_bin(char ch); | 267 | extern int hex_to_bin(char ch); |
| 268 | extern void hex2bin(u8 *dst, const char *src, size_t count); | ||
| 266 | 269 | ||
| 267 | /* | 270 | /* |
| 268 | * General tracing related utility functions - trace_printk(), | 271 | * General tracing related utility functions - trace_printk(), |
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h index ad54c846911b..44e83ba12b5b 100644 --- a/include/linux/kernel_stat.h +++ b/include/linux/kernel_stat.h | |||
| @@ -47,7 +47,7 @@ extern unsigned long long nr_context_switches(void); | |||
| 47 | 47 | ||
| 48 | #ifndef CONFIG_GENERIC_HARDIRQS | 48 | #ifndef CONFIG_GENERIC_HARDIRQS |
| 49 | #define kstat_irqs_this_cpu(irq) \ | 49 | #define kstat_irqs_this_cpu(irq) \ |
| 50 | (kstat_this_cpu.irqs[irq]) | 50 | (this_cpu_read(kstat.irqs[irq]) |
| 51 | 51 | ||
| 52 | struct irq_desc; | 52 | struct irq_desc; |
| 53 | 53 | ||
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index b78edb58ee66..dd7c12e875bc 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h | |||
| @@ -305,12 +305,12 @@ struct hlist_head * kretprobe_inst_table_head(struct task_struct *tsk); | |||
| 305 | /* kprobe_running() will just return the current_kprobe on this CPU */ | 305 | /* kprobe_running() will just return the current_kprobe on this CPU */ |
| 306 | static inline struct kprobe *kprobe_running(void) | 306 | static inline struct kprobe *kprobe_running(void) |
| 307 | { | 307 | { |
| 308 | return (__get_cpu_var(current_kprobe)); | 308 | return (__this_cpu_read(current_kprobe)); |
| 309 | } | 309 | } |
| 310 | 310 | ||
| 311 | static inline void reset_current_kprobe(void) | 311 | static inline void reset_current_kprobe(void) |
| 312 | { | 312 | { |
| 313 | __get_cpu_var(current_kprobe) = NULL; | 313 | __this_cpu_write(current_kprobe, NULL); |
| 314 | } | 314 | } |
| 315 | 315 | ||
| 316 | static inline struct kprobe_ctlblk *get_kprobe_ctlblk(void) | 316 | static inline struct kprobe_ctlblk *get_kprobe_ctlblk(void) |
diff --git a/include/linux/libata.h b/include/linux/libata.h index d947b1231662..c9c5d7ad1a2b 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
| @@ -996,8 +996,7 @@ extern int ata_sas_port_init(struct ata_port *); | |||
| 996 | extern int ata_sas_port_start(struct ata_port *ap); | 996 | extern int ata_sas_port_start(struct ata_port *ap); |
| 997 | extern void ata_sas_port_stop(struct ata_port *ap); | 997 | extern void ata_sas_port_stop(struct ata_port *ap); |
| 998 | extern int ata_sas_slave_configure(struct scsi_device *, struct ata_port *); | 998 | extern int ata_sas_slave_configure(struct scsi_device *, struct ata_port *); |
| 999 | extern int ata_sas_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *), | 999 | extern int ata_sas_queuecmd(struct scsi_cmnd *cmd, struct ata_port *ap); |
| 1000 | struct ata_port *ap); | ||
| 1001 | extern int sata_scr_valid(struct ata_link *link); | 1000 | extern int sata_scr_valid(struct ata_link *link); |
| 1002 | extern int sata_scr_read(struct ata_link *link, int reg, u32 *val); | 1001 | extern int sata_scr_read(struct ata_link *link, int reg, u32 *val); |
| 1003 | extern int sata_scr_write(struct ata_link *link, int reg, u32 val); | 1002 | extern int sata_scr_write(struct ata_link *link, int reg, u32 val); |
| @@ -1040,8 +1039,7 @@ extern unsigned int ata_do_dev_read_id(struct ata_device *dev, | |||
| 1040 | struct ata_taskfile *tf, u16 *id); | 1039 | struct ata_taskfile *tf, u16 *id); |
| 1041 | extern void ata_qc_complete(struct ata_queued_cmd *qc); | 1040 | extern void ata_qc_complete(struct ata_queued_cmd *qc); |
| 1042 | extern int ata_qc_complete_multiple(struct ata_port *ap, u32 qc_active); | 1041 | extern int ata_qc_complete_multiple(struct ata_port *ap, u32 qc_active); |
| 1043 | extern void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd, | 1042 | extern void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd); |
| 1044 | void (*done)(struct scsi_cmnd *)); | ||
| 1045 | extern int ata_std_bios_param(struct scsi_device *sdev, | 1043 | extern int ata_std_bios_param(struct scsi_device *sdev, |
| 1046 | struct block_device *bdev, | 1044 | struct block_device *bdev, |
| 1047 | sector_t capacity, int geom[]); | 1045 | sector_t capacity, int geom[]); |
diff --git a/include/linux/mmc/sh_mmcif.h b/include/linux/mmc/sh_mmcif.h index 5c99da1078aa..44fc5348fd5d 100644 --- a/include/linux/mmc/sh_mmcif.h +++ b/include/linux/mmc/sh_mmcif.h | |||
| @@ -14,8 +14,9 @@ | |||
| 14 | #ifndef __SH_MMCIF_H__ | 14 | #ifndef __SH_MMCIF_H__ |
| 15 | #define __SH_MMCIF_H__ | 15 | #define __SH_MMCIF_H__ |
| 16 | 16 | ||
| 17 | #include <linux/platform_device.h> | ||
| 18 | #include <linux/io.h> | 17 | #include <linux/io.h> |
| 18 | #include <linux/platform_device.h> | ||
| 19 | #include <linux/sh_dma.h> | ||
| 19 | 20 | ||
| 20 | /* | 21 | /* |
| 21 | * MMCIF : CE_CLK_CTRL [19:16] | 22 | * MMCIF : CE_CLK_CTRL [19:16] |
| @@ -31,13 +32,19 @@ | |||
| 31 | * 1111 : Peripheral clock (sup_pclk set '1') | 32 | * 1111 : Peripheral clock (sup_pclk set '1') |
| 32 | */ | 33 | */ |
| 33 | 34 | ||
| 35 | struct sh_mmcif_dma { | ||
| 36 | struct sh_dmae_slave chan_priv_tx; | ||
| 37 | struct sh_dmae_slave chan_priv_rx; | ||
| 38 | }; | ||
| 39 | |||
| 34 | struct sh_mmcif_plat_data { | 40 | struct sh_mmcif_plat_data { |
| 35 | void (*set_pwr)(struct platform_device *pdev, int state); | 41 | void (*set_pwr)(struct platform_device *pdev, int state); |
| 36 | void (*down_pwr)(struct platform_device *pdev); | 42 | void (*down_pwr)(struct platform_device *pdev); |
| 37 | int (*get_cd)(struct platform_device *pdef); | 43 | int (*get_cd)(struct platform_device *pdef); |
| 38 | u8 sup_pclk; /* 1 :SH7757, 0: SH7724/SH7372 */ | 44 | struct sh_mmcif_dma *dma; |
| 39 | unsigned long caps; | 45 | u8 sup_pclk; /* 1 :SH7757, 0: SH7724/SH7372 */ |
| 40 | u32 ocr; | 46 | unsigned long caps; |
| 47 | u32 ocr; | ||
| 41 | }; | 48 | }; |
| 42 | 49 | ||
| 43 | #define MMCIF_CE_CMD_SET 0x00000000 | 50 | #define MMCIF_CE_CMD_SET 0x00000000 |
| @@ -59,6 +66,32 @@ struct sh_mmcif_plat_data { | |||
| 59 | #define MMCIF_CE_HOST_STS2 0x0000004C | 66 | #define MMCIF_CE_HOST_STS2 0x0000004C |
| 60 | #define MMCIF_CE_VERSION 0x0000007C | 67 | #define MMCIF_CE_VERSION 0x0000007C |
| 61 | 68 | ||
| 69 | /* CE_BUF_ACC */ | ||
| 70 | #define BUF_ACC_DMAWEN (1 << 25) | ||
| 71 | #define BUF_ACC_DMAREN (1 << 24) | ||
| 72 | #define BUF_ACC_BUSW_32 (0 << 17) | ||
| 73 | #define BUF_ACC_BUSW_16 (1 << 17) | ||
| 74 | #define BUF_ACC_ATYP (1 << 16) | ||
| 75 | |||
| 76 | /* CE_CLK_CTRL */ | ||
| 77 | #define CLK_ENABLE (1 << 24) /* 1: output mmc clock */ | ||
| 78 | #define CLK_CLEAR ((1 << 19) | (1 << 18) | (1 << 17) | (1 << 16)) | ||
| 79 | #define CLK_SUP_PCLK ((1 << 19) | (1 << 18) | (1 << 17) | (1 << 16)) | ||
| 80 | #define CLKDIV_4 (1<<16) /* mmc clock frequency. | ||
| 81 | * n: bus clock/(2^(n+1)) */ | ||
| 82 | #define CLKDIV_256 (7<<16) /* mmc clock frequency. (see above) */ | ||
| 83 | #define SRSPTO_256 ((1 << 13) | (0 << 12)) /* resp timeout */ | ||
| 84 | #define SRBSYTO_29 ((1 << 11) | (1 << 10) | \ | ||
| 85 | (1 << 9) | (1 << 8)) /* resp busy timeout */ | ||
| 86 | #define SRWDTO_29 ((1 << 7) | (1 << 6) | \ | ||
| 87 | (1 << 5) | (1 << 4)) /* read/write timeout */ | ||
| 88 | #define SCCSTO_29 ((1 << 3) | (1 << 2) | \ | ||
| 89 | (1 << 1) | (1 << 0)) /* ccs timeout */ | ||
| 90 | |||
| 91 | /* CE_VERSION */ | ||
| 92 | #define SOFT_RST_ON (1 << 31) | ||
| 93 | #define SOFT_RST_OFF 0 | ||
| 94 | |||
| 62 | static inline u32 sh_mmcif_readl(void __iomem *addr, int reg) | 95 | static inline u32 sh_mmcif_readl(void __iomem *addr, int reg) |
| 63 | { | 96 | { |
| 64 | return readl(addr + reg); | 97 | return readl(addr + reg); |
| @@ -145,21 +178,20 @@ static inline int sh_mmcif_boot_do_read(void __iomem *base, | |||
| 145 | 178 | ||
| 146 | static inline void sh_mmcif_boot_init(void __iomem *base) | 179 | static inline void sh_mmcif_boot_init(void __iomem *base) |
| 147 | { | 180 | { |
| 148 | unsigned long tmp; | ||
| 149 | |||
| 150 | /* reset */ | 181 | /* reset */ |
| 151 | tmp = sh_mmcif_readl(base, MMCIF_CE_VERSION); | 182 | sh_mmcif_writel(base, MMCIF_CE_VERSION, SOFT_RST_ON); |
| 152 | sh_mmcif_writel(base, MMCIF_CE_VERSION, tmp | 0x80000000); | 183 | sh_mmcif_writel(base, MMCIF_CE_VERSION, SOFT_RST_OFF); |
| 153 | sh_mmcif_writel(base, MMCIF_CE_VERSION, tmp & ~0x80000000); | ||
| 154 | 184 | ||
| 155 | /* byte swap */ | 185 | /* byte swap */ |
| 156 | sh_mmcif_writel(base, MMCIF_CE_BUF_ACC, 0x00010000); | 186 | sh_mmcif_writel(base, MMCIF_CE_BUF_ACC, BUF_ACC_ATYP); |
| 157 | 187 | ||
| 158 | /* Set block size in MMCIF hardware */ | 188 | /* Set block size in MMCIF hardware */ |
| 159 | sh_mmcif_writel(base, MMCIF_CE_BLOCK_SET, SH_MMCIF_BBS); | 189 | sh_mmcif_writel(base, MMCIF_CE_BLOCK_SET, SH_MMCIF_BBS); |
| 160 | 190 | ||
| 161 | /* Enable the clock, set it to Bus clock/256 (about 325Khz)*/ | 191 | /* Enable the clock, set it to Bus clock/256 (about 325Khz). */ |
| 162 | sh_mmcif_writel(base, MMCIF_CE_CLK_CTRL, 0x01072fff); | 192 | sh_mmcif_writel(base, MMCIF_CE_CLK_CTRL, |
| 193 | CLK_ENABLE | CLKDIV_256 | SRSPTO_256 | | ||
| 194 | SRBSYTO_29 | SRWDTO_29 | SCCSTO_29); | ||
| 163 | 195 | ||
| 164 | /* CMD0 */ | 196 | /* CMD0 */ |
| 165 | sh_mmcif_boot_cmd(base, 0x00000040, 0); | 197 | sh_mmcif_boot_cmd(base, 0x00000040, 0); |
| @@ -184,7 +216,9 @@ static inline void sh_mmcif_boot_slurp(void __iomem *base, | |||
| 184 | unsigned long tmp; | 216 | unsigned long tmp; |
| 185 | 217 | ||
| 186 | /* In data transfer mode: Set clock to Bus clock/4 (about 20Mhz) */ | 218 | /* In data transfer mode: Set clock to Bus clock/4 (about 20Mhz) */ |
| 187 | sh_mmcif_writel(base, MMCIF_CE_CLK_CTRL, 0x01012fff); | 219 | sh_mmcif_writel(base, MMCIF_CE_CLK_CTRL, |
| 220 | CLK_ENABLE | CLKDIV_4 | SRSPTO_256 | | ||
| 221 | SRBSYTO_29 | SRWDTO_29 | SCCSTO_29); | ||
| 188 | 222 | ||
| 189 | /* CMD9 - Get CSD */ | 223 | /* CMD9 - Get CSD */ |
| 190 | sh_mmcif_boot_cmd(base, 0x09806000, 0x00010000); | 224 | sh_mmcif_boot_cmd(base, 0x09806000, 0x00010000); |
diff --git a/include/linux/of_address.h b/include/linux/of_address.h index 8aea06f0564c..2feda6ee6140 100644 --- a/include/linux/of_address.h +++ b/include/linux/of_address.h | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | #include <linux/ioport.h> | 3 | #include <linux/ioport.h> |
| 4 | #include <linux/of.h> | 4 | #include <linux/of.h> |
| 5 | 5 | ||
| 6 | extern u64 of_translate_address(struct device_node *np, const u32 *addr); | 6 | extern u64 of_translate_address(struct device_node *np, const __be32 *addr); |
| 7 | extern int of_address_to_resource(struct device_node *dev, int index, | 7 | extern int of_address_to_resource(struct device_node *dev, int index, |
| 8 | struct resource *r); | 8 | struct resource *r); |
| 9 | extern void __iomem *of_iomap(struct device_node *device, int index); | 9 | extern void __iomem *of_iomap(struct device_node *device, int index); |
| @@ -21,7 +21,7 @@ static inline unsigned long pci_address_to_pio(phys_addr_t addr) { return -1; } | |||
| 21 | #endif | 21 | #endif |
| 22 | 22 | ||
| 23 | #ifdef CONFIG_PCI | 23 | #ifdef CONFIG_PCI |
| 24 | extern const u32 *of_get_pci_address(struct device_node *dev, int bar_no, | 24 | extern const __be32 *of_get_pci_address(struct device_node *dev, int bar_no, |
| 25 | u64 *size, unsigned int *flags); | 25 | u64 *size, unsigned int *flags); |
| 26 | extern int of_pci_address_to_resource(struct device_node *dev, int bar, | 26 | extern int of_pci_address_to_resource(struct device_node *dev, int bar, |
| 27 | struct resource *r); | 27 | struct resource *r); |
| @@ -32,7 +32,7 @@ static inline int of_pci_address_to_resource(struct device_node *dev, int bar, | |||
| 32 | return -ENOSYS; | 32 | return -ENOSYS; |
| 33 | } | 33 | } |
| 34 | 34 | ||
| 35 | static inline const u32 *of_get_pci_address(struct device_node *dev, | 35 | static inline const __be32 *of_get_pci_address(struct device_node *dev, |
| 36 | int bar_no, u64 *size, unsigned int *flags) | 36 | int bar_no, u64 *size, unsigned int *flags) |
| 37 | { | 37 | { |
| 38 | return NULL; | 38 | return NULL; |
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h index 7bbf5b328438..0ef22a1f129e 100644 --- a/include/linux/of_fdt.h +++ b/include/linux/of_fdt.h | |||
| @@ -58,6 +58,23 @@ struct boot_param_header { | |||
| 58 | }; | 58 | }; |
| 59 | 59 | ||
| 60 | #if defined(CONFIG_OF_FLATTREE) | 60 | #if defined(CONFIG_OF_FLATTREE) |
| 61 | |||
| 62 | struct device_node; | ||
| 63 | |||
| 64 | /* For scanning an arbitrary device-tree at any time */ | ||
| 65 | extern char *of_fdt_get_string(struct boot_param_header *blob, u32 offset); | ||
| 66 | extern void *of_fdt_get_property(struct boot_param_header *blob, | ||
| 67 | unsigned long node, | ||
| 68 | const char *name, | ||
| 69 | unsigned long *size); | ||
| 70 | extern int of_fdt_is_compatible(struct boot_param_header *blob, | ||
| 71 | unsigned long node, | ||
| 72 | const char *compat); | ||
| 73 | extern int of_fdt_match(struct boot_param_header *blob, unsigned long node, | ||
| 74 | const char **compat); | ||
| 75 | extern void of_fdt_unflatten_tree(unsigned long *blob, | ||
| 76 | struct device_node **mynodes); | ||
| 77 | |||
| 61 | /* TBD: Temporary export of fdt globals - remove when code fully merged */ | 78 | /* TBD: Temporary export of fdt globals - remove when code fully merged */ |
| 62 | extern int __initdata dt_root_addr_cells; | 79 | extern int __initdata dt_root_addr_cells; |
| 63 | extern int __initdata dt_root_size_cells; | 80 | extern int __initdata dt_root_size_cells; |
| @@ -71,6 +88,7 @@ extern int of_scan_flat_dt(int (*it)(unsigned long node, const char *uname, | |||
| 71 | extern void *of_get_flat_dt_prop(unsigned long node, const char *name, | 88 | extern void *of_get_flat_dt_prop(unsigned long node, const char *name, |
| 72 | unsigned long *size); | 89 | unsigned long *size); |
| 73 | extern int of_flat_dt_is_compatible(unsigned long node, const char *name); | 90 | extern int of_flat_dt_is_compatible(unsigned long node, const char *name); |
| 91 | extern int of_flat_dt_match(unsigned long node, const char **matches); | ||
| 74 | extern unsigned long of_get_flat_dt_root(void); | 92 | extern unsigned long of_get_flat_dt_root(void); |
| 75 | 93 | ||
| 76 | extern int early_init_dt_scan_chosen(unsigned long node, const char *uname, | 94 | extern int early_init_dt_scan_chosen(unsigned long node, const char *uname, |
diff --git a/include/linux/of_net.h b/include/linux/of_net.h new file mode 100644 index 000000000000..e913081fb52a --- /dev/null +++ b/include/linux/of_net.h | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | /* | ||
| 2 | * OF helpers for network devices. | ||
| 3 | * | ||
| 4 | * This file is released under the GPLv2 | ||
| 5 | */ | ||
| 6 | |||
| 7 | #ifndef __LINUX_OF_NET_H | ||
| 8 | #define __LINUX_OF_NET_H | ||
| 9 | |||
| 10 | #ifdef CONFIG_OF_NET | ||
| 11 | #include <linux/of.h> | ||
| 12 | extern const void *of_get_mac_address(struct device_node *np); | ||
| 13 | #endif | ||
| 14 | |||
| 15 | #endif /* __LINUX_OF_NET_H */ | ||
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index 5095b834a6fb..27c3c6fcfad3 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
| @@ -240,6 +240,21 @@ extern void __bad_size_call_parameter(void); | |||
| 240 | pscr_ret__; \ | 240 | pscr_ret__; \ |
| 241 | }) | 241 | }) |
| 242 | 242 | ||
| 243 | #define __pcpu_size_call_return2(stem, variable, ...) \ | ||
| 244 | ({ \ | ||
| 245 | typeof(variable) pscr2_ret__; \ | ||
| 246 | __verify_pcpu_ptr(&(variable)); \ | ||
| 247 | switch(sizeof(variable)) { \ | ||
| 248 | case 1: pscr2_ret__ = stem##1(variable, __VA_ARGS__); break; \ | ||
| 249 | case 2: pscr2_ret__ = stem##2(variable, __VA_ARGS__); break; \ | ||
| 250 | case 4: pscr2_ret__ = stem##4(variable, __VA_ARGS__); break; \ | ||
| 251 | case 8: pscr2_ret__ = stem##8(variable, __VA_ARGS__); break; \ | ||
| 252 | default: \ | ||
| 253 | __bad_size_call_parameter(); break; \ | ||
| 254 | } \ | ||
| 255 | pscr2_ret__; \ | ||
| 256 | }) | ||
| 257 | |||
| 243 | #define __pcpu_size_call(stem, variable, ...) \ | 258 | #define __pcpu_size_call(stem, variable, ...) \ |
| 244 | do { \ | 259 | do { \ |
| 245 | __verify_pcpu_ptr(&(variable)); \ | 260 | __verify_pcpu_ptr(&(variable)); \ |
| @@ -402,6 +417,89 @@ do { \ | |||
| 402 | # define this_cpu_xor(pcp, val) __pcpu_size_call(this_cpu_or_, (pcp), (val)) | 417 | # define this_cpu_xor(pcp, val) __pcpu_size_call(this_cpu_or_, (pcp), (val)) |
| 403 | #endif | 418 | #endif |
| 404 | 419 | ||
| 420 | #define _this_cpu_generic_add_return(pcp, val) \ | ||
| 421 | ({ \ | ||
| 422 | typeof(pcp) ret__; \ | ||
| 423 | preempt_disable(); \ | ||
| 424 | __this_cpu_add(pcp, val); \ | ||
| 425 | ret__ = __this_cpu_read(pcp); \ | ||
| 426 | preempt_enable(); \ | ||
| 427 | ret__; \ | ||
| 428 | }) | ||
| 429 | |||
| 430 | #ifndef this_cpu_add_return | ||
| 431 | # ifndef this_cpu_add_return_1 | ||
| 432 | # define this_cpu_add_return_1(pcp, val) _this_cpu_generic_add_return(pcp, val) | ||
| 433 | # endif | ||
| 434 | # ifndef this_cpu_add_return_2 | ||
| 435 | # define this_cpu_add_return_2(pcp, val) _this_cpu_generic_add_return(pcp, val) | ||
| 436 | # endif | ||
| 437 | # ifndef this_cpu_add_return_4 | ||
| 438 | # define this_cpu_add_return_4(pcp, val) _this_cpu_generic_add_return(pcp, val) | ||
| 439 | # endif | ||
| 440 | # ifndef this_cpu_add_return_8 | ||
| 441 | # define this_cpu_add_return_8(pcp, val) _this_cpu_generic_add_return(pcp, val) | ||
| 442 | # endif | ||
| 443 | # define this_cpu_add_return(pcp, val) __pcpu_size_call_return2(this_cpu_add_return_, pcp, val) | ||
| 444 | #endif | ||
| 445 | |||
| 446 | #define this_cpu_sub_return(pcp, val) this_cpu_add_return(pcp, -(val)) | ||
| 447 | #define this_cpu_inc_return(pcp) this_cpu_add_return(pcp, 1) | ||
| 448 | #define this_cpu_dec_return(pcp) this_cpu_add_return(pcp, -1) | ||
| 449 | |||
| 450 | #define _this_cpu_generic_xchg(pcp, nval) \ | ||
| 451 | ({ typeof(pcp) ret__; \ | ||
| 452 | preempt_disable(); \ | ||
| 453 | ret__ = __this_cpu_read(pcp); \ | ||
| 454 | __this_cpu_write(pcp, nval); \ | ||
| 455 | preempt_enable(); \ | ||
| 456 | ret__; \ | ||
| 457 | }) | ||
| 458 | |||
| 459 | #ifndef this_cpu_xchg | ||
| 460 | # ifndef this_cpu_xchg_1 | ||
| 461 | # define this_cpu_xchg_1(pcp, nval) _this_cpu_generic_xchg(pcp, nval) | ||
| 462 | # endif | ||
| 463 | # ifndef this_cpu_xchg_2 | ||
| 464 | # define this_cpu_xchg_2(pcp, nval) _this_cpu_generic_xchg(pcp, nval) | ||
| 465 | # endif | ||
| 466 | # ifndef this_cpu_xchg_4 | ||
| 467 | # define this_cpu_xchg_4(pcp, nval) _this_cpu_generic_xchg(pcp, nval) | ||
| 468 | # endif | ||
| 469 | # ifndef this_cpu_xchg_8 | ||
| 470 | # define this_cpu_xchg_8(pcp, nval) _this_cpu_generic_xchg(pcp, nval) | ||
| 471 | # endif | ||
| 472 | # define this_cpu_xchg(pcp, nval) \ | ||
| 473 | __pcpu_size_call_return2(this_cpu_xchg_, (pcp), nval) | ||
| 474 | #endif | ||
| 475 | |||
| 476 | #define _this_cpu_generic_cmpxchg(pcp, oval, nval) \ | ||
| 477 | ({ typeof(pcp) ret__; \ | ||
| 478 | preempt_disable(); \ | ||
| 479 | ret__ = __this_cpu_read(pcp); \ | ||
| 480 | if (ret__ == (oval)) \ | ||
| 481 | __this_cpu_write(pcp, nval); \ | ||
| 482 | preempt_enable(); \ | ||
| 483 | ret__; \ | ||
| 484 | }) | ||
| 485 | |||
| 486 | #ifndef this_cpu_cmpxchg | ||
| 487 | # ifndef this_cpu_cmpxchg_1 | ||
| 488 | # define this_cpu_cmpxchg_1(pcp, oval, nval) _this_cpu_generic_cmpxchg(pcp, oval, nval) | ||
| 489 | # endif | ||
| 490 | # ifndef this_cpu_cmpxchg_2 | ||
| 491 | # define this_cpu_cmpxchg_2(pcp, oval, nval) _this_cpu_generic_cmpxchg(pcp, oval, nval) | ||
| 492 | # endif | ||
| 493 | # ifndef this_cpu_cmpxchg_4 | ||
| 494 | # define this_cpu_cmpxchg_4(pcp, oval, nval) _this_cpu_generic_cmpxchg(pcp, oval, nval) | ||
| 495 | # endif | ||
| 496 | # ifndef this_cpu_cmpxchg_8 | ||
| 497 | # define this_cpu_cmpxchg_8(pcp, oval, nval) _this_cpu_generic_cmpxchg(pcp, oval, nval) | ||
| 498 | # endif | ||
| 499 | # define this_cpu_cmpxchg(pcp, oval, nval) \ | ||
| 500 | __pcpu_size_call_return2(this_cpu_cmpxchg_, pcp, oval, nval) | ||
| 501 | #endif | ||
| 502 | |||
| 405 | /* | 503 | /* |
| 406 | * Generic percpu operations that do not require preemption handling. | 504 | * Generic percpu operations that do not require preemption handling. |
| 407 | * Either we do not care about races or the caller has the | 505 | * Either we do not care about races or the caller has the |
| @@ -529,11 +627,87 @@ do { \ | |||
| 529 | # define __this_cpu_xor(pcp, val) __pcpu_size_call(__this_cpu_xor_, (pcp), (val)) | 627 | # define __this_cpu_xor(pcp, val) __pcpu_size_call(__this_cpu_xor_, (pcp), (val)) |
| 530 | #endif | 628 | #endif |
| 531 | 629 | ||
| 630 | #define __this_cpu_generic_add_return(pcp, val) \ | ||
| 631 | ({ \ | ||
| 632 | __this_cpu_add(pcp, val); \ | ||
| 633 | __this_cpu_read(pcp); \ | ||
| 634 | }) | ||
| 635 | |||
| 636 | #ifndef __this_cpu_add_return | ||
| 637 | # ifndef __this_cpu_add_return_1 | ||
| 638 | # define __this_cpu_add_return_1(pcp, val) __this_cpu_generic_add_return(pcp, val) | ||
| 639 | # endif | ||
| 640 | # ifndef __this_cpu_add_return_2 | ||
| 641 | # define __this_cpu_add_return_2(pcp, val) __this_cpu_generic_add_return(pcp, val) | ||
| 642 | # endif | ||
| 643 | # ifndef __this_cpu_add_return_4 | ||
| 644 | # define __this_cpu_add_return_4(pcp, val) __this_cpu_generic_add_return(pcp, val) | ||
| 645 | # endif | ||
| 646 | # ifndef __this_cpu_add_return_8 | ||
| 647 | # define __this_cpu_add_return_8(pcp, val) __this_cpu_generic_add_return(pcp, val) | ||
| 648 | # endif | ||
| 649 | # define __this_cpu_add_return(pcp, val) __pcpu_size_call_return2(this_cpu_add_return_, pcp, val) | ||
| 650 | #endif | ||
| 651 | |||
| 652 | #define __this_cpu_sub_return(pcp, val) this_cpu_add_return(pcp, -(val)) | ||
| 653 | #define __this_cpu_inc_return(pcp) this_cpu_add_return(pcp, 1) | ||
| 654 | #define __this_cpu_dec_return(pcp) this_cpu_add_return(pcp, -1) | ||
| 655 | |||
| 656 | #define __this_cpu_generic_xchg(pcp, nval) \ | ||
| 657 | ({ typeof(pcp) ret__; \ | ||
| 658 | ret__ = __this_cpu_read(pcp); \ | ||
| 659 | __this_cpu_write(pcp, nval); \ | ||
| 660 | ret__; \ | ||
| 661 | }) | ||
| 662 | |||
| 663 | #ifndef __this_cpu_xchg | ||
| 664 | # ifndef __this_cpu_xchg_1 | ||
| 665 | # define __this_cpu_xchg_1(pcp, nval) __this_cpu_generic_xchg(pcp, nval) | ||
| 666 | # endif | ||
| 667 | # ifndef __this_cpu_xchg_2 | ||
| 668 | # define __this_cpu_xchg_2(pcp, nval) __this_cpu_generic_xchg(pcp, nval) | ||
| 669 | # endif | ||
| 670 | # ifndef __this_cpu_xchg_4 | ||
| 671 | # define __this_cpu_xchg_4(pcp, nval) __this_cpu_generic_xchg(pcp, nval) | ||
| 672 | # endif | ||
| 673 | # ifndef __this_cpu_xchg_8 | ||
| 674 | # define __this_cpu_xchg_8(pcp, nval) __this_cpu_generic_xchg(pcp, nval) | ||
| 675 | # endif | ||
| 676 | # define __this_cpu_xchg(pcp, nval) \ | ||
| 677 | __pcpu_size_call_return2(__this_cpu_xchg_, (pcp), nval) | ||
| 678 | #endif | ||
| 679 | |||
| 680 | #define __this_cpu_generic_cmpxchg(pcp, oval, nval) \ | ||
| 681 | ({ \ | ||
| 682 | typeof(pcp) ret__; \ | ||
| 683 | ret__ = __this_cpu_read(pcp); \ | ||
| 684 | if (ret__ == (oval)) \ | ||
| 685 | __this_cpu_write(pcp, nval); \ | ||
| 686 | ret__; \ | ||
| 687 | }) | ||
| 688 | |||
| 689 | #ifndef __this_cpu_cmpxchg | ||
| 690 | # ifndef __this_cpu_cmpxchg_1 | ||
| 691 | # define __this_cpu_cmpxchg_1(pcp, oval, nval) __this_cpu_generic_cmpxchg(pcp, oval, nval) | ||
| 692 | # endif | ||
| 693 | # ifndef __this_cpu_cmpxchg_2 | ||
| 694 | # define __this_cpu_cmpxchg_2(pcp, oval, nval) __this_cpu_generic_cmpxchg(pcp, oval, nval) | ||
| 695 | # endif | ||
| 696 | # ifndef __this_cpu_cmpxchg_4 | ||
| 697 | # define __this_cpu_cmpxchg_4(pcp, oval, nval) __this_cpu_generic_cmpxchg(pcp, oval, nval) | ||
| 698 | # endif | ||
| 699 | # ifndef __this_cpu_cmpxchg_8 | ||
| 700 | # define __this_cpu_cmpxchg_8(pcp, oval, nval) __this_cpu_generic_cmpxchg(pcp, oval, nval) | ||
| 701 | # endif | ||
| 702 | # define __this_cpu_cmpxchg(pcp, oval, nval) \ | ||
| 703 | __pcpu_size_call_return2(__this_cpu_cmpxchg_, pcp, oval, nval) | ||
| 704 | #endif | ||
| 705 | |||
| 532 | /* | 706 | /* |
| 533 | * IRQ safe versions of the per cpu RMW operations. Note that these operations | 707 | * IRQ safe versions of the per cpu RMW operations. Note that these operations |
| 534 | * are *not* safe against modification of the same variable from another | 708 | * are *not* safe against modification of the same variable from another |
| 535 | * processors (which one gets when using regular atomic operations) | 709 | * processors (which one gets when using regular atomic operations) |
| 536 | . They are guaranteed to be atomic vs. local interrupts and | 710 | * They are guaranteed to be atomic vs. local interrupts and |
| 537 | * preemption only. | 711 | * preemption only. |
| 538 | */ | 712 | */ |
| 539 | #define irqsafe_cpu_generic_to_op(pcp, val, op) \ | 713 | #define irqsafe_cpu_generic_to_op(pcp, val, op) \ |
| @@ -620,4 +794,33 @@ do { \ | |||
| 620 | # define irqsafe_cpu_xor(pcp, val) __pcpu_size_call(irqsafe_cpu_xor_, (val)) | 794 | # define irqsafe_cpu_xor(pcp, val) __pcpu_size_call(irqsafe_cpu_xor_, (val)) |
| 621 | #endif | 795 | #endif |
| 622 | 796 | ||
| 797 | #define irqsafe_cpu_generic_cmpxchg(pcp, oval, nval) \ | ||
| 798 | ({ \ | ||
| 799 | typeof(pcp) ret__; \ | ||
| 800 | unsigned long flags; \ | ||
| 801 | local_irq_save(flags); \ | ||
| 802 | ret__ = __this_cpu_read(pcp); \ | ||
| 803 | if (ret__ == (oval)) \ | ||
| 804 | __this_cpu_write(pcp, nval); \ | ||
| 805 | local_irq_restore(flags); \ | ||
| 806 | ret__; \ | ||
| 807 | }) | ||
| 808 | |||
| 809 | #ifndef irqsafe_cpu_cmpxchg | ||
| 810 | # ifndef irqsafe_cpu_cmpxchg_1 | ||
| 811 | # define irqsafe_cpu_cmpxchg_1(pcp, oval, nval) irqsafe_cpu_generic_cmpxchg(pcp, oval, nval) | ||
| 812 | # endif | ||
| 813 | # ifndef irqsafe_cpu_cmpxchg_2 | ||
| 814 | # define irqsafe_cpu_cmpxchg_2(pcp, oval, nval) irqsafe_cpu_generic_cmpxchg(pcp, oval, nval) | ||
| 815 | # endif | ||
| 816 | # ifndef irqsafe_cpu_cmpxchg_4 | ||
| 817 | # define irqsafe_cpu_cmpxchg_4(pcp, oval, nval) irqsafe_cpu_generic_cmpxchg(pcp, oval, nval) | ||
| 818 | # endif | ||
| 819 | # ifndef irqsafe_cpu_cmpxchg_8 | ||
| 820 | # define irqsafe_cpu_cmpxchg_8(pcp, oval, nval) irqsafe_cpu_generic_cmpxchg(pcp, oval, nval) | ||
| 821 | # endif | ||
| 822 | # define irqsafe_cpu_cmpxchg(pcp, oval, nval) \ | ||
| 823 | __pcpu_size_call_return2(irqsafe_cpu_cmpxchg_, (pcp), oval, nval) | ||
| 824 | #endif | ||
| 825 | |||
| 623 | #endif /* __LINUX_PERCPU_H */ | 826 | #endif /* __LINUX_PERCPU_H */ |
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h index bb27d7ec2fb9..77257c92155a 100644 --- a/include/linux/pipe_fs_i.h +++ b/include/linux/pipe_fs_i.h | |||
| @@ -30,6 +30,7 @@ struct pipe_buffer { | |||
| 30 | * struct pipe_inode_info - a linux kernel pipe | 30 | * struct pipe_inode_info - a linux kernel pipe |
| 31 | * @wait: reader/writer wait point in case of empty/full pipe | 31 | * @wait: reader/writer wait point in case of empty/full pipe |
| 32 | * @nrbufs: the number of non-empty pipe buffers in this pipe | 32 | * @nrbufs: the number of non-empty pipe buffers in this pipe |
| 33 | * @buffers: total number of buffers (should be a power of 2) | ||
| 33 | * @curbuf: the current pipe buffer entry | 34 | * @curbuf: the current pipe buffer entry |
| 34 | * @tmp_page: cached released page | 35 | * @tmp_page: cached released page |
| 35 | * @readers: number of current readers of this pipe | 36 | * @readers: number of current readers of this pipe |
diff --git a/include/linux/pm.h b/include/linux/pm.h index 40f3f45702ba..dd9c7ab38270 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
| @@ -367,45 +367,6 @@ extern struct dev_pm_ops generic_subsys_pm_ops; | |||
| 367 | { .event = PM_EVENT_AUTO_RESUME, }) | 367 | { .event = PM_EVENT_AUTO_RESUME, }) |
| 368 | 368 | ||
| 369 | /** | 369 | /** |
| 370 | * Device power management states | ||
| 371 | * | ||
| 372 | * These state labels are used internally by the PM core to indicate the current | ||
| 373 | * status of a device with respect to the PM core operations. | ||
| 374 | * | ||
| 375 | * DPM_ON Device is regarded as operational. Set this way | ||
| 376 | * initially and when ->complete() is about to be called. | ||
| 377 | * Also set when ->prepare() fails. | ||
| 378 | * | ||
| 379 | * DPM_PREPARING Device is going to be prepared for a PM transition. Set | ||
| 380 | * when ->prepare() is about to be called. | ||
| 381 | * | ||
| 382 | * DPM_RESUMING Device is going to be resumed. Set when ->resume(), | ||
| 383 | * ->thaw(), or ->restore() is about to be called. | ||
| 384 | * | ||
| 385 | * DPM_SUSPENDING Device has been prepared for a power transition. Set | ||
| 386 | * when ->prepare() has just succeeded. | ||
| 387 | * | ||
| 388 | * DPM_OFF Device is regarded as inactive. Set immediately after | ||
| 389 | * ->suspend(), ->freeze(), or ->poweroff() has succeeded. | ||
| 390 | * Also set when ->resume()_noirq, ->thaw_noirq(), or | ||
| 391 | * ->restore_noirq() is about to be called. | ||
| 392 | * | ||
| 393 | * DPM_OFF_IRQ Device is in a "deep sleep". Set immediately after | ||
| 394 | * ->suspend_noirq(), ->freeze_noirq(), or | ||
| 395 | * ->poweroff_noirq() has just succeeded. | ||
| 396 | */ | ||
| 397 | |||
| 398 | enum dpm_state { | ||
| 399 | DPM_INVALID, | ||
| 400 | DPM_ON, | ||
| 401 | DPM_PREPARING, | ||
| 402 | DPM_RESUMING, | ||
| 403 | DPM_SUSPENDING, | ||
| 404 | DPM_OFF, | ||
| 405 | DPM_OFF_IRQ, | ||
| 406 | }; | ||
| 407 | |||
| 408 | /** | ||
| 409 | * Device run-time power management status. | 370 | * Device run-time power management status. |
| 410 | * | 371 | * |
| 411 | * These status labels are used internally by the PM core to indicate the | 372 | * These status labels are used internally by the PM core to indicate the |
| @@ -463,8 +424,8 @@ struct wakeup_source; | |||
| 463 | struct dev_pm_info { | 424 | struct dev_pm_info { |
| 464 | pm_message_t power_state; | 425 | pm_message_t power_state; |
| 465 | unsigned int can_wakeup:1; | 426 | unsigned int can_wakeup:1; |
| 466 | unsigned async_suspend:1; | 427 | unsigned int async_suspend:1; |
| 467 | enum dpm_state status; /* Owned by the PM core */ | 428 | unsigned int in_suspend:1; /* Owned by the PM core */ |
| 468 | spinlock_t lock; | 429 | spinlock_t lock; |
| 469 | #ifdef CONFIG_PM_SLEEP | 430 | #ifdef CONFIG_PM_SLEEP |
| 470 | struct list_head entry; | 431 | struct list_head entry; |
| @@ -486,6 +447,7 @@ struct dev_pm_info { | |||
| 486 | unsigned int run_wake:1; | 447 | unsigned int run_wake:1; |
| 487 | unsigned int runtime_auto:1; | 448 | unsigned int runtime_auto:1; |
| 488 | unsigned int no_callbacks:1; | 449 | unsigned int no_callbacks:1; |
| 450 | unsigned int irq_safe:1; | ||
| 489 | unsigned int use_autosuspend:1; | 451 | unsigned int use_autosuspend:1; |
| 490 | unsigned int timer_autosuspends:1; | 452 | unsigned int timer_autosuspends:1; |
| 491 | enum rpm_request request; | 453 | enum rpm_request request; |
| @@ -610,4 +572,11 @@ extern unsigned int pm_flags; | |||
| 610 | #define PM_APM 1 | 572 | #define PM_APM 1 |
| 611 | #define PM_ACPI 2 | 573 | #define PM_ACPI 2 |
| 612 | 574 | ||
| 575 | extern int pm_generic_suspend(struct device *dev); | ||
| 576 | extern int pm_generic_resume(struct device *dev); | ||
| 577 | extern int pm_generic_freeze(struct device *dev); | ||
| 578 | extern int pm_generic_thaw(struct device *dev); | ||
| 579 | extern int pm_generic_restore(struct device *dev); | ||
| 580 | extern int pm_generic_poweroff(struct device *dev); | ||
| 581 | |||
| 613 | #endif /* _LINUX_PM_H */ | 582 | #endif /* _LINUX_PM_H */ |
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h index d19f1cca7f74..d34f067e2a7f 100644 --- a/include/linux/pm_runtime.h +++ b/include/linux/pm_runtime.h | |||
| @@ -40,6 +40,7 @@ extern int pm_generic_runtime_idle(struct device *dev); | |||
| 40 | extern int pm_generic_runtime_suspend(struct device *dev); | 40 | extern int pm_generic_runtime_suspend(struct device *dev); |
| 41 | extern int pm_generic_runtime_resume(struct device *dev); | 41 | extern int pm_generic_runtime_resume(struct device *dev); |
| 42 | extern void pm_runtime_no_callbacks(struct device *dev); | 42 | extern void pm_runtime_no_callbacks(struct device *dev); |
| 43 | extern void pm_runtime_irq_safe(struct device *dev); | ||
| 43 | extern void __pm_runtime_use_autosuspend(struct device *dev, bool use); | 44 | extern void __pm_runtime_use_autosuspend(struct device *dev, bool use); |
| 44 | extern void pm_runtime_set_autosuspend_delay(struct device *dev, int delay); | 45 | extern void pm_runtime_set_autosuspend_delay(struct device *dev, int delay); |
| 45 | extern unsigned long pm_runtime_autosuspend_expiration(struct device *dev); | 46 | extern unsigned long pm_runtime_autosuspend_expiration(struct device *dev); |
| @@ -81,6 +82,11 @@ static inline bool pm_runtime_suspended(struct device *dev) | |||
| 81 | && !dev->power.disable_depth; | 82 | && !dev->power.disable_depth; |
| 82 | } | 83 | } |
| 83 | 84 | ||
| 85 | static inline bool pm_runtime_enabled(struct device *dev) | ||
| 86 | { | ||
| 87 | return !dev->power.disable_depth; | ||
| 88 | } | ||
| 89 | |||
| 84 | static inline void pm_runtime_mark_last_busy(struct device *dev) | 90 | static inline void pm_runtime_mark_last_busy(struct device *dev) |
| 85 | { | 91 | { |
| 86 | ACCESS_ONCE(dev->power.last_busy) = jiffies; | 92 | ACCESS_ONCE(dev->power.last_busy) = jiffies; |
| @@ -119,11 +125,13 @@ static inline void pm_runtime_put_noidle(struct device *dev) {} | |||
| 119 | static inline bool device_run_wake(struct device *dev) { return false; } | 125 | static inline bool device_run_wake(struct device *dev) { return false; } |
| 120 | static inline void device_set_run_wake(struct device *dev, bool enable) {} | 126 | static inline void device_set_run_wake(struct device *dev, bool enable) {} |
| 121 | static inline bool pm_runtime_suspended(struct device *dev) { return false; } | 127 | static inline bool pm_runtime_suspended(struct device *dev) { return false; } |
| 128 | static inline bool pm_runtime_enabled(struct device *dev) { return false; } | ||
| 122 | 129 | ||
| 123 | static inline int pm_generic_runtime_idle(struct device *dev) { return 0; } | 130 | static inline int pm_generic_runtime_idle(struct device *dev) { return 0; } |
| 124 | static inline int pm_generic_runtime_suspend(struct device *dev) { return 0; } | 131 | static inline int pm_generic_runtime_suspend(struct device *dev) { return 0; } |
| 125 | static inline int pm_generic_runtime_resume(struct device *dev) { return 0; } | 132 | static inline int pm_generic_runtime_resume(struct device *dev) { return 0; } |
| 126 | static inline void pm_runtime_no_callbacks(struct device *dev) {} | 133 | static inline void pm_runtime_no_callbacks(struct device *dev) {} |
| 134 | static inline void pm_runtime_irq_safe(struct device *dev) {} | ||
| 127 | 135 | ||
| 128 | static inline void pm_runtime_mark_last_busy(struct device *dev) {} | 136 | static inline void pm_runtime_mark_last_busy(struct device *dev) {} |
| 129 | static inline void __pm_runtime_use_autosuspend(struct device *dev, | 137 | static inline void __pm_runtime_use_autosuspend(struct device *dev, |
| @@ -196,6 +204,11 @@ static inline int pm_runtime_put_sync(struct device *dev) | |||
| 196 | return __pm_runtime_idle(dev, RPM_GET_PUT); | 204 | return __pm_runtime_idle(dev, RPM_GET_PUT); |
| 197 | } | 205 | } |
| 198 | 206 | ||
| 207 | static inline int pm_runtime_put_sync_suspend(struct device *dev) | ||
| 208 | { | ||
| 209 | return __pm_runtime_suspend(dev, RPM_GET_PUT); | ||
| 210 | } | ||
| 211 | |||
| 199 | static inline int pm_runtime_put_sync_autosuspend(struct device *dev) | 212 | static inline int pm_runtime_put_sync_autosuspend(struct device *dev) |
| 200 | { | 213 | { |
| 201 | return __pm_runtime_suspend(dev, RPM_GET_PUT | RPM_AUTO); | 214 | return __pm_runtime_suspend(dev, RPM_GET_PUT | RPM_AUTO); |
diff --git a/include/linux/pxa2xx_ssp.h b/include/linux/pxa2xx_ssp.h new file mode 100644 index 000000000000..2f691e4e6222 --- /dev/null +++ b/include/linux/pxa2xx_ssp.h | |||
| @@ -0,0 +1,209 @@ | |||
| 1 | /* | ||
| 2 | * pxa2xx_ssp.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 2003 Russell King, All Rights Reserved. | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | * | ||
| 10 | * This driver supports the following PXA CPU/SSP ports:- | ||
| 11 | * | ||
| 12 | * PXA250 SSP | ||
| 13 | * PXA255 SSP, NSSP | ||
| 14 | * PXA26x SSP, NSSP, ASSP | ||
| 15 | * PXA27x SSP1, SSP2, SSP3 | ||
| 16 | * PXA3xx SSP1, SSP2, SSP3, SSP4 | ||
| 17 | */ | ||
| 18 | |||
| 19 | #ifndef __LINUX_SSP_H | ||
| 20 | #define __LINUX_SSP_H | ||
| 21 | |||
| 22 | #include <linux/list.h> | ||
| 23 | #include <linux/io.h> | ||
| 24 | |||
| 25 | /* | ||
| 26 | * SSP Serial Port Registers | ||
| 27 | * PXA250, PXA255, PXA26x and PXA27x SSP controllers are all slightly different. | ||
| 28 | * PXA255, PXA26x and PXA27x have extra ports, registers and bits. | ||
| 29 | */ | ||
| 30 | |||
| 31 | #define SSCR0 (0x00) /* SSP Control Register 0 */ | ||
| 32 | #define SSCR1 (0x04) /* SSP Control Register 1 */ | ||
| 33 | #define SSSR (0x08) /* SSP Status Register */ | ||
| 34 | #define SSITR (0x0C) /* SSP Interrupt Test Register */ | ||
| 35 | #define SSDR (0x10) /* SSP Data Write/Data Read Register */ | ||
| 36 | |||
| 37 | #define SSTO (0x28) /* SSP Time Out Register */ | ||
| 38 | #define SSPSP (0x2C) /* SSP Programmable Serial Protocol */ | ||
| 39 | #define SSTSA (0x30) /* SSP Tx Timeslot Active */ | ||
| 40 | #define SSRSA (0x34) /* SSP Rx Timeslot Active */ | ||
| 41 | #define SSTSS (0x38) /* SSP Timeslot Status */ | ||
| 42 | #define SSACD (0x3C) /* SSP Audio Clock Divider */ | ||
| 43 | #define SSACDD (0x40) /* SSP Audio Clock Dither Divider */ | ||
| 44 | |||
| 45 | /* Common PXA2xx bits first */ | ||
| 46 | #define SSCR0_DSS (0x0000000f) /* Data Size Select (mask) */ | ||
| 47 | #define SSCR0_DataSize(x) ((x) - 1) /* Data Size Select [4..16] */ | ||
| 48 | #define SSCR0_FRF (0x00000030) /* FRame Format (mask) */ | ||
| 49 | #define SSCR0_Motorola (0x0 << 4) /* Motorola's Serial Peripheral Interface (SPI) */ | ||
| 50 | #define SSCR0_TI (0x1 << 4) /* Texas Instruments' Synchronous Serial Protocol (SSP) */ | ||
| 51 | #define SSCR0_National (0x2 << 4) /* National Microwire */ | ||
| 52 | #define SSCR0_ECS (1 << 6) /* External clock select */ | ||
| 53 | #define SSCR0_SSE (1 << 7) /* Synchronous Serial Port Enable */ | ||
| 54 | #define SSCR0_SCR(x) ((x) << 8) /* Serial Clock Rate (mask) */ | ||
| 55 | |||
| 56 | /* PXA27x, PXA3xx */ | ||
| 57 | #define SSCR0_EDSS (1 << 20) /* Extended data size select */ | ||
| 58 | #define SSCR0_NCS (1 << 21) /* Network clock select */ | ||
| 59 | #define SSCR0_RIM (1 << 22) /* Receive FIFO overrrun interrupt mask */ | ||
| 60 | #define SSCR0_TUM (1 << 23) /* Transmit FIFO underrun interrupt mask */ | ||
| 61 | #define SSCR0_FRDC (0x07000000) /* Frame rate divider control (mask) */ | ||
| 62 | #define SSCR0_SlotsPerFrm(x) (((x) - 1) << 24) /* Time slots per frame [1..8] */ | ||
| 63 | #define SSCR0_FPCKE (1 << 29) /* FIFO packing enable */ | ||
| 64 | #define SSCR0_ACS (1 << 30) /* Audio clock select */ | ||
| 65 | #define SSCR0_MOD (1 << 31) /* Mode (normal or network) */ | ||
| 66 | |||
| 67 | |||
| 68 | #define SSCR1_RIE (1 << 0) /* Receive FIFO Interrupt Enable */ | ||
| 69 | #define SSCR1_TIE (1 << 1) /* Transmit FIFO Interrupt Enable */ | ||
| 70 | #define SSCR1_LBM (1 << 2) /* Loop-Back Mode */ | ||
| 71 | #define SSCR1_SPO (1 << 3) /* Motorola SPI SSPSCLK polarity setting */ | ||
| 72 | #define SSCR1_SPH (1 << 4) /* Motorola SPI SSPSCLK phase setting */ | ||
| 73 | #define SSCR1_MWDS (1 << 5) /* Microwire Transmit Data Size */ | ||
| 74 | |||
| 75 | #define SSSR_ALT_FRM_MASK 3 /* Masks the SFRM signal number */ | ||
| 76 | #define SSSR_TNF (1 << 2) /* Transmit FIFO Not Full */ | ||
| 77 | #define SSSR_RNE (1 << 3) /* Receive FIFO Not Empty */ | ||
| 78 | #define SSSR_BSY (1 << 4) /* SSP Busy */ | ||
| 79 | #define SSSR_TFS (1 << 5) /* Transmit FIFO Service Request */ | ||
| 80 | #define SSSR_RFS (1 << 6) /* Receive FIFO Service Request */ | ||
| 81 | #define SSSR_ROR (1 << 7) /* Receive FIFO Overrun */ | ||
| 82 | |||
| 83 | #ifdef CONFIG_ARCH_PXA | ||
| 84 | #define RX_THRESH_DFLT 8 | ||
| 85 | #define TX_THRESH_DFLT 8 | ||
| 86 | |||
| 87 | #define SSSR_TFL_MASK (0xf << 8) /* Transmit FIFO Level mask */ | ||
| 88 | #define SSSR_RFL_MASK (0xf << 12) /* Receive FIFO Level mask */ | ||
| 89 | |||
| 90 | #define SSCR1_TFT (0x000003c0) /* Transmit FIFO Threshold (mask) */ | ||
| 91 | #define SSCR1_TxTresh(x) (((x) - 1) << 6) /* level [1..16] */ | ||
| 92 | #define SSCR1_RFT (0x00003c00) /* Receive FIFO Threshold (mask) */ | ||
| 93 | #define SSCR1_RxTresh(x) (((x) - 1) << 10) /* level [1..16] */ | ||
| 94 | |||
| 95 | #else | ||
| 96 | |||
| 97 | #define RX_THRESH_DFLT 2 | ||
| 98 | #define TX_THRESH_DFLT 2 | ||
| 99 | |||
| 100 | #define SSSR_TFL_MASK (0x3 << 8) /* Transmit FIFO Level mask */ | ||
| 101 | #define SSSR_RFL_MASK (0x3 << 12) /* Receive FIFO Level mask */ | ||
| 102 | |||
| 103 | #define SSCR1_TFT (0x000000c0) /* Transmit FIFO Threshold (mask) */ | ||
| 104 | #define SSCR1_TxTresh(x) (((x) - 1) << 6) /* level [1..4] */ | ||
| 105 | #define SSCR1_RFT (0x00000c00) /* Receive FIFO Threshold (mask) */ | ||
| 106 | #define SSCR1_RxTresh(x) (((x) - 1) << 10) /* level [1..4] */ | ||
| 107 | #endif | ||
| 108 | |||
| 109 | /* extra bits in PXA255, PXA26x and PXA27x SSP ports */ | ||
| 110 | #define SSCR0_TISSP (1 << 4) /* TI Sync Serial Protocol */ | ||
| 111 | #define SSCR0_PSP (3 << 4) /* PSP - Programmable Serial Protocol */ | ||
| 112 | #define SSCR1_TTELP (1 << 31) /* TXD Tristate Enable Last Phase */ | ||
| 113 | #define SSCR1_TTE (1 << 30) /* TXD Tristate Enable */ | ||
| 114 | #define SSCR1_EBCEI (1 << 29) /* Enable Bit Count Error interrupt */ | ||
| 115 | #define SSCR1_SCFR (1 << 28) /* Slave Clock free Running */ | ||
| 116 | #define SSCR1_ECRA (1 << 27) /* Enable Clock Request A */ | ||
| 117 | #define SSCR1_ECRB (1 << 26) /* Enable Clock request B */ | ||
| 118 | #define SSCR1_SCLKDIR (1 << 25) /* Serial Bit Rate Clock Direction */ | ||
| 119 | #define SSCR1_SFRMDIR (1 << 24) /* Frame Direction */ | ||
| 120 | #define SSCR1_RWOT (1 << 23) /* Receive Without Transmit */ | ||
| 121 | #define SSCR1_TRAIL (1 << 22) /* Trailing Byte */ | ||
| 122 | #define SSCR1_TSRE (1 << 21) /* Transmit Service Request Enable */ | ||
| 123 | #define SSCR1_RSRE (1 << 20) /* Receive Service Request Enable */ | ||
| 124 | #define SSCR1_TINTE (1 << 19) /* Receiver Time-out Interrupt enable */ | ||
| 125 | #define SSCR1_PINTE (1 << 18) /* Peripheral Trailing Byte Interupt Enable */ | ||
| 126 | #define SSCR1_IFS (1 << 16) /* Invert Frame Signal */ | ||
| 127 | #define SSCR1_STRF (1 << 15) /* Select FIFO or EFWR */ | ||
| 128 | #define SSCR1_EFWR (1 << 14) /* Enable FIFO Write/Read */ | ||
| 129 | |||
| 130 | #define SSSR_BCE (1 << 23) /* Bit Count Error */ | ||
| 131 | #define SSSR_CSS (1 << 22) /* Clock Synchronisation Status */ | ||
| 132 | #define SSSR_TUR (1 << 21) /* Transmit FIFO Under Run */ | ||
| 133 | #define SSSR_EOC (1 << 20) /* End Of Chain */ | ||
| 134 | #define SSSR_TINT (1 << 19) /* Receiver Time-out Interrupt */ | ||
| 135 | #define SSSR_PINT (1 << 18) /* Peripheral Trailing Byte Interrupt */ | ||
| 136 | |||
| 137 | |||
| 138 | #define SSPSP_SCMODE(x) ((x) << 0) /* Serial Bit Rate Clock Mode */ | ||
| 139 | #define SSPSP_SFRMP (1 << 2) /* Serial Frame Polarity */ | ||
| 140 | #define SSPSP_ETDS (1 << 3) /* End of Transfer data State */ | ||
| 141 | #define SSPSP_STRTDLY(x) ((x) << 4) /* Start Delay */ | ||
| 142 | #define SSPSP_DMYSTRT(x) ((x) << 7) /* Dummy Start */ | ||
| 143 | #define SSPSP_SFRMDLY(x) ((x) << 9) /* Serial Frame Delay */ | ||
| 144 | #define SSPSP_SFRMWDTH(x) ((x) << 16) /* Serial Frame Width */ | ||
| 145 | #define SSPSP_DMYSTOP(x) ((x) << 23) /* Dummy Stop */ | ||
| 146 | #define SSPSP_FSRT (1 << 25) /* Frame Sync Relative Timing */ | ||
| 147 | |||
| 148 | /* PXA3xx */ | ||
| 149 | #define SSPSP_EDMYSTRT(x) ((x) << 26) /* Extended Dummy Start */ | ||
| 150 | #define SSPSP_EDMYSTOP(x) ((x) << 28) /* Extended Dummy Stop */ | ||
| 151 | #define SSPSP_TIMING_MASK (0x7f8001f0) | ||
| 152 | |||
| 153 | #define SSACD_SCDB (1 << 3) /* SSPSYSCLK Divider Bypass */ | ||
| 154 | #define SSACD_ACPS(x) ((x) << 4) /* Audio clock PLL select */ | ||
| 155 | #define SSACD_ACDS(x) ((x) << 0) /* Audio clock divider select */ | ||
| 156 | #define SSACD_SCDX8 (1 << 7) /* SYSCLK division ratio select */ | ||
| 157 | |||
| 158 | enum pxa_ssp_type { | ||
| 159 | SSP_UNDEFINED = 0, | ||
| 160 | PXA25x_SSP, /* pxa 210, 250, 255, 26x */ | ||
| 161 | PXA25x_NSSP, /* pxa 255, 26x (including ASSP) */ | ||
| 162 | PXA27x_SSP, | ||
| 163 | PXA168_SSP, | ||
| 164 | CE4100_SSP, | ||
| 165 | }; | ||
| 166 | |||
| 167 | struct ssp_device { | ||
| 168 | struct platform_device *pdev; | ||
| 169 | struct list_head node; | ||
| 170 | |||
| 171 | struct clk *clk; | ||
| 172 | void __iomem *mmio_base; | ||
| 173 | unsigned long phys_base; | ||
| 174 | |||
| 175 | const char *label; | ||
| 176 | int port_id; | ||
| 177 | int type; | ||
| 178 | int use_count; | ||
| 179 | int irq; | ||
| 180 | int drcmr_rx; | ||
| 181 | int drcmr_tx; | ||
| 182 | }; | ||
| 183 | |||
| 184 | /** | ||
| 185 | * pxa_ssp_write_reg - Write to a SSP register | ||
| 186 | * | ||
| 187 | * @dev: SSP device to access | ||
| 188 | * @reg: Register to write to | ||
| 189 | * @val: Value to be written. | ||
| 190 | */ | ||
| 191 | static inline void pxa_ssp_write_reg(struct ssp_device *dev, u32 reg, u32 val) | ||
| 192 | { | ||
| 193 | __raw_writel(val, dev->mmio_base + reg); | ||
| 194 | } | ||
| 195 | |||
| 196 | /** | ||
| 197 | * pxa_ssp_read_reg - Read from a SSP register | ||
| 198 | * | ||
| 199 | * @dev: SSP device to access | ||
| 200 | * @reg: Register to read from | ||
| 201 | */ | ||
| 202 | static inline u32 pxa_ssp_read_reg(struct ssp_device *dev, u32 reg) | ||
| 203 | { | ||
| 204 | return __raw_readl(dev->mmio_base + reg); | ||
| 205 | } | ||
| 206 | |||
| 207 | struct ssp_device *pxa_ssp_request(int port, const char *label); | ||
| 208 | void pxa_ssp_free(struct ssp_device *); | ||
| 209 | #endif | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index 777cd01e240e..abc527aa8550 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -70,7 +70,6 @@ struct sched_param { | |||
| 70 | #include <linux/smp.h> | 70 | #include <linux/smp.h> |
| 71 | #include <linux/sem.h> | 71 | #include <linux/sem.h> |
| 72 | #include <linux/signal.h> | 72 | #include <linux/signal.h> |
| 73 | #include <linux/path.h> | ||
| 74 | #include <linux/compiler.h> | 73 | #include <linux/compiler.h> |
| 75 | #include <linux/completion.h> | 74 | #include <linux/completion.h> |
| 76 | #include <linux/pid.h> | 75 | #include <linux/pid.h> |
| @@ -88,7 +87,6 @@ struct sched_param { | |||
| 88 | #include <linux/timer.h> | 87 | #include <linux/timer.h> |
| 89 | #include <linux/hrtimer.h> | 88 | #include <linux/hrtimer.h> |
| 90 | #include <linux/task_io_accounting.h> | 89 | #include <linux/task_io_accounting.h> |
| 91 | #include <linux/kobject.h> | ||
| 92 | #include <linux/latencytop.h> | 90 | #include <linux/latencytop.h> |
| 93 | #include <linux/cred.h> | 91 | #include <linux/cred.h> |
| 94 | 92 | ||
| @@ -2511,7 +2509,7 @@ extern void normalize_rt_tasks(void); | |||
| 2511 | 2509 | ||
| 2512 | #ifdef CONFIG_CGROUP_SCHED | 2510 | #ifdef CONFIG_CGROUP_SCHED |
| 2513 | 2511 | ||
| 2514 | extern struct task_group init_task_group; | 2512 | extern struct task_group root_task_group; |
| 2515 | 2513 | ||
| 2516 | extern struct task_group *sched_create_group(struct task_group *parent); | 2514 | extern struct task_group *sched_create_group(struct task_group *parent); |
| 2517 | extern void sched_destroy_group(struct task_group *tg); | 2515 | extern void sched_destroy_group(struct task_group *tg); |
diff --git a/include/linux/security.h b/include/linux/security.h index 1ac42475ea08..c642bb8b8f5a 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
| @@ -1058,8 +1058,7 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
| 1058 | * @cred points to the credentials to provide the context against which to | 1058 | * @cred points to the credentials to provide the context against which to |
| 1059 | * evaluate the security data on the key. | 1059 | * evaluate the security data on the key. |
| 1060 | * @perm describes the combination of permissions required of this key. | 1060 | * @perm describes the combination of permissions required of this key. |
| 1061 | * Return 1 if permission granted, 0 if permission denied and -ve it the | 1061 | * Return 0 if permission is granted, -ve error otherwise. |
| 1062 | * normal permissions model should be effected. | ||
| 1063 | * @key_getsecurity: | 1062 | * @key_getsecurity: |
| 1064 | * Get a textual representation of the security context attached to a key | 1063 | * Get a textual representation of the security context attached to a key |
| 1065 | * for the purposes of honouring KEYCTL_GETSECURITY. This function | 1064 | * for the purposes of honouring KEYCTL_GETSECURITY. This function |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 212eb4c67797..a23fa29d4eb0 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
| @@ -95,7 +95,7 @@ | |||
| 95 | /* PPC CPM type number */ | 95 | /* PPC CPM type number */ |
| 96 | #define PORT_CPM 58 | 96 | #define PORT_CPM 58 |
| 97 | 97 | ||
| 98 | /* MPC52xx type numbers */ | 98 | /* MPC52xx (and MPC512x) type numbers */ |
| 99 | #define PORT_MPC52xx 59 | 99 | #define PORT_MPC52xx 59 |
| 100 | 100 | ||
| 101 | /* IBM icom */ | 101 | /* IBM icom */ |
| @@ -199,6 +199,9 @@ | |||
| 199 | /* TI OMAP-UART */ | 199 | /* TI OMAP-UART */ |
| 200 | #define PORT_OMAP 96 | 200 | #define PORT_OMAP 96 |
| 201 | 201 | ||
| 202 | /* VIA VT8500 SoC */ | ||
| 203 | #define PORT_VT8500 97 | ||
| 204 | |||
| 202 | #ifdef __KERNEL__ | 205 | #ifdef __KERNEL__ |
| 203 | 206 | ||
| 204 | #include <linux/compiler.h> | 207 | #include <linux/compiler.h> |
| @@ -311,6 +314,7 @@ struct uart_port { | |||
| 311 | #define UPIO_TSI (5) /* Tsi108/109 type IO */ | 314 | #define UPIO_TSI (5) /* Tsi108/109 type IO */ |
| 312 | #define UPIO_DWAPB (6) /* DesignWare APB UART */ | 315 | #define UPIO_DWAPB (6) /* DesignWare APB UART */ |
| 313 | #define UPIO_RM9000 (7) /* RM9000 type IO */ | 316 | #define UPIO_RM9000 (7) /* RM9000 type IO */ |
| 317 | #define UPIO_DWAPB32 (8) /* DesignWare APB UART (32 bit accesses) */ | ||
| 314 | 318 | ||
| 315 | unsigned int read_status_mask; /* driver specific */ | 319 | unsigned int read_status_mask; /* driver specific */ |
| 316 | unsigned int ignore_status_mask; /* driver specific */ | 320 | unsigned int ignore_status_mask; /* driver specific */ |
| @@ -361,6 +365,7 @@ struct uart_port { | |||
| 361 | struct device *dev; /* parent device */ | 365 | struct device *dev; /* parent device */ |
| 362 | unsigned char hub6; /* this should be in the 8250 driver */ | 366 | unsigned char hub6; /* this should be in the 8250 driver */ |
| 363 | unsigned char suspended; | 367 | unsigned char suspended; |
| 368 | unsigned char irq_wake; | ||
| 364 | unsigned char unused[2]; | 369 | unsigned char unused[2]; |
| 365 | void *private_data; /* generic platform data pointer */ | 370 | void *private_data; /* generic platform data pointer */ |
| 366 | }; | 371 | }; |
diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h index 791a502f6906..83203ae9390b 100644 --- a/include/linux/slab_def.h +++ b/include/linux/slab_def.h | |||
| @@ -138,11 +138,12 @@ void *kmem_cache_alloc(struct kmem_cache *, gfp_t); | |||
| 138 | void *__kmalloc(size_t size, gfp_t flags); | 138 | void *__kmalloc(size_t size, gfp_t flags); |
| 139 | 139 | ||
| 140 | #ifdef CONFIG_TRACING | 140 | #ifdef CONFIG_TRACING |
| 141 | extern void *kmem_cache_alloc_notrace(struct kmem_cache *cachep, gfp_t flags); | 141 | extern void *kmem_cache_alloc_trace(size_t size, |
| 142 | struct kmem_cache *cachep, gfp_t flags); | ||
| 142 | extern size_t slab_buffer_size(struct kmem_cache *cachep); | 143 | extern size_t slab_buffer_size(struct kmem_cache *cachep); |
| 143 | #else | 144 | #else |
| 144 | static __always_inline void * | 145 | static __always_inline void * |
| 145 | kmem_cache_alloc_notrace(struct kmem_cache *cachep, gfp_t flags) | 146 | kmem_cache_alloc_trace(size_t size, struct kmem_cache *cachep, gfp_t flags) |
| 146 | { | 147 | { |
| 147 | return kmem_cache_alloc(cachep, flags); | 148 | return kmem_cache_alloc(cachep, flags); |
| 148 | } | 149 | } |
| @@ -179,10 +180,7 @@ found: | |||
| 179 | #endif | 180 | #endif |
| 180 | cachep = malloc_sizes[i].cs_cachep; | 181 | cachep = malloc_sizes[i].cs_cachep; |
| 181 | 182 | ||
| 182 | ret = kmem_cache_alloc_notrace(cachep, flags); | 183 | ret = kmem_cache_alloc_trace(size, cachep, flags); |
| 183 | |||
| 184 | trace_kmalloc(_THIS_IP_, ret, | ||
| 185 | size, slab_buffer_size(cachep), flags); | ||
| 186 | 184 | ||
| 187 | return ret; | 185 | return ret; |
| 188 | } | 186 | } |
| @@ -194,14 +192,16 @@ extern void *__kmalloc_node(size_t size, gfp_t flags, int node); | |||
| 194 | extern void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node); | 192 | extern void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node); |
| 195 | 193 | ||
| 196 | #ifdef CONFIG_TRACING | 194 | #ifdef CONFIG_TRACING |
| 197 | extern void *kmem_cache_alloc_node_notrace(struct kmem_cache *cachep, | 195 | extern void *kmem_cache_alloc_node_trace(size_t size, |
| 198 | gfp_t flags, | 196 | struct kmem_cache *cachep, |
| 199 | int nodeid); | 197 | gfp_t flags, |
| 198 | int nodeid); | ||
| 200 | #else | 199 | #else |
| 201 | static __always_inline void * | 200 | static __always_inline void * |
| 202 | kmem_cache_alloc_node_notrace(struct kmem_cache *cachep, | 201 | kmem_cache_alloc_node_trace(size_t size, |
| 203 | gfp_t flags, | 202 | struct kmem_cache *cachep, |
| 204 | int nodeid) | 203 | gfp_t flags, |
| 204 | int nodeid) | ||
| 205 | { | 205 | { |
| 206 | return kmem_cache_alloc_node(cachep, flags, nodeid); | 206 | return kmem_cache_alloc_node(cachep, flags, nodeid); |
| 207 | } | 207 | } |
| @@ -210,7 +210,6 @@ kmem_cache_alloc_node_notrace(struct kmem_cache *cachep, | |||
| 210 | static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node) | 210 | static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node) |
| 211 | { | 211 | { |
| 212 | struct kmem_cache *cachep; | 212 | struct kmem_cache *cachep; |
| 213 | void *ret; | ||
| 214 | 213 | ||
| 215 | if (__builtin_constant_p(size)) { | 214 | if (__builtin_constant_p(size)) { |
| 216 | int i = 0; | 215 | int i = 0; |
| @@ -234,13 +233,7 @@ found: | |||
| 234 | #endif | 233 | #endif |
| 235 | cachep = malloc_sizes[i].cs_cachep; | 234 | cachep = malloc_sizes[i].cs_cachep; |
| 236 | 235 | ||
| 237 | ret = kmem_cache_alloc_node_notrace(cachep, flags, node); | 236 | return kmem_cache_alloc_node_trace(size, cachep, flags, node); |
| 238 | |||
| 239 | trace_kmalloc_node(_THIS_IP_, ret, | ||
| 240 | size, slab_buffer_size(cachep), | ||
| 241 | flags, node); | ||
| 242 | |||
| 243 | return ret; | ||
| 244 | } | 237 | } |
| 245 | return __kmalloc_node(size, flags, node); | 238 | return __kmalloc_node(size, flags, node); |
| 246 | } | 239 | } |
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index e4f5ed180b9b..8b6e8ae5d5ca 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h | |||
| @@ -10,9 +10,8 @@ | |||
| 10 | #include <linux/gfp.h> | 10 | #include <linux/gfp.h> |
| 11 | #include <linux/workqueue.h> | 11 | #include <linux/workqueue.h> |
| 12 | #include <linux/kobject.h> | 12 | #include <linux/kobject.h> |
| 13 | #include <linux/kmemleak.h> | ||
| 14 | 13 | ||
| 15 | #include <trace/events/kmem.h> | 14 | #include <linux/kmemleak.h> |
| 16 | 15 | ||
| 17 | enum stat_item { | 16 | enum stat_item { |
| 18 | ALLOC_FASTPATH, /* Allocation from cpu slab */ | 17 | ALLOC_FASTPATH, /* Allocation from cpu slab */ |
| @@ -216,31 +215,40 @@ static __always_inline struct kmem_cache *kmalloc_slab(size_t size) | |||
| 216 | void *kmem_cache_alloc(struct kmem_cache *, gfp_t); | 215 | void *kmem_cache_alloc(struct kmem_cache *, gfp_t); |
| 217 | void *__kmalloc(size_t size, gfp_t flags); | 216 | void *__kmalloc(size_t size, gfp_t flags); |
| 218 | 217 | ||
| 218 | static __always_inline void * | ||
| 219 | kmalloc_order(size_t size, gfp_t flags, unsigned int order) | ||
| 220 | { | ||
| 221 | void *ret = (void *) __get_free_pages(flags | __GFP_COMP, order); | ||
| 222 | kmemleak_alloc(ret, size, 1, flags); | ||
| 223 | return ret; | ||
| 224 | } | ||
| 225 | |||
| 219 | #ifdef CONFIG_TRACING | 226 | #ifdef CONFIG_TRACING |
| 220 | extern void *kmem_cache_alloc_notrace(struct kmem_cache *s, gfp_t gfpflags); | 227 | extern void * |
| 228 | kmem_cache_alloc_trace(struct kmem_cache *s, gfp_t gfpflags, size_t size); | ||
| 229 | extern void *kmalloc_order_trace(size_t size, gfp_t flags, unsigned int order); | ||
| 221 | #else | 230 | #else |
| 222 | static __always_inline void * | 231 | static __always_inline void * |
| 223 | kmem_cache_alloc_notrace(struct kmem_cache *s, gfp_t gfpflags) | 232 | kmem_cache_alloc_trace(struct kmem_cache *s, gfp_t gfpflags, size_t size) |
| 224 | { | 233 | { |
| 225 | return kmem_cache_alloc(s, gfpflags); | 234 | return kmem_cache_alloc(s, gfpflags); |
| 226 | } | 235 | } |
| 236 | |||
| 237 | static __always_inline void * | ||
| 238 | kmalloc_order_trace(size_t size, gfp_t flags, unsigned int order) | ||
| 239 | { | ||
| 240 | return kmalloc_order(size, flags, order); | ||
| 241 | } | ||
| 227 | #endif | 242 | #endif |
| 228 | 243 | ||
| 229 | static __always_inline void *kmalloc_large(size_t size, gfp_t flags) | 244 | static __always_inline void *kmalloc_large(size_t size, gfp_t flags) |
| 230 | { | 245 | { |
| 231 | unsigned int order = get_order(size); | 246 | unsigned int order = get_order(size); |
| 232 | void *ret = (void *) __get_free_pages(flags | __GFP_COMP, order); | 247 | return kmalloc_order_trace(size, flags, order); |
| 233 | |||
| 234 | kmemleak_alloc(ret, size, 1, flags); | ||
| 235 | trace_kmalloc(_THIS_IP_, ret, size, PAGE_SIZE << order, flags); | ||
| 236 | |||
| 237 | return ret; | ||
| 238 | } | 248 | } |
| 239 | 249 | ||
| 240 | static __always_inline void *kmalloc(size_t size, gfp_t flags) | 250 | static __always_inline void *kmalloc(size_t size, gfp_t flags) |
| 241 | { | 251 | { |
| 242 | void *ret; | ||
| 243 | |||
| 244 | if (__builtin_constant_p(size)) { | 252 | if (__builtin_constant_p(size)) { |
| 245 | if (size > SLUB_MAX_SIZE) | 253 | if (size > SLUB_MAX_SIZE) |
| 246 | return kmalloc_large(size, flags); | 254 | return kmalloc_large(size, flags); |
| @@ -251,11 +259,7 @@ static __always_inline void *kmalloc(size_t size, gfp_t flags) | |||
| 251 | if (!s) | 259 | if (!s) |
| 252 | return ZERO_SIZE_PTR; | 260 | return ZERO_SIZE_PTR; |
| 253 | 261 | ||
| 254 | ret = kmem_cache_alloc_notrace(s, flags); | 262 | return kmem_cache_alloc_trace(s, flags, size); |
| 255 | |||
| 256 | trace_kmalloc(_THIS_IP_, ret, size, s->size, flags); | ||
| 257 | |||
| 258 | return ret; | ||
| 259 | } | 263 | } |
| 260 | } | 264 | } |
| 261 | return __kmalloc(size, flags); | 265 | return __kmalloc(size, flags); |
| @@ -266,14 +270,14 @@ void *__kmalloc_node(size_t size, gfp_t flags, int node); | |||
| 266 | void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node); | 270 | void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node); |
| 267 | 271 | ||
| 268 | #ifdef CONFIG_TRACING | 272 | #ifdef CONFIG_TRACING |
| 269 | extern void *kmem_cache_alloc_node_notrace(struct kmem_cache *s, | 273 | extern void *kmem_cache_alloc_node_trace(struct kmem_cache *s, |
| 270 | gfp_t gfpflags, | 274 | gfp_t gfpflags, |
| 271 | int node); | 275 | int node, size_t size); |
| 272 | #else | 276 | #else |
| 273 | static __always_inline void * | 277 | static __always_inline void * |
| 274 | kmem_cache_alloc_node_notrace(struct kmem_cache *s, | 278 | kmem_cache_alloc_node_trace(struct kmem_cache *s, |
| 275 | gfp_t gfpflags, | 279 | gfp_t gfpflags, |
| 276 | int node) | 280 | int node, size_t size) |
| 277 | { | 281 | { |
| 278 | return kmem_cache_alloc_node(s, gfpflags, node); | 282 | return kmem_cache_alloc_node(s, gfpflags, node); |
| 279 | } | 283 | } |
| @@ -281,8 +285,6 @@ kmem_cache_alloc_node_notrace(struct kmem_cache *s, | |||
| 281 | 285 | ||
| 282 | static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node) | 286 | static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node) |
| 283 | { | 287 | { |
| 284 | void *ret; | ||
| 285 | |||
| 286 | if (__builtin_constant_p(size) && | 288 | if (__builtin_constant_p(size) && |
| 287 | size <= SLUB_MAX_SIZE && !(flags & SLUB_DMA)) { | 289 | size <= SLUB_MAX_SIZE && !(flags & SLUB_DMA)) { |
| 288 | struct kmem_cache *s = kmalloc_slab(size); | 290 | struct kmem_cache *s = kmalloc_slab(size); |
| @@ -290,12 +292,7 @@ static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node) | |||
| 290 | if (!s) | 292 | if (!s) |
| 291 | return ZERO_SIZE_PTR; | 293 | return ZERO_SIZE_PTR; |
| 292 | 294 | ||
| 293 | ret = kmem_cache_alloc_node_notrace(s, flags, node); | 295 | return kmem_cache_alloc_node_trace(s, flags, node, size); |
| 294 | |||
| 295 | trace_kmalloc_node(_THIS_IP_, ret, | ||
| 296 | size, s->size, flags, node); | ||
| 297 | |||
| 298 | return ret; | ||
| 299 | } | 296 | } |
| 300 | return __kmalloc_node(size, flags, node); | 297 | return __kmalloc_node(size, flags, node); |
| 301 | } | 298 | } |
diff --git a/include/linux/spi/dw_spi.h b/include/linux/spi/dw_spi.h index c91302f3a257..6cd10f6ad472 100644 --- a/include/linux/spi/dw_spi.h +++ b/include/linux/spi/dw_spi.h | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | #ifndef DW_SPI_HEADER_H | 1 | #ifndef DW_SPI_HEADER_H |
| 2 | #define DW_SPI_HEADER_H | 2 | #define DW_SPI_HEADER_H |
| 3 | |||
| 3 | #include <linux/io.h> | 4 | #include <linux/io.h> |
| 4 | 5 | ||
| 5 | /* Bit fields in CTRLR0 */ | 6 | /* Bit fields in CTRLR0 */ |
| @@ -82,6 +83,13 @@ struct dw_spi_reg { | |||
| 82 | though only low 16 bits matters */ | 83 | though only low 16 bits matters */ |
| 83 | } __packed; | 84 | } __packed; |
| 84 | 85 | ||
| 86 | struct dw_spi; | ||
| 87 | struct dw_spi_dma_ops { | ||
| 88 | int (*dma_init)(struct dw_spi *dws); | ||
| 89 | void (*dma_exit)(struct dw_spi *dws); | ||
| 90 | int (*dma_transfer)(struct dw_spi *dws, int cs_change); | ||
| 91 | }; | ||
| 92 | |||
| 85 | struct dw_spi { | 93 | struct dw_spi { |
| 86 | struct spi_master *master; | 94 | struct spi_master *master; |
| 87 | struct spi_device *cur_dev; | 95 | struct spi_device *cur_dev; |
| @@ -136,13 +144,15 @@ struct dw_spi { | |||
| 136 | /* Dma info */ | 144 | /* Dma info */ |
| 137 | int dma_inited; | 145 | int dma_inited; |
| 138 | struct dma_chan *txchan; | 146 | struct dma_chan *txchan; |
| 147 | struct scatterlist tx_sgl; | ||
| 139 | struct dma_chan *rxchan; | 148 | struct dma_chan *rxchan; |
| 140 | int txdma_done; | 149 | struct scatterlist rx_sgl; |
| 141 | int rxdma_done; | 150 | int dma_chan_done; |
| 142 | u64 tx_param; | ||
| 143 | u64 rx_param; | ||
| 144 | struct device *dma_dev; | 151 | struct device *dma_dev; |
| 145 | dma_addr_t dma_addr; | 152 | dma_addr_t dma_addr; /* phy address of the Data register */ |
| 153 | struct dw_spi_dma_ops *dma_ops; | ||
| 154 | void *dma_priv; /* platform relate info */ | ||
| 155 | struct pci_dev *dmac; | ||
| 146 | 156 | ||
| 147 | /* Bus interface info */ | 157 | /* Bus interface info */ |
| 148 | void *priv; | 158 | void *priv; |
| @@ -216,4 +226,8 @@ extern int dw_spi_add_host(struct dw_spi *dws); | |||
| 216 | extern void dw_spi_remove_host(struct dw_spi *dws); | 226 | extern void dw_spi_remove_host(struct dw_spi *dws); |
| 217 | extern int dw_spi_suspend_host(struct dw_spi *dws); | 227 | extern int dw_spi_suspend_host(struct dw_spi *dws); |
| 218 | extern int dw_spi_resume_host(struct dw_spi *dws); | 228 | extern int dw_spi_resume_host(struct dw_spi *dws); |
| 229 | extern void dw_spi_xfer_done(struct dw_spi *dws); | ||
| 230 | |||
| 231 | /* platform related setup */ | ||
| 232 | extern int dw_spi_mid_init(struct dw_spi *dws); /* Intel MID platforms */ | ||
| 219 | #endif /* DW_SPI_HEADER_H */ | 233 | #endif /* DW_SPI_HEADER_H */ |
diff --git a/include/linux/spi/ifx_modem.h b/include/linux/spi/ifx_modem.h new file mode 100644 index 000000000000..a68f3b19d112 --- /dev/null +++ b/include/linux/spi/ifx_modem.h | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | #ifndef LINUX_IFX_MODEM_H | ||
| 2 | #define LINUX_IFX_MODEM_H | ||
| 3 | |||
| 4 | struct ifx_modem_platform_data { | ||
| 5 | unsigned short rst_out; /* modem reset out */ | ||
| 6 | unsigned short pwr_on; /* power on */ | ||
| 7 | unsigned short rst_pmu; /* reset modem */ | ||
| 8 | unsigned short tx_pwr; /* modem power threshold */ | ||
| 9 | unsigned short srdy; /* SRDY */ | ||
| 10 | unsigned short mrdy; /* MRDY */ | ||
| 11 | unsigned short is_6160; /* Modem type */ | ||
| 12 | }; | ||
| 13 | |||
| 14 | #endif | ||
diff --git a/include/linux/spi/pxa2xx_spi.h b/include/linux/spi/pxa2xx_spi.h new file mode 100644 index 000000000000..d3e1075f7b60 --- /dev/null +++ b/include/linux/spi/pxa2xx_spi.h | |||
| @@ -0,0 +1,152 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005 Stephen Street / StreetFire Sound Labs | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation; either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program; if not, write to the Free Software | ||
| 16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 17 | */ | ||
| 18 | #ifndef __linux_pxa2xx_spi_h | ||
| 19 | #define __linux_pxa2xx_spi_h | ||
| 20 | |||
| 21 | #include <linux/pxa2xx_ssp.h> | ||
| 22 | |||
| 23 | #define PXA2XX_CS_ASSERT (0x01) | ||
| 24 | #define PXA2XX_CS_DEASSERT (0x02) | ||
| 25 | |||
| 26 | /* device.platform_data for SSP controller devices */ | ||
| 27 | struct pxa2xx_spi_master { | ||
| 28 | u32 clock_enable; | ||
| 29 | u16 num_chipselect; | ||
| 30 | u8 enable_dma; | ||
| 31 | }; | ||
| 32 | |||
| 33 | /* spi_board_info.controller_data for SPI slave devices, | ||
| 34 | * copied to spi_device.platform_data ... mostly for dma tuning | ||
| 35 | */ | ||
| 36 | struct pxa2xx_spi_chip { | ||
| 37 | u8 tx_threshold; | ||
| 38 | u8 rx_threshold; | ||
| 39 | u8 dma_burst_size; | ||
| 40 | u32 timeout; | ||
| 41 | u8 enable_loopback; | ||
| 42 | int gpio_cs; | ||
| 43 | void (*cs_control)(u32 command); | ||
| 44 | }; | ||
| 45 | |||
| 46 | #ifdef CONFIG_ARCH_PXA | ||
| 47 | |||
| 48 | #include <linux/clk.h> | ||
| 49 | #include <mach/dma.h> | ||
| 50 | |||
| 51 | extern void pxa2xx_set_spi_info(unsigned id, struct pxa2xx_spi_master *info); | ||
| 52 | |||
| 53 | #else | ||
| 54 | /* | ||
| 55 | * This is the implemtation for CE4100 on x86. ARM defines them in mach/ or | ||
| 56 | * plat/ include path. | ||
| 57 | * The CE4100 does not provide DMA support. This bits are here to let the driver | ||
| 58 | * compile and will never be used. Maybe we get DMA support at a later point in | ||
| 59 | * time. | ||
| 60 | */ | ||
| 61 | |||
| 62 | #define DCSR(n) (n) | ||
| 63 | #define DSADR(n) (n) | ||
| 64 | #define DTADR(n) (n) | ||
| 65 | #define DCMD(n) (n) | ||
| 66 | #define DRCMR(n) (n) | ||
| 67 | |||
| 68 | #define DCSR_RUN (1 << 31) /* Run Bit */ | ||
| 69 | #define DCSR_NODESC (1 << 30) /* No-Descriptor Fetch */ | ||
| 70 | #define DCSR_STOPIRQEN (1 << 29) /* Stop Interrupt Enable */ | ||
| 71 | #define DCSR_REQPEND (1 << 8) /* Request Pending (read-only) */ | ||
| 72 | #define DCSR_STOPSTATE (1 << 3) /* Stop State (read-only) */ | ||
| 73 | #define DCSR_ENDINTR (1 << 2) /* End Interrupt */ | ||
| 74 | #define DCSR_STARTINTR (1 << 1) /* Start Interrupt */ | ||
| 75 | #define DCSR_BUSERR (1 << 0) /* Bus Error Interrupt */ | ||
| 76 | |||
| 77 | #define DCSR_EORIRQEN (1 << 28) /* End of Receive Interrupt Enable */ | ||
| 78 | #define DCSR_EORJMPEN (1 << 27) /* Jump to next descriptor on EOR */ | ||
| 79 | #define DCSR_EORSTOPEN (1 << 26) /* STOP on an EOR */ | ||
| 80 | #define DCSR_SETCMPST (1 << 25) /* Set Descriptor Compare Status */ | ||
| 81 | #define DCSR_CLRCMPST (1 << 24) /* Clear Descriptor Compare Status */ | ||
| 82 | #define DCSR_CMPST (1 << 10) /* The Descriptor Compare Status */ | ||
| 83 | #define DCSR_EORINTR (1 << 9) /* The end of Receive */ | ||
| 84 | |||
| 85 | #define DRCMR_MAPVLD (1 << 7) /* Map Valid */ | ||
| 86 | #define DRCMR_CHLNUM 0x1f /* mask for Channel Number */ | ||
| 87 | |||
| 88 | #define DDADR_DESCADDR 0xfffffff0 /* Address of next descriptor */ | ||
| 89 | #define DDADR_STOP (1 << 0) /* Stop */ | ||
| 90 | |||
| 91 | #define DCMD_INCSRCADDR (1 << 31) /* Source Address Increment Setting. */ | ||
| 92 | #define DCMD_INCTRGADDR (1 << 30) /* Target Address Increment Setting. */ | ||
| 93 | #define DCMD_FLOWSRC (1 << 29) /* Flow Control by the source. */ | ||
| 94 | #define DCMD_FLOWTRG (1 << 28) /* Flow Control by the target. */ | ||
| 95 | #define DCMD_STARTIRQEN (1 << 22) /* Start Interrupt Enable */ | ||
| 96 | #define DCMD_ENDIRQEN (1 << 21) /* End Interrupt Enable */ | ||
| 97 | #define DCMD_ENDIAN (1 << 18) /* Device Endian-ness. */ | ||
| 98 | #define DCMD_BURST8 (1 << 16) /* 8 byte burst */ | ||
| 99 | #define DCMD_BURST16 (2 << 16) /* 16 byte burst */ | ||
| 100 | #define DCMD_BURST32 (3 << 16) /* 32 byte burst */ | ||
| 101 | #define DCMD_WIDTH1 (1 << 14) /* 1 byte width */ | ||
| 102 | #define DCMD_WIDTH2 (2 << 14) /* 2 byte width (HalfWord) */ | ||
| 103 | #define DCMD_WIDTH4 (3 << 14) /* 4 byte width (Word) */ | ||
| 104 | #define DCMD_LENGTH 0x01fff /* length mask (max = 8K - 1) */ | ||
| 105 | |||
| 106 | /* | ||
| 107 | * Descriptor structure for PXA's DMA engine | ||
| 108 | * Note: this structure must always be aligned to a 16-byte boundary. | ||
| 109 | */ | ||
| 110 | |||
| 111 | typedef enum { | ||
| 112 | DMA_PRIO_HIGH = 0, | ||
| 113 | DMA_PRIO_MEDIUM = 1, | ||
| 114 | DMA_PRIO_LOW = 2 | ||
| 115 | } pxa_dma_prio; | ||
| 116 | |||
| 117 | /* | ||
| 118 | * DMA registration | ||
| 119 | */ | ||
| 120 | |||
| 121 | static inline int pxa_request_dma(char *name, | ||
| 122 | pxa_dma_prio prio, | ||
| 123 | void (*irq_handler)(int, void *), | ||
| 124 | void *data) | ||
| 125 | { | ||
| 126 | return -ENODEV; | ||
| 127 | } | ||
| 128 | |||
| 129 | static inline void pxa_free_dma(int dma_ch) | ||
| 130 | { | ||
| 131 | } | ||
| 132 | |||
| 133 | /* | ||
| 134 | * The CE4100 does not have the clk framework implemented and SPI clock can | ||
| 135 | * not be switched on/off or the divider changed. | ||
| 136 | */ | ||
| 137 | static inline void clk_disable(struct clk *clk) | ||
| 138 | { | ||
| 139 | } | ||
| 140 | |||
| 141 | static inline int clk_enable(struct clk *clk) | ||
| 142 | { | ||
| 143 | return 0; | ||
| 144 | } | ||
| 145 | |||
| 146 | static inline unsigned long clk_get_rate(struct clk *clk) | ||
| 147 | { | ||
| 148 | return 3686400; | ||
| 149 | } | ||
| 150 | |||
| 151 | #endif | ||
| 152 | #endif | ||
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h index 6950c981882d..78aa104250b7 100644 --- a/include/linux/sunrpc/cache.h +++ b/include/linux/sunrpc/cache.h | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | #ifndef _LINUX_SUNRPC_CACHE_H_ | 13 | #ifndef _LINUX_SUNRPC_CACHE_H_ |
| 14 | #define _LINUX_SUNRPC_CACHE_H_ | 14 | #define _LINUX_SUNRPC_CACHE_H_ |
| 15 | 15 | ||
| 16 | #include <linux/kref.h> | ||
| 16 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
| 17 | #include <asm/atomic.h> | 18 | #include <asm/atomic.h> |
| 18 | #include <linux/proc_fs.h> | 19 | #include <linux/proc_fs.h> |
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 26697514c5ec..144b34be5c32 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
| @@ -292,7 +292,7 @@ extern int unregister_pm_notifier(struct notifier_block *nb); | |||
| 292 | /* drivers/base/power/wakeup.c */ | 292 | /* drivers/base/power/wakeup.c */ |
| 293 | extern bool events_check_enabled; | 293 | extern bool events_check_enabled; |
| 294 | 294 | ||
| 295 | extern bool pm_check_wakeup_events(void); | 295 | extern bool pm_wakeup_pending(void); |
| 296 | extern bool pm_get_wakeup_count(unsigned int *count); | 296 | extern bool pm_get_wakeup_count(unsigned int *count); |
| 297 | extern bool pm_save_wakeup_count(unsigned int count); | 297 | extern bool pm_save_wakeup_count(unsigned int count); |
| 298 | #else /* !CONFIG_PM_SLEEP */ | 298 | #else /* !CONFIG_PM_SLEEP */ |
| @@ -309,7 +309,7 @@ static inline int unregister_pm_notifier(struct notifier_block *nb) | |||
| 309 | 309 | ||
| 310 | #define pm_notifier(fn, pri) do { (void)(fn); } while (0) | 310 | #define pm_notifier(fn, pri) do { (void)(fn); } while (0) |
| 311 | 311 | ||
| 312 | static inline bool pm_check_wakeup_events(void) { return true; } | 312 | static inline bool pm_wakeup_pending(void) { return false; } |
| 313 | #endif /* !CONFIG_PM_SLEEP */ | 313 | #endif /* !CONFIG_PM_SLEEP */ |
| 314 | 314 | ||
| 315 | extern struct mutex pm_mutex; | 315 | extern struct mutex pm_mutex; |
diff --git a/include/linux/tpm.h b/include/linux/tpm.h index ac5d1c1285d9..fdc718abf83b 100644 --- a/include/linux/tpm.h +++ b/include/linux/tpm.h | |||
| @@ -31,6 +31,7 @@ | |||
| 31 | 31 | ||
| 32 | extern int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf); | 32 | extern int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf); |
| 33 | extern int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash); | 33 | extern int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash); |
| 34 | extern int tpm_send(u32 chip_num, void *cmd, size_t buflen); | ||
| 34 | #else | 35 | #else |
| 35 | static inline int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf) { | 36 | static inline int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf) { |
| 36 | return -ENODEV; | 37 | return -ENODEV; |
| @@ -38,5 +39,8 @@ static inline int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf) { | |||
| 38 | static inline int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash) { | 39 | static inline int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash) { |
| 39 | return -ENODEV; | 40 | return -ENODEV; |
| 40 | } | 41 | } |
| 42 | static inline int tpm_send(u32 chip_num, void *cmd, size_t buflen) { | ||
| 43 | return -ENODEV; | ||
| 44 | } | ||
| 41 | #endif | 45 | #endif |
| 42 | #endif | 46 | #endif |
diff --git a/include/linux/tpm_command.h b/include/linux/tpm_command.h new file mode 100644 index 000000000000..727512e249b5 --- /dev/null +++ b/include/linux/tpm_command.h | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | #ifndef __LINUX_TPM_COMMAND_H__ | ||
| 2 | #define __LINUX_TPM_COMMAND_H__ | ||
| 3 | |||
| 4 | /* | ||
| 5 | * TPM Command constants from specifications at | ||
| 6 | * http://www.trustedcomputinggroup.org | ||
| 7 | */ | ||
| 8 | |||
| 9 | /* Command TAGS */ | ||
| 10 | #define TPM_TAG_RQU_COMMAND 193 | ||
| 11 | #define TPM_TAG_RQU_AUTH1_COMMAND 194 | ||
| 12 | #define TPM_TAG_RQU_AUTH2_COMMAND 195 | ||
| 13 | #define TPM_TAG_RSP_COMMAND 196 | ||
| 14 | #define TPM_TAG_RSP_AUTH1_COMMAND 197 | ||
| 15 | #define TPM_TAG_RSP_AUTH2_COMMAND 198 | ||
| 16 | |||
| 17 | /* Command Ordinals */ | ||
| 18 | #define TPM_ORD_GETRANDOM 70 | ||
| 19 | #define TPM_ORD_OSAP 11 | ||
| 20 | #define TPM_ORD_OIAP 10 | ||
| 21 | #define TPM_ORD_SEAL 23 | ||
| 22 | #define TPM_ORD_UNSEAL 24 | ||
| 23 | |||
| 24 | /* Other constants */ | ||
| 25 | #define SRKHANDLE 0x40000000 | ||
| 26 | #define TPM_NONCE_SIZE 20 | ||
| 27 | |||
| 28 | #endif | ||
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h index db2d227694da..c3d43eb4150c 100644 --- a/include/linux/tty_driver.h +++ b/include/linux/tty_driver.h | |||
| @@ -102,7 +102,7 @@ | |||
| 102 | * unsigned int cmd, unsigned long arg); | 102 | * unsigned int cmd, unsigned long arg); |
| 103 | * | 103 | * |
| 104 | * This routine allows the tty driver to implement | 104 | * This routine allows the tty driver to implement |
| 105 | * device-specific ioctl's. If the ioctl number passed in cmd | 105 | * device-specific ioctls. If the ioctl number passed in cmd |
| 106 | * is not recognized by the driver, it should return ENOIOCTLCMD. | 106 | * is not recognized by the driver, it should return ENOIOCTLCMD. |
| 107 | * | 107 | * |
| 108 | * Optional | 108 | * Optional |
| @@ -167,12 +167,12 @@ | |||
| 167 | * | 167 | * |
| 168 | * void (*hangup)(struct tty_struct *tty); | 168 | * void (*hangup)(struct tty_struct *tty); |
| 169 | * | 169 | * |
| 170 | * This routine notifies the tty driver that it should hangup the | 170 | * This routine notifies the tty driver that it should hang up the |
| 171 | * tty device. | 171 | * tty device. |
| 172 | * | 172 | * |
| 173 | * Optional: | 173 | * Optional: |
| 174 | * | 174 | * |
| 175 | * int (*break_ctl)(struct tty_stuct *tty, int state); | 175 | * int (*break_ctl)(struct tty_struct *tty, int state); |
| 176 | * | 176 | * |
| 177 | * This optional routine requests the tty driver to turn on or | 177 | * This optional routine requests the tty driver to turn on or |
| 178 | * off BREAK status on the RS-232 port. If state is -1, | 178 | * off BREAK status on the RS-232 port. If state is -1, |
| @@ -235,6 +235,7 @@ | |||
| 235 | #include <linux/fs.h> | 235 | #include <linux/fs.h> |
| 236 | #include <linux/list.h> | 236 | #include <linux/list.h> |
| 237 | #include <linux/cdev.h> | 237 | #include <linux/cdev.h> |
| 238 | #include <linux/termios.h> | ||
| 238 | 239 | ||
| 239 | struct tty_struct; | 240 | struct tty_struct; |
| 240 | struct tty_driver; | 241 | struct tty_driver; |
| @@ -357,7 +358,7 @@ static inline struct tty_driver *tty_driver_kref_get(struct tty_driver *d) | |||
| 357 | * overruns, either.) | 358 | * overruns, either.) |
| 358 | * | 359 | * |
| 359 | * TTY_DRIVER_DYNAMIC_DEV --- if set, the individual tty devices need | 360 | * TTY_DRIVER_DYNAMIC_DEV --- if set, the individual tty devices need |
| 360 | * to be registered with a call to tty_register_driver() when the | 361 | * to be registered with a call to tty_register_device() when the |
| 361 | * device is found in the system and unregistered with a call to | 362 | * device is found in the system and unregistered with a call to |
| 362 | * tty_unregister_device() so the devices will be show up | 363 | * tty_unregister_device() so the devices will be show up |
| 363 | * properly in sysfs. If not set, driver->num entries will be | 364 | * properly in sysfs. If not set, driver->num entries will be |
diff --git a/include/linux/uinput.h b/include/linux/uinput.h index 05f7fed2b173..d28c726ede4f 100644 --- a/include/linux/uinput.h +++ b/include/linux/uinput.h | |||
| @@ -104,6 +104,7 @@ struct uinput_ff_erase { | |||
| 104 | #define UI_SET_FFBIT _IOW(UINPUT_IOCTL_BASE, 107, int) | 104 | #define UI_SET_FFBIT _IOW(UINPUT_IOCTL_BASE, 107, int) |
| 105 | #define UI_SET_PHYS _IOW(UINPUT_IOCTL_BASE, 108, char*) | 105 | #define UI_SET_PHYS _IOW(UINPUT_IOCTL_BASE, 108, char*) |
| 106 | #define UI_SET_SWBIT _IOW(UINPUT_IOCTL_BASE, 109, int) | 106 | #define UI_SET_SWBIT _IOW(UINPUT_IOCTL_BASE, 109, int) |
| 107 | #define UI_SET_PROPBIT _IOW(UINPUT_IOCTL_BASE, 110, int) | ||
| 107 | 108 | ||
| 108 | #define UI_BEGIN_FF_UPLOAD _IOWR(UINPUT_IOCTL_BASE, 200, struct uinput_ff_upload) | 109 | #define UI_BEGIN_FF_UPLOAD _IOWR(UINPUT_IOCTL_BASE, 200, struct uinput_ff_upload) |
| 109 | #define UI_END_FF_UPLOAD _IOW(UINPUT_IOCTL_BASE, 201, struct uinput_ff_upload) | 110 | #define UI_END_FF_UPLOAD _IOW(UINPUT_IOCTL_BASE, 201, struct uinput_ff_upload) |
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index bd257fee6031..1ac11586a2f5 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
| @@ -409,7 +409,7 @@ static inline bool __cancel_delayed_work(struct delayed_work *work) | |||
| 409 | } | 409 | } |
| 410 | 410 | ||
| 411 | /* Obsolete. use cancel_delayed_work_sync() */ | 411 | /* Obsolete. use cancel_delayed_work_sync() */ |
| 412 | static inline | 412 | static inline __deprecated |
| 413 | void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq, | 413 | void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq, |
| 414 | struct delayed_work *work) | 414 | struct delayed_work *work) |
| 415 | { | 415 | { |
| @@ -417,7 +417,7 @@ void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq, | |||
| 417 | } | 417 | } |
| 418 | 418 | ||
| 419 | /* Obsolete. use cancel_delayed_work_sync() */ | 419 | /* Obsolete. use cancel_delayed_work_sync() */ |
| 420 | static inline | 420 | static inline __deprecated |
| 421 | void cancel_rearming_delayed_work(struct delayed_work *work) | 421 | void cancel_rearming_delayed_work(struct delayed_work *work) |
| 422 | { | 422 | { |
| 423 | cancel_delayed_work_sync(work); | 423 | cancel_delayed_work_sync(work); |
diff --git a/include/linux/xattr.h b/include/linux/xattr.h index f1e5bde4b35a..e6131ef98d8f 100644 --- a/include/linux/xattr.h +++ b/include/linux/xattr.h | |||
| @@ -40,9 +40,13 @@ | |||
| 40 | #define XATTR_SMACK_SUFFIX "SMACK64" | 40 | #define XATTR_SMACK_SUFFIX "SMACK64" |
| 41 | #define XATTR_SMACK_IPIN "SMACK64IPIN" | 41 | #define XATTR_SMACK_IPIN "SMACK64IPIN" |
| 42 | #define XATTR_SMACK_IPOUT "SMACK64IPOUT" | 42 | #define XATTR_SMACK_IPOUT "SMACK64IPOUT" |
| 43 | #define XATTR_SMACK_EXEC "SMACK64EXEC" | ||
| 44 | #define XATTR_SMACK_TRANSMUTE "SMACK64TRANSMUTE" | ||
| 43 | #define XATTR_NAME_SMACK XATTR_SECURITY_PREFIX XATTR_SMACK_SUFFIX | 45 | #define XATTR_NAME_SMACK XATTR_SECURITY_PREFIX XATTR_SMACK_SUFFIX |
| 44 | #define XATTR_NAME_SMACKIPIN XATTR_SECURITY_PREFIX XATTR_SMACK_IPIN | 46 | #define XATTR_NAME_SMACKIPIN XATTR_SECURITY_PREFIX XATTR_SMACK_IPIN |
| 45 | #define XATTR_NAME_SMACKIPOUT XATTR_SECURITY_PREFIX XATTR_SMACK_IPOUT | 47 | #define XATTR_NAME_SMACKIPOUT XATTR_SECURITY_PREFIX XATTR_SMACK_IPOUT |
| 48 | #define XATTR_NAME_SMACKEXEC XATTR_SECURITY_PREFIX XATTR_SMACK_EXEC | ||
| 49 | #define XATTR_NAME_SMACKTRANSMUTE XATTR_SECURITY_PREFIX XATTR_SMACK_TRANSMUTE | ||
| 46 | 50 | ||
| 47 | #define XATTR_CAPS_SUFFIX "capability" | 51 | #define XATTR_CAPS_SUFFIX "capability" |
| 48 | #define XATTR_NAME_CAPS XATTR_SECURITY_PREFIX XATTR_CAPS_SUFFIX | 52 | #define XATTR_NAME_CAPS XATTR_SECURITY_PREFIX XATTR_CAPS_SUFFIX |
