|
4 | 4 | set -euo pipefail |
5 | 5 |
|
6 | 6 | function install_dependencies { |
7 | | - apt update |
8 | | - apt install -y bc flex bison gcc make libelf-dev libssl-dev squashfs-tools busybox-static tree cpio curl patch |
| 7 | + if command -v apt >/dev/null 2>&1; then |
| 8 | + apt update |
| 9 | + apt install -y bc flex bison gcc make libelf-dev libssl-dev squashfs-tools busybox-static tree cpio curl patch |
| 10 | + else |
| 11 | + echo "apt not available; skipping dependency installation" |
| 12 | + fi |
9 | 13 | } |
10 | 14 |
|
11 | 15 | # From above mentioned script |
@@ -49,16 +53,20 @@ function build_version { |
49 | 53 | + |
50 | 54 | + pr_info("fpu: copy_uabi_to_xstate hdr.xfeatures=%#llx hdr.xcomp_bv=%#llx fpstate->header=%#llx xcr0=%#llx\n", |
51 | 55 | + hdr.xfeatures, hdr.xcomp_bv, fpstate->regs.xsave.header.xfeatures, |
52 | | -+ this_cpu_read(x86_xcr0)); |
| 56 | ++ xgetbv(XCR_XFEATURE_ENABLED_MASK)); |
53 | 57 | *** arch/x86/kernel/fpu/core.c |
54 | 58 | @@ |
| 59 | +-#include <asm/irq_regs.h> |
| 60 | ++#include <asm/irq_regs.h> |
| 61 | ++#include <asm/fpu/xcr.h> |
| 62 | +@@ |
55 | 63 | -void restore_fpregs_from_fpstate(struct fpstate *fpstate, u64 mask) |
56 | 64 | -{ |
57 | 65 | +void restore_fpregs_from_fpstate(struct fpstate *fpstate, u64 mask) |
58 | 66 | +{ |
59 | 67 | + pr_info("fpu: restore_fpregs_from_fpstate mask=%#llx fpstate->header=%#llx xcr0=%#llx\n", |
60 | 68 | + mask, fpstate->regs.xsave.header.xfeatures, |
61 | | -+ this_cpu_read(x86_xcr0)); |
| 69 | ++ xgetbv(XCR_XFEATURE_ENABLED_MASK)); |
62 | 70 | *** |
63 | 71 | EOF |
64 | 72 |
|
|
0 commit comments