live-bootstrap/sysa/linux-4.9.10/patches/remove-alternative-asm.patch
fosslinux d429c48d76 Update the linux kernel for sysb/c to 4.9.10.
- We do not use latest 4.9.x because it relies on a new version of
  binutils, while older versions do not. (Note: we should be able to go
  a bit newer but I didn't bother testing >50 versions to figure this
  out).
- We do not use newer kernel versions because they require one or more
  of (new perl, new binutils, new make, new gcc, new bison, new tar).
- sysb and sysc are updated to use the SATA (libata) subsystem (aka sda)
  instead of IDE-emulating SATA subsystem (aka hda) which is now
  available to us.
- While theoretically according to docs 4.9 should work OOTB with our
  version of binutils this is not the case, so we have to do a bit of
  (interesting) patching. But this does not break anything.
- Thankfully serial support in 4.9 is not screwed over like it is in 2.6
  so we can revert to that.
- 4.9 has the linux-libre project at our disposal, instead of gNewSense.
  So we use this. Unfortunatley that takes forever because we have to
  use sed because our version of gawk is too old/buggy. :( I plan to
  introduce very shortly 1. parallelism 2. 'sysc snapshot' which will
  start from sysc to avoid this. I do not want to use linux-libre
  tarballs because they make modificiations directly from this script
  (aka not easily verifiable, use the source!) and this script allows
  for much greater flexibility.
- We compile the initramfs ahead-of-build using the in-tree cpio
  generator instead of also building cpio to use less packages. We do
  NOT build the initramfs into the kernel like 2.6 (unsupported).
- Oh and fix a kexec-tools checksum.
2021-09-13 13:43:36 +10:00

34 lines
1.3 KiB
Diff

SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
SPDX-License-Identifier: GPL-2.0-only
Our older version of binutils dosen't play very nicely with binutils for a
couple of edgecase macros. It seems that ALTERNATIVE is one of these. As we
know what your system will be (not Xen), we can manually evaluate and write
out the ALTERNATIVEs.
--- arch/x86/entry/entry_32.S 2021-07-31 11:40:07.458032771 +1000
+++ arch/x86/entry/entry_32.S 2021-07-31 11:40:42.835298841 +1000
@@ -412,9 +412,8 @@
movl %esp, %eax
call do_fast_syscall_32
- /* XEN PV guests always use IRET path */
- ALTERNATIVE "testl %eax, %eax; jz .Lsyscall_32_done", \
- "jmp .Lsyscall_32_done", X86_FEATURE_XENPV
+ testl %eax, %eax
+ jz .Lsyscall_32_done
/* Opportunistic SYSEXIT */
TRACE_IRQS_ON /* User mode traces as IRQs on. */
--- arch/x86/entry/vdso/vdso32/system_call.S 2021-07-31 11:41:40.379731622 +1000
+++ arch/x86/entry/vdso/vdso32/system_call.S 2021-07-31 11:43:40.294633506 +1000
@@ -55,8 +55,6 @@
/* If SYSENTER (Intel) or SYSCALL32 (AMD) is available, use it. */
ALTERNATIVE_2 "", SYSENTER_SEQUENCE, X86_FEATURE_SYSENTER32, \
SYSCALL_SEQUENCE, X86_FEATURE_SYSCALL32
-#else
- ALTERNATIVE "", SYSENTER_SEQUENCE, X86_FEATURE_SEP
#endif
/* Enter using int $0x80 */