Linux – Why does Linux on sparc64 architecture use 32-bit pointers in user-space and 64-bit pointers in kernel-space

64bitkernellinuxlinux-kernel

What are the advantages of deviating from the norm; that is 64-bit pointers in both user and kernel space for a 64-bit architecture?

Reference: http://lwn.net/images/pdf/LDD3/ch11.pdf (Page 2)

Best Answer

Compatibility.

First, note that Sun's 64-bit support goes back to 1998, with Solaris 7, well before AMD64 and even Itanium had OS support. By supporting both 32-bit and 64-bit in userland, you could let the vast majority of software run completely unchanged.

Check out the Solaris 64-bit Developer's guide (dated 2005). First, it notes that there are really 2 separate systems:

The Solaris operating environment supports two first-class ABIs simultaneously. In other words, two separate, fully functional system call paths connect into the 64–bit kernel. Two sets of libraries support applications.

and then repeatedly emphasizes that if you've got good old C-code that assumes it's 32-bit, it'll work just fine - even continue to build just fine, as if nothing's changed:

As discussed in Getting Past the 4 Gigabyte Barrier, most 32-bit applications run unchanged in the Solaris 64-bit operating environment.

...

Source level compatibility has been maintained for 32-bit applications. For 64-bit applications, the principal changes that have been made are with respect to the derived types used in the application programming interface.

Successful tech transitions are usually accompanied by quirky hybrids and chimeras that sometimes live past their usefulness.

Related Question