Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kernel/x86: merge "generic" into "legacy" #14944

Closed
wants to merge 1 commit into from
Closed

Conversation

ehem
Copy link
Contributor

@ehem ehem commented Mar 20, 2024

There is a desire to reduce the time spent on x86 OpenWRT platforms. "generic" is most suitable for removal. The few systems which could use "generic" must now opt for "legacy" (or for a lucky few "64").

Closes: #14231

There is a desire to reduce the time spent on x86 OpenWRT platforms.
"generic" is most suitable for removal.  The few systems which could
use "generic" must now opt for "legacy" (or for a lucky few "64").

Closes: openwrt#14231
Signed-off-by: Elliott Mitchell <ehem+openwrt@m5p.com>
@github-actions github-actions bot added kernel pull request/issue with Linux kernel related changes target/x86 pull request/issue for x86 target labels Mar 20, 2024
@@ -3,7 +3,7 @@ define Device/generic
DEVICE_MODEL := x86/legacy
DEVICE_PACKAGES += kmod-3c59x kmod-8139too kmod-e100 kmod-e1000 \
kmod-natsemi kmod-ne2k-pci kmod-pcnet32 kmod-r8169 kmod-sis900 \
kmod-tg3 kmod-via-rhine kmod-via-velocity kmod-forcedeth
kmod-tg3 kmod-via-rhine kmod-via-velocity kmod-forcedeth kmod-fs-vfat
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems odd kmod-fs-vfat is presently absent from legacy anyway. This simply comes from generic.

Comment on lines +118 to +138
CONFIG_EFI=y
CONFIG_EFIVAR_FS=m
# CONFIG_EFI_BOOTLOADER_CONTROL is not set
# CONFIG_EFI_CAPSULE_LOADER is not set
# CONFIG_EFI_CAPSULE_QUIRK_QUARK_CSH is not set
# CONFIG_EFI_COCO_SECRET is not set
# CONFIG_EFI_CUSTOM_SSDT_OVERLAYS is not set
# CONFIG_EFI_DISABLE_PCI_DMA is not set
# CONFIG_EFI_DISABLE_RUNTIME is not set
CONFIG_EFI_DXE_MEM_ATTRIBUTES=y
CONFIG_EFI_EARLYCON=y
CONFIG_EFI_ESRT=y
# CONFIG_EFI_FAKE_MEMMAP is not set
CONFIG_EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER=y
# CONFIG_EFI_PGT_DUMP is not set
# CONFIG_EFI_RCI2_TABLE is not set
CONFIG_EFI_RUNTIME_MAP=y
CONFIG_EFI_RUNTIME_WRAPPERS=y
CONFIG_EFI_STUB=y
# CONFIG_EFI_TEST is not set
# CONFIG_EFI_VARS is not set
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe 32-bit EFI implementations did exist. I'm a bit doubtful about including support in legacy, but generic did have it enabled.

Comment on lines +201 to +209
CONFIG_HYPERV=y
CONFIG_HYPERVISOR_GUEST=y
CONFIG_HYPERV_BALLOON=y
CONFIG_HYPERV_KEYBOARD=y
CONFIG_HYPERV_NET=y
CONFIG_HYPERV_STORAGE=y
# CONFIG_HYPERV_TESTING is not set
CONFIG_HYPERV_TIMER=y
CONFIG_HYPERV_UTILS=y
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was present in generic. I suspect 32-bit kernels are rarely used in Hyper-V VMs, yet it had been enabled.

Comment on lines +350 to +367
CONFIG_PINCTRL=y
CONFIG_PINCTRL_ALDERLAKE=y
CONFIG_PINCTRL_BAYTRAIL=y
CONFIG_PINCTRL_BROXTON=y
CONFIG_PINCTRL_CANNONLAKE=y
CONFIG_PINCTRL_CHERRYVIEW=y
CONFIG_PINCTRL_DENVERTON=y
CONFIG_PINCTRL_ELKHARTLAKE=y
CONFIG_PINCTRL_EMMITSBURG=y
CONFIG_PINCTRL_GEMINILAKE=y
CONFIG_PINCTRL_INTEL=y
CONFIG_PINCTRL_JASPERLAKE=y
CONFIG_PINCTRL_LAKEFIELD=y
CONFIG_PINCTRL_LEWISBURG=y
CONFIG_PINCTRL_LYNXPOINT=y
CONFIG_PINCTRL_METEORLAKE=y
CONFIG_PINCTRL_SUNRISEPOINT=y
CONFIG_PINCTRL_TIGERLAKE=y
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be rather rare in a legacy system, but again copying from generic.

# CONFIG_SERIAL_MULTI_INSTANTIATE is not set
CONFIG_SMP=y
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SMP is uncommon on legacy systems, but anything P6 or later could do it.

Comment on lines +249 to +258
CONFIG_KVM=y
CONFIG_KVM_AMD=y
CONFIG_KVM_ASYNC_PF=y
CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=y
CONFIG_KVM_GUEST=y
CONFIG_KVM_INTEL=y
CONFIG_KVM_MMIO=y
CONFIG_KVM_VFIO=y
# CONFIG_KVM_XEN is not set
CONFIG_KVM_XFER_TO_GUEST_WORK=y
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unsure kernel-VM was back-ported to function on legacy-class hardware. Yet this had been enabled in generic.

Comment on lines +489 to +514
CONFIG_XEN=y
CONFIG_XENFS=y
CONFIG_XEN_ACPI=y
CONFIG_XEN_AUTO_XLATE=y
# CONFIG_XEN_BACKEND is not set
CONFIG_XEN_BALLOON=y
CONFIG_XEN_BLKDEV_FRONTEND=y
CONFIG_XEN_COMPAT_XENFS=y
CONFIG_XEN_DEBUG_FS=y
CONFIG_XEN_DEV_EVTCHN=y
CONFIG_XEN_FBDEV_FRONTEND=y
CONFIG_XEN_GNTDEV=y
CONFIG_XEN_GRANT_DEV_ALLOC=y
CONFIG_XEN_NETDEV_FRONTEND=y
CONFIG_XEN_PRIVCMD=y
CONFIG_XEN_PVH=y
CONFIG_XEN_PVHVM=y
CONFIG_XEN_PVHVM_GUEST=y
CONFIG_XEN_PVHVM_SMP=y
CONFIG_XEN_SAVE_RESTORE=y
CONFIG_XEN_SCSI_FRONTEND=y
CONFIG_XEN_SYS_HYPERVISOR=y
CONFIG_XEN_VIRTIO=y
# CONFIG_XEN_VIRTIO_FORCE_GRANT is not set
CONFIG_XEN_WDT=y
CONFIG_XEN_XENBUS_FRONTEND=y
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of all the hypervisors, Xen was originally written to function on legacy-class hardware. The support may die off soon if it hasn't already been killed, but it did work.

Copy link
Contributor Author

@ehem ehem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The configuration options from generic were copied to legacy. Quite a few of these seem rather implausible for a generic or legacy-class system, but they had been enabled.

This would need advice as to which of these to kill.

@namiltd
Copy link
Contributor

namiltd commented Mar 20, 2024

Also please prepare patches for kernel 6.6 so that the PR is ready for commit #14868

@ehem
Copy link
Contributor Author

ehem commented Mar 20, 2024

There wouldn't be much difference. Simply duplicates everything for 6.6. If this got approved quickly it might go in before #14868.

@namiltd
Copy link
Contributor

namiltd commented Mar 20, 2024

The order of approval is still a mystery to me ;)

@ehem
Copy link
Contributor Author

ehem commented Mar 21, 2024

Just as long as the order of operations isn't. What is really needed is opinions on which options should really be copied from generic. Rather a lot of those don't really fit even for late model i386-class machines (EFI is quite rare, the few machines with it could almost certainly support traditional x86 BIOS boot too).

@ehem
Copy link
Contributor Author

ehem commented Apr 2, 2024

I guess we could almost simply dump generic. The extra settings in generic are likely rarely used on non-amd64, whereas the late-model P4s should be on 64.

Any comments on whether any of these should be dumped instead of propagated to legacy?

@ehem ehem closed this Apr 12, 2024
@ehem ehem deleted the generic branch April 12, 2024 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kernel pull request/issue with Linux kernel related changes target/x86 pull request/issue for x86 target
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Please include 64bit EFI loader in "generic" 32 bit x86 EFI images - some x64 systems won't boot without it.
2 participants