Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e18b890b authored by Christoph Lameter's avatar Christoph Lameter Committed by Linus Torvalds
Browse files

[PATCH] slab: remove kmem_cache_t



Replace all uses of kmem_cache_t with struct kmem_cache.

The patch was generated using the following script:

	#!/bin/sh
	#
	# Replace one string by another in all the kernel sources.
	#

	set -e

	for file in `find * -name "*.c" -o -name "*.h"|xargs grep -l $1`; do
		quilt add $file
		sed -e "1,\$s/$1/$2/g" $file >/tmp/$$
		mv /tmp/$$ $file
		quilt refresh
	done

The script was run like this

	sh replace kmem_cache_t "struct kmem_cache"

Signed-off-by: default avatarChristoph Lameter <clameter@sgi.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 441e143e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -77,7 +77,7 @@ To get this part of the dma_ API, you must #include <linux/dmapool.h>
Many drivers need lots of small dma-coherent memory regions for DMA
descriptors or I/O buffers.  Rather than allocating in units of a page
or more using dma_alloc_coherent(), you can use DMA pools.  These work
much like a kmem_cache_t, except that they use the dma-coherent allocator
much like a struct kmem_cache, except that they use the dma-coherent allocator
not __get_free_pages().  Also, they understand common hardware constraints
for alignment, like queue heads needing to be aligned on N byte boundaries.

@@ -94,7 +94,7 @@ The pool create() routines initialize a pool of dma-coherent buffers
for use with a given device.  It must be called in a context which
can sleep.

The "name" is for diagnostics (like a kmem_cache_t name); dev and size
The "name" is for diagnostics (like a struct kmem_cache name); dev and size
are like what you'd pass to dma_alloc_coherent().  The device's hardware
alignment requirement for this type of data is "align" (which is expressed
in bytes, and must be a power of two).  If your device has no boundary
+2 −2
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@

/* io map for dma */
static void __iomem *dma_base;
static kmem_cache_t *dma_kmem;
static struct kmem_cache *dma_kmem;

struct s3c24xx_dma_selection dma_sel;

@@ -1271,7 +1271,7 @@ struct sysdev_class dma_sysclass = {

/* kmem cache implementation */

static void s3c2410_dma_cache_ctor(void *p, kmem_cache_t *c, unsigned long f)
static void s3c2410_dma_cache_ctor(void *p, struct kmem_cache *c, unsigned long f)
{
	memset(p, 0, sizeof(struct s3c2410_dma_buf));
}
+3 −3
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@

#define MEMC_TABLE_SIZE (256*sizeof(unsigned long))

kmem_cache_t *pte_cache, *pgd_cache;
struct kmem_cache *pte_cache, *pgd_cache;
int page_nr;

/*
@@ -162,12 +162,12 @@ void __init create_memmap_holes(struct meminfo *mi)
{
}

static void pte_cache_ctor(void *pte, kmem_cache_t *cache, unsigned long flags)
static void pte_cache_ctor(void *pte, struct kmem_cache *cache, unsigned long flags)
{
	memzero(pte, sizeof(pte_t) * PTRS_PER_PTE);
}

static void pgd_cache_ctor(void *pgd, kmem_cache_t *cache, unsigned long flags)
static void pgd_cache_ctor(void *pgd, struct kmem_cache *cache, unsigned long flags)
{
	memzero(pgd + MEMC_TABLE_SIZE, USER_PTRS_PER_PGD * sizeof(pgd_t));
}
+3 −3
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@
#include <asm/cacheflush.h>

pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__((aligned(PAGE_SIZE)));
kmem_cache_t *pgd_cache;
struct kmem_cache *pgd_cache;

pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address)
{
@@ -100,7 +100,7 @@ static inline void pgd_list_del(pgd_t *pgd)
		set_page_private(next, (unsigned long) pprev);
}

void pgd_ctor(void *pgd, kmem_cache_t *cache, unsigned long unused)
void pgd_ctor(void *pgd, struct kmem_cache *cache, unsigned long unused)
{
	unsigned long flags;

@@ -120,7 +120,7 @@ void pgd_ctor(void *pgd, kmem_cache_t *cache, unsigned long unused)
}

/* never called when PTRS_PER_PMD > 1 */
void pgd_dtor(void *pgd, kmem_cache_t *cache, unsigned long unused)
void pgd_dtor(void *pgd, struct kmem_cache *cache, unsigned long unused)
{
	unsigned long flags; /* can be called from interrupt context */

+2 −2
Original line number Diff line number Diff line
@@ -699,8 +699,8 @@ int remove_memory(u64 start, u64 size)
#endif
#endif

kmem_cache_t *pgd_cache;
kmem_cache_t *pmd_cache;
struct kmem_cache *pgd_cache;
struct kmem_cache *pmd_cache;

void __init pgtable_cache_init(void)
{
Loading