Skip to contentSkip to conversation

powerpc/fsl-booke: Allow use of all CAMs

PATCH New Aaron Sierra 1 participant 1 message Oct 8, 2013 1 message not in the archive PowerPC

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 311159b6-bdfd-4c6f-96a5-9147fa5cf682@zimbra

#1 lore raw

PATCH 1/2 powerpc/fsl-booke: Allow use of all CAMs

CONFIG_LOWMEM_CAM_NUM was unnecessarily restricted to one fewer than NUM_TLBCAMS. However, all comparisons to CONFIG_LOWMEM_CAM_NUM are "less than" tests, so comparing 0-based CAM indexes to the maximum number of CAMs is safe.

---
 arch/powerpc/mm/fsl_booke_mmu.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/mm/fsl_booke_mmu.c +2 -2
index 07ba45b..92685d8 100644
@@ -197,8 +197,8 @@ unsigned long map_mem_in_cams(unsigned long ram, int max_cam_idx)
 
 #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"
+#if defined(CONFIG_LOWMEM_CAM_NUM_BOOL) && (CONFIG_LOWMEM_CAM_NUM > NUM_TLBCAMS)
+#error "LOWMEM_CAM_NUM must not exceed NUM_TLBCAMS"
 #endif
 
 unsigned long __init mmu_mapin_ram(unsigned long top)
Signature · 1 line
1.7.9.5