Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/nohash: Remove DEBUG_HARDER

DEBUG_HARDER is not user selectable.

Remove it together with related messages.

Also remove two pr_devel() messages that should
likely have been pr_hard().

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/0f25109b0e12fdd1e6541dedbb2212cc53526a57.1622712515.git.christophe.leroy@csgroup.eu

authored by

Christophe Leroy and committed by
Michael Ellerman
e2c04316 a36c0faf

-32
-32
arch/powerpc/mm/nohash/mmu_context.c
··· 21 21 * also clear mm->cpu_vm_mask bits when processes are migrated 22 22 */ 23 23 24 - //#define DEBUG_HARDER 25 - 26 - /* We don't use DEBUG because it tends to be compiled in always nowadays 27 - * and this would generate way too much output 28 - */ 29 - #ifdef DEBUG_HARDER 30 - #define pr_hard(args...) printk(KERN_DEBUG args) 31 - #define pr_hardcont(args...) printk(KERN_CONT args) 32 - #else 33 - #define pr_hard(args...) do { } while(0) 34 - #define pr_hardcont(args...) do { } while(0) 35 - #endif 36 - 37 24 #include <linux/kernel.h> 38 25 #include <linux/mm.h> 39 26 #include <linux/init.h> ··· 114 127 id = FIRST_CONTEXT; 115 128 continue; 116 129 } 117 - pr_hardcont(" | steal %d from 0x%p", id, mm); 118 130 119 131 /* Mark this mm has having no context anymore */ 120 132 mm->context.id = MMU_NO_CONTEXT; ··· 155 169 /* Pick up the victim mm */ 156 170 mm = context_mm[id]; 157 171 158 - pr_hardcont(" | steal %d from 0x%p", id, mm); 159 - 160 172 /* Mark this mm as having no context anymore */ 161 173 mm->context.id = MMU_NO_CONTEXT; 162 174 if (id != FIRST_CONTEXT) { ··· 185 201 186 202 /* Pick up the victim mm */ 187 203 mm = context_mm[id]; 188 - 189 - pr_hardcont(" | steal %d from 0x%p", id, mm); 190 204 191 205 /* Flush the TLB for that context */ 192 206 local_flush_tlb_mm(mm); ··· 236 254 /* No lockless fast path .. yet */ 237 255 raw_spin_lock(&context_lock); 238 256 239 - pr_hard("[%d] activating context for mm @%p, active=%d, id=%d", 240 - cpu, next, next->context.active, next->context.id); 241 - 242 257 if (IS_ENABLED(CONFIG_SMP)) { 243 258 /* Mark us active and the previous one not anymore */ 244 259 next->context.active++; 245 260 if (prev) { 246 - pr_hardcont(" (old=0x%p a=%d)", prev, prev->context.active); 247 261 WARN_ON(prev->context.active < 1); 248 262 prev->context.active--; 249 263 } ··· 284 306 next_context = id + 1; 285 307 context_mm[id] = next; 286 308 next->context.id = id; 287 - pr_hardcont(" | new id=%d,nrf=%d", id, nr_free_contexts); 288 309 289 310 ctxt_ok: 290 311 ··· 291 314 * local TLB for it and unmark it before we use it 292 315 */ 293 316 if (IS_ENABLED(CONFIG_SMP) && test_bit(id, stale_map[cpu])) { 294 - pr_hardcont(" | stale flush %d [%d..%d]", 295 - id, cpu_first_thread_sibling(cpu), 296 - cpu_last_thread_sibling(cpu)); 297 - 298 317 local_flush_tlb_mm(next); 299 318 300 319 /* XXX This clear should ultimately be part of local_flush_tlb_mm */ ··· 302 329 } 303 330 304 331 /* Flick the MMU and release lock */ 305 - pr_hardcont(" -> %d\n", id); 306 332 if (IS_ENABLED(CONFIG_BDI_SWITCH)) 307 333 abatron_pteptrs[1] = next->pgd; 308 334 set_context(id, next->pgd); ··· 313 341 */ 314 342 int init_new_context(struct task_struct *t, struct mm_struct *mm) 315 343 { 316 - pr_hard("initing context for mm @%p\n", mm); 317 - 318 344 /* 319 345 * We have MMU_NO_CONTEXT set to be ~0. Hence check 320 346 * explicitly against context.id == 0. This ensures that we properly ··· 360 390 if (cpu == boot_cpuid) 361 391 return 0; 362 392 363 - pr_devel("MMU: Allocating stale context map for CPU %d\n", cpu); 364 393 stale_map[cpu] = kzalloc(CTX_MAP_SIZE, GFP_KERNEL); 365 394 return 0; 366 395 } ··· 370 401 if (cpu == boot_cpuid) 371 402 return 0; 372 403 373 - pr_devel("MMU: Freeing stale context map for CPU %d\n", cpu); 374 404 kfree(stale_map[cpu]); 375 405 stale_map[cpu] = NULL; 376 406