mirror of
https://github.com/rdmsr/zag.git
synced 2026-10-31 07:18:22 +00:00
ke: freeze CPUs on panic
This commit is contained in:
@@ -158,6 +158,10 @@ pub inline fn percpu_ptr_other(variable: anytype, id: u32) @TypeOf(variable) {
|
||||
return percpu_ptr_for(variable, id);
|
||||
}
|
||||
|
||||
pub inline fn halt() void {
|
||||
asm volatile ("hlt");
|
||||
}
|
||||
|
||||
pub inline fn percpu_ptr(variable: anytype) @TypeOf(variable) {
|
||||
const offset = asm volatile ("mov %%gs:(%[self]), %[out]"
|
||||
: [out] "=r" (-> u64),
|
||||
|
||||
Reference in New Issue
Block a user