aboutsummaryrefslogtreecommitdiffstats
path: root/arch/alpha/kernel
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2006-02-07 01:47:12 -0500
committerJeff Garzik <jgarzik@pobox.com>2006-02-07 01:47:12 -0500
commit3c9b3a8575b4f2551e3b5b74ffa1c3559c6338eb (patch)
tree7f8d84353852401ec74e005f6f0b1eb958b9a70d /arch/alpha/kernel
parentc0d3c0c0ce94d3db893577ae98e64414d92e49d8 (diff)
parentc03296a868ae7c91aa2d8b372184763b18f16d7a (diff)
Merge branch 'master'
Diffstat (limited to 'arch/alpha/kernel')
-rw-r--r--arch/alpha/kernel/asm-offsets.c1
-rw-r--r--arch/alpha/kernel/entry.S16
-rw-r--r--arch/alpha/kernel/irq.c36
3 files changed, 26 insertions, 27 deletions
diff --git a/arch/alpha/kernel/asm-offsets.c b/arch/alpha/kernel/asm-offsets.c
index 8f2e5c718b50..6c56c754a0b5 100644
--- a/arch/alpha/kernel/asm-offsets.c
+++ b/arch/alpha/kernel/asm-offsets.c
@@ -28,6 +28,7 @@ void foo(void)
28 DEFINE(TASK_GID, offsetof(struct task_struct, gid)); 28 DEFINE(TASK_GID, offsetof(struct task_struct, gid));
29 DEFINE(TASK_EGID, offsetof(struct task_struct, egid)); 29 DEFINE(TASK_EGID, offsetof(struct task_struct, egid));
30 DEFINE(TASK_REAL_PARENT, offsetof(struct task_struct, real_parent)); 30 DEFINE(TASK_REAL_PARENT, offsetof(struct task_struct, real_parent));
31 DEFINE(TASK_GROUP_LEADER, offsetof(struct task_struct, group_leader));
31 DEFINE(TASK_TGID, offsetof(struct task_struct, tgid)); 32 DEFINE(TASK_TGID, offsetof(struct task_struct, tgid));
32 BLANK(); 33 BLANK();
33 34
diff --git a/arch/alpha/kernel/entry.S b/arch/alpha/kernel/entry.S
index e38671c922bc..7af15bf7e5ab 100644
--- a/arch/alpha/kernel/entry.S
+++ b/arch/alpha/kernel/entry.S
@@ -879,17 +879,19 @@ sys_getxpid:
879 879
880 /* See linux/kernel/timer.c sys_getppid for discussion 880 /* See linux/kernel/timer.c sys_getppid for discussion
881 about this loop. */ 881 about this loop. */
882 ldq $3, TASK_REAL_PARENT($2) 882 ldq $3, TASK_GROUP_LEADER($2)
8831: ldl $1, TASK_TGID($3) 883 ldq $4, TASK_REAL_PARENT($3)
884 ldl $0, TASK_TGID($2)
8851: ldl $1, TASK_TGID($4)
884#ifdef CONFIG_SMP 886#ifdef CONFIG_SMP
885 mov $3, $4 887 mov $4, $5
886 mb 888 mb
887 ldq $3, TASK_REAL_PARENT($2) 889 ldq $3, TASK_GROUP_LEADER($2)
888 cmpeq $3, $4, $4 890 ldq $4, TASK_REAL_PARENT($3)
889 beq $4, 1b 891 cmpeq $4, $5, $5
892 beq $5, 1b
890#endif 893#endif
891 stq $1, 80($sp) 894 stq $1, 80($sp)
892 ldl $0, TASK_TGID($2)
893 ret 895 ret
894.end sys_getxpid 896.end sys_getxpid
895 897
diff --git a/arch/alpha/kernel/irq.c b/arch/alpha/kernel/irq.c
index 76be5cf0de13..9006063e7369 100644
--- a/arch/alpha/kernel/irq.c
+++ b/arch/alpha/kernel/irq.c
@@ -68,34 +68,32 @@ show_interrupts(struct seq_file *p, void *v)
68#ifdef CONFIG_SMP 68#ifdef CONFIG_SMP
69 int j; 69 int j;
70#endif 70#endif
71 int i = *(loff_t *) v; 71 int irq = *(loff_t *) v;
72 struct irqaction * action; 72 struct irqaction * action;
73 unsigned long flags; 73 unsigned long flags;
74 74
75#ifdef CONFIG_SMP 75#ifdef CONFIG_SMP
76 if (i == 0) { 76 if (irq == 0) {
77 seq_puts(p, " "); 77 seq_puts(p, " ");
78 for (i = 0; i < NR_CPUS; i++) 78 for_each_online_cpu(j)
79 if (cpu_online(i)) 79 seq_printf(p, "CPU%d ", j);
80 seq_printf(p, "CPU%d ", i);
81 seq_putc(p, '\n'); 80 seq_putc(p, '\n');
82 } 81 }
83#endif 82#endif
84 83
85 if (i < ACTUAL_NR_IRQS) { 84 if (irq < ACTUAL_NR_IRQS) {
86 spin_lock_irqsave(&irq_desc[i].lock, flags); 85 spin_lock_irqsave(&irq_desc[irq].lock, flags);
87 action = irq_desc[i].action; 86 action = irq_desc[irq].action;
88 if (!action) 87 if (!action)
89 goto unlock; 88 goto unlock;
90 seq_printf(p, "%3d: ",i); 89 seq_printf(p, "%3d: ", irq);
91#ifndef CONFIG_SMP 90#ifndef CONFIG_SMP
92 seq_printf(p, "%10u ", kstat_irqs(i)); 91 seq_printf(p, "%10u ", kstat_irqs(irq));
93#else 92#else
94 for (j = 0; j < NR_CPUS; j++) 93 for_each_online_cpu(j)
95 if (cpu_online(j)) 94 seq_printf(p, "%10u ", kstat_cpu(j).irqs[irq]);
96 seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
97#endif 95#endif
98 seq_printf(p, " %14s", irq_desc[i].handler->typename); 96 seq_printf(p, " %14s", irq_desc[irq].handler->typename);
99 seq_printf(p, " %c%s", 97 seq_printf(p, " %c%s",
100 (action->flags & SA_INTERRUPT)?'+':' ', 98 (action->flags & SA_INTERRUPT)?'+':' ',
101 action->name); 99 action->name);
@@ -108,13 +106,12 @@ show_interrupts(struct seq_file *p, void *v)
108 106
109 seq_putc(p, '\n'); 107 seq_putc(p, '\n');
110unlock: 108unlock:
111 spin_unlock_irqrestore(&irq_desc[i].lock, flags); 109 spin_unlock_irqrestore(&irq_desc[irq].lock, flags);
112 } else if (i == ACTUAL_NR_IRQS) { 110 } else if (irq == ACTUAL_NR_IRQS) {
113#ifdef CONFIG_SMP 111#ifdef CONFIG_SMP
114 seq_puts(p, "IPI: "); 112 seq_puts(p, "IPI: ");
115 for (i = 0; i < NR_CPUS; i++) 113 for_each_online_cpu(j)
116 if (cpu_online(i)) 114 seq_printf(p, "%10lu ", cpu_data[j].ipi_count);
117 seq_printf(p, "%10lu ", cpu_data[i].ipi_count);
118 seq_putc(p, '\n'); 115 seq_putc(p, '\n');
119#endif 116#endif
120 seq_printf(p, "ERR: %10lu\n", irq_err_count); 117 seq_printf(p, "ERR: %10lu\n", irq_err_count);
@@ -122,7 +119,6 @@ unlock:
122 return 0; 119 return 0;
123} 120}
124 121
125
126/* 122/*
127 * handle_irq handles all normal device IRQ's (the special 123 * handle_irq handles all normal device IRQ's (the special
128 * SMP cross-CPU interrupts have their own specific 124 * SMP cross-CPU interrupts have their own specific