Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 55293
b: refs/heads/master
c: 8defab3
h: refs/heads/master
i:
  55291: d6b0a75
v: v3
  • Loading branch information
Christoph Lameter authored and Linus Torvalds committed May 9, 2007
1 parent 1cb785d commit abd7f74
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 34013886ef47ea72e412beb04558431b57a68d51
refs/heads/master: 8defab33774a5c33920196a2ee9c0a946d22ba67
6 changes: 3 additions & 3 deletions trunk/arch/frv/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ config TIME_LOW_RES
bool
default y

config ARCH_HAS_ILOG2_U32
config QUICKLIST
bool
default y

config ARCH_HAS_ILOG2_U64
config ARCH_HAS_ILOG2_U32
bool
default y

config ARCH_USES_SLAB_PAGE_STRUCT
config ARCH_HAS_ILOG2_U64
bool
default y

Expand Down
4 changes: 4 additions & 0 deletions trunk/arch/frv/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@
#include <linux/elf.h>
#include <linux/reboot.h>
#include <linux/interrupt.h>
#include <linux/pagemap.h>

#include <asm/asm-offsets.h>
#include <asm/uaccess.h>
#include <asm/system.h>
#include <asm/setup.h>
#include <asm/pgtable.h>
#include <asm/tlb.h>
#include <asm/gdb-stub.h>
#include <asm/mb-regs.h>

Expand Down Expand Up @@ -88,6 +90,8 @@ void cpu_idle(void)
while (!need_resched()) {
irq_stat[cpu].idle_timestamp = jiffies;

check_pgt_cache();

if (!frv_dma_inprogress && idle)
idle();
}
Expand Down
22 changes: 11 additions & 11 deletions trunk/arch/frv/mm/pgalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
#include <linux/slab.h>
#include <linux/mm.h>
#include <linux/highmem.h>
#include <linux/quicklist.h>
#include <asm/pgalloc.h>
#include <asm/page.h>
#include <asm/cacheflush.h>

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

pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address)
{
Expand Down Expand Up @@ -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, struct kmem_cache *cache, unsigned long unused)
void pgd_ctor(void *pgd)
{
unsigned long flags;

Expand All @@ -120,7 +120,7 @@ void pgd_ctor(void *pgd, struct kmem_cache *cache, unsigned long unused)
}

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

Expand All @@ -133,7 +133,7 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
{
pgd_t *pgd;

pgd = kmem_cache_alloc(pgd_cache, GFP_KERNEL);
pgd = quicklist_alloc(0, GFP_KERNEL, pgd_ctor);
if (!pgd)
return pgd;

Expand All @@ -143,15 +143,15 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
void pgd_free(pgd_t *pgd)
{
/* in the non-PAE case, clear_page_tables() clears user pgd entries */
kmem_cache_free(pgd_cache, pgd);
quicklist_free(0, pgd_dtor, pgd);
}

void __init pgtable_cache_init(void)
{
pgd_cache = kmem_cache_create("pgd",
PTRS_PER_PGD * sizeof(pgd_t),
PTRS_PER_PGD * sizeof(pgd_t),
SLAB_PANIC,
pgd_ctor,
pgd_dtor);
}

void check_pgt_cache(void)
{
quicklist_trim(0, pgd_dtor, 25, 16);
}

4 changes: 4 additions & 0 deletions trunk/include/asm-frv/tlb.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@

#include <asm/tlbflush.h>

#ifdef CONFIG_MMU
extern void check_pgt_cache(void);
#else
#define check_pgt_cache() do {} while(0)
#endif

/*
* we don't need any special per-pte or per-vma handling...
Expand Down

0 comments on commit abd7f74

Please sign in to comment.