Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 581642 Details for
Bug 815998
iwlwifi - drivers/pci/intel-iommu.c:2775: Driver unmaps unmatched page at PFN 0
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
0001-iwlwifi-give-PCIe-its-own-lock.patch
0001-iwlwifi-give-PCIe-its-own-lock.patch (text/plain), 11.39 KB, created by
John W. Linville
on 2012-05-02 15:20:53 UTC
(
hide
)
Description:
0001-iwlwifi-give-PCIe-its-own-lock.patch
Filename:
MIME Type:
Creator:
John W. Linville
Created:
2012-05-02 15:20:53 UTC
Size:
11.39 KB
patch
obsolete
>From 26235573d2a0b5df81955d5a3ca89ab4ea134f72 Mon Sep 17 00:00:00 2001 >From: Johannes Berg <johannes.berg@intel.com> >Date: Sun, 5 Feb 2012 13:55:11 -0800 >Subject: [RHEL 6 PATCH] iwlwifi: give PCIe its own lock > >Instead of using a global lock, the PCIe transport >can use an own lock for its IRQ. This will make it >possible to not disable IRQs for the shared lock. >The lock is currently used throughout the code but >this can be improved even further by splitting up >the locking for the queues. > >Signed-off-by: Johannes Berg <johannes.berg@intel.com> >Reviewed-by: Wey-Yi W Guy <wey-yi.w.guy@intel.com> >--- > drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h | 1 + > drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c | 29 ++++++++-------- > drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c | 4 +- > drivers/net/wireless/iwlwifi/iwl-trans-pcie.c | 37 ++++++++++++-------- > 4 files changed, 40 insertions(+), 31 deletions(-) > >diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h >index 5c29281..e6335fa 100644 >--- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h >+++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h >@@ -226,6 +226,7 @@ struct iwl_trans_pcie { > struct tasklet_struct irq_tasklet; > struct isr_statistics isr_stats; > >+ spinlock_t irq_lock; > u32 inta_mask; > u32 scd_base_addr; > struct iwl_dma_ptr scd_bc_tbls; >diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c >index b0c998d..f4a3538 100644 >--- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c >+++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c >@@ -329,13 +329,14 @@ static void iwlagn_rx_allocate(struct iwl_trans *trans, gfp_t priority) > > void iwlagn_rx_replenish(struct iwl_trans *trans) > { >+ struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); > unsigned long flags; > > iwlagn_rx_allocate(trans, GFP_KERNEL); > >- spin_lock_irqsave(&trans->shrd->lock, flags); >+ spin_lock_irqsave(&trans_pcie->irq_lock, flags); > iwlagn_rx_queue_restock(trans); >- spin_unlock_irqrestore(&trans->shrd->lock, flags); >+ spin_unlock_irqrestore(&trans_pcie->irq_lock, flags); > } > > static void iwlagn_rx_replenish_now(struct iwl_trans *trans) >@@ -932,7 +933,7 @@ void iwl_irq_tasklet(struct iwl_trans *trans) > struct isr_statistics *isr_stats = &trans_pcie->isr_stats; > > >- spin_lock_irqsave(&trans->shrd->lock, flags); >+ spin_lock_irqsave(&trans_pcie->irq_lock, flags); > > /* Ack/clear/reset pending uCode interrupts. > * Note: Some bits in CSR_INT are "OR" of bits in CSR_FH_INT_STATUS, >@@ -962,7 +963,7 @@ void iwl_irq_tasklet(struct iwl_trans *trans) > /* saved interrupt in inta variable now we can reset trans_pcie->inta */ > trans_pcie->inta = 0; > >- spin_unlock_irqrestore(&trans->shrd->lock, flags); >+ spin_unlock_irqrestore(&trans_pcie->irq_lock, flags); > > /* Now service all interrupt bits discovered above. */ > if (inta & CSR_INT_BIT_HW_ERR) { >@@ -1210,7 +1211,7 @@ int iwl_reset_ict(struct iwl_trans *trans) > if (!trans_pcie->ict_tbl) > return 0; > >- spin_lock_irqsave(&trans->shrd->lock, flags); >+ spin_lock_irqsave(&trans_pcie->irq_lock, flags); > iwl_disable_interrupts(trans); > > memset(trans_pcie->ict_tbl, 0, ICT_SIZE); >@@ -1227,7 +1228,7 @@ int iwl_reset_ict(struct iwl_trans *trans) > trans_pcie->ict_index = 0; > iwl_write32(bus(trans), CSR_INT, trans_pcie->inta_mask); > iwl_enable_interrupts(trans); >- spin_unlock_irqrestore(&trans->shrd->lock, flags); >+ spin_unlock_irqrestore(&trans_pcie->irq_lock, flags); > > return 0; > } >@@ -1240,9 +1241,9 @@ void iwl_disable_ict(struct iwl_trans *trans) > > unsigned long flags; > >- spin_lock_irqsave(&trans->shrd->lock, flags); >+ spin_lock_irqsave(&trans_pcie->irq_lock, flags); > trans_pcie->use_ict = false; >- spin_unlock_irqrestore(&trans->shrd->lock, flags); >+ spin_unlock_irqrestore(&trans_pcie->irq_lock, flags); > } > > static irqreturn_t iwl_isr(int irq, void *data) >@@ -1259,7 +1260,7 @@ static irqreturn_t iwl_isr(int irq, void *data) > > trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); > >- spin_lock_irqsave(&trans->shrd->lock, flags); >+ spin_lock_irqsave(&trans_pcie->irq_lock, flags); > > /* Disable (but don't clear!) interrupts here to avoid > * back-to-back ISRs and sporadic interrupts from our NIC. >@@ -1303,7 +1304,7 @@ static irqreturn_t iwl_isr(int irq, void *data) > iwl_enable_interrupts(trans); > > unplugged: >- spin_unlock_irqrestore(&trans->shrd->lock, flags); >+ spin_unlock_irqrestore(&trans_pcie->irq_lock, flags); > return IRQ_HANDLED; > > none: >@@ -1313,7 +1314,7 @@ static irqreturn_t iwl_isr(int irq, void *data) > !trans_pcie->inta) > iwl_enable_interrupts(trans); > >- spin_unlock_irqrestore(&trans->shrd->lock, flags); >+ spin_unlock_irqrestore(&trans_pcie->irq_lock, flags); > return IRQ_NONE; > } > >@@ -1344,7 +1345,7 @@ irqreturn_t iwl_isr_ict(int irq, void *data) > if (!trans_pcie->use_ict) > return iwl_isr(irq, data); > >- spin_lock_irqsave(&trans->shrd->lock, flags); >+ spin_lock_irqsave(&trans_pcie->irq_lock, flags); > > /* Disable (but don't clear!) interrupts here to avoid > * back-to-back ISRs and sporadic interrupts from our NIC. >@@ -1410,7 +1411,7 @@ irqreturn_t iwl_isr_ict(int irq, void *data) > iwl_enable_interrupts(trans); > } > >- spin_unlock_irqrestore(&trans->shrd->lock, flags); >+ spin_unlock_irqrestore(&trans_pcie->irq_lock, flags); > return IRQ_HANDLED; > > none: >@@ -1421,6 +1422,6 @@ irqreturn_t iwl_isr_ict(int irq, void *data) > !trans_pcie->inta) > iwl_enable_interrupts(trans); > >- spin_unlock_irqrestore(&trans->shrd->lock, flags); >+ spin_unlock_irqrestore(&trans_pcie->irq_lock, flags); > return IRQ_NONE; > } >diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c >index 4a0c953..c971d51 100644 >--- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c >+++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c >@@ -477,7 +477,7 @@ void iwl_trans_pcie_tx_agg_setup(struct iwl_trans *trans, > > ra_tid = BUILD_RAxTID(sta_id, tid); > >- spin_lock_irqsave(&trans->shrd->lock, flags); >+ spin_lock_irqsave(&trans_pcie->irq_lock, flags); > > /* Stop this Tx queue before configuring it */ > iwlagn_tx_queue_stop_scheduler(trans, txq_id); >@@ -517,7 +517,7 @@ void iwl_trans_pcie_tx_agg_setup(struct iwl_trans *trans, > trans_pcie->txq[txq_id].sta_id = sta_id; > trans_pcie->txq[txq_id].tid = tid; > >- spin_unlock_irqrestore(&trans->shrd->lock, flags); >+ spin_unlock_irqrestore(&trans_pcie->irq_lock, flags); > } > > /* >diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c >index 5f17ab8..6b2028a 100644 >--- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c >+++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c >@@ -217,10 +217,10 @@ static int iwl_rx_init(struct iwl_trans *trans) > > iwl_trans_rx_hw_init(trans, rxq); > >- spin_lock_irqsave(&trans->shrd->lock, flags); >+ spin_lock_irqsave(&trans_pcie->irq_lock, flags); > rxq->need_update = 1; > iwl_rx_queue_update_write_ptr(trans, rxq); >- spin_unlock_irqrestore(&trans->shrd->lock, flags); >+ spin_unlock_irqrestore(&trans_pcie->irq_lock, flags); > > return 0; > } >@@ -583,7 +583,7 @@ static int iwl_tx_init(struct iwl_trans *trans) > alloc = true; > } > >- spin_lock_irqsave(&trans->shrd->lock, flags); >+ spin_lock_irqsave(&trans_pcie->irq_lock, flags); > > /* Turn off all Tx DMA fifos */ > iwl_write_prph(bus(trans), SCD_TXFACT, 0); >@@ -592,7 +592,7 @@ static int iwl_tx_init(struct iwl_trans *trans) > iwl_write_direct32(bus(trans), FH_KW_MEM_ADDR_REG, > trans_pcie->kw.dma >> 4); > >- spin_unlock_irqrestore(&trans->shrd->lock, flags); >+ spin_unlock_irqrestore(&trans_pcie->irq_lock, flags); > > /* Alloc and init all Tx queues, including the command queue (#4/#9) */ > for (txq_id = 0; txq_id < hw_params(trans).max_txq_num; txq_id++) { >@@ -633,17 +633,18 @@ static void iwl_set_pwr_vmain(struct iwl_trans *trans) > > static int iwl_nic_init(struct iwl_trans *trans) > { >+ struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); > unsigned long flags; > > /* nic_init */ >- spin_lock_irqsave(&trans->shrd->lock, flags); >+ spin_lock_irqsave(&trans_pcie->irq_lock, flags); > iwl_apm_init(priv(trans)); > > /* Set interrupt coalescing calibration timer to default (512 usecs) */ > iwl_write8(bus(trans), CSR_INT_COALESCING, > IWL_HOST_INT_CALIB_TIMEOUT_DEF); > >- spin_unlock_irqrestore(&trans->shrd->lock, flags); >+ spin_unlock_irqrestore(&trans_pcie->irq_lock, flags); > > iwl_set_pwr_vmain(trans); > >@@ -830,10 +831,15 @@ static int iwl_trans_pcie_start_device(struct iwl_trans *trans) > > /* > * Activate/Deactivate Tx DMA/FIFO channels according tx fifos mask >- * must be called under priv->shrd->lock and mac access >+ * must be called under the irq lock and with MAC access > */ > static void iwl_trans_txq_set_sched(struct iwl_trans *trans, u32 mask) > { >+ struct iwl_trans_pcie __maybe_unused *trans_pcie = >+ IWL_TRANS_GET_PCIE_TRANS(trans); >+ >+ lockdep_assert_held(&trans_pcie->irq_lock); >+ > iwl_write_prph(bus(trans), SCD_TXFACT, mask); > } > >@@ -847,7 +853,7 @@ static void iwl_trans_pcie_tx_start(struct iwl_trans *trans) > int i, chan; > u32 reg_val; > >- spin_lock_irqsave(&trans->shrd->lock, flags); >+ spin_lock_irqsave(&trans_pcie->irq_lock, flags); > > trans_pcie->scd_base_addr = > iwl_read_prph(bus(trans), SCD_SRAM_BASE_ADDR); >@@ -943,7 +949,7 @@ static void iwl_trans_pcie_tx_start(struct iwl_trans *trans) > fifo, 0); > } > >- spin_unlock_irqrestore(&trans->shrd->lock, flags); >+ spin_unlock_irqrestore(&trans_pcie->irq_lock, flags); > > /* Enable L1-Active */ > iwl_clear_bits_prph(bus(trans), APMG_PCIDEV_STT_REG, >@@ -960,7 +966,7 @@ static int iwl_trans_tx_stop(struct iwl_trans *trans) > struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); > > /* Turn off all Tx DMA fifos */ >- spin_lock_irqsave(&trans->shrd->lock, flags); >+ spin_lock_irqsave(&trans_pcie->irq_lock, flags); > > iwl_trans_txq_set_sched(trans, 0); > >@@ -976,7 +982,7 @@ static int iwl_trans_tx_stop(struct iwl_trans *trans) > iwl_read_direct32(bus(trans), > FH_TSSR_TX_STATUS_REG)); > } >- spin_unlock_irqrestore(&trans->shrd->lock, flags); >+ spin_unlock_irqrestore(&trans_pcie->irq_lock, flags); > > if (!trans_pcie->txq) { > IWL_WARN(trans, "Stopping tx queues that aren't allocated..."); >@@ -996,9 +1002,9 @@ static void iwl_trans_pcie_stop_device(struct iwl_trans *trans) > struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); > > /* tell the device to stop sending interrupts */ >- spin_lock_irqsave(&trans->shrd->lock, flags); >+ spin_lock_irqsave(&trans_pcie->irq_lock, flags); > iwl_disable_interrupts(trans); >- spin_unlock_irqrestore(&trans->shrd->lock, flags); >+ spin_unlock_irqrestore(&trans_pcie->irq_lock, flags); > > /* device going down, Stop using ICT table */ > iwl_disable_ict(trans); >@@ -1030,9 +1036,9 @@ static void iwl_trans_pcie_stop_device(struct iwl_trans *trans) > /* Upon stop, the APM issues an interrupt if HW RF kill is set. > * Clean again the interrupt here > */ >- spin_lock_irqsave(&trans->shrd->lock, flags); >+ spin_lock_irqsave(&trans_pcie->irq_lock, flags); > iwl_disable_interrupts(trans); >- spin_unlock_irqrestore(&trans->shrd->lock, flags); >+ spin_unlock_irqrestore(&trans_pcie->irq_lock, flags); > > /* wait to make sure we flush pending tasklet*/ > synchronize_irq(bus(trans)->irq); >@@ -1447,6 +1453,7 @@ static struct iwl_trans *iwl_trans_pcie_alloc(struct iwl_shared *shrd) > iwl_trans->shrd = shrd; > trans_pcie->trans = iwl_trans; > spin_lock_init(&iwl_trans->hcmd_lock); >+ spin_lock_init(&trans_pcie->irq_lock); > } > > return iwl_trans; >-- >1.7.4.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 815998
:
580046
|
580047
|
581432
| 581642 |
581650
|
584047