Commit c51b4f46 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://bkbits.ras.ucalgary.ca/rgooch-2.5

into home.transmeta.com:/home/torvalds/v2.5/linux
parents 65d1ae8d 7cc63d21
......@@ -526,12 +526,17 @@ static nmi_callback_t nmi_callback = dummy_nmi_callback;
asmlinkage void do_nmi(struct pt_regs * regs, long error_code)
{
int cpu = smp_processor_id();
int cpu;
nmi_enter();
cpu = smp_processor_id();
++nmi_count(cpu);
if (!nmi_callback(regs, cpu))
default_do_nmi(regs);
nmi_exit();
}
void set_nmi_callback(nmi_callback_t callback)
......
......@@ -43,6 +43,7 @@
#include <linux/string.h>
#include <linux/timer.h>
#include <linux/ioport.h>
#include <linux/major.h>
#include <linux/parport.h>
#include <linux/parport_pc.h>
......
......@@ -76,6 +76,8 @@ typedef struct {
#define hardirq_endlock() do { } while (0)
#define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
#define nmi_enter() (irq_enter())
#define nmi_exit() (preempt_count() -= HARDIRQ_OFFSET)
#if CONFIG_PREEMPT
# define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != kernel_locked())
......
......@@ -131,7 +131,7 @@ int alloc_pidmap(void)
*/
scan_more:
offset = find_next_zero_bit(map->page, BITS_PER_PAGE, offset);
if (offset == BITS_PER_PAGE)
if (offset >= BITS_PER_PAGE)
goto next_map;
if (test_and_set_bit(offset, map->page))
goto scan_more;
......
......@@ -770,7 +770,7 @@ static void load_balance(runqueue_t *this_rq, int idle)
idx = sched_find_first_bit(array->bitmap);
else
idx = find_next_bit(array->bitmap, MAX_PRIO, idx);
if (idx == MAX_PRIO) {
if (idx >= MAX_PRIO) {
if (array == busiest->expired) {
array = busiest->active;
goto new_array;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment