在全志R16的tinav2.1系统下关闭CPU的hotplug的打印(分色排版)
来源:互联网 发布:zodgame账号淘宝 编辑:程序博客网 时间:2024/05/29 16:29
在全志R16的tinav2.1系统下关闭CPU的hotplug的打印
2017/9/5 17:27
版本:V1.0
1、全志R16的tinav2.1系统下,在串口中经常会显示CPU热插拔hotplug的打印,并且不停地显示:
[ 2842.461841] [hotplug]: cpu(0) try to kill cpu(1)
[ 2842.468034] [hotplug]: cpu1 is killed! .
[ 2842.510453] CPU1: Booted secondary processor
[ 2842.530462] CPU2: Booted secondary processor
[ 2844.036078] CPU2: shutdown
[ 2844.040645] [hotplug]: cpu(0) try to kill cpu(2)
[ 2844.047033] [hotplug]: cpu2 is killed! .
[ 2844.076101] CPU1: shutdown
2、查找并关闭:热插拔hotplug的打印
rootroot@cm-System-Product-Name:~$ cd /home/wwt
rootroot@cm-System-Product-Name:/home/wwt$
rootroot@cm-System-Product-Name:/home/wwt$ tar zxvf r16_tinav2.1_csdn_20170901_1040.tar.gz
rootroot@cm-System-Product-Name:/home/wwt$ mv tina openmp_csdn_tinav2.1
rootroot@cm-System-Product-Name:/home/wwt$ cd openmp_csdn_tinav2.1/lichee/linux-3.4/
rootroot@cm-System-Product-Name:/home/wwt/openmp_csdn_tinav2.1/lichee/linux-3.4$grep "Booted secondary processor" . -R
grep: ./.git/svn: 没有那个文件或目录
./arch/arm/kernel/smp.c:printk("CPU%u: Booted secondary processor\n", cpu);
rootroot@cm-System-Product-Name:/home/wwt/openmp_csdn_tinav2.1/lichee/linux-3.4$
rootroot@cm-System-Product-Name:/home/wwt/openmp_csdn_tinav2.1/lichee/linux-3.4$
rootroot@cm-System-Product-Name:/home/wwt/openmp_csdn_tinav2.1/lichee/linux-3.4$grep "is killed!" . -R
grep: ./.git/svn: 没有那个文件或目录
./arch/arm/mach-sunxi/sun8iw6-mcpm.c: pr_debug("sun8i hotplug: cpu:%d is killed!\n", cpu);
./arch/arm/mach-sunxi/sun8i-mcpm.c: pr_debug("sun8i hotplug: cpu:%d is killed!\n", cpu);
./arch/arm/mach-sunxi/sunxi-hotplug.c:pr_info("[hotplug]: cpu%d is killed! .\n", cpu);
./arch/arm/mach-sunxi/sun9i-mcpm.c: pr_debug("sun9i hotplug: cpu:%d is killed!\n", cpu);
rootroot@cm-System-Product-Name:/home/wwt/openmp_csdn_tinav2.1/lichee/linux-3.4$
很容易找到这里:
W:\openmp_csdn_tinav2.1\lichee\linux-3.4\arch\arm\kernel\smp.c
/*
* called on the thread which is asking for a CPU to be shutdown -
* waits until shutdown has completed, or it is timed out.
*/
void __cpuinit __cpu_die(unsigned int cpu)
{
if (!wait_for_completion_timeout(&cpu_died, msecs_to_jiffies(5000))) {
pr_err("CPU%u: cpu didn't die\n", cpu);
return;
}
//printk(KERN_NOTICE "CPU%u: shutdown\n", cpu);
if (!platform_cpu_kill(cpu))
printk("CPU%u: unable to kill\n", cpu);
}
/*
* This is the secondary CPU boot entry. We're using this CPUs
* idle thread stack, but a set of temporary page tables.
*/
asmlinkage void __cpuinit secondary_start_kernel(void)
{
struct mm_struct *mm = &init_mm;
unsigned int cpu;
/*
* The identity mapping is uncached (strongly ordered), so
* switch away from it before attempting any exclusive accesses.
*/
cpu_switch_mm(mm->pgd, mm);
enter_lazy_tlb(mm, current);
local_flush_tlb_all();
/*
* All kernel threads share the same mm context; grab a
* reference and switch to it.
*/
cpu = smp_processor_id();
atomic_inc(&mm->mm_count);
current->active_mm = mm;
cpumask_set_cpu(cpu, mm_cpumask(mm));
//printk("CPU%u: Booted secondary processor\n", cpu);
cpu_init();
preempt_disable();
trace_hardirqs_off();
/*
* Give the platform a chance to do its own initialisation.
*/
platform_secondary_init(cpu);
notify_cpu_starting(cpu);
calibrate_delay();
smp_store_cpu_info(cpu);
/*
* OK, now it's safe to let the boot CPU continue. Wait for
* the CPU migration code to notice that the CPU is online
* before we continue - which happens after __cpu_up returns.
*/
set_cpu_online(cpu, true);
complete(&cpu_running);
local_irq_enable();
local_fiq_enable();
/*
* OK, it's off to the idle thread for us
*/
cpu_idle();
}
W:\openmp_csdn_tinav2.1\lichee\linux-3.4\arch\arm\mach-sunxi\sunxi-hotplug.c
int sunxi_cpu_kill(unsigned int cpu)
{
int k;
int tmp_cpu = get_cpu();
put_cpu();
//pr_info("[hotplug]: cpu(%d) try to kill cpu(%d)\n", tmp_cpu, cpu);
for (k = 0; k < 1000; k++) {
if (cpumask_test_cpu(cpu, &dead_cpus) && IS_WFI_MODE(cpu)) {
/* power-off cpu */
disable_cpu(cpu);
//pr_info("[hotplug]: cpu%d is killed! .\n", cpu);
return 1;
}
mdelay(1);
}
pr_err("[hotplug]: try to kill cpu:%d failed!\n", cpu);
return 0;
}
3、现在编译打包刷机之后就不会看见讨厌的多核CPU的热插拔hotplug的打印
rootroot@cm-System-Product-Name:/home/wwt/openmp_csdn_tinav2.1$ make -j12
rootroot@cm-System-Product-Name:/home/wwt/openmp_csdn_tinav2.1$ pack -d
- 在全志R16的tinav2.1系统下关闭CPU的hotplug的打印(分色排版)
- 全志R16平台的tinav2.1系统关闭adb_shell的步骤(分色排版)
- 在全志R16平台的tinav2.1系统下点亮客户的RGB屏幕V1.0(分色排版)
- 新版本的全志R16平台的tinav2.1的系统打开softAP(分色排版)
- 如何调整全志R16平台在tinav2.1下的频率V1.0(分色排版)
- 00关闭全志r16平台tinav2.5系统多余的DEBUG(分色排版)V1.0
- 全志R16平台的tinav2.0系统下调通HM1375(分色排版)
- 全志R16的tinav2.1系统增加opencv2.4.9的库的步骤(分色排版)
- 全志R16平台配SPI的NOR FLASH的刷tinav2.1系统的解决过程(分色排版)
- 解决全志R16平台的新版本tinav2.1系统的PING自己的问题(分色排版)
- 旧版本版本的全志R16平台的tinav2.1的系统打开softAP(分色排版)
- 通过全志R16平台TINAV2.1下的LCD显示BMP图片(分色排版)V1.0版本
- 02全志R16平台tinav2.1系统下的开机自启动脚本的创建(分色排版)V1.1
- 全志r40平台的tinav2.1系统下的SATA验证(分色排版)
- 全志R116平台tinav2.1系统下的录音播音测试(分色排版)
- 全志R40平台的tinav2.1系统下打开SPI2接口(分色排版)
- Android6系统的R16设备烧录Tinav2.1系统失败的解决方法(分色排版)
- 全志R16平台的tinav2.1的系统和parrot v1.1的内核的合成(分色排版)V1.0
- Android5.0之Activity的转场动画
- 组arp头
- jQuery选择器
- 文章标题
- java 抽象类和接口和多态的使用
- 在全志R16的tinav2.1系统下关闭CPU的hotplug的打印(分色排版)
- 常见的软件开发模型[ZZ]
- Codeforces 852 G. Bathroom terminal(trie)
- git rebase命令解析
- ubuntu apache 安装 gd,imagick扩展
- LeetCode:58 Length of Last Word
- 迁移学习和fine-tuning
- mysql简单的存储过程
- HDU_1166_敌兵布阵