mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-11-01 09:13:37 +00:00
Merge branch 'remotes/lorenzo/pci/dwc'
- Fix dwc find_next_bit() usage (Niklas Cassel) * remotes/lorenzo/pci/dwc: PCI: dwc: Fix find_next_bit() usage
This commit is contained in:
commit
d76d273dc8
1 changed files with 6 additions and 5 deletions
|
|
@ -79,7 +79,8 @@ static struct msi_domain_info dw_pcie_msi_domain_info = {
|
||||||
irqreturn_t dw_handle_msi_irq(struct pcie_port *pp)
|
irqreturn_t dw_handle_msi_irq(struct pcie_port *pp)
|
||||||
{
|
{
|
||||||
int i, pos, irq;
|
int i, pos, irq;
|
||||||
u32 val, num_ctrls;
|
unsigned long val;
|
||||||
|
u32 status, num_ctrls;
|
||||||
irqreturn_t ret = IRQ_NONE;
|
irqreturn_t ret = IRQ_NONE;
|
||||||
|
|
||||||
num_ctrls = pp->num_vectors / MAX_MSI_IRQS_PER_CTRL;
|
num_ctrls = pp->num_vectors / MAX_MSI_IRQS_PER_CTRL;
|
||||||
|
|
@ -87,14 +88,14 @@ irqreturn_t dw_handle_msi_irq(struct pcie_port *pp)
|
||||||
for (i = 0; i < num_ctrls; i++) {
|
for (i = 0; i < num_ctrls; i++) {
|
||||||
dw_pcie_rd_own_conf(pp, PCIE_MSI_INTR0_STATUS +
|
dw_pcie_rd_own_conf(pp, PCIE_MSI_INTR0_STATUS +
|
||||||
(i * MSI_REG_CTRL_BLOCK_SIZE),
|
(i * MSI_REG_CTRL_BLOCK_SIZE),
|
||||||
4, &val);
|
4, &status);
|
||||||
if (!val)
|
if (!status)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
ret = IRQ_HANDLED;
|
ret = IRQ_HANDLED;
|
||||||
|
val = status;
|
||||||
pos = 0;
|
pos = 0;
|
||||||
while ((pos = find_next_bit((unsigned long *) &val,
|
while ((pos = find_next_bit(&val, MAX_MSI_IRQS_PER_CTRL,
|
||||||
MAX_MSI_IRQS_PER_CTRL,
|
|
||||||
pos)) != MAX_MSI_IRQS_PER_CTRL) {
|
pos)) != MAX_MSI_IRQS_PER_CTRL) {
|
||||||
irq = irq_find_mapping(pp->irq_domain,
|
irq = irq_find_mapping(pp->irq_domain,
|
||||||
(i * MAX_MSI_IRQS_PER_CTRL) +
|
(i * MAX_MSI_IRQS_PER_CTRL) +
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue