Merge branch 'for_rmk' of git://git.linaro.org/kernel/linux-linaro-next into devel-stable
This commit is contained in:
commit
a9fda02bfc
325 changed files with 2691 additions and 1455 deletions
30
MAINTAINERS
30
MAINTAINERS
|
@ -1142,7 +1142,7 @@ ATLX ETHERNET DRIVERS
|
||||||
M: Jay Cliburn <jcliburn@gmail.com>
|
M: Jay Cliburn <jcliburn@gmail.com>
|
||||||
M: Chris Snook <chris.snook@gmail.com>
|
M: Chris Snook <chris.snook@gmail.com>
|
||||||
M: Jie Yang <jie.yang@atheros.com>
|
M: Jie Yang <jie.yang@atheros.com>
|
||||||
L: atl1-devel@lists.sourceforge.net
|
L: netdev@vger.kernel.org
|
||||||
W: http://sourceforge.net/projects/atl1
|
W: http://sourceforge.net/projects/atl1
|
||||||
W: http://atl1.sourceforge.net
|
W: http://atl1.sourceforge.net
|
||||||
S: Maintained
|
S: Maintained
|
||||||
|
@ -1227,7 +1227,7 @@ F: drivers/auxdisplay/
|
||||||
F: include/linux/cfag12864b.h
|
F: include/linux/cfag12864b.h
|
||||||
|
|
||||||
AVR32 ARCHITECTURE
|
AVR32 ARCHITECTURE
|
||||||
M: Haavard Skinnemoen <hskinnemoen@atmel.com>
|
M: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
|
||||||
W: http://www.atmel.com/products/AVR32/
|
W: http://www.atmel.com/products/AVR32/
|
||||||
W: http://avr32linux.org/
|
W: http://avr32linux.org/
|
||||||
W: http://avrfreaks.net/
|
W: http://avrfreaks.net/
|
||||||
|
@ -1235,7 +1235,7 @@ S: Supported
|
||||||
F: arch/avr32/
|
F: arch/avr32/
|
||||||
|
|
||||||
AVR32/AT32AP MACHINE SUPPORT
|
AVR32/AT32AP MACHINE SUPPORT
|
||||||
M: Haavard Skinnemoen <hskinnemoen@atmel.com>
|
M: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
|
||||||
S: Supported
|
S: Supported
|
||||||
F: arch/avr32/mach-at32ap/
|
F: arch/avr32/mach-at32ap/
|
||||||
|
|
||||||
|
@ -2206,6 +2206,12 @@ W: http://acpi4asus.sf.net
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: drivers/platform/x86/eeepc-laptop.c
|
F: drivers/platform/x86/eeepc-laptop.c
|
||||||
|
|
||||||
|
EFIFB FRAMEBUFFER DRIVER
|
||||||
|
L: linux-fbdev@vger.kernel.org
|
||||||
|
M: Peter Jones <pjones@redhat.com>
|
||||||
|
S: Maintained
|
||||||
|
F: drivers/video/efifb.c
|
||||||
|
|
||||||
EFS FILESYSTEM
|
EFS FILESYSTEM
|
||||||
W: http://aeschi.ch.eu.org/efs/
|
W: http://aeschi.ch.eu.org/efs/
|
||||||
S: Orphan
|
S: Orphan
|
||||||
|
@ -2669,6 +2675,8 @@ M: Guenter Roeck <guenter.roeck@ericsson.com>
|
||||||
L: lm-sensors@lm-sensors.org
|
L: lm-sensors@lm-sensors.org
|
||||||
W: http://www.lm-sensors.org/
|
W: http://www.lm-sensors.org/
|
||||||
T: quilt kernel.org/pub/linux/kernel/people/jdelvare/linux-2.6/jdelvare-hwmon/
|
T: quilt kernel.org/pub/linux/kernel/people/jdelvare/linux-2.6/jdelvare-hwmon/
|
||||||
|
T: quilt kernel.org/pub/linux/kernel/people/groeck/linux-staging/
|
||||||
|
T: git git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: Documentation/hwmon/
|
F: Documentation/hwmon/
|
||||||
F: drivers/hwmon/
|
F: drivers/hwmon/
|
||||||
|
@ -3906,10 +3914,8 @@ F: Documentation/serial/moxa-smartio
|
||||||
F: drivers/char/mxser.*
|
F: drivers/char/mxser.*
|
||||||
|
|
||||||
MSI LAPTOP SUPPORT
|
MSI LAPTOP SUPPORT
|
||||||
M: Lennart Poettering <mzxreary@0pointer.de>
|
M: Lee, Chun-Yi <jlee@novell.com>
|
||||||
L: platform-driver-x86@vger.kernel.org
|
L: platform-driver-x86@vger.kernel.org
|
||||||
W: https://tango.0pointer.de/mailman/listinfo/s270-linux
|
|
||||||
W: http://0pointer.de/lennart/tchibo.html
|
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: drivers/platform/x86/msi-laptop.c
|
F: drivers/platform/x86/msi-laptop.c
|
||||||
|
|
||||||
|
@ -3926,8 +3932,10 @@ S: Supported
|
||||||
F: drivers/mfd/
|
F: drivers/mfd/
|
||||||
|
|
||||||
MULTIMEDIA CARD (MMC), SECURE DIGITAL (SD) AND SDIO SUBSYSTEM
|
MULTIMEDIA CARD (MMC), SECURE DIGITAL (SD) AND SDIO SUBSYSTEM
|
||||||
S: Orphan
|
M: Chris Ball <cjb@laptop.org>
|
||||||
L: linux-mmc@vger.kernel.org
|
L: linux-mmc@vger.kernel.org
|
||||||
|
T: git git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc.git
|
||||||
|
S: Maintained
|
||||||
F: drivers/mmc/
|
F: drivers/mmc/
|
||||||
F: include/linux/mmc/
|
F: include/linux/mmc/
|
||||||
|
|
||||||
|
@ -3949,7 +3957,7 @@ F: drivers/char/isicom.c
|
||||||
F: include/linux/isicom.h
|
F: include/linux/isicom.h
|
||||||
|
|
||||||
MUSB MULTIPOINT HIGH SPEED DUAL-ROLE CONTROLLER
|
MUSB MULTIPOINT HIGH SPEED DUAL-ROLE CONTROLLER
|
||||||
M: Felipe Balbi <felipe.balbi@nokia.com>
|
M: Felipe Balbi <balbi@ti.com>
|
||||||
L: linux-usb@vger.kernel.org
|
L: linux-usb@vger.kernel.org
|
||||||
T: git git://gitorious.org/usb/usb.git
|
T: git git://gitorious.org/usb/usb.git
|
||||||
S: Maintained
|
S: Maintained
|
||||||
|
@ -4247,7 +4255,7 @@ S: Maintained
|
||||||
F: drivers/char/hw_random/omap-rng.c
|
F: drivers/char/hw_random/omap-rng.c
|
||||||
|
|
||||||
OMAP USB SUPPORT
|
OMAP USB SUPPORT
|
||||||
M: Felipe Balbi <felipe.balbi@nokia.com>
|
M: Felipe Balbi <balbi@ti.com>
|
||||||
M: David Brownell <dbrownell@users.sourceforge.net>
|
M: David Brownell <dbrownell@users.sourceforge.net>
|
||||||
L: linux-usb@vger.kernel.org
|
L: linux-usb@vger.kernel.org
|
||||||
L: linux-omap@vger.kernel.org
|
L: linux-omap@vger.kernel.org
|
||||||
|
@ -5098,8 +5106,10 @@ S: Maintained
|
||||||
F: drivers/mmc/host/sdricoh_cs.c
|
F: drivers/mmc/host/sdricoh_cs.c
|
||||||
|
|
||||||
SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) DRIVER
|
SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) DRIVER
|
||||||
S: Orphan
|
M: Chris Ball <cjb@laptop.org>
|
||||||
L: linux-mmc@vger.kernel.org
|
L: linux-mmc@vger.kernel.org
|
||||||
|
T: git git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc.git
|
||||||
|
S: Maintained
|
||||||
F: drivers/mmc/host/sdhci.*
|
F: drivers/mmc/host/sdhci.*
|
||||||
|
|
||||||
SECURE DIGITAL HOST CONTROLLER INTERFACE, OPEN FIRMWARE BINDINGS (SDHCI-OF)
|
SECURE DIGITAL HOST CONTROLLER INTERFACE, OPEN FIRMWARE BINDINGS (SDHCI-OF)
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -1,7 +1,7 @@
|
||||||
VERSION = 2
|
VERSION = 2
|
||||||
PATCHLEVEL = 6
|
PATCHLEVEL = 6
|
||||||
SUBLEVEL = 36
|
SUBLEVEL = 36
|
||||||
EXTRAVERSION = -rc4
|
EXTRAVERSION = -rc6
|
||||||
NAME = Sheep on Meth
|
NAME = Sheep on Meth
|
||||||
|
|
||||||
# *DOCUMENTATION*
|
# *DOCUMENTATION*
|
||||||
|
|
|
@ -32,8 +32,9 @@ config HAVE_OPROFILE
|
||||||
|
|
||||||
config KPROBES
|
config KPROBES
|
||||||
bool "Kprobes"
|
bool "Kprobes"
|
||||||
depends on KALLSYMS && MODULES
|
depends on MODULES
|
||||||
depends on HAVE_KPROBES
|
depends on HAVE_KPROBES
|
||||||
|
select KALLSYMS
|
||||||
help
|
help
|
||||||
Kprobes allows you to trap at almost any kernel address and
|
Kprobes allows you to trap at almost any kernel address and
|
||||||
execute a callback function. register_kprobe() establishes
|
execute a callback function. register_kprobe() establishes
|
||||||
|
@ -45,7 +46,6 @@ config OPTPROBES
|
||||||
def_bool y
|
def_bool y
|
||||||
depends on KPROBES && HAVE_OPTPROBES
|
depends on KPROBES && HAVE_OPTPROBES
|
||||||
depends on !PREEMPT
|
depends on !PREEMPT
|
||||||
select KALLSYMS_ALL
|
|
||||||
|
|
||||||
config HAVE_EFFICIENT_UNALIGNED_ACCESS
|
config HAVE_EFFICIENT_UNALIGNED_ACCESS
|
||||||
bool
|
bool
|
||||||
|
|
|
@ -43,6 +43,8 @@ extern void smp_imb(void);
|
||||||
/* ??? Ought to use this in arch/alpha/kernel/signal.c too. */
|
/* ??? Ought to use this in arch/alpha/kernel/signal.c too. */
|
||||||
|
|
||||||
#ifndef CONFIG_SMP
|
#ifndef CONFIG_SMP
|
||||||
|
#include <linux/sched.h>
|
||||||
|
|
||||||
extern void __load_new_mm_context(struct mm_struct *);
|
extern void __load_new_mm_context(struct mm_struct *);
|
||||||
static inline void
|
static inline void
|
||||||
flush_icache_user_range(struct vm_area_struct *vma, struct page *page,
|
flush_icache_user_range(struct vm_area_struct *vma, struct page *page,
|
||||||
|
|
|
@ -449,10 +449,13 @@
|
||||||
#define __NR_pwritev 491
|
#define __NR_pwritev 491
|
||||||
#define __NR_rt_tgsigqueueinfo 492
|
#define __NR_rt_tgsigqueueinfo 492
|
||||||
#define __NR_perf_event_open 493
|
#define __NR_perf_event_open 493
|
||||||
|
#define __NR_fanotify_init 494
|
||||||
|
#define __NR_fanotify_mark 495
|
||||||
|
#define __NR_prlimit64 496
|
||||||
|
|
||||||
#ifdef __KERNEL__
|
#ifdef __KERNEL__
|
||||||
|
|
||||||
#define NR_SYSCALLS 494
|
#define NR_SYSCALLS 497
|
||||||
|
|
||||||
#define __ARCH_WANT_IPC_PARSE_VERSION
|
#define __ARCH_WANT_IPC_PARSE_VERSION
|
||||||
#define __ARCH_WANT_OLD_READDIR
|
#define __ARCH_WANT_OLD_READDIR
|
||||||
|
@ -463,6 +466,7 @@
|
||||||
#define __ARCH_WANT_SYS_OLD_GETRLIMIT
|
#define __ARCH_WANT_SYS_OLD_GETRLIMIT
|
||||||
#define __ARCH_WANT_SYS_OLDUMOUNT
|
#define __ARCH_WANT_SYS_OLDUMOUNT
|
||||||
#define __ARCH_WANT_SYS_SIGPENDING
|
#define __ARCH_WANT_SYS_SIGPENDING
|
||||||
|
#define __ARCH_WANT_SYS_RT_SIGSUSPEND
|
||||||
|
|
||||||
/* "Conditional" syscalls. What we want is
|
/* "Conditional" syscalls. What we want is
|
||||||
|
|
||||||
|
|
|
@ -73,8 +73,6 @@
|
||||||
ldq $20, HAE_REG($19); \
|
ldq $20, HAE_REG($19); \
|
||||||
stq $21, HAE_CACHE($19); \
|
stq $21, HAE_CACHE($19); \
|
||||||
stq $21, 0($20); \
|
stq $21, 0($20); \
|
||||||
ldq $0, 0($sp); \
|
|
||||||
ldq $1, 8($sp); \
|
|
||||||
99:; \
|
99:; \
|
||||||
ldq $19, 72($sp); \
|
ldq $19, 72($sp); \
|
||||||
ldq $20, 80($sp); \
|
ldq $20, 80($sp); \
|
||||||
|
@ -316,19 +314,24 @@ ret_from_sys_call:
|
||||||
cmovne $26, 0, $19 /* $19 = 0 => non-restartable */
|
cmovne $26, 0, $19 /* $19 = 0 => non-restartable */
|
||||||
ldq $0, SP_OFF($sp)
|
ldq $0, SP_OFF($sp)
|
||||||
and $0, 8, $0
|
and $0, 8, $0
|
||||||
beq $0, restore_all
|
beq $0, ret_to_kernel
|
||||||
ret_from_reschedule:
|
ret_to_user:
|
||||||
/* Make sure need_resched and sigpending don't change between
|
/* Make sure need_resched and sigpending don't change between
|
||||||
sampling and the rti. */
|
sampling and the rti. */
|
||||||
lda $16, 7
|
lda $16, 7
|
||||||
call_pal PAL_swpipl
|
call_pal PAL_swpipl
|
||||||
ldl $5, TI_FLAGS($8)
|
ldl $5, TI_FLAGS($8)
|
||||||
and $5, _TIF_WORK_MASK, $2
|
and $5, _TIF_WORK_MASK, $2
|
||||||
bne $5, work_pending
|
bne $2, work_pending
|
||||||
restore_all:
|
restore_all:
|
||||||
RESTORE_ALL
|
RESTORE_ALL
|
||||||
call_pal PAL_rti
|
call_pal PAL_rti
|
||||||
|
|
||||||
|
ret_to_kernel:
|
||||||
|
lda $16, 7
|
||||||
|
call_pal PAL_swpipl
|
||||||
|
br restore_all
|
||||||
|
|
||||||
.align 3
|
.align 3
|
||||||
$syscall_error:
|
$syscall_error:
|
||||||
/*
|
/*
|
||||||
|
@ -363,7 +366,7 @@ $ret_success:
|
||||||
* $8: current.
|
* $8: current.
|
||||||
* $19: The old syscall number, or zero if this is not a return
|
* $19: The old syscall number, or zero if this is not a return
|
||||||
* from a syscall that errored and is possibly restartable.
|
* from a syscall that errored and is possibly restartable.
|
||||||
* $20: Error indication.
|
* $20: The old a3 value
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.align 4
|
.align 4
|
||||||
|
@ -392,12 +395,18 @@ $work_resched:
|
||||||
|
|
||||||
$work_notifysig:
|
$work_notifysig:
|
||||||
mov $sp, $16
|
mov $sp, $16
|
||||||
br $1, do_switch_stack
|
bsr $1, do_switch_stack
|
||||||
mov $sp, $17
|
mov $sp, $17
|
||||||
mov $5, $18
|
mov $5, $18
|
||||||
|
mov $19, $9 /* save old syscall number */
|
||||||
|
mov $20, $10 /* save old a3 */
|
||||||
|
and $5, _TIF_SIGPENDING, $2
|
||||||
|
cmovne $2, 0, $9 /* we don't want double syscall restarts */
|
||||||
jsr $26, do_notify_resume
|
jsr $26, do_notify_resume
|
||||||
|
mov $9, $19
|
||||||
|
mov $10, $20
|
||||||
bsr $1, undo_switch_stack
|
bsr $1, undo_switch_stack
|
||||||
br restore_all
|
br ret_to_user
|
||||||
.end work_pending
|
.end work_pending
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -430,6 +439,7 @@ strace:
|
||||||
beq $1, 1f
|
beq $1, 1f
|
||||||
ldq $27, 0($2)
|
ldq $27, 0($2)
|
||||||
1: jsr $26, ($27), sys_gettimeofday
|
1: jsr $26, ($27), sys_gettimeofday
|
||||||
|
ret_from_straced:
|
||||||
ldgp $gp, 0($26)
|
ldgp $gp, 0($26)
|
||||||
|
|
||||||
/* check return.. */
|
/* check return.. */
|
||||||
|
@ -650,7 +660,7 @@ kernel_thread:
|
||||||
/* We don't actually care for a3 success widgetry in the kernel.
|
/* We don't actually care for a3 success widgetry in the kernel.
|
||||||
Not for positive errno values. */
|
Not for positive errno values. */
|
||||||
stq $0, 0($sp) /* $0 */
|
stq $0, 0($sp) /* $0 */
|
||||||
br restore_all
|
br ret_to_kernel
|
||||||
.end kernel_thread
|
.end kernel_thread
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -757,11 +767,15 @@ sys_vfork:
|
||||||
.ent sys_sigreturn
|
.ent sys_sigreturn
|
||||||
sys_sigreturn:
|
sys_sigreturn:
|
||||||
.prologue 0
|
.prologue 0
|
||||||
|
lda $9, ret_from_straced
|
||||||
|
cmpult $26, $9, $9
|
||||||
mov $sp, $17
|
mov $sp, $17
|
||||||
lda $18, -SWITCH_STACK_SIZE($sp)
|
lda $18, -SWITCH_STACK_SIZE($sp)
|
||||||
lda $sp, -SWITCH_STACK_SIZE($sp)
|
lda $sp, -SWITCH_STACK_SIZE($sp)
|
||||||
jsr $26, do_sigreturn
|
jsr $26, do_sigreturn
|
||||||
br $1, undo_switch_stack
|
bne $9, 1f
|
||||||
|
jsr $26, syscall_trace
|
||||||
|
1: br $1, undo_switch_stack
|
||||||
br ret_from_sys_call
|
br ret_from_sys_call
|
||||||
.end sys_sigreturn
|
.end sys_sigreturn
|
||||||
|
|
||||||
|
@ -770,46 +784,18 @@ sys_sigreturn:
|
||||||
.ent sys_rt_sigreturn
|
.ent sys_rt_sigreturn
|
||||||
sys_rt_sigreturn:
|
sys_rt_sigreturn:
|
||||||
.prologue 0
|
.prologue 0
|
||||||
|
lda $9, ret_from_straced
|
||||||
|
cmpult $26, $9, $9
|
||||||
mov $sp, $17
|
mov $sp, $17
|
||||||
lda $18, -SWITCH_STACK_SIZE($sp)
|
lda $18, -SWITCH_STACK_SIZE($sp)
|
||||||
lda $sp, -SWITCH_STACK_SIZE($sp)
|
lda $sp, -SWITCH_STACK_SIZE($sp)
|
||||||
jsr $26, do_rt_sigreturn
|
jsr $26, do_rt_sigreturn
|
||||||
br $1, undo_switch_stack
|
bne $9, 1f
|
||||||
|
jsr $26, syscall_trace
|
||||||
|
1: br $1, undo_switch_stack
|
||||||
br ret_from_sys_call
|
br ret_from_sys_call
|
||||||
.end sys_rt_sigreturn
|
.end sys_rt_sigreturn
|
||||||
|
|
||||||
.align 4
|
|
||||||
.globl sys_sigsuspend
|
|
||||||
.ent sys_sigsuspend
|
|
||||||
sys_sigsuspend:
|
|
||||||
.prologue 0
|
|
||||||
mov $sp, $17
|
|
||||||
br $1, do_switch_stack
|
|
||||||
mov $sp, $18
|
|
||||||
subq $sp, 16, $sp
|
|
||||||
stq $26, 0($sp)
|
|
||||||
jsr $26, do_sigsuspend
|
|
||||||
ldq $26, 0($sp)
|
|
||||||
lda $sp, SWITCH_STACK_SIZE+16($sp)
|
|
||||||
ret
|
|
||||||
.end sys_sigsuspend
|
|
||||||
|
|
||||||
.align 4
|
|
||||||
.globl sys_rt_sigsuspend
|
|
||||||
.ent sys_rt_sigsuspend
|
|
||||||
sys_rt_sigsuspend:
|
|
||||||
.prologue 0
|
|
||||||
mov $sp, $18
|
|
||||||
br $1, do_switch_stack
|
|
||||||
mov $sp, $19
|
|
||||||
subq $sp, 16, $sp
|
|
||||||
stq $26, 0($sp)
|
|
||||||
jsr $26, do_rt_sigsuspend
|
|
||||||
ldq $26, 0($sp)
|
|
||||||
lda $sp, SWITCH_STACK_SIZE+16($sp)
|
|
||||||
ret
|
|
||||||
.end sys_rt_sigsuspend
|
|
||||||
|
|
||||||
.align 4
|
.align 4
|
||||||
.globl sys_sethae
|
.globl sys_sethae
|
||||||
.ent sys_sethae
|
.ent sys_sethae
|
||||||
|
@ -928,15 +914,6 @@ sys_execve:
|
||||||
jmp $31, do_sys_execve
|
jmp $31, do_sys_execve
|
||||||
.end sys_execve
|
.end sys_execve
|
||||||
|
|
||||||
.align 4
|
|
||||||
.globl osf_sigprocmask
|
|
||||||
.ent osf_sigprocmask
|
|
||||||
osf_sigprocmask:
|
|
||||||
.prologue 0
|
|
||||||
mov $sp, $18
|
|
||||||
jmp $31, sys_osf_sigprocmask
|
|
||||||
.end osf_sigprocmask
|
|
||||||
|
|
||||||
.align 4
|
.align 4
|
||||||
.globl alpha_ni_syscall
|
.globl alpha_ni_syscall
|
||||||
.ent alpha_ni_syscall
|
.ent alpha_ni_syscall
|
||||||
|
|
|
@ -90,11 +90,13 @@ static int
|
||||||
ev6_parse_cbox(u64 c_addr, u64 c1_syn, u64 c2_syn,
|
ev6_parse_cbox(u64 c_addr, u64 c1_syn, u64 c2_syn,
|
||||||
u64 c_stat, u64 c_sts, int print)
|
u64 c_stat, u64 c_sts, int print)
|
||||||
{
|
{
|
||||||
char *sourcename[] = { "UNKNOWN", "UNKNOWN", "UNKNOWN",
|
static const char * const sourcename[] = {
|
||||||
|
"UNKNOWN", "UNKNOWN", "UNKNOWN",
|
||||||
"MEMORY", "BCACHE", "DCACHE",
|
"MEMORY", "BCACHE", "DCACHE",
|
||||||
"BCACHE PROBE", "BCACHE PROBE" };
|
"BCACHE PROBE", "BCACHE PROBE"
|
||||||
char *streamname[] = { "D", "I" };
|
};
|
||||||
char *bitsname[] = { "SINGLE", "DOUBLE" };
|
static const char * const streamname[] = { "D", "I" };
|
||||||
|
static const char * const bitsname[] = { "SINGLE", "DOUBLE" };
|
||||||
int status = MCHK_DISPOSITION_REPORT;
|
int status = MCHK_DISPOSITION_REPORT;
|
||||||
int source = -1, stream = -1, bits = -1;
|
int source = -1, stream = -1, bits = -1;
|
||||||
|
|
||||||
|
|
|
@ -589,7 +589,8 @@ marvel_print_pox_spl_cmplt(u64 spl_cmplt)
|
||||||
static void
|
static void
|
||||||
marvel_print_pox_trans_sum(u64 trans_sum)
|
marvel_print_pox_trans_sum(u64 trans_sum)
|
||||||
{
|
{
|
||||||
char *pcix_cmd[] = { "Interrupt Acknowledge",
|
static const char * const pcix_cmd[] = {
|
||||||
|
"Interrupt Acknowledge",
|
||||||
"Special Cycle",
|
"Special Cycle",
|
||||||
"I/O Read",
|
"I/O Read",
|
||||||
"I/O Write",
|
"I/O Write",
|
||||||
|
|
|
@ -75,8 +75,12 @@ titan_parse_p_serror(int which, u64 serror, int print)
|
||||||
int status = MCHK_DISPOSITION_REPORT;
|
int status = MCHK_DISPOSITION_REPORT;
|
||||||
|
|
||||||
#ifdef CONFIG_VERBOSE_MCHECK
|
#ifdef CONFIG_VERBOSE_MCHECK
|
||||||
char *serror_src[] = {"GPCI", "APCI", "AGP HP", "AGP LP"};
|
static const char * const serror_src[] = {
|
||||||
char *serror_cmd[] = {"DMA Read", "DMA RMW", "SGTE Read", "Reserved"};
|
"GPCI", "APCI", "AGP HP", "AGP LP"
|
||||||
|
};
|
||||||
|
static const char * const serror_cmd[] = {
|
||||||
|
"DMA Read", "DMA RMW", "SGTE Read", "Reserved"
|
||||||
|
};
|
||||||
#endif /* CONFIG_VERBOSE_MCHECK */
|
#endif /* CONFIG_VERBOSE_MCHECK */
|
||||||
|
|
||||||
#define TITAN__PCHIP_SERROR__LOST_UECC (1UL << 0)
|
#define TITAN__PCHIP_SERROR__LOST_UECC (1UL << 0)
|
||||||
|
@ -140,14 +144,15 @@ titan_parse_p_perror(int which, int port, u64 perror, int print)
|
||||||
int status = MCHK_DISPOSITION_REPORT;
|
int status = MCHK_DISPOSITION_REPORT;
|
||||||
|
|
||||||
#ifdef CONFIG_VERBOSE_MCHECK
|
#ifdef CONFIG_VERBOSE_MCHECK
|
||||||
char *perror_cmd[] = { "Interrupt Acknowledge", "Special Cycle",
|
static const char * const perror_cmd[] = {
|
||||||
|
"Interrupt Acknowledge", "Special Cycle",
|
||||||
"I/O Read", "I/O Write",
|
"I/O Read", "I/O Write",
|
||||||
"Reserved", "Reserved",
|
"Reserved", "Reserved",
|
||||||
"Memory Read", "Memory Write",
|
"Memory Read", "Memory Write",
|
||||||
"Reserved", "Reserved",
|
"Reserved", "Reserved",
|
||||||
"Configuration Read", "Configuration Write",
|
"Configuration Read", "Configuration Write",
|
||||||
"Memory Read Multiple", "Dual Address Cycle",
|
"Memory Read Multiple", "Dual Address Cycle",
|
||||||
"Memory Read Line","Memory Write and Invalidate"
|
"Memory Read Line", "Memory Write and Invalidate"
|
||||||
};
|
};
|
||||||
#endif /* CONFIG_VERBOSE_MCHECK */
|
#endif /* CONFIG_VERBOSE_MCHECK */
|
||||||
|
|
||||||
|
@ -273,9 +278,9 @@ titan_parse_p_agperror(int which, u64 agperror, int print)
|
||||||
int cmd, len;
|
int cmd, len;
|
||||||
unsigned long addr;
|
unsigned long addr;
|
||||||
|
|
||||||
char *agperror_cmd[] = { "Read (low-priority)", "Read (high-priority)",
|
static const char * const agperror_cmd[] = {
|
||||||
"Write (low-priority)",
|
"Read (low-priority)", "Read (high-priority)",
|
||||||
"Write (high-priority)",
|
"Write (low-priority)", "Write (high-priority)",
|
||||||
"Reserved", "Reserved",
|
"Reserved", "Reserved",
|
||||||
"Flush", "Fence"
|
"Flush", "Fence"
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/mm.h>
|
#include <linux/mm.h>
|
||||||
#include <linux/smp.h>
|
#include <linux/smp.h>
|
||||||
#include <linux/smp_lock.h>
|
|
||||||
#include <linux/stddef.h>
|
#include <linux/stddef.h>
|
||||||
#include <linux/syscalls.h>
|
#include <linux/syscalls.h>
|
||||||
#include <linux/unistd.h>
|
#include <linux/unistd.h>
|
||||||
|
@ -69,7 +68,6 @@ SYSCALL_DEFINE4(osf_set_program_attributes, unsigned long, text_start,
|
||||||
{
|
{
|
||||||
struct mm_struct *mm;
|
struct mm_struct *mm;
|
||||||
|
|
||||||
lock_kernel();
|
|
||||||
mm = current->mm;
|
mm = current->mm;
|
||||||
mm->end_code = bss_start + bss_len;
|
mm->end_code = bss_start + bss_len;
|
||||||
mm->start_brk = bss_start + bss_len;
|
mm->start_brk = bss_start + bss_len;
|
||||||
|
@ -78,7 +76,6 @@ SYSCALL_DEFINE4(osf_set_program_attributes, unsigned long, text_start,
|
||||||
printk("set_program_attributes(%lx %lx %lx %lx)\n",
|
printk("set_program_attributes(%lx %lx %lx %lx)\n",
|
||||||
text_start, text_len, bss_start, bss_len);
|
text_start, text_len, bss_start, bss_len);
|
||||||
#endif
|
#endif
|
||||||
unlock_kernel();
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -517,7 +514,6 @@ SYSCALL_DEFINE2(osf_proplist_syscall, enum pl_code, code,
|
||||||
long error;
|
long error;
|
||||||
int __user *min_buf_size_ptr;
|
int __user *min_buf_size_ptr;
|
||||||
|
|
||||||
lock_kernel();
|
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case PL_SET:
|
case PL_SET:
|
||||||
if (get_user(error, &args->set.nbytes))
|
if (get_user(error, &args->set.nbytes))
|
||||||
|
@ -547,7 +543,6 @@ SYSCALL_DEFINE2(osf_proplist_syscall, enum pl_code, code,
|
||||||
error = -EOPNOTSUPP;
|
error = -EOPNOTSUPP;
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
unlock_kernel();
|
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -594,7 +589,7 @@ SYSCALL_DEFINE2(osf_sigstack, struct sigstack __user *, uss,
|
||||||
|
|
||||||
SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
|
SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
|
||||||
{
|
{
|
||||||
char *sysinfo_table[] = {
|
const char *sysinfo_table[] = {
|
||||||
utsname()->sysname,
|
utsname()->sysname,
|
||||||
utsname()->nodename,
|
utsname()->nodename,
|
||||||
utsname()->release,
|
utsname()->release,
|
||||||
|
@ -606,7 +601,7 @@ SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)
|
||||||
"dummy", /* secure RPC domain */
|
"dummy", /* secure RPC domain */
|
||||||
};
|
};
|
||||||
unsigned long offset;
|
unsigned long offset;
|
||||||
char *res;
|
const char *res;
|
||||||
long len, err = -EINVAL;
|
long len, err = -EINVAL;
|
||||||
|
|
||||||
offset = command-1;
|
offset = command-1;
|
||||||
|
|
|
@ -66,7 +66,7 @@ static int pci_mmap_resource(struct kobject *kobj,
|
||||||
{
|
{
|
||||||
struct pci_dev *pdev = to_pci_dev(container_of(kobj,
|
struct pci_dev *pdev = to_pci_dev(container_of(kobj,
|
||||||
struct device, kobj));
|
struct device, kobj));
|
||||||
struct resource *res = (struct resource *)attr->private;
|
struct resource *res = attr->private;
|
||||||
enum pci_mmap_state mmap_type;
|
enum pci_mmap_state mmap_type;
|
||||||
struct pci_bus_region bar;
|
struct pci_bus_region bar;
|
||||||
int i;
|
int i;
|
||||||
|
|
|
@ -356,7 +356,7 @@ dump_elf_thread(elf_greg_t *dest, struct pt_regs *pt, struct thread_info *ti)
|
||||||
dest[27] = pt->r27;
|
dest[27] = pt->r27;
|
||||||
dest[28] = pt->r28;
|
dest[28] = pt->r28;
|
||||||
dest[29] = pt->gp;
|
dest[29] = pt->gp;
|
||||||
dest[30] = rdusp();
|
dest[30] = ti == current_thread_info() ? rdusp() : ti->pcb.usp;
|
||||||
dest[31] = pt->pc;
|
dest[31] = pt->pc;
|
||||||
|
|
||||||
/* Once upon a time this was the PS value. Which is stupid
|
/* Once upon a time this was the PS value. Which is stupid
|
||||||
|
|
|
@ -41,46 +41,20 @@ static void do_signal(struct pt_regs *, struct switch_stack *,
|
||||||
/*
|
/*
|
||||||
* The OSF/1 sigprocmask calling sequence is different from the
|
* The OSF/1 sigprocmask calling sequence is different from the
|
||||||
* C sigprocmask() sequence..
|
* C sigprocmask() sequence..
|
||||||
*
|
|
||||||
* how:
|
|
||||||
* 1 - SIG_BLOCK
|
|
||||||
* 2 - SIG_UNBLOCK
|
|
||||||
* 3 - SIG_SETMASK
|
|
||||||
*
|
|
||||||
* We change the range to -1 .. 1 in order to let gcc easily
|
|
||||||
* use the conditional move instructions.
|
|
||||||
*
|
|
||||||
* Note that we don't need to acquire the kernel lock for SMP
|
|
||||||
* operation, as all of this is local to this thread.
|
|
||||||
*/
|
*/
|
||||||
SYSCALL_DEFINE3(osf_sigprocmask, int, how, unsigned long, newmask,
|
SYSCALL_DEFINE2(osf_sigprocmask, int, how, unsigned long, newmask)
|
||||||
struct pt_regs *, regs)
|
|
||||||
{
|
{
|
||||||
unsigned long oldmask = -EINVAL;
|
sigset_t oldmask;
|
||||||
|
sigset_t mask;
|
||||||
|
unsigned long res;
|
||||||
|
|
||||||
if ((unsigned long)how-1 <= 2) {
|
siginitset(&mask, newmask & ~_BLOCKABLE);
|
||||||
long sign = how-2; /* -1 .. 1 */
|
res = sigprocmask(how, &mask, &oldmask);
|
||||||
unsigned long block, unblock;
|
if (!res) {
|
||||||
|
force_successful_syscall_return();
|
||||||
newmask &= _BLOCKABLE;
|
res = oldmask.sig[0];
|
||||||
spin_lock_irq(¤t->sighand->siglock);
|
|
||||||
oldmask = current->blocked.sig[0];
|
|
||||||
|
|
||||||
unblock = oldmask & ~newmask;
|
|
||||||
block = oldmask | newmask;
|
|
||||||
if (!sign)
|
|
||||||
block = unblock;
|
|
||||||
if (sign <= 0)
|
|
||||||
newmask = block;
|
|
||||||
if (_NSIG_WORDS > 1 && sign > 0)
|
|
||||||
sigemptyset(¤t->blocked);
|
|
||||||
current->blocked.sig[0] = newmask;
|
|
||||||
recalc_sigpending();
|
|
||||||
spin_unlock_irq(¤t->sighand->siglock);
|
|
||||||
|
|
||||||
regs->r0 = 0; /* special no error return */
|
|
||||||
}
|
}
|
||||||
return oldmask;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
SYSCALL_DEFINE3(osf_sigaction, int, sig,
|
SYSCALL_DEFINE3(osf_sigaction, int, sig,
|
||||||
|
@ -94,9 +68,9 @@ SYSCALL_DEFINE3(osf_sigaction, int, sig,
|
||||||
old_sigset_t mask;
|
old_sigset_t mask;
|
||||||
if (!access_ok(VERIFY_READ, act, sizeof(*act)) ||
|
if (!access_ok(VERIFY_READ, act, sizeof(*act)) ||
|
||||||
__get_user(new_ka.sa.sa_handler, &act->sa_handler) ||
|
__get_user(new_ka.sa.sa_handler, &act->sa_handler) ||
|
||||||
__get_user(new_ka.sa.sa_flags, &act->sa_flags))
|
__get_user(new_ka.sa.sa_flags, &act->sa_flags) ||
|
||||||
|
__get_user(mask, &act->sa_mask))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
__get_user(mask, &act->sa_mask);
|
|
||||||
siginitset(&new_ka.sa.sa_mask, mask);
|
siginitset(&new_ka.sa.sa_mask, mask);
|
||||||
new_ka.ka_restorer = NULL;
|
new_ka.ka_restorer = NULL;
|
||||||
}
|
}
|
||||||
|
@ -106,9 +80,9 @@ SYSCALL_DEFINE3(osf_sigaction, int, sig,
|
||||||
if (!ret && oact) {
|
if (!ret && oact) {
|
||||||
if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) ||
|
if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) ||
|
||||||
__put_user(old_ka.sa.sa_handler, &oact->sa_handler) ||
|
__put_user(old_ka.sa.sa_handler, &oact->sa_handler) ||
|
||||||
__put_user(old_ka.sa.sa_flags, &oact->sa_flags))
|
__put_user(old_ka.sa.sa_flags, &oact->sa_flags) ||
|
||||||
|
__put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
__put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -144,8 +118,7 @@ SYSCALL_DEFINE5(rt_sigaction, int, sig, const struct sigaction __user *, act,
|
||||||
/*
|
/*
|
||||||
* Atomically swap in the new signal mask, and wait for a signal.
|
* Atomically swap in the new signal mask, and wait for a signal.
|
||||||
*/
|
*/
|
||||||
asmlinkage int
|
SYSCALL_DEFINE1(sigsuspend, old_sigset_t, mask)
|
||||||
do_sigsuspend(old_sigset_t mask, struct pt_regs *regs, struct switch_stack *sw)
|
|
||||||
{
|
{
|
||||||
mask &= _BLOCKABLE;
|
mask &= _BLOCKABLE;
|
||||||
spin_lock_irq(¤t->sighand->siglock);
|
spin_lock_irq(¤t->sighand->siglock);
|
||||||
|
@ -154,41 +127,6 @@ do_sigsuspend(old_sigset_t mask, struct pt_regs *regs, struct switch_stack *sw)
|
||||||
recalc_sigpending();
|
recalc_sigpending();
|
||||||
spin_unlock_irq(¤t->sighand->siglock);
|
spin_unlock_irq(¤t->sighand->siglock);
|
||||||
|
|
||||||
/* Indicate EINTR on return from any possible signal handler,
|
|
||||||
which will not come back through here, but via sigreturn. */
|
|
||||||
regs->r0 = EINTR;
|
|
||||||
regs->r19 = 1;
|
|
||||||
|
|
||||||
current->state = TASK_INTERRUPTIBLE;
|
|
||||||
schedule();
|
|
||||||
set_thread_flag(TIF_RESTORE_SIGMASK);
|
|
||||||
return -ERESTARTNOHAND;
|
|
||||||
}
|
|
||||||
|
|
||||||
asmlinkage int
|
|
||||||
do_rt_sigsuspend(sigset_t __user *uset, size_t sigsetsize,
|
|
||||||
struct pt_regs *regs, struct switch_stack *sw)
|
|
||||||
{
|
|
||||||
sigset_t set;
|
|
||||||
|
|
||||||
/* XXX: Don't preclude handling different sized sigset_t's. */
|
|
||||||
if (sigsetsize != sizeof(sigset_t))
|
|
||||||
return -EINVAL;
|
|
||||||
if (copy_from_user(&set, uset, sizeof(set)))
|
|
||||||
return -EFAULT;
|
|
||||||
|
|
||||||
sigdelsetmask(&set, ~_BLOCKABLE);
|
|
||||||
spin_lock_irq(¤t->sighand->siglock);
|
|
||||||
current->saved_sigmask = current->blocked;
|
|
||||||
current->blocked = set;
|
|
||||||
recalc_sigpending();
|
|
||||||
spin_unlock_irq(¤t->sighand->siglock);
|
|
||||||
|
|
||||||
/* Indicate EINTR on return from any possible signal handler,
|
|
||||||
which will not come back through here, but via sigreturn. */
|
|
||||||
regs->r0 = EINTR;
|
|
||||||
regs->r19 = 1;
|
|
||||||
|
|
||||||
current->state = TASK_INTERRUPTIBLE;
|
current->state = TASK_INTERRUPTIBLE;
|
||||||
schedule();
|
schedule();
|
||||||
set_thread_flag(TIF_RESTORE_SIGMASK);
|
set_thread_flag(TIF_RESTORE_SIGMASK);
|
||||||
|
@ -239,6 +177,8 @@ restore_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs,
|
||||||
unsigned long usp;
|
unsigned long usp;
|
||||||
long i, err = __get_user(regs->pc, &sc->sc_pc);
|
long i, err = __get_user(regs->pc, &sc->sc_pc);
|
||||||
|
|
||||||
|
current_thread_info()->restart_block.fn = do_no_restart_syscall;
|
||||||
|
|
||||||
sw->r26 = (unsigned long) ret_from_sys_call;
|
sw->r26 = (unsigned long) ret_from_sys_call;
|
||||||
|
|
||||||
err |= __get_user(regs->r0, sc->sc_regs+0);
|
err |= __get_user(regs->r0, sc->sc_regs+0);
|
||||||
|
@ -591,7 +531,6 @@ syscall_restart(unsigned long r0, unsigned long r19,
|
||||||
regs->pc -= 4;
|
regs->pc -= 4;
|
||||||
break;
|
break;
|
||||||
case ERESTART_RESTARTBLOCK:
|
case ERESTART_RESTARTBLOCK:
|
||||||
current_thread_info()->restart_block.fn = do_no_restart_syscall;
|
|
||||||
regs->r0 = EINTR;
|
regs->r0 = EINTR;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,7 +87,7 @@ static int srm_env_proc_show(struct seq_file *m, void *v)
|
||||||
srm_env_t *entry;
|
srm_env_t *entry;
|
||||||
char *page;
|
char *page;
|
||||||
|
|
||||||
entry = (srm_env_t *)m->private;
|
entry = m->private;
|
||||||
page = (char *)__get_free_page(GFP_USER);
|
page = (char *)__get_free_page(GFP_USER);
|
||||||
if (!page)
|
if (!page)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
|
@ -58,7 +58,7 @@ sys_call_table:
|
||||||
.quad sys_open /* 45 */
|
.quad sys_open /* 45 */
|
||||||
.quad alpha_ni_syscall
|
.quad alpha_ni_syscall
|
||||||
.quad sys_getxgid
|
.quad sys_getxgid
|
||||||
.quad osf_sigprocmask
|
.quad sys_osf_sigprocmask
|
||||||
.quad alpha_ni_syscall
|
.quad alpha_ni_syscall
|
||||||
.quad alpha_ni_syscall /* 50 */
|
.quad alpha_ni_syscall /* 50 */
|
||||||
.quad sys_acct
|
.quad sys_acct
|
||||||
|
@ -512,6 +512,9 @@ sys_call_table:
|
||||||
.quad sys_pwritev
|
.quad sys_pwritev
|
||||||
.quad sys_rt_tgsigqueueinfo
|
.quad sys_rt_tgsigqueueinfo
|
||||||
.quad sys_perf_event_open
|
.quad sys_perf_event_open
|
||||||
|
.quad sys_fanotify_init
|
||||||
|
.quad sys_fanotify_mark /* 495 */
|
||||||
|
.quad sys_prlimit64
|
||||||
|
|
||||||
.size sys_call_table, . - sys_call_table
|
.size sys_call_table, . - sys_call_table
|
||||||
.type sys_call_table, @object
|
.type sys_call_table, @object
|
||||||
|
|
|
@ -191,16 +191,16 @@ irqreturn_t timer_interrupt(int irq, void *dev)
|
||||||
|
|
||||||
write_sequnlock(&xtime_lock);
|
write_sequnlock(&xtime_lock);
|
||||||
|
|
||||||
#ifndef CONFIG_SMP
|
|
||||||
while (nticks--)
|
|
||||||
update_process_times(user_mode(get_irq_regs()));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (test_perf_event_pending()) {
|
if (test_perf_event_pending()) {
|
||||||
clear_perf_event_pending();
|
clear_perf_event_pending();
|
||||||
perf_event_do_pending();
|
perf_event_do_pending();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef CONFIG_SMP
|
||||||
|
while (nticks--)
|
||||||
|
update_process_times(user_mode(get_irq_regs()));
|
||||||
|
#endif
|
||||||
|
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
#include <linux/tty.h>
|
#include <linux/tty.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/smp_lock.h>
|
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/kallsyms.h>
|
#include <linux/kallsyms.h>
|
||||||
|
@ -623,7 +622,6 @@ do_entUna(void * va, unsigned long opcode, unsigned long reg,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
lock_kernel();
|
|
||||||
printk("Bad unaligned kernel access at %016lx: %p %lx %lu\n",
|
printk("Bad unaligned kernel access at %016lx: %p %lx %lu\n",
|
||||||
pc, va, opcode, reg);
|
pc, va, opcode, reg);
|
||||||
do_exit(SIGSEGV);
|
do_exit(SIGSEGV);
|
||||||
|
@ -646,7 +644,6 @@ got_exception:
|
||||||
* Yikes! No one to forward the exception to.
|
* Yikes! No one to forward the exception to.
|
||||||
* Since the registers are in a weird format, dump them ourselves.
|
* Since the registers are in a weird format, dump them ourselves.
|
||||||
*/
|
*/
|
||||||
lock_kernel();
|
|
||||||
|
|
||||||
printk("%s(%d): unhandled unaligned exception\n",
|
printk("%s(%d): unhandled unaligned exception\n",
|
||||||
current->comm, task_pid_nr(current));
|
current->comm, task_pid_nr(current));
|
||||||
|
|
|
@ -271,7 +271,6 @@ config ARCH_AT91
|
||||||
bool "Atmel AT91"
|
bool "Atmel AT91"
|
||||||
select ARCH_REQUIRE_GPIOLIB
|
select ARCH_REQUIRE_GPIOLIB
|
||||||
select HAVE_CLK
|
select HAVE_CLK
|
||||||
select ARCH_USES_GETTIMEOFFSET
|
|
||||||
help
|
help
|
||||||
This enables support for systems based on the Atmel AT91RM9200,
|
This enables support for systems based on the Atmel AT91RM9200,
|
||||||
AT91SAM9 and AT91CAP9 processors.
|
AT91SAM9 and AT91CAP9 processors.
|
||||||
|
@ -1062,6 +1061,32 @@ config ARM_ERRATA_460075
|
||||||
ACTLR register. Note that setting specific bits in the ACTLR register
|
ACTLR register. Note that setting specific bits in the ACTLR register
|
||||||
may not be available in non-secure mode.
|
may not be available in non-secure mode.
|
||||||
|
|
||||||
|
config ARM_ERRATA_742230
|
||||||
|
bool "ARM errata: DMB operation may be faulty"
|
||||||
|
depends on CPU_V7 && SMP
|
||||||
|
help
|
||||||
|
This option enables the workaround for the 742230 Cortex-A9
|
||||||
|
(r1p0..r2p2) erratum. Under rare circumstances, a DMB instruction
|
||||||
|
between two write operations may not ensure the correct visibility
|
||||||
|
ordering of the two writes. This workaround sets a specific bit in
|
||||||
|
the diagnostic register of the Cortex-A9 which causes the DMB
|
||||||
|
instruction to behave as a DSB, ensuring the correct behaviour of
|
||||||
|
the two writes.
|
||||||
|
|
||||||
|
config ARM_ERRATA_742231
|
||||||
|
bool "ARM errata: Incorrect hazard handling in the SCU may lead to data corruption"
|
||||||
|
depends on CPU_V7 && SMP
|
||||||
|
help
|
||||||
|
This option enables the workaround for the 742231 Cortex-A9
|
||||||
|
(r2p0..r2p2) erratum. Under certain conditions, specific to the
|
||||||
|
Cortex-A9 MPCore micro-architecture, two CPUs working in SMP mode,
|
||||||
|
accessing some data located in the same cache line, may get corrupted
|
||||||
|
data due to bad handling of the address hazard when the line gets
|
||||||
|
replaced from one of the CPUs at the same time as another CPU is
|
||||||
|
accessing it. This workaround sets specific bits in the diagnostic
|
||||||
|
register of the Cortex-A9 which reduces the linefill issuing
|
||||||
|
capabilities of the processor.
|
||||||
|
|
||||||
config PL310_ERRATA_588369
|
config PL310_ERRATA_588369
|
||||||
bool "Clean & Invalidate maintenance operations do not invalidate clean lines"
|
bool "Clean & Invalidate maintenance operations do not invalidate clean lines"
|
||||||
depends on CACHE_L2X0 && ARCH_OMAP4
|
depends on CACHE_L2X0 && ARCH_OMAP4
|
||||||
|
@ -1449,6 +1474,20 @@ config UACCESS_WITH_MEMCPY
|
||||||
However, if the CPU data cache is using a write-allocate mode,
|
However, if the CPU data cache is using a write-allocate mode,
|
||||||
this option is unlikely to provide any performance gain.
|
this option is unlikely to provide any performance gain.
|
||||||
|
|
||||||
|
config SECCOMP
|
||||||
|
bool
|
||||||
|
prompt "Enable seccomp to safely compute untrusted bytecode"
|
||||||
|
---help---
|
||||||
|
This kernel feature is useful for number crunching applications
|
||||||
|
that may need to compute untrusted bytecode during their
|
||||||
|
execution. By using pipes or other transports made available to
|
||||||
|
the process as file descriptors supporting the read/write
|
||||||
|
syscalls, it's possible to isolate those applications in
|
||||||
|
their own address space using seccomp. Once seccomp is
|
||||||
|
enabled via prctl(PR_SET_SECCOMP), it cannot be disabled
|
||||||
|
and the task is only allowed to execute a few safe syscalls
|
||||||
|
defined by each seccomp mode.
|
||||||
|
|
||||||
config CC_STACKPROTECTOR
|
config CC_STACKPROTECTOR
|
||||||
bool "Enable -fstack-protector buffer overflow detection (EXPERIMENTAL)"
|
bool "Enable -fstack-protector buffer overflow detection (EXPERIMENTAL)"
|
||||||
help
|
help
|
||||||
|
|
|
@ -2,6 +2,20 @@ menu "Kernel hacking"
|
||||||
|
|
||||||
source "lib/Kconfig.debug"
|
source "lib/Kconfig.debug"
|
||||||
|
|
||||||
|
config STRICT_DEVMEM
|
||||||
|
bool "Filter access to /dev/mem"
|
||||||
|
depends on MMU
|
||||||
|
---help---
|
||||||
|
If this option is disabled, you allow userspace (root) access to all
|
||||||
|
of memory, including kernel and userspace memory. Accidental
|
||||||
|
access to this is obviously disastrous, but specific access can
|
||||||
|
be used by people debugging the kernel.
|
||||||
|
|
||||||
|
If this option is switched on, the /dev/mem file only allows
|
||||||
|
userspace access to memory mapped peripherals.
|
||||||
|
|
||||||
|
If in doubt, say Y.
|
||||||
|
|
||||||
# RMK wants arm kernels compiled with frame pointers or stack unwinding.
|
# RMK wants arm kernels compiled with frame pointers or stack unwinding.
|
||||||
# If you know what you are doing and are willing to live without stack
|
# If you know what you are doing and are willing to live without stack
|
||||||
# traces, you can get a slightly smaller kernel by setting this option to
|
# traces, you can get a slightly smaller kernel by setting this option to
|
||||||
|
|
|
@ -247,13 +247,14 @@ ifeq ($(FASTFPE),$(wildcard $(FASTFPE)))
|
||||||
FASTFPE_OBJ :=$(FASTFPE)/
|
FASTFPE_OBJ :=$(FASTFPE)/
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# If we have a machine-specific directory, then include it in the build.
|
|
||||||
core-y += arch/arm/kernel/ arch/arm/mm/ arch/arm/common/
|
|
||||||
core-y += $(machdirs) $(platdirs)
|
|
||||||
core-$(CONFIG_FPE_NWFPE) += arch/arm/nwfpe/
|
core-$(CONFIG_FPE_NWFPE) += arch/arm/nwfpe/
|
||||||
core-$(CONFIG_FPE_FASTFPE) += $(FASTFPE_OBJ)
|
core-$(CONFIG_FPE_FASTFPE) += $(FASTFPE_OBJ)
|
||||||
core-$(CONFIG_VFP) += arch/arm/vfp/
|
core-$(CONFIG_VFP) += arch/arm/vfp/
|
||||||
|
|
||||||
|
# If we have a machine-specific directory, then include it in the build.
|
||||||
|
core-y += arch/arm/kernel/ arch/arm/mm/ arch/arm/common/
|
||||||
|
core-y += $(machdirs) $(platdirs)
|
||||||
|
|
||||||
drivers-$(CONFIG_OPROFILE) += arch/arm/oprofile/
|
drivers-$(CONFIG_OPROFILE) += arch/arm/oprofile/
|
||||||
|
|
||||||
libs-y := arch/arm/lib/ $(libs-y)
|
libs-y := arch/arm/lib/ $(libs-y)
|
||||||
|
|
|
@ -116,5 +116,5 @@ CFLAGS_font.o := -Dstatic=
|
||||||
$(obj)/font.c: $(FONTC)
|
$(obj)/font.c: $(FONTC)
|
||||||
$(call cmd,shipped)
|
$(call cmd,shipped)
|
||||||
|
|
||||||
$(obj)/vmlinux.lds: $(obj)/vmlinux.lds.in arch/arm/boot/Makefile .config
|
$(obj)/vmlinux.lds: $(obj)/vmlinux.lds.in arch/arm/boot/Makefile $(KCONFIG_CONFIG)
|
||||||
@sed "$(SEDFLAGS)" < $< > $@
|
@sed "$(SEDFLAGS)" < $< > $@
|
||||||
|
|
|
@ -271,6 +271,14 @@ int dma_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size)
|
||||||
((dma_addr + size - PHYS_OFFSET) >= SZ_64M);
|
((dma_addr + size - PHYS_OFFSET) >= SZ_64M);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int dma_set_coherent_mask(struct device *dev, u64 mask)
|
||||||
|
{
|
||||||
|
if (mask >= PHYS_OFFSET + SZ_64M - 1)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return -EIO;
|
||||||
|
}
|
||||||
|
|
||||||
int __init it8152_pci_setup(int nr, struct pci_sys_data *sys)
|
int __init it8152_pci_setup(int nr, struct pci_sys_data *sys)
|
||||||
{
|
{
|
||||||
it8152_io.start = IT8152_IO_BASE + 0x12000;
|
it8152_io.start = IT8152_IO_BASE + 0x12000;
|
||||||
|
|
|
@ -127,4 +127,8 @@ struct mm_struct;
|
||||||
extern unsigned long arch_randomize_brk(struct mm_struct *mm);
|
extern unsigned long arch_randomize_brk(struct mm_struct *mm);
|
||||||
#define arch_randomize_brk arch_randomize_brk
|
#define arch_randomize_brk arch_randomize_brk
|
||||||
|
|
||||||
|
extern int vectors_user_mapping(void);
|
||||||
|
#define arch_setup_additional_pages(bprm, uses_interp) vectors_user_mapping()
|
||||||
|
#define ARCH_HAS_SETUP_ADDITIONAL_PAGES
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -294,6 +294,7 @@ extern void pci_iounmap(struct pci_dev *dev, void __iomem *addr);
|
||||||
#define ARCH_HAS_VALID_PHYS_ADDR_RANGE
|
#define ARCH_HAS_VALID_PHYS_ADDR_RANGE
|
||||||
extern int valid_phys_addr_range(unsigned long addr, size_t size);
|
extern int valid_phys_addr_range(unsigned long addr, size_t size);
|
||||||
extern int valid_mmap_phys_addr_range(unsigned long pfn, size_t size);
|
extern int valid_mmap_phys_addr_range(unsigned long pfn, size_t size);
|
||||||
|
extern int devmem_is_allowed(unsigned long pfn);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
#include <asm/cacheflush.h>
|
#include <asm/cacheflush.h>
|
||||||
#include <asm/cachetype.h>
|
#include <asm/cachetype.h>
|
||||||
#include <asm/proc-fns.h>
|
#include <asm/proc-fns.h>
|
||||||
#include <asm-generic/mm_hooks.h>
|
|
||||||
|
|
||||||
void __check_kvm_seq(struct mm_struct *mm);
|
void __check_kvm_seq(struct mm_struct *mm);
|
||||||
|
|
||||||
|
@ -134,4 +133,32 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next,
|
||||||
#define deactivate_mm(tsk,mm) do { } while (0)
|
#define deactivate_mm(tsk,mm) do { } while (0)
|
||||||
#define activate_mm(prev,next) switch_mm(prev, next, NULL)
|
#define activate_mm(prev,next) switch_mm(prev, next, NULL)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* We are inserting a "fake" vma for the user-accessible vector page so
|
||||||
|
* gdb and friends can get to it through ptrace and /proc/<pid>/mem.
|
||||||
|
* But we also want to remove it before the generic code gets to see it
|
||||||
|
* during process exit or the unmapping of it would cause total havoc.
|
||||||
|
* (the macro is used as remove_vma() is static to mm/mmap.c)
|
||||||
|
*/
|
||||||
|
#define arch_exit_mmap(mm) \
|
||||||
|
do { \
|
||||||
|
struct vm_area_struct *high_vma = find_vma(mm, 0xffff0000); \
|
||||||
|
if (high_vma) { \
|
||||||
|
BUG_ON(high_vma->vm_next); /* it should be last */ \
|
||||||
|
if (high_vma->vm_prev) \
|
||||||
|
high_vma->vm_prev->vm_next = NULL; \
|
||||||
|
else \
|
||||||
|
mm->mmap = NULL; \
|
||||||
|
rb_erase(&high_vma->vm_rb, &mm->mm_rb); \
|
||||||
|
mm->mmap_cache = NULL; \
|
||||||
|
mm->map_count--; \
|
||||||
|
remove_vma(high_vma); \
|
||||||
|
} \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
static inline void arch_dup_mmap(struct mm_struct *oldmm,
|
||||||
|
struct mm_struct *mm)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -317,6 +317,10 @@ static inline pte_t pte_mkspecial(pte_t pte) { return pte; }
|
||||||
#ifdef CONFIG_ARM_DMA_MEM_BUFFERABLE
|
#ifdef CONFIG_ARM_DMA_MEM_BUFFERABLE
|
||||||
#define pgprot_dmacoherent(prot) \
|
#define pgprot_dmacoherent(prot) \
|
||||||
__pgprot_modify(prot, L_PTE_MT_MASK|L_PTE_EXEC, L_PTE_MT_BUFFERABLE)
|
__pgprot_modify(prot, L_PTE_MT_MASK|L_PTE_EXEC, L_PTE_MT_BUFFERABLE)
|
||||||
|
#define __HAVE_PHYS_MEM_ACCESS_PROT
|
||||||
|
struct file;
|
||||||
|
extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
|
||||||
|
unsigned long size, pgprot_t vma_prot);
|
||||||
#else
|
#else
|
||||||
#define pgprot_dmacoherent(prot) \
|
#define pgprot_dmacoherent(prot) \
|
||||||
__pgprot_modify(prot, L_PTE_MT_MASK|L_PTE_EXEC, L_PTE_MT_UNCACHED)
|
__pgprot_modify(prot, L_PTE_MT_MASK|L_PTE_EXEC, L_PTE_MT_UNCACHED)
|
||||||
|
|
11
arch/arm/include/asm/seccomp.h
Normal file
11
arch/arm/include/asm/seccomp.h
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
#ifndef _ASM_ARM_SECCOMP_H
|
||||||
|
#define _ASM_ARM_SECCOMP_H
|
||||||
|
|
||||||
|
#include <linux/unistd.h>
|
||||||
|
|
||||||
|
#define __NR_seccomp_read __NR_read
|
||||||
|
#define __NR_seccomp_write __NR_write
|
||||||
|
#define __NR_seccomp_exit __NR_exit
|
||||||
|
#define __NR_seccomp_sigreturn __NR_rt_sigreturn
|
||||||
|
|
||||||
|
#endif /* _ASM_ARM_SECCOMP_H */
|
|
@ -144,6 +144,7 @@ extern void vfp_flush_hwstate(struct thread_info *);
|
||||||
#define TIF_MEMDIE 18 /* is terminating due to OOM killer */
|
#define TIF_MEMDIE 18 /* is terminating due to OOM killer */
|
||||||
#define TIF_FREEZE 19
|
#define TIF_FREEZE 19
|
||||||
#define TIF_RESTORE_SIGMASK 20
|
#define TIF_RESTORE_SIGMASK 20
|
||||||
|
#define TIF_SECCOMP 21
|
||||||
|
|
||||||
#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
|
#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
|
||||||
#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
|
#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
|
||||||
|
@ -153,6 +154,7 @@ extern void vfp_flush_hwstate(struct thread_info *);
|
||||||
#define _TIF_USING_IWMMXT (1 << TIF_USING_IWMMXT)
|
#define _TIF_USING_IWMMXT (1 << TIF_USING_IWMMXT)
|
||||||
#define _TIF_FREEZE (1 << TIF_FREEZE)
|
#define _TIF_FREEZE (1 << TIF_FREEZE)
|
||||||
#define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK)
|
#define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK)
|
||||||
|
#define _TIF_SECCOMP (1 << TIF_SECCOMP)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Change these and you break ASM code in entry-common.S
|
* Change these and you break ASM code in entry-common.S
|
||||||
|
|
|
@ -48,6 +48,8 @@ work_pending:
|
||||||
beq no_work_pending
|
beq no_work_pending
|
||||||
mov r0, sp @ 'regs'
|
mov r0, sp @ 'regs'
|
||||||
mov r2, why @ 'syscall'
|
mov r2, why @ 'syscall'
|
||||||
|
tst r1, #_TIF_SIGPENDING @ delivering a signal?
|
||||||
|
movne why, #0 @ prevent further restarts
|
||||||
bl do_notify_resume
|
bl do_notify_resume
|
||||||
b ret_slow_syscall @ Check work again
|
b ret_slow_syscall @ Check work again
|
||||||
|
|
||||||
|
@ -293,7 +295,6 @@ ENTRY(vector_swi)
|
||||||
|
|
||||||
get_thread_info tsk
|
get_thread_info tsk
|
||||||
adr tbl, sys_call_table @ load syscall table pointer
|
adr tbl, sys_call_table @ load syscall table pointer
|
||||||
ldr ip, [tsk, #TI_FLAGS] @ check for syscall tracing
|
|
||||||
|
|
||||||
#if defined(CONFIG_OABI_COMPAT)
|
#if defined(CONFIG_OABI_COMPAT)
|
||||||
/*
|
/*
|
||||||
|
@ -310,8 +311,20 @@ ENTRY(vector_swi)
|
||||||
eor scno, scno, #__NR_SYSCALL_BASE @ check OS number
|
eor scno, scno, #__NR_SYSCALL_BASE @ check OS number
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
ldr r10, [tsk, #TI_FLAGS] @ check for syscall tracing
|
||||||
stmdb sp!, {r4, r5} @ push fifth and sixth args
|
stmdb sp!, {r4, r5} @ push fifth and sixth args
|
||||||
tst ip, #_TIF_SYSCALL_TRACE @ are we tracing syscalls?
|
|
||||||
|
#ifdef CONFIG_SECCOMP
|
||||||
|
tst r10, #_TIF_SECCOMP
|
||||||
|
beq 1f
|
||||||
|
mov r0, scno
|
||||||
|
bl __secure_computing
|
||||||
|
add r0, sp, #S_R0 + S_OFF @ pointer to regs
|
||||||
|
ldmia r0, {r0 - r3} @ have to reload r0 - r3
|
||||||
|
1:
|
||||||
|
#endif
|
||||||
|
|
||||||
|
tst r10, #_TIF_SYSCALL_TRACE @ are we tracing syscalls?
|
||||||
bne __sys_trace
|
bne __sys_trace
|
||||||
|
|
||||||
cmp scno, #NR_syscalls @ check upper syscall limit
|
cmp scno, #NR_syscalls @ check upper syscall limit
|
||||||
|
|
|
@ -458,3 +458,24 @@ unsigned long arch_randomize_brk(struct mm_struct *mm)
|
||||||
unsigned long range_end = mm->brk + 0x02000000;
|
unsigned long range_end = mm->brk + 0x02000000;
|
||||||
return randomize_range(mm->brk, range_end, 0) ? : mm->brk;
|
return randomize_range(mm->brk, range_end, 0) ? : mm->brk;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The vectors page is always readable from user space for the
|
||||||
|
* atomic helpers and the signal restart code. Let's declare a mapping
|
||||||
|
* for it so it is visible through ptrace and /proc/<pid>/mem.
|
||||||
|
*/
|
||||||
|
|
||||||
|
int vectors_user_mapping(void)
|
||||||
|
{
|
||||||
|
struct mm_struct *mm = current->mm;
|
||||||
|
return install_special_mapping(mm, 0xffff0000, PAGE_SIZE,
|
||||||
|
VM_READ | VM_EXEC |
|
||||||
|
VM_MAYREAD | VM_MAYEXEC |
|
||||||
|
VM_ALWAYSDUMP | VM_RESERVED,
|
||||||
|
NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *arch_vma_name(struct vm_area_struct *vma)
|
||||||
|
{
|
||||||
|
return (vma->vm_start == 0xffff0000) ? "[vectors]" : NULL;
|
||||||
|
}
|
||||||
|
|
|
@ -11,6 +11,6 @@
|
||||||
#ifndef __ASM_ARCH_VMALLOC_H
|
#ifndef __ASM_ARCH_VMALLOC_H
|
||||||
#define __ASM_ARCH_VMALLOC_H
|
#define __ASM_ARCH_VMALLOC_H
|
||||||
|
|
||||||
#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
|
#define VMALLOC_END 0xd0000000
|
||||||
|
|
||||||
#endif /* __ASM_ARCH_VMALLOC_H */
|
#endif /* __ASM_ARCH_VMALLOC_H */
|
||||||
|
|
|
@ -426,7 +426,7 @@ static struct i2c_gpio_platform_data pdata_i2c0 = {
|
||||||
.sda_is_open_drain = 1,
|
.sda_is_open_drain = 1,
|
||||||
.scl_pin = AT91_PIN_PA21,
|
.scl_pin = AT91_PIN_PA21,
|
||||||
.scl_is_open_drain = 1,
|
.scl_is_open_drain = 1,
|
||||||
.udelay = 2, /* ~100 kHz */
|
.udelay = 5, /* ~100 kHz */
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct platform_device at91sam9g45_twi0_device = {
|
static struct platform_device at91sam9g45_twi0_device = {
|
||||||
|
@ -440,7 +440,7 @@ static struct i2c_gpio_platform_data pdata_i2c1 = {
|
||||||
.sda_is_open_drain = 1,
|
.sda_is_open_drain = 1,
|
||||||
.scl_pin = AT91_PIN_PB11,
|
.scl_pin = AT91_PIN_PB11,
|
||||||
.scl_is_open_drain = 1,
|
.scl_is_open_drain = 1,
|
||||||
.udelay = 2, /* ~100 kHz */
|
.udelay = 5, /* ~100 kHz */
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct platform_device at91sam9g45_twi1_device = {
|
static struct platform_device at91sam9g45_twi1_device = {
|
||||||
|
|
|
@ -22,4 +22,4 @@
|
||||||
* 0xe0000000 to 0xefffffff. This gives us 256 MB of vm space and handles
|
* 0xe0000000 to 0xefffffff. This gives us 256 MB of vm space and handles
|
||||||
* larger physical memory designs better.
|
* larger physical memory designs better.
|
||||||
*/
|
*/
|
||||||
#define VMALLOC_END (PAGE_OFFSET + 0x30000000)
|
#define VMALLOC_END 0xf0000000
|
||||||
|
|
|
@ -17,4 +17,4 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
|
#define VMALLOC_END 0xd0000000
|
||||||
|
|
|
@ -769,8 +769,7 @@ static struct map_desc dm355_io_desc[] = {
|
||||||
.virtual = SRAM_VIRT,
|
.virtual = SRAM_VIRT,
|
||||||
.pfn = __phys_to_pfn(0x00010000),
|
.pfn = __phys_to_pfn(0x00010000),
|
||||||
.length = SZ_32K,
|
.length = SZ_32K,
|
||||||
/* MT_MEMORY_NONCACHED requires supersection alignment */
|
.type = MT_MEMORY_NONCACHED,
|
||||||
.type = MT_DEVICE,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -969,8 +969,7 @@ static struct map_desc dm365_io_desc[] = {
|
||||||
.virtual = SRAM_VIRT,
|
.virtual = SRAM_VIRT,
|
||||||
.pfn = __phys_to_pfn(0x00010000),
|
.pfn = __phys_to_pfn(0x00010000),
|
||||||
.length = SZ_32K,
|
.length = SZ_32K,
|
||||||
/* MT_MEMORY_NONCACHED requires supersection alignment */
|
.type = MT_MEMORY_NONCACHED,
|
||||||
.type = MT_DEVICE,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -653,8 +653,7 @@ static struct map_desc dm644x_io_desc[] = {
|
||||||
.virtual = SRAM_VIRT,
|
.virtual = SRAM_VIRT,
|
||||||
.pfn = __phys_to_pfn(0x00008000),
|
.pfn = __phys_to_pfn(0x00008000),
|
||||||
.length = SZ_16K,
|
.length = SZ_16K,
|
||||||
/* MT_MEMORY_NONCACHED requires supersection alignment */
|
.type = MT_MEMORY_NONCACHED,
|
||||||
.type = MT_DEVICE,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -737,8 +737,7 @@ static struct map_desc dm646x_io_desc[] = {
|
||||||
.virtual = SRAM_VIRT,
|
.virtual = SRAM_VIRT,
|
||||||
.pfn = __phys_to_pfn(0x00010000),
|
.pfn = __phys_to_pfn(0x00010000),
|
||||||
.length = SZ_32K,
|
.length = SZ_32K,
|
||||||
/* MT_MEMORY_NONCACHED requires supersection alignment */
|
.type = MT_MEMORY_NONCACHED,
|
||||||
.type = MT_DEVICE,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
#define IO_SPACE_LIMIT 0xffffffff
|
#define IO_SPACE_LIMIT 0xffffffff
|
||||||
|
|
||||||
#define __io(a) ((void __iomem *)(((a) - DOVE_PCIE0_IO_PHYS_BASE) +\
|
#define __io(a) ((void __iomem *)(((a) - DOVE_PCIE0_IO_BUS_BASE) + \
|
||||||
DOVE_PCIE0_IO_VIRT_BASE))
|
DOVE_PCIE0_IO_VIRT_BASE))
|
||||||
#define __mem_pci(a) (a)
|
#define __mem_pci(a) (a)
|
||||||
|
|
||||||
|
|
|
@ -7,4 +7,4 @@
|
||||||
* it under the terms of the GNU General Public License version 2 as
|
* it under the terms of the GNU General Public License version 2 as
|
||||||
* published by the Free Software Foundation.
|
* published by the Free Software Foundation.
|
||||||
*/
|
*/
|
||||||
#define VMALLOC_END (PAGE_OFFSET + 0x1f000000)
|
#define VMALLOC_END 0xdf000000
|
||||||
|
|
|
@ -7,4 +7,4 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#define VMALLOC_END (PAGE_OFFSET + 0x30000000)
|
#define VMALLOC_END 0xf0000000
|
||||||
|
|
|
@ -5,6 +5,6 @@
|
||||||
#ifndef __ARCH_ARM_VMALLOC_H
|
#ifndef __ARCH_ARM_VMALLOC_H
|
||||||
#define __ARCH_ARM_VMALLOC_H
|
#define __ARCH_ARM_VMALLOC_H
|
||||||
|
|
||||||
#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
|
#define VMALLOC_END 0xd0000000
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -17,4 +17,4 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
|
#define VMALLOC_END 0xd0000000
|
||||||
|
|
|
@ -503,6 +503,14 @@ struct pci_bus * __devinit ixp4xx_scan_bus(int nr, struct pci_sys_data *sys)
|
||||||
return pci_scan_bus(sys->busnr, &ixp4xx_ops, sys);
|
return pci_scan_bus(sys->busnr, &ixp4xx_ops, sys);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int dma_set_coherent_mask(struct device *dev, u64 mask)
|
||||||
|
{
|
||||||
|
if (mask >= SZ_64M - 1)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return -EIO;
|
||||||
|
}
|
||||||
|
|
||||||
EXPORT_SYMBOL(ixp4xx_pci_read);
|
EXPORT_SYMBOL(ixp4xx_pci_read);
|
||||||
EXPORT_SYMBOL(ixp4xx_pci_write);
|
EXPORT_SYMBOL(ixp4xx_pci_write);
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
#define PCIBIOS_MAX_MEM 0x4BFFFFFF
|
#define PCIBIOS_MAX_MEM 0x4BFFFFFF
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define ARCH_HAS_DMA_SET_COHERENT_MASK
|
||||||
|
|
||||||
#define pcibios_assign_all_busses() 1
|
#define pcibios_assign_all_busses() 1
|
||||||
|
|
||||||
/* Register locations and bits */
|
/* Register locations and bits */
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
#define KIRKWOOD_PCIE1_IO_PHYS_BASE 0xf3000000
|
#define KIRKWOOD_PCIE1_IO_PHYS_BASE 0xf3000000
|
||||||
#define KIRKWOOD_PCIE1_IO_VIRT_BASE 0xfef00000
|
#define KIRKWOOD_PCIE1_IO_VIRT_BASE 0xfef00000
|
||||||
#define KIRKWOOD_PCIE1_IO_BUS_BASE 0x00000000
|
#define KIRKWOOD_PCIE1_IO_BUS_BASE 0x00100000
|
||||||
#define KIRKWOOD_PCIE1_IO_SIZE SZ_1M
|
#define KIRKWOOD_PCIE1_IO_SIZE SZ_1M
|
||||||
|
|
||||||
#define KIRKWOOD_PCIE_IO_PHYS_BASE 0xf2000000
|
#define KIRKWOOD_PCIE_IO_PHYS_BASE 0xf2000000
|
||||||
|
|
|
@ -117,7 +117,7 @@ static void __init pcie0_ioresources_init(struct pcie_port *pp)
|
||||||
* IORESOURCE_IO
|
* IORESOURCE_IO
|
||||||
*/
|
*/
|
||||||
pp->res[0].name = "PCIe 0 I/O Space";
|
pp->res[0].name = "PCIe 0 I/O Space";
|
||||||
pp->res[0].start = KIRKWOOD_PCIE_IO_PHYS_BASE;
|
pp->res[0].start = KIRKWOOD_PCIE_IO_BUS_BASE;
|
||||||
pp->res[0].end = pp->res[0].start + KIRKWOOD_PCIE_IO_SIZE - 1;
|
pp->res[0].end = pp->res[0].start + KIRKWOOD_PCIE_IO_SIZE - 1;
|
||||||
pp->res[0].flags = IORESOURCE_IO;
|
pp->res[0].flags = IORESOURCE_IO;
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ static void __init pcie1_ioresources_init(struct pcie_port *pp)
|
||||||
* IORESOURCE_IO
|
* IORESOURCE_IO
|
||||||
*/
|
*/
|
||||||
pp->res[0].name = "PCIe 1 I/O Space";
|
pp->res[0].name = "PCIe 1 I/O Space";
|
||||||
pp->res[0].start = KIRKWOOD_PCIE1_IO_PHYS_BASE;
|
pp->res[0].start = KIRKWOOD_PCIE1_IO_BUS_BASE;
|
||||||
pp->res[0].end = pp->res[0].start + KIRKWOOD_PCIE1_IO_SIZE - 1;
|
pp->res[0].end = pp->res[0].start + KIRKWOOD_PCIE1_IO_SIZE - 1;
|
||||||
pp->res[0].flags = IORESOURCE_IO;
|
pp->res[0].flags = IORESOURCE_IO;
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
#ifndef __ASM_MACH_SYSTEM_H
|
#ifndef __ASM_MACH_SYSTEM_H
|
||||||
#define __ASM_MACH_SYSTEM_H
|
#define __ASM_MACH_SYSTEM_H
|
||||||
|
|
||||||
|
#include <mach/cputype.h>
|
||||||
|
|
||||||
static inline void arch_idle(void)
|
static inline void arch_idle(void)
|
||||||
{
|
{
|
||||||
cpu_do_idle();
|
cpu_do_idle();
|
||||||
|
@ -16,6 +18,9 @@ static inline void arch_idle(void)
|
||||||
|
|
||||||
static inline void arch_reset(char mode, const char *cmd)
|
static inline void arch_reset(char mode, const char *cmd)
|
||||||
{
|
{
|
||||||
|
if (cpu_is_pxa168())
|
||||||
|
cpu_reset(0xffff0000);
|
||||||
|
else
|
||||||
cpu_reset(0);
|
cpu_reset(0);
|
||||||
}
|
}
|
||||||
#endif /* __ASM_MACH_SYSTEM_H */
|
#endif /* __ASM_MACH_SYSTEM_H */
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#ifndef __ASM_ARCH_MSM_VMALLOC_H
|
#ifndef __ASM_ARCH_MSM_VMALLOC_H
|
||||||
#define __ASM_ARCH_MSM_VMALLOC_H
|
#define __ASM_ARCH_MSM_VMALLOC_H
|
||||||
|
|
||||||
#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
|
#define VMALLOC_END 0xd0000000
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -70,6 +70,25 @@ int mx51_revision(void)
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(mx51_revision);
|
EXPORT_SYMBOL(mx51_revision);
|
||||||
|
|
||||||
|
#ifdef CONFIG_NEON
|
||||||
|
|
||||||
|
/*
|
||||||
|
* All versions of the silicon before Rev. 3 have broken NEON implementations.
|
||||||
|
* Dependent on link order - so the assumption is that vfp_init is called
|
||||||
|
* before us.
|
||||||
|
*/
|
||||||
|
static int __init mx51_neon_fixup(void)
|
||||||
|
{
|
||||||
|
if (mx51_revision() < MX51_CHIP_REV_3_0 && (elf_hwcap & HWCAP_NEON)) {
|
||||||
|
elf_hwcap &= ~HWCAP_NEON;
|
||||||
|
pr_info("Turning off NEON support, detected broken NEON implementation\n");
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
late_initcall(mx51_neon_fixup);
|
||||||
|
#endif
|
||||||
|
|
||||||
static int __init post_cpu_init(void)
|
static int __init post_cpu_init(void)
|
||||||
{
|
{
|
||||||
unsigned int reg;
|
unsigned int reg;
|
||||||
|
|
|
@ -16,4 +16,4 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
|
#define VMALLOC_END 0xd0000000
|
||||||
|
|
|
@ -17,4 +17,4 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
#define VMALLOC_END (PAGE_OFFSET + 0x18000000)
|
#define VMALLOC_END 0xd8000000
|
||||||
|
|
|
@ -17,4 +17,4 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
#define VMALLOC_END (PAGE_OFFSET + 0x38000000)
|
#define VMALLOC_END 0xf8000000
|
||||||
|
|
|
@ -17,4 +17,4 @@
|
||||||
* The vmalloc() routines leaves a hole of 4kB between each vmalloced
|
* The vmalloc() routines leaves a hole of 4kB between each vmalloced
|
||||||
* area for the same reason. ;)
|
* area for the same reason. ;)
|
||||||
*/
|
*/
|
||||||
#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
|
#define VMALLOC_END 0xd0000000
|
||||||
|
|
|
@ -312,8 +312,7 @@ static int pxa_set_target(struct cpufreq_policy *policy,
|
||||||
freqs.cpu = policy->cpu;
|
freqs.cpu = policy->cpu;
|
||||||
|
|
||||||
if (freq_debug)
|
if (freq_debug)
|
||||||
pr_debug(KERN_INFO "Changing CPU frequency to %d Mhz, "
|
pr_debug("Changing CPU frequency to %d Mhz, (SDRAM %d Mhz)\n",
|
||||||
"(SDRAM %d Mhz)\n",
|
|
||||||
freqs.new / 1000, (pxa_freq_settings[idx].div2) ?
|
freqs.new / 1000, (pxa_freq_settings[idx].div2) ?
|
||||||
(new_freq_mem / 2000) : (new_freq_mem / 1000));
|
(new_freq_mem / 2000) : (new_freq_mem / 1000));
|
||||||
|
|
||||||
|
|
|
@ -264,23 +264,35 @@
|
||||||
* <= 0x2 for pxa21x/pxa25x/pxa26x/pxa27x
|
* <= 0x2 for pxa21x/pxa25x/pxa26x/pxa27x
|
||||||
* == 0x3 for pxa300/pxa310/pxa320
|
* == 0x3 for pxa300/pxa310/pxa320
|
||||||
*/
|
*/
|
||||||
|
#if defined(CONFIG_PXA25x) || defined(CONFIG_PXA27x)
|
||||||
#define __cpu_is_pxa2xx(id) \
|
#define __cpu_is_pxa2xx(id) \
|
||||||
({ \
|
({ \
|
||||||
unsigned int _id = (id) >> 13 & 0x7; \
|
unsigned int _id = (id) >> 13 & 0x7; \
|
||||||
_id <= 0x2; \
|
_id <= 0x2; \
|
||||||
})
|
})
|
||||||
|
#else
|
||||||
|
#define __cpu_is_pxa2xx(id) (0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_PXA3xx
|
||||||
#define __cpu_is_pxa3xx(id) \
|
#define __cpu_is_pxa3xx(id) \
|
||||||
({ \
|
({ \
|
||||||
unsigned int _id = (id) >> 13 & 0x7; \
|
unsigned int _id = (id) >> 13 & 0x7; \
|
||||||
_id == 0x3; \
|
_id == 0x3; \
|
||||||
})
|
})
|
||||||
|
#else
|
||||||
|
#define __cpu_is_pxa3xx(id) (0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(CONFIG_CPU_PXA930) || defined(CONFIG_CPU_PXA935)
|
||||||
#define __cpu_is_pxa93x(id) \
|
#define __cpu_is_pxa93x(id) \
|
||||||
({ \
|
({ \
|
||||||
unsigned int _id = (id) >> 4 & 0xfff; \
|
unsigned int _id = (id) >> 4 & 0xfff; \
|
||||||
_id == 0x683 || _id == 0x693; \
|
_id == 0x683 || _id == 0x693; \
|
||||||
})
|
})
|
||||||
|
#else
|
||||||
|
#define __cpu_is_pxa93x(id) (0)
|
||||||
|
#endif
|
||||||
|
|
||||||
#define cpu_is_pxa2xx() \
|
#define cpu_is_pxa2xx() \
|
||||||
({ \
|
({ \
|
||||||
|
@ -309,7 +321,7 @@ extern unsigned long get_clock_tick_rate(void);
|
||||||
#define PCIBIOS_MIN_IO 0
|
#define PCIBIOS_MIN_IO 0
|
||||||
#define PCIBIOS_MIN_MEM 0
|
#define PCIBIOS_MIN_MEM 0
|
||||||
#define pcibios_assign_all_busses() 1
|
#define pcibios_assign_all_busses() 1
|
||||||
|
#define ARCH_HAS_DMA_SET_COHERENT_MASK
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#endif /* _ASM_ARCH_HARDWARE_H */
|
#endif /* _ASM_ARCH_HARDWARE_H */
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
#ifndef __ASM_ARM_ARCH_IO_H
|
#ifndef __ASM_ARM_ARCH_IO_H
|
||||||
#define __ASM_ARM_ARCH_IO_H
|
#define __ASM_ARM_ARCH_IO_H
|
||||||
|
|
||||||
|
#include <mach/hardware.h>
|
||||||
|
|
||||||
#define IO_SPACE_LIMIT 0xffffffff
|
#define IO_SPACE_LIMIT 0xffffffff
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -469,9 +469,13 @@ static struct i2c_board_info __initdata palm27x_pi2c_board_info[] = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct i2c_pxa_platform_data palm27x_i2c_power_info = {
|
||||||
|
.use_pio = 1,
|
||||||
|
};
|
||||||
|
|
||||||
void __init palm27x_pmic_init(void)
|
void __init palm27x_pmic_init(void)
|
||||||
{
|
{
|
||||||
i2c_register_board_info(1, ARRAY_AND_SIZE(palm27x_pi2c_board_info));
|
i2c_register_board_info(1, ARRAY_AND_SIZE(palm27x_pi2c_board_info));
|
||||||
pxa27x_set_i2c_power_info(NULL);
|
pxa27x_set_i2c_power_info(&palm27x_i2c_power_info);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -240,6 +240,7 @@ static void __init vpac270_onenand_init(void) {}
|
||||||
#if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
|
#if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
|
||||||
static struct pxamci_platform_data vpac270_mci_platform_data = {
|
static struct pxamci_platform_data vpac270_mci_platform_data = {
|
||||||
.ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
|
.ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
|
||||||
|
.gpio_power = -1,
|
||||||
.gpio_card_detect = GPIO53_VPAC270_SD_DETECT_N,
|
.gpio_card_detect = GPIO53_VPAC270_SD_DETECT_N,
|
||||||
.gpio_card_ro = GPIO52_VPAC270_SD_READONLY,
|
.gpio_card_ro = GPIO52_VPAC270_SD_READONLY,
|
||||||
.detect_delay_ms = 200,
|
.detect_delay_ms = 200,
|
||||||
|
|
|
@ -7,4 +7,4 @@
|
||||||
* it under the terms of the GNU General Public License version 2 as
|
* it under the terms of the GNU General Public License version 2 as
|
||||||
* published by the Free Software Foundation.
|
* published by the Free Software Foundation.
|
||||||
*/
|
*/
|
||||||
#define VMALLOC_END (PAGE_OFFSET + 0x1c000000)
|
#define VMALLOC_END 0xdc000000
|
||||||
|
|
|
@ -18,10 +18,11 @@
|
||||||
#include <mach/map.h>
|
#include <mach/map.h>
|
||||||
#include <mach/gpio-bank-c.h>
|
#include <mach/gpio-bank-c.h>
|
||||||
#include <mach/spi-clocks.h>
|
#include <mach/spi-clocks.h>
|
||||||
|
#include <mach/irqs.h>
|
||||||
|
|
||||||
#include <plat/s3c64xx-spi.h>
|
#include <plat/s3c64xx-spi.h>
|
||||||
#include <plat/gpio-cfg.h>
|
#include <plat/gpio-cfg.h>
|
||||||
#include <plat/irqs.h>
|
#include <plat/devs.h>
|
||||||
|
|
||||||
static char *spi_src_clks[] = {
|
static char *spi_src_clks[] = {
|
||||||
[S3C64XX_SPI_SRCCLK_PCLK] = "pclk",
|
[S3C64XX_SPI_SRCCLK_PCLK] = "pclk",
|
||||||
|
|
|
@ -30,9 +30,9 @@
|
||||||
#include <plat/devs.h>
|
#include <plat/devs.h>
|
||||||
#include <plat/regs-serial.h>
|
#include <plat/regs-serial.h>
|
||||||
|
|
||||||
#define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK
|
#define UCON (S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK)
|
||||||
#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
|
#define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB)
|
||||||
#define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE
|
#define UFCON (S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE)
|
||||||
|
|
||||||
static struct s3c2410_uartcfg real6410_uartcfgs[] __initdata = {
|
static struct s3c2410_uartcfg real6410_uartcfgs[] __initdata = {
|
||||||
[0] = {
|
[0] = {
|
||||||
|
@ -81,7 +81,7 @@ static struct resource real6410_dm9k_resource[] = {
|
||||||
[2] = {
|
[2] = {
|
||||||
.start = S3C_EINT(7),
|
.start = S3C_EINT(7),
|
||||||
.end = S3C_EINT(7),
|
.end = S3C_EINT(7),
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -280,6 +280,24 @@ static struct clk init_clocks_disable[] = {
|
||||||
.parent = &clk_hclk_dsys.clk,
|
.parent = &clk_hclk_dsys.clk,
|
||||||
.enable = s5pv210_clk_ip0_ctrl,
|
.enable = s5pv210_clk_ip0_ctrl,
|
||||||
.ctrlbit = (1<<29),
|
.ctrlbit = (1<<29),
|
||||||
|
}, {
|
||||||
|
.name = "fimc",
|
||||||
|
.id = 0,
|
||||||
|
.parent = &clk_hclk_dsys.clk,
|
||||||
|
.enable = s5pv210_clk_ip0_ctrl,
|
||||||
|
.ctrlbit = (1 << 24),
|
||||||
|
}, {
|
||||||
|
.name = "fimc",
|
||||||
|
.id = 1,
|
||||||
|
.parent = &clk_hclk_dsys.clk,
|
||||||
|
.enable = s5pv210_clk_ip0_ctrl,
|
||||||
|
.ctrlbit = (1 << 25),
|
||||||
|
}, {
|
||||||
|
.name = "fimc",
|
||||||
|
.id = 2,
|
||||||
|
.parent = &clk_hclk_dsys.clk,
|
||||||
|
.enable = s5pv210_clk_ip0_ctrl,
|
||||||
|
.ctrlbit = (1 << 26),
|
||||||
}, {
|
}, {
|
||||||
.name = "otg",
|
.name = "otg",
|
||||||
.id = -1,
|
.id = -1,
|
||||||
|
@ -357,7 +375,7 @@ static struct clk init_clocks_disable[] = {
|
||||||
.id = 1,
|
.id = 1,
|
||||||
.parent = &clk_pclk_psys.clk,
|
.parent = &clk_pclk_psys.clk,
|
||||||
.enable = s5pv210_clk_ip3_ctrl,
|
.enable = s5pv210_clk_ip3_ctrl,
|
||||||
.ctrlbit = (1<<8),
|
.ctrlbit = (1 << 10),
|
||||||
}, {
|
}, {
|
||||||
.name = "i2c",
|
.name = "i2c",
|
||||||
.id = 2,
|
.id = 2,
|
||||||
|
|
|
@ -47,7 +47,7 @@ static struct map_desc s5pv210_iodesc[] __initdata = {
|
||||||
{
|
{
|
||||||
.virtual = (unsigned long)S5P_VA_SYSTIMER,
|
.virtual = (unsigned long)S5P_VA_SYSTIMER,
|
||||||
.pfn = __phys_to_pfn(S5PV210_PA_SYSTIMER),
|
.pfn = __phys_to_pfn(S5PV210_PA_SYSTIMER),
|
||||||
.length = SZ_1M,
|
.length = SZ_4K,
|
||||||
.type = MT_DEVICE,
|
.type = MT_DEVICE,
|
||||||
}, {
|
}, {
|
||||||
.virtual = (unsigned long)VA_VIC2,
|
.virtual = (unsigned long)VA_VIC2,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*
|
/*
|
||||||
* arch/arm/mach-shark/include/mach/vmalloc.h
|
* arch/arm/mach-shark/include/mach/vmalloc.h
|
||||||
*/
|
*/
|
||||||
#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
|
#define VMALLOC_END 0xd0000000
|
||||||
|
|
|
@ -273,6 +273,9 @@ extern void gpio_pullup(unsigned gpio, int value);
|
||||||
extern int gpio_get_value(unsigned gpio);
|
extern int gpio_get_value(unsigned gpio);
|
||||||
extern void gpio_set_value(unsigned gpio, int value);
|
extern void gpio_set_value(unsigned gpio, int value);
|
||||||
|
|
||||||
|
#define gpio_get_value_cansleep gpio_get_value
|
||||||
|
#define gpio_set_value_cansleep gpio_set_value
|
||||||
|
|
||||||
/* wrappers to sleep-enable the previous two functions */
|
/* wrappers to sleep-enable the previous two functions */
|
||||||
static inline unsigned gpio_to_irq(unsigned gpio)
|
static inline unsigned gpio_to_irq(unsigned gpio)
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,4 +18,4 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
#define VMALLOC_END (PAGE_OFFSET + 0x18000000)
|
#define VMALLOC_END 0xd8000000
|
||||||
|
|
|
@ -227,7 +227,13 @@ static void ct_ca9x4_init(void)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
#ifdef CONFIG_CACHE_L2X0
|
#ifdef CONFIG_CACHE_L2X0
|
||||||
l2x0_init(MMIO_P2V(CT_CA9X4_L2CC), 0x00000000, 0xfe0fffff);
|
void __iomem *l2x0_base = MMIO_P2V(CT_CA9X4_L2CC);
|
||||||
|
|
||||||
|
/* set RAM latencies to 1 cycle for this core tile. */
|
||||||
|
writel(0, l2x0_base + L2X0_TAG_LATENCY_CTRL);
|
||||||
|
writel(0, l2x0_base + L2X0_DATA_LATENCY_CTRL);
|
||||||
|
|
||||||
|
l2x0_init(l2x0_base, 0x00400000, 0xfe0fffff);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
clkdev_add_table(lookups, ARRAY_SIZE(lookups));
|
clkdev_add_table(lookups, ARRAY_SIZE(lookups));
|
||||||
|
|
|
@ -885,8 +885,23 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
|
||||||
|
|
||||||
if (ai_usermode & UM_SIGNAL)
|
if (ai_usermode & UM_SIGNAL)
|
||||||
force_sig(SIGBUS, current);
|
force_sig(SIGBUS, current);
|
||||||
else
|
else {
|
||||||
|
/*
|
||||||
|
* We're about to disable the alignment trap and return to
|
||||||
|
* user space. But if an interrupt occurs before actually
|
||||||
|
* reaching user space, then the IRQ vector entry code will
|
||||||
|
* notice that we were still in kernel space and therefore
|
||||||
|
* the alignment trap won't be re-enabled in that case as it
|
||||||
|
* is presumed to be always on from kernel space.
|
||||||
|
* Let's prevent that race by disabling interrupts here (they
|
||||||
|
* are disabled on the way back to user space anyway in
|
||||||
|
* entry-common.S) and disable the alignment trap only if
|
||||||
|
* there is no work pending for this thread.
|
||||||
|
*/
|
||||||
|
raw_local_irq_disable();
|
||||||
|
if (!(current_thread_info()->flags & _TIF_WORK_MASK))
|
||||||
set_cr(cr_no_alignment);
|
set_cr(cr_no_alignment);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -144,3 +144,25 @@ int valid_mmap_phys_addr_range(unsigned long pfn, size_t size)
|
||||||
{
|
{
|
||||||
return !(pfn + (size >> PAGE_SHIFT) > 0x00100000);
|
return !(pfn + (size >> PAGE_SHIFT) > 0x00100000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_STRICT_DEVMEM
|
||||||
|
|
||||||
|
#include <linux/ioport.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* devmem_is_allowed() checks to see if /dev/mem access to a certain
|
||||||
|
* address is valid. The argument is a physical page number.
|
||||||
|
* We mimic x86 here by disallowing access to system RAM as well as
|
||||||
|
* device-exclusive MMIO regions. This effectively disable read()/write()
|
||||||
|
* on /dev/mem.
|
||||||
|
*/
|
||||||
|
int devmem_is_allowed(unsigned long pfn)
|
||||||
|
{
|
||||||
|
if (iomem_is_exclusive(pfn << PAGE_SHIFT))
|
||||||
|
return 0;
|
||||||
|
if (!page_is_ram(pfn))
|
||||||
|
return 1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
#include <linux/nodemask.h>
|
#include <linux/nodemask.h>
|
||||||
#include <linux/memblock.h>
|
#include <linux/memblock.h>
|
||||||
#include <linux/sort.h>
|
#include <linux/sort.h>
|
||||||
|
#include <linux/fs.h>
|
||||||
|
|
||||||
#include <asm/cputype.h>
|
#include <asm/cputype.h>
|
||||||
#include <asm/sections.h>
|
#include <asm/sections.h>
|
||||||
|
@ -246,6 +247,9 @@ static struct mem_type mem_types[] = {
|
||||||
.domain = DOMAIN_USER,
|
.domain = DOMAIN_USER,
|
||||||
},
|
},
|
||||||
[MT_MEMORY] = {
|
[MT_MEMORY] = {
|
||||||
|
.prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY |
|
||||||
|
L_PTE_USER | L_PTE_EXEC,
|
||||||
|
.prot_l1 = PMD_TYPE_TABLE,
|
||||||
.prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE,
|
.prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE,
|
||||||
.domain = DOMAIN_KERNEL,
|
.domain = DOMAIN_KERNEL,
|
||||||
},
|
},
|
||||||
|
@ -254,6 +258,9 @@ static struct mem_type mem_types[] = {
|
||||||
.domain = DOMAIN_KERNEL,
|
.domain = DOMAIN_KERNEL,
|
||||||
},
|
},
|
||||||
[MT_MEMORY_NONCACHED] = {
|
[MT_MEMORY_NONCACHED] = {
|
||||||
|
.prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY |
|
||||||
|
L_PTE_USER | L_PTE_EXEC | L_PTE_MT_BUFFERABLE,
|
||||||
|
.prot_l1 = PMD_TYPE_TABLE,
|
||||||
.prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE,
|
.prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE,
|
||||||
.domain = DOMAIN_KERNEL,
|
.domain = DOMAIN_KERNEL,
|
||||||
},
|
},
|
||||||
|
@ -411,9 +418,12 @@ static void __init build_mem_type_table(void)
|
||||||
* Enable CPU-specific coherency if supported.
|
* Enable CPU-specific coherency if supported.
|
||||||
* (Only available on XSC3 at the moment.)
|
* (Only available on XSC3 at the moment.)
|
||||||
*/
|
*/
|
||||||
if (arch_is_coherent() && cpu_is_xsc3())
|
if (arch_is_coherent() && cpu_is_xsc3()) {
|
||||||
mem_types[MT_MEMORY].prot_sect |= PMD_SECT_S;
|
mem_types[MT_MEMORY].prot_sect |= PMD_SECT_S;
|
||||||
|
mem_types[MT_MEMORY].prot_pte |= L_PTE_SHARED;
|
||||||
|
mem_types[MT_MEMORY_NONCACHED].prot_sect |= PMD_SECT_S;
|
||||||
|
mem_types[MT_MEMORY_NONCACHED].prot_pte |= L_PTE_SHARED;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* ARMv6 and above have extended page tables.
|
* ARMv6 and above have extended page tables.
|
||||||
*/
|
*/
|
||||||
|
@ -438,7 +448,9 @@ static void __init build_mem_type_table(void)
|
||||||
mem_types[MT_DEVICE_CACHED].prot_sect |= PMD_SECT_S;
|
mem_types[MT_DEVICE_CACHED].prot_sect |= PMD_SECT_S;
|
||||||
mem_types[MT_DEVICE_CACHED].prot_pte |= L_PTE_SHARED;
|
mem_types[MT_DEVICE_CACHED].prot_pte |= L_PTE_SHARED;
|
||||||
mem_types[MT_MEMORY].prot_sect |= PMD_SECT_S;
|
mem_types[MT_MEMORY].prot_sect |= PMD_SECT_S;
|
||||||
|
mem_types[MT_MEMORY].prot_pte |= L_PTE_SHARED;
|
||||||
mem_types[MT_MEMORY_NONCACHED].prot_sect |= PMD_SECT_S;
|
mem_types[MT_MEMORY_NONCACHED].prot_sect |= PMD_SECT_S;
|
||||||
|
mem_types[MT_MEMORY_NONCACHED].prot_pte |= L_PTE_SHARED;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -475,6 +487,8 @@ static void __init build_mem_type_table(void)
|
||||||
mem_types[MT_LOW_VECTORS].prot_l1 |= ecc_mask;
|
mem_types[MT_LOW_VECTORS].prot_l1 |= ecc_mask;
|
||||||
mem_types[MT_HIGH_VECTORS].prot_l1 |= ecc_mask;
|
mem_types[MT_HIGH_VECTORS].prot_l1 |= ecc_mask;
|
||||||
mem_types[MT_MEMORY].prot_sect |= ecc_mask | cp->pmd;
|
mem_types[MT_MEMORY].prot_sect |= ecc_mask | cp->pmd;
|
||||||
|
mem_types[MT_MEMORY].prot_pte |= kern_pgprot;
|
||||||
|
mem_types[MT_MEMORY_NONCACHED].prot_sect |= ecc_mask;
|
||||||
mem_types[MT_ROM].prot_sect |= cp->pmd;
|
mem_types[MT_ROM].prot_sect |= cp->pmd;
|
||||||
|
|
||||||
switch (cp->pmd) {
|
switch (cp->pmd) {
|
||||||
|
@ -498,6 +512,19 @@ static void __init build_mem_type_table(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_ARM_DMA_MEM_BUFFERABLE
|
||||||
|
pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
|
||||||
|
unsigned long size, pgprot_t vma_prot)
|
||||||
|
{
|
||||||
|
if (!pfn_valid(pfn))
|
||||||
|
return pgprot_noncached(vma_prot);
|
||||||
|
else if (file->f_flags & O_SYNC)
|
||||||
|
return pgprot_writecombine(vma_prot);
|
||||||
|
return vma_prot;
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(phys_mem_access_prot);
|
||||||
|
#endif
|
||||||
|
|
||||||
#define vectors_base() (vectors_high() ? 0xffff0000 : 0)
|
#define vectors_base() (vectors_high() ? 0xffff0000 : 0)
|
||||||
|
|
||||||
static void __init *early_alloc(unsigned long sz)
|
static void __init *early_alloc(unsigned long sz)
|
||||||
|
|
|
@ -186,13 +186,14 @@ cpu_v7_name:
|
||||||
* It is assumed that:
|
* It is assumed that:
|
||||||
* - cache type register is implemented
|
* - cache type register is implemented
|
||||||
*/
|
*/
|
||||||
__v7_setup:
|
__v7_ca9mp_setup:
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
mrc p15, 0, r0, c1, c0, 1
|
mrc p15, 0, r0, c1, c0, 1
|
||||||
tst r0, #(1 << 6) @ SMP/nAMP mode enabled?
|
tst r0, #(1 << 6) @ SMP/nAMP mode enabled?
|
||||||
orreq r0, r0, #(1 << 6) | (1 << 0) @ Enable SMP/nAMP mode and
|
orreq r0, r0, #(1 << 6) | (1 << 0) @ Enable SMP/nAMP mode and
|
||||||
mcreq p15, 0, r0, c1, c0, 1 @ TLB ops broadcasting
|
mcreq p15, 0, r0, c1, c0, 1 @ TLB ops broadcasting
|
||||||
#endif
|
#endif
|
||||||
|
__v7_setup:
|
||||||
adr r12, __v7_setup_stack @ the local stack
|
adr r12, __v7_setup_stack @ the local stack
|
||||||
stmia r12, {r0-r5, r7, r9, r11, lr}
|
stmia r12, {r0-r5, r7, r9, r11, lr}
|
||||||
bl v7_flush_dcache_all
|
bl v7_flush_dcache_all
|
||||||
|
@ -201,11 +202,16 @@ __v7_setup:
|
||||||
mrc p15, 0, r0, c0, c0, 0 @ read main ID register
|
mrc p15, 0, r0, c0, c0, 0 @ read main ID register
|
||||||
and r10, r0, #0xff000000 @ ARM?
|
and r10, r0, #0xff000000 @ ARM?
|
||||||
teq r10, #0x41000000
|
teq r10, #0x41000000
|
||||||
bne 2f
|
bne 3f
|
||||||
and r5, r0, #0x00f00000 @ variant
|
and r5, r0, #0x00f00000 @ variant
|
||||||
and r6, r0, #0x0000000f @ revision
|
and r6, r0, #0x0000000f @ revision
|
||||||
orr r0, r6, r5, lsr #20-4 @ combine variant and revision
|
orr r6, r6, r5, lsr #20-4 @ combine variant and revision
|
||||||
|
ubfx r0, r0, #4, #12 @ primary part number
|
||||||
|
|
||||||
|
/* Cortex-A8 Errata */
|
||||||
|
ldr r10, =0x00000c08 @ Cortex-A8 primary part number
|
||||||
|
teq r0, r10
|
||||||
|
bne 2f
|
||||||
#ifdef CONFIG_ARM_ERRATA_430973
|
#ifdef CONFIG_ARM_ERRATA_430973
|
||||||
teq r5, #0x00100000 @ only present in r1p*
|
teq r5, #0x00100000 @ only present in r1p*
|
||||||
mrceq p15, 0, r10, c1, c0, 1 @ read aux control register
|
mrceq p15, 0, r10, c1, c0, 1 @ read aux control register
|
||||||
|
@ -213,21 +219,42 @@ __v7_setup:
|
||||||
mcreq p15, 0, r10, c1, c0, 1 @ write aux control register
|
mcreq p15, 0, r10, c1, c0, 1 @ write aux control register
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_ARM_ERRATA_458693
|
#ifdef CONFIG_ARM_ERRATA_458693
|
||||||
teq r0, #0x20 @ only present in r2p0
|
teq r6, #0x20 @ only present in r2p0
|
||||||
mrceq p15, 0, r10, c1, c0, 1 @ read aux control register
|
mrceq p15, 0, r10, c1, c0, 1 @ read aux control register
|
||||||
orreq r10, r10, #(1 << 5) @ set L1NEON to 1
|
orreq r10, r10, #(1 << 5) @ set L1NEON to 1
|
||||||
orreq r10, r10, #(1 << 9) @ set PLDNOP to 1
|
orreq r10, r10, #(1 << 9) @ set PLDNOP to 1
|
||||||
mcreq p15, 0, r10, c1, c0, 1 @ write aux control register
|
mcreq p15, 0, r10, c1, c0, 1 @ write aux control register
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_ARM_ERRATA_460075
|
#ifdef CONFIG_ARM_ERRATA_460075
|
||||||
teq r0, #0x20 @ only present in r2p0
|
teq r6, #0x20 @ only present in r2p0
|
||||||
mrceq p15, 1, r10, c9, c0, 2 @ read L2 cache aux ctrl register
|
mrceq p15, 1, r10, c9, c0, 2 @ read L2 cache aux ctrl register
|
||||||
tsteq r10, #1 << 22
|
tsteq r10, #1 << 22
|
||||||
orreq r10, r10, #(1 << 22) @ set the Write Allocate disable bit
|
orreq r10, r10, #(1 << 22) @ set the Write Allocate disable bit
|
||||||
mcreq p15, 1, r10, c9, c0, 2 @ write the L2 cache aux ctrl register
|
mcreq p15, 1, r10, c9, c0, 2 @ write the L2 cache aux ctrl register
|
||||||
#endif
|
#endif
|
||||||
|
b 3f
|
||||||
|
|
||||||
2: mov r10, #0
|
/* Cortex-A9 Errata */
|
||||||
|
2: ldr r10, =0x00000c09 @ Cortex-A9 primary part number
|
||||||
|
teq r0, r10
|
||||||
|
bne 3f
|
||||||
|
#ifdef CONFIG_ARM_ERRATA_742230
|
||||||
|
cmp r6, #0x22 @ only present up to r2p2
|
||||||
|
mrcle p15, 0, r10, c15, c0, 1 @ read diagnostic register
|
||||||
|
orrle r10, r10, #1 << 4 @ set bit #4
|
||||||
|
mcrle p15, 0, r10, c15, c0, 1 @ write diagnostic register
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_ARM_ERRATA_742231
|
||||||
|
teq r6, #0x20 @ present in r2p0
|
||||||
|
teqne r6, #0x21 @ present in r2p1
|
||||||
|
teqne r6, #0x22 @ present in r2p2
|
||||||
|
mrceq p15, 0, r10, c15, c0, 1 @ read diagnostic register
|
||||||
|
orreq r10, r10, #1 << 12 @ set bit #12
|
||||||
|
orreq r10, r10, #1 << 22 @ set bit #22
|
||||||
|
mcreq p15, 0, r10, c15, c0, 1 @ write diagnostic register
|
||||||
|
#endif
|
||||||
|
|
||||||
|
3: mov r10, #0
|
||||||
#ifdef HARVARD_CACHE
|
#ifdef HARVARD_CACHE
|
||||||
mcr p15, 0, r10, c7, c5, 0 @ I+BTB cache invalidate
|
mcr p15, 0, r10, c7, c5, 0 @ I+BTB cache invalidate
|
||||||
#endif
|
#endif
|
||||||
|
@ -323,6 +350,29 @@ cpu_elf_name:
|
||||||
|
|
||||||
.section ".proc.info.init", #alloc, #execinstr
|
.section ".proc.info.init", #alloc, #execinstr
|
||||||
|
|
||||||
|
.type __v7_ca9mp_proc_info, #object
|
||||||
|
__v7_ca9mp_proc_info:
|
||||||
|
.long 0x410fc090 @ Required ID value
|
||||||
|
.long 0xff0ffff0 @ Mask for ID
|
||||||
|
.long PMD_TYPE_SECT | \
|
||||||
|
PMD_SECT_AP_WRITE | \
|
||||||
|
PMD_SECT_AP_READ | \
|
||||||
|
PMD_FLAGS
|
||||||
|
.long PMD_TYPE_SECT | \
|
||||||
|
PMD_SECT_XN | \
|
||||||
|
PMD_SECT_AP_WRITE | \
|
||||||
|
PMD_SECT_AP_READ
|
||||||
|
b __v7_ca9mp_setup
|
||||||
|
.long cpu_arch_name
|
||||||
|
.long cpu_elf_name
|
||||||
|
.long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP
|
||||||
|
.long cpu_v7_name
|
||||||
|
.long v7_processor_functions
|
||||||
|
.long v7wbi_tlb_fns
|
||||||
|
.long v6_user_fns
|
||||||
|
.long v7_cache_fns
|
||||||
|
.size __v7_ca9mp_proc_info, . - __v7_ca9mp_proc_info
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Match any ARMv7 processor core.
|
* Match any ARMv7 processor core.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* linux/arch/arm/mach-nomadik/timer.c
|
* linux/arch/arm/plat-nomadik/timer.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008 STMicroelectronics
|
* Copyright (C) 2008 STMicroelectronics
|
||||||
* Copyright (C) 2010 Alessandro Rubini
|
* Copyright (C) 2010 Alessandro Rubini
|
||||||
|
@ -75,7 +75,7 @@ static void nmdk_clkevt_mode(enum clock_event_mode mode,
|
||||||
cr = readl(mtu_base + MTU_CR(1));
|
cr = readl(mtu_base + MTU_CR(1));
|
||||||
writel(0, mtu_base + MTU_LR(1));
|
writel(0, mtu_base + MTU_LR(1));
|
||||||
writel(cr | MTU_CRn_ENA, mtu_base + MTU_CR(1));
|
writel(cr | MTU_CRn_ENA, mtu_base + MTU_CR(1));
|
||||||
writel(0x2, mtu_base + MTU_IMSC);
|
writel(1 << 1, mtu_base + MTU_IMSC);
|
||||||
break;
|
break;
|
||||||
case CLOCK_EVT_MODE_SHUTDOWN:
|
case CLOCK_EVT_MODE_SHUTDOWN:
|
||||||
case CLOCK_EVT_MODE_UNUSED:
|
case CLOCK_EVT_MODE_UNUSED:
|
||||||
|
@ -131,25 +131,23 @@ void __init nmdk_timer_init(void)
|
||||||
{
|
{
|
||||||
unsigned long rate;
|
unsigned long rate;
|
||||||
struct clk *clk0;
|
struct clk *clk0;
|
||||||
struct clk *clk1;
|
u32 cr = MTU_CRn_32BITS;
|
||||||
u32 cr;
|
|
||||||
|
|
||||||
clk0 = clk_get_sys("mtu0", NULL);
|
clk0 = clk_get_sys("mtu0", NULL);
|
||||||
BUG_ON(IS_ERR(clk0));
|
BUG_ON(IS_ERR(clk0));
|
||||||
|
|
||||||
clk1 = clk_get_sys("mtu1", NULL);
|
|
||||||
BUG_ON(IS_ERR(clk1));
|
|
||||||
|
|
||||||
clk_enable(clk0);
|
clk_enable(clk0);
|
||||||
clk_enable(clk1);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Tick rate is 2.4MHz for Nomadik and 110MHz for ux500:
|
* Tick rate is 2.4MHz for Nomadik and 2.4Mhz, 100MHz or 133 MHz
|
||||||
* use a divide-by-16 counter if it's more than 16MHz
|
* for ux500.
|
||||||
|
* Use a divide-by-16 counter if the tick rate is more than 32MHz.
|
||||||
|
* At 32 MHz, the timer (with 32 bit counter) can be programmed
|
||||||
|
* to wake-up at a max 127s a head in time. Dividing a 2.4 MHz timer
|
||||||
|
* with 16 gives too low timer resolution.
|
||||||
*/
|
*/
|
||||||
cr = MTU_CRn_32BITS;;
|
|
||||||
rate = clk_get_rate(clk0);
|
rate = clk_get_rate(clk0);
|
||||||
if (rate > 16 << 20) {
|
if (rate > 32000000) {
|
||||||
rate /= 16;
|
rate /= 16;
|
||||||
cr |= MTU_CRn_PRESCALE_16;
|
cr |= MTU_CRn_PRESCALE_16;
|
||||||
} else {
|
} else {
|
||||||
|
@ -170,15 +168,8 @@ void __init nmdk_timer_init(void)
|
||||||
pr_err("timer: failed to initialize clock source %s\n",
|
pr_err("timer: failed to initialize clock source %s\n",
|
||||||
nmdk_clksrc.name);
|
nmdk_clksrc.name);
|
||||||
|
|
||||||
/* Timer 1 is used for events, fix according to rate */
|
/* Timer 1 is used for events */
|
||||||
cr = MTU_CRn_32BITS;
|
|
||||||
rate = clk_get_rate(clk1);
|
|
||||||
if (rate > 16 << 20) {
|
|
||||||
rate /= 16;
|
|
||||||
cr |= MTU_CRn_PRESCALE_16;
|
|
||||||
} else {
|
|
||||||
cr |= MTU_CRn_PRESCALE_1;
|
|
||||||
}
|
|
||||||
clockevents_calc_mult_shift(&nmdk_clkevt, rate, MTU_MIN_RANGE);
|
clockevents_calc_mult_shift(&nmdk_clkevt, rate, MTU_MIN_RANGE);
|
||||||
|
|
||||||
writel(cr | MTU_CRn_ONESHOT, mtu_base + MTU_CR(1)); /* off, currently */
|
writel(cr | MTU_CRn_ONESHOT, mtu_base + MTU_CR(1)); /* off, currently */
|
||||||
|
|
|
@ -220,20 +220,7 @@ void __init omap_map_sram(void)
|
||||||
if (omap_sram_size == 0)
|
if (omap_sram_size == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (cpu_is_omap24xx()) {
|
|
||||||
omap_sram_io_desc[0].virtual = OMAP2_SRAM_VA;
|
|
||||||
|
|
||||||
base = OMAP2_SRAM_PA;
|
|
||||||
base = ROUND_DOWN(base, PAGE_SIZE);
|
|
||||||
omap_sram_io_desc[0].pfn = __phys_to_pfn(base);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cpu_is_omap34xx()) {
|
if (cpu_is_omap34xx()) {
|
||||||
omap_sram_io_desc[0].virtual = OMAP3_SRAM_VA;
|
|
||||||
base = OMAP3_SRAM_PA;
|
|
||||||
base = ROUND_DOWN(base, PAGE_SIZE);
|
|
||||||
omap_sram_io_desc[0].pfn = __phys_to_pfn(base);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* SRAM must be marked as non-cached on OMAP3 since the
|
* SRAM must be marked as non-cached on OMAP3 since the
|
||||||
* CORE DPLL M2 divider change code (in SRAM) runs with the
|
* CORE DPLL M2 divider change code (in SRAM) runs with the
|
||||||
|
@ -244,13 +231,11 @@ void __init omap_map_sram(void)
|
||||||
omap_sram_io_desc[0].type = MT_MEMORY_NONCACHED;
|
omap_sram_io_desc[0].type = MT_MEMORY_NONCACHED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cpu_is_omap44xx()) {
|
omap_sram_io_desc[0].virtual = omap_sram_base;
|
||||||
omap_sram_io_desc[0].virtual = OMAP4_SRAM_VA;
|
base = omap_sram_start;
|
||||||
base = OMAP4_SRAM_PA;
|
|
||||||
base = ROUND_DOWN(base, PAGE_SIZE);
|
base = ROUND_DOWN(base, PAGE_SIZE);
|
||||||
omap_sram_io_desc[0].pfn = __phys_to_pfn(base);
|
omap_sram_io_desc[0].pfn = __phys_to_pfn(base);
|
||||||
}
|
omap_sram_io_desc[0].length = ROUND_DOWN(omap_sram_size, PAGE_SIZE);
|
||||||
omap_sram_io_desc[0].length = 1024 * 1024; /* Use section desc */
|
|
||||||
iotable_init(omap_sram_io_desc, ARRAY_SIZE(omap_sram_io_desc));
|
iotable_init(omap_sram_io_desc, ARRAY_SIZE(omap_sram_io_desc));
|
||||||
|
|
||||||
printk(KERN_INFO "SRAM: Mapped pa 0x%08lx to va 0x%08lx size: 0x%lx\n",
|
printk(KERN_INFO "SRAM: Mapped pa 0x%08lx to va 0x%08lx size: 0x%lx\n",
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
|
#include <linux/dma-mapping.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/ioport.h>
|
#include <linux/ioport.h>
|
||||||
|
@ -18,7 +19,7 @@
|
||||||
static struct resource s5p_fimc0_resource[] = {
|
static struct resource s5p_fimc0_resource[] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
.start = S5P_PA_FIMC0,
|
.start = S5P_PA_FIMC0,
|
||||||
.end = S5P_PA_FIMC0 + SZ_1M - 1,
|
.end = S5P_PA_FIMC0 + SZ_4K - 1,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
[1] = {
|
[1] = {
|
||||||
|
@ -28,9 +29,15 @@ static struct resource s5p_fimc0_resource[] = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static u64 s5p_fimc0_dma_mask = DMA_BIT_MASK(32);
|
||||||
|
|
||||||
struct platform_device s5p_device_fimc0 = {
|
struct platform_device s5p_device_fimc0 = {
|
||||||
.name = "s5p-fimc",
|
.name = "s5p-fimc",
|
||||||
.id = 0,
|
.id = 0,
|
||||||
.num_resources = ARRAY_SIZE(s5p_fimc0_resource),
|
.num_resources = ARRAY_SIZE(s5p_fimc0_resource),
|
||||||
.resource = s5p_fimc0_resource,
|
.resource = s5p_fimc0_resource,
|
||||||
|
.dev = {
|
||||||
|
.dma_mask = &s5p_fimc0_dma_mask,
|
||||||
|
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
|
#include <linux/dma-mapping.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/ioport.h>
|
#include <linux/ioport.h>
|
||||||
|
@ -18,7 +19,7 @@
|
||||||
static struct resource s5p_fimc1_resource[] = {
|
static struct resource s5p_fimc1_resource[] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
.start = S5P_PA_FIMC1,
|
.start = S5P_PA_FIMC1,
|
||||||
.end = S5P_PA_FIMC1 + SZ_1M - 1,
|
.end = S5P_PA_FIMC1 + SZ_4K - 1,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
[1] = {
|
[1] = {
|
||||||
|
@ -28,9 +29,15 @@ static struct resource s5p_fimc1_resource[] = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static u64 s5p_fimc1_dma_mask = DMA_BIT_MASK(32);
|
||||||
|
|
||||||
struct platform_device s5p_device_fimc1 = {
|
struct platform_device s5p_device_fimc1 = {
|
||||||
.name = "s5p-fimc",
|
.name = "s5p-fimc",
|
||||||
.id = 1,
|
.id = 1,
|
||||||
.num_resources = ARRAY_SIZE(s5p_fimc1_resource),
|
.num_resources = ARRAY_SIZE(s5p_fimc1_resource),
|
||||||
.resource = s5p_fimc1_resource,
|
.resource = s5p_fimc1_resource,
|
||||||
|
.dev = {
|
||||||
|
.dma_mask = &s5p_fimc1_dma_mask,
|
||||||
|
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
|
#include <linux/dma-mapping.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/ioport.h>
|
#include <linux/ioport.h>
|
||||||
|
@ -18,7 +19,7 @@
|
||||||
static struct resource s5p_fimc2_resource[] = {
|
static struct resource s5p_fimc2_resource[] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
.start = S5P_PA_FIMC2,
|
.start = S5P_PA_FIMC2,
|
||||||
.end = S5P_PA_FIMC2 + SZ_1M - 1,
|
.end = S5P_PA_FIMC2 + SZ_4K - 1,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
[1] = {
|
[1] = {
|
||||||
|
@ -28,9 +29,15 @@ static struct resource s5p_fimc2_resource[] = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static u64 s5p_fimc2_dma_mask = DMA_BIT_MASK(32);
|
||||||
|
|
||||||
struct platform_device s5p_device_fimc2 = {
|
struct platform_device s5p_device_fimc2 = {
|
||||||
.name = "s5p-fimc",
|
.name = "s5p-fimc",
|
||||||
.id = 2,
|
.id = 2,
|
||||||
.num_resources = ARRAY_SIZE(s5p_fimc2_resource),
|
.num_resources = ARRAY_SIZE(s5p_fimc2_resource),
|
||||||
.resource = s5p_fimc2_resource,
|
.resource = s5p_fimc2_resource,
|
||||||
|
.dev = {
|
||||||
|
.dma_mask = &s5p_fimc2_dma_mask,
|
||||||
|
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -273,13 +273,13 @@ s5p_gpio_drvstr_t s5p_gpio_get_drvstr(unsigned int pin)
|
||||||
if (!chip)
|
if (!chip)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
off = chip->chip.base - pin;
|
off = pin - chip->chip.base;
|
||||||
shift = off * 2;
|
shift = off * 2;
|
||||||
reg = chip->base + 0x0C;
|
reg = chip->base + 0x0C;
|
||||||
|
|
||||||
drvstr = __raw_readl(reg);
|
drvstr = __raw_readl(reg);
|
||||||
drvstr = 0xffff & (0x3 << shift);
|
|
||||||
drvstr = drvstr >> shift;
|
drvstr = drvstr >> shift;
|
||||||
|
drvstr &= 0x3;
|
||||||
|
|
||||||
return (__force s5p_gpio_drvstr_t)drvstr;
|
return (__force s5p_gpio_drvstr_t)drvstr;
|
||||||
}
|
}
|
||||||
|
@ -296,11 +296,12 @@ int s5p_gpio_set_drvstr(unsigned int pin, s5p_gpio_drvstr_t drvstr)
|
||||||
if (!chip)
|
if (!chip)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
off = chip->chip.base - pin;
|
off = pin - chip->chip.base;
|
||||||
shift = off * 2;
|
shift = off * 2;
|
||||||
reg = chip->base + 0x0C;
|
reg = chip->base + 0x0C;
|
||||||
|
|
||||||
tmp = __raw_readl(reg);
|
tmp = __raw_readl(reg);
|
||||||
|
tmp &= ~(0x3 << shift);
|
||||||
tmp |= drvstr << shift;
|
tmp |= drvstr << shift;
|
||||||
|
|
||||||
__raw_writel(tmp, reg);
|
__raw_writel(tmp, reg);
|
||||||
|
|
|
@ -143,12 +143,12 @@ extern s3c_gpio_pull_t s3c_gpio_getpull(unsigned int pin);
|
||||||
/* Define values for the drvstr available for each gpio pin.
|
/* Define values for the drvstr available for each gpio pin.
|
||||||
*
|
*
|
||||||
* These values control the value of the output signal driver strength,
|
* These values control the value of the output signal driver strength,
|
||||||
* configurable on most pins on the S5C series.
|
* configurable on most pins on the S5P series.
|
||||||
*/
|
*/
|
||||||
#define S5P_GPIO_DRVSTR_LV1 ((__force s5p_gpio_drvstr_t)0x00)
|
#define S5P_GPIO_DRVSTR_LV1 ((__force s5p_gpio_drvstr_t)0x0)
|
||||||
#define S5P_GPIO_DRVSTR_LV2 ((__force s5p_gpio_drvstr_t)0x01)
|
#define S5P_GPIO_DRVSTR_LV2 ((__force s5p_gpio_drvstr_t)0x2)
|
||||||
#define S5P_GPIO_DRVSTR_LV3 ((__force s5p_gpio_drvstr_t)0x10)
|
#define S5P_GPIO_DRVSTR_LV3 ((__force s5p_gpio_drvstr_t)0x1)
|
||||||
#define S5P_GPIO_DRVSTR_LV4 ((__force s5p_gpio_drvstr_t)0x11)
|
#define S5P_GPIO_DRVSTR_LV4 ((__force s5p_gpio_drvstr_t)0x3)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* s5c_gpio_get_drvstr() - get the driver streght value of a gpio pin
|
* s5c_gpio_get_drvstr() - get the driver streght value of a gpio pin
|
||||||
|
|
|
@ -121,6 +121,9 @@ static int restore_sigcontext(struct sigcontext __user *sc, int *_gr8)
|
||||||
struct user_context *user = current->thread.user;
|
struct user_context *user = current->thread.user;
|
||||||
unsigned long tbr, psr;
|
unsigned long tbr, psr;
|
||||||
|
|
||||||
|
/* Always make any pending restarted system calls return -EINTR */
|
||||||
|
current_thread_info()->restart_block.fn = do_no_restart_syscall;
|
||||||
|
|
||||||
tbr = user->i.tbr;
|
tbr = user->i.tbr;
|
||||||
psr = user->i.psr;
|
psr = user->i.psr;
|
||||||
if (copy_from_user(user, &sc->sc_context, sizeof(sc->sc_context)))
|
if (copy_from_user(user, &sc->sc_context, sizeof(sc->sc_context)))
|
||||||
|
@ -250,6 +253,8 @@ static int setup_frame(int sig, struct k_sigaction *ka, sigset_t *set)
|
||||||
struct sigframe __user *frame;
|
struct sigframe __user *frame;
|
||||||
int rsig;
|
int rsig;
|
||||||
|
|
||||||
|
set_fs(USER_DS);
|
||||||
|
|
||||||
frame = get_sigframe(ka, sizeof(*frame));
|
frame = get_sigframe(ka, sizeof(*frame));
|
||||||
|
|
||||||
if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
|
if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
|
||||||
|
@ -293,22 +298,23 @@ static int setup_frame(int sig, struct k_sigaction *ka, sigset_t *set)
|
||||||
(unsigned long) (frame->retcode + 2));
|
(unsigned long) (frame->retcode + 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set up registers for signal handler */
|
/* Set up registers for the signal handler */
|
||||||
__frame->sp = (unsigned long) frame;
|
|
||||||
__frame->lr = (unsigned long) &frame->retcode;
|
|
||||||
__frame->gr8 = sig;
|
|
||||||
|
|
||||||
if (current->personality & FDPIC_FUNCPTRS) {
|
if (current->personality & FDPIC_FUNCPTRS) {
|
||||||
struct fdpic_func_descriptor __user *funcptr =
|
struct fdpic_func_descriptor __user *funcptr =
|
||||||
(struct fdpic_func_descriptor __user *) ka->sa.sa_handler;
|
(struct fdpic_func_descriptor __user *) ka->sa.sa_handler;
|
||||||
__get_user(__frame->pc, &funcptr->text);
|
struct fdpic_func_descriptor desc;
|
||||||
__get_user(__frame->gr15, &funcptr->GOT);
|
if (copy_from_user(&desc, funcptr, sizeof(desc)))
|
||||||
|
goto give_sigsegv;
|
||||||
|
__frame->pc = desc.text;
|
||||||
|
__frame->gr15 = desc.GOT;
|
||||||
} else {
|
} else {
|
||||||
__frame->pc = (unsigned long) ka->sa.sa_handler;
|
__frame->pc = (unsigned long) ka->sa.sa_handler;
|
||||||
__frame->gr15 = 0;
|
__frame->gr15 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_fs(USER_DS);
|
__frame->sp = (unsigned long) frame;
|
||||||
|
__frame->lr = (unsigned long) &frame->retcode;
|
||||||
|
__frame->gr8 = sig;
|
||||||
|
|
||||||
/* the tracer may want to single-step inside the handler */
|
/* the tracer may want to single-step inside the handler */
|
||||||
if (test_thread_flag(TIF_SINGLESTEP))
|
if (test_thread_flag(TIF_SINGLESTEP))
|
||||||
|
@ -323,7 +329,7 @@ static int setup_frame(int sig, struct k_sigaction *ka, sigset_t *set)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
give_sigsegv:
|
give_sigsegv:
|
||||||
force_sig(SIGSEGV, current);
|
force_sigsegv(sig, current);
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
} /* end setup_frame() */
|
} /* end setup_frame() */
|
||||||
|
@ -338,6 +344,8 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
|
||||||
struct rt_sigframe __user *frame;
|
struct rt_sigframe __user *frame;
|
||||||
int rsig;
|
int rsig;
|
||||||
|
|
||||||
|
set_fs(USER_DS);
|
||||||
|
|
||||||
frame = get_sigframe(ka, sizeof(*frame));
|
frame = get_sigframe(ka, sizeof(*frame));
|
||||||
|
|
||||||
if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
|
if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
|
||||||
|
@ -392,22 +400,23 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set up registers for signal handler */
|
/* Set up registers for signal handler */
|
||||||
__frame->sp = (unsigned long) frame;
|
|
||||||
__frame->lr = (unsigned long) &frame->retcode;
|
|
||||||
__frame->gr8 = sig;
|
|
||||||
__frame->gr9 = (unsigned long) &frame->info;
|
|
||||||
|
|
||||||
if (current->personality & FDPIC_FUNCPTRS) {
|
if (current->personality & FDPIC_FUNCPTRS) {
|
||||||
struct fdpic_func_descriptor __user *funcptr =
|
struct fdpic_func_descriptor __user *funcptr =
|
||||||
(struct fdpic_func_descriptor __user *) ka->sa.sa_handler;
|
(struct fdpic_func_descriptor __user *) ka->sa.sa_handler;
|
||||||
__get_user(__frame->pc, &funcptr->text);
|
struct fdpic_func_descriptor desc;
|
||||||
__get_user(__frame->gr15, &funcptr->GOT);
|
if (copy_from_user(&desc, funcptr, sizeof(desc)))
|
||||||
|
goto give_sigsegv;
|
||||||
|
__frame->pc = desc.text;
|
||||||
|
__frame->gr15 = desc.GOT;
|
||||||
} else {
|
} else {
|
||||||
__frame->pc = (unsigned long) ka->sa.sa_handler;
|
__frame->pc = (unsigned long) ka->sa.sa_handler;
|
||||||
__frame->gr15 = 0;
|
__frame->gr15 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_fs(USER_DS);
|
__frame->sp = (unsigned long) frame;
|
||||||
|
__frame->lr = (unsigned long) &frame->retcode;
|
||||||
|
__frame->gr8 = sig;
|
||||||
|
__frame->gr9 = (unsigned long) &frame->info;
|
||||||
|
|
||||||
/* the tracer may want to single-step inside the handler */
|
/* the tracer may want to single-step inside the handler */
|
||||||
if (test_thread_flag(TIF_SINGLESTEP))
|
if (test_thread_flag(TIF_SINGLESTEP))
|
||||||
|
@ -422,7 +431,7 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
give_sigsegv:
|
give_sigsegv:
|
||||||
force_sig(SIGSEGV, current);
|
force_sigsegv(sig, current);
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
} /* end setup_rt_frame() */
|
} /* end setup_rt_frame() */
|
||||||
|
@ -437,7 +446,7 @@ static int handle_signal(unsigned long sig, siginfo_t *info,
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
/* Are we from a system call? */
|
/* Are we from a system call? */
|
||||||
if (in_syscall(__frame)) {
|
if (__frame->syscallno != -1) {
|
||||||
/* If so, check system call restarting.. */
|
/* If so, check system call restarting.. */
|
||||||
switch (__frame->gr8) {
|
switch (__frame->gr8) {
|
||||||
case -ERESTART_RESTARTBLOCK:
|
case -ERESTART_RESTARTBLOCK:
|
||||||
|
@ -456,6 +465,7 @@ static int handle_signal(unsigned long sig, siginfo_t *info,
|
||||||
__frame->gr8 = __frame->orig_gr8;
|
__frame->gr8 = __frame->orig_gr8;
|
||||||
__frame->pc -= 4;
|
__frame->pc -= 4;
|
||||||
}
|
}
|
||||||
|
__frame->syscallno = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set up the stack frame */
|
/* Set up the stack frame */
|
||||||
|
@ -538,10 +548,11 @@ no_signal:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case -ERESTART_RESTARTBLOCK:
|
case -ERESTART_RESTARTBLOCK:
|
||||||
__frame->gr8 = __NR_restart_syscall;
|
__frame->gr7 = __NR_restart_syscall;
|
||||||
__frame->pc -= 4;
|
__frame->pc -= 4;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
__frame->syscallno = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if there's no signal to deliver, we just put the saved sigmask
|
/* if there's no signal to deliver, we just put the saved sigmask
|
||||||
|
|
|
@ -157,7 +157,6 @@ typedef struct sigaltstack {
|
||||||
#undef __HAVE_ARCH_SIG_BITOPS
|
#undef __HAVE_ARCH_SIG_BITOPS
|
||||||
|
|
||||||
struct pt_regs;
|
struct pt_regs;
|
||||||
extern int do_signal(struct pt_regs *regs, sigset_t *oldset);
|
|
||||||
|
|
||||||
#define ptrace_signal_deliver(regs, cookie) do { } while (0)
|
#define ptrace_signal_deliver(regs, cookie) do { } while (0)
|
||||||
|
|
||||||
|
|
|
@ -351,6 +351,7 @@
|
||||||
#define __ARCH_WANT_SYS_OLD_GETRLIMIT /*will be unused*/
|
#define __ARCH_WANT_SYS_OLD_GETRLIMIT /*will be unused*/
|
||||||
#define __ARCH_WANT_SYS_OLDUMOUNT
|
#define __ARCH_WANT_SYS_OLDUMOUNT
|
||||||
#define __ARCH_WANT_SYS_RT_SIGACTION
|
#define __ARCH_WANT_SYS_RT_SIGACTION
|
||||||
|
#define __ARCH_WANT_SYS_RT_SIGSUSPEND
|
||||||
|
|
||||||
#define __IGNORE_lchown
|
#define __IGNORE_lchown
|
||||||
#define __IGNORE_setuid
|
#define __IGNORE_setuid
|
||||||
|
|
|
@ -235,10 +235,9 @@ work_resched:
|
||||||
work_notifysig: ; deal with pending signals and
|
work_notifysig: ; deal with pending signals and
|
||||||
; notify-resume requests
|
; notify-resume requests
|
||||||
mv r0, sp ; arg1 : struct pt_regs *regs
|
mv r0, sp ; arg1 : struct pt_regs *regs
|
||||||
ldi r1, #0 ; arg2 : sigset_t *oldset
|
mv r1, r9 ; arg2 : __u32 thread_info_flags
|
||||||
mv r2, r9 ; arg3 : __u32 thread_info_flags
|
|
||||||
bl do_notify_resume
|
bl do_notify_resume
|
||||||
bra restore_all
|
bra resume_userspace
|
||||||
|
|
||||||
; perform syscall exit tracing
|
; perform syscall exit tracing
|
||||||
ALIGN
|
ALIGN
|
||||||
|
|
|
@ -592,16 +592,17 @@ void user_enable_single_step(struct task_struct *child)
|
||||||
|
|
||||||
if (access_process_vm(child, pc&~3, &insn, sizeof(insn), 0)
|
if (access_process_vm(child, pc&~3, &insn, sizeof(insn), 0)
|
||||||
!= sizeof(insn))
|
!= sizeof(insn))
|
||||||
break;
|
return -EIO;
|
||||||
|
|
||||||
compute_next_pc(insn, pc, &next_pc, child);
|
compute_next_pc(insn, pc, &next_pc, child);
|
||||||
if (next_pc & 0x80000000)
|
if (next_pc & 0x80000000)
|
||||||
break;
|
return -EIO;
|
||||||
|
|
||||||
if (embed_debug_trap(child, next_pc))
|
if (embed_debug_trap(child, next_pc))
|
||||||
break;
|
return -EIO;
|
||||||
|
|
||||||
invalidate_cache();
|
invalidate_cache();
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void user_disable_single_step(struct task_struct *child)
|
void user_disable_single_step(struct task_struct *child)
|
||||||
|
|
|
@ -28,37 +28,6 @@
|
||||||
|
|
||||||
#define DEBUG_SIG 0
|
#define DEBUG_SIG 0
|
||||||
|
|
||||||
#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
|
|
||||||
|
|
||||||
int do_signal(struct pt_regs *, sigset_t *);
|
|
||||||
|
|
||||||
asmlinkage int
|
|
||||||
sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize,
|
|
||||||
unsigned long r2, unsigned long r3, unsigned long r4,
|
|
||||||
unsigned long r5, unsigned long r6, struct pt_regs *regs)
|
|
||||||
{
|
|
||||||
sigset_t newset;
|
|
||||||
|
|
||||||
/* XXX: Don't preclude handling different sized sigset_t's. */
|
|
||||||
if (sigsetsize != sizeof(sigset_t))
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
if (copy_from_user(&newset, unewset, sizeof(newset)))
|
|
||||||
return -EFAULT;
|
|
||||||
sigdelsetmask(&newset, sigmask(SIGKILL)|sigmask(SIGSTOP));
|
|
||||||
|
|
||||||
spin_lock_irq(¤t->sighand->siglock);
|
|
||||||
current->saved_sigmask = current->blocked;
|
|
||||||
current->blocked = newset;
|
|
||||||
recalc_sigpending();
|
|
||||||
spin_unlock_irq(¤t->sighand->siglock);
|
|
||||||
|
|
||||||
current->state = TASK_INTERRUPTIBLE;
|
|
||||||
schedule();
|
|
||||||
set_thread_flag(TIF_RESTORE_SIGMASK);
|
|
||||||
return -ERESTARTNOHAND;
|
|
||||||
}
|
|
||||||
|
|
||||||
asmlinkage int
|
asmlinkage int
|
||||||
sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
|
sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
|
||||||
unsigned long r2, unsigned long r3, unsigned long r4,
|
unsigned long r2, unsigned long r3, unsigned long r4,
|
||||||
|
@ -218,7 +187,7 @@ get_sigframe(struct k_sigaction *ka, unsigned long sp, size_t frame_size)
|
||||||
return (void __user *)((sp - frame_size) & -8ul);
|
return (void __user *)((sp - frame_size) & -8ul);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
|
static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
|
||||||
sigset_t *set, struct pt_regs *regs)
|
sigset_t *set, struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
struct rt_sigframe __user *frame;
|
struct rt_sigframe __user *frame;
|
||||||
|
@ -275,22 +244,34 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
|
||||||
current->comm, current->pid, frame, regs->pc);
|
current->comm, current->pid, frame, regs->pc);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return;
|
return 0;
|
||||||
|
|
||||||
give_sigsegv:
|
give_sigsegv:
|
||||||
force_sigsegv(sig, current);
|
force_sigsegv(sig, current);
|
||||||
|
return -EFAULT;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int prev_insn(struct pt_regs *regs)
|
||||||
|
{
|
||||||
|
u16 inst;
|
||||||
|
if (get_user(&inst, (u16 __user *)(regs->bpc - 2)))
|
||||||
|
return -EFAULT;
|
||||||
|
if ((inst & 0xfff0) == 0x10f0) /* trap ? */
|
||||||
|
regs->bpc -= 2;
|
||||||
|
else
|
||||||
|
regs->bpc -= 4;
|
||||||
|
regs->syscall_nr = -1;
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* OK, we're invoking a handler
|
* OK, we're invoking a handler
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void
|
static int
|
||||||
handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
|
handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
|
||||||
sigset_t *oldset, struct pt_regs *regs)
|
sigset_t *oldset, struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
unsigned short inst;
|
|
||||||
|
|
||||||
/* Are we from a system call? */
|
/* Are we from a system call? */
|
||||||
if (regs->syscall_nr >= 0) {
|
if (regs->syscall_nr >= 0) {
|
||||||
/* If so, check system call restarting.. */
|
/* If so, check system call restarting.. */
|
||||||
|
@ -308,16 +289,14 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
|
||||||
/* fallthrough */
|
/* fallthrough */
|
||||||
case -ERESTARTNOINTR:
|
case -ERESTARTNOINTR:
|
||||||
regs->r0 = regs->orig_r0;
|
regs->r0 = regs->orig_r0;
|
||||||
inst = *(unsigned short *)(regs->bpc - 2);
|
if (prev_insn(regs) < 0)
|
||||||
if ((inst & 0xfff0) == 0x10f0) /* trap ? */
|
return -EFAULT;
|
||||||
regs->bpc -= 2;
|
|
||||||
else
|
|
||||||
regs->bpc -= 4;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set up the stack frame */
|
/* Set up the stack frame */
|
||||||
setup_rt_frame(sig, ka, info, oldset, regs);
|
if (setup_rt_frame(sig, ka, info, oldset, regs))
|
||||||
|
return -EFAULT;
|
||||||
|
|
||||||
spin_lock_irq(¤t->sighand->siglock);
|
spin_lock_irq(¤t->sighand->siglock);
|
||||||
sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask);
|
sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask);
|
||||||
|
@ -325,6 +304,7 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
|
||||||
sigaddset(¤t->blocked,sig);
|
sigaddset(¤t->blocked,sig);
|
||||||
recalc_sigpending();
|
recalc_sigpending();
|
||||||
spin_unlock_irq(¤t->sighand->siglock);
|
spin_unlock_irq(¤t->sighand->siglock);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -332,12 +312,12 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
|
||||||
* want to handle. Thus you cannot kill init even with a SIGKILL even by
|
* want to handle. Thus you cannot kill init even with a SIGKILL even by
|
||||||
* mistake.
|
* mistake.
|
||||||
*/
|
*/
|
||||||
int do_signal(struct pt_regs *regs, sigset_t *oldset)
|
static void do_signal(struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
siginfo_t info;
|
siginfo_t info;
|
||||||
int signr;
|
int signr;
|
||||||
struct k_sigaction ka;
|
struct k_sigaction ka;
|
||||||
unsigned short inst;
|
sigset_t *oldset;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We want the common case to go fast, which
|
* We want the common case to go fast, which
|
||||||
|
@ -346,12 +326,14 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset)
|
||||||
* if so.
|
* if so.
|
||||||
*/
|
*/
|
||||||
if (!user_mode(regs))
|
if (!user_mode(regs))
|
||||||
return 1;
|
return;
|
||||||
|
|
||||||
if (try_to_freeze())
|
if (try_to_freeze())
|
||||||
goto no_signal;
|
goto no_signal;
|
||||||
|
|
||||||
if (!oldset)
|
if (test_thread_flag(TIF_RESTORE_SIGMASK))
|
||||||
|
oldset = ¤t->saved_sigmask;
|
||||||
|
else
|
||||||
oldset = ¤t->blocked;
|
oldset = ¤t->blocked;
|
||||||
|
|
||||||
signr = get_signal_to_deliver(&info, &ka, regs, NULL);
|
signr = get_signal_to_deliver(&info, &ka, regs, NULL);
|
||||||
|
@ -363,8 +345,10 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Whee! Actually deliver the signal. */
|
/* Whee! Actually deliver the signal. */
|
||||||
handle_signal(signr, &ka, &info, oldset, regs);
|
if (handle_signal(signr, &ka, &info, oldset, regs) == 0)
|
||||||
return 1;
|
clear_thread_flag(TIF_RESTORE_SIGMASK);
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
no_signal:
|
no_signal:
|
||||||
|
@ -375,31 +359,24 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset)
|
||||||
regs->r0 == -ERESTARTSYS ||
|
regs->r0 == -ERESTARTSYS ||
|
||||||
regs->r0 == -ERESTARTNOINTR) {
|
regs->r0 == -ERESTARTNOINTR) {
|
||||||
regs->r0 = regs->orig_r0;
|
regs->r0 = regs->orig_r0;
|
||||||
inst = *(unsigned short *)(regs->bpc - 2);
|
prev_insn(regs);
|
||||||
if ((inst & 0xfff0) == 0x10f0) /* trap ? */
|
} else if (regs->r0 == -ERESTART_RESTARTBLOCK){
|
||||||
regs->bpc -= 2;
|
|
||||||
else
|
|
||||||
regs->bpc -= 4;
|
|
||||||
}
|
|
||||||
if (regs->r0 == -ERESTART_RESTARTBLOCK){
|
|
||||||
regs->r0 = regs->orig_r0;
|
regs->r0 = regs->orig_r0;
|
||||||
regs->r7 = __NR_restart_syscall;
|
regs->r7 = __NR_restart_syscall;
|
||||||
inst = *(unsigned short *)(regs->bpc - 2);
|
prev_insn(regs);
|
||||||
if ((inst & 0xfff0) == 0x10f0) /* trap ? */
|
|
||||||
regs->bpc -= 2;
|
|
||||||
else
|
|
||||||
regs->bpc -= 4;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
if (test_thread_flag(TIF_RESTORE_SIGMASK)) {
|
||||||
|
clear_thread_flag(TIF_RESTORE_SIGMASK);
|
||||||
|
sigprocmask(SIG_SETMASK, ¤t->saved_sigmask, NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* notification of userspace execution resumption
|
* notification of userspace execution resumption
|
||||||
* - triggered by current->work.notify_resume
|
* - triggered by current->work.notify_resume
|
||||||
*/
|
*/
|
||||||
void do_notify_resume(struct pt_regs *regs, sigset_t *oldset,
|
void do_notify_resume(struct pt_regs *regs, __u32 thread_info_flags)
|
||||||
__u32 thread_info_flags)
|
|
||||||
{
|
{
|
||||||
/* Pending single-step? */
|
/* Pending single-step? */
|
||||||
if (thread_info_flags & _TIF_SINGLESTEP)
|
if (thread_info_flags & _TIF_SINGLESTEP)
|
||||||
|
@ -407,7 +384,7 @@ void do_notify_resume(struct pt_regs *regs, sigset_t *oldset,
|
||||||
|
|
||||||
/* deal with pending signal delivery */
|
/* deal with pending signal delivery */
|
||||||
if (thread_info_flags & _TIF_SIGPENDING)
|
if (thread_info_flags & _TIF_SIGPENDING)
|
||||||
do_signal(regs,oldset);
|
do_signal(regs);
|
||||||
|
|
||||||
if (thread_info_flags & _TIF_NOTIFY_RESUME) {
|
if (thread_info_flags & _TIF_NOTIFY_RESUME) {
|
||||||
clear_thread_flag(TIF_NOTIFY_RESUME);
|
clear_thread_flag(TIF_NOTIFY_RESUME);
|
||||||
|
|
|
@ -8,7 +8,6 @@ mainmenu "Linux Kernel Configuration"
|
||||||
config MN10300
|
config MN10300
|
||||||
def_bool y
|
def_bool y
|
||||||
select HAVE_OPROFILE
|
select HAVE_OPROFILE
|
||||||
select HAVE_ARCH_TRACEHOOK
|
|
||||||
|
|
||||||
config AM33
|
config AM33
|
||||||
def_bool y
|
def_bool y
|
||||||
|
|
|
@ -101,7 +101,7 @@ config GDBSTUB_DEBUG_BREAKPOINT
|
||||||
|
|
||||||
choice
|
choice
|
||||||
prompt "GDB stub port"
|
prompt "GDB stub port"
|
||||||
default GDBSTUB_TTYSM0
|
default GDBSTUB_ON_TTYSM0
|
||||||
depends on GDBSTUB
|
depends on GDBSTUB
|
||||||
help
|
help
|
||||||
Select the serial port used for GDB-stub.
|
Select the serial port used for GDB-stub.
|
||||||
|
|
|
@ -229,9 +229,9 @@ int ffs(int x)
|
||||||
#include <asm-generic/bitops/hweight.h>
|
#include <asm-generic/bitops/hweight.h>
|
||||||
|
|
||||||
#define ext2_set_bit_atomic(lock, nr, addr) \
|
#define ext2_set_bit_atomic(lock, nr, addr) \
|
||||||
test_and_set_bit((nr) ^ 0x18, (addr))
|
test_and_set_bit((nr), (addr))
|
||||||
#define ext2_clear_bit_atomic(lock, nr, addr) \
|
#define ext2_clear_bit_atomic(lock, nr, addr) \
|
||||||
test_and_clear_bit((nr) ^ 0x18, (addr))
|
test_and_clear_bit((nr), (addr))
|
||||||
|
|
||||||
#include <asm-generic/bitops/ext2-non-atomic.h>
|
#include <asm-generic/bitops/ext2-non-atomic.h>
|
||||||
#include <asm-generic/bitops/minix-le.h>
|
#include <asm-generic/bitops/minix-le.h>
|
||||||
|
|
|
@ -78,7 +78,7 @@ typedef unsigned long sigset_t;
|
||||||
|
|
||||||
/* These should not be considered constants from userland. */
|
/* These should not be considered constants from userland. */
|
||||||
#define SIGRTMIN 32
|
#define SIGRTMIN 32
|
||||||
#define SIGRTMAX (_NSIG-1)
|
#define SIGRTMAX _NSIG
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* SA_FLAGS values:
|
* SA_FLAGS values:
|
||||||
|
|
|
@ -65,10 +65,10 @@ asmlinkage long sys_sigaction(int sig,
|
||||||
old_sigset_t mask;
|
old_sigset_t mask;
|
||||||
if (verify_area(VERIFY_READ, act, sizeof(*act)) ||
|
if (verify_area(VERIFY_READ, act, sizeof(*act)) ||
|
||||||
__get_user(new_ka.sa.sa_handler, &act->sa_handler) ||
|
__get_user(new_ka.sa.sa_handler, &act->sa_handler) ||
|
||||||
__get_user(new_ka.sa.sa_restorer, &act->sa_restorer))
|
__get_user(new_ka.sa.sa_restorer, &act->sa_restorer) ||
|
||||||
|
__get_user(new_ka.sa.sa_flags, &act->sa_flags) ||
|
||||||
|
__get_user(mask, &act->sa_mask))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
__get_user(new_ka.sa.sa_flags, &act->sa_flags);
|
|
||||||
__get_user(mask, &act->sa_mask);
|
|
||||||
siginitset(&new_ka.sa.sa_mask, mask);
|
siginitset(&new_ka.sa.sa_mask, mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,10 +77,10 @@ asmlinkage long sys_sigaction(int sig,
|
||||||
if (!ret && oact) {
|
if (!ret && oact) {
|
||||||
if (verify_area(VERIFY_WRITE, oact, sizeof(*oact)) ||
|
if (verify_area(VERIFY_WRITE, oact, sizeof(*oact)) ||
|
||||||
__put_user(old_ka.sa.sa_handler, &oact->sa_handler) ||
|
__put_user(old_ka.sa.sa_handler, &oact->sa_handler) ||
|
||||||
__put_user(old_ka.sa.sa_restorer, &oact->sa_restorer))
|
__put_user(old_ka.sa.sa_restorer, &oact->sa_restorer) ||
|
||||||
|
__put_user(old_ka.sa.sa_flags, &oact->sa_flags) ||
|
||||||
|
__put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
__put_user(old_ka.sa.sa_flags, &oact->sa_flags);
|
|
||||||
__put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -102,6 +102,9 @@ static int restore_sigcontext(struct pt_regs *regs,
|
||||||
{
|
{
|
||||||
unsigned int err = 0;
|
unsigned int err = 0;
|
||||||
|
|
||||||
|
/* Always make any pending restarted system calls return -EINTR */
|
||||||
|
current_thread_info()->restart_block.fn = do_no_restart_syscall;
|
||||||
|
|
||||||
if (is_using_fpu(current))
|
if (is_using_fpu(current))
|
||||||
fpu_kill_state(current);
|
fpu_kill_state(current);
|
||||||
|
|
||||||
|
@ -330,8 +333,6 @@ static int setup_frame(int sig, struct k_sigaction *ka, sigset_t *set,
|
||||||
regs->d0 = sig;
|
regs->d0 = sig;
|
||||||
regs->d1 = (unsigned long) &frame->sc;
|
regs->d1 = (unsigned long) &frame->sc;
|
||||||
|
|
||||||
set_fs(USER_DS);
|
|
||||||
|
|
||||||
/* the tracer may want to single-step inside the handler */
|
/* the tracer may want to single-step inside the handler */
|
||||||
if (test_thread_flag(TIF_SINGLESTEP))
|
if (test_thread_flag(TIF_SINGLESTEP))
|
||||||
ptrace_notify(SIGTRAP);
|
ptrace_notify(SIGTRAP);
|
||||||
|
@ -345,7 +346,7 @@ static int setup_frame(int sig, struct k_sigaction *ka, sigset_t *set,
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
give_sigsegv:
|
give_sigsegv:
|
||||||
force_sig(SIGSEGV, current);
|
force_sigsegv(sig, current);
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -413,8 +414,6 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
|
||||||
regs->d0 = sig;
|
regs->d0 = sig;
|
||||||
regs->d1 = (long) &frame->info;
|
regs->d1 = (long) &frame->info;
|
||||||
|
|
||||||
set_fs(USER_DS);
|
|
||||||
|
|
||||||
/* the tracer may want to single-step inside the handler */
|
/* the tracer may want to single-step inside the handler */
|
||||||
if (test_thread_flag(TIF_SINGLESTEP))
|
if (test_thread_flag(TIF_SINGLESTEP))
|
||||||
ptrace_notify(SIGTRAP);
|
ptrace_notify(SIGTRAP);
|
||||||
|
@ -428,10 +427,16 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
give_sigsegv:
|
give_sigsegv:
|
||||||
force_sig(SIGSEGV, current);
|
force_sigsegv(sig, current);
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void stepback(struct pt_regs *regs)
|
||||||
|
{
|
||||||
|
regs->pc -= 2;
|
||||||
|
regs->orig_d0 = -1;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* handle the actual delivery of a signal to userspace
|
* handle the actual delivery of a signal to userspace
|
||||||
*/
|
*/
|
||||||
|
@ -459,7 +464,7 @@ static int handle_signal(int sig,
|
||||||
/* fallthrough */
|
/* fallthrough */
|
||||||
case -ERESTARTNOINTR:
|
case -ERESTARTNOINTR:
|
||||||
regs->d0 = regs->orig_d0;
|
regs->d0 = regs->orig_d0;
|
||||||
regs->pc -= 2;
|
stepback(regs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -527,12 +532,12 @@ static void do_signal(struct pt_regs *regs)
|
||||||
case -ERESTARTSYS:
|
case -ERESTARTSYS:
|
||||||
case -ERESTARTNOINTR:
|
case -ERESTARTNOINTR:
|
||||||
regs->d0 = regs->orig_d0;
|
regs->d0 = regs->orig_d0;
|
||||||
regs->pc -= 2;
|
stepback(regs);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case -ERESTART_RESTARTBLOCK:
|
case -ERESTART_RESTARTBLOCK:
|
||||||
regs->d0 = __NR_restart_syscall;
|
regs->d0 = __NR_restart_syscall;
|
||||||
regs->pc -= 2;
|
stepback(regs);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,13 +2,11 @@
|
||||||
# Makefile for the MN10300-specific memory management code
|
# Makefile for the MN10300-specific memory management code
|
||||||
#
|
#
|
||||||
|
|
||||||
|
cacheflush-y := cache.o cache-mn10300.o
|
||||||
|
cacheflush-$(CONFIG_MN10300_CACHE_WBACK) += cache-flush-mn10300.o
|
||||||
|
|
||||||
|
cacheflush-$(CONFIG_MN10300_CACHE_DISABLED) := cache-disabled.o
|
||||||
|
|
||||||
obj-y := \
|
obj-y := \
|
||||||
init.o fault.o pgtable.o extable.o tlb-mn10300.o mmu-context.o \
|
init.o fault.o pgtable.o extable.o tlb-mn10300.o mmu-context.o \
|
||||||
misalignment.o dma-alloc.o
|
misalignment.o dma-alloc.o $(cacheflush-y)
|
||||||
|
|
||||||
ifneq ($(CONFIG_MN10300_CACHE_DISABLED),y)
|
|
||||||
obj-y += cache.o cache-mn10300.o
|
|
||||||
ifeq ($(CONFIG_MN10300_CACHE_WBACK),y)
|
|
||||||
obj-y += cache-flush-mn10300.o
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
21
arch/mn10300/mm/cache-disabled.c
Normal file
21
arch/mn10300/mm/cache-disabled.c
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
/* Handle the cache being disabled
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010 Red Hat, Inc. All Rights Reserved.
|
||||||
|
* Written by David Howells (dhowells@redhat.com)
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public Licence
|
||||||
|
* as published by the Free Software Foundation; either version
|
||||||
|
* 2 of the Licence, or (at your option) any later version.
|
||||||
|
*/
|
||||||
|
#include <linux/mm.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* allow userspace to flush the instruction cache
|
||||||
|
*/
|
||||||
|
asmlinkage long sys_cacheflush(unsigned long start, unsigned long end)
|
||||||
|
{
|
||||||
|
if (end < start)
|
||||||
|
return -EINVAL;
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -138,6 +138,7 @@ static int do_signal_pending(sigset_t *oldset, struct pt_regs *regs)
|
||||||
ti->local_flags &= ~_TLF_RESTORE_SIGMASK;
|
ti->local_flags &= ~_TLF_RESTORE_SIGMASK;
|
||||||
sigprocmask(SIG_SETMASK, ¤t->saved_sigmask, NULL);
|
sigprocmask(SIG_SETMASK, ¤t->saved_sigmask, NULL);
|
||||||
}
|
}
|
||||||
|
regs->trap = 0;
|
||||||
return 0; /* no signals delivered */
|
return 0; /* no signals delivered */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,6 +165,7 @@ static int do_signal_pending(sigset_t *oldset, struct pt_regs *regs)
|
||||||
ret = handle_rt_signal64(signr, &ka, &info, oldset, regs);
|
ret = handle_rt_signal64(signr, &ka, &info, oldset, regs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
regs->trap = 0;
|
||||||
if (ret) {
|
if (ret) {
|
||||||
spin_lock_irq(¤t->sighand->siglock);
|
spin_lock_irq(¤t->sighand->siglock);
|
||||||
sigorsets(¤t->blocked, ¤t->blocked,
|
sigorsets(¤t->blocked, ¤t->blocked,
|
||||||
|
|
|
@ -511,6 +511,7 @@ static long restore_user_regs(struct pt_regs *regs,
|
||||||
if (!sig)
|
if (!sig)
|
||||||
save_r2 = (unsigned int)regs->gpr[2];
|
save_r2 = (unsigned int)regs->gpr[2];
|
||||||
err = restore_general_regs(regs, sr);
|
err = restore_general_regs(regs, sr);
|
||||||
|
regs->trap = 0;
|
||||||
err |= __get_user(msr, &sr->mc_gregs[PT_MSR]);
|
err |= __get_user(msr, &sr->mc_gregs[PT_MSR]);
|
||||||
if (!sig)
|
if (!sig)
|
||||||
regs->gpr[2] = (unsigned long) save_r2;
|
regs->gpr[2] = (unsigned long) save_r2;
|
||||||
|
@ -884,7 +885,6 @@ int handle_rt_signal32(unsigned long sig, struct k_sigaction *ka,
|
||||||
regs->nip = (unsigned long) ka->sa.sa_handler;
|
regs->nip = (unsigned long) ka->sa.sa_handler;
|
||||||
/* enter the signal handler in big-endian mode */
|
/* enter the signal handler in big-endian mode */
|
||||||
regs->msr &= ~MSR_LE;
|
regs->msr &= ~MSR_LE;
|
||||||
regs->trap = 0;
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
badframe:
|
badframe:
|
||||||
|
@ -1228,7 +1228,6 @@ int handle_signal32(unsigned long sig, struct k_sigaction *ka,
|
||||||
regs->nip = (unsigned long) ka->sa.sa_handler;
|
regs->nip = (unsigned long) ka->sa.sa_handler;
|
||||||
/* enter the signal handler in big-endian mode */
|
/* enter the signal handler in big-endian mode */
|
||||||
regs->msr &= ~MSR_LE;
|
regs->msr &= ~MSR_LE;
|
||||||
regs->trap = 0;
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
|
|
@ -178,7 +178,7 @@ static long restore_sigcontext(struct pt_regs *regs, sigset_t *set, int sig,
|
||||||
err |= __get_user(regs->xer, &sc->gp_regs[PT_XER]);
|
err |= __get_user(regs->xer, &sc->gp_regs[PT_XER]);
|
||||||
err |= __get_user(regs->ccr, &sc->gp_regs[PT_CCR]);
|
err |= __get_user(regs->ccr, &sc->gp_regs[PT_CCR]);
|
||||||
/* skip SOFTE */
|
/* skip SOFTE */
|
||||||
err |= __get_user(regs->trap, &sc->gp_regs[PT_TRAP]);
|
regs->trap = 0;
|
||||||
err |= __get_user(regs->dar, &sc->gp_regs[PT_DAR]);
|
err |= __get_user(regs->dar, &sc->gp_regs[PT_DAR]);
|
||||||
err |= __get_user(regs->dsisr, &sc->gp_regs[PT_DSISR]);
|
err |= __get_user(regs->dsisr, &sc->gp_regs[PT_DSISR]);
|
||||||
err |= __get_user(regs->result, &sc->gp_regs[PT_RESULT]);
|
err |= __get_user(regs->result, &sc->gp_regs[PT_RESULT]);
|
||||||
|
|
|
@ -1038,6 +1038,7 @@ static int __hw_perf_event_init(struct perf_event *event)
|
||||||
if (atomic_read(&nmi_active) < 0)
|
if (atomic_read(&nmi_active) < 0)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
|
pmap = NULL;
|
||||||
if (attr->type == PERF_TYPE_HARDWARE) {
|
if (attr->type == PERF_TYPE_HARDWARE) {
|
||||||
if (attr->config >= sparc_pmu->max_events)
|
if (attr->config >= sparc_pmu->max_events)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -1046,9 +1047,18 @@ static int __hw_perf_event_init(struct perf_event *event)
|
||||||
pmap = sparc_map_cache_event(attr->config);
|
pmap = sparc_map_cache_event(attr->config);
|
||||||
if (IS_ERR(pmap))
|
if (IS_ERR(pmap))
|
||||||
return PTR_ERR(pmap);
|
return PTR_ERR(pmap);
|
||||||
} else
|
} else if (attr->type != PERF_TYPE_RAW)
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
|
|
||||||
|
if (pmap) {
|
||||||
|
hwc->event_base = perf_event_encode(pmap);
|
||||||
|
} else {
|
||||||
|
/* User gives us "(encoding << 16) | pic_mask" for
|
||||||
|
* PERF_TYPE_RAW events.
|
||||||
|
*/
|
||||||
|
hwc->event_base = attr->config;
|
||||||
|
}
|
||||||
|
|
||||||
/* We save the enable bits in the config_base. */
|
/* We save the enable bits in the config_base. */
|
||||||
hwc->config_base = sparc_pmu->irq_bit;
|
hwc->config_base = sparc_pmu->irq_bit;
|
||||||
if (!attr->exclude_user)
|
if (!attr->exclude_user)
|
||||||
|
@ -1058,8 +1068,6 @@ static int __hw_perf_event_init(struct perf_event *event)
|
||||||
if (!attr->exclude_hv)
|
if (!attr->exclude_hv)
|
||||||
hwc->config_base |= sparc_pmu->hv_bit;
|
hwc->config_base |= sparc_pmu->hv_bit;
|
||||||
|
|
||||||
hwc->event_base = perf_event_encode(pmap);
|
|
||||||
|
|
||||||
n = 0;
|
n = 0;
|
||||||
if (event->group_leader != event) {
|
if (event->group_leader != event) {
|
||||||
n = collect_events(event->group_leader,
|
n = collect_events(event->group_leader,
|
||||||
|
|
|
@ -453,7 +453,65 @@ static int save_fpu_state32(struct pt_regs *regs, __siginfo_fpu_t __user *fpu)
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setup_frame32(struct k_sigaction *ka, struct pt_regs *regs,
|
/* The I-cache flush instruction only works in the primary ASI, which
|
||||||
|
* right now is the nucleus, aka. kernel space.
|
||||||
|
*
|
||||||
|
* Therefore we have to kick the instructions out using the kernel
|
||||||
|
* side linear mapping of the physical address backing the user
|
||||||
|
* instructions.
|
||||||
|
*/
|
||||||
|
static void flush_signal_insns(unsigned long address)
|
||||||
|
{
|
||||||
|
unsigned long pstate, paddr;
|
||||||
|
pte_t *ptep, pte;
|
||||||
|
pgd_t *pgdp;
|
||||||
|
pud_t *pudp;
|
||||||
|
pmd_t *pmdp;
|
||||||
|
|
||||||
|
/* Commit all stores of the instructions we are about to flush. */
|
||||||
|
wmb();
|
||||||
|
|
||||||
|
/* Disable cross-call reception. In this way even a very wide
|
||||||
|
* munmap() on another cpu can't tear down the page table
|
||||||
|
* hierarchy from underneath us, since that can't complete
|
||||||
|
* until the IPI tlb flush returns.
|
||||||
|
*/
|
||||||
|
|
||||||
|
__asm__ __volatile__("rdpr %%pstate, %0" : "=r" (pstate));
|
||||||
|
__asm__ __volatile__("wrpr %0, %1, %%pstate"
|
||||||
|
: : "r" (pstate), "i" (PSTATE_IE));
|
||||||
|
|
||||||
|
pgdp = pgd_offset(current->mm, address);
|
||||||
|
if (pgd_none(*pgdp))
|
||||||
|
goto out_irqs_on;
|
||||||
|
pudp = pud_offset(pgdp, address);
|
||||||
|
if (pud_none(*pudp))
|
||||||
|
goto out_irqs_on;
|
||||||
|
pmdp = pmd_offset(pudp, address);
|
||||||
|
if (pmd_none(*pmdp))
|
||||||
|
goto out_irqs_on;
|
||||||
|
|
||||||
|
ptep = pte_offset_map(pmdp, address);
|
||||||
|
pte = *ptep;
|
||||||
|
if (!pte_present(pte))
|
||||||
|
goto out_unmap;
|
||||||
|
|
||||||
|
paddr = (unsigned long) page_address(pte_page(pte));
|
||||||
|
|
||||||
|
__asm__ __volatile__("flush %0 + %1"
|
||||||
|
: /* no outputs */
|
||||||
|
: "r" (paddr),
|
||||||
|
"r" (address & (PAGE_SIZE - 1))
|
||||||
|
: "memory");
|
||||||
|
|
||||||
|
out_unmap:
|
||||||
|
pte_unmap(ptep);
|
||||||
|
out_irqs_on:
|
||||||
|
__asm__ __volatile__("wrpr %0, 0x0, %%pstate" : : "r" (pstate));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static int setup_frame32(struct k_sigaction *ka, struct pt_regs *regs,
|
||||||
int signo, sigset_t *oldset)
|
int signo, sigset_t *oldset)
|
||||||
{
|
{
|
||||||
struct signal_frame32 __user *sf;
|
struct signal_frame32 __user *sf;
|
||||||
|
@ -547,13 +605,7 @@ static void setup_frame32(struct k_sigaction *ka, struct pt_regs *regs,
|
||||||
if (ka->ka_restorer) {
|
if (ka->ka_restorer) {
|
||||||
regs->u_regs[UREG_I7] = (unsigned long)ka->ka_restorer;
|
regs->u_regs[UREG_I7] = (unsigned long)ka->ka_restorer;
|
||||||
} else {
|
} else {
|
||||||
/* Flush instruction space. */
|
|
||||||
unsigned long address = ((unsigned long)&(sf->insns[0]));
|
unsigned long address = ((unsigned long)&(sf->insns[0]));
|
||||||
pgd_t *pgdp = pgd_offset(current->mm, address);
|
|
||||||
pud_t *pudp = pud_offset(pgdp, address);
|
|
||||||
pmd_t *pmdp = pmd_offset(pudp, address);
|
|
||||||
pte_t *ptep;
|
|
||||||
pte_t pte;
|
|
||||||
|
|
||||||
regs->u_regs[UREG_I7] = (unsigned long) (&(sf->insns[0]) - 2);
|
regs->u_regs[UREG_I7] = (unsigned long) (&(sf->insns[0]) - 2);
|
||||||
|
|
||||||
|
@ -562,32 +614,20 @@ static void setup_frame32(struct k_sigaction *ka, struct pt_regs *regs,
|
||||||
if (err)
|
if (err)
|
||||||
goto sigsegv;
|
goto sigsegv;
|
||||||
|
|
||||||
preempt_disable();
|
flush_signal_insns(address);
|
||||||
ptep = pte_offset_map(pmdp, address);
|
|
||||||
pte = *ptep;
|
|
||||||
if (pte_present(pte)) {
|
|
||||||
unsigned long page = (unsigned long)
|
|
||||||
page_address(pte_page(pte));
|
|
||||||
|
|
||||||
wmb();
|
|
||||||
__asm__ __volatile__("flush %0 + %1"
|
|
||||||
: /* no outputs */
|
|
||||||
: "r" (page),
|
|
||||||
"r" (address & (PAGE_SIZE - 1))
|
|
||||||
: "memory");
|
|
||||||
}
|
}
|
||||||
pte_unmap(ptep);
|
return 0;
|
||||||
preempt_enable();
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
|
|
||||||
sigill:
|
sigill:
|
||||||
do_exit(SIGILL);
|
do_exit(SIGILL);
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
sigsegv:
|
sigsegv:
|
||||||
force_sigsegv(signo, current);
|
force_sigsegv(signo, current);
|
||||||
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setup_rt_frame32(struct k_sigaction *ka, struct pt_regs *regs,
|
static int setup_rt_frame32(struct k_sigaction *ka, struct pt_regs *regs,
|
||||||
unsigned long signr, sigset_t *oldset,
|
unsigned long signr, sigset_t *oldset,
|
||||||
siginfo_t *info)
|
siginfo_t *info)
|
||||||
{
|
{
|
||||||
|
@ -687,12 +727,7 @@ static void setup_rt_frame32(struct k_sigaction *ka, struct pt_regs *regs,
|
||||||
if (ka->ka_restorer)
|
if (ka->ka_restorer)
|
||||||
regs->u_regs[UREG_I7] = (unsigned long)ka->ka_restorer;
|
regs->u_regs[UREG_I7] = (unsigned long)ka->ka_restorer;
|
||||||
else {
|
else {
|
||||||
/* Flush instruction space. */
|
|
||||||
unsigned long address = ((unsigned long)&(sf->insns[0]));
|
unsigned long address = ((unsigned long)&(sf->insns[0]));
|
||||||
pgd_t *pgdp = pgd_offset(current->mm, address);
|
|
||||||
pud_t *pudp = pud_offset(pgdp, address);
|
|
||||||
pmd_t *pmdp = pmd_offset(pudp, address);
|
|
||||||
pte_t *ptep;
|
|
||||||
|
|
||||||
regs->u_regs[UREG_I7] = (unsigned long) (&(sf->insns[0]) - 2);
|
regs->u_regs[UREG_I7] = (unsigned long) (&(sf->insns[0]) - 2);
|
||||||
|
|
||||||
|
@ -704,38 +739,32 @@ static void setup_rt_frame32(struct k_sigaction *ka, struct pt_regs *regs,
|
||||||
if (err)
|
if (err)
|
||||||
goto sigsegv;
|
goto sigsegv;
|
||||||
|
|
||||||
preempt_disable();
|
flush_signal_insns(address);
|
||||||
ptep = pte_offset_map(pmdp, address);
|
|
||||||
if (pte_present(*ptep)) {
|
|
||||||
unsigned long page = (unsigned long)
|
|
||||||
page_address(pte_page(*ptep));
|
|
||||||
|
|
||||||
wmb();
|
|
||||||
__asm__ __volatile__("flush %0 + %1"
|
|
||||||
: /* no outputs */
|
|
||||||
: "r" (page),
|
|
||||||
"r" (address & (PAGE_SIZE - 1))
|
|
||||||
: "memory");
|
|
||||||
}
|
}
|
||||||
pte_unmap(ptep);
|
return 0;
|
||||||
preempt_enable();
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
|
|
||||||
sigill:
|
sigill:
|
||||||
do_exit(SIGILL);
|
do_exit(SIGILL);
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
sigsegv:
|
sigsegv:
|
||||||
force_sigsegv(signr, current);
|
force_sigsegv(signr, current);
|
||||||
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void handle_signal32(unsigned long signr, struct k_sigaction *ka,
|
static inline int handle_signal32(unsigned long signr, struct k_sigaction *ka,
|
||||||
siginfo_t *info,
|
siginfo_t *info,
|
||||||
sigset_t *oldset, struct pt_regs *regs)
|
sigset_t *oldset, struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
|
int err;
|
||||||
|
|
||||||
if (ka->sa.sa_flags & SA_SIGINFO)
|
if (ka->sa.sa_flags & SA_SIGINFO)
|
||||||
setup_rt_frame32(ka, regs, signr, oldset, info);
|
err = setup_rt_frame32(ka, regs, signr, oldset, info);
|
||||||
else
|
else
|
||||||
setup_frame32(ka, regs, signr, oldset);
|
err = setup_frame32(ka, regs, signr, oldset);
|
||||||
|
|
||||||
|
if (err)
|
||||||
|
return err;
|
||||||
|
|
||||||
spin_lock_irq(¤t->sighand->siglock);
|
spin_lock_irq(¤t->sighand->siglock);
|
||||||
sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask);
|
sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask);
|
||||||
|
@ -743,6 +772,10 @@ static inline void handle_signal32(unsigned long signr, struct k_sigaction *ka,
|
||||||
sigaddset(¤t->blocked,signr);
|
sigaddset(¤t->blocked,signr);
|
||||||
recalc_sigpending();
|
recalc_sigpending();
|
||||||
spin_unlock_irq(¤t->sighand->siglock);
|
spin_unlock_irq(¤t->sighand->siglock);
|
||||||
|
|
||||||
|
tracehook_signal_handler(signr, info, ka, regs, 0);
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void syscall_restart32(unsigned long orig_i0, struct pt_regs *regs,
|
static inline void syscall_restart32(unsigned long orig_i0, struct pt_regs *regs,
|
||||||
|
@ -789,16 +822,14 @@ void do_signal32(sigset_t *oldset, struct pt_regs * regs,
|
||||||
if (signr > 0) {
|
if (signr > 0) {
|
||||||
if (restart_syscall)
|
if (restart_syscall)
|
||||||
syscall_restart32(orig_i0, regs, &ka.sa);
|
syscall_restart32(orig_i0, regs, &ka.sa);
|
||||||
handle_signal32(signr, &ka, &info, oldset, regs);
|
if (handle_signal32(signr, &ka, &info, oldset, regs) == 0) {
|
||||||
|
|
||||||
/* A signal was successfully delivered; the saved
|
/* A signal was successfully delivered; the saved
|
||||||
* sigmask will have been stored in the signal frame,
|
* sigmask will have been stored in the signal frame,
|
||||||
* and will be restored by sigreturn, so we can simply
|
* and will be restored by sigreturn, so we can simply
|
||||||
* clear the TS_RESTORE_SIGMASK flag.
|
* clear the TS_RESTORE_SIGMASK flag.
|
||||||
*/
|
*/
|
||||||
current_thread_info()->status &= ~TS_RESTORE_SIGMASK;
|
current_thread_info()->status &= ~TS_RESTORE_SIGMASK;
|
||||||
|
}
|
||||||
tracehook_signal_handler(signr, &info, &ka, regs, 0);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (restart_syscall &&
|
if (restart_syscall &&
|
||||||
|
@ -809,12 +840,14 @@ void do_signal32(sigset_t *oldset, struct pt_regs * regs,
|
||||||
regs->u_regs[UREG_I0] = orig_i0;
|
regs->u_regs[UREG_I0] = orig_i0;
|
||||||
regs->tpc -= 4;
|
regs->tpc -= 4;
|
||||||
regs->tnpc -= 4;
|
regs->tnpc -= 4;
|
||||||
|
pt_regs_clear_syscall(regs);
|
||||||
}
|
}
|
||||||
if (restart_syscall &&
|
if (restart_syscall &&
|
||||||
regs->u_regs[UREG_I0] == ERESTART_RESTARTBLOCK) {
|
regs->u_regs[UREG_I0] == ERESTART_RESTARTBLOCK) {
|
||||||
regs->u_regs[UREG_G1] = __NR_restart_syscall;
|
regs->u_regs[UREG_G1] = __NR_restart_syscall;
|
||||||
regs->tpc -= 4;
|
regs->tpc -= 4;
|
||||||
regs->tnpc -= 4;
|
regs->tnpc -= 4;
|
||||||
|
pt_regs_clear_syscall(regs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If there's no signal to deliver, we just put the saved sigmask
|
/* If there's no signal to deliver, we just put the saved sigmask
|
||||||
|
|
|
@ -315,7 +315,7 @@ save_fpu_state(struct pt_regs *regs, __siginfo_fpu_t __user *fpu)
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setup_frame(struct k_sigaction *ka, struct pt_regs *regs,
|
static int setup_frame(struct k_sigaction *ka, struct pt_regs *regs,
|
||||||
int signo, sigset_t *oldset)
|
int signo, sigset_t *oldset)
|
||||||
{
|
{
|
||||||
struct signal_frame __user *sf;
|
struct signal_frame __user *sf;
|
||||||
|
@ -384,15 +384,18 @@ static void setup_frame(struct k_sigaction *ka, struct pt_regs *regs,
|
||||||
/* Flush instruction space. */
|
/* Flush instruction space. */
|
||||||
flush_sig_insns(current->mm, (unsigned long) &(sf->insns[0]));
|
flush_sig_insns(current->mm, (unsigned long) &(sf->insns[0]));
|
||||||
}
|
}
|
||||||
return;
|
return 0;
|
||||||
|
|
||||||
sigill_and_return:
|
sigill_and_return:
|
||||||
do_exit(SIGILL);
|
do_exit(SIGILL);
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
sigsegv:
|
sigsegv:
|
||||||
force_sigsegv(signo, current);
|
force_sigsegv(signo, current);
|
||||||
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setup_rt_frame(struct k_sigaction *ka, struct pt_regs *regs,
|
static int setup_rt_frame(struct k_sigaction *ka, struct pt_regs *regs,
|
||||||
int signo, sigset_t *oldset, siginfo_t *info)
|
int signo, sigset_t *oldset, siginfo_t *info)
|
||||||
{
|
{
|
||||||
struct rt_signal_frame __user *sf;
|
struct rt_signal_frame __user *sf;
|
||||||
|
@ -466,22 +469,30 @@ static void setup_rt_frame(struct k_sigaction *ka, struct pt_regs *regs,
|
||||||
/* Flush instruction space. */
|
/* Flush instruction space. */
|
||||||
flush_sig_insns(current->mm, (unsigned long) &(sf->insns[0]));
|
flush_sig_insns(current->mm, (unsigned long) &(sf->insns[0]));
|
||||||
}
|
}
|
||||||
return;
|
return 0;
|
||||||
|
|
||||||
sigill:
|
sigill:
|
||||||
do_exit(SIGILL);
|
do_exit(SIGILL);
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
sigsegv:
|
sigsegv:
|
||||||
force_sigsegv(signo, current);
|
force_sigsegv(signo, current);
|
||||||
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline int
|
||||||
handle_signal(unsigned long signr, struct k_sigaction *ka,
|
handle_signal(unsigned long signr, struct k_sigaction *ka,
|
||||||
siginfo_t *info, sigset_t *oldset, struct pt_regs *regs)
|
siginfo_t *info, sigset_t *oldset, struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
|
int err;
|
||||||
|
|
||||||
if (ka->sa.sa_flags & SA_SIGINFO)
|
if (ka->sa.sa_flags & SA_SIGINFO)
|
||||||
setup_rt_frame(ka, regs, signr, oldset, info);
|
err = setup_rt_frame(ka, regs, signr, oldset, info);
|
||||||
else
|
else
|
||||||
setup_frame(ka, regs, signr, oldset);
|
err = setup_frame(ka, regs, signr, oldset);
|
||||||
|
|
||||||
|
if (err)
|
||||||
|
return err;
|
||||||
|
|
||||||
spin_lock_irq(¤t->sighand->siglock);
|
spin_lock_irq(¤t->sighand->siglock);
|
||||||
sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask);
|
sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask);
|
||||||
|
@ -489,6 +500,10 @@ handle_signal(unsigned long signr, struct k_sigaction *ka,
|
||||||
sigaddset(¤t->blocked, signr);
|
sigaddset(¤t->blocked, signr);
|
||||||
recalc_sigpending();
|
recalc_sigpending();
|
||||||
spin_unlock_irq(¤t->sighand->siglock);
|
spin_unlock_irq(¤t->sighand->siglock);
|
||||||
|
|
||||||
|
tracehook_signal_handler(signr, info, ka, regs, 0);
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void syscall_restart(unsigned long orig_i0, struct pt_regs *regs,
|
static inline void syscall_restart(unsigned long orig_i0, struct pt_regs *regs,
|
||||||
|
@ -546,8 +561,7 @@ static void do_signal(struct pt_regs *regs, unsigned long orig_i0)
|
||||||
if (signr > 0) {
|
if (signr > 0) {
|
||||||
if (restart_syscall)
|
if (restart_syscall)
|
||||||
syscall_restart(orig_i0, regs, &ka.sa);
|
syscall_restart(orig_i0, regs, &ka.sa);
|
||||||
handle_signal(signr, &ka, &info, oldset, regs);
|
if (handle_signal(signr, &ka, &info, oldset, regs) == 0) {
|
||||||
|
|
||||||
/* a signal was successfully delivered; the saved
|
/* a signal was successfully delivered; the saved
|
||||||
* sigmask will have been stored in the signal frame,
|
* sigmask will have been stored in the signal frame,
|
||||||
* and will be restored by sigreturn, so we can simply
|
* and will be restored by sigreturn, so we can simply
|
||||||
|
@ -555,8 +569,7 @@ static void do_signal(struct pt_regs *regs, unsigned long orig_i0)
|
||||||
*/
|
*/
|
||||||
if (test_thread_flag(TIF_RESTORE_SIGMASK))
|
if (test_thread_flag(TIF_RESTORE_SIGMASK))
|
||||||
clear_thread_flag(TIF_RESTORE_SIGMASK);
|
clear_thread_flag(TIF_RESTORE_SIGMASK);
|
||||||
|
}
|
||||||
tracehook_signal_handler(signr, &info, &ka, regs, 0);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (restart_syscall &&
|
if (restart_syscall &&
|
||||||
|
@ -567,12 +580,14 @@ static void do_signal(struct pt_regs *regs, unsigned long orig_i0)
|
||||||
regs->u_regs[UREG_I0] = orig_i0;
|
regs->u_regs[UREG_I0] = orig_i0;
|
||||||
regs->pc -= 4;
|
regs->pc -= 4;
|
||||||
regs->npc -= 4;
|
regs->npc -= 4;
|
||||||
|
pt_regs_clear_syscall(regs);
|
||||||
}
|
}
|
||||||
if (restart_syscall &&
|
if (restart_syscall &&
|
||||||
regs->u_regs[UREG_I0] == ERESTART_RESTARTBLOCK) {
|
regs->u_regs[UREG_I0] == ERESTART_RESTARTBLOCK) {
|
||||||
regs->u_regs[UREG_G1] = __NR_restart_syscall;
|
regs->u_regs[UREG_G1] = __NR_restart_syscall;
|
||||||
regs->pc -= 4;
|
regs->pc -= 4;
|
||||||
regs->npc -= 4;
|
regs->npc -= 4;
|
||||||
|
pt_regs_clear_syscall(regs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if there's no signal to deliver, we just put the saved sigmask
|
/* if there's no signal to deliver, we just put the saved sigmask
|
||||||
|
|
|
@ -409,7 +409,7 @@ static inline void __user *get_sigframe(struct k_sigaction *ka, struct pt_regs *
|
||||||
return (void __user *) sp;
|
return (void __user *) sp;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline int
|
||||||
setup_rt_frame(struct k_sigaction *ka, struct pt_regs *regs,
|
setup_rt_frame(struct k_sigaction *ka, struct pt_regs *regs,
|
||||||
int signo, sigset_t *oldset, siginfo_t *info)
|
int signo, sigset_t *oldset, siginfo_t *info)
|
||||||
{
|
{
|
||||||
|
@ -483,26 +483,37 @@ setup_rt_frame(struct k_sigaction *ka, struct pt_regs *regs,
|
||||||
}
|
}
|
||||||
/* 4. return to kernel instructions */
|
/* 4. return to kernel instructions */
|
||||||
regs->u_regs[UREG_I7] = (unsigned long)ka->ka_restorer;
|
regs->u_regs[UREG_I7] = (unsigned long)ka->ka_restorer;
|
||||||
return;
|
return 0;
|
||||||
|
|
||||||
sigill:
|
sigill:
|
||||||
do_exit(SIGILL);
|
do_exit(SIGILL);
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
sigsegv:
|
sigsegv:
|
||||||
force_sigsegv(signo, current);
|
force_sigsegv(signo, current);
|
||||||
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void handle_signal(unsigned long signr, struct k_sigaction *ka,
|
static inline int handle_signal(unsigned long signr, struct k_sigaction *ka,
|
||||||
siginfo_t *info,
|
siginfo_t *info,
|
||||||
sigset_t *oldset, struct pt_regs *regs)
|
sigset_t *oldset, struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
setup_rt_frame(ka, regs, signr, oldset,
|
int err;
|
||||||
|
|
||||||
|
err = setup_rt_frame(ka, regs, signr, oldset,
|
||||||
(ka->sa.sa_flags & SA_SIGINFO) ? info : NULL);
|
(ka->sa.sa_flags & SA_SIGINFO) ? info : NULL);
|
||||||
|
if (err)
|
||||||
|
return err;
|
||||||
spin_lock_irq(¤t->sighand->siglock);
|
spin_lock_irq(¤t->sighand->siglock);
|
||||||
sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask);
|
sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask);
|
||||||
if (!(ka->sa.sa_flags & SA_NOMASK))
|
if (!(ka->sa.sa_flags & SA_NOMASK))
|
||||||
sigaddset(¤t->blocked,signr);
|
sigaddset(¤t->blocked,signr);
|
||||||
recalc_sigpending();
|
recalc_sigpending();
|
||||||
spin_unlock_irq(¤t->sighand->siglock);
|
spin_unlock_irq(¤t->sighand->siglock);
|
||||||
|
|
||||||
|
tracehook_signal_handler(signr, info, ka, regs, 0);
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void syscall_restart(unsigned long orig_i0, struct pt_regs *regs,
|
static inline void syscall_restart(unsigned long orig_i0, struct pt_regs *regs,
|
||||||
|
@ -571,16 +582,14 @@ static void do_signal(struct pt_regs *regs, unsigned long orig_i0)
|
||||||
if (signr > 0) {
|
if (signr > 0) {
|
||||||
if (restart_syscall)
|
if (restart_syscall)
|
||||||
syscall_restart(orig_i0, regs, &ka.sa);
|
syscall_restart(orig_i0, regs, &ka.sa);
|
||||||
handle_signal(signr, &ka, &info, oldset, regs);
|
if (handle_signal(signr, &ka, &info, oldset, regs) == 0) {
|
||||||
|
|
||||||
/* A signal was successfully delivered; the saved
|
/* A signal was successfully delivered; the saved
|
||||||
* sigmask will have been stored in the signal frame,
|
* sigmask will have been stored in the signal frame,
|
||||||
* and will be restored by sigreturn, so we can simply
|
* and will be restored by sigreturn, so we can simply
|
||||||
* clear the TS_RESTORE_SIGMASK flag.
|
* clear the TS_RESTORE_SIGMASK flag.
|
||||||
*/
|
*/
|
||||||
current_thread_info()->status &= ~TS_RESTORE_SIGMASK;
|
current_thread_info()->status &= ~TS_RESTORE_SIGMASK;
|
||||||
|
}
|
||||||
tracehook_signal_handler(signr, &info, &ka, regs, 0);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (restart_syscall &&
|
if (restart_syscall &&
|
||||||
|
@ -591,12 +600,14 @@ static void do_signal(struct pt_regs *regs, unsigned long orig_i0)
|
||||||
regs->u_regs[UREG_I0] = orig_i0;
|
regs->u_regs[UREG_I0] = orig_i0;
|
||||||
regs->tpc -= 4;
|
regs->tpc -= 4;
|
||||||
regs->tnpc -= 4;
|
regs->tnpc -= 4;
|
||||||
|
pt_regs_clear_syscall(regs);
|
||||||
}
|
}
|
||||||
if (restart_syscall &&
|
if (restart_syscall &&
|
||||||
regs->u_regs[UREG_I0] == ERESTART_RESTARTBLOCK) {
|
regs->u_regs[UREG_I0] == ERESTART_RESTARTBLOCK) {
|
||||||
regs->u_regs[UREG_G1] = __NR_restart_syscall;
|
regs->u_regs[UREG_G1] = __NR_restart_syscall;
|
||||||
regs->tpc -= 4;
|
regs->tpc -= 4;
|
||||||
regs->tnpc -= 4;
|
regs->tnpc -= 4;
|
||||||
|
pt_regs_clear_syscall(regs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If there's no signal to deliver, we just put the saved sigmask
|
/* If there's no signal to deliver, we just put the saved sigmask
|
||||||
|
|
|
@ -1506,13 +1506,6 @@ handle_ill:
|
||||||
}
|
}
|
||||||
STD_ENDPROC(handle_ill)
|
STD_ENDPROC(handle_ill)
|
||||||
|
|
||||||
.pushsection .rodata, "a"
|
|
||||||
.align 8
|
|
||||||
bpt_code:
|
|
||||||
bpt
|
|
||||||
ENDPROC(bpt_code)
|
|
||||||
.popsection
|
|
||||||
|
|
||||||
/* Various stub interrupt handlers and syscall handlers */
|
/* Various stub interrupt handlers and syscall handlers */
|
||||||
|
|
||||||
STD_ENTRY_LOCAL(_kernel_double_fault)
|
STD_ENTRY_LOCAL(_kernel_double_fault)
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue