Commit fa5b08d5 authored by Kyle Moffett's avatar Kyle Moffett Committed by Linus Torvalds

[PATCH] sab: consolidate kmem_bufctl_t

This is used only in slab.c and each architecture gets to define whcih
underlying type is to be used.

Seems a bit silly - move it to slab.c and use the same type for all
architectures: unsigned int.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 0e5c9f39
...@@ -56,8 +56,6 @@ typedef unsigned long u64; ...@@ -56,8 +56,6 @@ typedef unsigned long u64;
typedef u64 dma_addr_t; typedef u64 dma_addr_t;
typedef u64 dma64_addr_t; typedef u64 dma64_addr_t;
typedef unsigned short kmem_bufctl_t;
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#endif /* _ALPHA_TYPES_H */ #endif /* _ALPHA_TYPES_H */
...@@ -52,8 +52,6 @@ typedef unsigned long long u64; ...@@ -52,8 +52,6 @@ typedef unsigned long long u64;
typedef u32 dma_addr_t; typedef u32 dma_addr_t;
typedef u32 dma64_addr_t; typedef u32 dma64_addr_t;
typedef unsigned int kmem_bufctl_t;
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
......
...@@ -52,8 +52,6 @@ typedef unsigned long long u64; ...@@ -52,8 +52,6 @@ typedef unsigned long long u64;
typedef u32 dma_addr_t; typedef u32 dma_addr_t;
typedef u32 dma64_addr_t; typedef u32 dma64_addr_t;
typedef unsigned int kmem_bufctl_t;
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
......
...@@ -52,8 +52,6 @@ typedef unsigned long long u64; ...@@ -52,8 +52,6 @@ typedef unsigned long long u64;
typedef u32 dma_addr_t; typedef u32 dma_addr_t;
typedef u32 dma64_addr_t; typedef u32 dma64_addr_t;
typedef unsigned short kmem_bufctl_t;
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
......
...@@ -65,8 +65,6 @@ typedef u64 u_quad_t; ...@@ -65,8 +65,6 @@ typedef u64 u_quad_t;
typedef u32 dma_addr_t; typedef u32 dma_addr_t;
typedef unsigned short kmem_bufctl_t;
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
......
...@@ -58,8 +58,6 @@ typedef u32 dma_addr_t; ...@@ -58,8 +58,6 @@ typedef u32 dma_addr_t;
#define HAVE_SECTOR_T #define HAVE_SECTOR_T
typedef u64 sector_t; typedef u64 sector_t;
typedef unsigned int kmem_bufctl_t;
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
......
...@@ -63,8 +63,6 @@ typedef u64 sector_t; ...@@ -63,8 +63,6 @@ typedef u64 sector_t;
#define HAVE_SECTOR_T #define HAVE_SECTOR_T
#endif #endif
typedef unsigned short kmem_bufctl_t;
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
......
...@@ -67,8 +67,6 @@ typedef __u64 u64; ...@@ -67,8 +67,6 @@ typedef __u64 u64;
typedef u64 dma_addr_t; typedef u64 dma_addr_t;
typedef unsigned short kmem_bufctl_t;
# endif /* __KERNEL__ */ # endif /* __KERNEL__ */
#endif /* !__ASSEMBLY__ */ #endif /* !__ASSEMBLY__ */
......
...@@ -55,8 +55,6 @@ typedef unsigned long long u64; ...@@ -55,8 +55,6 @@ typedef unsigned long long u64;
typedef u32 dma_addr_t; typedef u32 dma_addr_t;
typedef u64 dma64_addr_t; typedef u64 dma64_addr_t;
typedef unsigned short kmem_bufctl_t;
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
......
...@@ -60,8 +60,6 @@ typedef unsigned long long u64; ...@@ -60,8 +60,6 @@ typedef unsigned long long u64;
typedef u32 dma_addr_t; typedef u32 dma_addr_t;
typedef u32 dma64_addr_t; typedef u32 dma64_addr_t;
typedef unsigned short kmem_bufctl_t;
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
......
...@@ -99,8 +99,6 @@ typedef u64 sector_t; ...@@ -99,8 +99,6 @@ typedef u64 sector_t;
#define HAVE_SECTOR_T #define HAVE_SECTOR_T
#endif #endif
typedef unsigned short kmem_bufctl_t;
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
......
...@@ -56,8 +56,6 @@ typedef unsigned long long u64; ...@@ -56,8 +56,6 @@ typedef unsigned long long u64;
typedef u32 dma_addr_t; typedef u32 dma_addr_t;
typedef u64 dma64_addr_t; typedef u64 dma64_addr_t;
typedef unsigned int kmem_bufctl_t;
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
......
...@@ -62,8 +62,6 @@ typedef u64 sector_t; ...@@ -62,8 +62,6 @@ typedef u64 sector_t;
#define HAVE_SECTOR_T #define HAVE_SECTOR_T
#endif #endif
typedef unsigned int kmem_bufctl_t;
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
......
...@@ -72,7 +72,6 @@ typedef struct { ...@@ -72,7 +72,6 @@ typedef struct {
unsigned long env; unsigned long env;
} func_descr_t; } func_descr_t;
typedef unsigned int kmem_bufctl_t;
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
......
...@@ -79,8 +79,6 @@ typedef unsigned long u64; ...@@ -79,8 +79,6 @@ typedef unsigned long u64;
typedef u32 dma_addr_t; typedef u32 dma_addr_t;
typedef unsigned int kmem_bufctl_t;
#ifndef __s390x__ #ifndef __s390x__
typedef union { typedef union {
unsigned long long pair; unsigned long long pair;
......
...@@ -58,8 +58,6 @@ typedef u64 sector_t; ...@@ -58,8 +58,6 @@ typedef u64 sector_t;
#define HAVE_SECTOR_T #define HAVE_SECTOR_T
#endif #endif
typedef unsigned int kmem_bufctl_t;
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
......
...@@ -65,8 +65,6 @@ typedef u32 dma_addr_t; ...@@ -65,8 +65,6 @@ typedef u32 dma_addr_t;
#endif #endif
typedef u64 dma64_addr_t; typedef u64 dma64_addr_t;
typedef unsigned int kmem_bufctl_t;
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#define BITS_PER_LONG 32 #define BITS_PER_LONG 32
......
...@@ -54,8 +54,6 @@ typedef unsigned long long u64; ...@@ -54,8 +54,6 @@ typedef unsigned long long u64;
typedef u32 dma_addr_t; typedef u32 dma_addr_t;
typedef u32 dma64_addr_t; typedef u32 dma64_addr_t;
typedef unsigned short kmem_bufctl_t;
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
......
...@@ -56,8 +56,6 @@ typedef unsigned long u64; ...@@ -56,8 +56,6 @@ typedef unsigned long u64;
typedef u32 dma_addr_t; typedef u32 dma_addr_t;
typedef u64 dma64_addr_t; typedef u64 dma64_addr_t;
typedef unsigned short kmem_bufctl_t;
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
......
...@@ -59,8 +59,6 @@ typedef unsigned long long u64; ...@@ -59,8 +59,6 @@ typedef unsigned long long u64;
typedef u32 dma_addr_t; typedef u32 dma_addr_t;
typedef unsigned int kmem_bufctl_t;
#endif /* !__ASSEMBLY__ */ #endif /* !__ASSEMBLY__ */
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
......
...@@ -51,8 +51,6 @@ typedef u64 dma_addr_t; ...@@ -51,8 +51,6 @@ typedef u64 dma_addr_t;
typedef u64 sector_t; typedef u64 sector_t;
#define HAVE_SECTOR_T #define HAVE_SECTOR_T
typedef unsigned short kmem_bufctl_t;
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
......
...@@ -58,8 +58,6 @@ typedef unsigned long long u64; ...@@ -58,8 +58,6 @@ typedef unsigned long long u64;
typedef u32 dma_addr_t; typedef u32 dma_addr_t;
typedef unsigned int kmem_bufctl_t;
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#endif #endif
......
...@@ -189,6 +189,7 @@ ...@@ -189,6 +189,7 @@
* is less than 512 (PAGE_SIZE<<3), but greater than 256. * is less than 512 (PAGE_SIZE<<3), but greater than 256.
*/ */
typedef unsigned int kmem_bufctl_t;
#define BUFCTL_END (((kmem_bufctl_t)(~0U))-0) #define BUFCTL_END (((kmem_bufctl_t)(~0U))-0)
#define BUFCTL_FREE (((kmem_bufctl_t)(~0U))-1) #define BUFCTL_FREE (((kmem_bufctl_t)(~0U))-1)
#define SLAB_LIMIT (((kmem_bufctl_t)(~0U))-2) #define SLAB_LIMIT (((kmem_bufctl_t)(~0U))-2)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment