kprintf: only call eventfd() if it is safe to interrupt
Missing ARM64 implementation, cannot test right now Change-Id: Ia05e8b7952b19bcd8fdac1f920d9bfe341be8b97
This commit is contained in:
committed by
Dominique Martinet
parent
6df4bd8f8c
commit
ad2cb6375a
@@ -84,7 +84,8 @@ void kputs(char *buf)
|
||||
debug_spin_unlock_irqrestore(&kmsg_buf->lock, flags_inner);
|
||||
kprintf_unlock(flags_outer);
|
||||
|
||||
if (DEBUG_KMSG_USED > IHK_KMSG_HIGH_WATER_MARK) {
|
||||
if (irqflags_can_interrupt(flags_outer) &&
|
||||
DEBUG_KMSG_USED > IHK_KMSG_HIGH_WATER_MARK) {
|
||||
eventfd(IHK_OS_EVENTFD_TYPE_KMSG);
|
||||
ihk_mc_delay_us(IHK_KMSG_NOTIFY_DELAY);
|
||||
}
|
||||
@@ -123,8 +124,8 @@ int __kprintf(const char *format, ...)
|
||||
}
|
||||
|
||||
debug_spin_unlock_irqrestore(&kmsg_buf->lock, flags_inner);
|
||||
|
||||
if (DEBUG_KMSG_USED > IHK_KMSG_HIGH_WATER_MARK) {
|
||||
if (irqflags_can_interrupt(flags_inner) &&
|
||||
DEBUG_KMSG_USED > IHK_KMSG_HIGH_WATER_MARK) {
|
||||
eventfd(IHK_OS_EVENTFD_TYPE_KMSG);
|
||||
ihk_mc_delay_us(IHK_KMSG_NOTIFY_DELAY);
|
||||
}
|
||||
@@ -165,7 +166,8 @@ int kprintf(const char *format, ...)
|
||||
debug_spin_unlock_irqrestore(&kmsg_buf->lock, flags_inner);
|
||||
kprintf_unlock(flags_outer);
|
||||
|
||||
if (DEBUG_KMSG_USED > IHK_KMSG_HIGH_WATER_MARK) {
|
||||
if (irqflags_can_interrupt(flags_outer) &&
|
||||
DEBUG_KMSG_USED > IHK_KMSG_HIGH_WATER_MARK) {
|
||||
eventfd(IHK_OS_EVENTFD_TYPE_KMSG);
|
||||
ihk_mc_delay_us(IHK_KMSG_NOTIFY_DELAY);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user