diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-05-17 11:36:59 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-05-17 11:36:59 -0400 |
commit | dd504ea16f34a29da4aa933ae7ab917fcfd25fd7 (patch) | |
tree | 0502645dc159be29c33c992e9e56dc3156074279 /include | |
parent | 5cf4cf65a8ccca44ec9b357ebdb2b517269d7e8a (diff) | |
parent | 0479ea0eab197b3e5d4c731f526c02e5e3fbfbd0 (diff) |
Merge branch 'master' of /home/trondmy/repositories/git/linux-2.6/
Diffstat (limited to 'include')
-rw-r--r-- | include/acpi/acpi_numa.h | 7 | ||||
-rw-r--r-- | include/linux/binfmts.h | 2 | ||||
-rw-r--r-- | include/linux/kmalloc_sizes.h | 20 | ||||
-rw-r--r-- | include/linux/pci_ids.h | 1 | ||||
-rw-r--r-- | include/linux/rmap.h | 13 | ||||
-rw-r--r-- | include/linux/slab.h | 21 | ||||
-rw-r--r-- | include/linux/slab_def.h | 3 | ||||
-rw-r--r-- | include/linux/slub_def.h | 27 | ||||
-rw-r--r-- | include/linux/smp.h | 7 | ||||
-rw-r--r-- | include/linux/workqueue.h | 2 |
10 files changed, 55 insertions, 48 deletions
diff --git a/include/acpi/acpi_numa.h b/include/acpi/acpi_numa.h index f9d2bde9a7b..b62cd36ff32 100644 --- a/include/acpi/acpi_numa.h +++ b/include/acpi/acpi_numa.h | |||
@@ -11,11 +11,8 @@ | |||
11 | #define MAX_PXM_DOMAINS (256) /* Old pxm spec is defined 8 bit */ | 11 | #define MAX_PXM_DOMAINS (256) /* Old pxm spec is defined 8 bit */ |
12 | #endif | 12 | #endif |
13 | 13 | ||
14 | extern int __cpuinitdata pxm_to_node_map[MAX_PXM_DOMAINS]; | 14 | extern int pxm_to_node(int); |
15 | extern int __cpuinitdata node_to_pxm_map[MAX_NUMNODES]; | 15 | extern int node_to_pxm(int); |
16 | |||
17 | extern int __cpuinit pxm_to_node(int); | ||
18 | extern int __cpuinit node_to_pxm(int); | ||
19 | extern int __cpuinit acpi_map_pxm_to_node(int); | 16 | extern int __cpuinit acpi_map_pxm_to_node(int); |
20 | extern void __cpuinit acpi_unmap_pxm_to_node(int); | 17 | extern void __cpuinit acpi_unmap_pxm_to_node(int); |
21 | 18 | ||
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index 2d956cd566a..e1a708337be 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h | |||
@@ -17,6 +17,8 @@ struct pt_regs; | |||
17 | 17 | ||
18 | #ifdef __KERNEL__ | 18 | #ifdef __KERNEL__ |
19 | 19 | ||
20 | #define CORENAME_MAX_SIZE 128 | ||
21 | |||
20 | /* | 22 | /* |
21 | * This structure is used to hold the arguments that are used when loading binaries. | 23 | * This structure is used to hold the arguments that are used when loading binaries. |
22 | */ | 24 | */ |
diff --git a/include/linux/kmalloc_sizes.h b/include/linux/kmalloc_sizes.h index bda23e00ed7..e576b848ce1 100644 --- a/include/linux/kmalloc_sizes.h +++ b/include/linux/kmalloc_sizes.h | |||
@@ -19,17 +19,27 @@ | |||
19 | CACHE(32768) | 19 | CACHE(32768) |
20 | CACHE(65536) | 20 | CACHE(65536) |
21 | CACHE(131072) | 21 | CACHE(131072) |
22 | #if (NR_CPUS > 512) || (MAX_NUMNODES > 256) || !defined(CONFIG_MMU) | 22 | #if KMALLOC_MAX_SIZE >= 262144 |
23 | CACHE(262144) | 23 | CACHE(262144) |
24 | #endif | 24 | #endif |
25 | #ifndef CONFIG_MMU | 25 | #if KMALLOC_MAX_SIZE >= 524288 |
26 | CACHE(524288) | 26 | CACHE(524288) |
27 | #endif | ||
28 | #if KMALLOC_MAX_SIZE >= 1048576 | ||
27 | CACHE(1048576) | 29 | CACHE(1048576) |
28 | #ifdef CONFIG_LARGE_ALLOCS | 30 | #endif |
31 | #if KMALLOC_MAX_SIZE >= 2097152 | ||
29 | CACHE(2097152) | 32 | CACHE(2097152) |
33 | #endif | ||
34 | #if KMALLOC_MAX_SIZE >= 4194304 | ||
30 | CACHE(4194304) | 35 | CACHE(4194304) |
36 | #endif | ||
37 | #if KMALLOC_MAX_SIZE >= 8388608 | ||
31 | CACHE(8388608) | 38 | CACHE(8388608) |
39 | #endif | ||
40 | #if KMALLOC_MAX_SIZE >= 16777216 | ||
32 | CACHE(16777216) | 41 | CACHE(16777216) |
42 | #endif | ||
43 | #if KMALLOC_MAX_SIZE >= 33554432 | ||
33 | CACHE(33554432) | 44 | CACHE(33554432) |
34 | #endif /* CONFIG_LARGE_ALLOCS */ | 45 | #endif |
35 | #endif /* CONFIG_MMU */ | ||
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 3b1fbf49fa7..62b3e008e64 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -471,6 +471,7 @@ | |||
471 | #define PCI_DEVICE_ID_IBM_ICOM_DEV_ID_2 0x0219 | 471 | #define PCI_DEVICE_ID_IBM_ICOM_DEV_ID_2 0x0219 |
472 | #define PCI_DEVICE_ID_IBM_ICOM_V2_TWO_PORTS_RVX 0x021A | 472 | #define PCI_DEVICE_ID_IBM_ICOM_V2_TWO_PORTS_RVX 0x021A |
473 | #define PCI_DEVICE_ID_IBM_ICOM_V2_ONE_PORT_RVX_ONE_PORT_MDM 0x0251 | 473 | #define PCI_DEVICE_ID_IBM_ICOM_V2_ONE_PORT_RVX_ONE_PORT_MDM 0x0251 |
474 | #define PCI_DEVICE_ID_IBM_ICOM_V2_ONE_PORT_RVX_ONE_PORT_MDM_PCIE 0x0361 | ||
474 | #define PCI_DEVICE_ID_IBM_ICOM_FOUR_PORT_MODEL 0x252 | 475 | #define PCI_DEVICE_ID_IBM_ICOM_FOUR_PORT_MODEL 0x252 |
475 | 476 | ||
476 | #define PCI_VENDOR_ID_COMPEX2 0x101a /* pci.ids says "AT&T GIS (NCR)" */ | 477 | #define PCI_VENDOR_ID_COMPEX2 0x101a /* pci.ids says "AT&T GIS (NCR)" */ |
diff --git a/include/linux/rmap.h b/include/linux/rmap.h index bdd277223af..97347f22fc2 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h | |||
@@ -74,17 +74,14 @@ void page_add_new_anon_rmap(struct page *, struct vm_area_struct *, unsigned lon | |||
74 | void page_add_file_rmap(struct page *); | 74 | void page_add_file_rmap(struct page *); |
75 | void page_remove_rmap(struct page *, struct vm_area_struct *); | 75 | void page_remove_rmap(struct page *, struct vm_area_struct *); |
76 | 76 | ||
77 | /** | 77 | #ifdef CONFIG_DEBUG_VM |
78 | * page_dup_rmap - duplicate pte mapping to a page | 78 | void page_dup_rmap(struct page *page, struct vm_area_struct *vma, unsigned long address); |
79 | * @page: the page to add the mapping to | 79 | #else |
80 | * | 80 | static inline void page_dup_rmap(struct page *page, struct vm_area_struct *vma, unsigned long address) |
81 | * For copy_page_range only: minimal extract from page_add_rmap, | ||
82 | * avoiding unnecessary tests (already checked) so it's quicker. | ||
83 | */ | ||
84 | static inline void page_dup_rmap(struct page *page) | ||
85 | { | 81 | { |
86 | atomic_inc(&page->_mapcount); | 82 | atomic_inc(&page->_mapcount); |
87 | } | 83 | } |
84 | #endif | ||
88 | 85 | ||
89 | /* | 86 | /* |
90 | * Called from mm/vmscan.c to handle paging out | 87 | * Called from mm/vmscan.c to handle paging out |
diff --git a/include/linux/slab.h b/include/linux/slab.h index 71829efc40b..a015236cc57 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -32,9 +32,6 @@ typedef struct kmem_cache kmem_cache_t __deprecated; | |||
32 | #define SLAB_MEM_SPREAD 0x00100000UL /* Spread some memory over cpuset */ | 32 | #define SLAB_MEM_SPREAD 0x00100000UL /* Spread some memory over cpuset */ |
33 | #define SLAB_TRACE 0x00200000UL /* Trace allocations and frees */ | 33 | #define SLAB_TRACE 0x00200000UL /* Trace allocations and frees */ |
34 | 34 | ||
35 | /* Flags passed to a constructor functions */ | ||
36 | #define SLAB_CTOR_CONSTRUCTOR 0x001UL /* If not set, then deconstructor */ | ||
37 | |||
38 | /* | 35 | /* |
39 | * struct kmem_cache related prototypes | 36 | * struct kmem_cache related prototypes |
40 | */ | 37 | */ |
@@ -77,6 +74,21 @@ static inline void *kmem_cache_alloc_node(struct kmem_cache *cachep, | |||
77 | #endif | 74 | #endif |
78 | 75 | ||
79 | /* | 76 | /* |
77 | * The largest kmalloc size supported by the slab allocators is | ||
78 | * 32 megabyte (2^25) or the maximum allocatable page order if that is | ||
79 | * less than 32 MB. | ||
80 | * | ||
81 | * WARNING: Its not easy to increase this value since the allocators have | ||
82 | * to do various tricks to work around compiler limitations in order to | ||
83 | * ensure proper constant folding. | ||
84 | */ | ||
85 | #define KMALLOC_SHIFT_HIGH ((MAX_ORDER + PAGE_SHIFT) <= 25 ? \ | ||
86 | (MAX_ORDER + PAGE_SHIFT) : 25) | ||
87 | |||
88 | #define KMALLOC_MAX_SIZE (1UL << KMALLOC_SHIFT_HIGH) | ||
89 | #define KMALLOC_MAX_ORDER (KMALLOC_SHIFT_HIGH - PAGE_SHIFT) | ||
90 | |||
91 | /* | ||
80 | * Common kmalloc functions provided by all allocators | 92 | * Common kmalloc functions provided by all allocators |
81 | */ | 93 | */ |
82 | void *__kmalloc(size_t, gfp_t); | 94 | void *__kmalloc(size_t, gfp_t); |
@@ -233,9 +245,6 @@ extern void *__kmalloc_node_track_caller(size_t, gfp_t, int, void *); | |||
233 | 245 | ||
234 | #endif /* DEBUG_SLAB */ | 246 | #endif /* DEBUG_SLAB */ |
235 | 247 | ||
236 | extern const struct seq_operations slabinfo_op; | ||
237 | ssize_t slabinfo_write(struct file *, const char __user *, size_t, loff_t *); | ||
238 | |||
239 | #endif /* __KERNEL__ */ | 248 | #endif /* __KERNEL__ */ |
240 | #endif /* _LINUX_SLAB_H */ | 249 | #endif /* _LINUX_SLAB_H */ |
241 | 250 | ||
diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h index 5e4364644ed..8d81a60518e 100644 --- a/include/linux/slab_def.h +++ b/include/linux/slab_def.h | |||
@@ -109,4 +109,7 @@ found: | |||
109 | 109 | ||
110 | #endif /* CONFIG_NUMA */ | 110 | #endif /* CONFIG_NUMA */ |
111 | 111 | ||
112 | extern const struct seq_operations slabinfo_op; | ||
113 | ssize_t slabinfo_write(struct file *, const char __user *, size_t, loff_t *); | ||
114 | |||
112 | #endif /* _LINUX_SLAB_DEF_H */ | 115 | #endif /* _LINUX_SLAB_DEF_H */ |
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index c6c1f4a120e..0764c829d96 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h | |||
@@ -40,7 +40,6 @@ struct kmem_cache { | |||
40 | int objects; /* Number of objects in slab */ | 40 | int objects; /* Number of objects in slab */ |
41 | int refcount; /* Refcount for slab cache destroy */ | 41 | int refcount; /* Refcount for slab cache destroy */ |
42 | void (*ctor)(void *, struct kmem_cache *, unsigned long); | 42 | void (*ctor)(void *, struct kmem_cache *, unsigned long); |
43 | void (*dtor)(void *, struct kmem_cache *, unsigned long); | ||
44 | int inuse; /* Offset to metadata */ | 43 | int inuse; /* Offset to metadata */ |
45 | int align; /* Alignment */ | 44 | int align; /* Alignment */ |
46 | const char *name; /* Name (only for display!) */ | 45 | const char *name; /* Name (only for display!) */ |
@@ -59,17 +58,6 @@ struct kmem_cache { | |||
59 | */ | 58 | */ |
60 | #define KMALLOC_SHIFT_LOW 3 | 59 | #define KMALLOC_SHIFT_LOW 3 |
61 | 60 | ||
62 | #ifdef CONFIG_LARGE_ALLOCS | ||
63 | #define KMALLOC_SHIFT_HIGH ((MAX_ORDER + PAGE_SHIFT) =< 25 ? \ | ||
64 | (MAX_ORDER + PAGE_SHIFT - 1) : 25) | ||
65 | #else | ||
66 | #if !defined(CONFIG_MMU) || NR_CPUS > 512 || MAX_NUMNODES > 256 | ||
67 | #define KMALLOC_SHIFT_HIGH 20 | ||
68 | #else | ||
69 | #define KMALLOC_SHIFT_HIGH 18 | ||
70 | #endif | ||
71 | #endif | ||
72 | |||
73 | /* | 61 | /* |
74 | * We keep the general caches in an array of slab caches that are used for | 62 | * We keep the general caches in an array of slab caches that are used for |
75 | * 2^x bytes of allocations. | 63 | * 2^x bytes of allocations. |
@@ -80,7 +68,7 @@ extern struct kmem_cache kmalloc_caches[KMALLOC_SHIFT_HIGH + 1]; | |||
80 | * Sorry that the following has to be that ugly but some versions of GCC | 68 | * Sorry that the following has to be that ugly but some versions of GCC |
81 | * have trouble with constant propagation and loops. | 69 | * have trouble with constant propagation and loops. |
82 | */ | 70 | */ |
83 | static inline int kmalloc_index(int size) | 71 | static inline int kmalloc_index(size_t size) |
84 | { | 72 | { |
85 | /* | 73 | /* |
86 | * We should return 0 if size == 0 but we use the smallest object | 74 | * We should return 0 if size == 0 but we use the smallest object |
@@ -88,7 +76,7 @@ static inline int kmalloc_index(int size) | |||
88 | */ | 76 | */ |
89 | WARN_ON_ONCE(size == 0); | 77 | WARN_ON_ONCE(size == 0); |
90 | 78 | ||
91 | if (size > (1 << KMALLOC_SHIFT_HIGH)) | 79 | if (size > KMALLOC_MAX_SIZE) |
92 | return -1; | 80 | return -1; |
93 | 81 | ||
94 | if (size > 64 && size <= 96) | 82 | if (size > 64 && size <= 96) |
@@ -111,17 +99,13 @@ static inline int kmalloc_index(int size) | |||
111 | if (size <= 64 * 1024) return 16; | 99 | if (size <= 64 * 1024) return 16; |
112 | if (size <= 128 * 1024) return 17; | 100 | if (size <= 128 * 1024) return 17; |
113 | if (size <= 256 * 1024) return 18; | 101 | if (size <= 256 * 1024) return 18; |
114 | #if KMALLOC_SHIFT_HIGH > 18 | ||
115 | if (size <= 512 * 1024) return 19; | 102 | if (size <= 512 * 1024) return 19; |
116 | if (size <= 1024 * 1024) return 20; | 103 | if (size <= 1024 * 1024) return 20; |
117 | #endif | ||
118 | #if KMALLOC_SHIFT_HIGH > 20 | ||
119 | if (size <= 2 * 1024 * 1024) return 21; | 104 | if (size <= 2 * 1024 * 1024) return 21; |
120 | if (size <= 4 * 1024 * 1024) return 22; | 105 | if (size <= 4 * 1024 * 1024) return 22; |
121 | if (size <= 8 * 1024 * 1024) return 23; | 106 | if (size <= 8 * 1024 * 1024) return 23; |
122 | if (size <= 16 * 1024 * 1024) return 24; | 107 | if (size <= 16 * 1024 * 1024) return 24; |
123 | if (size <= 32 * 1024 * 1024) return 25; | 108 | if (size <= 32 * 1024 * 1024) return 25; |
124 | #endif | ||
125 | return -1; | 109 | return -1; |
126 | 110 | ||
127 | /* | 111 | /* |
@@ -146,7 +130,12 @@ static inline struct kmem_cache *kmalloc_slab(size_t size) | |||
146 | if (index == 0) | 130 | if (index == 0) |
147 | return NULL; | 131 | return NULL; |
148 | 132 | ||
149 | if (index < 0) { | 133 | /* |
134 | * This function only gets expanded if __builtin_constant_p(size), so | ||
135 | * testing it here shouldn't be needed. But some versions of gcc need | ||
136 | * help. | ||
137 | */ | ||
138 | if (__builtin_constant_p(size) && index < 0) { | ||
150 | /* | 139 | /* |
151 | * Generate a link failure. Would be great if we could | 140 | * Generate a link failure. Would be great if we could |
152 | * do something to stop the compile here. | 141 | * do something to stop the compile here. |
diff --git a/include/linux/smp.h b/include/linux/smp.h index 3f70149eabb..96ac21f8dd7 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h | |||
@@ -6,6 +6,7 @@ | |||
6 | * Alan Cox. <alan@redhat.com> | 6 | * Alan Cox. <alan@redhat.com> |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/errno.h> | ||
9 | 10 | ||
10 | extern void cpu_idle(void); | 11 | extern void cpu_idle(void); |
11 | 12 | ||
@@ -99,11 +100,9 @@ static inline void smp_send_reschedule(int cpu) { } | |||
99 | #define num_booting_cpus() 1 | 100 | #define num_booting_cpus() 1 |
100 | #define smp_prepare_boot_cpu() do {} while (0) | 101 | #define smp_prepare_boot_cpu() do {} while (0) |
101 | static inline int smp_call_function_single(int cpuid, void (*func) (void *info), | 102 | static inline int smp_call_function_single(int cpuid, void (*func) (void *info), |
102 | void *info, int retry, int wait) | 103 | void *info, int retry, int wait) |
103 | { | 104 | { |
104 | /* Disable interrupts here? */ | 105 | return -EBUSY; |
105 | func(info); | ||
106 | return 0; | ||
107 | } | 106 | } |
108 | 107 | ||
109 | #endif /* !SMP */ | 108 | #endif /* !SMP */ |
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index d555f31c074..7eae8665ff5 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
@@ -122,7 +122,7 @@ extern struct workqueue_struct *__create_workqueue(const char *name, | |||
122 | int singlethread, | 122 | int singlethread, |
123 | int freezeable); | 123 | int freezeable); |
124 | #define create_workqueue(name) __create_workqueue((name), 0, 0) | 124 | #define create_workqueue(name) __create_workqueue((name), 0, 0) |
125 | #define create_freezeable_workqueue(name) __create_workqueue((name), 0, 1) | 125 | #define create_freezeable_workqueue(name) __create_workqueue((name), 1, 1) |
126 | #define create_singlethread_workqueue(name) __create_workqueue((name), 1, 0) | 126 | #define create_singlethread_workqueue(name) __create_workqueue((name), 1, 0) |
127 | 127 | ||
128 | extern void destroy_workqueue(struct workqueue_struct *wq); | 128 | extern void destroy_workqueue(struct workqueue_struct *wq); |