staging: gasket: interrupt: remove unimplemented interrupt types
Interrupt types PCI_MSI and PLATFORM_WIRE are unused and unimplemented. Remove these. Signed-off-by: Todd Poynor <toddpoynor@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Родитель
8b872d6f06
Коммит
cca5dd8790
|
@ -50,8 +50,6 @@ enum gasket_interrupt_packing {
|
|||
/* Type of the interrupt supported by the device. */
|
||||
enum gasket_interrupt_type {
|
||||
PCI_MSIX = 0,
|
||||
PCI_MSI = 1,
|
||||
PLATFORM_WIRE = 2,
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -69,12 +67,6 @@ struct gasket_interrupt_desc {
|
|||
int packing;
|
||||
};
|
||||
|
||||
/* Offsets to the wire interrupt handling registers */
|
||||
struct gasket_wire_interrupt_offsets {
|
||||
u64 pending_bit_array;
|
||||
u64 mask_array;
|
||||
};
|
||||
|
||||
/*
|
||||
* This enum is used to identify memory regions being part of the physical
|
||||
* memory that belongs to a device.
|
||||
|
@ -384,9 +376,6 @@ struct gasket_driver_desc {
|
|||
*/
|
||||
struct gasket_coherent_buffer_desc coherent_buffer_description;
|
||||
|
||||
/* Offset of wire interrupt registers. */
|
||||
const struct gasket_wire_interrupt_offsets *wire_interrupt_offsets;
|
||||
|
||||
/* Interrupt type. (One of gasket_interrupt_type). */
|
||||
int interrupt_type;
|
||||
|
||||
|
|
|
@ -45,9 +45,6 @@ struct gasket_interrupt_data {
|
|||
/* The width of a single interrupt in a packed interrupt register. */
|
||||
int pack_width;
|
||||
|
||||
/* offset of wire interrupt registers */
|
||||
const struct gasket_wire_interrupt_offsets *wire_interrupt_offsets;
|
||||
|
||||
/*
|
||||
* Design-wise, these elements should be bundled together, but
|
||||
* pci_enable_msix's interface requires that they be managed
|
||||
|
@ -92,19 +89,6 @@ static void gasket_interrupt_setup(struct gasket_dev *gasket_dev)
|
|||
|
||||
dev_dbg(gasket_dev->dev, "Running interrupt setup\n");
|
||||
|
||||
if (interrupt_data->type == PLATFORM_WIRE ||
|
||||
interrupt_data->type == PCI_MSI) {
|
||||
/* Nothing needs to be done for platform or PCI devices. */
|
||||
return;
|
||||
}
|
||||
|
||||
if (interrupt_data->type != PCI_MSIX) {
|
||||
dev_dbg(gasket_dev->dev,
|
||||
"Cannot handle unsupported interrupt type %d\n",
|
||||
interrupt_data->type);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Setup the MSIX table. */
|
||||
|
||||
for (i = 0; i < interrupt_data->num_interrupts; i++) {
|
||||
|
@ -351,8 +335,6 @@ int gasket_interrupt_init(struct gasket_dev *gasket_dev)
|
|||
interrupt_data->interrupt_bar_index = driver_desc->interrupt_bar_index;
|
||||
interrupt_data->pack_width = driver_desc->interrupt_pack_width;
|
||||
interrupt_data->num_configured = 0;
|
||||
interrupt_data->wire_interrupt_offsets =
|
||||
driver_desc->wire_interrupt_offsets;
|
||||
|
||||
interrupt_data->eventfd_ctxs = kcalloc(driver_desc->num_interrupts,
|
||||
sizeof(struct eventfd_ctx *),
|
||||
|
@ -379,12 +361,7 @@ int gasket_interrupt_init(struct gasket_dev *gasket_dev)
|
|||
force_msix_interrupt_unmasking(gasket_dev);
|
||||
break;
|
||||
|
||||
case PCI_MSI:
|
||||
case PLATFORM_WIRE:
|
||||
default:
|
||||
dev_err(gasket_dev->dev,
|
||||
"Cannot handle unsupported interrupt type %d\n",
|
||||
interrupt_data->type);
|
||||
ret = -EINVAL;
|
||||
}
|
||||
|
||||
|
@ -439,12 +416,7 @@ int gasket_interrupt_reinit(struct gasket_dev *gasket_dev)
|
|||
force_msix_interrupt_unmasking(gasket_dev);
|
||||
break;
|
||||
|
||||
case PCI_MSI:
|
||||
case PLATFORM_WIRE:
|
||||
default:
|
||||
dev_dbg(gasket_dev->dev,
|
||||
"Cannot handle unsupported interrupt type %d\n",
|
||||
gasket_dev->interrupt_data->type);
|
||||
ret = -EINVAL;
|
||||
}
|
||||
|
||||
|
@ -489,12 +461,8 @@ void gasket_interrupt_cleanup(struct gasket_dev *gasket_dev)
|
|||
gasket_interrupt_msix_cleanup(interrupt_data);
|
||||
break;
|
||||
|
||||
case PCI_MSI:
|
||||
case PLATFORM_WIRE:
|
||||
default:
|
||||
dev_dbg(gasket_dev->dev,
|
||||
"Cannot handle unsupported interrupt type %d\n",
|
||||
interrupt_data->type);
|
||||
break;
|
||||
}
|
||||
|
||||
kfree(interrupt_data->interrupt_counts);
|
||||
|
|
Загрузка…
Ссылка в новой задаче