Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 30970
b: refs/heads/master
c: 1a24586
h: refs/heads/master
v: v3
  • Loading branch information
Corey Minyard authored and Linus Torvalds committed Jun 28, 2006
1 parent f022435 commit a0fac2b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 68 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 409035e088ce15178c5aa157cab493bc22096b6d
refs/heads/master: 1a245866f8a417250c0f82b16f7a6dcf0b812f58
67 changes: 0 additions & 67 deletions trunk/drivers/char/ipmi/ipmi_si_intf.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,23 +55,6 @@
#include <linux/mutex.h>
#include <linux/kthread.h>
#include <asm/irq.h>
#ifdef CONFIG_HIGH_RES_TIMERS
#include <linux/hrtime.h>
# if defined(schedule_next_int)
/* Old high-res timer code, do translations. */
# define get_arch_cycles(a) quick_update_jiffies_sub(a)
# define arch_cycles_per_jiffy cycles_per_jiffies
# endif
static inline void add_usec_to_timer(struct timer_list *t, long v)
{
t->arch_cycle_expires += nsec_to_arch_cycle(v * 1000);
while (t->arch_cycle_expires >= arch_cycles_per_jiffy)
{
t->expires++;
t->arch_cycle_expires -= arch_cycles_per_jiffy;
}
}
#endif
#include <linux/interrupt.h>
#include <linux/rcupdate.h>
#include <linux/ipmi_smi.h>
Expand Down Expand Up @@ -243,8 +226,6 @@ static int register_xaction_notifier(struct notifier_block * nb)
return atomic_notifier_chain_register(&xaction_notifier_list, nb);
}

static void si_restart_short_timer(struct smi_info *smi_info);

static void deliver_recv_msg(struct smi_info *smi_info,
struct ipmi_smi_msg *msg)
{
Expand Down Expand Up @@ -768,7 +749,6 @@ static void sender(void *send_info,
&& (smi_info->curr_msg == NULL))
{
start_next_msg(smi_info);
si_restart_short_timer(smi_info);
}
spin_unlock_irqrestore(&(smi_info->si_lock), flags);
}
Expand Down Expand Up @@ -833,37 +813,6 @@ static void request_events(void *send_info)

static int initialized = 0;

/* Must be called with interrupts off and with the si_lock held. */
static void si_restart_short_timer(struct smi_info *smi_info)
{
#if defined(CONFIG_HIGH_RES_TIMERS)
unsigned long flags;
unsigned long jiffies_now;
unsigned long seq;

if (del_timer(&(smi_info->si_timer))) {
/* If we don't delete the timer, then it will go off
immediately, anyway. So we only process if we
actually delete the timer. */

do {
seq = read_seqbegin_irqsave(&xtime_lock, flags);
jiffies_now = jiffies;
smi_info->si_timer.expires = jiffies_now;
smi_info->si_timer.arch_cycle_expires
= get_arch_cycles(jiffies_now);
} while (read_seqretry_irqrestore(&xtime_lock, seq, flags));

add_usec_to_timer(&smi_info->si_timer, SI_SHORT_TIMEOUT_USEC);

add_timer(&(smi_info->si_timer));
spin_lock_irqsave(&smi_info->count_lock, flags);
smi_info->timeout_restarts++;
spin_unlock_irqrestore(&smi_info->count_lock, flags);
}
#endif
}

static void smi_timeout(unsigned long data)
{
struct smi_info *smi_info = (struct smi_info *) data;
Expand Down Expand Up @@ -904,31 +853,15 @@ static void smi_timeout(unsigned long data)
/* If the state machine asks for a short delay, then shorten
the timer timeout. */
if (smi_result == SI_SM_CALL_WITH_DELAY) {
#if defined(CONFIG_HIGH_RES_TIMERS)
unsigned long seq;
#endif
spin_lock_irqsave(&smi_info->count_lock, flags);
smi_info->short_timeouts++;
spin_unlock_irqrestore(&smi_info->count_lock, flags);
#if defined(CONFIG_HIGH_RES_TIMERS)
do {
seq = read_seqbegin_irqsave(&xtime_lock, flags);
smi_info->si_timer.expires = jiffies;
smi_info->si_timer.arch_cycle_expires
= get_arch_cycles(smi_info->si_timer.expires);
} while (read_seqretry_irqrestore(&xtime_lock, seq, flags));
add_usec_to_timer(&smi_info->si_timer, SI_SHORT_TIMEOUT_USEC);
#else
smi_info->si_timer.expires = jiffies + 1;
#endif
} else {
spin_lock_irqsave(&smi_info->count_lock, flags);
smi_info->long_timeouts++;
spin_unlock_irqrestore(&smi_info->count_lock, flags);
smi_info->si_timer.expires = jiffies + SI_TIMEOUT_JIFFIES;
#if defined(CONFIG_HIGH_RES_TIMERS)
smi_info->si_timer.arch_cycle_expires = 0;
#endif
}

do_add_timer:
Expand Down

0 comments on commit a0fac2b

Please sign in to comment.