From: Todd Poynor <toddpoynor@gmail.com>
To: Rob Springer <rspringer@google.com>,
John Joseph <jnjoseph@google.com>,
Ben Chan <benchan@chromium.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
Todd Poynor <toddpoynor@google.com>
Subject: [PATCH 16/16] staging: gasket: interrupt: remove unimplemented interrupt types
Date: Thu, 9 Aug 2018 20:21:11 -0700 [thread overview]
Message-ID: <20180810032111.197743-17-toddpoynor@gmail.com> (raw)
In-Reply-To: <20180810032111.197743-1-toddpoynor@gmail.com>
From: Todd Poynor <toddpoynor@google.com>
Interrupt types PCI_MSI and PLATFORM_WIRE are unused and unimplemented.
Remove these.
Signed-off-by: Todd Poynor <toddpoynor@google.com>
---
drivers/staging/gasket/gasket_core.h | 11 --------
drivers/staging/gasket/gasket_interrupt.c | 34 +----------------------
2 files changed, 1 insertion(+), 44 deletions(-)
diff --git a/drivers/staging/gasket/gasket_core.h b/drivers/staging/gasket/gasket_core.h
index fd7e75b765a6d..0203460f48957 100644
--- a/drivers/staging/gasket/gasket_core.h
+++ b/drivers/staging/gasket/gasket_core.h
@@ -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;
diff --git a/drivers/staging/gasket/gasket_interrupt.c b/drivers/staging/gasket/gasket_interrupt.c
index eb5dfbe08e214..2cd262be65ca0 100644
--- a/drivers/staging/gasket/gasket_interrupt.c
+++ b/drivers/staging/gasket/gasket_interrupt.c
@@ -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);
--
2.18.0.597.ga71716f1ad-goog
next prev parent reply other threads:[~2018-08-10 3:21 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-10 3:20 [PATCH 00/16] staging: gasket: return of the son of cleanups Todd Poynor
2018-08-10 3:20 ` [PATCH 01/16] MAINTAINERS: Switch a maintainer for drivers/staging/gasket Todd Poynor
2018-08-10 3:40 ` John Joseph
2018-08-10 6:14 ` Greg Kroah-Hartman
2018-08-10 10:28 ` Todd Poynor
2018-08-10 3:20 ` [PATCH 02/16] staging: gasket: core: remove debug log that could crash Todd Poynor
[not found] ` <CALTjKEM2q=pGh+nz6O7mQerkcnZ+=B6t+viu7dwfMHjZMQRXGg@mail.gmail.com>
2018-08-10 16:57 ` Rob Springer
2018-08-10 3:20 ` [PATCH 03/16] staging: gasket: core: fix line continuation indent in gasket_alloc_dev Todd Poynor
2018-08-10 3:20 ` [PATCH 04/16] staging: gasket: core: remove kobj_name param from gasket_alloc_dev Todd Poynor
2018-08-10 3:21 ` [PATCH 05/16] staging: gasket: core: remove ftrace-style debug logs Todd Poynor
2018-08-10 3:21 ` [PATCH 06/16] staging: gasket: remove gasket_exit() Todd Poynor
2018-08-10 3:21 ` [PATCH 07/16] staging: gasket: page table: remove unnecessary NULL check Todd Poynor
2018-08-10 3:21 ` [PATCH 08/16] staging: gasket: page table: use dma_mapping_error for error detection Todd Poynor
2018-08-10 3:21 ` [PATCH 09/16] staging: gasket: core: switch to relaxed memory-mapped I/O Todd Poynor
2018-08-10 3:21 ` [PATCH 10/16] staging: gasket: page table: remove extraneous memory barriers Todd Poynor
2018-08-10 3:21 ` [PATCH 11/16] staging: gasket: core: factor out generic device add code from PCI code Todd Poynor
2018-08-10 3:21 ` [PATCH 12/16] staging: gasket: core: factor out generic device remove code from PCI Todd Poynor
2018-08-10 3:21 ` [PATCH 13/16] staging: gasket: core: rename lookup_internal_desc to be PCI-specific Todd Poynor
2018-08-10 3:21 ` [PATCH 14/16] staging: gasket: interrupt: refactor PCI MSIX-specific handler code Todd Poynor
2018-08-10 3:21 ` [PATCH 15/16] staging: gasket: interrupt: simplify interrupt init parameters Todd Poynor
2018-08-10 3:21 ` Todd Poynor [this message]
2018-08-13 6:51 ` [PATCH 00/16] staging: gasket: return of the son of cleanups Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180810032111.197743-17-toddpoynor@gmail.com \
--to=toddpoynor@gmail.com \
--cc=benchan@chromium.org \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=jnjoseph@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rspringer@google.com \
--cc=toddpoynor@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).