aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/common/locomo.c21
-rw-r--r--arch/arm/kernel/compat.c2
-rw-r--r--arch/arm/kernel/compat.h13
-rw-r--r--arch/arm/kernel/process.c3
-rw-r--r--arch/arm/kernel/ptrace.c2
-rw-r--r--arch/arm/kernel/setup.c5
-rw-r--r--arch/arm/mach-s3c2410/devs.c12
-rw-r--r--arch/i386/kernel/apic.c6
-rw-r--r--arch/x86_64/kernel/entry.S29
9 files changed, 75 insertions, 18 deletions
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c
index 159ad7ed7a4014..d31b1cb7eea0d8 100644
--- a/arch/arm/common/locomo.c
+++ b/arch/arm/common/locomo.c
@@ -629,6 +629,22 @@ static int locomo_resume(struct platform_device *dev)
}
#endif
+
+#define LCM_ALC_EN 0x8000
+
+void frontlight_set(struct locomo *lchip, int duty, int vr, int bpwf)
+{
+ unsigned long flags;
+
+ spin_lock_irqsave(&lchip->lock, flags);
+ locomo_writel(bpwf, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALS);
+ udelay(100);
+ locomo_writel(duty, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALD);
+ locomo_writel(bpwf | LCM_ALC_EN, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALS);
+ spin_unlock_irqrestore(&lchip->lock, flags);
+}
+
+
/**
* locomo_probe - probe for a single LoCoMo chip.
* @phys_addr: physical address of device.
@@ -688,6 +704,11 @@ __locomo_probe(struct device *me, struct resource *mem, int irq)
/* FrontLight */
locomo_writel(0, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALS);
locomo_writel(0, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALD);
+
+ /* Same constants can be used for collie and poodle
+ (depending on CONFIG options in original sharp code)? */
+ frontlight_set(lchip, 163, 0, 148);
+
/* Longtime timer */
locomo_writel(0, lchip->base + LOCOMO_LTINT);
/* SPI */
diff --git a/arch/arm/kernel/compat.c b/arch/arm/kernel/compat.c
index 7195add42e74ca..60cfa7f3226cec 100644
--- a/arch/arm/kernel/compat.c
+++ b/arch/arm/kernel/compat.c
@@ -27,6 +27,8 @@
#include <asm/mach/arch.h>
+#include "compat.h"
+
/*
* Usage:
* - do not go blindly adding fields, add them at the end
diff --git a/arch/arm/kernel/compat.h b/arch/arm/kernel/compat.h
new file mode 100644
index 00000000000000..27e61a68bd1c56
--- /dev/null
+++ b/arch/arm/kernel/compat.h
@@ -0,0 +1,13 @@
+/*
+ * linux/arch/arm/kernel/compat.h
+ *
+ * Copyright (C) 2001 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+extern void convert_to_tag_list(struct tag *tags);
+
+extern void squash_mem_tags(struct tag *tag);
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index 4b4e4cf79c8070..489c069e5c3e87 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -27,6 +27,7 @@
#include <linux/kallsyms.h>
#include <linux/init.h>
#include <linux/cpu.h>
+#include <linux/elfcore.h>
#include <asm/leds.h>
#include <asm/processor.h>
@@ -83,7 +84,7 @@ EXPORT_SYMBOL(pm_power_off);
* This is our default idle handler. We need to disable
* interrupts here to ensure we don't miss a wakeup call.
*/
-void default_idle(void)
+static void default_idle(void)
{
if (hlt_counter)
cpu_relax();
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c
index bc9e2f8ae3265d..a1d1b2906e8d60 100644
--- a/arch/arm/kernel/ptrace.c
+++ b/arch/arm/kernel/ptrace.c
@@ -628,7 +628,7 @@ static int ptrace_setwmmxregs(struct task_struct *tsk, void __user *ufp)
if (!test_ti_thread_flag(thread, TIF_USING_IWMMXT))
return -EACCES;
iwmmxt_task_release(thread); /* force a reload */
- return copy_from_user(&thead->fpstate.iwmmxt, ufp, IWMMXT_SIZE)
+ return copy_from_user(&thread->fpstate.iwmmxt, ufp, IWMMXT_SIZE)
? -EFAULT : 0;
}
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 68273b4dc8820b..08974cbe9824d8 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -37,6 +37,8 @@
#include <asm/mach/irq.h>
#include <asm/mach/time.h>
+#include "compat.h"
+
#ifndef MEM_SIZE
#define MEM_SIZE (16*1024*1024)
#endif
@@ -53,10 +55,7 @@ static int __init fpe_setup(char *line)
__setup("fpe=", fpe_setup);
#endif
-extern unsigned int mem_fclk_21285;
extern void paging_init(struct meminfo *, struct machine_desc *desc);
-extern void convert_to_tag_list(struct tag *tags);
-extern void squash_mem_tags(struct tag *tag);
extern void reboot_setup(char *str);
extern int root_mountflags;
extern void _stext, _text, _etext, __data_start, _edata, _end;
diff --git a/arch/arm/mach-s3c2410/devs.c b/arch/arm/mach-s3c2410/devs.c
index 0a47d38789a574..ca09ba516e4c1d 100644
--- a/arch/arm/mach-s3c2410/devs.c
+++ b/arch/arm/mach-s3c2410/devs.c
@@ -334,11 +334,17 @@ static struct resource s3c_spi0_resource[] = {
};
+static u64 s3c_device_spi0_dmamask = 0xffffffffUL;
+
struct platform_device s3c_device_spi0 = {
.name = "s3c2410-spi",
.id = 0,
.num_resources = ARRAY_SIZE(s3c_spi0_resource),
.resource = s3c_spi0_resource,
+ .dev = {
+ .dma_mask = &s3c_device_spi0_dmamask,
+ .coherent_dma_mask = 0xffffffffUL
+ }
};
EXPORT_SYMBOL(s3c_device_spi0);
@@ -359,11 +365,17 @@ static struct resource s3c_spi1_resource[] = {
};
+static u64 s3c_device_spi1_dmamask = 0xffffffffUL;
+
struct platform_device s3c_device_spi1 = {
.name = "s3c2410-spi",
.id = 1,
.num_resources = ARRAY_SIZE(s3c_spi1_resource),
.resource = s3c_spi1_resource,
+ .dev = {
+ .dma_mask = &s3c_device_spi1_dmamask,
+ .coherent_dma_mask = 0xffffffffUL
+ }
};
EXPORT_SYMBOL(s3c_device_spi1);
diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c
index f39e09ef64ecba..776c90989e06fe 100644
--- a/arch/i386/kernel/apic.c
+++ b/arch/i386/kernel/apic.c
@@ -570,16 +570,18 @@ void __devinit setup_local_APIC(void)
*/
void lapic_shutdown(void)
{
+ unsigned long flags;
+
if (!cpu_has_apic)
return;
- local_irq_disable();
+ local_irq_save(flags);
clear_local_APIC();
if (enabled_via_apicbase)
disable_local_APIC();
- local_irq_enable();
+ local_irq_restore(flags);
}
#ifdef CONFIG_PM
diff --git a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S
index 22cb6ee074b919..7c10e9009d6111 100644
--- a/arch/x86_64/kernel/entry.S
+++ b/arch/x86_64/kernel/entry.S
@@ -178,12 +178,6 @@ rff_trace:
* Interrupts are off on entry.
* Only called from user space.
*
- * EM64T CPUs have somewhat weird error reporting for non canonical RIPs in SYSRET.
- * We can't handle any exceptions there because the exception handler would
- * end up running on the user stack which is unsafe. To avoid problems
- * any code that might end up with a user touched pt_regs should return
- * using int_ret_from_syscall.
- *
* XXX if we had a free scratch register we could save the RSP into the stack frame
* and report it properly in ps. Unfortunately we haven't.
*/
@@ -260,9 +254,7 @@ sysret_signal:
xorl %esi,%esi # oldset -> arg2
call ptregscall_common
1: movl $_TIF_NEED_RESCHED,%edi
- /* Stack frame might have been changed. The IRET path does
- some additional checks to handle this */
- jmp int_with_check
+ jmp sysret_check
badsys:
movq $-ENOSYS,RAX-ARGOFFSET(%rsp)
@@ -288,8 +280,7 @@ tracesys:
call syscall_trace_leave
RESTORE_TOP_OF_STACK %rbx
RESTORE_REST
- /* Stack frame might have been changed. Use the more careful IRET path */
- jmp int_ret_from_sys_call
+ jmp ret_from_sys_call
CFI_ENDPROC
/*
@@ -417,9 +408,25 @@ ENTRY(stub_execve)
CFI_ADJUST_CFA_OFFSET -8
CFI_REGISTER rip, r11
SAVE_REST
+ movq %r11, %r15
+ CFI_REGISTER rip, r15
FIXUP_TOP_OF_STACK %r11
call sys_execve
+ GET_THREAD_INFO(%rcx)
+ bt $TIF_IA32,threadinfo_flags(%rcx)
+ CFI_REMEMBER_STATE
+ jc exec_32bit
RESTORE_TOP_OF_STACK %r11
+ movq %r15, %r11
+ CFI_REGISTER rip, r11
+ RESTORE_REST
+ pushq %r11
+ CFI_ADJUST_CFA_OFFSET 8
+ CFI_REL_OFFSET rip, 0
+ ret
+
+exec_32bit:
+ CFI_RESTORE_STATE
movq %rax,RAX(%rsp)
RESTORE_REST
jmp int_ret_from_sys_call