Kernel Log – Coming in 3.7 (Part 5): CPU and platform code
by Thorsten Leemhuis
Linux 3.7 supports ARM64, the processor used in the Raspberry Pi, and Intel's SMAP security feature. The next kernel release will also include new tools for tracing processes and improved collaboration with Microsoft's hypervisor.
Reading between the lines in the release email for Linux 3.7-rc6, it seemed that everything was pointing to a release date for Linux 3.7 around the first weekend in December. The release email for the seventh pre-release version, by contrast, suggested that there perhaps might be a further release candidate after all. Each RC usually puts the final release date back by about a week, with further delays likely only if the kernel developers need to undertake extensive bugfix changes requiring a lengthy test phase.
The description of changes to the processor and platform code which follows, concludes our "Coming in 3.7" Kernel Log series. The first four articles in the series looked at changes merged into Linux 3.7 in the areas of filesystems and storage, networking, infrastructure and drivers.
The Linux kernel now supports the 64-bit ARM instruction set (see 1, 2, 3, 4 and others). The code for this instruction set, officially known as AArch64, has been largely developed by ARM staff and has been placed in a separate arch/arm64/ directory in the kernel source code, as suggested by a number of kernel developers when the code was first presented. This ensures that the code is separated from the code for 32-bit ARM processors. Support for 32- and 64-bit x86 and Power processors was also separated initially, before, in both cases, being combined at a later date. Some developers had therefore questioned the need to separate 32- and 64-bit ARM code, but in the end, the opinion of several leading ARM code developers that it was the best approach meant that it was indeed set up in this way. Linus Torvalds also appears to have had his reservations about the separation, as a comment in the release email for the first pre-release version of Linux 3.7 shows.
The "Coming in 3.7" series
The Kernel Log can already share an overview of the most important new features of Linux 3.7, expected to arrive in early December, since the kernel hackers have integrated all the major changes in the first two development weeks. Hence the 3.7 kernel is currently in its stabilisation phase, in which the kernel developers avoid big changes and focus on fixing bugs.
The articles on the changes and additions will discuss the kernel's various functional areas one by one:
When queried automatically using programs such as uname, however, the kernel returns the cumbersome "AArch64", rather than ARM64, as this is what is expected by other software involved in supporting the 64-bit ARM command set. This includes binutils, which has supported AArch64 since version 220.127.116.11.2. Glibc will support AArch64 from the forthcoming version 2.17, which is due for release shortly. AArch64 support has also been merged into the main GCC development tree and hence should be part of GCC 4.8.
The 64-bit-capable ARM instruction set was announced, alongside the ARMv8 micro-architecture, in autumn 2011. ARM has recently unveiled its first 64-bit processor cores in the form of the Cortex A53 and A57. A number of companies are intending to deploy these cores, with AppliedMicro having already implemented an ARMv8 core in an FPGA and promising the first X-Gene chips before the year is out. The company is working with ARM and Red Hat on a server distribution containing ARM64 Linux. A Linaro working group involving several companies in addition to the above trio is also working on technologies for such a distribution.
In the short term, far more important for ARM Linux than 64-bit ARM support is the multi-platform support merged into Linux 3.7. It allows the creation of a kernel image able to run on a range of different 32-bit ARM platforms. In 3.7, this kernel image supports Highbank, Mvebu, Picoxcell, Socfpga and Vexpress. Code from further platforms will be converted for subsequent kernel versions, with the goal of having a kernel image able to run on many different ARM platforms, just as is normal in the x86 world. This was one of the objectives of the extensive tidying up and restructuring work that the Linux ARM development team has been working on for some time now. Background information on this project can be found in this LWN.net article and in a video of a presentation by Linaro developer Arnd Bergmann (which explores multi-platform support from the 26:15 mark).