8000 Some re-arrangement and refining by liujing2 · Pull Request #2 · zhabinecho/linux · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Some re-arrangement and refining #2

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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion arch/x86/kernel/apic/msi.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@

static struct irq_domain *msi_default_domain;

static void irq_msi_compose_msg(struct irq_data *data, struct msi_msg *msg)
/*
* x86 PCI-MSI/HPET/DMAR related method.
* Also can be used as arch specific method for virtio-mmio MSI.
*/
void irq_msi_compose_msg(struct irq_data *data, struct msi_msg *msg)
{
struct irq_cfg *cfg = irqd_cfg(data);

Expand All @@ -47,6 +51,11 @@ static void irq_msi_compose_msg(struct irq_data *data, struct msi_msg *msg)
MSI_DATA_VECTOR(cfg->vector);
}

struct irq_domain *arch_msi_root_irq_domain(void)
{
return x86_vector_domain;
}

/*
* IRQ Chip for MSI PCI/PCI-X/PCI-Express Devices,
* which implement the MS 8000 I or MSI-X Capability Structure.
Expand Down
4 changes: 2 additions & 2 deletions drivers/base/platform-msi.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,11 @@ struct platform_msi_priv_data {
/* The devid allocator */
static DEFINE_IDA(platform_msi_devid_ida);

#ifdef GENERIC_MSI_DOMAIN_OPS
/*
* Convert an msi_desc to a globaly unique identifier (per-device
* devid + msi_desc position in the msi_list).
*/
static irq_hw_number_t platform_msi_calc_hwirq(struct msi_desc *desc)
irq_hw_number_t platform_msi_calc_hwirq(struct msi_desc *desc)
{
u32 devid;

Expand All @@ -45,6 +44,7 @@ static irq_hw_number_t platform_msi_calc_hwirq(struct msi_desc *desc)
return (devid << (32 - DEV_ID_SHIFT)) | desc->platform.msi_index;
}

#ifdef GENERIC_MSI_DOMAIN_OPS
static void platform_msi_set_desc(msi_alloc_info_t *arg, struct msi_desc *desc)
{
arg->desc = desc;
Expand Down
8 changes: 8 additions & 0 deletions drivers/virtio/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ config VIRTIO_MMIO

If unsure, say N.

config VIRTIO_MMIO_MSI
bool "Memory-mapped virtio device MSI"
depends on VIRTIO_MMIO && GENERIC_MSI_IRQ_DOMAIN && GENERIC_MSI_IRQ
---help---
This allows device drivers to enable MSI to improve performance.

If unsure, say N.

config VIRTIO_MMIO_CMDLINE_DEVICES
bool "Memory mapped virtio devices parameter parsing"
depends on VIRTIO_MMIO
Expand Down
Loading
0