diff options
| author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-08-03 20:26:03 -0400 |
|---|---|---|
| committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-08-03 20:26:03 -0400 |
| commit | 412a4ac5e9cf7fdeb6af562c25547a9b9da7674f (patch) | |
| tree | a8ce13cbc9c47c99799e5e3e3ad26ba78274ee73 /include/linux | |
| parent | e8e5c2155b0035b6e04f29be67f6444bc914005b (diff) | |
| parent | 0c2daaafcdec726e89cbccca61d576de8429c537 (diff) | |
Merge commit 'gcl/next' into next
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/fb.h | 2 | ||||
| -rw-r--r-- | include/linux/fdtable.h | 3 | ||||
| -rw-r--r-- | include/linux/fsl-diu-fb.h | 223 | ||||
| -rw-r--r-- | include/linux/i8042.h | 12 | ||||
| -rw-r--r-- | include/linux/jbd2.h | 11 | ||||
| -rw-r--r-- | include/linux/lmb.h | 89 | ||||
| -rw-r--r-- | include/linux/memblock.h | 89 | ||||
| -rw-r--r-- | include/linux/mm.h | 2 | ||||
| -rw-r--r-- | include/linux/pci.h | 1 | ||||
| -rw-r--r-- | include/linux/syscalls.h | 6 | ||||
| -rw-r--r-- | include/linux/sysrq.h | 1 | ||||
| -rw-r--r-- | include/linux/vgaarb.h | 1 |
12 files changed, 336 insertions, 104 deletions
diff --git a/include/linux/fb.h b/include/linux/fb.h index 8e5a9dfb76bf..e7445df44d6c 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
| @@ -873,6 +873,8 @@ struct fb_info { | |||
| 873 | static inline struct apertures_struct *alloc_apertures(unsigned int max_num) { | 873 | static inline struct apertures_struct *alloc_apertures(unsigned int max_num) { |
| 874 | struct apertures_struct *a = kzalloc(sizeof(struct apertures_struct) | 874 | struct apertures_struct *a = kzalloc(sizeof(struct apertures_struct) |
| 875 | + max_num * sizeof(struct aperture), GFP_KERNEL); | 875 | + max_num * sizeof(struct aperture), GFP_KERNEL); |
| 876 | if (!a) | ||
| 877 | return NULL; | ||
| 876 | a->count = max_num; | 878 | a->count = max_num; |
| 877 | return a; | 879 | return a; |
| 878 | } | 880 | } |
diff --git a/include/linux/fdtable.h b/include/linux/fdtable.h index 013dc529e95f..d147461bc271 100644 --- a/include/linux/fdtable.h +++ b/include/linux/fdtable.h | |||
| @@ -61,7 +61,8 @@ struct files_struct { | |||
| 61 | (rcu_dereference_check((fdtfd), \ | 61 | (rcu_dereference_check((fdtfd), \ |
| 62 | rcu_read_lock_held() || \ | 62 | rcu_read_lock_held() || \ |
| 63 | lockdep_is_held(&(files)->file_lock) || \ | 63 | lockdep_is_held(&(files)->file_lock) || \ |
| 64 | atomic_read(&(files)->count) == 1)) | 64 | atomic_read(&(files)->count) == 1 || \ |
| 65 | rcu_my_thread_group_empty())) | ||
| 65 | 66 | ||
| 66 | #define files_fdtable(files) \ | 67 | #define files_fdtable(files) \ |
| 67 | (rcu_dereference_check_fdtable((files), (files)->fdt)) | 68 | (rcu_dereference_check_fdtable((files), (files)->fdt)) |
diff --git a/include/linux/fsl-diu-fb.h b/include/linux/fsl-diu-fb.h new file mode 100644 index 000000000000..fc295d7ea463 --- /dev/null +++ b/include/linux/fsl-diu-fb.h | |||
| @@ -0,0 +1,223 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2008 Freescale Semiconductor, Inc. All Rights Reserved. | ||
| 3 | * | ||
| 4 | * Freescale DIU Frame Buffer device driver | ||
| 5 | * | ||
| 6 | * Authors: Hongjun Chen <hong-jun.chen@freescale.com> | ||
| 7 | * Paul Widmer <paul.widmer@freescale.com> | ||
| 8 | * Srikanth Srinivasan <srikanth.srinivasan@freescale.com> | ||
| 9 | * York Sun <yorksun@freescale.com> | ||
| 10 | * | ||
| 11 | * Based on imxfb.c Copyright (C) 2004 S.Hauer, Pengutronix | ||
| 12 | * | ||
| 13 | * This program is free software; you can redistribute it and/or modify it | ||
| 14 | * under the terms of the GNU General Public License as published by the | ||
| 15 | * Free Software Foundation; either version 2 of the License, or (at your | ||
| 16 | * option) any later version. | ||
| 17 | * | ||
| 18 | */ | ||
| 19 | |||
| 20 | #ifndef __FSL_DIU_FB_H__ | ||
| 21 | #define __FSL_DIU_FB_H__ | ||
| 22 | |||
| 23 | /* Arbitrary threshold to determine the allocation method | ||
| 24 | * See mpc8610fb_set_par(), map_video_memory(), and unmap_video_memory() | ||
| 25 | */ | ||
| 26 | #define MEM_ALLOC_THRESHOLD (1024*768*4+32) | ||
| 27 | /* Minimum value that the pixel clock can be set to in pico seconds | ||
| 28 | * This is determined by platform clock/3 where the minimum platform | ||
| 29 | * clock is 533MHz. This gives 5629 pico seconds. | ||
| 30 | */ | ||
| 31 | #define MIN_PIX_CLK 5629 | ||
| 32 | #define MAX_PIX_CLK 96096 | ||
| 33 | |||
| 34 | #include <linux/types.h> | ||
| 35 | |||
| 36 | struct mfb_alpha { | ||
| 37 | int enable; | ||
| 38 | int alpha; | ||
| 39 | }; | ||
| 40 | |||
| 41 | struct mfb_chroma_key { | ||
| 42 | int enable; | ||
| 43 | __u8 red_max; | ||
| 44 | __u8 green_max; | ||
| 45 | __u8 blue_max; | ||
| 46 | __u8 red_min; | ||
| 47 | __u8 green_min; | ||
| 48 | __u8 blue_min; | ||
| 49 | }; | ||
| 50 | |||
| 51 | struct aoi_display_offset { | ||
| 52 | int x_aoi_d; | ||
| 53 | int y_aoi_d; | ||
| 54 | }; | ||
| 55 | |||
| 56 | #define MFB_SET_CHROMA_KEY _IOW('M', 1, struct mfb_chroma_key) | ||
| 57 | #define MFB_WAIT_FOR_VSYNC _IOW('F', 0x20, u_int32_t) | ||
| 58 | #define MFB_SET_BRIGHTNESS _IOW('M', 3, __u8) | ||
| 59 | |||
| 60 | #define MFB_SET_ALPHA 0x80014d00 | ||
| 61 | #define MFB_GET_ALPHA 0x40014d00 | ||
| 62 | #define MFB_SET_AOID 0x80084d04 | ||
| 63 | #define MFB_GET_AOID 0x40084d04 | ||
| 64 | #define MFB_SET_PIXFMT 0x80014d08 | ||
| 65 | #define MFB_GET_PIXFMT 0x40014d08 | ||
| 66 | |||
| 67 | #define FBIOGET_GWINFO 0x46E0 | ||
| 68 | #define FBIOPUT_GWINFO 0x46E1 | ||
| 69 | |||
| 70 | #ifdef __KERNEL__ | ||
| 71 | #include <linux/spinlock.h> | ||
| 72 | |||
| 73 | /* | ||
| 74 | * These are the fields of area descriptor(in DDR memory) for every plane | ||
| 75 | */ | ||
| 76 | struct diu_ad { | ||
| 77 | /* Word 0(32-bit) in DDR memory */ | ||
| 78 | /* __u16 comp; */ | ||
| 79 | /* __u16 pixel_s:2; */ | ||
| 80 | /* __u16 pallete:1; */ | ||
| 81 | /* __u16 red_c:2; */ | ||
| 82 | /* __u16 green_c:2; */ | ||
| 83 | /* __u16 blue_c:2; */ | ||
| 84 | /* __u16 alpha_c:3; */ | ||
| 85 | /* __u16 byte_f:1; */ | ||
| 86 | /* __u16 res0:3; */ | ||
| 87 | |||
| 88 | __be32 pix_fmt; /* hard coding pixel format */ | ||
| 89 | |||
| 90 | /* Word 1(32-bit) in DDR memory */ | ||
| 91 | __le32 addr; | ||
| 92 | |||
| 93 | /* Word 2(32-bit) in DDR memory */ | ||
| 94 | /* __u32 delta_xs:11; */ | ||
| 95 | /* __u32 res1:1; */ | ||
| 96 | /* __u32 delta_ys:11; */ | ||
| 97 | /* __u32 res2:1; */ | ||
| 98 | /* __u32 g_alpha:8; */ | ||
| 99 | __le32 src_size_g_alpha; | ||
| 100 | |||
| 101 | /* Word 3(32-bit) in DDR memory */ | ||
| 102 | /* __u32 delta_xi:11; */ | ||
| 103 | /* __u32 res3:5; */ | ||
| 104 | /* __u32 delta_yi:11; */ | ||
| 105 | /* __u32 res4:3; */ | ||
| 106 | /* __u32 flip:2; */ | ||
| 107 | __le32 aoi_size; | ||
| 108 | |||
| 109 | /* Word 4(32-bit) in DDR memory */ | ||
| 110 | /*__u32 offset_xi:11; | ||
| 111 | __u32 res5:5; | ||
| 112 | __u32 offset_yi:11; | ||
| 113 | __u32 res6:5; | ||
| 114 | */ | ||
| 115 | __le32 offset_xyi; | ||
| 116 | |||
| 117 | /* Word 5(32-bit) in DDR memory */ | ||
| 118 | /*__u32 offset_xd:11; | ||
| 119 | __u32 res7:5; | ||
| 120 | __u32 offset_yd:11; | ||
| 121 | __u32 res8:5; */ | ||
| 122 | __le32 offset_xyd; | ||
| 123 | |||
| 124 | |||
| 125 | /* Word 6(32-bit) in DDR memory */ | ||
| 126 | __u8 ckmax_r; | ||
| 127 | __u8 ckmax_g; | ||
| 128 | __u8 ckmax_b; | ||
| 129 | __u8 res9; | ||
| 130 | |||
| 131 | /* Word 7(32-bit) in DDR memory */ | ||
| 132 | __u8 ckmin_r; | ||
| 133 | __u8 ckmin_g; | ||
| 134 | __u8 ckmin_b; | ||
| 135 | __u8 res10; | ||
| 136 | /* __u32 res10:8; */ | ||
| 137 | |||
| 138 | /* Word 8(32-bit) in DDR memory */ | ||
| 139 | __le32 next_ad; | ||
| 140 | |||
| 141 | /* Word 9(32-bit) in DDR memory, just for 64-bit aligned */ | ||
| 142 | __u32 paddr; | ||
| 143 | } __attribute__ ((packed)); | ||
| 144 | |||
| 145 | /* DIU register map */ | ||
| 146 | struct diu { | ||
| 147 | __be32 desc[3]; | ||
| 148 | __be32 gamma; | ||
| 149 | __be32 pallete; | ||
| 150 | __be32 cursor; | ||
| 151 | __be32 curs_pos; | ||
| 152 | __be32 diu_mode; | ||
| 153 | __be32 bgnd; | ||
| 154 | __be32 bgnd_wb; | ||
| 155 | __be32 disp_size; | ||
| 156 | __be32 wb_size; | ||
| 157 | __be32 wb_mem_addr; | ||
| 158 | __be32 hsyn_para; | ||
| 159 | __be32 vsyn_para; | ||
| 160 | __be32 syn_pol; | ||
| 161 | __be32 thresholds; | ||
| 162 | __be32 int_status; | ||
| 163 | __be32 int_mask; | ||
| 164 | __be32 colorbar[8]; | ||
| 165 | __be32 filling; | ||
| 166 | __be32 plut; | ||
| 167 | } __attribute__ ((packed)); | ||
| 168 | |||
| 169 | struct diu_hw { | ||
| 170 | struct diu *diu_reg; | ||
| 171 | spinlock_t reg_lock; | ||
| 172 | |||
| 173 | __u32 mode; /* DIU operation mode */ | ||
| 174 | }; | ||
| 175 | |||
| 176 | struct diu_addr { | ||
| 177 | __u8 __iomem *vaddr; /* Virtual address */ | ||
| 178 | dma_addr_t paddr; /* Physical address */ | ||
| 179 | __u32 offset; | ||
| 180 | }; | ||
| 181 | |||
| 182 | struct diu_pool { | ||
| 183 | struct diu_addr ad; | ||
| 184 | struct diu_addr gamma; | ||
| 185 | struct diu_addr pallete; | ||
| 186 | struct diu_addr cursor; | ||
| 187 | }; | ||
| 188 | |||
| 189 | #define FSL_DIU_BASE_OFFSET 0x2C000 /* Offset of DIU */ | ||
| 190 | #define INT_LCDC 64 /* DIU interrupt number */ | ||
| 191 | |||
| 192 | #define FSL_AOI_NUM 6 /* 5 AOIs and one dummy AOI */ | ||
| 193 | /* 1 for plane 0, 2 for plane 1&2 each */ | ||
| 194 | |||
| 195 | /* Minimum X and Y resolutions */ | ||
| 196 | #define MIN_XRES 64 | ||
| 197 | #define MIN_YRES 64 | ||
| 198 | |||
| 199 | /* HW cursor parameters */ | ||
| 200 | #define MAX_CURS 32 | ||
| 201 | |||
| 202 | /* Modes of operation of DIU */ | ||
| 203 | #define MFB_MODE0 0 /* DIU off */ | ||
| 204 | #define MFB_MODE1 1 /* All three planes output to display */ | ||
| 205 | #define MFB_MODE2 2 /* Plane 1 to display, planes 2+3 written back*/ | ||
| 206 | #define MFB_MODE3 3 /* All three planes written back to memory */ | ||
| 207 | #define MFB_MODE4 4 /* Color bar generation */ | ||
| 208 | |||
| 209 | /* INT_STATUS/INT_MASK field descriptions */ | ||
| 210 | #define INT_VSYNC 0x01 /* Vsync interrupt */ | ||
| 211 | #define INT_VSYNC_WB 0x02 /* Vsync interrupt for write back operation */ | ||
| 212 | #define INT_UNDRUN 0x04 /* Under run exception interrupt */ | ||
| 213 | #define INT_PARERR 0x08 /* Display parameters error interrupt */ | ||
| 214 | #define INT_LS_BF_VS 0x10 /* Lines before vsync. interrupt */ | ||
| 215 | |||
| 216 | /* Panels'operation modes */ | ||
| 217 | #define MFB_TYPE_OUTPUT 0 /* Panel output to display */ | ||
| 218 | #define MFB_TYPE_OFF 1 /* Panel off */ | ||
| 219 | #define MFB_TYPE_WB 2 /* Panel written back to memory */ | ||
| 220 | #define MFB_TYPE_TEST 3 /* Panel generate color bar */ | ||
| 221 | |||
| 222 | #endif /* __KERNEL__ */ | ||
| 223 | #endif /* __FSL_DIU_FB_H__ */ | ||
diff --git a/include/linux/i8042.h b/include/linux/i8042.h index 9bf6870ee5f4..a986ff588944 100644 --- a/include/linux/i8042.h +++ b/include/linux/i8042.h | |||
| @@ -46,31 +46,31 @@ int i8042_remove_filter(bool (*filter)(unsigned char data, unsigned char str, | |||
| 46 | 46 | ||
| 47 | #else | 47 | #else |
| 48 | 48 | ||
| 49 | void i8042_lock_chip(void) | 49 | static inline void i8042_lock_chip(void) |
| 50 | { | 50 | { |
| 51 | } | 51 | } |
| 52 | 52 | ||
| 53 | void i8042_unlock_chip(void) | 53 | static inline void i8042_unlock_chip(void) |
| 54 | { | 54 | { |
| 55 | } | 55 | } |
| 56 | 56 | ||
| 57 | int i8042_command(unsigned char *param, int command) | 57 | static inline int i8042_command(unsigned char *param, int command) |
| 58 | { | 58 | { |
| 59 | return -ENODEV; | 59 | return -ENODEV; |
| 60 | } | 60 | } |
| 61 | 61 | ||
| 62 | bool i8042_check_port_owner(const struct serio *serio) | 62 | static inline bool i8042_check_port_owner(const struct serio *serio) |
| 63 | { | 63 | { |
| 64 | return false; | 64 | return false; |
| 65 | } | 65 | } |
| 66 | 66 | ||
| 67 | int i8042_install_filter(bool (*filter)(unsigned char data, unsigned char str, | 67 | static inline int i8042_install_filter(bool (*filter)(unsigned char data, unsigned char str, |
| 68 | struct serio *serio)) | 68 | struct serio *serio)) |
| 69 | { | 69 | { |
| 70 | return -ENODEV; | 70 | return -ENODEV; |
| 71 | } | 71 | } |
| 72 | 72 | ||
| 73 | int i8042_remove_filter(bool (*filter)(unsigned char data, unsigned char str, | 73 | static inline int i8042_remove_filter(bool (*filter)(unsigned char data, unsigned char str, |
| 74 | struct serio *serio)) | 74 | struct serio *serio)) |
| 75 | { | 75 | { |
| 76 | return -ENODEV; | 76 | return -ENODEV; |
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index a4d2e9f7088a..adf832dec3f3 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
| @@ -1026,11 +1026,12 @@ void __jbd2_journal_insert_checkpoint(struct journal_head *, transaction_t *); | |||
| 1026 | 1026 | ||
| 1027 | struct jbd2_buffer_trigger_type { | 1027 | struct jbd2_buffer_trigger_type { |
| 1028 | /* | 1028 | /* |
| 1029 | * Fired just before a buffer is written to the journal. | 1029 | * Fired a the moment data to write to the journal are known to be |
| 1030 | * mapped_data is a mapped buffer that is the frozen data for | 1030 | * stable - so either at the moment b_frozen_data is created or just |
| 1031 | * commit. | 1031 | * before a buffer is written to the journal. mapped_data is a mapped |
| 1032 | * buffer that is the frozen data for commit. | ||
| 1032 | */ | 1033 | */ |
| 1033 | void (*t_commit)(struct jbd2_buffer_trigger_type *type, | 1034 | void (*t_frozen)(struct jbd2_buffer_trigger_type *type, |
| 1034 | struct buffer_head *bh, void *mapped_data, | 1035 | struct buffer_head *bh, void *mapped_data, |
| 1035 | size_t size); | 1036 | size_t size); |
| 1036 | 1037 | ||
| @@ -1042,7 +1043,7 @@ struct jbd2_buffer_trigger_type { | |||
| 1042 | struct buffer_head *bh); | 1043 | struct buffer_head *bh); |
| 1043 | }; | 1044 | }; |
| 1044 | 1045 | ||
| 1045 | extern void jbd2_buffer_commit_trigger(struct journal_head *jh, | 1046 | extern void jbd2_buffer_frozen_trigger(struct journal_head *jh, |
| 1046 | void *mapped_data, | 1047 | void *mapped_data, |
| 1047 | struct jbd2_buffer_trigger_type *triggers); | 1048 | struct jbd2_buffer_trigger_type *triggers); |
| 1048 | extern void jbd2_buffer_abort_trigger(struct journal_head *jh, | 1049 | extern void jbd2_buffer_abort_trigger(struct journal_head *jh, |
diff --git a/include/linux/lmb.h b/include/linux/lmb.h deleted file mode 100644 index f3d14333ebed..000000000000 --- a/include/linux/lmb.h +++ /dev/null | |||
| @@ -1,89 +0,0 @@ | |||
| 1 | #ifndef _LINUX_LMB_H | ||
| 2 | #define _LINUX_LMB_H | ||
| 3 | #ifdef __KERNEL__ | ||
| 4 | |||
| 5 | /* | ||
| 6 | * Logical memory blocks. | ||
| 7 | * | ||
| 8 | * Copyright (C) 2001 Peter Bergner, IBM Corp. | ||
| 9 | * | ||
| 10 | * This program is free software; you can redistribute it and/or | ||
| 11 | * modify it under the terms of the GNU General Public License | ||
| 12 | * as published by the Free Software Foundation; either version | ||
| 13 | * 2 of the License, or (at your option) any later version. | ||
| 14 | */ | ||
| 15 | |||
| 16 | #include <linux/init.h> | ||
| 17 | #include <linux/mm.h> | ||
| 18 | |||
| 19 | #define MAX_LMB_REGIONS 128 | ||
| 20 | |||
| 21 | struct lmb_property { | ||
| 22 | u64 base; | ||
| 23 | u64 size; | ||
| 24 | }; | ||
| 25 | |||
| 26 | struct lmb_region { | ||
| 27 | unsigned long cnt; | ||
| 28 | u64 size; | ||
| 29 | struct lmb_property region[MAX_LMB_REGIONS+1]; | ||
| 30 | }; | ||
| 31 | |||
| 32 | struct lmb { | ||
| 33 | unsigned long debug; | ||
| 34 | u64 rmo_size; | ||
| 35 | struct lmb_region memory; | ||
| 36 | struct lmb_region reserved; | ||
| 37 | }; | ||
| 38 | |||
| 39 | extern struct lmb lmb; | ||
| 40 | |||
| 41 | extern void __init lmb_init(void); | ||
| 42 | extern void __init lmb_analyze(void); | ||
| 43 | extern long lmb_add(u64 base, u64 size); | ||
| 44 | extern long lmb_remove(u64 base, u64 size); | ||
| 45 | extern long __init lmb_free(u64 base, u64 size); | ||
| 46 | extern long __init lmb_reserve(u64 base, u64 size); | ||
| 47 | extern u64 __init lmb_alloc_nid(u64 size, u64 align, int nid, | ||
| 48 | u64 (*nid_range)(u64, u64, int *)); | ||
| 49 | extern u64 __init lmb_alloc(u64 size, u64 align); | ||
| 50 | extern u64 __init lmb_alloc_base(u64 size, | ||
| 51 | u64, u64 max_addr); | ||
| 52 | extern u64 __init __lmb_alloc_base(u64 size, | ||
| 53 | u64 align, u64 max_addr); | ||
| 54 | extern u64 __init lmb_phys_mem_size(void); | ||
| 55 | extern u64 lmb_end_of_DRAM(void); | ||
| 56 | extern void __init lmb_enforce_memory_limit(u64 memory_limit); | ||
| 57 | extern int __init lmb_is_reserved(u64 addr); | ||
| 58 | extern int lmb_is_region_reserved(u64 base, u64 size); | ||
| 59 | extern int lmb_find(struct lmb_property *res); | ||
| 60 | |||
| 61 | extern void lmb_dump_all(void); | ||
| 62 | |||
| 63 | static inline u64 | ||
| 64 | lmb_size_bytes(struct lmb_region *type, unsigned long region_nr) | ||
| 65 | { | ||
| 66 | return type->region[region_nr].size; | ||
| 67 | } | ||
| 68 | static inline u64 | ||
| 69 | lmb_size_pages(struct lmb_region *type, unsigned long region_nr) | ||
| 70 | { | ||
| 71 | return lmb_size_bytes(type, region_nr) >> PAGE_SHIFT; | ||
| 72 | } | ||
| 73 | static inline u64 | ||
| 74 | lmb_start_pfn(struct lmb_region *type, unsigned long region_nr) | ||
| 75 | { | ||
| 76 | return type->region[region_nr].base >> PAGE_SHIFT; | ||
| 77 | } | ||
| 78 | static inline u64 | ||
| 79 | lmb_end_pfn(struct lmb_region *type, unsigned long region_nr) | ||
| 80 | { | ||
| 81 | return lmb_start_pfn(type, region_nr) + | ||
| 82 | lmb_size_pages(type, region_nr); | ||
| 83 | } | ||
| 84 | |||
| 85 | #include <asm/lmb.h> | ||
| 86 | |||
| 87 | #endif /* __KERNEL__ */ | ||
| 88 | |||
| 89 | #endif /* _LINUX_LMB_H */ | ||
diff --git a/include/linux/memblock.h b/include/linux/memblock.h new file mode 100644 index 000000000000..a59faf2b5edd --- /dev/null +++ b/include/linux/memblock.h | |||
| @@ -0,0 +1,89 @@ | |||
| 1 | #ifndef _LINUX_MEMBLOCK_H | ||
| 2 | #define _LINUX_MEMBLOCK_H | ||
| 3 | #ifdef __KERNEL__ | ||
| 4 | |||
| 5 | /* | ||
| 6 | * Logical memory blocks. | ||
| 7 | * | ||
| 8 | * Copyright (C) 2001 Peter Bergner, IBM Corp. | ||
| 9 | * | ||
| 10 | * This program is free software; you can redistribute it and/or | ||
| 11 | * modify it under the terms of the GNU General Public License | ||
| 12 | * as published by the Free Software Foundation; either version | ||
| 13 | * 2 of the License, or (at your option) any later version. | ||
| 14 | */ | ||
| 15 | |||
| 16 | #include <linux/init.h> | ||
| 17 | #include <linux/mm.h> | ||
| 18 | |||
| 19 | #define MAX_MEMBLOCK_REGIONS 128 | ||
| 20 | |||
| 21 | struct memblock_property { | ||
| 22 | u64 base; | ||
| 23 | u64 size; | ||
| 24 | }; | ||
| 25 | |||
| 26 | struct memblock_region { | ||
| 27 | unsigned long cnt; | ||
| 28 | u64 size; | ||
| 29 | struct memblock_property region[MAX_MEMBLOCK_REGIONS+1]; | ||
| 30 | }; | ||
| 31 | |||
| 32 | struct memblock { | ||
| 33 | unsigned long debug; | ||
| 34 | u64 rmo_size; | ||
| 35 | struct memblock_region memory; | ||
| 36 | struct memblock_region reserved; | ||
| 37 | }; | ||
| 38 | |||
| 39 | extern struct memblock memblock; | ||
| 40 | |||
| 41 | extern void __init memblock_init(void); | ||
| 42 | extern void __init memblock_analyze(void); | ||
| 43 | extern long memblock_add(u64 base, u64 size); | ||
| 44 | extern long memblock_remove(u64 base, u64 size); | ||
| 45 | extern long __init memblock_free(u64 base, u64 size); | ||
| 46 | extern long __init memblock_reserve(u64 base, u64 size); | ||
| 47 | extern u64 __init memblock_alloc_nid(u64 size, u64 align, int nid, | ||
| 48 | u64 (*nid_range)(u64, u64, int *)); | ||
| 49 | extern u64 __init memblock_alloc(u64 size, u64 align); | ||
| 50 | extern u64 __init memblock_alloc_base(u64 size, | ||
| 51 | u64, u64 max_addr); | ||
| 52 | extern u64 __init __memblock_alloc_base(u64 size, | ||
| 53 | u64 align, u64 max_addr); | ||
| 54 | extern u64 __init memblock_phys_mem_size(void); | ||
| 55 | extern u64 memblock_end_of_DRAM(void); | ||
| 56 | extern void __init memblock_enforce_memory_limit(u64 memory_limit); | ||
| 57 | extern int __init memblock_is_reserved(u64 addr); | ||
| 58 | extern int memblock_is_region_reserved(u64 base, u64 size); | ||
| 59 | extern int memblock_find(struct memblock_property *res); | ||
| 60 | |||
| 61 | extern void memblock_dump_all(void); | ||
| 62 | |||
| 63 | static inline u64 | ||
| 64 | memblock_size_bytes(struct memblock_region *type, unsigned long region_nr) | ||
| 65 | { | ||
| 66 | return type->region[region_nr].size; | ||
| 67 | } | ||
| 68 | static inline u64 | ||
| 69 | memblock_size_pages(struct memblock_region *type, unsigned long region_nr) | ||
| 70 | { | ||
| 71 | return memblock_size_bytes(type, region_nr) >> PAGE_SHIFT; | ||
| 72 | } | ||
| 73 | static inline u64 | ||
| 74 | memblock_start_pfn(struct memblock_region *type, unsigned long region_nr) | ||
| 75 | { | ||
| 76 | return type->region[region_nr].base >> PAGE_SHIFT; | ||
| 77 | } | ||
| 78 | static inline u64 | ||
| 79 | memblock_end_pfn(struct memblock_region *type, unsigned long region_nr) | ||
| 80 | { | ||
| 81 | return memblock_start_pfn(type, region_nr) + | ||
| 82 | memblock_size_pages(type, region_nr); | ||
| 83 | } | ||
| 84 | |||
| 85 | #include <asm/memblock.h> | ||
| 86 | |||
| 87 | #endif /* __KERNEL__ */ | ||
| 88 | |||
| 89 | #endif /* _LINUX_MEMBLOCK_H */ | ||
diff --git a/include/linux/mm.h b/include/linux/mm.h index b969efb03787..a2b48041b910 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -999,7 +999,7 @@ static inline void sync_mm_rss(struct task_struct *task, struct mm_struct *mm) | |||
| 999 | * querying the cache size, so a fastpath for that case is appropriate. | 999 | * querying the cache size, so a fastpath for that case is appropriate. |
| 1000 | */ | 1000 | */ |
| 1001 | struct shrinker { | 1001 | struct shrinker { |
| 1002 | int (*shrink)(int nr_to_scan, gfp_t gfp_mask); | 1002 | int (*shrink)(struct shrinker *, int nr_to_scan, gfp_t gfp_mask); |
| 1003 | int seeks; /* seeks to recreate an obj */ | 1003 | int seeks; /* seeks to recreate an obj */ |
| 1004 | 1004 | ||
| 1005 | /* These are for internal use */ | 1005 | /* These are for internal use */ |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 7cb00845f150..f26fda76b87f 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -288,6 +288,7 @@ struct pci_dev { | |||
| 288 | */ | 288 | */ |
| 289 | unsigned int irq; | 289 | unsigned int irq; |
| 290 | struct resource resource[DEVICE_COUNT_RESOURCE]; /* I/O and memory regions + expansion ROMs */ | 290 | struct resource resource[DEVICE_COUNT_RESOURCE]; /* I/O and memory regions + expansion ROMs */ |
| 291 | resource_size_t fw_addr[DEVICE_COUNT_RESOURCE]; /* FW-assigned addr */ | ||
| 291 | 292 | ||
| 292 | /* These fields are used by common fixups */ | 293 | /* These fields are used by common fixups */ |
| 293 | unsigned int transparent:1; /* Transparent PCI bridge */ | 294 | unsigned int transparent:1; /* Transparent PCI bridge */ |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 7f614ce274a9..13ebb5413a79 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
| @@ -124,7 +124,8 @@ extern struct trace_event_functions enter_syscall_print_funcs; | |||
| 124 | extern struct trace_event_functions exit_syscall_print_funcs; | 124 | extern struct trace_event_functions exit_syscall_print_funcs; |
| 125 | 125 | ||
| 126 | #define SYSCALL_TRACE_ENTER_EVENT(sname) \ | 126 | #define SYSCALL_TRACE_ENTER_EVENT(sname) \ |
| 127 | static struct syscall_metadata __syscall_meta_##sname; \ | 127 | static struct syscall_metadata \ |
| 128 | __attribute__((__aligned__(4))) __syscall_meta_##sname; \ | ||
| 128 | static struct ftrace_event_call \ | 129 | static struct ftrace_event_call \ |
| 129 | __attribute__((__aligned__(4))) event_enter_##sname; \ | 130 | __attribute__((__aligned__(4))) event_enter_##sname; \ |
| 130 | static struct ftrace_event_call __used \ | 131 | static struct ftrace_event_call __used \ |
| @@ -138,7 +139,8 @@ extern struct trace_event_functions exit_syscall_print_funcs; | |||
| 138 | } | 139 | } |
| 139 | 140 | ||
| 140 | #define SYSCALL_TRACE_EXIT_EVENT(sname) \ | 141 | #define SYSCALL_TRACE_EXIT_EVENT(sname) \ |
| 141 | static struct syscall_metadata __syscall_meta_##sname; \ | 142 | static struct syscall_metadata \ |
| 143 | __attribute__((__aligned__(4))) __syscall_meta_##sname; \ | ||
| 142 | static struct ftrace_event_call \ | 144 | static struct ftrace_event_call \ |
| 143 | __attribute__((__aligned__(4))) event_exit_##sname; \ | 145 | __attribute__((__aligned__(4))) event_exit_##sname; \ |
| 144 | static struct ftrace_event_call __used \ | 146 | static struct ftrace_event_call __used \ |
diff --git a/include/linux/sysrq.h b/include/linux/sysrq.h index 4496322e28dd..609e8ca5f534 100644 --- a/include/linux/sysrq.h +++ b/include/linux/sysrq.h | |||
| @@ -45,6 +45,7 @@ struct sysrq_key_op { | |||
| 45 | */ | 45 | */ |
| 46 | 46 | ||
| 47 | void handle_sysrq(int key, struct tty_struct *tty); | 47 | void handle_sysrq(int key, struct tty_struct *tty); |
| 48 | void __handle_sysrq(int key, struct tty_struct *tty, int check_mask); | ||
| 48 | int register_sysrq_key(int key, struct sysrq_key_op *op); | 49 | int register_sysrq_key(int key, struct sysrq_key_op *op); |
| 49 | int unregister_sysrq_key(int key, struct sysrq_key_op *op); | 50 | int unregister_sysrq_key(int key, struct sysrq_key_op *op); |
| 50 | struct sysrq_key_op *__sysrq_get_key_op(int key); | 51 | struct sysrq_key_op *__sysrq_get_key_op(int key); |
diff --git a/include/linux/vgaarb.h b/include/linux/vgaarb.h index c9a975976995..814f294d4cd0 100644 --- a/include/linux/vgaarb.h +++ b/include/linux/vgaarb.h | |||
| @@ -29,6 +29,7 @@ | |||
| 29 | */ | 29 | */ |
| 30 | 30 | ||
| 31 | #ifndef LINUX_VGA_H | 31 | #ifndef LINUX_VGA_H |
| 32 | #define LINUX_VGA_H | ||
| 32 | 33 | ||
| 33 | #include <asm/vga.h> | 34 | #include <asm/vga.h> |
| 34 | 35 | ||
