惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园_首页
C
Check Point Blog
B
Blog RSS Feed
G
Google Developers Blog
H
Help Net Security
博客园 - Franky
Blog — PlanetScale
Blog — PlanetScale
H
Hackread – Cybersecurity News, Data Breaches, AI and More
量子位
Recent Announcements
Recent Announcements
B
Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
D
DataBreaches.Net
小众软件
小众软件
T
The Blog of Author Tim Ferriss
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
MongoDB | Blog
MongoDB | Blog
Y
Y Combinator Blog
T
Tailwind CSS Blog
J
Java Code Geeks
MyScale Blog
MyScale Blog
雷峰网
雷峰网
有赞技术团队
有赞技术团队
博客园 - 聂微东

博客园 - 什么都没有

rk3588 docker 安装 rk3568 ubuntu20.04 oop问题分析 rk3288 buildroot 编译webkit yocto简介 linux 调试串口测试程序(pc与开发板通信) spin_lock spin_lock_irq spin_lock_irqsave linux 进程读书笔记 linux kvm源码分析 虚拟化技术慢谈 linux中断子系统 注释规范 linux下C获取文件的大小 imx6 工具链下载地址 程序、任务、进程和线程的联系与区别 linux下socket connect 阻塞方式 阻塞时间控制 实时操作系统性能指标 这段代码可以,佩服作者 imx6 gpio irq imx6sl 调试记录
INIT: version 2.88 booting
什么都没有 · 2019-10-15 · via 博客园 - 什么都没有

发现调试串口启动时,INIT: 卡了30s, version 2.88 booting 又卡了30s,通过分析sysvinit代码发现串口执行close时,阻塞到tx_empty函数,在串口驱动中添加uart_update_timeout(port, termios->c_cflag, baud);即可解决这个问题。

下面是具体的分析流程

串口执行close时,最后调用

    while (!port->ops->tx_empty(port)) {
        msleep_interruptible(jiffies_to_msecs(char_time));
        if (signal_pending(current))
            break;
        if (time_after(jiffies, expire))
            break;
    }

这个msleep_interruptible就是导致那个30s