CPU_UP

Category
아이템: CPU(119)
포스트 갯수1

특정 CPU를 끄는 패치(특정 CPU에서 커널 크래시)

By Guillermo Austin Kim | 2017년 12월 24일 | 
가끔 타겟 보드에서 특정 CPU에서만 커널 패닉으로 시스템이 리셋되는 경우가 있어요.이럴 때 테스트할 수 있는 유용한 디버깅 패치를 소개하고자 해요. 아래 패치는 부팅 할 때 CPU3을 sys node에서 아예 제거시키거든요. 아예 CPU3가 안 돌게 되는거죠.diff --git a/kernel/cpu.c b/kernel/cpu.cindex 5b4440d..14cce91 100644--- a/kernel/cpu.c+++ b/kernel/cpu.c@@ -510,7 +510,7 @@ static int _cpu_up(unsigned int cpu, int tasks_frozen) cpu_hotplug_begin(); - if (cpu_online(cpu) || !cpu_presen