From: Marek Majtyka <marekx.majt...@intel.com>

Removal of irq_default_primary_handler usage inside kernel
api causes context switch in atomic inside sm edac driver
for 56xx. IRQ handler is not registered anymore as a threaded
interrupt by default (IRQF_ONESHOT). It is an issue as
wake_up function in RT kernel is not using raw spinlocks.

Signed-off-by: Marek Majtyka <marekx.majt...@intel.com>
---
 drivers/edac/axxia_edac-mc_56xx.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/edac/axxia_edac-mc_56xx.c 
b/drivers/edac/axxia_edac-mc_56xx.c
index f850ebe..5d91ba6 100644
--- a/drivers/edac/axxia_edac-mc_56xx.c
+++ b/drivers/edac/axxia_edac-mc_56xx.c
@@ -162,7 +162,7 @@ static atomic64_t mc_counter = ATOMIC_INIT(0);
  * one need to collect dumps for all available cs. Below given example
  * for two cs0/cs1.
  *
- *   SMEM MC           smmon_isr           smmon_wq
+ *   SMEM MC           smmon_isr_sw           smmon_wq
  *     |                   |                   |
  *     |                   |                   |
  *     |ALERT_N - int_status bit [33]          |
@@ -904,7 +904,13 @@ error_read:
 }
 
 static irqreturn_t
-smmon_isr(int interrupt, void *device)
+smmon_isr_hw(int interrupt, void *device)
+{
+       return IRQ_WAKE_THREAD;
+}
+
+static irqreturn_t
+smmon_isr_sw(int interrupt, void *device)
 {
        struct intel_edac_dev_info *dev_info = device;
        struct sm_56xx_denali_ctl_366 denali_ctl_366;
@@ -1382,8 +1388,8 @@ static int intel_edac_mc_probe(struct platform_device 
*pdev)
        }
 
        dev_info->data->irq = irq;
-       rc = devm_request_irq(&pdev->dev, irq,
-                       smmon_isr, IRQF_ONESHOT,
+       rc = devm_request_threaded_irq(&pdev->dev, irq,
+                       smmon_isr_hw, smmon_isr_sw, IRQF_ONESHOT,
                        &dev_info->data->irq_name[0], dev_info);
 
        if (rc) {
-- 
2.7.4

-- 
_______________________________________________
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto

Reply via email to