summaryrefslogtreecommitdiff
path: root/libdde_linux26/lib/src
diff options
context:
space:
mode:
Diffstat (limited to 'libdde_linux26/lib/src')
-rw-r--r--libdde_linux26/lib/src/arch/l4/softirq.c13
-rw-r--r--libdde_linux26/lib/src/net/core/dev.c9
2 files changed, 18 insertions, 4 deletions
diff --git a/libdde_linux26/lib/src/arch/l4/softirq.c b/libdde_linux26/lib/src/arch/l4/softirq.c
index 21b36d17..be13422b 100644
--- a/libdde_linux26/lib/src/arch/l4/softirq.c
+++ b/libdde_linux26/lib/src/arch/l4/softirq.c
@@ -172,6 +172,7 @@ static void tasklet_hi_action(struct softirq_action *a)
}
}
+ddekit_lock_t cli_lock;
#define MAX_SOFTIRQ_RETRIES 10
@@ -186,6 +187,8 @@ void __do_softirq(void)
/* reset softirq count */
set_softirq_pending(0);
+ ddekit_lock_unlock(&cli_lock);
+// local_irq_enable();
/* While we have a softirq pending... */
while (pending) {
@@ -197,6 +200,8 @@ void __do_softirq(void)
/* remove pending flag for last softirq */
pending >>= 1;
}
+// local_irq_disable();
+ ddekit_lock_lock(&cli_lock);
/* Somebody might have scheduled another softirq in between
* (e.g., an IRQ thread or another tasklet). */
@@ -209,10 +214,14 @@ void do_softirq(void)
{
unsigned long flags;
- local_irq_save(flags);
+ if (cli_lock == NULL)
+ ddekit_lock_init_unlocked(&cli_lock);
+ ddekit_lock_lock(&cli_lock);
+// local_irq_save(flags);
if (local_softirq_pending())
__do_softirq();
- local_irq_restore(flags);
+// local_irq_restore(flags);
+ ddekit_lock_unlock(&cli_lock);
}
/** Softirq thread function.
diff --git a/libdde_linux26/lib/src/net/core/dev.c b/libdde_linux26/lib/src/net/core/dev.c
index 64917332..128f4d73 100644
--- a/libdde_linux26/lib/src/net/core/dev.c
+++ b/libdde_linux26/lib/src/net/core/dev.c
@@ -2611,11 +2611,16 @@ out:
void __napi_schedule(struct napi_struct *n)
{
unsigned long flags;
+ extern ddekit_lock_t cli_lock;
- local_irq_save(flags);
+ if (cli_lock == NULL)
+ ddekit_lock_init_unlocked(&cli_lock);
+ ddekit_lock_lock(&cli_lock);
+// local_irq_save(flags);
list_add_tail(&n->poll_list, &__get_cpu_var(softnet_data).poll_list);
__raise_softirq_irqoff(NET_RX_SOFTIRQ);
- local_irq_restore(flags);
+// local_irq_restore(flags);
+ ddekit_lock_unlock(&cli_lock);
}
EXPORT_SYMBOL(__napi_schedule);