aboutsummaryrefslogtreecommitdiff
path: root/arch/alpha/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/alpha/kernel')
-rw-r--r--arch/alpha/kernel/alpha_ksyms.c9
-rw-r--r--arch/alpha/kernel/entry.S2
-rw-r--r--arch/alpha/kernel/head.S2
-rw-r--r--arch/alpha/kernel/module.c8
-rw-r--r--arch/alpha/kernel/osf_sys.c7
-rw-r--r--arch/alpha/kernel/smp.c172
6 files changed, 10 insertions, 190 deletions
diff --git a/arch/alpha/kernel/alpha_ksyms.c b/arch/alpha/kernel/alpha_ksyms.c
index fc5ef90c4fc..24ae9a36607 100644
--- a/arch/alpha/kernel/alpha_ksyms.c
+++ b/arch/alpha/kernel/alpha_ksyms.c
@@ -185,15 +185,6 @@ EXPORT_SYMBOL(smp_num_cpus);
EXPORT_SYMBOL(smp_call_function);
EXPORT_SYMBOL(smp_call_function_on_cpu);
EXPORT_SYMBOL(_atomic_dec_and_lock);
-#ifdef CONFIG_DEBUG_SPINLOCK
-EXPORT_SYMBOL(_raw_spin_unlock);
-EXPORT_SYMBOL(debug_spin_lock);
-EXPORT_SYMBOL(debug_spin_trylock);
-#endif
-#ifdef CONFIG_DEBUG_RWLOCK
-EXPORT_SYMBOL(_raw_write_lock);
-EXPORT_SYMBOL(_raw_read_lock);
-#endif
EXPORT_SYMBOL(cpu_present_mask);
#endif /* CONFIG_SMP */
diff --git a/arch/alpha/kernel/entry.S b/arch/alpha/kernel/entry.S
index f0927ee53f2..76cc0cb5fc2 100644
--- a/arch/alpha/kernel/entry.S
+++ b/arch/alpha/kernel/entry.S
@@ -5,7 +5,7 @@
*/
#include <linux/config.h>
-#include <asm/asm_offsets.h>
+#include <asm/asm-offsets.h>
#include <asm/thread_info.h>
#include <asm/pal.h>
#include <asm/errno.h>
diff --git a/arch/alpha/kernel/head.S b/arch/alpha/kernel/head.S
index 4ca2e404708..0905721fcbc 100644
--- a/arch/alpha/kernel/head.S
+++ b/arch/alpha/kernel/head.S
@@ -9,7 +9,7 @@
#include <linux/config.h>
#include <asm/system.h>
-#include <asm/asm_offsets.h>
+#include <asm/asm-offsets.h>
.globl swapper_pg_dir
.globl _stext
diff --git a/arch/alpha/kernel/module.c b/arch/alpha/kernel/module.c
index fc271e316a3..aac6d4b22f7 100644
--- a/arch/alpha/kernel/module.c
+++ b/arch/alpha/kernel/module.c
@@ -47,7 +47,7 @@ module_free(struct module *mod, void *module_region)
struct got_entry {
struct got_entry *next;
- Elf64_Addr r_offset;
+ Elf64_Sxword r_addend;
int got_offset;
};
@@ -57,14 +57,14 @@ process_reloc_for_got(Elf64_Rela *rela,
{
unsigned long r_sym = ELF64_R_SYM (rela->r_info);
unsigned long r_type = ELF64_R_TYPE (rela->r_info);
- Elf64_Addr r_offset = rela->r_offset;
+ Elf64_Sxword r_addend = rela->r_addend;
struct got_entry *g;
if (r_type != R_ALPHA_LITERAL)
return;
for (g = chains + r_sym; g ; g = g->next)
- if (g->r_offset == r_offset) {
+ if (g->r_addend == r_addend) {
if (g->got_offset == 0) {
g->got_offset = *poffset;
*poffset += 8;
@@ -74,7 +74,7 @@ process_reloc_for_got(Elf64_Rela *rela,
g = kmalloc (sizeof (*g), GFP_KERNEL);
g->next = chains[r_sym].next;
- g->r_offset = r_offset;
+ g->r_addend = r_addend;
g->got_offset = *poffset;
*poffset += 8;
chains[r_sym].next = g;
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c
index 167fd89f870..0636116210d 100644
--- a/arch/alpha/kernel/osf_sys.c
+++ b/arch/alpha/kernel/osf_sys.c
@@ -974,6 +974,7 @@ osf_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp,
size_t size;
long timeout;
int ret = -EINVAL;
+ struct fdtable *fdt;
timeout = MAX_SCHEDULE_TIMEOUT;
if (tvp) {
@@ -995,7 +996,8 @@ osf_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp,
}
}
- if (n < 0 || n > current->files->max_fdset)
+ fdt = files_fdtable(current->files);
+ if (n < 0 || n > fdt->max_fdset)
goto out_nofds;
/*
@@ -1152,8 +1154,7 @@ osf_usleep_thread(struct timeval32 __user *sleep, struct timeval32 __user *remai
ticks = timeval_to_jiffies(&tmp);
- current->state = TASK_INTERRUPTIBLE;
- ticks = schedule_timeout(ticks);
+ ticks = schedule_timeout_interruptible(ticks);
if (remain) {
jiffies_to_timeval(ticks, &tmp);
diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c
index e211aa7404e..da0be346579 100644
--- a/arch/alpha/kernel/smp.c
+++ b/arch/alpha/kernel/smp.c
@@ -989,175 +989,3 @@ flush_icache_user_range(struct vm_area_struct *vma, struct page *page,
preempt_enable();
}
-
-#ifdef CONFIG_DEBUG_SPINLOCK
-void
-_raw_spin_unlock(spinlock_t * lock)
-{
- mb();
- lock->lock = 0;
-
- lock->on_cpu = -1;
- lock->previous = NULL;
- lock->task = NULL;
- lock->base_file = "none";
- lock->line_no = 0;
-}
-
-void
-debug_spin_lock(spinlock_t * lock, const char *base_file, int line_no)
-{
- long tmp;
- long stuck;
- void *inline_pc = __builtin_return_address(0);
- unsigned long started = jiffies;
- int printed = 0;
- int cpu = smp_processor_id();
-
- stuck = 1L << 30;
- try_again:
-
- /* Use sub-sections to put the actual loop at the end
- of this object file's text section so as to perfect
- branch prediction. */
- __asm__ __volatile__(
- "1: ldl_l %0,%1\n"
- " subq %2,1,%2\n"
- " blbs %0,2f\n"
- " or %0,1,%0\n"
- " stl_c %0,%1\n"
- " beq %0,3f\n"
- "4: mb\n"
- ".subsection 2\n"
- "2: ldl %0,%1\n"
- " subq %2,1,%2\n"
- "3: blt %2,4b\n"
- " blbs %0,2b\n"
- " br 1b\n"
- ".previous"
- : "=r" (tmp), "=m" (lock->lock), "=r" (stuck)
- : "m" (lock->lock), "2" (stuck) : "memory");
-
- if (stuck < 0) {
- printk(KERN_WARNING
- "%s:%d spinlock stuck in %s at %p(%d)"
- " owner %s at %p(%d) %s:%d\n",
- base_file, line_no,
- current->comm, inline_pc, cpu,
- lock->task->comm, lock->previous,
- lock->on_cpu, lock->base_file, lock->line_no);
- stuck = 1L << 36;
- printed = 1;
- goto try_again;
- }
-
- /* Exiting. Got the lock. */
- lock->on_cpu = cpu;
- lock->previous = inline_pc;
- lock->task = current;
- lock->base_file = base_file;
- lock->line_no = line_no;
-
- if (printed) {
- printk(KERN_WARNING
- "%s:%d spinlock grabbed in %s at %p(%d) %ld ticks\n",
- base_file, line_no, current->comm, inline_pc,
- cpu, jiffies - started);
- }
-}
-
-int
-debug_spin_trylock(spinlock_t * lock, const char *base_file, int line_no)
-{
- int ret;
- if ((ret = !test_and_set_bit(0, lock))) {
- lock->on_cpu = smp_processor_id();
- lock->previous = __builtin_return_address(0);
- lock->task = current;
- } else {
- lock->base_file = base_file;
- lock->line_no = line_no;
- }
- return ret;
-}
-#endif /* CONFIG_DEBUG_SPINLOCK */
-
-#ifdef CONFIG_DEBUG_RWLOCK
-void _raw_write_lock(rwlock_t * lock)
-{
- long regx, regy;
- int stuck_lock, stuck_reader;
- void *inline_pc = __builtin_return_address(0);
-
- try_again:
-
- stuck_lock = 1<<30;
- stuck_reader = 1<<30;
-
- __asm__ __volatile__(
- "1: ldl_l %1,%0\n"
- " blbs %1,6f\n"
- " blt %1,8f\n"
- " mov 1,%1\n"
- " stl_c %1,%0\n"
- " beq %1,6f\n"
- "4: mb\n"
- ".subsection 2\n"
- "6: blt %3,4b # debug\n"
- " subl %3,1,%3 # debug\n"
- " ldl %1,%0\n"
- " blbs %1,6b\n"
- "8: blt %4,4b # debug\n"
- " subl %4,1,%4 # debug\n"
- " ldl %1,%0\n"
- " blt %1,8b\n"
- " br 1b\n"
- ".previous"
- : "=m" (*(volatile int *)lock), "=&r" (regx), "=&r" (regy),
- "=&r" (stuck_lock), "=&r" (stuck_reader)
- : "m" (*(volatile int *)lock), "3" (stuck_lock), "4" (stuck_reader) : "memory");
-
- if (stuck_lock < 0) {
- printk(KERN_WARNING "write_lock stuck at %p\n", inline_pc);
- goto try_again;
- }
- if (stuck_reader < 0) {
- printk(KERN_WARNING "write_lock stuck on readers at %p\n",
- inline_pc);
- goto try_again;
- }
-}
-
-void _raw_read_lock(rwlock_t * lock)
-{
- long regx;
- int stuck_lock;
- void *inline_pc = __builtin_return_address(0);
-
- try_again:
-
- stuck_lock = 1<<30;
-
- __asm__ __volatile__(
- "1: ldl_l %1,%0;"
- " blbs %1,6f;"
- " subl %1,2,%1;"
- " stl_c %1,%0;"
- " beq %1,6f;"
- "4: mb\n"
- ".subsection 2\n"
- "6: ldl %1,%0;"
- " blt %2,4b # debug\n"
- " subl %2,1,%2 # debug\n"
- " blbs %1,6b;"
- " br 1b\n"
- ".previous"
- : "=m" (*(volatile int *)lock), "=&r" (regx), "=&r" (stuck_lock)
- : "m" (*(volatile int *)lock), "2" (stuck_lock) : "memory");
-
- if (stuck_lock < 0) {
- printk(KERN_WARNING "read_lock stuck at %p\n", inline_pc);
- goto try_again;
- }
-}
-#endif /* CONFIG_DEBUG_RWLOCK */