Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 212897
b: refs/heads/master
c: 55fd766
h: refs/heads/master
i:
  212895: fe88583
v: v3
  • Loading branch information
Kumar Gala committed Oct 14, 2010
1 parent a6d7a7a commit d6eab55
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 11 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: 988cf86d4f0da4150e808300c145ba87c0aad02f
refs/heads/master: 55fd766b5fad8240b7a6e994b5779a46d28f73d4
4 changes: 2 additions & 2 deletions trunk/arch/powerpc/kernel/asm-offsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
#endif
#endif

#if defined(CONFIG_FSL_BOOKE)
#if defined(CONFIG_PPC_FSL_BOOK3E)
#include "../mm/mmu_decl.h"
#endif

Expand Down Expand Up @@ -470,7 +470,7 @@ int main(void)
DEFINE(PGD_T_LOG2, PGD_T_LOG2);
DEFINE(PTE_T_LOG2, PTE_T_LOG2);
#endif
#ifdef CONFIG_FSL_BOOKE
#ifdef CONFIG_PPC_FSL_BOOK3E
DEFINE(TLBCAM_SIZE, sizeof(struct tlbcam));
DEFINE(TLBCAM_MAS0, offsetof(struct tlbcam, MAS0));
DEFINE(TLBCAM_MAS1, offsetof(struct tlbcam, MAS1));
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/mm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ obj-$(CONFIG_PPC_STD_MMU) += hash_low_$(CONFIG_WORD_SIZE).o \
mmu_context_hash$(CONFIG_WORD_SIZE).o
obj-$(CONFIG_40x) += 40x_mmu.o
obj-$(CONFIG_44x) += 44x_mmu.o
obj-$(CONFIG_FSL_BOOKE) += fsl_booke_mmu.o
obj-$(CONFIG_PPC_FSL_BOOK3E) += fsl_booke_mmu.o
obj-$(CONFIG_NEED_MULTIPLE_NODES) += numa.o
obj-$(CONFIG_PPC_MM_SLICES) += slice.o
ifeq ($(CONFIG_HUGETLB_PAGE),y)
Expand Down
12 changes: 7 additions & 5 deletions trunk/arch/powerpc/mm/fsl_booke_mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,6 @@

unsigned int tlbcam_index;


#if defined(CONFIG_LOWMEM_CAM_NUM_BOOL) && (CONFIG_LOWMEM_CAM_NUM >= NUM_TLBCAMS)
#error "LOWMEM_CAM_NUM must be less than NUM_TLBCAMS"
#endif

#define NUM_TLBCAMS (64)
struct tlbcam TLBCAM[NUM_TLBCAMS];

Expand Down Expand Up @@ -185,6 +180,12 @@ unsigned long map_mem_in_cams(unsigned long ram, int max_cam_idx)
return amount_mapped;
}

#ifdef CONFIG_PPC32

#if defined(CONFIG_LOWMEM_CAM_NUM_BOOL) && (CONFIG_LOWMEM_CAM_NUM >= NUM_TLBCAMS)
#error "LOWMEM_CAM_NUM must be less than NUM_TLBCAMS"
#endif

unsigned long __init mmu_mapin_ram(unsigned long top)
{
return tlbcam_addrs[tlbcam_index - 1].limit - PAGE_OFFSET + 1;
Expand Down Expand Up @@ -216,3 +217,4 @@ void __init adjust_total_lowmem(void)

__initial_memory_limit_addr = memstart_addr + __max_low_memory;
}
#endif
5 changes: 4 additions & 1 deletion trunk/arch/powerpc/mm/mmu_decl.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,13 @@ extern void wii_memory_fixups(void);
extern void MMU_init_hw(void);
extern unsigned long mmu_mapin_ram(unsigned long top);

#elif defined(CONFIG_FSL_BOOKE)
#elif defined(CONFIG_PPC_FSL_BOOK3E)
extern unsigned long map_mem_in_cams(unsigned long ram, int max_cam_idx);
#ifdef CONFIG_PPC32
extern void MMU_init_hw(void);
extern unsigned long mmu_mapin_ram(unsigned long top);
extern void adjust_total_lowmem(void);
#endif
extern void loadcam_entry(unsigned int index);

struct tlbcam {
Expand Down
14 changes: 14 additions & 0 deletions trunk/arch/powerpc/mm/tlb_nohash.c
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,20 @@ static void __early_init_mmu(int boot_cpu)
*/
linear_map_top = memblock_end_of_DRAM();

#ifdef CONFIG_PPC_FSL_BOOK3E
if (mmu_has_feature(MMU_FTR_TYPE_FSL_E)) {
unsigned int num_cams;

/* use a quarter of the TLBCAM for bolted linear map */
num_cams = (mfspr(SPRN_TLB1CFG) & TLBnCFG_N_ENTRY) / 4;
linear_map_top = map_mem_in_cams(linear_map_top, num_cams);

/* limit memory so we dont have linear faults */
memblock_enforce_memory_limit(linear_map_top);
memblock_analyze();
}
#endif

/* A sync won't hurt us after mucking around with
* the MMU configuration
*/
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/mm/tlb_nohash_low.S
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ _GLOBAL(set_context)
#error Unsupported processor type !
#endif

#if defined(CONFIG_FSL_BOOKE)
#if defined(CONFIG_PPC_FSL_BOOK3E)
/*
* extern void loadcam_entry(unsigned int index)
*
Expand Down

0 comments on commit d6eab55

Please sign in to comment.