From: James Nelson <james4765@cwazy.co.uk>
To: linux-kernel@vger.kernel.org, dev-etrax@axis.com
Cc: starvik@axis.com, James Nelson <james4765@cwazy.co.uk>
Subject: [PATCH 2/2] cris: remove cli()/sti() in arch/cris/arch-v10/kernel/fasttimer.c
Date: Tue, 4 Jan 2005 19:39:57 -0600 [thread overview]
Message-ID: <20050105014016.22177.76110.69303@localhost.localdomain> (raw)
In-Reply-To: <20050105014001.22177.28259.66716@localhost.localdomain>
Signed-off-by: James Nelson <james4765@gmail.com>
diff -urN --exclude='*~' linux-2.6.10-mm1-original/arch/cris/arch-v10/kernel/fasttimer.c linux-2.6.10-mm1/arch/cris/arch-v10/kernel/fasttimer.c
--- linux-2.6.10-mm1-original/arch/cris/arch-v10/kernel/fasttimer.c 2005-01-03 18:42:38.175748400 -0500
+++ linux-2.6.10-mm1/arch/cris/arch-v10/kernel/fasttimer.c 2005-01-04 20:21:49.052049939 -0500
@@ -148,8 +148,7 @@
#define DEBUG_LOG(string, value) \
{ \
unsigned long log_flags; \
- save_flags(log_flags); \
- cli(); \
+ local_irq_save(log_flags); \
debug_log_string[debug_log_cnt] = (string); \
debug_log_value[debug_log_cnt] = (unsigned long)(value); \
if (++debug_log_cnt >= DEBUG_LOG_MAX) \
@@ -157,7 +156,7 @@
debug_log_cnt = debug_log_cnt % DEBUG_LOG_MAX; \
debug_log_cnt_wrapped = 1; \
} \
- restore_flags(log_flags); \
+ local_irq_restore(log_flags); \
}
#else
#define DEBUG_LOG(string, value)
@@ -320,8 +319,7 @@
D1(printk("sft %s %d us\n", name, delay_us));
- save_flags(flags);
- cli();
+ local_irq_save(flags);
do_gettimeofday_fast(&t->tv_set);
tmp = fast_timer_list;
@@ -395,7 +393,7 @@
D2(printk("start_one_shot_timer: %d us done\n", delay_us));
- restore_flags(flags);
+ local_irq_restore(flags);
} /* start_one_shot_timer */
static inline int fast_timer_pending (const struct fast_timer * t)
@@ -425,11 +423,10 @@
unsigned long flags;
int ret;
- save_flags(flags);
- cli();
+ local_irq_save(flags);
ret = detach_fast_timer(t);
t->next = t->prev = NULL;
- restore_flags(flags);
+ local_irq_restore(flags);
return ret;
} /* del_fast_timer */
@@ -444,8 +441,7 @@
struct fast_timer *t;
unsigned long flags;
- save_flags(flags);
- cli();
+ local_irq_save(flags);
/* Clear timer1 irq */
*R_IRQ_MASK0_CLR = IO_STATE(R_IRQ_MASK0_CLR, timer1, clr);
@@ -462,7 +458,7 @@
fast_timer_running = 0;
fast_timer_ints++;
- restore_flags(flags);
+ local_irq_restore(flags);
t = fast_timer_list;
while (t)
@@ -482,8 +478,7 @@
fast_timers_expired++;
/* Remove this timer before call, since it may reuse the timer */
- save_flags(flags);
- cli();
+ local_irq_save(flags);
if (t->prev)
{
t->prev->next = t->next;
@@ -498,7 +493,7 @@
}
t->prev = NULL;
t->next = NULL;
- restore_flags(flags);
+ local_irq_restore(flags);
if (t->function != NULL)
{
@@ -515,8 +510,7 @@
D1(printk(".\n"));
}
- save_flags(flags);
- cli();
+ local_irq_save(flags);
if ((t = fast_timer_list) != NULL)
{
/* Start next timer.. */
@@ -535,7 +529,7 @@
#endif
start_timer1(us);
}
- restore_flags(flags);
+ local_irq_restore(flags);
break;
}
else
@@ -546,7 +540,7 @@
D1(printk("e! %d\n", us));
}
}
- restore_flags(flags);
+ local_irq_restore(flags);
}
if (!t)
@@ -748,13 +742,12 @@
#endif
used += sprintf(bigbuf + used, "Active timers:\n");
- save_flags(flags);
- cli();
+ local_irq_save(flags);
t = fast_timer_list;
while (t != NULL && (used+100 < BIG_BUF_SIZE))
{
nextt = t->next;
- restore_flags(flags);
+ local_irq_restore(flags);
used += sprintf(bigbuf + used, "%-14s s: %6lu.%06lu e: %6lu.%06lu "
"d: %6li us data: 0x%08lX"
/* " func: 0x%08lX" */
@@ -768,14 +761,14 @@
t->data
/* , t->function */
);
- cli();
+ local_irq_save(flags);
if (t->next != nextt)
{
printk(KERN_WARNING "timer removed!\n");
}
t = nextt;
}
- restore_flags(flags);
+ local_irq_restore(flags);
}
if (used - offset < len)
prev parent reply other threads:[~2005-01-05 1:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-05 1:39 [PATCH 0/2] cris: remove cli()/sti() from arch/cris/* James Nelson
2005-01-05 1:39 ` [PATCH 1/2] cris: remove cli()/sti() in arch/cris/arch-v10/drivers/gpio.c James Nelson
2005-01-05 1:39 ` James Nelson [this message]
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=20050105014016.22177.76110.69303@localhost.localdomain \
--to=james4765@cwazy.co.uk \
--cc=dev-etrax@axis.com \
--cc=linux-kernel@vger.kernel.org \
--cc=starvik@axis.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
all inboxes | Powered by JetHome®