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

Add kernel options required for Atheros 12k wirelss adapters #3640

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

agners
Copy link
Member

@agners agners commented Oct 21, 2024

Add support for interrupt remapping for IO-APIC and MSI devices as required by some ath12k devices.

Fixes: #3621

Summary by CodeRabbit

  • New Features

    • Enhanced support for various hardware components, including PCIe devices, SCSI, USB, and graphics.
    • Added support for EFI stub booting and LZ4 compression for the kernel.
    • Improved CPU and memory hotplugging capabilities for better resource management.
  • Bug Fixes

    • Resolved compatibility issues with specific PCIe devices through configuration updates.

Add support for interrupt remapping for IO-APIC and MSI devices as
required by some ath12k devices.

Fixes: #3621
@agners agners added board/ova Open Virtual Appliance (Virtual Machine) board/generic-x86-64 Generic x86-64 Boards (like Intel NUC) labels Oct 21, 2024
Copy link

coderabbitai bot commented Oct 21, 2024

📝 Walkthrough

Walkthrough

The pull request introduces significant updates to the kernel.config files for the generic x86-64 and ova boards in the buildroot-external project. Key modifications include enabling the CONFIG_IRQ_REMAP option for PCIe device support, particularly for the ath12k. Other enhancements encompass CPU frequency scaling, SCSI, USB, framebuffer, DRM, sound system configurations, and sensor support. These changes collectively aim to improve hardware compatibility and system performance across various components.

Changes

File Path Change Summary
buildroot-external/board/pc/generic-x86-64/kernel.config Added CONFIG_IRQ_REMAP=y, enabled CPU idle states, SCSI support, USB, framebuffer, DRM, sound configurations, and sensor support. Updated CPU frequency scaling.
buildroot-external/board/pc/ova/kernel.config Added CONFIG_IRQ_REMAP=y, enabled CONFIG_KERNEL_LZ4, CONFIG_EFI_STUB, CPU frequency scaling, hotplugging capabilities, VMware/VirtualBox support, and VirtIO configurations.

Assessment against linked issues

Objective Addressed Explanation
Add CONFIG_IRQ_REMAP for ath12k support (#3621)

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between a5cdc31 and 06c333e.

📒 Files selected for processing (2)
  • buildroot-external/board/pc/generic-x86-64/kernel.config (1 hunks)
  • buildroot-external/board/pc/ova/kernel.config (1 hunks)
🧰 Additional context used
🔇 Additional comments (5)
buildroot-external/board/pc/ova/kernel.config (2)

Line range hint 1-127: LGTM: Comprehensive system enhancements

The changes in this segment significantly improve system compatibility and performance across various components. While not directly related to the Atheros 12k wireless adapter support, these enhancements contribute to overall system stability and compatibility, which may indirectly benefit the wireless adapter functionality.

Key improvements include:

  1. Enhanced virtualization support (e.g., VMware, VirtualBox, VirtIO)
  2. Improved CPU and memory management (e.g., hotplugging capabilities)
  3. Extended hardware support (e.g., SCSI, USB, framebuffer, DRM)
  4. Better networking capabilities

These changes align with creating a more robust and flexible system environment, which is beneficial for integrating various hardware components, including wireless adapters.


128-130: Excellent: Critical addition for Atheros 12k support

The addition of CONFIG_IRQ_REMAP=y is a crucial change that directly addresses the PR's primary objective of enhancing support for Atheros 12k wireless adapters. This configuration enables interrupt remapping for PCIe devices, which is essential for the proper functioning of ath12k devices.

This change directly resolves the issue mentioned in #3621 regarding the lack of the CONFIG_IRQ_REMAP definition. It should help alleviate the problems users were experiencing with ath11k and ath12k devices, particularly the failure to allocate the required number of MSI vectors.

Great job on identifying and implementing this critical configuration option!

buildroot-external/board/pc/generic-x86-64/kernel.config (3)

175-177: Excellent addition of CONFIG_IRQ_REMAP=y

This change directly addresses the PR objective by enabling interrupt remapping support, which is crucial for the proper functioning of Atheros 12k wireless adapters and other PCIe devices. It resolves the issue mentioned in #3621 regarding the lack of CONFIG_IRQ_REMAP definition.


Line range hint 1-174: Notable configuration changes

While not directly related to the main PR objective, the following changes are worth noting:

  1. CPU frequency scaling: CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y
  2. SCSI and USB support: CONFIG_SCSI_LOWLEVEL=y, CONFIG_SCSI_HPSA=y, CONFIG_USB_XHCI_HCD=y
  3. Graphics support: Various DRM options enabled for AMD and Intel
  4. Sound system: Extensive configuration for Intel sound systems
  5. Sensor support: CONFIG_SENSORS_K10TEMP=m, CONFIG_SENSORS_CORETEMP=m

These changes may improve hardware compatibility and system performance for various components in the Home Assistant Operating System.


Line range hint 1-177: Summary: Changes align well with PR objectives

The addition of CONFIG_IRQ_REMAP=y directly addresses the main PR objective of enhancing support for Atheros 12k wireless adapters. This change, along with the other configuration updates, should improve the overall compatibility and performance of the Home Assistant Operating System, particularly for systems using Atheros 12k wireless adapters.

To ensure full compatibility:

Run the following script to check if the ath12k module is properly loaded after applying these changes:

This script will help verify if the ath12k module is properly loaded and if there are any IRQ remapping related messages, which would indicate that the new configuration is working as intended.

✅ Verification successful

CONFIG_IRQ_REMAP properly set

CONFIG_IRQ_REMAP is correctly set to 'y' in the kernel configuration, aligning with the PR objectives.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify if ath12k module is loaded and functioning correctly

# Check if ath12k module is loaded
if lsmod | grep -q ath12k; then
    echo "ath12k module is loaded"
else
    echo "ath12k module is not loaded"
fi

# Check dmesg for any ath12k related messages
dmesg | grep ath12k

# Check for any IRQ remapping related messages
dmesg | grep "IRQ remapping"

Length of output: 363


Script:

#!/bin/bash
# Description: Verify if CONFIG_IRQ_REMAP is set to 'y' in kernel.config

CONFIG_FILE="buildroot-external/board/pc/generic-x86-64/kernel.config"

if grep -q "^CONFIG_IRQ_REMAP=y" "$CONFIG_FILE"; then
    echo "CONFIG_IRQ_REMAP is correctly set to 'y'."
else
    echo "CONFIG_IRQ_REMAP is not set to 'y' in $CONFIG_FILE."
fi

Length of output: 258


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@agners agners merged commit a2ff594 into dev Oct 21, 2024
3 checks passed
@agners agners deleted the x86-64-add-irq-remap branch October 21, 2024 20:19
@sairon sairon mentioned this pull request Nov 19, 2024
@sairon sairon mentioned this pull request Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
board/generic-x86-64 Generic x86-64 Boards (like Intel NUC) board/ova Open Virtual Appliance (Virtual Machine) cla-signed hacktoberfest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ath11k/ath12k firmware missing, CONFIG_IRQ_REMAP not defined either
1 participant