This commit fixes and closes#16313.
Switch the x86 kernel's timer to tickless operation which is
more power efficient since it is not woken up by periodic timer
interrupts when idle. Also add several other options for CPU
idle governors particularly the upstream default for tickless
kernels, CONFIG_CPU_IDLE_GOV_MENU. Without this commit, my AMD
Ryzen 7 5800U can only achieve a minimum core frequency of 1,384
MHz which is over 3x higher than the processor's minimum
frequency of 400 MHz which is accessible with this modification.
In addition to the lower clock rate, I have seen a concomitant
reduction in both idle temps and at-the-wall power consumption.
Summary:
* Idle CPU freqs dropped from 1,384 MHz to 400 Mhz.
* Idle power consumption dropped from 7 W avg to 5 W.
* Idle temps have dropped from 50C on avg to 43C.
There are other well known reasons to switch to a tickless
timer including: reduced interrupt overhead, better use of CPU
resources, and reduced latency to name a few.
Build system: x86/64
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne
Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/16317
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
i915 driver requires to load correct firmware to work on latest x86
GPU, it is more reasonable to make it as a kernel module, so that
initramfs is not required, and it can also save some space from the
kernel image comparing being a built-in driver
Signed-off-by: Joe Zheng <joe.zheng@intel.com>
Link: https://github.com/openwrt/openwrt/pull/16276
Signed-off-by: Robert Marko <robimarko@gmail.com>
Add CONFIG_ARCH_CONFIGURES_CPU_MITIGATIONS=y which was introduced
back in April of this year[1]
1. ce0abef6a1
Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/16535
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Like x86, armsr is frequently virtualized, and is used for development
and debugging. Kernel messages should be more readily apparent by
default. This can be achieved by adding console=tty1 to the kernel
command line, enabling the console on a (possibly virtual) display and
keyboard, in addition to a serial port.
This also enables failsafe on tty1. Failsafe mode operates on consoles
known by the kernel, without regard to /etc/inittab.
armsr's /etc/inittab is also updated to specify tty1 instead of tty0.
tty1 is technically more correct: tty1 is the first virtual console,
where tty0 reflects the current active virtual console (which is likely
to be tty1).
This configuration matches x86, which is another target commonly used
for virtualization, development, and debugging in the same way. x86's
kernel command line had specified console=tty0, although console=tty1 is
more correct for the reasons given above. This also brings x86's kernel
command line console= into agreement with its /etc/inittab, which
already used tty1.
Signed-off-by: Mark Mentovai <mark@mentovai.com>
Link: https://github.com/openwrt/openwrt/pull/16213
Signed-off-by: Robert Marko <robimarko@gmail.com>
The kernel support necessary to use a console keyboard was not built on
x86, affecting real and virtual machines alike. The console keyboard
would function properly in GRUB, but would not work at all once Linux
booted. It appeared that the console was intended to work because
console video appeared on the display, including prompts to enter
failsafe or select the debug log level from the keyboard, and the prompt
to "Press Enter to activate this console", but there was no way to
provide input to it. All keystrokes were ignored.
This enables several kernel configuration options to enable HID and USB
HID support (CONFIG_HID, CONFIG_HID_SUPPORT, CONFIG_HID_GENERIC, and
CONFIG_USB_HID), making the keyboard functional. For alignment with
armsr, CONFIG_USB_HIDDEV is also added, although not strictly necessary
for keyboard support. Note that this change also causes
CONFIG_HID_HYPERV_MOUSE to be enabled for x86/64 and x86/generic: it was
already set in these subarchitectures' kernel configurations, but was
ineffective due to CONFIG_HID being absent.
The omission of keyboard support on x86 may not have been widely noticed
because USB HID is not used on production OpenWrt x86 machines such as
pc-engines,apu2 which only have a serial console, or with the default
x86 configuration used by scripts/qemustart, which uses -nographic and
does not configure a virtual physical console but instead uses a serial
console.
This configuration change results in, for x86_64, +40kB in kernel.bin
and just over +40kB in gzip-compressed "combined" images. This should
not be a problem for the non-storage-constrained x86 target.
Until 2a86425de1, CONFIG_HID, CONFIG_USB_HID, and CONFIG_USB_HIDDEV
were set in the target-level kernel configuration, and
CONFIG_HID_GENERIC was set at the subtarget level. These are
reintroduced strictly at the subtarget level by request. This applies to
the 64, generic, and legacy subtargets, omitting geode.
Fixes: https://github.com/openwrt/openwrt/issues/16157
Signed-off-by: Mark Mentovai <mark@mentovai.com>
Link: https://github.com/openwrt/openwrt/pull/16208
Signed-off-by: Robert Marko <robimarko@gmail.com>
This adds auto-configuration of network ports on Dell EMC Edge620 (x86) product.
It is similar in specs/features to some of the Sophos x86-based appliances, but:
1. Serial console terminal is built in and requires just the micro-USB cable
2. Comes with both MMC (16Gb) and SSD (256Gb) installed
3. Comes with 6 ethernet ports all 6 are functional when no SFP is used
4. Comes with two SFP cages and not one, like some of revision 3 Sophos products
5. Unlike Sophos devices, there are no non-wireless models of Edge 620,
it comes with Qualcomm Atheros QCA9880 radio
These devices can be now found both second-hand and new at online marketplaces below
(sometimes well below) US $100, I believe they make great candidates for running OpenWrt.
The ethernet network ports on the case are marked GE1 thru to GE6 with the
following mapping once booted into OpenWrt:
```
GE1: eth2: pci0000:00/0000:00:0b.0/0000:02:00.2
GE2: eth3: pci0000:00/0000:00:0b.0/0000:02:00.3
GE3: eth0: pci0000:00/0000:00:0b.0/0000:02:00.0
GE4: eth1: pci0000:00/0000:00:0b.0/0000:02:00.1
GE5: eth7: pci0000:00/0000:00:17.0/0000:07:00.1
GE6: eth6: pci0000:00/0000:00:17.0/0000:07:00.0
```
Dell's instructions for [standard configuration](https://infohub.delltechnologies.com/en-us/l/dell-emc-edge-620-advanced-activation-guide/dell-emc-sd-wan-edge-620-standard-configuration/)
recommend using GE3, GE4, GE5, or GE6 for WAN, I've selected the GE6 as the sole
WAN port under OpenWrt with the rest of ethernet ports assigned to LAN.
Please merge before 24.xx is forked and if possible, cherry-pick for 23.05
if there's no ETA for 24.xx forking.
PS. @Hurricos I'm struggling with ixgbe mappings on Sophos devices which use
very similar hardware to Dell EMC, so even tho I know the sys paths for ethernet ports,
I'd prefer to do a separate commit to properly map ethernet ports to match the case markings
for this device at some point later.
Signed-off-by: Stan Grishin <stangri@melmac.ca>
This adds the legacy /dev/fb* device file for kernel 6.6 again.
Linux upstream commit 701d2054fa31 ("fbdev: Make support for
userspace interfaces configurable") made this configurable and we
deactivated this option by default for kernel 6.6. On x86 we are not
space constrained and some users need this legacy interface.
Fixes: #15222
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Add options removed by `make kernel_oldconfig CONFIG_TARGET=subtarget', missing which causes compilation to stop and cause an error.
Fixes: 2a86425de1 ("x86: 6.6: refresh kernel config")
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
This is an automatically generated commit which aids following Kernel patch history,
as git will see the move and copy as a rename thus defeating the purpose.
See: https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html
for the original discussion.
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
This is an automatically generated commit.
During a `git bisect` session, `git bisect --skip` is recommended.
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
This is an automatically generated commit which aids following Kernel patch history,
as git will see the move and copy as a rename thus defeating the purpose.
See: https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html
for the original discussion.
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
This is an automatically generated commit.
During a `git bisect` session, `git bisect --skip` is recommended.
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
This reverts commit 3004c20614.
The commit added the needed packages for the new target
to the generic x86_64 image. This results into unwanted
modules and firmware files for other x86 devices.
Additionally, there is the following error message
while booting the image on other x86 devices:
[ 8.531720] kmodloader: 1 module could not be probed
[ 8.532613] kmodloader: - leds-mlxcpld - 0
For now, the needed packages will have to be selected
manually while configuring the image.
Signed-off-by: Til Kaiser <til.kaiser@gmx.de>
GRUB_SERIAL is also used for the default serial on the target and not
only in grub. When no grub was build it was not available and the build
fails.
Rename GRUB_SERIAL to TARGET_SERIAL and make it always available on x86
and armsr targets.
Fixes: #14063
Fixes: b10768476f ("x86,armsr: interpolate GRUB_SERIAL into /etc/inittab")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Some platforms have their console on other ports than ttyS0, so
allow the developer to tailor this on bespoke platform images.
Fixes issue #13401.
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
CONFIG_DEVTMPFS_SAFE is now part of the generic configuration. Remove it
from the target configurations.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The Mellanox Spectrum SN2000 Series Switches are Managed Ethernet
Switches with a maximum speed of 100Gb/s and up to 56 ports.
Tested on a Mellanox Spectrum SN2100 with the following specs:
- CPU: Intel ATOM x86 dual-core 2.4GHz
- RAM: 8GB
- Disk: 16GB SSD
- Ports: 16x QSFP28 100GbE, 1x 100M Mgmt Port, 1x RJ45 Serial Port
- USB: 1x mini 2.0
- Button: 1x (reset)
- LEDs: 6x
Installation:
- Create a bootable USB device (either by flashing this image
onto it or another Linux distribution)
- Unzip the generic OpenWrt x64 image
and copy it onto the USB device
- Plug the USB device into the Mellanox Switch and boot from it
- Flash the image (e.g., with dd) onto the internal SSD
of the switch (should be /dev/sda)
To enter the BIOS, reboot the switch and press CTRL+B while you see
the BIOS information text (American Megatrends …). The default password
to enter the BIOS is admin. To boot from the USB device, switch to the
Boot index tab and set your USB device at the top of the boot order
(the internal SSD should be currently there). Don't forget to set
the SSD back at the top after you have flashed the image.
Signed-off-by: Til Kaiser <til.kaiser@gmx.de>
[unify with generic x64 image]
Signed-off-by: David Bauer <mail@david-bauer.net>
CONFIG_DEVTMPFS_SAFE and CONFIG_DM_AUDIT were not
set and had to be manually selected during build
everytime kernel was updated.
Signed-off-by: Oskari Rauta <oskari.rauta@gmail.com>
When the membase and pci_dev pointer were moved to a new struct in priv,
the actual membase users were left untouched, and they started reading
out arbitrary memory behind the struct instead of registers. This
unfortunately turned the RNG into a constant number generator, depending
on the content of what was at that offset.
To fix this, update geode_rng_data_{read,present}() to also get the
membase via amd_geode_priv, and properly read from the right addresses
again.
Closes#13417.
Reported-by: Timur I. Davletshin <timur.davletshin@gmail.com>
Tested-by: Timur I. Davletshin <timur.davletshin@gmail.com>
Suggested-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
This compiles the CONFIG_PTP_1588_CLOCK support into the kernel binary
and activates the drivers for KVM and VMware which allow syncing the
host time with the VM when OpenWrt is running in a VM. With this change
the CONFIG_HYPERV_UTILS driver is now build into the kernel, because it
depends on the PTP framework being compiled in. CONFIG_HYPERV_UTILS was
build as a module, but not packages before.
Fixes: #13277
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This activates PCI Express ASPM control in Linux. Without this option it
is completely controlled by the BIOS, now Linux will take over and apply
some workarounds if needed.
Fixes: #13248
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>