diff options
Diffstat (limited to 'include/linux')
153 files changed, 1771 insertions, 656 deletions
diff --git a/include/linux/acct.h b/include/linux/acct.h index 882dc7248766..3e4737fa6cce 100644 --- a/include/linux/acct.h +++ b/include/linux/acct.h | |||
| @@ -121,16 +121,15 @@ struct vfsmount; | |||
| 121 | struct super_block; | 121 | struct super_block; |
| 122 | struct pacct_struct; | 122 | struct pacct_struct; |
| 123 | struct pid_namespace; | 123 | struct pid_namespace; |
| 124 | extern int acct_parm[]; /* for sysctl */ | ||
| 124 | extern void acct_auto_close_mnt(struct vfsmount *m); | 125 | extern void acct_auto_close_mnt(struct vfsmount *m); |
| 125 | extern void acct_auto_close(struct super_block *sb); | 126 | extern void acct_auto_close(struct super_block *sb); |
| 126 | extern void acct_init_pacct(struct pacct_struct *pacct); | ||
| 127 | extern void acct_collect(long exitcode, int group_dead); | 127 | extern void acct_collect(long exitcode, int group_dead); |
| 128 | extern void acct_process(void); | 128 | extern void acct_process(void); |
| 129 | extern void acct_exit_ns(struct pid_namespace *); | 129 | extern void acct_exit_ns(struct pid_namespace *); |
| 130 | #else | 130 | #else |
| 131 | #define acct_auto_close_mnt(x) do { } while (0) | 131 | #define acct_auto_close_mnt(x) do { } while (0) |
| 132 | #define acct_auto_close(x) do { } while (0) | 132 | #define acct_auto_close(x) do { } while (0) |
| 133 | #define acct_init_pacct(x) do { } while (0) | ||
| 134 | #define acct_collect(x,y) do { } while (0) | 133 | #define acct_collect(x,y) do { } while (0) |
| 135 | #define acct_process() do { } while (0) | 134 | #define acct_process() do { } while (0) |
| 136 | #define acct_exit_ns(ns) do { } while (0) | 135 | #define acct_exit_ns(ns) do { } while (0) |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index b926afe8c03e..3da73f5f0ae9 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
| @@ -116,11 +116,12 @@ extern unsigned long acpi_realmode_flags; | |||
| 116 | 116 | ||
| 117 | int acpi_register_gsi (struct device *dev, u32 gsi, int triggering, int polarity); | 117 | int acpi_register_gsi (struct device *dev, u32 gsi, int triggering, int polarity); |
| 118 | int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); | 118 | int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); |
| 119 | int acpi_isa_irq_to_gsi (unsigned isa_irq, u32 *gsi); | ||
| 119 | 120 | ||
| 120 | #ifdef CONFIG_X86_IO_APIC | 121 | #ifdef CONFIG_X86_IO_APIC |
| 121 | extern int acpi_get_override_irq(int bus_irq, int *trigger, int *polarity); | 122 | extern int acpi_get_override_irq(u32 gsi, int *trigger, int *polarity); |
| 122 | #else | 123 | #else |
| 123 | #define acpi_get_override_irq(bus, trigger, polarity) (-1) | 124 | #define acpi_get_override_irq(gsi, trigger, polarity) (-1) |
| 124 | #endif | 125 | #endif |
| 125 | /* | 126 | /* |
| 126 | * This function undoes the effect of one call to acpi_register_gsi(). | 127 | * This function undoes the effect of one call to acpi_register_gsi(). |
diff --git a/include/linux/amba/bus.h b/include/linux/amba/bus.h index 6816be6c3f77..8b1038607831 100644 --- a/include/linux/amba/bus.h +++ b/include/linux/amba/bus.h | |||
| @@ -14,6 +14,9 @@ | |||
| 14 | #ifndef ASMARM_AMBA_H | 14 | #ifndef ASMARM_AMBA_H |
| 15 | #define ASMARM_AMBA_H | 15 | #define ASMARM_AMBA_H |
| 16 | 16 | ||
| 17 | #include <linux/device.h> | ||
| 18 | #include <linux/resource.h> | ||
| 19 | |||
| 17 | #define AMBA_NR_IRQS 2 | 20 | #define AMBA_NR_IRQS 2 |
| 18 | 21 | ||
| 19 | struct amba_device { | 22 | struct amba_device { |
diff --git a/include/linux/amba/clcd.h b/include/linux/amba/clcd.h index 29c0448265cf..ca16c3801a1e 100644 --- a/include/linux/amba/clcd.h +++ b/include/linux/amba/clcd.h | |||
| @@ -21,22 +21,21 @@ | |||
| 21 | #define CLCD_UBAS 0x00000010 | 21 | #define CLCD_UBAS 0x00000010 |
| 22 | #define CLCD_LBAS 0x00000014 | 22 | #define CLCD_LBAS 0x00000014 |
| 23 | 23 | ||
| 24 | #if !defined(CONFIG_ARCH_VERSATILE) && !defined(CONFIG_ARCH_REALVIEW) | 24 | #define CLCD_PL110_IENB 0x00000018 |
| 25 | #define CLCD_IENB 0x00000018 | 25 | #define CLCD_PL110_CNTL 0x0000001c |
| 26 | #define CLCD_CNTL 0x0000001c | 26 | #define CLCD_PL110_STAT 0x00000020 |
| 27 | #else | 27 | #define CLCD_PL110_INTR 0x00000024 |
| 28 | /* | 28 | #define CLCD_PL110_UCUR 0x00000028 |
| 29 | * Someone rearranged these two registers on the Versatile | 29 | #define CLCD_PL110_LCUR 0x0000002C |
| 30 | * platform... | 30 | |
| 31 | */ | 31 | #define CLCD_PL111_CNTL 0x00000018 |
| 32 | #define CLCD_IENB 0x0000001c | 32 | #define CLCD_PL111_IENB 0x0000001c |
| 33 | #define CLCD_CNTL 0x00000018 | 33 | #define CLCD_PL111_RIS 0x00000020 |
| 34 | #endif | 34 | #define CLCD_PL111_MIS 0x00000024 |
| 35 | 35 | #define CLCD_PL111_ICR 0x00000028 | |
| 36 | #define CLCD_STAT 0x00000020 | 36 | #define CLCD_PL111_UCUR 0x0000002c |
| 37 | #define CLCD_INTR 0x00000024 | 37 | #define CLCD_PL111_LCUR 0x00000030 |
| 38 | #define CLCD_UCUR 0x00000028 | 38 | |
| 39 | #define CLCD_LCUR 0x0000002C | ||
| 40 | #define CLCD_PALL 0x00000200 | 39 | #define CLCD_PALL 0x00000200 |
| 41 | #define CLCD_PALETTE 0x00000200 | 40 | #define CLCD_PALETTE 0x00000200 |
| 42 | 41 | ||
| @@ -147,6 +146,8 @@ struct clcd_fb { | |||
| 147 | struct clcd_board *board; | 146 | struct clcd_board *board; |
| 148 | void *board_data; | 147 | void *board_data; |
| 149 | void __iomem *regs; | 148 | void __iomem *regs; |
| 149 | u16 off_ienb; | ||
| 150 | u16 off_cntl; | ||
| 150 | u32 clcd_cntl; | 151 | u32 clcd_cntl; |
| 151 | u32 cmap[16]; | 152 | u32 cmap[16]; |
| 152 | }; | 153 | }; |
diff --git a/include/linux/amba/mmci.h b/include/linux/amba/mmci.h index 6b4241748dda..7e466fe72025 100644 --- a/include/linux/amba/mmci.h +++ b/include/linux/amba/mmci.h | |||
| @@ -6,8 +6,29 @@ | |||
| 6 | 6 | ||
| 7 | #include <linux/mmc/host.h> | 7 | #include <linux/mmc/host.h> |
| 8 | 8 | ||
| 9 | /** | ||
| 10 | * struct mmci_platform_data - platform configuration for the MMCI | ||
| 11 | * (also known as PL180) block. | ||
| 12 | * @f_max: the maximum operational frequency for this host in this | ||
| 13 | * platform configuration. When this is specified it takes precedence | ||
| 14 | * over the module parameter for the same frequency. | ||
| 15 | * @ocr_mask: available voltages on the 4 pins from the block, this | ||
| 16 | * is ignored if a regulator is used, see the MMC_VDD_* masks in | ||
| 17 | * mmc/host.h | ||
| 18 | * @translate_vdd: a callback function to translate a MMC_VDD_* | ||
| 19 | * mask into a value to be binary or:ed and written into the | ||
| 20 | * MMCIPWR register of the block | ||
| 21 | * @status: if no GPIO read function was given to the block in | ||
| 22 | * gpio_wp (below) this function will be called to determine | ||
| 23 | * whether a card is present in the MMC slot or not | ||
| 24 | * @gpio_wp: read this GPIO pin to see if the card is write protected | ||
| 25 | * @gpio_cd: read this GPIO pin to detect card insertion | ||
| 26 | * @capabilities: the capabilities of the block as implemented in | ||
| 27 | * this platform, signify anything MMC_CAP_* from mmc/host.h | ||
| 28 | */ | ||
| 9 | struct mmci_platform_data { | 29 | struct mmci_platform_data { |
| 10 | unsigned int ocr_mask; /* available voltages */ | 30 | unsigned int f_max; |
| 31 | unsigned int ocr_mask; | ||
| 11 | u32 (*translate_vdd)(struct device *, unsigned int); | 32 | u32 (*translate_vdd)(struct device *, unsigned int); |
| 12 | unsigned int (*status)(struct device *); | 33 | unsigned int (*status)(struct device *); |
| 13 | int gpio_wp; | 34 | int gpio_wp; |
diff --git a/include/linux/amba/pl061.h b/include/linux/amba/pl061.h index b4fbd9862606..5ddd9ad4b19c 100644 --- a/include/linux/amba/pl061.h +++ b/include/linux/amba/pl061.h | |||
| @@ -1,3 +1,5 @@ | |||
| 1 | #include <linux/types.h> | ||
| 2 | |||
| 1 | /* platform data for the PL061 GPIO driver */ | 3 | /* platform data for the PL061 GPIO driver */ |
| 2 | 4 | ||
| 3 | struct pl061_platform_data { | 5 | struct pl061_platform_data { |
diff --git a/include/linux/ata.h b/include/linux/ata.h index b4c85e2adef5..700c5b9b3583 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
| @@ -1025,8 +1025,8 @@ static inline int ata_ok(u8 status) | |||
| 1025 | 1025 | ||
| 1026 | static inline int lba_28_ok(u64 block, u32 n_block) | 1026 | static inline int lba_28_ok(u64 block, u32 n_block) |
| 1027 | { | 1027 | { |
| 1028 | /* check the ending block number */ | 1028 | /* check the ending block number: must be LESS THAN 0x0fffffff */ |
| 1029 | return ((block + n_block) < ((u64)1 << 28)) && (n_block <= 256); | 1029 | return ((block + n_block) < ((1 << 28) - 1)) && (n_block <= 256); |
| 1030 | } | 1030 | } |
| 1031 | 1031 | ||
| 1032 | static inline int lba_48_ok(u64 block, u32 n_block) | 1032 | static inline int lba_48_ok(u64 block, u32 n_block) |
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index fcbc26af00e4..bd0e3c6f323f 100644 --- a/include/linux/backing-dev.h +++ b/include/linux/backing-dev.h | |||
| @@ -101,6 +101,7 @@ int bdi_register(struct backing_dev_info *bdi, struct device *parent, | |||
| 101 | const char *fmt, ...); | 101 | const char *fmt, ...); |
| 102 | int bdi_register_dev(struct backing_dev_info *bdi, dev_t dev); | 102 | int bdi_register_dev(struct backing_dev_info *bdi, dev_t dev); |
| 103 | void bdi_unregister(struct backing_dev_info *bdi); | 103 | void bdi_unregister(struct backing_dev_info *bdi); |
| 104 | int bdi_setup_and_register(struct backing_dev_info *, char *, unsigned int); | ||
| 104 | void bdi_start_writeback(struct backing_dev_info *bdi, struct super_block *sb, | 105 | void bdi_start_writeback(struct backing_dev_info *bdi, struct super_block *sb, |
| 105 | long nr_pages); | 106 | long nr_pages); |
| 106 | int bdi_writeback_task(struct bdi_writeback *wb); | 107 | int bdi_writeback_task(struct bdi_writeback *wb); |
| @@ -246,6 +247,7 @@ int bdi_set_max_ratio(struct backing_dev_info *bdi, unsigned int max_ratio); | |||
| 246 | #endif | 247 | #endif |
| 247 | 248 | ||
| 248 | extern struct backing_dev_info default_backing_dev_info; | 249 | extern struct backing_dev_info default_backing_dev_info; |
| 250 | extern struct backing_dev_info noop_backing_dev_info; | ||
| 249 | void default_unplug_io_fn(struct backing_dev_info *bdi, struct page *page); | 251 | void default_unplug_io_fn(struct backing_dev_info *bdi, struct page *page); |
| 250 | 252 | ||
| 251 | int writeback_in_progress(struct backing_dev_info *bdi); | 253 | int writeback_in_progress(struct backing_dev_info *bdi); |
diff --git a/include/linux/backlight.h b/include/linux/backlight.h index 8c4f884db6b4..4a3d52e545e1 100644 --- a/include/linux/backlight.h +++ b/include/linux/backlight.h | |||
| @@ -36,18 +36,18 @@ struct backlight_device; | |||
| 36 | struct fb_info; | 36 | struct fb_info; |
| 37 | 37 | ||
| 38 | struct backlight_ops { | 38 | struct backlight_ops { |
| 39 | const unsigned int options; | 39 | unsigned int options; |
| 40 | 40 | ||
| 41 | #define BL_CORE_SUSPENDRESUME (1 << 0) | 41 | #define BL_CORE_SUSPENDRESUME (1 << 0) |
| 42 | 42 | ||
| 43 | /* Notify the backlight driver some property has changed */ | 43 | /* Notify the backlight driver some property has changed */ |
| 44 | int (* const update_status)(struct backlight_device *); | 44 | int (*update_status)(struct backlight_device *); |
| 45 | /* Return the current backlight brightness (accounting for power, | 45 | /* Return the current backlight brightness (accounting for power, |
| 46 | fb_blank etc.) */ | 46 | fb_blank etc.) */ |
| 47 | int (* const get_brightness)(struct backlight_device *); | 47 | int (*get_brightness)(struct backlight_device *); |
| 48 | /* Check if given framebuffer device is the one bound to this backlight; | 48 | /* Check if given framebuffer device is the one bound to this backlight; |
| 49 | return 0 if not, !=0 if it is. If NULL, backlight always matches the fb. */ | 49 | return 0 if not, !=0 if it is. If NULL, backlight always matches the fb. */ |
| 50 | int (* const check_fb)(struct fb_info *); | 50 | int (*check_fb)(struct backlight_device *, struct fb_info *); |
| 51 | }; | 51 | }; |
| 52 | 52 | ||
| 53 | /* This structure defines all the properties of a backlight */ | 53 | /* This structure defines all the properties of a backlight */ |
| @@ -103,7 +103,8 @@ static inline void backlight_update_status(struct backlight_device *bd) | |||
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | extern struct backlight_device *backlight_device_register(const char *name, | 105 | extern struct backlight_device *backlight_device_register(const char *name, |
| 106 | struct device *dev, void *devdata, const struct backlight_ops *ops); | 106 | struct device *dev, void *devdata, const struct backlight_ops *ops, |
| 107 | const struct backlight_properties *props); | ||
| 107 | extern void backlight_device_unregister(struct backlight_device *bd); | 108 | extern void backlight_device_unregister(struct backlight_device *bd); |
| 108 | extern void backlight_force_update(struct backlight_device *bd, | 109 | extern void backlight_force_update(struct backlight_device *bd, |
| 109 | enum backlight_update_reason reason); | 110 | enum backlight_update_reason reason); |
diff --git a/include/linux/bitops.h b/include/linux/bitops.h index b79389879238..fc68053378ce 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h | |||
| @@ -10,6 +10,11 @@ | |||
| 10 | #define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long)) | 10 | #define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long)) |
| 11 | #endif | 11 | #endif |
| 12 | 12 | ||
| 13 | extern unsigned int __sw_hweight8(unsigned int w); | ||
| 14 | extern unsigned int __sw_hweight16(unsigned int w); | ||
| 15 | extern unsigned int __sw_hweight32(unsigned int w); | ||
| 16 | extern unsigned long __sw_hweight64(__u64 w); | ||
| 17 | |||
| 13 | /* | 18 | /* |
| 14 | * Include this here because some architectures need generic_ffs/fls in | 19 | * Include this here because some architectures need generic_ffs/fls in |
| 15 | * scope | 20 | * scope |
| @@ -21,9 +26,6 @@ | |||
| 21 | (bit) < (size); \ | 26 | (bit) < (size); \ |
| 22 | (bit) = find_next_bit((addr), (size), (bit) + 1)) | 27 | (bit) = find_next_bit((addr), (size), (bit) + 1)) |
| 23 | 28 | ||
| 24 | /* Temporary */ | ||
| 25 | #define for_each_bit(bit, addr, size) for_each_set_bit(bit, addr, size) | ||
| 26 | |||
| 27 | static __inline__ int get_bitmask_order(unsigned int count) | 29 | static __inline__ int get_bitmask_order(unsigned int count) |
| 28 | { | 30 | { |
| 29 | int order; | 31 | int order; |
| @@ -47,31 +49,6 @@ static inline unsigned long hweight_long(unsigned long w) | |||
| 47 | return sizeof(w) == 4 ? hweight32(w) : hweight64(w); | 49 | return sizeof(w) == 4 ? hweight32(w) : hweight64(w); |
| 48 | } | 50 | } |
| 49 | 51 | ||
| 50 | /* | ||
| 51 | * Clearly slow versions of the hweightN() functions, their benefit is | ||
| 52 | * of course compile time evaluation of constant arguments. | ||
| 53 | */ | ||
| 54 | #define HWEIGHT8(w) \ | ||
| 55 | ( BUILD_BUG_ON_ZERO(!__builtin_constant_p(w)) + \ | ||
| 56 | (!!((w) & (1ULL << 0))) + \ | ||
| 57 | (!!((w) & (1ULL << 1))) + \ | ||
| 58 | (!!((w) & (1ULL << 2))) + \ | ||
| 59 | (!!((w) & (1ULL << 3))) + \ | ||
| 60 | (!!((w) & (1ULL << 4))) + \ | ||
| 61 | (!!((w) & (1ULL << 5))) + \ | ||
| 62 | (!!((w) & (1ULL << 6))) + \ | ||
| 63 | (!!((w) & (1ULL << 7))) ) | ||
| 64 | |||
| 65 | #define HWEIGHT16(w) (HWEIGHT8(w) + HWEIGHT8((w) >> 8)) | ||
| 66 | #define HWEIGHT32(w) (HWEIGHT16(w) + HWEIGHT16((w) >> 16)) | ||
| 67 | #define HWEIGHT64(w) (HWEIGHT32(w) + HWEIGHT32((w) >> 32)) | ||
| 68 | |||
| 69 | /* | ||
| 70 | * Type invariant version that simply casts things to the | ||
| 71 | * largest type. | ||
| 72 | */ | ||
| 73 | #define HWEIGHT(w) HWEIGHT64((u64)(w)) | ||
| 74 | |||
| 75 | /** | 52 | /** |
| 76 | * rol32 - rotate a 32-bit value left | 53 | * rol32 - rotate a 32-bit value left |
| 77 | * @word: value to rotate | 54 | * @word: value to rotate |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index ebd22dbed861..6690e8bae7bb 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -158,7 +158,6 @@ enum rq_flag_bits { | |||
| 158 | struct request { | 158 | struct request { |
| 159 | struct list_head queuelist; | 159 | struct list_head queuelist; |
| 160 | struct call_single_data csd; | 160 | struct call_single_data csd; |
| 161 | int cpu; | ||
| 162 | 161 | ||
| 163 | struct request_queue *q; | 162 | struct request_queue *q; |
| 164 | 163 | ||
| @@ -166,9 +165,11 @@ struct request { | |||
| 166 | enum rq_cmd_type_bits cmd_type; | 165 | enum rq_cmd_type_bits cmd_type; |
| 167 | unsigned long atomic_flags; | 166 | unsigned long atomic_flags; |
| 168 | 167 | ||
| 168 | int cpu; | ||
| 169 | |||
| 169 | /* the following two fields are internal, NEVER access directly */ | 170 | /* the following two fields are internal, NEVER access directly */ |
| 170 | sector_t __sector; /* sector cursor */ | ||
| 171 | unsigned int __data_len; /* total data len */ | 171 | unsigned int __data_len; /* total data len */ |
| 172 | sector_t __sector; /* sector cursor */ | ||
| 172 | 173 | ||
| 173 | struct bio *bio; | 174 | struct bio *bio; |
| 174 | struct bio *biotail; | 175 | struct bio *biotail; |
| @@ -201,20 +202,20 @@ struct request { | |||
| 201 | 202 | ||
| 202 | unsigned short ioprio; | 203 | unsigned short ioprio; |
| 203 | 204 | ||
| 205 | int ref_count; | ||
| 206 | |||
| 204 | void *special; /* opaque pointer available for LLD use */ | 207 | void *special; /* opaque pointer available for LLD use */ |
| 205 | char *buffer; /* kaddr of the current segment if available */ | 208 | char *buffer; /* kaddr of the current segment if available */ |
| 206 | 209 | ||
| 207 | int tag; | 210 | int tag; |
| 208 | int errors; | 211 | int errors; |
| 209 | 212 | ||
| 210 | int ref_count; | ||
| 211 | |||
| 212 | /* | 213 | /* |
| 213 | * when request is used as a packet command carrier | 214 | * when request is used as a packet command carrier |
| 214 | */ | 215 | */ |
| 215 | unsigned short cmd_len; | ||
| 216 | unsigned char __cmd[BLK_MAX_CDB]; | 216 | unsigned char __cmd[BLK_MAX_CDB]; |
| 217 | unsigned char *cmd; | 217 | unsigned char *cmd; |
| 218 | unsigned short cmd_len; | ||
| 218 | 219 | ||
| 219 | unsigned int extra_len; /* length of alignment and padding */ | 220 | unsigned int extra_len; /* length of alignment and padding */ |
| 220 | unsigned int sense_len; | 221 | unsigned int sense_len; |
| @@ -921,26 +922,7 @@ extern void blk_cleanup_queue(struct request_queue *); | |||
| 921 | extern void blk_queue_make_request(struct request_queue *, make_request_fn *); | 922 | extern void blk_queue_make_request(struct request_queue *, make_request_fn *); |
| 922 | extern void blk_queue_bounce_limit(struct request_queue *, u64); | 923 | extern void blk_queue_bounce_limit(struct request_queue *, u64); |
| 923 | extern void blk_queue_max_hw_sectors(struct request_queue *, unsigned int); | 924 | extern void blk_queue_max_hw_sectors(struct request_queue *, unsigned int); |
| 924 | |||
| 925 | /* Temporary compatibility wrapper */ | ||
| 926 | static inline void blk_queue_max_sectors(struct request_queue *q, unsigned int max) | ||
| 927 | { | ||
| 928 | blk_queue_max_hw_sectors(q, max); | ||
| 929 | } | ||
| 930 | |||
| 931 | extern void blk_queue_max_segments(struct request_queue *, unsigned short); | 925 | extern void blk_queue_max_segments(struct request_queue *, unsigned short); |
| 932 | |||
| 933 | static inline void blk_queue_max_phys_segments(struct request_queue *q, unsigned short max) | ||
| 934 | { | ||
| 935 | blk_queue_max_segments(q, max); | ||
| 936 | } | ||
| 937 | |||
| 938 | static inline void blk_queue_max_hw_segments(struct request_queue *q, unsigned short max) | ||
| 939 | { | ||
| 940 | blk_queue_max_segments(q, max); | ||
| 941 | } | ||
| 942 | |||
| 943 | |||
| 944 | extern void blk_queue_max_segment_size(struct request_queue *, unsigned int); | 926 | extern void blk_queue_max_segment_size(struct request_queue *, unsigned int); |
| 945 | extern void blk_queue_max_discard_sectors(struct request_queue *q, | 927 | extern void blk_queue_max_discard_sectors(struct request_queue *q, |
| 946 | unsigned int max_discard_sectors); | 928 | unsigned int max_discard_sectors); |
| @@ -1030,11 +1012,6 @@ static inline int sb_issue_discard(struct super_block *sb, | |||
| 1030 | 1012 | ||
| 1031 | extern int blk_verify_command(unsigned char *cmd, fmode_t has_write_perm); | 1013 | extern int blk_verify_command(unsigned char *cmd, fmode_t has_write_perm); |
| 1032 | 1014 | ||
| 1033 | #define MAX_PHYS_SEGMENTS 128 | ||
| 1034 | #define MAX_HW_SEGMENTS 128 | ||
| 1035 | #define SAFE_MAX_SECTORS 255 | ||
| 1036 | #define MAX_SEGMENT_SIZE 65536 | ||
| 1037 | |||
| 1038 | enum blk_default_limits { | 1015 | enum blk_default_limits { |
| 1039 | BLK_MAX_SEGMENTS = 128, | 1016 | BLK_MAX_SEGMENTS = 128, |
| 1040 | BLK_SAFE_MAX_SECTORS = 255, | 1017 | BLK_SAFE_MAX_SECTORS = 255, |
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index c9bbcb2a75ae..8f78073d7caa 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
| @@ -37,16 +37,24 @@ extern void cgroup_post_fork(struct task_struct *p); | |||
| 37 | extern void cgroup_exit(struct task_struct *p, int run_callbacks); | 37 | extern void cgroup_exit(struct task_struct *p, int run_callbacks); |
| 38 | extern int cgroupstats_build(struct cgroupstats *stats, | 38 | extern int cgroupstats_build(struct cgroupstats *stats, |
| 39 | struct dentry *dentry); | 39 | struct dentry *dentry); |
| 40 | extern int cgroup_load_subsys(struct cgroup_subsys *ss); | ||
| 41 | extern void cgroup_unload_subsys(struct cgroup_subsys *ss); | ||
| 40 | 42 | ||
| 41 | extern const struct file_operations proc_cgroup_operations; | 43 | extern const struct file_operations proc_cgroup_operations; |
| 42 | 44 | ||
| 43 | /* Define the enumeration of all cgroup subsystems */ | 45 | /* Define the enumeration of all builtin cgroup subsystems */ |
| 44 | #define SUBSYS(_x) _x ## _subsys_id, | 46 | #define SUBSYS(_x) _x ## _subsys_id, |
| 45 | enum cgroup_subsys_id { | 47 | enum cgroup_subsys_id { |
| 46 | #include <linux/cgroup_subsys.h> | 48 | #include <linux/cgroup_subsys.h> |
| 47 | CGROUP_SUBSYS_COUNT | 49 | CGROUP_BUILTIN_SUBSYS_COUNT |
| 48 | }; | 50 | }; |
| 49 | #undef SUBSYS | 51 | #undef SUBSYS |
| 52 | /* | ||
| 53 | * This define indicates the maximum number of subsystems that can be loaded | ||
| 54 | * at once. We limit to this many since cgroupfs_root has subsys_bits to keep | ||
| 55 | * track of all of them. | ||
| 56 | */ | ||
| 57 | #define CGROUP_SUBSYS_COUNT (BITS_PER_BYTE*sizeof(unsigned long)) | ||
| 50 | 58 | ||
| 51 | /* Per-subsystem/per-cgroup state maintained by the system. */ | 59 | /* Per-subsystem/per-cgroup state maintained by the system. */ |
| 52 | struct cgroup_subsys_state { | 60 | struct cgroup_subsys_state { |
| @@ -76,6 +84,12 @@ enum { | |||
| 76 | CSS_REMOVED, /* This CSS is dead */ | 84 | CSS_REMOVED, /* This CSS is dead */ |
| 77 | }; | 85 | }; |
| 78 | 86 | ||
| 87 | /* Caller must verify that the css is not for root cgroup */ | ||
| 88 | static inline void __css_get(struct cgroup_subsys_state *css, int count) | ||
| 89 | { | ||
| 90 | atomic_add(count, &css->refcnt); | ||
| 91 | } | ||
| 92 | |||
| 79 | /* | 93 | /* |
| 80 | * Call css_get() to hold a reference on the css; it can be used | 94 | * Call css_get() to hold a reference on the css; it can be used |
| 81 | * for a reference obtained via: | 95 | * for a reference obtained via: |
| @@ -87,7 +101,7 @@ static inline void css_get(struct cgroup_subsys_state *css) | |||
| 87 | { | 101 | { |
| 88 | /* We don't need to reference count the root state */ | 102 | /* We don't need to reference count the root state */ |
| 89 | if (!test_bit(CSS_ROOT, &css->flags)) | 103 | if (!test_bit(CSS_ROOT, &css->flags)) |
| 90 | atomic_inc(&css->refcnt); | 104 | __css_get(css, 1); |
| 91 | } | 105 | } |
| 92 | 106 | ||
| 93 | static inline bool css_is_removed(struct cgroup_subsys_state *css) | 107 | static inline bool css_is_removed(struct cgroup_subsys_state *css) |
| @@ -118,11 +132,11 @@ static inline bool css_tryget(struct cgroup_subsys_state *css) | |||
| 118 | * css_get() or css_tryget() | 132 | * css_get() or css_tryget() |
| 119 | */ | 133 | */ |
| 120 | 134 | ||
| 121 | extern void __css_put(struct cgroup_subsys_state *css); | 135 | extern void __css_put(struct cgroup_subsys_state *css, int count); |
| 122 | static inline void css_put(struct cgroup_subsys_state *css) | 136 | static inline void css_put(struct cgroup_subsys_state *css) |
| 123 | { | 137 | { |
| 124 | if (!test_bit(CSS_ROOT, &css->flags)) | 138 | if (!test_bit(CSS_ROOT, &css->flags)) |
| 125 | __css_put(css); | 139 | __css_put(css, 1); |
| 126 | } | 140 | } |
| 127 | 141 | ||
| 128 | /* bits in struct cgroup flags field */ | 142 | /* bits in struct cgroup flags field */ |
| @@ -221,6 +235,10 @@ struct cgroup { | |||
| 221 | 235 | ||
| 222 | /* For RCU-protected deletion */ | 236 | /* For RCU-protected deletion */ |
| 223 | struct rcu_head rcu_head; | 237 | struct rcu_head rcu_head; |
| 238 | |||
| 239 | /* List of events which userspace want to recieve */ | ||
| 240 | struct list_head event_list; | ||
| 241 | spinlock_t event_list_lock; | ||
| 224 | }; | 242 | }; |
| 225 | 243 | ||
| 226 | /* | 244 | /* |
| @@ -258,7 +276,8 @@ struct css_set { | |||
| 258 | /* | 276 | /* |
| 259 | * Set of subsystem states, one for each subsystem. This array | 277 | * Set of subsystem states, one for each subsystem. This array |
| 260 | * is immutable after creation apart from the init_css_set | 278 | * is immutable after creation apart from the init_css_set |
| 261 | * during subsystem registration (at boot time). | 279 | * during subsystem registration (at boot time) and modular subsystem |
| 280 | * loading/unloading. | ||
| 262 | */ | 281 | */ |
| 263 | struct cgroup_subsys_state *subsys[CGROUP_SUBSYS_COUNT]; | 282 | struct cgroup_subsys_state *subsys[CGROUP_SUBSYS_COUNT]; |
| 264 | 283 | ||
| @@ -363,6 +382,23 @@ struct cftype { | |||
| 363 | int (*trigger)(struct cgroup *cgrp, unsigned int event); | 382 | int (*trigger)(struct cgroup *cgrp, unsigned int event); |
| 364 | 383 | ||
| 365 | int (*release)(struct inode *inode, struct file *file); | 384 | int (*release)(struct inode *inode, struct file *file); |
| 385 | |||
| 386 | /* | ||
| 387 | * register_event() callback will be used to add new userspace | ||
| 388 | * waiter for changes related to the cftype. Implement it if | ||
| 389 | * you want to provide this functionality. Use eventfd_signal() | ||
| 390 | * on eventfd to send notification to userspace. | ||
| 391 | */ | ||
| 392 | int (*register_event)(struct cgroup *cgrp, struct cftype *cft, | ||
| 393 | struct eventfd_ctx *eventfd, const char *args); | ||
| 394 | /* | ||
| 395 | * unregister_event() callback will be called when userspace | ||
| 396 | * closes the eventfd or on cgroup removing. | ||
| 397 | * This callback must be implemented, if you want provide | ||
| 398 | * notification functionality. | ||
| 399 | */ | ||
| 400 | int (*unregister_event)(struct cgroup *cgrp, struct cftype *cft, | ||
| 401 | struct eventfd_ctx *eventfd); | ||
| 366 | }; | 402 | }; |
| 367 | 403 | ||
| 368 | struct cgroup_scanner { | 404 | struct cgroup_scanner { |
| @@ -428,6 +464,8 @@ struct cgroup_subsys { | |||
| 428 | void (*destroy)(struct cgroup_subsys *ss, struct cgroup *cgrp); | 464 | void (*destroy)(struct cgroup_subsys *ss, struct cgroup *cgrp); |
| 429 | int (*can_attach)(struct cgroup_subsys *ss, struct cgroup *cgrp, | 465 | int (*can_attach)(struct cgroup_subsys *ss, struct cgroup *cgrp, |
| 430 | struct task_struct *tsk, bool threadgroup); | 466 | struct task_struct *tsk, bool threadgroup); |
| 467 | void (*cancel_attach)(struct cgroup_subsys *ss, struct cgroup *cgrp, | ||
| 468 | struct task_struct *tsk, bool threadgroup); | ||
| 431 | void (*attach)(struct cgroup_subsys *ss, struct cgroup *cgrp, | 469 | void (*attach)(struct cgroup_subsys *ss, struct cgroup *cgrp, |
| 432 | struct cgroup *old_cgrp, struct task_struct *tsk, | 470 | struct cgroup *old_cgrp, struct task_struct *tsk, |
| 433 | bool threadgroup); | 471 | bool threadgroup); |
| @@ -472,6 +510,9 @@ struct cgroup_subsys { | |||
| 472 | /* used when use_id == true */ | 510 | /* used when use_id == true */ |
| 473 | struct idr idr; | 511 | struct idr idr; |
| 474 | spinlock_t id_lock; | 512 | spinlock_t id_lock; |
| 513 | |||
| 514 | /* should be defined only by modular subsystems */ | ||
| 515 | struct module *module; | ||
| 475 | }; | 516 | }; |
| 476 | 517 | ||
| 477 | #define SUBSYS(_x) extern struct cgroup_subsys _x ## _subsys; | 518 | #define SUBSYS(_x) extern struct cgroup_subsys _x ## _subsys; |
| @@ -489,6 +530,7 @@ static inline struct cgroup_subsys_state *task_subsys_state( | |||
| 489 | { | 530 | { |
| 490 | return rcu_dereference_check(task->cgroups->subsys[subsys_id], | 531 | return rcu_dereference_check(task->cgroups->subsys[subsys_id], |
| 491 | rcu_read_lock_held() || | 532 | rcu_read_lock_held() || |
| 533 | lockdep_is_held(&task->alloc_lock) || | ||
| 492 | cgroup_lock_is_held()); | 534 | cgroup_lock_is_held()); |
| 493 | } | 535 | } |
| 494 | 536 | ||
diff --git a/include/linux/circ_buf.h b/include/linux/circ_buf.h index a2ed0591fb19..90f2471dc6f2 100644 --- a/include/linux/circ_buf.h +++ b/include/linux/circ_buf.h | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | /* | ||
| 2 | * See Documentation/circular-buffers.txt for more information. | ||
| 3 | */ | ||
| 4 | |||
| 1 | #ifndef _LINUX_CIRC_BUF_H | 5 | #ifndef _LINUX_CIRC_BUF_H |
| 2 | #define _LINUX_CIRC_BUF_H 1 | 6 | #define _LINUX_CIRC_BUF_H 1 |
| 3 | 7 | ||
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h index 0cf725bdd2a1..fc53492b6ad7 100644 --- a/include/linux/clockchips.h +++ b/include/linux/clockchips.h | |||
| @@ -73,6 +73,7 @@ enum clock_event_nofitiers { | |||
| 73 | * @list: list head for the management code | 73 | * @list: list head for the management code |
| 74 | * @mode: operating mode assigned by the management code | 74 | * @mode: operating mode assigned by the management code |
| 75 | * @next_event: local storage for the next event in oneshot mode | 75 | * @next_event: local storage for the next event in oneshot mode |
| 76 | * @retries: number of forced programming retries | ||
| 76 | */ | 77 | */ |
| 77 | struct clock_event_device { | 78 | struct clock_event_device { |
| 78 | const char *name; | 79 | const char *name; |
| @@ -93,6 +94,7 @@ struct clock_event_device { | |||
| 93 | struct list_head list; | 94 | struct list_head list; |
| 94 | enum clock_event_mode mode; | 95 | enum clock_event_mode mode; |
| 95 | ktime_t next_event; | 96 | ktime_t next_event; |
| 97 | unsigned long retries; | ||
| 96 | }; | 98 | }; |
| 97 | 99 | ||
| 98 | /* | 100 | /* |
diff --git a/include/linux/coda_psdev.h b/include/linux/coda_psdev.h index 5b5d4731f956..8859e2ede9fe 100644 --- a/include/linux/coda_psdev.h +++ b/include/linux/coda_psdev.h | |||
| @@ -7,6 +7,8 @@ | |||
| 7 | #define MAX_CODADEVS 5 /* how many do we allow */ | 7 | #define MAX_CODADEVS 5 /* how many do we allow */ |
| 8 | 8 | ||
| 9 | #ifdef __KERNEL__ | 9 | #ifdef __KERNEL__ |
| 10 | #include <linux/backing-dev.h> | ||
| 11 | |||
| 10 | struct kstatfs; | 12 | struct kstatfs; |
| 11 | 13 | ||
| 12 | /* communication pending/processing queues */ | 14 | /* communication pending/processing queues */ |
| @@ -17,6 +19,7 @@ struct venus_comm { | |||
| 17 | struct list_head vc_processing; | 19 | struct list_head vc_processing; |
| 18 | int vc_inuse; | 20 | int vc_inuse; |
| 19 | struct super_block *vc_sb; | 21 | struct super_block *vc_sb; |
| 22 | struct backing_dev_info bdi; | ||
| 20 | }; | 23 | }; |
| 21 | 24 | ||
| 22 | 25 | ||
diff --git a/include/linux/compat.h b/include/linux/compat.h index ef68119a4fd2..717c691ecd8e 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | typedef __compat_uid32_t compat_uid_t; | 23 | typedef __compat_uid32_t compat_uid_t; |
| 24 | typedef __compat_gid32_t compat_gid_t; | 24 | typedef __compat_gid32_t compat_gid_t; |
| 25 | 25 | ||
| 26 | struct compat_sel_arg_struct; | ||
| 26 | struct rusage; | 27 | struct rusage; |
| 27 | 28 | ||
| 28 | struct compat_itimerspec { | 29 | struct compat_itimerspec { |
| @@ -249,6 +250,8 @@ asmlinkage long compat_sys_select(int n, compat_ulong_t __user *inp, | |||
| 249 | compat_ulong_t __user *outp, compat_ulong_t __user *exp, | 250 | compat_ulong_t __user *outp, compat_ulong_t __user *exp, |
| 250 | struct compat_timeval __user *tvp); | 251 | struct compat_timeval __user *tvp); |
| 251 | 252 | ||
| 253 | asmlinkage long compat_sys_old_select(struct compat_sel_arg_struct __user *arg); | ||
| 254 | |||
| 252 | asmlinkage long compat_sys_wait4(compat_pid_t pid, | 255 | asmlinkage long compat_sys_wait4(compat_pid_t pid, |
| 253 | compat_uint_t __user *stat_addr, int options, | 256 | compat_uint_t __user *stat_addr, int options, |
| 254 | struct compat_rusage __user *ru); | 257 | struct compat_rusage __user *ru); |
diff --git a/include/linux/coredump.h b/include/linux/coredump.h index b3c91d7cede4..8ba66a9d9022 100644 --- a/include/linux/coredump.h +++ b/include/linux/coredump.h | |||
| @@ -16,6 +16,8 @@ static inline int dump_write(struct file *file, const void *addr, int nr) | |||
| 16 | 16 | ||
| 17 | static inline int dump_seek(struct file *file, loff_t off) | 17 | static inline int dump_seek(struct file *file, loff_t off) |
| 18 | { | 18 | { |
| 19 | int ret = 1; | ||
| 20 | |||
| 19 | if (file->f_op->llseek && file->f_op->llseek != no_llseek) { | 21 | if (file->f_op->llseek && file->f_op->llseek != no_llseek) { |
| 20 | if (file->f_op->llseek(file, off, SEEK_CUR) < 0) | 22 | if (file->f_op->llseek(file, off, SEEK_CUR) < 0) |
| 21 | return 0; | 23 | return 0; |
| @@ -29,13 +31,15 @@ static inline int dump_seek(struct file *file, loff_t off) | |||
| 29 | 31 | ||
| 30 | if (n > PAGE_SIZE) | 32 | if (n > PAGE_SIZE) |
| 31 | n = PAGE_SIZE; | 33 | n = PAGE_SIZE; |
| 32 | if (!dump_write(file, buf, n)) | 34 | if (!dump_write(file, buf, n)) { |
| 33 | return 0; | 35 | ret = 0; |
| 36 | break; | ||
| 37 | } | ||
| 34 | off -= n; | 38 | off -= n; |
| 35 | } | 39 | } |
| 36 | free_page((unsigned long)buf); | 40 | free_page((unsigned long)buf); |
| 37 | } | 41 | } |
| 38 | return 1; | 42 | return ret; |
| 39 | } | 43 | } |
| 40 | 44 | ||
| 41 | #endif /* _LINUX_COREDUMP_H */ | 45 | #endif /* _LINUX_COREDUMP_H */ |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 4de02b10007f..9f15150ce8d6 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
| @@ -278,6 +278,27 @@ struct freq_attr { | |||
| 278 | ssize_t (*store)(struct cpufreq_policy *, const char *, size_t count); | 278 | ssize_t (*store)(struct cpufreq_policy *, const char *, size_t count); |
| 279 | }; | 279 | }; |
| 280 | 280 | ||
| 281 | #define cpufreq_freq_attr_ro(_name) \ | ||
| 282 | static struct freq_attr _name = \ | ||
| 283 | __ATTR(_name, 0444, show_##_name, NULL) | ||
| 284 | |||
| 285 | #define cpufreq_freq_attr_ro_perm(_name, _perm) \ | ||
| 286 | static struct freq_attr _name = \ | ||
| 287 | __ATTR(_name, _perm, show_##_name, NULL) | ||
| 288 | |||
| 289 | #define cpufreq_freq_attr_ro_old(_name) \ | ||
| 290 | static struct freq_attr _name##_old = \ | ||
| 291 | __ATTR(_name, 0444, show_##_name##_old, NULL) | ||
| 292 | |||
| 293 | #define cpufreq_freq_attr_rw(_name) \ | ||
| 294 | static struct freq_attr _name = \ | ||
| 295 | __ATTR(_name, 0644, show_##_name, store_##_name) | ||
| 296 | |||
| 297 | #define cpufreq_freq_attr_rw_old(_name) \ | ||
| 298 | static struct freq_attr _name##_old = \ | ||
| 299 | __ATTR(_name, 0644, show_##_name##_old, store_##_name##_old) | ||
| 300 | |||
| 301 | |||
| 281 | struct global_attr { | 302 | struct global_attr { |
| 282 | struct attribute attr; | 303 | struct attribute attr; |
| 283 | ssize_t (*show)(struct kobject *kobj, | 304 | ssize_t (*show)(struct kobject *kobj, |
| @@ -286,6 +307,15 @@ struct global_attr { | |||
| 286 | const char *c, size_t count); | 307 | const char *c, size_t count); |
| 287 | }; | 308 | }; |
| 288 | 309 | ||
| 310 | #define define_one_global_ro(_name) \ | ||
| 311 | static struct global_attr _name = \ | ||
| 312 | __ATTR(_name, 0444, show_##_name, NULL) | ||
| 313 | |||
| 314 | #define define_one_global_rw(_name) \ | ||
| 315 | static struct global_attr _name = \ | ||
| 316 | __ATTR(_name, 0644, show_##_name, store_##_name) | ||
| 317 | |||
| 318 | |||
| 289 | /********************************************************************* | 319 | /********************************************************************* |
| 290 | * CPUFREQ 2.6. INTERFACE * | 320 | * CPUFREQ 2.6. INTERFACE * |
| 291 | *********************************************************************/ | 321 | *********************************************************************/ |
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index a5740fc4d04b..a73454aec333 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h | |||
| @@ -21,8 +21,7 @@ extern int number_of_cpusets; /* How many cpusets are defined in system? */ | |||
| 21 | extern int cpuset_init(void); | 21 | extern int cpuset_init(void); |
| 22 | extern void cpuset_init_smp(void); | 22 | extern void cpuset_init_smp(void); |
| 23 | extern void cpuset_cpus_allowed(struct task_struct *p, struct cpumask *mask); | 23 | extern void cpuset_cpus_allowed(struct task_struct *p, struct cpumask *mask); |
| 24 | extern void cpuset_cpus_allowed_locked(struct task_struct *p, | 24 | extern int cpuset_cpus_allowed_fallback(struct task_struct *p); |
| 25 | struct cpumask *mask); | ||
| 26 | extern nodemask_t cpuset_mems_allowed(struct task_struct *p); | 25 | extern nodemask_t cpuset_mems_allowed(struct task_struct *p); |
| 27 | #define cpuset_current_mems_allowed (current->mems_allowed) | 26 | #define cpuset_current_mems_allowed (current->mems_allowed) |
| 28 | void cpuset_init_current_mems_allowed(void); | 27 | void cpuset_init_current_mems_allowed(void); |
| @@ -69,9 +68,6 @@ struct seq_file; | |||
| 69 | extern void cpuset_task_status_allowed(struct seq_file *m, | 68 | extern void cpuset_task_status_allowed(struct seq_file *m, |
| 70 | struct task_struct *task); | 69 | struct task_struct *task); |
| 71 | 70 | ||
| 72 | extern void cpuset_lock(void); | ||
| 73 | extern void cpuset_unlock(void); | ||
| 74 | |||
| 75 | extern int cpuset_mem_spread_node(void); | 71 | extern int cpuset_mem_spread_node(void); |
| 76 | 72 | ||
| 77 | static inline int cpuset_do_page_mem_spread(void) | 73 | static inline int cpuset_do_page_mem_spread(void) |
| @@ -105,10 +101,11 @@ static inline void cpuset_cpus_allowed(struct task_struct *p, | |||
| 105 | { | 101 | { |
| 106 | cpumask_copy(mask, cpu_possible_mask); | 102 | cpumask_copy(mask, cpu_possible_mask); |
| 107 | } | 103 | } |
| 108 | static inline void cpuset_cpus_allowed_locked(struct task_struct *p, | 104 | |
| 109 | struct cpumask *mask) | 105 | static inline int cpuset_cpus_allowed_fallback(struct task_struct *p) |
| 110 | { | 106 | { |
| 111 | cpumask_copy(mask, cpu_possible_mask); | 107 | cpumask_copy(&p->cpus_allowed, cpu_possible_mask); |
| 108 | return cpumask_any(cpu_active_mask); | ||
| 112 | } | 109 | } |
| 113 | 110 | ||
| 114 | static inline nodemask_t cpuset_mems_allowed(struct task_struct *p) | 111 | static inline nodemask_t cpuset_mems_allowed(struct task_struct *p) |
| @@ -157,9 +154,6 @@ static inline void cpuset_task_status_allowed(struct seq_file *m, | |||
| 157 | { | 154 | { |
| 158 | } | 155 | } |
| 159 | 156 | ||
| 160 | static inline void cpuset_lock(void) {} | ||
| 161 | static inline void cpuset_unlock(void) {} | ||
| 162 | |||
| 163 | static inline int cpuset_mem_spread_node(void) | 157 | static inline int cpuset_mem_spread_node(void) |
| 164 | { | 158 | { |
| 165 | return 0; | 159 | return 0; |
diff --git a/include/linux/cred.h b/include/linux/cred.h index 4db09f89b637..52507c3e1387 100644 --- a/include/linux/cred.h +++ b/include/linux/cred.h | |||
| @@ -280,7 +280,7 @@ static inline void put_cred(const struct cred *_cred) | |||
| 280 | * task or by holding tasklist_lock to prevent it from being unlinked. | 280 | * task or by holding tasklist_lock to prevent it from being unlinked. |
| 281 | */ | 281 | */ |
| 282 | #define __task_cred(task) \ | 282 | #define __task_cred(task) \ |
| 283 | ((const struct cred *)(rcu_dereference_check((task)->real_cred, rcu_read_lock_held() || lockdep_is_held(&tasklist_lock)))) | 283 | ((const struct cred *)(rcu_dereference_check((task)->real_cred, rcu_read_lock_held() || lockdep_tasklist_lock_is_held()))) |
| 284 | 284 | ||
| 285 | /** | 285 | /** |
| 286 | * get_task_cred - Get another task's objective credentials | 286 | * get_task_cred - Get another task's objective credentials |
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 30b93b2a01a4..eebb617c17d8 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
| @@ -186,6 +186,8 @@ d_iput: no no no yes | |||
| 186 | 186 | ||
| 187 | #define DCACHE_FSNOTIFY_PARENT_WATCHED 0x0080 /* Parent inode is watched by some fsnotify listener */ | 187 | #define DCACHE_FSNOTIFY_PARENT_WATCHED 0x0080 /* Parent inode is watched by some fsnotify listener */ |
| 188 | 188 | ||
| 189 | #define DCACHE_CANT_MOUNT 0x0100 | ||
| 190 | |||
| 189 | extern spinlock_t dcache_lock; | 191 | extern spinlock_t dcache_lock; |
| 190 | extern seqlock_t rename_lock; | 192 | extern seqlock_t rename_lock; |
| 191 | 193 | ||
| @@ -358,6 +360,18 @@ static inline int d_unlinked(struct dentry *dentry) | |||
| 358 | return d_unhashed(dentry) && !IS_ROOT(dentry); | 360 | return d_unhashed(dentry) && !IS_ROOT(dentry); |
| 359 | } | 361 | } |
| 360 | 362 | ||
| 363 | static inline int cant_mount(struct dentry *dentry) | ||
| 364 | { | ||
| 365 | return (dentry->d_flags & DCACHE_CANT_MOUNT); | ||
| 366 | } | ||
| 367 | |||
| 368 | static inline void dont_mount(struct dentry *dentry) | ||
| 369 | { | ||
| 370 | spin_lock(&dentry->d_lock); | ||
| 371 | dentry->d_flags |= DCACHE_CANT_MOUNT; | ||
| 372 | spin_unlock(&dentry->d_lock); | ||
| 373 | } | ||
| 374 | |||
| 361 | static inline struct dentry *dget_parent(struct dentry *dentry) | 375 | static inline struct dentry *dget_parent(struct dentry *dentry) |
| 362 | { | 376 | { |
| 363 | struct dentry *ret; | 377 | struct dentry *ret; |
diff --git a/include/linux/debugobjects.h b/include/linux/debugobjects.h index 8c243aaa86a7..597692f1fc8d 100644 --- a/include/linux/debugobjects.h +++ b/include/linux/debugobjects.h | |||
| @@ -20,12 +20,14 @@ struct debug_obj_descr; | |||
| 20 | * struct debug_obj - representaion of an tracked object | 20 | * struct debug_obj - representaion of an tracked object |
| 21 | * @node: hlist node to link the object into the tracker list | 21 | * @node: hlist node to link the object into the tracker list |
| 22 | * @state: tracked object state | 22 | * @state: tracked object state |
| 23 | * @astate: current active state | ||
| 23 | * @object: pointer to the real object | 24 | * @object: pointer to the real object |
| 24 | * @descr: pointer to an object type specific debug description structure | 25 | * @descr: pointer to an object type specific debug description structure |
| 25 | */ | 26 | */ |
| 26 | struct debug_obj { | 27 | struct debug_obj { |
| 27 | struct hlist_node node; | 28 | struct hlist_node node; |
| 28 | enum debug_obj_state state; | 29 | enum debug_obj_state state; |
| 30 | unsigned int astate; | ||
| 29 | void *object; | 31 | void *object; |
| 30 | struct debug_obj_descr *descr; | 32 | struct debug_obj_descr *descr; |
| 31 | }; | 33 | }; |
| @@ -60,6 +62,15 @@ extern void debug_object_deactivate(void *addr, struct debug_obj_descr *descr); | |||
| 60 | extern void debug_object_destroy (void *addr, struct debug_obj_descr *descr); | 62 | extern void debug_object_destroy (void *addr, struct debug_obj_descr *descr); |
| 61 | extern void debug_object_free (void *addr, struct debug_obj_descr *descr); | 63 | extern void debug_object_free (void *addr, struct debug_obj_descr *descr); |
| 62 | 64 | ||
| 65 | /* | ||
| 66 | * Active state: | ||
| 67 | * - Set at 0 upon initialization. | ||
| 68 | * - Must return to 0 before deactivation. | ||
| 69 | */ | ||
| 70 | extern void | ||
| 71 | debug_object_active_state(void *addr, struct debug_obj_descr *descr, | ||
| 72 | unsigned int expect, unsigned int next); | ||
| 73 | |||
| 63 | extern void debug_objects_early_init(void); | 74 | extern void debug_objects_early_init(void); |
| 64 | extern void debug_objects_mem_init(void); | 75 | extern void debug_objects_mem_init(void); |
| 65 | #else | 76 | #else |
diff --git a/include/linux/decompress/mm.h b/include/linux/decompress/mm.h index 5032b9a31ae7..ad5ec1d0475e 100644 --- a/include/linux/decompress/mm.h +++ b/include/linux/decompress/mm.h | |||
| @@ -14,11 +14,21 @@ | |||
| 14 | 14 | ||
| 15 | /* Code active when included from pre-boot environment: */ | 15 | /* Code active when included from pre-boot environment: */ |
| 16 | 16 | ||
| 17 | /* | ||
| 18 | * Some architectures want to ensure there is no local data in their | ||
| 19 | * pre-boot environment, so that data can arbitarily relocated (via | ||
| 20 | * GOT references). This is achieved by defining STATIC_RW_DATA to | ||
| 21 | * be null. | ||
| 22 | */ | ||
| 23 | #ifndef STATIC_RW_DATA | ||
| 24 | #define STATIC_RW_DATA static | ||
| 25 | #endif | ||
| 26 | |||
| 17 | /* A trivial malloc implementation, adapted from | 27 | /* A trivial malloc implementation, adapted from |
| 18 | * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994 | 28 | * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994 |
| 19 | */ | 29 | */ |
| 20 | static unsigned long malloc_ptr; | 30 | STATIC_RW_DATA unsigned long malloc_ptr; |
| 21 | static int malloc_count; | 31 | STATIC_RW_DATA int malloc_count; |
| 22 | 32 | ||
| 23 | static void *malloc(int size) | 33 | static void *malloc(int size) |
| 24 | { | 34 | { |
diff --git a/include/linux/delayacct.h b/include/linux/delayacct.h index 5076fe0c8a96..6cee17c22313 100644 --- a/include/linux/delayacct.h +++ b/include/linux/delayacct.h | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | #define _LINUX_DELAYACCT_H | 18 | #define _LINUX_DELAYACCT_H |
| 19 | 19 | ||
| 20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
| 21 | #include <linux/slab.h> | ||
| 21 | 22 | ||
| 22 | /* | 23 | /* |
| 23 | * Per-task flags relevant to delay accounting | 24 | * Per-task flags relevant to delay accounting |
diff --git a/include/linux/device.h b/include/linux/device.h index 182192892d45..241b96bcd7ad 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
| @@ -451,6 +451,10 @@ struct device { | |||
| 451 | 451 | ||
| 452 | static inline const char *dev_name(const struct device *dev) | 452 | static inline const char *dev_name(const struct device *dev) |
| 453 | { | 453 | { |
| 454 | /* Use the init name until the kobject becomes available */ | ||
| 455 | if (dev->init_name) | ||
| 456 | return dev->init_name; | ||
| 457 | |||
| 454 | return kobject_name(&dev->kobj); | 458 | return kobject_name(&dev->kobj); |
| 455 | } | 459 | } |
| 456 | 460 | ||
diff --git a/include/linux/dm9000.h b/include/linux/dm9000.h index c30879cf93bc..96e87693d933 100644 --- a/include/linux/dm9000.h +++ b/include/linux/dm9000.h | |||
| @@ -23,7 +23,7 @@ | |||
| 23 | #define DM9000_PLATF_NO_EEPROM (0x0010) | 23 | #define DM9000_PLATF_NO_EEPROM (0x0010) |
| 24 | #define DM9000_PLATF_SIMPLE_PHY (0x0020) /* Use NSR to find LinkStatus */ | 24 | #define DM9000_PLATF_SIMPLE_PHY (0x0020) /* Use NSR to find LinkStatus */ |
| 25 | 25 | ||
| 26 | /* platfrom data for platfrom device structure's platfrom_data field */ | 26 | /* platform data for platform device structure's platform_data field */ |
| 27 | 27 | ||
| 28 | struct dm9000_plat_data { | 28 | struct dm9000_plat_data { |
| 29 | unsigned int flags; | 29 | unsigned int flags; |
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index 91b761846061..ca32ed78b057 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h | |||
| @@ -127,6 +127,14 @@ static inline u64 dma_get_mask(struct device *dev) | |||
| 127 | return DMA_BIT_MASK(32); | 127 | return DMA_BIT_MASK(32); |
| 128 | } | 128 | } |
| 129 | 129 | ||
| 130 | static inline int dma_set_coherent_mask(struct device *dev, u64 mask) | ||
| 131 | { | ||
| 132 | if (!dma_supported(dev, mask)) | ||
| 133 | return -EIO; | ||
| 134 | dev->coherent_dma_mask = mask; | ||
| 135 | return 0; | ||
| 136 | } | ||
| 137 | |||
| 130 | extern u64 dma_get_required_mask(struct device *dev); | 138 | extern u64 dma_get_required_mask(struct device *dev); |
| 131 | 139 | ||
| 132 | static inline unsigned int dma_get_max_seg_size(struct device *dev) | 140 | static inline unsigned int dma_get_max_seg_size(struct device *dev) |
| @@ -232,4 +240,20 @@ struct dma_attrs; | |||
| 232 | 240 | ||
| 233 | #endif /* CONFIG_HAVE_DMA_ATTRS */ | 241 | #endif /* CONFIG_HAVE_DMA_ATTRS */ |
| 234 | 242 | ||
| 243 | #ifdef CONFIG_NEED_DMA_MAP_STATE | ||
| 244 | #define DEFINE_DMA_UNMAP_ADDR(ADDR_NAME) dma_addr_t ADDR_NAME | ||
| 245 | #define DEFINE_DMA_UNMAP_LEN(LEN_NAME) __u32 LEN_NAME | ||
| 246 | #define dma_unmap_addr(PTR, ADDR_NAME) ((PTR)->ADDR_NAME) | ||
| 247 | #define dma_unmap_addr_set(PTR, ADDR_NAME, VAL) (((PTR)->ADDR_NAME) = (VAL)) | ||
| 248 | #define dma_unmap_len(PTR, LEN_NAME) ((PTR)->LEN_NAME) | ||
| 249 | #define dma_unmap_len_set(PTR, LEN_NAME, VAL) (((PTR)->LEN_NAME) = (VAL)) | ||
| 250 | #else | ||
| 251 | #define DEFINE_DMA_UNMAP_ADDR(ADDR_NAME) | ||
| 252 | #define DEFINE_DMA_UNMAP_LEN(LEN_NAME) | ||
| 253 | #define dma_unmap_addr(PTR, ADDR_NAME) (0) | ||
| 254 | #define dma_unmap_addr_set(PTR, ADDR_NAME, VAL) do { } while (0) | ||
| 255 | #define dma_unmap_len(PTR, LEN_NAME) (0) | ||
| 256 | #define dma_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) | ||
| 257 | #endif | ||
| 258 | |||
| 235 | #endif | 259 | #endif |
diff --git a/include/linux/drbd.h b/include/linux/drbd.h index 78962272338a..4341b1a97a34 100644 --- a/include/linux/drbd.h +++ b/include/linux/drbd.h | |||
| @@ -56,7 +56,7 @@ extern const char *drbd_buildtag(void); | |||
| 56 | #define REL_VERSION "8.3.7" | 56 | #define REL_VERSION "8.3.7" |
| 57 | #define API_VERSION 88 | 57 | #define API_VERSION 88 |
| 58 | #define PRO_VERSION_MIN 86 | 58 | #define PRO_VERSION_MIN 86 |
| 59 | #define PRO_VERSION_MAX 91 | 59 | #define PRO_VERSION_MAX 92 |
| 60 | 60 | ||
| 61 | 61 | ||
| 62 | enum drbd_io_error_p { | 62 | enum drbd_io_error_p { |
diff --git a/include/linux/drbd_nl.h b/include/linux/drbd_nl.h index a4d82f895994..f7431a4ca608 100644 --- a/include/linux/drbd_nl.h +++ b/include/linux/drbd_nl.h | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | #endif | 12 | #endif |
| 13 | 13 | ||
| 14 | NL_PACKET(primary, 1, | 14 | NL_PACKET(primary, 1, |
| 15 | NL_BIT( 1, T_MAY_IGNORE, overwrite_peer) | 15 | NL_BIT( 1, T_MAY_IGNORE, primary_force) |
| 16 | ) | 16 | ) |
| 17 | 17 | ||
| 18 | NL_PACKET(secondary, 2, ) | 18 | NL_PACKET(secondary, 2, ) |
| @@ -63,6 +63,7 @@ NL_PACKET(net_conf, 5, | |||
| 63 | NL_BIT( 41, T_MAY_IGNORE, always_asbp) | 63 | NL_BIT( 41, T_MAY_IGNORE, always_asbp) |
| 64 | NL_BIT( 61, T_MAY_IGNORE, no_cork) | 64 | NL_BIT( 61, T_MAY_IGNORE, no_cork) |
| 65 | NL_BIT( 62, T_MANDATORY, auto_sndbuf_size) | 65 | NL_BIT( 62, T_MANDATORY, auto_sndbuf_size) |
| 66 | NL_BIT( 70, T_MANDATORY, dry_run) | ||
| 66 | ) | 67 | ) |
| 67 | 68 | ||
| 68 | NL_PACKET(disconnect, 6, ) | 69 | NL_PACKET(disconnect, 6, ) |
diff --git a/include/linux/elf.h b/include/linux/elf.h index 597858418051..4d608014753a 100644 --- a/include/linux/elf.h +++ b/include/linux/elf.h | |||
| @@ -394,6 +394,7 @@ typedef struct elf64_shdr { | |||
| 394 | #define NT_S390_TODPREG 0x303 /* s390 TOD programmable register */ | 394 | #define NT_S390_TODPREG 0x303 /* s390 TOD programmable register */ |
| 395 | #define NT_S390_CTRS 0x304 /* s390 control registers */ | 395 | #define NT_S390_CTRS 0x304 /* s390 control registers */ |
| 396 | #define NT_S390_PREFIX 0x305 /* s390 prefix register */ | 396 | #define NT_S390_PREFIX 0x305 /* s390 prefix register */ |
| 397 | #define NT_S390_LAST_BREAK 0x306 /* s390 breaking event address */ | ||
| 397 | 398 | ||
| 398 | 399 | ||
| 399 | /* Note header in a PT_NOTE section */ | 400 | /* Note header in a PT_NOTE section */ |
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index cca1c3de140d..b33f316bb92e 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h | |||
| @@ -61,6 +61,13 @@ struct ethtool_drvinfo { | |||
| 61 | /* For PCI devices, use pci_name(pci_dev). */ | 61 | /* For PCI devices, use pci_name(pci_dev). */ |
| 62 | char reserved1[32]; | 62 | char reserved1[32]; |
| 63 | char reserved2[12]; | 63 | char reserved2[12]; |
| 64 | /* | ||
| 65 | * Some struct members below are filled in | ||
| 66 | * using ops->get_sset_count(). Obtaining | ||
| 67 | * this info from ethtool_drvinfo is now | ||
| 68 | * deprecated; Use ETHTOOL_GSSET_INFO | ||
| 69 | * instead. | ||
| 70 | */ | ||
| 64 | __u32 n_priv_flags; /* number of flags valid in ETHTOOL_GPFLAGS */ | 71 | __u32 n_priv_flags; /* number of flags valid in ETHTOOL_GPFLAGS */ |
| 65 | __u32 n_stats; /* number of u64's from ETHTOOL_GSTATS */ | 72 | __u32 n_stats; /* number of u64's from ETHTOOL_GSTATS */ |
| 66 | __u32 testinfo_len; | 73 | __u32 testinfo_len; |
| @@ -253,6 +260,17 @@ struct ethtool_gstrings { | |||
| 253 | __u8 data[0]; | 260 | __u8 data[0]; |
| 254 | }; | 261 | }; |
| 255 | 262 | ||
| 263 | struct ethtool_sset_info { | ||
| 264 | __u32 cmd; /* ETHTOOL_GSSET_INFO */ | ||
| 265 | __u32 reserved; | ||
| 266 | __u64 sset_mask; /* input: each bit selects an sset to query */ | ||
| 267 | /* output: each bit a returned sset */ | ||
| 268 | __u32 data[0]; /* ETH_SS_xxx count, in order, based on bits | ||
| 269 | in sset_mask. One bit implies one | ||
| 270 | __u32, two bits implies two | ||
| 271 | __u32's, etc. */ | ||
| 272 | }; | ||
| 273 | |||
| 256 | enum ethtool_test_flags { | 274 | enum ethtool_test_flags { |
| 257 | ETH_TEST_FL_OFFLINE = (1 << 0), /* online / offline */ | 275 | ETH_TEST_FL_OFFLINE = (1 << 0), /* online / offline */ |
| 258 | ETH_TEST_FL_FAILED = (1 << 1), /* test passed / failed */ | 276 | ETH_TEST_FL_FAILED = (1 << 1), /* test passed / failed */ |
| @@ -606,9 +624,9 @@ struct ethtool_ops { | |||
| 606 | #define ETHTOOL_SRXCLSRLINS 0x00000032 /* Insert RX classification rule */ | 624 | #define ETHTOOL_SRXCLSRLINS 0x00000032 /* Insert RX classification rule */ |
| 607 | #define ETHTOOL_FLASHDEV 0x00000033 /* Flash firmware to device */ | 625 | #define ETHTOOL_FLASHDEV 0x00000033 /* Flash firmware to device */ |
| 608 | #define ETHTOOL_RESET 0x00000034 /* Reset hardware */ | 626 | #define ETHTOOL_RESET 0x00000034 /* Reset hardware */ |
| 609 | 627 | #define ETHTOOL_SRXNTUPLE 0x00000035 /* Add an n-tuple filter to device */ | |
| 610 | #define ETHTOOL_SRXNTUPLE 0x00000035 /* Add an n-tuple filter to device */ | 628 | #define ETHTOOL_GRXNTUPLE 0x00000036 /* Get n-tuple filters from device */ |
| 611 | #define ETHTOOL_GRXNTUPLE 0x00000036 /* Get n-tuple filters from device */ | 629 | #define ETHTOOL_GSSET_INFO 0x00000037 /* Get string set info */ |
| 612 | 630 | ||
| 613 | /* compatibility with older code */ | 631 | /* compatibility with older code */ |
| 614 | #define SPARC_ETH_GSET ETHTOOL_GSET | 632 | #define SPARC_ETH_GSET ETHTOOL_GSET |
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index cac84b006667..5f494b465097 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h | |||
| @@ -565,17 +565,17 @@ enum { | |||
| 565 | 565 | ||
| 566 | static inline int ext3_test_inode_state(struct inode *inode, int bit) | 566 | static inline int ext3_test_inode_state(struct inode *inode, int bit) |
| 567 | { | 567 | { |
| 568 | return test_bit(bit, &EXT3_I(inode)->i_state); | 568 | return test_bit(bit, &EXT3_I(inode)->i_state_flags); |
| 569 | } | 569 | } |
| 570 | 570 | ||
| 571 | static inline void ext3_set_inode_state(struct inode *inode, int bit) | 571 | static inline void ext3_set_inode_state(struct inode *inode, int bit) |
| 572 | { | 572 | { |
| 573 | set_bit(bit, &EXT3_I(inode)->i_state); | 573 | set_bit(bit, &EXT3_I(inode)->i_state_flags); |
| 574 | } | 574 | } |
| 575 | 575 | ||
| 576 | static inline void ext3_clear_inode_state(struct inode *inode, int bit) | 576 | static inline void ext3_clear_inode_state(struct inode *inode, int bit) |
| 577 | { | 577 | { |
| 578 | clear_bit(bit, &EXT3_I(inode)->i_state); | 578 | clear_bit(bit, &EXT3_I(inode)->i_state_flags); |
| 579 | } | 579 | } |
| 580 | #else | 580 | #else |
| 581 | /* Assume that user mode programs are passing in an ext3fs superblock, not | 581 | /* Assume that user mode programs are passing in an ext3fs superblock, not |
diff --git a/include/linux/ext3_fs_i.h b/include/linux/ext3_fs_i.h index 7679acdb519a..f42c098aed8d 100644 --- a/include/linux/ext3_fs_i.h +++ b/include/linux/ext3_fs_i.h | |||
| @@ -87,7 +87,7 @@ struct ext3_inode_info { | |||
| 87 | * near to their parent directory's inode. | 87 | * near to their parent directory's inode. |
| 88 | */ | 88 | */ |
| 89 | __u32 i_block_group; | 89 | __u32 i_block_group; |
| 90 | unsigned long i_state; /* Dynamic state flags for ext3 */ | 90 | unsigned long i_state_flags; /* Dynamic state flags for ext3 */ |
| 91 | 91 | ||
| 92 | /* block reservation info */ | 92 | /* block reservation info */ |
| 93 | struct ext3_block_alloc_info *i_block_alloc_info; | 93 | struct ext3_block_alloc_info *i_block_alloc_info; |
diff --git a/include/linux/firewire-cdev.h b/include/linux/firewire-cdev.h index 40b11013408e..68f883b30a53 100644 --- a/include/linux/firewire-cdev.h +++ b/include/linux/firewire-cdev.h | |||
| @@ -1,21 +1,26 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Char device interface. | 2 | * Char device interface. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2005-2006 Kristian Hoegsberg <krh@bitplanet.net> | 4 | * Copyright (C) 2005-2007 Kristian Hoegsberg <krh@bitplanet.net> |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * Permission is hereby granted, free of charge, to any person obtaining a |
| 7 | * it under the terms of the GNU General Public License as published by | 7 | * copy of this software and associated documentation files (the "Software"), |
| 8 | * the Free Software Foundation; either version 2 of the License, or | 8 | * to deal in the Software without restriction, including without limitation |
| 9 | * (at your option) any later version. | 9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 10 | * | 10 | * and/or sell copies of the Software, and to permit persons to whom the |
| 11 | * This program is distributed in the hope that it will be useful, | 11 | * Software is furnished to do so, subject to the following conditions: |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | * The above copyright notice and this permission notice (including the next |
| 14 | * GNU General Public License for more details. | 14 | * paragraph) shall be included in all copies or substantial portions of the |
| 15 | * | 15 | * Software. |
| 16 | * You should have received a copy of the GNU General Public License | 16 | * |
| 17 | * along with this program; if not, write to the Free Software Foundation, | 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 20 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
| 21 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
| 22 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
| 23 | * DEALINGS IN THE SOFTWARE. | ||
| 19 | */ | 24 | */ |
| 20 | 25 | ||
| 21 | #ifndef _LINUX_FIREWIRE_CDEV_H | 26 | #ifndef _LINUX_FIREWIRE_CDEV_H |
| @@ -438,7 +443,7 @@ struct fw_cdev_remove_descriptor { | |||
| 438 | * @type: %FW_CDEV_ISO_CONTEXT_TRANSMIT or %FW_CDEV_ISO_CONTEXT_RECEIVE | 443 | * @type: %FW_CDEV_ISO_CONTEXT_TRANSMIT or %FW_CDEV_ISO_CONTEXT_RECEIVE |
| 439 | * @header_size: Header size to strip for receive contexts | 444 | * @header_size: Header size to strip for receive contexts |
| 440 | * @channel: Channel to bind to | 445 | * @channel: Channel to bind to |
| 441 | * @speed: Speed to transmit at | 446 | * @speed: Speed for transmit contexts |
| 442 | * @closure: To be returned in &fw_cdev_event_iso_interrupt | 447 | * @closure: To be returned in &fw_cdev_event_iso_interrupt |
| 443 | * @handle: Handle to context, written back by kernel | 448 | * @handle: Handle to context, written back by kernel |
| 444 | * | 449 | * |
| @@ -451,6 +456,9 @@ struct fw_cdev_remove_descriptor { | |||
| 451 | * If a context was successfully created, the kernel writes back a handle to the | 456 | * If a context was successfully created, the kernel writes back a handle to the |
| 452 | * context, which must be passed in for subsequent operations on that context. | 457 | * context, which must be passed in for subsequent operations on that context. |
| 453 | * | 458 | * |
| 459 | * For receive contexts, @header_size must be at least 4 and must be a multiple | ||
| 460 | * of 4. | ||
| 461 | * | ||
| 454 | * Note that the effect of a @header_size > 4 depends on | 462 | * Note that the effect of a @header_size > 4 depends on |
| 455 | * &fw_cdev_get_info.version, as documented at &fw_cdev_event_iso_interrupt. | 463 | * &fw_cdev_get_info.version, as documented at &fw_cdev_event_iso_interrupt. |
| 456 | */ | 464 | */ |
| @@ -481,10 +489,34 @@ struct fw_cdev_create_iso_context { | |||
| 481 | * | 489 | * |
| 482 | * &struct fw_cdev_iso_packet is used to describe isochronous packet queues. | 490 | * &struct fw_cdev_iso_packet is used to describe isochronous packet queues. |
| 483 | * | 491 | * |
| 484 | * Use the FW_CDEV_ISO_ macros to fill in @control. The sy and tag fields are | 492 | * Use the FW_CDEV_ISO_ macros to fill in @control. |
| 485 | * specified by IEEE 1394a and IEC 61883. | 493 | * |
| 486 | * | 494 | * For transmit packets, the header length must be a multiple of 4 and specifies |
| 487 | * FIXME - finish this documentation | 495 | * the numbers of bytes in @header that will be prepended to the packet's |
| 496 | * payload; these bytes are copied into the kernel and will not be accessed | ||
| 497 | * after the ioctl has returned. The sy and tag fields are copied to the iso | ||
| 498 | * packet header (these fields are specified by IEEE 1394a and IEC 61883-1). | ||
| 499 | * The skip flag specifies that no packet is to be sent in a frame; when using | ||
| 500 | * this, all other fields except the interrupt flag must be zero. | ||
| 501 | * | ||
| 502 | * For receive packets, the header length must be a multiple of the context's | ||
| 503 | * header size; if the header length is larger than the context's header size, | ||
| 504 | * multiple packets are queued for this entry. The sy and tag fields are | ||
| 505 | * ignored. If the sync flag is set, the context drops all packets until | ||
| 506 | * a packet with a matching sy field is received (the sync value to wait for is | ||
| 507 | * specified in the &fw_cdev_start_iso structure). The payload length defines | ||
| 508 | * how many payload bytes can be received for one packet (in addition to payload | ||
| 509 | * quadlets that have been defined as headers and are stripped and returned in | ||
| 510 | * the &fw_cdev_event_iso_interrupt structure). If more bytes are received, the | ||
| 511 | * additional bytes are dropped. If less bytes are received, the remaining | ||
| 512 | * bytes in this part of the payload buffer will not be written to, not even by | ||
| 513 | * the next packet, i.e., packets received in consecutive frames will not | ||
| 514 | * necessarily be consecutive in memory. If an entry has queued multiple | ||
| 515 | * packets, the payload length is divided equally among them. | ||
| 516 | * | ||
| 517 | * When a packet with the interrupt flag set has been completed, the | ||
| 518 | * &fw_cdev_event_iso_interrupt event will be sent. An entry that has queued | ||
| 519 | * multiple receive packets is completed when its last packet is completed. | ||
| 488 | */ | 520 | */ |
| 489 | struct fw_cdev_iso_packet { | 521 | struct fw_cdev_iso_packet { |
| 490 | __u32 control; | 522 | __u32 control; |
| @@ -501,7 +533,7 @@ struct fw_cdev_iso_packet { | |||
| 501 | * Queue a number of isochronous packets for reception or transmission. | 533 | * Queue a number of isochronous packets for reception or transmission. |
| 502 | * This ioctl takes a pointer to an array of &fw_cdev_iso_packet structs, | 534 | * This ioctl takes a pointer to an array of &fw_cdev_iso_packet structs, |
| 503 | * which describe how to transmit from or receive into a contiguous region | 535 | * which describe how to transmit from or receive into a contiguous region |
| 504 | * of a mmap()'ed payload buffer. As part of the packet descriptors, | 536 | * of a mmap()'ed payload buffer. As part of transmit packet descriptors, |
| 505 | * a series of headers can be supplied, which will be prepended to the | 537 | * a series of headers can be supplied, which will be prepended to the |
| 506 | * payload during DMA. | 538 | * payload during DMA. |
| 507 | * | 539 | * |
| @@ -620,8 +652,8 @@ struct fw_cdev_get_cycle_timer2 { | |||
| 620 | * instead of allocated. | 652 | * instead of allocated. |
| 621 | * An %FW_CDEV_EVENT_ISO_RESOURCE_DEALLOCATED event concludes this operation. | 653 | * An %FW_CDEV_EVENT_ISO_RESOURCE_DEALLOCATED event concludes this operation. |
| 622 | * | 654 | * |
| 623 | * To summarize, %FW_CDEV_IOC_DEALLOCATE_ISO_RESOURCE allocates iso resources | 655 | * To summarize, %FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE allocates iso resources |
| 624 | * for the lifetime of the fd or handle. | 656 | * for the lifetime of the fd or @handle. |
| 625 | * In contrast, %FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE_ONCE allocates iso resources | 657 | * In contrast, %FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE_ONCE allocates iso resources |
| 626 | * for the duration of a bus generation. | 658 | * for the duration of a bus generation. |
| 627 | * | 659 | * |
diff --git a/include/linux/firewire-constants.h b/include/linux/firewire-constants.h index b316770a43fd..9b4bb5fbba4b 100644 --- a/include/linux/firewire-constants.h +++ b/include/linux/firewire-constants.h | |||
| @@ -1,3 +1,28 @@ | |||
| 1 | /* | ||
| 2 | * IEEE 1394 constants. | ||
| 3 | * | ||
| 4 | * Copyright (C) 2005-2007 Kristian Hoegsberg <krh@bitplanet.net> | ||
| 5 | * | ||
| 6 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
| 7 | * copy of this software and associated documentation files (the "Software"), | ||
| 8 | * to deal in the Software without restriction, including without limitation | ||
| 9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
| 10 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 11 | * Software is furnished to do so, subject to the following conditions: | ||
| 12 | * | ||
| 13 | * The above copyright notice and this permission notice (including the next | ||
| 14 | * paragraph) shall be included in all copies or substantial portions of the | ||
| 15 | * Software. | ||
| 16 | * | ||
| 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 20 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
| 21 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
| 22 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
| 23 | * DEALINGS IN THE SOFTWARE. | ||
| 24 | */ | ||
| 25 | |||
| 1 | #ifndef _LINUX_FIREWIRE_CONSTANTS_H | 26 | #ifndef _LINUX_FIREWIRE_CONSTANTS_H |
| 2 | #define _LINUX_FIREWIRE_CONSTANTS_H | 27 | #define _LINUX_FIREWIRE_CONSTANTS_H |
| 3 | 28 | ||
| @@ -21,7 +46,7 @@ | |||
| 21 | #define EXTCODE_WRAP_ADD 0x6 | 46 | #define EXTCODE_WRAP_ADD 0x6 |
| 22 | #define EXTCODE_VENDOR_DEPENDENT 0x7 | 47 | #define EXTCODE_VENDOR_DEPENDENT 0x7 |
| 23 | 48 | ||
| 24 | /* Juju specific tcodes */ | 49 | /* Linux firewire-core (Juju) specific tcodes */ |
| 25 | #define TCODE_LOCK_MASK_SWAP (0x10 | EXTCODE_MASK_SWAP) | 50 | #define TCODE_LOCK_MASK_SWAP (0x10 | EXTCODE_MASK_SWAP) |
| 26 | #define TCODE_LOCK_COMPARE_SWAP (0x10 | EXTCODE_COMPARE_SWAP) | 51 | #define TCODE_LOCK_COMPARE_SWAP (0x10 | EXTCODE_COMPARE_SWAP) |
| 27 | #define TCODE_LOCK_FETCH_ADD (0x10 | EXTCODE_FETCH_ADD) | 52 | #define TCODE_LOCK_FETCH_ADD (0x10 | EXTCODE_FETCH_ADD) |
| @@ -36,7 +61,7 @@ | |||
| 36 | #define RCODE_TYPE_ERROR 0x6 | 61 | #define RCODE_TYPE_ERROR 0x6 |
| 37 | #define RCODE_ADDRESS_ERROR 0x7 | 62 | #define RCODE_ADDRESS_ERROR 0x7 |
| 38 | 63 | ||
| 39 | /* Juju specific rcodes */ | 64 | /* Linux firewire-core (Juju) specific rcodes */ |
| 40 | #define RCODE_SEND_ERROR 0x10 | 65 | #define RCODE_SEND_ERROR 0x10 |
| 41 | #define RCODE_CANCELLED 0x11 | 66 | #define RCODE_CANCELLED 0x11 |
| 42 | #define RCODE_BUSY 0x12 | 67 | #define RCODE_BUSY 0x12 |
diff --git a/include/linux/freezer.h b/include/linux/freezer.h index 5a361f85cfec..da7e52b099f3 100644 --- a/include/linux/freezer.h +++ b/include/linux/freezer.h | |||
| @@ -64,9 +64,12 @@ extern bool freeze_task(struct task_struct *p, bool sig_only); | |||
| 64 | extern void cancel_freezing(struct task_struct *p); | 64 | extern void cancel_freezing(struct task_struct *p); |
| 65 | 65 | ||
| 66 | #ifdef CONFIG_CGROUP_FREEZER | 66 | #ifdef CONFIG_CGROUP_FREEZER |
| 67 | extern int cgroup_frozen(struct task_struct *task); | 67 | extern int cgroup_freezing_or_frozen(struct task_struct *task); |
| 68 | #else /* !CONFIG_CGROUP_FREEZER */ | 68 | #else /* !CONFIG_CGROUP_FREEZER */ |
| 69 | static inline int cgroup_frozen(struct task_struct *task) { return 0; } | 69 | static inline int cgroup_freezing_or_frozen(struct task_struct *task) |
| 70 | { | ||
| 71 | return 0; | ||
| 72 | } | ||
| 70 | #endif /* !CONFIG_CGROUP_FREEZER */ | 73 | #endif /* !CONFIG_CGROUP_FREEZER */ |
| 71 | 74 | ||
| 72 | /* | 75 | /* |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 10b8dedcd18b..44f35aea2f1f 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -2212,6 +2212,7 @@ extern int generic_segment_checks(const struct iovec *iov, | |||
| 2212 | /* fs/block_dev.c */ | 2212 | /* fs/block_dev.c */ |
| 2213 | extern ssize_t blkdev_aio_write(struct kiocb *iocb, const struct iovec *iov, | 2213 | extern ssize_t blkdev_aio_write(struct kiocb *iocb, const struct iovec *iov, |
| 2214 | unsigned long nr_segs, loff_t pos); | 2214 | unsigned long nr_segs, loff_t pos); |
| 2215 | extern int blkdev_fsync(struct file *filp, struct dentry *dentry, int datasync); | ||
| 2215 | 2216 | ||
| 2216 | /* fs/splice.c */ | 2217 | /* fs/splice.c */ |
| 2217 | extern ssize_t generic_file_splice_read(struct file *, loff_t *, | 2218 | extern ssize_t generic_file_splice_read(struct file *, loff_t *, |
| @@ -2314,8 +2315,9 @@ extern int vfs_fstatat(int , char __user *, struct kstat *, int); | |||
| 2314 | extern int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd, | 2315 | extern int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd, |
| 2315 | unsigned long arg); | 2316 | unsigned long arg); |
| 2316 | extern int __generic_block_fiemap(struct inode *inode, | 2317 | extern int __generic_block_fiemap(struct inode *inode, |
| 2317 | struct fiemap_extent_info *fieinfo, u64 start, | 2318 | struct fiemap_extent_info *fieinfo, |
| 2318 | u64 len, get_block_t *get_block); | 2319 | loff_t start, loff_t len, |
| 2320 | get_block_t *get_block); | ||
| 2319 | extern int generic_block_fiemap(struct inode *inode, | 2321 | extern int generic_block_fiemap(struct inode *inode, |
| 2320 | struct fiemap_extent_info *fieinfo, u64 start, | 2322 | struct fiemap_extent_info *fieinfo, u64 start, |
| 2321 | u64 len, get_block_t *get_block); | 2323 | u64 len, get_block_t *get_block); |
diff --git a/include/linux/fscache-cache.h b/include/linux/fscache-cache.h index 7be0c6fbe880..c57db27ac861 100644 --- a/include/linux/fscache-cache.h +++ b/include/linux/fscache-cache.h | |||
| @@ -105,7 +105,7 @@ struct fscache_operation { | |||
| 105 | /* operation releaser */ | 105 | /* operation releaser */ |
| 106 | fscache_operation_release_t release; | 106 | fscache_operation_release_t release; |
| 107 | 107 | ||
| 108 | #ifdef CONFIG_SLOW_WORK_PROC | 108 | #ifdef CONFIG_SLOW_WORK_DEBUG |
| 109 | const char *name; /* operation name */ | 109 | const char *name; /* operation name */ |
| 110 | const char *state; /* operation state */ | 110 | const char *state; /* operation state */ |
| 111 | #define fscache_set_op_name(OP, N) do { (OP)->name = (N); } while(0) | 111 | #define fscache_set_op_name(OP, N) do { (OP)->name = (N); } while(0) |
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index df8fd9a3b214..01755909ce81 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | #include <linux/inotify.h> | 15 | #include <linux/inotify.h> |
| 16 | #include <linux/fsnotify_backend.h> | 16 | #include <linux/fsnotify_backend.h> |
| 17 | #include <linux/audit.h> | 17 | #include <linux/audit.h> |
| 18 | #include <linux/slab.h> | ||
| 18 | 19 | ||
| 19 | /* | 20 | /* |
| 20 | * fsnotify_d_instantiate - instantiate a dentry for inode | 21 | * fsnotify_d_instantiate - instantiate a dentry for inode |
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index 01e6adea07ec..41e46330d9be 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
| @@ -82,9 +82,13 @@ void clear_ftrace_function(void); | |||
| 82 | extern void ftrace_stub(unsigned long a0, unsigned long a1); | 82 | extern void ftrace_stub(unsigned long a0, unsigned long a1); |
| 83 | 83 | ||
| 84 | #else /* !CONFIG_FUNCTION_TRACER */ | 84 | #else /* !CONFIG_FUNCTION_TRACER */ |
| 85 | # define register_ftrace_function(ops) do { } while (0) | 85 | /* |
| 86 | # define unregister_ftrace_function(ops) do { } while (0) | 86 | * (un)register_ftrace_function must be a macro since the ops parameter |
| 87 | # define clear_ftrace_function(ops) do { } while (0) | 87 | * must not be evaluated. |
| 88 | */ | ||
| 89 | #define register_ftrace_function(ops) ({ 0; }) | ||
| 90 | #define unregister_ftrace_function(ops) ({ 0; }) | ||
| 91 | static inline void clear_ftrace_function(void) { } | ||
| 88 | static inline void ftrace_kill(void) { } | 92 | static inline void ftrace_kill(void) { } |
| 89 | static inline void ftrace_stop(void) { } | 93 | static inline void ftrace_stop(void) { } |
| 90 | static inline void ftrace_start(void) { } | 94 | static inline void ftrace_start(void) { } |
| @@ -237,11 +241,13 @@ extern int skip_trace(unsigned long ip); | |||
| 237 | extern void ftrace_disable_daemon(void); | 241 | extern void ftrace_disable_daemon(void); |
| 238 | extern void ftrace_enable_daemon(void); | 242 | extern void ftrace_enable_daemon(void); |
| 239 | #else | 243 | #else |
| 240 | # define skip_trace(ip) ({ 0; }) | 244 | static inline int skip_trace(unsigned long ip) { return 0; } |
| 241 | # define ftrace_force_update() ({ 0; }) | 245 | static inline int ftrace_force_update(void) { return 0; } |
| 242 | # define ftrace_set_filter(buf, len, reset) do { } while (0) | 246 | static inline void ftrace_set_filter(unsigned char *buf, int len, int reset) |
| 243 | # define ftrace_disable_daemon() do { } while (0) | 247 | { |
| 244 | # define ftrace_enable_daemon() do { } while (0) | 248 | } |
| 249 | static inline void ftrace_disable_daemon(void) { } | ||
| 250 | static inline void ftrace_enable_daemon(void) { } | ||
| 245 | static inline void ftrace_release_mod(struct module *mod) {} | 251 | static inline void ftrace_release_mod(struct module *mod) {} |
| 246 | static inline int register_ftrace_command(struct ftrace_func_command *cmd) | 252 | static inline int register_ftrace_command(struct ftrace_func_command *cmd) |
| 247 | { | 253 | { |
| @@ -314,16 +320,16 @@ static inline void __ftrace_enabled_restore(int enabled) | |||
| 314 | extern void time_hardirqs_on(unsigned long a0, unsigned long a1); | 320 | extern void time_hardirqs_on(unsigned long a0, unsigned long a1); |
| 315 | extern void time_hardirqs_off(unsigned long a0, unsigned long a1); | 321 | extern void time_hardirqs_off(unsigned long a0, unsigned long a1); |
| 316 | #else | 322 | #else |
| 317 | # define time_hardirqs_on(a0, a1) do { } while (0) | 323 | static inline void time_hardirqs_on(unsigned long a0, unsigned long a1) { } |
| 318 | # define time_hardirqs_off(a0, a1) do { } while (0) | 324 | static inline void time_hardirqs_off(unsigned long a0, unsigned long a1) { } |
| 319 | #endif | 325 | #endif |
| 320 | 326 | ||
| 321 | #ifdef CONFIG_PREEMPT_TRACER | 327 | #ifdef CONFIG_PREEMPT_TRACER |
| 322 | extern void trace_preempt_on(unsigned long a0, unsigned long a1); | 328 | extern void trace_preempt_on(unsigned long a0, unsigned long a1); |
| 323 | extern void trace_preempt_off(unsigned long a0, unsigned long a1); | 329 | extern void trace_preempt_off(unsigned long a0, unsigned long a1); |
| 324 | #else | 330 | #else |
| 325 | # define trace_preempt_on(a0, a1) do { } while (0) | 331 | static inline void trace_preempt_on(unsigned long a0, unsigned long a1) { } |
| 326 | # define trace_preempt_off(a0, a1) do { } while (0) | 332 | static inline void trace_preempt_off(unsigned long a0, unsigned long a1) { } |
| 327 | #endif | 333 | #endif |
| 328 | 334 | ||
| 329 | #ifdef CONFIG_FTRACE_MCOUNT_RECORD | 335 | #ifdef CONFIG_FTRACE_MCOUNT_RECORD |
| @@ -352,6 +358,10 @@ struct ftrace_graph_ret { | |||
| 352 | int depth; | 358 | int depth; |
| 353 | }; | 359 | }; |
| 354 | 360 | ||
| 361 | /* Type of the callback handlers for tracing function graph*/ | ||
| 362 | typedef void (*trace_func_graph_ret_t)(struct ftrace_graph_ret *); /* return */ | ||
| 363 | typedef int (*trace_func_graph_ent_t)(struct ftrace_graph_ent *); /* entry */ | ||
| 364 | |||
| 355 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER | 365 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER |
| 356 | 366 | ||
| 357 | /* for init task */ | 367 | /* for init task */ |
| @@ -400,10 +410,6 @@ extern char __irqentry_text_end[]; | |||
| 400 | 410 | ||
| 401 | #define FTRACE_RETFUNC_DEPTH 50 | 411 | #define FTRACE_RETFUNC_DEPTH 50 |
| 402 | #define FTRACE_RETSTACK_ALLOC_SIZE 32 | 412 | #define FTRACE_RETSTACK_ALLOC_SIZE 32 |
| 403 | /* Type of the callback handlers for tracing function graph*/ | ||
| 404 | typedef void (*trace_func_graph_ret_t)(struct ftrace_graph_ret *); /* return */ | ||
| 405 | typedef int (*trace_func_graph_ent_t)(struct ftrace_graph_ent *); /* entry */ | ||
| 406 | |||
| 407 | extern int register_ftrace_graph(trace_func_graph_ret_t retfunc, | 413 | extern int register_ftrace_graph(trace_func_graph_ret_t retfunc, |
| 408 | trace_func_graph_ent_t entryfunc); | 414 | trace_func_graph_ent_t entryfunc); |
| 409 | 415 | ||
| @@ -441,6 +447,13 @@ static inline void unpause_graph_tracing(void) | |||
| 441 | static inline void ftrace_graph_init_task(struct task_struct *t) { } | 447 | static inline void ftrace_graph_init_task(struct task_struct *t) { } |
| 442 | static inline void ftrace_graph_exit_task(struct task_struct *t) { } | 448 | static inline void ftrace_graph_exit_task(struct task_struct *t) { } |
| 443 | 449 | ||
| 450 | static inline int register_ftrace_graph(trace_func_graph_ret_t retfunc, | ||
| 451 | trace_func_graph_ent_t entryfunc) | ||
| 452 | { | ||
| 453 | return -1; | ||
| 454 | } | ||
| 455 | static inline void unregister_ftrace_graph(void) { } | ||
| 456 | |||
| 444 | static inline int task_curr_ret_stack(struct task_struct *tsk) | 457 | static inline int task_curr_ret_stack(struct task_struct *tsk) |
| 445 | { | 458 | { |
| 446 | return -1; | 459 | return -1; |
| @@ -492,7 +505,9 @@ static inline int test_tsk_trace_graph(struct task_struct *tsk) | |||
| 492 | return tsk->trace & TSK_TRACE_FL_GRAPH; | 505 | return tsk->trace & TSK_TRACE_FL_GRAPH; |
| 493 | } | 506 | } |
| 494 | 507 | ||
| 495 | extern int ftrace_dump_on_oops; | 508 | enum ftrace_dump_mode; |
| 509 | |||
| 510 | extern enum ftrace_dump_mode ftrace_dump_on_oops; | ||
| 496 | 511 | ||
| 497 | #ifdef CONFIG_PREEMPT | 512 | #ifdef CONFIG_PREEMPT |
| 498 | #define INIT_TRACE_RECURSION .trace_recursion = 0, | 513 | #define INIT_TRACE_RECURSION .trace_recursion = 0, |
| @@ -504,18 +519,6 @@ extern int ftrace_dump_on_oops; | |||
| 504 | #define INIT_TRACE_RECURSION | 519 | #define INIT_TRACE_RECURSION |
| 505 | #endif | 520 | #endif |
| 506 | 521 | ||
| 507 | #ifdef CONFIG_HW_BRANCH_TRACER | ||
| 508 | |||
| 509 | void trace_hw_branch(u64 from, u64 to); | ||
| 510 | void trace_hw_branch_oops(void); | ||
| 511 | |||
| 512 | #else /* CONFIG_HW_BRANCH_TRACER */ | ||
| 513 | |||
| 514 | static inline void trace_hw_branch(u64 from, u64 to) {} | ||
| 515 | static inline void trace_hw_branch_oops(void) {} | ||
| 516 | |||
| 517 | #endif /* CONFIG_HW_BRANCH_TRACER */ | ||
| 518 | |||
| 519 | #ifdef CONFIG_FTRACE_SYSCALLS | 522 | #ifdef CONFIG_FTRACE_SYSCALLS |
| 520 | 523 | ||
| 521 | unsigned long arch_syscall_addr(int nr); | 524 | unsigned long arch_syscall_addr(int nr); |
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index 6b7c444ab8f6..39e71b0a3bfd 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h | |||
| @@ -58,6 +58,7 @@ struct trace_iterator { | |||
| 58 | /* The below is zeroed out in pipe_read */ | 58 | /* The below is zeroed out in pipe_read */ |
| 59 | struct trace_seq seq; | 59 | struct trace_seq seq; |
| 60 | struct trace_entry *ent; | 60 | struct trace_entry *ent; |
| 61 | unsigned long lost_events; | ||
| 61 | int leftover; | 62 | int leftover; |
| 62 | int cpu; | 63 | int cpu; |
| 63 | u64 ts; | 64 | u64 ts; |
| @@ -131,12 +132,12 @@ struct ftrace_event_call { | |||
| 131 | void *mod; | 132 | void *mod; |
| 132 | void *data; | 133 | void *data; |
| 133 | 134 | ||
| 134 | int profile_count; | 135 | int perf_refcount; |
| 135 | int (*profile_enable)(struct ftrace_event_call *); | 136 | int (*perf_event_enable)(struct ftrace_event_call *); |
| 136 | void (*profile_disable)(struct ftrace_event_call *); | 137 | void (*perf_event_disable)(struct ftrace_event_call *); |
| 137 | }; | 138 | }; |
| 138 | 139 | ||
| 139 | #define FTRACE_MAX_PROFILE_SIZE 2048 | 140 | #define PERF_MAX_TRACE_SIZE 2048 |
| 140 | 141 | ||
| 141 | #define MAX_FILTER_PRED 32 | 142 | #define MAX_FILTER_PRED 32 |
| 142 | #define MAX_FILTER_STR_VAL 256 /* Should handle KSYM_SYMBOL_LEN */ | 143 | #define MAX_FILTER_STR_VAL 256 /* Should handle KSYM_SYMBOL_LEN */ |
| @@ -187,22 +188,25 @@ do { \ | |||
| 187 | 188 | ||
| 188 | #ifdef CONFIG_PERF_EVENTS | 189 | #ifdef CONFIG_PERF_EVENTS |
| 189 | struct perf_event; | 190 | struct perf_event; |
| 190 | extern int ftrace_profile_enable(int event_id); | 191 | |
| 191 | extern void ftrace_profile_disable(int event_id); | 192 | DECLARE_PER_CPU(struct pt_regs, perf_trace_regs); |
| 193 | |||
| 194 | extern int perf_trace_enable(int event_id); | ||
| 195 | extern void perf_trace_disable(int event_id); | ||
| 192 | extern int ftrace_profile_set_filter(struct perf_event *event, int event_id, | 196 | extern int ftrace_profile_set_filter(struct perf_event *event, int event_id, |
| 193 | char *filter_str); | 197 | char *filter_str); |
| 194 | extern void ftrace_profile_free_filter(struct perf_event *event); | 198 | extern void ftrace_profile_free_filter(struct perf_event *event); |
| 195 | extern void * | 199 | extern void * |
| 196 | ftrace_perf_buf_prepare(int size, unsigned short type, int *rctxp, | 200 | perf_trace_buf_prepare(int size, unsigned short type, int *rctxp, |
| 197 | unsigned long *irq_flags); | 201 | unsigned long *irq_flags); |
| 198 | 202 | ||
| 199 | static inline void | 203 | static inline void |
| 200 | ftrace_perf_buf_submit(void *raw_data, int size, int rctx, u64 addr, | 204 | perf_trace_buf_submit(void *raw_data, int size, int rctx, u64 addr, |
| 201 | u64 count, unsigned long irq_flags) | 205 | u64 count, unsigned long irq_flags, struct pt_regs *regs) |
| 202 | { | 206 | { |
| 203 | struct trace_entry *entry = raw_data; | 207 | struct trace_entry *entry = raw_data; |
| 204 | 208 | ||
| 205 | perf_tp_event(entry->type, addr, count, raw_data, size); | 209 | perf_tp_event(entry->type, addr, count, raw_data, size, regs); |
| 206 | perf_swevent_put_recursion_context(rctx); | 210 | perf_swevent_put_recursion_context(rctx); |
| 207 | local_irq_restore(irq_flags); | 211 | local_irq_restore(irq_flags); |
| 208 | } | 212 | } |
diff --git a/include/linux/gameport.h b/include/linux/gameport.h index 48e68da097f6..361d1cc288d0 100644 --- a/include/linux/gameport.h +++ b/include/linux/gameport.h | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #include <linux/mutex.h> | 16 | #include <linux/mutex.h> |
| 17 | #include <linux/device.h> | 17 | #include <linux/device.h> |
| 18 | #include <linux/timer.h> | 18 | #include <linux/timer.h> |
| 19 | #include <linux/slab.h> | ||
| 19 | 20 | ||
| 20 | struct gameport { | 21 | struct gameport { |
| 21 | 22 | ||
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 56b50514ab25..5f2f4c4d8fb0 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
| @@ -109,7 +109,7 @@ struct hd_struct { | |||
| 109 | }; | 109 | }; |
| 110 | 110 | ||
| 111 | #define GENHD_FL_REMOVABLE 1 | 111 | #define GENHD_FL_REMOVABLE 1 |
| 112 | #define GENHD_FL_DRIVERFS 2 | 112 | /* 2 is unused */ |
| 113 | #define GENHD_FL_MEDIA_CHANGE_NOTIFY 4 | 113 | #define GENHD_FL_MEDIA_CHANGE_NOTIFY 4 |
| 114 | #define GENHD_FL_CD 8 | 114 | #define GENHD_FL_CD 8 |
| 115 | #define GENHD_FL_UP 16 | 115 | #define GENHD_FL_UP 16 |
diff --git a/include/linux/hil.h b/include/linux/hil.h index 13352d7d0caf..523785a9de70 100644 --- a/include/linux/hil.h +++ b/include/linux/hil.h | |||
| @@ -168,14 +168,14 @@ enum hil_command { | |||
| 168 | HIL_CMD_PR6 = 0x45, /* Prompt6 */ | 168 | HIL_CMD_PR6 = 0x45, /* Prompt6 */ |
| 169 | HIL_CMD_PR7 = 0x46, /* Prompt7 */ | 169 | HIL_CMD_PR7 = 0x46, /* Prompt7 */ |
| 170 | HIL_CMD_PRM = 0x47, /* Prompt (General Purpose) */ | 170 | HIL_CMD_PRM = 0x47, /* Prompt (General Purpose) */ |
| 171 | HIL_CMD_AK1 = 0x48, /* Acknowlege1 */ | 171 | HIL_CMD_AK1 = 0x48, /* Acknowledge1 */ |
| 172 | HIL_CMD_AK2 = 0x49, /* Acknowlege2 */ | 172 | HIL_CMD_AK2 = 0x49, /* Acknowledge2 */ |
| 173 | HIL_CMD_AK3 = 0x4a, /* Acknowlege3 */ | 173 | HIL_CMD_AK3 = 0x4a, /* Acknowledge3 */ |
| 174 | HIL_CMD_AK4 = 0x4b, /* Acknowlege4 */ | 174 | HIL_CMD_AK4 = 0x4b, /* Acknowledge4 */ |
| 175 | HIL_CMD_AK5 = 0x4c, /* Acknowlege5 */ | 175 | HIL_CMD_AK5 = 0x4c, /* Acknowledge5 */ |
| 176 | HIL_CMD_AK6 = 0x4d, /* Acknowlege6 */ | 176 | HIL_CMD_AK6 = 0x4d, /* Acknowledge6 */ |
| 177 | HIL_CMD_AK7 = 0x4e, /* Acknowlege7 */ | 177 | HIL_CMD_AK7 = 0x4e, /* Acknowledge7 */ |
| 178 | HIL_CMD_ACK = 0x4f, /* Acknowlege (General Purpose) */ | 178 | HIL_CMD_ACK = 0x4f, /* Acknowledge (General Purpose) */ |
| 179 | 179 | ||
| 180 | /* 0x50 to 0x78 reserved for future use */ | 180 | /* 0x50 to 0x78 reserved for future use */ |
| 181 | /* 0x80 to 0xEF device-specific commands */ | 181 | /* 0x80 to 0xEF device-specific commands */ |
diff --git a/include/linux/hw_breakpoint.h b/include/linux/hw_breakpoint.h index 5977b724f7c6..a2d6ea49ec56 100644 --- a/include/linux/hw_breakpoint.h +++ b/include/linux/hw_breakpoint.h | |||
| @@ -9,9 +9,22 @@ enum { | |||
| 9 | }; | 9 | }; |
| 10 | 10 | ||
| 11 | enum { | 11 | enum { |
| 12 | HW_BREAKPOINT_R = 1, | 12 | HW_BREAKPOINT_EMPTY = 0, |
| 13 | HW_BREAKPOINT_W = 2, | 13 | HW_BREAKPOINT_R = 1, |
| 14 | HW_BREAKPOINT_X = 4, | 14 | HW_BREAKPOINT_W = 2, |
| 15 | HW_BREAKPOINT_RW = HW_BREAKPOINT_R | HW_BREAKPOINT_W, | ||
| 16 | HW_BREAKPOINT_X = 4, | ||
| 17 | HW_BREAKPOINT_INVALID = HW_BREAKPOINT_RW | HW_BREAKPOINT_X, | ||
| 18 | }; | ||
| 19 | |||
| 20 | enum bp_type_idx { | ||
| 21 | TYPE_INST = 0, | ||
| 22 | #ifdef CONFIG_HAVE_MIXED_BREAKPOINTS_REGS | ||
| 23 | TYPE_DATA = 0, | ||
| 24 | #else | ||
| 25 | TYPE_DATA = 1, | ||
| 26 | #endif | ||
| 27 | TYPE_MAX | ||
| 15 | }; | 28 | }; |
| 16 | 29 | ||
| 17 | #ifdef __KERNEL__ | 30 | #ifdef __KERNEL__ |
| @@ -34,6 +47,12 @@ static inline void hw_breakpoint_init(struct perf_event_attr *attr) | |||
| 34 | attr->sample_period = 1; | 47 | attr->sample_period = 1; |
| 35 | } | 48 | } |
| 36 | 49 | ||
| 50 | static inline void ptrace_breakpoint_init(struct perf_event_attr *attr) | ||
| 51 | { | ||
| 52 | hw_breakpoint_init(attr); | ||
| 53 | attr->exclude_kernel = 1; | ||
| 54 | } | ||
| 55 | |||
| 37 | static inline unsigned long hw_breakpoint_addr(struct perf_event *bp) | 56 | static inline unsigned long hw_breakpoint_addr(struct perf_event *bp) |
| 38 | { | 57 | { |
| 39 | return bp->attr.bp_addr; | 58 | return bp->attr.bp_addr; |
| @@ -66,14 +85,14 @@ register_wide_hw_breakpoint_cpu(struct perf_event_attr *attr, | |||
| 66 | perf_overflow_handler_t triggered, | 85 | perf_overflow_handler_t triggered, |
| 67 | int cpu); | 86 | int cpu); |
| 68 | 87 | ||
| 69 | extern struct perf_event ** | 88 | extern struct perf_event * __percpu * |
| 70 | register_wide_hw_breakpoint(struct perf_event_attr *attr, | 89 | register_wide_hw_breakpoint(struct perf_event_attr *attr, |
| 71 | perf_overflow_handler_t triggered); | 90 | perf_overflow_handler_t triggered); |
| 72 | 91 | ||
| 73 | extern int register_perf_hw_breakpoint(struct perf_event *bp); | 92 | extern int register_perf_hw_breakpoint(struct perf_event *bp); |
| 74 | extern int __register_perf_hw_breakpoint(struct perf_event *bp); | 93 | extern int __register_perf_hw_breakpoint(struct perf_event *bp); |
| 75 | extern void unregister_hw_breakpoint(struct perf_event *bp); | 94 | extern void unregister_hw_breakpoint(struct perf_event *bp); |
| 76 | extern void unregister_wide_hw_breakpoint(struct perf_event **cpu_events); | 95 | extern void unregister_wide_hw_breakpoint(struct perf_event * __percpu *cpu_events); |
| 77 | 96 | ||
| 78 | extern int dbg_reserve_bp_slot(struct perf_event *bp); | 97 | extern int dbg_reserve_bp_slot(struct perf_event *bp); |
| 79 | extern int dbg_release_bp_slot(struct perf_event *bp); | 98 | extern int dbg_release_bp_slot(struct perf_event *bp); |
| @@ -100,7 +119,7 @@ static inline struct perf_event * | |||
| 100 | register_wide_hw_breakpoint_cpu(struct perf_event_attr *attr, | 119 | register_wide_hw_breakpoint_cpu(struct perf_event_attr *attr, |
| 101 | perf_overflow_handler_t triggered, | 120 | perf_overflow_handler_t triggered, |
| 102 | int cpu) { return NULL; } | 121 | int cpu) { return NULL; } |
| 103 | static inline struct perf_event ** | 122 | static inline struct perf_event * __percpu * |
| 104 | register_wide_hw_breakpoint(struct perf_event_attr *attr, | 123 | register_wide_hw_breakpoint(struct perf_event_attr *attr, |
| 105 | perf_overflow_handler_t triggered) { return NULL; } | 124 | perf_overflow_handler_t triggered) { return NULL; } |
| 106 | static inline int | 125 | static inline int |
| @@ -109,7 +128,7 @@ static inline int | |||
| 109 | __register_perf_hw_breakpoint(struct perf_event *bp) { return -ENOSYS; } | 128 | __register_perf_hw_breakpoint(struct perf_event *bp) { return -ENOSYS; } |
| 110 | static inline void unregister_hw_breakpoint(struct perf_event *bp) { } | 129 | static inline void unregister_hw_breakpoint(struct perf_event *bp) { } |
| 111 | static inline void | 130 | static inline void |
| 112 | unregister_wide_hw_breakpoint(struct perf_event **cpu_events) { } | 131 | unregister_wide_hw_breakpoint(struct perf_event * __percpu *cpu_events) { } |
| 113 | static inline int | 132 | static inline int |
| 114 | reserve_bp_slot(struct perf_event *bp) {return -ENOSYS; } | 133 | reserve_bp_slot(struct perf_event *bp) {return -ENOSYS; } |
| 115 | static inline void release_bp_slot(struct perf_event *bp) { } | 134 | static inline void release_bp_slot(struct perf_event *bp) { } |
diff --git a/include/linux/i2c-algo-bit.h b/include/linux/i2c-algo-bit.h index 111334f5b922..4f98148c11c3 100644 --- a/include/linux/i2c-algo-bit.h +++ b/include/linux/i2c-algo-bit.h | |||
| @@ -36,6 +36,8 @@ struct i2c_algo_bit_data { | |||
| 36 | void (*setscl) (void *data, int state); | 36 | void (*setscl) (void *data, int state); |
| 37 | int (*getsda) (void *data); | 37 | int (*getsda) (void *data); |
| 38 | int (*getscl) (void *data); | 38 | int (*getscl) (void *data); |
| 39 | int (*pre_xfer) (struct i2c_adapter *); | ||
| 40 | void (*post_xfer) (struct i2c_adapter *); | ||
| 39 | 41 | ||
| 40 | /* local settings */ | 42 | /* local settings */ |
| 41 | int udelay; /* half clock cycle time in us, | 43 | int udelay; /* half clock cycle time in us, |
diff --git a/include/linux/i2c-xiic.h b/include/linux/i2c-xiic.h new file mode 100644 index 000000000000..4f9f2256a97e --- /dev/null +++ b/include/linux/i2c-xiic.h | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | /* | ||
| 2 | * i2c-xiic.h | ||
| 3 | * Copyright (c) 2009 Intel Corporation | ||
| 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 version 2 as | ||
| 7 | * published by the Free Software Foundation. | ||
| 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 | |||
| 19 | /* Supports: | ||
| 20 | * Xilinx IIC | ||
| 21 | */ | ||
| 22 | |||
| 23 | #ifndef _LINUX_I2C_XIIC_H | ||
| 24 | #define _LINUX_I2C_XIIC_H | ||
| 25 | |||
| 26 | /** | ||
| 27 | * struct xiic_i2c_platform_data - Platform data of the Xilinx I2C driver | ||
| 28 | * @num_devices: Number of devices that shall be added when the driver | ||
| 29 | * is probed. | ||
| 30 | * @devices: The actuall devices to add. | ||
| 31 | * | ||
| 32 | * This purpose of this platform data struct is to be able to provide a number | ||
| 33 | * of devices that should be added to the I2C bus. The reason is that sometimes | ||
| 34 | * the I2C board info is not enough, a new PCI board can for instance be | ||
| 35 | * plugged into a standard PC, and the bus number might be unknown at | ||
| 36 | * early init time. | ||
| 37 | */ | ||
| 38 | struct xiic_i2c_platform_data { | ||
| 39 | u8 num_devices; | ||
| 40 | struct i2c_board_info const *devices; | ||
| 41 | }; | ||
| 42 | |||
| 43 | #endif /* _LINUX_I2C_XIIC_H */ | ||
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 0a5da639b327..6ed1d59bfb1e 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
| @@ -355,6 +355,8 @@ struct i2c_adapter { | |||
| 355 | int nr; | 355 | int nr; |
| 356 | char name[48]; | 356 | char name[48]; |
| 357 | struct completion dev_released; | 357 | struct completion dev_released; |
| 358 | |||
| 359 | struct list_head userspace_clients; | ||
| 358 | }; | 360 | }; |
| 359 | #define to_i2c_adapter(d) container_of(d, struct i2c_adapter, dev) | 361 | #define to_i2c_adapter(d) container_of(d, struct i2c_adapter, dev) |
| 360 | 362 | ||
diff --git a/include/linux/i2o.h b/include/linux/i2o.h index 87018dc5527d..9e7a12d6385d 100644 --- a/include/linux/i2o.h +++ b/include/linux/i2o.h | |||
| @@ -782,7 +782,6 @@ extern int i2o_exec_lct_get(struct i2o_controller *); | |||
| 782 | #define to_i2o_driver(drv) container_of(drv,struct i2o_driver, driver) | 782 | #define to_i2o_driver(drv) container_of(drv,struct i2o_driver, driver) |
| 783 | #define to_i2o_device(dev) container_of(dev, struct i2o_device, device) | 783 | #define to_i2o_device(dev) container_of(dev, struct i2o_device, device) |
| 784 | #define to_i2o_controller(dev) container_of(dev, struct i2o_controller, device) | 784 | #define to_i2o_controller(dev) container_of(dev, struct i2o_controller, device) |
| 785 | #define kobj_to_i2o_device(kobj) to_i2o_device(container_of(kobj, struct device, kobj)) | ||
| 786 | 785 | ||
| 787 | /** | 786 | /** |
| 788 | * i2o_out_to_virt - Turn an I2O message to a virtual address | 787 | * i2o_out_to_virt - Turn an I2O message to a virtual address |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 97e6ab435184..3239d1c10acb 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
| @@ -1169,6 +1169,7 @@ extern void ide_stall_queue(ide_drive_t *drive, unsigned long timeout); | |||
| 1169 | extern void ide_timer_expiry(unsigned long); | 1169 | extern void ide_timer_expiry(unsigned long); |
| 1170 | extern irqreturn_t ide_intr(int irq, void *dev_id); | 1170 | extern irqreturn_t ide_intr(int irq, void *dev_id); |
| 1171 | extern void do_ide_request(struct request_queue *); | 1171 | extern void do_ide_request(struct request_queue *); |
| 1172 | extern void ide_requeue_and_plug(ide_drive_t *drive, struct request *rq); | ||
| 1172 | 1173 | ||
| 1173 | void ide_init_disk(struct gendisk *, ide_drive_t *); | 1174 | void ide_init_disk(struct gendisk *, ide_drive_t *); |
| 1174 | 1175 | ||
diff --git a/include/linux/if_link.h b/include/linux/if_link.h index c9bf92cd7653..d94963b379d9 100644 --- a/include/linux/if_link.h +++ b/include/linux/if_link.h | |||
| @@ -79,10 +79,7 @@ enum { | |||
| 79 | IFLA_NET_NS_PID, | 79 | IFLA_NET_NS_PID, |
| 80 | IFLA_IFALIAS, | 80 | IFLA_IFALIAS, |
| 81 | IFLA_NUM_VF, /* Number of VFs if device is SR-IOV PF */ | 81 | IFLA_NUM_VF, /* Number of VFs if device is SR-IOV PF */ |
| 82 | IFLA_VF_MAC, /* Hardware queue specific attributes */ | 82 | IFLA_VFINFO_LIST, |
| 83 | IFLA_VF_VLAN, | ||
| 84 | IFLA_VF_TX_RATE, /* TX Bandwidth Allocation */ | ||
| 85 | IFLA_VFINFO, | ||
| 86 | __IFLA_MAX | 83 | __IFLA_MAX |
| 87 | }; | 84 | }; |
| 88 | 85 | ||
| @@ -203,6 +200,24 @@ enum macvlan_mode { | |||
| 203 | 200 | ||
| 204 | /* SR-IOV virtual function managment section */ | 201 | /* SR-IOV virtual function managment section */ |
| 205 | 202 | ||
| 203 | enum { | ||
| 204 | IFLA_VF_INFO_UNSPEC, | ||
| 205 | IFLA_VF_INFO, | ||
| 206 | __IFLA_VF_INFO_MAX, | ||
| 207 | }; | ||
| 208 | |||
| 209 | #define IFLA_VF_INFO_MAX (__IFLA_VF_INFO_MAX - 1) | ||
| 210 | |||
| 211 | enum { | ||
| 212 | IFLA_VF_UNSPEC, | ||
| 213 | IFLA_VF_MAC, /* Hardware queue specific attributes */ | ||
| 214 | IFLA_VF_VLAN, | ||
| 215 | IFLA_VF_TX_RATE, /* TX Bandwidth Allocation */ | ||
| 216 | __IFLA_VF_MAX, | ||
| 217 | }; | ||
| 218 | |||
| 219 | #define IFLA_VF_MAX (__IFLA_VF_MAX - 1) | ||
| 220 | |||
| 206 | struct ifla_vf_mac { | 221 | struct ifla_vf_mac { |
| 207 | __u32 vf; | 222 | __u32 vf; |
| 208 | __u8 mac[32]; /* MAX_ADDR_LEN */ | 223 | __u8 mac[32]; /* MAX_ADDR_LEN */ |
diff --git a/include/linux/if_tunnel.h b/include/linux/if_tunnel.h index 1822d635be6b..16b92d008bed 100644 --- a/include/linux/if_tunnel.h +++ b/include/linux/if_tunnel.h | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | #define _IF_TUNNEL_H_ | 2 | #define _IF_TUNNEL_H_ |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
| 5 | #include <asm/byteorder.h> | ||
| 5 | 6 | ||
| 6 | #ifdef __KERNEL__ | 7 | #ifdef __KERNEL__ |
| 7 | #include <linux/ip.h> | 8 | #include <linux/ip.h> |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index abec69b63d7e..7996fc2c9ba9 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
| @@ -32,14 +32,6 @@ extern struct fs_struct init_fs; | |||
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | extern struct nsproxy init_nsproxy; | 34 | extern struct nsproxy init_nsproxy; |
| 35 | #define INIT_NSPROXY(nsproxy) { \ | ||
| 36 | .pid_ns = &init_pid_ns, \ | ||
| 37 | .count = ATOMIC_INIT(1), \ | ||
| 38 | .uts_ns = &init_uts_ns, \ | ||
| 39 | .mnt_ns = NULL, \ | ||
| 40 | INIT_NET_NS(net_ns) \ | ||
| 41 | INIT_IPC_NS(ipc_ns) \ | ||
| 42 | } | ||
| 43 | 35 | ||
| 44 | #define INIT_SIGHAND(sighand) { \ | 36 | #define INIT_SIGHAND(sighand) { \ |
| 45 | .count = ATOMIC_INIT(1), \ | 37 | .count = ATOMIC_INIT(1), \ |
| @@ -57,7 +49,6 @@ extern struct group_info init_groups; | |||
| 57 | { .first = &init_task.pids[PIDTYPE_PGID].node }, \ | 49 | { .first = &init_task.pids[PIDTYPE_PGID].node }, \ |
| 58 | { .first = &init_task.pids[PIDTYPE_SID].node }, \ | 50 | { .first = &init_task.pids[PIDTYPE_SID].node }, \ |
| 59 | }, \ | 51 | }, \ |
| 60 | .rcu = RCU_HEAD_INIT, \ | ||
| 61 | .level = 0, \ | 52 | .level = 0, \ |
| 62 | .numbers = { { \ | 53 | .numbers = { { \ |
| 63 | .nr = 0, \ | 54 | .nr = 0, \ |
diff --git a/include/linux/input.h b/include/linux/input.h index dc24effb6d0e..7ed2251b33f1 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
| @@ -58,10 +58,10 @@ struct input_absinfo { | |||
| 58 | 58 | ||
| 59 | #define EVIOCGVERSION _IOR('E', 0x01, int) /* get driver version */ | 59 | #define EVIOCGVERSION _IOR('E', 0x01, int) /* get driver version */ |
| 60 | #define EVIOCGID _IOR('E', 0x02, struct input_id) /* get device ID */ | 60 | #define EVIOCGID _IOR('E', 0x02, struct input_id) /* get device ID */ |
| 61 | #define EVIOCGREP _IOR('E', 0x03, int[2]) /* get repeat settings */ | 61 | #define EVIOCGREP _IOR('E', 0x03, unsigned int[2]) /* get repeat settings */ |
| 62 | #define EVIOCSREP _IOW('E', 0x03, int[2]) /* set repeat settings */ | 62 | #define EVIOCSREP _IOW('E', 0x03, unsigned int[2]) /* set repeat settings */ |
| 63 | #define EVIOCGKEYCODE _IOR('E', 0x04, int[2]) /* get keycode */ | 63 | #define EVIOCGKEYCODE _IOR('E', 0x04, unsigned int[2]) /* get keycode */ |
| 64 | #define EVIOCSKEYCODE _IOW('E', 0x04, int[2]) /* set keycode */ | 64 | #define EVIOCSKEYCODE _IOW('E', 0x04, unsigned int[2]) /* set keycode */ |
| 65 | 65 | ||
| 66 | #define EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x06, len) /* get device name */ | 66 | #define EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x06, len) /* get device name */ |
| 67 | #define EVIOCGPHYS(len) _IOC(_IOC_READ, 'E', 0x07, len) /* get physical location */ | 67 | #define EVIOCGPHYS(len) _IOC(_IOC_READ, 'E', 0x07, len) /* get physical location */ |
| @@ -1142,8 +1142,10 @@ struct input_dev { | |||
| 1142 | unsigned int keycodemax; | 1142 | unsigned int keycodemax; |
| 1143 | unsigned int keycodesize; | 1143 | unsigned int keycodesize; |
| 1144 | void *keycode; | 1144 | void *keycode; |
| 1145 | int (*setkeycode)(struct input_dev *dev, int scancode, int keycode); | 1145 | int (*setkeycode)(struct input_dev *dev, |
| 1146 | int (*getkeycode)(struct input_dev *dev, int scancode, int *keycode); | 1146 | unsigned int scancode, unsigned int keycode); |
| 1147 | int (*getkeycode)(struct input_dev *dev, | ||
| 1148 | unsigned int scancode, unsigned int *keycode); | ||
| 1147 | 1149 | ||
| 1148 | struct ff_device *ff; | 1150 | struct ff_device *ff; |
| 1149 | 1151 | ||
| @@ -1415,8 +1417,10 @@ static inline void input_set_abs_params(struct input_dev *dev, int axis, int min | |||
| 1415 | dev->absbit[BIT_WORD(axis)] |= BIT_MASK(axis); | 1417 | dev->absbit[BIT_WORD(axis)] |= BIT_MASK(axis); |
| 1416 | } | 1418 | } |
| 1417 | 1419 | ||
| 1418 | int input_get_keycode(struct input_dev *dev, int scancode, int *keycode); | 1420 | int input_get_keycode(struct input_dev *dev, |
| 1419 | int input_set_keycode(struct input_dev *dev, int scancode, int keycode); | 1421 | unsigned int scancode, unsigned int *keycode); |
| 1422 | int input_set_keycode(struct input_dev *dev, | ||
| 1423 | unsigned int scancode, unsigned int keycode); | ||
| 1420 | 1424 | ||
| 1421 | extern struct class input_class; | 1425 | extern struct class input_class; |
| 1422 | 1426 | ||
diff --git a/include/linux/input/matrix_keypad.h b/include/linux/input/matrix_keypad.h index 3bd018baae20..c964cd7f436a 100644 --- a/include/linux/input/matrix_keypad.h +++ b/include/linux/input/matrix_keypad.h | |||
| @@ -44,6 +44,7 @@ struct matrix_keymap_data { | |||
| 44 | * @active_low: gpio polarity | 44 | * @active_low: gpio polarity |
| 45 | * @wakeup: controls whether the device should be set up as wakeup | 45 | * @wakeup: controls whether the device should be set up as wakeup |
| 46 | * source | 46 | * source |
| 47 | * @no_autorepeat: disable key autorepeat | ||
| 47 | * | 48 | * |
| 48 | * This structure represents platform-specific data that use used by | 49 | * This structure represents platform-specific data that use used by |
| 49 | * matrix_keypad driver to perform proper initialization. | 50 | * matrix_keypad driver to perform proper initialization. |
| @@ -64,6 +65,7 @@ struct matrix_keypad_platform_data { | |||
| 64 | 65 | ||
| 65 | bool active_low; | 66 | bool active_low; |
| 66 | bool wakeup; | 67 | bool wakeup; |
| 68 | bool no_autorepeat; | ||
| 67 | }; | 69 | }; |
| 68 | 70 | ||
| 69 | /** | 71 | /** |
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 75f3f00ac1e5..5137db3317f9 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
| @@ -39,7 +39,8 @@ | |||
| 39 | * These flags used only by the kernel as part of the | 39 | * These flags used only by the kernel as part of the |
| 40 | * irq handling routines. | 40 | * irq handling routines. |
| 41 | * | 41 | * |
| 42 | * IRQF_DISABLED - keep irqs disabled when calling the action handler | 42 | * IRQF_DISABLED - keep irqs disabled when calling the action handler. |
| 43 | * DEPRECATED. This flag is a NOOP and scheduled to be removed | ||
| 43 | * IRQF_SAMPLE_RANDOM - irq is used to feed the random generator | 44 | * IRQF_SAMPLE_RANDOM - irq is used to feed the random generator |
| 44 | * IRQF_SHARED - allow sharing the irq among several devices | 45 | * IRQF_SHARED - allow sharing the irq among several devices |
| 45 | * IRQF_PROBE_SHARED - set by callers when they expect sharing mismatches to occur | 46 | * IRQF_PROBE_SHARED - set by callers when they expect sharing mismatches to occur |
| @@ -77,6 +78,18 @@ enum { | |||
| 77 | IRQTF_AFFINITY, | 78 | IRQTF_AFFINITY, |
| 78 | }; | 79 | }; |
| 79 | 80 | ||
| 81 | /** | ||
| 82 | * These values can be returned by request_any_context_irq() and | ||
| 83 | * describe the context the interrupt will be run in. | ||
| 84 | * | ||
| 85 | * IRQC_IS_HARDIRQ - interrupt runs in hardirq context | ||
| 86 | * IRQC_IS_NESTED - interrupt runs in a nested threaded context | ||
| 87 | */ | ||
| 88 | enum { | ||
| 89 | IRQC_IS_HARDIRQ = 0, | ||
| 90 | IRQC_IS_NESTED, | ||
| 91 | }; | ||
| 92 | |||
| 80 | typedef irqreturn_t (*irq_handler_t)(int, void *); | 93 | typedef irqreturn_t (*irq_handler_t)(int, void *); |
| 81 | 94 | ||
| 82 | /** | 95 | /** |
| @@ -120,6 +133,10 @@ request_irq(unsigned int irq, irq_handler_t handler, unsigned long flags, | |||
| 120 | return request_threaded_irq(irq, handler, NULL, flags, name, dev); | 133 | return request_threaded_irq(irq, handler, NULL, flags, name, dev); |
| 121 | } | 134 | } |
| 122 | 135 | ||
| 136 | extern int __must_check | ||
| 137 | request_any_context_irq(unsigned int irq, irq_handler_t handler, | ||
| 138 | unsigned long flags, const char *name, void *dev_id); | ||
| 139 | |||
| 123 | extern void exit_irq_thread(void); | 140 | extern void exit_irq_thread(void); |
| 124 | #else | 141 | #else |
| 125 | 142 | ||
| @@ -141,6 +158,13 @@ request_threaded_irq(unsigned int irq, irq_handler_t handler, | |||
| 141 | return request_irq(irq, handler, flags, name, dev); | 158 | return request_irq(irq, handler, flags, name, dev); |
| 142 | } | 159 | } |
| 143 | 160 | ||
| 161 | static inline int __must_check | ||
| 162 | request_any_context_irq(unsigned int irq, irq_handler_t handler, | ||
| 163 | unsigned long flags, const char *name, void *dev_id) | ||
| 164 | { | ||
| 165 | return request_irq(irq, handler, flags, name, dev_id); | ||
| 166 | } | ||
| 167 | |||
| 144 | static inline void exit_irq_thread(void) { } | 168 | static inline void exit_irq_thread(void) { } |
| 145 | #endif | 169 | #endif |
| 146 | 170 | ||
| @@ -209,6 +233,7 @@ extern int irq_set_affinity(unsigned int irq, const struct cpumask *cpumask); | |||
| 209 | extern int irq_can_set_affinity(unsigned int irq); | 233 | extern int irq_can_set_affinity(unsigned int irq); |
| 210 | extern int irq_select_affinity(unsigned int irq); | 234 | extern int irq_select_affinity(unsigned int irq); |
| 211 | 235 | ||
| 236 | extern int irq_set_affinity_hint(unsigned int irq, const struct cpumask *m); | ||
| 212 | #else /* CONFIG_SMP */ | 237 | #else /* CONFIG_SMP */ |
| 213 | 238 | ||
| 214 | static inline int irq_set_affinity(unsigned int irq, const struct cpumask *m) | 239 | static inline int irq_set_affinity(unsigned int irq, const struct cpumask *m) |
| @@ -223,6 +248,11 @@ static inline int irq_can_set_affinity(unsigned int irq) | |||
| 223 | 248 | ||
| 224 | static inline int irq_select_affinity(unsigned int irq) { return 0; } | 249 | static inline int irq_select_affinity(unsigned int irq) { return 0; } |
| 225 | 250 | ||
| 251 | static inline int irq_set_affinity_hint(unsigned int irq, | ||
| 252 | const struct cpumask *m) | ||
| 253 | { | ||
| 254 | return -EINVAL; | ||
| 255 | } | ||
| 226 | #endif /* CONFIG_SMP && CONFIG_GENERIC_HARDIRQS */ | 256 | #endif /* CONFIG_SMP && CONFIG_GENERIC_HARDIRQS */ |
| 227 | 257 | ||
| 228 | #ifdef CONFIG_GENERIC_HARDIRQS | 258 | #ifdef CONFIG_GENERIC_HARDIRQS |
diff --git a/include/linux/io-mapping.h b/include/linux/io-mapping.h index 97eb928b4924..25085ddd955f 100644 --- a/include/linux/io-mapping.h +++ b/include/linux/io-mapping.h | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #define _LINUX_IO_MAPPING_H | 19 | #define _LINUX_IO_MAPPING_H |
| 20 | 20 | ||
| 21 | #include <linux/types.h> | 21 | #include <linux/types.h> |
| 22 | #include <linux/slab.h> | ||
| 22 | #include <asm/io.h> | 23 | #include <asm/io.h> |
| 23 | #include <asm/page.h> | 24 | #include <asm/page.h> |
| 24 | #include <asm/iomap.h> | 25 | #include <asm/iomap.h> |
diff --git a/include/linux/iocontext.h b/include/linux/iocontext.h index 1195a806fe0c..a0bb301afac0 100644 --- a/include/linux/iocontext.h +++ b/include/linux/iocontext.h | |||
| @@ -42,7 +42,7 @@ struct io_context { | |||
| 42 | unsigned short ioprio; | 42 | unsigned short ioprio; |
| 43 | unsigned short ioprio_changed; | 43 | unsigned short ioprio_changed; |
| 44 | 44 | ||
| 45 | #ifdef CONFIG_BLK_CGROUP | 45 | #if defined(CONFIG_BLK_CGROUP) || defined(CONFIG_BLK_CGROUP_MODULE) |
| 46 | unsigned short cgroup_changed; | 46 | unsigned short cgroup_changed; |
| 47 | #endif | 47 | #endif |
| 48 | 48 | ||
diff --git a/include/linux/iommu.h b/include/linux/iommu.h index 3af4ffd591b9..be22ad83689c 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h | |||
| @@ -37,9 +37,9 @@ struct iommu_ops { | |||
| 37 | int (*attach_dev)(struct iommu_domain *domain, struct device *dev); | 37 | int (*attach_dev)(struct iommu_domain *domain, struct device *dev); |
| 38 | void (*detach_dev)(struct iommu_domain *domain, struct device *dev); | 38 | void (*detach_dev)(struct iommu_domain *domain, struct device *dev); |
| 39 | int (*map)(struct iommu_domain *domain, unsigned long iova, | 39 | int (*map)(struct iommu_domain *domain, unsigned long iova, |
| 40 | phys_addr_t paddr, size_t size, int prot); | 40 | phys_addr_t paddr, int gfp_order, int prot); |
| 41 | void (*unmap)(struct iommu_domain *domain, unsigned long iova, | 41 | int (*unmap)(struct iommu_domain *domain, unsigned long iova, |
| 42 | size_t size); | 42 | int gfp_order); |
| 43 | phys_addr_t (*iova_to_phys)(struct iommu_domain *domain, | 43 | phys_addr_t (*iova_to_phys)(struct iommu_domain *domain, |
| 44 | unsigned long iova); | 44 | unsigned long iova); |
| 45 | int (*domain_has_cap)(struct iommu_domain *domain, | 45 | int (*domain_has_cap)(struct iommu_domain *domain, |
| @@ -56,10 +56,10 @@ extern int iommu_attach_device(struct iommu_domain *domain, | |||
| 56 | struct device *dev); | 56 | struct device *dev); |
| 57 | extern void iommu_detach_device(struct iommu_domain *domain, | 57 | extern void iommu_detach_device(struct iommu_domain *domain, |
| 58 | struct device *dev); | 58 | struct device *dev); |
| 59 | extern int iommu_map_range(struct iommu_domain *domain, unsigned long iova, | 59 | extern int iommu_map(struct iommu_domain *domain, unsigned long iova, |
| 60 | phys_addr_t paddr, size_t size, int prot); | 60 | phys_addr_t paddr, int gfp_order, int prot); |
| 61 | extern void iommu_unmap_range(struct iommu_domain *domain, unsigned long iova, | 61 | extern int iommu_unmap(struct iommu_domain *domain, unsigned long iova, |
| 62 | size_t size); | 62 | int gfp_order); |
| 63 | extern phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, | 63 | extern phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, |
| 64 | unsigned long iova); | 64 | unsigned long iova); |
| 65 | extern int iommu_domain_has_cap(struct iommu_domain *domain, | 65 | extern int iommu_domain_has_cap(struct iommu_domain *domain, |
| @@ -96,16 +96,16 @@ static inline void iommu_detach_device(struct iommu_domain *domain, | |||
| 96 | { | 96 | { |
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | static inline int iommu_map_range(struct iommu_domain *domain, | 99 | static inline int iommu_map(struct iommu_domain *domain, unsigned long iova, |
| 100 | unsigned long iova, phys_addr_t paddr, | 100 | phys_addr_t paddr, int gfp_order, int prot) |
| 101 | size_t size, int prot) | ||
| 102 | { | 101 | { |
| 103 | return -ENODEV; | 102 | return -ENODEV; |
| 104 | } | 103 | } |
| 105 | 104 | ||
| 106 | static inline void iommu_unmap_range(struct iommu_domain *domain, | 105 | static inline int iommu_unmap(struct iommu_domain *domain, unsigned long iova, |
| 107 | unsigned long iova, size_t size) | 106 | int gfp_order) |
| 108 | { | 107 | { |
| 108 | return -ENODEV; | ||
| 109 | } | 109 | } |
| 110 | 110 | ||
| 111 | static inline phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, | 111 | static inline phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, |
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index dda98410d588..26fad187d661 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
| @@ -34,22 +34,24 @@ struct resource_list { | |||
| 34 | */ | 34 | */ |
| 35 | #define IORESOURCE_BITS 0x000000ff /* Bus-specific bits */ | 35 | #define IORESOURCE_BITS 0x000000ff /* Bus-specific bits */ |
| 36 | 36 | ||
| 37 | #define IORESOURCE_TYPE_BITS 0x00000f00 /* Resource type */ | 37 | #define IORESOURCE_TYPE_BITS 0x00001f00 /* Resource type */ |
| 38 | #define IORESOURCE_IO 0x00000100 | 38 | #define IORESOURCE_IO 0x00000100 |
| 39 | #define IORESOURCE_MEM 0x00000200 | 39 | #define IORESOURCE_MEM 0x00000200 |
| 40 | #define IORESOURCE_IRQ 0x00000400 | 40 | #define IORESOURCE_IRQ 0x00000400 |
| 41 | #define IORESOURCE_DMA 0x00000800 | 41 | #define IORESOURCE_DMA 0x00000800 |
| 42 | #define IORESOURCE_BUS 0x00001000 | ||
| 42 | 43 | ||
| 43 | #define IORESOURCE_PREFETCH 0x00001000 /* No side effects */ | 44 | #define IORESOURCE_PREFETCH 0x00002000 /* No side effects */ |
| 44 | #define IORESOURCE_READONLY 0x00002000 | 45 | #define IORESOURCE_READONLY 0x00004000 |
| 45 | #define IORESOURCE_CACHEABLE 0x00004000 | 46 | #define IORESOURCE_CACHEABLE 0x00008000 |
| 46 | #define IORESOURCE_RANGELENGTH 0x00008000 | 47 | #define IORESOURCE_RANGELENGTH 0x00010000 |
| 47 | #define IORESOURCE_SHADOWABLE 0x00010000 | 48 | #define IORESOURCE_SHADOWABLE 0x00020000 |
| 48 | 49 | ||
| 49 | #define IORESOURCE_SIZEALIGN 0x00020000 /* size indicates alignment */ | 50 | #define IORESOURCE_SIZEALIGN 0x00040000 /* size indicates alignment */ |
| 50 | #define IORESOURCE_STARTALIGN 0x00040000 /* start field is alignment */ | 51 | #define IORESOURCE_STARTALIGN 0x00080000 /* start field is alignment */ |
| 51 | 52 | ||
| 52 | #define IORESOURCE_MEM_64 0x00100000 | 53 | #define IORESOURCE_MEM_64 0x00100000 |
| 54 | #define IORESOURCE_WINDOW 0x00200000 /* forwarded by bridge */ | ||
| 53 | 55 | ||
| 54 | #define IORESOURCE_EXCLUSIVE 0x08000000 /* Userland may not map this resource */ | 56 | #define IORESOURCE_EXCLUSIVE 0x08000000 /* Userland may not map this resource */ |
| 55 | #define IORESOURCE_DISABLED 0x10000000 | 57 | #define IORESOURCE_DISABLED 0x10000000 |
| @@ -110,12 +112,14 @@ struct resource_list { | |||
| 110 | extern struct resource ioport_resource; | 112 | extern struct resource ioport_resource; |
| 111 | extern struct resource iomem_resource; | 113 | extern struct resource iomem_resource; |
| 112 | 114 | ||
| 115 | extern struct resource *request_resource_conflict(struct resource *root, struct resource *new); | ||
| 113 | extern int request_resource(struct resource *root, struct resource *new); | 116 | extern int request_resource(struct resource *root, struct resource *new); |
| 114 | extern int release_resource(struct resource *new); | 117 | extern int release_resource(struct resource *new); |
| 115 | void release_child_resources(struct resource *new); | 118 | void release_child_resources(struct resource *new); |
| 116 | extern void reserve_region_with_split(struct resource *root, | 119 | extern void reserve_region_with_split(struct resource *root, |
| 117 | resource_size_t start, resource_size_t end, | 120 | resource_size_t start, resource_size_t end, |
| 118 | const char *name); | 121 | const char *name); |
| 122 | extern struct resource *insert_resource_conflict(struct resource *parent, struct resource *new); | ||
| 119 | extern int insert_resource(struct resource *parent, struct resource *new); | 123 | extern int insert_resource(struct resource *parent, struct resource *new); |
| 120 | extern void insert_resource_expand_to_fit(struct resource *root, struct resource *new); | 124 | extern void insert_resource_expand_to_fit(struct resource *root, struct resource *new); |
| 121 | extern int allocate_resource(struct resource *root, struct resource *new, | 125 | extern int allocate_resource(struct resource *root, struct resource *new, |
diff --git a/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h index 07baa38bce37..51952989ad42 100644 --- a/include/linux/ipc_namespace.h +++ b/include/linux/ipc_namespace.h | |||
| @@ -62,11 +62,6 @@ extern struct ipc_namespace init_ipc_ns; | |||
| 62 | extern atomic_t nr_ipc_ns; | 62 | extern atomic_t nr_ipc_ns; |
| 63 | 63 | ||
| 64 | extern spinlock_t mq_lock; | 64 | extern spinlock_t mq_lock; |
| 65 | #if defined(CONFIG_POSIX_MQUEUE) || defined(CONFIG_SYSVIPC) | ||
| 66 | #define INIT_IPC_NS(ns) .ns = &init_ipc_ns, | ||
| 67 | #else | ||
| 68 | #define INIT_IPC_NS(ns) | ||
| 69 | #endif | ||
| 70 | 65 | ||
| 71 | #ifdef CONFIG_SYSVIPC | 66 | #ifdef CONFIG_SYSVIPC |
| 72 | extern int register_ipcns_notifier(struct ipc_namespace *); | 67 | extern int register_ipcns_notifier(struct ipc_namespace *); |
diff --git a/include/linux/ipmi_smi.h b/include/linux/ipmi_smi.h index f7c9c75a2775..4b48318ac542 100644 --- a/include/linux/ipmi_smi.h +++ b/include/linux/ipmi_smi.h | |||
| @@ -39,7 +39,6 @@ | |||
| 39 | #include <linux/module.h> | 39 | #include <linux/module.h> |
| 40 | #include <linux/device.h> | 40 | #include <linux/device.h> |
| 41 | #include <linux/platform_device.h> | 41 | #include <linux/platform_device.h> |
| 42 | #include <linux/ipmi_smi.h> | ||
| 43 | 42 | ||
| 44 | /* This files describes the interface for IPMI system management interface | 43 | /* This files describes the interface for IPMI system management interface |
| 45 | drivers to bind into the IPMI message handler. */ | 44 | drivers to bind into the IPMI message handler. */ |
diff --git a/include/linux/irq.h b/include/linux/irq.h index 707ab122e2e6..c03243ad84b4 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
| @@ -195,6 +195,7 @@ struct irq_desc { | |||
| 195 | raw_spinlock_t lock; | 195 | raw_spinlock_t lock; |
| 196 | #ifdef CONFIG_SMP | 196 | #ifdef CONFIG_SMP |
| 197 | cpumask_var_t affinity; | 197 | cpumask_var_t affinity; |
| 198 | const struct cpumask *affinity_hint; | ||
| 198 | unsigned int node; | 199 | unsigned int node; |
| 199 | #ifdef CONFIG_GENERIC_PENDING_IRQ | 200 | #ifdef CONFIG_GENERIC_PENDING_IRQ |
| 200 | cpumask_var_t pending_mask; | 201 | cpumask_var_t pending_mask; |
diff --git a/include/linux/iscsi_ibft.h b/include/linux/iscsi_ibft.h index 6092487e2950..d2e4042f8f5e 100644 --- a/include/linux/iscsi_ibft.h +++ b/include/linux/iscsi_ibft.h | |||
| @@ -42,9 +42,13 @@ extern struct ibft_table_header *ibft_addr; | |||
| 42 | * mapped address is set in the ibft_addr variable. | 42 | * mapped address is set in the ibft_addr variable. |
| 43 | */ | 43 | */ |
| 44 | #ifdef CONFIG_ISCSI_IBFT_FIND | 44 | #ifdef CONFIG_ISCSI_IBFT_FIND |
| 45 | extern void __init reserve_ibft_region(void); | 45 | unsigned long find_ibft_region(unsigned long *sizep); |
| 46 | #else | 46 | #else |
| 47 | static inline void reserve_ibft_region(void) { } | 47 | static inline unsigned long find_ibft_region(unsigned long *sizep) |
| 48 | { | ||
| 49 | *sizep = 0; | ||
| 50 | return 0; | ||
| 51 | } | ||
| 48 | #endif | 52 | #endif |
| 49 | 53 | ||
| 50 | #endif /* ISCSI_IBFT_H */ | 54 | #endif /* ISCSI_IBFT_H */ |
diff --git a/include/linux/jbd.h b/include/linux/jbd.h index f3aa59cb675d..516a2a27e87a 100644 --- a/include/linux/jbd.h +++ b/include/linux/jbd.h | |||
| @@ -31,6 +31,7 @@ | |||
| 31 | #include <linux/mutex.h> | 31 | #include <linux/mutex.h> |
| 32 | #include <linux/timer.h> | 32 | #include <linux/timer.h> |
| 33 | #include <linux/lockdep.h> | 33 | #include <linux/lockdep.h> |
| 34 | #include <linux/slab.h> | ||
| 34 | 35 | ||
| 35 | #define journal_oom_retry 1 | 36 | #define journal_oom_retry 1 |
| 36 | 37 | ||
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 1ec876358180..a4d2e9f7088a 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
| @@ -30,6 +30,7 @@ | |||
| 30 | #include <linux/bit_spinlock.h> | 30 | #include <linux/bit_spinlock.h> |
| 31 | #include <linux/mutex.h> | 31 | #include <linux/mutex.h> |
| 32 | #include <linux/timer.h> | 32 | #include <linux/timer.h> |
| 33 | #include <linux/slab.h> | ||
| 33 | #endif | 34 | #endif |
| 34 | 35 | ||
| 35 | #define journal_oom_retry 1 | 36 | #define journal_oom_retry 1 |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 7f0707463360..9fb1c1299032 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -426,7 +426,7 @@ static inline char *pack_hex_byte(char *buf, u8 byte) | |||
| 426 | .burst = DEFAULT_RATELIMIT_BURST, \ | 426 | .burst = DEFAULT_RATELIMIT_BURST, \ |
| 427 | }; \ | 427 | }; \ |
| 428 | \ | 428 | \ |
| 429 | if (!__ratelimit(&_rs)) \ | 429 | if (__ratelimit(&_rs)) \ |
| 430 | printk(fmt, ##__VA_ARGS__); \ | 430 | printk(fmt, ##__VA_ARGS__); \ |
| 431 | }) | 431 | }) |
| 432 | #else | 432 | #else |
| @@ -490,6 +490,13 @@ static inline void tracing_off(void) { } | |||
| 490 | static inline void tracing_off_permanent(void) { } | 490 | static inline void tracing_off_permanent(void) { } |
| 491 | static inline int tracing_is_on(void) { return 0; } | 491 | static inline int tracing_is_on(void) { return 0; } |
| 492 | #endif | 492 | #endif |
| 493 | |||
| 494 | enum ftrace_dump_mode { | ||
| 495 | DUMP_NONE, | ||
| 496 | DUMP_ALL, | ||
| 497 | DUMP_ORIG, | ||
| 498 | }; | ||
| 499 | |||
| 493 | #ifdef CONFIG_TRACING | 500 | #ifdef CONFIG_TRACING |
| 494 | extern void tracing_start(void); | 501 | extern void tracing_start(void); |
| 495 | extern void tracing_stop(void); | 502 | extern void tracing_stop(void); |
| @@ -571,7 +578,7 @@ __ftrace_vbprintk(unsigned long ip, const char *fmt, va_list ap); | |||
| 571 | extern int | 578 | extern int |
| 572 | __ftrace_vprintk(unsigned long ip, const char *fmt, va_list ap); | 579 | __ftrace_vprintk(unsigned long ip, const char *fmt, va_list ap); |
| 573 | 580 | ||
| 574 | extern void ftrace_dump(void); | 581 | extern void ftrace_dump(enum ftrace_dump_mode oops_dump_mode); |
| 575 | #else | 582 | #else |
| 576 | static inline void | 583 | static inline void |
| 577 | ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3) { } | 584 | ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3) { } |
| @@ -592,7 +599,7 @@ ftrace_vprintk(const char *fmt, va_list ap) | |||
| 592 | { | 599 | { |
| 593 | return 0; | 600 | return 0; |
| 594 | } | 601 | } |
| 595 | static inline void ftrace_dump(void) { } | 602 | static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { } |
| 596 | #endif /* CONFIG_TRACING */ | 603 | #endif /* CONFIG_TRACING */ |
| 597 | 604 | ||
| 598 | /* | 605 | /* |
diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h index bc0fc795bd35..e117b1aee69c 100644 --- a/include/linux/kfifo.h +++ b/include/linux/kfifo.h | |||
| @@ -86,7 +86,8 @@ union { \ | |||
| 86 | */ | 86 | */ |
| 87 | #define INIT_KFIFO(name) \ | 87 | #define INIT_KFIFO(name) \ |
| 88 | name = __kfifo_initializer(sizeof(name##kfifo_buffer) - \ | 88 | name = __kfifo_initializer(sizeof(name##kfifo_buffer) - \ |
| 89 | sizeof(struct kfifo), name##kfifo_buffer) | 89 | sizeof(struct kfifo), \ |
| 90 | name##kfifo_buffer + sizeof(struct kfifo)) | ||
| 90 | 91 | ||
| 91 | /** | 92 | /** |
| 92 | * DEFINE_KFIFO - macro to define and initialize a kfifo | 93 | * DEFINE_KFIFO - macro to define and initialize a kfifo |
| @@ -102,8 +103,6 @@ union { \ | |||
| 102 | unsigned char name##kfifo_buffer[size]; \ | 103 | unsigned char name##kfifo_buffer[size]; \ |
| 103 | struct kfifo name = __kfifo_initializer(size, name##kfifo_buffer) | 104 | struct kfifo name = __kfifo_initializer(size, name##kfifo_buffer) |
| 104 | 105 | ||
| 105 | #undef __kfifo_initializer | ||
| 106 | |||
| 107 | extern void kfifo_init(struct kfifo *fifo, void *buffer, | 106 | extern void kfifo_init(struct kfifo *fifo, void *buffer, |
| 108 | unsigned int size); | 107 | unsigned int size); |
| 109 | extern __must_check int kfifo_alloc(struct kfifo *fifo, unsigned int size, | 108 | extern __must_check int kfifo_alloc(struct kfifo *fifo, unsigned int size, |
diff --git a/include/linux/kmod.h b/include/linux/kmod.h index 384ca8bbf1ac..facb27fe7de0 100644 --- a/include/linux/kmod.h +++ b/include/linux/kmod.h | |||
| @@ -27,6 +27,7 @@ | |||
| 27 | #define KMOD_PATH_LEN 256 | 27 | #define KMOD_PATH_LEN 256 |
| 28 | 28 | ||
| 29 | #ifdef CONFIG_MODULES | 29 | #ifdef CONFIG_MODULES |
| 30 | extern char modprobe_path[]; /* for sysctl */ | ||
| 30 | /* modprobe exit status on success, -ve on error. Return value | 31 | /* modprobe exit status on success, -ve on error. Return value |
| 31 | * usually useless though. */ | 32 | * usually useless though. */ |
| 32 | extern int __request_module(bool wait, const char *name, ...) \ | 33 | extern int __request_module(bool wait, const char *name, ...) \ |
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index a3fd0f91d943..169d07758ee5 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
| @@ -54,7 +54,7 @@ extern struct kmem_cache *kvm_vcpu_cache; | |||
| 54 | */ | 54 | */ |
| 55 | struct kvm_io_bus { | 55 | struct kvm_io_bus { |
| 56 | int dev_count; | 56 | int dev_count; |
| 57 | #define NR_IOBUS_DEVS 6 | 57 | #define NR_IOBUS_DEVS 200 |
| 58 | struct kvm_io_device *devs[NR_IOBUS_DEVS]; | 58 | struct kvm_io_device *devs[NR_IOBUS_DEVS]; |
| 59 | }; | 59 | }; |
| 60 | 60 | ||
| @@ -119,6 +119,11 @@ struct kvm_memory_slot { | |||
| 119 | int user_alloc; | 119 | int user_alloc; |
| 120 | }; | 120 | }; |
| 121 | 121 | ||
| 122 | static inline unsigned long kvm_dirty_bitmap_bytes(struct kvm_memory_slot *memslot) | ||
| 123 | { | ||
| 124 | return ALIGN(memslot->npages, BITS_PER_LONG) / 8; | ||
| 125 | } | ||
| 126 | |||
| 122 | struct kvm_kernel_irq_routing_entry { | 127 | struct kvm_kernel_irq_routing_entry { |
| 123 | u32 gsi; | 128 | u32 gsi; |
| 124 | u32 type; | 129 | u32 type; |
diff --git a/include/linux/lcm.h b/include/linux/lcm.h new file mode 100644 index 000000000000..7bf01d779b45 --- /dev/null +++ b/include/linux/lcm.h | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | #ifndef _LCM_H | ||
| 2 | #define _LCM_H | ||
| 3 | |||
| 4 | #include <linux/compiler.h> | ||
| 5 | |||
| 6 | unsigned long lcm(unsigned long a, unsigned long b) __attribute_const__; | ||
| 7 | |||
| 8 | #endif /* _LCM_H */ | ||
diff --git a/include/linux/libata.h b/include/linux/libata.h index f8ea71e6d0e2..b2f2003b92e5 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
| @@ -146,6 +146,7 @@ enum { | |||
| 146 | ATA_DFLAG_SLEEPING = (1 << 15), /* device is sleeping */ | 146 | ATA_DFLAG_SLEEPING = (1 << 15), /* device is sleeping */ |
| 147 | ATA_DFLAG_DUBIOUS_XFER = (1 << 16), /* data transfer not verified */ | 147 | ATA_DFLAG_DUBIOUS_XFER = (1 << 16), /* data transfer not verified */ |
| 148 | ATA_DFLAG_NO_UNLOAD = (1 << 17), /* device doesn't support unload */ | 148 | ATA_DFLAG_NO_UNLOAD = (1 << 17), /* device doesn't support unload */ |
| 149 | ATA_DFLAG_UNLOCK_HPA = (1 << 18), /* unlock HPA */ | ||
| 149 | ATA_DFLAG_INIT_MASK = (1 << 24) - 1, | 150 | ATA_DFLAG_INIT_MASK = (1 << 24) - 1, |
| 150 | 151 | ||
| 151 | ATA_DFLAG_DETACH = (1 << 24), | 152 | ATA_DFLAG_DETACH = (1 << 24), |
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index 10206a87da19..a03977a96d7e 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h | |||
| @@ -12,6 +12,10 @@ | |||
| 12 | struct task_struct; | 12 | struct task_struct; |
| 13 | struct lockdep_map; | 13 | struct lockdep_map; |
| 14 | 14 | ||
| 15 | /* for sysctl */ | ||
| 16 | extern int prove_locking; | ||
| 17 | extern int lock_stat; | ||
| 18 | |||
| 15 | #ifdef CONFIG_LOCKDEP | 19 | #ifdef CONFIG_LOCKDEP |
| 16 | 20 | ||
| 17 | #include <linux/linkage.h> | 21 | #include <linux/linkage.h> |
diff --git a/include/linux/lru_cache.h b/include/linux/lru_cache.h index 3a2b2d9b0472..de48d167568b 100644 --- a/include/linux/lru_cache.h +++ b/include/linux/lru_cache.h | |||
| @@ -64,7 +64,7 @@ For crash recovery after replication node failure, | |||
| 64 | usually the condition is softened to regions that _may_ have been target of | 64 | usually the condition is softened to regions that _may_ have been target of |
| 65 | in-flight WRITE IO, e.g. by only lazily clearing the on-disk write-intent | 65 | in-flight WRITE IO, e.g. by only lazily clearing the on-disk write-intent |
| 66 | bitmap, trading frequency of meta data transactions against amount of | 66 | bitmap, trading frequency of meta data transactions against amount of |
| 67 | (possibly unneccessary) resync traffic. | 67 | (possibly unnecessary) resync traffic. |
| 68 | 68 | ||
| 69 | If we set a hard limit on the area that may be "hot" at any given time, we | 69 | If we set a hard limit on the area that may be "hot" at any given time, we |
| 70 | limit the amount of resync traffic needed for crash recovery. | 70 | limit the amount of resync traffic needed for crash recovery. |
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 1f9b119f4ace..44301c6affa8 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
| @@ -124,7 +124,6 @@ static inline bool mem_cgroup_disabled(void) | |||
| 124 | return false; | 124 | return false; |
| 125 | } | 125 | } |
| 126 | 126 | ||
| 127 | extern bool mem_cgroup_oom_called(struct task_struct *task); | ||
| 128 | void mem_cgroup_update_file_mapped(struct page *page, int val); | 127 | void mem_cgroup_update_file_mapped(struct page *page, int val); |
| 129 | unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order, | 128 | unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order, |
| 130 | gfp_t gfp_mask, int nid, | 129 | gfp_t gfp_mask, int nid, |
| @@ -258,11 +257,6 @@ static inline bool mem_cgroup_disabled(void) | |||
| 258 | return true; | 257 | return true; |
| 259 | } | 258 | } |
| 260 | 259 | ||
| 261 | static inline bool mem_cgroup_oom_called(struct task_struct *task) | ||
| 262 | { | ||
| 263 | return false; | ||
| 264 | } | ||
| 265 | |||
| 266 | static inline int | 260 | static inline int |
| 267 | mem_cgroup_inactive_anon_is_low(struct mem_cgroup *memcg) | 261 | mem_cgroup_inactive_anon_is_low(struct mem_cgroup *memcg) |
| 268 | { | 262 | { |
diff --git a/include/linux/memory.h b/include/linux/memory.h index 1adfe779eb99..85582e1bcee9 100644 --- a/include/linux/memory.h +++ b/include/linux/memory.h | |||
| @@ -36,6 +36,8 @@ struct memory_block { | |||
| 36 | struct sys_device sysdev; | 36 | struct sys_device sysdev; |
| 37 | }; | 37 | }; |
| 38 | 38 | ||
| 39 | int arch_get_memory_phys_device(unsigned long start_pfn); | ||
| 40 | |||
| 39 | /* These states are exposed to userspace as text strings in sysfs */ | 41 | /* These states are exposed to userspace as text strings in sysfs */ |
| 40 | #define MEM_ONLINE (1<<0) /* exposed to userspace */ | 42 | #define MEM_ONLINE (1<<0) /* exposed to userspace */ |
| 41 | #define MEM_GOING_OFFLINE (1<<1) /* exposed to userspace */ | 43 | #define MEM_GOING_OFFLINE (1<<1) /* exposed to userspace */ |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 3899395a03de..fb19bb92b809 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -19,7 +19,6 @@ struct anon_vma; | |||
| 19 | struct file_ra_state; | 19 | struct file_ra_state; |
| 20 | struct user_struct; | 20 | struct user_struct; |
| 21 | struct writeback_control; | 21 | struct writeback_control; |
| 22 | struct rlimit; | ||
| 23 | 22 | ||
| 24 | #ifndef CONFIG_DISCONTIGMEM /* Don't use mapnrs, do it properly */ | 23 | #ifndef CONFIG_DISCONTIGMEM /* Don't use mapnrs, do it properly */ |
| 25 | extern unsigned long max_mapnr; | 24 | extern unsigned long max_mapnr; |
| @@ -783,8 +782,8 @@ struct mm_walk { | |||
| 783 | int (*pmd_entry)(pmd_t *, unsigned long, unsigned long, struct mm_walk *); | 782 | int (*pmd_entry)(pmd_t *, unsigned long, unsigned long, struct mm_walk *); |
| 784 | int (*pte_entry)(pte_t *, unsigned long, unsigned long, struct mm_walk *); | 783 | int (*pte_entry)(pte_t *, unsigned long, unsigned long, struct mm_walk *); |
| 785 | int (*pte_hole)(unsigned long, unsigned long, struct mm_walk *); | 784 | int (*pte_hole)(unsigned long, unsigned long, struct mm_walk *); |
| 786 | int (*hugetlb_entry)(pte_t *, unsigned long, unsigned long, | 785 | int (*hugetlb_entry)(pte_t *, unsigned long, |
| 787 | struct mm_walk *); | 786 | unsigned long, unsigned long, struct mm_walk *); |
| 788 | struct mm_struct *mm; | 787 | struct mm_struct *mm; |
| 789 | void *private; | 788 | void *private; |
| 790 | }; | 789 | }; |
| @@ -971,7 +970,13 @@ static inline void setmax_mm_hiwater_rss(unsigned long *maxrss, | |||
| 971 | *maxrss = hiwater_rss; | 970 | *maxrss = hiwater_rss; |
| 972 | } | 971 | } |
| 973 | 972 | ||
| 973 | #if defined(SPLIT_RSS_COUNTING) | ||
| 974 | void sync_mm_rss(struct task_struct *task, struct mm_struct *mm); | 974 | void sync_mm_rss(struct task_struct *task, struct mm_struct *mm); |
| 975 | #else | ||
| 976 | static inline void sync_mm_rss(struct task_struct *task, struct mm_struct *mm) | ||
| 977 | { | ||
| 978 | } | ||
| 979 | #endif | ||
| 975 | 980 | ||
| 976 | /* | 981 | /* |
| 977 | * A callback you can register to apply pressure to ageable caches. | 982 | * A callback you can register to apply pressure to ageable caches. |
| @@ -1443,9 +1448,6 @@ int vmemmap_populate_basepages(struct page *start_page, | |||
| 1443 | int vmemmap_populate(struct page *start_page, unsigned long pages, int node); | 1448 | int vmemmap_populate(struct page *start_page, unsigned long pages, int node); |
| 1444 | void vmemmap_populate_print_last(void); | 1449 | void vmemmap_populate_print_last(void); |
| 1445 | 1450 | ||
| 1446 | extern int account_locked_memory(struct mm_struct *mm, struct rlimit *rlim, | ||
| 1447 | size_t size); | ||
| 1448 | extern void refund_locked_memory(struct mm_struct *mm, size_t size); | ||
| 1449 | 1451 | ||
| 1450 | enum mf_flags { | 1452 | enum mf_flags { |
| 1451 | MF_COUNT_INCREASED = 1 << 0, | 1453 | MF_COUNT_INCREASED = 1 << 0, |
| @@ -1459,5 +1461,7 @@ extern void shake_page(struct page *p, int access); | |||
| 1459 | extern atomic_long_t mce_bad_pages; | 1461 | extern atomic_long_t mce_bad_pages; |
| 1460 | extern int soft_offline_page(struct page *page, int flags); | 1462 | extern int soft_offline_page(struct page *page, int flags); |
| 1461 | 1463 | ||
| 1464 | extern void dump_page(struct page *page); | ||
| 1465 | |||
| 1462 | #endif /* __KERNEL__ */ | 1466 | #endif /* __KERNEL__ */ |
| 1463 | #endif /* _LINUX_MM_H */ | 1467 | #endif /* _LINUX_MM_H */ |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 048b46270aa5..b8bb9a6a1f37 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
| @@ -203,7 +203,7 @@ enum { | |||
| 203 | NR_MM_COUNTERS | 203 | NR_MM_COUNTERS |
| 204 | }; | 204 | }; |
| 205 | 205 | ||
| 206 | #if USE_SPLIT_PTLOCKS | 206 | #if USE_SPLIT_PTLOCKS && defined(CONFIG_MMU) |
| 207 | #define SPLIT_RSS_COUNTING | 207 | #define SPLIT_RSS_COUNTING |
| 208 | struct mm_rss_stat { | 208 | struct mm_rss_stat { |
| 209 | atomic_long_t count[NR_MM_COUNTERS]; | 209 | atomic_long_t count[NR_MM_COUNTERS]; |
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index c02c8db73701..8a49cbf0376d 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h | |||
| @@ -268,6 +268,7 @@ struct _mmc_csd { | |||
| 268 | 268 | ||
| 269 | #define EXT_CSD_CARD_TYPE_26 (1<<0) /* Card can run at 26MHz */ | 269 | #define EXT_CSD_CARD_TYPE_26 (1<<0) /* Card can run at 26MHz */ |
| 270 | #define EXT_CSD_CARD_TYPE_52 (1<<1) /* Card can run at 52MHz */ | 270 | #define EXT_CSD_CARD_TYPE_52 (1<<1) /* Card can run at 52MHz */ |
| 271 | #define EXT_CSD_CARD_TYPE_MASK 0x3 /* Mask out reserved and DDR bits */ | ||
| 271 | 272 | ||
| 272 | #define EXT_CSD_BUS_WIDTH_1 0 /* Card is in 1 bit mode */ | 273 | #define EXT_CSD_BUS_WIDTH_1 0 /* Card is in 1 bit mode */ |
| 273 | #define EXT_CSD_BUS_WIDTH_4 1 /* Card is in 4 bit mode */ | 274 | #define EXT_CSD_BUS_WIDTH_4 1 /* Card is in 4 bit mode */ |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index bc209d8b7b5c..cf9e458e96b0 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
| @@ -342,7 +342,7 @@ struct zone { | |||
| 342 | * prev_priority holds the scanning priority for this zone. It is | 342 | * prev_priority holds the scanning priority for this zone. It is |
| 343 | * defined as the scanning priority at which we achieved our reclaim | 343 | * defined as the scanning priority at which we achieved our reclaim |
| 344 | * target at the previous try_to_free_pages() or balance_pgdat() | 344 | * target at the previous try_to_free_pages() or balance_pgdat() |
| 345 | * invokation. | 345 | * invocation. |
| 346 | * | 346 | * |
| 347 | * We use prev_priority as a measure of how much stress page reclaim is | 347 | * We use prev_priority as a measure of how much stress page reclaim is |
| 348 | * under - it drives the swappiness decision: whether to unmap mapped | 348 | * under - it drives the swappiness decision: whether to unmap mapped |
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index f58e9d836f32..56fde4364e4c 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
| @@ -474,4 +474,13 @@ struct platform_device_id { | |||
| 474 | __attribute__((aligned(sizeof(kernel_ulong_t)))); | 474 | __attribute__((aligned(sizeof(kernel_ulong_t)))); |
| 475 | }; | 475 | }; |
| 476 | 476 | ||
| 477 | struct zorro_device_id { | ||
| 478 | __u32 id; /* Device ID or ZORRO_WILDCARD */ | ||
| 479 | kernel_ulong_t driver_data; /* Data private to the driver */ | ||
| 480 | }; | ||
| 481 | |||
| 482 | #define ZORRO_WILDCARD (0xffffffff) /* not official */ | ||
| 483 | |||
| 484 | #define ZORRO_DEVICE_MODALIAS_FMT "zorro:i%08X" | ||
| 485 | |||
| 477 | #endif /* LINUX_MOD_DEVICETABLE_H */ | 486 | #endif /* LINUX_MOD_DEVICETABLE_H */ |
diff --git a/include/linux/module.h b/include/linux/module.h index dd618eb026aa..6914fcad4673 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
| @@ -175,6 +175,7 @@ struct notifier_block; | |||
| 175 | 175 | ||
| 176 | #ifdef CONFIG_MODULES | 176 | #ifdef CONFIG_MODULES |
| 177 | 177 | ||
| 178 | extern int modules_disabled; /* for sysctl */ | ||
| 178 | /* Get/put a kernel symbol (calls must be symmetric) */ | 179 | /* Get/put a kernel symbol (calls must be symmetric) */ |
| 179 | void *__symbol_get(const char *symbol); | 180 | void *__symbol_get(const char *symbol); |
| 180 | void *__symbol_get_gpl(const char *symbol); | 181 | void *__symbol_get_gpl(const char *symbol); |
| @@ -329,8 +330,11 @@ struct module | |||
| 329 | struct module_notes_attrs *notes_attrs; | 330 | struct module_notes_attrs *notes_attrs; |
| 330 | #endif | 331 | #endif |
| 331 | 332 | ||
| 333 | #ifdef CONFIG_SMP | ||
| 332 | /* Per-cpu data. */ | 334 | /* Per-cpu data. */ |
| 333 | void *percpu; | 335 | void __percpu *percpu; |
| 336 | unsigned int percpu_size; | ||
| 337 | #endif | ||
| 334 | 338 | ||
| 335 | /* The command line arguments (may be mangled). People like | 339 | /* The command line arguments (may be mangled). People like |
| 336 | keeping pointers to this stuff */ | 340 | keeping pointers to this stuff */ |
| @@ -364,7 +368,8 @@ struct module | |||
| 364 | void (*exit)(void); | 368 | void (*exit)(void); |
| 365 | 369 | ||
| 366 | struct module_ref { | 370 | struct module_ref { |
| 367 | int count; | 371 | unsigned int incs; |
| 372 | unsigned int decs; | ||
| 368 | } __percpu *refptr; | 373 | } __percpu *refptr; |
| 369 | #endif | 374 | #endif |
| 370 | 375 | ||
| @@ -391,6 +396,7 @@ static inline int module_is_live(struct module *mod) | |||
| 391 | struct module *__module_text_address(unsigned long addr); | 396 | struct module *__module_text_address(unsigned long addr); |
| 392 | struct module *__module_address(unsigned long addr); | 397 | struct module *__module_address(unsigned long addr); |
| 393 | bool is_module_address(unsigned long addr); | 398 | bool is_module_address(unsigned long addr); |
| 399 | bool is_module_percpu_address(unsigned long addr); | ||
| 394 | bool is_module_text_address(unsigned long addr); | 400 | bool is_module_text_address(unsigned long addr); |
| 395 | 401 | ||
| 396 | static inline int within_module_core(unsigned long addr, struct module *mod) | 402 | static inline int within_module_core(unsigned long addr, struct module *mod) |
| @@ -458,9 +464,8 @@ static inline void __module_get(struct module *module) | |||
| 458 | { | 464 | { |
| 459 | if (module) { | 465 | if (module) { |
| 460 | preempt_disable(); | 466 | preempt_disable(); |
| 461 | __this_cpu_inc(module->refptr->count); | 467 | __this_cpu_inc(module->refptr->incs); |
| 462 | trace_module_get(module, _THIS_IP_, | 468 | trace_module_get(module, _THIS_IP_); |
| 463 | __this_cpu_read(module->refptr->count)); | ||
| 464 | preempt_enable(); | 469 | preempt_enable(); |
| 465 | } | 470 | } |
| 466 | } | 471 | } |
| @@ -473,11 +478,9 @@ static inline int try_module_get(struct module *module) | |||
| 473 | preempt_disable(); | 478 | preempt_disable(); |
| 474 | 479 | ||
| 475 | if (likely(module_is_live(module))) { | 480 | if (likely(module_is_live(module))) { |
| 476 | __this_cpu_inc(module->refptr->count); | 481 | __this_cpu_inc(module->refptr->incs); |
| 477 | trace_module_get(module, _THIS_IP_, | 482 | trace_module_get(module, _THIS_IP_); |
| 478 | __this_cpu_read(module->refptr->count)); | 483 | } else |
| 479 | } | ||
| 480 | else | ||
| 481 | ret = 0; | 484 | ret = 0; |
| 482 | 485 | ||
| 483 | preempt_enable(); | 486 | preempt_enable(); |
| @@ -562,6 +565,11 @@ static inline bool is_module_address(unsigned long addr) | |||
| 562 | return false; | 565 | return false; |
| 563 | } | 566 | } |
| 564 | 567 | ||
| 568 | static inline bool is_module_percpu_address(unsigned long addr) | ||
| 569 | { | ||
| 570 | return false; | ||
| 571 | } | ||
| 572 | |||
| 565 | static inline bool is_module_text_address(unsigned long addr) | 573 | static inline bool is_module_text_address(unsigned long addr) |
| 566 | { | 574 | { |
| 567 | return false; | 575 | return false; |
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h index ce38f1caa5e1..34066e65fdeb 100644 --- a/include/linux/msdos_fs.h +++ b/include/linux/msdos_fs.h | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | #define MSDOS_DPB_BITS 4 /* log2(MSDOS_DPB) */ | 15 | #define MSDOS_DPB_BITS 4 /* log2(MSDOS_DPB) */ |
| 16 | #define MSDOS_DPS (SECTOR_SIZE / sizeof(struct msdos_dir_entry)) | 16 | #define MSDOS_DPS (SECTOR_SIZE / sizeof(struct msdos_dir_entry)) |
| 17 | #define MSDOS_DPS_BITS 4 /* log2(MSDOS_DPS) */ | 17 | #define MSDOS_DPS_BITS 4 /* log2(MSDOS_DPS) */ |
| 18 | #define MSDOS_LONGNAME 256 /* maximum name length */ | ||
| 18 | #define CF_LE_W(v) le16_to_cpu(v) | 19 | #define CF_LE_W(v) le16_to_cpu(v) |
| 19 | #define CF_LE_L(v) le32_to_cpu(v) | 20 | #define CF_LE_L(v) le32_to_cpu(v) |
| 20 | #define CT_LE_W(v) cpu_to_le16(v) | 21 | #define CT_LE_W(v) cpu_to_le16(v) |
| @@ -47,8 +48,8 @@ | |||
| 47 | #define DELETED_FLAG 0xe5 /* marks file as deleted when in name[0] */ | 48 | #define DELETED_FLAG 0xe5 /* marks file as deleted when in name[0] */ |
| 48 | #define IS_FREE(n) (!*(n) || *(n) == DELETED_FLAG) | 49 | #define IS_FREE(n) (!*(n) || *(n) == DELETED_FLAG) |
| 49 | 50 | ||
| 51 | #define FAT_LFN_LEN 255 /* maximum long name length */ | ||
| 50 | #define MSDOS_NAME 11 /* maximum name length */ | 52 | #define MSDOS_NAME 11 /* maximum name length */ |
| 51 | #define MSDOS_LONGNAME 256 /* maximum name length */ | ||
| 52 | #define MSDOS_SLOTS 21 /* max # of slots for short and long names */ | 53 | #define MSDOS_SLOTS 21 /* max # of slots for short and long names */ |
| 53 | #define MSDOS_DOT ". " /* ".", padded to MSDOS_NAME chars */ | 54 | #define MSDOS_DOT ". " /* ".", padded to MSDOS_NAME chars */ |
| 54 | #define MSDOS_DOTDOT ".. " /* "..", padded to MSDOS_NAME chars */ | 55 | #define MSDOS_DOTDOT ".. " /* "..", padded to MSDOS_NAME chars */ |
diff --git a/include/linux/ncp_fs_sb.h b/include/linux/ncp_fs_sb.h index 6330fc76b00f..5ec9ca671687 100644 --- a/include/linux/ncp_fs_sb.h +++ b/include/linux/ncp_fs_sb.h | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | #include <linux/ncp_mount.h> | 12 | #include <linux/ncp_mount.h> |
| 13 | #include <linux/net.h> | 13 | #include <linux/net.h> |
| 14 | #include <linux/mutex.h> | 14 | #include <linux/mutex.h> |
| 15 | #include <linux/backing-dev.h> | ||
| 15 | 16 | ||
| 16 | #ifdef __KERNEL__ | 17 | #ifdef __KERNEL__ |
| 17 | 18 | ||
| @@ -127,6 +128,7 @@ struct ncp_server { | |||
| 127 | size_t len; | 128 | size_t len; |
| 128 | __u8 data[128]; | 129 | __u8 data[128]; |
| 129 | } unexpected_packet; | 130 | } unexpected_packet; |
| 131 | struct backing_dev_info bdi; | ||
| 130 | }; | 132 | }; |
| 131 | 133 | ||
| 132 | extern void ncp_tcp_rcv_proc(struct work_struct *work); | 134 | extern void ncp_tcp_rcv_proc(struct work_struct *work); |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index c79a88be7c33..fa8b47637997 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -2059,12 +2059,12 @@ static inline void skb_bond_set_mac_by_master(struct sk_buff *skb, | |||
| 2059 | * duplicates except for 802.3ad ETH_P_SLOW, alb non-mcast/bcast, and | 2059 | * duplicates except for 802.3ad ETH_P_SLOW, alb non-mcast/bcast, and |
| 2060 | * ARP on active-backup slaves with arp_validate enabled. | 2060 | * ARP on active-backup slaves with arp_validate enabled. |
| 2061 | */ | 2061 | */ |
| 2062 | static inline int skb_bond_should_drop(struct sk_buff *skb) | 2062 | static inline int skb_bond_should_drop(struct sk_buff *skb, |
| 2063 | struct net_device *master) | ||
| 2063 | { | 2064 | { |
| 2064 | struct net_device *dev = skb->dev; | ||
| 2065 | struct net_device *master = dev->master; | ||
| 2066 | |||
| 2067 | if (master) { | 2065 | if (master) { |
| 2066 | struct net_device *dev = skb->dev; | ||
| 2067 | |||
| 2068 | if (master->priv_flags & IFF_MASTER_ARPMON) | 2068 | if (master->priv_flags & IFF_MASTER_ARPMON) |
| 2069 | dev->last_rx = jiffies; | 2069 | dev->last_rx = jiffies; |
| 2070 | 2070 | ||
diff --git a/include/linux/netfilter/nfnetlink.h b/include/linux/netfilter/nfnetlink.h index 53923868c9bd..361d6b5630ee 100644 --- a/include/linux/netfilter/nfnetlink.h +++ b/include/linux/netfilter/nfnetlink.h | |||
| @@ -76,7 +76,7 @@ extern int nfnetlink_subsys_unregister(const struct nfnetlink_subsystem *n); | |||
| 76 | extern int nfnetlink_has_listeners(struct net *net, unsigned int group); | 76 | extern int nfnetlink_has_listeners(struct net *net, unsigned int group); |
| 77 | extern int nfnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, unsigned group, | 77 | extern int nfnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, unsigned group, |
| 78 | int echo, gfp_t flags); | 78 | int echo, gfp_t flags); |
| 79 | extern void nfnetlink_set_err(struct net *net, u32 pid, u32 group, int error); | 79 | extern int nfnetlink_set_err(struct net *net, u32 pid, u32 group, int error); |
| 80 | extern int nfnetlink_unicast(struct sk_buff *skb, struct net *net, u_int32_t pid, int flags); | 80 | extern int nfnetlink_unicast(struct sk_buff *skb, struct net *net, u_int32_t pid, int flags); |
| 81 | 81 | ||
| 82 | extern void nfnl_lock(void); | 82 | extern void nfnl_lock(void); |
diff --git a/include/linux/netfilter_ipv6.h b/include/linux/netfilter_ipv6.h index d654873aa25a..1f7e300094cd 100644 --- a/include/linux/netfilter_ipv6.h +++ b/include/linux/netfilter_ipv6.h | |||
| @@ -59,6 +59,7 @@ | |||
| 59 | enum nf_ip6_hook_priorities { | 59 | enum nf_ip6_hook_priorities { |
| 60 | NF_IP6_PRI_FIRST = INT_MIN, | 60 | NF_IP6_PRI_FIRST = INT_MIN, |
| 61 | NF_IP6_PRI_CONNTRACK_DEFRAG = -400, | 61 | NF_IP6_PRI_CONNTRACK_DEFRAG = -400, |
| 62 | NF_IP6_PRI_RAW = -300, | ||
| 62 | NF_IP6_PRI_SELINUX_FIRST = -225, | 63 | NF_IP6_PRI_SELINUX_FIRST = -225, |
| 63 | NF_IP6_PRI_CONNTRACK = -200, | 64 | NF_IP6_PRI_CONNTRACK = -200, |
| 64 | NF_IP6_PRI_MANGLE = -150, | 65 | NF_IP6_PRI_MANGLE = -150, |
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index fde27c017326..6eaca5e1e8ca 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
| @@ -188,7 +188,7 @@ extern int netlink_has_listeners(struct sock *sk, unsigned int group); | |||
| 188 | extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock); | 188 | extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock); |
| 189 | extern int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 pid, | 189 | extern int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 pid, |
| 190 | __u32 group, gfp_t allocation); | 190 | __u32 group, gfp_t allocation); |
| 191 | extern void netlink_set_err(struct sock *ssk, __u32 pid, __u32 group, int code); | 191 | extern int netlink_set_err(struct sock *ssk, __u32 pid, __u32 group, int code); |
| 192 | extern int netlink_register_notifier(struct notifier_block *nb); | 192 | extern int netlink_register_notifier(struct notifier_block *nb); |
| 193 | extern int netlink_unregister_notifier(struct notifier_block *nb); | 193 | extern int netlink_unregister_notifier(struct notifier_block *nb); |
| 194 | 194 | ||
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 1a0b85aa151e..07ce4609fe50 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
| @@ -209,6 +209,7 @@ struct nfs_inode { | |||
| 209 | #define NFS_INO_FLUSHING (4) /* inode is flushing out data */ | 209 | #define NFS_INO_FLUSHING (4) /* inode is flushing out data */ |
| 210 | #define NFS_INO_FSCACHE (5) /* inode can be cached by FS-Cache */ | 210 | #define NFS_INO_FSCACHE (5) /* inode can be cached by FS-Cache */ |
| 211 | #define NFS_INO_FSCACHE_LOCK (6) /* FS-Cache cookie management lock */ | 211 | #define NFS_INO_FSCACHE_LOCK (6) /* FS-Cache cookie management lock */ |
| 212 | #define NFS_INO_COMMIT (7) /* inode is committing unstable writes */ | ||
| 212 | 213 | ||
| 213 | static inline struct nfs_inode *NFS_I(const struct inode *inode) | 214 | static inline struct nfs_inode *NFS_I(const struct inode *inode) |
| 214 | { | 215 | { |
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index 717a5e54eb1d..e82957acea56 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h | |||
| @@ -176,6 +176,7 @@ struct nfs_server { | |||
| 176 | #define NFS_CAP_ATIME (1U << 11) | 176 | #define NFS_CAP_ATIME (1U << 11) |
| 177 | #define NFS_CAP_CTIME (1U << 12) | 177 | #define NFS_CAP_CTIME (1U << 12) |
| 178 | #define NFS_CAP_MTIME (1U << 13) | 178 | #define NFS_CAP_MTIME (1U << 13) |
| 179 | #define NFS_CAP_POSIX_LOCK (1U << 14) | ||
| 179 | 180 | ||
| 180 | 181 | ||
| 181 | /* maximum number of slots to use */ | 182 | /* maximum number of slots to use */ |
diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h index c4fa64b585ff..dba35e413371 100644 --- a/include/linux/nodemask.h +++ b/include/linux/nodemask.h | |||
| @@ -483,7 +483,7 @@ static inline int num_node_state(enum node_states state) | |||
| 483 | type *name = kmalloc(sizeof(*name), gfp_flags) | 483 | type *name = kmalloc(sizeof(*name), gfp_flags) |
| 484 | #define NODEMASK_FREE(m) kfree(m) | 484 | #define NODEMASK_FREE(m) kfree(m) |
| 485 | #else | 485 | #else |
| 486 | #define NODEMASK_ALLOC(type, name, gfp_flags) type _name, *name = &_name | 486 | #define NODEMASK_ALLOC(type, name, gfp_flags) type _##name, *name = &_##name |
| 487 | #define NODEMASK_FREE(m) do {} while (0) | 487 | #define NODEMASK_FREE(m) do {} while (0) |
| 488 | #endif | 488 | #endif |
| 489 | 489 | ||
diff --git a/include/linux/of.h b/include/linux/of.h index f6d9cbc39c9c..a367e19bb3af 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
| @@ -127,7 +127,7 @@ static inline unsigned long of_read_ulong(const __be32 *cell, int size) | |||
| 127 | 127 | ||
| 128 | /* Default string compare functions, Allow arch asm/prom.h to override */ | 128 | /* Default string compare functions, Allow arch asm/prom.h to override */ |
| 129 | #if !defined(of_compat_cmp) | 129 | #if !defined(of_compat_cmp) |
| 130 | #define of_compat_cmp(s1, s2, l) strncasecmp((s1), (s2), (l)) | 130 | #define of_compat_cmp(s1, s2, l) strcasecmp((s1), (s2)) |
| 131 | #define of_prop_cmp(s1, s2) strcmp((s1), (s2)) | 131 | #define of_prop_cmp(s1, s2) strcmp((s1), (s2)) |
| 132 | #define of_node_cmp(s1, s2) strcasecmp((s1), (s2)) | 132 | #define of_node_cmp(s1, s2) strcasecmp((s1), (s2)) |
| 133 | #endif | 133 | #endif |
diff --git a/include/linux/page_cgroup.h b/include/linux/page_cgroup.h index b0e4eb126236..aef22ae2af47 100644 --- a/include/linux/page_cgroup.h +++ b/include/linux/page_cgroup.h | |||
| @@ -39,6 +39,7 @@ enum { | |||
| 39 | PCG_CACHE, /* charged as cache */ | 39 | PCG_CACHE, /* charged as cache */ |
| 40 | PCG_USED, /* this object is in use. */ | 40 | PCG_USED, /* this object is in use. */ |
| 41 | PCG_ACCT_LRU, /* page has been accounted for */ | 41 | PCG_ACCT_LRU, /* page has been accounted for */ |
| 42 | PCG_FILE_MAPPED, /* page is accounted as "mapped" */ | ||
| 42 | }; | 43 | }; |
| 43 | 44 | ||
| 44 | #define TESTPCGFLAG(uname, lname) \ | 45 | #define TESTPCGFLAG(uname, lname) \ |
| @@ -73,6 +74,11 @@ CLEARPCGFLAG(AcctLRU, ACCT_LRU) | |||
| 73 | TESTPCGFLAG(AcctLRU, ACCT_LRU) | 74 | TESTPCGFLAG(AcctLRU, ACCT_LRU) |
| 74 | TESTCLEARPCGFLAG(AcctLRU, ACCT_LRU) | 75 | TESTCLEARPCGFLAG(AcctLRU, ACCT_LRU) |
| 75 | 76 | ||
| 77 | |||
| 78 | SETPCGFLAG(FileMapped, FILE_MAPPED) | ||
| 79 | CLEARPCGFLAG(FileMapped, FILE_MAPPED) | ||
| 80 | TESTPCGFLAG(FileMapped, FILE_MAPPED) | ||
| 81 | |||
| 76 | static inline int page_cgroup_nid(struct page_cgroup *pc) | 82 | static inline int page_cgroup_nid(struct page_cgroup *pc) |
| 77 | { | 83 | { |
| 78 | return page_to_nid(pc->page); | 84 | return page_to_nid(pc->page); |
| @@ -118,6 +124,8 @@ static inline void __init page_cgroup_init_flatmem(void) | |||
| 118 | #include <linux/swap.h> | 124 | #include <linux/swap.h> |
| 119 | 125 | ||
| 120 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP | 126 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP |
| 127 | extern unsigned short swap_cgroup_cmpxchg(swp_entry_t ent, | ||
| 128 | unsigned short old, unsigned short new); | ||
| 121 | extern unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id); | 129 | extern unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id); |
| 122 | extern unsigned short lookup_swap_cgroup(swp_entry_t ent); | 130 | extern unsigned short lookup_swap_cgroup(swp_entry_t ent); |
| 123 | extern int swap_cgroup_swapon(int type, unsigned long max_pages); | 131 | extern int swap_cgroup_swapon(int type, unsigned long max_pages); |
diff --git a/include/linux/pci-dma.h b/include/linux/pci-dma.h new file mode 100644 index 000000000000..549a041f9c08 --- /dev/null +++ b/include/linux/pci-dma.h | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | #ifndef _LINUX_PCI_DMA_H | ||
| 2 | #define _LINUX_PCI_DMA_H | ||
| 3 | |||
| 4 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) DEFINE_DMA_UNMAP_ADDR(ADDR_NAME); | ||
| 5 | #define DECLARE_PCI_UNMAP_LEN(LEN_NAME) DEFINE_DMA_UNMAP_LEN(LEN_NAME); | ||
| 6 | #define pci_unmap_addr dma_unmap_addr | ||
| 7 | #define pci_unmap_addr_set dma_unmap_addr_set | ||
| 8 | #define pci_unmap_len dma_unmap_len | ||
| 9 | #define pci_unmap_len_set dma_unmap_len_set | ||
| 10 | |||
| 11 | #endif | ||
diff --git a/include/linux/pci.h b/include/linux/pci.h index cd5809a5963e..a788fa12ff31 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -769,8 +769,6 @@ int pci_try_set_mwi(struct pci_dev *dev); | |||
| 769 | void pci_clear_mwi(struct pci_dev *dev); | 769 | void pci_clear_mwi(struct pci_dev *dev); |
| 770 | void pci_intx(struct pci_dev *dev, int enable); | 770 | void pci_intx(struct pci_dev *dev, int enable); |
| 771 | void pci_msi_off(struct pci_dev *dev); | 771 | void pci_msi_off(struct pci_dev *dev); |
| 772 | int pci_set_dma_mask(struct pci_dev *dev, u64 mask); | ||
| 773 | int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask); | ||
| 774 | int pci_set_dma_max_seg_size(struct pci_dev *dev, unsigned int size); | 772 | int pci_set_dma_max_seg_size(struct pci_dev *dev, unsigned int size); |
| 775 | int pci_set_dma_seg_boundary(struct pci_dev *dev, unsigned long mask); | 773 | int pci_set_dma_seg_boundary(struct pci_dev *dev, unsigned long mask); |
| 776 | int pcix_get_max_mmrbc(struct pci_dev *dev); | 774 | int pcix_get_max_mmrbc(struct pci_dev *dev); |
| @@ -904,6 +902,7 @@ int pci_set_vga_state(struct pci_dev *pdev, bool decode, | |||
| 904 | unsigned int command_bits, bool change_bridge); | 902 | unsigned int command_bits, bool change_bridge); |
| 905 | /* kmem_cache style wrapper around pci_alloc_consistent() */ | 903 | /* kmem_cache style wrapper around pci_alloc_consistent() */ |
| 906 | 904 | ||
| 905 | #include <linux/pci-dma.h> | ||
| 907 | #include <linux/dmapool.h> | 906 | #include <linux/dmapool.h> |
| 908 | 907 | ||
| 909 | #define pci_pool dma_pool | 908 | #define pci_pool dma_pool |
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index a93e5bfdccb8..d3a38d687104 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
| @@ -2,10 +2,10 @@ | |||
| 2 | #define __LINUX_PERCPU_H | 2 | #define __LINUX_PERCPU_H |
| 3 | 3 | ||
| 4 | #include <linux/preempt.h> | 4 | #include <linux/preempt.h> |
| 5 | #include <linux/slab.h> /* For kmalloc() */ | ||
| 6 | #include <linux/smp.h> | 5 | #include <linux/smp.h> |
| 7 | #include <linux/cpumask.h> | 6 | #include <linux/cpumask.h> |
| 8 | #include <linux/pfn.h> | 7 | #include <linux/pfn.h> |
| 8 | #include <linux/init.h> | ||
| 9 | 9 | ||
| 10 | #include <asm/percpu.h> | 10 | #include <asm/percpu.h> |
| 11 | 11 | ||
| @@ -135,9 +135,7 @@ extern int __init pcpu_page_first_chunk(size_t reserved_size, | |||
| 135 | #define per_cpu_ptr(ptr, cpu) SHIFT_PERCPU_PTR((ptr), per_cpu_offset((cpu))) | 135 | #define per_cpu_ptr(ptr, cpu) SHIFT_PERCPU_PTR((ptr), per_cpu_offset((cpu))) |
| 136 | 136 | ||
| 137 | extern void __percpu *__alloc_reserved_percpu(size_t size, size_t align); | 137 | extern void __percpu *__alloc_reserved_percpu(size_t size, size_t align); |
| 138 | extern void __percpu *__alloc_percpu(size_t size, size_t align); | 138 | extern bool is_kernel_percpu_address(unsigned long addr); |
| 139 | extern void free_percpu(void __percpu *__pdata); | ||
| 140 | extern phys_addr_t per_cpu_ptr_to_phys(void *addr); | ||
| 141 | 139 | ||
| 142 | #ifndef CONFIG_HAVE_SETUP_PER_CPU_AREA | 140 | #ifndef CONFIG_HAVE_SETUP_PER_CPU_AREA |
| 143 | extern void __init setup_per_cpu_areas(void); | 141 | extern void __init setup_per_cpu_areas(void); |
| @@ -147,25 +145,10 @@ extern void __init setup_per_cpu_areas(void); | |||
| 147 | 145 | ||
| 148 | #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); }) | 146 | #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); }) |
| 149 | 147 | ||
| 150 | static inline void __percpu *__alloc_percpu(size_t size, size_t align) | 148 | /* can't distinguish from other static vars, always false */ |
| 149 | static inline bool is_kernel_percpu_address(unsigned long addr) | ||
| 151 | { | 150 | { |
| 152 | /* | 151 | return false; |
| 153 | * Can't easily make larger alignment work with kmalloc. WARN | ||
| 154 | * on it. Larger alignment should only be used for module | ||
| 155 | * percpu sections on SMP for which this path isn't used. | ||
| 156 | */ | ||
| 157 | WARN_ON_ONCE(align > SMP_CACHE_BYTES); | ||
| 158 | return kzalloc(size, GFP_KERNEL); | ||
| 159 | } | ||
| 160 | |||
| 161 | static inline void free_percpu(void __percpu *p) | ||
| 162 | { | ||
| 163 | kfree(p); | ||
| 164 | } | ||
| 165 | |||
| 166 | static inline phys_addr_t per_cpu_ptr_to_phys(void *addr) | ||
| 167 | { | ||
| 168 | return __pa(addr); | ||
| 169 | } | 152 | } |
| 170 | 153 | ||
| 171 | static inline void __init setup_per_cpu_areas(void) { } | 154 | static inline void __init setup_per_cpu_areas(void) { } |
| @@ -177,6 +160,10 @@ static inline void *pcpu_lpage_remapped(void *kaddr) | |||
| 177 | 160 | ||
| 178 | #endif /* CONFIG_SMP */ | 161 | #endif /* CONFIG_SMP */ |
| 179 | 162 | ||
| 163 | extern void __percpu *__alloc_percpu(size_t size, size_t align); | ||
| 164 | extern void free_percpu(void __percpu *__pdata); | ||
| 165 | extern phys_addr_t per_cpu_ptr_to_phys(void *addr); | ||
| 166 | |||
| 180 | #define alloc_percpu(type) \ | 167 | #define alloc_percpu(type) \ |
| 181 | (typeof(type) __percpu *)__alloc_percpu(sizeof(type), __alignof__(type)) | 168 | (typeof(type) __percpu *)__alloc_percpu(sizeof(type), __alignof__(type)) |
| 182 | 169 | ||
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 7b18b4fd5df7..3fd5c82e0e18 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
| @@ -203,8 +203,19 @@ struct perf_event_attr { | |||
| 203 | enable_on_exec : 1, /* next exec enables */ | 203 | enable_on_exec : 1, /* next exec enables */ |
| 204 | task : 1, /* trace fork/exit */ | 204 | task : 1, /* trace fork/exit */ |
| 205 | watermark : 1, /* wakeup_watermark */ | 205 | watermark : 1, /* wakeup_watermark */ |
| 206 | 206 | /* | |
| 207 | __reserved_1 : 49; | 207 | * precise_ip: |
| 208 | * | ||
| 209 | * 0 - SAMPLE_IP can have arbitrary skid | ||
| 210 | * 1 - SAMPLE_IP must have constant skid | ||
| 211 | * 2 - SAMPLE_IP requested to have 0 skid | ||
| 212 | * 3 - SAMPLE_IP must have 0 skid | ||
| 213 | * | ||
| 214 | * See also PERF_RECORD_MISC_EXACT_IP | ||
| 215 | */ | ||
| 216 | precise_ip : 2, /* skid constraint */ | ||
| 217 | |||
| 218 | __reserved_1 : 47; | ||
| 208 | 219 | ||
| 209 | union { | 220 | union { |
| 210 | __u32 wakeup_events; /* wakeup every n events */ | 221 | __u32 wakeup_events; /* wakeup every n events */ |
| @@ -287,11 +298,24 @@ struct perf_event_mmap_page { | |||
| 287 | __u64 data_tail; /* user-space written tail */ | 298 | __u64 data_tail; /* user-space written tail */ |
| 288 | }; | 299 | }; |
| 289 | 300 | ||
| 290 | #define PERF_RECORD_MISC_CPUMODE_MASK (3 << 0) | 301 | #define PERF_RECORD_MISC_CPUMODE_MASK (7 << 0) |
| 291 | #define PERF_RECORD_MISC_CPUMODE_UNKNOWN (0 << 0) | 302 | #define PERF_RECORD_MISC_CPUMODE_UNKNOWN (0 << 0) |
| 292 | #define PERF_RECORD_MISC_KERNEL (1 << 0) | 303 | #define PERF_RECORD_MISC_KERNEL (1 << 0) |
| 293 | #define PERF_RECORD_MISC_USER (2 << 0) | 304 | #define PERF_RECORD_MISC_USER (2 << 0) |
| 294 | #define PERF_RECORD_MISC_HYPERVISOR (3 << 0) | 305 | #define PERF_RECORD_MISC_HYPERVISOR (3 << 0) |
| 306 | #define PERF_RECORD_MISC_GUEST_KERNEL (4 << 0) | ||
| 307 | #define PERF_RECORD_MISC_GUEST_USER (5 << 0) | ||
| 308 | |||
| 309 | /* | ||
| 310 | * Indicates that the content of PERF_SAMPLE_IP points to | ||
| 311 | * the actual instruction that triggered the event. See also | ||
| 312 | * perf_event_attr::precise_ip. | ||
| 313 | */ | ||
| 314 | #define PERF_RECORD_MISC_EXACT_IP (1 << 14) | ||
| 315 | /* | ||
| 316 | * Reserve the last bit to indicate some extended misc field | ||
| 317 | */ | ||
| 318 | #define PERF_RECORD_MISC_EXT_RESERVED (1 << 15) | ||
| 295 | 319 | ||
| 296 | struct perf_event_header { | 320 | struct perf_event_header { |
| 297 | __u32 type; | 321 | __u32 type; |
| @@ -439,6 +463,12 @@ enum perf_callchain_context { | |||
| 439 | # include <asm/perf_event.h> | 463 | # include <asm/perf_event.h> |
| 440 | #endif | 464 | #endif |
| 441 | 465 | ||
| 466 | struct perf_guest_info_callbacks { | ||
| 467 | int (*is_in_guest) (void); | ||
| 468 | int (*is_user_mode) (void); | ||
| 469 | unsigned long (*get_guest_ip) (void); | ||
| 470 | }; | ||
| 471 | |||
| 442 | #ifdef CONFIG_HAVE_HW_BREAKPOINT | 472 | #ifdef CONFIG_HAVE_HW_BREAKPOINT |
| 443 | #include <asm/hw_breakpoint.h> | 473 | #include <asm/hw_breakpoint.h> |
| 444 | #endif | 474 | #endif |
| @@ -452,6 +482,8 @@ enum perf_callchain_context { | |||
| 452 | #include <linux/fs.h> | 482 | #include <linux/fs.h> |
| 453 | #include <linux/pid_namespace.h> | 483 | #include <linux/pid_namespace.h> |
| 454 | #include <linux/workqueue.h> | 484 | #include <linux/workqueue.h> |
| 485 | #include <linux/ftrace.h> | ||
| 486 | #include <linux/cpu.h> | ||
| 455 | #include <asm/atomic.h> | 487 | #include <asm/atomic.h> |
| 456 | 488 | ||
| 457 | #define PERF_MAX_STACK_DEPTH 255 | 489 | #define PERF_MAX_STACK_DEPTH 255 |
| @@ -466,6 +498,17 @@ struct perf_raw_record { | |||
| 466 | void *data; | 498 | void *data; |
| 467 | }; | 499 | }; |
| 468 | 500 | ||
| 501 | struct perf_branch_entry { | ||
| 502 | __u64 from; | ||
| 503 | __u64 to; | ||
| 504 | __u64 flags; | ||
| 505 | }; | ||
| 506 | |||
| 507 | struct perf_branch_stack { | ||
| 508 | __u64 nr; | ||
| 509 | struct perf_branch_entry entries[0]; | ||
| 510 | }; | ||
| 511 | |||
| 469 | struct task_struct; | 512 | struct task_struct; |
| 470 | 513 | ||
| 471 | /** | 514 | /** |
| @@ -487,9 +530,8 @@ struct hw_perf_event { | |||
| 487 | struct hrtimer hrtimer; | 530 | struct hrtimer hrtimer; |
| 488 | }; | 531 | }; |
| 489 | #ifdef CONFIG_HAVE_HW_BREAKPOINT | 532 | #ifdef CONFIG_HAVE_HW_BREAKPOINT |
| 490 | union { /* breakpoint */ | 533 | /* breakpoint */ |
| 491 | struct arch_hw_breakpoint info; | 534 | struct arch_hw_breakpoint info; |
| 492 | }; | ||
| 493 | #endif | 535 | #endif |
| 494 | }; | 536 | }; |
| 495 | atomic64_t prev_count; | 537 | atomic64_t prev_count; |
| @@ -505,6 +547,8 @@ struct hw_perf_event { | |||
| 505 | 547 | ||
| 506 | struct perf_event; | 548 | struct perf_event; |
| 507 | 549 | ||
| 550 | #define PERF_EVENT_TXN_STARTED 1 | ||
| 551 | |||
| 508 | /** | 552 | /** |
| 509 | * struct pmu - generic performance monitoring unit | 553 | * struct pmu - generic performance monitoring unit |
| 510 | */ | 554 | */ |
| @@ -515,6 +559,16 @@ struct pmu { | |||
| 515 | void (*stop) (struct perf_event *event); | 559 | void (*stop) (struct perf_event *event); |
| 516 | void (*read) (struct perf_event *event); | 560 | void (*read) (struct perf_event *event); |
| 517 | void (*unthrottle) (struct perf_event *event); | 561 | void (*unthrottle) (struct perf_event *event); |
| 562 | |||
| 563 | /* | ||
| 564 | * group events scheduling is treated as a transaction, | ||
| 565 | * add group events as a whole and perform one schedulability test. | ||
| 566 | * If test fails, roll back the whole group | ||
| 567 | */ | ||
| 568 | |||
| 569 | void (*start_txn) (const struct pmu *pmu); | ||
| 570 | void (*cancel_txn) (const struct pmu *pmu); | ||
| 571 | int (*commit_txn) (const struct pmu *pmu); | ||
| 518 | }; | 572 | }; |
| 519 | 573 | ||
| 520 | /** | 574 | /** |
| @@ -570,6 +624,14 @@ enum perf_group_flag { | |||
| 570 | PERF_GROUP_SOFTWARE = 0x1, | 624 | PERF_GROUP_SOFTWARE = 0x1, |
| 571 | }; | 625 | }; |
| 572 | 626 | ||
| 627 | #define SWEVENT_HLIST_BITS 8 | ||
| 628 | #define SWEVENT_HLIST_SIZE (1 << SWEVENT_HLIST_BITS) | ||
| 629 | |||
| 630 | struct swevent_hlist { | ||
| 631 | struct hlist_head heads[SWEVENT_HLIST_SIZE]; | ||
| 632 | struct rcu_head rcu_head; | ||
| 633 | }; | ||
| 634 | |||
| 573 | /** | 635 | /** |
| 574 | * struct perf_event - performance event kernel representation: | 636 | * struct perf_event - performance event kernel representation: |
| 575 | */ | 637 | */ |
| @@ -578,6 +640,7 @@ struct perf_event { | |||
| 578 | struct list_head group_entry; | 640 | struct list_head group_entry; |
| 579 | struct list_head event_entry; | 641 | struct list_head event_entry; |
| 580 | struct list_head sibling_list; | 642 | struct list_head sibling_list; |
| 643 | struct hlist_node hlist_entry; | ||
| 581 | int nr_siblings; | 644 | int nr_siblings; |
| 582 | int group_flags; | 645 | int group_flags; |
| 583 | struct perf_event *group_leader; | 646 | struct perf_event *group_leader; |
| @@ -725,6 +788,9 @@ struct perf_cpu_context { | |||
| 725 | int active_oncpu; | 788 | int active_oncpu; |
| 726 | int max_pertask; | 789 | int max_pertask; |
| 727 | int exclusive; | 790 | int exclusive; |
| 791 | struct swevent_hlist *swevent_hlist; | ||
| 792 | struct mutex hlist_mutex; | ||
| 793 | int hlist_refcount; | ||
| 728 | 794 | ||
| 729 | /* | 795 | /* |
| 730 | * Recursion avoidance: | 796 | * Recursion avoidance: |
| @@ -768,9 +834,6 @@ extern void perf_disable(void); | |||
| 768 | extern void perf_enable(void); | 834 | extern void perf_enable(void); |
| 769 | extern int perf_event_task_disable(void); | 835 | extern int perf_event_task_disable(void); |
| 770 | extern int perf_event_task_enable(void); | 836 | extern int perf_event_task_enable(void); |
| 771 | extern int hw_perf_group_sched_in(struct perf_event *group_leader, | ||
| 772 | struct perf_cpu_context *cpuctx, | ||
| 773 | struct perf_event_context *ctx); | ||
| 774 | extern void perf_event_update_userpage(struct perf_event *event); | 837 | extern void perf_event_update_userpage(struct perf_event *event); |
| 775 | extern int perf_event_release_kernel(struct perf_event *event); | 838 | extern int perf_event_release_kernel(struct perf_event *event); |
| 776 | extern struct perf_event * | 839 | extern struct perf_event * |
| @@ -802,6 +865,13 @@ struct perf_sample_data { | |||
| 802 | struct perf_raw_record *raw; | 865 | struct perf_raw_record *raw; |
| 803 | }; | 866 | }; |
| 804 | 867 | ||
| 868 | static inline | ||
| 869 | void perf_sample_data_init(struct perf_sample_data *data, u64 addr) | ||
| 870 | { | ||
| 871 | data->addr = addr; | ||
| 872 | data->raw = NULL; | ||
| 873 | } | ||
| 874 | |||
| 805 | extern void perf_output_sample(struct perf_output_handle *handle, | 875 | extern void perf_output_sample(struct perf_output_handle *handle, |
| 806 | struct perf_event_header *header, | 876 | struct perf_event_header *header, |
| 807 | struct perf_sample_data *data, | 877 | struct perf_sample_data *data, |
| @@ -834,11 +904,56 @@ extern atomic_t perf_swevent_enabled[PERF_COUNT_SW_MAX]; | |||
| 834 | 904 | ||
| 835 | extern void __perf_sw_event(u32, u64, int, struct pt_regs *, u64); | 905 | extern void __perf_sw_event(u32, u64, int, struct pt_regs *, u64); |
| 836 | 906 | ||
| 907 | extern void | ||
| 908 | perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int skip); | ||
| 909 | |||
| 910 | /* | ||
| 911 | * Take a snapshot of the regs. Skip ip and frame pointer to | ||
| 912 | * the nth caller. We only need a few of the regs: | ||
| 913 | * - ip for PERF_SAMPLE_IP | ||
| 914 | * - cs for user_mode() tests | ||
| 915 | * - bp for callchains | ||
| 916 | * - eflags, for future purposes, just in case | ||
| 917 | */ | ||
| 918 | static inline void perf_fetch_caller_regs(struct pt_regs *regs, int skip) | ||
| 919 | { | ||
| 920 | unsigned long ip; | ||
| 921 | |||
| 922 | memset(regs, 0, sizeof(*regs)); | ||
| 923 | |||
| 924 | switch (skip) { | ||
| 925 | case 1 : | ||
| 926 | ip = CALLER_ADDR0; | ||
| 927 | break; | ||
| 928 | case 2 : | ||
| 929 | ip = CALLER_ADDR1; | ||
| 930 | break; | ||
| 931 | case 3 : | ||
| 932 | ip = CALLER_ADDR2; | ||
| 933 | break; | ||
| 934 | case 4: | ||
| 935 | ip = CALLER_ADDR3; | ||
| 936 | break; | ||
| 937 | /* No need to support further for now */ | ||
| 938 | default: | ||
| 939 | ip = 0; | ||
| 940 | } | ||
| 941 | |||
| 942 | return perf_arch_fetch_caller_regs(regs, ip, skip); | ||
| 943 | } | ||
| 944 | |||
| 837 | static inline void | 945 | static inline void |
| 838 | perf_sw_event(u32 event_id, u64 nr, int nmi, struct pt_regs *regs, u64 addr) | 946 | perf_sw_event(u32 event_id, u64 nr, int nmi, struct pt_regs *regs, u64 addr) |
| 839 | { | 947 | { |
| 840 | if (atomic_read(&perf_swevent_enabled[event_id])) | 948 | if (atomic_read(&perf_swevent_enabled[event_id])) { |
| 949 | struct pt_regs hot_regs; | ||
| 950 | |||
| 951 | if (!regs) { | ||
| 952 | perf_fetch_caller_regs(&hot_regs, 1); | ||
| 953 | regs = &hot_regs; | ||
| 954 | } | ||
| 841 | __perf_sw_event(event_id, nr, nmi, regs, addr); | 955 | __perf_sw_event(event_id, nr, nmi, regs, addr); |
| 956 | } | ||
| 842 | } | 957 | } |
| 843 | 958 | ||
| 844 | extern void __perf_event_mmap(struct vm_area_struct *vma); | 959 | extern void __perf_event_mmap(struct vm_area_struct *vma); |
| @@ -849,6 +964,10 @@ static inline void perf_event_mmap(struct vm_area_struct *vma) | |||
| 849 | __perf_event_mmap(vma); | 964 | __perf_event_mmap(vma); |
| 850 | } | 965 | } |
| 851 | 966 | ||
| 967 | extern struct perf_guest_info_callbacks *perf_guest_cbs; | ||
| 968 | extern int perf_register_guest_info_callbacks(struct perf_guest_info_callbacks *callbacks); | ||
| 969 | extern int perf_unregister_guest_info_callbacks(struct perf_guest_info_callbacks *callbacks); | ||
| 970 | |||
| 852 | extern void perf_event_comm(struct task_struct *tsk); | 971 | extern void perf_event_comm(struct task_struct *tsk); |
| 853 | extern void perf_event_fork(struct task_struct *tsk); | 972 | extern void perf_event_fork(struct task_struct *tsk); |
| 854 | 973 | ||
| @@ -858,8 +977,24 @@ extern int sysctl_perf_event_paranoid; | |||
| 858 | extern int sysctl_perf_event_mlock; | 977 | extern int sysctl_perf_event_mlock; |
| 859 | extern int sysctl_perf_event_sample_rate; | 978 | extern int sysctl_perf_event_sample_rate; |
| 860 | 979 | ||
| 980 | static inline bool perf_paranoid_tracepoint_raw(void) | ||
| 981 | { | ||
| 982 | return sysctl_perf_event_paranoid > -1; | ||
| 983 | } | ||
| 984 | |||
| 985 | static inline bool perf_paranoid_cpu(void) | ||
| 986 | { | ||
| 987 | return sysctl_perf_event_paranoid > 0; | ||
| 988 | } | ||
| 989 | |||
| 990 | static inline bool perf_paranoid_kernel(void) | ||
| 991 | { | ||
| 992 | return sysctl_perf_event_paranoid > 1; | ||
| 993 | } | ||
| 994 | |||
| 861 | extern void perf_event_init(void); | 995 | extern void perf_event_init(void); |
| 862 | extern void perf_tp_event(int event_id, u64 addr, u64 count, void *record, int entry_size); | 996 | extern void perf_tp_event(int event_id, u64 addr, u64 count, void *record, |
| 997 | int entry_size, struct pt_regs *regs); | ||
| 863 | extern void perf_bp_event(struct perf_event *event, void *data); | 998 | extern void perf_bp_event(struct perf_event *event, void *data); |
| 864 | 999 | ||
| 865 | #ifndef perf_misc_flags | 1000 | #ifndef perf_misc_flags |
| @@ -902,6 +1037,11 @@ perf_sw_event(u32 event_id, u64 nr, int nmi, | |||
| 902 | static inline void | 1037 | static inline void |
| 903 | perf_bp_event(struct perf_event *event, void *data) { } | 1038 | perf_bp_event(struct perf_event *event, void *data) { } |
| 904 | 1039 | ||
| 1040 | static inline int perf_register_guest_info_callbacks | ||
| 1041 | (struct perf_guest_info_callbacks *callbacks) { return 0; } | ||
| 1042 | static inline int perf_unregister_guest_info_callbacks | ||
| 1043 | (struct perf_guest_info_callbacks *callbacks) { return 0; } | ||
| 1044 | |||
| 905 | static inline void perf_event_mmap(struct vm_area_struct *vma) { } | 1045 | static inline void perf_event_mmap(struct vm_area_struct *vma) { } |
| 906 | static inline void perf_event_comm(struct task_struct *tsk) { } | 1046 | static inline void perf_event_comm(struct task_struct *tsk) { } |
| 907 | static inline void perf_event_fork(struct task_struct *tsk) { } | 1047 | static inline void perf_event_fork(struct task_struct *tsk) { } |
| @@ -915,5 +1055,21 @@ static inline void perf_event_disable(struct perf_event *event) { } | |||
| 915 | #define perf_output_put(handle, x) \ | 1055 | #define perf_output_put(handle, x) \ |
| 916 | perf_output_copy((handle), &(x), sizeof(x)) | 1056 | perf_output_copy((handle), &(x), sizeof(x)) |
| 917 | 1057 | ||
| 1058 | /* | ||
| 1059 | * This has to have a higher priority than migration_notifier in sched.c. | ||
| 1060 | */ | ||
| 1061 | #define perf_cpu_notifier(fn) \ | ||
| 1062 | do { \ | ||
| 1063 | static struct notifier_block fn##_nb __cpuinitdata = \ | ||
| 1064 | { .notifier_call = fn, .priority = 20 }; \ | ||
| 1065 | fn(&fn##_nb, (unsigned long)CPU_UP_PREPARE, \ | ||
| 1066 | (void *)(unsigned long)smp_processor_id()); \ | ||
| 1067 | fn(&fn##_nb, (unsigned long)CPU_STARTING, \ | ||
| 1068 | (void *)(unsigned long)smp_processor_id()); \ | ||
| 1069 | fn(&fn##_nb, (unsigned long)CPU_ONLINE, \ | ||
| 1070 | (void *)(unsigned long)smp_processor_id()); \ | ||
| 1071 | register_cpu_notifier(&fn##_nb); \ | ||
| 1072 | } while (0) | ||
| 1073 | |||
| 918 | #endif /* __KERNEL__ */ | 1074 | #endif /* __KERNEL__ */ |
| 919 | #endif /* _LINUX_PERF_EVENT_H */ | 1075 | #endif /* _LINUX_PERF_EVENT_H */ |
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index 212da17d06af..5417944d3687 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h | |||
| @@ -44,12 +44,14 @@ extern int platform_get_irq_byname(struct platform_device *, const char *); | |||
| 44 | extern int platform_add_devices(struct platform_device **, int); | 44 | extern int platform_add_devices(struct platform_device **, int); |
| 45 | 45 | ||
| 46 | extern struct platform_device *platform_device_register_simple(const char *, int id, | 46 | extern struct platform_device *platform_device_register_simple(const char *, int id, |
| 47 | struct resource *, unsigned int); | 47 | const struct resource *, unsigned int); |
| 48 | extern struct platform_device *platform_device_register_data(struct device *, | 48 | extern struct platform_device *platform_device_register_data(struct device *, |
| 49 | const char *, int, const void *, size_t); | 49 | const char *, int, const void *, size_t); |
| 50 | 50 | ||
| 51 | extern struct platform_device *platform_device_alloc(const char *name, int id); | 51 | extern struct platform_device *platform_device_alloc(const char *name, int id); |
| 52 | extern int platform_device_add_resources(struct platform_device *pdev, struct resource *res, unsigned int num); | 52 | extern int platform_device_add_resources(struct platform_device *pdev, |
| 53 | const struct resource *res, | ||
| 54 | unsigned int num); | ||
| 53 | extern int platform_device_add_data(struct platform_device *pdev, const void *data, size_t size); | 55 | extern int platform_device_add_data(struct platform_device *pdev, const void *data, size_t size); |
| 54 | extern int platform_device_add(struct platform_device *pdev); | 56 | extern int platform_device_add(struct platform_device *pdev); |
| 55 | extern void platform_device_del(struct platform_device *pdev); | 57 | extern void platform_device_del(struct platform_device *pdev); |
diff --git a/include/linux/poison.h b/include/linux/poison.h index 2110a81c5e2a..34066ffd893d 100644 --- a/include/linux/poison.h +++ b/include/linux/poison.h | |||
| @@ -48,6 +48,15 @@ | |||
| 48 | #define POISON_FREE 0x6b /* for use-after-free poisoning */ | 48 | #define POISON_FREE 0x6b /* for use-after-free poisoning */ |
| 49 | #define POISON_END 0xa5 /* end-byte of poisoning */ | 49 | #define POISON_END 0xa5 /* end-byte of poisoning */ |
| 50 | 50 | ||
| 51 | /********** mm/hugetlb.c **********/ | ||
| 52 | /* | ||
| 53 | * Private mappings of hugetlb pages use this poisoned value for | ||
| 54 | * page->mapping. The core VM should not be doing anything with this mapping | ||
| 55 | * but futex requires the existence of some page->mapping value even though it | ||
| 56 | * is unused if PAGE_MAPPING_ANON is set. | ||
| 57 | */ | ||
| 58 | #define HUGETLB_POISON ((void *)(0x00300300 + POISON_POINTER_DELTA + PAGE_MAPPING_ANON)) | ||
| 59 | |||
| 51 | /********** arch/$ARCH/mm/init.c **********/ | 60 | /********** arch/$ARCH/mm/init.c **********/ |
| 52 | #define POISON_FREE_INITMEM 0xcc | 61 | #define POISON_FREE_INITMEM 0xcc |
| 53 | 62 | ||
diff --git a/include/linux/poll.h b/include/linux/poll.h index 6673743946f7..600cc1fde64d 100644 --- a/include/linux/poll.h +++ b/include/linux/poll.h | |||
| @@ -10,8 +10,10 @@ | |||
| 10 | #include <linux/wait.h> | 10 | #include <linux/wait.h> |
| 11 | #include <linux/string.h> | 11 | #include <linux/string.h> |
| 12 | #include <linux/fs.h> | 12 | #include <linux/fs.h> |
| 13 | #include <linux/sysctl.h> | ||
| 13 | #include <asm/uaccess.h> | 14 | #include <asm/uaccess.h> |
| 14 | 15 | ||
| 16 | extern struct ctl_table epoll_table[]; /* for sysctl */ | ||
| 15 | /* ~832 bytes of stack space used max in sys_select/sys_poll before allocating | 17 | /* ~832 bytes of stack space used max in sys_select/sys_poll before allocating |
| 16 | additional memory. */ | 18 | additional memory. */ |
| 17 | #define MAX_STACK_ALLOC 832 | 19 | #define MAX_STACK_ALLOC 832 |
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index b5d096d3a9be..ebd2b8fb00d0 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h | |||
| @@ -82,6 +82,7 @@ enum power_supply_property { | |||
| 82 | POWER_SUPPLY_PROP_PRESENT, | 82 | POWER_SUPPLY_PROP_PRESENT, |
| 83 | POWER_SUPPLY_PROP_ONLINE, | 83 | POWER_SUPPLY_PROP_ONLINE, |
| 84 | POWER_SUPPLY_PROP_TECHNOLOGY, | 84 | POWER_SUPPLY_PROP_TECHNOLOGY, |
| 85 | POWER_SUPPLY_PROP_CYCLE_COUNT, | ||
| 85 | POWER_SUPPLY_PROP_VOLTAGE_MAX, | 86 | POWER_SUPPLY_PROP_VOLTAGE_MAX, |
| 86 | POWER_SUPPLY_PROP_VOLTAGE_MIN, | 87 | POWER_SUPPLY_PROP_VOLTAGE_MIN, |
| 87 | POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN, | 88 | POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN, |
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index c5eab89da51e..4272521e29e9 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h | |||
| @@ -264,6 +264,9 @@ static inline void user_enable_single_step(struct task_struct *task) | |||
| 264 | static inline void user_disable_single_step(struct task_struct *task) | 264 | static inline void user_disable_single_step(struct task_struct *task) |
| 265 | { | 265 | { |
| 266 | } | 266 | } |
| 267 | #else | ||
| 268 | extern void user_enable_single_step(struct task_struct *); | ||
| 269 | extern void user_disable_single_step(struct task_struct *); | ||
| 267 | #endif /* arch_has_single_step */ | 270 | #endif /* arch_has_single_step */ |
| 268 | 271 | ||
| 269 | #ifndef arch_has_block_step | 272 | #ifndef arch_has_block_step |
| @@ -291,6 +294,8 @@ static inline void user_enable_block_step(struct task_struct *task) | |||
| 291 | { | 294 | { |
| 292 | BUG(); /* This can never be called. */ | 295 | BUG(); /* This can never be called. */ |
| 293 | } | 296 | } |
| 297 | #else | ||
| 298 | extern void user_enable_block_step(struct task_struct *); | ||
| 294 | #endif /* arch_has_block_step */ | 299 | #endif /* arch_has_block_step */ |
| 295 | 300 | ||
| 296 | #ifdef ARCH_HAS_USER_SINGLE_STEP_INFO | 301 | #ifdef ARCH_HAS_USER_SINGLE_STEP_INFO |
| @@ -340,18 +345,6 @@ static inline void user_single_step_siginfo(struct task_struct *tsk, | |||
| 340 | #define arch_ptrace_stop(code, info) do { } while (0) | 345 | #define arch_ptrace_stop(code, info) do { } while (0) |
| 341 | #endif | 346 | #endif |
| 342 | 347 | ||
| 343 | #ifndef arch_ptrace_untrace | ||
| 344 | /* | ||
| 345 | * Do machine-specific work before untracing child. | ||
| 346 | * | ||
| 347 | * This is called for a normal detach as well as from ptrace_exit() | ||
| 348 | * when the tracing task dies. | ||
| 349 | * | ||
| 350 | * Called with write_lock(&tasklist_lock) held. | ||
| 351 | */ | ||
| 352 | #define arch_ptrace_untrace(task) do { } while (0) | ||
| 353 | #endif | ||
| 354 | |||
| 355 | extern int task_current_syscall(struct task_struct *target, long *callno, | 348 | extern int task_current_syscall(struct task_struct *target, long *callno, |
| 356 | unsigned long args[6], unsigned int maxargs, | 349 | unsigned long args[6], unsigned int maxargs, |
| 357 | unsigned long *sp, unsigned long *pc); | 350 | unsigned long *sp, unsigned long *pc); |
diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h index c5da74918096..55ca73cf25e5 100644 --- a/include/linux/radix-tree.h +++ b/include/linux/radix-tree.h | |||
| @@ -121,6 +121,13 @@ do { \ | |||
| 121 | * (Note, rcu_assign_pointer and rcu_dereference are not needed to control | 121 | * (Note, rcu_assign_pointer and rcu_dereference are not needed to control |
| 122 | * access to data items when inserting into or looking up from the radix tree) | 122 | * access to data items when inserting into or looking up from the radix tree) |
| 123 | * | 123 | * |
| 124 | * Note that the value returned by radix_tree_tag_get() may not be relied upon | ||
| 125 | * if only the RCU read lock is held. Functions to set/clear tags and to | ||
| 126 | * delete nodes running concurrently with it may affect its result such that | ||
| 127 | * two consecutive reads in the same locked section may return different | ||
| 128 | * values. If reliability is required, modification functions must also be | ||
| 129 | * excluded from concurrency. | ||
| 130 | * | ||
| 124 | * radix_tree_tagged is able to be called without locking or RCU. | 131 | * radix_tree_tagged is able to be called without locking or RCU. |
| 125 | */ | 132 | */ |
| 126 | 133 | ||
diff --git a/include/linux/rbtree.h b/include/linux/rbtree.h index 9c295411d01f..fe1872e5b37e 100644 --- a/include/linux/rbtree.h +++ b/include/linux/rbtree.h | |||
| @@ -25,10 +25,10 @@ | |||
| 25 | 25 | ||
| 26 | Some example of insert and search follows here. The search is a plain | 26 | Some example of insert and search follows here. The search is a plain |
| 27 | normal search over an ordered tree. The insert instead must be implemented | 27 | normal search over an ordered tree. The insert instead must be implemented |
| 28 | int two steps: as first thing the code must insert the element in | 28 | in two steps: First, the code must insert the element in order as a red leaf |
| 29 | order as a red leaf in the tree, then the support library function | 29 | in the tree, and then the support library function rb_insert_color() must |
| 30 | rb_insert_color() must be called. Such function will do the | 30 | be called. Such function will do the not trivial work to rebalance the |
| 31 | not trivial work to rebalance the rbtree if necessary. | 31 | rbtree, if necessary. |
| 32 | 32 | ||
| 33 | ----------------------------------------------------------------------- | 33 | ----------------------------------------------------------------------- |
| 34 | static inline struct page * rb_search_page_cache(struct inode * inode, | 34 | static inline struct page * rb_search_page_cache(struct inode * inode, |
| @@ -110,6 +110,7 @@ struct rb_node | |||
| 110 | struct rb_root | 110 | struct rb_root |
| 111 | { | 111 | { |
| 112 | struct rb_node *rb_node; | 112 | struct rb_node *rb_node; |
| 113 | void (*augment_cb)(struct rb_node *node); | ||
| 113 | }; | 114 | }; |
| 114 | 115 | ||
| 115 | 116 | ||
| @@ -129,7 +130,9 @@ static inline void rb_set_color(struct rb_node *rb, int color) | |||
| 129 | rb->rb_parent_color = (rb->rb_parent_color & ~1) | color; | 130 | rb->rb_parent_color = (rb->rb_parent_color & ~1) | color; |
| 130 | } | 131 | } |
| 131 | 132 | ||
| 132 | #define RB_ROOT (struct rb_root) { NULL, } | 133 | #define RB_ROOT (struct rb_root) { NULL, NULL, } |
| 134 | #define RB_AUGMENT_ROOT(x) (struct rb_root) { NULL, x} | ||
| 135 | |||
| 133 | #define rb_entry(ptr, type, member) container_of(ptr, type, member) | 136 | #define rb_entry(ptr, type, member) container_of(ptr, type, member) |
| 134 | 137 | ||
| 135 | #define RB_EMPTY_ROOT(root) ((root)->rb_node == NULL) | 138 | #define RB_EMPTY_ROOT(root) ((root)->rb_node == NULL) |
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index c84373626336..b653b4aaa8a6 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
| @@ -41,6 +41,10 @@ | |||
| 41 | #include <linux/lockdep.h> | 41 | #include <linux/lockdep.h> |
| 42 | #include <linux/completion.h> | 42 | #include <linux/completion.h> |
| 43 | 43 | ||
| 44 | #ifdef CONFIG_RCU_TORTURE_TEST | ||
| 45 | extern int rcutorture_runnable; /* for sysctl */ | ||
| 46 | #endif /* #ifdef CONFIG_RCU_TORTURE_TEST */ | ||
| 47 | |||
| 44 | /** | 48 | /** |
| 45 | * struct rcu_head - callback structure for use with RCU | 49 | * struct rcu_head - callback structure for use with RCU |
| 46 | * @next: next update requests in a list | 50 | * @next: next update requests in a list |
| @@ -52,8 +56,6 @@ struct rcu_head { | |||
| 52 | }; | 56 | }; |
| 53 | 57 | ||
| 54 | /* Exported common interfaces */ | 58 | /* Exported common interfaces */ |
| 55 | extern void synchronize_rcu_bh(void); | ||
| 56 | extern void synchronize_sched(void); | ||
| 57 | extern void rcu_barrier(void); | 59 | extern void rcu_barrier(void); |
| 58 | extern void rcu_barrier_bh(void); | 60 | extern void rcu_barrier_bh(void); |
| 59 | extern void rcu_barrier_sched(void); | 61 | extern void rcu_barrier_sched(void); |
| @@ -62,8 +64,6 @@ extern int sched_expedited_torture_stats(char *page); | |||
| 62 | 64 | ||
| 63 | /* Internal to kernel */ | 65 | /* Internal to kernel */ |
| 64 | extern void rcu_init(void); | 66 | extern void rcu_init(void); |
| 65 | extern int rcu_scheduler_active; | ||
| 66 | extern void rcu_scheduler_starting(void); | ||
| 67 | 67 | ||
| 68 | #if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) | 68 | #if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) |
| 69 | #include <linux/rcutree.h> | 69 | #include <linux/rcutree.h> |
| @@ -79,6 +79,14 @@ extern void rcu_scheduler_starting(void); | |||
| 79 | (ptr)->next = NULL; (ptr)->func = NULL; \ | 79 | (ptr)->next = NULL; (ptr)->func = NULL; \ |
| 80 | } while (0) | 80 | } while (0) |
| 81 | 81 | ||
| 82 | static inline void init_rcu_head_on_stack(struct rcu_head *head) | ||
| 83 | { | ||
| 84 | } | ||
| 85 | |||
| 86 | static inline void destroy_rcu_head_on_stack(struct rcu_head *head) | ||
| 87 | { | ||
| 88 | } | ||
| 89 | |||
| 82 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 90 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
| 83 | 91 | ||
| 84 | extern struct lockdep_map rcu_lock_map; | 92 | extern struct lockdep_map rcu_lock_map; |
| @@ -97,53 +105,62 @@ extern struct lockdep_map rcu_sched_lock_map; | |||
| 97 | # define rcu_read_release_sched() \ | 105 | # define rcu_read_release_sched() \ |
| 98 | lock_release(&rcu_sched_lock_map, 1, _THIS_IP_) | 106 | lock_release(&rcu_sched_lock_map, 1, _THIS_IP_) |
| 99 | 107 | ||
| 108 | extern int debug_lockdep_rcu_enabled(void); | ||
| 109 | |||
| 100 | /** | 110 | /** |
| 101 | * rcu_read_lock_held - might we be in RCU read-side critical section? | 111 | * rcu_read_lock_held - might we be in RCU read-side critical section? |
| 102 | * | 112 | * |
| 103 | * If CONFIG_PROVE_LOCKING is selected and enabled, returns nonzero iff in | 113 | * If CONFIG_DEBUG_LOCK_ALLOC is selected, returns nonzero iff in an RCU |
| 104 | * an RCU read-side critical section. In absence of CONFIG_PROVE_LOCKING, | 114 | * read-side critical section. In absence of CONFIG_DEBUG_LOCK_ALLOC, |
| 105 | * this assumes we are in an RCU read-side critical section unless it can | 115 | * this assumes we are in an RCU read-side critical section unless it can |
| 106 | * prove otherwise. | 116 | * prove otherwise. |
| 117 | * | ||
| 118 | * Check debug_lockdep_rcu_enabled() to prevent false positives during boot | ||
| 119 | * and while lockdep is disabled. | ||
| 107 | */ | 120 | */ |
| 108 | static inline int rcu_read_lock_held(void) | 121 | static inline int rcu_read_lock_held(void) |
| 109 | { | 122 | { |
| 110 | if (debug_locks) | 123 | if (!debug_lockdep_rcu_enabled()) |
| 111 | return lock_is_held(&rcu_lock_map); | 124 | return 1; |
| 112 | return 1; | 125 | return lock_is_held(&rcu_lock_map); |
| 113 | } | 126 | } |
| 114 | 127 | ||
| 115 | /** | 128 | /* |
| 116 | * rcu_read_lock_bh_held - might we be in RCU-bh read-side critical section? | 129 | * rcu_read_lock_bh_held() is defined out of line to avoid #include-file |
| 117 | * | 130 | * hell. |
| 118 | * If CONFIG_PROVE_LOCKING is selected and enabled, returns nonzero iff in | ||
| 119 | * an RCU-bh read-side critical section. In absence of CONFIG_PROVE_LOCKING, | ||
| 120 | * this assumes we are in an RCU-bh read-side critical section unless it can | ||
| 121 | * prove otherwise. | ||
| 122 | */ | 131 | */ |
| 123 | static inline int rcu_read_lock_bh_held(void) | 132 | extern int rcu_read_lock_bh_held(void); |
| 124 | { | ||
| 125 | if (debug_locks) | ||
| 126 | return lock_is_held(&rcu_bh_lock_map); | ||
| 127 | return 1; | ||
| 128 | } | ||
| 129 | 133 | ||
| 130 | /** | 134 | /** |
| 131 | * rcu_read_lock_sched_held - might we be in RCU-sched read-side critical section? | 135 | * rcu_read_lock_sched_held - might we be in RCU-sched read-side critical section? |
| 132 | * | 136 | * |
| 133 | * If CONFIG_PROVE_LOCKING is selected and enabled, returns nonzero iff in an | 137 | * If CONFIG_DEBUG_LOCK_ALLOC is selected, returns nonzero iff in an |
| 134 | * RCU-sched read-side critical section. In absence of CONFIG_PROVE_LOCKING, | 138 | * RCU-sched read-side critical section. In absence of |
| 135 | * this assumes we are in an RCU-sched read-side critical section unless it | 139 | * CONFIG_DEBUG_LOCK_ALLOC, this assumes we are in an RCU-sched read-side |
| 136 | * can prove otherwise. Note that disabling of preemption (including | 140 | * critical section unless it can prove otherwise. Note that disabling |
| 137 | * disabling irqs) counts as an RCU-sched read-side critical section. | 141 | * of preemption (including disabling irqs) counts as an RCU-sched |
| 142 | * read-side critical section. | ||
| 143 | * | ||
| 144 | * Check debug_lockdep_rcu_enabled() to prevent false positives during boot | ||
| 145 | * and while lockdep is disabled. | ||
| 138 | */ | 146 | */ |
| 147 | #ifdef CONFIG_PREEMPT | ||
| 139 | static inline int rcu_read_lock_sched_held(void) | 148 | static inline int rcu_read_lock_sched_held(void) |
| 140 | { | 149 | { |
| 141 | int lockdep_opinion = 0; | 150 | int lockdep_opinion = 0; |
| 142 | 151 | ||
| 152 | if (!debug_lockdep_rcu_enabled()) | ||
| 153 | return 1; | ||
| 143 | if (debug_locks) | 154 | if (debug_locks) |
| 144 | lockdep_opinion = lock_is_held(&rcu_sched_lock_map); | 155 | lockdep_opinion = lock_is_held(&rcu_sched_lock_map); |
| 145 | return lockdep_opinion || preempt_count() != 0 || !rcu_scheduler_active; | 156 | return lockdep_opinion || preempt_count() != 0 || irqs_disabled(); |
| 157 | } | ||
| 158 | #else /* #ifdef CONFIG_PREEMPT */ | ||
| 159 | static inline int rcu_read_lock_sched_held(void) | ||
| 160 | { | ||
| 161 | return 1; | ||
| 146 | } | 162 | } |
| 163 | #endif /* #else #ifdef CONFIG_PREEMPT */ | ||
| 147 | 164 | ||
| 148 | #else /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */ | 165 | #else /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */ |
| 149 | 166 | ||
| @@ -164,38 +181,104 @@ static inline int rcu_read_lock_bh_held(void) | |||
| 164 | return 1; | 181 | return 1; |
| 165 | } | 182 | } |
| 166 | 183 | ||
| 184 | #ifdef CONFIG_PREEMPT | ||
| 185 | static inline int rcu_read_lock_sched_held(void) | ||
| 186 | { | ||
| 187 | return preempt_count() != 0 || irqs_disabled(); | ||
| 188 | } | ||
| 189 | #else /* #ifdef CONFIG_PREEMPT */ | ||
| 167 | static inline int rcu_read_lock_sched_held(void) | 190 | static inline int rcu_read_lock_sched_held(void) |
| 168 | { | 191 | { |
| 169 | return preempt_count() != 0 || !rcu_scheduler_active; | 192 | return 1; |
| 170 | } | 193 | } |
| 194 | #endif /* #else #ifdef CONFIG_PREEMPT */ | ||
| 171 | 195 | ||
| 172 | #endif /* #else #ifdef CONFIG_DEBUG_LOCK_ALLOC */ | 196 | #endif /* #else #ifdef CONFIG_DEBUG_LOCK_ALLOC */ |
| 173 | 197 | ||
| 174 | #ifdef CONFIG_PROVE_RCU | 198 | #ifdef CONFIG_PROVE_RCU |
| 175 | 199 | ||
| 200 | extern int rcu_my_thread_group_empty(void); | ||
| 201 | |||
| 202 | #define __do_rcu_dereference_check(c) \ | ||
| 203 | do { \ | ||
| 204 | static bool __warned; \ | ||
| 205 | if (debug_lockdep_rcu_enabled() && !__warned && !(c)) { \ | ||
| 206 | __warned = true; \ | ||
| 207 | lockdep_rcu_dereference(__FILE__, __LINE__); \ | ||
| 208 | } \ | ||
| 209 | } while (0) | ||
| 210 | |||
| 176 | /** | 211 | /** |
| 177 | * rcu_dereference_check - rcu_dereference with debug checking | 212 | * rcu_dereference_check - rcu_dereference with debug checking |
| 213 | * @p: The pointer to read, prior to dereferencing | ||
| 214 | * @c: The conditions under which the dereference will take place | ||
| 215 | * | ||
| 216 | * Do an rcu_dereference(), but check that the conditions under which the | ||
| 217 | * dereference will take place are correct. Typically the conditions indicate | ||
| 218 | * the various locking conditions that should be held at that point. The check | ||
| 219 | * should return true if the conditions are satisfied. | ||
| 220 | * | ||
| 221 | * For example: | ||
| 222 | * | ||
| 223 | * bar = rcu_dereference_check(foo->bar, rcu_read_lock_held() || | ||
| 224 | * lockdep_is_held(&foo->lock)); | ||
| 225 | * | ||
| 226 | * could be used to indicate to lockdep that foo->bar may only be dereferenced | ||
| 227 | * if either the RCU read lock is held, or that the lock required to replace | ||
| 228 | * the bar struct at foo->bar is held. | ||
| 178 | * | 229 | * |
| 179 | * Do an rcu_dereference(), but check that the context is correct. | 230 | * Note that the list of conditions may also include indications of when a lock |
| 180 | * For example, rcu_dereference_check(gp, rcu_read_lock_held()) to | 231 | * need not be held, for example during initialisation or destruction of the |
| 181 | * ensure that the rcu_dereference_check() executes within an RCU | 232 | * target struct: |
| 182 | * read-side critical section. It is also possible to check for | 233 | * |
| 183 | * locks being held, for example, by using lockdep_is_held(). | 234 | * bar = rcu_dereference_check(foo->bar, rcu_read_lock_held() || |
| 235 | * lockdep_is_held(&foo->lock) || | ||
| 236 | * atomic_read(&foo->usage) == 0); | ||
| 184 | */ | 237 | */ |
| 185 | #define rcu_dereference_check(p, c) \ | 238 | #define rcu_dereference_check(p, c) \ |
| 186 | ({ \ | 239 | ({ \ |
| 187 | if (debug_locks && !(c)) \ | 240 | __do_rcu_dereference_check(c); \ |
| 188 | lockdep_rcu_dereference(__FILE__, __LINE__); \ | ||
| 189 | rcu_dereference_raw(p); \ | 241 | rcu_dereference_raw(p); \ |
| 190 | }) | 242 | }) |
| 191 | 243 | ||
| 244 | /** | ||
| 245 | * rcu_dereference_protected - fetch RCU pointer when updates prevented | ||
| 246 | * | ||
| 247 | * Return the value of the specified RCU-protected pointer, but omit | ||
| 248 | * both the smp_read_barrier_depends() and the ACCESS_ONCE(). This | ||
| 249 | * is useful in cases where update-side locks prevent the value of the | ||
| 250 | * pointer from changing. Please note that this primitive does -not- | ||
| 251 | * prevent the compiler from repeating this reference or combining it | ||
| 252 | * with other references, so it should not be used without protection | ||
| 253 | * of appropriate locks. | ||
| 254 | */ | ||
| 255 | #define rcu_dereference_protected(p, c) \ | ||
| 256 | ({ \ | ||
| 257 | __do_rcu_dereference_check(c); \ | ||
| 258 | (p); \ | ||
| 259 | }) | ||
| 260 | |||
| 192 | #else /* #ifdef CONFIG_PROVE_RCU */ | 261 | #else /* #ifdef CONFIG_PROVE_RCU */ |
| 193 | 262 | ||
| 194 | #define rcu_dereference_check(p, c) rcu_dereference_raw(p) | 263 | #define rcu_dereference_check(p, c) rcu_dereference_raw(p) |
| 264 | #define rcu_dereference_protected(p, c) (p) | ||
| 195 | 265 | ||
| 196 | #endif /* #else #ifdef CONFIG_PROVE_RCU */ | 266 | #endif /* #else #ifdef CONFIG_PROVE_RCU */ |
| 197 | 267 | ||
| 198 | /** | 268 | /** |
| 269 | * rcu_access_pointer - fetch RCU pointer with no dereferencing | ||
| 270 | * | ||
| 271 | * Return the value of the specified RCU-protected pointer, but omit the | ||
| 272 | * smp_read_barrier_depends() and keep the ACCESS_ONCE(). This is useful | ||
| 273 | * when the value of this pointer is accessed, but the pointer is not | ||
| 274 | * dereferenced, for example, when testing an RCU-protected pointer against | ||
| 275 | * NULL. This may also be used in cases where update-side locks prevent | ||
| 276 | * the value of the pointer from changing, but rcu_dereference_protected() | ||
| 277 | * is a lighter-weight primitive for this use case. | ||
| 278 | */ | ||
| 279 | #define rcu_access_pointer(p) ACCESS_ONCE(p) | ||
| 280 | |||
| 281 | /** | ||
| 199 | * rcu_read_lock - mark the beginning of an RCU read-side critical section. | 282 | * rcu_read_lock - mark the beginning of an RCU read-side critical section. |
| 200 | * | 283 | * |
| 201 | * When synchronize_rcu() is invoked on one CPU while other CPUs | 284 | * When synchronize_rcu() is invoked on one CPU while other CPUs |
diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h index a5195875480a..e2e893144a84 100644 --- a/include/linux/rcutiny.h +++ b/include/linux/rcutiny.h | |||
| @@ -29,6 +29,10 @@ | |||
| 29 | 29 | ||
| 30 | void rcu_sched_qs(int cpu); | 30 | void rcu_sched_qs(int cpu); |
| 31 | void rcu_bh_qs(int cpu); | 31 | void rcu_bh_qs(int cpu); |
| 32 | static inline void rcu_note_context_switch(int cpu) | ||
| 33 | { | ||
| 34 | rcu_sched_qs(cpu); | ||
| 35 | } | ||
| 32 | 36 | ||
| 33 | #define __rcu_read_lock() preempt_disable() | 37 | #define __rcu_read_lock() preempt_disable() |
| 34 | #define __rcu_read_unlock() preempt_enable() | 38 | #define __rcu_read_unlock() preempt_enable() |
| @@ -60,8 +64,6 @@ static inline long rcu_batches_completed_bh(void) | |||
| 60 | return 0; | 64 | return 0; |
| 61 | } | 65 | } |
| 62 | 66 | ||
| 63 | extern int rcu_expedited_torture_stats(char *page); | ||
| 64 | |||
| 65 | static inline void rcu_force_quiescent_state(void) | 67 | static inline void rcu_force_quiescent_state(void) |
| 66 | { | 68 | { |
| 67 | } | 69 | } |
| @@ -74,7 +76,17 @@ static inline void rcu_sched_force_quiescent_state(void) | |||
| 74 | { | 76 | { |
| 75 | } | 77 | } |
| 76 | 78 | ||
| 77 | #define synchronize_rcu synchronize_sched | 79 | extern void synchronize_sched(void); |
| 80 | |||
| 81 | static inline void synchronize_rcu(void) | ||
| 82 | { | ||
| 83 | synchronize_sched(); | ||
| 84 | } | ||
| 85 | |||
| 86 | static inline void synchronize_rcu_bh(void) | ||
| 87 | { | ||
| 88 | synchronize_sched(); | ||
| 89 | } | ||
| 78 | 90 | ||
| 79 | static inline void synchronize_rcu_expedited(void) | 91 | static inline void synchronize_rcu_expedited(void) |
| 80 | { | 92 | { |
| @@ -114,4 +126,17 @@ static inline int rcu_preempt_depth(void) | |||
| 114 | return 0; | 126 | return 0; |
| 115 | } | 127 | } |
| 116 | 128 | ||
| 129 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | ||
| 130 | |||
| 131 | extern int rcu_scheduler_active __read_mostly; | ||
| 132 | extern void rcu_scheduler_starting(void); | ||
| 133 | |||
| 134 | #else /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */ | ||
| 135 | |||
| 136 | static inline void rcu_scheduler_starting(void) | ||
| 137 | { | ||
| 138 | } | ||
| 139 | |||
| 140 | #endif /* #else #ifdef CONFIG_DEBUG_LOCK_ALLOC */ | ||
| 141 | |||
| 117 | #endif /* __LINUX_RCUTINY_H */ | 142 | #endif /* __LINUX_RCUTINY_H */ |
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h index 42cc3a04779e..c0ed1c056f29 100644 --- a/include/linux/rcutree.h +++ b/include/linux/rcutree.h | |||
| @@ -34,8 +34,8 @@ struct notifier_block; | |||
| 34 | 34 | ||
| 35 | extern void rcu_sched_qs(int cpu); | 35 | extern void rcu_sched_qs(int cpu); |
| 36 | extern void rcu_bh_qs(int cpu); | 36 | extern void rcu_bh_qs(int cpu); |
| 37 | extern void rcu_note_context_switch(int cpu); | ||
| 37 | extern int rcu_needs_cpu(int cpu); | 38 | extern int rcu_needs_cpu(int cpu); |
| 38 | extern int rcu_expedited_torture_stats(char *page); | ||
| 39 | 39 | ||
| 40 | #ifdef CONFIG_TREE_PREEMPT_RCU | 40 | #ifdef CONFIG_TREE_PREEMPT_RCU |
| 41 | 41 | ||
| @@ -86,6 +86,8 @@ static inline void __rcu_read_unlock_bh(void) | |||
| 86 | 86 | ||
| 87 | extern void call_rcu_sched(struct rcu_head *head, | 87 | extern void call_rcu_sched(struct rcu_head *head, |
| 88 | void (*func)(struct rcu_head *rcu)); | 88 | void (*func)(struct rcu_head *rcu)); |
| 89 | extern void synchronize_rcu_bh(void); | ||
| 90 | extern void synchronize_sched(void); | ||
| 89 | extern void synchronize_rcu_expedited(void); | 91 | extern void synchronize_rcu_expedited(void); |
| 90 | 92 | ||
| 91 | static inline void synchronize_rcu_bh_expedited(void) | 93 | static inline void synchronize_rcu_bh_expedited(void) |
| @@ -120,4 +122,7 @@ static inline int rcu_blocking_is_gp(void) | |||
| 120 | return num_online_cpus() == 1; | 122 | return num_online_cpus() == 1; |
| 121 | } | 123 | } |
| 122 | 124 | ||
| 125 | extern void rcu_scheduler_starting(void); | ||
| 126 | extern int rcu_scheduler_active __read_mostly; | ||
| 127 | |||
| 123 | #endif /* __LINUX_RCUTREE_H */ | 128 | #endif /* __LINUX_RCUTREE_H */ |
diff --git a/include/linux/reboot.h b/include/linux/reboot.h index 988e55fe649b..3005d5a7fce5 100644 --- a/include/linux/reboot.h +++ b/include/linux/reboot.h | |||
| @@ -64,6 +64,7 @@ extern void kernel_restart(char *cmd); | |||
| 64 | extern void kernel_halt(void); | 64 | extern void kernel_halt(void); |
| 65 | extern void kernel_power_off(void); | 65 | extern void kernel_power_off(void); |
| 66 | 66 | ||
| 67 | extern int C_A_D; /* for sysctl */ | ||
| 67 | void ctrl_alt_del(void); | 68 | void ctrl_alt_del(void); |
| 68 | 69 | ||
| 69 | #define POWEROFF_CMD_PATH_LEN 256 | 70 | #define POWEROFF_CMD_PATH_LEN 256 |
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index 28c9fd020d39..ebd747265294 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h | |||
| @@ -183,9 +183,13 @@ static inline struct regulator *__must_check regulator_get(struct device *dev, | |||
| 183 | { | 183 | { |
| 184 | /* Nothing except the stubbed out regulator API should be | 184 | /* Nothing except the stubbed out regulator API should be |
| 185 | * looking at the value except to check if it is an error | 185 | * looking at the value except to check if it is an error |
| 186 | * value so the actual return value doesn't matter. | 186 | * value. Drivers are free to handle NULL specifically by |
| 187 | * skipping all regulator API calls, but they don't have to. | ||
| 188 | * Drivers which don't, should make sure they properly handle | ||
| 189 | * corner cases of the API, such as regulator_get_voltage() | ||
| 190 | * returning 0. | ||
| 187 | */ | 191 | */ |
| 188 | return (struct regulator *)id; | 192 | return NULL; |
| 189 | } | 193 | } |
| 190 | static inline void regulator_put(struct regulator *regulator) | 194 | static inline void regulator_put(struct regulator *regulator) |
| 191 | { | 195 | { |
diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h index 99928dce37ea..7fa02b4af838 100644 --- a/include/linux/reiserfs_xattr.h +++ b/include/linux/reiserfs_xattr.h | |||
| @@ -70,6 +70,11 @@ int reiserfs_security_write(struct reiserfs_transaction_handle *th, | |||
| 70 | void reiserfs_security_free(struct reiserfs_security_handle *sec); | 70 | void reiserfs_security_free(struct reiserfs_security_handle *sec); |
| 71 | #endif | 71 | #endif |
| 72 | 72 | ||
| 73 | static inline int reiserfs_xattrs_initialized(struct super_block *sb) | ||
| 74 | { | ||
| 75 | return REISERFS_SB(sb)->priv_root != NULL; | ||
| 76 | } | ||
| 77 | |||
| 73 | #define xattr_size(size) ((size) + sizeof(struct reiserfs_xattr_header)) | 78 | #define xattr_size(size) ((size) + sizeof(struct reiserfs_xattr_header)) |
| 74 | static inline loff_t reiserfs_xattr_nblocks(struct inode *inode, loff_t size) | 79 | static inline loff_t reiserfs_xattr_nblocks(struct inode *inode, loff_t size) |
| 75 | { | 80 | { |
diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h index 97059d08a626..4f82326eb294 100644 --- a/include/linux/rfkill.h +++ b/include/linux/rfkill.h | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | /** | 29 | /** |
| 30 | * enum rfkill_type - type of rfkill switch. | 30 | * enum rfkill_type - type of rfkill switch. |
| 31 | * | 31 | * |
| 32 | * @RFKILL_TYPE_ALL: toggles all switches (userspace only) | 32 | * @RFKILL_TYPE_ALL: toggles all switches (requests only - not a switch type) |
| 33 | * @RFKILL_TYPE_WLAN: switch is on a 802.11 wireless network device. | 33 | * @RFKILL_TYPE_WLAN: switch is on a 802.11 wireless network device. |
| 34 | * @RFKILL_TYPE_BLUETOOTH: switch is on a bluetooth device. | 34 | * @RFKILL_TYPE_BLUETOOTH: switch is on a bluetooth device. |
| 35 | * @RFKILL_TYPE_UWB: switch is on a ultra wideband device. | 35 | * @RFKILL_TYPE_UWB: switch is on a ultra wideband device. |
diff --git a/include/linux/ring_buffer.h b/include/linux/ring_buffer.h index 5fcc31ed5771..25b4f686d918 100644 --- a/include/linux/ring_buffer.h +++ b/include/linux/ring_buffer.h | |||
| @@ -120,12 +120,16 @@ int ring_buffer_write(struct ring_buffer *buffer, | |||
| 120 | unsigned long length, void *data); | 120 | unsigned long length, void *data); |
| 121 | 121 | ||
| 122 | struct ring_buffer_event * | 122 | struct ring_buffer_event * |
| 123 | ring_buffer_peek(struct ring_buffer *buffer, int cpu, u64 *ts); | 123 | ring_buffer_peek(struct ring_buffer *buffer, int cpu, u64 *ts, |
| 124 | unsigned long *lost_events); | ||
| 124 | struct ring_buffer_event * | 125 | struct ring_buffer_event * |
| 125 | ring_buffer_consume(struct ring_buffer *buffer, int cpu, u64 *ts); | 126 | ring_buffer_consume(struct ring_buffer *buffer, int cpu, u64 *ts, |
| 127 | unsigned long *lost_events); | ||
| 126 | 128 | ||
| 127 | struct ring_buffer_iter * | 129 | struct ring_buffer_iter * |
| 128 | ring_buffer_read_start(struct ring_buffer *buffer, int cpu); | 130 | ring_buffer_read_prepare(struct ring_buffer *buffer, int cpu); |
| 131 | void ring_buffer_read_prepare_sync(void); | ||
| 132 | void ring_buffer_read_start(struct ring_buffer_iter *iter); | ||
| 129 | void ring_buffer_read_finish(struct ring_buffer_iter *iter); | 133 | void ring_buffer_read_finish(struct ring_buffer_iter *iter); |
| 130 | 134 | ||
| 131 | struct ring_buffer_event * | 135 | struct ring_buffer_event * |
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 60f88a7fb13d..14dbc83ded20 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h | |||
| @@ -238,6 +238,12 @@ static inline bool is_leap_year(unsigned int year) | |||
| 238 | return (!(year % 4) && (year % 100)) || !(year % 400); | 238 | return (!(year % 4) && (year % 100)) || !(year % 400); |
| 239 | } | 239 | } |
| 240 | 240 | ||
| 241 | #ifdef CONFIG_RTC_HCTOSYS | ||
| 242 | extern int rtc_hctosys_ret; | ||
| 243 | #else | ||
| 244 | #define rtc_hctosys_ret -ENODEV | ||
| 245 | #endif | ||
| 246 | |||
| 241 | #endif /* __KERNEL__ */ | 247 | #endif /* __KERNEL__ */ |
| 242 | 248 | ||
| 243 | #endif /* _LINUX_RTC_H_ */ | 249 | #endif /* _LINUX_RTC_H_ */ |
diff --git a/include/linux/rtmutex.h b/include/linux/rtmutex.h index 281d8fd775e8..8d522ffeda33 100644 --- a/include/linux/rtmutex.h +++ b/include/linux/rtmutex.h | |||
| @@ -16,6 +16,8 @@ | |||
| 16 | #include <linux/plist.h> | 16 | #include <linux/plist.h> |
| 17 | #include <linux/spinlock_types.h> | 17 | #include <linux/spinlock_types.h> |
| 18 | 18 | ||
| 19 | extern int max_lock_depth; /* for sysctl */ | ||
| 20 | |||
| 19 | /** | 21 | /** |
| 20 | * The rt_mutex structure | 22 | * The rt_mutex structure |
| 21 | * | 23 | * |
diff --git a/include/linux/rwlock.h b/include/linux/rwlock.h index 71e0b00b6f2c..bc2994ed66e1 100644 --- a/include/linux/rwlock.h +++ b/include/linux/rwlock.h | |||
| @@ -29,25 +29,25 @@ do { \ | |||
| 29 | #endif | 29 | #endif |
| 30 | 30 | ||
| 31 | #ifdef CONFIG_DEBUG_SPINLOCK | 31 | #ifdef CONFIG_DEBUG_SPINLOCK |
| 32 | extern void do_raw_read_lock(rwlock_t *lock); | 32 | extern void do_raw_read_lock(rwlock_t *lock) __acquires(lock); |
| 33 | #define do_raw_read_lock_flags(lock, flags) do_raw_read_lock(lock) | 33 | #define do_raw_read_lock_flags(lock, flags) do_raw_read_lock(lock) |
| 34 | extern int do_raw_read_trylock(rwlock_t *lock); | 34 | extern int do_raw_read_trylock(rwlock_t *lock); |
| 35 | extern void do_raw_read_unlock(rwlock_t *lock); | 35 | extern void do_raw_read_unlock(rwlock_t *lock) __releases(lock); |
| 36 | extern void do_raw_write_lock(rwlock_t *lock); | 36 | extern void do_raw_write_lock(rwlock_t *lock) __acquires(lock); |
| 37 | #define do_raw_write_lock_flags(lock, flags) do_raw_write_lock(lock) | 37 | #define do_raw_write_lock_flags(lock, flags) do_raw_write_lock(lock) |
| 38 | extern int do_raw_write_trylock(rwlock_t *lock); | 38 | extern int do_raw_write_trylock(rwlock_t *lock); |
| 39 | extern void do_raw_write_unlock(rwlock_t *lock); | 39 | extern void do_raw_write_unlock(rwlock_t *lock) __releases(lock); |
| 40 | #else | 40 | #else |
| 41 | # define do_raw_read_lock(rwlock) arch_read_lock(&(rwlock)->raw_lock) | 41 | # define do_raw_read_lock(rwlock) do {__acquire(lock); arch_read_lock(&(rwlock)->raw_lock); } while (0) |
| 42 | # define do_raw_read_lock_flags(lock, flags) \ | 42 | # define do_raw_read_lock_flags(lock, flags) \ |
| 43 | arch_read_lock_flags(&(lock)->raw_lock, *(flags)) | 43 | do {__acquire(lock); arch_read_lock_flags(&(lock)->raw_lock, *(flags)); } while (0) |
| 44 | # define do_raw_read_trylock(rwlock) arch_read_trylock(&(rwlock)->raw_lock) | 44 | # define do_raw_read_trylock(rwlock) arch_read_trylock(&(rwlock)->raw_lock) |
| 45 | # define do_raw_read_unlock(rwlock) arch_read_unlock(&(rwlock)->raw_lock) | 45 | # define do_raw_read_unlock(rwlock) do {arch_read_unlock(&(rwlock)->raw_lock); __release(lock); } while (0) |
| 46 | # define do_raw_write_lock(rwlock) arch_write_lock(&(rwlock)->raw_lock) | 46 | # define do_raw_write_lock(rwlock) do {__acquire(lock); arch_write_lock(&(rwlock)->raw_lock); } while (0) |
| 47 | # define do_raw_write_lock_flags(lock, flags) \ | 47 | # define do_raw_write_lock_flags(lock, flags) \ |
| 48 | arch_write_lock_flags(&(lock)->raw_lock, *(flags)) | 48 | do {__acquire(lock); arch_write_lock_flags(&(lock)->raw_lock, *(flags)); } while (0) |
| 49 | # define do_raw_write_trylock(rwlock) arch_write_trylock(&(rwlock)->raw_lock) | 49 | # define do_raw_write_trylock(rwlock) arch_write_trylock(&(rwlock)->raw_lock) |
| 50 | # define do_raw_write_unlock(rwlock) arch_write_unlock(&(rwlock)->raw_lock) | 50 | # define do_raw_write_unlock(rwlock) do {arch_write_unlock(&(rwlock)->raw_lock); __release(lock); } while (0) |
| 51 | #endif | 51 | #endif |
| 52 | 52 | ||
| 53 | #define read_can_lock(rwlock) arch_read_can_lock(&(rwlock)->raw_lock) | 53 | #define read_can_lock(rwlock) arch_read_can_lock(&(rwlock)->raw_lock) |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 46c6f8d5dc06..b55e988988b5 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -99,7 +99,6 @@ struct futex_pi_state; | |||
| 99 | struct robust_list_head; | 99 | struct robust_list_head; |
| 100 | struct bio_list; | 100 | struct bio_list; |
| 101 | struct fs_struct; | 101 | struct fs_struct; |
| 102 | struct bts_context; | ||
| 103 | struct perf_event_context; | 102 | struct perf_event_context; |
| 104 | 103 | ||
| 105 | /* | 104 | /* |
| @@ -258,6 +257,10 @@ extern spinlock_t mmlist_lock; | |||
| 258 | 257 | ||
| 259 | struct task_struct; | 258 | struct task_struct; |
| 260 | 259 | ||
| 260 | #ifdef CONFIG_PROVE_RCU | ||
| 261 | extern int lockdep_tasklist_lock_is_held(void); | ||
| 262 | #endif /* #ifdef CONFIG_PROVE_RCU */ | ||
| 263 | |||
| 261 | extern void sched_init(void); | 264 | extern void sched_init(void); |
| 262 | extern void sched_init_smp(void); | 265 | extern void sched_init_smp(void); |
| 263 | extern asmlinkage void schedule_tail(struct task_struct *prev); | 266 | extern asmlinkage void schedule_tail(struct task_struct *prev); |
| @@ -271,11 +274,17 @@ extern cpumask_var_t nohz_cpu_mask; | |||
| 271 | #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ) | 274 | #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ) |
| 272 | extern int select_nohz_load_balancer(int cpu); | 275 | extern int select_nohz_load_balancer(int cpu); |
| 273 | extern int get_nohz_load_balancer(void); | 276 | extern int get_nohz_load_balancer(void); |
| 277 | extern int nohz_ratelimit(int cpu); | ||
| 274 | #else | 278 | #else |
| 275 | static inline int select_nohz_load_balancer(int cpu) | 279 | static inline int select_nohz_load_balancer(int cpu) |
| 276 | { | 280 | { |
| 277 | return 0; | 281 | return 0; |
| 278 | } | 282 | } |
| 283 | |||
| 284 | static inline int nohz_ratelimit(int cpu) | ||
| 285 | { | ||
| 286 | return 0; | ||
| 287 | } | ||
| 279 | #endif | 288 | #endif |
| 280 | 289 | ||
| 281 | /* | 290 | /* |
| @@ -950,6 +959,7 @@ struct sched_domain { | |||
| 950 | char *name; | 959 | char *name; |
| 951 | #endif | 960 | #endif |
| 952 | 961 | ||
| 962 | unsigned int span_weight; | ||
| 953 | /* | 963 | /* |
| 954 | * Span of all CPUs in this domain. | 964 | * Span of all CPUs in this domain. |
| 955 | * | 965 | * |
| @@ -1022,12 +1032,17 @@ struct sched_domain; | |||
| 1022 | #define WF_SYNC 0x01 /* waker goes to sleep after wakup */ | 1032 | #define WF_SYNC 0x01 /* waker goes to sleep after wakup */ |
| 1023 | #define WF_FORK 0x02 /* child wakeup after fork */ | 1033 | #define WF_FORK 0x02 /* child wakeup after fork */ |
| 1024 | 1034 | ||
| 1035 | #define ENQUEUE_WAKEUP 1 | ||
| 1036 | #define ENQUEUE_WAKING 2 | ||
| 1037 | #define ENQUEUE_HEAD 4 | ||
| 1038 | |||
| 1039 | #define DEQUEUE_SLEEP 1 | ||
| 1040 | |||
| 1025 | struct sched_class { | 1041 | struct sched_class { |
| 1026 | const struct sched_class *next; | 1042 | const struct sched_class *next; |
| 1027 | 1043 | ||
| 1028 | void (*enqueue_task) (struct rq *rq, struct task_struct *p, int wakeup, | 1044 | void (*enqueue_task) (struct rq *rq, struct task_struct *p, int flags); |
| 1029 | bool head); | 1045 | void (*dequeue_task) (struct rq *rq, struct task_struct *p, int flags); |
| 1030 | void (*dequeue_task) (struct rq *rq, struct task_struct *p, int sleep); | ||
| 1031 | void (*yield_task) (struct rq *rq); | 1046 | void (*yield_task) (struct rq *rq); |
| 1032 | 1047 | ||
| 1033 | void (*check_preempt_curr) (struct rq *rq, struct task_struct *p, int flags); | 1048 | void (*check_preempt_curr) (struct rq *rq, struct task_struct *p, int flags); |
| @@ -1036,7 +1051,8 @@ struct sched_class { | |||
| 1036 | void (*put_prev_task) (struct rq *rq, struct task_struct *p); | 1051 | void (*put_prev_task) (struct rq *rq, struct task_struct *p); |
| 1037 | 1052 | ||
| 1038 | #ifdef CONFIG_SMP | 1053 | #ifdef CONFIG_SMP |
| 1039 | int (*select_task_rq)(struct task_struct *p, int sd_flag, int flags); | 1054 | int (*select_task_rq)(struct rq *rq, struct task_struct *p, |
| 1055 | int sd_flag, int flags); | ||
| 1040 | 1056 | ||
| 1041 | void (*pre_schedule) (struct rq *this_rq, struct task_struct *task); | 1057 | void (*pre_schedule) (struct rq *this_rq, struct task_struct *task); |
| 1042 | void (*post_schedule) (struct rq *this_rq); | 1058 | void (*post_schedule) (struct rq *this_rq); |
| @@ -1073,36 +1089,8 @@ struct load_weight { | |||
| 1073 | unsigned long weight, inv_weight; | 1089 | unsigned long weight, inv_weight; |
| 1074 | }; | 1090 | }; |
| 1075 | 1091 | ||
| 1076 | /* | ||
| 1077 | * CFS stats for a schedulable entity (task, task-group etc) | ||
| 1078 | * | ||
| 1079 | * Current field usage histogram: | ||
| 1080 | * | ||
| 1081 | * 4 se->block_start | ||
| 1082 | * 4 se->run_node | ||
| 1083 | * 4 se->sleep_start | ||
| 1084 | * 6 se->load.weight | ||
| 1085 | */ | ||
| 1086 | struct sched_entity { | ||
| 1087 | struct load_weight load; /* for load-balancing */ | ||
| 1088 | struct rb_node run_node; | ||
| 1089 | struct list_head group_node; | ||
| 1090 | unsigned int on_rq; | ||
| 1091 | |||
| 1092 | u64 exec_start; | ||
| 1093 | u64 sum_exec_runtime; | ||
| 1094 | u64 vruntime; | ||
| 1095 | u64 prev_sum_exec_runtime; | ||
| 1096 | |||
| 1097 | u64 last_wakeup; | ||
| 1098 | u64 avg_overlap; | ||
| 1099 | |||
| 1100 | u64 nr_migrations; | ||
| 1101 | |||
| 1102 | u64 start_runtime; | ||
| 1103 | u64 avg_wakeup; | ||
| 1104 | |||
| 1105 | #ifdef CONFIG_SCHEDSTATS | 1092 | #ifdef CONFIG_SCHEDSTATS |
| 1093 | struct sched_statistics { | ||
| 1106 | u64 wait_start; | 1094 | u64 wait_start; |
| 1107 | u64 wait_max; | 1095 | u64 wait_max; |
| 1108 | u64 wait_count; | 1096 | u64 wait_count; |
| @@ -1134,6 +1122,24 @@ struct sched_entity { | |||
| 1134 | u64 nr_wakeups_affine_attempts; | 1122 | u64 nr_wakeups_affine_attempts; |
| 1135 | u64 nr_wakeups_passive; | 1123 | u64 nr_wakeups_passive; |
| 1136 | u64 nr_wakeups_idle; | 1124 | u64 nr_wakeups_idle; |
| 1125 | }; | ||
| 1126 | #endif | ||
| 1127 | |||
| 1128 | struct sched_entity { | ||
| 1129 | struct load_weight load; /* for load-balancing */ | ||
| 1130 | struct rb_node run_node; | ||
| 1131 | struct list_head group_node; | ||
| 1132 | unsigned int on_rq; | ||
| 1133 | |||
| 1134 | u64 exec_start; | ||
| 1135 | u64 sum_exec_runtime; | ||
| 1136 | u64 vruntime; | ||
| 1137 | u64 prev_sum_exec_runtime; | ||
| 1138 | |||
| 1139 | u64 nr_migrations; | ||
| 1140 | |||
| 1141 | #ifdef CONFIG_SCHEDSTATS | ||
| 1142 | struct sched_statistics statistics; | ||
| 1137 | #endif | 1143 | #endif |
| 1138 | 1144 | ||
| 1139 | #ifdef CONFIG_FAIR_GROUP_SCHED | 1145 | #ifdef CONFIG_FAIR_GROUP_SCHED |
| @@ -1268,12 +1274,6 @@ struct task_struct { | |||
| 1268 | struct list_head ptraced; | 1274 | struct list_head ptraced; |
| 1269 | struct list_head ptrace_entry; | 1275 | struct list_head ptrace_entry; |
| 1270 | 1276 | ||
| 1271 | /* | ||
| 1272 | * This is the tracer handle for the ptrace BTS extension. | ||
| 1273 | * This field actually belongs to the ptracer task. | ||
| 1274 | */ | ||
| 1275 | struct bts_context *bts; | ||
| 1276 | |||
| 1277 | /* PID/PID hash table linkage. */ | 1277 | /* PID/PID hash table linkage. */ |
| 1278 | struct pid_link pids[PIDTYPE_MAX]; | 1278 | struct pid_link pids[PIDTYPE_MAX]; |
| 1279 | struct list_head thread_group; | 1279 | struct list_head thread_group; |
| @@ -1473,7 +1473,7 @@ struct task_struct { | |||
| 1473 | 1473 | ||
| 1474 | struct list_head *scm_work_list; | 1474 | struct list_head *scm_work_list; |
| 1475 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER | 1475 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER |
| 1476 | /* Index of current stored adress in ret_stack */ | 1476 | /* Index of current stored address in ret_stack */ |
| 1477 | int curr_ret_stack; | 1477 | int curr_ret_stack; |
| 1478 | /* Stack of return addresses for return function tracing */ | 1478 | /* Stack of return addresses for return function tracing */ |
| 1479 | struct ftrace_ret_stack *ret_stack; | 1479 | struct ftrace_ret_stack *ret_stack; |
| @@ -1493,7 +1493,6 @@ struct task_struct { | |||
| 1493 | /* bitmask of trace recursion */ | 1493 | /* bitmask of trace recursion */ |
| 1494 | unsigned long trace_recursion; | 1494 | unsigned long trace_recursion; |
| 1495 | #endif /* CONFIG_TRACING */ | 1495 | #endif /* CONFIG_TRACING */ |
| 1496 | unsigned long stack_start; | ||
| 1497 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR /* memcg uses this to do batch job */ | 1496 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR /* memcg uses this to do batch job */ |
| 1498 | struct memcg_batch_info { | 1497 | struct memcg_batch_info { |
| 1499 | int do_batch; /* incremented when batch uncharge started */ | 1498 | int do_batch; /* incremented when batch uncharge started */ |
| @@ -1843,6 +1842,7 @@ extern void sched_clock_idle_sleep_event(void); | |||
| 1843 | extern void sched_clock_idle_wakeup_event(u64 delta_ns); | 1842 | extern void sched_clock_idle_wakeup_event(u64 delta_ns); |
| 1844 | 1843 | ||
| 1845 | #ifdef CONFIG_HOTPLUG_CPU | 1844 | #ifdef CONFIG_HOTPLUG_CPU |
| 1845 | extern void move_task_off_dead_cpu(int dead_cpu, struct task_struct *p); | ||
| 1846 | extern void idle_task_exit(void); | 1846 | extern void idle_task_exit(void); |
| 1847 | #else | 1847 | #else |
| 1848 | static inline void idle_task_exit(void) {} | 1848 | static inline void idle_task_exit(void) {} |
| @@ -2119,10 +2119,8 @@ extern void set_task_comm(struct task_struct *tsk, char *from); | |||
| 2119 | extern char *get_task_comm(char *to, struct task_struct *tsk); | 2119 | extern char *get_task_comm(char *to, struct task_struct *tsk); |
| 2120 | 2120 | ||
| 2121 | #ifdef CONFIG_SMP | 2121 | #ifdef CONFIG_SMP |
| 2122 | extern void wait_task_context_switch(struct task_struct *p); | ||
| 2123 | extern unsigned long wait_task_inactive(struct task_struct *, long match_state); | 2122 | extern unsigned long wait_task_inactive(struct task_struct *, long match_state); |
| 2124 | #else | 2123 | #else |
| 2125 | static inline void wait_task_context_switch(struct task_struct *p) {} | ||
| 2126 | static inline unsigned long wait_task_inactive(struct task_struct *p, | 2124 | static inline unsigned long wait_task_inactive(struct task_struct *p, |
| 2127 | long match_state) | 2125 | long match_state) |
| 2128 | { | 2126 | { |
| @@ -2391,9 +2389,7 @@ void thread_group_cputimer(struct task_struct *tsk, struct task_cputime *times); | |||
| 2391 | 2389 | ||
| 2392 | static inline void thread_group_cputime_init(struct signal_struct *sig) | 2390 | static inline void thread_group_cputime_init(struct signal_struct *sig) |
| 2393 | { | 2391 | { |
| 2394 | sig->cputimer.cputime = INIT_CPUTIME; | ||
| 2395 | spin_lock_init(&sig->cputimer.lock); | 2392 | spin_lock_init(&sig->cputimer.lock); |
| 2396 | sig->cputimer.running = 0; | ||
| 2397 | } | 2393 | } |
| 2398 | 2394 | ||
| 2399 | static inline void thread_group_cputime_free(struct signal_struct *sig) | 2395 | static inline void thread_group_cputime_free(struct signal_struct *sig) |
diff --git a/include/linux/security.h b/include/linux/security.h index 233d20b52c1b..3158dd982d27 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
| @@ -33,7 +33,7 @@ | |||
| 33 | #include <linux/sched.h> | 33 | #include <linux/sched.h> |
| 34 | #include <linux/key.h> | 34 | #include <linux/key.h> |
| 35 | #include <linux/xfrm.h> | 35 | #include <linux/xfrm.h> |
| 36 | #include <linux/gfp.h> | 36 | #include <linux/slab.h> |
| 37 | #include <net/flow.h> | 37 | #include <net/flow.h> |
| 38 | 38 | ||
| 39 | /* Maximum number of letters for an LSM name string */ | 39 | /* Maximum number of letters for an LSM name string */ |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 8c3dd36fe91a..78dd1e7120a9 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
| @@ -491,9 +491,13 @@ uart_handle_dcd_change(struct uart_port *uport, unsigned int status) | |||
| 491 | { | 491 | { |
| 492 | struct uart_state *state = uport->state; | 492 | struct uart_state *state = uport->state; |
| 493 | struct tty_port *port = &state->port; | 493 | struct tty_port *port = &state->port; |
| 494 | struct tty_ldisc *ld = tty_ldisc_ref(port->tty); | ||
| 495 | struct timespec ts; | ||
| 494 | 496 | ||
| 495 | uport->icount.dcd++; | 497 | if (ld && ld->ops->dcd_change) |
| 498 | getnstimeofday(&ts); | ||
| 496 | 499 | ||
| 500 | uport->icount.dcd++; | ||
| 497 | #ifdef CONFIG_HARD_PPS | 501 | #ifdef CONFIG_HARD_PPS |
| 498 | if ((uport->flags & UPF_HARDPPS_CD) && status) | 502 | if ((uport->flags & UPF_HARDPPS_CD) && status) |
| 499 | hardpps(); | 503 | hardpps(); |
| @@ -505,6 +509,11 @@ uart_handle_dcd_change(struct uart_port *uport, unsigned int status) | |||
| 505 | else if (port->tty) | 509 | else if (port->tty) |
| 506 | tty_hangup(port->tty); | 510 | tty_hangup(port->tty); |
| 507 | } | 511 | } |
| 512 | |||
| 513 | if (ld && ld->ops->dcd_change) | ||
| 514 | ld->ops->dcd_change(port->tty, status, &ts); | ||
| 515 | if (ld) | ||
| 516 | tty_ldisc_deref(ld); | ||
| 508 | } | 517 | } |
| 509 | 518 | ||
| 510 | /** | 519 | /** |
diff --git a/include/linux/serial_sci.h b/include/linux/serial_sci.h index 1b177d29a7f0..f5364a1de68b 100644 --- a/include/linux/serial_sci.h +++ b/include/linux/serial_sci.h | |||
| @@ -2,7 +2,9 @@ | |||
| 2 | #define __LINUX_SERIAL_SCI_H | 2 | #define __LINUX_SERIAL_SCI_H |
| 3 | 3 | ||
| 4 | #include <linux/serial_core.h> | 4 | #include <linux/serial_core.h> |
| 5 | #ifdef CONFIG_SERIAL_SH_SCI_DMA | ||
| 5 | #include <asm/dmaengine.h> | 6 | #include <asm/dmaengine.h> |
| 7 | #endif | ||
| 6 | 8 | ||
| 7 | /* | 9 | /* |
| 8 | * Generic header for SuperH SCI(F) (used by sh/sh64/h8300 and related parts) | 10 | * Generic header for SuperH SCI(F) (used by sh/sh64/h8300 and related parts) |
| @@ -30,8 +32,10 @@ struct plat_sci_port { | |||
| 30 | upf_t flags; /* UPF_* flags */ | 32 | upf_t flags; /* UPF_* flags */ |
| 31 | char *clk; /* clock string */ | 33 | char *clk; /* clock string */ |
| 32 | struct device *dma_dev; | 34 | struct device *dma_dev; |
| 33 | enum sh_dmae_slave_chan_id dma_slave_tx; | 35 | #ifdef CONFIG_SERIAL_SH_SCI_DMA |
| 34 | enum sh_dmae_slave_chan_id dma_slave_rx; | 36 | unsigned int dma_slave_tx; |
| 37 | unsigned int dma_slave_rx; | ||
| 38 | #endif | ||
| 35 | }; | 39 | }; |
| 36 | 40 | ||
| 37 | #endif /* __LINUX_SERIAL_SCI_H */ | 41 | #endif /* __LINUX_SERIAL_SCI_H */ |
diff --git a/include/linux/sh_clk.h b/include/linux/sh_clk.h new file mode 100644 index 000000000000..1636d1e2a5f1 --- /dev/null +++ b/include/linux/sh_clk.h | |||
| @@ -0,0 +1,150 @@ | |||
| 1 | #ifndef __SH_CLOCK_H | ||
| 2 | #define __SH_CLOCK_H | ||
| 3 | |||
| 4 | #include <linux/list.h> | ||
| 5 | #include <linux/seq_file.h> | ||
| 6 | #include <linux/cpufreq.h> | ||
| 7 | #include <linux/clk.h> | ||
| 8 | #include <linux/err.h> | ||
| 9 | |||
| 10 | struct clk; | ||
| 11 | |||
| 12 | struct clk_ops { | ||
| 13 | void (*init)(struct clk *clk); | ||
| 14 | int (*enable)(struct clk *clk); | ||
| 15 | void (*disable)(struct clk *clk); | ||
| 16 | unsigned long (*recalc)(struct clk *clk); | ||
| 17 | int (*set_rate)(struct clk *clk, unsigned long rate, int algo_id); | ||
| 18 | int (*set_parent)(struct clk *clk, struct clk *parent); | ||
| 19 | long (*round_rate)(struct clk *clk, unsigned long rate); | ||
| 20 | }; | ||
| 21 | |||
| 22 | struct clk { | ||
| 23 | struct list_head node; | ||
| 24 | const char *name; | ||
| 25 | int id; | ||
| 26 | |||
| 27 | struct clk *parent; | ||
| 28 | struct clk_ops *ops; | ||
| 29 | |||
| 30 | struct list_head children; | ||
| 31 | struct list_head sibling; /* node for children */ | ||
| 32 | |||
| 33 | int usecount; | ||
| 34 | |||
| 35 | unsigned long rate; | ||
| 36 | unsigned long flags; | ||
| 37 | |||
| 38 | void __iomem *enable_reg; | ||
| 39 | unsigned int enable_bit; | ||
| 40 | |||
| 41 | unsigned long arch_flags; | ||
| 42 | void *priv; | ||
| 43 | struct dentry *dentry; | ||
| 44 | struct cpufreq_frequency_table *freq_table; | ||
| 45 | }; | ||
| 46 | |||
| 47 | #define CLK_ENABLE_ON_INIT (1 << 0) | ||
| 48 | |||
| 49 | /* drivers/sh/clk.c */ | ||
| 50 | unsigned long followparent_recalc(struct clk *); | ||
| 51 | void recalculate_root_clocks(void); | ||
| 52 | void propagate_rate(struct clk *); | ||
| 53 | int clk_reparent(struct clk *child, struct clk *parent); | ||
| 54 | int clk_register(struct clk *); | ||
| 55 | void clk_unregister(struct clk *); | ||
| 56 | void clk_enable_init_clocks(void); | ||
| 57 | |||
| 58 | /** | ||
| 59 | * clk_set_rate_ex - set the clock rate for a clock source, with additional parameter | ||
| 60 | * @clk: clock source | ||
| 61 | * @rate: desired clock rate in Hz | ||
| 62 | * @algo_id: algorithm id to be passed down to ops->set_rate | ||
| 63 | * | ||
| 64 | * Returns success (0) or negative errno. | ||
| 65 | */ | ||
| 66 | int clk_set_rate_ex(struct clk *clk, unsigned long rate, int algo_id); | ||
| 67 | |||
| 68 | enum clk_sh_algo_id { | ||
| 69 | NO_CHANGE = 0, | ||
| 70 | |||
| 71 | IUS_N1_N1, | ||
| 72 | IUS_322, | ||
| 73 | IUS_522, | ||
| 74 | IUS_N11, | ||
| 75 | |||
| 76 | SB_N1, | ||
| 77 | |||
| 78 | SB3_N1, | ||
| 79 | SB3_32, | ||
| 80 | SB3_43, | ||
| 81 | SB3_54, | ||
| 82 | |||
| 83 | BP_N1, | ||
| 84 | |||
| 85 | IP_N1, | ||
| 86 | }; | ||
| 87 | |||
| 88 | struct clk_div_mult_table { | ||
| 89 | unsigned int *divisors; | ||
| 90 | unsigned int nr_divisors; | ||
| 91 | unsigned int *multipliers; | ||
| 92 | unsigned int nr_multipliers; | ||
| 93 | }; | ||
| 94 | |||
| 95 | struct cpufreq_frequency_table; | ||
| 96 | void clk_rate_table_build(struct clk *clk, | ||
| 97 | struct cpufreq_frequency_table *freq_table, | ||
| 98 | int nr_freqs, | ||
| 99 | struct clk_div_mult_table *src_table, | ||
| 100 | unsigned long *bitmap); | ||
| 101 | |||
| 102 | long clk_rate_table_round(struct clk *clk, | ||
| 103 | struct cpufreq_frequency_table *freq_table, | ||
| 104 | unsigned long rate); | ||
| 105 | |||
| 106 | int clk_rate_table_find(struct clk *clk, | ||
| 107 | struct cpufreq_frequency_table *freq_table, | ||
| 108 | unsigned long rate); | ||
| 109 | |||
| 110 | #define SH_CLK_MSTP32(_parent, _enable_reg, _enable_bit, _flags) \ | ||
| 111 | { \ | ||
| 112 | .parent = _parent, \ | ||
| 113 | .enable_reg = (void __iomem *)_enable_reg, \ | ||
| 114 | .enable_bit = _enable_bit, \ | ||
| 115 | .flags = _flags, \ | ||
| 116 | } | ||
| 117 | |||
| 118 | int sh_clk_mstp32_register(struct clk *clks, int nr); | ||
| 119 | |||
| 120 | #define SH_CLK_DIV4(_parent, _reg, _shift, _div_bitmap, _flags) \ | ||
| 121 | { \ | ||
| 122 | .parent = _parent, \ | ||
| 123 | .enable_reg = (void __iomem *)_reg, \ | ||
| 124 | .enable_bit = _shift, \ | ||
| 125 | .arch_flags = _div_bitmap, \ | ||
| 126 | .flags = _flags, \ | ||
| 127 | } | ||
| 128 | |||
| 129 | struct clk_div4_table { | ||
| 130 | struct clk_div_mult_table *div_mult_table; | ||
| 131 | void (*kick)(struct clk *clk); | ||
| 132 | }; | ||
| 133 | |||
| 134 | int sh_clk_div4_register(struct clk *clks, int nr, | ||
| 135 | struct clk_div4_table *table); | ||
| 136 | int sh_clk_div4_enable_register(struct clk *clks, int nr, | ||
| 137 | struct clk_div4_table *table); | ||
| 138 | int sh_clk_div4_reparent_register(struct clk *clks, int nr, | ||
| 139 | struct clk_div4_table *table); | ||
| 140 | |||
| 141 | #define SH_CLK_DIV6(_parent, _reg, _flags) \ | ||
| 142 | { \ | ||
| 143 | .parent = _parent, \ | ||
| 144 | .enable_reg = (void __iomem *)_reg, \ | ||
| 145 | .flags = _flags, \ | ||
| 146 | } | ||
| 147 | |||
| 148 | int sh_clk_div6_register(struct clk *clks, int nr); | ||
| 149 | |||
| 150 | #endif /* __SH_CLOCK_H */ | ||
diff --git a/include/linux/sh_dma.h b/include/linux/sh_dma.h new file mode 100644 index 000000000000..b08cd4efa15c --- /dev/null +++ b/include/linux/sh_dma.h | |||
| @@ -0,0 +1,102 @@ | |||
| 1 | /* | ||
| 2 | * Header for the new SH dmaengine driver | ||
| 3 | * | ||
| 4 | * Copyright (C) 2010 Guennadi Liakhovetski <g.liakhovetski@gmx.de> | ||
| 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 | #ifndef SH_DMA_H | ||
| 11 | #define SH_DMA_H | ||
| 12 | |||
| 13 | #include <linux/list.h> | ||
| 14 | #include <linux/dmaengine.h> | ||
| 15 | |||
| 16 | /* Used by slave DMA clients to request DMA to/from a specific peripheral */ | ||
| 17 | struct sh_dmae_slave { | ||
| 18 | unsigned int slave_id; /* Set by the platform */ | ||
| 19 | struct device *dma_dev; /* Set by the platform */ | ||
| 20 | const struct sh_dmae_slave_config *config; /* Set by the driver */ | ||
| 21 | }; | ||
| 22 | |||
| 23 | struct sh_dmae_regs { | ||
| 24 | u32 sar; /* SAR / source address */ | ||
| 25 | u32 dar; /* DAR / destination address */ | ||
| 26 | u32 tcr; /* TCR / transfer count */ | ||
| 27 | }; | ||
| 28 | |||
| 29 | struct sh_desc { | ||
| 30 | struct sh_dmae_regs hw; | ||
| 31 | struct list_head node; | ||
| 32 | struct dma_async_tx_descriptor async_tx; | ||
| 33 | enum dma_data_direction direction; | ||
| 34 | dma_cookie_t cookie; | ||
| 35 | size_t partial; | ||
| 36 | int chunks; | ||
| 37 | int mark; | ||
| 38 | }; | ||
| 39 | |||
| 40 | struct sh_dmae_slave_config { | ||
| 41 | unsigned int slave_id; | ||
| 42 | dma_addr_t addr; | ||
| 43 | u32 chcr; | ||
| 44 | char mid_rid; | ||
| 45 | }; | ||
| 46 | |||
| 47 | struct sh_dmae_channel { | ||
| 48 | unsigned int offset; | ||
| 49 | unsigned int dmars; | ||
| 50 | unsigned int dmars_bit; | ||
| 51 | }; | ||
| 52 | |||
| 53 | struct sh_dmae_pdata { | ||
| 54 | const struct sh_dmae_slave_config *slave; | ||
| 55 | int slave_num; | ||
| 56 | const struct sh_dmae_channel *channel; | ||
| 57 | int channel_num; | ||
| 58 | unsigned int ts_low_shift; | ||
| 59 | unsigned int ts_low_mask; | ||
| 60 | unsigned int ts_high_shift; | ||
| 61 | unsigned int ts_high_mask; | ||
| 62 | const unsigned int *ts_shift; | ||
| 63 | int ts_shift_num; | ||
| 64 | u16 dmaor_init; | ||
| 65 | }; | ||
| 66 | |||
| 67 | /* DMA register */ | ||
| 68 | #define SAR 0x00 | ||
| 69 | #define DAR 0x04 | ||
| 70 | #define TCR 0x08 | ||
| 71 | #define CHCR 0x0C | ||
| 72 | #define DMAOR 0x40 | ||
| 73 | |||
| 74 | /* DMAOR definitions */ | ||
| 75 | #define DMAOR_AE 0x00000004 | ||
| 76 | #define DMAOR_NMIF 0x00000002 | ||
| 77 | #define DMAOR_DME 0x00000001 | ||
| 78 | |||
| 79 | /* Definitions for the SuperH DMAC */ | ||
| 80 | #define REQ_L 0x00000000 | ||
| 81 | #define REQ_E 0x00080000 | ||
| 82 | #define RACK_H 0x00000000 | ||
| 83 | #define RACK_L 0x00040000 | ||
| 84 | #define ACK_R 0x00000000 | ||
| 85 | #define ACK_W 0x00020000 | ||
| 86 | #define ACK_H 0x00000000 | ||
| 87 | #define ACK_L 0x00010000 | ||
| 88 | #define DM_INC 0x00004000 | ||
| 89 | #define DM_DEC 0x00008000 | ||
| 90 | #define DM_FIX 0x0000c000 | ||
| 91 | #define SM_INC 0x00001000 | ||
| 92 | #define SM_DEC 0x00002000 | ||
| 93 | #define SM_FIX 0x00003000 | ||
| 94 | #define RS_IN 0x00000200 | ||
| 95 | #define RS_OUT 0x00000300 | ||
| 96 | #define TS_BLK 0x00000040 | ||
| 97 | #define TM_BUR 0x00000020 | ||
| 98 | #define CHCR_DE 0x00000001 | ||
| 99 | #define CHCR_TE 0x00000002 | ||
| 100 | #define CHCR_IE 0x00000004 | ||
| 101 | |||
| 102 | #endif | ||
diff --git a/include/linux/sh_intc.h b/include/linux/sh_intc.h index 51d288d8ac88..0d6cd38e673d 100644 --- a/include/linux/sh_intc.h +++ b/include/linux/sh_intc.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef __SH_INTC_H | 1 | #ifndef __SH_INTC_H |
| 2 | #define __SH_INTC_H | 2 | #define __SH_INTC_H |
| 3 | 3 | ||
| 4 | #include <linux/ioport.h> | ||
| 5 | |||
| 4 | typedef unsigned char intc_enum; | 6 | typedef unsigned char intc_enum; |
| 5 | 7 | ||
| 6 | struct intc_vect { | 8 | struct intc_vect { |
| @@ -21,6 +23,9 @@ struct intc_group { | |||
| 21 | struct intc_mask_reg { | 23 | struct intc_mask_reg { |
| 22 | unsigned long set_reg, clr_reg, reg_width; | 24 | unsigned long set_reg, clr_reg, reg_width; |
| 23 | intc_enum enum_ids[32]; | 25 | intc_enum enum_ids[32]; |
| 26 | #ifdef CONFIG_INTC_BALANCING | ||
| 27 | unsigned long dist_reg; | ||
| 28 | #endif | ||
| 24 | #ifdef CONFIG_SMP | 29 | #ifdef CONFIG_SMP |
| 25 | unsigned long smp; | 30 | unsigned long smp; |
| 26 | #endif | 31 | #endif |
| @@ -39,8 +44,14 @@ struct intc_sense_reg { | |||
| 39 | intc_enum enum_ids[16]; | 44 | intc_enum enum_ids[16]; |
| 40 | }; | 45 | }; |
| 41 | 46 | ||
| 47 | #ifdef CONFIG_INTC_BALANCING | ||
| 48 | #define INTC_SMP_BALANCING(reg) .dist_reg = (reg) | ||
| 49 | #else | ||
| 50 | #define INTC_SMP_BALANCING(reg) | ||
| 51 | #endif | ||
| 52 | |||
| 42 | #ifdef CONFIG_SMP | 53 | #ifdef CONFIG_SMP |
| 43 | #define INTC_SMP(stride, nr) .smp = (stride) | ((nr) << 8) | 54 | #define INTC_SMP(stride, nr) .smp = (stride) | ((nr) << 8) |
| 44 | #else | 55 | #else |
| 45 | #define INTC_SMP(stride, nr) | 56 | #define INTC_SMP(stride, nr) |
| 46 | #endif | 57 | #endif |
| @@ -71,6 +82,8 @@ struct intc_hw_desc { | |||
| 71 | 82 | ||
| 72 | struct intc_desc { | 83 | struct intc_desc { |
| 73 | char *name; | 84 | char *name; |
| 85 | struct resource *resource; | ||
| 86 | unsigned int num_resources; | ||
| 74 | intc_enum force_enable; | 87 | intc_enum force_enable; |
| 75 | intc_enum force_disable; | 88 | intc_enum force_disable; |
| 76 | struct intc_hw_desc hw; | 89 | struct intc_hw_desc hw; |
| @@ -92,9 +105,18 @@ struct intc_desc symbol __initdata = { \ | |||
| 92 | prio_regs, sense_regs, ack_regs), \ | 105 | prio_regs, sense_regs, ack_regs), \ |
| 93 | } | 106 | } |
| 94 | 107 | ||
| 95 | void __init register_intc_controller(struct intc_desc *desc); | 108 | int __init register_intc_controller(struct intc_desc *desc); |
| 96 | int intc_set_priority(unsigned int irq, unsigned int prio); | 109 | int intc_set_priority(unsigned int irq, unsigned int prio); |
| 97 | 110 | ||
| 111 | #ifdef CONFIG_INTC_USERIMASK | ||
| 112 | int register_intc_userimask(unsigned long addr); | ||
| 113 | #else | ||
| 114 | static inline int register_intc_userimask(unsigned long addr) | ||
| 115 | { | ||
| 116 | return 0; | ||
| 117 | } | ||
| 118 | #endif | ||
| 119 | |||
| 98 | int reserve_irq_vector(unsigned int irq); | 120 | int reserve_irq_vector(unsigned int irq); |
| 99 | void reserve_irq_legacy(void); | 121 | void reserve_irq_legacy(void); |
| 100 | 122 | ||
diff --git a/include/linux/signal.h b/include/linux/signal.h index ab9272cc270c..fcd2b14b1932 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h | |||
| @@ -7,6 +7,8 @@ | |||
| 7 | #ifdef __KERNEL__ | 7 | #ifdef __KERNEL__ |
| 8 | #include <linux/list.h> | 8 | #include <linux/list.h> |
| 9 | 9 | ||
| 10 | /* for sysctl */ | ||
| 11 | extern int print_fatal_signals; | ||
| 10 | /* | 12 | /* |
| 11 | * Real Time signals may be queued. | 13 | * Real Time signals may be queued. |
| 12 | */ | 14 | */ |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 03f816a9b659..124f90cd5a38 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -190,9 +190,6 @@ struct skb_shared_info { | |||
| 190 | atomic_t dataref; | 190 | atomic_t dataref; |
| 191 | unsigned short nr_frags; | 191 | unsigned short nr_frags; |
| 192 | unsigned short gso_size; | 192 | unsigned short gso_size; |
| 193 | #ifdef CONFIG_HAS_DMA | ||
| 194 | dma_addr_t dma_head; | ||
| 195 | #endif | ||
| 196 | /* Warning: this field is not always filled in (UFO)! */ | 193 | /* Warning: this field is not always filled in (UFO)! */ |
| 197 | unsigned short gso_segs; | 194 | unsigned short gso_segs; |
| 198 | unsigned short gso_type; | 195 | unsigned short gso_type; |
| @@ -201,9 +198,6 @@ struct skb_shared_info { | |||
| 201 | struct sk_buff *frag_list; | 198 | struct sk_buff *frag_list; |
| 202 | struct skb_shared_hwtstamps hwtstamps; | 199 | struct skb_shared_hwtstamps hwtstamps; |
| 203 | skb_frag_t frags[MAX_SKB_FRAGS]; | 200 | skb_frag_t frags[MAX_SKB_FRAGS]; |
| 204 | #ifdef CONFIG_HAS_DMA | ||
| 205 | dma_addr_t dma_maps[MAX_SKB_FRAGS]; | ||
| 206 | #endif | ||
| 207 | /* Intermediate layers must ensure that destructor_arg | 201 | /* Intermediate layers must ensure that destructor_arg |
| 208 | * remains valid until skb destructor */ | 202 | * remains valid until skb destructor */ |
| 209 | void * destructor_arg; | 203 | void * destructor_arg; |
diff --git a/include/linux/slab.h b/include/linux/slab.h index 488446289cab..49d1247cd6d9 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
| @@ -106,6 +106,7 @@ int kmem_cache_shrink(struct kmem_cache *); | |||
| 106 | void kmem_cache_free(struct kmem_cache *, void *); | 106 | void kmem_cache_free(struct kmem_cache *, void *); |
| 107 | unsigned int kmem_cache_size(struct kmem_cache *); | 107 | unsigned int kmem_cache_size(struct kmem_cache *); |
| 108 | const char *kmem_cache_name(struct kmem_cache *); | 108 | const char *kmem_cache_name(struct kmem_cache *); |
| 109 | int kern_ptr_validate(const void *ptr, unsigned long size); | ||
| 109 | int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr); | 110 | int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr); |
| 110 | 111 | ||
| 111 | /* | 112 | /* |
diff --git a/include/linux/smb_fs_sb.h b/include/linux/smb_fs_sb.h index 8a060a7040d8..bb947dd1fba9 100644 --- a/include/linux/smb_fs_sb.h +++ b/include/linux/smb_fs_sb.h | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | #define _SMB_FS_SB | 10 | #define _SMB_FS_SB |
| 11 | 11 | ||
| 12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
| 13 | #include <linux/backing-dev.h> | ||
| 13 | #include <linux/smb.h> | 14 | #include <linux/smb.h> |
| 14 | 15 | ||
| 15 | /* | 16 | /* |
| @@ -74,6 +75,8 @@ struct smb_sb_info { | |||
| 74 | struct smb_ops *ops; | 75 | struct smb_ops *ops; |
| 75 | 76 | ||
| 76 | struct super_block *super_block; | 77 | struct super_block *super_block; |
| 78 | |||
| 79 | struct backing_dev_info bdi; | ||
| 77 | }; | 80 | }; |
| 78 | 81 | ||
| 79 | static inline int | 82 | static inline int |
diff --git a/include/linux/snmp.h b/include/linux/snmp.h index e28f5a0182e8..4435d1084755 100644 --- a/include/linux/snmp.h +++ b/include/linux/snmp.h | |||
| @@ -225,6 +225,8 @@ enum | |||
| 225 | LINUX_MIB_SACKSHIFTED, | 225 | LINUX_MIB_SACKSHIFTED, |
| 226 | LINUX_MIB_SACKMERGED, | 226 | LINUX_MIB_SACKMERGED, |
| 227 | LINUX_MIB_SACKSHIFTFALLBACK, | 227 | LINUX_MIB_SACKSHIFTFALLBACK, |
| 228 | LINUX_MIB_TCPBACKLOGDROP, | ||
| 229 | LINUX_MIB_TCPMINTTLDROP, /* RFC 5082 */ | ||
| 228 | __LINUX_MIB_MAX | 230 | __LINUX_MIB_MAX |
| 229 | }; | 231 | }; |
| 230 | 232 | ||
diff --git a/include/linux/socket.h b/include/linux/socket.h index 7b3aae2052a6..354cc5617f8b 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
| @@ -255,6 +255,7 @@ struct ucred { | |||
| 255 | #define MSG_ERRQUEUE 0x2000 /* Fetch message from error queue */ | 255 | #define MSG_ERRQUEUE 0x2000 /* Fetch message from error queue */ |
| 256 | #define MSG_NOSIGNAL 0x4000 /* Do not generate SIGPIPE */ | 256 | #define MSG_NOSIGNAL 0x4000 /* Do not generate SIGPIPE */ |
| 257 | #define MSG_MORE 0x8000 /* Sender will send more */ | 257 | #define MSG_MORE 0x8000 /* Sender will send more */ |
| 258 | #define MSG_WAITFORONE 0x10000 /* recvmmsg(): block until 1+ packets avail */ | ||
| 258 | 259 | ||
| 259 | #define MSG_EOF MSG_FIN | 260 | #define MSG_EOF MSG_FIN |
| 260 | 261 | ||
diff --git a/include/linux/spi/ads7846.h b/include/linux/spi/ads7846.h index 51948eb6927a..b4ae570d3c98 100644 --- a/include/linux/spi/ads7846.h +++ b/include/linux/spi/ads7846.h | |||
| @@ -12,7 +12,7 @@ enum ads7846_filter { | |||
| 12 | }; | 12 | }; |
| 13 | 13 | ||
| 14 | struct ads7846_platform_data { | 14 | struct ads7846_platform_data { |
| 15 | u16 model; /* 7843, 7845, 7846. */ | 15 | u16 model; /* 7843, 7845, 7846, 7873. */ |
| 16 | u16 vref_delay_usecs; /* 0 for external vref; etc */ | 16 | u16 vref_delay_usecs; /* 0 for external vref; etc */ |
| 17 | u16 vref_mv; /* external vref value, milliVolts */ | 17 | u16 vref_mv; /* external vref value, milliVolts */ |
| 18 | bool keep_vref_on; /* set to keep vref on for differential | 18 | bool keep_vref_on; /* set to keep vref on for differential |
| @@ -53,5 +53,6 @@ struct ads7846_platform_data { | |||
| 53 | int (*filter) (void *filter_data, int data_idx, int *val); | 53 | int (*filter) (void *filter_data, int data_idx, int *val); |
| 54 | void (*filter_cleanup)(void *filter_data); | 54 | void (*filter_cleanup)(void *filter_data); |
| 55 | void (*wait_for_sync)(void); | 55 | void (*wait_for_sync)(void); |
| 56 | bool wakeup; | ||
| 56 | }; | 57 | }; |
| 57 | 58 | ||
diff --git a/include/linux/spi/l4f00242t03.h b/include/linux/spi/l4f00242t03.h new file mode 100644 index 000000000000..aee1dbda4edc --- /dev/null +++ b/include/linux/spi/l4f00242t03.h | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | /* | ||
| 2 | * l4f00242t03.h -- Platform glue for Epson L4F00242T03 LCD | ||
| 3 | * | ||
| 4 | * Copyright (c) 2009 Alberto Panizzo <maramaopercheseimorto@gmail.com> | ||
| 5 | * Based on Marek Vasut work in lms283gf05.h | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License version 2 as | ||
| 9 | * published by the Free Software Foundation. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 19 | */ | ||
| 20 | |||
| 21 | #ifndef _INCLUDE_LINUX_SPI_L4F00242T03_H_ | ||
| 22 | #define _INCLUDE_LINUX_SPI_L4F00242T03_H_ | ||
| 23 | |||
| 24 | struct l4f00242t03_pdata { | ||
| 25 | unsigned int reset_gpio; | ||
| 26 | unsigned int data_enable_gpio; | ||
| 27 | const char *io_supply; /* will be set to 1.8 V */ | ||
| 28 | const char *core_supply; /* will be set to 2.8 V */ | ||
| 29 | }; | ||
| 30 | |||
| 31 | #endif /* _INCLUDE_LINUX_SPI_L4F00242T03_H_ */ | ||
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 97b60b37f445..af56071b06f9 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | 21 | ||
| 22 | #include <linux/device.h> | 22 | #include <linux/device.h> |
| 23 | #include <linux/mod_devicetable.h> | 23 | #include <linux/mod_devicetable.h> |
| 24 | #include <linux/slab.h> | ||
| 24 | 25 | ||
| 25 | /* | 26 | /* |
| 26 | * INTERFACES between SPI master-side drivers and SPI infrastructure. | 27 | * INTERFACES between SPI master-side drivers and SPI infrastructure. |
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index 86088213334a..89fac6a3f78b 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
| @@ -128,19 +128,21 @@ static inline void smp_mb__after_lock(void) { smp_mb(); } | |||
| 128 | #define raw_spin_unlock_wait(lock) arch_spin_unlock_wait(&(lock)->raw_lock) | 128 | #define raw_spin_unlock_wait(lock) arch_spin_unlock_wait(&(lock)->raw_lock) |
| 129 | 129 | ||
| 130 | #ifdef CONFIG_DEBUG_SPINLOCK | 130 | #ifdef CONFIG_DEBUG_SPINLOCK |
| 131 | extern void do_raw_spin_lock(raw_spinlock_t *lock); | 131 | extern void do_raw_spin_lock(raw_spinlock_t *lock) __acquires(lock); |
| 132 | #define do_raw_spin_lock_flags(lock, flags) do_raw_spin_lock(lock) | 132 | #define do_raw_spin_lock_flags(lock, flags) do_raw_spin_lock(lock) |
| 133 | extern int do_raw_spin_trylock(raw_spinlock_t *lock); | 133 | extern int do_raw_spin_trylock(raw_spinlock_t *lock); |
| 134 | extern void do_raw_spin_unlock(raw_spinlock_t *lock); | 134 | extern void do_raw_spin_unlock(raw_spinlock_t *lock) __releases(lock); |
| 135 | #else | 135 | #else |
| 136 | static inline void do_raw_spin_lock(raw_spinlock_t *lock) | 136 | static inline void do_raw_spin_lock(raw_spinlock_t *lock) __acquires(lock) |
| 137 | { | 137 | { |
| 138 | __acquire(lock); | ||
| 138 | arch_spin_lock(&lock->raw_lock); | 139 | arch_spin_lock(&lock->raw_lock); |
| 139 | } | 140 | } |
| 140 | 141 | ||
| 141 | static inline void | 142 | static inline void |
| 142 | do_raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long *flags) | 143 | do_raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long *flags) __acquires(lock) |
| 143 | { | 144 | { |
| 145 | __acquire(lock); | ||
| 144 | arch_spin_lock_flags(&lock->raw_lock, *flags); | 146 | arch_spin_lock_flags(&lock->raw_lock, *flags); |
| 145 | } | 147 | } |
| 146 | 148 | ||
| @@ -149,9 +151,10 @@ static inline int do_raw_spin_trylock(raw_spinlock_t *lock) | |||
| 149 | return arch_spin_trylock(&(lock)->raw_lock); | 151 | return arch_spin_trylock(&(lock)->raw_lock); |
| 150 | } | 152 | } |
| 151 | 153 | ||
| 152 | static inline void do_raw_spin_unlock(raw_spinlock_t *lock) | 154 | static inline void do_raw_spin_unlock(raw_spinlock_t *lock) __releases(lock) |
| 153 | { | 155 | { |
| 154 | arch_spin_unlock(&lock->raw_lock); | 156 | arch_spin_unlock(&lock->raw_lock); |
| 157 | __release(lock); | ||
| 155 | } | 158 | } |
| 156 | #endif | 159 | #endif |
| 157 | 160 | ||
diff --git a/include/linux/srcu.h b/include/linux/srcu.h index 4d5ecb222af9..4d5d2f546dbf 100644 --- a/include/linux/srcu.h +++ b/include/linux/srcu.h | |||
| @@ -27,6 +27,8 @@ | |||
| 27 | #ifndef _LINUX_SRCU_H | 27 | #ifndef _LINUX_SRCU_H |
| 28 | #define _LINUX_SRCU_H | 28 | #define _LINUX_SRCU_H |
| 29 | 29 | ||
| 30 | #include <linux/mutex.h> | ||
| 31 | |||
| 30 | struct srcu_struct_array { | 32 | struct srcu_struct_array { |
| 31 | int c[2]; | 33 | int c[2]; |
| 32 | }; | 34 | }; |
| @@ -84,8 +86,8 @@ long srcu_batches_completed(struct srcu_struct *sp); | |||
| 84 | /** | 86 | /** |
| 85 | * srcu_read_lock_held - might we be in SRCU read-side critical section? | 87 | * srcu_read_lock_held - might we be in SRCU read-side critical section? |
| 86 | * | 88 | * |
| 87 | * If CONFIG_PROVE_LOCKING is selected and enabled, returns nonzero iff in | 89 | * If CONFIG_DEBUG_LOCK_ALLOC is selected, returns nonzero iff in an SRCU |
| 88 | * an SRCU read-side critical section. In absence of CONFIG_PROVE_LOCKING, | 90 | * read-side critical section. In absence of CONFIG_DEBUG_LOCK_ALLOC, |
| 89 | * this assumes we are in an SRCU read-side critical section unless it can | 91 | * this assumes we are in an SRCU read-side critical section unless it can |
| 90 | * prove otherwise. | 92 | * prove otherwise. |
| 91 | */ | 93 | */ |
diff --git a/include/linux/stop_machine.h b/include/linux/stop_machine.h index baba3a23a814..6b524a0d02e4 100644 --- a/include/linux/stop_machine.h +++ b/include/linux/stop_machine.h | |||
| @@ -1,13 +1,101 @@ | |||
| 1 | #ifndef _LINUX_STOP_MACHINE | 1 | #ifndef _LINUX_STOP_MACHINE |
| 2 | #define _LINUX_STOP_MACHINE | 2 | #define _LINUX_STOP_MACHINE |
| 3 | /* "Bogolock": stop the entire machine, disable interrupts. This is a | 3 | |
| 4 | very heavy lock, which is equivalent to grabbing every spinlock | ||
| 5 | (and more). So the "read" side to such a lock is anything which | ||
| 6 | disables preeempt. */ | ||
| 7 | #include <linux/cpu.h> | 4 | #include <linux/cpu.h> |
| 8 | #include <linux/cpumask.h> | 5 | #include <linux/cpumask.h> |
| 6 | #include <linux/list.h> | ||
| 9 | #include <asm/system.h> | 7 | #include <asm/system.h> |
| 10 | 8 | ||
| 9 | /* | ||
| 10 | * stop_cpu[s]() is simplistic per-cpu maximum priority cpu | ||
| 11 | * monopolization mechanism. The caller can specify a non-sleeping | ||
| 12 | * function to be executed on a single or multiple cpus preempting all | ||
| 13 | * other processes and monopolizing those cpus until it finishes. | ||
| 14 | * | ||
| 15 | * Resources for this mechanism are preallocated when a cpu is brought | ||
| 16 | * up and requests are guaranteed to be served as long as the target | ||
| 17 | * cpus are online. | ||
| 18 | */ | ||
| 19 | typedef int (*cpu_stop_fn_t)(void *arg); | ||
| 20 | |||
| 21 | #ifdef CONFIG_SMP | ||
| 22 | |||
| 23 | struct cpu_stop_work { | ||
| 24 | struct list_head list; /* cpu_stopper->works */ | ||
| 25 | cpu_stop_fn_t fn; | ||
| 26 | void *arg; | ||
| 27 | struct cpu_stop_done *done; | ||
| 28 | }; | ||
| 29 | |||
| 30 | int stop_one_cpu(unsigned int cpu, cpu_stop_fn_t fn, void *arg); | ||
| 31 | void stop_one_cpu_nowait(unsigned int cpu, cpu_stop_fn_t fn, void *arg, | ||
| 32 | struct cpu_stop_work *work_buf); | ||
| 33 | int stop_cpus(const struct cpumask *cpumask, cpu_stop_fn_t fn, void *arg); | ||
| 34 | int try_stop_cpus(const struct cpumask *cpumask, cpu_stop_fn_t fn, void *arg); | ||
| 35 | |||
| 36 | #else /* CONFIG_SMP */ | ||
| 37 | |||
| 38 | #include <linux/workqueue.h> | ||
| 39 | |||
| 40 | struct cpu_stop_work { | ||
| 41 | struct work_struct work; | ||
| 42 | cpu_stop_fn_t fn; | ||
| 43 | void *arg; | ||
| 44 | }; | ||
| 45 | |||
| 46 | static inline int stop_one_cpu(unsigned int cpu, cpu_stop_fn_t fn, void *arg) | ||
| 47 | { | ||
| 48 | int ret = -ENOENT; | ||
| 49 | preempt_disable(); | ||
| 50 | if (cpu == smp_processor_id()) | ||
| 51 | ret = fn(arg); | ||
| 52 | preempt_enable(); | ||
| 53 | return ret; | ||
| 54 | } | ||
| 55 | |||
| 56 | static void stop_one_cpu_nowait_workfn(struct work_struct *work) | ||
| 57 | { | ||
| 58 | struct cpu_stop_work *stwork = | ||
| 59 | container_of(work, struct cpu_stop_work, work); | ||
| 60 | preempt_disable(); | ||
| 61 | stwork->fn(stwork->arg); | ||
| 62 | preempt_enable(); | ||
| 63 | } | ||
| 64 | |||
| 65 | static inline void stop_one_cpu_nowait(unsigned int cpu, | ||
| 66 | cpu_stop_fn_t fn, void *arg, | ||
| 67 | struct cpu_stop_work *work_buf) | ||
| 68 | { | ||
| 69 | if (cpu == smp_processor_id()) { | ||
| 70 | INIT_WORK(&work_buf->work, stop_one_cpu_nowait_workfn); | ||
| 71 | work_buf->fn = fn; | ||
| 72 | work_buf->arg = arg; | ||
| 73 | schedule_work(&work_buf->work); | ||
| 74 | } | ||
| 75 | } | ||
| 76 | |||
| 77 | static inline int stop_cpus(const struct cpumask *cpumask, | ||
| 78 | cpu_stop_fn_t fn, void *arg) | ||
| 79 | { | ||
| 80 | if (cpumask_test_cpu(raw_smp_processor_id(), cpumask)) | ||
| 81 | return stop_one_cpu(raw_smp_processor_id(), fn, arg); | ||
| 82 | return -ENOENT; | ||
| 83 | } | ||
| 84 | |||
| 85 | static inline int try_stop_cpus(const struct cpumask *cpumask, | ||
| 86 | cpu_stop_fn_t fn, void *arg) | ||
| 87 | { | ||
| 88 | return stop_cpus(cpumask, fn, arg); | ||
| 89 | } | ||
| 90 | |||
| 91 | #endif /* CONFIG_SMP */ | ||
| 92 | |||
| 93 | /* | ||
| 94 | * stop_machine "Bogolock": stop the entire machine, disable | ||
| 95 | * interrupts. This is a very heavy lock, which is equivalent to | ||
| 96 | * grabbing every spinlock (and more). So the "read" side to such a | ||
| 97 | * lock is anything which disables preeempt. | ||
| 98 | */ | ||
| 11 | #if defined(CONFIG_STOP_MACHINE) && defined(CONFIG_SMP) | 99 | #if defined(CONFIG_STOP_MACHINE) && defined(CONFIG_SMP) |
| 12 | 100 | ||
| 13 | /** | 101 | /** |
| @@ -36,24 +124,7 @@ int stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus); | |||
| 36 | */ | 124 | */ |
| 37 | int __stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus); | 125 | int __stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus); |
| 38 | 126 | ||
| 39 | /** | 127 | #else /* CONFIG_STOP_MACHINE && CONFIG_SMP */ |
| 40 | * stop_machine_create: create all stop_machine threads | ||
| 41 | * | ||
| 42 | * Description: This causes all stop_machine threads to be created before | ||
| 43 | * stop_machine actually gets called. This can be used by subsystems that | ||
| 44 | * need a non failing stop_machine infrastructure. | ||
| 45 | */ | ||
| 46 | int stop_machine_create(void); | ||
| 47 | |||
| 48 | /** | ||
| 49 | * stop_machine_destroy: destroy all stop_machine threads | ||
| 50 | * | ||
| 51 | * Description: This causes all stop_machine threads which were created with | ||
| 52 | * stop_machine_create to be destroyed again. | ||
| 53 | */ | ||
| 54 | void stop_machine_destroy(void); | ||
| 55 | |||
| 56 | #else | ||
| 57 | 128 | ||
| 58 | static inline int stop_machine(int (*fn)(void *), void *data, | 129 | static inline int stop_machine(int (*fn)(void *), void *data, |
| 59 | const struct cpumask *cpus) | 130 | const struct cpumask *cpus) |
| @@ -65,8 +136,5 @@ static inline int stop_machine(int (*fn)(void *), void *data, | |||
| 65 | return ret; | 136 | return ret; |
| 66 | } | 137 | } |
| 67 | 138 | ||
| 68 | static inline int stop_machine_create(void) { return 0; } | 139 | #endif /* CONFIG_STOP_MACHINE && CONFIG_SMP */ |
| 69 | static inline void stop_machine_destroy(void) { } | 140 | #endif /* _LINUX_STOP_MACHINE */ |
| 70 | |||
| 71 | #endif /* CONFIG_SMP */ | ||
| 72 | #endif /* _LINUX_STOP_MACHINE */ | ||
diff --git a/include/linux/sunrpc/bc_xprt.h b/include/linux/sunrpc/bc_xprt.h index d7152b451e21..7c91260c44a9 100644 --- a/include/linux/sunrpc/bc_xprt.h +++ b/include/linux/sunrpc/bc_xprt.h | |||
| @@ -36,7 +36,6 @@ struct rpc_rqst *xprt_alloc_bc_request(struct rpc_xprt *xprt); | |||
| 36 | void xprt_free_bc_request(struct rpc_rqst *req); | 36 | void xprt_free_bc_request(struct rpc_rqst *req); |
| 37 | int xprt_setup_backchannel(struct rpc_xprt *, unsigned int min_reqs); | 37 | int xprt_setup_backchannel(struct rpc_xprt *, unsigned int min_reqs); |
| 38 | void xprt_destroy_backchannel(struct rpc_xprt *, int max_reqs); | 38 | void xprt_destroy_backchannel(struct rpc_xprt *, int max_reqs); |
| 39 | void bc_release_request(struct rpc_task *); | ||
| 40 | int bc_send(struct rpc_rqst *req); | 39 | int bc_send(struct rpc_rqst *req); |
| 41 | 40 | ||
| 42 | /* | 41 | /* |
| @@ -59,6 +58,10 @@ static inline int svc_is_backchannel(const struct svc_rqst *rqstp) | |||
| 59 | { | 58 | { |
| 60 | return 0; | 59 | return 0; |
| 61 | } | 60 | } |
| 61 | |||
| 62 | static inline void xprt_free_bc_request(struct rpc_rqst *req) | ||
| 63 | { | ||
| 64 | } | ||
| 62 | #endif /* CONFIG_NFS_V4_1 */ | 65 | #endif /* CONFIG_NFS_V4_1 */ |
| 63 | #endif /* _LINUX_SUNRPC_BC_XPRT_H */ | 66 | #endif /* _LINUX_SUNRPC_BC_XPRT_H */ |
| 64 | 67 | ||
diff --git a/include/linux/swap.h b/include/linux/swap.h index a2602a8207a6..1f59d9340c4d 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
| @@ -355,6 +355,7 @@ static inline void disable_swap_token(void) | |||
| 355 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR | 355 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR |
| 356 | extern void | 356 | extern void |
| 357 | mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout); | 357 | mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout); |
| 358 | extern int mem_cgroup_count_swap_user(swp_entry_t ent, struct page **pagep); | ||
| 358 | #else | 359 | #else |
| 359 | static inline void | 360 | static inline void |
| 360 | mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout) | 361 | mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout) |
| @@ -485,6 +486,14 @@ mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent) | |||
| 485 | { | 486 | { |
| 486 | } | 487 | } |
| 487 | 488 | ||
| 489 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR | ||
| 490 | static inline int | ||
| 491 | mem_cgroup_count_swap_user(swp_entry_t ent, struct page **pagep) | ||
| 492 | { | ||
| 493 | return 0; | ||
| 494 | } | ||
| 495 | #endif | ||
| 496 | |||
| 488 | #endif /* CONFIG_SWAP */ | 497 | #endif /* CONFIG_SWAP */ |
| 489 | #endif /* __KERNEL__*/ | 498 | #endif /* __KERNEL__*/ |
| 490 | #endif /* _LINUX_SWAP_H */ | 499 | #endif /* _LINUX_SWAP_H */ |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 8126f239edf0..057929b0a651 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
| @@ -23,6 +23,7 @@ struct kexec_segment; | |||
| 23 | struct linux_dirent; | 23 | struct linux_dirent; |
| 24 | struct linux_dirent64; | 24 | struct linux_dirent64; |
| 25 | struct list_head; | 25 | struct list_head; |
| 26 | struct mmap_arg_struct; | ||
| 26 | struct msgbuf; | 27 | struct msgbuf; |
| 27 | struct msghdr; | 28 | struct msghdr; |
| 28 | struct mmsghdr; | 29 | struct mmsghdr; |
| @@ -30,10 +31,13 @@ struct msqid_ds; | |||
| 30 | struct new_utsname; | 31 | struct new_utsname; |
| 31 | struct nfsctl_arg; | 32 | struct nfsctl_arg; |
| 32 | struct __old_kernel_stat; | 33 | struct __old_kernel_stat; |
| 34 | struct oldold_utsname; | ||
| 35 | struct old_utsname; | ||
| 33 | struct pollfd; | 36 | struct pollfd; |
| 34 | struct rlimit; | 37 | struct rlimit; |
| 35 | struct rusage; | 38 | struct rusage; |
| 36 | struct sched_param; | 39 | struct sched_param; |
| 40 | struct sel_arg_struct; | ||
| 37 | struct semaphore; | 41 | struct semaphore; |
| 38 | struct sembuf; | 42 | struct sembuf; |
| 39 | struct shmid_ds; | 43 | struct shmid_ds; |
| @@ -101,18 +105,18 @@ struct perf_event_attr; | |||
| 101 | 105 | ||
| 102 | #ifdef CONFIG_PERF_EVENTS | 106 | #ifdef CONFIG_PERF_EVENTS |
| 103 | 107 | ||
| 104 | #define TRACE_SYS_ENTER_PROFILE_INIT(sname) \ | 108 | #define TRACE_SYS_ENTER_PERF_INIT(sname) \ |
| 105 | .profile_enable = prof_sysenter_enable, \ | 109 | .perf_event_enable = perf_sysenter_enable, \ |
| 106 | .profile_disable = prof_sysenter_disable, | 110 | .perf_event_disable = perf_sysenter_disable, |
| 107 | 111 | ||
| 108 | #define TRACE_SYS_EXIT_PROFILE_INIT(sname) \ | 112 | #define TRACE_SYS_EXIT_PERF_INIT(sname) \ |
| 109 | .profile_enable = prof_sysexit_enable, \ | 113 | .perf_event_enable = perf_sysexit_enable, \ |
| 110 | .profile_disable = prof_sysexit_disable, | 114 | .perf_event_disable = perf_sysexit_disable, |
| 111 | #else | 115 | #else |
| 112 | #define TRACE_SYS_ENTER_PROFILE(sname) | 116 | #define TRACE_SYS_ENTER_PERF(sname) |
| 113 | #define TRACE_SYS_ENTER_PROFILE_INIT(sname) | 117 | #define TRACE_SYS_ENTER_PERF_INIT(sname) |
| 114 | #define TRACE_SYS_EXIT_PROFILE(sname) | 118 | #define TRACE_SYS_EXIT_PERF(sname) |
| 115 | #define TRACE_SYS_EXIT_PROFILE_INIT(sname) | 119 | #define TRACE_SYS_EXIT_PERF_INIT(sname) |
| 116 | #endif /* CONFIG_PERF_EVENTS */ | 120 | #endif /* CONFIG_PERF_EVENTS */ |
| 117 | 121 | ||
| 118 | #ifdef CONFIG_FTRACE_SYSCALLS | 122 | #ifdef CONFIG_FTRACE_SYSCALLS |
| @@ -149,7 +153,7 @@ struct perf_event_attr; | |||
| 149 | .regfunc = reg_event_syscall_enter, \ | 153 | .regfunc = reg_event_syscall_enter, \ |
| 150 | .unregfunc = unreg_event_syscall_enter, \ | 154 | .unregfunc = unreg_event_syscall_enter, \ |
| 151 | .data = (void *)&__syscall_meta_##sname,\ | 155 | .data = (void *)&__syscall_meta_##sname,\ |
| 152 | TRACE_SYS_ENTER_PROFILE_INIT(sname) \ | 156 | TRACE_SYS_ENTER_PERF_INIT(sname) \ |
| 153 | } | 157 | } |
| 154 | 158 | ||
| 155 | #define SYSCALL_TRACE_EXIT_EVENT(sname) \ | 159 | #define SYSCALL_TRACE_EXIT_EVENT(sname) \ |
| @@ -171,7 +175,7 @@ struct perf_event_attr; | |||
| 171 | .regfunc = reg_event_syscall_exit, \ | 175 | .regfunc = reg_event_syscall_exit, \ |
| 172 | .unregfunc = unreg_event_syscall_exit, \ | 176 | .unregfunc = unreg_event_syscall_exit, \ |
| 173 | .data = (void *)&__syscall_meta_##sname,\ | 177 | .data = (void *)&__syscall_meta_##sname,\ |
| 174 | TRACE_SYS_EXIT_PROFILE_INIT(sname) \ | 178 | TRACE_SYS_EXIT_PERF_INIT(sname) \ |
| 175 | } | 179 | } |
| 176 | 180 | ||
| 177 | #define SYSCALL_METADATA(sname, nb) \ | 181 | #define SYSCALL_METADATA(sname, nb) \ |
| @@ -638,6 +642,7 @@ asmlinkage long sys_poll(struct pollfd __user *ufds, unsigned int nfds, | |||
| 638 | long timeout); | 642 | long timeout); |
| 639 | asmlinkage long sys_select(int n, fd_set __user *inp, fd_set __user *outp, | 643 | asmlinkage long sys_select(int n, fd_set __user *inp, fd_set __user *outp, |
| 640 | fd_set __user *exp, struct timeval __user *tvp); | 644 | fd_set __user *exp, struct timeval __user *tvp); |
| 645 | asmlinkage long sys_old_select(struct sel_arg_struct __user *arg); | ||
| 641 | asmlinkage long sys_epoll_create(int size); | 646 | asmlinkage long sys_epoll_create(int size); |
| 642 | asmlinkage long sys_epoll_create1(int flags); | 647 | asmlinkage long sys_epoll_create1(int flags); |
| 643 | asmlinkage long sys_epoll_ctl(int epfd, int op, int fd, | 648 | asmlinkage long sys_epoll_ctl(int epfd, int op, int fd, |
| @@ -652,6 +657,8 @@ asmlinkage long sys_gethostname(char __user *name, int len); | |||
| 652 | asmlinkage long sys_sethostname(char __user *name, int len); | 657 | asmlinkage long sys_sethostname(char __user *name, int len); |
| 653 | asmlinkage long sys_setdomainname(char __user *name, int len); | 658 | asmlinkage long sys_setdomainname(char __user *name, int len); |
| 654 | asmlinkage long sys_newuname(struct new_utsname __user *name); | 659 | asmlinkage long sys_newuname(struct new_utsname __user *name); |
| 660 | asmlinkage long sys_uname(struct old_utsname __user *); | ||
| 661 | asmlinkage long sys_olduname(struct oldold_utsname __user *); | ||
| 655 | 662 | ||
| 656 | asmlinkage long sys_getrlimit(unsigned int resource, | 663 | asmlinkage long sys_getrlimit(unsigned int resource, |
| 657 | struct rlimit __user *rlim); | 664 | struct rlimit __user *rlim); |
| @@ -681,6 +688,8 @@ asmlinkage long sys_shmat(int shmid, char __user *shmaddr, int shmflg); | |||
| 681 | asmlinkage long sys_shmget(key_t key, size_t size, int flag); | 688 | asmlinkage long sys_shmget(key_t key, size_t size, int flag); |
| 682 | asmlinkage long sys_shmdt(char __user *shmaddr); | 689 | asmlinkage long sys_shmdt(char __user *shmaddr); |
| 683 | asmlinkage long sys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf); | 690 | asmlinkage long sys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf); |
| 691 | asmlinkage long sys_ipc(unsigned int call, int first, unsigned long second, | ||
| 692 | unsigned long third, void __user *ptr, long fifth); | ||
| 684 | 693 | ||
| 685 | asmlinkage long sys_mq_open(const char __user *name, int oflag, mode_t mode, struct mq_attr __user *attr); | 694 | asmlinkage long sys_mq_open(const char __user *name, int oflag, mode_t mode, struct mq_attr __user *attr); |
| 686 | asmlinkage long sys_mq_unlink(const char __user *name); | 695 | asmlinkage long sys_mq_unlink(const char __user *name); |
| @@ -836,4 +845,6 @@ asmlinkage long sys_perf_event_open( | |||
| 836 | asmlinkage long sys_mmap_pgoff(unsigned long addr, unsigned long len, | 845 | asmlinkage long sys_mmap_pgoff(unsigned long addr, unsigned long len, |
| 837 | unsigned long prot, unsigned long flags, | 846 | unsigned long prot, unsigned long flags, |
| 838 | unsigned long fd, unsigned long pgoff); | 847 | unsigned long fd, unsigned long pgoff); |
| 848 | asmlinkage long sys_old_mmap(struct mmap_arg_struct __user *arg); | ||
| 849 | |||
| 839 | #endif | 850 | #endif |
diff --git a/include/linux/taskstats_kern.h b/include/linux/taskstats_kern.h index 3398f4553269..58de6edf751f 100644 --- a/include/linux/taskstats_kern.h +++ b/include/linux/taskstats_kern.h | |||
| @@ -9,16 +9,12 @@ | |||
| 9 | 9 | ||
| 10 | #include <linux/taskstats.h> | 10 | #include <linux/taskstats.h> |
| 11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
| 12 | #include <linux/slab.h> | ||
| 12 | 13 | ||
| 13 | #ifdef CONFIG_TASKSTATS | 14 | #ifdef CONFIG_TASKSTATS |
| 14 | extern struct kmem_cache *taskstats_cache; | 15 | extern struct kmem_cache *taskstats_cache; |
| 15 | extern struct mutex taskstats_exit_mutex; | 16 | extern struct mutex taskstats_exit_mutex; |
| 16 | 17 | ||
| 17 | static inline void taskstats_tgid_init(struct signal_struct *sig) | ||
| 18 | { | ||
| 19 | sig->stats = NULL; | ||
| 20 | } | ||
| 21 | |||
| 22 | static inline void taskstats_tgid_free(struct signal_struct *sig) | 18 | static inline void taskstats_tgid_free(struct signal_struct *sig) |
| 23 | { | 19 | { |
| 24 | if (sig->stats) | 20 | if (sig->stats) |
| @@ -30,8 +26,6 @@ extern void taskstats_init_early(void); | |||
| 30 | #else | 26 | #else |
| 31 | static inline void taskstats_exit(struct task_struct *tsk, int group_dead) | 27 | static inline void taskstats_exit(struct task_struct *tsk, int group_dead) |
| 32 | {} | 28 | {} |
| 33 | static inline void taskstats_tgid_init(struct signal_struct *sig) | ||
| 34 | {} | ||
| 35 | static inline void taskstats_tgid_free(struct signal_struct *sig) | 29 | static inline void taskstats_tgid_free(struct signal_struct *sig) |
| 36 | {} | 30 | {} |
| 37 | static inline void taskstats_init_early(void) | 31 | static inline void taskstats_init_early(void) |
diff --git a/include/linux/tick.h b/include/linux/tick.h index d2ae79e21be3..b232ccc0ee29 100644 --- a/include/linux/tick.h +++ b/include/linux/tick.h | |||
| @@ -42,6 +42,7 @@ enum tick_nohz_mode { | |||
| 42 | * @idle_waketime: Time when the idle was interrupted | 42 | * @idle_waketime: Time when the idle was interrupted |
| 43 | * @idle_exittime: Time when the idle state was left | 43 | * @idle_exittime: Time when the idle state was left |
| 44 | * @idle_sleeptime: Sum of the time slept in idle with sched tick stopped | 44 | * @idle_sleeptime: Sum of the time slept in idle with sched tick stopped |
| 45 | * @iowait_sleeptime: Sum of the time slept in idle with sched tick stopped, with IO outstanding | ||
| 45 | * @sleep_length: Duration of the current idle sleep | 46 | * @sleep_length: Duration of the current idle sleep |
| 46 | * @do_timer_lst: CPU was the last one doing do_timer before going idle | 47 | * @do_timer_lst: CPU was the last one doing do_timer before going idle |
| 47 | */ | 48 | */ |
| @@ -60,7 +61,7 @@ struct tick_sched { | |||
| 60 | ktime_t idle_waketime; | 61 | ktime_t idle_waketime; |
| 61 | ktime_t idle_exittime; | 62 | ktime_t idle_exittime; |
| 62 | ktime_t idle_sleeptime; | 63 | ktime_t idle_sleeptime; |
| 63 | ktime_t idle_lastupdate; | 64 | ktime_t iowait_sleeptime; |
| 64 | ktime_t sleep_length; | 65 | ktime_t sleep_length; |
| 65 | unsigned long last_jiffies; | 66 | unsigned long last_jiffies; |
| 66 | unsigned long next_jiffies; | 67 | unsigned long next_jiffies; |
| @@ -124,6 +125,7 @@ extern void tick_nohz_stop_sched_tick(int inidle); | |||
| 124 | extern void tick_nohz_restart_sched_tick(void); | 125 | extern void tick_nohz_restart_sched_tick(void); |
| 125 | extern ktime_t tick_nohz_get_sleep_length(void); | 126 | extern ktime_t tick_nohz_get_sleep_length(void); |
| 126 | extern u64 get_cpu_idle_time_us(int cpu, u64 *last_update_time); | 127 | extern u64 get_cpu_idle_time_us(int cpu, u64 *last_update_time); |
| 128 | extern u64 get_cpu_iowait_time_us(int cpu, u64 *last_update_time); | ||
| 127 | # else | 129 | # else |
| 128 | static inline void tick_nohz_stop_sched_tick(int inidle) { } | 130 | static inline void tick_nohz_stop_sched_tick(int inidle) { } |
| 129 | static inline void tick_nohz_restart_sched_tick(void) { } | 131 | static inline void tick_nohz_restart_sched_tick(void) { } |
| @@ -134,6 +136,7 @@ static inline ktime_t tick_nohz_get_sleep_length(void) | |||
| 134 | return len; | 136 | return len; |
| 135 | } | 137 | } |
| 136 | static inline u64 get_cpu_idle_time_us(int cpu, u64 *unused) { return -1; } | 138 | static inline u64 get_cpu_idle_time_us(int cpu, u64 *unused) { return -1; } |
| 139 | static inline u64 get_cpu_iowait_time_us(int cpu, u64 *unused) { return -1; } | ||
| 137 | # endif /* !NO_HZ */ | 140 | # endif /* !NO_HZ */ |
| 138 | 141 | ||
| 139 | #endif | 142 | #endif |
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index f59604ed0ec6..1d85f9a6a199 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h | |||
| @@ -33,6 +33,65 @@ struct tracepoint { | |||
| 33 | * Keep in sync with vmlinux.lds.h. | 33 | * Keep in sync with vmlinux.lds.h. |
| 34 | */ | 34 | */ |
| 35 | 35 | ||
| 36 | /* | ||
| 37 | * Connect a probe to a tracepoint. | ||
| 38 | * Internal API, should not be used directly. | ||
| 39 | */ | ||
| 40 | extern int tracepoint_probe_register(const char *name, void *probe); | ||
| 41 | |||
| 42 | /* | ||
| 43 | * Disconnect a probe from a tracepoint. | ||
| 44 | * Internal API, should not be used directly. | ||
| 45 | */ | ||
| 46 | extern int tracepoint_probe_unregister(const char *name, void *probe); | ||
| 47 | |||
| 48 | extern int tracepoint_probe_register_noupdate(const char *name, void *probe); | ||
| 49 | extern int tracepoint_probe_unregister_noupdate(const char *name, void *probe); | ||
| 50 | extern void tracepoint_probe_update_all(void); | ||
| 51 | |||
| 52 | struct tracepoint_iter { | ||
| 53 | struct module *module; | ||
| 54 | struct tracepoint *tracepoint; | ||
| 55 | }; | ||
| 56 | |||
| 57 | extern void tracepoint_iter_start(struct tracepoint_iter *iter); | ||
| 58 | extern void tracepoint_iter_next(struct tracepoint_iter *iter); | ||
| 59 | extern void tracepoint_iter_stop(struct tracepoint_iter *iter); | ||
| 60 | extern void tracepoint_iter_reset(struct tracepoint_iter *iter); | ||
| 61 | extern int tracepoint_get_iter_range(struct tracepoint **tracepoint, | ||
| 62 | struct tracepoint *begin, struct tracepoint *end); | ||
| 63 | |||
| 64 | /* | ||
| 65 | * tracepoint_synchronize_unregister must be called between the last tracepoint | ||
| 66 | * probe unregistration and the end of module exit to make sure there is no | ||
| 67 | * caller executing a probe when it is freed. | ||
| 68 | */ | ||
| 69 | static inline void tracepoint_synchronize_unregister(void) | ||
| 70 | { | ||
| 71 | synchronize_sched(); | ||
| 72 | } | ||
| 73 | |||
| 74 | #define PARAMS(args...) args | ||
| 75 | |||
| 76 | #ifdef CONFIG_TRACEPOINTS | ||
| 77 | extern void tracepoint_update_probe_range(struct tracepoint *begin, | ||
| 78 | struct tracepoint *end); | ||
| 79 | #else | ||
| 80 | static inline void tracepoint_update_probe_range(struct tracepoint *begin, | ||
| 81 | struct tracepoint *end) | ||
| 82 | { } | ||
| 83 | #endif /* CONFIG_TRACEPOINTS */ | ||
| 84 | |||
| 85 | #endif /* _LINUX_TRACEPOINT_H */ | ||
| 86 | |||
| 87 | /* | ||
| 88 | * Note: we keep the TRACE_EVENT and DECLARE_TRACE outside the include | ||
| 89 | * file ifdef protection. | ||
| 90 | * This is due to the way trace events work. If a file includes two | ||
| 91 | * trace event headers under one "CREATE_TRACE_POINTS" the first include | ||
| 92 | * will override the TRACE_EVENT and break the second include. | ||
| 93 | */ | ||
| 94 | |||
| 36 | #ifndef DECLARE_TRACE | 95 | #ifndef DECLARE_TRACE |
| 37 | 96 | ||
| 38 | #define TP_PROTO(args...) args | 97 | #define TP_PROTO(args...) args |
| @@ -49,7 +108,7 @@ struct tracepoint { | |||
| 49 | void **it_func; \ | 108 | void **it_func; \ |
| 50 | \ | 109 | \ |
| 51 | rcu_read_lock_sched_notrace(); \ | 110 | rcu_read_lock_sched_notrace(); \ |
| 52 | it_func = rcu_dereference((tp)->funcs); \ | 111 | it_func = rcu_dereference_sched((tp)->funcs); \ |
| 53 | if (it_func) { \ | 112 | if (it_func) { \ |
| 54 | do { \ | 113 | do { \ |
| 55 | ((void(*)(proto))(*it_func))(args); \ | 114 | ((void(*)(proto))(*it_func))(args); \ |
| @@ -96,9 +155,6 @@ struct tracepoint { | |||
| 96 | #define EXPORT_TRACEPOINT_SYMBOL(name) \ | 155 | #define EXPORT_TRACEPOINT_SYMBOL(name) \ |
| 97 | EXPORT_SYMBOL(__tracepoint_##name) | 156 | EXPORT_SYMBOL(__tracepoint_##name) |
| 98 | 157 | ||
| 99 | extern void tracepoint_update_probe_range(struct tracepoint *begin, | ||
| 100 | struct tracepoint *end); | ||
| 101 | |||
| 102 | #else /* !CONFIG_TRACEPOINTS */ | 158 | #else /* !CONFIG_TRACEPOINTS */ |
| 103 | #define DECLARE_TRACE(name, proto, args) \ | 159 | #define DECLARE_TRACE(name, proto, args) \ |
| 104 | static inline void _do_trace_##name(struct tracepoint *tp, proto) \ | 160 | static inline void _do_trace_##name(struct tracepoint *tp, proto) \ |
| @@ -119,61 +175,9 @@ extern void tracepoint_update_probe_range(struct tracepoint *begin, | |||
| 119 | #define EXPORT_TRACEPOINT_SYMBOL_GPL(name) | 175 | #define EXPORT_TRACEPOINT_SYMBOL_GPL(name) |
| 120 | #define EXPORT_TRACEPOINT_SYMBOL(name) | 176 | #define EXPORT_TRACEPOINT_SYMBOL(name) |
| 121 | 177 | ||
| 122 | static inline void tracepoint_update_probe_range(struct tracepoint *begin, | ||
| 123 | struct tracepoint *end) | ||
| 124 | { } | ||
| 125 | #endif /* CONFIG_TRACEPOINTS */ | 178 | #endif /* CONFIG_TRACEPOINTS */ |
| 126 | #endif /* DECLARE_TRACE */ | 179 | #endif /* DECLARE_TRACE */ |
| 127 | 180 | ||
| 128 | /* | ||
| 129 | * Connect a probe to a tracepoint. | ||
| 130 | * Internal API, should not be used directly. | ||
| 131 | */ | ||
| 132 | extern int tracepoint_probe_register(const char *name, void *probe); | ||
| 133 | |||
| 134 | /* | ||
| 135 | * Disconnect a probe from a tracepoint. | ||
| 136 | * Internal API, should not be used directly. | ||
| 137 | */ | ||
| 138 | extern int tracepoint_probe_unregister(const char *name, void *probe); | ||
| 139 | |||
| 140 | extern int tracepoint_probe_register_noupdate(const char *name, void *probe); | ||
| 141 | extern int tracepoint_probe_unregister_noupdate(const char *name, void *probe); | ||
| 142 | extern void tracepoint_probe_update_all(void); | ||
| 143 | |||
| 144 | struct tracepoint_iter { | ||
| 145 | struct module *module; | ||
| 146 | struct tracepoint *tracepoint; | ||
| 147 | }; | ||
| 148 | |||
| 149 | extern void tracepoint_iter_start(struct tracepoint_iter *iter); | ||
| 150 | extern void tracepoint_iter_next(struct tracepoint_iter *iter); | ||
| 151 | extern void tracepoint_iter_stop(struct tracepoint_iter *iter); | ||
| 152 | extern void tracepoint_iter_reset(struct tracepoint_iter *iter); | ||
| 153 | extern int tracepoint_get_iter_range(struct tracepoint **tracepoint, | ||
| 154 | struct tracepoint *begin, struct tracepoint *end); | ||
| 155 | |||
| 156 | /* | ||
| 157 | * tracepoint_synchronize_unregister must be called between the last tracepoint | ||
| 158 | * probe unregistration and the end of module exit to make sure there is no | ||
| 159 | * caller executing a probe when it is freed. | ||
| 160 | */ | ||
| 161 | static inline void tracepoint_synchronize_unregister(void) | ||
| 162 | { | ||
| 163 | synchronize_sched(); | ||
| 164 | } | ||
| 165 | |||
| 166 | #define PARAMS(args...) args | ||
| 167 | |||
| 168 | #endif /* _LINUX_TRACEPOINT_H */ | ||
| 169 | |||
| 170 | /* | ||
| 171 | * Note: we keep the TRACE_EVENT outside the include file ifdef protection. | ||
| 172 | * This is due to the way trace events work. If a file includes two | ||
| 173 | * trace event headers under one "CREATE_TRACE_POINTS" the first include | ||
| 174 | * will override the TRACE_EVENT and break the second include. | ||
| 175 | */ | ||
| 176 | |||
| 177 | #ifndef TRACE_EVENT | 181 | #ifndef TRACE_EVENT |
| 178 | /* | 182 | /* |
| 179 | * For use with the TRACE_EVENT macro: | 183 | * For use with the TRACE_EVENT macro: |
diff --git a/include/linux/tty.h b/include/linux/tty.h index d96e5882f129..4409967db0c4 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
| @@ -70,12 +70,13 @@ struct tty_buffer { | |||
| 70 | 70 | ||
| 71 | /* | 71 | /* |
| 72 | * We default to dicing tty buffer allocations to this many characters | 72 | * We default to dicing tty buffer allocations to this many characters |
| 73 | * in order to avoid multiple page allocations. We assume tty_buffer itself | 73 | * in order to avoid multiple page allocations. We know the size of |
| 74 | * is under 256 bytes. See tty_buffer_find for the allocation logic this | 74 | * tty_buffer itself but it must also be taken into account that the |
| 75 | * must match | 75 | * the buffer is 256 byte aligned. See tty_buffer_find for the allocation |
| 76 | * logic this must match | ||
| 76 | */ | 77 | */ |
| 77 | 78 | ||
| 78 | #define TTY_BUFFER_PAGE ((PAGE_SIZE - 256) / 2) | 79 | #define TTY_BUFFER_PAGE (((PAGE_SIZE - sizeof(struct tty_buffer)) / 2) & ~0xFF) |
| 79 | 80 | ||
| 80 | 81 | ||
| 81 | struct tty_bufhead { | 82 | struct tty_bufhead { |
| @@ -223,6 +224,7 @@ struct tty_port { | |||
| 223 | wait_queue_head_t close_wait; /* Close waiters */ | 224 | wait_queue_head_t close_wait; /* Close waiters */ |
| 224 | wait_queue_head_t delta_msr_wait; /* Modem status change */ | 225 | wait_queue_head_t delta_msr_wait; /* Modem status change */ |
| 225 | unsigned long flags; /* TTY flags ASY_*/ | 226 | unsigned long flags; /* TTY flags ASY_*/ |
| 227 | unsigned char console:1; /* port is a console */ | ||
| 226 | struct mutex mutex; /* Locking */ | 228 | struct mutex mutex; /* Locking */ |
| 227 | struct mutex buf_mutex; /* Buffer alloc lock */ | 229 | struct mutex buf_mutex; /* Buffer alloc lock */ |
| 228 | unsigned char *xmit_buf; /* Optional buffer */ | 230 | unsigned char *xmit_buf; /* Optional buffer */ |
| @@ -514,6 +516,7 @@ extern void tty_ldisc_enable(struct tty_struct *tty); | |||
| 514 | 516 | ||
| 515 | /* n_tty.c */ | 517 | /* n_tty.c */ |
| 516 | extern struct tty_ldisc_ops tty_ldisc_N_TTY; | 518 | extern struct tty_ldisc_ops tty_ldisc_N_TTY; |
| 519 | extern void n_tty_inherit_ops(struct tty_ldisc_ops *ops); | ||
| 517 | 520 | ||
| 518 | /* tty_audit.c */ | 521 | /* tty_audit.c */ |
| 519 | #ifdef CONFIG_AUDIT | 522 | #ifdef CONFIG_AUDIT |
diff --git a/include/linux/tty_ldisc.h b/include/linux/tty_ldisc.h index 0c4ee9b88f85..526d66f066a3 100644 --- a/include/linux/tty_ldisc.h +++ b/include/linux/tty_ldisc.h | |||
| @@ -99,6 +99,12 @@ | |||
| 99 | * cease I/O to the tty driver. Can sleep. The driver should | 99 | * cease I/O to the tty driver. Can sleep. The driver should |
| 100 | * seek to perform this action quickly but should wait until | 100 | * seek to perform this action quickly but should wait until |
| 101 | * any pending driver I/O is completed. | 101 | * any pending driver I/O is completed. |
| 102 | * | ||
| 103 | * void (*dcd_change)(struct tty_struct *tty, unsigned int status, | ||
| 104 | * struct timespec *ts) | ||
| 105 | * | ||
| 106 | * Tells the discipline that the DCD pin has changed its status and | ||
| 107 | * the relative timestamp. Pointer ts can be NULL. | ||
| 102 | */ | 108 | */ |
| 103 | 109 | ||
| 104 | #include <linux/fs.h> | 110 | #include <linux/fs.h> |
| @@ -136,6 +142,8 @@ struct tty_ldisc_ops { | |||
| 136 | void (*receive_buf)(struct tty_struct *, const unsigned char *cp, | 142 | void (*receive_buf)(struct tty_struct *, const unsigned char *cp, |
| 137 | char *fp, int count); | 143 | char *fp, int count); |
| 138 | void (*write_wakeup)(struct tty_struct *); | 144 | void (*write_wakeup)(struct tty_struct *); |
| 145 | void (*dcd_change)(struct tty_struct *, unsigned int, | ||
| 146 | struct timespec *); | ||
| 139 | 147 | ||
| 140 | struct module *owner; | 148 | struct module *owner; |
| 141 | 149 | ||
diff --git a/include/linux/types.h b/include/linux/types.h index c42724f8c802..23d237a075e2 100644 --- a/include/linux/types.h +++ b/include/linux/types.h | |||
| @@ -188,12 +188,12 @@ typedef u32 phys_addr_t; | |||
| 188 | typedef phys_addr_t resource_size_t; | 188 | typedef phys_addr_t resource_size_t; |
| 189 | 189 | ||
| 190 | typedef struct { | 190 | typedef struct { |
| 191 | volatile int counter; | 191 | int counter; |
| 192 | } atomic_t; | 192 | } atomic_t; |
| 193 | 193 | ||
| 194 | #ifdef CONFIG_64BIT | 194 | #ifdef CONFIG_64BIT |
| 195 | typedef struct { | 195 | typedef struct { |
| 196 | volatile long counter; | 196 | long counter; |
| 197 | } atomic64_t; | 197 | } atomic64_t; |
| 198 | #endif | 198 | #endif |
| 199 | 199 | ||
diff --git a/include/linux/usb.h b/include/linux/usb.h index 8c9f053111bb..739f1fd1cc15 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
| @@ -1055,7 +1055,8 @@ typedef void (*usb_complete_t)(struct urb *); | |||
| 1055 | * @number_of_packets: Lists the number of ISO transfer buffers. | 1055 | * @number_of_packets: Lists the number of ISO transfer buffers. |
| 1056 | * @interval: Specifies the polling interval for interrupt or isochronous | 1056 | * @interval: Specifies the polling interval for interrupt or isochronous |
| 1057 | * transfers. The units are frames (milliseconds) for full and low | 1057 | * transfers. The units are frames (milliseconds) for full and low |
| 1058 | * speed devices, and microframes (1/8 millisecond) for highspeed ones. | 1058 | * speed devices, and microframes (1/8 millisecond) for highspeed |
| 1059 | * and SuperSpeed devices. | ||
| 1059 | * @error_count: Returns the number of ISO transfers that reported errors. | 1060 | * @error_count: Returns the number of ISO transfers that reported errors. |
| 1060 | * @context: For use in completion functions. This normally points to | 1061 | * @context: For use in completion functions. This normally points to |
| 1061 | * request-specific driver context. | 1062 | * request-specific driver context. |
| @@ -1084,7 +1085,7 @@ typedef void (*usb_complete_t)(struct urb *); | |||
| 1084 | * Alternatively, drivers may pass the URB_NO_xxx_DMA_MAP transfer flags, | 1085 | * Alternatively, drivers may pass the URB_NO_xxx_DMA_MAP transfer flags, |
| 1085 | * which tell the host controller driver that no such mapping is needed since | 1086 | * which tell the host controller driver that no such mapping is needed since |
| 1086 | * the device driver is DMA-aware. For example, a device driver might | 1087 | * the device driver is DMA-aware. For example, a device driver might |
| 1087 | * allocate a DMA buffer with usb_buffer_alloc() or call usb_buffer_map(). | 1088 | * allocate a DMA buffer with usb_alloc_coherent() or call usb_buffer_map(). |
| 1088 | * When these transfer flags are provided, host controller drivers will | 1089 | * When these transfer flags are provided, host controller drivers will |
| 1089 | * attempt to use the dma addresses found in the transfer_dma and/or | 1090 | * attempt to use the dma addresses found in the transfer_dma and/or |
| 1090 | * setup_dma fields rather than determining a dma address themselves. | 1091 | * setup_dma fields rather than determining a dma address themselves. |
| @@ -1286,9 +1287,16 @@ static inline void usb_fill_bulk_urb(struct urb *urb, | |||
| 1286 | * | 1287 | * |
| 1287 | * Initializes a interrupt urb with the proper information needed to submit | 1288 | * Initializes a interrupt urb with the proper information needed to submit |
| 1288 | * it to a device. | 1289 | * it to a device. |
| 1289 | * Note that high speed interrupt endpoints use a logarithmic encoding of | 1290 | * |
| 1290 | * the endpoint interval, and express polling intervals in microframes | 1291 | * Note that High Speed and SuperSpeed interrupt endpoints use a logarithmic |
| 1291 | * (eight per millisecond) rather than in frames (one per millisecond). | 1292 | * encoding of the endpoint interval, and express polling intervals in |
| 1293 | * microframes (eight per millisecond) rather than in frames (one per | ||
| 1294 | * millisecond). | ||
| 1295 | * | ||
| 1296 | * Wireless USB also uses the logarithmic encoding, but specifies it in units of | ||
| 1297 | * 128us instead of 125us. For Wireless USB devices, the interval is passed | ||
| 1298 | * through to the host controller, rather than being translated into microframe | ||
| 1299 | * units. | ||
| 1292 | */ | 1300 | */ |
| 1293 | static inline void usb_fill_int_urb(struct urb *urb, | 1301 | static inline void usb_fill_int_urb(struct urb *urb, |
| 1294 | struct usb_device *dev, | 1302 | struct usb_device *dev, |
| @@ -1305,7 +1313,7 @@ static inline void usb_fill_int_urb(struct urb *urb, | |||
| 1305 | urb->transfer_buffer_length = buffer_length; | 1313 | urb->transfer_buffer_length = buffer_length; |
| 1306 | urb->complete = complete_fn; | 1314 | urb->complete = complete_fn; |
| 1307 | urb->context = context; | 1315 | urb->context = context; |
| 1308 | if (dev->speed == USB_SPEED_HIGH) | 1316 | if (dev->speed == USB_SPEED_HIGH || dev->speed == USB_SPEED_SUPER) |
| 1309 | urb->interval = 1 << (interval - 1); | 1317 | urb->interval = 1 << (interval - 1); |
| 1310 | else | 1318 | else |
| 1311 | urb->interval = interval; | 1319 | urb->interval = interval; |
| @@ -1358,11 +1366,23 @@ static inline int usb_urb_dir_out(struct urb *urb) | |||
| 1358 | return (urb->transfer_flags & URB_DIR_MASK) == URB_DIR_OUT; | 1366 | return (urb->transfer_flags & URB_DIR_MASK) == URB_DIR_OUT; |
| 1359 | } | 1367 | } |
| 1360 | 1368 | ||
| 1361 | void *usb_buffer_alloc(struct usb_device *dev, size_t size, | 1369 | void *usb_alloc_coherent(struct usb_device *dev, size_t size, |
| 1362 | gfp_t mem_flags, dma_addr_t *dma); | 1370 | gfp_t mem_flags, dma_addr_t *dma); |
| 1363 | void usb_buffer_free(struct usb_device *dev, size_t size, | 1371 | void usb_free_coherent(struct usb_device *dev, size_t size, |
| 1364 | void *addr, dma_addr_t dma); | 1372 | void *addr, dma_addr_t dma); |
| 1365 | 1373 | ||
| 1374 | /* Compatible macros while we switch over */ | ||
| 1375 | static inline void *usb_buffer_alloc(struct usb_device *dev, size_t size, | ||
| 1376 | gfp_t mem_flags, dma_addr_t *dma) | ||
| 1377 | { | ||
| 1378 | return usb_alloc_coherent(dev, size, mem_flags, dma); | ||
| 1379 | } | ||
| 1380 | static inline void usb_buffer_free(struct usb_device *dev, size_t size, | ||
| 1381 | void *addr, dma_addr_t dma) | ||
| 1382 | { | ||
| 1383 | return usb_free_coherent(dev, size, addr, dma); | ||
| 1384 | } | ||
| 1385 | |||
| 1366 | #if 0 | 1386 | #if 0 |
| 1367 | struct urb *usb_buffer_map(struct urb *urb); | 1387 | struct urb *usb_buffer_map(struct urb *urb); |
| 1368 | void usb_buffer_dmasync(struct urb *urb); | 1388 | void usb_buffer_dmasync(struct urb *urb); |
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index bbf45d500b6d..f4b7ca516cdd 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h | |||
| @@ -15,6 +15,8 @@ | |||
| 15 | #ifndef __LINUX_USB_GADGET_H | 15 | #ifndef __LINUX_USB_GADGET_H |
| 16 | #define __LINUX_USB_GADGET_H | 16 | #define __LINUX_USB_GADGET_H |
| 17 | 17 | ||
| 18 | #include <linux/slab.h> | ||
| 19 | |||
| 18 | struct usb_ep; | 20 | struct usb_ep; |
| 19 | 21 | ||
| 20 | /** | 22 | /** |
diff --git a/include/linux/virtio.h b/include/linux/virtio.h index f508c651e53d..40d1709bdbf4 100644 --- a/include/linux/virtio.h +++ b/include/linux/virtio.h | |||
| @@ -98,6 +98,7 @@ struct virtio_device { | |||
| 98 | void *priv; | 98 | void *priv; |
| 99 | }; | 99 | }; |
| 100 | 100 | ||
| 101 | #define dev_to_virtio(dev) container_of(dev, struct virtio_device, dev) | ||
| 101 | int register_virtio_device(struct virtio_device *dev); | 102 | int register_virtio_device(struct virtio_device *dev); |
| 102 | void unregister_virtio_device(struct virtio_device *dev); | 103 | void unregister_virtio_device(struct virtio_device *dev); |
| 103 | 104 | ||
diff --git a/include/linux/virtio_9p.h b/include/linux/virtio_9p.h index 332275080083..5cf11765146b 100644 --- a/include/linux/virtio_9p.h +++ b/include/linux/virtio_9p.h | |||
| @@ -5,4 +5,16 @@ | |||
| 5 | #include <linux/virtio_ids.h> | 5 | #include <linux/virtio_ids.h> |
| 6 | #include <linux/virtio_config.h> | 6 | #include <linux/virtio_config.h> |
| 7 | 7 | ||
| 8 | /* The feature bitmap for virtio 9P */ | ||
| 9 | |||
| 10 | /* The mount point is specified in a config variable */ | ||
| 11 | #define VIRTIO_9P_MOUNT_TAG 0 | ||
| 12 | |||
| 13 | struct virtio_9p_config { | ||
| 14 | /* length of the tag name */ | ||
| 15 | __u16 tag_len; | ||
| 16 | /* non-NULL terminated tag name */ | ||
| 17 | __u8 tag[0]; | ||
| 18 | } __attribute__((packed)); | ||
| 19 | |||
| 8 | #endif /* _LINUX_VIRTIO_9P_H */ | 20 | #endif /* _LINUX_VIRTIO_9P_H */ |
diff --git a/include/linux/virtio_console.h b/include/linux/virtio_console.h index ae4f039515b4..92228a8fbcbc 100644 --- a/include/linux/virtio_console.h +++ b/include/linux/virtio_console.h | |||
| @@ -12,37 +12,14 @@ | |||
| 12 | 12 | ||
| 13 | /* Feature bits */ | 13 | /* Feature bits */ |
| 14 | #define VIRTIO_CONSOLE_F_SIZE 0 /* Does host provide console size? */ | 14 | #define VIRTIO_CONSOLE_F_SIZE 0 /* Does host provide console size? */ |
| 15 | #define VIRTIO_CONSOLE_F_MULTIPORT 1 /* Does host provide multiple ports? */ | ||
| 16 | 15 | ||
| 17 | struct virtio_console_config { | 16 | struct virtio_console_config { |
| 18 | /* colums of the screens */ | 17 | /* colums of the screens */ |
| 19 | __u16 cols; | 18 | __u16 cols; |
| 20 | /* rows of the screens */ | 19 | /* rows of the screens */ |
| 21 | __u16 rows; | 20 | __u16 rows; |
| 22 | /* max. number of ports this device can hold */ | ||
| 23 | __u32 max_nr_ports; | ||
| 24 | /* number of ports added so far */ | ||
| 25 | __u32 nr_ports; | ||
| 26 | } __attribute__((packed)); | 21 | } __attribute__((packed)); |
| 27 | 22 | ||
| 28 | /* | ||
| 29 | * A message that's passed between the Host and the Guest for a | ||
| 30 | * particular port. | ||
| 31 | */ | ||
| 32 | struct virtio_console_control { | ||
| 33 | __u32 id; /* Port number */ | ||
| 34 | __u16 event; /* The kind of control event (see below) */ | ||
| 35 | __u16 value; /* Extra information for the key */ | ||
| 36 | }; | ||
| 37 | |||
| 38 | /* Some events for control messages */ | ||
| 39 | #define VIRTIO_CONSOLE_PORT_READY 0 | ||
| 40 | #define VIRTIO_CONSOLE_CONSOLE_PORT 1 | ||
| 41 | #define VIRTIO_CONSOLE_RESIZE 2 | ||
| 42 | #define VIRTIO_CONSOLE_PORT_OPEN 3 | ||
| 43 | #define VIRTIO_CONSOLE_PORT_NAME 4 | ||
| 44 | #define VIRTIO_CONSOLE_PORT_REMOVE 5 | ||
| 45 | |||
| 46 | #ifdef __KERNEL__ | 23 | #ifdef __KERNEL__ |
| 47 | int __init virtio_cons_early_init(int (*put_chars)(u32, const char *, int)); | 24 | int __init virtio_cons_early_init(int (*put_chars)(u32, const char *, int)); |
| 48 | #endif /* __KERNEL__ */ | 25 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/vt.h b/include/linux/vt.h index 778b7b2a47d4..d5dd0bc408fd 100644 --- a/include/linux/vt.h +++ b/include/linux/vt.h | |||
| @@ -27,7 +27,7 @@ struct vt_mode { | |||
| 27 | #define VT_SETMODE 0x5602 /* set mode of active vt */ | 27 | #define VT_SETMODE 0x5602 /* set mode of active vt */ |
| 28 | #define VT_AUTO 0x00 /* auto vt switching */ | 28 | #define VT_AUTO 0x00 /* auto vt switching */ |
| 29 | #define VT_PROCESS 0x01 /* process controls switching */ | 29 | #define VT_PROCESS 0x01 /* process controls switching */ |
| 30 | #define VT_PROCESS_AUTO 0x02 /* process is notified of switching */ | 30 | #define VT_ACKACQ 0x02 /* acknowledge switch */ |
| 31 | 31 | ||
| 32 | struct vt_stat { | 32 | struct vt_stat { |
| 33 | unsigned short v_active; /* active vt */ | 33 | unsigned short v_active; /* active vt */ |
| @@ -38,7 +38,6 @@ struct vt_stat { | |||
| 38 | #define VT_SENDSIG 0x5604 /* signal to send to bitmask of vts */ | 38 | #define VT_SENDSIG 0x5604 /* signal to send to bitmask of vts */ |
| 39 | 39 | ||
| 40 | #define VT_RELDISP 0x5605 /* release display */ | 40 | #define VT_RELDISP 0x5605 /* release display */ |
| 41 | #define VT_ACKACQ 0x02 /* acknowledge switch */ | ||
| 42 | 41 | ||
| 43 | #define VT_ACTIVATE 0x5606 /* make vt active */ | 42 | #define VT_ACTIVATE 0x5606 /* make vt active */ |
| 44 | #define VT_WAITACTIVE 0x5607 /* wait for vt active */ | 43 | #define VT_WAITACTIVE 0x5607 /* wait for vt active */ |
diff --git a/include/linux/wait.h b/include/linux/wait.h index a48e16b77d5e..76d96d035ea0 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h | |||
| @@ -127,12 +127,26 @@ static inline void __add_wait_queue(wait_queue_head_t *head, wait_queue_t *new) | |||
| 127 | /* | 127 | /* |
| 128 | * Used for wake-one threads: | 128 | * Used for wake-one threads: |
| 129 | */ | 129 | */ |
| 130 | static inline void __add_wait_queue_exclusive(wait_queue_head_t *q, | ||
| 131 | wait_queue_t *wait) | ||
| 132 | { | ||
| 133 | wait->flags |= WQ_FLAG_EXCLUSIVE; | ||
| 134 | __add_wait_queue(q, wait); | ||
| 135 | } | ||
| 136 | |||
| 130 | static inline void __add_wait_queue_tail(wait_queue_head_t *head, | 137 | static inline void __add_wait_queue_tail(wait_queue_head_t *head, |
| 131 | wait_queue_t *new) | 138 | wait_queue_t *new) |
| 132 | { | 139 | { |
| 133 | list_add_tail(&new->task_list, &head->task_list); | 140 | list_add_tail(&new->task_list, &head->task_list); |
| 134 | } | 141 | } |
| 135 | 142 | ||
| 143 | static inline void __add_wait_queue_tail_exclusive(wait_queue_head_t *q, | ||
| 144 | wait_queue_t *wait) | ||
| 145 | { | ||
| 146 | wait->flags |= WQ_FLAG_EXCLUSIVE; | ||
| 147 | __add_wait_queue_tail(q, wait); | ||
| 148 | } | ||
| 149 | |||
| 136 | static inline void __remove_wait_queue(wait_queue_head_t *head, | 150 | static inline void __remove_wait_queue(wait_queue_head_t *head, |
| 137 | wait_queue_t *old) | 151 | wait_queue_t *old) |
| 138 | { | 152 | { |
| @@ -404,25 +418,6 @@ do { \ | |||
| 404 | }) | 418 | }) |
| 405 | 419 | ||
| 406 | /* | 420 | /* |
| 407 | * Must be called with the spinlock in the wait_queue_head_t held. | ||
| 408 | */ | ||
| 409 | static inline void add_wait_queue_exclusive_locked(wait_queue_head_t *q, | ||
| 410 | wait_queue_t * wait) | ||
| 411 | { | ||
| 412 | wait->flags |= WQ_FLAG_EXCLUSIVE; | ||
| 413 | __add_wait_queue_tail(q, wait); | ||
| 414 | } | ||
| 415 | |||
| 416 | /* | ||
| 417 | * Must be called with the spinlock in the wait_queue_head_t held. | ||
| 418 | */ | ||
| 419 | static inline void remove_wait_queue_locked(wait_queue_head_t *q, | ||
| 420 | wait_queue_t * wait) | ||
| 421 | { | ||
| 422 | __remove_wait_queue(q, wait); | ||
| 423 | } | ||
| 424 | |||
| 425 | /* | ||
| 426 | * These are the old interfaces to sleep waiting for an event. | 421 | * These are the old interfaces to sleep waiting for an event. |
| 427 | * They are racy. DO NOT use them, use the wait_event* interfaces above. | 422 | * They are racy. DO NOT use them, use the wait_event* interfaces above. |
| 428 | * We plan to remove these interfaces. | 423 | * We plan to remove these interfaces. |
diff --git a/include/linux/wimax/debug.h b/include/linux/wimax/debug.h index db8096e88533..57031b4d12f2 100644 --- a/include/linux/wimax/debug.h +++ b/include/linux/wimax/debug.h | |||
| @@ -155,6 +155,7 @@ | |||
| 155 | 155 | ||
| 156 | #include <linux/types.h> | 156 | #include <linux/types.h> |
| 157 | #include <linux/device.h> | 157 | #include <linux/device.h> |
| 158 | #include <linux/slab.h> | ||
| 158 | 159 | ||
| 159 | 160 | ||
| 160 | /* Backend stuff */ | 161 | /* Backend stuff */ |
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 76e8903cd204..36520ded3e06 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
| @@ -34,6 +34,9 @@ struct writeback_control { | |||
| 34 | enum writeback_sync_modes sync_mode; | 34 | enum writeback_sync_modes sync_mode; |
| 35 | unsigned long *older_than_this; /* If !NULL, only write back inodes | 35 | unsigned long *older_than_this; /* If !NULL, only write back inodes |
| 36 | older than this */ | 36 | older than this */ |
| 37 | unsigned long wb_start; /* Time writeback_inodes_wb was | ||
| 38 | called. This is needed to avoid | ||
| 39 | extra jobs and livelock */ | ||
| 37 | long nr_to_write; /* Write this many pages, and decrement | 40 | long nr_to_write; /* Write this many pages, and decrement |
| 38 | this for each page written */ | 41 | this for each page written */ |
| 39 | long pages_skipped; /* Pages which were not written */ | 42 | long pages_skipped; /* Pages which were not written */ |
diff --git a/include/linux/zorro.h b/include/linux/zorro.h index 913bfc226dda..7bf9db525e9e 100644 --- a/include/linux/zorro.h +++ b/include/linux/zorro.h | |||
| @@ -38,8 +38,6 @@ | |||
| 38 | typedef __u32 zorro_id; | 38 | typedef __u32 zorro_id; |
| 39 | 39 | ||
| 40 | 40 | ||
| 41 | #define ZORRO_WILDCARD (0xffffffff) /* not official */ | ||
| 42 | |||
| 43 | /* Include the ID list */ | 41 | /* Include the ID list */ |
| 44 | #include <linux/zorro_ids.h> | 42 | #include <linux/zorro_ids.h> |
| 45 | 43 | ||
| @@ -116,6 +114,7 @@ struct ConfigDev { | |||
| 116 | 114 | ||
| 117 | #include <linux/init.h> | 115 | #include <linux/init.h> |
| 118 | #include <linux/ioport.h> | 116 | #include <linux/ioport.h> |
| 117 | #include <linux/mod_devicetable.h> | ||
| 119 | 118 | ||
| 120 | #include <asm/zorro.h> | 119 | #include <asm/zorro.h> |
| 121 | 120 | ||
| @@ -142,29 +141,10 @@ struct zorro_dev { | |||
| 142 | * Zorro bus | 141 | * Zorro bus |
| 143 | */ | 142 | */ |
| 144 | 143 | ||
| 145 | struct zorro_bus { | ||
| 146 | struct list_head devices; /* list of devices on this bus */ | ||
| 147 | unsigned int num_resources; /* number of resources */ | ||
| 148 | struct resource resources[4]; /* address space routed to this bus */ | ||
| 149 | struct device dev; | ||
| 150 | char name[10]; | ||
| 151 | }; | ||
| 152 | |||
| 153 | extern struct zorro_bus zorro_bus; /* single Zorro bus */ | ||
| 154 | extern struct bus_type zorro_bus_type; | 144 | extern struct bus_type zorro_bus_type; |
| 155 | 145 | ||
| 156 | 146 | ||
| 157 | /* | 147 | /* |
| 158 | * Zorro device IDs | ||
| 159 | */ | ||
| 160 | |||
| 161 | struct zorro_device_id { | ||
| 162 | zorro_id id; /* Device ID or ZORRO_WILDCARD */ | ||
| 163 | unsigned long driver_data; /* Data private to the driver */ | ||
| 164 | }; | ||
| 165 | |||
| 166 | |||
| 167 | /* | ||
| 168 | * Zorro device drivers | 148 | * Zorro device drivers |
| 169 | */ | 149 | */ |
| 170 | 150 | ||
