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 f9d2bde9a7bb..b62cd36ff324 100644 --- a/include/acpi/acpi_numa.h +++ b/include/acpi/acpi_numa.h @@ -11,11 +11,8 @@ #define MAX_PXM_DOMAINS (256) /* Old pxm spec is defined 8 bit */ #endif -extern int __cpuinitdata pxm_to_node_map[MAX_PXM_DOMAINS]; -extern int __cpuinitdata node_to_pxm_map[MAX_NUMNODES]; - -extern int __cpuinit pxm_to_node(int); -extern int __cpuinit node_to_pxm(int); +extern int pxm_to_node(int); +extern int node_to_pxm(int); extern int __cpuinit acpi_map_pxm_to_node(int); extern void __cpuinit acpi_unmap_pxm_to_node(int); diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index 2d956cd566ae..e1a708337be3 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h @@ -17,6 +17,8 @@ struct pt_regs; #ifdef __KERNEL__ +#define CORENAME_MAX_SIZE 128 + /* * This structure is used to hold the arguments that are used when loading binaries. */ diff --git a/include/linux/kmalloc_sizes.h b/include/linux/kmalloc_sizes.h index bda23e00ed71..e576b848ce10 100644 --- a/include/linux/kmalloc_sizes.h +++ b/include/linux/kmalloc_sizes.h @@ -19,17 +19,27 @@ CACHE(32768) CACHE(65536) CACHE(131072) -#if (NR_CPUS > 512) || (MAX_NUMNODES > 256) || !defined(CONFIG_MMU) +#if KMALLOC_MAX_SIZE >= 262144 CACHE(262144) #endif -#ifndef CONFIG_MMU +#if KMALLOC_MAX_SIZE >= 524288 CACHE(524288) +#endif +#if KMALLOC_MAX_SIZE >= 1048576 CACHE(1048576) -#ifdef CONFIG_LARGE_ALLOCS +#endif +#if KMALLOC_MAX_SIZE >= 2097152 CACHE(2097152) +#endif +#if KMALLOC_MAX_SIZE >= 4194304 CACHE(4194304) +#endif +#if KMALLOC_MAX_SIZE >= 8388608 CACHE(8388608) +#endif +#if KMALLOC_MAX_SIZE >= 16777216 CACHE(16777216) +#endif +#if KMALLOC_MAX_SIZE >= 33554432 CACHE(33554432) -#endif /* CONFIG_LARGE_ALLOCS */ -#endif /* CONFIG_MMU */ +#endif diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 3b1fbf49fa7d..62b3e008e641 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -471,6 +471,7 @@ #define PCI_DEVICE_ID_IBM_ICOM_DEV_ID_2 0x0219 #define PCI_DEVICE_ID_IBM_ICOM_V2_TWO_PORTS_RVX 0x021A #define PCI_DEVICE_ID_IBM_ICOM_V2_ONE_PORT_RVX_ONE_PORT_MDM 0x0251 +#define PCI_DEVICE_ID_IBM_ICOM_V2_ONE_PORT_RVX_ONE_PORT_MDM_PCIE 0x0361 #define PCI_DEVICE_ID_IBM_ICOM_FOUR_PORT_MODEL 0x252 #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 bdd277223af0..97347f22fc20 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 void page_add_file_rmap(struct page *); void page_remove_rmap(struct page *, struct vm_area_struct *); -/** - * page_dup_rmap - duplicate pte mapping to a page - * @page: the page to add the mapping to - * - * For copy_page_range only: minimal extract from page_add_rmap, - * avoiding unnecessary tests (already checked) so it's quicker. - */ -static inline void page_dup_rmap(struct page *page) +#ifdef CONFIG_DEBUG_VM +void page_dup_rmap(struct page *page, struct vm_area_struct *vma, unsigned long address); +#else +static inline void page_dup_rmap(struct page *page, struct vm_area_struct *vma, unsigned long address) { atomic_inc(&page->_mapcount); } +#endif /* * Called from mm/vmscan.c to handle paging out diff --git a/include/linux/slab.h b/include/linux/slab.h index 71829efc40ba..a015236cc572 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h @@ -32,9 +32,6 @@ typedef struct kmem_cache kmem_cache_t __deprecated; #define SLAB_MEM_SPREAD 0x00100000UL /* Spread some memory over cpuset */ #define SLAB_TRACE 0x00200000UL /* Trace allocations and frees */ -/* Flags passed to a constructor functions */ -#define SLAB_CTOR_CONSTRUCTOR 0x001UL /* If not set, then deconstructor */ - /* * struct kmem_cache related prototypes */ @@ -77,6 +74,21 @@ static inline void *kmem_cache_alloc_node(struct kmem_cache *cachep, #endif /* + * The largest kmalloc size supported by the slab allocators is + * 32 megabyte (2^25) or the maximum allocatable page order if that is + * less than 32 MB. + * + * WARNING: Its not easy to increase this value since the allocators have + * to do various tricks to work around compiler limitations in order to + * ensure proper constant folding. + */ +#define KMALLOC_SHIFT_HIGH ((MAX_ORDER + PAGE_SHIFT) <= 25 ? \ + (MAX_ORDER + PAGE_SHIFT) : 25) + +#define KMALLOC_MAX_SIZE (1UL << KMALLOC_SHIFT_HIGH) +#define KMALLOC_MAX_ORDER (KMALLOC_SHIFT_HIGH - PAGE_SHIFT) + +/* * Common kmalloc functions provided by all allocators */ void *__kmalloc(size_t, gfp_t); @@ -233,9 +245,6 @@ extern void *__kmalloc_node_track_caller(size_t, gfp_t, int, void *); #endif /* DEBUG_SLAB */ -extern const struct seq_operations slabinfo_op; -ssize_t slabinfo_write(struct file *, const char __user *, size_t, loff_t *); - #endif /* __KERNEL__ */ #endif /* _LINUX_SLAB_H */ diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h index 5e4364644ed1..8d81a60518e4 100644 --- a/include/linux/slab_def.h +++ b/include/linux/slab_def.h @@ -109,4 +109,7 @@ found: #endif /* CONFIG_NUMA */ +extern const struct seq_operations slabinfo_op; +ssize_t slabinfo_write(struct file *, const char __user *, size_t, loff_t *); + #endif /* _LINUX_SLAB_DEF_H */ diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index c6c1f4a120e3..0764c829d967 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h @@ -40,7 +40,6 @@ struct kmem_cache { int objects; /* Number of objects in slab */ int refcount; /* Refcount for slab cache destroy */ void (*ctor)(void *, struct kmem_cache *, unsigned long); - void (*dtor)(void *, struct kmem_cache *, unsigned long); int inuse; /* Offset to metadata */ int align; /* Alignment */ const char *name; /* Name (only for display!) */ @@ -59,17 +58,6 @@ struct kmem_cache { */ #define KMALLOC_SHIFT_LOW 3 -#ifdef CONFIG_LARGE_ALLOCS -#define KMALLOC_SHIFT_HIGH ((MAX_ORDER + PAGE_SHIFT) =< 25 ? \ - (MAX_ORDER + PAGE_SHIFT - 1) : 25) -#else -#if !defined(CONFIG_MMU) || NR_CPUS > 512 || MAX_NUMNODES > 256 -#define KMALLOC_SHIFT_HIGH 20 -#else -#define KMALLOC_SHIFT_HIGH 18 -#endif -#endif - /* * We keep the general caches in an array of slab caches that are used for * 2^x bytes of allocations. @@ -80,7 +68,7 @@ extern struct kmem_cache kmalloc_caches[KMALLOC_SHIFT_HIGH + 1]; * Sorry that the following has to be that ugly but some versions of GCC * have trouble with constant propagation and loops. */ -static inline int kmalloc_index(int size) +static inline int kmalloc_index(size_t size) { /* * We should return 0 if size == 0 but we use the smallest object @@ -88,7 +76,7 @@ static inline int kmalloc_index(int size) */ WARN_ON_ONCE(size == 0); - if (size > (1 << KMALLOC_SHIFT_HIGH)) + if (size > KMALLOC_MAX_SIZE) return -1; if (size > 64 && size <= 96) @@ -111,17 +99,13 @@ static inline int kmalloc_index(int size) if (size <= 64 * 1024) return 16; if (size <= 128 * 1024) return 17; if (size <= 256 * 1024) return 18; -#if KMALLOC_SHIFT_HIGH > 18 if (size <= 512 * 1024) return 19; if (size <= 1024 * 1024) return 20; -#endif -#if KMALLOC_SHIFT_HIGH > 20 if (size <= 2 * 1024 * 1024) return 21; if (size <= 4 * 1024 * 1024) return 22; if (size <= 8 * 1024 * 1024) return 23; if (size <= 16 * 1024 * 1024) return 24; if (size <= 32 * 1024 * 1024) return 25; -#endif return -1; /* @@ -146,7 +130,12 @@ static inline struct kmem_cache *kmalloc_slab(size_t size) if (index == 0) return NULL; - if (index < 0) { + /* + * This function only gets expanded if __builtin_constant_p(size), so + * testing it here shouldn't be needed. But some versions of gcc need + * help. + */ + if (__builtin_constant_p(size) && index < 0) { /* * Generate a link failure. Would be great if we could * do something to stop the compile here. diff --git a/include/linux/smp.h b/include/linux/smp.h index 3f70149eabbb..96ac21f8dd73 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h @@ -6,6 +6,7 @@ * Alan Cox. <alan@redhat.com> */ +#include <linux/errno.h> extern void cpu_idle(void); @@ -99,11 +100,9 @@ static inline void smp_send_reschedule(int cpu) { } #define num_booting_cpus() 1 #define smp_prepare_boot_cpu() do {} while (0) static inline int smp_call_function_single(int cpuid, void (*func) (void *info), - void *info, int retry, int wait) + void *info, int retry, int wait) { - /* Disable interrupts here? */ - func(info); - return 0; + return -EBUSY; } #endif /* !SMP */ diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index d555f31c0746..7eae8665ff59 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h @@ -122,7 +122,7 @@ extern struct workqueue_struct *__create_workqueue(const char *name, int singlethread, int freezeable); #define create_workqueue(name) __create_workqueue((name), 0, 0) -#define create_freezeable_workqueue(name) __create_workqueue((name), 0, 1) +#define create_freezeable_workqueue(name) __create_workqueue((name), 1, 1) #define create_singlethread_workqueue(name) __create_workqueue((name), 1, 0) extern void destroy_workqueue(struct workqueue_struct *wq); |