Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 259148
b: refs/heads/master
c: 3160b09
h: refs/heads/master
v: v3
  • Loading branch information
Becky Bruce authored and Kumar Gala committed Jul 8, 2011
1 parent 35ddf0a commit 1728979
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f6ad160e6f4f4d6933eeb82a2bfa25ea008585f0
refs/heads/master: 3160b09796129abc9523ea3cd1633b0faba64a02
5 changes: 5 additions & 0 deletions trunk/arch/powerpc/include/asm/mmu.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@
#ifndef __ASSEMBLY__
#include <asm/cputable.h>

#ifdef CONFIG_PPC_FSL_BOOK3E
#include <asm/percpu.h>
DECLARE_PER_CPU(int, next_tlbcam_idx);
#endif

static inline int mmu_has_feature(unsigned long feature)
{
return (cur_cpu_spec->mmu_features & feature);
Expand Down
4 changes: 4 additions & 0 deletions trunk/arch/powerpc/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,10 @@ struct thread_info *current_set[NR_CPUS];
static void __devinit smp_store_cpu_info(int id)
{
per_cpu(cpu_pvr, id) = mfspr(SPRN_PVR);
#ifdef CONFIG_PPC_FSL_BOOK3E
per_cpu(next_tlbcam_idx, id)
= (mfspr(SPRN_TLB1CFG) & TLBnCFG_N_ENTRY) - 1;
#endif
}

void __init smp_prepare_cpus(unsigned int max_cpus)
Expand Down
9 changes: 9 additions & 0 deletions trunk/arch/powerpc/mm/mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,15 @@ void __init mem_init(void)
}
#endif /* CONFIG_HIGHMEM */

#if defined(CONFIG_PPC_FSL_BOOK3E) && !defined(CONFIG_SMP)
/*
* If smp is enabled, next_tlbcam_idx is initialized in the cpu up
* functions.... do it here for the non-smp case.
*/
per_cpu(next_tlbcam_idx, smp_processor_id()) =
(mfspr(SPRN_TLB1CFG) & TLBnCFG_N_ENTRY) - 1;
#endif

printk(KERN_INFO "Memory: %luk/%luk available (%luk kernel code, "
"%luk reserved, %luk data, %luk bss, %luk init)\n",
nr_free_pages() << (PAGE_SHIFT-10),
Expand Down
6 changes: 6 additions & 0 deletions trunk/arch/powerpc/mm/tlb_nohash.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ unsigned long linear_map_top; /* Top of linear mapping */

#endif /* CONFIG_PPC64 */

#ifdef CONFIG_PPC_FSL_BOOK3E
/* next_tlbcam_idx is used to round-robin tlbcam entry assignment */
DEFINE_PER_CPU(int, next_tlbcam_idx);
EXPORT_PER_CPU_SYMBOL(next_tlbcam_idx);
#endif

/*
* Base TLB flushing operations:
*
Expand Down

0 comments on commit 1728979

Please sign in to comment.