Commit 0c4fb9bf authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://cifs.bkbits.net/linux-2.5cifs

into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents 8c592f24 27731c0c
...@@ -132,6 +132,17 @@ changes occur: ...@@ -132,6 +132,17 @@ changes occur:
translations for software managed TLB configurations. translations for software managed TLB configurations.
The sparc64 port currently does this. The sparc64 port currently does this.
7) void tlb_migrate_finish(struct mm_struct *mm)
This interface is called at the end of an explicit
process migration. This interface provides a hook
to allow a platform to update TLB or context-specific
information for the address space.
The ia64 sn2 platform is one example of a platform
that uses this interface.
Next, we have the cache flushing interfaces. In general, when Linux Next, we have the cache flushing interfaces. In general, when Linux
is changing an existing virtual-->physical mapping to a new value, is changing an existing virtual-->physical mapping to a new value,
the sequence will be in one of the following forms: the sequence will be in one of the following forms:
......
/* linux/arch/arm/mach-s3c2410/mach-vr1000.c /* linux/arch/arm/mach-s3c2410/mach-vr1000.c
* *
* Copyright (c) 2003 Simtec Electronics * Copyright (c) 2003,2004 Simtec Electronics
* Ben Dooks <ben@simtec.co.uk> * Ben Dooks <ben@simtec.co.uk>
* *
* http://www.simtec.co.uk/ * Machine support for Thorcom VR1000 board. Designed for Thorcom by
* Simtec Electronics, http://www.simtec.co.uk/
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as * 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.
* *
* Modifications: * Modifications:
* 12-Jul-2004 BJD Renamed machine
* 16-May-2003 BJD Created initial version * 16-May-2003 BJD Created initial version
* 16-Aug-2003 BJD Fixed header files and copyright, added URL * 16-Aug-2003 BJD Fixed header files and copyright, added URL
* 05-Sep-2003 BJD Moved to v2.6 kernel * 05-Sep-2003 BJD Moved to v2.6 kernel
...@@ -160,7 +162,7 @@ void __init vr1000_init_time(void) ...@@ -160,7 +162,7 @@ void __init vr1000_init_time(void)
s3c2401_init_time(); s3c2401_init_time();
} }
MACHINE_START(VR1000, "Simtec-VR1000") MACHINE_START(VR1000, "Thorcom-VR1000")
MAINTAINER("Ben Dooks <ben@simtec.co.uk>") MAINTAINER("Ben Dooks <ben@simtec.co.uk>")
BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, S3C2410_VA_UART) BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, S3C2410_VA_UART)
BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100) BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100)
......
...@@ -89,7 +89,7 @@ static struct platform_device *devices[] __initdata = { ...@@ -89,7 +89,7 @@ static struct platform_device *devices[] __initdata = {
&locomo_device, &locomo_device,
}; };
static int __init collie_init(void) static void __init collie_init(void)
{ {
int ret = 0; int ret = 0;
...@@ -120,14 +120,9 @@ static int __init collie_init(void) ...@@ -120,14 +120,9 @@ static int __init collie_init(void)
ret = platform_add_devices(devices, ARRAY_SIZE(devices)); ret = platform_add_devices(devices, ARRAY_SIZE(devices));
if (ret) { if (ret) {
printk(KERN_WARNING "collie: Unable to register LoCoMo device\n"); printk(KERN_WARNING "collie: Unable to register LoCoMo device\n");
return ret;
} }
return ret;
} }
arch_initcall(collie_init);
static struct map_desc collie_io_desc[] __initdata = { static struct map_desc collie_io_desc[] __initdata = {
/* virtual physical length type */ /* virtual physical length type */
{0xe8000000, 0x00000000, 0x02000000, MT_DEVICE}, /* 32M main flash (cs0) */ {0xe8000000, 0x00000000, 0x02000000, MT_DEVICE}, /* 32M main flash (cs0) */
...@@ -145,4 +140,5 @@ MACHINE_START(COLLIE, "Sharp-Collie") ...@@ -145,4 +140,5 @@ MACHINE_START(COLLIE, "Sharp-Collie")
BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000)
MAPIO(collie_map_io) MAPIO(collie_map_io)
INITIRQ(sa1100_init_irq) INITIRQ(sa1100_init_irq)
INIT_MACHINE(collie_init)
MACHINE_END MACHINE_END
...@@ -32,7 +32,7 @@ ENTRY(ia32_execve) ...@@ -32,7 +32,7 @@ ENTRY(ia32_execve)
END(ia32_execve) END(ia32_execve)
ENTRY(ia32_clone) ENTRY(ia32_clone)
.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(2) .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(5)
alloc r16=ar.pfs,5,2,6,0 alloc r16=ar.pfs,5,2,6,0
DO_SAVE_SWITCH_STACK DO_SAVE_SWITCH_STACK
mov loc0=rp mov loc0=rp
...@@ -110,7 +110,9 @@ GLOBAL_ENTRY(ia32_ret_from_clone) ...@@ -110,7 +110,9 @@ GLOBAL_ENTRY(ia32_ret_from_clone)
ld4 r2=[r2] ld4 r2=[r2]
;; ;;
mov r8=0 mov r8=0
tbit.nz p6,p0=r2,TIF_SYSCALL_TRACE and r2=_TIF_SYSCALL_TRACEAUDIT,r2
;;
cmp.ne p6,p0=r2,r0
(p6) br.cond.spnt .ia32_strace_check_retval (p6) br.cond.spnt .ia32_strace_check_retval
;; // prevent RAW on r8 ;; // prevent RAW on r8
END(ia32_ret_from_clone) END(ia32_ret_from_clone)
...@@ -142,7 +144,7 @@ GLOBAL_ENTRY(ia32_trace_syscall) ...@@ -142,7 +144,7 @@ GLOBAL_ENTRY(ia32_trace_syscall)
adds r2=IA64_PT_REGS_R8_OFFSET+16,sp adds r2=IA64_PT_REGS_R8_OFFSET+16,sp
;; ;;
st8 [r2]=r3 // initialize return code to -ENOSYS st8 [r2]=r3 // initialize return code to -ENOSYS
br.call.sptk.few rp=syscall_trace // give parent a chance to catch syscall args br.call.sptk.few rp=syscall_trace_enter // give parent a chance to catch syscall args
.ret2: // Need to reload arguments (they may be changed by the tracing process) .ret2: // Need to reload arguments (they may be changed by the tracing process)
adds r2=IA64_PT_REGS_R1_OFFSET+16,sp // r2 = &pt_regs.r1 adds r2=IA64_PT_REGS_R1_OFFSET+16,sp // r2 = &pt_regs.r1
adds r3=IA64_PT_REGS_R13_OFFSET+16,sp // r3 = &pt_regs.r13 adds r3=IA64_PT_REGS_R13_OFFSET+16,sp // r3 = &pt_regs.r13
...@@ -170,7 +172,7 @@ GLOBAL_ENTRY(ia32_trace_syscall) ...@@ -170,7 +172,7 @@ GLOBAL_ENTRY(ia32_trace_syscall)
adds r2=IA64_PT_REGS_R8_OFFSET+16,sp // r2 = &pt_regs.r8 adds r2=IA64_PT_REGS_R8_OFFSET+16,sp // r2 = &pt_regs.r8
;; ;;
st8.spill [r2]=r8 // store return value in slot for r8 st8.spill [r2]=r8 // store return value in slot for r8
br.call.sptk.few rp=syscall_trace // give parent a chance to catch return value br.call.sptk.few rp=syscall_trace_leave // give parent a chance to catch return value
.ret4: alloc r2=ar.pfs,0,0,0,0 // drop the syscall argument frame .ret4: alloc r2=ar.pfs,0,0,0,0 // drop the syscall argument frame
br.cond.sptk.many ia64_leave_kernel br.cond.sptk.many ia64_leave_kernel
END(ia32_trace_syscall) END(ia32_trace_syscall)
......
...@@ -1996,7 +1996,7 @@ sys32_sigaltstack (ia32_stack_t *uss32, ia32_stack_t *uoss32, ...@@ -1996,7 +1996,7 @@ sys32_sigaltstack (ia32_stack_t *uss32, ia32_stack_t *uoss32,
int ret; int ret;
mm_segment_t old_fs = get_fs(); mm_segment_t old_fs = get_fs();
if (uss32) if (uss32) {
if (copy_from_user(&buf32, uss32, sizeof(ia32_stack_t))) if (copy_from_user(&buf32, uss32, sizeof(ia32_stack_t)))
return -EFAULT; return -EFAULT;
uss.ss_sp = (void *) (long) buf32.ss_sp; uss.ss_sp = (void *) (long) buf32.ss_sp;
...@@ -2008,6 +2008,7 @@ sys32_sigaltstack (ia32_stack_t *uss32, ia32_stack_t *uoss32, ...@@ -2008,6 +2008,7 @@ sys32_sigaltstack (ia32_stack_t *uss32, ia32_stack_t *uoss32,
goto out; goto out;
} }
uss.ss_size = MINSIGSTKSZ; uss.ss_size = MINSIGSTKSZ;
}
set_fs(KERNEL_DS); set_fs(KERNEL_DS);
ret = do_sigaltstack(uss32 ? &uss : NULL, &uoss, pt->r12); ret = do_sigaltstack(uss32 ? &uss : NULL, &uoss, pt->r12);
current->sas_ss_size = buf32.ss_size; current->sas_ss_size = buf32.ss_size;
......
...@@ -48,11 +48,13 @@ static efi_status_t \ ...@@ -48,11 +48,13 @@ static efi_status_t \
prefix##_get_time (efi_time_t *tm, efi_time_cap_t *tc) \ prefix##_get_time (efi_time_t *tm, efi_time_cap_t *tc) \
{ \ { \
struct ia64_fpreg fr[6]; \ struct ia64_fpreg fr[6]; \
efi_time_cap_t *atc = 0; \
efi_status_t ret; \ efi_status_t ret; \
\ \
if (tc) \
atc = adjust_arg(tc); \
ia64_save_scratch_fpregs(fr); \ ia64_save_scratch_fpregs(fr); \
ret = efi_call_##prefix((efi_get_time_t *) __va(runtime->get_time), adjust_arg(tm), \ ret = efi_call_##prefix((efi_get_time_t *) __va(runtime->get_time), adjust_arg(tm), atc); \
adjust_arg(tc)); \
ia64_load_scratch_fpregs(fr); \ ia64_load_scratch_fpregs(fr); \
return ret; \ return ret; \
} }
...@@ -89,11 +91,14 @@ static efi_status_t \ ...@@ -89,11 +91,14 @@ static efi_status_t \
prefix##_set_wakeup_time (efi_bool_t enabled, efi_time_t *tm) \ prefix##_set_wakeup_time (efi_bool_t enabled, efi_time_t *tm) \
{ \ { \
struct ia64_fpreg fr[6]; \ struct ia64_fpreg fr[6]; \
efi_time_t *atm = 0; \
efi_status_t ret; \ efi_status_t ret; \
\ \
if (tm) \
atm = adjust_arg(tm); \
ia64_save_scratch_fpregs(fr); \ ia64_save_scratch_fpregs(fr); \
ret = efi_call_##prefix((efi_set_wakeup_time_t *) __va(runtime->set_wakeup_time), \ ret = efi_call_##prefix((efi_set_wakeup_time_t *) __va(runtime->set_wakeup_time), \
enabled, adjust_arg(tm)); \ enabled, atm); \
ia64_load_scratch_fpregs(fr); \ ia64_load_scratch_fpregs(fr); \
return ret; \ return ret; \
} }
...@@ -104,11 +109,14 @@ prefix##_get_variable (efi_char16_t *name, efi_guid_t *vendor, u32 *attr, \ ...@@ -104,11 +109,14 @@ prefix##_get_variable (efi_char16_t *name, efi_guid_t *vendor, u32 *attr, \
unsigned long *data_size, void *data) \ unsigned long *data_size, void *data) \
{ \ { \
struct ia64_fpreg fr[6]; \ struct ia64_fpreg fr[6]; \
u32 *aattr = 0; \
efi_status_t ret; \ efi_status_t ret; \
\ \
if (attr) \
aattr = adjust_arg(attr); \
ia64_save_scratch_fpregs(fr); \ ia64_save_scratch_fpregs(fr); \
ret = efi_call_##prefix((efi_get_variable_t *) __va(runtime->get_variable), \ ret = efi_call_##prefix((efi_get_variable_t *) __va(runtime->get_variable), \
adjust_arg(name), adjust_arg(vendor), adjust_arg(attr), \ adjust_arg(name), adjust_arg(vendor), aattr, \
adjust_arg(data_size), adjust_arg(data)); \ adjust_arg(data_size), adjust_arg(data)); \
ia64_load_scratch_fpregs(fr); \ ia64_load_scratch_fpregs(fr); \
return ret; \ return ret; \
...@@ -164,33 +172,41 @@ prefix##_reset_system (int reset_type, efi_status_t status, \ ...@@ -164,33 +172,41 @@ prefix##_reset_system (int reset_type, efi_status_t status, \
unsigned long data_size, efi_char16_t *data) \ unsigned long data_size, efi_char16_t *data) \
{ \ { \
struct ia64_fpreg fr[6]; \ struct ia64_fpreg fr[6]; \
efi_char16_t *adata = 0; \
\
if (data) \
adata = adjust_arg(data); \
\ \
ia64_save_scratch_fpregs(fr); \ ia64_save_scratch_fpregs(fr); \
efi_call_##prefix((efi_reset_system_t *) __va(runtime->reset_system), \ efi_call_##prefix((efi_reset_system_t *) __va(runtime->reset_system), \
reset_type, status, data_size, adjust_arg(data)); \ reset_type, status, data_size, adata); \
/* should not return, but just in case... */ \ /* should not return, but just in case... */ \
ia64_load_scratch_fpregs(fr); \ ia64_load_scratch_fpregs(fr); \
} }
STUB_GET_TIME(phys, __pa) #define phys_ptr(arg) ((__typeof__(arg)) ia64_tpa(arg))
STUB_SET_TIME(phys, __pa)
STUB_GET_WAKEUP_TIME(phys, __pa) STUB_GET_TIME(phys, phys_ptr)
STUB_SET_WAKEUP_TIME(phys, __pa) STUB_SET_TIME(phys, phys_ptr)
STUB_GET_VARIABLE(phys, __pa) STUB_GET_WAKEUP_TIME(phys, phys_ptr)
STUB_GET_NEXT_VARIABLE(phys, __pa) STUB_SET_WAKEUP_TIME(phys, phys_ptr)
STUB_SET_VARIABLE(phys, __pa) STUB_GET_VARIABLE(phys, phys_ptr)
STUB_GET_NEXT_HIGH_MONO_COUNT(phys, __pa) STUB_GET_NEXT_VARIABLE(phys, phys_ptr)
STUB_RESET_SYSTEM(phys, __pa) STUB_SET_VARIABLE(phys, phys_ptr)
STUB_GET_NEXT_HIGH_MONO_COUNT(phys, phys_ptr)
STUB_GET_TIME(virt, ) STUB_RESET_SYSTEM(phys, phys_ptr)
STUB_SET_TIME(virt, )
STUB_GET_WAKEUP_TIME(virt, ) #define id(arg) arg
STUB_SET_WAKEUP_TIME(virt, )
STUB_GET_VARIABLE(virt, ) STUB_GET_TIME(virt, id)
STUB_GET_NEXT_VARIABLE(virt, ) STUB_SET_TIME(virt, id)
STUB_SET_VARIABLE(virt, ) STUB_GET_WAKEUP_TIME(virt, id)
STUB_GET_NEXT_HIGH_MONO_COUNT(virt, ) STUB_SET_WAKEUP_TIME(virt, id)
STUB_RESET_SYSTEM(virt, ) STUB_GET_VARIABLE(virt, id)
STUB_GET_NEXT_VARIABLE(virt, id)
STUB_SET_VARIABLE(virt, id)
STUB_GET_NEXT_HIGH_MONO_COUNT(virt, id)
STUB_RESET_SYSTEM(virt, id)
void void
efi_gettimeofday (struct timespec *ts) efi_gettimeofday (struct timespec *ts)
......
...@@ -508,7 +508,7 @@ GLOBAL_ENTRY(ia64_trace_syscall) ...@@ -508,7 +508,7 @@ GLOBAL_ENTRY(ia64_trace_syscall)
;; ;;
stf.spill [r16]=f10 stf.spill [r16]=f10
stf.spill [r17]=f11 stf.spill [r17]=f11
br.call.sptk.many rp=syscall_trace // give parent a chance to catch syscall args br.call.sptk.many rp=syscall_trace_enter // give parent a chance to catch syscall args
adds r16=PT(F6)+16,sp adds r16=PT(F6)+16,sp
adds r17=PT(F7)+16,sp adds r17=PT(F7)+16,sp
;; ;;
...@@ -548,7 +548,7 @@ GLOBAL_ENTRY(ia64_trace_syscall) ...@@ -548,7 +548,7 @@ GLOBAL_ENTRY(ia64_trace_syscall)
.strace_save_retval: .strace_save_retval:
.mem.offset 0,0; st8.spill [r2]=r8 // store return value in slot for r8 .mem.offset 0,0; st8.spill [r2]=r8 // store return value in slot for r8
.mem.offset 8,0; st8.spill [r3]=r10 // clear error indication in slot for r10 .mem.offset 8,0; st8.spill [r3]=r10 // clear error indication in slot for r10
br.call.sptk.many rp=syscall_trace // give parent a chance to catch return value br.call.sptk.many rp=syscall_trace_leave // give parent a chance to catch return value
.ret3: br.cond.sptk ia64_leave_syscall .ret3: br.cond.sptk ia64_leave_syscall
strace_error: strace_error:
...@@ -575,7 +575,7 @@ GLOBAL_ENTRY(ia64_strace_leave_kernel) ...@@ -575,7 +575,7 @@ GLOBAL_ENTRY(ia64_strace_leave_kernel)
*/ */
nop.m 0 nop.m 0
nop.i 0 nop.i 0
br.call.sptk.many rp=syscall_trace // give parent a chance to catch return value br.call.sptk.many rp=syscall_trace_leave // give parent a chance to catch return value
} }
.ret4: br.cond.sptk ia64_leave_kernel .ret4: br.cond.sptk ia64_leave_kernel
END(ia64_strace_leave_kernel) END(ia64_strace_leave_kernel)
...@@ -601,7 +601,9 @@ GLOBAL_ENTRY(ia64_ret_from_clone) ...@@ -601,7 +601,9 @@ GLOBAL_ENTRY(ia64_ret_from_clone)
ld4 r2=[r2] ld4 r2=[r2]
;; ;;
mov r8=0 mov r8=0
tbit.nz p6,p0=r2,TIF_SYSCALL_TRACE and r2=_TIF_SYSCALL_TRACEAUDIT,r2
;;
cmp.ne p6,p0=r2,r0
(p6) br.cond.spnt .strace_check_retval (p6) br.cond.spnt .strace_check_retval
;; // added stop bits to prevent r8 dependency ;; // added stop bits to prevent r8 dependency
END(ia64_ret_from_clone) END(ia64_ret_from_clone)
...@@ -663,25 +665,31 @@ GLOBAL_ENTRY(ia64_leave_syscall) ...@@ -663,25 +665,31 @@ GLOBAL_ENTRY(ia64_leave_syscall)
PT_REGS_UNWIND_INFO(0) PT_REGS_UNWIND_INFO(0)
/* /*
* work.need_resched etc. mustn't get changed by this CPU before it returns to * work.need_resched etc. mustn't get changed by this CPU before it returns to
* user- or fsys-mode, hence we disable interrupts early on: * user- or fsys-mode, hence we disable interrupts early on.
*
* p6 controls whether current_thread_info()->flags needs to be check for
* extra work. We always check for extra work when returning to user-level.
* With CONFIG_PREEMPT, we also check for extra work when the preempt_count
* is 0. After extra work processing has been completed, execution
* resumes at .work_processed_syscall with p6 set to 1 if the extra-work-check
* needs to be redone.
*/ */
#ifdef CONFIG_PREEMPT #ifdef CONFIG_PREEMPT
rsm psr.i // disable interrupts rsm psr.i // disable interrupts
#else
(pUStk) rsm psr.i
#endif
cmp.eq pLvSys,p0=r0,r0 // pLvSys=1: leave from syscall cmp.eq pLvSys,p0=r0,r0 // pLvSys=1: leave from syscall
(pUStk) cmp.eq.unc p6,p0=r0,r0 // p6 <- pUStk
.work_processed_syscall:
#ifdef CONFIG_PREEMPT
(pKStk) adds r20=TI_PRE_COUNT+IA64_TASK_SIZE,r13 (pKStk) adds r20=TI_PRE_COUNT+IA64_TASK_SIZE,r13
;; ;;
.pred.rel.mutex pUStk,pKStk .pred.rel.mutex pUStk,pKStk
(pKStk) ld4 r21=[r20] // r21 <- preempt_count (pKStk) ld4 r21=[r20] // r21 <- preempt_count
(pUStk) mov r21=0 // r21 <- 0 (pUStk) mov r21=0 // r21 <- 0
;; ;;
(p6) cmp.eq.unc p6,p0=r21,r0 // p6 <- p6 && (r21 == 0) cmp.eq p6,p0=r21,r0 // p6 <- pUStk || (preempt_count == 0)
#endif /* CONFIG_PREEMPT */ #else /* !CONFIG_PREEMPT */
(pUStk) rsm psr.i
cmp.eq pLvSys,p0=r0,r0 // pLvSys=1: leave from syscall
(pUStk) cmp.eq.unc p6,p0=r0,r0 // p6 <- pUStk
#endif
.work_processed_syscall:
adds r16=PT(LOADRS)+16,r12 adds r16=PT(LOADRS)+16,r12
adds r17=PT(AR_BSPSTORE)+16,r12 adds r17=PT(AR_BSPSTORE)+16,r12
adds r18=TI_FLAGS+IA64_TASK_SIZE,r13 adds r18=TI_FLAGS+IA64_TASK_SIZE,r13
...@@ -776,26 +784,31 @@ GLOBAL_ENTRY(ia64_leave_kernel) ...@@ -776,26 +784,31 @@ GLOBAL_ENTRY(ia64_leave_kernel)
PT_REGS_UNWIND_INFO(0) PT_REGS_UNWIND_INFO(0)
/* /*
* work.need_resched etc. mustn't get changed by this CPU before it returns to * work.need_resched etc. mustn't get changed by this CPU before it returns to
* user- or fsys-mode, hence we disable interrupts early on: * user- or fsys-mode, hence we disable interrupts early on.
*
* p6 controls whether current_thread_info()->flags needs to be check for
* extra work. We always check for extra work when returning to user-level.
* With CONFIG_PREEMPT, we also check for extra work when the preempt_count
* is 0. After extra work processing has been completed, execution
* resumes at .work_processed_syscall with p6 set to 1 if the extra-work-check
* needs to be redone.
*/ */
#ifdef CONFIG_PREEMPT #ifdef CONFIG_PREEMPT
rsm psr.i // disable interrupts rsm psr.i // disable interrupts
#else
(pUStk) rsm psr.i
#endif
cmp.eq p0,pLvSys=r0,r0 // pLvSys=0: leave from kernel cmp.eq p0,pLvSys=r0,r0 // pLvSys=0: leave from kernel
(pUStk) cmp.eq.unc p6,p0=r0,r0 // p6 <- pUStk (pKStk) adds r20=TI_PRE_COUNT+IA64_TASK_SIZE,r13
;;
.work_processed_kernel:
#ifdef CONFIG_PREEMPT
adds r20=TI_PRE_COUNT+IA64_TASK_SIZE,r13
;; ;;
.pred.rel.mutex pUStk,pKStk .pred.rel.mutex pUStk,pKStk
(pKStk) ld4 r21=[r20] // r21 <- preempt_count (pKStk) ld4 r21=[r20] // r21 <- preempt_count
(pUStk) mov r21=0 // r21 <- 0 (pUStk) mov r21=0 // r21 <- 0
;; ;;
(p6) cmp.eq.unc p6,p0=r21,r0 // p6 <- p6 && (r21 == 0) cmp.eq p6,p0=r21,r0 // p6 <- pUStk || (preempt_count == 0)
#endif /* CONFIG_PREEMPT */ #else
(pUStk) rsm psr.i
cmp.eq p0,pLvSys=r0,r0 // pLvSys=0: leave from kernel
(pUStk) cmp.eq.unc p6,p0=r0,r0 // p6 <- pUStk
#endif
.work_processed_kernel:
adds r17=TI_FLAGS+IA64_TASK_SIZE,r13 adds r17=TI_FLAGS+IA64_TASK_SIZE,r13
;; ;;
(p6) ld4 r31=[r17] // load current_thread_info()->flags (p6) ld4 r31=[r17] // load current_thread_info()->flags
...@@ -1065,7 +1078,7 @@ skip_rbs_switch: ...@@ -1065,7 +1078,7 @@ skip_rbs_switch:
br.cond.sptk.many .work_processed_kernel // re-check br.cond.sptk.many .work_processed_kernel // re-check
.notify: .notify:
br.call.spnt.many rp=notify_resume_user (pUStk) br.call.spnt.many rp=notify_resume_user
.ret10: cmp.ne p6,p0=r0,r0 // p6 <- 0 .ret10: cmp.ne p6,p0=r0,r0 // p6 <- 0
(pLvSys)br.cond.sptk.many .work_processed_syscall // don't re-check (pLvSys)br.cond.sptk.many .work_processed_syscall // don't re-check
br.cond.sptk.many .work_processed_kernel // don't re-check br.cond.sptk.many .work_processed_kernel // don't re-check
......
...@@ -165,7 +165,6 @@ ENTRY(fsys_gettimeofday) ...@@ -165,7 +165,6 @@ ENTRY(fsys_gettimeofday)
add r9=TI_FLAGS+IA64_TASK_SIZE,r16 add r9=TI_FLAGS+IA64_TASK_SIZE,r16
addl r3=THIS_CPU(cpu_info),r0 addl r3=THIS_CPU(cpu_info),r0
mov.m r31=ar.itc // put time stamp into r31 (ITC) == now (35 cyc)
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
movl r10=__per_cpu_offset movl r10=__per_cpu_offset
movl r2=sal_platform_features movl r2=sal_platform_features
...@@ -240,12 +239,13 @@ EX(.fail_efault, probe.w.fault r10, 3) // this must come _after_ NaT-check ...@@ -240,12 +239,13 @@ EX(.fail_efault, probe.w.fault r10, 3) // this must come _after_ NaT-check
;; ;;
ldf8 f8=[r21] // f8 now contains itm_next ldf8 f8=[r21] // f8 now contains itm_next
mov.m r31=ar.itc // put time stamp into r31 (ITC) == now
sub r28=r29, r28, 1 // r28 now contains "-(lost + 1)" sub r28=r29, r28, 1 // r28 now contains "-(lost + 1)"
tbit.nz p9, p10=r23, 0 // p9 <- is_odd(r23), p10 <- is_even(r23)
;; ;;
ld8 r2=[r19] // r2 = sec = xtime.tv_sec ld8 r2=[r19] // r2 = sec = xtime.tv_sec
ld8 r29=[r20] // r29 = nsec = xtime.tv_nsec ld8 r29=[r20] // r29 = nsec = xtime.tv_nsec
tbit.nz p9, p10=r23, 0 // p9 <- is_odd(r23), p10 <- is_even(r23)
setf.sig f6=r28 // f6 <- -(lost + 1) (6 cyc) setf.sig f6=r28 // f6 <- -(lost + 1) (6 cyc)
;; ;;
...@@ -260,7 +260,6 @@ EX(.fail_efault, probe.w.fault r10, 3) // this must come _after_ NaT-check ...@@ -260,7 +260,6 @@ EX(.fail_efault, probe.w.fault r10, 3) // this must come _after_ NaT-check
nop 0 nop 0
;; ;;
mov r31=ar.itc // re-read ITC in case we .retry (35 cyc)
xma.l f8=f11, f8, f12 // f8 (elapsed_cycles) <- (-1*last_tick + now) = (now - last_tick) xma.l f8=f11, f8, f12 // f8 (elapsed_cycles) <- (-1*last_tick + now) = (now - last_tick)
nop 0 nop 0
;; ;;
......
...@@ -752,7 +752,9 @@ ENTRY(break_fault) ...@@ -752,7 +752,9 @@ ENTRY(break_fault)
;; ;;
ld4 r2=[r2] // r2 = current_thread_info()->flags ld4 r2=[r2] // r2 = current_thread_info()->flags
;; ;;
tbit.z p8,p0=r2,TIF_SYSCALL_TRACE and r2=_TIF_SYSCALL_TRACEAUDIT,r2 // mask trace or audit
;;
cmp.eq p8,p0=r2,r0
mov b6=r20 mov b6=r20
;; ;;
(p8) br.call.sptk.many b6=b6 // ignore this return addr (p8) br.call.sptk.many b6=b6 // ignore this return addr
...@@ -1573,10 +1575,11 @@ ENTRY(dispatch_to_ia32_handler) ...@@ -1573,10 +1575,11 @@ ENTRY(dispatch_to_ia32_handler)
ld4 r2=[r2] // r2 = current_thread_info()->flags ld4 r2=[r2] // r2 = current_thread_info()->flags
;; ;;
ld8 r16=[r16] ld8 r16=[r16]
tbit.z p8,p0=r2,TIF_SYSCALL_TRACE and r2=_TIF_SYSCALL_TRACEAUDIT,r2 // mask trace or audit
;; ;;
mov b6=r16 mov b6=r16
movl r15=ia32_ret_from_syscall movl r15=ia32_ret_from_syscall
cmp.eq p8,p0=r2,r0
;; ;;
mov rp=r15 mov rp=r15
(p8) br.call.sptk.many b6=b6 (p8) br.call.sptk.many b6=b6
......
...@@ -43,12 +43,6 @@ machvec_init (const char *name) ...@@ -43,12 +43,6 @@ machvec_init (const char *name)
#endif /* CONFIG_IA64_GENERIC */ #endif /* CONFIG_IA64_GENERIC */
void
machvec_noop (void)
{
}
EXPORT_SYMBOL(machvec_noop);
void void
machvec_setup (char **arg) machvec_setup (char **arg)
{ {
......
...@@ -247,7 +247,9 @@ ia64_mca_log_sal_error_record(int sal_info_type) ...@@ -247,7 +247,9 @@ ia64_mca_log_sal_error_record(int sal_info_type)
u8 *buffer; u8 *buffer;
u64 size; u64 size;
int irq_safe = sal_info_type != SAL_INFO_TYPE_MCA && sal_info_type != SAL_INFO_TYPE_INIT; int irq_safe = sal_info_type != SAL_INFO_TYPE_MCA && sal_info_type != SAL_INFO_TYPE_INIT;
#ifdef IA64_MCA_DEBUG_INFO
static const char * const rec_name[] = { "MCA", "INIT", "CMC", "CPE" }; static const char * const rec_name[] = { "MCA", "INIT", "CMC", "CPE" };
#endif
size = ia64_log_get(sal_info_type, &buffer, irq_safe); size = ia64_log_get(sal_info_type, &buffer, irq_safe);
if (!size) if (!size)
...@@ -596,7 +598,7 @@ ia64_mca_cmc_vector_disable (void *dummy) ...@@ -596,7 +598,7 @@ ia64_mca_cmc_vector_disable (void *dummy)
cmcv = (cmcv_reg_t)ia64_getreg(_IA64_REG_CR_CMCV); cmcv = (cmcv_reg_t)ia64_getreg(_IA64_REG_CR_CMCV);
cmcv.cmcv_mask = 1; /* Mask/disable interrupt */ cmcv.cmcv_mask = 1; /* Mask/disable interrupt */
ia64_setreg(_IA64_REG_CR_CMCV, cmcv.cmcv_regval) ia64_setreg(_IA64_REG_CR_CMCV, cmcv.cmcv_regval);
IA64_MCA_DEBUG("%s: CPU %d corrected " IA64_MCA_DEBUG("%s: CPU %d corrected "
"machine check vector %#x disabled.\n", "machine check vector %#x disabled.\n",
...@@ -623,7 +625,7 @@ ia64_mca_cmc_vector_enable (void *dummy) ...@@ -623,7 +625,7 @@ ia64_mca_cmc_vector_enable (void *dummy)
cmcv = (cmcv_reg_t)ia64_getreg(_IA64_REG_CR_CMCV); cmcv = (cmcv_reg_t)ia64_getreg(_IA64_REG_CR_CMCV);
cmcv.cmcv_mask = 0; /* Unmask/enable interrupt */ cmcv.cmcv_mask = 0; /* Unmask/enable interrupt */
ia64_setreg(_IA64_REG_CR_CMCV, cmcv.cmcv_regval) ia64_setreg(_IA64_REG_CR_CMCV, cmcv.cmcv_regval);
IA64_MCA_DEBUG("%s: CPU %d corrected " IA64_MCA_DEBUG("%s: CPU %d corrected "
"machine check vector %#x enabled.\n", "machine check vector %#x enabled.\n",
......
...@@ -656,26 +656,18 @@ do_reloc (struct module *mod, uint8_t r_type, Elf64_Sym *sym, uint64_t addend, ...@@ -656,26 +656,18 @@ do_reloc (struct module *mod, uint8_t r_type, Elf64_Sym *sym, uint64_t addend,
case RV_PCREL: case RV_PCREL:
switch (r_type) { switch (r_type) {
case R_IA64_PCREL21B: case R_IA64_PCREL21B:
if (in_init(mod, val)) { if ((in_init(mod, val) && in_core(mod, (uint64_t)location)) ||
/* Calls to init code from core are bad news */ (in_core(mod, val) && in_init(mod, (uint64_t)location))) {
if (in_core(mod, (uint64_t)location)) {
printk(KERN_ERR "%s: init symbol 0x%lx used in module code at %p\n",
mod->name, val, location);
return -ENOEXEC;
}
} else if (in_core(mod, val)) {
/* /*
* Init section may have been allocated far away from core, * Init section may have been allocated far away from core,
* if the branch won't reach, then allocate a plt for it. * if the branch won't reach, then allocate a plt for it.
*/ */
if (in_init(mod, (uint64_t)location)) {
uint64_t delta = ((int64_t)val - (int64_t)location) / 16; uint64_t delta = ((int64_t)val - (int64_t)location) / 16;
if (delta + (1 << 20) >= (1 << 21)) { if (delta + (1 << 20) >= (1 << 21)) {
val = get_fdesc(mod, val, &ok); val = get_fdesc(mod, val, &ok);
val = get_plt(mod, location, val, &ok); val = get_plt(mod, location, val, &ok);
} }
} } else if (!is_internal(mod, val))
} else
val = get_plt(mod, location, val, &ok); val = get_plt(mod, location, val, &ok);
/* FALL THROUGH */ /* FALL THROUGH */
default: default:
......
...@@ -54,7 +54,7 @@ END(ia64_pal_default_handler) ...@@ -54,7 +54,7 @@ END(ia64_pal_default_handler)
* *
*/ */
GLOBAL_ENTRY(ia64_pal_call_static) GLOBAL_ENTRY(ia64_pal_call_static)
.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(6) .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(5)
alloc loc1 = ar.pfs,5,5,0,0 alloc loc1 = ar.pfs,5,5,0,0
movl loc2 = pal_entry_point movl loc2 = pal_entry_point
1: { 1: {
...@@ -100,7 +100,7 @@ END(ia64_pal_call_static) ...@@ -100,7 +100,7 @@ END(ia64_pal_call_static)
* in2 - in3 Remaning PAL arguments * in2 - in3 Remaning PAL arguments
*/ */
GLOBAL_ENTRY(ia64_pal_call_stacked) GLOBAL_ENTRY(ia64_pal_call_stacked)
.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(5) .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(4)
alloc loc1 = ar.pfs,4,4,4,0 alloc loc1 = ar.pfs,4,4,4,0
movl loc2 = pal_entry_point movl loc2 = pal_entry_point
...@@ -147,7 +147,7 @@ END(ia64_pal_call_stacked) ...@@ -147,7 +147,7 @@ END(ia64_pal_call_stacked)
GLOBAL_ENTRY(ia64_pal_call_phys_static) GLOBAL_ENTRY(ia64_pal_call_phys_static)
.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(6) .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(4)
alloc loc1 = ar.pfs,4,7,0,0 alloc loc1 = ar.pfs,4,7,0,0
movl loc2 = pal_entry_point movl loc2 = pal_entry_point
1: { 1: {
......
...@@ -4702,11 +4702,12 @@ static int ...@@ -4702,11 +4702,12 @@ static int
pfm_check_task_state(pfm_context_t *ctx, int cmd, unsigned long flags) pfm_check_task_state(pfm_context_t *ctx, int cmd, unsigned long flags)
{ {
struct task_struct *task; struct task_struct *task;
int state; int state, old_state;
recheck:
state = ctx->ctx_state; state = ctx->ctx_state;
task = ctx->ctx_task;
task = PFM_CTX_TASK(ctx);
if (task == NULL) { if (task == NULL) {
DPRINT(("context %d no task, state=%d\n", ctx->ctx_fd, state)); DPRINT(("context %d no task, state=%d\n", ctx->ctx_fd, state));
return 0; return 0;
...@@ -4728,24 +4729,46 @@ pfm_check_task_state(pfm_context_t *ctx, int cmd, unsigned long flags) ...@@ -4728,24 +4729,46 @@ pfm_check_task_state(pfm_context_t *ctx, int cmd, unsigned long flags)
if (task == current || ctx->ctx_fl_system) return 0; if (task == current || ctx->ctx_fl_system) return 0;
/* /*
* context is UNLOADED, MASKED we are safe to go * no command can operate on a zombie context
*/ */
if (state != PFM_CTX_LOADED) return 0; if (state == PFM_CTX_ZOMBIE) {
DPRINT(("cmd %d state zombie cannot operate on context\n", cmd));
return -EINVAL;
}
if (state == PFM_CTX_ZOMBIE) return -EINVAL; /*
* if context is UNLOADED, MASKED we are safe to go
*/
if (state != PFM_CTX_LOADED) return 0;
/* /*
* context is loaded, we must make sure the task is stopped * context is LOADED, we must make sure the task is stopped
* We could lift this restriction for UP but it would mean that * We could lift this restriction for UP but it would mean that
* the user has no guarantee the task would not run between * the user has no guarantee the task would not run between
* two successive calls to perfmonctl(). That's probably OK. * two successive calls to perfmonctl(). That's probably OK.
* If this user wants to ensure the task does not run, then * If this user wants to ensure the task does not run, then
* the task must be stopped. * the task must be stopped.
*/ */
if (PFM_CMD_STOPPED(cmd) && task->state != TASK_STOPPED) { if (PFM_CMD_STOPPED(cmd)) {
if (task->state != TASK_STOPPED) {
DPRINT(("[%d] task not in stopped state\n", task->pid)); DPRINT(("[%d] task not in stopped state\n", task->pid));
return -EBUSY; return -EBUSY;
} }
/*
* task is now stopped, wait for ctxsw out
*
* This is an interesting point in the code.
* We need to unprotect the context because
* the pfm_save_regs() routines needs to grab
* the same lock. There are danger in doing
* this because it leaves a window open for
* another task to get access to the context
* and possibly change its state. The one thing
* that is not possible is for the context to disappear
* because we are protected by the VFS layer, i.e.,
* get_fd()/put_fd().
*/
old_state = state;
UNPROTECT_CTX(ctx, flags); UNPROTECT_CTX(ctx, flags);
...@@ -4753,6 +4776,14 @@ pfm_check_task_state(pfm_context_t *ctx, int cmd, unsigned long flags) ...@@ -4753,6 +4776,14 @@ pfm_check_task_state(pfm_context_t *ctx, int cmd, unsigned long flags)
PROTECT_CTX(ctx, flags); PROTECT_CTX(ctx, flags);
/*
* we must recheck to verify if state has changed
*/
if (ctx->ctx_state != old_state) {
DPRINT(("old_state=%d new_state=%d\n", old_state, ctx->ctx_state));
goto recheck;
}
}
return 0; return 0;
} }
......
...@@ -1447,9 +1447,8 @@ sys_ptrace (long request, pid_t pid, unsigned long addr, unsigned long data, ...@@ -1447,9 +1447,8 @@ sys_ptrace (long request, pid_t pid, unsigned long addr, unsigned long data,
return ret; return ret;
} }
/* "asmlinkage" so the input arguments are preserved... */
asmlinkage void void
syscall_trace (void) syscall_trace (void)
{ {
if (!test_thread_flag(TIF_SYSCALL_TRACE)) if (!test_thread_flag(TIF_SYSCALL_TRACE))
...@@ -1472,3 +1471,38 @@ syscall_trace (void) ...@@ -1472,3 +1471,38 @@ syscall_trace (void)
current->exit_code = 0; current->exit_code = 0;
} }
} }
/* "asmlinkage" so the input arguments are preserved... */
asmlinkage void
syscall_trace_enter (long arg0, long arg1, long arg2, long arg3,
long arg4, long arg5, long arg6, long arg7, long stack)
{
struct pt_regs *regs = (struct pt_regs *) &stack;
long syscall;
if (unlikely(current->audit_context)) {
if (IS_IA32_PROCESS(regs))
syscall = regs->r1;
else
syscall = regs->r15;
audit_syscall_entry(current, syscall, arg0, arg1, arg2, arg3);
}
if (test_thread_flag(TIF_SYSCALL_TRACE) && (current->ptrace & PT_PTRACED))
syscall_trace();
}
/* "asmlinkage" so the input arguments are preserved... */
asmlinkage void
syscall_trace_leave (long arg0, long arg1, long arg2, long arg3,
long arg4, long arg5, long arg6, long arg7, long stack)
{
if (unlikely(current->audit_context))
audit_syscall_exit(current, ((struct pt_regs *) &stack)->r8);
if (test_thread_flag(TIF_SYSCALL_TRACE) && (current->ptrace & PT_PTRACED))
syscall_trace();
}
...@@ -188,6 +188,27 @@ sal_desc_ap_wakeup (void *p) ...@@ -188,6 +188,27 @@ sal_desc_ap_wakeup (void *p)
break; break;
} }
} }
static void __init
chk_nointroute_opt(void)
{
char *cp;
extern char saved_command_line[];
for (cp = saved_command_line; *cp; ) {
if (memcmp(cp, "nointroute", 10) == 0) {
no_int_routing = 1;
printk ("no_int_routing on\n");
break;
} else {
while (*cp != ' ' && *cp)
++cp;
while (*cp == ' ')
++cp;
}
}
}
#else #else
static void __init sal_desc_ap_wakeup(void *p) { } static void __init sal_desc_ap_wakeup(void *p) { }
#endif #endif
...@@ -207,6 +228,9 @@ ia64_sal_init (struct ia64_sal_systab *systab) ...@@ -207,6 +228,9 @@ ia64_sal_init (struct ia64_sal_systab *systab)
printk(KERN_ERR "bad signature in system table!"); printk(KERN_ERR "bad signature in system table!");
check_versions(systab); check_versions(systab);
#ifdef CONFIG_SMP
chk_nointroute_opt();
#endif
/* revisions are coded in BCD, so %x does the job for us */ /* revisions are coded in BCD, so %x does the job for us */
printk(KERN_INFO "SAL %x.%x: %.32s %.32s%sversion %x.%x\n", printk(KERN_INFO "SAL %x.%x: %.32s %.32s%sversion %x.%x\n",
......
...@@ -72,7 +72,7 @@ sn_enable_irq(unsigned int irq) ...@@ -72,7 +72,7 @@ sn_enable_irq(unsigned int irq)
{ {
} }
static inline void move_irq(int irq) static inline void sn_move_irq(int irq)
{ {
/* note - we hold desc->lock */ /* note - we hold desc->lock */
cpumask_t tmp; cpumask_t tmp;
...@@ -110,7 +110,7 @@ sn_ack_irq(unsigned int irq) ...@@ -110,7 +110,7 @@ sn_ack_irq(unsigned int irq)
} }
HUB_S((unsigned long *)GLOBAL_MMR_ADDR(nasid, SH_EVENT_OCCURRED_ALIAS), mask ); HUB_S((unsigned long *)GLOBAL_MMR_ADDR(nasid, SH_EVENT_OCCURRED_ALIAS), mask );
__set_bit(irq, (volatile void *)pda->sn_in_service_ivecs); __set_bit(irq, (volatile void *)pda->sn_in_service_ivecs);
move_irq(irq); sn_move_irq(irq);
} }
static void static void
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <asm/delay.h> #include <asm/delay.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/smp.h> #include <asm/smp.h>
#include <asm/tlb.h>
#include <asm/numa.h> #include <asm/numa.h>
#include <asm/bitops.h> #include <asm/bitops.h>
#include <asm/hw_irq.h> #include <asm/hw_irq.h>
...@@ -60,6 +61,13 @@ wait_piowc(void) ...@@ -60,6 +61,13 @@ wait_piowc(void)
} }
void
sn_tlb_migrate_finish(struct mm_struct *mm)
{
if (mm == current->mm)
flush_tlb_mm(mm);
}
/** /**
* sn2_global_tlb_purge - globally purge translation cache of virtual address range * sn2_global_tlb_purge - globally purge translation cache of virtual address range
...@@ -114,6 +122,13 @@ sn2_global_tlb_purge (unsigned long start, unsigned long end, unsigned long nbit ...@@ -114,6 +122,13 @@ sn2_global_tlb_purge (unsigned long start, unsigned long end, unsigned long nbit
return; return;
} }
if (atomic_read(&mm->mm_users) == 1) {
flush_tlb_mm(mm);
preempt_enable();
return;
}
nix = 0; nix = 0;
for (cnode=find_first_bit(&nodes_flushed, NR_NODES); cnode < NR_NODES; for (cnode=find_first_bit(&nodes_flushed, NR_NODES); cnode < NR_NODES;
cnode=find_next_bit(&nodes_flushed, NR_NODES, ++cnode)) cnode=find_next_bit(&nodes_flushed, NR_NODES, ++cnode))
......
...@@ -19,18 +19,22 @@ CONFIG_BROKEN_ON_SMP=y ...@@ -19,18 +19,22 @@ CONFIG_BROKEN_ON_SMP=y
# #
CONFIG_SWAP=y CONFIG_SWAP=y
CONFIG_SYSVIPC=y CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
# CONFIG_BSD_PROCESS_ACCT is not set # CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_SYSCTL=y CONFIG_SYSCTL=y
# CONFIG_AUDIT is not set
CONFIG_LOG_BUF_SHIFT=14 CONFIG_LOG_BUF_SHIFT=14
# CONFIG_HOTPLUG is not set # CONFIG_HOTPLUG is not set
# CONFIG_IKCONFIG is not set # CONFIG_IKCONFIG is not set
# CONFIG_EMBEDDED is not set # CONFIG_EMBEDDED is not set
CONFIG_KALLSYMS=y CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_ALL is not set
CONFIG_FUTEX=y CONFIG_FUTEX=y
CONFIG_EPOLL=y CONFIG_EPOLL=y
CONFIG_IOSCHED_NOOP=y CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
# #
...@@ -171,7 +175,6 @@ CONFIG_CHR_DEV_SG=m ...@@ -171,7 +175,6 @@ CONFIG_CHR_DEV_SG=m
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
# #
# CONFIG_SCSI_MULTI_LUN is not set # CONFIG_SCSI_MULTI_LUN is not set
CONFIG_SCSI_REPORT_LUNS=y
# CONFIG_SCSI_CONSTANTS is not set # CONFIG_SCSI_CONSTANTS is not set
# CONFIG_SCSI_LOGGING is not set # CONFIG_SCSI_LOGGING is not set
...@@ -190,11 +193,11 @@ CONFIG_SCSI_SPI_ATTRS=m ...@@ -190,11 +193,11 @@ CONFIG_SCSI_SPI_ATTRS=m
# CONFIG_SCSI_AIC7XXX is not set # CONFIG_SCSI_AIC7XXX is not set
# CONFIG_SCSI_AIC7XXX_OLD is not set # CONFIG_SCSI_AIC7XXX_OLD is not set
# CONFIG_SCSI_AIC79XX is not set # CONFIG_SCSI_AIC79XX is not set
# CONFIG_SCSI_DPT_I2O is not set
# CONFIG_SCSI_ADVANSYS is not set # CONFIG_SCSI_ADVANSYS is not set
# CONFIG_SCSI_MEGARAID is not set # CONFIG_SCSI_MEGARAID is not set
# CONFIG_SCSI_SATA is not set # CONFIG_SCSI_SATA is not set
# CONFIG_SCSI_BUSLOGIC is not set # CONFIG_SCSI_BUSLOGIC is not set
# CONFIG_SCSI_CPQFCTS is not set
# CONFIG_SCSI_DMX3191D is not set # CONFIG_SCSI_DMX3191D is not set
# CONFIG_SCSI_EATA is not set # CONFIG_SCSI_EATA is not set
# CONFIG_SCSI_EATA_PIO is not set # CONFIG_SCSI_EATA_PIO is not set
...@@ -203,6 +206,7 @@ CONFIG_SCSI_SPI_ATTRS=m ...@@ -203,6 +206,7 @@ CONFIG_SCSI_SPI_ATTRS=m
# CONFIG_SCSI_IPS is not set # CONFIG_SCSI_IPS is not set
# CONFIG_SCSI_INIA100 is not set # CONFIG_SCSI_INIA100 is not set
# CONFIG_SCSI_SYM53C8XX_2 is not set # CONFIG_SCSI_SYM53C8XX_2 is not set
# CONFIG_SCSI_IPR is not set
# CONFIG_SCSI_QLOGIC_ISP is not set # CONFIG_SCSI_QLOGIC_ISP is not set
# CONFIG_SCSI_QLOGIC_FC is not set # CONFIG_SCSI_QLOGIC_FC is not set
# CONFIG_SCSI_QLOGIC_1280 is not set # CONFIG_SCSI_QLOGIC_1280 is not set
...@@ -263,8 +267,6 @@ CONFIG_INET6_AH=m ...@@ -263,8 +267,6 @@ CONFIG_INET6_AH=m
CONFIG_INET6_ESP=m CONFIG_INET6_ESP=m
CONFIG_INET6_IPCOMP=m CONFIG_INET6_IPCOMP=m
CONFIG_IPV6_TUNNEL=m CONFIG_IPV6_TUNNEL=m
# CONFIG_DECNET is not set
# CONFIG_BRIDGE is not set
# CONFIG_NETFILTER is not set # CONFIG_NETFILTER is not set
CONFIG_XFRM=y CONFIG_XFRM=y
CONFIG_XFRM_USER=m CONFIG_XFRM_USER=m
...@@ -279,7 +281,9 @@ CONFIG_SCTP_DBG_OBJCNT=y ...@@ -279,7 +281,9 @@ CONFIG_SCTP_DBG_OBJCNT=y
# CONFIG_SCTP_HMAC_SHA1 is not set # CONFIG_SCTP_HMAC_SHA1 is not set
CONFIG_SCTP_HMAC_MD5=y CONFIG_SCTP_HMAC_MD5=y
# CONFIG_ATM is not set # CONFIG_ATM is not set
# CONFIG_BRIDGE is not set
# CONFIG_VLAN_8021Q is not set # CONFIG_VLAN_8021Q is not set
# CONFIG_DECNET is not set
# CONFIG_LLC2 is not set # CONFIG_LLC2 is not set
# CONFIG_IPX is not set # CONFIG_IPX is not set
# CONFIG_ATALK is not set # CONFIG_ATALK is not set
...@@ -300,18 +304,23 @@ CONFIG_SCTP_HMAC_MD5=y ...@@ -300,18 +304,23 @@ CONFIG_SCTP_HMAC_MD5=y
# Network testing # Network testing
# #
CONFIG_NET_PKTGEN=m CONFIG_NET_PKTGEN=m
# CONFIG_NETPOLL is not set
# CONFIG_NET_POLL_CONTROLLER is not set
# CONFIG_HAMRADIO is not set
# CONFIG_IRDA is not set
# CONFIG_BT is not set
CONFIG_NETDEVICES=y CONFIG_NETDEVICES=y
#
# ARCnet devices
#
# CONFIG_ARCNET is not set
CONFIG_DUMMY=m CONFIG_DUMMY=m
# CONFIG_BONDING is not set # CONFIG_BONDING is not set
# CONFIG_EQUALIZER is not set # CONFIG_EQUALIZER is not set
CONFIG_TUN=m CONFIG_TUN=m
# CONFIG_ETHERTAP is not set # CONFIG_ETHERTAP is not set
#
# ARCnet devices
#
# CONFIG_ARCNET is not set
# #
# Ethernet (10 or 100Mbit) # Ethernet (10 or 100Mbit)
# #
...@@ -342,7 +351,6 @@ CONFIG_SUNQE=m ...@@ -342,7 +351,6 @@ CONFIG_SUNQE=m
# CONFIG_HAMACHI is not set # CONFIG_HAMACHI is not set
# CONFIG_YELLOWFIN is not set # CONFIG_YELLOWFIN is not set
# CONFIG_R8169 is not set # CONFIG_R8169 is not set
# CONFIG_SIS190 is not set
# CONFIG_SK98LIN is not set # CONFIG_SK98LIN is not set
# CONFIG_TIGON3 is not set # CONFIG_TIGON3 is not set
...@@ -350,46 +358,29 @@ CONFIG_SUNQE=m ...@@ -350,46 +358,29 @@ CONFIG_SUNQE=m
# Ethernet (10000 Mbit) # Ethernet (10000 Mbit)
# #
# CONFIG_IXGB is not set # CONFIG_IXGB is not set
# CONFIG_FDDI is not set # CONFIG_S2IO is not set
# CONFIG_HIPPI is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
#
# Wireless LAN (non-hamradio)
#
# CONFIG_NET_RADIO is not set
# #
# Token Ring devices # Token Ring devices
# #
# CONFIG_TR is not set # CONFIG_TR is not set
# CONFIG_NET_FC is not set
# CONFIG_RCPCI is not set
# CONFIG_SHAPER is not set
# CONFIG_NETCONSOLE is not set
#
# Wan interfaces
#
# CONFIG_WAN is not set
# #
# Amateur Radio support # Wireless LAN (non-hamradio)
#
# CONFIG_HAMRADIO is not set
#
# IrDA (infrared) support
# #
# CONFIG_IRDA is not set # CONFIG_NET_RADIO is not set
# #
# Bluetooth support # Wan interfaces
# #
# CONFIG_BT is not set # CONFIG_WAN is not set
# CONFIG_NETPOLL is not set # CONFIG_FDDI is not set
# CONFIG_NET_POLL_CONTROLLER is not set # CONFIG_HIPPI is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
# CONFIG_NET_FC is not set
# CONFIG_SHAPER is not set
# CONFIG_NETCONSOLE is not set
# #
# Unix98 PTY support # Unix98 PTY support
...@@ -486,6 +477,7 @@ CONFIG_ISO9660_FS=m ...@@ -486,6 +477,7 @@ CONFIG_ISO9660_FS=m
# #
CONFIG_PROC_FS=y CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y CONFIG_PROC_KCORE=y
CONFIG_SYSFS=y
# CONFIG_DEVFS_FS is not set # CONFIG_DEVFS_FS is not set
CONFIG_DEVPTS_FS_XATTR=y CONFIG_DEVPTS_FS_XATTR=y
# CONFIG_DEVPTS_FS_SECURITY is not set # CONFIG_DEVPTS_FS_SECURITY is not set
...@@ -527,9 +519,9 @@ CONFIG_SUNRPC_GSS=m ...@@ -527,9 +519,9 @@ CONFIG_SUNRPC_GSS=m
CONFIG_RPCSEC_GSS_KRB5=m CONFIG_RPCSEC_GSS_KRB5=m
# CONFIG_SMB_FS is not set # CONFIG_SMB_FS is not set
CONFIG_CIFS=m CONFIG_CIFS=m
# CONFIG_CIFS_STATS is not set
# CONFIG_NCP_FS is not set # CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set # CONFIG_CODA_FS is not set
# CONFIG_INTERMEZZO_FS is not set
CONFIG_AFS_FS=m CONFIG_AFS_FS=m
CONFIG_RXRPC=m CONFIG_RXRPC=m
...@@ -641,11 +633,13 @@ CONFIG_CRYPTO_CAST6=m ...@@ -641,11 +633,13 @@ CONFIG_CRYPTO_CAST6=m
CONFIG_CRYPTO_ARC4=m CONFIG_CRYPTO_ARC4=m
CONFIG_CRYPTO_DEFLATE=y CONFIG_CRYPTO_DEFLATE=y
CONFIG_CRYPTO_MICHAEL_MIC=m CONFIG_CRYPTO_MICHAEL_MIC=m
CONFIG_CRYPTO_CRC32C=m
# CONFIG_CRYPTO_TEST is not set # CONFIG_CRYPTO_TEST is not set
# #
# Library routines # Library routines
# #
CONFIG_CRC32=y CONFIG_CRC32=y
CONFIG_LIBCRC32C=m
CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=y CONFIG_ZLIB_DEFLATE=y
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
#include <asm/oplib.h> #include <asm/oplib.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/pgalloc.h> #include <asm/pgalloc.h>
#include <asm/pgtable.h> #include <asm/dma.h>
#define mmu_inval_dma_area(p, l) /* Anton pulled it out for 2.4.0-xx */ #define mmu_inval_dma_area(p, l) /* Anton pulled it out for 2.4.0-xx */
......
...@@ -234,7 +234,6 @@ extern void sun4c_probe_vac(void); ...@@ -234,7 +234,6 @@ extern void sun4c_probe_vac(void);
extern char cputypval; extern char cputypval;
extern unsigned long start, end; extern unsigned long start, end;
extern void panic_setup(char *, int *); extern void panic_setup(char *, int *);
extern void srmmu_end_memory(unsigned long, unsigned long *);
extern unsigned short root_flags; extern unsigned short root_flags;
extern unsigned short root_dev; extern unsigned short root_dev;
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <asm/bitops.h> #include <asm/bitops.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
#include <asm/dma.h>
/* #define IOUNIT_DEBUG */ /* #define IOUNIT_DEBUG */
#ifdef IOUNIT_DEBUG #ifdef IOUNIT_DEBUG
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
#include <asm/bitext.h> #include <asm/bitext.h>
#include <asm/iommu.h> #include <asm/iommu.h>
#include <asm/dma.h>
/* /*
* This can be sized dynamically, but we will do this * This can be sized dynamically, but we will do this
......
...@@ -9,10 +9,12 @@ ...@@ -9,10 +9,12 @@
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/init.h> #include <linux/init.h>
#include <asm/mbus.h> #include <asm/mbus.h>
#include <asm/sbus.h>
static char shouldnothappen[] __initdata = "SUN4 kernel can only run on SUN4\n"; static char shouldnothappen[] __initdata = "SUN4 kernel can only run on SUN4\n";
enum mbus_module srmmu_modtype; enum mbus_module srmmu_modtype;
void *srmmu_nocache_pool;
int vac_cache_size = 0; int vac_cache_size = 0;
...@@ -46,11 +48,6 @@ void srmmu_unmapioaddr(unsigned long virt_addr) ...@@ -46,11 +48,6 @@ void srmmu_unmapioaddr(unsigned long virt_addr)
{ {
} }
void __init srmmu_end_memory(unsigned long memory_size, unsigned long *mem_end_p)
{
return 0;
}
__u32 iounit_map_dma_init(struct sbus_bus *sbus, int size) __u32 iounit_map_dma_init(struct sbus_bus *sbus, int size)
{ {
return 0; return 0;
......
...@@ -26,6 +26,7 @@ CONFIG_HOTPLUG=y ...@@ -26,6 +26,7 @@ CONFIG_HOTPLUG=y
# CONFIG_EMBEDDED is not set # CONFIG_EMBEDDED is not set
CONFIG_KALLSYMS=y CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_ALL is not set # CONFIG_KALLSYMS_ALL is not set
# CONFIG_KALLSYMS_EXTRA_PASS is not set
CONFIG_FUTEX=y CONFIG_FUTEX=y
CONFIG_EPOLL=y CONFIG_EPOLL=y
CONFIG_IOSCHED_NOOP=y CONFIG_IOSCHED_NOOP=y
...@@ -158,7 +159,6 @@ CONFIG_FB_FFB=y ...@@ -158,7 +159,6 @@ CONFIG_FB_FFB=y
# CONFIG_PROM_CONSOLE is not set # CONFIG_PROM_CONSOLE is not set
CONFIG_DUMMY_CONSOLE=y CONFIG_DUMMY_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_PCI_CONSOLE=y
CONFIG_FONTS=y CONFIG_FONTS=y
# CONFIG_FONT_8x8 is not set # CONFIG_FONT_8x8 is not set
# CONFIG_FONT_8x16 is not set # CONFIG_FONT_8x16 is not set
...@@ -333,7 +333,6 @@ CONFIG_AIC79XX_RESET_DELAY_MS=15000 ...@@ -333,7 +333,6 @@ CONFIG_AIC79XX_RESET_DELAY_MS=15000
# CONFIG_AIC79XX_DEBUG_ENABLE is not set # CONFIG_AIC79XX_DEBUG_ENABLE is not set
CONFIG_AIC79XX_DEBUG_MASK=0 CONFIG_AIC79XX_DEBUG_MASK=0
# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set # CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
# CONFIG_SCSI_ADVANSYS is not set
# CONFIG_SCSI_MEGARAID is not set # CONFIG_SCSI_MEGARAID is not set
CONFIG_SCSI_SATA=y CONFIG_SCSI_SATA=y
CONFIG_SCSI_SATA_SVW=m CONFIG_SCSI_SATA_SVW=m
...@@ -687,7 +686,6 @@ CONFIG_NET_SCHED=y ...@@ -687,7 +686,6 @@ CONFIG_NET_SCHED=y
CONFIG_NET_SCH_CBQ=m CONFIG_NET_SCH_CBQ=m
CONFIG_NET_SCH_HTB=m CONFIG_NET_SCH_HTB=m
CONFIG_NET_SCH_HFSC=m CONFIG_NET_SCH_HFSC=m
CONFIG_NET_SCH_CSZ=m
CONFIG_NET_SCH_ATM=y CONFIG_NET_SCH_ATM=y
CONFIG_NET_SCH_PRIO=m CONFIG_NET_SCH_PRIO=m
CONFIG_NET_SCH_RED=m CONFIG_NET_SCH_RED=m
...@@ -696,7 +694,7 @@ CONFIG_NET_SCH_TEQL=m ...@@ -696,7 +694,7 @@ CONFIG_NET_SCH_TEQL=m
CONFIG_NET_SCH_TBF=m CONFIG_NET_SCH_TBF=m
CONFIG_NET_SCH_GRED=m CONFIG_NET_SCH_GRED=m
CONFIG_NET_SCH_DSMARK=m CONFIG_NET_SCH_DSMARK=m
CONFIG_NET_SCH_DELAY=m CONFIG_NET_SCH_NETEM=m
CONFIG_NET_SCH_INGRESS=m CONFIG_NET_SCH_INGRESS=m
CONFIG_NET_QOS=y CONFIG_NET_QOS=y
CONFIG_NET_ESTIMATOR=y CONFIG_NET_ESTIMATOR=y
...@@ -782,7 +780,6 @@ CONFIG_IRDA_FAST_RR=y ...@@ -782,7 +780,6 @@ CONFIG_IRDA_FAST_RR=y
# #
# CONFIG_USB_IRDA is not set # CONFIG_USB_IRDA is not set
CONFIG_SIGMATEL_FIR=m CONFIG_SIGMATEL_FIR=m
# CONFIG_TOSHIBA_FIR is not set
# CONFIG_VLSI_FIR is not set # CONFIG_VLSI_FIR is not set
CONFIG_BT=m CONFIG_BT=m
CONFIG_BT_L2CAP=m CONFIG_BT_L2CAP=m
...@@ -793,6 +790,7 @@ CONFIG_BT_BNEP=m ...@@ -793,6 +790,7 @@ CONFIG_BT_BNEP=m
CONFIG_BT_BNEP_MC_FILTER=y CONFIG_BT_BNEP_MC_FILTER=y
CONFIG_BT_BNEP_PROTO_FILTER=y CONFIG_BT_BNEP_PROTO_FILTER=y
CONFIG_BT_CMTP=m CONFIG_BT_CMTP=m
CONFIG_BT_HIDP=m
# #
# Bluetooth device drivers # Bluetooth device drivers
...@@ -1202,6 +1200,7 @@ CONFIG_ISO9660_FS=m ...@@ -1202,6 +1200,7 @@ CONFIG_ISO9660_FS=m
CONFIG_JOLIET=y CONFIG_JOLIET=y
# CONFIG_ZISOFS is not set # CONFIG_ZISOFS is not set
CONFIG_UDF_FS=m CONFIG_UDF_FS=m
CONFIG_UDF_NLS=y
# #
# DOS/FAT/NT Filesystems # DOS/FAT/NT Filesystems
...@@ -1605,6 +1604,7 @@ CONFIG_USB_HPUSBSCSI=m ...@@ -1605,6 +1604,7 @@ CONFIG_USB_HPUSBSCSI=m
# CONFIG_USB_IBMCAM is not set # CONFIG_USB_IBMCAM is not set
# CONFIG_USB_KONICAWC is not set # CONFIG_USB_KONICAWC is not set
# CONFIG_USB_OV511 is not set # CONFIG_USB_OV511 is not set
CONFIG_USB_PWC=m
# CONFIG_USB_SE401 is not set # CONFIG_USB_SE401 is not set
# CONFIG_USB_STV680 is not set # CONFIG_USB_STV680 is not set
CONFIG_USB_W9968CF=m CONFIG_USB_W9968CF=m
...@@ -1775,6 +1775,7 @@ CONFIG_CRYPTO_SERPENT=m ...@@ -1775,6 +1775,7 @@ CONFIG_CRYPTO_SERPENT=m
CONFIG_CRYPTO_AES=m CONFIG_CRYPTO_AES=m
CONFIG_CRYPTO_CAST5=m CONFIG_CRYPTO_CAST5=m
CONFIG_CRYPTO_CAST6=m CONFIG_CRYPTO_CAST6=m
CONFIG_CRYPTO_TEA=m
CONFIG_CRYPTO_ARC4=m CONFIG_CRYPTO_ARC4=m
CONFIG_CRYPTO_DEFLATE=y CONFIG_CRYPTO_DEFLATE=y
CONFIG_CRYPTO_MICHAEL_MIC=m CONFIG_CRYPTO_MICHAEL_MIC=m
...@@ -1784,6 +1785,7 @@ CONFIG_CRYPTO_TEST=m ...@@ -1784,6 +1785,7 @@ CONFIG_CRYPTO_TEST=m
# #
# Library routines # Library routines
# #
CONFIG_CRC_CCITT=m
CONFIG_CRC32=y CONFIG_CRC32=y
CONFIG_LIBCRC32C=m CONFIG_LIBCRC32C=m
CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_INFLATE=y
......
...@@ -309,6 +309,10 @@ static void __init sbus_fixup_all_regs(struct sbus_dev *first_sdev) ...@@ -309,6 +309,10 @@ static void __init sbus_fixup_all_regs(struct sbus_dev *first_sdev)
extern void register_proc_sparc_ioport(void); extern void register_proc_sparc_ioport(void);
extern void firetruck_init(void); extern void firetruck_init(void);
#ifdef CONFIG_SUN4
extern void sun4_dvma_init(void);
#endif
static int __init sbus_init(void) static int __init sbus_init(void)
{ {
int nd, this_sbus, sbus_devs, topnd, iommund; int nd, this_sbus, sbus_devs, topnd, iommund;
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
*/ */
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/mach-types.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/arch/bus.h> #include <asm/arch/bus.h>
......
...@@ -106,8 +106,23 @@ ...@@ -106,8 +106,23 @@
/* fifo size information */ /* fifo size information */
#define S3C2410_UFCON_RXC(fcon) (((fcon) & S3C2410_UFSTAT_RXMASK) >> S3C2410_UFSTAT_RXSHIFT) #ifndef __ASSEMBLY__
#define S3C2410_UFCON_TXC(fcon) (((fcon) & S3C2410_UFSTAT_TXMASK) >> S3C2410_UFSTAT_TXSHIFT) static inline int S3C2410_UFCON_RXC(int fcon)
{
if (fcon & S3C2410_UFSTAT_RXFULL)
return 16;
return ((fcon) & S3C2410_UFSTAT_RXMASK) >> S3C2410_UFSTAT_RXSHIFT;
}
static inline int S3C2410_UFCON_TXC(int fcon)
{
if (fcon & S3C2410_UFSTAT_TXFULL)
return 16;
return ((fcon) & S3C2410_UFSTAT_TXMASK) >> S3C2410_UFSTAT_TXSHIFT;
}
#endif /* __ASSEMBLY__ */
#define S3C2410_UMSTAT_CTS (1<<0) #define S3C2410_UMSTAT_CTS (1<<0)
#define S3C2410_UMSTAT_DeltaCTS (1<<2) #define S3C2410_UMSTAT_DeltaCTS (1<<2)
......
...@@ -147,4 +147,6 @@ static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page) ...@@ -147,4 +147,6 @@ static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page)
__pmd_free_tlb(tlb, pmdp); \ __pmd_free_tlb(tlb, pmdp); \
} while (0) } while (0)
#define tlb_migrate_finish(mm) do {} while (0)
#endif /* _ASM_GENERIC__TLB_H */ #endif /* _ASM_GENERIC__TLB_H */
...@@ -56,7 +56,7 @@ ia64_atomic64_add (__s64 i, atomic64_t *v) ...@@ -56,7 +56,7 @@ ia64_atomic64_add (__s64 i, atomic64_t *v)
CMPXCHG_BUGCHECK(v); CMPXCHG_BUGCHECK(v);
old = atomic_read(v); old = atomic_read(v);
new = old + i; new = old + i;
} while (ia64_cmpxchg(acq, v, old, new, sizeof(atomic_t)) != old); } while (ia64_cmpxchg(acq, v, old, new, sizeof(atomic64_t)) != old);
return new; return new;
} }
...@@ -84,7 +84,7 @@ ia64_atomic64_sub (__s64 i, atomic64_t *v) ...@@ -84,7 +84,7 @@ ia64_atomic64_sub (__s64 i, atomic64_t *v)
CMPXCHG_BUGCHECK(v); CMPXCHG_BUGCHECK(v);
old = atomic_read(v); old = atomic_read(v);
new = old - i; new = old - i;
} while (ia64_cmpxchg(acq, v, old, new, sizeof(atomic_t)) != old); } while (ia64_cmpxchg(acq, v, old, new, sizeof(atomic64_t)) != old);
return new; return new;
} }
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
* David Mosberger-Tang <davidm@hpl.hp.com> * David Mosberger-Tang <davidm@hpl.hp.com>
*/ */
#include <asm/machvec.h>
#define dma_alloc_coherent platform_dma_alloc_coherent #define dma_alloc_coherent platform_dma_alloc_coherent
#define dma_alloc_noncoherent platform_dma_alloc_coherent /* coherent mem. is cheap */ #define dma_alloc_noncoherent platform_dma_alloc_coherent /* coherent mem. is cheap */
#define dma_free_coherent platform_dma_free_coherent #define dma_free_coherent platform_dma_free_coherent
......
...@@ -19,6 +19,7 @@ struct pt_regs; ...@@ -19,6 +19,7 @@ struct pt_regs;
struct scatterlist; struct scatterlist;
struct irq_desc; struct irq_desc;
struct page; struct page;
struct mm_struct;
typedef void ia64_mv_setup_t (char **); typedef void ia64_mv_setup_t (char **);
typedef void ia64_mv_cpu_init_t (void); typedef void ia64_mv_cpu_init_t (void);
...@@ -26,6 +27,7 @@ typedef void ia64_mv_irq_init_t (void); ...@@ -26,6 +27,7 @@ typedef void ia64_mv_irq_init_t (void);
typedef void ia64_mv_send_ipi_t (int, int, int, int); typedef void ia64_mv_send_ipi_t (int, int, int, int);
typedef void ia64_mv_timer_interrupt_t (int, void *, struct pt_regs *); typedef void ia64_mv_timer_interrupt_t (int, void *, struct pt_regs *);
typedef void ia64_mv_global_tlb_purge_t (unsigned long, unsigned long, unsigned long); typedef void ia64_mv_global_tlb_purge_t (unsigned long, unsigned long, unsigned long);
typedef void ia64_mv_tlb_migrate_finish_t (struct mm_struct *);
typedef struct irq_desc *ia64_mv_irq_desc (unsigned int); typedef struct irq_desc *ia64_mv_irq_desc (unsigned int);
typedef u8 ia64_mv_irq_to_vector (u8); typedef u8 ia64_mv_irq_to_vector (u8);
typedef unsigned int ia64_mv_local_vector_to_irq (u8 vector); typedef unsigned int ia64_mv_local_vector_to_irq (u8 vector);
...@@ -69,11 +71,21 @@ typedef unsigned short ia64_mv_readw_relaxed_t (void *); ...@@ -69,11 +71,21 @@ typedef unsigned short ia64_mv_readw_relaxed_t (void *);
typedef unsigned int ia64_mv_readl_relaxed_t (void *); typedef unsigned int ia64_mv_readl_relaxed_t (void *);
typedef unsigned long ia64_mv_readq_relaxed_t (void *); typedef unsigned long ia64_mv_readq_relaxed_t (void *);
extern void machvec_noop (void); static inline void
machvec_noop (void)
{
}
static inline void
machvec_noop_mm (struct mm_struct *mm)
{
}
extern void machvec_setup (char **); extern void machvec_setup (char **);
extern void machvec_timer_interrupt (int, void *, struct pt_regs *); extern void machvec_timer_interrupt (int, void *, struct pt_regs *);
extern void machvec_dma_sync_single (struct device *, dma_addr_t, size_t, int); extern void machvec_dma_sync_single (struct device *, dma_addr_t, size_t, int);
extern void machvec_dma_sync_sg (struct device *, struct scatterlist *, int, int); extern void machvec_dma_sync_sg (struct device *, struct scatterlist *, int, int);
extern void machvec_tlb_migrate_finish (struct mm_struct *);
# if defined (CONFIG_IA64_HP_SIM) # if defined (CONFIG_IA64_HP_SIM)
# include <asm/machvec_hpsim.h> # include <asm/machvec_hpsim.h>
...@@ -95,6 +107,7 @@ extern void machvec_dma_sync_sg (struct device *, struct scatterlist *, int, int ...@@ -95,6 +107,7 @@ extern void machvec_dma_sync_sg (struct device *, struct scatterlist *, int, int
# define platform_send_ipi ia64_mv.send_ipi # define platform_send_ipi ia64_mv.send_ipi
# define platform_timer_interrupt ia64_mv.timer_interrupt # define platform_timer_interrupt ia64_mv.timer_interrupt
# define platform_global_tlb_purge ia64_mv.global_tlb_purge # define platform_global_tlb_purge ia64_mv.global_tlb_purge
# define platform_tlb_migrate_finish ia64_mv.tlb_migrate_finish
# define platform_dma_init ia64_mv.dma_init # define platform_dma_init ia64_mv.dma_init
# define platform_dma_alloc_coherent ia64_mv.dma_alloc_coherent # define platform_dma_alloc_coherent ia64_mv.dma_alloc_coherent
# define platform_dma_free_coherent ia64_mv.dma_free_coherent # define platform_dma_free_coherent ia64_mv.dma_free_coherent
...@@ -140,6 +153,7 @@ struct ia64_machine_vector { ...@@ -140,6 +153,7 @@ struct ia64_machine_vector {
ia64_mv_send_ipi_t *send_ipi; ia64_mv_send_ipi_t *send_ipi;
ia64_mv_timer_interrupt_t *timer_interrupt; ia64_mv_timer_interrupt_t *timer_interrupt;
ia64_mv_global_tlb_purge_t *global_tlb_purge; ia64_mv_global_tlb_purge_t *global_tlb_purge;
ia64_mv_tlb_migrate_finish_t *tlb_migrate_finish;
ia64_mv_dma_init *dma_init; ia64_mv_dma_init *dma_init;
ia64_mv_dma_alloc_coherent *dma_alloc_coherent; ia64_mv_dma_alloc_coherent *dma_alloc_coherent;
ia64_mv_dma_free_coherent *dma_free_coherent; ia64_mv_dma_free_coherent *dma_free_coherent;
...@@ -181,6 +195,7 @@ struct ia64_machine_vector { ...@@ -181,6 +195,7 @@ struct ia64_machine_vector {
platform_send_ipi, \ platform_send_ipi, \
platform_timer_interrupt, \ platform_timer_interrupt, \
platform_global_tlb_purge, \ platform_global_tlb_purge, \
platform_tlb_migrate_finish, \
platform_dma_init, \ platform_dma_init, \
platform_dma_alloc_coherent, \ platform_dma_alloc_coherent, \
platform_dma_free_coherent, \ platform_dma_free_coherent, \
...@@ -260,6 +275,9 @@ extern ia64_mv_dma_supported swiotlb_dma_supported; ...@@ -260,6 +275,9 @@ extern ia64_mv_dma_supported swiotlb_dma_supported;
#ifndef platform_global_tlb_purge #ifndef platform_global_tlb_purge
# define platform_global_tlb_purge ia64_global_tlb_purge /* default to architected version */ # define platform_global_tlb_purge ia64_global_tlb_purge /* default to architected version */
#endif #endif
#ifndef platform_tlb_migrate_finish
# define platform_tlb_migrate_finish machvec_noop_mm
#endif
#ifndef platform_dma_init #ifndef platform_dma_init
# define platform_dma_init swiotlb_init # define platform_dma_init swiotlb_init
#endif #endif
......
...@@ -39,6 +39,7 @@ extern ia64_mv_irq_init_t sn_irq_init; ...@@ -39,6 +39,7 @@ extern ia64_mv_irq_init_t sn_irq_init;
extern ia64_mv_send_ipi_t sn2_send_IPI; extern ia64_mv_send_ipi_t sn2_send_IPI;
extern ia64_mv_timer_interrupt_t sn_timer_interrupt; extern ia64_mv_timer_interrupt_t sn_timer_interrupt;
extern ia64_mv_global_tlb_purge_t sn2_global_tlb_purge; extern ia64_mv_global_tlb_purge_t sn2_global_tlb_purge;
extern ia64_mv_tlb_migrate_finish_t sn_tlb_migrate_finish;
extern ia64_mv_irq_desc sn_irq_desc; extern ia64_mv_irq_desc sn_irq_desc;
extern ia64_mv_irq_to_vector sn_irq_to_vector; extern ia64_mv_irq_to_vector sn_irq_to_vector;
extern ia64_mv_local_vector_to_irq sn_local_vector_to_irq; extern ia64_mv_local_vector_to_irq sn_local_vector_to_irq;
...@@ -83,6 +84,7 @@ extern ia64_mv_dma_supported sn_dma_supported; ...@@ -83,6 +84,7 @@ extern ia64_mv_dma_supported sn_dma_supported;
#define platform_send_ipi sn2_send_IPI #define platform_send_ipi sn2_send_IPI
#define platform_timer_interrupt sn_timer_interrupt #define platform_timer_interrupt sn_timer_interrupt
#define platform_global_tlb_purge sn2_global_tlb_purge #define platform_global_tlb_purge sn2_global_tlb_purge
#define platform_tlb_migrate_finish sn_tlb_migrate_finish
#define platform_pci_fixup sn_pci_fixup #define platform_pci_fixup sn_pci_fixup
#define platform_inb __sn_inb #define platform_inb __sn_inb
#define platform_inw __sn_inw #define platform_inw __sn_inw
......
...@@ -73,12 +73,15 @@ struct thread_info { ...@@ -73,12 +73,15 @@ struct thread_info {
#define TIF_SIGPENDING 1 /* signal pending */ #define TIF_SIGPENDING 1 /* signal pending */
#define TIF_NEED_RESCHED 2 /* rescheduling necessary */ #define TIF_NEED_RESCHED 2 /* rescheduling necessary */
#define TIF_SYSCALL_TRACE 3 /* syscall trace active */ #define TIF_SYSCALL_TRACE 3 /* syscall trace active */
#define TIF_SYSCALL_AUDIT 4 /* syscall auditing active */
#define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */
#define TIF_WORK_MASK 0x7 /* like TIF_ALLWORK_BITS but sans TIF_SYSCALL_TRACE */ #define TIF_WORK_MASK 0x7 /* like TIF_ALLWORK_BITS but sans TIF_SYSCALL_TRACE */
#define TIF_ALLWORK_MASK 0xf /* bits 0..3 are "work to do on user-return" bits */ #define TIF_ALLWORK_MASK 0x1f /* bits 0..4 are "work to do on user-return" bits */
#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)
#define _TIF_SYSCALL_TRACEAUDIT (_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT)
#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME)
#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)
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
#include <asm/pgalloc.h> #include <asm/pgalloc.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
#include <asm/machvec.h>
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
# define FREE_PTE_NR 2048 # define FREE_PTE_NR 2048
...@@ -211,6 +212,8 @@ __tlb_remove_tlb_entry (struct mmu_gather *tlb, pte_t *ptep, unsigned long addre ...@@ -211,6 +212,8 @@ __tlb_remove_tlb_entry (struct mmu_gather *tlb, pte_t *ptep, unsigned long addre
tlb->end_addr = address + PAGE_SIZE; tlb->end_addr = address + PAGE_SIZE;
} }
#define tlb_migrate_finish(mm) platform_tlb_migrate_finish(mm)
#define tlb_start_vma(tlb, vma) do { } while (0) #define tlb_start_vma(tlb, vma) do { } while (0)
#define tlb_end_vma(tlb, vma) do { } while (0) #define tlb_end_vma(tlb, vma) do { } while (0)
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
*/ */
#if (__GNUC__ > 3) || \ #if (__GNUC__ > 3) || \
(__GNUC__ == 3 && __GNUC_MINOR__ > 3) || \ (__GNUC__ == 3 && __GNUC_MINOR__ > 3) || \
(__GNUC__ == 3 && __GNUC_MINOR__ == 3 && __GNUC_PATCHLEVEL__ >= 1) (__GNUC__ == 3 && __GNUC_MINOR__ == 3 && __GNUC_PATCHLEVEL__ >= 4)
#define __bug_trap() __builtin_trap() #define __bug_trap() __builtin_trap()
#else #else
#define __bug_trap() \ #define __bug_trap() \
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <asm/io.h> #include <asm/io.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
struct page;
extern spinlock_t dma_spin_lock; extern spinlock_t dma_spin_lock;
static __inline__ unsigned long claim_dma_lock(void) static __inline__ unsigned long claim_dma_lock(void)
...@@ -244,4 +245,46 @@ extern int isa_dma_bridge_buggy; ...@@ -244,4 +245,46 @@ extern int isa_dma_bridge_buggy;
#define isa_dma_bridge_buggy (0) #define isa_dma_bridge_buggy (0)
#endif #endif
/* Routines for data transfer buffers. */
BTFIXUPDEF_CALL(char *, mmu_lockarea, char *, unsigned long)
BTFIXUPDEF_CALL(void, mmu_unlockarea, char *, unsigned long)
#define mmu_lockarea(vaddr,len) BTFIXUP_CALL(mmu_lockarea)(vaddr,len)
#define mmu_unlockarea(vaddr,len) BTFIXUP_CALL(mmu_unlockarea)(vaddr,len)
/* These are implementations for sbus_map_sg/sbus_unmap_sg... collapse later */
BTFIXUPDEF_CALL(__u32, mmu_get_scsi_one, char *, unsigned long, struct sbus_bus *sbus)
BTFIXUPDEF_CALL(void, mmu_get_scsi_sgl, struct scatterlist *, int, struct sbus_bus *sbus)
BTFIXUPDEF_CALL(void, mmu_release_scsi_one, __u32, unsigned long, struct sbus_bus *sbus)
BTFIXUPDEF_CALL(void, mmu_release_scsi_sgl, struct scatterlist *, int, struct sbus_bus *sbus)
#define mmu_get_scsi_one(vaddr,len,sbus) BTFIXUP_CALL(mmu_get_scsi_one)(vaddr,len,sbus)
#define mmu_get_scsi_sgl(sg,sz,sbus) BTFIXUP_CALL(mmu_get_scsi_sgl)(sg,sz,sbus)
#define mmu_release_scsi_one(vaddr,len,sbus) BTFIXUP_CALL(mmu_release_scsi_one)(vaddr,len,sbus)
#define mmu_release_scsi_sgl(sg,sz,sbus) BTFIXUP_CALL(mmu_release_scsi_sgl)(sg,sz,sbus)
/*
* mmu_map/unmap are provided by iommu/iounit; Invalid to call on IIep.
*
* The mmu_map_dma_area establishes two mappings in one go.
* These mappings point to pages normally mapped at 'va' (linear address).
* First mapping is for CPU visible address at 'a', uncached.
* This is an alias, but it works because it is an uncached mapping.
* Second mapping is for device visible address, or "bus" address.
* The bus address is returned at '*pba'.
*
* These functions seem distinct, but are hard to split. On sun4c,
* at least for now, 'a' is equal to bus address, and retured in *pba.
* On sun4m, page attributes depend on the CPU type, so we have to
* know if we are mapping RAM or I/O, so it has to be an additional argument
* to a separate mapping function for CPU visible mappings.
*/
BTFIXUPDEF_CALL(int, mmu_map_dma_area, dma_addr_t *, unsigned long, unsigned long, int len)
BTFIXUPDEF_CALL(struct page *, mmu_translate_dvma, unsigned long busa)
BTFIXUPDEF_CALL(void, mmu_unmap_dma_area, unsigned long busa, int len)
#define mmu_map_dma_area(pba,va,a,len) BTFIXUP_CALL(mmu_map_dma_area)(pba,va,a,len)
#define mmu_unmap_dma_area(ba,len) BTFIXUP_CALL(mmu_unmap_dma_area)(ba,len)
#define mmu_translate_dvma(ba) BTFIXUP_CALL(mmu_translate_dvma)(ba)
#endif /* !(_ASM_SPARC_DMA_H) */ #endif /* !(_ASM_SPARC_DMA_H) */
...@@ -87,6 +87,12 @@ extern dma_addr_t pci_map_page(struct pci_dev *hwdev, struct page *page, ...@@ -87,6 +87,12 @@ extern dma_addr_t pci_map_page(struct pci_dev *hwdev, struct page *page,
extern void pci_unmap_page(struct pci_dev *hwdev, extern void pci_unmap_page(struct pci_dev *hwdev,
dma_addr_t dma_address, size_t size, int direction); dma_addr_t dma_address, size_t size, int direction);
/* map_page and map_single cannot fail */
static inline int pci_dma_mapping_error(dma_addr_t dma_addr)
{
return 0;
}
/* Map a set of buffers described by scatterlist in streaming /* Map a set of buffers described by scatterlist in streaming
* mode for DMA. This is the scather-gather version of the * mode for DMA. This is the scather-gather version of the
* above pci_map_single interface. Here the scatter gather list * above pci_map_single interface. Here the scatter gather list
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include <asm/pgtsrmmu.h> #include <asm/pgtsrmmu.h>
#include <asm/vac-ops.h> #include <asm/vac-ops.h>
#include <asm/oplib.h> #include <asm/oplib.h>
#include <asm/sbus.h>
#include <asm/btfixup.h> #include <asm/btfixup.h>
#include <asm/system.h> #include <asm/system.h>
...@@ -33,48 +32,6 @@ struct page; ...@@ -33,48 +32,6 @@ struct page;
extern void load_mmu(void); extern void load_mmu(void);
extern unsigned long calc_highpages(void); extern unsigned long calc_highpages(void);
/* Routines for data transfer buffers. */
BTFIXUPDEF_CALL(char *, mmu_lockarea, char *, unsigned long)
BTFIXUPDEF_CALL(void, mmu_unlockarea, char *, unsigned long)
#define mmu_lockarea(vaddr,len) BTFIXUP_CALL(mmu_lockarea)(vaddr,len)
#define mmu_unlockarea(vaddr,len) BTFIXUP_CALL(mmu_unlockarea)(vaddr,len)
/* These are implementations for sbus_map_sg/sbus_unmap_sg... collapse later */
BTFIXUPDEF_CALL(__u32, mmu_get_scsi_one, char *, unsigned long, struct sbus_bus *sbus)
BTFIXUPDEF_CALL(void, mmu_get_scsi_sgl, struct scatterlist *, int, struct sbus_bus *sbus)
BTFIXUPDEF_CALL(void, mmu_release_scsi_one, __u32, unsigned long, struct sbus_bus *sbus)
BTFIXUPDEF_CALL(void, mmu_release_scsi_sgl, struct scatterlist *, int, struct sbus_bus *sbus)
#define mmu_get_scsi_one(vaddr,len,sbus) BTFIXUP_CALL(mmu_get_scsi_one)(vaddr,len,sbus)
#define mmu_get_scsi_sgl(sg,sz,sbus) BTFIXUP_CALL(mmu_get_scsi_sgl)(sg,sz,sbus)
#define mmu_release_scsi_one(vaddr,len,sbus) BTFIXUP_CALL(mmu_release_scsi_one)(vaddr,len,sbus)
#define mmu_release_scsi_sgl(sg,sz,sbus) BTFIXUP_CALL(mmu_release_scsi_sgl)(sg,sz,sbus)
/*
* mmu_map/unmap are provided by iommu/iounit; Invalid to call on IIep.
*
* The mmu_map_dma_area establishes two mappings in one go.
* These mappings point to pages normally mapped at 'va' (linear address).
* First mapping is for CPU visible address at 'a', uncached.
* This is an alias, but it works because it is an uncached mapping.
* Second mapping is for device visible address, or "bus" address.
* The bus address is returned at '*pba'.
*
* These functions seem distinct, but are hard to split. On sun4c,
* at least for now, 'a' is equal to bus address, and retured in *pba.
* On sun4m, page attributes depend on the CPU type, so we have to
* know if we are mapping RAM or I/O, so it has to be an additional argument
* to a separate mapping function for CPU visible mappings.
*/
BTFIXUPDEF_CALL(int, mmu_map_dma_area, dma_addr_t *, unsigned long, unsigned long, int len)
BTFIXUPDEF_CALL(struct page *, mmu_translate_dvma, unsigned long busa)
BTFIXUPDEF_CALL(void, mmu_unmap_dma_area, unsigned long busa, int len)
#define mmu_map_dma_area(pba,va,a,len) BTFIXUP_CALL(mmu_map_dma_area)(pba,va,a,len)
#define mmu_unmap_dma_area(ba,len) BTFIXUP_CALL(mmu_unmap_dma_area)(ba,len)
#define mmu_translate_dvma(ba) BTFIXUP_CALL(mmu_translate_dvma)(ba)
BTFIXUPDEF_SIMM13(pgdir_shift) BTFIXUPDEF_SIMM13(pgdir_shift)
BTFIXUPDEF_SETHI(pgdir_size) BTFIXUPDEF_SETHI(pgdir_size)
BTFIXUPDEF_SETHI(pgdir_mask) BTFIXUPDEF_SETHI(pgdir_mask)
......
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
* enforce all the protection levels that vma's can have. * enforce all the protection levels that vma's can have.
* XXX But for now... * XXX But for now...
*/ */
#define SRMMU_PAGE_NONE __pgprot(SRMMU_VALID | SRMMU_CACHE | \ #define SRMMU_PAGE_NONE __pgprot(SRMMU_CACHE | \
SRMMU_PRIV | SRMMU_REF) SRMMU_PRIV | SRMMU_REF)
#define SRMMU_PAGE_SHARED __pgprot(SRMMU_VALID | SRMMU_CACHE | \ #define SRMMU_PAGE_SHARED __pgprot(SRMMU_VALID | SRMMU_CACHE | \
SRMMU_EXEC | SRMMU_WRITE | SRMMU_REF) SRMMU_EXEC | SRMMU_WRITE | SRMMU_REF)
......
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
#define _SUN4C_PAGE_NOCACHE 0x10000000 /* non-cacheable page */ #define _SUN4C_PAGE_NOCACHE 0x10000000 /* non-cacheable page */
#define _SUN4C_PAGE_PRESENT 0x08000000 /* implemented in software */ #define _SUN4C_PAGE_PRESENT 0x08000000 /* implemented in software */
#define _SUN4C_PAGE_IO 0x04000000 /* I/O page */ #define _SUN4C_PAGE_IO 0x04000000 /* I/O page */
#define _SUN4C_PAGE_FILE 0x02000000 /* implemented in software */
#define _SUN4C_PAGE_READ 0x00800000 /* implemented in software */ #define _SUN4C_PAGE_READ 0x00800000 /* implemented in software */
#define _SUN4C_PAGE_WRITE 0x00400000 /* implemented in software */ #define _SUN4C_PAGE_WRITE 0x00400000 /* implemented in software */
#define _SUN4C_PAGE_ACCESSED 0x00200000 /* implemented in software */ #define _SUN4C_PAGE_ACCESSED 0x00200000 /* implemented in software */
...@@ -71,6 +72,21 @@ ...@@ -71,6 +72,21 @@
#define SUN4C_PAGE_KERNEL __pgprot(_SUN4C_READABLE|_SUN4C_WRITEABLE|\ #define SUN4C_PAGE_KERNEL __pgprot(_SUN4C_READABLE|_SUN4C_WRITEABLE|\
_SUN4C_PAGE_DIRTY|_SUN4C_PAGE_PRIV) _SUN4C_PAGE_DIRTY|_SUN4C_PAGE_PRIV)
/* SUN4C swap entry encoding
*
* We use 5 bits for the type and 19 for the offset. This gives us
* 32 swapfiles of 4GB each. Encoding looks like:
*
* RRRRRRRRooooooooooooooooooottttt
* fedcba9876543210fedcba9876543210
*
* The top 8 bits are reserved for protection and status bits, especially
* FILE and PRESENT.
*/
#define SUN4C_SWP_TYPE_MASK 0x1f
#define SUN4C_SWP_OFF_MASK 0x7ffff
#define SUN4C_SWP_OFF_SHIFT 5
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
static inline unsigned long sun4c_get_synchronous_error(void) static inline unsigned long sun4c_get_synchronous_error(void)
......
...@@ -25,7 +25,7 @@ typedef struct { ...@@ -25,7 +25,7 @@ typedef struct {
unsigned char (*getchar)(void); /* Get char from input device */ unsigned char (*getchar)(void); /* Get char from input device */
void (*putchar)(char); /* Put char to output device */ void (*putchar)(char); /* Put char to output device */
int (*mayget)(void); /* Maybe get char, or -1 */ int (*mayget)(void); /* Maybe get char, or -1 */
int (*mayput)(void); /* Maybe put char, or -1 */ int (*mayput)(int); /* Maybe put char, or -1 */
unsigned char *echo; /* Should getchar echo? */ unsigned char *echo; /* Should getchar echo? */
unsigned char *insource; /* Input source selector */ unsigned char *insource; /* Input source selector */
unsigned char *outsink; /* Output sink selector */ unsigned char *outsink; /* Output sink selector */
......
This diff is collapsed.
#ifndef _SPARC64_CMT_H
#define _SPARC64_CMT_H
/* cmt.h: Chip Multi-Threading register definitions
*
* Copyright (C) 2004 David S. Miller (davem@redhat.com)
*/
/* ASI_CORE_ID - private */
#define LP_ID 0x0000000000000010UL
#define LP_ID_MAX 0x00000000003f0000UL
#define LP_ID_ID 0x000000000000003fUL
/* ASI_INTR_ID - private */
#define LP_INTR_ID 0x0000000000000000UL
#define LP_INTR_ID_ID 0x00000000000003ffUL
/* ASI_CESR_ID - private */
#define CESR_ID 0x0000000000000040UL
#define CESR_ID_ID 0x00000000000000ffUL
/* ASI_CORE_AVAILABLE - shared */
#define LP_AVAIL 0x0000000000000000UL
#define LP_AVAIL_1 0x0000000000000002UL
#define LP_AVAIL_0 0x0000000000000001UL
/* ASI_CORE_ENABLE_STATUS - shared */
#define LP_ENAB_STAT 0x0000000000000010UL
#define LP_ENAB_STAT_1 0x0000000000000002UL
#define LP_ENAB_STAT_0 0x0000000000000001UL
/* ASI_CORE_ENABLE - shared */
#define LP_ENAB 0x0000000000000020UL
#define LP_ENAB_1 0x0000000000000002UL
#define LP_ENAB_0 0x0000000000000001UL
/* ASI_CORE_RUNNING - shared */
#define LP_RUNNING_RW 0x0000000000000050UL
#define LP_RUNNING_W1S 0x0000000000000060UL
#define LP_RUNNING_W1C 0x0000000000000068UL
#define LP_RUNNING_1 0x0000000000000002UL
#define LP_RUNNING_0 0x0000000000000001UL
/* ASI_CORE_RUNNING_STAT - shared */
#define LP_RUN_STAT 0x0000000000000058UL
#define LP_RUN_STAT_1 0x0000000000000002UL
#define LP_RUN_STAT_0 0x0000000000000001UL
/* ASI_XIR_STEERING - shared */
#define LP_XIR_STEER 0x0000000000000030UL
#define LP_XIR_STEER_1 0x0000000000000002UL
#define LP_XIR_STEER_0 0x0000000000000001UL
/* ASI_CMT_ERROR_STEERING - shared */
#define CMT_ER_STEER 0x0000000000000040UL
#define CMT_ER_STEER_1 0x0000000000000002UL
#define CMT_ER_STEER_0 0x0000000000000001UL
#endif /* _SPARC64_CMT_H */
...@@ -162,7 +162,7 @@ config AUDIT ...@@ -162,7 +162,7 @@ config AUDIT
config AUDITSYSCALL config AUDITSYSCALL
bool "Enable system-call auditing support" bool "Enable system-call auditing support"
depends on AUDIT && (X86 || PPC64 || ARCH_S390) depends on AUDIT && (X86 || PPC64 || ARCH_S390 || IA64)
default y if SECURITY_SELINUX default y if SECURITY_SELINUX
default n default n
help help
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#include <linux/cpu.h> #include <linux/cpu.h>
#include <linux/percpu.h> #include <linux/percpu.h>
#include <linux/kthread.h> #include <linux/kthread.h>
#include <asm/tlb.h>
#include <asm/unistd.h> #include <asm/unistd.h>
...@@ -3349,6 +3350,7 @@ int set_cpus_allowed(task_t *p, cpumask_t new_mask) ...@@ -3349,6 +3350,7 @@ int set_cpus_allowed(task_t *p, cpumask_t new_mask)
task_rq_unlock(rq, &flags); task_rq_unlock(rq, &flags);
wake_up_process(rq->migration_thread); wake_up_process(rq->migration_thread);
wait_for_completion(&req.done); wait_for_completion(&req.done);
tlb_migrate_finish(p->mm);
return 0; return 0;
} }
out: out:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment