when cpus are paused (spinning) in DDB, call x86_pause() in the loop,
hopefully this can reduce power usage while doing nothing. ok chs@ XXX: pullup-* XXX: apply to i386
This commit is contained in:
parent
e3f649229b
commit
91637ac6c6
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: db_interface.c,v 1.41 2022/10/26 23:38:06 riastradh Exp $ */
|
||||
/* $NetBSD: db_interface.c,v 1.42 2023/07/31 02:38:16 mrg Exp $ */
|
||||
|
||||
/*
|
||||
* Mach Operating System
|
||||
|
@ -33,7 +33,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.41 2022/10/26 23:38:06 riastradh Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.42 2023/07/31 02:38:16 mrg Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_multiprocessor.h"
|
||||
|
@ -303,7 +303,7 @@ ddb_suspend(struct trapframe *frame)
|
|||
atomic_or_32(&ci->ci_flags, CPUF_PAUSE);
|
||||
|
||||
while (ci->ci_flags & CPUF_PAUSE)
|
||||
;
|
||||
x86_pause();
|
||||
ci->ci_ddb_regs = 0;
|
||||
tlbflushg();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue