Lines Matching +full:- +full:affinity

2 Asymmetric 32-bit SoCs
7 This document describes the impact of asymmetric 32-bit SoCs on the
8 execution of 32-bit (``AArch32``) applications.
10 Date: 2021-05-17
16 of the CPUs are capable of executing 32-bit user applications. On such
19 ``execve(2)`` of 32-bit ELF binaries, with the latter returning
20 ``-ENOEXEC``. If the mismatch is detected during late onlining of a
21 64-bit-only CPU, then the onlining operation fails and the new CPU is
25 running legacy 32-bit binaries. Unsurprisingly, that doesn't work very
28 It seems inevitable that future SoCs will drop 32-bit support
30 run 32-bit code on one of these transitionary platforms then you would
38 allowing 32-bit tasks to run on an asymmetric 32-bit system requires an
39 explicit "opt-in" and can be enabled by passing the
40 ``allow_mismatched_32bit_el0`` parameter on the kernel command-line.
43 system* to mean an asymmetric 32-bit SoC running Linux with this kernel
44 command-line option enabled.
49 32-bit tasks running on an asymmetric system behave in mostly the same
51 CPU affinity.
54 -----
56 The subset of CPUs capable of running 32-bit tasks is described in
58 ``Documentation/ABI/testing/sysfs-devices-system-cpu``.
61 late-onlining of 32-bit-capable CPUs can result in the file contents
66 -------------
68 On a homogeneous system, the CPU affinity of a task is preserved across
70 specifically when the new program being executed is 32-bit yet the
71 affinity mask contains 64-bit-only CPUs. In this situation, the kernel
72 determines the new affinity mask as follows:
74 1. If the 32-bit-capable subset of the affinity mask is not empty,
75 then the affinity is restricted to that subset and the old affinity
77 preserved across ``execve(2)`` of 32-bit programs.
83 ancestor is found containing at least one 32-bit-capable CPU. The
84 affinity of the task is then changed to match the 32-bit-capable
87 3. On failure (i.e. out of memory), the affinity is changed to the set
88 of all 32-bit-capable CPUs of which the kernel is aware.
90 A subsequent ``execve(2)`` of a 64-bit program by the 32-bit task will
91 invalidate the affinity mask saved in (1) and attempt to restore the CPU
92 affinity of the task using the saved mask if it was previously valid.
95 with the affinity unchanged.
97 Calls to ``sched_setaffinity(2)`` for a 32-bit task will consider only
98 the 32-bit-capable CPUs of the requested affinity mask. On success, the
99 affinity for the task is updated and any saved mask from a prior
103 ------------------
105 Explicit admission of a 32-bit deadline task to the default root domain
107 32-bit system unless admission control is disabled by writing -1 to
110 ``execve(2)`` of a 32-bit program from a 64-bit deadline task will
111 return ``-ENOEXEC`` if the root domain for the task contains any
112 64-bit-only CPUs and admission control is enabled. Concurrent offlining
113 of 32-bit-capable CPUs may still necessitate the procedure described in
117 **Note:** It is recommended that a set of 32-bit-capable CPUs are placed
119 32-bit tasks on an asymmetric system. Failure to do so is likely to
123 -------
125 The affinity of a 32-bit task on an asymmetric system may include CPUs
129 - A 64-bit task attached to a cpuset which allows only 64-bit CPUs
130 executes a 32-bit program.
132 - All of the 32-bit-capable CPUs allowed by a cpuset containing a
133 32-bit task are offlined.
135 In both of these cases, the new affinity is calculated according to step
140 -----------
142 On an asymmetric system, the first detected 32-bit-capable CPU is
144 return ``-EPERM``. Note that suspend is still permitted even if the
145 primary CPU (i.e. CPU 0) is 64-bit-only.
148 ---
150 Although KVM will not advertise 32-bit EL0 support to any vCPUs on an
152 32-bit code at EL0. In this case, an exit from a vCPU thread in 32-bit
154 ``KVM_EXIT_FAIL_ENTRY`` and will remain non-runnable until successfully
155 re-initialised by a subsequent ``KVM_ARM_VCPU_INIT`` operation.