kernel update (relative to v2.4.0-test1)
Subsystems (42)
Here is a quick kernel update. I'm not sure this is distribution material, but it should work better than last weeks patch. Some of the improvements:
- "branch long" emulation by Stephan Zeisset is finally in (sorry about the delay...).
- added Stephane Eranian's /proc/palinfo "driver"; very nice to find out details on your CPU...
- SMP should work again
- ptrace interface should work again (at least strace works...)
- the unwind support now has a real cache and should be SMP-safe
- SMP-related CPU initialization clean up; the bootstrap processor now does an identify_cpu() early in the bootprocess (same as in the UP case); this is necessary because we now rely on PAL info stored in cpu_data[] to bootstrap the system
- some more ia-32 signal fixes from Don
- unaligned accesses in big-endian mode now result in SIGBUS (instead of sliently bogus data) (Stephane Eranian)
- updated for 2.4.0-test1
- remove Itanium dependencies from pgtable.h again (there is no desire or need to make the kernel implementation specific)
- speculative accesses that result in an alternate d-tlb fault are now always NaTed
- make simscsi driver SMP-safe
The full diff is available at
ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/linux-2.4.0-test1-ia64-000531.diff*
as usual.
--david
arch/ia64/config.in +3 -1
@@ -4,7 +4,6 @@ comment 'General setup' define_bool CONFIG_IA64 y -define_bool CONFIG_ITANIUM y # easy choice for now... ;-) define_bool CONFIG_ISA n define_bool CONFIG_SBUS n
@@ -22,6 +21,8 @@ 64KB CONFIG_IA64_PAGE_SIZE_64KB" 16KB if [ "$CONFIG_IA64_DIG" = "y" ]; then + define_bool CONFIG_ITANIUM y + define_bool CONFIG_IA64_BRL_EMU y bool ' Enable Itanium A-step specific code' CONFIG_ITANIUM_ASTEP_SPECIFIC bool ' Enable Itanium A1-step specific code' CONFIG_ITANIUM_A1_SPECIFIC bool ' Enable use of global TLB purge instruction (ptc.g)' CONFIG_ITANIUM_PTCG
@@ -44,6 +45,7 @@ bool 'SMP support' CONFIG_SMP bool 'Performance monitor support' CONFIG_PERFMON +bool '/proc/palinfo support' CONFIG_IA64_PALINFO bool 'Networking support' CONFIG_NET bool 'System V IPC' CONFIG_SYSVIPC
arch/ia64/hp/hpsim_irq.c +2 -1
@@ -5,7 +5,8 @@* Copyright (C) 1998-2000 David Mosberger-Tang <[email protected]> */ -#include <linux/init.h> +#include <linux/kernel.h> +#include <linux/sched.h> #include <linux/irq.h> static unsigned int
arch/ia64/ia32/ia32_signal.c +3 -3
@@ -55,7 +55,7 @@ };static int -copy_siginfo_to_user32 (siginfo_t32 *to,siginfo_t *from) +copy_siginfo_to_user32 (siginfo_t32 *to,siginfo_t *from) {int err;
@@ -326,8 +326,8 @@ ? current->exec_domain->signal_invmap[sig] : sig), &frame->sig); - err |=__put_user (&frame->info, &frame->pinfo); - err |=__put_user (&frame->uc, &frame->puc); + err |=__put_user ((long )&frame->info, &frame->pinfo); + err |=__put_user ((long )&frame->uc, &frame->puc); err |=copy_siginfo_to_user32 (&frame->info, info);/* Create the ucontext. */
arch/ia64/kernel/Makefile +8 -5
@@ -1,11 +1,6 @@ # # Makefile for the linux kernel. # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# -# Note 2! The CFLAGS definitions are now in the main makefile... .S.s: $(CPP) $(AFLAGS) -o $*.s $<
@@ -24,6 +19,10 @@ O_OBJS += machvec.o endif +ifdef CONFIG_IA64_PALINFO +O_OBJS += palinfo.o +endif + ifdef CONFIG_PCI O_OBJS += pci.o endif
@@ -34,6 +33,10 @@ ifdef CONFIG_IA64_MCA O_OBJS += mca.o mca_asm.o +endif + +ifdef CONFIG_IA64_BRL_EMU +O_OBJS += brl_emu.o endif clean::
arch/ia64/kernel/brl_emu.c +220 -0
220 lines not on this page · raw message
arch/ia64/kernel/efi.c +60 -2
87 lines not on this page · raw message
arch/ia64/kernel/efi_stub.S +2 -48
68 lines not on this page · raw message
arch/ia64/kernel/entry.S +4 -6
@@ -375,8 +375,6 @@ alloc loc1=ar.pfs,8,3,0,0 ;; // WAW on CFM at the br.call mov loc0=rp - .fframe IA64_SWITCH_STACK_SIZE - adds sp=-IA64_SWITCH_STACK_SIZE,sp br.call.sptk.many rp=save_switch_stack_with_current_frame // must preserve b6!! .ret2: mov loc2¶ br.call.sptk.few rp=syscall_trace
@@ -532,7 +530,7 @@ 2: // check & deliver pending signals: (p2) br.call.spnt.few rp=handle_signal_delivery -#if defined(CONFIG_SMP) || defined(CONFIG_IA64_SOFTSDV_HACKS) +#if defined(CONFIG_ITANIUM_ASTEP_SPECIFIC) || defined(CONFIG_IA64_SOFTSDV_HACKS) // Check for lost ticks rsm psr.i mov r2 = ar.itc
@@ -747,7 +745,7 @@ #endif /* CONFIG_SMP */ -#if defined(CONFIG_SMP) || defined(CONFIG_IA64_SOFTSDV_HACKS) +#if defined(CONFIG_ITANIUM_ASTEP_SPECIFIC) || defined(CONFIG_IA64_SOFTSDV_HACKS) ENTRY(invoke_ia64_reset_itm) UNW(.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(8))
@@ -762,7 +760,7 @@ br.ret.sptk.many rp END(invoke_ia64_reset_itm) -#endif /* defined(CONFIG_SMP) || defined(CONFIG_IA64_SOFTSDV_HACKS) */ +#endif /* CONFIG_ITANIUM_ASTEP_SPECIFIC || CONFIG_IA64_SOFTSDV_HACKS */ /* * Invoke do_softirq() while preserving in0-in7, which may be needed
@@ -847,7 +845,7 @@ setup_switch_stack: UNW(.prologue) - mov r16=loc0 + mov r16=loc1 DO_SAVE_SWITCH_STACK UNW(.body) br.cond.sptk.many back_from_setup_switch_stack
arch/ia64/kernel/entry.h +2 -2
@@ -11,8 +11,8 @@#define PT_REGS_UNWIND_INFO \ UNW(.prologue); \ - UNW(.unwabi @svr4, 105); \ - UNW(.fframe IA64_PT_REGS_SIZE); \ + UNW(.unwabi @svr4, 'i'); \ + UNW(.fframe IA64_PT_REGS_SIZE+16); \ UNW(.spillsp rp, PT(CR_IIP)); \ UNW(.spillsp ar.pfs, PT(CR_IFS)); \ UNW(.spillsp ar.unat, PT(AR_UNAT)); \
arch/ia64/kernel/fw-emu.c +18 -2
@@ -124,7 +124,18 @@ .proc pal_emulator_static pal_emulator_static: mov r8=-1 - cmp.eq p6,p7=6,r28 /* PAL_PTCE_INFO */ + + mov r9%6 + ;; + cmp.gtu p6,p7=r9,r28 /* r28 <= 255? */ +(p6) br.cond.sptk.few static + ;; +mov r9Q2 + ;; + cmp.gtu p6,p7=r9,r28 +(p6) br.cond.sptk.few stacked + ;; +static: cmp.eq p6,p7=6,r28 /* PAL_PTCE_INFO */ (p7) br.cond.sptk.few 1f ;; mov r8=0 /* status = 0 */
@@ -157,7 +168,12 @@ ;; mov ar.lc=r9 mov r8=r0 -1: br.cond.sptk.few rp +1: + br.cond.sptk.few rp + +stacked: + br.ret.sptk.few rp + .endp pal_emulator_static\n"); /* Macro to emulate SAL call using legacy IN and OUT calls to CF8, CFC etc.. */
arch/ia64/kernel/head.S +70 -0
73 lines not on this page · raw message
arch/ia64/kernel/ivt.S +65 -4
103 lines not on this page · raw message
arch/ia64/kernel/minstate.h +1 -1
@@ -69,7 +69,7 @@ (p7) mov rARBSPSTORE=ar.bspstore; /* save ar.bspstore */ \ (p7) dep rKRBS=-1,rKRBS,61,3; /* compute kernel virtual addr of RBS */ \ ;; \ -(pKern) addl r1-IA64_PT_REGS_SIZE,r1; /* if in kernel mode, use sp (r12) */ \ +(pKern) addl r1=-IA64_PT_REGS_SIZE,r1; /* if in kernel mode, use sp (r12) */ \ (p7) mov ar.bspstore=rKRBS; /* switch to kernel RBS */ \ ;; \ (p7) mov r18=ar.bsp; \
arch/ia64/kernel/pal.S +110 -0
122 lines not on this page · raw message
arch/ia64/kernel/palinfo.c +780 -0
780 lines not on this page · raw message
arch/ia64/kernel/setup.c +39 -5
84 lines not on this page · raw message
arch/ia64/kernel/signal.c +29 -13
79 lines not on this page · raw message
arch/ia64/kernel/smp.c +4 -31
@@ -81,6 +81,7 @@#ifndef CONFIG_ITANIUM_PTCG # define IPI_FLUSH_TLB 3#endif /*!CONFIG_ITANIUM_PTCG */ +#define IPI_KDB_INTERRUPT 4/* * Setup routine for controlling SMP activation
@@ -245,6 +246,9 @@ start += (1UL << nbits); }while (start < end); +ia64_insn_group_barrier (); +ia64_srlz_i ();/* srlz.i implies srlz.d */ +if (saved_rid != flush_rid) {ia64_set_rr (flush_start, saved_rid);ia64_srlz_d ();
@@ -440,19 +444,6 @@ } } - -/* -* Called by both boot and secondaries to move global data into -* per-processor storage. -*/ -static inline void __init -smp_store_cpu_info (int cpuid) -{ -struct cpuinfo_ia64 *c = &cpu_data[cpuid]; - -identify_cpu (c); -} -static inline void __init smp_calibrate_delay (int cpuid) {
@@ -521,16 +512,8 @@extern void ia64_init_itm (void );extern void ia64_cpu_local_tick (void ); -ia64_set_dcr (IA64_DCR_DR |IA64_DCR_DK |IA64_DCR_DX |IA64_DCR_PP ); -ia64_set_fpu_owner (0 ); -ia64_rid_init ();/* initialize region ids */ -cpu_init (); -__flush_tlb_all (); - -normal_xtp (); -smp_store_cpu_info (smp_processor_id ());smp_setup_percpu_timer (smp_processor_id ());/* setup the CPU local timer tick */
@@ -658,16 +641,7 @@/* Setup BSP mappings */ __cpu_number_map[bootstrap_processor] =0 ; __cpu_logical_map[0 ] = bootstrap_processor; - current->processor = bootstrap_processor; -/* Mark BSP booted and get active_mm context */ -cpu_init (); - -/* reset XTP for interrupt routing */ -normal_xtp (); - -/* And generate an entry in cpu_data */ -smp_store_cpu_info (bootstrap_processor);smp_calibrate_delay (smp_processor_id ());#if 0 smp_tune_scheduling ();
@@ -785,4 +759,3 @@ } } -
arch/ia64/kernel/traps.c +47 -0
65 lines not on this page · raw message
arch/ia64/kernel/unaligned.c +22 -3
@@ -1,8 +1,8 @@/* * Architecture-specific unaligned trap handling. * -* Copyright (C) 1999 Hewlett-Packard Co -* Copyright (C) 1999 Stephane Eranian <[email protected]> +* Copyright (C) 1999-2000 Hewlett-Packard Co +* Copyright (C) 1999-2000 Stephane Eranian <[email protected]> */ #include <linux/kernel.h> #include <linux/sched.h>
@@ -1410,6 +1410,25 @@die_if_kernel ("Unaligned reference while in kernel\n" , regs,30 );/* NOT_REACHED */ } +/* +* For now, we don't support user processes running big-endian +* which do unaligned accesses +*/ +if (ia64_psr (regs)->be) { +struct siginfo si; + +printk (KERN_ERR "%s(%d): big-endian unaligned access %016lx (ip=%016lx) not " +"yet supported\n" , + current->comm, current->pid, ifa, regs->cr_iip + ipsr->ri); + + si.si_signo =SIGBUS ; + si.si_errno =0 ; + si.si_code =BUS_ADRALN ; + si.si_addr = (void *) ifa; +send_sig_info (SIGBUS , &si, current); +return ; + } +if (current->thread.flags &IA64_THREAD_UAC_SIGBUS ) {struct siginfo si;
@@ -1417,7 +1436,7 @@ si.si_errno =0 ; si.si_code =BUS_ADRALN ; si.si_addr = (void *) ifa; -send_sig_info (SIGBUS , &si, current); +send_sig_info (SIGBUS , &si, current);return ; }
arch/ia64/kernel/unwind.c +930 -631
1,035 lines not on this page · raw message
include/asm-ia64/pal.h +88 -24
112 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.
Quoted 3 lines · David Mosberger
- ptrace interface should work again (at least strace works...)
There is a race in sys_ptrace that I fixed on i386:
arch/ia64/kernel/ptrace.c ~ line 830:
read_lock(&tasklist_lock); child = find_task_by_pid(pid); read_unlock(&tasklist_lock); ************ bad! the task could die! if(!child) goto out;
You must call get_task_struct() before read_unlock(&tasklist_lock);
Then you dereference child->mm. child->mm can change, you must call
task_lock(child); task_unlock(child)
around these lines [check fs/proc/*.c]
Btw, child->mm can be NULL.
--
Manfred
An updated kernel diff is available in the usual place:
ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/linux-2.4.0-test1-ia64-000609*
Summary of changes:
- Stephen Zeisset's module related fixes to ia64_ksyms.c and pci.c.
- Bill Nottingham's initrd additions.
- Takayoshi Kouchi's pointer-lock related SMP fixes.
- Jes Sorensen's mmap bug fix.
- New unwind support now almost works. Warning: don't enable CONFIG_IA64_NEW_UNWIND unless you have a bleeding edge toolchain with _all_ the unwind fixes. Even then you may not want to turn it on as core-dump support hasn't been finished yet.
- Without the new unwind support, the kernel now is conservative again and generates a switch_stack frame whenever there is a remote possibility that it might be needed. This slows down several signal related operations, but it will be fast again once the new unwind support is complete.
I also added a printk whenever we get a timer tick before it was due. Since that happens quite frequently, this quickly becomes annoying. Look at it as an invitation to investigate the problem... ;-)
--david
arch/ia64/kernel/entry.S +103 -63
@@ -117,14 +117,11 @@ mov psr.l=r17 ;; srlz.d - - movl r28 - br.cond.sptk.many load_switch_stack -1: UNW(.restore sp) - adds sp=IA64_SWITCH_STACK_SIZE,sp // pop switch_stack + DO_LOAD_SWITCH_STACK( ) br.ret.sptk.few rp END(ia64_switch_to) +#ifndef CONFIG_IA64_NEW_UNWIND /* * Like save_switch_stack, but also save the stack frame that is active * at the time this function is called.
@@ -135,6 +132,8 @@ DO_SAVE_SWITCH_STACK br.ret.sptk.few rp END(save_switch_stack_with_current_frame) +#endif /* !CONFIG_IA64_NEW_UNWIND */ + /* * Note that interrupts are enabled during save_switch_stack and * load_switch_stack. This means that we may get an interrupt with
@@ -343,7 +342,6 @@ ;; ld8.fill r4=[r2],16 ld8.fill r5=[r3],16 - mov b7=r28 ;; ld8.fill r6=[r2],16 ld8.fill r7=[r3],16
@@ -371,6 +369,19 @@ // also use it to preserve b6, which contains the syscall entry point. // GLOBAL_ENTRY(invoke_syscall_trace) +#ifdef CONFIG_IA64_NEW_UNWIND + UNW(.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(8)) + alloc loc1=ar.pfs,8,3,0,0 + mov loc0=rp + UNW(.body) + mov loc2¶ + ;; + br.call.sptk.few rp=syscall_trace +.ret3: mov rp=loc0 + mov ar.pfs=loc1 + mov b6=loc2 + br.ret.sptk.few rp +#else /* !CONFIG_IA64_NEW_SYSCALL */ UNW(.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(8)) alloc loc1=ar.pfs,8,3,0,0 ;; // WAW on CFM at the br.call
@@ -384,6 +395,7 @@ mov b6=loc2 ;; br.ret.sptk.few rp +#endif /* !CONFIG_IA64_NEW_SYSCALL */ END(invoke_syscall_trace) //
@@ -802,112 +814,140 @@ // args get preserved, in case we need to restart a system call. // ENTRY(handle_signal_delivery) - UNW(.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(8)) +#ifdef CONFIG_IA64_NEW_UNWIND + .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(8) alloc loc1=ar.pfs,8,2,3,0 // preserve all eight input regs in case of syscall restart! mov r9=ar.unat - - // If the process is being ptraced, the signal may not actually be delivered to - // the process. Instead, SIGCHLD will be sent to the parent. We need to - // setup a switch_stack so ptrace can inspect the processes state if necessary. - adds r2=IA64_TASK_FLAGS_OFFSET,r13 - ;; - ld8 r2=[r2] + mov loc0=rp // save return address + .body mov out0=0 // there is no "oldset" - adds out1,sp // out1=&pt_regs - ;; + adds out1=0,sp // out1=&sigscratch (pSys) mov out2=1 // out2=1 => we're in a syscall - tbit.nz p16,p17=r2,PF_PTRACED_BIT -(p16) br.cond.spnt.many setup_switch_stack ;; -back_from_setup_switch_stack: (pNonSys) mov out2=0 // out2=0 => not a syscall - adds r3=-IA64_SWITCH_STACK_SIZE+IA64_SWITCH_STACK_CALLER_UNAT_OFFSET+16,sp -(p17) adds sp=-IA64_SWITCH_STACK_SIZE,sp // make space for (dummy) switch_stack - ;; -(p17) st8 [r3]=r9 // save ar.unat in sw->caller_unat - mov loc0=rp // save return address - UNW(.body) + .fframe 16 + .spillpsp ar.unat, 16 // (note that offset is relative to psp+0x10!) + st8 [sp]=r9,-16 // allocate space for ar.unat and save it br.call.sptk.few rp=ia64_do_signal .ret11: - adds r3=IA64_SWITCH_STACK_CALLER_UNAT_OFFSET+16,sp + .restore sp + adds sp,sp // pop scratch stack space ;; - ld8 r9=[r3] // load new unat from sw->caller_unat + ld8 r9=[sp] // load new unat from sw->caller_unat mov rp=loc0 ;; -(p17) adds sp=IA64_SWITCH_STACK_SIZE,sp // drop (dummy) switch_stack -(p17) mov ar.unat=r9 -(p17) mov ar.pfs=loc1 -(p17) br.ret.sptk.many rp - - DO_LOAD_SWITCH_STACK( ) // restore the switch stack (ptrace may have modified it) + mov ar.unat=r9 + mov ar.pfs=loc1 br.ret.sptk.many rp - // NOT REACHED - -setup_switch_stack: - UNW(.prologue) - mov r16=loc1 +#else /* !CONFIG_IA64_NEW_UNWIND */ + .prologue + alloc r16=ar.pfs,8,0,3,0 // preserve all eight input regs in case of syscall restart! DO_SAVE_SWITCH_STACK UNW(.body) - br.cond.sptk.many back_from_setup_switch_stack + mov out0=0 // there is no "oldset" + adds out1,sp // out1=&sigscratch + .pred.rel.mutex pSys, pNonSys +(pSys) mov out2=1 // out2=1 => we're in a syscall +(pNonSys) mov out2=0 // out2=0 => not a syscall + br.call.sptk.few rp=ia64_do_signal +.ret11: + // restore the switch stack (ptrace may have modified it) + DO_LOAD_SWITCH_STACK( ) + br.ret.sptk.many rp +#endif /* !CONFIG_IA64_NEW_UNWIND */ END(handle_signal_delivery) GLOBAL_ENTRY(sys_rt_sigsuspend) - UNW(.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(2)) - alloc loc1=ar.pfs,2,2,3,0 - - // If the process is being ptraced, the signal may not actually be delivered to - // the process. Instead, SIGCHLD will be sent to the parent. We need to - // setup a switch_stack so ptrace can inspect the processes state if necessary. - // Also, the process might not ptraced until stopped in sigsuspend, so this - // isn't something that we can do conditionally based upon the value of - // PF_PTRACED_BIT. +#ifdef CONFIG_IA64_NEW_UNWIND + .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(8) + alloc loc1=ar.pfs,8,2,3,0 // preserve all eight input regs in case of syscall restart! + mov r9=ar.unat + mov loc0=rp // save return address mov out0=in0 // mask mov out1=in1 // sigsetsize + adds out2=0,sp // out2=&sigscratch ;; - adds out2,sp // out1=&pt_regs - mov r16=loc1 - DO_SAVE_SWITCH_STACK - mov loc0=rp // save return address - UNW(.body) - br.call.sptk.many rp=ia64_rt_sigsuspend + .fframe 16 + .spillpsp ar.unat, 16 // (note that offset is relative to psp+0x10!) + st8 [sp]=r9,-16 // allocate space for ar.unat and save it + .body + br.call.sptk.few rp=ia64_rt_sigsuspend .ret12: - adds r3=IA64_SWITCH_STACK_CALLER_UNAT_OFFSET+16,sp + .restore sp + adds sp,sp // pop scratch stack space ;; - ld8 r9=[r3] // load new unat from sw->caller_unat + ld8 r9=[sp] // load new unat from sw->caller_unat mov rp=loc0 ;; + mov ar.unat=r9 + mov ar.pfs=loc1 + br.ret.sptk.many rp +#else /* !CONFIG_IA64_NEW_UNWIND */ + UNW(.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(2)) + alloc r16=ar.pfs,2,0,3,0 + DO_SAVE_SWITCH_STACK + UNW(.body) + + mov out0=in0 // mask + mov out1=in1 // sigsetsize + adds out2,sp // out1=&sigscratch + br.call.sptk.many rp=ia64_rt_sigsuspend +.ret12: // restore the switch stack (ptrace may have modified it) - DO_LOAD_SWITCH_STACK(PT_REGS_UNWIND_INFO) + DO_LOAD_SWITCH_STACK( ) br.ret.sptk.many rp - // NOT REACHED +#endif /* !CONFIG_IA64_NEW_UNWIND */ END(sys_rt_sigsuspend) ENTRY(sys_rt_sigreturn) +#ifdef CONFIG_IA64_NEW_UNWIND + .regstk 0,0,3,0 // inherited from gate.s:invoke_sighandler() + PT_REGS_UNWIND_INFO + .prologue + PT_REGS_SAVES(16) + adds sp=-16,sp + .body + cmp.eq pNonSys,p0=r0,r0 // sigreturn isn't a normal syscall... + ;; + adds out0,sp // out0 = &sigscratch + br.call.sptk.few rp=ia64_rt_sigreturn +.ret13: + adds sp,sp // doesn't drop pt_regs, so don't mark it as restoring sp! + PT_REGS_UNWIND_INFO // instead, create a new body section with the smaller frame + ;; + ld8 r9=[sp] // load new ar.unat + mov b7=r8 + ;; + mov ar.unat=r9 + br b7 +#else /* !CONFIG_IA64_NEW_UNWIND */ .regstk 0,0,3,0 // inherited from gate.s:invoke_sighandler() PT_REGS_UNWIND_INFO - adds out0,sp // out0 = &pt_regs UNW(.prologue) UNW(.fframe IA64_PT_REGS_SIZE+IA64_SWITCH_STACK_SIZE) UNW(.spillsp rp, PT(CR_IIP)+IA64_SWITCH_STACK_SIZE) UNW(.spillsp ar.pfs, PT(CR_IFS)+IA64_SWITCH_STACK_SIZE) UNW(.spillsp ar.unat, PT(AR_UNAT)+IA64_SWITCH_STACK_SIZE) UNW(.spillsp pr, PT(PR)+IA64_SWITCH_STACK_SIZE) - adds sp=-IA64_SWITCH_STACK_SIZE,sp // make space for unat and padding + adds sp=-IA64_SWITCH_STACK_SIZE,sp + cmp.eq pNonSys,p0=r0,r0 // sigreturn isn't a normal syscall... ;; UNW(.body) - cmp.eq pNonSys,p0=r0,r0 // sigreturn isn't a normal syscall... + + adds out0,sp // out0 = &sigscratch br.call.sptk.few rp=ia64_rt_sigreturn .ret13: adds r3=IA64_SWITCH_STACK_CALLER_UNAT_OFFSET+16,sp ;; ld8 r9=[r3] // load new ar.unat - mov rp=r8 + mov b7=r8 ;; PT_REGS_UNWIND_INFO adds sp=IA64_SWITCH_STACK_SIZE,sp // drop (dummy) switch-stack frame mov ar.unat=r9 - br rp + br b7 +#endif /* !CONFIG_IA64_NEW_UNWIND */ END(sys_rt_sigreturn) GLOBAL_ENTRY(ia64_prepare_handle_unaligned)
arch/ia64/kernel/ia64_ksyms.c +36 -9
65 lines not on this page · raw message
arch/ia64/kernel/mca_asm.S +0 -1
@@ -6,7 +6,6 @@ // 00/03/29 cfleck Added code to save INIT handoff state in pt_regs format, switch to temp kstack, // switch modes, jump to C INIT handler // -#include <asm/offsets.h> #include <asm/pgtable.h> #include <asm/processor.h> #include <asm/mca_asm.h>
arch/ia64/kernel/pci.c +1 -1
@@ -197,7 +197,7 @@ ranges->mem_end -= bus->resource[1 ]->start; } -int __init +int pcibios_enable_device (struct pci_dev *dev) {/* Not needed, since we enable all devices at startup. */
arch/ia64/kernel/process.c +10 -1
@@ -311,7 +311,12 @@ dst[12 ] = pt->r12; dst[13 ] = pt->r13; dst[14 ] = pt->r14; dst[15 ] = pt->r15;memcpy (dst +16 , &pt->r16,16 *8 );/* r16-r31 are contiguous */ +#ifdef CONFIG_IA64_NEW_UNWIND +printk ("ia64_elf_core_copy_regs: fix me, please?" ); + dst[32 ] =0 ; +#else dst[32 ] =ia64_get_nat_bits (pt, sw); +#endif dst[33 ] = pt->pr;/* branch regs: */
@@ -332,6 +337,10 @@struct switch_stack *sw = ((struct switch_stack *) pt) -1 ;struct task_struct *fpu_owner =ia64_get_fpu_owner (); +#ifdef CONFIG_IA64_NEW_UNWIND +printk ("dump_fpu: fix me, please?" ); +#endif +memset (dst,0 ,sizeof (dst));/* don't leak any "random" bits */ /* f0 is 0.0 */ /* f1 is 1.0 */ dst[2 ] = sw->f2; dst[3 ] = sw->f3;
@@ -440,7 +449,7 @@do {if (unw_unwind (&info) <0 )return 0 ; - ip =unw_get_ip (&info); +unw_get_ip (&info, &ip);if (ip < first_sched || ip >= last_sched)return ip; }while (count++ <16 );
arch/ia64/kernel/ptrace.c +453 -77
757 lines not on this page · raw message
arch/ia64/kernel/setup.c +15 -0
@@ -36,6 +36,10 @@#include <asm/efi.h> #include <asm/mca.h> +#ifdef CONFIG_BLK_DEV_RAM +# include <linux/blk.h> +#endif +extern char _end;/* cpu_data[bootstrap_processor] is data for the bootstrap processor: */
@@ -127,11 +131,22 @@* change APIs, they'd do things for the better. Grumble... */ bootmap_start =PAGE_ALIGN (__pa (&_end)); +if (ia64_boot_param.initrd_size) + bootmap_start =PAGE_ALIGN (bootmap_start + ia64_boot_param.initrd_size); bootmap_size =init_bootmem (bootmap_start >>PAGE_SHIFT , max_pfn);efi_memmap_walk (free_available_memory,0 );reserve_bootmem (bootmap_start, bootmap_size); +#ifdef CONFIG_BLK_DEV_INITRD + initrd_start = ia64_boot_param.initrd_start; +if (initrd_start) { + initrd_end = initrd_start+ia64_boot_param.initrd_size; +printk ("Initial ramdisk at: 0x%p (%lu bytes)\n" , + (void *) initrd_start, ia64_boot_param.initrd_size); +reserve_bootmem (virt_to_phys (initrd_start), ia64_boot_param.initrd_size); + } +#endif #if 0 /* XXX fix me */ init_mm.start_code = (unsigned long ) &_stext;
arch/ia64/kernel/signal.c +117 -107
433 lines not on this page · raw message
arch/ia64/kernel/smp.c +17 -31
109 lines not on this page · raw message
arch/ia64/kernel/sys_ia64.c +3 -0
@@ -156,6 +156,9 @@ {struct pt_regs *regs = (struct pt_regs *) &stack; +if ((off & ~PAGE_MASK ) !=0 ) +return -EINVAL ; + addr =do_mmap2 (addr, len, prot, flags, fd, off >>PAGE_SHIFT );if (!IS_ERR (addr)) regs->r8 =0 ;/* ensure large addresses are not mistaken as failures... */
arch/ia64/kernel/time.c +6 -1
@@ -162,6 +162,11 @@*/ write_lock (&xtime_lock); new_itm = itm.next[cpu].count; + +if (!time_after (ia64_get_itc (), new_itm)) +printk ("Oops: timer tick before it's due (itc=%lx,itm=%lx)\n" , +ia64_get_itc (), new_itm); +while (1 ) {/* * Do kernel PC profiling here. We multiply the
@@ -220,7 +225,7 @@ia64_set_itm (new_itm); } -#ifdef CONFIG_ITANIUM_ASTEP_SPECIFIC +#if defined(CONFIG_ITANIUM_ASTEP_SPECIFIC ) || defined(CONFIG_IA64_SOFTSDV_HACKS )/* * Interrupts must be disabled before calling this routine.
arch/ia64/kernel/traps.c +0 -11
@@ -36,10 +36,6 @@#include <linux/init.h> #include <linux/sched.h> -#ifdef CONFIG_KDB -#include <linux/kdb.h> -#endif -#include <asm/ia32.h> #include <asm/processor.h> #include <asm/uaccess.h>
@@ -92,13 +88,6 @@ }printk ("%s[%d]: %s %ld\n" , current->comm, current->pid, str, err); - -#ifdef CONFIG_KDB -while (1 ) { -kdb (KDB_REASON_PANIC ,0 , regs); -printk ("Cant go anywhere from Panic!\n" ); - } -#endif show_regs (regs);
arch/ia64/kernel/unwind.c +31 -16
165 lines not on this page · raw message
arch/ia64/mm/init.c +13 -0
@@ -183,6 +183,19 @@ }void +free_initrd_mem (unsigned long start,unsigned long end) +{ +if (start < end) +printk ("Freeing initrd memory: %ldkB freed\n" , (end - start) >>10 ); +for (; start < end; start +=PAGE_SIZE ) { +clear_bit (PG_reserved, &mem_map[MAP_NR (start)].flags); +set_page_count (&mem_map[MAP_NR (start)],1 ); +free_page (start); + ++totalram_pages; + } +} + +void si_meminfo (struct sysinfo *val) { val->totalram = totalram_pages;
arch/ia64/vmlinux.lds.S +7 -0
@@ -46,6 +46,11 @@ { *(__ex_table) } __stop___ex_table = .; + __start___ksymtab = .; /* Kernel symbol table */ + __ksymtab : AT(ADDR(__ksymtab) - PAGE_OFFSET) + { *(__ksymtab) } + __stop___ksymtab = .; + /* Unwind table */ ia64_unw_start = .; .IA_64.unwind : AT(ADDR(.IA_64.unwind) - PAGE_OFFSET)
@@ -56,6 +61,8 @@ .rodata : AT(ADDR(.rodata) - PAGE_OFFSET) { *(.rodata) } + .kstrtab : AT(ADDR(.kstrtab) - PAGE_OFFSET) + { *(.kstrtab) } .opd : AT(ADDR(.opd) - PAGE_OFFSET) { *(.opd) }
fs/proc/generic.c +1 -1
@@ -42,7 +42,7 @@#endif /* 4K page size but our output routines use some slack for overruns */ -#define PROC_BLOCK_SIZE (3*1024) +#define PROC_BLOCK_SIZE (PAGE_SIZE - 1024)static ssize_t proc_file_read (struct file * file,char * buf,size_t nbytes,loff_t *ppos)
include/asm-ia64/processor.h +4 -1
@@ -658,13 +658,16 @@ thread_saved_pc (struct thread_struct *t) {struct unw_frame_info info; +unsigned long ip; +/* XXX ouch: Linus, please pass the task pointer to thread_saved_pc() instead! */ struct task_struct *p = (void *) ((unsigned long ) t -IA64_TASK_THREAD_OFFSET );unw_init_from_blocked_task (&info, p);if (unw_unwind (&info) <0 )return 0 ; -return unw_get_ip (&info); +unw_get_ip (&info, &ip); +return ip; }/*
include/asm-ia64/ptrace.h +7 -0
@@ -220,10 +220,17 @@extern long ia64_peek (struct pt_regs *,struct task_struct *,unsigned long addr,long *val);extern long ia64_poke (struct pt_regs *,struct task_struct *,unsigned long addr,long val); +#ifdef CONFIG_IA64_NEW_UNWIND +/* get nat bits for scratch registers such that bit N=1 iff scratch register rN is a NaT */ +extern unsigned long ia64_get_scratch_nat_bits (struct pt_regs *pt,unsigned long scratch_unat); +/* put nat bits for scratch registers such that scratch register rN is a NaT iff bit N=1 */ +extern unsigned long ia64_put_scratch_nat_bits (struct pt_regs *pt,unsigned long nat); +#else /* get nat bits for r1-r31 such that bit N=1 iff rN is a NaT */ extern long ia64_get_nat_bits (struct pt_regs *pt,struct switch_stack *sw);/* put nat bits for r1-r31 such that rN is a NaT iff bit N=1 */ extern void ia64_put_nat_bits (struct pt_regs *pt,struct switch_stack *sw,unsigned long nat); +#endif extern void ia64_increment_ip (struct pt_regs *pt);extern void ia64_decrement_ip (struct pt_regs *pt);
include/asm-ia64/ptrace_offsets.h +1 -1
@@ -118,7 +118,7 @@#define PT_F126 0x05e0#define PT_F127 0x05f0/* switch stack: */ -#define PT_PRI_UNAT 0x0600 +#define PT_NAT_BITS 0x0600#define PT_F2 0x0610#define PT_F3 0x0620
include/asm-ia64/system.h +2 -0
@@ -54,6 +54,8 @@__u16 num_pci_vectors;/* number of ACPI derived PCI IRQ's*/ __u64 pci_vectors;/* physical address of PCI data (pci_vector_struct)*/ __u64 fpswa;/* physical address of the the fpswa interface */ +__u64 initrd_start; +__u64 initrd_size; } ia64_boot_param; extern inline void
include/asm-ia64/unwind.h +45 -11
76 lines not on this page · raw message
An updated kernel diff is available in the usual place:
ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/linux-2.4.0-test1-ia64-000609*
Summary of changes:
- Stephen Zeisset's module related fixes to ia64_ksyms.c and pci.c.
- Bill Nottingham's initrd additions.
- Takayoshi Kouchi's pointer-lock related SMP fixes.
- Jes Sorensen's mmap bug fix.
- New unwind support now almost works. Warning: don't enable CONFIG_IA64_NEW_UNWIND unless you have a bleeding edge toolchain with _all_ the unwind fixes. Even then you may not want to turn it on as core-dump support hasn't been finished yet.
- Without the new unwind support, the kernel now is conservative again and generates a switch_stack frame whenever there is a remote possibility that it might be needed. This slows down several signal related operations, but it will be fast again once the new unwind support is complete.
I also added a printk whenever we get a timer tick before it was due. Since that happens quite frequently, this quickly becomes annoying. Look at it as an invitation to investigate the problem... ;-)
--david
arch/ia64/kernel/entry.S +103 -63
@@ -117,14 +117,11 @@ mov psr.l=r17 ;; srlz.d - - movl r28 - br.cond.sptk.many load_switch_stack -1: UNW(.restore sp) - adds sp=IA64_SWITCH_STACK_SIZE,sp // pop switch_stack + DO_LOAD_SWITCH_STACK( ) br.ret.sptk.few rp END(ia64_switch_to) +#ifndef CONFIG_IA64_NEW_UNWIND /* * Like save_switch_stack, but also save the stack frame that is active * at the time this function is called.
@@ -135,6 +132,8 @@ DO_SAVE_SWITCH_STACK br.ret.sptk.few rp END(save_switch_stack_with_current_frame) +#endif /* !CONFIG_IA64_NEW_UNWIND */ + /* * Note that interrupts are enabled during save_switch_stack and * load_switch_stack. This means that we may get an interrupt with
@@ -343,7 +342,6 @@ ;; ld8.fill r4=[r2],16 ld8.fill r5=[r3],16 - mov b7=r28 ;; ld8.fill r6=[r2],16 ld8.fill r7=[r3],16
@@ -371,6 +369,19 @@ // also use it to preserve b6, which contains the syscall entry point. // GLOBAL_ENTRY(invoke_syscall_trace) +#ifdef CONFIG_IA64_NEW_UNWIND + UNW(.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(8)) + alloc loc1=ar.pfs,8,3,0,0 + mov loc0=rp + UNW(.body) + mov loc2¶ + ;; + br.call.sptk.few rp=syscall_trace +.ret3: mov rp=loc0 + mov ar.pfs=loc1 + mov b6=loc2 + br.ret.sptk.few rp +#else /* !CONFIG_IA64_NEW_SYSCALL */ UNW(.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(8)) alloc loc1=ar.pfs,8,3,0,0 ;; // WAW on CFM at the br.call
@@ -384,6 +395,7 @@ mov b6=loc2 ;; br.ret.sptk.few rp +#endif /* !CONFIG_IA64_NEW_SYSCALL */ END(invoke_syscall_trace) //
@@ -802,112 +814,140 @@ // args get preserved, in case we need to restart a system call. // ENTRY(handle_signal_delivery) - UNW(.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(8)) +#ifdef CONFIG_IA64_NEW_UNWIND + .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(8) alloc loc1=ar.pfs,8,2,3,0 // preserve all eight input regs in case of syscall restart! mov r9=ar.unat - - // If the process is being ptraced, the signal may not actually be delivered to - // the process. Instead, SIGCHLD will be sent to the parent. We need to - // setup a switch_stack so ptrace can inspect the processes state if necessary. - adds r2=IA64_TASK_FLAGS_OFFSET,r13 - ;; - ld8 r2=[r2] + mov loc0=rp // save return address + .body mov out0=0 // there is no "oldset" - adds out1,sp // out1=&pt_regs - ;; + adds out1=0,sp // out1=&sigscratch (pSys) mov out2=1 // out2=1 => we're in a syscall - tbit.nz p16,p17=r2,PF_PTRACED_BIT -(p16) br.cond.spnt.many setup_switch_stack ;; -back_from_setup_switch_stack: (pNonSys) mov out2=0 // out2=0 => not a syscall - adds r3=-IA64_SWITCH_STACK_SIZE+IA64_SWITCH_STACK_CALLER_UNAT_OFFSET+16,sp -(p17) adds sp=-IA64_SWITCH_STACK_SIZE,sp // make space for (dummy) switch_stack - ;; -(p17) st8 [r3]=r9 // save ar.unat in sw->caller_unat - mov loc0=rp // save return address - UNW(.body) + .fframe 16 + .spillpsp ar.unat, 16 // (note that offset is relative to psp+0x10!) + st8 [sp]=r9,-16 // allocate space for ar.unat and save it br.call.sptk.few rp=ia64_do_signal .ret11: - adds r3=IA64_SWITCH_STACK_CALLER_UNAT_OFFSET+16,sp + .restore sp + adds sp,sp // pop scratch stack space ;; - ld8 r9=[r3] // load new unat from sw->caller_unat + ld8 r9=[sp] // load new unat from sw->caller_unat mov rp=loc0 ;; -(p17) adds sp=IA64_SWITCH_STACK_SIZE,sp // drop (dummy) switch_stack -(p17) mov ar.unat=r9 -(p17) mov ar.pfs=loc1 -(p17) br.ret.sptk.many rp - - DO_LOAD_SWITCH_STACK( ) // restore the switch stack (ptrace may have modified it) + mov ar.unat=r9 + mov ar.pfs=loc1 br.ret.sptk.many rp - // NOT REACHED - -setup_switch_stack: - UNW(.prologue) - mov r16=loc1 +#else /* !CONFIG_IA64_NEW_UNWIND */ + .prologue + alloc r16=ar.pfs,8,0,3,0 // preserve all eight input regs in case of syscall restart! DO_SAVE_SWITCH_STACK UNW(.body) - br.cond.sptk.many back_from_setup_switch_stack + mov out0=0 // there is no "oldset" + adds out1,sp // out1=&sigscratch + .pred.rel.mutex pSys, pNonSys +(pSys) mov out2=1 // out2=1 => we're in a syscall +(pNonSys) mov out2=0 // out2=0 => not a syscall + br.call.sptk.few rp=ia64_do_signal +.ret11: + // restore the switch stack (ptrace may have modified it) + DO_LOAD_SWITCH_STACK( ) + br.ret.sptk.many rp +#endif /* !CONFIG_IA64_NEW_UNWIND */ END(handle_signal_delivery) GLOBAL_ENTRY(sys_rt_sigsuspend) - UNW(.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(2)) - alloc loc1=ar.pfs,2,2,3,0 - - // If the process is being ptraced, the signal may not actually be delivered to - // the process. Instead, SIGCHLD will be sent to the parent. We need to - // setup a switch_stack so ptrace can inspect the processes state if necessary. - // Also, the process might not ptraced until stopped in sigsuspend, so this - // isn't something that we can do conditionally based upon the value of - // PF_PTRACED_BIT. +#ifdef CONFIG_IA64_NEW_UNWIND + .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(8) + alloc loc1=ar.pfs,8,2,3,0 // preserve all eight input regs in case of syscall restart! + mov r9=ar.unat + mov loc0=rp // save return address mov out0=in0 // mask mov out1=in1 // sigsetsize + adds out2=0,sp // out2=&sigscratch ;; - adds out2,sp // out1=&pt_regs - mov r16=loc1 - DO_SAVE_SWITCH_STACK - mov loc0=rp // save return address - UNW(.body) - br.call.sptk.many rp=ia64_rt_sigsuspend + .fframe 16 + .spillpsp ar.unat, 16 // (note that offset is relative to psp+0x10!) + st8 [sp]=r9,-16 // allocate space for ar.unat and save it + .body + br.call.sptk.few rp=ia64_rt_sigsuspend .ret12: - adds r3=IA64_SWITCH_STACK_CALLER_UNAT_OFFSET+16,sp + .restore sp + adds sp,sp // pop scratch stack space ;; - ld8 r9=[r3] // load new unat from sw->caller_unat + ld8 r9=[sp] // load new unat from sw->caller_unat mov rp=loc0 ;; + mov ar.unat=r9 + mov ar.pfs=loc1 + br.ret.sptk.many rp +#else /* !CONFIG_IA64_NEW_UNWIND */ + UNW(.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(2)) + alloc r16=ar.pfs,2,0,3,0 + DO_SAVE_SWITCH_STACK + UNW(.body) + + mov out0=in0 // mask + mov out1=in1 // sigsetsize + adds out2,sp // out1=&sigscratch + br.call.sptk.many rp=ia64_rt_sigsuspend +.ret12: // restore the switch stack (ptrace may have modified it) - DO_LOAD_SWITCH_STACK(PT_REGS_UNWIND_INFO) + DO_LOAD_SWITCH_STACK( ) br.ret.sptk.many rp - // NOT REACHED +#endif /* !CONFIG_IA64_NEW_UNWIND */ END(sys_rt_sigsuspend) ENTRY(sys_rt_sigreturn) +#ifdef CONFIG_IA64_NEW_UNWIND + .regstk 0,0,3,0 // inherited from gate.s:invoke_sighandler() + PT_REGS_UNWIND_INFO + .prologue + PT_REGS_SAVES(16) + adds sp=-16,sp + .body + cmp.eq pNonSys,p0=r0,r0 // sigreturn isn't a normal syscall... + ;; + adds out0,sp // out0 = &sigscratch + br.call.sptk.few rp=ia64_rt_sigreturn +.ret13: + adds sp,sp // doesn't drop pt_regs, so don't mark it as restoring sp! + PT_REGS_UNWIND_INFO // instead, create a new body section with the smaller frame + ;; + ld8 r9=[sp] // load new ar.unat + mov b7=r8 + ;; + mov ar.unat=r9 + br b7 +#else /* !CONFIG_IA64_NEW_UNWIND */ .regstk 0,0,3,0 // inherited from gate.s:invoke_sighandler() PT_REGS_UNWIND_INFO - adds out0,sp // out0 = &pt_regs UNW(.prologue) UNW(.fframe IA64_PT_REGS_SIZE+IA64_SWITCH_STACK_SIZE) UNW(.spillsp rp, PT(CR_IIP)+IA64_SWITCH_STACK_SIZE) UNW(.spillsp ar.pfs, PT(CR_IFS)+IA64_SWITCH_STACK_SIZE) UNW(.spillsp ar.unat, PT(AR_UNAT)+IA64_SWITCH_STACK_SIZE) UNW(.spillsp pr, PT(PR)+IA64_SWITCH_STACK_SIZE) - adds sp=-IA64_SWITCH_STACK_SIZE,sp // make space for unat and padding + adds sp=-IA64_SWITCH_STACK_SIZE,sp + cmp.eq pNonSys,p0=r0,r0 // sigreturn isn't a normal syscall... ;; UNW(.body) - cmp.eq pNonSys,p0=r0,r0 // sigreturn isn't a normal syscall... + + adds out0,sp // out0 = &sigscratch br.call.sptk.few rp=ia64_rt_sigreturn .ret13: adds r3=IA64_SWITCH_STACK_CALLER_UNAT_OFFSET+16,sp ;; ld8 r9=[r3] // load new ar.unat - mov rp=r8 + mov b7=r8 ;; PT_REGS_UNWIND_INFO adds sp=IA64_SWITCH_STACK_SIZE,sp // drop (dummy) switch-stack frame mov ar.unat=r9 - br rp + br b7 +#endif /* !CONFIG_IA64_NEW_UNWIND */ END(sys_rt_sigreturn) GLOBAL_ENTRY(ia64_prepare_handle_unaligned)
arch/ia64/kernel/ia64_ksyms.c +36 -9
65 lines not on this page · raw message
arch/ia64/kernel/mca_asm.S +0 -1
@@ -6,7 +6,6 @@ // 00/03/29 cfleck Added code to save INIT handoff state in pt_regs format, switch to temp kstack, // switch modes, jump to C INIT handler // -#include <asm/offsets.h> #include <asm/pgtable.h> #include <asm/processor.h> #include <asm/mca_asm.h>
arch/ia64/kernel/pci.c +1 -1
@@ -197,7 +197,7 @@ ranges->mem_end -= bus->resource[1 ]->start; } -int __init +int pcibios_enable_device (struct pci_dev *dev) {/* Not needed, since we enable all devices at startup. */
arch/ia64/kernel/process.c +10 -1
@@ -311,7 +311,12 @@ dst[12 ] = pt->r12; dst[13 ] = pt->r13; dst[14 ] = pt->r14; dst[15 ] = pt->r15;memcpy (dst +16 , &pt->r16,16 *8 );/* r16-r31 are contiguous */ +#ifdef CONFIG_IA64_NEW_UNWIND +printk ("ia64_elf_core_copy_regs: fix me, please?" ); + dst[32 ] =0 ; +#else dst[32 ] =ia64_get_nat_bits (pt, sw); +#endif dst[33 ] = pt->pr;/* branch regs: */
@@ -332,6 +337,10 @@struct switch_stack *sw = ((struct switch_stack *) pt) -1 ;struct task_struct *fpu_owner =ia64_get_fpu_owner (); +#ifdef CONFIG_IA64_NEW_UNWIND +printk ("dump_fpu: fix me, please?" ); +#endif +memset (dst,0 ,sizeof (dst));/* don't leak any "random" bits */ /* f0 is 0.0 */ /* f1 is 1.0 */ dst[2 ] = sw->f2; dst[3 ] = sw->f3;
@@ -440,7 +449,7 @@do {if (unw_unwind (&info) <0 )return 0 ; - ip =unw_get_ip (&info); +unw_get_ip (&info, &ip);if (ip < first_sched || ip >= last_sched)return ip; }while (count++ <16 );
arch/ia64/kernel/ptrace.c +453 -77
757 lines not on this page · raw message
arch/ia64/kernel/setup.c +15 -0
@@ -36,6 +36,10 @@#include <asm/efi.h> #include <asm/mca.h> +#ifdef CONFIG_BLK_DEV_RAM +# include <linux/blk.h> +#endif +extern char _end;/* cpu_data[bootstrap_processor] is data for the bootstrap processor: */
@@ -127,11 +131,22 @@* change APIs, they'd do things for the better. Grumble... */ bootmap_start =PAGE_ALIGN (__pa (&_end)); +if (ia64_boot_param.initrd_size) + bootmap_start =PAGE_ALIGN (bootmap_start + ia64_boot_param.initrd_size); bootmap_size =init_bootmem (bootmap_start >>PAGE_SHIFT , max_pfn);efi_memmap_walk (free_available_memory,0 );reserve_bootmem (bootmap_start, bootmap_size); +#ifdef CONFIG_BLK_DEV_INITRD + initrd_start = ia64_boot_param.initrd_start; +if (initrd_start) { + initrd_end = initrd_start+ia64_boot_param.initrd_size; +printk ("Initial ramdisk at: 0x%p (%lu bytes)\n" , + (void *) initrd_start, ia64_boot_param.initrd_size); +reserve_bootmem (virt_to_phys (initrd_start), ia64_boot_param.initrd_size); + } +#endif #if 0 /* XXX fix me */ init_mm.start_code = (unsigned long ) &_stext;
arch/ia64/kernel/signal.c +117 -107
433 lines not on this page · raw message
arch/ia64/kernel/smp.c +17 -31
109 lines not on this page · raw message
arch/ia64/kernel/sys_ia64.c +3 -0
@@ -156,6 +156,9 @@ {struct pt_regs *regs = (struct pt_regs *) &stack; +if ((off & ~PAGE_MASK ) !=0 ) +return -EINVAL ; + addr =do_mmap2 (addr, len, prot, flags, fd, off >>PAGE_SHIFT );if (!IS_ERR (addr)) regs->r8 =0 ;/* ensure large addresses are not mistaken as failures... */
arch/ia64/kernel/time.c +6 -1
@@ -162,6 +162,11 @@*/ write_lock (&xtime_lock); new_itm = itm.next[cpu].count; + +if (!time_after (ia64_get_itc (), new_itm)) +printk ("Oops: timer tick before it's due (itc=%lx,itm=%lx)\n" , +ia64_get_itc (), new_itm); +while (1 ) {/* * Do kernel PC profiling here. We multiply the
@@ -220,7 +225,7 @@ia64_set_itm (new_itm); } -#ifdef CONFIG_ITANIUM_ASTEP_SPECIFIC +#if defined(CONFIG_ITANIUM_ASTEP_SPECIFIC ) || defined(CONFIG_IA64_SOFTSDV_HACKS )/* * Interrupts must be disabled before calling this routine.
arch/ia64/kernel/traps.c +0 -11
@@ -36,10 +36,6 @@#include <linux/init.h> #include <linux/sched.h> -#ifdef CONFIG_KDB -#include <linux/kdb.h> -#endif -#include <asm/ia32.h> #include <asm/processor.h> #include <asm/uaccess.h>
@@ -92,13 +88,6 @@ }printk ("%s[%d]: %s %ld\n" , current->comm, current->pid, str, err); - -#ifdef CONFIG_KDB -while (1 ) { -kdb (KDB_REASON_PANIC ,0 , regs); -printk ("Cant go anywhere from Panic!\n" ); - } -#endif show_regs (regs);
arch/ia64/kernel/unwind.c +31 -16
165 lines not on this page · raw message
arch/ia64/mm/init.c +13 -0
@@ -183,6 +183,19 @@ }void +free_initrd_mem (unsigned long start,unsigned long end) +{ +if (start < end) +printk ("Freeing initrd memory: %ldkB freed\n" , (end - start) >>10 ); +for (; start < end; start +=PAGE_SIZE ) { +clear_bit (PG_reserved, &mem_map[MAP_NR (start)].flags); +set_page_count (&mem_map[MAP_NR (start)],1 ); +free_page (start); + ++totalram_pages; + } +} + +void si_meminfo (struct sysinfo *val) { val->totalram = totalram_pages;
arch/ia64/vmlinux.lds.S +7 -0
@@ -46,6 +46,11 @@ { *(__ex_table) } __stop___ex_table = .; + __start___ksymtab = .; /* Kernel symbol table */ + __ksymtab : AT(ADDR(__ksymtab) - PAGE_OFFSET) + { *(__ksymtab) } + __stop___ksymtab = .; + /* Unwind table */ ia64_unw_start = .; .IA_64.unwind : AT(ADDR(.IA_64.unwind) - PAGE_OFFSET)
@@ -56,6 +61,8 @@ .rodata : AT(ADDR(.rodata) - PAGE_OFFSET) { *(.rodata) } + .kstrtab : AT(ADDR(.kstrtab) - PAGE_OFFSET) + { *(.kstrtab) } .opd : AT(ADDR(.opd) - PAGE_OFFSET) { *(.opd) }
fs/proc/generic.c +1 -1
@@ -42,7 +42,7 @@#endif /* 4K page size but our output routines use some slack for overruns */ -#define PROC_BLOCK_SIZE (3*1024) +#define PROC_BLOCK_SIZE (PAGE_SIZE - 1024)static ssize_t proc_file_read (struct file * file,char * buf,size_t nbytes,loff_t *ppos)
include/asm-ia64/processor.h +4 -1
@@ -658,13 +658,16 @@ thread_saved_pc (struct thread_struct *t) {struct unw_frame_info info; +unsigned long ip; +/* XXX ouch: Linus, please pass the task pointer to thread_saved_pc() instead! */ struct task_struct *p = (void *) ((unsigned long ) t -IA64_TASK_THREAD_OFFSET );unw_init_from_blocked_task (&info, p);if (unw_unwind (&info) <0 )return 0 ; -return unw_get_ip (&info); +unw_get_ip (&info, &ip); +return ip; }/*
include/asm-ia64/ptrace.h +7 -0
@@ -220,10 +220,17 @@extern long ia64_peek (struct pt_regs *,struct task_struct *,unsigned long addr,long *val);extern long ia64_poke (struct pt_regs *,struct task_struct *,unsigned long addr,long val); +#ifdef CONFIG_IA64_NEW_UNWIND +/* get nat bits for scratch registers such that bit N=1 iff scratch register rN is a NaT */ +extern unsigned long ia64_get_scratch_nat_bits (struct pt_regs *pt,unsigned long scratch_unat); +/* put nat bits for scratch registers such that scratch register rN is a NaT iff bit N=1 */ +extern unsigned long ia64_put_scratch_nat_bits (struct pt_regs *pt,unsigned long nat); +#else /* get nat bits for r1-r31 such that bit N=1 iff rN is a NaT */ extern long ia64_get_nat_bits (struct pt_regs *pt,struct switch_stack *sw);/* put nat bits for r1-r31 such that rN is a NaT iff bit N=1 */ extern void ia64_put_nat_bits (struct pt_regs *pt,struct switch_stack *sw,unsigned long nat); +#endif extern void ia64_increment_ip (struct pt_regs *pt);extern void ia64_decrement_ip (struct pt_regs *pt);
include/asm-ia64/ptrace_offsets.h +1 -1
@@ -118,7 +118,7 @@#define PT_F126 0x05e0#define PT_F127 0x05f0/* switch stack: */ -#define PT_PRI_UNAT 0x0600 +#define PT_NAT_BITS 0x0600#define PT_F2 0x0610#define PT_F3 0x0620
include/asm-ia64/system.h +2 -0
@@ -54,6 +54,8 @@__u16 num_pci_vectors;/* number of ACPI derived PCI IRQ's*/ __u64 pci_vectors;/* physical address of PCI data (pci_vector_struct)*/ __u64 fpswa;/* physical address of the the fpswa interface */ +__u64 initrd_start; +__u64 initrd_size; } ia64_boot_param; extern inline void
include/asm-ia64/unwind.h +45 -11
76 lines not on this page · raw message
[Linux-ia64] kernel update (relative to 2.4.0-test4)
In reply to David MosbergerHere is a long overdue kernel update. There relative diff I usually provide would have been too big (and hard to read) to include in this mail, so I'm just providing a summary of changes and the full diff, relative to the official 2.4.0-test4 kernel can be found at:
ftp://ftp.kernel.org/pub/linux/kernel/linux/ports/ia64/
as usual. The filename for the current patch is:
linux-2.4.0-test4-ia64-000714.diff.gz
Summary of changes:
- latest IA-32 fixes by Don Dugger (Don, can you check sys_ia32.c? I changed the way utime() is implemented. Also, I still think it would be a good idea to try to make the mmap emulation good enough so that it can be used for loading IA-32 ELF binaries. Some code for doing that is there now, though it's probably not complete.)
- clone2 system call is there now (works like clone, except that it specifies the stack memory area explicitly via a starting address and size)
- simplified kernel configuration for HP Simulator (Ski) by removing options that don't make sense
- probably a couple of other things I already forgot about---check patch for a complete reference... ;-)
Enjoy,
--david
[Linux-ia64] kernel update (relative to v2.4.0-test6)
In reply to David MosbergerThe latest IA-64 kernel diff is now available at:
ftp.kernel.org:/pub/linux/kernel/ports/ia64/
in file linux-2.4.0-test6-ia64-000811.diff*.
This update features:
- Stephane's PAL call and /proc/palinfo updates.
- Asit's updates to the sw I/O TLB.
- Perfmon updates from NEC. Per-process performance monitoring should work now.
- Stephane's fixes for initrd. The current version tolerates older version of eli, but if you're seeing a warning message of the form:
Warning: boot loader passed virtual address for initrd
you should consider updating your bootloader.
- A fix from Goutham that avoids pointer_lock() getting into an endless loop
- Finished optimizing memcpy.
- Asit's new SMP-safe region-id allocation code.
- Couple of small fixes to the AGP and DRM code.
- Added PCI ids for the 460gx chipset.
- Asit/Jes's siginfo and sigevent padding fixes. Note: this could break certain applications (though I don't know of any that actually do break).
- Documentation for Configure.help (yeah, nobody else volunteered, so I figured I had to bite the bullet; however, I'd still appreciate if someone else could keep an eye on this to make sure it doesn't fall behind the code too much...)
- Cleaned up (simplified?) the configuration a little. In particular, I dropped the CONFIG_IA64_FW_EMU option. I don't think anybody was using that anymore. Don, holler if I'm wrong... ;-)
- Small fix to make IA-32 version of vfork() work again (acrobat didn't like it otherwise...).
- Don/Kanoj's IA-32 fixes to readv/writev and other stuff.
- Implement workarounds for lfetch and semaphore erratas.
- Started a new spinlock implementation. It's currently commented out (#ifdef NEW_LOCK), not the least because it doesn't work yet. The idea behind this new version is to have a tiny amount of code inline for each spinlock and if there is contention, a branch to out-of-line code is done. What is different compared to other platforms is that the out-of-line handler is shared, which keeps code-size inflation down and also allows to use a fairly sophisticated handler for the contention case. The current handler is using an exponential backoff to try to keep the load on the bus low. The reason I believe we can make this work on IA-64 is because there are enough scratch registers so that stealing two or three of them for the spinlock won't hurt much.
As usual, the relative diff below is only for your convenience. Get the full diff from kernel.org for the real thing.
This kernel has been compiled and tested on the HP simulator, UP BigSur and 4-way Lions. It feels to me like the best kernel ever. I compiled the kernel 5 times from scratch in raw with "make -j16" and didn't get a single failure. Of course, YMMV.
Enjoy,
--david
Documentation/Configure.help +102 -0
@@ -16466,6 +16466,108 @@ another UltraSPARC-IIi-cEngine boardset with a 7-segment display, you should say N to this option. +IA-64 system type +CONFIG_IA64_GENERIC + This selects the system type of your hardware. A "generic" kernel + will run on any supported IA-64 system. However, if you configure + a kernel for your specific system, it will be faster and smaller. + + To find out what type of IA-64 system you have, you may want to + check the IA-64 Linux web site at http://www.linux-ia64.org/. + As of the time of this writing, most hardware is DIG compliant, + so the "DIG-compliant" option is usually the right choice. + + HP-simulator For the HP simulator (http://software.hp.com/ia64linux/). + SN1-simulator For the SGI SN1 simulator. + DIG-compliant For DIG ("Developer's Interface Guide") compliant system. + + If you don't know what to do, choose "generic". + +Kernel page size +CONFIG_IA64_PAGE_SIZE_4KB + + This lets you select the page size of the kernel. For best IA-64 + performance, a page size of 8KB or 16KB is recommended. For best + IA-32 compatibility, a page size of 4KB should be selected (the vast + majority of IA-32 binaries work perfectly fine with a larger page + size). For Itanium systems, do NOT chose a page size larger than + 16KB. + + 4KB For best IA-32 compatibility + 8KB For best IA-64 performance + 16KB For best IA-64 performance + 64KB Not for Itanium. + + If you don't know what to do, choose 8KB. + +Enable Itanium A-step specific code +CONFIG_ITANIUM_ASTEP_SPECIFIC + Select this option to build a kernel for an Itanium prototype system + with an A-step CPU. You have an A-step CPU if the "revision" field in + /proc/cpuinfo is 0. + +Enable Itanium A1-step specific code +CONFIG_ITANIUM_A1_SPECIFIC + Select this option to build a kernel for an Itanium prototype system + with an A1-step CPU. If you don't know whether you have an A1-step CPU, + you probably don't and you can answer "no" here. + +Enable Itanium B-step specific code +CONFIG_ITANIUM_BSTEP_SPECIFIC + Select this option to build a kernel for an Itanium prototype system + with a B-step CPU. You have a B-step CPU if the "revision" field in + /proc/cpuinfo has a value in the range from 1 to 4. + +Enable Itanium B0-step specific code +CONFIG_ITANIUM_B0_SPECIFIC + Select this option to bild a kernel for an Itanium prototype system + with a B0-step CPU. You have a B0-step CPU if the "revision" field in + /proc/cpuinfo is 1. + +Force interrupt redirection +CONFIG_IA64_HAVE_IRQREDIR + Select this option if you know that your system has the ability to + redirect interrupts to different CPUs. Select N here if you're + unsure. + +Enable use of global TLB purge instruction (ptc.g) +CONFIG_ITANIUM_PTCG + Say Y here if you want the kernel to use the IA-64 "ptc.g" + instruction to flush the TLB on all CPUs. Select N here if + you're unsure. + +Enable SoftSDV hacks +CONFIG_IA64_SOFTSDV_HACKS + Say Y here to enable hacks to make the kernel work on the Intel + SoftSDV simulator. Select N here if you're unsure. + +Enable AzusA hacks +CONFIG_IA64_AZUSA_HACKS + Say Y here to enable hacks to make the kernel work on the NEC + AzusA platform. Select N here if you're unsure. + +Enable IA-64 Machine Check Abort +CONFIG_IA64_MCA + Say Y here to enable machine check support for IA-64. If you're + unsure, answer Y. + +Performance monitor support +CONFIG_PERFMON + Selects whether support for the IA-64 performance monitor hardware + is included in the kernel. This makes some kernel data-structures a + little bigger and slows down execution a bit, but it is still + usually a good idea to turn this on. If you're unsure, say N. + +/proc/pal support +CONFIG_IA64_PALINFO + If you say Y here, you are able to get PAL (Processor Abstraction + Layer) information in /proc/pal. This contains useful information + about the processors in your systems, such as cache and TLB sizes + and the PAL firmware version in use. + + To use this option, you have to check that the "/proc file system + support" (CONFIG_PROC_FS) is enabled, too. + # # A couple of things I keep forgetting: # capitalize: AppleTalk, Ethernet, DOS, DMA, FAT, FTP, Internet,
arch/ia64/config.in +14 -13
@@ -18,15 +18,16 @@ comment 'General setup' define_bool CONFIG_IA64 y +define_bool CONFIG_SWIOTLB y # for now... define_bool CONFIG_ISA n define_bool CONFIG_SBUS n choice 'IA-64 system type' \ - "Generic CONFIG_IA64_GENERIC \ + "generic CONFIG_IA64_GENERIC \ + DIG-compliant CONFIG_IA64_DIG \ HP-simulator CONFIG_IA64_HP_SIM \ - SN1-simulator CONFIG_IA64_SGI_SN1_SIM \ - DIG-compliant CONFIG_IA64_DIG" Generic + SN1-simulator CONFIG_IA64_SGI_SN1_SIM" generic choice 'Kernel page size' \ "4KB CONFIG_IA64_PAGE_SIZE_4KB \
@@ -38,16 +39,18 @@ define_bool CONFIG_ITANIUM y define_bool CONFIG_IA64_BRL_EMU y bool ' Enable Itanium A-step specific code' CONFIG_ITANIUM_ASTEP_SPECIFIC - bool ' Enable Itanium A1-step specific code' CONFIG_ITANIUM_A1_SPECIFIC + if [ "$CONFIG_ITANIUM_ASTEP_SPECIFIC" = "y" ]; then + bool ' Enable Itanium A1-step specific code' CONFIG_ITANIUM_A1_SPECIFIC + fi + bool ' Enable Itanium B-step specific code' CONFIG_ITANIUM_BSTEP_SPECIFIC + if [ "$CONFIG_ITANIUM_BSTEP_SPECIFIC" = "y" ]; then + bool ' Enable Itanium B0-step specific code' CONFIG_ITANIUM_B0_SPECIFIC + fi + bool ' Force interrupt redirection' CONFIG_IA64_HAVE_IRQREDIR bool ' Enable use of global TLB purge instruction (ptc.g)' CONFIG_ITANIUM_PTCG bool ' Enable SoftSDV hacks' CONFIG_IA64_SOFTSDV_HACKS bool ' Enable AzusA hacks' CONFIG_IA64_AZUSA_HACKS - bool ' Emulate PAL/SAL/EFI firmware' CONFIG_IA64_FW_EMU - bool ' Enable IA64 Machine Check Abort' CONFIG_IA64_MCA -fi - -if [ "$CONFIG_IA64_GENERIC" = "y" ]; then - define_bool CONFIG_IA64_SOFTSDV_HACKS y + bool ' Enable IA-64 Machine Check Abort' CONFIG_IA64_MCA fi if [ "$CONFIG_IA64_SGI_SN1_SIM" = "y" ]; then
@@ -59,7 +62,7 @@ bool 'SMP support' CONFIG_SMP bool 'Performance monitor support' CONFIG_PERFMON -bool '/proc/palinfo support' CONFIG_IA64_PALINFO +bool '/proc/pal support' CONFIG_IA64_PALINFO bool 'Networking support' CONFIG_NET bool 'System V IPC' CONFIG_SYSVIPC
@@ -162,8 +165,6 @@ #source drivers/misc/Config.in source fs/Config.in - -source fs/nls/Config.in if [ "$CONFIG_VT" = "y" ]; then mainmenu_option next_comment
arch/ia64/dig/setup.c +0 -4
@@ -24,10 +24,6 @@#include <asm/machvec.h> #include <asm/system.h> -#ifdef CONFIG_IA64_FW_EMU -# include "../../kernel/fw-emu.c" -#endif -/* * This is here so we can use the CMOS detection in ide-probe.c to * determine what drives are present. In theory, we don't need this
arch/ia64/ia32/ia32_entry.S +29 -29
142 lines not on this page · raw message
arch/ia64/ia32/sys_ia32.c +192 -229
523 lines not on this page · raw message
arch/ia64/kernel/Makefile +2 -2
@@ -9,8 +9,8 @@ all: kernel.o head.o init_task.o -obj-y := acpi.o entry.o gate.o efi.o efi_stub.o irq.o irq_ia64.o irq_sapic.o ivt.o \ - pal.o pci-dma.o process.o perfmon.o ptrace.o sal.o semaphore.o setup.o \ +obj-y := acpi.o entry.o gate.o efi.o efi_stub.o irq.o irq_ia64.o irq_sapic.o ivt.o \ + machvec.o pal.o pci-dma.o process.o perfmon.o ptrace.o sal.o semaphore.o setup.o \ signal.o sys_ia64.o traps.o time.o unaligned.o unwind.o obj-$(CONFIG_IA64_GENERIC) += machvec.o
arch/ia64/kernel/efi.c +2 -2
@@ -246,7 +246,7 @@printk (KERN_ERR "Too many EFI Pal Code memory ranges, dropped @ %lx\n" , md->phys_addr);continue ; - } + } mask = ~((1 << _PAGE_SIZE_4M)-1 );/* XXX should be dynamic? */ vaddr =PAGE_OFFSET + md->phys_addr;
@@ -289,7 +289,7 @@for (cp = saved_command_line; *cp; ) {if (memcmp (cp,"mem=" ,4 ) =0 ) { cp +=4 ; - mem_limit =memparse (cp, &end); + mem_limit =memparse (cp, &end) -1 ;if (end != cp)break ; cp = end;
arch/ia64/kernel/entry.S +3 -13
@@ -106,29 +106,19 @@ alloc r16=ar.pfs,1,0,0,0 DO_SAVE_SWITCH_STACK UNW(.body) - // disable interrupts to ensure atomicity for next few instructions: - mov r17=psr // M-unit - ;; - rsm psr.i // M-unit - dep r18=-1,r0,0,61 // build mask 0x1fffffffffffffff - ;; - srlz.d - ;; + adds r22=IA64_TASK_THREAD_KSP_OFFSET,r13 + dep r18=-1,r0,0,61 // build mask 0x1fffffffffffffff adds r21=IA64_TASK_THREAD_KSP_OFFSET,in0 ;; st8 [r22]=sp // save kernel stack pointer of old task ld8 sp=[r21] // load kernel stack pointer of new task and r20=in0,r18 // physical address of "current" ;; + mov ar.k6=r20 // copy "current" into ar.k6 mov r8=r13 // return pointer to previously running task mov r13=in0 // set "current" pointer - mov ar.k6=r20 // copy "current" into ar.k6 - ;; - // restore interrupts - mov psr.l=r17 ;; - srlz.d DO_LOAD_SWITCH_STACK( ) br.ret.sptk.few rp END(ia64_switch_to)
arch/ia64/kernel/head.S +73 -0
83 lines not on this page · raw message
arch/ia64/kernel/ia64_ksyms.c +2 -0
@@ -18,6 +18,7 @@EXPORT_SYMBOL (strncat);EXPORT_SYMBOL (strncmp);EXPORT_SYMBOL (strncpy); +EXPORT_SYMBOL (strstr);EXPORT_SYMBOL (strtok);#include <linux/pci.h>
@@ -37,6 +38,7 @@EXPORT_SYMBOL (kernel_thread);#ifdef CONFIG_SMP +#include <asm/hardirq.h> EXPORT_SYMBOL (synchronize_irq);#include <asm/smplock.h>
arch/ia64/kernel/ivt.S +13 -25
@@ -170,33 +170,27 @@ * The ITLB basically does the same as the VHPT handler except * that we always insert exactly one instruction TLB entry. */ -#if 1 /* * Attempt to lookup PTE through virtual linear page table. * The speculative access will fail if there is no TLB entry * for the L3 page table page we're trying to access. */ - mov r31=pr // save predicates - ;; - thash r17=r16 // compute virtual address of L3 PTE + mov r16=cr.iha // get virtual address of L3 PTE ;; - ld8.s r18=[r17] // try to read L3 PTE + ld8.s r16=[r16] // try to read L3 PTE + mov r31=pr // save predicates ;; - tnat.nz p6,p0=r18 // did read succeed? + tnat.nz p6,p0=r16 // did read succeed? (p6) br.cond.spnt.many 1f ;; - itc.i r18 + itc.i r16 ;; mov pr=r31,-1 rfi -1: rsm psr.dt // use physical addressing for data -#else - mov r16=cr.ifa // get address that caused the TLB miss +1: mov r16=cr.ifa // get address that caused the TLB miss ;; rsm psr.dt // use physical addressing for data -#endif - mov r31=pr // save the predicate registers mov r19=ar.k7 // get page table base address shl r21=r16,3 // shift bit 60 into sign bit shr.u r17=r16,61 // get the region number into r17
@@ -244,33 +238,27 @@ * The DTLB basically does the same as the VHPT handler except * that we always insert exactly one data TLB entry. */ - mov r16=cr.ifa // get address that caused the TLB miss -#if 1 /* * Attempt to lookup PTE through virtual linear page table. * The speculative access will fail if there is no TLB entry * for the L3 page table page we're trying to access. */ - mov r31=pr // save predicates + mov r16=cr.iha // get virtual address of L3 PTE ;; - thash r17=r16 // compute virtual address of L3 PTE - ;; - ld8.s r18=[r17] // try to read L3 PTE + ld8.s r16=[r16] // try to read L3 PTE + mov r31=pr // save predicates ;; - tnat.nz p6,p0=r18 // did read succeed? + tnat.nz p6,p0=r16 // did read succeed? (p6) br.cond.spnt.many 1f ;; - itc.d r18 + itc.d r16 ;; mov pr=r31,-1 rfi -1: rsm psr.dt // use physical addressing for data -#else - rsm psr.dt // use physical addressing for data - mov r31=pr // save the predicate registers +1: mov r16=cr.ifa // get address that caused the TLB miss ;; -#endif + rsm psr.dt // use physical addressing for data mov r19=ar.k7 // get page table base address shl r21=r16,3 // shift bit 60 into sign bit shr.u r17=r16,61 // get the region number into r17
arch/ia64/kernel/pal.S +54 -0
57 lines not on this page · raw message
arch/ia64/kernel/palinfo.c +36 -53
175 lines not on this page · raw message
arch/ia64/kernel/pci-dma.c +243 -158
491 lines not on this page · raw message
arch/ia64/kernel/perfmon.c +87 -61
237 lines not on this page · raw message
arch/ia64/kernel/process.c +17 -23
@@ -27,6 +27,8 @@#include <asm/unwind.h> #include <asm/user.h> +#ifdef CONFIG_IA64_NEW_UNWIND +static void do_show_stack (struct unw_frame_info *info,void *arg) {
@@ -44,6 +46,8 @@ } while (unw_unwind(info) >= 0); } +#endif +void show_stack (struct task_struct *task) {
@@ -118,15 +122,14 @@ current->nice =20 ; current->counter =-100 ; -#ifdef CONFIG_SMP -if (!current->need_resched) -min_xtp (); -#endif while (1 ) { -while (!current->need_resched) { +#ifdef CONFIG_SMP +if (!current->need_resched) +min_xtp (); +#endif +while (!current->need_resched)continue ; - }#ifdef CONFIG_SMP normal_xtp ();#endif
@@ -157,11 +160,12 @@void ia64_save_extra (struct task_struct *task) { -extern void ia64_save_debug_regs (unsigned long *save_area); -extern void ia32_save_state (struct thread_struct *thread); -if ((task->thread.flags &IA64_THREAD_DBG_VALID ) !=0 )ia64_save_debug_regs (&task->thread.dbr[0 ]); +#ifdef CONFIG_PERFMON +if ((task->thread.flags &IA64_THREAD_PM_VALID ) !=0 ) +ia64_save_pm_regs (&task->thread); +#endif if (IS_IA32_PROCESS (ia64_task_regs (task)))ia32_save_state (&task->thread); }
@@ -169,11 +173,12 @@void ia64_load_extra (struct task_struct *task) { -extern void ia64_load_debug_regs (unsigned long *save_area); -extern void ia32_load_state (struct thread_struct *thread); -if ((task->thread.flags &IA64_THREAD_DBG_VALID ) !=0 )ia64_load_debug_regs (&task->thread.dbr[0 ]); +#ifdef CONFIG_PERFMON +if ((task->thread.flags &IA64_THREAD_PM_VALID ) !=0 ) +ia64_load_pm_regs (&task->thread); +#endif if (IS_IA32_PROCESS (ia64_task_regs (task)))ia32_load_state (&task->thread); }
@@ -530,17 +535,6 @@if (ia64_get_fpu_owner () = current) {ia64_set_fpu_owner (0 ); } -} - -/* -* Free remaining state associated with DEAD_TASK. This is called -* after the parent of DEAD_TASK has collected the exist status of the -* task via wait(). -*/ -void -release_thread (struct task_struct *dead_task) -{ -/* nothing to do */ }unsigned long
arch/ia64/kernel/sal.c +8 -0
@@ -156,6 +156,14 @@struct ia64_sal_desc_platform_feature *pf = (void *) p;printk ("SAL: Platform features " ); +#ifdef CONFIG_IA64_HAVE_IRQREDIR +/* +* Early versions of SAL say we don't have +* IRQ redirection, even though we do... +*/ + pf->feature_mask |= (1 <<1 ); +#endif +if (pf->feature_mask & (1 <<0 ))printk ("BusLock " );
arch/ia64/kernel/semaphore.c +0 -3
@@ -222,9 +222,6 @@void __down_read_failed (struct rw_semaphore *sem,long count) { -struct task_struct *tsk = current; -DECLARE_WAITQUEUE (wait, tsk); -while (1 ) {if (count =-1 ) {down_read_failed_biased (sem);
arch/ia64/kernel/setup.c +48 -2
67 lines not on this page · raw message
arch/ia64/kernel/smp.c +73 -5
117 lines not on this page · raw message
arch/ia64/kernel/time.c +5 -3
@@ -150,11 +150,13 @@static void timer_interrupt (int irq,void *dev_id,struct pt_regs *regs) { -static unsigned long last_time; -static unsigned char count;int cpu =smp_processor_id ();unsigned long new_itm; +#if 0 +static unsigned long last_time; +static unsigned char count;int printed =0 ; +#endif /* * Here we are in the timer irq handler. We have irqs locally
@@ -192,7 +194,7 @@if (time_after (new_itm,ia64_get_itc ()))break ; -#if !(defined(CONFIG_IA64_SOFTSDV_HACKS ) && defined(CONFIG_SMP )) +#if 0 /* * SoftSDV in SMP mode is _slow_, so we do "lose" ticks, * but it's really OK...
arch/ia64/kernel/unwind.c +1 -1
@@ -62,7 +62,7 @@#define UNW_LOG_HASH_SIZE (UNW_LOG_CACHE_SIZE + 1)#define UNW_HASH_SIZE (1 << UNW_LOG_HASH_SIZE) -#define UNW_DEBUG 1 +#define UNW_DEBUG 0#define UNW_STATS 0/* WARNING: this disabled interrupts for long time-spans!! */ #if UNW_DEBUG
arch/ia64/lib/memcpy.S +230 -36
310 lines not on this page · raw message
arch/ia64/mm/init.c +34 -0
@@ -185,8 +185,42 @@void free_initrd_mem (unsigned long start,unsigned long end) { +/* +* EFI uses 4KB pages while the kernel can use 4KB or bigger. +* Thus EFI and the kernel may have different page sizes. It is +* therefore possible to have the initrd share the same page as +* the end of the kernel (given current setup). +* +* To avoid freeing/using the wrong page (kernel sized) we: +* - align up the beginning of initrd +* - keep the end untouched +* +* | | +* |=======| a000 +* | | +* | | +* | | 9000 +* |/////////////| +* |/////////////| +* |=======| 8000 +* |///INITRD////| +* |/////////////| +* |/////////////| 7000 +* | | +* |KKKKKKKKKKKKK| +* |=======| 6000 +* |KKKKKKKKKKKKK| +* |KKKKKKKKKKKKK| +* K=kernel using 8KB pages +* +* In this example, we must free page 8000 ONLY. So we must align up +* initrd_start and keep initrd_end as is. +*/ + start =PAGE_ALIGN (start); +if (start < end)printk ("Freeing initrd memory: %ldkB freed\n" , (end - start) >>10 ); +for (; start < end; start +=PAGE_SIZE ) {clear_bit (PG_reserved, &virt_to_page (start)->flags);set_page_count (virt_to_page (start),1 );
arch/ia64/mm/tlb.c +39 -40
105 lines not on this page · raw message
arch/ia64/sn/sn1/irq.c +1 -1
@@ -1,6 +1,6 @@#include <linux/kernel.h> -#include <linux/irq.h> #include <linux/sched.h> +#include <linux/irq.h> #include <asm/ptrace.h>
drivers/char/Makefile +10 -0
@@ -109,7 +109,17 @@ endif obj-$(CONFIG_MAGIC_SYSRQ) += sysrq.o + obj-$(CONFIG_ATARI_DSP56K) += dsp56k.o +ifeq ($(CONFIG_ATARI_DSP56K),y) +S = y +else + ifeq ($(CONFIG_ATARI_DSP56K),m) + SM = y + endif +endif + +obj-$(CONFIG_SIM_SERIAL) += simserial.o obj-$(CONFIG_ROCKETPORT) += rocket.o obj-$(CONFIG_MOXA_SMARTIO) += mxser.o obj-$(CONFIG_MOXA_INTELLIO) += moxa.o
drivers/char/agp/agpgart_be.c +4 -2
@@ -67,14 +67,16 @@ {#if defined(__i386__) asmvolatile ("wbinvd" :::"memory" ); -#elif defined(__alpha__) +#elif defined(__alpha__) || defined(__ia64__)/* ??? I wonder if we'll really need to flush caches, or if the core logic can manage to keep the system coherent. The ARM speaks only of using `cflush' to get things in memory in preparation for power failure. If we do need to call `cflush', we'll need a target page, -as we can only flush one page at a time. */ +as we can only flush one page at a time. + +Ditto for IA-64. --davidm 00/08/07 */ mb ();#else #error "Please define flush_cache."
drivers/char/drm/agpsupport.c +1 -1
@@ -322,7 +322,7 @@case ALI_M1541 : head->chipset ="ALi M1541" ;break ;default : head->chipset ="Unknown" ;break ; } - DRM_INFO("AGP %d.%d on %s @ 0x%08lx %dMB\n", + DRM_INFO("AGP %d.%d on %s @ 0x%08lx %ZuMB\n", head->agp_info.version.major, head->agp_info.version.minor, head->chipset,
drivers/char/drm/lists.c +2 -0
@@ -153,6 +153,7 @@#endif buf->list =DRM_LIST_FREE ; do { + /* XXX this is wrong due to the ABA problem! --davidm 00/08/07 */ old = bl->next; buf->next = old; prev = cmpxchg(&bl->next, old, buf);
@@ -185,6 +186,7 @@/* Get buffer */ do { + /* XXX this is wrong due to the ABA problem! --davidm 00/08/07 */ old = bl->next; if (!old) return NULL; new = bl->next->next;
drivers/char/drm/vm.c +4 -1
@@ -250,7 +250,7 @@ vma->vm_start, vma->vm_end, VM_OFFSET(vma));/* Length must match exact page count */ -if ((length >>PAGE_SHIFT ) != dma->page_count) { +if (!dma || (length >>PAGE_SHIFT ) != dma->page_count) {unlock_kernel ();return -EINVAL ; }
@@ -323,6 +323,9 @@pgprot_val (vma->vm_page_prot) |= _PAGE_PCD; pgprot_val(vma->vm_page_prot) &= ~_PAGE_PWT; } +#elif defined(__ia64__) +if (map->type != _DRM_AGP) + vma->vm_page_prot =pgprot_writecombine (vma->vm_page_prot);#endif vma->vm_flags |=VM_IO ;/* not in core dump */ }
drivers/char/efirtc.c +1 -2
@@ -395,11 +395,10 @@return 0 ; } -static int __exit +static void __exitefi_rtc_exit (void ) {/* not yet used */ -return 0 ; }module_init (efi_rtc_init);
drivers/char/simserial.c +1 -1
@@ -742,7 +742,7 @@ info->tqueue.data = info; info->state = sstate;if (sstate->info) { -kfree_s (info,sizeof (struct async_struct )); +kfree (info); *ret_info = sstate->info;return 0 ; }
drivers/pci/pci.ids +6 -1
@@ -4635,7 +4635,12 @@ 84c4 450KX/GX [Orion] - 82454KX/GX PCI bridge 84c5 450KX/GX [Orion] - 82453KX/GX Memory controller 84ca 450NX - 82451NX Memory & I/O Controller - 84cb 450NX - 82454NX PCI Expander Bridge + 84cb 450NX - 82454NX/84460GX PCI Expander Bridge + 84e0 460GX - 84460GX System Address Controller (SAC) + 84e1 460GX - 84460GX System Data Controller (SDC) + 84e2 460GX - 84460GX AGP Bridge (GXB) + 84e3 460GX - 84460GX Memory Address Controller (MAC) + 84e4 460GX - 84460GX Memory Data Controller (MDC) ffff 450NX/GX [Orion] - 82453KX/GX Memory controller [BUG] 8800 Trigem Computer Inc. 2008 Video assistent component
fs/dcache.c +3 -2
@@ -1189,8 +1189,9 @@if (!dentry_cache)panic ("Cannot create dentry cache" ); -if (PAGE_SHIFT <13 ) - mempages >>= (13 -PAGE_SHIFT ); +#if PAGE_SHIFT <13 + mempages >>= (13 -PAGE_SHIFT ); +#endif mempages *=sizeof (struct list_head );for (order =0 ; ((1UL << order) <<PAGE_SHIFT ) < mempages; order++) ;
include/asm-ia64/asmmacro.h +1 -1
@@ -23,7 +23,7 @@#endif #define ENTRY (name) \ - .align 16; \ + .align 32; \ .proc name; \ name:
include/asm-ia64/machvec.h +1 -1
@@ -40,7 +40,7 @@# elif defined (CONFIG_IA64_DIG )# include <asm/machvec_dig.h> # elif defined (CONFIG_IA64_SGI_SN1_SIM ) -# include <asm/machvec_sgi_sn1.h> +# include <asm/machvec_sn1.h> # elif defined (CONFIG_IA64_GENERIC )# ifdef MACHVEC_PLATFORM_HEADER
include/asm-ia64/mmu_context.h +26 -22
44 lines not on this page · raw message
include/asm-ia64/spinlock.h +78 -33
111 lines not on this page · raw message
include/asm-ia64/system.h +68 -60
128 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.
Re: [Linux-ia64] kernel update (relative to v2.4.0-test6)
In reply to David MosbergerDavid Mosberger <[email protected]> writes:
|> - Stephane's fixes for initrd. The current version tolerates older |> version of eli, but if you're seeing a warning message of the form: |> |> Warning: boot loader passed virtual address for initrd |> |> you should consider updating your bootloader.
This patch is needed to make it actually compile.
ia64/kernel/setup.c +1 -1
@@ -157,7 +157,7 @@if (initrd_start >=PAGE_OFFSET )printk ("Warning: boot loader passed virtual address " "for initrd, please upgrade the loader\n" ); - } else + else#endif /* * The loader ONLY passes physical addresses
Andreas.
Signature · 4 lines
Andreas Schwab "And now for something SuSE Labs completely different." [email protected] SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
Re: [Linux-ia64] kernel update (relative to v2.4.0-test6)
In reply to David MosbergerYes, I goofed when merging in Stephane's changes (and Stephane told me just about 10 minutes after I mailed out the patch). It obviously compiles fine if you don't turn on INITRD support, which is why I didn't notice.
--david
Andreas> David Mosberger <[email protected]> writes:
Andreas> |> - Stephane's fixes for initrd. The current version tolerates older Andreas> |> version of eli, but if you're seeing a warning message of the form: Andreas> |> Andreas> |> Warning: boot loader passed virtual address for initrd Andreas> |> Andreas> |> you should consider updating your bootloader.
Andreas> This patch is needed to make it actually compile.
ia64/kernel/setup.c +1 -1
@@ -157,7 +157,7 @@if (initrd_start >=PAGE_OFFSET )printk ("Warning: boot loader passed virtual address " "for initrd, please upgrade the loader\n" ); - } else + else#endif /* * The loader ONLY passes physical addresses
Andreas.
Signature · 4 lines
Andreas Schwab "And now for something SuSE Labs completely different." [email protected] SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
[Linux-ia64] kernel update (relative to v2.4.0-test8)
In reply to David MosbergerThe latest IA-64 kernel diff is now available at:
ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/
in file linux-2.4.0-test8-ia64-000908.diff.gz. The most important changes since the previous version:
- SMP should be MUCH more stable again, thanks to Asit's fixed for fph and the deadlock fix to read/write-lock. Note that for SMP, I eliminated the notion of "fpu_owner" completely, as it made no sense with the current setup. Longer term, I think it would be better to manage the the fph partition in a completely lazy fashion as we do on UP. IMHO, if you have four threads and four CPUs, the fph contents should never have to be switched.
- Don's IA-32 updates (support for inb/outb et al...)
- Updated qla1280 driver from Qlogic. This one uses the PCI DMA interface. It should boot on any machine independent of whether >4GB addressing is enabled. Of course, for best performance you'll want to make sure >4GB addressing is enabled on machines with memory above 4GB.
- Stephane's efi_map_pal_code() updates to avoid overlapping TLB translations. Also some updates to /proc/pal.
- Bill added a bunch of symbols to ia64_ksyms.
- Rob's fix for ia64_pal_cache_flush (psr.ic needs to be off) and addition of ia64_pal_prefetch_visibility() call.
- ar.ec is now accessible via ptrace() again (got dropped accidentally..).
- Hacked the eepro100 driver to make it possible to DMA incoming packets in a way that will yield properly aligned IP headers. This results in a very significant saving of CPU utilization during heavy Ethernet I/O. I also added an option to force device socket buffer allocation to be below 4GB, which should avoid bounce buffers on systems with memory above 4GB. It won't eliminate them completely though. Haven't had a chance to determine the performance effect of this. It's just a hack until 2.5 comes along and gives us an all-improved memory allocation scheme... ;-)
The patch below is once again a rough approximation of what changed since the last update. This kernel has been tested on the HP Ski simulator, Big Sur (UP and MP), and Lion (MP).
Enjoy,
--david
Documentation/Configure.help +11 -0
@@ -16607,6 +16607,17 @@ Say Y here to enable hacks to make the kernel work on the NEC AzusA platform. Select N here if you're unsure. +Force socket buffers below 4GB? +CONFIG_SKB_BELOW_4GB + Most of today's network interface cards (NICs) support DMA to + the low 32 bits of the address space only. On machines with + more then 4GB of memory, this can cause the system to slow + down if there is no I/O TLB hardware. Turning this option on + avoids the slow-down by forcing socket buffers to be allocated + from memory below 4GB. The downside is that your system could + run out of memory below 4GB before all memory has been used up. + If you're unsure how to answer this question, answer Y. + Enable IA-64 Machine Check Abort CONFIG_IA64_MCA Say Y here to enable machine check support for IA-64. If you're
arch/ia64/config.in +1 -0
@@ -51,6 +51,7 @@ bool ' Enable SoftSDV hacks' CONFIG_IA64_SOFTSDV_HACKS bool ' Enable AzusA hacks' CONFIG_IA64_AZUSA_HACKS bool ' Enable IA-64 Machine Check Abort' CONFIG_IA64_MCA + bool ' Force socket buffers below 4GB?' CONFIG_SKB_BELOW_4GB bool ' ACPI kernel configuration manager (EXPERIMENTAL)' CONFIG_ACPI_KERNEL_CONFIG if [ "$CONFIG_ACPI_KERNEL_CONFIG" = "y" ]; then
arch/ia64/ia32/binfmt_elf32.c +3 -1
@@ -52,7 +52,7 @@pte_t * pte;if (page_count (page) !=1 ) -printk ("mem_map disagrees with %p at %08lx\n" , page, address); +printk ("mem_map disagrees with %p at %08lx\n" , (void *) page, address); pgd =pgd_offset (tsk->mm, address); pmd =pmd_alloc (pgd, address);if (!pmd) {
@@ -120,6 +120,8 @@ : "r" ((ulong)IA32_FCR_DEFAULT)); __asm__("mov ar.fir = r0" ); __asm__("mov ar.fdr = r0" ); + __asm__("mov %0=ar.k0 ;;" :"=r" (current->thread.old_iob)); + __asm__("mov ar.k0=%0 ;;" ::"r" (IA32_IOBASE ));/* TSS */ __asm__("mov ar.k1 = %0" : /* no outputs */
arch/ia64/ia32/ia32_signal.c +3 -3
@@ -278,7 +278,7 @@ err |=setup_sigcontext_ia32 (&frame->sc, &frame->fpstate, regs, set->sig[0 ]); -if (_NSIG_WORDS >1 ) { +if (_IA32_NSIG_WORDS >1 ) { err |=__copy_to_user (frame->extramask, &set->sig[1 ],sizeof (frame->extramask)); }
@@ -310,7 +310,7 @@#if 0 printk ("SIG deliver (%s:%d): sig=%d sp=%p pc=%lx ra=%x\n" , - current->comm, current->pid, sig, frame, regs->cr_iip, frame->pretcode); + current->comm, current->pid, sig, (void *) frame, regs->cr_iip, frame->pretcode);#endif return 1 ;
@@ -380,7 +380,7 @@#if 0 printk ("SIG deliver (%s:%d): sp=%p pc=%lx ra=%x\n" , - current->comm, current->pid, frame, regs->cr_iip, frame->pretcode); + current->comm, current->pid, (void *) frame, regs->cr_iip, frame->pretcode);#endif return 1 ;
arch/ia64/ia32/ia32_support.c +3 -0
@@ -42,6 +42,7 @@ thread->csd = csd; thread->ssd = ssd; thread->tssd = tssd; + asm ("mov ar.k0=%0 ;;" ::"r" (thread->old_iob)); }void
@@ -68,6 +69,8 @@ "mov ar.k1=%7" :: "r"(eflag), "r"(fsr), "r"(fcr), "r"(fir), "r"(fdr), "r"(csd), "r"(ssd), "r"(tssd)); + asm ("mov %0=ar.k0 ;;" :"=r" (thread->old_iob)); + asm ("mov ar.k0=%0 ;;" ::"r" (IA32_IOBASE )); }/*
arch/ia64/ia32/sys_ia32.c +84 -11
140 lines not on this page · raw message
arch/ia64/kernel/efi.c +34 -6
@@ -247,12 +247,41 @@ md->phys_addr);continue ; } - mask = ~((1 << _PAGE_SIZE_4M)-1 );/* XXX should be dynamic? */ +/* +* We must use the same page size as the one used +* for the kernel region when we map the PAL code. +* This way, we avoid overlapping TRs if code is +* executed nearby. The Alt I-TLB installs 256MB +* page sizes as defined for region 7. +* +* XXX Fixme: should be dynamic here (for page size) +*/ + mask = ~((1 << _PAGE_SIZE_256M)-1 ); vaddr =PAGE_OFFSET + md->phys_addr; -printk (__FUNCTION__": mapping PAL code [0x%lx-0x%lx) into [0x%lx-0x%lx)\n" , - md->phys_addr, md->phys_addr + (md->num_pages <<12 ), - vaddr & mask, (vaddr & mask) +4 *1024 *1024 ); +/* +* We must check that the PAL mapping won't overlap +* with the kernel mapping on ITR1. +* +* PAL code is guaranteed to be aligned on a power of 2 +* between 4k and 256KB. +* Also from the documentation, it seems like there is an +* implicit guarantee that you will need only ONE ITR to +* map it. This implies that the PAL code is always aligned +* on its size, i.e., the closest matching page size supported +* by the TLB. Therefore PAL code is guaranteed never to cross +* a 256MB unless it is bigger than 256MB (very unlikely!). +* So for now the following test is enough to determine whether +* or not we need a dedicated ITR for the PAL code. +*/ +if ((vaddr & mask) = (PAGE_OFFSET & mask)) { +printk (__FUNCTION__" : no need to install ITR for PAL Code\n" ); +continue ; + } + +printk (__FUNCTION__": CPU %d mapping PAL code [0x%lx-0x%lx) into [0x%lx-0x%lx)\n" , +smp_processor_id (), md->phys_addr, md->phys_addr + (md->num_pages <<12 ), + vaddr & mask, (vaddr & mask) +256 *1024 *1024 );/* * Cannot write to CRx with PSR.ic=1
@@ -263,12 +292,11 @@* ITR0/DTR0: used for kernel code/data * ITR1/DTR1: used by HP simulator * ITR2/DTR2: map PAL code -* ITR3/DTR3: used to map PAL calls buffer */ ia64_itr (0x1 ,2 , vaddr & mask,pte_val (mk_pte_phys (md->phys_addr,__pgprot (__DIRTY_BITS|_PAGE_PL_0|_PAGE_AR_RX))), - _PAGE_SIZE_4M); + _PAGE_SIZE_256M);local_irq_restore (flags);ia64_srlz_i (); }
arch/ia64/kernel/ia64_ksyms.c +20 -0
@@ -18,6 +18,8 @@EXPORT_SYMBOL (strncat);EXPORT_SYMBOL (strncmp);EXPORT_SYMBOL (strncpy); +EXPORT_SYMBOL (strnlen); +EXPORT_SYMBOL (strrchr);EXPORT_SYMBOL (strstr);EXPORT_SYMBOL (strtok);
@@ -28,11 +30,25 @@#include <linux/in6.h> #include <asm/checksum.h> EXPORT_SYMBOL (csum_partial_copy_nocheck); +EXPORT_SYMBOL (csum_tcpudp_magic); +EXPORT_SYMBOL (ip_compute_csum); +EXPORT_SYMBOL (ip_fast_csum);#include <asm/irq.h> EXPORT_SYMBOL (enable_irq);EXPORT_SYMBOL (disable_irq); +#include <asm/page.h> +EXPORT_SYMBOL (clear_page); + +#include <asm/pci.h> +EXPORT_SYMBOL (pci_dma_sync_sg); +EXPORT_SYMBOL (pci_dma_sync_single); +EXPORT_SYMBOL (pci_map_sg); +EXPORT_SYMBOL (pci_map_single); +EXPORT_SYMBOL (pci_unmap_sg); +EXPORT_SYMBOL (pci_unmap_single); +#include <asm/processor.h> EXPORT_SYMBOL (cpu_data);EXPORT_SYMBOL (kernel_thread);
@@ -40,6 +56,10 @@#ifdef CONFIG_SMP #include <asm/hardirq.h> EXPORT_SYMBOL (synchronize_irq); + +#include <asm/smp.h> +EXPORT_SYMBOL (smp_call_function); +EXPORT_SYMBOL (smp_num_cpus);#include <asm/smplock.h> EXPORT_SYMBOL (kernel_flag);
arch/ia64/kernel/irq.c +1 -2
@@ -536,8 +536,7 @@ desc->depth--;break ;case 0 : -printk ("enable_irq() unbalanced from %p\n" , -__builtin_return_address (0 )); +printk ("enable_irq() unbalanced from %p\n" , (void *)__builtin_return_address (0 )); }spin_unlock_irqrestore (&desc->lock, flags); }
arch/ia64/kernel/minstate.h +0 -10
@@ -192,13 +192,3 @@#define SAVE_MIN_WITH_COVER DO_SAVE_MIN(cover;; mov rCRIFS=cr.ifs,) STOPS#define SAVE_MIN_WITH_COVER_R19 DO_SAVE_MIN(cover;; mov rCRIFS=cr.ifs, mov r15=r19) STOPS#define SAVE_MIN DO_SAVE_MIN(mov rCRIFS=r0,) STOPS - -#ifdef CONFIG_ITANIUM_ASTEP_SPECIFIC -# define STOPS nop.i 0x0;; nop.i 0x0;; nop.i 0x0;; -#else -# define STOPS -#endif - -#define SAVE_MIN_WITH_COVER DO_SAVE_MIN(cover;; mov rCRIFS=cr.ifs,) STOPS -#define SAVE_MIN_WITH_COVER_R19 DO_SAVE_MIN(cover;; mov rCRIFS=cr.ifs, mov r15=r19) STOPS -#define SAVE_MIN DO_SAVE_MIN(mov rCRIFS=r0,) STOPS
arch/ia64/kernel/pal.S +12 -7
@@ -54,7 +54,8 @@ * * in0 Pointer to struct ia64_pal_retval * in1 Index of PAL service - * in2 - in4 Remaning PAL arguments + * in2 - in4 Remaining PAL arguments + * in5 1 => clear psr.ic, 0 => don't clear psr.ic * */ GLOBAL_ENTRY(ia64_pal_call_static)
@@ -68,18 +69,22 @@ } ;; ld8 loc2 = [loc2] // loc2 <- entry point - mov r30 = in2 - mov r31 = in3 + tbit.nz p6,p7 = in5, 0 + adds r8 = 1f-1b,r8 ;; mov loc3 = psr mov loc0 = rp UNW(.body) - adds r8 = 1f-1b,r8 - ;; - rsm psr.i + mov r30 = in2 + +(p6) rsm psr.i | psr.ic + mov r31 = in3 mov b7 = loc2 + +(p7) rsm psr.i + ;; +(p6) srlz.i mov rp = r8 - ;; br.cond.sptk.few b7 1: mov psr.l = loc3 mov ar.pfs = loc1
arch/ia64/kernel/palinfo.c +5 -53
93 lines not on this page · raw message
arch/ia64/kernel/pci-dma.c +2 -1
@@ -97,7 +97,8 @@ io_tlb_index =0 ; io_tlb_orig_addr =alloc_bootmem (io_tlb_nslabs *sizeof (char *)); -printk ("Placing software IO TLB between 0x%p - 0x%p\n" , io_tlb_start, io_tlb_end); +printk ("Placing software IO TLB between 0x%p - 0x%p\n" , + (void *) io_tlb_start, (void *) io_tlb_end); }/*
arch/ia64/kernel/process.c +10 -14
@@ -370,7 +370,6 @@void do_dump_fpu (struct unw_frame_info *info,void *arg) { -struct task_struct *fpu_owner =ia64_get_fpu_owner ();elf_fpreg_t *dst = arg;int i;
@@ -384,10 +383,9 @@for (i =2 ; i <32 ; ++i)unw_get_fr (info, i, dst + i); -if ((fpu_owner = current) || (current->thread.flags &IA64_THREAD_FPH_VALID )) { -ia64_sync_fph (current); +ia64_flush_fph (current); +if ((current->thread.flags &IA64_THREAD_FPH_VALID ) !=0 ) memcpy(dst + 32, current->thread.fph, 96*16); - } }#endif /* CONFIG_IA64_NEW_UNWIND */
@@ -463,7 +461,6 @@unw_init_running (do_dump_fpu, dst);#else struct switch_stack *sw = ((struct switch_stack *) pt) -1 ; -struct task_struct *fpu_owner =ia64_get_fpu_owner ();memset (dst,0 ,sizeof (dst));/* don't leak any "random" bits */
@@ -472,12 +469,9 @@ dst[8 ] = pt->f8; dst[9 ] = pt->f9;memcpy (dst +10 , &sw->f10,22 *16 );/* f10-f31 are contiguous */ -if ((fpu_owner = current) || (current->thread.flags &IA64_THREAD_FPH_VALID )) { -if (fpu_owner = current) { -__ia64_save_fpu (current->thread.fph); - } +ia64_flush_fph (current); +if ((current->thread.flags &IA64_THREAD_FPH_VALID ) !=0 )memcpy (dst +32 , current->thread.fph,96 *16 ); - }#endif return 1 ;/* f0-f31 are always valid so we always return 1 */ }
@@ -520,9 +514,10 @@/* drop floating-point and debug-register state if it exists: */ current->thread.flags &= ~(IA64_THREAD_FPH_VALID |IA64_THREAD_DBG_VALID ); -if (ia64_get_fpu_owner () = current) { +#ifndef CONFIG_SMP +if (ia64_get_fpu_owner () = current)ia64_set_fpu_owner (0 ); - } +#endif }/*
@@ -532,9 +527,10 @@void exit_thread (void ) { -if (ia64_get_fpu_owner () = current) { +#ifndef CONFIG_SMP +if (ia64_get_fpu_owner () = current)ia64_set_fpu_owner (0 ); - } +#endif }unsigned long
arch/ia64/kernel/ptrace.c +29 -7
@@ -376,7 +376,8 @@ ret =0 ; }else {if ((unsigned long ) laddr >= (unsigned long ) high_memory) { -printk ("yikes: trying to access long at %p\n" , laddr); +printk ("yikes: trying to access long at %p\n" , + (void *) laddr);return -EIO ; } ret = *laddr;
@@ -542,18 +543,28 @@ child->thread.flags |=IA64_THREAD_KRBS_SYNCED ; } -/* -* Ensure the state in child->thread.fph is up-to-date. -*/ void -ia64_sync_fph (struct task_struct *child) +ia64_flush_fph (struct task_struct *child) { -if (ia64_psr (ia64_task_regs (child))->mfh &&ia64_get_fpu_owner () = child) { -ia64_psr (ia64_task_regs (child))->mfh =0 ; +struct ia64_psr *psr =ia64_psr (ia64_task_regs (child)); + +if (psr->mfh) { + psr->mfh =0 ; +#ifndef CONFIG_SMP ia64_set_fpu_owner (0 ); +#endif ia64_save_fpu (&child->thread.fph[0 ]); child->thread.flags |=IA64_THREAD_FPH_VALID ; } +} + +/* +* Ensure the state in child->thread.fph is up-to-date. +*/ +void +ia64_sync_fph (struct task_struct *child) +{ +ia64_flush_fph (child);if (!(child->thread.flags &IA64_THREAD_FPH_VALID )) {memset (&child->thread.fph,0 ,sizeof (child->thread.fph)); child->thread.flags |=IA64_THREAD_FPH_VALID ;
@@ -656,6 +667,9 @@case PT_B1 :case PT_B2 :case PT_B3 :case PT_B4 :case PT_B5 :return unw_access_br (&info, (addr -PT_B1 )/8 +1 , data, write_access); +case PT_AR_EC : +return unw_access_ar (&info,UNW_AR_EC , data, write_access); +case PT_AR_LC :return unw_access_ar (&info,UNW_AR_LC , data, write_access);
@@ -863,6 +877,14 @@else *data = (pt->cr_ipsr &IPSR_READ_MASK );return 0 ; + +case PT_AR_EC : +if (write_access) + sw->ar_pfs = (((*data &0x3f ) <<52 ) + | (sw->ar_pfs & ~(0x3fUL <<52 ))); +else + *data = (sw->ar_pfs >>52 ) &0x3f ; +break ;case PT_R1 :case PT_R2 :case PT_R3 :case PT_R4 :case PT_R5 :case PT_R6 :case PT_R7 :
arch/ia64/kernel/setup.c +12 -0
@@ -57,6 +57,8 @@volatile unsigned long cpu_online_map;#endif +unsigned long ia64_iobase;/* virtual address for I/O accesses */ +#define COMMAND_LINE_SIZE 512char saved_command_line[COMMAND_LINE_SIZE ];/* used in proc filesystem */
@@ -112,6 +114,7 @@void __init setup_arch (char **cmdline_p) { +extern unsigned long ia64_iobase;unsigned long max_pfn, bootmap_start, bootmap_size;unw_init ();
@@ -219,6 +222,13 @@ current->processor =0 ;cpu_physical_id (0 ) =hard_smp_processor_id ();#endif +/* +* Set `iobase' to the appropriate address in region 6 +* (uncached access range) +*/ + __asm__ ("mov %0=ar.k0;;" :"=r" (ia64_iobase)); + ia64_iobase = __IA64_UNCACHED_OFFSET | (ia64_iobase & ~PAGE_OFFSET ); +cpu_init ();/* initialize the bootstrap CPU */ #ifdef CONFIG_IA64_GENERIC
@@ -408,7 +418,9 @@* particular setting of these bits. */ ia64_set_dcr (IA64_DCR_DR |IA64_DCR_DK |IA64_DCR_DX |IA64_DCR_PP ); +#ifndef CONFIG_SMP ia64_set_fpu_owner (0 );/* initialize ar.k5 */ +#endif atomic_inc (&init_mm.mm_count); current->active_mm = &init_mm;
arch/ia64/kernel/signal.c +15 -14
@@ -147,13 +147,12 @@ia64_put_nat_bits (&scr->pt, &scr->sw, nat);/* restore the original scratch NaT bits */ #endif -if (flags &IA64_SC_FLAG_FPH_VALID ) { -struct task_struct *fpu_owner =ia64_get_fpu_owner (); +if ((flags &IA64_SC_FLAG_FPH_VALID )) { +struct ia64_psr *psr =ia64_psr (ia64_task_regs (current));__copy_from_user (current->thread.fph, &sc->sc_fr[32 ],96 *16 ); -if (fpu_owner = current) { +if (!psr->dfh)__ia64_load_fpu (current->thread.fph); - } }return err; }
@@ -235,9 +234,12 @@ goto give_sigsegv;sigdelsetmask (&set, ~_BLOCKABLE); +spin_lock_irq (¤t->sigmask_lock); - current->blocked = set; -recalc_sigpending (current); + { + current->blocked = set; +recalc_sigpending (current); + }spin_unlock_irq (¤t->sigmask_lock);if (restore_sigcontext (sc, scr))
@@ -274,7 +276,6 @@static long setup_sigcontext (struct sigcontext *sc,sigset_t *mask,struct sigscratch *scr) { -struct task_struct *fpu_owner =ia64_get_fpu_owner ();unsigned long flags =0 , ifs, nat;long err;
@@ -286,11 +287,9 @@/* if cr_ifs isn't valid, we got here through a syscall */ flags |=IA64_SC_FLAG_IN_SYSCALL ; } -if ((fpu_owner = current) || (current->thread.flags &IA64_THREAD_FPH_VALID )) { +ia64_flush_fph (current); +if ((current->thread.flags &IA64_THREAD_FPH_VALID )) { flags |=IA64_SC_FLAG_FPH_VALID ; -if (fpu_owner = current) { -__ia64_save_fpu (current->thread.fph); - }__copy_to_user (&sc->sc_fr[32 ], current->thread.fph,96 *16 ); }
@@ -425,9 +424,11 @@if (!(ka->sa.sa_flags &SA_NODEFER )) {spin_lock_irq (¤t->sigmask_lock); -sigorsets (¤t->blocked, ¤t->blocked, &ka->sa.sa_mask); -sigaddset (¤t->blocked, sig); -recalc_sigpending (current); + { +sigorsets (¤t->blocked, ¤t->blocked, &ka->sa.sa_mask); +sigaddset (¤t->blocked, sig); +recalc_sigpending (current); + }spin_unlock_irq (¤t->sigmask_lock); }return 1 ;
arch/ia64/kernel/smp.c +0 -7
@@ -453,14 +453,7 @@if (--data->prof_counter <=0 ) { data->prof_counter = data->prof_multiplier; -/* -* update_process_times() expects us to have done irq_enter(). -* Besides, if we don't timer interrupts ignore the global -* interrupt lock, which is the WrongThing (tm) to do. -*/ -irq_enter (cpu,0 );update_process_times (user); -irq_exit (cpu,0 ); } }
arch/ia64/kernel/smpboot.c +0 -2
@@ -1,2 +0,0 @@ -unsigned long cpu_online_map; -
arch/ia64/kernel/sys_ia64.c +3 -17
@@ -147,7 +147,7 @@struct pt_regs *regs = (struct pt_regs *) &stack; addr =do_mmap2 (addr, len, prot, flags, fd, pgoff); -if (!IS_ERR (addr)) +if (!IS_ERR ((void *) addr)) regs->r8 =0 ;/* ensure large addresses are not mistaken as failures... */ return addr; }
@@ -162,26 +162,12 @@return -EINVAL ; addr =do_mmap2 (addr, len, prot, flags, fd, off >>PAGE_SHIFT ); -if (!IS_ERR (addr)) +if (!IS_ERR ((void *) addr)) regs->r8 =0 ;/* ensure large addresses are not mistaken as failures... */ return addr; }asmlinkage long -sys_ioperm (unsigned long from,unsigned long num,int on) -{ -printk (KERN_ERR "sys_ioperm(from=%lx, num=%lx, on=%d)\n" , from, num, on); -return -EIO ; -} - -asmlinkage long -sys_iopl (int level,long arg1,long arg2,long arg3) -{ -printk (KERN_ERR "sys_iopl(level=%d)!\n" , level); -return -ENOSYS ; -} - -asmlinkage long sys_vm86 (long arg0,long arg1,long arg2,long arg3) {printk (KERN_ERR "sys_vm86(%lx, %lx, %lx, %lx)!\n" , arg0, arg1, arg2, arg3);
@@ -204,7 +190,7 @@unsigned long addr; addr =sys_create_module (name_user, size); -if (!IS_ERR (addr)) +if (!IS_ERR ((void *) addr)) regs->r8 =0 ;/* ensure large addresses are not mistaken as failures... */ return addr; }
arch/ia64/kernel/traps.c +33 -18
62 lines not on this page · raw message
arch/ia64/kernel/unaligned.c +9 -9
@@ -278,9 +278,9 @@ bspstore = (unsigned long *)regs->ar_bspstore;DPRINT (("rse_slot_num=0x%lx\n" ,ia64_rse_slot_num ((unsigned long *)sw->ar_bspstore))); -DPRINT (("kbs=%p nlocals=%ld\n" , kbs, nlocals)); +DPRINT (("kbs=%p nlocals=%ld\n" , (void *) kbs, nlocals));DPRINT (("bspstore next rnat slot %p\n" , -ia64_rse_rnat_addr ((unsigned long *)sw->ar_bspstore))); + (void *)ia64_rse_rnat_addr ((unsigned long *)sw->ar_bspstore)));DPRINT (("on_kbs=%ld rnats=%ld\n" , on_kbs, ((sw->ar_bspstore-(unsigned long )kbs)>>3 ) - on_kbs));
@@ -292,7 +292,7 @@ addr = slot =ia64_rse_skip_regs (bsp, r1 -32 );DPRINT (("ubs_end=%p bsp=%p addr=%p slot=0x%lx\n" , - ubs_end, bsp, addr,ia64_rse_slot_num (addr))); + (void *) ubs_end, (void *) bsp, (void *) addr,ia64_rse_slot_num (addr)));ia64_poke (regs, current, (unsigned long )addr, val);
@@ -303,7 +303,7 @@ia64_peek (regs, current, (unsigned long )addr, &rnats);DPRINT (("rnat @%p = 0x%lx nat=%d rnatval=%lx\n" , - addr, rnats, nat, rnats &ia64_rse_slot_num (slot))); + (void *) addr, rnats, nat, rnats &ia64_rse_slot_num (slot)));if (nat) { rnats |=__IA64_UL (1 ) <<ia64_rse_slot_num (slot);
@@ -312,7 +312,7 @@ }ia64_poke (regs, current, (unsigned long )addr, rnats); -DPRINT (("rnat changed to @%p = 0x%lx\n" , addr, rnats)); +DPRINT (("rnat changed to @%p = 0x%lx\n" , (void *) addr, rnats)); }
@@ -373,7 +373,7 @@ addr = slot =ia64_rse_skip_regs (bsp, r1 -32 );DPRINT (("ubs_end=%p bsp=%p addr=%p slot=0x%lx\n" , - ubs_end, bsp, addr,ia64_rse_slot_num (addr))); + (void *) ubs_end, (void *) bsp, (void *) addr,ia64_rse_slot_num (addr)));ia64_peek (regs, current, (unsigned long )addr, val);
@@ -383,7 +383,7 @@ addr =ia64_rse_rnat_addr (addr);ia64_peek (regs, current, (unsigned long )addr, &rnats); -DPRINT (("rnat @%p = 0x%lx\n" , addr, rnats)); +DPRINT (("rnat @%p = 0x%lx\n" , (void *) addr, rnats));if (nat) *nat = rnats >>ia64_rse_slot_num (slot) &0x1 ;
@@ -437,13 +437,13 @@* UNAT bit_pos = GR[r3]{8:3} form EAS-2.4 */ bitmask =__IA64_UL (1 ) << (addr >>3 &0x3f ); -DPRINT (("*0x%lx=0x%lx NaT=%d prev_unat @%p=%lx\n" , addr, val, nat, unat, *unat)); +DPRINT (("*0x%lx=0x%lx NaT=%d prev_unat @%p=%lx\n" , addr, val, nat, (void *) unat, *unat));if (nat) { *unat |= bitmask; }else { *unat &= ~bitmask; } -DPRINT (("*0x%lx=0x%lx NaT=%d new unat: %p=%lx\n" , addr, val, nat, unat,*unat)); +DPRINT (("*0x%lx=0x%lx NaT=%d new unat: %p=%lx\n" , addr, val, nat, (void *) unat,*unat)); }#define IA64_FPH_OFFS (r) (r - IA64_FIRST_ROTATING_FR)
arch/ia64/kernel/unwind.c +4 -3
@@ -268,9 +268,10 @@if ((unsigned long ) addr < info->regstk.limit || (unsigned long ) addr >= info->regstk.top) { -dprintk ("unwind: 0x%p outside of regstk " +dprintk ("unwind: %p outside of regstk " "[0x%lx-0x%lx)\n" , addr, - info->regstk.limit, info->regstk.top); + (void *) info->regstk.limit, + info->regstk.top);return -1 ; }if ((unsigned long ) nat_addr >= info->regstk.top)
@@ -2005,7 +2006,7 @@if (prevt->next = table)break ;if (!prevt) { -dprintk ("unwind: failed to find unwind table %p\n" , table); +dprintk ("unwind: failed to find unwind table %p\n" , (void *) table);spin_unlock_irqrestore (&unw.lock, flags);return ; }
drivers/acpi/acpiconf.c +6 -4
@@ -43,6 +43,7 @@ status =acpi_load_firmware_tables ();if (ACPI_FAILURE (status)) {printk ("Acpi cfg:acpi load firmware tables error=0x%x\n" , status); +acpi_terminate ();return status; }else printk ("Acpi cfg:acpi load firmware tables pass\n" );
@@ -50,6 +51,7 @@ status =acpi_load_namespace ();if (ACPI_FAILURE (status)) {printk ("Acpi cfg:acpi load namespace error=0x%x\n" , status); +acpi_terminate ();return status; }else printk ("Acpi cfg:acpi load namespace pass\n" );
@@ -217,7 +219,7 @@switch (ext_obj->type) {case ACPI_TYPE_NUMBER : busnum = (NATIVE_UINT ) ext_obj->number.value; - next_busnum = busnum; + next_busnum = busnum +1 ;break ;default :printk ("Acpi cfg:_BBN object type incorrect: set busnum to %ld\n " , next_busnum);
@@ -301,7 +303,7 @@ ) {struct pci_vector_struct *pvec; -PCI_ROUTING_TABLE **pprts, *prt; +PCI_ROUTING_TABLE **pprts, *prt, *prtf;int nvec =0 ;int i;
@@ -309,7 +311,7 @@ pprts = (PCI_ROUTING_TABLE **)prts;for ( i =0 ; i <PCI_MAX_BUS ; i++) { - prt = *pprts++; + prt = prtf = *pprts++;if (prt) {for ( ; prt->length >0 ; nvec++) { prt = (PCI_ROUTING_TABLE *) ((NATIVE_UINT )prt + (NATIVE_UINT )prt->length);
@@ -340,7 +342,7 @@ prt = (PCI_ROUTING_TABLE *) ((NATIVE_UINT )prt + (NATIVE_UINT )prt->length); prt = (PCI_ROUTING_TABLE *)ROUND_UP_TO_4BYTES (prt); } -acpi_os_free ((void *)prt); +acpi_os_free ((void *)prtf); } }
drivers/char/efirtc.c +1 -1
@@ -249,7 +249,7 @@convert_from_efi_time (&eft, &wtime); -return copy_to_user ((void *)&ewp->time, &wtime,sizeof (struct rtc_time )); +return copy_to_user ((void *)&ewp->time, &wtime,sizeof (struct rtc_time )) ? -EFAULT :0 ; }return -EINVAL ; }
drivers/net/eepro100.c +2 -0
@@ -25,6 +25,8 @@Disabled FC and ER, to avoid lockups when when we get FCP interrupts. 2000 Jul 17 Goutham Rao <[email protected]> PCI DMA API fixes, adding pci_dma_sync_single calls where neccesary +2000 Aug 31 David Mosberger <[email protected]> +RX_ALIGN support: enables rx DMA without causing unaligned accesses. */ static const char *version @@ -42,17 +44,16 @@
static int rxdmacount = 0;
#ifdef __ia64__
-/*
- * Bug: this driver may generate unaligned accesses when not copying
- * an incoming packet. Setting rx_copybreak to a large value force a
- * copy and prevents unaligned accesses.
- */
-static int rx_copybreak = 0x10000;
+ /* align rx buffers to 2 bytes so that IP header is aligned */ +# define RX_ALIGN
+# define RxFD_ALIGNMENT __attribute__ ((aligned (2), packed))
#else
+# define RxFD_ALIGNMENT
+#endif
+
/* Set the copy breakpoint for the copy-only-tiny-buffer Rx method.
Lower values use more memory, but are faster. */
static int rx_copybreak = 200;
-#endif
/* Maximum events (Rx packets, etc.) to handle at each interrupt. */ static int max_interrupt_work = 20;
@@ -449,7 +450,7 @@
u32 link; /* struct RxFD * */
u32 rx_buf_addr; /* void * */
u32 count;
-};
+} RxFD_ALIGNMENT;
/* Selected elements of the Tx/RxFD.status word. */
enum RxFD_bits {
@@ -1216,6 +1217,9 @@
for (i = 0; i < RX_RING_SIZE; i++) {
struct sk_buff *skb;
skb = dev_alloc_skb(PKT_BUF_SZ + sizeof(struct RxFD));
+#ifdef RX_ALIGN
+ skb_reserve(skb, 2); /* Align IP on 16 byte boundary */
+#endif
sp->rx_skbuff[i] = skb;
if (skb = NULL)
break; /* OK. Just initially short of Rx bufs. */
@@ -1665,6 +1669,9 @@
struct sk_buff *skb;
/* Get a fresh skbuff to replace the consumed one. */ skb = dev_alloc_skb(PKT_BUF_SZ + sizeof(struct RxFD));
+#ifdef RX_ALIGN
+ skb_reserve(skb, 2); /* Align IP on 16 byte boundary */
+#endif
sp->rx_skbuff[entry] = skb;
if (skb = NULL) {
sp->rx_ringp[entry] = NULL;
drivers/scsi/qla1280.c +657 -530
2,019 lines not on this page · raw message
drivers/scsi/qla1280.h +68 -214
282 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.
Re: [Linux-ia64] kernel update (relative to v2.4.0-test8)
In reply to David MosbergerQuoted 4 lines · David Mosberger
The latest IA-64 kernel diff is now available at:
ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/
Quoted 8 lines
in file linux-2.4.0-test8-ia64-000908.diff.gz. The most important changes since the previous version:
The patch below is once again a rough approximation of what changed since the last update. This kernel has been tested on the HP Ski simulator, Big Sur (UP and MP), and Lion (MP).
I tried it on my UP Big Sur with BIOS Build 59 and B1 stepping CPU. It didn't work. I got
Unexpected irq vector 0x0 on CPU 0!
as soon as it booted. I am enclosing my .config here. BTW, the kernel from the 0828 Turbo Linux booted fine. I am enclosing the boot message here also. Any ideas?
Thanks.
H.J.
---
Linux version 2.4.0test7-000823-42 (root@borg) (gcc version 2.9-ia64-000216-final) #1 Sat Aug 26 16:31:32 PDT 2000 EFI v0.99 by INTEL: SALsystab=0x3ff25340 ACPI=0x3ffd9160 MPS=0x3ffd0000 SMBIOS=0xf0010efi_map_pal_code: mapping PAL code [0x3ff40000-0x3ff7b000) into [0xe00000003fc00000-0xe000000040000000) SAL v2.112: ia32bios�sent, oem=, product=SAL
sal[0] - entry: pal_proc=0x3ff48010, sal_proc=0x3fe54730
SAL: Platform features BusLock
processor implements 51 virtual and 44 physical address bits
ACPI: Intel RSDT 0.0
Acpi cfg:bind to Boot time Acpi OSD
Acpi cfg:acpi initialize pass
Acpi cfg:acpi load firmware tables pass
Acpi cfg:acpi load namespace pass
CPU 0 (0000:0000): Available.
IOSAPIC Version 2.1: address 0xfec00000 IRQs 0x0 - 0x3f
Acpi cfg:get pci vectors
Acpi cfg:_STA not found: pci bus 0 exist
Acpi cfg:_STA not found: pci bus 1 exist
Acpi cfg:_STA not found: pci bus 2 exist
Acpi cfg:_STA not found: pci bus 3 exist
1 CPUs available, 1 CPUs total
ACPI: -0550: <7>ACPI: *** Success: Entire namespace and objects deleted
Acpi cfg:acpi terminate pass
Acpi cfg:bind to Run time Acpi OSDia64_mca_init : beginia64_mca_init : registered mca rendezvous spinloop and wakeup mech. ia64_mca_init : correctable mca vector setup doneia64_mca_init : registered os mca handler with SALia64_mca_init : os init handler at 5414b0ia64_mca_init : registered os init handler with SALia64_mca_init : platform-specific mca handling setup done
Mca related initialization done
On node 0 totalpages: 64672
zone(0): 64672 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Placing software IO TLB between 0xe000000000100000 - 0xe000000000300000 Kernel command line: root=/dev/sda2 init=/bin/bash
fpswa interface at 3f197010
timer: CPU 0 base freq3.344MHz, ITC ratio/2, ITC freqf6.722MHz
Console: colour VGA+ 80x25
Unexpected irq vector 0x0 on CPU 0!
Calibrating delay loop... 545.26 BogoMIPS
Memory: 1017312k/1034752k available (4064k code, 16368k reserved, 1382k data, 320k init) Initialized perfmon vector to 40
Dentry-cache hash table entries: 65536 (order: 6, 1048576 bytes) Buffer-cache hash table entries: 65536 (order: 5, 524288 bytes)
Page-cache hash table entries: 65536 (order: 5, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 1048576 bytes)
POSIX conformance testing by UNIFIX
PCI: Probing PCI hardwarePCI->APIC IRQ transform: (B0,I1,P0) -> 23PCI->APIC IRQ transform: (B0,I3,P3) -> 2fPCI->APIC IRQ transform: (B0,I3,P1) -> 2ePCI->APIC IRQ transform: (B0,I4,P0) -> 2dPCI->APIC IRQ transform: (B0,I5,P0) -> 2cPCI->APIC IRQ transform: (B1,I1,P0) -> 17PCI->APIC IRQ transform: (B1,I15,P0) -> 38PCI->APIC IRQ transform: (B2,I0,P0) -> 1bPCI->APIC IRQ transform: (B2,I15,P0) -> 39
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 16384 buckets, 256Kbytes
TCP: Hash tables configured (established 131072 bind 65536)
Initializing RT netlink socket
PAL Information Facility v0.3
Starting kswapd v1.7
pty: 256 Unix98 ptys configured
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
loop: registered device at major 7
loop: enabling 8 loop devices
Uniform Multi-Platform E-IDE driver Revision: 6.31
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
PIIX4: IDE controller on PCI bus 00 dev 19
PIIX4: chipset revision 1
PIIX4: not 100% native mode: will probe irqs later
ide1: BM-DMA at 0x1098-0x109f, BIOS settings: hdc:pio, hdd:pio
hdc: LTN483, ATAPI CDROM drive
hdd: LS-120 F200 08 UHD Floppy, ATAPI FLOPPY drive
ide1 at 0x170-0x177,0x376 on irq 65
hdc: ATAPI 48X CD-ROM drive, 120kB Cache, UDMA(33)
Uniform CD-ROM driver Revision: 3.11
hdd: 123264kB, 963/8/32 CHS, 533 kBps, 512 sector size, 720 rpm md driver 0.90.0 MAX_MD_DEVS%6, MAX_REAL
linear personality registered
raid0 personality registered
raid1 personality registered
raid5 personality registered
raid5: measuring checksumming speed
8regs : 712.448 MB/sec
32regs : 1149.632 MB/sec
using fastest function: 32regs (1149.632 MB/sec)md.c: sizeof(mdp_super_t) = 4096
LVM version 0.8final by Heinz Mauelshagen (15/02/2000)
lvm -- Driver successfully initialized
qla1280: detect() found an HBA
qla1280: VID77 DID80 SSVID77 SSDID=6
scsi(0): Determining if RISC is loaded...
scsi(0): Verifying chip...
scsi(0): Setup chip...
scsi(0): Configure NVRAM parameters...
scsi(0): Resetting SCSI BUS (0)
scsi(0): Resetting SCSI BUS (1)
scsi0 : QLogic QLA1280 PCI to SCSI Host Adapter: bus 1 device 1 irq 23
Firmware version: 8.13.08, Driver version 3.16 Beta
----
#
# Automatically generated make config: don't edit
#
#
# Code maturity level options
#CONFIG_EXPERIMENTAL=y
#
# Loadable module support
#CONFIG_MODULES=yCONFIG_MODVERSIONS=yCONFIG_KMOD=y
#
# General setup
#CONFIG_IA64=yCONFIG_SWIOTLB=y
# CONFIG_ISA is not set
# CONFIG_SBUS is not set
# CONFIG_IA64_GENERIC is not setCONFIG_IA64_DIG=y
# CONFIG_IA64_HP_SIM is not set
# CONFIG_IA64_SGI_SN1_SIM is not set
# CONFIG_IA64_PAGE_SIZE_4KB is not set
# CONFIG_IA64_PAGE_SIZE_8KB is not setCONFIG_IA64_PAGE_SIZE_16KB=y
# CONFIG_IA64_PAGE_SIZE_64KB is not setCONFIG_ITANIUM=yCONFIG_IA64_BRL_EMU=y
# CONFIG_ITANIUM_ASTEP_SPECIFIC is not setCONFIG_ITANIUM_BSTEP_SPECIFIC=y
# CONFIG_ITANIUM_B0_SPECIFIC is not set
# CONFIG_IA64_HAVE_IRQREDIR is not set
# CONFIG_ITANIUM_PTCG is not set
# CONFIG_IA64_SOFTSDV_HACKS is not set
# CONFIG_IA64_AZUSA_HACKS is not setCONFIG_IA64_MCA=yCONFIG_SKB_BELOW_4GB=yCONFIG_ACPI_KERNEL_CONFIG=yCONFIG_PM=yCONFIG_ACPI=yCONFIG_ACPI_INTERPRETER=yCONFIG_KCORE_ELF=y
# CONFIG_SMP is not setCONFIG_PERFMON=yCONFIG_IA64_PALINFO=yCONFIG_NET=yCONFIG_SYSVIPC=yCONFIG_BSD_PROCESS_ACCT=yCONFIG_SYSCTL=yCONFIG_BINFMT_ELF=y
# CONFIG_BINFMT_MISC is not setCONFIG_PCI=yCONFIG_PCI_NAMES=yCONFIG_HOTPLUG=y
#
# PCMCIA/CardBus support
#
# CONFIG_PCMCIA is not set
#
# Parallel port support
#
# CONFIG_PARPORT is not set
#
# Networking options
#CONFIG_PACKET=y
# CONFIG_PACKET_MMAP is not setCONFIG_NETLINK=y
# CONFIG_RTNETLINK is not setCONFIG_NETLINK_DEV=yCONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not setCONFIG_FILTER=yCONFIG_UNIX=yCONFIG_INET=yCONFIG_IP_MULTICAST=y
# CONFIG_IP_ADVANCED_ROUTER is not set
# CONFIG_IP_PNP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_IP_MROUTE is not set
# CONFIG_INET_ECN is not setCONFIG_SYN_COOKIES=y
#
# IP: Netfilter Configuration
#CONFIG_IP_NF_CONNTRACK=mCONFIG_IP_NF_FTP=mCONFIG_IP_NF_QUEUE=mCONFIG_IP_NF_IPTABLES=mCONFIG_IP_NF_MATCH_LIMIT=mCONFIG_IP_NF_MATCH_MAC=mCONFIG_IP_NF_MATCH_MARK=mCONFIG_IP_NF_MATCH_MULTIPORT=mCONFIG_IP_NF_MATCH_TOS=mCONFIG_IP_NF_MATCH_STATE=mCONFIG_IP_NF_MATCH_UNCLEAN=mCONFIG_IP_NF_MATCH_OWNER=mCONFIG_IP_NF_FILTER=mCONFIG_IP_NF_TARGET_REJECT=mCONFIG_IP_NF_TARGET_MIRROR=mCONFIG_IP_NF_NAT=mCONFIG_IP_NF_NAT_NEEDED=yCONFIG_IP_NF_TARGET_MASQUERADE=mCONFIG_IP_NF_TARGET_REDIRECT=mCONFIG_IP_NF_MANGLE=mCONFIG_IP_NF_TARGET_TOS=mCONFIG_IP_NF_TARGET_MARK=mCONFIG_IP_NF_TARGET_LOG=mCONFIG_IP_NF_COMPAT_IPCHAINS=mCONFIG_IP_NF_NAT_NEEDED=yCONFIG_IP_NF_COMPAT_IPFWADM=mCONFIG_IP_NF_NAT_NEEDED=y
# CONFIG_IPV6 is not set
# CONFIG_KHTTPD is not set
# CONFIG_ATM is not set
#
#
#
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_DECNET is not set
# CONFIG_BRIDGE is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_LLC is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_NET_FASTROUTE is not set
# CONFIG_NET_HW_FLOWCONTROL is not set
#
# QoS and/or fair queueing
#
# CONFIG_NET_SCHED is not set
#
# Memory Technology Devices (MTD)
#
# CONFIG_MTD is not set
#
# Plug and Play configuration
#
# CONFIG_PNP is not set
# CONFIG_ISAPNP is not set
#
# Block devices
#
# CONFIG_BLK_DEV_FD is not set
# CONFIG_BLK_DEV_XD is not set
# CONFIG_PARIDE is not set
# CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_DEV_DAC960 is not setCONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_NBD is not setCONFIG_BLK_DEV_LVM=yCONFIG_LVM_PROC_FS=y
# CONFIG_BLK_DEV_MD is not set
# CONFIG_MD_LINEAR is not set
# CONFIG_MD_RAID0 is not set
# CONFIG_MD_RAID1 is not set
# CONFIG_MD_RAID5 is not setCONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE�92CONFIG_BLK_DEV_INITRD=y
#
# I2O device support
#
# CONFIG_I2O is not set
# CONFIG_I2O_PCI is not set
# CONFIG_I2O_BLOCK is not set
# CONFIG_I2O_LAN is not set
# CONFIG_I2O_SCSI is not set
# CONFIG_I2O_PROC is not set
#
# ATA/IDE/MFM/RLL support
#CONFIG_IDE=y
#
# IDE, ATA and ATAPI Block devices
#CONFIG_BLK_DEV_IDE=y
#
# Please see Documentation/ide.txt for help/info on IDE drives #
# CONFIG_BLK_DEV_HD_IDE is not set
# CONFIG_BLK_DEV_HD is not set CONFIG_BLK_DEV_IDEDISK=y
# CONFIG_IDEDISK_MULTI_MODE is not set
# CONFIG_BLK_DEV_IDEDISK_VENDOR is not set
# CONFIG_BLK_DEV_IDEDISK_FUJITSU is not set
# CONFIG_BLK_DEV_IDEDISK_IBM is not set
# CONFIG_BLK_DEV_IDEDISK_MAXTOR is not set
# CONFIG_BLK_DEV_IDEDISK_QUANTUM is not set
# CONFIG_BLK_DEV_IDEDISK_SEAGATE is not set
# CONFIG_BLK_DEV_IDEDISK_WD is not set
# CONFIG_BLK_DEV_COMMERIAL is not set
# CONFIG_BLK_DEV_TIVO is not set
# CONFIG_BLK_DEV_IDECS is not set CONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_IDETAPE is not set CONFIG_BLK_DEV_IDEFLOPPY=y
# CONFIG_BLK_DEV_IDESCSI is not set
#
# IDE chipset support/bugfixes
#
# CONFIG_BLK_DEV_CMD640 is not set
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not setCONFIG_BLK_DEV_IDEPCI=yCONFIG_IDEPCI_SHARE_IRQ=yCONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_OFFBOARD is not set
# CONFIG_IDEDMA_PCI_AUTO is not setCONFIG_BLK_DEV_IDEDMA=y
# CONFIG_IDEDMA_PCI_WIP is not set
# CONFIG_IDEDMA_NEW_DRIVE_LISTINGS is not set
# CONFIG_BLK_DEV_AEC62XX is not set
# CONFIG_AEC62XX_TUNING is not set
# CONFIG_BLK_DEV_ALI15X3 is not set
# CONFIG_WDC_ALI15X3 is not set
# CONFIG_BLK_DEV_AMD7409 is not set
# CONFIG_AMD7409_OVERRIDE is not set
# CONFIG_BLK_DEV_CMD64X is not set
# CONFIG_BLK_DEV_CY82C693 is not set
# CONFIG_BLK_DEV_CS5530 is not set
# CONFIG_BLK_DEV_HPT34X is not set
# CONFIG_HPT34X_AUTODMA is not set
# CONFIG_BLK_DEV_HPT366 is not setCONFIG_BLK_DEV_PIIX=y
# CONFIG_PIIX_TUNING is not set
# CONFIG_BLK_DEV_NS87415 is not set
# CONFIG_BLK_DEV_OPTI621 is not set
# CONFIG_BLK_DEV_PDC202XX is not set
# CONFIG_PDC202XX_BURST is not set
# CONFIG_BLK_DEV_SIS5513 is not set
# CONFIG_BLK_DEV_TRM290 is not set
# CONFIG_BLK_DEV_VIA82CXXX is not set
# CONFIG_IDE_CHIPSETS is not set
# CONFIG_IDEDMA_AUTO is not set
# CONFIG_IDEDMA_IVB is not set
# CONFIG_DMA_NONPCI is not setCONFIG_BLK_DEV_IDE_MODES=y
#
# SCSI support
#CONFIG_SCSI=y
#
# SCSI support type (disk, tape, CD-ROM)
#CONFIG_BLK_DEV_SD=y
CONFIG_SD_EXTRA_DEVS@CONFIG_CHR_DEV_ST=yCONFIG_BLK_DEV_SR=y
# CONFIG_BLK_DEV_SR_VENDOR is not setCONFIG_SR_EXTRA_DEVS=2CONFIG_CHR_DEV_SG=y
#
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs #CONFIG_SCSI_DEBUG_QUEUES=y
# CONFIG_SCSI_MULTI_LUN is not set CONFIG_SCSI_CONSTANTS=y
# CONFIG_SCSI_LOGGING is not set
#
# SCSI low-level drivers
#
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
# CONFIG_SCSI_7000FASST is not set
# CONFIG_SCSI_ACARD is not set
# CONFIG_SCSI_AHA152X is not set
# CONFIG_SCSI_AHA1542 is not set
# CONFIG_SCSI_AHA1740 is not setCONFIG_SCSI_AIC7XXX=y
# CONFIG_AIC7XXX_TCQ_ON_BY_DEFAULT is not setCONFIG_AIC7XXX_CMDS_PER_DEVICE=8
# CONFIG_AIC7XXX_PROC_STATS is not setCONFIG_AIC7XXX_RESET_DELAY=5
# CONFIG_SCSI_ADVANSYS is not set
# CONFIG_SCSI_IN2000 is not set
# CONFIG_SCSI_AM53C974 is not setCONFIG_SCSI_MEGARAID=y
# CONFIG_SCSI_BUSLOGIC is not set
# CONFIG_SCSI_DMX3191D is not set
# CONFIG_SCSI_DTC3280 is not set
# CONFIG_SCSI_EATA is not set
# CONFIG_SCSI_EATA_DMA is not set
# CONFIG_SCSI_EATA_PIO is not set
# CONFIG_SCSI_FUTURE_DOMAIN is not set
# CONFIG_SCSI_GDTH is not set
# CONFIG_SCSI_GENERIC_NCR5380 is not set
# CONFIG_SCSI_INITIO is not set
# CONFIG_SCSI_INIA100 is not set
# CONFIG_SCSI_NCR53C406A is not set
# CONFIG_SCSI_SYM53C416 is not set
# CONFIG_SCSI_SIM710 is not set
# CONFIG_SCSI_NCR53C7xx is not set
# CONFIG_SCSI_NCR53C8XX is not set
# CONFIG_SCSI_SYM53C8XX is not set
# CONFIG_SCSI_PAS16 is not set
# CONFIG_SCSI_PCI2000 is not set
# CONFIG_SCSI_PCI2220I is not set
# CONFIG_SCSI_PSI240I is not set
# CONFIG_SCSI_QLOGIC_FAS is not set
# CONFIG_SCSI_QLOGIC_ISP is not set
# CONFIG_SCSI_QLOGIC_FC is not setCONFIG_SCSI_QLOGIC_1280=y
# CONFIG_SCSI_DC390T is not set
# CONFIG_SCSI_T128 is not set
# CONFIG_SCSI_U14_34F is not set
# CONFIG_SCSI_DEBUG is not set
#
# Network device support
#CONFIG_NETDEVICES=y
#
# ARCnet devices
#
# CONFIG_ARCNET is not set
# CONFIG_DUMMY is not set
# CONFIG_BONDING is not set
# CONFIG_EQUALIZER is not set
# CONFIG_TUN is not set
# CONFIG_ETHERTAP is not set
# CONFIG_NET_SB1000 is not set
#
# Ethernet (10 or 100Mbit)
#CONFIG_NET_ETHERNET=y
# CONFIG_NET_VENDOR_3COM is not set
# CONFIG_LANCE is not set
# CONFIG_NET_VENDOR_SMC is not set
# CONFIG_NET_VENDOR_RACAL is not set
# CONFIG_AT1700 is not set
# CONFIG_DEPCA is not set
# CONFIG_NET_ISA is not setCONFIG_NET_PCI=y
# CONFIG_PCNET32 is not set
# CONFIG_ADAPTEC_STARFIRE is not set
# CONFIG_AC3200 is not set
# CONFIG_APRICOT is not set
# CONFIG_CS89x0 is not set
# CONFIG_DE4X5 is not setCONFIG_TULIP=y
# CONFIG_DGRS is not set
# CONFIG_DM9102 is not setCONFIG_EEPRO100=y
# CONFIG_EEPRO100_PM is not set
# CONFIG_LNE390 is not set
# CONFIG_NATSEMI is not set
# CONFIG_NE2K_PCI is not set
# CONFIG_NE3210 is not set
# CONFIG_RTL8129 is not set
# CONFIG_8139TOO is not set
# CONFIG_SIS900 is not set
# CONFIG_TLAN is not set
# CONFIG_VIA_RHINE is not set
# CONFIG_ES3210 is not set
# CONFIG_EPIC100 is not set
# CONFIG_NET_POCKET is not set
#
# Ethernet (1000 Mbit)
#
# CONFIG_YELLOWFIN is not setCONFIG_ACENIC=y
# CONFIG_ACENIC_OMIT_TIGON_I is not set
# CONFIG_SK98LIN is not set
# CONFIG_FDDI 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
#
# CONFIG_TR is not set
# CONFIG_NET_FC is not set
# CONFIG_RCPCI is not set
# CONFIG_SHAPER is not set
#
# Wan interfaces
#
# CONFIG_WAN is not set
#
# Amateur Radio support
#
# CONFIG_HAMRADIO is not set
#
# ISDN subsystem
#
# CONFIG_ISDN is not set
#
# CD-ROM drivers (not for SCSI or IDE/ATAPI drives) #
# CONFIG_CD_NO_IDESCSI is not set
#
# Input core support
#
# CONFIG_INPUT is not set
#
# Character devices
#CONFIG_VT=yCONFIG_VT_CONSOLE=yCONFIG_SERIAL=yCONFIG_SERIAL_CONSOLE=y
# CONFIG_SERIAL_EXTENDED is not set
# CONFIG_SERIAL_NONSTANDARD is not setCONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT%6
#
# I2C support
#
# CONFIG_I2C is not set
#
# Mice
#
# CONFIG_BUSMOUSE is not setCONFIG_MOUSE=yCONFIG_PSMOUSE=y
# CONFIG_82C710_MOUSE is not set
# CONFIG_PC110_PAD is not set
#
# Joysticks
#
# CONFIG_JOYSTICK is not set
#
# Input core support is needed for joysticks
#
# CONFIG_QIC02_TAPE is not set
#
# Watchdog Cards
#
# CONFIG_WATCHDOG is not set
# CONFIG_INTEL_RNG is not set
# CONFIG_NVRAM is not set
# CONFIG_RTC is not setCONFIG_EFI_RTC=y
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
#
# Ftape, the floppy tape device driver
#
# CONFIG_FTAPE is not setCONFIG_AGP=yCONFIG_AGP_INTEL=yCONFIG_AGP_I810=yCONFIG_AGP_VIA=yCONFIG_AGP_AMD=yCONFIG_AGP_SIS=yCONFIG_AGP_ALI=yCONFIG_DRM=y
# CONFIG_DRM_TDFX is not set
# CONFIG_DRM_GAMMA is not set
# CONFIG_DRM_R128 is not set
# CONFIG_DRM_I810 is not set
# CONFIG_DRM_MGA is not set
#
# Multimedia devices
#
# CONFIG_VIDEO_DEV is not set
#
# File systems
#
# CONFIG_QUOTA is not set
# CONFIG_AUTOFS_FS is not setCONFIG_AUTOFS4_FS=m
# CONFIG_ADFS_FS is not set
# CONFIG_ADFS_FS_RW is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_BFS_FS is not setCONFIG_FAT_FS=y
# CONFIG_MSDOS_FS is not set
# CONFIG_UMSDOS_FS is not setCONFIG_VFAT_FS=y
# CONFIG_EFS_FS is not set
# CONFIG_JFFS_FS is not set
# CONFIG_CRAMFS is not set
# CONFIG_RAMFS is not setCONFIG_ISO9660_FS=yCONFIG_JOLIET=y
# CONFIG_MINIX_FS is not set
# CONFIG_NTFS_FS is not set
# CONFIG_NTFS_RW is not set
# CONFIG_HPFS_FS is not setCONFIG_PROC_FS=y
# CONFIG_DEVFS_FS is not set
# CONFIG_DEVFS_MOUNT is not set
# CONFIG_DEVFS_DEBUG is not setCONFIG_DEVPTS_FS=y
# CONFIG_QNX4FS_FS is not set
# CONFIG_QNX4FS_RW is not setCONFIG_ROMFS_FS=yCONFIG_EXT2_FS=y
# CONFIG_SYSV_FS is not set
# CONFIG_SYSV_FS_WRITE is not set
# CONFIG_UDF_FS is not set
# CONFIG_UDF_RW is not set
# CONFIG_UFS_FS is not set
# CONFIG_UFS_FS_WRITE is not set
#
# Network File Systems
#
# CONFIG_CODA_FS is not setCONFIG_NFS_FS=yCONFIG_NFS_V3=y
# CONFIG_ROOT_NFS is not setCONFIG_NFSD=yCONFIG_NFSD_V3=yCONFIG_SUNRPC=yCONFIG_LOCKD=yCONFIG_LOCKD_V4=y
# CONFIG_SMB_FS is not set
# CONFIG_NCP_FS is not set
# CONFIG_NCPFS_PACKET_SIGNING is not set
# CONFIG_NCPFS_IOCTL_LOCKING is not set
# CONFIG_NCPFS_STRONG is not set
# CONFIG_NCPFS_NFS_NS is not set
# CONFIG_NCPFS_OS2_NS is not set
# CONFIG_NCPFS_SMALLDOS is not set
# CONFIG_NCPFS_MOUNT_SUBDIR is not set
# CONFIG_NCPFS_NDS_DOMAINS is not set
# CONFIG_NCPFS_NLS is not set
# CONFIG_NCPFS_EXTRAS is not set
#
# Partition Types
#
# CONFIG_PARTITION_ADVANCED is not setCONFIG_MSDOS_PARTITION=yCONFIG_NLS=y
#
# Native Language Support
#CONFIG_NLS_DEFAULT="iso8859-1"CONFIG_NLS_CODEPAGE_437=m
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not set
# CONFIG_NLS_CODEPAGE_850 is not set
# CONFIG_NLS_CODEPAGE_852 is not set
# CONFIG_NLS_CODEPAGE_855 is not set
# CONFIG_NLS_CODEPAGE_857 is not set
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not set
# CONFIG_NLS_CODEPAGE_862 is not set
# CONFIG_NLS_CODEPAGE_863 is not set
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
# CONFIG_NLS_CODEPAGE_866 is not set
# CONFIG_NLS_CODEPAGE_869 is not set
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_CODEPAGE_932 is not set
# CONFIG_NLS_CODEPAGE_936 is not set
# CONFIG_NLS_CODEPAGE_949 is not set
# CONFIG_NLS_CODEPAGE_950 is not setCONFIG_NLS_ISO8859_1=m
# CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not set
# CONFIG_NLS_ISO8859_4 is not set
# CONFIG_NLS_ISO8859_5 is not set
# CONFIG_NLS_ISO8859_6 is not set
# CONFIG_NLS_ISO8859_7 is not set
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_ISO8859_14 is not setCONFIG_NLS_ISO8859_15=m
# CONFIG_NLS_KOI8_R is not set
# CONFIG_NLS_UTF8 is not set
#
# Console drivers
#CONFIG_VGA_CONSOLE=y
#
# Frame-buffer support
#
# CONFIG_FB is not set
#
# Sound
#CONFIG_SOUND=yCONFIG_SOUND_CMPCI=yCONFIG_SOUND_CMPCI_SPDIFLOOP=yCONFIG_SOUND_CMPCI_4CH=yCONFIG_SOUND_CMPCI_REAR=yCONFIG_SOUND_EMU10K1=y
# CONFIG_SOUND_FUSION is not setCONFIG_SOUND_ES1370=yCONFIG_SOUND_ES1371=yCONFIG_SOUND_ESSSOLO1=yCONFIG_SOUND_MAESTRO=yCONFIG_SOUND_SONICVIBES=yCONFIG_SOUND_TRIDENT=y
# CONFIG_SOUND_MSNDCLAS is not set
# CONFIG_SOUND_MSNDPIN is not set
# CONFIG_SOUND_VIA82CXXX is not set
# CONFIG_SOUND_OSS is not set
# CONFIG_SOUND_TVMIXER is not set
#
# USB support
#CONFIG_USB=yCONFIG_USB_DEBUG=y
#
# Miscellaneous USB options
#
# CONFIG_USB_DEVICEFS is not set
# CONFIG_USB_BANDWIDTH is not set
#
# USB Controllers
#CONFIG_USB_UHCI_ALT=y
# CONFIG_USB_OHCI is not set
#
# USB Devices
#CONFIG_USB_PRINTER=yCONFIG_USB_SCANNER=yCONFIG_USB_MICROTEK=yCONFIG_USB_AUDIO=yCONFIG_USB_ACM=yCONFIG_USB_SERIAL=yCONFIG_USB_SERIAL_GENERIC=yCONFIG_USB_SERIAL_VISOR=yCONFIG_USB_SERIAL_WHITEHEAT=yCONFIG_USB_SERIAL_FTDI_SIO=yCONFIG_USB_SERIAL_KEYSPAN_PDA=yCONFIG_USB_SERIAL_KEYSPAN=y
# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not setCONFIG_USB_SERIAL_DIGI_ACCELEPORT=yCONFIG_USB_SERIAL_OMNINET=yCONFIG_USB_SERIAL_DEBUG=y
# CONFIG_USB_IBMCAM is not set
# CONFIG_USB_OV511 is not setCONFIG_USB_DC2XX=yCONFIG_USB_MDC800=yCONFIG_USB_STORAGE=y
# CONFIG_USB_STORAGE_DEBUG is not set
# CONFIG_USB_USS720 is not setCONFIG_USB_DABUSB=yCONFIG_USB_PLUSB=yCONFIG_USB_PEGASUS=yCONFIG_USB_RIO500=y
# CONFIG_USB_DSBR is not setCONFIG_USB_BLUETOOTH=y
#
# USB Human Interface Devices (HID)
#
#
# Input core support is needed for USB HID
#
#
# Kernel hacking
#CONFIG_IA32_SUPPORT=yCONFIG_MATHEMU=yCONFIG_MAGIC_SYSRQ=yCONFIG_IA64_EARLY_PRINTK=y
# CONFIG_IA64_DEBUG_CMPXCHG is not set
# CONFIG_IA64_DEBUG_IRQ is not setCONFIG_IA64_PRINT_HAZARDS=y
# CONFIG_IA64_NEW_UNWIND is not set
Re: [Linux-ia64] kernel update (relative to v2.4.0-test8)
In reply to David MosbergerQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · H . J . Lu
HJ> I tried it on my UP Big Sur with BIOS Build 59 and B1 stepping HJ> CPU. It didn't work. I got
HJ> Unexpected irq vector 0x0 on CPU 0!
We also do not have any B1 Big Sur, so it's not something I can test. However, the "Unexpected irq" is normal, it's even in the bootlog you included.
HJ> as soon as it booted. I am enclosing my .config here. BTW, the HJ> kernel from the 0828 Turbo Linux booted fine. I am enclosing the HJ> boot message here also. Any ideas?
You didn't describe how the new kernel failed, so there isn't much I can do.
--david
Re: [Linux-ia64] kernel update (relative to v2.4.0-test8)
In reply to David MosbergerQuoted 6 lines · David Mosberger
HJ> as soon as it booted. I am enclosing my .config here. BTW, the HJ> kernel from the 0828 Turbo Linux booted fine. I am enclosing the HJ> boot message here also. Any ideas?
You didn't describe how the new kernel failed, so there isn't much I can do.
The kernel doesn't get to print anything. I will recompile with early printk enabled to see if I get any more output but basically as soon as lilo passes the control to kernel the system locks up. I was only booting UP kernel even though I am running 2xB1 BigSur.
I tried both BIOS 60 and BIOS 70 -- test8 locks up on both. Additionally, I noticed that when booting a SMP test7 kernel under BIOS 70 the kernel recognizes only one processor. I'm downgrading back to BIOS 60.
Uros
--
Uros Prestor
[email protected]
Re: [Linux-ia64] kernel update (relative to v2.4.0-test8)
In reply to David MosbergerQuoted 11 lines · David Mosberger
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · H . J . Lu
HJ> I tried it on my UP Big Sur with BIOS Build 59 and B1 stepping HJ> CPU. It didn't work. I got
HJ> Unexpected irq vector
0x0on CPU 0!We also do not have any B1 Big Sur, so it's not something I can test. However, the "Unexpected irq" is normal, it's even in the bootlog you included.
Quoted 6 lines
HJ> as soon as it booted. I am enclosing my .config here. BTW, the HJ> kernel from the 0828 Turbo Linux booted fine. I am enclosing the HJ> boot message here also. Any ideas?
You didn't describe how the new kernel failed, so there isn't much I can do.
It keeps printing
Unexpected irq vector 0x0 on CPU 0!
and nothing else. I don't think boot is finished.
Signature · 1 line
H.J. Lu ([email protected])
Re: [Linux-ia64] kernel update (relative to v2.4.0-test8)
In reply to David MosbergerQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · H . J . Lu
HJ> It keeps printing
HJ> Unexpected irq vector 0x0 on CPU 0!
HJ> and nothing else. I don't think boot is finished.
Do you happen to have any USB devices plugged in? If so, try unplugging them.
Also, did you make sure you ran "make dep" before building the kernel to ensure include/asm-ia64/offsets.h is up-to-date?
--david
Re: [Linux-ia64] kernel update (relative to v2.4.0-test8)
In reply to David MosbergerQuoted 10 lines · David Mosberger
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · H . J . Lu
HJ> It keeps printing
HJ> Unexpected irq vector
0x0on CPU 0!HJ> and nothing else. I don't think boot is finished.
Do you happen to have any USB devices plugged in? If so, try unplugging them.
I don't have any USB devices.
Quoted 4 lines
Also, did you make sure you ran "make dep" before building the kernel to ensure
include/asm-ia64/offsets.his up-to-date?
Yes, I did "make dep". What should include/asm-ia64/offsets.h look like? That may explain many things.
Signature · 1 line
H.J. Lu ([email protected])
Re: [Linux-ia64] kernel update (relative to v2.4.0-test8)
In reply to David MosbergerQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · H . J . Lu
HJ> Yes, I did "make dep". What should include/asm-ia64/offsets.h HJ> look like? That may explain many things.
Well, it depends on your kernel configuration. If you did a "make dep", you should have the right values in there.
I'm not sure why the new kernel isn't working for you. Nothing has changed in the kernel that would explain an infinite stream of irq 0.
--david
Re: [Linux-ia64] kernel update (relative to v2.4.0-test8)
In reply to David MosbergerQuoted 10 lines · David Mosberger
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · H . J . Lu
HJ> Yes, I did "make dep". What should
include/asm-ia64/offsets.hHJ> look like? That may explain many things.Well, it depends on your kernel configuration. If you did a "make dep", you should have the right values in there.
I'm not sure why the new kernel isn't working for you. Nothing has changed in the kernel that would explain an infinite stream of irq 0.
Yep, that's what I am seeing now. I have disabled kdb and now the kernel boots, I briefly see a panic dump and then an infinite stream of irq 0's. If you can tell me of a way of capturing the kernel output I'll try to send you what I get.
Uros
--
Uros Prestor
[email protected]
Re: [Linux-ia64] kernel update (relative to v2.4.0-test8)
In reply to David MosbergerQuoted 11 lines · David Mosberger
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · H . J . Lu
HJ> Yes, I did "make dep". What should
include/asm-ia64/offsets.hHJ> look like? That may explain many things.Well, it depends on your kernel configuration. If you did a "make dep", you should have the right values in there.
I'm not sure why the new kernel isn't working for you. Nothing has changed in the kernel that would explain an infinite stream of irq 0.
I am going through my build log. I found at least 2 problems:
1. In inclide/asm-ia64/processor.h, there is
# define loops_per_sec() loops_per_sec
It is bad if the versioned symbol is enabled.
2. ACPI_RSDT_SIG is defined both as a string and an integer in 2 different header files. In include/linux/acpi.h
#define ACPI_RSDT_SIG 0x54445352 /* 'RSDT' */
In include/asm-ia64/acpi-ext.h
#define ACPI_RSDT_SIG "RSDT"
It is very confusing.
I am enclosing 2 patches. Please take a look.
Thanks.
H.J.
arch/ia64/kernel/setup.c renamed from arch/ia64/kernel/setup.c.macro +1 -1
@@ -320,7 +320,7 @@ get_cpuinfo (char *buffer) features, c->ppn, c->number, c->proc_freq /1000000 , c->proc_freq %1000000 , c->itc_freq /1000000 , c->itc_freq %1000000 , - loops_per_sec() / 500000, (loops_per_sec() / 5000) % 100); + ia64_loops_per_sec() / 500000, (ia64_loops_per_sec() / 5000) % 100); }return p - buffer; }
include/asm-ia64/processor.h renamed from include/asm-ia64/processor.h.macro +2 -2
@@ -253,9 +253,9 @@ struct cpuinfo_ia64 {#define my_cpu_data cpu_data[smp_processor_id()]#ifdef CONFIG_SMP -# define loops_per_sec () my_cpu_data.loops_per_sec +# define ia64_loops_per_sec () my_cpu_data.loops_per_sec#else -# define loops_per_sec () loops_per_sec +# define ia64_loops_per_sec () loops_per_sec#endif extern struct cpuinfo_ia64 cpu_data[NR_CPUS ];
arch/ia64/kernel/acpi.c renamed from arch/ia64/kernel/acpi.c.string +2 -2
@@ -233,7 +233,7 @@ acpi_parse(acpi_rsdp_t *rsdp) rsdp->rsdt =__va (rsdp->rsdt); rsdt = rsdp->rsdt; -if (strncmp (rsdt->header.signature,ACPI_RSDT_SIG ,ACPI_RSDT_SIG_LEN )) { +if (strncmp (rsdt->header.signature,ACPI_RSDT_SIG_STR ,ACPI_RSDT_SIG_LEN )) {printk ("Uh-oh, ACPI RDST signature incorrect!\n" );return 0 ; }
@@ -250,7 +250,7 @@ acpi_parse(acpi_rsdp_t *rsdp) hdrp = (acpi_desc_table_hdr_t *)__va (rsdt->entry_ptrs[i]);/* Only interested int the MSAPIC table for now ... */ -if (strncmp (hdrp->signature,ACPI_SAPIC_SIG ,ACPI_SAPIC_SIG_LEN ) !=0 ) +if (strncmp (hdrp->signature,ACPI_SAPIC_SIG_STR ,ACPI_SAPIC_SIG_LEN ) !=0 )continue ;acpi_parse_msapic ((acpi_sapic_t *) hdrp);
include/asm-ia64/acpi-ext.h renamed from include/asm-ia64/acpi-ext.h.string +3 -3
@@ -12,7 +12,7 @@#include <linux/types.h> -#define ACPI_RSDP_SIG "RSD PTR "/* Trailing space required */ +#define ACPI_RSDP_SIG_STR "RSD PTR "/* Trailing space required */ #define ACPI_RSDP_SIG_LEN 8 typedef struct { char signature[8];
@@ -35,14 +35,14 @@ typedef struct {char reserved[4 ]; } acpi_desc_table_hdr_t; -#define ACPI_RSDT_SIG "RSDT" +#define ACPI_RSDT_SIG_STR "RSDT"#define ACPI_RSDT_SIG_LEN 4typedef struct acpi_rsdt {acpi_desc_table_hdr_t header;unsigned long entry_ptrs[1 ];/* Not really . . . */ }acpi_rsdt_t ; -#define ACPI_SAPIC_SIG "SPIC" +#define ACPI_SAPIC_SIG_STR "SPIC"#define ACPI_SAPIC_SIG_LEN 4 typedef struct { acpi_desc_table_hdr_t header;
Re: [Linux-ia64] kernel update (relative to v2.4.0-test8)
In reply to David MosbergerQuoted 26 lines · H . J . Lu
Quoted 11 lines · David Mosberger
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · H . J . Lu
HJ> Yes, I did "make dep". What should
include/asm-ia64/offsets.hHJ> look like? That may explain many things.Well, it depends on your kernel configuration. If you did a "make dep", you should have the right values in there.
I'm not sure why the new kernel isn't working for you. Nothing has changed in the kernel that would explain an infinite stream of irq 0.
I am going through my build log. I found at least 2 problems:
1. In
inclide/asm-ia64/processor.h, there is# define loops_per_sec() loops_per_secIt is bad if the versioned symbol is enabled.
2.
ACPI_RSDT_SIGis defined both as a string and an integer in 2 different header files. Ininclude/linux/acpi.h#define
ACPI_RSDT_SIG0x54445352/* 'RSDT' */
Quoted 8 lines
In
include/asm-ia64/acpi-ext.h#define
ACPI_RSDT_SIG"RSDT"It is very confusing.
I am enclosing 2 patches. Please take a look.
Opps. The patch for string missed one patch. Here is the new string.patch.
H.J.
---
arch/ia64/kernel/acpi.c renamed from arch/ia64/kernel/acpi.c.string +3 -3
@@ -226,14 +226,14 @@ acpi_parse(acpi_rsdp_t *rsdp)return 0 ; } -if (strncmp (rsdp->signature,ACPI_RSDP_SIG ,ACPI_RSDP_SIG_LEN )) { +if (strncmp (rsdp->signature,ACPI_RSDP_SIG_STR ,ACPI_RSDP_SIG_LEN )) {printk ("Uh-oh, ACPI RSDP signature incorrect!\n" );return 0 ; } rsdp->rsdt =__va (rsdp->rsdt); rsdt = rsdp->rsdt; -if (strncmp (rsdt->header.signature,ACPI_RSDT_SIG ,ACPI_RSDT_SIG_LEN )) { +if (strncmp (rsdt->header.signature,ACPI_RSDT_SIG_STR ,ACPI_RSDT_SIG_LEN )) {printk ("Uh-oh, ACPI RDST signature incorrect!\n" );return 0 ; }
@@ -250,7 +250,7 @@ acpi_parse(acpi_rsdp_t *rsdp) hdrp = (acpi_desc_table_hdr_t *)__va (rsdt->entry_ptrs[i]);/* Only interested int the MSAPIC table for now ... */ -if (strncmp (hdrp->signature,ACPI_SAPIC_SIG ,ACPI_SAPIC_SIG_LEN ) !=0 ) +if (strncmp (hdrp->signature,ACPI_SAPIC_SIG_STR ,ACPI_SAPIC_SIG_LEN ) !=0 )continue ;acpi_parse_msapic ((acpi_sapic_t *) hdrp);
include/asm-ia64/acpi-ext.h renamed from include/asm-ia64/acpi-ext.h.string +3 -3
@@ -12,7 +12,7 @@#include <linux/types.h> -#define ACPI_RSDP_SIG "RSD PTR "/* Trailing space required */ +#define ACPI_RSDP_SIG_STR "RSD PTR "/* Trailing space required */ #define ACPI_RSDP_SIG_LEN 8 typedef struct { char signature[8];
@@ -35,14 +35,14 @@ typedef struct {char reserved[4 ]; } acpi_desc_table_hdr_t; -#define ACPI_RSDT_SIG "RSDT" +#define ACPI_RSDT_SIG_STR "RSDT"#define ACPI_RSDT_SIG_LEN 4typedef struct acpi_rsdt {acpi_desc_table_hdr_t header;unsigned long entry_ptrs[1 ];/* Not really . . . */ }acpi_rsdt_t ; -#define ACPI_SAPIC_SIG "SPIC" +#define ACPI_SAPIC_SIG_STR "SPIC"#define ACPI_SAPIC_SIG_LEN 4 typedef struct { acpi_desc_table_hdr_t header;
Re: [Linux-ia64] kernel update (relative to v2.4.0-test8)
In reply to David MosbergerQuoted 10 lines · Uros Prestor
Quoted 8 lines · David Mosberger
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · H . J . Lu
HJ> Yes, I did "make dep". What should
include/asm-ia64/offsets.hHJ> look like? That may explain many things.Well, it depends on your kernel configuration. If you did a "make dep", you should have the right values in there.
Quoted 7 lines
Quoted 2 lines
I'm not sure why the new kernel isn't working for you. Nothing has changed in the kernel that would explain an infinite stream of irq 0.
Yep, that's what I am seeing now. I have disabled kdb and now the kernel boots, I briefly see a panic dump and then an infinite stream of irq 0's. If you can tell me of a way of capturing the kernel output I'll try to send you what I get.
After applying my 2 patches to test8, the kernel boots. But the QLA1280 driver doesn't get the right irq. Also there are no IOSAPIC nor PCI->APIC IRQ messages.
Signature · 1 line
H.J. Lu ([email protected])
[Linux-ia64] kernel update (relative to v2.4.0-test8)
In reply to David MosbergerSince the last diff had a few serious problems, including the infamous ACPI bug and an fph problem that caused xmms not to work on UP machine, there is now a new diff available at:
ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/
in file linux-2.4.0-test8-ia64-000913.diff.
Summary of changes:
- Applied Asit's ACPI fix that prevented booting on some machines (B1 Big Sur mostly, it seems).
- Applied HJ's patch to rename the loops_per_sec() macro to ia64_loops_per_sec(). While looking at this code, I also realized that the SMP code still didn't do per-CPU BogoMIPS calibration, so I fixed that. Now, you too can have a machine with several thousand BogoMIPS! ;-)
- Applied Mike Stephen's patch to add unwind support for modules. This also cleans up the module interface. It touches the include file of the other platforms, but the changes involved are trivial.
- Reapplied the kernel_thread() fixed (don't know why the original patch from SuSE got lost; my apologies).
- Fixed fph management for UP machines & cleaned up code some more.
This kernel is known to build and boot for the HP Ski simulator, Big Sur, and SMP Lion. I tested the UP kernel extensively by listening to xmms for hours (though job, I know... ;-).
--david
arch/ia64/kernel/efi.c +1 -1
@@ -279,7 +279,7 @@continue ; } -printk (__FUNCTION__": CPU %d mapping PAL code [0x%lx-0x%lx) into [0x%lx-0x%lx)\n" , +printk ("CPU %d: mapping PAL code [0x%lx-0x%lx) into [0x%lx-0x%lx)\n" ,smp_processor_id (), md->phys_addr, md->phys_addr + (md->num_pages <<12 ), vaddr & mask, (vaddr & mask) +256 *1024 *1024 );
arch/ia64/kernel/ia64_ksyms.c +20 -1
@@ -10,6 +10,7 @@EXPORT_SYMBOL (memcmp);EXPORT_SYMBOL_NOVERS (memcpy);EXPORT_SYMBOL (memmove); +EXPORT_SYMBOL (memscan);EXPORT_SYMBOL (strcat);EXPORT_SYMBOL (strchr);EXPORT_SYMBOL (strcmp);
@@ -29,14 +30,21 @@#include <linux/in6.h> #include <asm/checksum.h> +/* not coded yet?? EXPORT_SYMBOL(csum_ipv6_magic); */ EXPORT_SYMBOL (csum_partial_copy_nocheck);EXPORT_SYMBOL (csum_tcpudp_magic);EXPORT_SYMBOL (ip_compute_csum);EXPORT_SYMBOL (ip_fast_csum); +#include <asm/io.h> +EXPORT_SYMBOL (__ia64_memcpy_fromio); +EXPORT_SYMBOL (__ia64_memcpy_toio); +EXPORT_SYMBOL (__ia64_memset_c_io); +#include <asm/irq.h> EXPORT_SYMBOL (enable_irq);EXPORT_SYMBOL (disable_irq); +EXPORT_SYMBOL (disable_irq_nosync);#include <asm/page.h> EXPORT_SYMBOL (clear_page);
@@ -53,18 +61,27 @@EXPORT_SYMBOL (cpu_data);EXPORT_SYMBOL (kernel_thread); +#include <asm/system.h> +#ifdef CONFIG_IA64_DEBUG_IRQ +EXPORT_SYMBOL (last_cli_ip); +#endif +#ifdef CONFIG_SMP + +#include <asm/current.h> #include <asm/hardirq.h> EXPORT_SYMBOL (synchronize_irq);#include <asm/smp.h> EXPORT_SYMBOL (smp_call_function); + +#include <linux/smp.h> EXPORT_SYMBOL (smp_num_cpus);#include <asm/smplock.h> EXPORT_SYMBOL (kernel_flag); -#include <asm/system.h> +/* #include <asm/system.h> */ EXPORT_SYMBOL (__global_sti);EXPORT_SYMBOL (__global_cli);EXPORT_SYMBOL (__global_save_flags);
@@ -74,6 +91,7 @@#include <asm/uaccess.h> EXPORT_SYMBOL (__copy_user); +EXPORT_SYMBOL (__do_clear_user);#include <asm/unistd.h> EXPORT_SYMBOL (__ia64_syscall);
@@ -88,3 +106,4 @@EXPORT_SYMBOL_NOVERS (__udivdi3);EXPORT_SYMBOL_NOVERS (__moddi3);EXPORT_SYMBOL_NOVERS (__umoddi3); +
arch/ia64/kernel/process.c +3 -3
@@ -495,14 +495,14 @@ kernel_thread (int (*fn)(void *), void *arg, unsigned long flags) {struct task_struct *parent = current; -int result; +int result, tid; -clone (flags |CLONE_VM ,0 ); + tid =clone (flags |CLONE_VM ,0 );if (parent != current) { result = (*fn)(arg);_exit (result); } -return 0 ;/* parent: just return */ +return tid; }/*
arch/ia64/kernel/ptrace.c +41 -18
94 lines not on this page · raw message
arch/ia64/kernel/setup.c +3 -3
@@ -320,7 +320,7 @@ features, c->ppn, c->number, c->proc_freq /1000000 , c->proc_freq %1000000 , c->itc_freq /1000000 , c->itc_freq %1000000 , - loops_per_sec() / 500000, (loops_per_sec() / 5000) % 100); + ia64_loops_per_sec() / 500000, (ia64_loops_per_sec() / 5000) % 100); }return p - buffer; }
@@ -382,8 +382,8 @@#endif phys_addr_size = vm1.pal_vm_info_1_s.phys_add_size; } -printk ("processor implements %lu virtual and %lu physical address bits\n" , - impl_va_msb +1 , phys_addr_size); +printk ("CPU %d: %lu virtual and %lu physical address bits\n" , +smp_processor_id (), impl_va_msb +1 , phys_addr_size); c->unimpl_va_mask = ~((7L <<61 ) | ((1L << (impl_va_msb +1 )) -1 )); c->unimpl_pa_mask = ~((1L <<63 ) | ((1L << phys_addr_size) -1 ));
arch/ia64/kernel/signal.c +5 -3
@@ -147,12 +147,14 @@ia64_put_nat_bits (&scr->pt, &scr->sw, nat);/* restore the original scratch NaT bits */ #endif -if ((flags &IA64_SC_FLAG_FPH_VALID )) { -struct ia64_psr *psr =ia64_psr (ia64_task_regs (current)); +if ((flags &IA64_SC_FLAG_FPH_VALID ) !=0 ) { +struct ia64_psr *psr =ia64_psr (&scr->pt);__copy_from_user (current->thread.fph, &sc->sc_fr[32 ],96 *16 ); -if (!psr->dfh) +if (!psr->dfh) { + psr->mfh =0 ;__ia64_load_fpu (current->thread.fph); + } }return err; }
arch/ia64/kernel/smp.c +34 -54
176 lines not on this page · raw message
arch/ia64/kernel/time.c +1 -1
@@ -303,7 +303,7 @@ itc_freq = (platform_base_freq*itc_ratio.num)/itc_ratio.den; itm.delta = itc_freq /HZ ; -printk ("timer: CPU %d base freq=%lu.%03luMHz, ITC ratio=%lu/%lu, ITC freq=%lu.%03luMHz\n" , +printk ("CPU %d: base freq=%lu.%03luMHz, ITC ratio=%lu/%lu, ITC freq=%lu.%03luMHz\n" ,smp_processor_id (), platform_base_freq /1000000 , (platform_base_freq /1000 ) %1000 , itc_ratio.num, itc_ratio.den, itc_freq /1000000 , (itc_freq /1000 ) %1000 );
arch/ia64/kernel/traps.c +27 -35
81 lines not on this page · raw message
arch/ia64/kernel/unaligned.c +19 -23
81 lines not on this page · raw message
arch/ia64/kernel/unwind.c +4 -1
@@ -395,7 +395,10 @@ }else {struct task_struct *t = info->task; -ia64_sync_fph (t); +if (write) +ia64_sync_fph (t); +else +ia64_flush_fph (t); addr = t->thread.fph + (regnum -32 ); }
arch/ia64/lib/io.c +0 -4
@@ -1,4 +1,3 @@ -#include <linux/module.h> #include <linux/types.h> #include <asm/io.h>
@@ -49,6 +48,3 @@ } } -EXPORT_SYMBOL (__ia64_memcpy_fromio); -EXPORT_SYMBOL (__ia64_memcpy_toio); -EXPORT_SYMBOL (__ia64_memset_c_io);
drivers/acpi/acpiconf.c +2 -2
@@ -311,7 +311,7 @@ pprts = (PCI_ROUTING_TABLE **)prts;for ( i =0 ; i <PCI_MAX_BUS ; i++) { - prt = prtf = *pprts++; + prt = *pprts++;if (prt) {for ( ; prt->length >0 ; nvec++) { prt = (PCI_ROUTING_TABLE *) ((NATIVE_UINT )prt + (NATIVE_UINT )prt->length);
@@ -331,7 +331,7 @@ pprts = (PCI_ROUTING_TABLE **)prts;for ( i =0 ; i <PCI_MAX_BUS ; i++) { - prt = *pprts++; + prt = prtf = *pprts++;if (prt) {for ( ; prt->length >0 ; pvec++) { pvec->bus = (UINT16 )i;
include/asm-alpha/module.h +11 -0
@@ -0,0 +1,11 @@ +#ifndef _ASM_ALPHA_MODULE_H +#define _ASM_ALPHA_MODULE_H +/* +* This file contains the alpha architecture specific module code. +*/ + +#define module_map (x) vmalloc(x) +#define module_unmap (x) vfree(x) +#define module_arch_init (x) (0) + +#endif /* _ASM_ALPHA_MODULE_H */
include/asm-alpha/pgtable.h +0 -3
@@ -300,9 +300,6 @@#define pte_to_swp_entry (pte) ((swp_entry_t) { pte_val(pte) })#define swp_entry_to_pte (x) ((pte_t) { (x).val }) -#define module_map vmalloc -#define module_unmap vfree -/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */ #define PageSkip (page) (0)#define kern_addr_valid (addr) (1)
include/asm-arm/module.h +11 -0
@@ -0,0 +1,11 @@ +#ifndef _ASM_ARM_MODULE_H +#define _ASM_ARM_MODULE_H +/* +* This file contains the arm architecture specific module code. +*/ + +#define module_map (x) vmalloc(x) +#define module_unmap (x) vfree(x) +#define module_arch_init (x) (0) + +#endif /* _ASM_ARM_MODULE_H */
include/asm-arm/pgtable.h +0 -3
@@ -170,9 +170,6 @@#define pte_to_swp_entry (pte) ((swp_entry_t) { pte_val(pte) })#define swp_entry_to_pte (swp) ((pte_t) { (swp).val }) -#define module_map vmalloc -#define module_unmap vfree -#define io_remap_page_range remap_page_range#endif /* !__ASSEMBLY__ */
include/asm-i386/module.h +11 -0
@@ -0,0 +1,11 @@ +#ifndef _ASM_I386_MODULE_H +#define _ASM_I386_MODULE_H +/* +* This file contains the i386 architecture specific module code. +*/ + +#define module_map (x) vmalloc(x) +#define module_unmap (x) vfree(x) +#define module_arch_init (x) (0) + +#endif /* _ASM_I386_MODULE_H */
include/asm-i386/pgtable.h +0 -3
@@ -327,9 +327,6 @@#define pte_to_swp_entry (pte) ((swp_entry_t) { pte_val(pte) })#define swp_entry_to_pte (x) ((pte_t) { (x).val }) -#define module_map vmalloc -#define module_unmap vfree -#endif /* !__ASSEMBLY__ */ /* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
include/asm-ia64/module.h +106 -0
106 lines not on this page · raw message
include/asm-ia64/pgtable.h +0 -3
@@ -426,9 +426,6 @@#define pte_to_swp_entry (pte) ((swp_entry_t) { pte_val(pte) })#define swp_entry_to_pte (x) ((pte_t) { (x).val }) -#define module_map vmalloc -#define module_unmap vfree -/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */ #define PageSkip (page) (0)
include/asm-ia64/processor.h +2 -2
@@ -253,9 +253,9 @@#define my_cpu_data cpu_data[smp_processor_id()]#ifdef CONFIG_SMP -# define loops_per_sec () my_cpu_data.loops_per_sec +# define ia64_loops_per_sec () my_cpu_data.loops_per_sec#else -# define loops_per_sec () loops_per_sec +# define ia64_loops_per_sec () loops_per_sec#endif extern struct cpuinfo_ia64 cpu_data[NR_CPUS ];
include/asm-m68k/module.h +11 -0
@@ -0,0 +1,11 @@ +#ifndef _ASM_M68K_MODULE_H +#define _ASM_M68K_MODULE_H +/* +* This file contains the m68k architecture specific module code. +*/ + +#define module_map (x) vmalloc(x) +#define module_unmap (x) vfree(x) +#define module_arch_init (x) (0) + +#endif /* _ASM_M68K_MODULE_H */
include/asm-m68k/pgtable.h +0 -3
@@ -390,9 +390,6 @@#endif /* __ASSEMBLY__ */ -#define module_map vmalloc -#define module_unmap vfree -/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */ #define PageSkip (page) (0)#define kern_addr_valid (addr) (1)
include/asm-mips/module.h +11 -0
@@ -0,0 +1,11 @@ +#ifndef _ASM_MIPS_MODULE_H +#define _ASM_MIPS_MODULE_H +/* +* This file contains the mips architecture specific module code. +*/ + +#define module_map (x) vmalloc(x) +#define module_unmap (x) vfree(x) +#define module_arch_init (x) (0) + +#endif /* _ASM_MIPS_MODULE_H */
include/asm-mips/pgtable.h +0 -4
@@ -451,10 +451,6 @@#define pte_to_swp_entry (pte) ((swp_entry_t) { pte_val(pte) })#define swp_entry_to_pte (x) ((pte_t) { (x).val }) - -#define module_map vmalloc -#define module_unmap vfree -/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */ #define PageSkip (page) (0)#define kern_addr_valid (addr) (1)
include/asm-mips64/module.h +11 -0
@@ -0,0 +1,11 @@ +#ifndef _ASM_MIPS64_MODULE_H +#define _ASM_MIPS64_MODULE_H +/* +* This file contains the mips64 architecture specific module code. +*/ + +#define module_map (x) vmalloc(x) +#define module_unmap (x) vfree(x) +#define module_arch_init (x) (0) + +#endif /* _ASM_MIPS64_MODULE_H */
include/asm-mips64/pgtable.h +0 -3
@@ -525,9 +525,6 @@#define pte_to_swp_entry (pte) ((swp_entry_t) { pte_val(pte) })#define swp_entry_to_pte (x) ((pte_t) { (x).val }) -#define module_map vmalloc -#define module_unmap vfree -/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */ #define PageSkip (page) test_bit(PG_skip, &(page)->flags)#ifndef CONFIG_DISCONTIGMEM
include/asm-ppc/module.h +11 -0
@@ -0,0 +1,11 @@ +#ifndef _ASM_PPC_MODULE_H +#define _ASM_PPC_MODULE_H +/* +* This file contains the PPC architecture specific module code. +*/ + +#define module_map (x) vmalloc(x) +#define module_unmap (x) vfree(x) +#define module_arch_init (x) (0) + +#endif /* _ASM_PPC_MODULE_H */
include/asm-ppc/pgtable.h +0 -3
@@ -451,9 +451,6 @@#define pte_to_swp_entry (pte) ((swp_entry_t) { pte_val(pte) })#define swp_entry_to_pte (x) ((pte_t) { (x).val }) -#define module_map vmalloc -#define module_unmap vfree -/* CONFIG_APUS */ /* For virtual address to physical address conversion */ extern void cache_clear (__u32 addr,int length);
include/asm-s390/module.h +11 -0
@@ -0,0 +1,11 @@ +#ifndef _ASM_S390_MODULE_H +#define _ASM_S390_MODULE_H +/* +* This file contains the s390 architecture specific module code. +*/ + +#define module_map (x) vmalloc(x) +#define module_unmap (x) vfree(x) +#define module_arch_init (x) (0) + +#endif /* _ASM_S390_MODULE_H */
include/asm-s390/pgtable.h +0 -3
@@ -405,9 +405,6 @@#define pte_to_swp_entry (pte) ((swp_entry_t) { pte_val(pte) })#define swp_entry_to_pte (x) ((pte_t) { (x).val }) -#define module_map vmalloc -#define module_unmap vfree -#endif /* !__ASSEMBLY__ */ /* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
include/asm-sh/module.h +11 -0
@@ -0,0 +1,11 @@ +#ifndef _ASM_SH_MODULE_H +#define _ASM_SH_MODULE_H +/* +* This file contains the SH architecture specific module code. +*/ + +#define module_map (x) vmalloc(x) +#define module_unmap (x) vfree(x) +#define module_arch_init (x) (0) + +#endif /* _ASM_SH_MODULE_H */
include/asm-sh/pgtable.h +0 -3
@@ -250,9 +250,6 @@#define pte_to_swp_entry (pte) ((swp_entry_t) { pte_val(pte) })#define swp_entry_to_pte (x) ((pte_t) { (x).val }) -#define module_map vmalloc -#define module_unmap vfree -#endif /* !__ASSEMBLY__ */ /* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
include/asm-sparc/module.h +11 -0
@@ -0,0 +1,11 @@ +#ifndef _ASM_SPARC_MODULE_H +#define _ASM_SPARC_MODULE_H +/* +* This file contains the sparc architecture specific module code. +*/ + +#define module_map (x) vmalloc(x) +#define module_unmap (x) vfree(x) +#define module_arch_init (x) (0) + +#endif /* _ASM_SPARC_MODULE_H */
include/asm-sparc/pgtable.h +0 -2
@@ -444,8 +444,6 @@ } } -#define module_map vmalloc -#define module_unmap vfreeextern unsigned long *sparc_valid_addr_bitmap;/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
include/asm-sparc64/module.h +11 -0
@@ -0,0 +1,11 @@ +#ifndef _ASM_SPARC64_MODULE_H +#define _ASM_SPARC64_MODULE_H +/* +* This file contains the sparc64 architecture specific module code. +*/ + +extern void *module_map (unsigned long size); +extern void module_unmap (void *addr); +#define module_arch_init (x) (0) + +#endif /* _ASM_SPARC64_MODULE_H */
include/asm-sparc64/pgtable.h +0 -2
@@ -284,8 +284,6 @@return ((sun4u_get_pte (addr) &0xf0000000 ) >>28 ); } -extern void *module_map (unsigned long size); -extern void module_unmap (void *addr);extern unsigned long *sparc64_valid_addr_bitmap;/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
include/linux/module.h +10 -0
@@ -83,6 +83,12 @@const struct module_persist *persist_start;const struct module_persist *persist_end;int (*can_unload)(void ); +int runsize;/* In modutils, not currently used */ +const char *kallsyms_start;/* All symbols for kernel debugging */ +const char *kallsyms_end; +const char *archdata_start;/* arch specific data for module */ +const char *archdata_end; +const char *kernel_data;/* Reserved for kernel internal use */ };struct module_info
@@ -122,6 +128,10 @@#define mod_member_present (mod,member) \ ((unsigned long)(&((struct module *)0L)->member + 1) \ <= (mod)->size_of_struct) + +/* Check if an address p with number of entries n is within the body of module m */ +#define mod_bound (p, n, m) ((unsigned long)(p) >= ((unsigned long)(m) + ((m)->size_of_struct)) && \ + (unsigned long)((p)+(n)) <= (unsigned long)(m) + (m)->size)/* Backwards compatibility definition. */
kernel/module.c +42 -14
117 lines not on this page · raw message
[Linux-ia64] kernel update (relative to v2.4.0-test9)
In reply to David MosbergerThe latest IA-64 Linux kernel diff is now available at:
ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/
in file linux-2.4.0-test9-ia64-001004.diff. Actually, it has been available since last night, but I ran into some problems booting the new kernel remotely so I couldn't actually test it until this morning.
Here is a summary of what changed since the last kernel:
- Stephane's perfmon updates (warning: this is works in progress; especially the changes to ptrace will disappear so don't write user apps that depend on this way of accessing the PMU...)
- SGI SN1 updates (Kanoj); also stash away coherence domain info in global variable "ia64_ptc_domain_info"
- Asit's patch to support running with VHPT disabled; this is for kernel hacking only and should not be used for normal operation. This patch uncovered some bad kernel references which were also fixed.
- With SMP, do sync.i in context switch to ensure "fc"s are visible on all CPUs (Asit)
- TLB handler fixes by Patrick and yours truly.
- qlogic SCSI driver update (BJ).
- Remove IA-64 version of ioperm syscall and fix vt.c to not support the ioctl that used this call
- Added 32-bit division routines required by latest CVS compiler. 32-bit division can get away with one fewer iteration and also uses few enough fp registers that we don't need to save/restore anything.
- Fix SMP BogoMIPS calculation and printing; the BogoMIPS values are now really per-CPU
- Various minor and not so minor updates to the kernel unwinder.
- Fixed SCSI disk driver so it works when compiled into the kernel (yes, this is a generic test9 bug; Linus must have been in a hurry to catch that plane to Germany... ;-).
- __atomic_fool_gcc() disappeared. It shouldn't be necessary with the compilers available for IA-64 Linux.
- Replace "extern inline" with "static inline".
- Change HZ for simulator to 32 Hz; the kernel time-of-day code is more accurate if HZ is an integer power of two.
- Add parport.h needed by some kernel modules.
- Various updates to get things in sync with 2.4.0-test9
That should be it. This kernel is known to boot fine on 4-way Lion, 2-way and 1-way Big Sur, as well as the HP Ski simulator.
Enjoy,
--david
arch/ia64/Makefile +8 -1
@@ -46,11 +46,18 @@ $(CORE_FILES) endif -ifdef CONFIG_IA64_SGI_SN1_SIM +ifdef CONFIG_IA64_SGI_SN1 +CFLAGS := $(CFLAGS) -DSN -I. -DBRINGUP -DDIRECT_L1_CONSOLE \ + -DNUMA_BASE -DSIMULATED_KLGRAPH -DNUMA_MIGR_CONTROL \ + -DLITTLE_ENDIAN -DREAL_HARDWARE -DLANGUAGE_C=1 \ + -D_LANGUAGE_C=1 SUBDIRS := arch/$(ARCH)/sn/sn1 \ arch/$(ARCH)/sn \ + arch/$(ARCH)/sn/io \ + arch/$(ARCH)/sn/fprom \ $(SUBDIRS) CORE_FILES := arch/$(ARCH)/sn/sn.a \ + arch/$(ARCH)/sn/io/sgiio.o\ $(CORE_FILES) endif
arch/ia64/config.in +16 -4
@@ -27,7 +27,7 @@ "generic CONFIG_IA64_GENERIC \ DIG-compliant CONFIG_IA64_DIG \ HP-simulator CONFIG_IA64_HP_SIM \ - SN1-simulator CONFIG_IA64_SGI_SN1_SIM" generic + SGI-SN1 CONFIG_IA64_SGI_SN1" generic choice 'Kernel page size' \ "4KB CONFIG_IA64_PAGE_SIZE_4KB \
@@ -61,9 +61,20 @@ fi fi -if [ "$CONFIG_IA64_SGI_SN1_SIM" = "y" ]; then - define_bool CONFIG_NUMA y - define_bool CONFIG_IA64_SOFTSDV_HACKS y +if [ "$CONFIG_IA64_SGI_SN1" = "y" ]; then + bool ' Enable use of global TLB purge instruction (ptc.g)' CONFIG_ITANIUM_PTCG + bool ' Enable Itanium B-step specific code' CONFIG_ITANIUM_BSTEP_SPECIFIC + if [ "$CONFIG_ITANIUM_BSTEP_SPECIFIC" = "y" ]; then + bool ' Enable Itanium B0-step specific code' CONFIG_ITANIUM_B0_SPECIFIC + fi + bool ' Enable SGI Medusa Simulator Support' CONFIG_IA64_SGI_SN1_SIM n + bool ' Enable SGI hack for version 1.0 syngery bugs' CONFIG_IA64_SGI_SYNERGY_1_0_HACKS n + define_bool CONFIG_DEVFS_DEBUG y + define_bool CONFIG_DEVFS_FS y + define_bool CONFIG_IA64_BRL_EMU y + define_bool CONFIG_IA64_MCA y + define_bool CONFIG_IA64_SGI_IO y + define_bool CONFIG_ITANIUM y fi define_bool CONFIG_KCORE_ELF y # On IA-64, we always want an ELF /proc/kcore.
@@ -237,5 +248,6 @@ bool 'Turn on irq debug checks (slow!)' CONFIG_IA64_DEBUG_IRQ bool 'Print possible IA64 hazards to console' CONFIG_IA64_PRINT_HAZARDS bool 'Enable new unwind support' CONFIG_IA64_NEW_UNWIND +bool 'Disable VHPT' CONFIG_DISABLE_VHPT endmenu
arch/ia64/dig/iosapic.c +1 -1
@@ -386,7 +386,7 @@unsigned int ver, v;int l, max_pin; - ver =iosapic_version (iosapic->address); + ver =iosapic_version ((unsigned long )ioremap (iosapic->address,0 )); max_pin = (ver >>16 ) &0xff ; printk("IOSAPIC Version %x.%x: address 0x%lx IRQs 0x%x - 0x%x\n",
arch/ia64/kernel/Makefile +1 -1
@@ -16,7 +16,7 @@ obj-$(CONFIG_IA64_GENERIC) += machvec.o obj-$(CONFIG_IA64_PALINFO) += palinfo.o obj-$(CONFIG_PCI) += pci.o -obj-$(CONFIG_SMP) += smp.o +obj-$(CONFIG_SMP) += smp.o smpboot.o obj-$(CONFIG_IA64_MCA) += mca.o mca_asm.o obj-$(CONFIG_IA64_BRL_EMU) += brl_emu.o
arch/ia64/kernel/acpi.c +3 -4
@@ -136,13 +136,12 @@ break; } -#if 1 /*def ACPI_DEBUG*/ +# ifdef ACPI_DEBUG printk ("Legacy ISA IRQ %x -> IA64 Vector %x IOSAPIC Pin %x Active %s %s Trigger\n" , legacy->isa_irq, vector,iosapic_pin (vector), ((iosapic_polarity (vector) =IO_SAPIC_POL_LOW ) ?"Low" :"High" ), ((iosapic_trigger (vector) =IO_SAPIC_LEVEL ) ?"Level" :"Edge" )); -#endif /* ACPI_DEBUG */ - +# endif /* ACPI_DEBUG */ #endif /* CONFIG_IA64_IRQ_ACPI */ }
@@ -279,7 +278,7 @@#else # if defined (CONFIG_IA64_HP_SIM )return "hpsim" ; -# elif defined (CONFIG_IA64_SGI_SN1_SIM ) +# elif defined (CONFIG_IA64_SGI_SN1 )return "sn1" ;# elif defined (CONFIG_IA64_DIG )return "dig" ;
arch/ia64/kernel/efi.c +10 -0
@@ -376,6 +376,16 @@#endif efi_map_pal_code (); + +#ifndef CONFIG_IA64_SOFTSDV_HACKS +/* +* (Some) SoftSDVs seem to have a problem with this call. +* Since it's mostly a performance optimization, just don't do +* it for now... --davidm 99/12/6 +*/ +efi_enter_virtual_mode (); +#endif + }void
arch/ia64/kernel/entry.S +4 -1
@@ -120,6 +120,9 @@ mov r13=in0 // set "current" pointer ;; DO_LOAD_SWITCH_STACK( ) +#ifdef CONFIG_SMP + sync.i // ensure "fc"s done by this CPU are visible on other CPUs +#endif br.ret.sptk.few rp END(ia64_switch_to)
@@ -1088,7 +1091,7 @@ data8 sys_setpriority data8 sys_statfs data8 sys_fstatfs - data8 sys_ioperm // 1105 + data8 ia64_ni_syscall data8 sys_semget data8 sys_semop data8 sys_semctl
arch/ia64/kernel/ia64_ksyms.c +10 -0
@@ -97,13 +97,23 @@EXPORT_SYMBOL (__ia64_syscall);/* from arch/ia64/lib */ +extern void __divsi3 (void ); +extern void __udivsi3 (void ); +extern void __modsi3 (void ); +extern void __umodsi3 (void );extern void __divdi3 (void );extern void __udivdi3 (void );extern void __moddi3 (void );extern void __umoddi3 (void ); +EXPORT_SYMBOL_NOVERS (__divsi3); +EXPORT_SYMBOL_NOVERS (__udivsi3); +EXPORT_SYMBOL_NOVERS (__modsi3); +EXPORT_SYMBOL_NOVERS (__umodsi3);EXPORT_SYMBOL_NOVERS (__divdi3);EXPORT_SYMBOL_NOVERS (__udivdi3);EXPORT_SYMBOL_NOVERS (__moddi3);EXPORT_SYMBOL_NOVERS (__umoddi3); +extern unsigned long ia64_iobase; +EXPORT_SYMBOL (ia64_iobase);
arch/ia64/kernel/irq_ia64.c +2 -1
@@ -39,7 +39,8 @@spinlock_t ivr_read_lock;#endif -unsigned long ipi_base_addr =IPI_DEFAULT_BASE_ADDR ;/* default base addr of IPI table */ +/* default base addr of IPI table */ +unsigned long ipi_base_addr = (__IA64_UNCACHED_OFFSET |IPI_DEFAULT_BASE_ADDR );/* * Legacy IRQ to IA-64 vector translation table. Any vector not in
arch/ia64/kernel/ivt.S +38 -21
122 lines not on this page · raw message
arch/ia64/kernel/mca.c +11 -4
@@ -255,8 +255,11 @@IA64_MCA_DEBUG ("ia64_mca_init : correctable mca vector setup done\n" ); ia64_mc_info.imi_mca_handler =__pa (ia64_os_mca_dispatch); - ia64_mc_info.imi_mca_handler_size = -__pa (ia64_os_mca_dispatch_end) -__pa (ia64_os_mca_dispatch); +/* +* XXX - disable SAL checksum by setting size to 0; should be +* __pa(ia64_os_mca_dispatch_end) - __pa(ia64_os_mca_dispatch); +*/ + ia64_mc_info.imi_mca_handler_size =0 ;/* Register the os mca handler with SAL */ if (ia64_sal_set_vectors(SAL_VECTOR_OS_MCA, ia64_mc_info.imi_mca_handler,
@@ -268,10 +271,14 @@IA64_MCA_DEBUG ("ia64_mca_init : registered os mca handler with SAL\n" ); +/* +* XXX - disable SAL checksum by setting size to 0, should be +* IA64_INIT_HANDLER_SIZE +*/ ia64_mc_info.imi_monarch_init_handler =__pa (mon_init_ptr->fp); - ia64_mc_info.imi_monarch_init_handler_size =IA64_INIT_HANDLER_SIZE ; + ia64_mc_info.imi_monarch_init_handler_size =0 ; ia64_mc_info.imi_slave_init_handler =__pa (slave_init_ptr->fp); - ia64_mc_info.imi_slave_init_handler_size =IA64_INIT_HANDLER_SIZE ; + ia64_mc_info.imi_slave_init_handler_size =0 ;IA64_MCA_DEBUG ("ia64_mca_init : os init handler at %lx\n" ,ia64_mc_info.imi_monarch_init_handler);
arch/ia64/kernel/perfmon.c +179 -57
365 lines not on this page · raw message
arch/ia64/kernel/process.c +31 -1
@@ -294,7 +294,8 @@* call behavior where scratch registers are preserved across * system calls (unless used by the system call itself). */ -# define THREAD_FLAGS_TO_CLEAR (IA64_THREAD_FPH_VALID | IA64_THREAD_DBG_VALID) +# define THREAD_FLAGS_TO_CLEAR (IA64_THREAD_FPH_VALID | IA64_THREAD_DBG_VALID \ + | IA64_THREAD_PM_VALID)# define THREAD_FLAGS_TO_SET 0 p->thread.flags = ((current->thread.flags & ~THREAD_FLAGS_TO_CLEAR ) |THREAD_FLAGS_TO_SET );
@@ -333,6 +334,17 @@if (ia64_peek (pt, current, addr, &val) =0 )access_process_vm (current, addr, &val,sizeof (val),1 ); +/* +* coredump format: +* r0-r31 +* NaT bits (for r0-r31; bit N = 1 iff rN is a NaT) +* predicate registers (p0-p63) +* b0-b7 +* ip cfm user-mask +* ar.rsc ar.bsp ar.bspstore ar.rnat +* ar.ccv ar.unat ar.fpsr ar.pfs ar.lc ar.ec +*/ +/* r0 is zero */ for (i =1 , mask = (1UL << i); i <32 ; ++i) {unw_get_gr (info, i, &dst[i], &nat);
@@ -530,6 +542,24 @@#ifndef CONFIG_SMP if (ia64_get_fpu_owner () = current)ia64_set_fpu_owner (0 ); +#endif +#ifdef CONFIG_PERFMON +/* stop monitoring */ +if ((current->thread.flags &IA64_THREAD_PM_VALID ) !=0 ) { +/* +* we cannot rely on switch_to() to save the PMU +* context for the last time. There is a possible race +* condition in SMP mode between the child and the +* parent. by explicitly saving the PMU context here +* we garantee no race. this call we also stop +* monitoring +*/ +ia64_save_pm_regs (¤t->thread); +/* +* make sure that switch_to() will not save context again +*/ + current->thread.flags &= ~IA64_THREAD_PM_VALID ; + }#endif }
arch/ia64/kernel/ptrace.c +68 -3
110 lines not on this page · raw message
arch/ia64/kernel/sal.c +5 -0
@@ -34,6 +34,7 @@ }ia64_sal_handler ia64_sal = (ia64_sal_handler ) default_handler; +ia64_sal_desc_ptc_t *ia64_ptc_domain_info;const char *ia64_sal_strerror (long status)
@@ -125,6 +126,10 @@#endif ia64_pal_handler_init (__va (ep->pal_proc));ia64_sal_handler_init (__va (ep->sal_proc),__va (ep->gp)); +break ; + +case SAL_DESC_PTC : + ia64_ptc_domain_info = (ia64_sal_desc_ptc_t *)p;break ;case SAL_DESC_AP_WAKEUP :
arch/ia64/kernel/setup.c +8 -2
@@ -270,6 +270,11 @@int get_cpuinfo (char *buffer) { +#ifdef CONFIG_SMP +# define lps c->loops_per_sec +#else +# define lps loops_per_sec +#endif char family[32 ], model[32 ], features[128 ], *cp, *p = buffer;struct cpuinfo_ia64 *c;unsigned long mask;
@@ -320,7 +325,7 @@ features, c->ppn, c->number, c->proc_freq /1000000 , c->proc_freq %1000000 , c->itc_freq /1000000 , c->itc_freq %1000000 , - ia64_loops_per_sec() / 500000, (ia64_loops_per_sec() / 5000) % 100); + lps / 500000, (lps / 5000) % 100); }return p - buffer; }
@@ -416,8 +421,9 @@* do NOT defer TLB misses, page-not-present, access bit, or * debug faults but kernel code should not rely on any * particular setting of these bits. -*/ ia64_set_dcr(IA64_DCR_DR | IA64_DCR_DK | IA64_DCR_DX | IA64_DCR_PP); +*/ +ia64_set_dcr (IA64_DCR_DR |IA64_DCR_DK |IA64_DCR_DX );#ifndef CONFIG_SMP ia64_set_fpu_owner (0 );/* initialize ar.k5 */ #endif
arch/ia64/kernel/smp.c +2 -42
63 lines not on this page · raw message
arch/ia64/kernel/smpboot.c +76 -0
76 lines not on this page · raw message
arch/ia64/kernel/traps.c +3 -2
@@ -254,10 +254,11 @@* kernel, so set those bits in the mask and set the low volatile * pointer to point to these registers. */ - fp_state.bitmask_low64 =0xffc0 ;/* bit6..bit15 */ #ifndef FPSWA_BUG - fp_state.fp_state_low_volatile = ®s->f6; + fp_state.bitmask_low64 =0x3c0 ;/* bit 6..9 */ + fp_state.fp_state_low_volatile = (fp_state_low_volatile_t *) ®s->f6;#else + fp_state.bitmask_low64 =0xffc0 ;/* bit6..bit15 */ f6_15[0 ] = regs->f6; f6_15[1 ] = regs->f7; f6_15[2 ] = regs->f8;
arch/ia64/kernel/unwind.c +201 -165
726 lines not on this page · raw message
arch/ia64/kernel/unwind_i.h +7 -7
@@ -115,21 +115,21 @@enum unw_nat_type {UNW_NAT_NONE ,/* NaT not represented */ UNW_NAT_VAL ,/* NaT represented by NaT value (fp reg) */ -UNW_NAT_PRI_UNAT ,/* NaT value is in unat word at offset OFF */ -UNW_NAT_SCRATCH ,/* NaT value is in scratch.pri_unat */ -UNW_NAT_STACKED /* NaT is in rnat */ +UNW_NAT_MEMSTK ,/* NaT value is in unat word at offset OFF */ +UNW_NAT_REGSTK /* NaT is in rnat */ };enum unw_insn_opcode {UNW_INSN_ADD ,/* s[dst] += val */ +UNW_INSN_ADD_PSP ,/* s[dst] = (s.psp + val) */ +UNW_INSN_ADD_SP ,/* s[dst] = (s.sp + val) */ UNW_INSN_MOVE ,/* s[dst] = s[val] */ UNW_INSN_MOVE2 ,/* s[dst] = s[val]; s[dst+1] = s[val+1] */ UNW_INSN_MOVE_STACKED ,/* s[dst] = ia64_rse_skip(*s.bsp, val) */ -UNW_INSN_LOAD_PSPREL ,/* s[dst] = *(*s.psp + 8*val) */ -UNW_INSN_LOAD_SPREL ,/* s[dst] = *(*s.sp + 8*val) */ -UNW_INSN_SETNAT_PRI_UNAT ,/* s[dst+1].nat.type = PRI_UNAT; +UNW_INSN_SETNAT_MEMSTK ,/* s[dst+1].nat.type = MEMSTK; s[dst+1].nat.off = *s.pri_unat - s[dst] */ -UNW_INSN_SETNAT_TYPE /* s[dst+1].nat.type = val */ +UNW_INSN_SETNAT_TYPE ,/* s[dst+1].nat.type = val */ +UNW_INSN_LOAD /* s[dst] = *s[val] */ };struct unw_insn {
arch/ia64/lib/Makefile +20 -6
@@ -7,7 +7,8 @@ L_TARGET = lib.a -L_OBJS = __divdi3.o __udivdi3.o __moddi3.o __umoddi3.o \ +L_OBJS = __divsi3.o __udivsi3.o __modsi3.o __umodsi3.o \ + __divdi3.o __udivdi3.o __moddi3.o __umoddi3.o \ checksum.o clear_page.o csum_partial_copy.o copy_page.o \ copy_user.o clear_user.o strncpy_from_user.o strlen_user.o strnlen_user.o \ flush.o do_csum.o
@@ -18,20 +19,33 @@ LX_OBJS = io.o -IGNORE_FLAGS_OBJS = __divdi3.o __udivdi3.o __moddi3.o __umoddi3.o +IGNORE_FLAGS_OBJS = __divsi3.o __udivsi3.o __modsi3.o __umodsi3.o \ + __divdi3.o __udivdi3.o __moddi3.o __umoddi3.o $(L_TARGET): -__divdi3.o: idiv.S +__divdi3.o: idiv64.S $(CC) $(AFLAGS) $(AFLAGS_KERNEL) -c -o $@ $< -__udivdi3.o: idiv.S +__udivdi3.o: idiv64.S $(CC) $(AFLAGS) $(AFLAGS_KERNEL) -c -DUNSIGNED -c -o $@ $< -__moddi3.o: idiv.S +__moddi3.o: idiv64.S $(CC) $(AFLAGS) $(AFLAGS_KERNEL) -c -DMODULO -c -o $@ $< -__umoddi3.o: idiv.S +__umoddi3.o: idiv64.S + $(CC) $(AFLAGS) $(AFLAGS_KERNEL) -c -DMODULO -DUNSIGNED -c -o $@ $< + +__divsi3.o: idiv32.S + $(CC) $(AFLAGS) $(AFLAGS_KERNEL) -c -o $@ $< + +__udivsi3.o: idiv32.S + $(CC) $(AFLAGS) $(AFLAGS_KERNEL) -c -DUNSIGNED -c -o $@ $< + +__modsi3.o: idiv32.S + $(CC) $(AFLAGS) $(AFLAGS_KERNEL) -c -DMODULO -c -o $@ $< + +__umodsi3.o: idiv32.S $(CC) $(AFLAGS) $(AFLAGS_KERNEL) -c -DMODULO -DUNSIGNED -c -o $@ $< include $(TOPDIR)/Rules.make
arch/ia64/lib/idiv.S +0 -98
98 lines not on this page · raw message
arch/ia64/lib/idiv32.S +83 -0
83 lines not on this page · raw message
arch/ia64/lib/idiv64.S +92 -0
92 lines not on this page · raw message
arch/ia64/mm/init.c +4 -9
@@ -357,6 +357,7 @@panic ("mm/init: overlap between virtually mapped linear page table and " "mapped kernel space!" ); pta =POW2 (61 ) -POW2 (impl_va_msb); +#ifndef CONFIG_DISABLE_VHPT /* * Set the (virtually mapped linear) page table address. Bit * 8 selects between the short and long format, bits 2-7 the
@@ -364,6 +365,9 @@* enabled. */ ia64_set_pta (pta | (0 <<8 ) | ((3 *(PAGE_SHIFT -3 )+3 )<<2 ) |1 ); +#else +ia64_set_pta (pta | (0 <<8 ) | ((3 *(PAGE_SHIFT -3 )+3 )<<2 ) |0 ); +#endif }/*
@@ -444,15 +448,6 @@/* install the gate page in the global page table: */ put_gate_page (virt_to_page (__start_gate_section),GATE_ADDR ); - -#ifndef CONFIG_IA64_SOFTSDV_HACKS -/* -* (Some) SoftSDVs seem to have a problem with this call. -* Since it's mostly a performance optimization, just don't do -* it for now... --davidm 99/12/6 -*/ -efi_enter_virtual_mode (); -#endif #ifdef CONFIG_IA32_SUPPORT ia32_gdt_init ();
drivers/char/vt.c +2 -2
@@ -62,7 +62,7 @@*/ unsigned char keyboard_type =KB_101 ; -#if !defined(__alpha__) && !defined(__mips__) && !defined(__arm__) && !defined(__sh__) +#if !defined(__alpha__) && !defined(__ia64__) && !defined(__mips__) && !defined(__arm__) && !defined(__sh__)asmlinkage long sys_ioperm (unsigned long from,unsigned long num,int on);#endif
@@ -472,7 +472,7 @@ ucval = keyboard_type; goto setchar; -#if !defined(__alpha__) && !defined(__mips__) && !defined(__arm__) && !defined(__sh__) +#if !defined(__alpha__) && !defined(__ia64__) && !defined(__mips__) && !defined(__arm__) && !defined(__sh__)/* * These cannot be implemented on any machine that implements * ioperm() in user level (such as Alpha PCs).
drivers/scsi/Makefile +1 -1
@@ -123,7 +123,7 @@ scsicam.o scsi_proc.o scsi_error.o \ scsi_obsolete.o scsi_queue.o scsi_lib.o \ scsi_merge.o scsi_dma.o scsi_scan.o \ - + sr_mod-objs := sr.o sr_ioctl.o sr_vendor.o initio-objs := ini9100u.o i91uscsi.o a100u2w-objs := inia100.o i60uscsi.o
drivers/scsi/qla1280.c +14 -5
@@ -19,6 +19,10 @@/**************************************************************************** Revision History: +Rev 3.17 Beta September 18, 2000 BN Qlogic +- Removed warnings for 32 bit 2.4.x compiles +- Corrected declared size for request and response +DMA addresses that are kept in each ha Rev. 3.16 Beta August 25, 2000 BN Qlogic - Corrected 64 bit addressing issue on IA-64 where the upper 32 bits were not properly
@@ -98,7 +102,7 @@#include <linux/module.h> #endif -#define QLA1280_VERSION "3.16 Beta" +#define QLA1280_VERSION "3.17 Beta"#include <stdarg.h> #include <asm/io.h>
@@ -175,8 +179,13 @@#define QLA1280_DELAY (sec) mdelay(sec * 1000)/* 3.16 */ +#if BITS_PER_LONG >32 #define pci_dma_lo32 (a) (a & 0xffffffff)#define pci_dma_hi32 (a) ((a >> 32) & 0xffffffff) +#else +#define pci_dma_lo32 (a) (a & 0xffffffff) +#define pci_dma_hi32 (a) 0 +#endif #define VIRT_TO_BUS (a) virt_to_bus(((void *)a))
@@ -2789,7 +2798,7 @@uint8_t *sp;uint8_t *tbuf;#if BITS_PER_LONG >32 -u_long p_tbuf; +dma_addr_t p_tbuf;#else uint32_t p_tbuf;#endif
@@ -4170,12 +4179,12 @@#endif } } -#ifdef QL_DEBUG_LEVEL_5 - else /* No data transfer */ +else /* No data transfer */ { *dword_ptr++ = (uint32_t )0 ; *dword_ptr++ = (uint32_t )0 ; *dword_ptr = (uint32_t )0 ; +#ifdef QL_DEBUG_LEVEL_5 qla1280_print ("qla1280_64bit_start_scsi: No data, command packet data - c" );qla1280_print (" b " );
@@ -4186,8 +4195,8 @@qla1280_output_number ((uint32_t )SCSI_LUN_32 (cmd),10 );qla1280_print ("\n\r" );qla1280_dump_buffer ((caddr_t )pkt,REQUEST_ENTRY_SIZE ); - }#endif + }/* Adjust ring index. */ ha->req_ring_index++;if (ha->req_ring_index =REQUEST_ENTRY_CNT )
drivers/scsi/qla1280.h +14 -1
@@ -1439,22 +1439,35 @@request_t req[REQUEST_ENTRY_CNT +1 ];response_t res[RESPONSE_ENTRY_CNT +1 ]; +#if BITS_PER_LONG >32 +dma_addr_t request_dma;/* Physical Address */ +#else uint32_t request_dma;/* Physical address. */ +#endif request_t *request_ring;/* Base virtual address */ request_t *request_ring_ptr;/* Current address. */ uint16_t req_ring_index;/* Current index. */ uint16_t req_q_cnt;/* Number of available entries. */ +#if BITS_PER_LONG >32 +dma_addr_t response_dma;/* Physical address. */ +#else uint32_t response_dma;/* Physical address. */ +#endif response_t *response_ring;/* Base virtual address */ response_t *response_ring_ptr;/* Current address. */ uint16_t rsp_ring_index;/* Current index. */ #if QL1280_TARGET_MODE_SUPPORT /* Target buffer and sense data. */ +#if BITS_PER_LONG >32 +dma_addr_t tbuf_dma;/* Physical address. */ +dma_addr_t tsense_dma;/* Physical address. */ +#else uint32_t tbuf_dma;/* Physical address. */ -tgt_t *tbuf;uint32_t tsense_dma;/* Physical address. */ +#endif +tgt_t *tbuf;uint8_t *tsense;#endif
drivers/scsi/simscsi.c +5 -0
@@ -357,3 +357,8 @@ }return 0 ; } + + +static Scsi_Host_Template driver_template =SIMSCSI ; + +#include "scsi_module.c"
include/asm-ia64/acpikcfg.h +3 -5
@@ -7,12 +7,10 @@*/ -typedef u32 ACPI_STATUS ;/* from actypes.h */ +u32 __init acpi_cf_init (void * rsdp); +u32 __init acpi_cf_terminate (void ); -ACPI_STATUS __init acpi_cf_init (void * rsdp); -ACPI_STATUS __init acpi_cf_terminate (void ); - -ACPI_STATUS __init +u32 __init acpi_cf_get_pci_vectors (struct pci_vector_struct **vectors, int *num_pci_vectors
include/asm-ia64/atomic.h +0 -7
@@ -17,13 +17,6 @@#include <asm/system.h> /* -* Make sure gcc doesn't try to be clever and move things around -* on us. We need to use _exactly_ the address the user gave us, -* not some alias that contains the same information. -*/ -#define __atomic_fool_gcc (x) (*(volatile struct { int a[100]; } *)x) - -/* * On IA-64, counter must always be volatile to ensure that that the * memory accesses are ordered. */
include/asm-ia64/bitops.h +15 -10
@@ -20,7 +20,7 @@* bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1). */ -extern __inline__void +static __inline__void set_bit (int nr,volatile void *addr) {__u32 bit, old, new;
@@ -36,7 +36,12 @@ }while (cmpxchg_acq (m, old, new) != old); } -extern __inline__void +/* +* clear_bit() doesn't provide any barrier for the compiler. +*/ +#define smp_mb__before_clear_bit () smp_mb() +#define smp_mb__after_clear_bit () smp_mb() +static __inline__void clear_bit (int nr,volatile void *addr) {__u32 mask, old, new;
@@ -52,7 +57,7 @@ }while (cmpxchg_acq (m, old, new) != old); } -extern __inline__void +static __inline__void change_bit (int nr,volatile void *addr) {__u32 bit, old, new;
@@ -68,7 +73,7 @@ }while (cmpxchg_acq (m, old, new) != old); } -extern __inline__int +static __inline__int test_and_set_bit (int nr,volatile void *addr) {__u32 bit, old, new;
@@ -85,7 +90,7 @@return (old & bit) !=0 ; } -extern __inline__int +static __inline__int test_and_clear_bit (int nr,volatile void *addr) {__u32 mask, old, new;
@@ -102,7 +107,7 @@return (old & ~mask) !=0 ; } -extern __inline__int +static __inline__int test_and_change_bit (int nr,volatile void *addr) {__u32 bit, old, new;
@@ -119,7 +124,7 @@return (old & bit) !=0 ; } -extern __inline__int +static __inline__int test_bit (int nr,volatile void *addr) {return 1 & (((const volatile __u32 *) addr)[nr >>5 ] >> (nr &31 ));
@@ -129,7 +134,7 @@* ffz = Find First Zero in word. Undefined if no zero exists, * so code should check against ~0UL first.. */ -extern inline unsigned long +static inline unsigned long ffz (unsigned long x) {unsigned long result;
@@ -164,7 +169,7 @@* hweightN: returns the hamming weight (i.e. the number * of bits set) of a N-bit word */ -extern __inline__unsigned long +static __inline__unsigned long hweight64 (unsigned long x) {unsigned long result;
@@ -181,7 +186,7 @@/* * Find next zero bit in a bitmap reasonably efficiently.. */ -extern inline int +static inline int find_next_zero_bit (void *addr,unsigned long size,unsigned long offset) {unsigned long *p = ((unsigned long *) addr) + (offset >>6 );
include/asm-ia64/delay.h +7 -7
@@ -18,13 +18,13 @@#include <asm/processor.h> -extern __inline__void +static __inline__void ia64_set_itm (unsigned long val) { __asm__ __volatile__("mov cr.itm=%0;; srlz.d;;" ::"r" (val) :"memory" ); } -extern __inline__unsigned long +static __inline__unsigned long ia64_get_itm (void ) {unsigned long result;
@@ -33,7 +33,7 @@return result; } -extern __inline__void +static __inline__void ia64_set_itv (unsigned char vector,unsigned char masked) {if (masked >1 )
@@ -43,13 +43,13 @@ :: "r"((masked << 16) | vector) : "memory"); } -extern __inline__void +static __inline__void ia64_set_itc (unsigned long val) { __asm__ __volatile__("mov ar.itc=%0;; srlz.d;;" ::"r" (val) :"memory" ); } -extern __inline__unsigned long +static __inline__unsigned long ia64_get_itc (void ) {unsigned long result;
@@ -58,7 +58,7 @@return result; } -extern __inline__void +static __inline__void __delay (unsigned long loops) {unsigned long saved_ar_lc;
@@ -72,7 +72,7 @@ __asm__ __volatile__("mov ar.lc=%0" ::"r" (saved_ar_lc)); } -extern __inline__void +static __inline__void udelay (unsigned long usecs) {#ifdef CONFIG_IA64_SOFTSDV_HACKS
include/asm-ia64/efi.h +1 -1
@@ -219,7 +219,7 @@efi_reset_system_t *reset_system; } efi; -extern inline int +static inline int efi_guidcmp (efi_guid_t left,efi_guid_t right) {return memcmp (&left, &right,sizeof (efi_guid_t));
include/asm-ia64/io.h +22 -22
169 lines not on this page · raw message
include/asm-ia64/mmu_context.h +6 -6
@@ -57,7 +57,7 @@ { } -extern inline unsigned long +static inline unsigned long ia64_rid (unsigned long context,unsigned long region_addr) {# ifdef CONFIG_IA64_TLB_CHECKS_REGION_NUMBER
@@ -67,7 +67,7 @@# endif } -extern inline void +static inline void get_new_mmu_context (struct mm_struct *mm) {spin_lock (&ia64_ctx.lock);
@@ -80,7 +80,7 @@ } -extern inline void +static inline void get_mmu_context (struct mm_struct *mm) {/* check if our ASN is of an older generation and thus invalid: */
@@ -88,20 +88,20 @@get_new_mmu_context (mm); } -extern inline int +static inline int init_new_context (struct task_struct *p,struct mm_struct *mm) { mm->context =0 ;return 0 ; } -extern inline void +static inline void destroy_context (struct mm_struct *mm) {/* Nothing to do. */ } -extern inline void +static inline void reload_context (struct mm_struct *mm) {unsigned long rid;
include/asm-ia64/module.h +3 -1
@@ -76,7 +76,9 @@* Pointers are reasonable, add the module unwind table */ archdata->unw_table =unw_add_unwind_table (mod->name, archdata->segment_base, - archdata->gp, archdata->unw_start, archdata->unw_end); + (unsigned long ) archdata->gp, + (unsigned long ) archdata->unw_start, + (unsigned long ) archdata->unw_end);#endif /* CONFIG_IA64_NEW_UNWIND */ return 0 ; }
include/asm-ia64/offsets.h +4 -4
@@ -11,7 +11,7 @@#define PT_PTRACED_BIT 0#define PT_TRACESYS_BIT 1 -#define IA64_TASK_SIZE 2928/* 0xb70 */ +#define IA64_TASK_SIZE 3328/* 0xd00 */ #define IA64_PT_REGS_SIZE 400/* 0x190 */ #define IA64_SWITCH_STACK_SIZE 560/* 0x230 */ #define IA64_SIGINFO_SIZE 128/* 0x80 */
@@ -21,9 +21,9 @@#define IA64_TASK_SIGPENDING_OFFSET 16/* 0x10 */ #define IA64_TASK_NEED_RESCHED_OFFSET 40/* 0x28 */ #define IA64_TASK_PROCESSOR_OFFSET 100/* 0x64 */ -#define IA64_TASK_THREAD_OFFSET 928/* 0x3a0 */ -#define IA64_TASK_THREAD_KSP_OFFSET 928/* 0x3a0 */ -#define IA64_TASK_THREAD_SIGMASK_OFFSET 2784/* 0xae0 */ +#define IA64_TASK_THREAD_OFFSET 1424/* 0x590 */ +#define IA64_TASK_THREAD_KSP_OFFSET 1424/* 0x590 */ +#define IA64_TASK_THREAD_SIGMASK_OFFSET 3184/* 0xc70 */ #define IA64_TASK_PID_OFFSET 188/* 0xbc */ #define IA64_TASK_MM_OFFSET 88/* 0x58 */ #define IA64_PT_REGS_CR_IPSR_OFFSET 0/* 0x0 */
include/asm-ia64/page.h +3 -4
@@ -102,15 +102,13 @@#ifdef CONFIG_IA64_GENERIC # include <asm/machvec.h> # define virt_to_page (kaddr) (mem_map + platform_map_nr(kaddr)) -#elif defined (CONFIG_IA64_SN_SN1_SIM ) +#elif defined (CONFIG_IA64_SN_SN1 )# define virt_to_page (kaddr) (mem_map + MAP_NR_SN1(kaddr))#else # define virt_to_page (kaddr) (mem_map + MAP_NR_DENSE(kaddr))#endif #define VALID_PAGE (page) ((page - mem_map) < max_mapnr) -# endif /* __KERNEL__ */ - typedef union ia64_va { struct { unsigned long off : 61; /* intra-region offset */
@@ -138,7 +136,7 @@#define BUG () do { printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); *(int *)0=0; } while (0)#define PAGE_BUG (page) do { BUG(); } while (0) -extern __inline__int +static __inline__int get_order (unsigned long size) {double d = size -1 ;
@@ -151,6 +149,7 @@return order; } +# endif /* __KERNEL__ */ #endif /* !ASSEMBLY */ #define PAGE_OFFSET 0xe000000000000000
include/asm-ia64/pal.h +45 -45
279 lines not on this page · raw message
include/asm-ia64/processor.h +50 -46
96 lines not on this page · raw message
include/asm-ia64/sal.h +28 -16
44 lines not on this page · raw message
include/asm-ia64/unwind.h +67 -28
95 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.
Re: [Linux-ia64] kernel update (relative to v2.4.0-test9)
In reply to David MosbergerQuoted 5 lines · David Mosberger
The latest IA-64 Linux kernel diff is now available at:
ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/
in file linux-2.4.0-test9-ia64-001004.diff.
The patch contains a deletion for unistd.h~ which is not in base 2.4.0-test9. It also deletes a lot of acpi files, which may cause problems if you try to compile ix86 from a source tree with ia64-001004 applied, i386 config.in does not have CONFIG_ACPI_KERNEL_CONFIG. Any reason for these deletions and other acpi changes?
drivers/acpi/table.cdrivers/acpi/tables/Makefiledrivers/acpi/resources/Makefiledrivers/acpi/parser/psfind.cdrivers/acpi/parser/Makefiledrivers/acpi/namespace/nsdump.cdrivers/acpi/namespace/Makefiledrivers/acpi/interpreter/amdump.cdrivers/acpi/interpreter/Makefiledrivers/acpi/include/actbl.hdrivers/acpi/include/acresrc.hdrivers/acpi/include/acparser.hdrivers/acpi/include/acoutput.hdrivers/acpi/include/acnamesp.hdrivers/acpi/include/acmacros.hdrivers/acpi/include/aclocal.hdrivers/acpi/include/acinterp.hdrivers/acpi/include/achware.hdrivers/acpi/include/acglobal.hdrivers/acpi/include/acevents.hdrivers/acpi/include/acdispat.hdrivers/acpi/include/acdebug.hdrivers/acpi/include/acconfig.hdrivers/acpi/include/accommon.hdrivers/acpi/hardware/Makefiledrivers/acpi/events/Makefiledrivers/acpi/dispatcher/Makefiledrivers/acpi/common/cmclib.cdrivers/acpi/common/Makefile
Re: [Linux-ia64] kernel update (relative to v2.4.0-test9)
In reply to David MosbergerQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Keith Owens
Keith> The patch contains a deletion for unistd.h~ which is not in Keith> base 2.4.0-test9.
My fault, just ignore it (it was late, what can I say).
Keith> It also deletes a lot of acpi files, which may cause problems Keith> if you try to compile ix86 from a source tree with Keith> ia64-001004 applied, i386 config.in does not have Keith> CONFIG_ACPI_KERNEL_CONFIG. Any reason for these deletions Keith> and other acpi changes?
The ACPI code in the x86 tree is currently not compatible with what's in the IA-64 tree. So the IA-64 patch restores the ACPI files from the IA-64 tree. I don't know why or how this came to be and Intel is looking into it. (Yeah, it's a major pain...)
--david
[Linux-ia64] kernel update (relative to 2.4.0-test9)
In reply to David MosbergerHere is a quick kernel update. I anticipate another update shortly after Linus releases test10. Thus, this patch hasn't received as much testing as I usually do. The kernel is known to work fine on 2P Big Sur and a slightly earlier version also worked fine on Lion and the simulator. As usual, YMMV.
Summary of changes:
- Asit & Goutham: fixed IOSAPIC support to work correctly when irq lines are shared by PCI devices
- Asit: fix to unaligned access handler
- Goutham: workaround for lost IPI problem
- Don: IA-32 fixes & updates, in particular the beginnings of DRM support
- Takayoshi: early-printk fixes to kernel startup code
- Jun: optimized copy_user() for case where pointers are not co-aligned
- Johannes: add VM_NONCACHED and VM_WRITECOMBINE for /dev/mem
- Christophe: fixed unaligned accesses in Tulip (21140) NIC
- BJ: update qla1280 driver to v3.19
- Intel: huge ACPI update (it's not in the diff below; go get the full patch to get this part)
- Stephane: many performance related updates & fixes; in particular, the API is now entirely perfmonctl() based (no more ptrace() hacks needed)
- drop platform_register_iosapic()---it's no longer needed
- add workaround for potential ITC discontiguity
- "backported" ftruncate() fix that caused kernel crash with certain filesystem stress tests
- memcpy: tuned it some more
- remove off workaround for unsorted unwind tables---it's no longer needed with the latest toolchain (thanks to Rich!)
- separated IOSAPIC support from DIG, added some documentation, and restructured the code to make it (hopefully) more readable; also removed all (hard) IOSAPIC dependencies from acpi code
- dropped BAD_ACPI_TABLE workaround; if you're still running old Lion firmware, this might bite you; if so, please upgrade the firmware (I don't think very many systems were shipped with the broken firmware, so I expect few if any people to be affected by this)
- added AT_CLKTCK support for ELF binaries
I hope I didn't miss anything. For the full patch, see:
ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/
as usual.
--david
arch/ia64/dig/dig_irq.c +10 -0
@@ -0,0 +1,10 @@ +void +dig_irq_init (void ) +{ +/* +* Disable the compatibility mode interrupts (8259 style), needs IN/OUT support +* enabled. +*/ +outb (0xff ,0xA1 ); +outb (0xff ,0x21 ); +}
arch/ia64/dig/iosapic.c +0 -409
409 lines not on this page · raw message
arch/ia64/dig/setup.c +11 -0
@@ -84,3 +84,14 @@ screen_info.orig_video_isVGA =1 ;/* XXX fake */ screen_info.orig_video_ega_bx =3 ;/* XXX fake */ } + +void +dig_irq_init (void ) +{ +/* +* Disable the compatibility mode interrupts (8259 style), needs IN/OUT support +* enabled. +*/ +outb (0xff ,0xA1 ); +outb (0xff ,0x21 ); +}
arch/ia64/ia32/binfmt_elf32.c +10 -0
@@ -9,6 +9,7 @@#include <linux/types.h> +#include <asm/param.h> #include <asm/signal.h> #include <asm/ia32.h>
@@ -31,6 +32,9 @@# define CONFIG_BINFMT_ELF_MODULE CONFIG_BINFMT_ELF32_MODULE#endif +#undef CLOCKS_PER_SEC +#define CLOCKS_PER_SEC IA32_CLOCKS_PER_SEC +extern void ia64_elf32_init (struct pt_regs *regs);extern void put_dirty_page (struct task_struct * tsk,struct page *page,unsigned long address);
@@ -239,6 +243,12 @@if (eppnt->p_memsz >= (1UL <<32 ) || addr > (1UL <<32 ) - eppnt->p_memsz)return -EINVAL ; +/* +* Make sure the elf interpreter doesn't get loaded at location 0 +* so that NULL pointers correctly cause segfaults. +*/ +if (addr =0 ) + addr +=PAGE_SIZE ;#if 1 set_brk (ia32_mm_addr (addr), addr + eppnt->p_memsz);memset ((char *) addr + eppnt->p_filesz,0 , eppnt->p_memsz - eppnt->p_filesz);
arch/ia64/ia32/ia32_entry.S +33 -1
@@ -291,11 +291,43 @@ data8 sys_getcwd data8 sys_capget data8 sys_capset /* 185 */ - data8 sys_sigaltstack + data8 sys32_sigaltstack data8 sys_sendfile data8 sys32_ni_syscall /* streams1 */ data8 sys32_ni_syscall /* streams2 */ data8 sys32_vfork /* 190 */ + data8 sys_ni_syscall + data8 sys_ni_syscall + data8 sys_ni_syscall + data8 sys_ni_syscall + data8 sys_ni_syscall /* 195 */ + data8 sys_ni_syscall + data8 sys_ni_syscall + data8 sys_ni_syscall + data8 sys_ni_syscall + data8 sys_ni_syscall /* 200 */ + data8 sys_ni_syscall + data8 sys_ni_syscall + data8 sys_ni_syscall + data8 sys_ni_syscall + data8 sys_ni_syscall /* 205 */ + data8 sys_ni_syscall + data8 sys_ni_syscall + data8 sys_ni_syscall + data8 sys_ni_syscall + data8 sys_ni_syscall /* 210 */ + data8 sys_ni_syscall + data8 sys_ni_syscall + data8 sys_ni_syscall + data8 sys_ni_syscall + data8 sys_ni_syscall /* 215 */ + data8 sys_ni_syscall + data8 sys_ni_syscall + data8 sys_ni_syscall + data8 sys_ni_syscall + data8 sys_ni_syscall /* 220 */ + data8 sys_ni_syscall + data8 sys_ni_syscall /* * CAUTION: If any system calls are added beyond this point * then the check in `arch/ia64/kernel/ivt.S' will have
arch/ia64/ia32/ia32_ioctl.c +143 -66
224 lines not on this page · raw message
arch/ia64/ia32/ia32_traps.c +1 -1
@@ -119,6 +119,6 @@default :return -1 ; } -force_sig_info (SIGTRAP , &siginfo, current); +force_sig_info (siginfo.si_signo, &siginfo, current);return 0 ; }
arch/ia64/ia32/sys_ia32.c +47 -13
98 lines not on this page · raw message
arch/ia64/kernel/Makefile +3 -2
@@ -13,7 +13,8 @@ machvec.o pal.o pci-dma.o process.o perfmon.o ptrace.o sal.o semaphore.o setup.o \ signal.o sys_ia64.o traps.o time.o unaligned.o unwind.o -obj-$(CONFIG_IA64_GENERIC) += machvec.o +obj-$(CONFIG_IA64_GENERIC) += machvec.o iosapic.o +obj-$(CONFIG_IA64_DIG) += iosapic.o obj-$(CONFIG_IA64_PALINFO) += palinfo.o obj-$(CONFIG_PCI) += pci.o obj-$(CONFIG_SMP) += smp.o smpboot.o
@@ -21,7 +22,7 @@ obj-$(CONFIG_IA64_BRL_EMU) += brl_emu.o O_TARGET := kernel.o -O_OBJS := $(obj-y) +O_OBJS := $(obj-y) OX_OBJS := ia64_ksyms.o clean::
arch/ia64/kernel/acpi.c +37 -84
207 lines not on this page · raw message
arch/ia64/kernel/efi.c +1 -1
@@ -363,7 +363,7 @@#if EFI_DEBUG /* print EFI memory map: */ { -efi_memory_desc_t *md = p; +efi_memory_desc_t *md;void *p;for (i =0 , p = efi_map_start; p < efi_map_end; ++i, p += efi_desc_size) {
arch/ia64/kernel/head.S +6 -5
@@ -74,8 +74,8 @@ ;; #ifdef CONFIG_IA64_EARLY_PRINTK - mov r2=6 - mov r3=(8<<8) | (28<<2) + mov r3=(6<<8) | (28<<2) + movl r2=6<<61 ;; mov rr[r2]=r3 ;;
@@ -181,7 +181,8 @@ GLOBAL_ENTRY(ia64_load_debug_regs) alloc r16=ar.pfs,1,0,0,0 -#if !(defined(CONFIG_ITANIUM_ASTEP_SPECIFIC) || defined(CONFIG_ITANIUM_BSTEP_SPECIFIC)) +#if !(defined(CONFIG_ITANIUM_ASTEP_SPECIFIC) \ + || defined(CONFIG_ITANIUM_B0_SPECIFIC) || defined(CONFIG_ITANIUM_B1_SPECIFIC)) lfetch.nta [in0] #endif mov r20=ar.lc // preserve ar.lc
@@ -754,7 +755,7 @@ mov tmp=ar.itc (p15) br.cond.sptk .wait ;; - ld1 tmp=[r31] + ld4 tmp=[r31] ;; cmp.ne p15,p0=tmp,r0 mov tmp=ar.itc
@@ -764,7 +765,7 @@ mov tmp=1 ;; IA64_SEMFIX_INSN - cmpxchg1.acq tmp=[r31],tmp,ar.ccv + cmpxchg4.acq tmp=[r31],tmp,ar.ccv ;; cmp.eq p15,p0=tmp,r0
arch/ia64/kernel/iosapic.c +494 -0
494 lines not on this page · raw message
arch/ia64/kernel/irq_ia64.c +18 -5
@@ -7,6 +7,9 @@* * 6/10/99: Updated to bring in sync with x86 version to facilitate * support for SMP and different interrupt controllers. +* +* 09/15/00 Goutham Rao <[email protected]> Implemented pci_irq_to_vector +* PCI to vector allocation routine. */ #include <linux/config.h>
@@ -43,15 +46,25 @@unsigned long ipi_base_addr = (__IA64_UNCACHED_OFFSET |IPI_DEFAULT_BASE_ADDR );/* -* Legacy IRQ to IA-64 vector translation table. Any vector not in -* this table maps to itself (ie: irq 0x30 => IA64 vector 0x30) +* Legacy IRQ to IA-64 vector translation table. */ __u8 isa_irq_to_vector_map[16 ] = {/* 8259 IRQ translation, first 16 entries */ -0x60 ,0x50 ,0x10 ,0x51 ,0x52 ,0x53 ,0x43 ,0x54 , -0x55 ,0x56 ,0x57 ,0x58 ,0x59 ,0x5a ,0x40 ,0x41 +0x2f ,0x20 ,0x2e ,0x2d ,0x2c ,0x2b ,0x2a ,0x29 , +0x28 ,0x27 ,0x26 ,0x25 ,0x24 ,0x23 ,0x22 ,0x21 }; +int +ia64_alloc_irq (void ) +{ +static int next_irq =FIRST_DEVICE_IRQ ; + +if (next_irq >LAST_DEVICE_IRQ ) +/* XXX could look for sharable vectors instead of panic'ing... */ +panic ("ia64_alloc_irq: out of interrupt vectors!" ); +return next_irq++; +} +#ifdef CONFIG_ITANIUM_A1_SPECIFIC int usbfix;
@@ -217,7 +230,7 @@ }void -ipi_send (int cpu,int vector,int delivery_mode,int redirect) +ia64_send_ipi (int cpu,int vector,int delivery_mode,int redirect) {unsigned long ipi_addr;unsigned long ipi_data;
arch/ia64/kernel/ivt.S +1 -1
@@ -924,7 +924,7 @@ alloc r15=ar.pfs,0,0,6,0 // must first in an insn group ;; ld4 r8=[r14],8 // r8 = EAX (syscall number) - mov r150 // sys_vfork - last implemented system call + mov r15"2 // sys_vfork - last implemented system call ;; cmp.leu.unc p6,p7=r8,r15 ld4 out1=[r14],8 // r9 = ecx
arch/ia64/kernel/mca.c +2 -1
@@ -19,6 +19,7 @@#include <linux/irq.h> #include <linux/smp_lock.h> +#include <asm/machvec.h> #include <asm/page.h> #include <asm/ptrace.h> #include <asm/system.h>
@@ -365,7 +366,7 @@void ia64_mca_wakeup (int cpu) { -ipi_send (cpu,IA64_MCA_WAKEUP_INT_VECTOR ,IA64_IPI_DM_INT ,0 ); +ia64_send_ipi (cpu,IA64_MCA_WAKEUP_INT_VECTOR ,IA64_IPI_DM_INT ,0 ); ia64_mc_info.imi_rendez_checkin[cpu] =IA64_MCA_RENDEZ_CHECKIN_NOTDONE ; }
arch/ia64/kernel/pci.c +4 -23
@@ -56,7 +56,8 @@/* Macro to build a PCI configuration address to be passed as a parameter to SAL. */ -#define PCI_CONFIG_ADDRESS (dev, where) (((u64) dev->bus->number << 16) | ((u64) (dev->devfn & 0xff) << 8) | (where & 0xff)) +#define PCI_CONFIG_ADDRESS (dev, where) \ + (((u64) dev->bus->number << 16) | ((u64) (dev->devfn & 0xff) << 8) | (where & 0xff))static int pci_conf_read_config_byte (struct pci_dev *dev,int where,u8 *value)
@@ -109,7 +110,6 @@return ia64_sal_pci_config_write (PCI_CONFIG_ADDRESS (dev, where),4 , value); } -static struct pci_ops pci_conf = { pci_conf_read_config_byte, pci_conf_read_config_word,
@@ -120,35 +120,18 @@ };/* -* Try to find PCI BIOS. This will always work for IA64. -*/ - -static struct pci_ops *__init -pci_find_bios (void ) -{ -return &pci_conf; -} - -/* * Initialization. Uses the SAL interface */ - -#define PCI_BUSES_TO_SCAN 255 -void __init pcibios_init (void ) { +# define PCI_BUSES_TO_SCAN 255struct pci_ops *ops =NULL ;int i; -if ((ops =pci_find_bios ()) =NULL ) { -printk ("PCI: No PCI bus detected\n" ); -return ; - } -printk ("PCI: Probing PCI hardware\n" );for (i =0 ; i <PCI_BUSES_TO_SCAN ; i++) -pci_scan_bus (i, ops,NULL ); +pci_scan_bus (i, &pci_conf,NULL );platform_pci_fixup ();return ; }
@@ -157,7 +140,6 @@* Called after each bus is probed, but before its children * are examined. */ -void __init pcibios_fixup_bus (struct pci_bus *b) {
@@ -207,7 +189,6 @@/* * PCI BIOS setup, always defaults to SAL interface */ -char *__init pcibios_setup (char *str) {
arch/ia64/kernel/perfmon.c +414 -109
679 lines not on this page · raw message
arch/ia64/kernel/process.c +11 -3
@@ -164,7 +164,7 @@ia64_save_debug_regs (&task->thread.dbr[0 ]);#ifdef CONFIG_PERFMON if ((task->thread.flags &IA64_THREAD_PM_VALID ) !=0 ) -ia64_save_pm_regs (&task->thread); +ia64_save_pm_regs (task);#endif if (IS_IA32_PROCESS (ia64_task_regs (task)))ia32_save_state (&task->thread);
@@ -177,7 +177,7 @@ia64_load_debug_regs (&task->thread.dbr[0 ]);#ifdef CONFIG_PERFMON if ((task->thread.flags &IA64_THREAD_PM_VALID ) !=0 ) -ia64_load_pm_regs (&task->thread); +ia64_load_pm_regs (task);#endif if (IS_IA32_PROCESS (ia64_task_regs (task)))ia32_load_state (&task->thread);
@@ -299,6 +299,14 @@# define THREAD_FLAGS_TO_SET 0 p->thread.flags = ((current->thread.flags & ~THREAD_FLAGS_TO_CLEAR ) |THREAD_FLAGS_TO_SET ); +#ifdef CONFIG_IA32_SUPPORT +/* +* If we're cloning an IA32 task then save the IA32 extra +* state from the current task to the new task +*/ +if (IS_IA32_PROCESS (ia64_task_regs (current))) +ia32_save_state (&p->thread); +#endif return 0 ; }
@@ -554,7 +562,7 @@* we garantee no race. this call we also stop * monitoring */ -ia64_save_pm_regs (¤t->thread); +ia64_save_pm_regs (current);/* * make sure that switch_to() will not save context again */
arch/ia64/kernel/ptrace.c +14 -61
103 lines not on this page · raw message
arch/ia64/kernel/smp.c +20 -2
@@ -11,6 +11,8 @@* 00/03/31 Rohit Seth <[email protected]> Fixes for Bootstrap Processor & cpu_online_map * now gets done here (instead of setup.c) * 99/10/05 davidm Update to bring it in sync with new command-line processing scheme. +* 10/13/00 Goutham Rao <[email protected]> Updated smp_call_function and +* smp_call_function_single to resend IPI on timeouts */ #define __KERNEL_SYSCALLS__
@@ -30,6 +32,7 @@#include <asm/current.h> #include <asm/delay.h> #include <asm/efi.h> +#include <asm/machvec.h> #include <asm/io.h> #include <asm/irq.h>
@@ -276,7 +279,7 @@return ;set_bit (op, &ipi_op[dest_cpu]); -ipi_send (dest_cpu,IPI_IRQ ,IA64_IPI_DM_INT ,0 ); +ia64_send_ipi (dest_cpu,IPI_IRQ ,IA64_IPI_DM_INT ,0 ); } static inline void
@@ -358,6 +361,7 @@if (pointer_lock (&smp_call_function_data, &data, retry))return -EBUSY ; +resend:/* Send a message to all other CPUs and wait for them to respond */ send_IPI_single (cpuid,IPI_CALL_FUNC );
@@ -366,8 +370,12 @@while ((atomic_read (&data.unstarted_count) >0 ) &&time_before (jiffies, timeout))barrier ();if (atomic_read (&data.unstarted_count) >0 ) { +#if (defined(CONFIG_ITANIUM_ASTEP_SPECIFIC ) || defined(CONFIG_ITANIUM_BSTEP_SPECIFIC )) + goto resend; +#else smp_call_function_data =NULL ;return -ETIMEDOUT ; +#endif }if (wait)while (atomic_read (&data.unfinished_count) >0 )
@@ -411,13 +419,23 @@/* Send a message to all other CPUs and wait for them to respond */ send_IPI_allbutself (IPI_CALL_FUNC ); +retry:/* Wait for response */ timeout = jiffies +HZ ;while ((atomic_read (&data.unstarted_count) >0 ) &&time_before (jiffies, timeout))barrier ();if (atomic_read (&data.unstarted_count) >0 ) { +#if (defined(CONFIG_ITANIUM_ASTEP_SPECIFIC ) || defined(CONFIG_ITANIUM_BSTEP_SPECIFIC )) +int i; +for (i =0 ; i < smp_num_cpus; i++) { +if (i !=smp_processor_id ()) +ia64_send_ipi (i,IPI_IRQ ,IA64_IPI_DM_INT ,0 ); + } + goto retry; +#else smp_call_function_data =NULL ;return -ETIMEDOUT ; +#endif }if (wait)while (atomic_read (&data.unfinished_count) >0 )
@@ -569,7 +587,7 @@ cpu_now_booting = cpu;/* Kick the AP in the butt */ -ipi_send (cpu, ap_wakeup_vector,IA64_IPI_DM_INT ,0 ); +ia64_send_ipi (cpu, ap_wakeup_vector,IA64_IPI_DM_INT ,0 );/* wait up to 10s for the AP to start */ for (timeout =0 ; timeout <100000 ; timeout++) {
arch/ia64/kernel/traps.c +1 -1
@@ -544,7 +544,7 @@case 46 :printk ("Unexpected IA-32 intercept trap (Trap 46)\n" ); -printk (" iip - 0x%lx, ifa - 0x%lx, isr - 0x%lx\n" , regs->cr_iip, ifa, isr); +printk (" iip - 0x%lx, ifa - 0x%lx, isr - 0x%lx, iim - 0x%lx\n" , regs->cr_iip, ifa, isr, iim);force_sig (SIGSEGV , current);return ;
arch/ia64/kernel/unaligned.c +2 -1
@@ -572,7 +572,8 @@*/ if (regnum =0 ) { *val =0 ; - *nat =0 ; +if (nat) + *nat =0 ;return ; }
arch/ia64/kernel/unwind.c +1 -28
@@ -46,16 +46,6 @@#define MIN (a,b) ((a) < (b) ? (a) : (b))#define p5 5 -/* -* The unwind tables are supposed to be sorted, but the GNU toolchain -* currently fails to produce a sorted table in the presence of -* functions that go into sections other than .text. For example, the -* kernel likes to put initialization code into .text.init, which -* messes up the sort order. Hopefully, this will get fixed sometime -* soon. --davidm 00/05/23 -*/ -#define UNWIND_TABLE_SORT_BUG -#define UNW_LOG_CACHE_SIZE 7/* each unw_script is ~256 bytes in size */ #define UNW_CACHE_SIZE (1 << UNW_LOG_CACHE_SIZE)
@@ -63,7 +53,7 @@#define UNW_HASH_SIZE (1 << UNW_LOG_HASH_SIZE)#define UNW_DEBUG 0 -#define UNW_STATS 0/* WARNING: this disabled interrupts for long time-spans!! */ +#define UNW_STATS 1/* WARNING: this disabled interrupts for long time-spans!! */ #if UNW_DEBUG static long unw_debug_level =255 ;
@@ -1964,23 +1954,6 @@ {struct unw_table_entry *start = table_start, *end = table_end; -#ifdef UNWIND_TABLE_SORT_BUG - { -struct unw_table_entry *e1, *e2, tmp; - -/* stupid bubble sort... */ - -for (e1 = start; e1 < end; ++e1) { -for (e2 = e1 +1 ; e2 < end; ++e2) { -if (e2->start_offset < e1->start_offset) { - tmp = *e1; - *e1 = *e2; - *e2 = tmp; - } - } - } - } -#endif table->name = name; table->segment_base = segment_base; table->gp = gp;
arch/ia64/lib/copy_user.S +223 -1
254 lines not on this page · raw message
arch/ia64/lib/memcpy.S +35 -20
58 lines not on this page · raw message
include/asm-ia64/iosapic.h +28 -89
117 lines not on this page · raw message
include/asm-ia64/uaccess.h +23 -61
84 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.
[Linux-ia64] kernel update (relative to 2.4.0-test10)
In reply to David MosbergerThe patch at:
ftp://ftp.kernel.org/pub/linux/kernel/port/pub/linux/kernel/ports/ia64/linux-2.4.0-test10-ia64-001101.diff.gz
contains the latest IA-64 kernel diff relative to Linus' 2.4.0-test10. There are only few new things:
- bring IA-64 support in sync with 2.4.0-test10
- added EFI partition support by Matt (my apologies to Matt for missing his patch the last time round...)
- small fix to the PCI DMA support by Asit
- drop evil CONFIG_SKB_BELOW_4GB
- make simserial.c and simeth.c use ia64_alloc_irq() to obtain an available interrupt vector
That should be it. This kernel is known to build and work on Big Sur, Lion, and the HP Ski simulator.
Enjoy,
--david
Documentation/Configure.help +6 -0
@@ -11365,6 +11365,12 @@ Say Y here if you would like to be able to read the hard disk partition table format used by SGI machines. +Intel EFI GUID partition support +CONFIG_EFI_PARTITION + Say Y here if you would like to use hard disks under Linux which + were partitioned using EFI GPT. Presently only useful on the + IA-64 platform. + ADFS file system support (EXPERIMENTAL) CONFIG_ADFS_FS The Acorn Disc Filing System is the standard file system of the
Makefile +1 -1
@@ -206,7 +206,7 @@ $(LIBS) \ --end-group \ -o vmlinux - $(NM) vmlinux | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aU] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map + $(NM) vmlinux | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map symlinks: rm -f include/asm
arch/ia64/config.in +2 -2
@@ -45,14 +45,14 @@ bool ' Enable Itanium B-step specific code' CONFIG_ITANIUM_BSTEP_SPECIFIC if [ "$CONFIG_ITANIUM_BSTEP_SPECIFIC" = "y" ]; then bool ' Enable Itanium B0-step specific code' CONFIG_ITANIUM_B0_SPECIFIC + bool ' Enable Itanium B1-step specific code' CONFIG_ITANIUM_B1_SPECIFIC + bool ' Enable Itanium B2-step specific code' CONFIG_ITANIUM_B2_SPECIFIC fi bool ' Force interrupt redirection' CONFIG_IA64_HAVE_IRQREDIR bool ' Enable use of global TLB purge instruction (ptc.g)' CONFIG_ITANIUM_PTCG bool ' Enable SoftSDV hacks' CONFIG_IA64_SOFTSDV_HACKS bool ' Enable AzusA hacks' CONFIG_IA64_AZUSA_HACKS bool ' Enable IA-64 Machine Check Abort' CONFIG_IA64_MCA - bool ' Force socket buffers below 4GB?' CONFIG_SKB_BELOW_4GB - bool ' ACPI kernel configuration manager (EXPERIMENTAL)' CONFIG_ACPI_KERNEL_CONFIG if [ "$CONFIG_ACPI_KERNEL_CONFIG" = "y" ]; then define_bool CONFIG_PM y
arch/ia64/dig/dig_irq.c +0 -10
@@ -1,10 +0,0 @@ -void -dig_irq_init (void ) -{ -/* -* Disable the compatibility mode interrupts (8259 style), needs IN/OUT support -* enabled. -*/ -outb (0xff ,0xA1 ); -outb (0xff ,0x21 ); -}
arch/ia64/kernel/entry.S +1 -1
@@ -503,7 +503,7 @@ ;; ld4 r2=[r2] ;; - shl r2=r2,SMP_LOG_CACHE_BYTES // can't use shladd here... + shl r2=r2,SMP_CACHE_SHIFT // can't use shladd here... ;; add r3=r2,r3 #else
arch/ia64/kernel/pci-dma.c +6 -2
@@ -125,12 +125,16 @@BUG ();/* -* Find suitable number of IO TLB entries size that will fit this request and allocate a buffer -* from that IO TLB pool. +* Find suitable number of IO TLB entries size that will fit this request and +* allocate a buffer from that IO TLB pool. */ spin_lock_irqsave (&io_tlb_lock, flags); { wrap = index =ALIGN (io_tlb_index, stride); + +if (index >= io_tlb_nslabs) + index =0 ; + do { /* * If we find a slot that indicates we have 'nslots' number of
arch/ia64/kernel/pci.c +7 -8
@@ -123,10 +123,9 @@* Initialization. Uses the SAL interface */ void __init -pcibios_init (void ) +pcibios_init (void ) {# define PCI_BUSES_TO_SCAN 255 -struct pci_ops *ops =NULL ;int i;printk ("PCI: Probing PCI hardware\n" );
@@ -141,14 +140,14 @@* are examined. */ void __init -pcibios_fixup_bus (struct pci_bus *b) +pcibios_fixup_bus (struct pci_bus *b) {return ; }void __init -pcibios_update_resource (struct pci_dev *dev,struct resource *root, -struct resource *res,int resource) +pcibios_update_resource (struct pci_dev *dev,struct resource *root, +struct resource *res,int resource) {unsigned long where, size;u32 reg;
@@ -163,7 +162,7 @@ }void __init -pcibios_update_irq (struct pci_dev *dev,int irq) +pcibios_update_irq (struct pci_dev *dev,int irq) {pci_write_config_byte (dev,PCI_INTERRUPT_LINE , irq);
@@ -190,9 +189,9 @@* PCI BIOS setup, always defaults to SAL interface */ char *__init -pcibios_setup (char *str) +pcibios_setup (char *str) { - pci_probe =PCI_NO_CHECKS ; + pci_probe =PCI_NO_CHECKS ;return NULL ; }
arch/ia64/kernel/ptrace.c +0 -1
@@ -617,7 +617,6 @@struct switch_stack *sw;struct unw_frame_info info;struct pt_regs *pt; -unsigned long pmd_tmp; pt =ia64_task_regs (child); sw = (struct switch_stack *) (child->thread.ksp +16 );
arch/ia64/lib/memcpy.S +8 -1
@@ -29,7 +29,14 @@ mov in0=in1 ;; mov in1=r8 - ;; + // gas doesn't handle control flow across procedures, so it doesn't + // realize that a stop bit is needed before the "alloc" instruction + // below +{ + nop.m 0 + nop.f 0 + nop.i 0 +} ;; END(bcopy) // FALL THROUGH GLOBAL_ENTRY(memcpy)
drivers/char/simserial.c +7 -6
@@ -36,7 +36,6 @@#undef SIMSERIAL_DEBUG/* define this to get some debug information */ #define KEYBOARD_INTR 3/* must match with simulator! */ -#define SIMSERIAL_IRQ 0xee#define NR_PORTS 1/* only one port for now */ #define SERIAL_INLINE 1
@@ -78,7 +77,7 @@*/ static struct serial_state rs_table[NR_PORTS ]={/* UART CLK PORT IRQ FLAGS */ - {0 ,BASE_BAUD ,0x3F8 ,SIMSERIAL_IRQ ,STD_COM_FLAGS ,0 ,PORT_16550 }/* ttyS0 */ + {0 ,BASE_BAUD ,0x3F8 ,0 ,STD_COM_FLAGS ,0 ,PORT_16550 }/* ttyS0 */ };/*
@@ -1013,10 +1012,7 @@struct serial_state *state;show_serial_version (); - -/* connect the platform's keyboard interrupt to SIMSERIAL_IRQ */ -ia64_ssc_connect_irq (KEYBOARD_INTR ,SIMSERIAL_IRQ ); - +/* Initialize the tty_driver structure */ memset (&serial_driver,0 ,sizeof (struct tty_driver ));
@@ -1063,6 +1059,11 @@for (i =0 , state = rs_table; i <NR_PORTS ; i++,state++) {if (state->type =PORT_UNKNOWN )continue ; + +if (!state->irq) { + state->irq =ia64_alloc_irq (); +ia64_ssc_connect_irq (KEYBOARD_INTR , state->irq); + } printk(KERN_INFO "ttyS%02d at 0x%04lx (irq = %d) is a %s\n", state->line,
drivers/net/simeth.c +2 -6
@@ -27,7 +27,6 @@#include <asm/irq.h> -#define SIMETH_IRQ 0xed#define SIMETH_RECV_MAX 10/*
@@ -213,11 +212,8 @@return -ENOMEM ;memcpy (dev->dev_addr, mac_addr,sizeof (mac_addr)); -/* -* XXX Fix me -* does not support more than one card ! -*/ - dev->irq =SIMETH_IRQ ; + + dev->irq =ia64_alloc_irq ();/* * attach the interrupt in the simulator, this does enable interrupts
fs/partitions/Config.in +1 -0
@@ -23,6 +23,7 @@ bool ' BSD disklabel (FreeBSD partition tables) support' CONFIG_BSD_DISKLABEL bool ' Solaris (x86) partition table support' CONFIG_SOLARIS_X86_PARTITION bool ' Unixware slices support' CONFIG_UNIXWARE_DISKLABEL + bool ' EFI GUID Partition support' CONFIG_EFI_PARTITION fi bool ' SGI partition support' CONFIG_SGI_PARTITION bool ' Ultrix partition table support' CONFIG_ULTRIX_PARTITION
fs/partitions/Makefile +1 -0
@@ -20,6 +20,7 @@ obj-$(CONFIG_SUN_PARTITION) += sun.o obj-$(CONFIG_ULTRIX_PARTITION) += ultrix.o obj-$(CONFIG_IBM_PARTITION) += ibm.o +obj-$(CONFIG_EFI_PARTITION) += efi.o O_OBJS += $(obj-y) M_OBJS += $(obj-m)
fs/partitions/check.c +4 -0
@@ -32,6 +32,7 @@#include "sun.h" #include "ibm.h" #include "ultrix.h" +#include "efi.h" extern void device_init (void );extern int *blk_size[];
@@ -71,6 +72,9 @@#endif #ifdef CONFIG_IBM_PARTITION ibm_partition, +#endif +#ifdef CONFIG_EFI_PARTITION + efi_partition, #endifNULL };
fs/partitions/efi.c +646 -0
646 lines not on this page · raw message
fs/partitions/efi.h +154 -0
154 lines not on this page · raw message
fs/partitions/msdos.c +14 -0
@@ -36,6 +36,10 @@#include "check.h" #include "msdos.h" +#ifdef CONFIG_EFI_PARTITION +#include "efi.h" +#endif +#if CONFIG_BLK_DEV_MD &&CONFIG_AUTODETECT_RAID extern void md_autodetect_dev (kdev_t dev);#endif
@@ -378,6 +382,16 @@bforget (bh);return 0 ; } +#ifdef CONFIG_EFI_PARTITION + p = (struct partition *) (0x1be + data); +for (i=1 ; i<=4 ; i++,p++) { +/* If this is an EFI GPT disk, msdos should ignore it. */ +if (SYS_IND (p) =EFI_PMBR_OSTYPE_EFI_GPT ) { +bforget (bh); +return 0 ; + } + } +#endif p = (struct partition *) (0x1be + data);#ifdef CONFIG_BLK_DEV_IDE
include/asm-ia64/cache.h +4 -4
@@ -9,11 +9,11 @@*/ /* Bytes per L1 (data) cache line. */ -#define LOG_L1_CACHE_BYTES 6 -#define L1_CACHE_BYTES (1 << LOG_L1_CACHE_BYTES) +#define L1_CACHE_SHIFT 6 +#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)#ifdef CONFIG_SMP -# define SMP_LOG_CACHE_BYTES LOG_L1_CACHE_BYTES +# define SMP_CACHE_SHIFT L1_CACHE_SHIFT# define SMP_CACHE_BYTES L1_CACHE_BYTES#else /*
@@ -21,7 +21,7 @@* safe and provides an easy way to avoid wasting space on a * uni-processor: */ -# define SMP_LOG_CACHE_BYTES 3 +# define SMP_CACHE_SHIFT 3# define SMP_CACHE_BYTES (1 << 3)#endif
include/asm-ia64/machvec_dig.h +1 -0
@@ -5,6 +5,7 @@extern ia64_mv_irq_init_t dig_irq_init;extern ia64_mv_pci_fixup_t dig_pci_fixup;extern ia64_mv_map_nr_t map_nr_dense; +extern ia64_mv_pci_fixup_t iosapic_pci_fixup;/* * This stuff has dual use!
include/asm-ia64/module.h +4 -4
@@ -75,10 +75,10 @@/* * Pointers are reasonable, add the module unwind table */ - archdata->unw_table =unw_add_unwind_table (mod->name, archdata->segment_base, + archdata->unw_table =unw_add_unwind_table (mod->name, + (unsigned long ) archdata->segment_base, (unsigned long ) archdata->gp, - (unsigned long ) archdata->unw_start, - (unsigned long ) archdata->unw_end); + archdata->unw_start, archdata->unw_end);#endif /* CONFIG_IA64_NEW_UNWIND */ return 0 ; }
@@ -98,7 +98,7 @@ archdata = (struct archdata *)(mod->archdata_start);if (archdata->unw_table !=NULL ) - unw_remove_unwind_table(archdata->unw_table); + unw_remove_unwind_table((void *) archdata->unw_table); }#endif /* CONFIG_IA64_NEW_UNWIND */
include/asm-ia64/pgalloc.h +0 -7
@@ -196,13 +196,6 @@extern int do_check_pgt_cache (int ,int );/* -* This establishes kernel virtual mappings (e.g., as a result of a -* vmalloc call). Since ia-64 uses a separate kernel page table, -* there is nothing to do here... :) -*/ -#define set_pgdir (vmaddr, entry) do { } while(0) - -/* * Now for some TLB flushing routines. This is the kind of stuff that * can be very expensive, so try to avoid them whenever possible. */
include/asm-ia64/pgtable.h +6 -24
@@ -24,6 +24,9 @@* matches the VHPT short format, the firt doubleword of the VHPD long * format, and the first doubleword of the TLB insertion format. */ +#define _PAGE_A_BIT 5 +#define _PAGE_D_BIT 6 +#define _PAGE_P (1 << 0)/* page present bit */ #define _PAGE_MA_WB (0x0 << 2)/* write back memory attribute */ #define _PAGE_MA_UC (0x4 << 2)/* uncacheable memory attribute */
@@ -46,8 +49,8 @@#define _PAGE_AR_X_RX (7 << 9)/* exec & promote / read & exec */ #define _PAGE_AR_MASK (7 << 9)#define _PAGE_AR_SHIFT 9 -#define _PAGE_A (1 << 5)/* page accessed bit */ -#define _PAGE_D (1 << 6)/* page dirty bit */ +#define _PAGE_A (1 << _PAGE_A_BIT)/* page accessed bit */ +#define _PAGE_D (1 << _PAGE_D_BIT)/* page dirty bit */ #define _PAGE_PPN_MASK (((__IA64_UL(1) << IA64_MAX_PHYS_BITS) - 1) & ~0xfffUL)#define _PAGE_ED (__IA64_UL(1) << 52)/* exception deferral */ #define _PAGE_PROTNONE (__IA64_UL(1) << 63)
@@ -186,34 +189,12 @@ }while (0 )/* Quick test to see if ADDR is a (potentially) valid physical address. */ -static __inline__ long +static inline longia64_phys_addr_valid (unsigned long addr) {return (addr & (my_cpu_data.unimpl_pa_mask)) =0 ; } -/* Quick test to see if ADDR is a (potentially) valid physical address. */ -static __inline__long -ia64_phys_addr_valid (unsigned long addr) -{ -return (addr & (my_cpu_data.unimpl_pa_mask)) =0 ; -} - -/* -* kern_addr_valid(ADDR) tests if ADDR is pointing to valid kernel -* memory. For the return value to be meaningful, ADDR must be >- * PAGE_OFFSET. This operation can be relatively expensive (e.g., -* require a hash-, or multi-level tree-lookup or something of that -* sort) but it guarantees to return TRUE only if accessing the page -* at that address does not cause an error. Note that there may be -* addresses for which kern_addr_valid() returns FALSE even though an -* access would not cause an error (e.g., this is typically true for -* memory mapped I/O regions. -* -* XXX Need to implement this for IA-64. -*/ -#define kern_addr_valid (addr) (1) -/* * kern_addr_valid(ADDR) tests if ADDR is pointing to valid kernel * memory. For the return value to be meaningful, ADDR must be >@@ -340,7 +321,7 @@
/*
* Return the region index for virtual address ADDRESS. */
-static __inline__ unsigned long
+static inline unsigned long
rgn_index (unsigned long address)
{
ia64_va a;
@@ -352,7 +333,7 @@
/*
* Return the region offset for virtual address ADDRESS. */
-static __inline__ unsigned long
+static inline unsigned long
rgn_offset (unsigned long address)
{
ia64_va a;
@@ -364,7 +345,7 @@
#define RGN_SIZE (1UL << 61)
#define RGN_KERNEL 7
-static __inline__ unsigned long
+static inline unsigned long
pgd_index (unsigned long address)
{
unsigned long region = address >> 61;
@@ -375,7 +356,7 @@
/* The offset in the 1-level directory is given by the 3 region bits
(61..63) and the seven level-1 bits (33-39). */
-static __inline__ pgd_t*
+static inline pgd_t*
pgd_offset (struct mm_struct *mm, unsigned long address)
{
return mm->pgd + pgd_index(address);
@@ -394,6 +375,49 @@
#define pte_offset(dir,addr) \
((pte_t *) pmd_page(*(dir)) + (((addr) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)))
+/* atomic versions of the some PTE manipulations: */ +
+static inline int
+ptep_test_and_clear_young (pte_t *ptep)
+{
+ return test_and_clear_bit(_PAGE_A_BIT, ptep);
+}
+
+static inline int
+ptep_test_and_clear_dirty (pte_t *ptep)
+{
+ return test_and_clear_bit(_PAGE_D_BIT, ptep);
+}
+
+static inline pte_t
+ptep_get_and_clear (pte_t *ptep)
+{
+ return __pte(xchg((long *) ptep, 0));
+}
+
+/* XXX this should be called ptep_set_wrprotect!!! */ +static inline void
+ptep_clear_wrprotect (pte_t *ptep)
+{
+ unsigned long new, old;
+
+ do {
+ old = pte_val(*ptep);
+ new = pte_val(pte_wrprotect(__pte (old)));
+ } while (cmpxchg((unsigned long *) ptep, old, new) != old);
+}
+
+static inline void
+ptep_mkdirty (pte_t *ptep)
+{
+ set_bit(_PAGE_D_BIT, ptep);
+}
+
+static inline int
+pte_same (pte_t a, pte_t b)
+{
+ return pte_val(a) = pte_val(b);
+}
extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
extern void paging_init (void);
@@ -459,8 +483,6 @@
*/
extern unsigned long empty_zero_page[PAGE_SIZE/sizeof(unsigned long)]; #define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page))
-
-#include <asm-generic/pgtable.h>
# endif /* !__ASSEMBLY__ */
include/linux/skbuff.h +0 -4
@@ -896,11 +896,7 @@ {struct sk_buff *skb; -#ifdef CONFIG_SKB_BELOW_4GB - skb =alloc_skb (length+16 ,GFP_ATOMIC |GFP_DMA ); -#else skb =alloc_skb (length+16 ,GFP_ATOMIC ); -#endif if (skb)skb_reserve (skb,16 );return skb;
RE: [Linux-ia64] kernel update (relative to 2.4.0-test10)
In reply to David MosbergerThe URL is broken, correct one is
ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/linux-2.4.0-test10-ia64-001101.diff.gz
p.s.
-----Original Message-----
From: David Mosberger [mailto:[email protected]]
Sent: Thursday, November 02, 2000 11:51 AM
To: [email protected]
Subject: [Linux-ia64] kernel update (relative to 2.4.0-test10)
The patch at:
ftp://ftp.kernel.org/pub/linux/kernel/port/pub/linux/kernel/ports/ia64/linux-2.4.0-test10-ia64-001101.diff.gz
contains the latest IA-64 kernel diff relative to Linus' 2.4.0-test10. There are only few new things:
- bring IA-64 support in sync with 2.4.0-test10
- added EFI partition support by Matt (my apologies to Matt for missing his patch the last time round...)
- small fix to the PCI DMA support by Asit
- drop evil CONFIG_SKB_BELOW_4GB
- make simserial.c and simeth.c use ia64_alloc_irq() to obtain an available interrupt vector
That should be it. This kernel is known to build and work on Big Sur, Lion, and the HP Ski simulator.
Enjoy,
--david
Documentation/Configure.help +6 -0
@@ -11365,6 +11365,12 @@ Say Y here if you would like to be able to read the hard disk partition table format used by SGI machines. +Intel EFI GUID partition support +CONFIG_EFI_PARTITION + Say Y here if you would like to use hard disks under Linux which + were partitioned using EFI GPT. Presently only useful on the + IA-64 platform. + ADFS file system support (EXPERIMENTAL) CONFIG_ADFS_FS The Acorn Disc Filing System is the standard file system of the
Makefile +1 -1
@@ -206,7 +206,7 @@ $(LIBS) \ --end-group \ -o vmlinux - $(NM) vmlinux | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aU] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map + $(NM) vmlinux | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map symlinks: rm -f include/asm
arch/ia64/config.in +2 -2
@@ -45,14 +45,14 @@ bool ' Enable Itanium B-step specific code' CONFIG_ITANIUM_BSTEP_SPECIFIC if [ "$CONFIG_ITANIUM_BSTEP_SPECIFIC" = "y" ]; then bool ' Enable Itanium B0-step specific code' CONFIG_ITANIUM_B0_SPECIFIC + bool ' Enable Itanium B1-step specific code' CONFIG_ITANIUM_B1_SPECIFIC + bool ' Enable Itanium B2-step specific code' CONFIG_ITANIUM_B2_SPECIFIC fi bool ' Force interrupt redirection' CONFIG_IA64_HAVE_IRQREDIR bool ' Enable use of global TLB purge instruction (ptc.g)' CONFIG_ITANIUM_PTCG bool ' Enable SoftSDV hacks' CONFIG_IA64_SOFTSDV_HACKS bool ' Enable AzusA hacks' CONFIG_IA64_AZUSA_HACKS bool ' Enable IA-64 Machine Check Abort' CONFIG_IA64_MCA - bool ' Force socket buffers below 4GB?' CONFIG_SKB_BELOW_4GB - bool ' ACPI kernel configuration manager (EXPERIMENTAL)' CONFIG_ACPI_KERNEL_CONFIG if [ "$CONFIG_ACPI_KERNEL_CONFIG" = "y" ]; then define_bool CONFIG_PM y
arch/ia64/dig/dig_irq.c +0 -10
@@ -1,10 +0,0 @@ -void -dig_irq_init (void ) -{ -/* -* Disable the compatibility mode interrupts (8259 style), needs IN/OUT support -* enabled. -*/ -outb (0xff ,0xA1 ); -outb (0xff ,0x21 ); -}
arch/ia64/kernel/entry.S +1 -1
@@ -503,7 +503,7 @@ ;; ld4 r2=[r2] ;; - shl r2=r2,SMP_LOG_CACHE_BYTES // can't use shladd here... + shl r2=r2,SMP_CACHE_SHIFT // can't use shladd here... ;; add r3=r2,r3 #else
arch/ia64/kernel/pci-dma.c +6 -2
@@ -125,12 +125,16 @@BUG ();/* -* Find suitable number of IO TLB entries size that will fit this request and allocate a buffer -* from that IO TLB pool. +* Find suitable number of IO TLB entries size that will fit this request and +* allocate a buffer from that IO TLB pool. */ spin_lock_irqsave (&io_tlb_lock, flags); { wrap = index =ALIGN (io_tlb_index, stride); + +if (index >= io_tlb_nslabs) + index =0 ; + do { /* * If we find a slot that indicates we have 'nslots' number of
arch/ia64/kernel/pci.c +7 -8
@@ -123,10 +123,9 @@* Initialization. Uses the SAL interface */ void __init -pcibios_init (void ) +pcibios_init (void ) {# define PCI_BUSES_TO_SCAN 255 -struct pci_ops *ops =NULL ;int i;printk ("PCI: Probing PCI hardware\n" );
@@ -141,14 +140,14 @@* are examined. */ void __init -pcibios_fixup_bus (struct pci_bus *b) +pcibios_fixup_bus (struct pci_bus *b) {return ; }void __init -pcibios_update_resource (struct pci_dev *dev,struct resource *root, -struct resource *res,int resource) +pcibios_update_resource (struct pci_dev *dev,struct resource *root, +struct resource *res,int resource) {unsigned long where, size;u32 reg;
@@ -163,7 +162,7 @@ }void __init -pcibios_update_irq (struct pci_dev *dev,int irq) +pcibios_update_irq (struct pci_dev *dev,int irq) {pci_write_config_byte (dev,PCI_INTERRUPT_LINE , irq);
@@ -190,9 +189,9 @@* PCI BIOS setup, always defaults to SAL interface */ char *__init -pcibios_setup (char *str) +pcibios_setup (char *str) { - pci_probe =PCI_NO_CHECKS ; + pci_probe =PCI_NO_CHECKS ;return NULL ; }
arch/ia64/kernel/ptrace.c +0 -1
@@ -617,7 +617,6 @@struct switch_stack *sw;struct unw_frame_info info;struct pt_regs *pt; -unsigned long pmd_tmp; pt =ia64_task_regs (child); sw = (struct switch_stack *) (child->thread.ksp +16 );
arch/ia64/lib/memcpy.S +8 -1
@@ -29,7 +29,14 @@ mov in0=in1 ;; mov in1=r8 - ;; + // gas doesn't handle control flow across procedures, so it doesn't + // realize that a stop bit is needed before the "alloc" instruction + // below +{ + nop.m 0 + nop.f 0 + nop.i 0 +} ;; END(bcopy) // FALL THROUGH GLOBAL_ENTRY(memcpy)
drivers/char/simserial.c +7 -6
@@ -36,7 +36,6 @@#undef SIMSERIAL_DEBUG/* define this to get some debug information */ #define KEYBOARD_INTR 3/* must match with simulator! */ -#define SIMSERIAL_IRQ 0xee#define NR_PORTS 1/* only one port for now */ #define SERIAL_INLINE 1
@@ -78,7 +77,7 @@*/ static struct serial_state rs_table[NR_PORTS ]={/* UART CLK PORT IRQ FLAGS */ - {0 ,BASE_BAUD ,0x3F8 ,SIMSERIAL_IRQ ,STD_COM_FLAGS ,0 ,PORT_16550 }/* ttyS0 */ + {0 ,BASE_BAUD ,0x3F8 ,0 ,STD_COM_FLAGS ,0 ,PORT_16550 }/* ttyS0 */ };/*
@@ -1013,10 +1012,7 @@struct serial_state *state;show_serial_version (); - -/* connect the platform's keyboard interrupt to SIMSERIAL_IRQ */ -ia64_ssc_connect_irq (KEYBOARD_INTR ,SIMSERIAL_IRQ ); - +/* Initialize the tty_driver structure */ memset (&serial_driver,0 ,sizeof (struct tty_driver ));
@@ -1063,6 +1059,11 @@for (i =0 , state = rs_table; i <NR_PORTS ; i++,state++) {if (state->type =PORT_UNKNOWN )continue ; + +if (!state->irq) { + state->irq =ia64_alloc_irq (); +ia64_ssc_connect_irq (KEYBOARD_INTR , state->irq); + } printk(KERN_INFO "ttyS%02d at 0x%04lx (irq = %d) is a %s\n", state->line,
drivers/net/simeth.c +2 -6
@@ -27,7 +27,6 @@#include <asm/irq.h> -#define SIMETH_IRQ 0xed#define SIMETH_RECV_MAX 10/*
@@ -213,11 +212,8 @@return -ENOMEM ;memcpy (dev->dev_addr, mac_addr,sizeof (mac_addr)); -/* -* XXX Fix me -* does not support more than one card ! -*/ - dev->irq =SIMETH_IRQ ; + + dev->irq =ia64_alloc_irq ();/* * attach the interrupt in the simulator, this does enable interrupts
fs/partitions/Config.in +1 -0
@@ -23,6 +23,7 @@ bool ' BSD disklabel (FreeBSD partition tables) support' CONFIG_BSD_DISKLABEL bool ' Solaris (x86) partition table support' CONFIG_SOLARIS_X86_PARTITION bool ' Unixware slices support' CONFIG_UNIXWARE_DISKLABEL + bool ' EFI GUID Partition support' CONFIG_EFI_PARTITION fi bool ' SGI partition support' CONFIG_SGI_PARTITION bool ' Ultrix partition table support' CONFIG_ULTRIX_PARTITION
fs/partitions/Makefile +1 -0
@@ -20,6 +20,7 @@ obj-$(CONFIG_SUN_PARTITION) += sun.o obj-$(CONFIG_ULTRIX_PARTITION) += ultrix.o obj-$(CONFIG_IBM_PARTITION) += ibm.o +obj-$(CONFIG_EFI_PARTITION) += efi.o O_OBJS += $(obj-y) M_OBJS += $(obj-m)
fs/partitions/check.c +4 -0
@@ -32,6 +32,7 @@#include "sun.h" #include "ibm.h" #include "ultrix.h" +#include "efi.h" extern void device_init (void );extern int *blk_size[];
@@ -71,6 +72,9 @@#endif #ifdef CONFIG_IBM_PARTITION ibm_partition, +#endif +#ifdef CONFIG_EFI_PARTITION + efi_partition, #endifNULL };
fs/partitions/efi.c +646 -0
646 lines not on this page · raw message
fs/partitions/efi.h +154 -0
154 lines not on this page · raw message
fs/partitions/msdos.c +14 -0
@@ -36,6 +36,10 @@#include "check.h" #include "msdos.h" +#ifdef CONFIG_EFI_PARTITION +#include "efi.h" +#endif +#if CONFIG_BLK_DEV_MD &&CONFIG_AUTODETECT_RAID extern void md_autodetect_dev (kdev_t dev);#endif
@@ -378,6 +382,16 @@bforget (bh);return 0 ; } +#ifdef CONFIG_EFI_PARTITION + p = (struct partition *) (0x1be + data); +for (i=1 ; i<=4 ; i++,p++) { +/* If this is an EFI GPT disk, msdos should ignore it. */ +if (SYS_IND (p) =EFI_PMBR_OSTYPE_EFI_GPT ) { +bforget (bh); +return 0 ; + } + } +#endif p = (struct partition *) (0x1be + data);#ifdef CONFIG_BLK_DEV_IDE
include/asm-ia64/cache.h +4 -4
@@ -9,11 +9,11 @@*/ /* Bytes per L1 (data) cache line. */ -#define LOG_L1_CACHE_BYTES 6 -#define L1_CACHE_BYTES (1 << LOG_L1_CACHE_BYTES) +#define L1_CACHE_SHIFT 6 +#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)#ifdef CONFIG_SMP -# define SMP_LOG_CACHE_BYTES LOG_L1_CACHE_BYTES +# define SMP_CACHE_SHIFT L1_CACHE_SHIFT# define SMP_CACHE_BYTES L1_CACHE_BYTES#else /*
@@ -21,7 +21,7 @@* safe and provides an easy way to avoid wasting space on a * uni-processor: */ -# define SMP_LOG_CACHE_BYTES 3 +# define SMP_CACHE_SHIFT 3# define SMP_CACHE_BYTES (1 << 3)#endif
include/asm-ia64/machvec_dig.h +1 -0
@@ -5,6 +5,7 @@extern ia64_mv_irq_init_t dig_irq_init;extern ia64_mv_pci_fixup_t dig_pci_fixup;extern ia64_mv_map_nr_t map_nr_dense; +extern ia64_mv_pci_fixup_t iosapic_pci_fixup;/* * This stuff has dual use!
include/asm-ia64/module.h +4 -4
@@ -75,10 +75,10 @@/* * Pointers are reasonable, add the module unwind table */ - archdata->unw_table =unw_add_unwind_table (mod->name, archdata->segment_base, + archdata->unw_table =unw_add_unwind_table (mod->name, + (unsigned long ) archdata->segment_base, (unsigned long ) archdata->gp, - (unsigned long ) archdata->unw_start, - (unsigned long ) archdata->unw_end); + archdata->unw_start, archdata->unw_end);#endif /* CONFIG_IA64_NEW_UNWIND */ return 0 ; }
@@ -98,7 +98,7 @@ archdata = (struct archdata *)(mod->archdata_start);if (archdata->unw_table !=NULL ) - unw_remove_unwind_table(archdata->unw_table); + unw_remove_unwind_table((void *) archdata->unw_table); }#endif /* CONFIG_IA64_NEW_UNWIND */
include/asm-ia64/pgalloc.h +0 -7
@@ -196,13 +196,6 @@extern int do_check_pgt_cache (int ,int );/* -* This establishes kernel virtual mappings (e.g., as a result of a -* vmalloc call). Since ia-64 uses a separate kernel page table, -* there is nothing to do here... :) -*/ -#define set_pgdir (vmaddr, entry) do { } while(0) - -/* * Now for some TLB flushing routines. This is the kind of stuff that * can be very expensive, so try to avoid them whenever possible. */
include/asm-ia64/pgtable.h +6 -24
@@ -24,6 +24,9 @@* matches the VHPT short format, the firt doubleword of the VHPD long * format, and the first doubleword of the TLB insertion format. */ +#define _PAGE_A_BIT 5 +#define _PAGE_D_BIT 6 +#define _PAGE_P (1 << 0)/* page present bit */ #define _PAGE_MA_WB (0x0 << 2)/* write back memory attribute */ #define _PAGE_MA_UC (0x4 << 2)/* uncacheable memory attribute */
@@ -46,8 +49,8 @@#define _PAGE_AR_X_RX (7 << 9)/* exec & promote / read & exec */ #define _PAGE_AR_MASK (7 << 9)#define _PAGE_AR_SHIFT 9 -#define _PAGE_A (1 << 5)/* page accessed bit */ -#define _PAGE_D (1 << 6)/* page dirty bit */ +#define _PAGE_A (1 << _PAGE_A_BIT)/* page accessed bit */ +#define _PAGE_D (1 << _PAGE_D_BIT)/* page dirty bit */ #define _PAGE_PPN_MASK (((__IA64_UL(1) << IA64_MAX_PHYS_BITS) - 1) & ~0xfffUL)#define _PAGE_ED (__IA64_UL(1) << 52)/* exception deferral */ #define _PAGE_PROTNONE (__IA64_UL(1) << 63)
@@ -186,34 +189,12 @@ }while (0 )/* Quick test to see if ADDR is a (potentially) valid physical address. */ -static __inline__ long +static inline longia64_phys_addr_valid (unsigned long addr) {return (addr & (my_cpu_data.unimpl_pa_mask)) =0 ; } -/* Quick test to see if ADDR is a (potentially) valid physical address. */ -static __inline__long -ia64_phys_addr_valid (unsigned long addr) -{ -return (addr & (my_cpu_data.unimpl_pa_mask)) =0 ; -} - -/* -* kern_addr_valid(ADDR) tests if ADDR is pointing to valid kernel -* memory. For the return value to be meaningful, ADDR must be >- * PAGE_OFFSET. This operation can be relatively expensive (e.g., -* require a hash-, or multi-level tree-lookup or something of that -* sort) but it guarantees to return TRUE only if accessing the page -* at that address does not cause an error. Note that there may be -* addresses for which kern_addr_valid() returns FALSE even though an -* access would not cause an error (e.g., this is typically true for -* memory mapped I/O regions. -* -* XXX Need to implement this for IA-64. -*/ -#define kern_addr_valid (addr) (1) -/* * kern_addr_valid(ADDR) tests if ADDR is pointing to valid kernel * memory. For the return value to be meaningful, ADDR must be >@@ -340,7 +321,7 @@
/*
* Return the region index for virtual address ADDRESS. */
-static __inline__ unsigned long
+static inline unsigned long
rgn_index (unsigned long address)
{
ia64_va a;
@@ -352,7 +333,7 @@
/*
* Return the region offset for virtual address ADDRESS. */
-static __inline__ unsigned long
+static inline unsigned long
rgn_offset (unsigned long address)
{
ia64_va a;
@@ -364,7 +345,7 @@
#define RGN_SIZE (1UL << 61)
#define RGN_KERNEL 7
-static __inline__ unsigned long
+static inline unsigned long
pgd_index (unsigned long address)
{
unsigned long region = address >> 61;
@@ -375,7 +356,7 @@
/* The offset in the 1-level directory is given by the 3 region bits
(61..63) and the seven level-1 bits (33-39). */
-static __inline__ pgd_t*
+static inline pgd_t*
pgd_offset (struct mm_struct *mm, unsigned long address)
{
return mm->pgd + pgd_index(address);
@@ -394,6 +375,49 @@
#define pte_offset(dir,addr) \
((pte_t *) pmd_page(*(dir)) + (((addr) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)))
+/* atomic versions of the some PTE manipulations: */ +
+static inline int
+ptep_test_and_clear_young (pte_t *ptep)
+{
+ return test_and_clear_bit(_PAGE_A_BIT, ptep);
+}
+
+static inline int
+ptep_test_and_clear_dirty (pte_t *ptep)
+{
+ return test_and_clear_bit(_PAGE_D_BIT, ptep);
+}
+
+static inline pte_t
+ptep_get_and_clear (pte_t *ptep)
+{
+ return __pte(xchg((long *) ptep, 0));
+}
+
+/* XXX this should be called ptep_set_wrprotect!!! */ +static inline void
+ptep_clear_wrprotect (pte_t *ptep)
+{
+ unsigned long new, old;
+
+ do {
+ old = pte_val(*ptep);
+ new = pte_val(pte_wrprotect(__pte (old)));
+ } while (cmpxchg((unsigned long *) ptep, old, new) != old);
+}
+
+static inline void
+ptep_mkdirty (pte_t *ptep)
+{
+ set_bit(_PAGE_D_BIT, ptep);
+}
+
+static inline int
+pte_same (pte_t a, pte_t b)
+{
+ return pte_val(a) = pte_val(b);
+}
extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
extern void paging_init (void);
@@ -459,8 +483,6 @@
*/
extern unsigned long empty_zero_page[PAGE_SIZE/sizeof(unsigned long)]; #define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page))
-
-#include <asm-generic/pgtable.h>
# endif /* !__ASSEMBLY__ */
include/linux/skbuff.h +0 -4
@@ -896,11 +896,7 @@ {struct sk_buff *skb; -#ifdef CONFIG_SKB_BELOW_4GB - skb =alloc_skb (length+16 ,GFP_ATOMIC |GFP_DMA ); -#else skb =alloc_skb (length+16 ,GFP_ATOMIC ); -#endif if (skb)skb_reserve (skb,16 );return skb;
_______________________________________________
Linux-IA64 mailing list
[email protected]
http://lists.linuxia64.org/lists/listinfo/linux-ia64
[Linux-ia64] kernel update (relative to 2.4.0-test10)
In reply to David MosbergerHere is the latest IA-64 kernel update. It's still relative to test10. This patch is rather big as it contains the first batch of code required for the SGI SN1 machine. Other than that, the following changes were made:
- Asit: added workaround for dbr[] access errata
- Jonathan Nicklin, Patrick O'Rourke: changed locore code to execute in virtual mode; with this change, only the (rare) page table accesses are now done in physical mode
- Stephane: cleanup of sal.h; fix unaligned handler to always send SIGBUS (not SIGSEGV)
- Kanoj: fix for ia64_pall_call_static
- added send_ipi/inX/outX machvec entries; note: both IPI and inX/outX are architected in IA-64 and there shouldn't be any need for these machvecs; however, there are unfortunately some machines that don't follow the architecture and that's why we had to add them; if you're a system designer, please follow the IA-64 architecture and do not use these machvec entries
- DCR is now initialized such that all faults are deferred (as requested by Intel)
- cleaned up PCI code and pgtable.h a bit
- ptce loop info is now maintained per CPU (mostly for cleanliness)
- width of region id registers is now determined at boot time via a call to PAL
- fix unwind code so it doesn't hang when removing a kernel module
As usual, the full patch can be found at:
ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64
The file name is linux-2.4.0-test10-ia64-001115.diff*
Enjoy,
--david
arch/ia64/config.in +4 -0
@@ -48,6 +48,10 @@ bool ' Enable Itanium B1-step specific code' CONFIG_ITANIUM_B1_SPECIFIC bool ' Enable Itanium B2-step specific code' CONFIG_ITANIUM_B2_SPECIFIC fi + bool ' Enable Itanium C-step specific code' CONFIG_ITANIUM_CSTEP_SPECIFIC + if [ "$CONFIG_ITANIUM_CSTEP_SPECIFIC" = "y" ]; then + bool ' Enable Itanium C0-step specific code' CONFIG_ITANIUM_C0_SPECIFIC + fi bool ' Force interrupt redirection' CONFIG_IA64_HAVE_IRQREDIR bool ' Enable use of global TLB purge instruction (ptc.g)' CONFIG_ITANIUM_PTCG bool ' Enable SoftSDV hacks' CONFIG_IA64_SOFTSDV_HACKS
arch/ia64/kernel/entry.S +62 -16
124 lines not on this page · raw message
arch/ia64/kernel/fw-emu.c +0 -1
@@ -402,7 +402,6 @@ sal_systab->sal_rev_minor =1 ; sal_systab->sal_rev_major =0 ; sal_systab->entry_count =1 ; - sal_systab->ia32_bios_present =0 ;#ifdef CONFIG_IA64_GENERIC strcpy (sal_systab->oem_id,"Generic" );
arch/ia64/kernel/head.S +10 -0
@@ -168,6 +168,11 @@ add r19=IA64_NUM_DBG_REGS*8,in0 ;; 1: mov r16Ûr[r18] +#if defined(CONFIG_ITANIUM_ASTEP_SPECIFIC) || defined(CONFIG_ITANIUM_BSTEP_SPECIFIC) \ + || defined(CONFIG_ITANIUM_C0_SPECIFIC) + ;; + srlz.d +#endif mov r17=ibr[r18] add r18=1,r18 ;;
@@ -195,6 +200,11 @@ add r18=1,r18 ;; mov dbr[r18]=r16 +#if defined(CONFIG_ITANIUM_ASTEP_SPECIFIC) || defined(CONFIG_ITANIUM_BSTEP_SPECIFIC) \ + || defined(CONFIG_ITANIUM_C0_SPECIFIC) + ;; + srlz.d +#endif mov ibr[r18]=r17 br.cloop.sptk.few 1b ;;
arch/ia64/kernel/ivt.S +17 -39
171 lines not on this page · raw message
arch/ia64/kernel/machvec.c +4 -2
@@ -1,10 +1,12 @@#include <linux/config.h> + +#ifdef CONFIG_IA64_GENERIC +#include <linux/kernel.h> +#include <linux/string.h> #include <asm/page.h> #include <asm/machvec.h> - -#ifdef CONFIG_IA64_GENERIC struct ia64_machine_vector ia64_mv;
arch/ia64/kernel/mca.c +1 -1
@@ -366,7 +366,7 @@void ia64_mca_wakeup (int cpu) { -ia64_send_ipi (cpu,IA64_MCA_WAKEUP_INT_VECTOR ,IA64_IPI_DM_INT ,0 ); +platform_send_ipi (cpu,IA64_MCA_WAKEUP_INT_VECTOR ,IA64_IPI_DM_INT ,0 ); ia64_mc_info.imi_rendez_checkin[cpu] =IA64_MCA_RENDEZ_CHECKIN_NOTDONE ; }
arch/ia64/kernel/mca_asm.S +4 -10
@@ -3,8 +3,9 @@ // // Mods by cfleck to integrate into kernel build // 00/03/15 davidm Added various stop bits to get a clean compile -// 00/03/29 cfleck Added code to save INIT handoff state in pt_regs format, switch to temp kstack, -// switch modes, jump to C INIT handler +// +// 00/03/29 cfleck Added code to save INIT handoff state in pt_regs format, switch to temp +// kstack, switch modes, jump to C INIT handler // #include <asm/pgtable.h> #include <asm/processor.h>
@@ -15,14 +16,7 @@ * When we get an machine check, the kernel stack pointer is no longer * valid, so we need to set a new stack pointer. */ -#define MINSTATE_START_SAVE_MIN \ -(pKern) movl sp=ia64_init_stack+IA64_STK_OFFSET-IA64_PT_REGS_SIZE; \ - ;; - -#define MINSTATE_END_SAVE_MIN \ - or r12=r12,r14; /* make sp a kernel virtual address */ \ - or r13=r13,r14; /* make `current' a kernel virtual address */ \ - ;; +#define MINSTATE_PHYS /* Make sure stack access is physical for MINSTATE */ #include "minstate.h"
arch/ia64/kernel/minstate.h +70 -19
115 lines not on this page · raw message
arch/ia64/kernel/pal.S +4 -5
@@ -52,10 +52,9 @@ /* * Make a PAL call using the static calling convention. * - * in0 Pointer to struct ia64_pal_retval - * in1 Index of PAL service - * in2 - in4 Remaining PAL arguments - * in5 1 => clear psr.ic, 0 => don't clear psr.ic + * in0 Index of PAL service + * in1 - in3 Remaining PAL arguments + * in4 1 => clear psr.ic, 0 => don't clear psr.ic * */ GLOBAL_ENTRY(ia64_pal_call_static)
@@ -69,7 +68,7 @@ } ;; ld8 loc2 = [loc2] // loc2 <- entry point - tbit.nz p6,p7 = in5, 0 + tbit.nz p6,p7 = in4, 0 adds r8 = 1f-1b,r8 ;; mov loc3 = psr
arch/ia64/kernel/pci.c +10 -17
@@ -1,10 +1,8 @@/* -* pci.c - Low-Level PCI Access in IA64 +* pci.c - Low-Level PCI Access in IA-64 * * Derived from bios32.c of i386 tree. -* */ -#include <linux/config.h> #include <linux/types.h>
@@ -44,15 +42,11 @@* This interrupt-safe spinlock protects all accesses to PCI * configuration space. */ -spinlock_t pci_lock =SPIN_LOCK_UNLOCKED ; -struct pci_fixup pcibios_fixups[] = { {0 } }; - -#define PCI_NO_CHECKS 0x400 -#define PCI_NO_PEER_FIXUP 0x800 - -static unsigned int pci_probe =PCI_NO_CHECKS ; +struct pci_fixup pcibios_fixups[] = { + {0 } +};/* Macro to build a PCI configuration address to be passed as a parameter to SAL. */
@@ -110,7 +104,7 @@return ia64_sal_pci_config_write (PCI_CONFIG_ADDRESS (dev, where),4 , value); } -static struct pci_ops pci_conf = { +struct pci_ops pci_conf = { pci_conf_read_config_byte, pci_conf_read_config_word, pci_conf_read_config_dword,
@@ -185,17 +179,16 @@return 0 ; } +void +pcibios_align_resource (void *data,struct resource *res,unsigned long size) +{ +} +/* * PCI BIOS setup, always defaults to SAL interface */ char *__init pcibios_setup (char *str) { - pci_probe =PCI_NO_CHECKS ;return NULL ; -} - -void -pcibios_align_resource (void *data,struct resource *res,unsigned long size) -{ }
arch/ia64/kernel/ptrace.c +1 -1
@@ -1058,7 +1058,7 @@ goto out_tsk;if (child->state !=TASK_STOPPED ) { -if (request !=PTRACE_KILL && request !=PTRACE_PEEKUSR ) +if (request !=PTRACE_KILL ) goto out_tsk; }
arch/ia64/kernel/sal.c +4 -2
@@ -104,9 +104,11 @@if (strncmp (systab->signature,"SST_" ,4 ) !=0 )printk ("bad signature in system table!" ); -printk ("SAL v%u.%02u: ia32bios=%s, oem=%.32s, product=%.32s\n" , +/* +* revisions are coded in BCD, so %x does the job for us +*/ +printk ("SAL v%x.%02x: oem=%.32s, product=%.32s\n" , systab->sal_rev_major, systab->sal_rev_minor, - systab->ia32_bios_present ?"present" :"absent" , systab->oem_id, systab->product_id); min = ~0UL ;
arch/ia64/kernel/setup.c +20 -8
@@ -408,6 +408,8 @@ {extern void __init ia64_rid_init (void );extern void __init ia64_tlb_init (void ); +pal_vm_info_2_u_t vmi; +unsigned int max_ctx;identify_cpu (&my_cpu_data);
@@ -415,15 +417,12 @@memset (ia64_task_regs (current),0 ,sizeof (struct pt_regs ));/* -* Initialize default control register to defer speculative -* faults. On a speculative load, we want to defer access -* right, key miss, and key permission faults. We currently -* do NOT defer TLB misses, page-not-present, access bit, or -* debug faults but kernel code should not rely on any -* particular setting of these bits. -ia64_set_dcr(IA64_DCR_DR | IA64_DCR_DK | IA64_DCR_DX | IA64_DCR_PP); +* Initialize default control register to defer all speculative faults. The +* kernel MUST NOT depend on a particular setting of these bits (in other words, +* the kernel must have recovery code for all speculative accesses). */ -ia64_set_dcr (IA64_DCR_DR |IA64_DCR_DK |IA64_DCR_DX ); +ia64_set_dcr (IA64_DCR_DM |IA64_DCR_DP |IA64_DCR_DK |IA64_DCR_DX |IA64_DCR_DR + |IA64_DCR_DA |IA64_DCR_DD );#ifndef CONFIG_SMP ia64_set_fpu_owner (0 );/* initialize ar.k5 */ #endif
@@ -444,4 +443,17 @@#ifdef CONFIG_SMP normal_xtp ();#endif + +/* set ia64_ctx.max_rid to the maximum RID that is supported by all CPUs: */ +if (ia64_pal_vm_summary (NULL , &vmi) =0 ) + max_ctx = (1U << (vmi.pal_vm_info_2_s.rid_size -3 )) -1 ; +else { +printk ("ia64_rid_init: PAL VM summary failed, assuming 18 RID bits\n" ); + max_ctx = (1U <<15 ) -1 ;/* use architected minimum */ + } +while (max_ctx < ia64_ctx.max_ctx) { +unsigned int old = ia64_ctx.max_ctx; +if (cmpxchg (&ia64_ctx.max_ctx, old, max_ctx) = old) +break ; + } }
arch/ia64/kernel/signal.c +4 -3
@@ -91,7 +91,7 @@ scr->pt.r10 =-1 ; }while (1 ) { -set_current_state (TASK_INTERRUPTIBLE ); + current->state =TASK_INTERRUPTIBLE ;schedule ();if (ia64_do_signal (&oldset, scr,1 ))return -EINTR ;
@@ -499,9 +499,10 @@/* Let the debugger run. */ current->exit_code = signr; current->thread.siginfo = &info; -set_current_state (TASK_STOPPED ); + current->state =TASK_STOPPED ;notify_parent (current,SIGCHLD );schedule (); + signr = current->exit_code; current->thread.siginfo =0 ;
@@ -557,7 +558,7 @@/* FALLTHRU */ case SIGSTOP : -set_current_state (TASK_STOPPED ); + current->state =TASK_STOPPED ; current->exit_code = signr;if (!(current->p_pptr->sig->action[SIGCHLD -1 ].sa.sa_flags &SA_NOCLDSTOP ))
arch/ia64/kernel/smp.c +3 -3
@@ -279,7 +279,7 @@return ;set_bit (op, &ipi_op[dest_cpu]); -ia64_send_ipi (dest_cpu,IPI_IRQ ,IA64_IPI_DM_INT ,0 ); +platform_send_ipi (dest_cpu,IPI_IRQ ,IA64_IPI_DM_INT ,0 ); } static inline void
@@ -429,7 +429,7 @@int i;for (i =0 ; i < smp_num_cpus; i++) {if (i !=smp_processor_id ()) -ia64_send_ipi (i,IPI_IRQ ,IA64_IPI_DM_INT ,0 ); +platform_send_ipi (i,IPI_IRQ ,IA64_IPI_DM_INT ,0 ); } goto retry;#else
@@ -587,7 +587,7 @@ cpu_now_booting = cpu;/* Kick the AP in the butt */ -ia64_send_ipi (cpu, ap_wakeup_vector,IA64_IPI_DM_INT ,0 ); +platform_send_ipi (cpu, ap_wakeup_vector,IA64_IPI_DM_INT ,0 );/* wait up to 10s for the AP to start */ for (timeout =0 ; timeout <100000 ; timeout++) {
arch/ia64/kernel/unaligned.c +7 -3
@@ -1564,9 +1564,13 @@DPRINT (("ret=%d\n" , ret));if (ret) { -lock_kernel (); -force_sig (SIGSEGV , current); -unlock_kernel (); +struct siginfo si; + + si.si_signo =SIGBUS ; + si.si_errno =0 ; + si.si_code =BUS_ADRALN ; + si.si_addr = (void *) ifa; +force_sig_info (SIGBUS , &si, current); }else {/* * given today's architecture this case is not likely to happen
arch/ia64/kernel/unwind.c +21 -27
70 lines not on this page · raw message
arch/ia64/mm/init.c +12 -1
@@ -305,7 +305,7 @@return 0 ; }flush_page_to_ram (page); -set_pte (pte,page_pte_prot (page,PAGE_GATE )); +set_pte (pte,mk_pte (page,PAGE_GATE ));/* no need for flush_tlb */ return page; }
@@ -423,6 +423,17 @@extern char __start_gate_section[];long reserved_pages, codesize, datasize, initsize; +#ifdef CONFIG_SWIOTLB + { +/* +* This needs to be called _after_ the command line has been parsed but +* _before_ any drivers that may need the sw I/O TLB are initialized or +* bootmem has been freed. +*/ +extern void setup_swiotlb (void ); +setup_swiotlb (); + } +#endif if (!mem_map)BUG ();
arch/ia64/mm/tlb.c +22 -18
@@ -36,15 +36,10 @@struct ia64_ctx ia64_ctx = { lock:SPIN_LOCK_UNLOCKED , next:1 , - limit: (1UL <<IA64_HW_CONTEXT_BITS ) + limit: (1 <<15 ) -1 ,/* start out with the safe (architected) limit */ + max_ctx: ~0U }; -/* -* Put everything in a struct so we avoid the global offset table whenever -* possible. -*/ -ia64_ptce_info_t ia64_ptce_info; -/* * Seralize usage of ptc.g */
@@ -133,12 +128,12 @@void wrap_mmu_context (struct mm_struct *mm) { +unsigned long tsk_context, max_ctx = ia64_ctx.max_ctx;struct task_struct *tsk; -unsigned long tsk_context; -if (ia64_ctx.next >= (1UL <<IA64_HW_CONTEXT_BITS )) +if (ia64_ctx.next > max_ctx) ia64_ctx.next =300 ;/* skip daemons */ - ia64_ctx.limit = (1UL <<IA64_HW_CONTEXT_BITS ); + ia64_ctx.limit = max_ctx +1 ;/* * Scan all the task's mm->context and set proper safe range
@@ -153,9 +148,9 @@if (tsk_context = ia64_ctx.next) {if (++ia64_ctx.next >= ia64_ctx.limit) {/* empty range: reset the range limit and start over */ -if (ia64_ctx.next >= (1UL <<IA64_HW_CONTEXT_BITS )) +if (ia64_ctx.next > max_ctx) ia64_ctx.next =300 ; - ia64_ctx.limit = (1UL <<IA64_HW_CONTEXT_BITS ); + ia64_ctx.limit = max_ctx +1 ; goto repeat; } }
@@ -169,12 +164,13 @@void __flush_tlb_all (void ) { -unsigned long i, j, flags, count0, count1, stride0, stride1, addr = ia64_ptce_info.base; +unsigned long i, j, flags, count0, count1, stride0, stride1, addr; - count0 = ia64_ptce_info.count[0 ]; - count1 = ia64_ptce_info.count[1 ]; - stride0 = ia64_ptce_info.stride[0 ]; - stride1 = ia64_ptce_info.stride[1 ]; + addr = my_cpu_data.ptce_base; + count0 = my_cpu_data.ptce_count[0 ]; + count1 = my_cpu_data.ptce_count[1 ]; + stride0 = my_cpu_data.ptce_stride[0 ]; + stride1 = my_cpu_data.ptce_stride[1 ];local_irq_save (flags);for (i =0 ; i < count0; ++i) {
@@ -246,6 +242,14 @@void __init ia64_tlb_init (void ) { -ia64_get_ptce (&ia64_ptce_info); +ia64_ptce_info_t ptce_info; + +ia64_get_ptce (&ptce_info); + my_cpu_data.ptce_base = ptce_info.base; + my_cpu_data.ptce_count[0 ] = ptce_info.count[0 ]; + my_cpu_data.ptce_count[1 ] = ptce_info.count[1 ]; + my_cpu_data.ptce_stride[0 ] = ptce_info.stride[0 ]; + my_cpu_data.ptce_stride[1 ] = ptce_info.stride[1 ]; +__flush_tlb_all ();/* nuke left overs from bootstrapping... */ }
arch/ia64/tools/print_offsets.c +1 -1
@@ -149,7 +149,7 @@ { "IA64_SWITCH_STACK_AR_UNAT_OFFSET", offsetof (struct switch_stack, ar_unat) }, { "IA64_SWITCH_STACK_AR_RNAT_OFFSET", offsetof (struct switch_stack, ar_rnat) }, { "IA64_SWITCH_STACK_AR_BSPSTORE_OFFSET", offsetof (struct switch_stack, ar_bspstore) }, - { "IA64_SWITCH_STACK_PR_OFFSET", offsetof (struct switch_stack, b0) }, + { "IA64_SWITCH_STACK_PR_OFFSET", offsetof (struct switch_stack, pr) }, { "IA64_SIGCONTEXT_AR_BSP_OFFSET", offsetof (struct sigcontext, sc_ar_bsp) }, { "IA64_SIGCONTEXT_AR_RNAT_OFFSET", offsetof (struct sigcontext, sc_ar_rnat) }, { "IA64_SIGCONTEXT_FLAGS_OFFSET", offsetof (struct sigcontext, sc_flags) },
include/asm-generic/pgtable.h +1 -1
@@ -26,7 +26,7 @@return pte; } -static inline void ptep_clear_wrprotect (pte_t *ptep) +static inline void ptep_set_wrprotect (pte_t *ptep) {pte_t old_pte = *ptep;set_pte (ptep,pte_wrprotect (old_pte));
include/asm-i386/pgtable.h +1 -1
@@ -283,7 +283,7 @@static inline int ptep_test_and_clear_dirty (pte_t *ptep) {return test_and_clear_bit (_PAGE_BIT_DIRTY, ptep); }static inline int ptep_test_and_clear_young (pte_t *ptep) {return test_and_clear_bit (_PAGE_BIT_ACCESSED, ptep); } -static inline void ptep_clear_wrprotect (pte_t *ptep) {clear_bit (_PAGE_BIT_RW, ptep); } +static inline void ptep_set_wrprotect (pte_t *ptep) {clear_bit (_PAGE_BIT_RW, ptep); }static inline void ptep_mkdirty (pte_t *ptep) {set_bit (_PAGE_BIT_RW, ptep); }/*
include/asm-ia64/hw_irq.h +2 -1
@@ -10,6 +10,7 @@#include <linux/types.h> +#include <asm/machvec.h> #include <asm/ptrace.h> #include <asm/smp.h>
@@ -77,7 +78,7 @@static inline void hw_resend_irq (struct hw_interrupt_type *h,unsigned int vector) { -ia64_send_ipi (smp_processor_id (), vector,IA64_IPI_DM_INT ,0 ); +platform_send_ipi (smp_processor_id (), vector,IA64_IPI_DM_INT ,0 ); }#endif /* _ASM_IA64_HW_IRQ_H */
include/asm-ia64/io.h +89 -53
236 lines not on this page · raw message
include/asm-ia64/machvec.h +59 -1
90 lines not on this page · raw message
include/asm-ia64/machvec_dig.h +1 -2
@@ -3,9 +3,8 @@extern ia64_mv_setup_t dig_setup;extern ia64_mv_irq_init_t dig_irq_init; -extern ia64_mv_pci_fixup_t dig_pci_fixup; -extern ia64_mv_map_nr_t map_nr_dense;extern ia64_mv_pci_fixup_t iosapic_pci_fixup; +extern ia64_mv_map_nr_t map_nr_dense;/* * This stuff has dual use!
include/asm-ia64/machvec_hpsim.h +0 -1
@@ -15,7 +15,6 @@#define platform_name "hpsim"#define platform_setup hpsim_setup#define platform_irq_init hpsim_irq_init -#define platform_pci_fixup hpsim_pci_fixup#define platform_map_nr map_nr_dense#endif /* _ASM_IA64_MACHVEC_HPSIM_h */
include/asm-ia64/machvec_init.h +8 -0
@@ -4,6 +4,14 @@#include <asm/machvec.h> +extern ia64_mv_send_ipi_t ia64_send_ipi; +extern ia64_mv_inb_t __ia64_inb; +extern ia64_mv_inw_t __ia64_inw; +extern ia64_mv_inl_t __ia64_inl; +extern ia64_mv_outb_t __ia64_outb; +extern ia64_mv_outw_t __ia64_outw; +extern ia64_mv_outl_t __ia64_outl; +#define MACHVEC_HELPER (name) \ struct ia64_machine_vector machvec_##name __attribute__ ((unused, __section__ (".machvec"))) \ = MACHVEC_INIT(name);
include/asm-ia64/machvec_sn1.h +2 -0
@@ -4,6 +4,7 @@extern ia64_mv_setup_t sn1_setup;extern ia64_mv_irq_init_t sn1_irq_init;extern ia64_mv_map_nr_t sn1_map_nr; +extern ia64_mv_send_ipi_t sn1_send_IPI;/* * This stuff has dual use!
@@ -16,5 +17,6 @@#define platform_setup sn1_setup#define platform_irq_init sn1_irq_init#define platform_map_nr sn1_map_nr +#define platform_send_ipi sn1_send_IPI#endif /* _ASM_IA64_MACHVEC_SN1_h */
include/asm-ia64/mmu_context.h +5 -24
@@ -32,20 +32,11 @@#define IA64_REGION_ID_KERNEL 0/* the kernel's region id (tlb.c depends on this being 0) */ -#define IA64_REGION_ID_BITS 18 - -#ifdef CONFIG_IA64_TLB_CHECKS_REGION_NUMBER -# define IA64_HW_CONTEXT_BITS IA64_REGION_ID_BITS -#else -# define IA64_HW_CONTEXT_BITS (IA64_REGION_ID_BITS - 3) -#endif - -#define IA64_HW_CONTEXT_MASK ((1UL << IA64_HW_CONTEXT_BITS) - 1) -struct ia64_ctx {spinlock_t lock;unsigned int next;/* next context number to use */ unsigned int limit;/* next >= limit => must call wrap_mmu_context() */ +unsigned int max_ctx;/* max. context value supported by all CPUs */ };extern struct ia64_ctx ia64_ctx;
@@ -60,11 +51,7 @@static inline unsigned long ia64_rid (unsigned long context,unsigned long region_addr) { -# ifdef CONFIG_IA64_TLB_CHECKS_REGION_NUMBER -return context; -# else return context <<3 | (region_addr >>61 ); -# endif } static inline void
@@ -108,12 +95,8 @@unsigned long rid_incr =0 ;unsigned long rr0, rr1, rr2, rr3, rr4; - rid = mm->context; - -#ifndef CONFIG_IA64_TLB_CHECKS_REGION_NUMBER - rid <<=3 ;/* make space for encoding the region number */ + rid = mm->context <<3 ;/* make space for encoding the region number */ rid_incr =1 <<8 ; -#endif /* encode the region id, preferred page size, and VHPT enable bit: */ rr0 = (rid <<8 ) | (PAGE_SHIFT <<2 ) |1 ;
@@ -132,11 +115,10 @@ }/* -* Switch from address space PREV to address space NEXT. Note that -* TSK may be NULL. +* Switch from address space PREV to address space NEXT. */ static inline void -switch_mm (struct mm_struct *prev,struct mm_struct *next,struct task_struct *tsk,unsigned cpu) +activate_mm (struct mm_struct *prev,struct mm_struct *next) {/* * We may get interrupts here, but that's OK because interrupt
@@ -147,7 +129,6 @@ reload_context(next); } -#define activate_mm (prev,next) \ - switch_mm((prev), (next), NULL, smp_processor_id()) +#define switch_mm (prev_mm,next_mm,next_task,cpu) activate_mm(prev_mm, next_mm)#endif /* _ASM_IA64_MMU_CONTEXT_H */
include/asm-ia64/page.h +1 -2
@@ -58,7 +58,6 @@#define pgprot_val (x) ((x).pgprot)#define __pte (x) ((pte_t) { (x) } ) -#define __pgd (x) ((pgd_t) { (x) } )#define __pgprot (x) ((pgprot_t) { (x) } )# else /* !STRICT_MM_TYPECHECKS */
@@ -102,7 +101,7 @@#ifdef CONFIG_IA64_GENERIC # include <asm/machvec.h> # define virt_to_page (kaddr) (mem_map + platform_map_nr(kaddr)) -#elif defined (CONFIG_IA64_SN_SN1 ) +#elif defined (CONFIG_IA64_SN_SGI_SN1 )# define virt_to_page (kaddr) (mem_map + MAP_NR_SN1(kaddr))#else # define virt_to_page (kaddr) (mem_map + MAP_NR_DENSE(kaddr))
include/asm-ia64/pgtable.h +48 -23
158 lines not on this page · raw message
include/asm-ia64/processor.h +3 -0
@@ -248,6 +248,9 @@__u64 usec_per_cyc;/* 2^IA64_USEC_PER_CYC_SHIFT*1000000/itc_freq */ __u64 unimpl_va_mask;/* mask of unimplemented virtual address bits (from PAL) */ __u64 unimpl_pa_mask;/* mask of unimplemented physical address bits (from PAL) */ +__u64 ptce_base; +__u32 ptce_count[2 ]; +__u32 ptce_stride[2 ];#ifdef CONFIG_SMP __u64 loops_per_sec;__u64 ipi_count;
include/asm-ia64/sal.h +196 -184
567 lines not on this page · raw message
kernel/printk.c +1 -1
@@ -512,7 +512,7 @@#include <asm/io.h> -#define VGABASE ((char *)0x00000000000b8000) +#define VGABASE ((char *)0xc0000000000b8000)static int current_ypos =50 , current_xpos =0 ;
mm/memory.c +1 -1
@@ -227,7 +227,7 @@/* If it's a COW mapping, write protect it both in the parent and the child */ if (cow) { -ptep_clear_wrprotect (src_pte); +ptep_set_wrprotect (src_pte); pte = *src_pte; }
[Linux-ia64] kernel update (relative to 2.4.0-test11)
In reply to David MosbergerThe directory at:
ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/
now has files linux-2.4.0-test11-ia64-001206.diff* which contain the latest IA-64 kernel diff relative to Linus' 2.4.0-test11.
This patch makes a significant change to the virtual memory space of IA-64 Linux: so far, within each region, the first N bytes and the last N bytes could be mapped by a process (with N=2^39 when 8KB pages are in use). This patch changes this so that all mappable space is at the beginning of a region. That is, region offsets 0-(2*N-1) are now mappable instead. This change was necessary to fix the bug that Asit discovered under heavy swap activity when the memory size was 256MB (there is nothing magic about this size; the problem could have occurred with other sizes as well). Normal applications should not notice this change, though if something has stack-related addresses hardcoded, those applications need to be updated, obviously (it's usually a bad idea to hardcode such things anyhow).
Other changes:
- Matt: EFI CRC updates to avoid copyright issues
- Andreas: fix typo in __NR_pivot_root
- Jonathan: don't acquire xtime_lock in timer interrupt of application processors
- Kanoj: updates for SN1 machine
- Intel: lots of ACPI updates (including ACPI 2.0 support)
- Asit: place the virtual linear page table is at the end of a region and make it big enough to map the entire implemented virtual address within a region
- Asit (I think): fix for software I/O TLB problems
- export more kernel symbols for modules
- platform_pci_fixup() is now called twice: once before the PCI busscan and once after
- NaT Consumption faults and Unsupported Data Reference faults now result in SIGILL with no kernel messages printed; you can tell from the siginfo's si_code and si_imm values what caused the signal: si_code=ILL_ILLOPN and si_imm& implies
NaT Consumption, si_imm1 implies Unsupported Data Reference
- fix a bug in the IA-64 page fault handler which caused it to pick up the wrong VMA for permission checking when
the VMA was growing towards higher addresses; this hasn't caused any known errors, but was a potential source of problems and had to be fixed; thanks to Matthew Willcox for pointing this out
- fix for fcntl(F_GETOWN) failure reported by SCO (this is untested; could someone from SCO rerun the test and let me know if it does indeed fix the problem?)
CAVEAT: the kernel now relies on PAL_VM_SUMMARY returning the correct value for IMPL_VA_MSB. If you have old firmware, this may cause the kernel to fail to boot. To find out, look for the message of the form:
CPU 0: XX virtual and YY physical address bits
if XX is anything other than 50, you need to upgrade your firmware.
This kernel is known to build and run on 2P Big Sur and the HP Ski simulator. I expect it to work fine on 4P Lion and UP as well.
As usual, the attached relative diff is fyi only.
Enjoy,
--david
arch/ia64/Makefile +0 -0
@@ -19,22 +19,28 @@ EXTRA CFLAGS := $(CFLAGS) -pipe $(EXTRA) -Wa,-x -ffixed-r13 -mfixed-rangeñ0-f15,f32-f127 \
-funwind-tables
CFLAGS_KERNEL := -mconstant-gp
ifeq ($(CONFIG_ITANIUM_ASTEP_SPECIFIC),y)
CFLAGS += -ma-step
endif
+ifeq ($(CONFIG_ITANIUM_BSTEP_SPECIFIC),y)
+ CFLAGS += -mb-step
+endif
ifdef CONFIG_IA64_GENERIC
CORE_FILES := arch/$(ARCH)/hp/hp.a \
arch/$(ARCH)/sn/sn.a \
arch/$(ARCH)/dig/dig.a \
+ arch/$(ARCH)/sn/io/sgiio.o \
$(CORE_FILES)
SUBDIRS := arch/$(ARCH)/hp \
arch/$(ARCH)/sn/sn1 \
arch/$(ARCH)/sn \
arch/$(ARCH)/dig \
+ arch/$(ARCH)/sn/io \
$(SUBDIRS)
else # !GENERIC
@@ -47,10 +53,7 @@
endif
ifdef CONFIG_IA64_SGI_SN1
-CFLAGS := $(CFLAGS) -DSN -I. -DBRINGUP -DDIRECT_L1_CONSOLE \
- -DNUMA_BASE -DSIMULATED_KLGRAPH -DNUMA_MIGR_CONTROL \
- -DLITTLE_ENDIAN -DREAL_HARDWARE -DLANGUAGE_C=1 \
- -D_LANGUAGE_C=1
+CFLAGS += -DBRINGUP
SUBDIRS := arch/$(ARCH)/sn/sn1 \
arch/$(ARCH)/sn \
arch/$(ARCH)/sn/io \
@@ -96,7 +99,7 @@
arch/$(ARCH)/vmlinux.lds: arch/$(ARCH)/vmlinux.lds.S FORCE
$(CPP) -D__ASSEMBLY__ -C -P -I$(HPATH) -I$(HPATH)/asm-$(ARCH) \
- arch/$(ARCH)/vmlinux.lds.S > $@
+ -traditional arch/$(ARCH)/vmlinux.lds.S > $@
FORCE: ;
arch/ia64/config.in +3 -1
@@ -59,6 +59,7 @@ bool ' Enable SoftSDV hacks' CONFIG_IA64_SOFTSDV_HACKS bool ' Enable AzusA hacks' CONFIG_IA64_AZUSA_HACKS bool ' Enable IA-64 Machine Check Abort' CONFIG_IA64_MCA + bool ' Enable ACPI 2.0 with errata 1.3' CONFIG_ACPI20 bool ' ACPI kernel configuration manager (EXPERIMENTAL)' CONFIG_ACPI_KERNEL_CONFIG if [ "$CONFIG_ACPI_KERNEL_CONFIG" = "y" ]; then define_bool CONFIG_PM y
@@ -79,8 +80,9 @@ define_bool CONFIG_DEVFS_FS y define_bool CONFIG_IA64_BRL_EMU y define_bool CONFIG_IA64_MCA y - define_bool CONFIG_IA64_SGI_IO y define_bool CONFIG_ITANIUM y + define_bool CONFIG_SGI_IOC3_ETH y + bool ' Enable DISCONTIGMEM support' CONFIG_DISCONTIGMEM y fi define_bool CONFIG_KCORE_ELF y # On IA-64, we always want an ELF /proc/kcore.
arch/ia64/hp/hpsim_setup.c +0 -6
@@ -63,12 +63,6 @@ }void __init -hpsim_pci_fixup (void ) -{ -} - - -void __init hpsim_setup (char **cmdline_p) {ROOT_DEV =to_kdev_t (0x0801 );/* default to first SCSI drive */
arch/ia64/kernel/acpi.c +278 -54
392 lines not on this page · raw message
arch/ia64/kernel/efi.c +3 -0
@@ -332,6 +332,9 @@if (efi_guidcmp (config_tables[i].guid,MPS_TABLE_GUID ) =0 ) { efi.mps =__va (config_tables[i].table);printk (" MPS=0x%lx" , config_tables[i].table); + }else if (efi_guidcmp (config_tables[i].guid,ACPI_20_TABLE_GUID ) =0 ) { + efi.acpi20 =__va (config_tables[i].table); +printk (" ACPI 2.0=0x%lx" , config_tables[i].table); }else if (efi_guidcmp (config_tables[i].guid,ACPI_TABLE_GUID ) =0 ) { efi.acpi =__va (config_tables[i].table);printk (" ACPI=0x%lx" , config_tables[i].table);
arch/ia64/kernel/ia64_ksyms.c +3 -0
@@ -92,6 +92,9 @@#include <asm/uaccess.h> EXPORT_SYMBOL (__copy_user);EXPORT_SYMBOL (__do_clear_user); +EXPORT_SYMBOL (__strlen_user); +EXPORT_SYMBOL (__strncpy_from_user); +EXPORT_SYMBOL (__strnlen_user);#include <asm/unistd.h> EXPORT_SYMBOL (__ia64_syscall);
arch/ia64/kernel/iosapic.c +4 -1
@@ -443,11 +443,14 @@ }void -iosapic_pci_fixup (void ) +iosapic_pci_fixup (int phase) {struct pci_dev *dev;unsigned char pin;int vector; + +if (phase !=1 ) +return ;pci_for_each_dev (dev) {pci_read_config_byte (dev,PCI_INTERRUPT_PIN , &pin);
arch/ia64/kernel/ivt.S +31 -27
131 lines not on this page · raw message
arch/ia64/kernel/pci-dma.c +16 -7
@@ -24,7 +24,8 @@#include <linux/init.h> #include <linux/bootmem.h> -#define ALIGN (val, align) ((unsigned long) (((unsigned long) (val) + ((align) - 1)) & ~((align) - 1))) +#define ALIGN (val, align) ((unsigned long) \ + (((unsigned long) (val) + ((align) - 1)) & ~((align) - 1)))/* * log of the size of each IO TLB slab. The number of slabs is command line
@@ -109,7 +110,8 @@ {unsigned long flags;char *dma_addr; -unsigned int i, nslots, stride, index, wrap; +unsigned int nslots, stride, index, wrap; +int i;/* * For mappings greater than a page size, we limit the stride (and hence alignment)
@@ -133,7 +135,7 @@ wrap = index =ALIGN (io_tlb_index, stride);if (index >= io_tlb_nslabs) - index =0 ; + wrap = index =0 ; do { /*
@@ -142,14 +144,19 @@* entries as '0' indicating unavailable. */ if (io_tlb_list[index] >= nslots) { +int count =0 ; +for (i = index; i < index + nslots; i++) io_tlb_list[i] =0 ; +for (i = index -1 ; (i >=0 ) && io_tlb_list[i]; i--) + io_tlb_list[i] = ++count; dma_addr = io_tlb_start + (index <<IO_TLB_SHIFT );/* * Update the indices to avoid searching in the next round. */ - io_tlb_index = (index + nslots) < io_tlb_nslabs ? (index + nslots) :0 ; + io_tlb_index = ((index + nslots) < io_tlb_nslabs + ? (index + nslots) :0 ); goto found; }
@@ -209,15 +216,17 @@ {int count = ((index + nslots) < io_tlb_nslabs ? io_tlb_list[index + nslots] :0 );/* -* Step 1: return the slots to the free list, merging the slots with superceeding slots +* Step 1: return the slots to the free list, merging the slots with +* superceeding slots */ for (i = index + nslots -1 ; i >= index; i--) io_tlb_list[i] = ++count;/* -* Step 2: merge the returned slots with the preceeding slots, if available (non zero) +* Step 2: merge the returned slots with the preceeding slots, if +* available (non zero) */ for (i = index -1 ; (i >=0 ) && io_tlb_list[i]; i--) - io_tlb_list[i] += io_tlb_list[index]; + io_tlb_list[i] = ++count; }spin_unlock_irqrestore (&io_tlb_lock, flags); }
arch/ia64/kernel/pci.c +4 -1
@@ -122,10 +122,13 @@# define PCI_BUSES_TO_SCAN 255int i; +platform_pci_fixup (0 );/* phase 0 initialization (before PCI bus has been scanned) */ +printk ("PCI: Probing PCI hardware\n" );for (i =0 ; i <PCI_BUSES_TO_SCAN ; i++)pci_scan_bus (i, &pci_conf,NULL ); -platform_pci_fixup (); + +platform_pci_fixup (1 );/* phase 1 initialization (after PCI bus has been scanned) */ return ; }
arch/ia64/kernel/setup.c +6 -8
@@ -235,6 +235,12 @@machvec_init (acpi_get_sysname ());#endif +#ifdef CONFIG_ACPI20 +if (efi.acpi20) { +/* Parse the ACPI 2.0 tables */ +acpi20_parse (efi.acpi20); + } else +#endif if (efi.acpi) {/* Parse the ACPI tables */ acpi_parse (efi.acpi);
@@ -376,15 +382,7 @@ status =ia64_pal_vm_summary (&vm1, &vm2);if (status =PAL_STATUS_SUCCESS ) { -#if 1 -/* -* XXX the current PAL code returns IMPL_VA_MSB=60, which is dead-wrong. -* --davidm 00/05/26 -s*/ - impl_va_msb =50 ; -#else impl_va_msb = vm2.pal_vm_info_2_s.impl_va_msb; -#endif phys_addr_size = vm1.pal_vm_info_1_s.phys_add_size; } printk("CPU %d: %lu virtual and %lu physical address bits\n",
arch/ia64/kernel/sys_ia64.c +6 -9
@@ -95,10 +95,10 @@static inline unsigned long do_mmap2 (unsigned long addr,unsigned long len,int prot,int flags,int fd,unsigned long pgoff) { -unsigned long loff, hoff; +unsigned long roff;struct file *file =0 ;/* the virtual address space that is mappable in each region: */ -# define OCTANT_SIZE ((PTRS_PER_PGD<<PGDIR_SHIFT)/8) +# define OCTANT_SIZE (1UL << (4*PAGE_SHIFT - 12))/* * A zero mmap always succeeds in Linux, independent of
@@ -107,15 +107,12 @@if (PAGE_ALIGN (len) =0 )return addr; -/* Don't permit mappings into or across the address hole in a region: */ - loff =rgn_offset (addr); - hoff = loff - (RGN_SIZE -OCTANT_SIZE /2 ); -if ((len | loff | (loff + len)) >=OCTANT_SIZE /2 - && (len | hoff | (hoff + len)) >=OCTANT_SIZE /2 ) +/* don't permit mappings into unmapped space or the virtual page table of a region: */ + roff =rgn_offset (addr); +if ((len | roff | (roff + len)) >=OCTANT_SIZE )return -EINVAL ; -/* Don't permit mappings that would cross a region boundary: */ - +/* don't permit mappings that would cross a region boundary: */ if (rgn_index (addr) !=rgn_index (addr + len))return -EINVAL ;
arch/ia64/kernel/time.c +14 -41
81 lines not on this page · raw message
arch/ia64/kernel/traps.c +19 -4
@@ -78,7 +78,7 @@ die_if_kernel (char *str, struct pt_regs *regs, long err) {if (user_mode (regs)) { -#if 1 +#if 0 /* XXX for debugging only */ printk ("!!die_if_kernel: %s(%d): %s %ld\n" , current->comm, current->pid, str, err);
@@ -484,6 +484,20 @@sprintf (buf,"Disabled FPL fault---not supposed to happen!" );break ; +case 26 :/* NaT Consumption */ +case 31 :/* Unsupported Data Reference */ +if (user_mode (regs)) { + siginfo.si_signo =SIGILL ; + siginfo.si_code =ILL_ILLOPN ; + siginfo.si_errno =0 ; + siginfo.si_addr = (void *) (regs->cr_iip +ia64_psr (regs)->ri); + siginfo.si_imm = vector; +force_sig_info (SIGILL , &siginfo, current); +return ; + } +sprintf (buf, (vector =26 ) ?"NaT consumption" :"Unsupported data reference" ); +break ; +case 29 :/* Debug */ case 35 :/* Taken Branch Trap */ case 36 :/* Single Step Trap */
@@ -522,10 +536,10 @@case 34 :/* Unimplemented Instruction Address Trap */ if (user_mode (regs)) { -printk ("Woah! Unimplemented Instruction Address Trap!\n" ); - siginfo.si_code =ILL_BADIADDR ; siginfo.si_signo =SIGILL ; + siginfo.si_code =ILL_BADIADDR ; siginfo.si_errno =0 ; + siginfo.si_addr = (void *) (regs->cr_iip +ia64_psr (regs)->ri);force_sig_info (SIGILL , &siginfo, current);return ; }
@@ -544,7 +558,8 @@case 46 :printk ("Unexpected IA-32 intercept trap (Trap 46)\n" ); -printk (" iip - 0x%lx, ifa - 0x%lx, isr - 0x%lx, iim - 0x%lx\n" , regs->cr_iip, ifa, isr, iim); +printk (" iip - 0x%lx, ifa - 0x%lx, isr - 0x%lx, iim - 0x%lx\n" , + regs->cr_iip, ifa, isr, iim);force_sig (SIGSEGV , current);return ;
arch/ia64/lib/memcpy.S +23 -0
@@ -106,6 +106,13 @@ (p7) br.cond.spnt.few memcpy_short (p6) br.cond.spnt.few memcpy_long ;; + nop.m 0 + ;; + nop.m 0 + nop.i 0 + ;; + nop.m 0 + ;; .rotr val[N] .rotp p[N] .align 32
@@ -139,6 +146,15 @@ ;; mov ar.lc=cnt ;; + nop.m 0 + ;; + nop.m 0 + nop.i 0 + ;; + nop.m 0 + ;; + nop.m 0 + ;; /* * It is faster to put a stop bit in the loop here because it makes * the pipeline shorter (and latency is what matters on short copies).
@@ -249,6 +265,13 @@ add t4=t0,t4 mov pr=cnt,0x38 // set (p5,p4,p3) to # of bytes last-word bytes to copy mov ar.lc=t2 + ;; + nop.m 0 + ;; + nop.m 0 + nop.i 0 + ;; + nop.m 0 ;; (p6) ld8 val[1]=[src2],8 // prime the pump... mov b6=t4
arch/ia64/mm/fault.c +16 -5
@@ -121,17 +121,19 @@ goto bad_area;if (expand_stack (vma, address)) goto bad_area; - }else if (expand_backing_store (prev_vma, address)) - goto bad_area; + }else { + vma = prev_vma; +if (expand_backing_store (vma, address)) + goto bad_area; + } goto good_area; bad_area:up (&mm->mmap_sem);if (isr &IA64_ISR_SP ) {/* -* This fault was due to a speculative load set the -* "ed" bit in the psr to ensure forward progress -* (target register will get a NaT). +* This fault was due to a speculative load set the "ed" bit in the psr to +* ensure forward progress (target register will get a NaT). */ ia64_psr (regs)->ed =1 ;return ;
@@ -146,6 +148,15 @@ } no_context: +if (isr &IA64_ISR_SP ) { +/* +* This fault was due to a speculative load set the "ed" bit in the psr to +* ensure forward progress (target register will get a NaT). +*/ +ia64_psr (regs)->ed =1 ; +return ; + } + fix =search_exception_table (regs->cr_iip);if (fix) { regs->r8 = -EFAULT ;
arch/ia64/mm/init.c +34 -27
85 lines not on this page · raw message
arch/ia64/mm/tlb.c +4 -0
@@ -194,7 +194,11 @@if (mm != current->active_mm) {/* this does happen, but perhaps it's not worth optimizing for? */ +#ifdef CONFIG_SMP +flush_tlb_all (); +#else mm->context =0 ; +#endif return ; }
drivers/acpi/Makefile +10 -5
@@ -2,7 +2,7 @@ # Makefile for the Linux ACPI interpreter # -SUB_DIRS :+SUB_DIRS := MOD_SUB_DIRS := $(SUB_DIRS) MOD_IN_SUB_DIRS : ALL_SUB_DIRS := $(SUB_DIRS)
@@ -12,27 +12,33 @@ M_OBJS : export ACPI_CFLAGS -#ACPI_CFLAGS := -D_LINUX -DCONFIG_ACPI_KERNEL_CONFIG_CBN_FIX -DCONFIG_ACPI_KERNEL_CONFIG_ONLY -DCONFIG_ACPI_KERNEL_CONFIG_DEBUG -DCONFIG_ACPI_KERNEL_CONFIG_BM_PROFILE -ACPI_CFLAGS := -D_LINUX -DCONFIG_ACPI_KERNEL_CONFIG_CBN_FIX -DCONFIG_ACPI_KERNEL_CONFIG_ONLY +ifdef CONFIG_ACPI_KERNEL_CONFIG + ACPI_CFLAGS := -D_LINUX -DCONFIG_ACPI_KERNEL_CONFIG_ONLY +else + ACPI_CFLAGS := -D_LINUX +endif EXTRA_CFLAGS += -I./include EXTRA_CFLAGS += $(ACPI_CFLAGS) # if the interpreter is used, it overrides arch/i386/kernel/acpi.c -ifeq ($(CONFIG_ACPI_INTERPRETER),y) +ifeq ($(CONFIG_ACPI),y) + SUB_DIRS += common dispatcher events hardware\ interpreter namespace parser resources tables + ACPI_OBJS := $(patsubst %,%.o,$(SUB_DIRS)) # ACPI_OBJS += $(patsubst %.c,%.o,$(wildcard *.c)) ifdef CONFIG_ACPI_KERNEL_CONFIG ACPI_OBJS += acpiconf.o osconf.o os.o else - ACPI_OBJS += driver.o ec.o cpu.o os.o sys.o table.o + ACPI_OBJS += driver.o cmbatt.o cpu.o ec.o ksyms.o os.o sys.o table.o endif O_OBJS += $(ACPI_OBJS) + OX_OBJS = ksyms.o endif include $(TOPDIR)/Rules.make
fs/fcntl.c +1 -0
@@ -269,6 +269,7 @@* to fix this will be in libc. */ err = filp->f_owner.pid; +force_successful_syscall_return ();break ;case F_SETOWN :lock_kernel ();
fs/partitions/efi.c +32 -71
145 lines not on this page · raw message
include/asm-ia64/a.out.h +4 -5
@@ -7,14 +7,13 @@* probably would be better to clean up binfmt_elf.c so it does not * necessarily depend on there being a.out support. * -* Copyright (C) 1998, 1999 Hewlett-Packard Co -* Copyright (C) 1998, 1999 David Mosberger-Tang <[email protected]> +* Copyright (C) 1998-2000 Hewlett-Packard Co +* Copyright (C) 1998-2000 David Mosberger-Tang <[email protected]> */ #include <linux/types.h> -struct exec -{ +struct exec {unsigned long a_info;unsigned long a_text;unsigned long a_data;
@@ -31,7 +30,7 @@#define N_TXTOFF (x) 0#ifdef __KERNEL__ -# define STACK_TOP 0xa000000000000000UL +# define STACK_TOP (0x8000000000000000UL + (1UL << (4*PAGE_SHIFT - 12)))# define IA64_RBS_BOT (STACK_TOP - 0x80000000L)/* bottom of register backing store */ #endif
include/asm-ia64/acpi-ext.h +114 -29
206 lines not on this page · raw message
include/asm-ia64/efi.h +5 -1
@@ -168,6 +168,9 @@#define ACPI_TABLE_GUID \ ((efi_guid_t) { 0xeb9d2d30, 0x2d88, 0x11d3, { 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d }}) +#define ACPI_20_TABLE_GUID \ + ((efi_guid_t) { 0x8868e871, 0xe4f1, 0x11d3, { 0xbc, 0x22, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 }}) +#define SMBIOS_TABLE_GUID \ ((efi_guid_t) { 0xeb9d2d31, 0x2d88, 0x11d3, { 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d }})
@@ -204,7 +207,8 @@ extern struct efi { efi_system_table_t *systab; /* EFI system table */ void *mps; /* MPS table */ - void *acpi; /* ACPI table */ + void *acpi; /* ACPI table (IA64 ext 0.71) */ + void *acpi20; /* ACPI table (ACPI 2.0) */ void *smbios; /* SM BIOS table */ void *sal_systab; /* SAL system table */ void *boot_info; /* boot info table */
include/asm-ia64/iosapic.h +1 -1
@@ -56,7 +56,7 @@extern void __init iosapic_init (unsigned long address,unsigned int base_irq);extern void iosapic_register_legacy_irq (unsigned long irq,unsigned long pin,unsigned long polarity,unsigned long trigger); -extern void iosapic_pci_fixup (void ); +extern void iosapic_pci_fixup (int );# endif /* !__ASSEMBLY__ */ #endif /* __ASM_IA64_IOSAPIC_H */
include/asm-ia64/machvec.h +1 -1
@@ -25,7 +25,7 @@typedef void ia64_mv_setup_t (char **);typedef void ia64_mv_irq_init_t (void ); -typedef void ia64_mv_pci_fixup_t (void ); +typedef void ia64_mv_pci_fixup_t (int );typedef unsigned long ia64_mv_map_nr_t (unsigned long );typedef void ia64_mv_mca_init_t (void );typedef void ia64_mv_mca_handler_t (void );
include/asm-ia64/machvec_sn1.h +14 -0
@@ -5,6 +5,13 @@extern ia64_mv_irq_init_t sn1_irq_init;extern ia64_mv_map_nr_t sn1_map_nr;extern ia64_mv_send_ipi_t sn1_send_IPI; +extern ia64_mv_pci_fixup_t sn1_pci_fixup; +extern ia64_mv_inb_t sn1_inb; +extern ia64_mv_inw_t sn1_inw; +extern ia64_mv_inl_t sn1_inl; +extern ia64_mv_outb_t sn1_outb; +extern ia64_mv_outw_t sn1_outw; +extern ia64_mv_outl_t sn1_outl;/* * This stuff has dual use!
@@ -18,5 +25,12 @@#define platform_irq_init sn1_irq_init#define platform_map_nr sn1_map_nr#define platform_send_ipi sn1_send_IPI +#define platform_pci_fixup sn1_pci_fixup +#define platform_inb sn1_inb +#define platform_inw sn1_inw +#define platform_inl sn1_inl +#define platform_outb sn1_outb +#define platform_outw sn1_outw +#define platform_outl sn1_outl#endif /* _ASM_IA64_MACHVEC_SN1_h */
include/asm-ia64/mca.h +4 -4
@@ -46,11 +46,11 @@u64 cmcv_regval;struct {u64 cmcr_vector :8 ; -u64 cmcr_ignored1 :47 ; +u64 cmcr_reserved1 :4 ; +u64 cmcr_ignored1 :1 ; +u64 cmcr_reserved2 :3 ;u64 cmcr_mask :1 ; -u64 cmcr_reserved1 :3 ; -u64 cmcr_ignored2 :1 ; -u64 cmcr_reserved2 :4 ; +u64 cmcr_ignored2 :47 ; } cmcv_reg_s; } cmcv_reg_t;
include/asm-ia64/offsets.h +6 -6
@@ -11,7 +11,7 @@#define PT_PTRACED_BIT 0#define PT_TRACESYS_BIT 1 -#define IA64_TASK_SIZE 3328/* 0xd00 */ +#define IA64_TASK_SIZE 3472/* 0xd90 */ #define IA64_PT_REGS_SIZE 400/* 0x190 */ #define IA64_SWITCH_STACK_SIZE 560/* 0x230 */ #define IA64_SIGINFO_SIZE 128/* 0x80 */
@@ -21,10 +21,10 @@#define IA64_TASK_SIGPENDING_OFFSET 16/* 0x10 */ #define IA64_TASK_NEED_RESCHED_OFFSET 40/* 0x28 */ #define IA64_TASK_PROCESSOR_OFFSET 100/* 0x64 */ -#define IA64_TASK_THREAD_OFFSET 1424/* 0x590 */ -#define IA64_TASK_THREAD_KSP_OFFSET 1424/* 0x590 */ -#define IA64_TASK_THREAD_SIGMASK_OFFSET 3184/* 0xc70 */ -#define IA64_TASK_PID_OFFSET 188/* 0xbc */ +#define IA64_TASK_THREAD_OFFSET 960/* 0x3c0 */ +#define IA64_TASK_THREAD_KSP_OFFSET 960/* 0x3c0 */ +#define IA64_TASK_THREAD_SIGMASK_OFFSET 3328/* 0xd00 */ +#define IA64_TASK_PID_OFFSET 196/* 0xc4 */ #define IA64_TASK_MM_OFFSET 88/* 0x58 */ #define IA64_PT_REGS_CR_IPSR_OFFSET 0/* 0x0 */ #define IA64_PT_REGS_CR_IIP_OFFSET 8/* 0x8 */
@@ -115,7 +115,7 @@#define IA64_SWITCH_STACK_AR_UNAT_OFFSET 528/* 0x210 */ #define IA64_SWITCH_STACK_AR_RNAT_OFFSET 536/* 0x218 */ #define IA64_SWITCH_STACK_AR_BSPSTORE_OFFSET 544/* 0x220 */ -#define IA64_SWITCH_STACK_PR_OFFSET 464/* 0x1d0 */ +#define IA64_SWITCH_STACK_PR_OFFSET 552/* 0x228 */ #define IA64_SIGCONTEXT_AR_BSP_OFFSET 72/* 0x48 */ #define IA64_SIGCONTEXT_AR_RNAT_OFFSET 80/* 0x50 */ #define IA64_SIGCONTEXT_FLAGS_OFFSET 0/* 0x0 */
include/asm-ia64/page.h +7 -11
@@ -92,21 +92,17 @@*/ #define MAP_NR_DENSE (addr) (((unsigned long) (addr) - PAGE_OFFSET) >> PAGE_SHIFT) -/* -* This variant works well for the SGI SN1 architecture (which does have huge -* holes in the memory address space). -*/ -#define MAP_NR_SN1 (addr) (((unsigned long) (addr) - PAGE_OFFSET) >> PAGE_SHIFT) -#ifdef CONFIG_IA64_GENERIC # include <asm/machvec.h> -# define virt_to_page (kaddr) (mem_map + platform_map_nr(kaddr)) -#elif defined (CONFIG_IA64_SN_SGI_SN1 ) -# define virt_to_page (kaddr) (mem_map + MAP_NR_SN1(kaddr)) +# define virt_to_page (kaddr) (mem_map + platform_map_nr(kaddr)) +#elif defined (CONFIG_IA64_SGI_SN1 ) +# ifndef CONFIG_DISCONTIGMEM +# define virt_to_page (kaddr) (mem_map + MAP_NR_DENSE(kaddr)) +# endif #else -# define virt_to_page (kaddr) (mem_map + MAP_NR_DENSE(kaddr)) +# define virt_to_page (kaddr) (mem_map + MAP_NR_DENSE(kaddr))#endif -#define VALID_PAGE (page) ((page - mem_map) < max_mapnr) +#define VALID_PAGE (page) ((page - mem_map) < max_mapnr) typedef union ia64_va { struct {
include/asm-ia64/pgtable.h +4 -4
@@ -135,7 +135,7 @@#define __P011 PAGE_READONLY/* ditto */ #define __P100 __pgprot(__ACCESS_BITS | _PAGE_PL_3 | _PAGE_AR_X_RX)#define __P101 PAGE_COPY -#define __P110 PAGE_COPY +#define __P110 PAGE_COPY#define __P111 PAGE_COPY#define __S000 PAGE_NONE
@@ -214,13 +214,13 @@/* * On some architectures, special things need to be done when setting -* the PTE in a page table. Nothing special needs to be on ia-64. +* the PTE in a page table. Nothing special needs to be on IA-64. */ #define set_pte (ptep, pteval) (*(ptep) = (pteval)) -#define VMALLOC_START (0xa000000000000000+2*PAGE_SIZE) +#define VMALLOC_START (0xa000000000000000 + 2*PAGE_SIZE)#define VMALLOC_VMADDR (x) ((unsigned long)(x)) -#define VMALLOC_END (0xa000000000000000+ (1UL << (4*PAGE_SHIFT - 13))) +#define VMALLOC_END (0xa000000000000000 + (1UL << (4*PAGE_SHIFT - 12)))/* * BAD_PAGETABLE is used when we need a bogus page-table, while
include/asm-ia64/ptrace.h +13 -3
@@ -2,8 +2,8 @@#define _ASM_IA64_PTRACE_H/* -* Copyright (C) 1998, 1999 Hewlett-Packard Co -* Copyright (C) 1998, 1999 David Mosberger-Tang <[email protected]> +* Copyright (C) 1998-2000 Hewlett-Packard Co +* Copyright (C) 1998-2000 David Mosberger-Tang <[email protected]> * Copyright (C) 1998, 1999 Stephane Eranian <[email protected]> * * 12/07/98 S. Eranian added pt_regs & switch_stack
@@ -74,6 +74,9 @@#ifndef __ASSEMBLY__ +#include <asm/current.h> +#include <asm/page.h> +/* * This struct defines the way the registers are saved on system * calls.
@@ -236,7 +239,14 @@extern void ia64_increment_ip (struct pt_regs *pt);extern void ia64_decrement_ip (struct pt_regs *pt); -#endif + +static inline void +force_successful_syscall_return (void ) +{ +ia64_task_regs (current)->r8 =0 ; +} + +#endif /* !__KERNEL__ */ #endif /* !__ASSEMBLY__ */
include/asm-ia64/unistd.h +1 -1
@@ -196,7 +196,7 @@#define __NR_getsockopt 1204#define __NR_sendmsg 1205#define __NR_recvmsg 1206 -#define __NR_sys_pivot_root 1207 +#define __NR_pivot_root 1207#define __NR_mincore 1208#define __NR_madvise 1209#define __NR_stat 1210
include/linux/crc32.h +17 -0
@@ -0,0 +1,17 @@ +/* +* crc32.h +* See linux/lib/crc32.c for license and changes +*/ +#ifndef _LINUX_CRC32_H +#define _LINUX_CRC32_H + +#include <linux/types.h> + +/* +* This computes a 32 bit CRC of the data in the buffer, and returns the CRC. +* The polynomial used is 0xedb88320. +*/ + +extern u32 crc32 (const void *buf,unsigned long len,u32 seed); + +#endif /* _LINUX_CRC32_H */
lib/Makefile +1 -1
@@ -7,7 +7,7 @@ # L_TARGET := lib.a -L_OBJS := errno.o ctype.o string.o vsprintf.o brlock.o +L_OBJS := errno.o ctype.o string.o vsprintf.o brlock.o crc32.o LX_OBJS := cmdline.o ifneq ($(CONFIG_HAVE_DEC_LOCK),y)
lib/crc32.c +124 -0
124 lines not on this page · raw message
Re: [Linux-ia64] kernel update (relative to 2.4.0-test11)
In reply to David Mosberger David> CAVEAT: the kernel now relies on PAL_VM_SUMMARY returning the David> correct value for IMPL_VA_MSB. If you have old firmware, David> this may cause the kernel to fail to boot. To find out, look David> for the message of the form:
David> CPU 0: XX virtual and YY physical address bits
David> if XX is anything other than 50, you need to upgrade your David> firmware.
Make that 51 (IMPL_VA_MSB is 50 on Itanium, i.e., the number of virtual address bits is 51; some day I'll get this right... ;-)
Thanks to Matt for pointing this out and sorry for the confusion.
You can check whether your firmware is recent enough by doing:
fgrep Virtual /proc/pal/cpu0/vm_info
If it displays "51 bits", you're in fine shape.
--david
[Linux-ia64] kernel update (relative to 2.4.0-test12)
In reply to David MosbergerThe latest IA-64 patch is now available at:
ftp://ftp.kernel.org/pub/linux/kernel/port/pub/linux/kernel/ports/ia64/
in files linux-2.4.0-test12-ia64-001214.diff*
Summary of changes:
- Jonathan Nicklin: per-CPU interrupts now have their own IRQ handler to avoid unnecesary serialization due to irq descriptor locking
- Kanoj et al: various SGI SN1 updates
- Support for A1 step CPUs is gone
- The software I/O TLB implementation has moved from kernel/pci-dma.c to lib/swiotlb.c and the function names got renamed accordingly. This makes room for other (platform-dependent) implementations of the PCI DMA interface.
- Fix alternate TLB handlers to always set access rights to to RWX
- Fix Dirty bit handler to also set the Access bit (this is just a performance optimization)
- NaT demining: avoid crashing the kernel when the user passes NaT values to a system call
- re-structure the way i-cache flushing is done
- fix GENERIC build
Caveat: I consider this patch somewhat experimental because the i-cache flush restructuring changed the approach to cache flushing quite fundamentally. The new approach is all-improved and gives a nice performance boost when execve()ing binaries repeatedly. However, there is a small risk that something doesn't quite work the way it's supposed to. Thus, I'd like to see everyone giving this kernel a good workout and to report any new problems.
Enjoy,
--david
Documentation/Configure.help +0 -6
@@ -16931,12 +16931,6 @@ with an A-step CPU. You have an A-step CPU if the "revision" field in /proc/cpuinfo is 0. -Enable Itanium A1-step specific code -CONFIG_ITANIUM_A1_SPECIFIC - Select this option to build a kernel for an Itanium prototype system - with an A1-step CPU. If you don't know whether you have an A1-step CPU, - you probably don't and you can answer "no" here. - Enable Itanium B-step specific code CONFIG_ITANIUM_BSTEP_SPECIFIC Select this option to build a kernel for an Itanium prototype system
Documentation/IO-mapping.txt +6 -0
@@ -1,3 +1,9 @@ +[ NOTE: The virt_to_bus() and bus_to_virt() functions have been + superseded by the functionality provided by the PCI DMA + interface (see Documentation/DMA-mapping.txt). They continue + to be documented below for historical purposes, but new code + must not use them. --davidm 00/12/12 ] + [ This is a mail message in response to a query on IO mapping, thus the strange format for a "document" ]
arch/ia64/boot/Makefile +3 -5
@@ -16,13 +16,12 @@ $(CC) $(AFLAGS) -traditional -c -o $*.o $< OBJECTS = bootloader.o -TARGETS +targets-y -ifdef CONFIG_IA64_HP_SIM - TARGETS += bootloader -endif +targets-$(CONFIG_IA64_HP_SIM) += bootloader +targets-$(CONFIG_IA64_GENERIC) += bootloader -all: $(TARGETS) +all: $(targets-y) bootloader: $(OBJECTS) $(LD) $(LINKFLAGS) $(OBJECTS) $(TOPDIR)/lib/lib.a $(TOPDIR)/arch/$(ARCH)/lib/lib.a \
arch/ia64/config.in +1 -5
@@ -18,7 +18,6 @@ comment 'General setup' define_bool CONFIG_IA64 y -define_bool CONFIG_SWIOTLB y # for now... define_bool CONFIG_ISA n define_bool CONFIG_EISA n
@@ -41,9 +40,6 @@ define_bool CONFIG_ITANIUM y define_bool CONFIG_IA64_BRL_EMU y bool ' Enable Itanium A-step specific code' CONFIG_ITANIUM_ASTEP_SPECIFIC - if [ "$CONFIG_ITANIUM_ASTEP_SPECIFIC" = "y" ]; then - bool ' Enable Itanium A1-step specific code' CONFIG_ITANIUM_A1_SPECIFIC - fi bool ' Enable Itanium B-step specific code' CONFIG_ITANIUM_BSTEP_SPECIFIC if [ "$CONFIG_ITANIUM_BSTEP_SPECIFIC" = "y" ]; then bool ' Enable Itanium B0-step specific code' CONFIG_ITANIUM_B0_SPECIFIC
@@ -75,7 +71,6 @@ bool ' Enable Itanium B0-step specific code' CONFIG_ITANIUM_B0_SPECIFIC fi bool ' Enable SGI Medusa Simulator Support' CONFIG_IA64_SGI_SN1_SIM n - bool ' Enable SGI hack for version 1.0 syngery bugs' CONFIG_IA64_SGI_SYNERGY_1_0_HACKS n define_bool CONFIG_DEVFS_DEBUG y define_bool CONFIG_DEVFS_FS y define_bool CONFIG_IA64_BRL_EMU y
@@ -83,6 +78,7 @@ define_bool CONFIG_ITANIUM y define_bool CONFIG_SGI_IOC3_ETH y bool ' Enable DISCONTIGMEM support' CONFIG_DISCONTIGMEM y + bool ' Enable NUMA support' CONFIG_NUMA y fi define_bool CONFIG_KCORE_ELF y # On IA-64, we always want an ELF /proc/kcore.
arch/ia64/kernel/Makefile +1 -1
@@ -10,7 +10,7 @@ all: kernel.o head.o init_task.o obj-y := acpi.o entry.o gate.o efi.o efi_stub.o irq.o irq_ia64.o irq_sapic.o ivt.o \ - machvec.o pal.o pci-dma.o process.o perfmon.o ptrace.o sal.o semaphore.o setup.o \ + machvec.o pal.o process.o perfmon.o ptrace.o sal.o semaphore.o setup.o \ signal.o sys_ia64.o traps.o time.o unaligned.o unwind.o obj-$(CONFIG_IA64_GENERIC) += machvec.o iosapic.o
arch/ia64/kernel/ia64_ksyms.c +0 -12
@@ -24,10 +24,6 @@EXPORT_SYMBOL (strstr);EXPORT_SYMBOL (strtok); -#include <linux/pci.h> -EXPORT_SYMBOL (pci_alloc_consistent); -EXPORT_SYMBOL (pci_free_consistent); -#include <linux/in6.h> #include <asm/checksum.h> /* not coded yet?? EXPORT_SYMBOL(csum_ipv6_magic); */
@@ -48,14 +44,6 @@#include <asm/page.h> EXPORT_SYMBOL (clear_page); - -#include <asm/pci.h> -EXPORT_SYMBOL (pci_dma_sync_sg); -EXPORT_SYMBOL (pci_dma_sync_single); -EXPORT_SYMBOL (pci_map_sg); -EXPORT_SYMBOL (pci_map_single); -EXPORT_SYMBOL (pci_unmap_sg); -EXPORT_SYMBOL (pci_unmap_single);#include <asm/processor.h> EXPORT_SYMBOL (cpu_data);
arch/ia64/kernel/irq.c +13 -2
@@ -541,6 +541,18 @@spin_unlock_irqrestore (&desc->lock, flags); } +void do_IRQ_per_cpu (unsigned long irq,struct pt_regs *regs) +{ +irq_desc_t *desc = irq_desc + irq; +int cpu =smp_processor_id (); + + kstat.irqs[cpu][irq]++; + + desc->handler->ack (irq); +handle_IRQ_event (irq, regs, desc->action); + desc->handler->end (irq); +} +/* * do_IRQ handles all normal device IRQ's (the special * SMP cross-CPU interrupts have their own specific
@@ -581,8 +593,7 @@if (!(status & (IRQ_DISABLED |IRQ_INPROGRESS ))) { action = desc->action; status &= ~IRQ_PENDING ;/* we commit to handling */ -if (!(status &IRQ_PER_CPU )) - status |=IRQ_INPROGRESS ;/* we are handling it */ + status |=IRQ_INPROGRESS ;/* we are handling it */ } desc->status = status;
arch/ia64/kernel/irq_ia64.c +6 -73
126 lines not on this page · raw message
arch/ia64/kernel/ivt.S +35 -14
106 lines not on this page · raw message
arch/ia64/kernel/pci-dma.c +0 -530
530 lines not on this page · raw message
arch/ia64/kernel/setup.c +0 -7
@@ -261,13 +261,6 @@paging_init ();platform_setup (cmdline_p); - -#ifdef CONFIG_SWIOTLB - { -extern void setup_swiotlb (void ); -setup_swiotlb (); - } -#endif }/*
arch/ia64/kernel/smp.c +0 -4
@@ -81,10 +81,6 @@ };static volatile struct smp_call_struct *smp_call_function_data; -#ifdef CONFIG_ITANIUM_A1_SPECIFIC -extern spinlock_t ivr_read_lock; -#endif -#define IPI_RESCHEDULE 0#define IPI_CALL_FUNC 1#define IPI_CPU_STOP 2
arch/ia64/kernel/unwind.c +4 -0
@@ -521,6 +521,10 @@struct unw_reg_state *rs; rs =alloc_reg_state (); +if (!rs) { +printk ("unwind: cannot stack reg state!\n" ); +return ; + }memcpy (rs, &sr->curr,sizeof (*rs)); rs->next = sr->stack; sr->stack = rs;
arch/ia64/lib/Makefile +2 -1
@@ -11,7 +11,8 @@ __divdi3.o __udivdi3.o __moddi3.o __umoddi3.o \ checksum.o clear_page.o csum_partial_copy.o copy_page.o \ copy_user.o clear_user.o strncpy_from_user.o strlen_user.o strnlen_user.o \ - flush.o do_csum.o + flush.o do_csum.o \ + swiotlb.o ifneq ($(CONFIG_ITANIUM_ASTEP_SPECIFIC),y) L_OBJS += memcpy.o memset.o strlen.o
arch/ia64/lib/flush.S +16 -12
@@ -12,29 +12,33 @@ .psr lsb .lsb -GLOBAL_ENTRY(ia64_flush_icache_page) + /* + * flush_icache_range(start,end) + * Must flush range from start to end-1 but nothing else (need to + * be careful not to touch addresses that may be unmapped). + */ +GLOBAL_ENTRY(flush_icache_range) UNW(.prologue) - alloc r2=ar.pfs,1,0,0,0 + alloc r2=ar.pfs,2,0,0,0 + sub r8=in1,in0,1 + ;; + shr.u r8=r8,5 // we flush 32 bytes per iteration UNW(.save ar.lc, r3) mov r3=ar.lc // save ar.lc + ;; .body - mov r8=PAGE_SIZE/64-1 // repeat/until loop - ;; mov ar.lc=r8 - add r82,in0 ;; -.Loop1: fc in0 // issuable on M0 only - add in0d,in0 - fc r8 - add r8d,r8 - br.cloop.sptk.few .Loop1 +.Loop: fc in0 // issuable on M0 only + add in02,in0 + br.cloop.sptk.few .Loop ;; sync.i ;; srlz.i ;; mov ar.lc=r3 // restore ar.lc - br.ret.sptk.few rp -END(ia64_flush_icache_page) + br.ret.sptk.many rp +END(flush_icache_range)
arch/ia64/lib/io.c +52 -0
58 lines not on this page · raw message
arch/ia64/lib/swiotlb.c +454 -0
454 lines not on this page · raw message
arch/ia64/mm/init.c +11 -12
@@ -1,8 +1,8 @@/* * Initialize MMU support. * -* Copyright (C) 1998, 1999 Hewlett-Packard Co -* Copyright (C) 1998, 1999 David Mosberger-Tang <[email protected]> +* Copyright (C) 1998-2000 Hewlett-Packard Co +* Copyright (C) 1998-2000 David Mosberger-Tang <[email protected]> */ #include <linux/config.h> #include <linux/kernel.h>
@@ -19,6 +19,7 @@#include <asm/efi.h> #include <asm/ia32.h> #include <asm/io.h> +#include <asm/machvec.h> #include <asm/pgalloc.h> #include <asm/sal.h> #include <asm/system.h>
@@ -428,17 +429,15 @@extern char __start_gate_section[];long reserved_pages, codesize, datasize, initsize; -#ifdef CONFIG_SWIOTLB - { -/* -* This needs to be called _after_ the command line has been parsed but -* _before_ any drivers that may need the sw I/O TLB are initialized or -* bootmem has been freed. -*/ -extern void setup_swiotlb (void ); -setup_swiotlb (); - } +#ifdef CONFIG_PCI +/* +* This needs to be called _after_ the command line has been parsed but _before_ +* any drivers that may need the PCI DMA interface are initialized or bootmem has +* been freed. +*/ +platform_pci_dma_init ();#endif +if (!mem_map)BUG ();
arch/ia64/sn/fprom/fpmem.c +1 -1
@@ -176,7 +176,7 @@if (bank =0 ) { hole = (cnode =0 ) ?KERNEL_SIZE :PROMRESERVED_SIZE ; numbytes -= hole; -build_mem_desc (md,EFI_RUNTIME_SERVICES_CODE , paddr, hole); +build_mem_desc (md,EFI_RUNTIME_SERVICES_DATA , paddr, hole); paddr += hole; count++ ; md += mdsize;
arch/ia64/sn/fprom/fw-emu.c +5 -2
@@ -379,6 +379,9 @@memcpy (acpi_rsdt->header.signature,"RSDT" ,4 ); acpi_rsdt->header.length =sizeof (acpi_rsdt_t); +memcpy (acpi_rsdt->header.oem_id,"SGI" ,3 ); +memcpy (acpi_rsdt->header.oem_table_id,"SN1" ,3 ); + acpi_rsdt->header.oem_revision =0x00010001 ; acpi_rsdt->entry_ptrs[0 ] =__fwtab_pa (base_nasid, acpi_sapic);memcpy (acpi_sapic->header.signature,"SPIC " ,4 );
@@ -407,7 +410,7 @@ sal_systab->entry_count =3 ;strcpy (sal_systab->oem_id,"SGI" ); -strcpy (sal_systab->product_id,"sn1" ); +strcpy (sal_systab->product_id,"SN1" );/* fill in an entry point: */ sal_ed->type =SAL_DESC_ENTRY_POINT ;
@@ -464,7 +467,7 @@ bp->efi_memmap =__fwtab_pa (base_nasid, efi_memmap); bp->efi_memmap_size = num_memmd*mdsize; bp->efi_memdesc_size = mdsize; - bp->efi_memdesc_version =1 ; + bp->efi_memdesc_version =0x101 ; bp->command_line =__fwtab_pa (base_nasid, cmd_line); bp->console_info.num_cols =80 ; bp->console_info.num_rows =25 ;
arch/ia64/sn/io/klgraph_hack.c +3 -1
@@ -139,11 +139,12 @@uint64_t *tmp;volatile u32 *tmp32; +#ifdef 0/* Preset some values */ /* Write IOERR clear to clear the CRAZY bit in the status */ tmp = (uint64_t *)0xc0000a0001c001f8; *tmp = (uint64_t)0xffffffff;/* set widget control register...setting bedrock widget id to b */ - tmp = (uint64_t *)0xc0000a0001c00020 ; *tmp = (uint64_t )0x801b ; +/* tmp = (uint64_t *)0xc0000a0001c00020; *tmp = (uint64_t)0x801b; */ /* set io outbound widget access...allow all */ tmp = (uint64_t *)0xc0000a0001c00110 ; *tmp = (uint64_t )0xff01 ;/* set io inbound widget access...allow all */
@@ -163,6 +164,7 @@ *tmp32 =0xba98 ; tmp32 = (volatile u32 *)0xc0000a000f000288L ; *tmp32 =0xba98 ; +#endif printk ("Widget ID Address 0x%p Value 0x%lx\n" , (uint64_t *)0xc0000a0001e00000 , *( (volatile uint64_t *)0xc0000a0001e00000 ) );
arch/ia64/sn/io/ml_SN_intr.c +2 -0
@@ -19,6 +19,7 @@#include <linux/types.h> #include <linux/config.h> #include <linux/slab.h> +#include <asm/smp.h> #include <asm/sn/sgi.h> #include <asm/sn/iograph.h> #include <asm/sn/invent.h>
@@ -678,6 +679,7 @@int local_cpu_num; cpu =cnode_slice_to_cpuid (cnode, slice); + cpu =cpu_logical_id (cpu);if (cpu =CPU_NONE )continue ;
arch/ia64/sn/io/pci_bus_cvlink.c +33 -0
@@ -8,9 +8,11 @@* Copyright (C) 2000 by Colin Ngam */ +#include <linux/init.h> #include <linux/types.h> #include <linux/config.h> #include <linux/pci.h> +#include <linux/pci_ids.h> #include <linux/sched.h> #include <linux/ioport.h> #include <asm/sn/types.h>
@@ -149,6 +151,34 @@ }/* +* Most drivers currently do not properly tell the arch specific pci dma +* interfaces whether they can handle A64. Here is where we privately +* keep track of this. +*/ +static void __init +set_sn1_pci64 (struct pci_dev *dev) +{ +unsigned short vendor = dev->vendor; +unsigned short device = dev->device; + +if (vendor =PCI_VENDOR_ID_QLOGIC ) { +if ((device =PCI_DEVICE_ID_QLOGIC_ISP2100 ) || + (device =PCI_DEVICE_ID_QLOGIC_ISP2200 )) { +SET_PCIA64 (dev); +return ; + } + } + +if (vendor =PCI_VENDOR_ID_SGI ) { +if (device =PCI_DEVICE_ID_SGI_IOC3 ) { +SET_PCIA64 (dev); +return ; + } + } + +} + +/* * sn1_pci_fixup() - This routine is called when platform_pci_fixup() is * invoked at the end of pcibios_init() to link the Linux pci * infrastructure to SGI IO Infrasturcture - ia64/kernel/pci.c
@@ -172,6 +202,7 @@sn1_pci_find_bios ();return ; } +#if 0 {devfs_handle_t bridge_vhdl =pci_bus_to_vertex (0 );
@@ -236,7 +267,9 @@ device_sysdata =kmalloc (sizeof (struct sn1_device_sysdata ),GFP_KERNEL ); device_sysdata->vhdl =devfn_to_vertex (device_dev->bus->number, device_dev->devfn); + device_sysdata->isa64 =0 ; device_dev->sysdata = (void *) device_sysdata; +set_sn1_pci64 (device_dev);pci_read_config_word (device_dev,PCI_COMMAND , &cmd);/*
arch/ia64/sn/io/pci_dma.c +287 -30
346 lines not on this page · raw message
arch/ia64/sn/sn1/sn1_asm.S +0 -19
@@ -6,22 +6,3 @@ #include <linux/config.h> -#ifdef CONFIG_IA64_SGI_SYNERGY_1_0_HACKS -// Code to work around a SYNERGY 1.0 bug. - - .align 16 - .global enable_fsb_hack - .proc enable_fsb_hack -enable_fsb_hack: - movl r16=0xe000000000000000 - movl r17=0x4ffffffff0000000 /* only trap 0-256MB: covered by DTR0 */ - mov r20=0 - mov r21=1 - ;; - mov dbr[r20]=r16 - mov dbr[r21]=r17 - ;; - srlz.d - br.ret.sptk.few rp - .endp enable_fsb_hack -#endif /* CONFIG_IA64_SGI_SYNERGY_1_0_HACKS */
drivers/net/eepro100.c +1 -5
@@ -43,7 +43,7 @@static int txdmacount =128 ;static int rxdmacount/* = 0 */ ; -#ifdef __ia64__ +#if defined(__ia64__) || defined(__alpha__) || defined(__sparc__)/* align rx buffers to 2 bytes so that IP header is aligned */ # define RX_ALIGN # define RxFD_ALIGNMENT __attribute__ ((aligned (2), packed))
@@ -53,11 +53,7 @@/* Set the copy breakpoint for the copy-only-tiny-buffer Rx method. Lower values use more memory, but are faster. */ -#if defined(__alpha__) || defined(__sparc__) -static int rx_copybreak =1518 ; -#else static int rx_copybreak =200 ; -#endif /* Maximum events (Rx packets, etc.) to handle at each interrupt. */ static int max_interrupt_work =20 ;
drivers/scsi/qla1280.c +0 -3
@@ -242,9 +242,6 @@ STATIC void qla1280_removeq(scsi_lu_t *q, srb_t *sp); STATIC void qla1280_mem_free(scsi_qla_host_t *ha);static void qla1280_do_dpc (void *p); -#ifdef QLA1280_UNUSED -static void qla1280_set_flags (char * s); -#endif static char *qla1280_get_token (char *,char *);#if LINUX_VERSION_CODE <KERNEL_VERSION (2 ,1 ,0 ) STATIC inline void mdelay(int);
drivers/usb/uhci.c +0 -40
@@ -71,46 +71,6 @@/* If a transfer is still active after this much time, turn off FSBR */ #define IDLE_TIMEOUT (HZ / 20)/* 50 ms */ -#ifdef CONFIG_ITANIUM_A1_SPECIFIC - -static struct uhci *guhci; - -void -disable_usb (void ) -{ -unsigned short cmd; -unsigned int io_addr; - -if (guhci =NULL ) -return ; - - io_addr = guhci->io_addr; - - cmd =inw (io_addr +USBCMD ); - -outw (cmd & ~USBCMD_RS , io_addr+USBCMD ); - -while ((inw (io_addr +USBSTS ) &USBSTS_HCH ) =0 ); -} - -void -reenable_usb (void ) -{ -unsigned int io_addr; -unsigned short cmd; - -if (guhci =NULL ) -return ; - - io_addr = guhci->io_addr; - - cmd =inw (io_addr +USBCMD ); - -outw (cmd |USBCMD_RS , io_addr+USBCMD ); -} - -#endif /* CONFIG_ITANIUM_A1_SPECIFIC */ -/* * Only the USB core should call uhci_alloc_dev and uhci_free_dev */
fs/partitions/check.c +4 -1
@@ -32,7 +32,10 @@#include "sun.h" #include "ibm.h" #include "ultrix.h" -#include "efi.h" + +#ifdef CONFIG_EFI_PARTITION +# include "efi.h" +#endif extern void device_init (void );extern int *blk_size[];
include/asm-ia64/hw_irq.h +1 -0
@@ -8,6 +8,7 @@#include <linux/config.h> +#include <linux/sched.h> #include <linux/types.h> #include <asm/machvec.h>
include/asm-ia64/machvec.h +88 -7
138 lines not on this page · raw message
include/asm-ia64/offsets.h +2 -2
@@ -8,7 +8,7 @@*/ #define PT_PTRACED_BIT 0#define PT_TRACESYS_BIT 1 -#define IA64_TASK_SIZE 3968/* 0xf80 */ +#define IA64_TASK_SIZE 3360/* 0xd20 */ #define IA64_PT_REGS_SIZE 400/* 0x190 */ #define IA64_SWITCH_STACK_SIZE 560/* 0x230 */ #define IA64_SIGINFO_SIZE 128/* 0x80 */
@@ -20,7 +20,7 @@#define IA64_TASK_PROCESSOR_OFFSET 100/* 0x64 */ #define IA64_TASK_THREAD_OFFSET 1456/* 0x5b0 */ #define IA64_TASK_THREAD_KSP_OFFSET 1456/* 0x5b0 */ -#define IA64_TASK_THREAD_SIGMASK_OFFSET 3824/* 0xef0 */ +#define IA64_TASK_THREAD_SIGMASK_OFFSET 3216/* 0xc90 */ #define IA64_TASK_PID_OFFSET 196/* 0xc4 */ #define IA64_TASK_MM_OFFSET 88/* 0x58 */ #define IA64_PT_REGS_CR_IPSR_OFFSET 0/* 0x0 */
include/asm-ia64/page.h +0 -3
@@ -40,9 +40,6 @@extern void clear_page (void *page);extern void copy_page (void *to,void *from); -#define clear_user_page (page, vaddr) clear_page(page) -#define copy_user_page (to, from, vaddr) copy_page(to, from) -# ifdef STRICT_MM_TYPECHECKS /* * These are used to make use of C type-checking..
include/asm-ia64/pci.h +17 -100
142 lines not on this page · raw message
include/asm-ia64/pgalloc.h +68 -0
80 lines not on this page · raw message
include/asm-ia64/pgtable.h +0 -63
75 lines not on this page · raw message
include/asm-ia64/sal.h +0 -24
@@ -505,19 +505,7 @@ ia64_sal_pci_config_read (u64 pci_config_addr, u64 size, u64 *value) { struct ia64_sal_retval isrv; -#ifdef CONFIG_ITANIUM_A1_SPECIFIC -extern spinlock_t ivr_read_lock; -unsigned long flags; - -/* -* Avoid PCI configuration read/write overwrite -- A0 Interrupt loss workaround -*/ -spin_lock_irqsave (&ivr_read_lock, flags); -#endif SAL_CALL (isrv,SAL_PCI_CONFIG_READ , pci_config_addr, size,0 ,0 ,0 ,0 ,0 ); -#ifdef CONFIG_ITANIUM_A1_SPECIFIC -spin_unlock_irqrestore (&ivr_read_lock, flags); -#endif if (value) *value = isrv.v0;return isrv.status;
@@ -528,20 +516,8 @@ ia64_sal_pci_config_write (u64 pci_config_addr, u64 size, u64 value) { struct ia64_sal_retval isrv; -#ifdef CONFIG_ITANIUM_A1_SPECIFIC -extern spinlock_t ivr_read_lock; -unsigned long flags; - -/* -* Avoid PCI configuration read/write overwrite -- A0 Interrupt loss workaround -*/ -spin_lock_irqsave (&ivr_read_lock, flags); -#endif SAL_CALL (isrv,SAL_PCI_CONFIG_WRITE , pci_config_addr, size, value,0 ,0 ,0 ,0 ); -#ifdef CONFIG_ITANIUM_A1_SPECIFIC -spin_unlock_irqrestore (&ivr_read_lock, flags); -#endif return isrv.status; }
include/asm-ia64/sn/mmzone.h +3 -0
@@ -6,6 +6,7 @@#define _LINUX_ASM_SN_MMZONE_H#include <asm/sn/mmzone_sn1.h> +#include <asm/sn/sn_cpuid.h> /* * Memory is conceptually divided into chunks. A chunk is either
@@ -104,5 +105,7 @@#define MAP_NR_SN1 (addr) (((unsigned long) (addr) - PAGE_OFFSET) >> PAGE_SHIFT)#endif /* CONFIG_DISCONTIGMEM */ + +#define numa_node_id () cpuid_to_cnodeid(smp_processor_id())#endif /* !_LINUX_ASM_SN_MMZONE_H */
include/asm-ia64/sn/mmzone_sn1.h +4 -2
@@ -5,8 +5,10 @@* Copyright, 2000, Silicon Graphics, [email protected] */ -/* SN1 will first attempt a 64 cpu config = 16 nodes X 4 cpus */ -#define MAXNODES 16 +/* Maximum configuration supported by SNIA hardware. There are other +* restrictions that may limit us to a smaller max configuration. +*/ +#define MAXNODES 128#define MAXNASIDS 128#define CHUNKSZ (64*1024*1024)
include/asm-ia64/sn/pci/pci_bus_cvlink.h +8 -0
@@ -10,12 +10,20 @@#ifndef _ASM_SN_PCI_CVLINK_H#define _ASM_SN_PCI_CVLINK_H +#define SET_PCIA64 (dev) \ + (((struct sn1_device_sysdata *)((dev)->sysdata))->isa64) = 1 +#define IS_PCIA64 (dev) (((dev)->dma_mask = 0xffffffffffffffffUL) || \ + (((struct sn1_device_sysdata *)((dev)->sysdata))->isa64)) +#define IS_PCI32G (dev) ((dev)->dma_mask >= 0xffffffff) +#define IS_PCI32L (dev) ((dev)->dma_mask < 0xffffffff) +struct sn1_widget_sysdata {devfs_handle_t vhdl; };struct sn1_device_sysdata {devfs_handle_t vhdl; +int isa64; };#endif /* _ASM_SN_PCI_CVLINK_H */
include/linux/highmem.h +2 -2
@@ -45,7 +45,7 @@/* when CONFIG_HIGHMEM is not set these will be plain clear/copy_page */ static inline void clear_user_highpage (struct page *page,unsigned long vaddr) { -clear_user_page (kmap (page), vaddr); +clear_user_page (kmap (page), vaddr, page);kunmap (page); }
@@ -87,7 +87,7 @@ vfrom =kmap (from); vto =kmap (to); -copy_user_page (vto, vfrom, vaddr); +copy_user_page (vto, vfrom, vaddr, to);kunmap (from);kunmap (to); }
include/linux/irq.h +1 -0
@@ -57,6 +57,7 @@#include <asm/hw_irq.h> /* the arch dependent stuff */ extern unsigned int do_IRQ (unsigned long irq,struct pt_regs *regs); +extern void do_IRQ_per_cpu (unsigned long irq,struct pt_regs *regs);extern int handle_IRQ_event (unsigned int ,struct pt_regs *,struct irqaction *);extern int setup_irq (unsigned int ,struct irqaction * );
kernel/ptrace.c +5 -5
@@ -53,14 +53,14 @@flush_cache_page (vma, addr);if (write) { - maddr =kmap (page); -memcpy (maddr + (addr & ~PAGE_MASK ), buf, len); + maddr =kmap (page) + (addr & ~PAGE_MASK ); +memcpy (maddr, buf, len);flush_page_to_ram (page); -flush_icache_page (vma, page); +flush_icache_range ((unsigned long ) maddr, (unsigned long )maddr + len);kunmap (page); }else { - maddr =kmap (page); -memcpy (buf, maddr + (addr & ~PAGE_MASK ), len); + maddr =kmap (page) + (addr & ~PAGE_MASK ); +memcpy (buf, maddr, len);flush_page_to_ram (page);kunmap (page); }
mm/memory.c +0 -2
@@ -1030,7 +1030,6 @@return -1 ;flush_page_to_ram (page); -flush_icache_page (vma, page); } mm->rss++;
@@ -1118,7 +1117,6 @@* handle that later. */ flush_page_to_ram (new_page); -flush_icache_page (vma, new_page); entry =mk_pte (new_page, vma->vm_page_prot);if (write_access) { entry =pte_mkwrite (pte_mkdirty (entry));
Re: [Linux-ia64] kernel update (relative to 2.4.0-test12)
In reply to David MosbergerQuoted 4 lines · David Mosberger
in files linux-2.4.0-test12-ia64-001214.diff*
supposed to. Thus, I'd like to see everyone giving this kernel a good workout and to report any new problems.
The kernel boots on my B1 BigSur, but it locks up as soon as I touch the root file system after remounting it rw. Sometimes I have SysRq access for a few seconds, sometimes not. No messages, no oops, just a good solid hang. Anyone else having trouble?
I booted up with init=/bin/bash and followed along with /etc/rc.d/rc.sysinit.
mount -n -o remount,rw / // Works fine
Quoted 1 line
/etc/mtab// locks the system.
I tried "rm /etc/mtab" for the fun of it (after remounting) and it locked, but after the system came back up and fscked it found the unlinked inode and placed it in /lost+found is all data intact.
Anyone else running into problems?
Signature · 3 lines
Nate Straz [email protected] sgi, inc http://www.sgi.com/ Linux Test Project http://oss.sgi.com/projects/ltp/
[Linux-ia64] kernel update (relative to 2.4.0)
In reply to David MosbergerThe latest IA-64 patch is now available at:
ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/
in file linux-2.4.0-ia64-010109.diff*
What changed since last time:
o Stephane's latest perfmon support
o Asit: update SAL header file for v3.0 and update MCA code accordingly.
o Jonathan Nicklin: Move IPI operation word into per-CPU data structure to avoid cache line bouncing.
o Sync up with BJ Numa's latest qla1280/12160 SCSI driver
o Updates for 2.4.0, including new-style Makefiles.
o Fix & clean up IA-32 version of execve() (Don, you may want to double check this, though it does work well for me.)
o Clean up interrupt register initialization (and do it on all CPUs, not just the boot processor)
o Use a "lazy execute bit" approach in the PTEs to avoid flushing the cache for newly created anonymous pages.
o Be more strict about enforcing the rule that no vm-area may cross unimplemented address space. Also enforce 4GB addr limit for 32-bit processes.
o Serialize SAL calls even on UP; also on MP interrupts are now disabled while we're in a SAL call (again to enforce serialization)
This kernel has been tested on Lions, Big Surs, and the HP simulator. In particular, I used it to compile kernels on a 4-way machine for hours and hours with a concurrency level of five and didn't encounter any problems, so I believe it to be fairly solid. But as always YMMV.
Enjoy,
--david
PS: As always, the diff below is only a (very rough) approximation of
what changed since the last IA-64 patch. To get the real sources, get Linus's 2.4.0 tree and apply the above patch on top of it.
arch/ia64/Makefile +2 -4
@@ -5,7 +5,7 @@ # License. See the file "COPYING" in the main directory of this archive # for more details. # -# Copyright (C) 1998-2000 by David Mosberger-Tang <[email protected]> +# Copyright (C) 1998-2001 by David Mosberger-Tang <[email protected]> # NM := $(CROSS_COMPILE)nm -B
@@ -53,7 +53,7 @@ endif ifdef CONFIG_IA64_SGI_SN1 -CFLAGS += -DBRINGUP + CFLAGS += -DBRINGUP SUBDIRS := arch/$(ARCH)/sn/sn1 \ arch/$(ARCH)/sn \ arch/$(ARCH)/sn/io \
@@ -120,8 +120,6 @@ @$(MAKEBOOT) srmboot archclean: - @$(MAKE) -C arch/$(ARCH)/kernel clean - @$(MAKE) -C arch/$(ARCH)/tools clean @$(MAKEBOOT) clean archmrproper:
arch/ia64/config.in +1 -0
@@ -18,6 +18,7 @@ comment 'General setup' define_bool CONFIG_IA64 y +define_int CONFIG_IA64_L1_CACHE_SHIFT 6 # align cache-sensitive data structure to 64 bytes define_bool CONFIG_ISA n define_bool CONFIG_EISA n
arch/ia64/dig/setup.c +0 -11
@@ -95,14 +95,3 @@outb (0xff ,0xA1 );outb (0xff ,0x21 ); } - -void -dig_irq_init (void ) -{ -/* -* Disable the compatibility mode interrupts (8259 style), needs IN/OUT support -* enabled. -*/ -outb (0xff ,0xA1 ); -outb (0xff ,0x21 ); -}
arch/ia64/ia32/binfmt_elf32.c +1 -0
@@ -98,6 +95,7 @@ current->thread.map_base =0x40000000 ; current->thread.task_size =0xc0000000 ;/* use what Linux/x86 uses... */ +set_fs (USER_DS );/* set addr limit for new TASK_SIZE */ /* setup ia32 state for ia32_load_state */
arch/ia64/ia32/sys_ia32.c +38 -46
130 lines not on this page · raw message
arch/ia64/kernel/Makefile +3 -5
@@ -11,7 +11,9 @@ O_TARGET := kernel.o -obj-y := acpi.o entry.o gate.o efi.o efi_stub.o irq.o irq_ia64.o irq_sapic.o ivt.o \ +export-objs := ia64_ksyms.o + +obj-y := acpi.o entry.o gate.o efi.o efi_stub.o ia64_ksyms.o irq.o irq_ia64.o irq_sapic.o ivt.o \ machvec.o pal.o process.o perfmon.o ptrace.o sal.o semaphore.o setup.o \ signal.o sys_ia64.o traps.o time.o unaligned.o unwind.o obj-$(CONFIG_IA64_GENERIC) += machvec.o iosapic.o
@@ -21,9 +23,5 @@ obj-$(CONFIG_SMP) += smp.o smpboot.o obj-$(CONFIG_IA64_MCA) += mca.o mca_asm.o obj-$(CONFIG_IA64_BRL_EMU) += brl_emu.o - -export-objs := ia64_ksyms.o - -clean:: include $(TOPDIR)/Rules.make
arch/ia64/kernel/entry.S +16 -7
@@ -586,21 +573,30 @@ back_from_resched: { .mii adds r2=IA64_TASK_NEED_RESCHED_OFFSET,r13 - mov r3=ip + mov r3=ip // r3 <- &back_from_resched adds r14=IA64_TASK_SIGPENDING_OFFSET,r13 } +#ifdef CONFIG_PERFMON + adds r15=IA64_TASK_PFM_NOTIFY,r13 +#endif ;; +#ifdef CONFIG_PERFMON + ld8 r15=[r15] +#endif ld8 r2=[r2] ld4 r14=[r14] mov rp=r3 // arrange for schedule() to return to back_from_resched ;; - cmp.ne p6,p0=r2,r0 cmp.ne p2,p0=r14,r0 // NOTE: pKern is an alias for p2!! - srlz.d -(p6) br.call.spnt.many b6=invoke_schedule // ignore return value -2: - // check & deliver pending signals: -(p2) br.call.spnt.few rp=handle_signal_delivery +#ifdef CONFIG_PERFMON + cmp.ne p6,p0=r15,r0 // current->task.pfm_notify != 0? +#endif + cmp.ne p7,p0=r2,r0 // current->need_resched != 0? +#ifdef CONFIG_PERFMON +(p6) br.call.spnt.many b6=pfm_overflow_notify +#endif +(p7) br.call.spnt.many b7=invoke_schedule +(p2) br.call.spnt.many rp=handle_signal_delivery // check & deliver pending signals .ret9: #ifdef CONFIG_IA64_SOFTSDV_HACKS // Check for lost ticks
arch/ia64/kernel/ia64_ksyms.c +9 -0
@@ -45,6 +45,15 @@EXPORT_SYMBOL (disable_irq);EXPORT_SYMBOL (disable_irq_nosync); +#include <asm/semaphore.h> +EXPORT_SYMBOL_NOVERS (__down); +EXPORT_SYMBOL_NOVERS (__down_interruptible); +EXPORT_SYMBOL_NOVERS (__down_trylock); +EXPORT_SYMBOL_NOVERS (__up); +EXPORT_SYMBOL_NOVERS (__down_read_failed); +EXPORT_SYMBOL_NOVERS (__down_write_failed); +EXPORT_SYMBOL_NOVERS (__rwsem_wake); +#include <asm/page.h> EXPORT_SYMBOL (clear_page);
arch/ia64/kernel/irq_ia64.c +0 -14
@@ -147,13 +147,6 @@void __init init_IRQ (void ) { -/* -* Disable all local interrupts -*/ -ia64_set_itv (0 ,1 ); -ia64_set_lrr0 (0 ,1 ); -ia64_set_lrr1 (0 ,1 ); - irq_desc[IA64_SPURIOUS_INT ].handler = &irq_type_ia64_sapic;#ifdef CONFIG_SMP /*
@@ -163,14 +156,7 @@ irq_desc[IPI_IRQ ].handler = &irq_type_ia64_sapic;setup_irq (IPI_IRQ , &ipi_irqaction);#endif - -ia64_set_pmv (1 <<16 ); -ia64_set_cmcv (CMC_IRQ );/* XXX fix me */ -platform_irq_init (); - -/* clear TPR to enable all interrupt classes: */ -ia64_set_tpr (0 ); }void
arch/ia64/kernel/ivt.S +1 -1
@@ -504,6 +504,7 @@ mov r28=ar.ccv // save ar.ccv ;; 1: ld8 r18=[r17] + ;; # if defined(CONFIG_IA32_SUPPORT) && \ (defined(CONFIG_ITANIUM_ASTEP_SPECIFIC) || defined(CONFIG_ITANIUM_B0_SPECIFIC)) //
@@ -511,7 +512,6 @@ // If the PTE is indicates the page is not present, then just turn this into a // page fault. // - ;; tbit.z p6,p0=r18,_PAGE_P_BIT // page present bit cleared? (p6) br.sptk page_fault // page wasn't present # endif
arch/ia64/kernel/mca.c +8 -7
@@ -27,6 +27,7 @@#include <asm/mca.h> #include <asm/irq.h> +#include <asm/machvec.h> typedef struct ia64_fptr {
@@ -235,13 +236,15 @@if (ia64_sal_mc_set_params (SAL_MC_PARAM_RENDEZ_INT ,SAL_MC_PARAM_MECHANISM_INT ,IA64_MCA_RENDEZ_INT_VECTOR , -IA64_MCA_RENDEZ_TIMEOUT )) +IA64_MCA_RENDEZ_TIMEOUT , +0 ))return ;/* Register the wakeup interrupt vector with SAL */ if (ia64_sal_mc_set_params (SAL_MC_PARAM_RENDEZ_WAKEUP ,SAL_MC_PARAM_MECHANISM_INT ,IA64_MCA_WAKEUP_INT_VECTOR , +0 ,0 ))return ;
@@ -543,8 +546,7 @@cmci_handler_platform (cmc_irq, arg, ptregs);/* Clear the CMC SAL logs now that they have been saved in the OS buffer */ -ia64_sal_clear_state_info (SAL_INFO_TYPE_CMC ,SAL_SUB_INFO_TYPE_PROCESSOR ); -ia64_sal_clear_state_info (SAL_INFO_TYPE_CMC ,SAL_SUB_INFO_TYPE_PLATFORM ); +ia64_sal_clear_state_info (SAL_INFO_TYPE_CMC ); }/*
@@ -618,8 +620,7 @@init_handler_platform (regs);/* call platform specific routines */ /* Clear the INIT SAL logs now that they have been saved in the OS buffer */ -ia64_sal_clear_state_info (SAL_INFO_TYPE_INIT ,SAL_SUB_INFO_TYPE_PROCESSOR ); -ia64_sal_clear_state_info (SAL_INFO_TYPE_INIT ,SAL_SUB_INFO_TYPE_PLATFORM ); +ia64_sal_clear_state_info (SAL_INFO_TYPE_INIT ); }/*
@@ -658,7 +659,7 @@/* Get the process state information */ log_buffer =IA64_LOG_NEXT_BUFFER (sal_info_type, sal_sub_info_type); -if (!(total_len=ia64_sal_get_state_info (sal_info_type, sal_sub_info_type ,(u64 *)log_buffer))) +if (!(total_len=ia64_sal_get_state_info (sal_info_type,(u64 *)log_buffer)))prfunc ("ia64_mca_log_get : Getting processor log failed\n" );IA64_MCA_DEBUG ("ia64_log_get: retrieved %d bytes of error information\n" ,total_len);
@@ -683,7 +684,7 @@void ia64_log_clear (int sal_info_type,int sal_sub_info_type,int clear_os_buffer,prfunc_t prfunc) { -if (ia64_sal_clear_state_info (sal_info_type, sal_sub_info_type)) +if (ia64_sal_clear_state_info (sal_info_type))prfunc ("ia64_mca_log_get : Clearing processor log failed\n" );if (clear_os_buffer) {
arch/ia64/kernel/mca_asm.S +0 -1
@@ -7,7 +7,6 @@ // 00/03/29 cfleck Added code to save INIT handoff state in pt_regs format, switch to temp // kstack, switch modes, jump to C INIT handler // -#include <linux/config.h> #include <asm/pgtable.h> #include <asm/processor.h> #include <asm/mca_asm.h>
arch/ia64/kernel/perfmon.c +1726 -316
2,357 lines not on this page · raw message
arch/ia64/kernel/process.c +21 -6
@@ -1,8 +1,8 @@/* * Architecture-specific setup. * -* Copyright (C) 1998-2000 Hewlett-Packard Co -* Copyright (C) 1998-2000 David Mosberger-Tang <[email protected]> +* Copyright (C) 1998-2001 Hewlett-Packard Co +* Copyright (C) 1998-2001 David Mosberger-Tang <[email protected]> */ #define __KERNEL_SYSCALLS__/* see <asm/unistd.h> */ #include <linux/config.h>
@@ -20,6 +20,7 @@#include <asm/delay.h> #include <asm/efi.h> +#include <asm/perfmon.h> #include <asm/pgtable.h> #include <asm/processor.h> #include <asm/sal.h>
@@ -147,7 +148,7 @@ia64_save_debug_regs (&task->thread.dbr[0 ]);#ifdef CONFIG_PERFMON if ((task->thread.flags &IA64_THREAD_PM_VALID ) !=0 ) -ia64_save_pm_regs (task); +pfm_save_regs (task);#endif if (IS_IA32_PROCESS (ia64_task_regs (task)))ia32_save_state (&task->thread);
@@ -160,7 +161,7 @@ia64_load_debug_regs (&task->thread.dbr[0 ]);#ifdef CONFIG_PERFMON if ((task->thread.flags &IA64_THREAD_PM_VALID ) !=0 ) -ia64_load_pm_regs (task); +pfm_load_regs (task);#endif if (IS_IA32_PROCESS (ia64_task_regs (task)))ia32_load_state (&task->thread);
@@ -210,6 +211,7 @@struct switch_stack *child_stack, *stack;extern char ia64_ret_from_clone;struct pt_regs *child_ptregs; +int retval =0 ;#ifdef CONFIG_SMP /*
@@ -290,7 +292,11 @@if (IS_IA32_PROCESS (ia64_task_regs (current)))ia32_save_state (&p->thread);#endif -return 0 ; +#ifdef CONFIG_PERFMON +if (current->thread.pfm_context) + retval =pfm_inherit (p); +#endif +return retval; }#ifdef CONFIG_IA64_NEW_UNWIND
@@ -523,6 +530,15 @@#endif } +#ifdef CONFIG_PERFMON +void +release_thread (struct task_struct *task) +{ +if (task->thread.pfm_context) +pfm_context_exit (task); +} +#endif +/* * Clean up state associated with current thread. This is called when * the thread calls exit().
@@ -545,7 +561,7 @@* we garantee no race. this call we also stop * monitoring */ -ia64_save_pm_regs (current); +pfm_flush_regs (current);/* * make sure that switch_to() will not save context again */
arch/ia64/kernel/setup.c +11 -2
@@ -1,8 +1,8 @@/* * Architecture-specific setup. * -* Copyright (C) 1998-2000 Hewlett-Packard Co -* Copyright (C) 1998-2000 David Mosberger-Tang <[email protected]> +* Copyright (C) 1998-2001 Hewlett-Packard Co +* Copyright (C) 1998-2001 David Mosberger-Tang <[email protected]> * Copyright (C) 1998, 1999 Stephane Eranian <[email protected]> * Copyright (C) 2000, Rohit Seth <[email protected]> * Copyright (C) 1999 VA Linux Systems
@@ -444,6 +431,15 @@ : "r" (((ulong) IA32_CR4 << 32) | IA32_CR0));#endif +/* disable all local interrupt sources: */ +ia64_set_itv (1 <<16 ); +ia64_set_lrr0 (1 <<16 ); +ia64_set_lrr1 (1 <<16 ); +ia64_set_pmv (1 <<16 ); +ia64_set_cmcv (1 <<16 ); + +/* clear TPR & XTP to enable all interrupt classes: */ +ia64_set_tpr (0 );#ifdef CONFIG_SMP normal_xtp ();#endif
arch/ia64/kernel/signal.c +5 -0
@@ -190,6 +190,11 @@ err |=__put_user (from->si_utime, &to->si_utime); err |=__put_user (from->si_stime, &to->si_stime); err |=__put_user (from->si_status, &to->si_status); +case __SI_PROF >>16 : + err |=__put_user (from->si_uid, &to->si_uid); + err |=__put_user (from->si_pid, &to->si_pid); + err |=__put_user (from->si_pfm_ovfl, &to->si_pfm_ovfl); +break ;default : err |=__put_user (from->si_uid, &to->si_uid); err |=__put_user (from->si_pid, &to->si_pid);
arch/ia64/kernel/smp.c +3 -8
@@ -71,7 +79,7 @@static volatile int smp_commenced;static int max_cpus =-1 ;/* Command line */ -static unsigned long ipi_op[NR_CPUS ]; +struct smp_call_struct {void (*func) (void *info);void *info;
@@ -159,7 +172,7 @@ handle_IPI(int irq, void *dev_id, struct pt_regs *regs) { int this_cpu = smp_processor_id(); -unsigned long *pending_ipis = &ipi_op[this_cpu]; +unsigned long *pending_ipis = &cpu_data[this_cpu].ipi_operation;unsigned long ops;/* Count this now; we may make a call that never returns. */
@@ -274,7 +293,7 @@if (dest_cpu =-1 )return ; -set_bit (op, &ipi_op[dest_cpu]); +set_bit (op, &cpu_data[dest_cpu].ipi_operation);platform_send_ipi (dest_cpu,IPI_IRQ ,IA64_IPI_DM_INT ,0 ); }
@@ -508,10 +526,6 @@perfmon_init_percpu ();#endif -/* Disable all local interrupts */ -ia64_set_lrr0 (0 ,1 ); -ia64_set_lrr1 (0 ,1 ); -local_irq_enable ();/* Interrupts have been off until now */ calibrate_delay ();
@@ -610,7 +624,6 @@/* Take care of some initial bookkeeping. */ memset (&__cpu_physical_id,-1 ,sizeof (__cpu_physical_id)); -memset (&ipi_op,0 ,sizeof (ipi_op));/* Setup BP mappings */ __cpu_physical_id[0 ] =hard_smp_processor_id ();
arch/ia64/kernel/time.c +1 -1
@@ -226,7 +226,7 @@#endif /* arrange for the cycle counter to generate a timer interrupt: */ -ia64_set_itv (TIMER_IRQ ,0 ); +ia64_set_itv (TIMER_IRQ ); itm.next[smp_processor_id ()].count =ia64_get_itc () + itm.delta;ia64_set_itm (itm.next[smp_processor_id ()].count); }
arch/ia64/lib/Makefile +3 -3
@@ -7,18 +7,18 @@ L_TARGET = lib.a +export-objs := io.o swiotlb.o + obj-y := __divsi3.o __udivsi3.o __modsi3.o __umodsi3.o \ __divdi3.o __udivdi3.o __moddi3.o __umoddi3.o \ checksum.o clear_page.o csum_partial_copy.o copy_page.o \ copy_user.o clear_user.o strncpy_from_user.o strlen_user.o strnlen_user.o \ - flush.o do_csum.o \ + flush.o io.o do_csum.o \ swiotlb.o ifneq ($(CONFIG_ITANIUM_ASTEP_SPECIFIC),y) obj-y += memcpy.o memset.o strlen.o endif - -export-objs += io.o IGNORE_FLAGS_OBJS = __divsi3.o __udivsi3.o __modsi3.o __umodsi3.o \ __divdi3.o __udivdi3.o __moddi3.o __umoddi3.o
arch/ia64/lib/swiotlb.c +16 -6
@@ -10,7 +10,10 @@* unnecessary i-cache flushing. */ +#include <linux/config.h> +#include <linux/mm.h> +#include <linux/module.h> #include <linux/pci.h> #include <linux/spinlock.h> #include <linux/string.h>
@@ -325,12 +328,8 @@ pg_addr =PAGE_ALIGN ((unsigned long ) addr); end = (unsigned long ) addr + size;while (pg_addr +PAGE_SIZE <= end) { -#if 0 -set_bit (PG_arch_1,virt_to_page (pg_addr)); -#else -if (!VALID_PAGE (virt_to_page (pg_addr))) -printk ("Invalid addr %lx!!!\n" , pg_addr); -#endif +struct page *page =virt_to_page (pg_addr); +set_bit (PG_arch_1, &page->flags); pg_addr +=PAGE_SIZE ; } }
@@ -454,3 +453,14 @@ {return virt_to_phys (sg->address); } + +EXPORT_SYMBOL (swiotlb_init); +EXPORT_SYMBOL (swiotlb_map_single); +EXPORT_SYMBOL (swiotlb_unmap_single); +EXPORT_SYMBOL (swiotlb_map_sg); +EXPORT_SYMBOL (swiotlb_unmap_sg); +EXPORT_SYMBOL (swiotlb_sync_single); +EXPORT_SYMBOL (swiotlb_sync_sg); +EXPORT_SYMBOL (swiotlb_dma_address); +EXPORT_SYMBOL (swiotlb_alloc_consistent); +EXPORT_SYMBOL (swiotlb_free_consistent);
arch/ia64/tools/print_offsets.c +5 -2
@@ -1,8 +1,8 @@/* * Utility to generate asm-ia64/offsets.h. * -* Copyright (C) 1999-2000 Hewlett-Packard Co -* Copyright (C) 1999-2000 David Mosberger-Tang <[email protected]> +* Copyright (C) 1999-2001 Hewlett-Packard Co +* Copyright (C) 1999-2001 David Mosberger-Tang <[email protected]> * * Note that this file has dual use: when building the kernel * natively, the file is translated into a binary and executed. When
@@ -57,6 +57,9 @@ { "IA64_TASK_THREAD_KSP_OFFSET", offsetof (struct task_struct, thread.ksp) }, #ifdef CONFIG_IA32_SUPPORT { "IA64_TASK_THREAD_SIGMASK_OFFSET",offsetof (struct task_struct, thread.un.sigmask) }, +#endif +#ifdef CONFIG_PERFMON + { "IA64_TASK_PFM_NOTIFY", offsetof(struct task_struct, thread.pfm_pend_notify) }, #endif { "IA64_TASK_PID_OFFSET", offsetof (struct task_struct, pid) }, { "IA64_TASK_MM_OFFSET", offsetof (struct task_struct, mm) },
drivers/ide/ide-geometry.c +4 -1
@@ -3,8 +3,11 @@*/ #include <linux/config.h> #include <linux/ide.h> -#include <linux/mc146818rtc.h> #include <asm/io.h> + +#ifdef __i386__ +# include <linux/mc146818rtc.h> +#endif /* * We query CMOS about hard disks : it could be that we have a SCSI/ESDI/etc
drivers/scsi/qla1280.c +148 -44
35 lines not on this page · raw message
include/asm-ia64/perfmon.h +51 -0
51 lines not on this page · raw message
include/asm-ia64/processor.h +21 -25
46 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.
RE: [Linux-ia64] kernel update (relative to 2.4.0)
In reply to David MosbergerHi David,
I got the source of the tool chain, but i could find how to build this source to generate the
compiler, linker binaries from this. I went throught the source-tree but i couldnt find document on how to build the binaries. This is my first time that i will be building the source of gcc. Any link to the docs will be of great help.
thanx,
Manish
-----Original Message-----
From: David Mosberger [mailto:[email protected]]
Sent: Monday, January 08, 2001 10:16 PM
To: [email protected]
Subject: RE: [lia64-sim] ski special interface BREAK instructions
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
On Mon, 8 Jan 2001 13:15:49 +0530 , "Sapariya Manish.j"
<[email protected]> said:
Manish> Hi, Could anyone tell me, where could i get the gcc for Ia Manish> 64.
The canonical location is:
ftp://ftp.cygnus.com/pub/ia64-linux/
--david
--
To unsubscribe: echo unsubscribe lia64-sim | mail [email protected]
RE: [Linux-ia64] kernel update (relative to 2.4.0) - copy_user fi
In reply to David MosbergerThere is one return path in the __copy_user that do not restore the ar.lc register. This is causing applications that uses ar.lc to fail. Attached is a patch to fix it (file is also attached).
Thanks,
Asit
arch/ia64/lib/copy_user.S Tue Jan 9 05:35:36 2001 renamed from arch/ia64/lib/copy_user.S Thu Jan 4 12:50:17 2001 +1 -0
@@ -319,6 +319,7 @@ EX(failure_out,(EPI) st1 [dst1]=val1[PIPE_DEPTH-1],1) br.ctop.dptk.few 5b ;; + mov ar.lc=saved_lc mov pr=saved_pr,0xffffffffffff0000 mov ar.pfs=saved_pfs br.ret.dptk.few rp
arch/ia64/lib/copy_user.S +1 -0
@@ -319,6 +319,7 @@ EX(failure_out,(EPI) st1 [dst1]=val1[PIPE_DEPTH-1],1) br.ctop.dptk.few 5b ;; + mov ar.lc=saved_lc mov pr=saved_pr,0xffffffffffff0000 mov ar.pfs=saved_pfs br.ret.dptk.few rp
Re: [Linux-ia64] kernel update (relative to 2.4.0)
In reply to David MosbergerQuoted 3 lines
I got the source of the tool chain, but i could find how to build this source to generate the
compiler, linker binaries from this.
In general, for most FSF programs, the build process is the same. Unpack the sources so that you have a src directory. Then something like
mkdir build
cd build
../src/configure
make
make install
This will build a native toolchain including everything.
If you don't want to install in /usr/local, you can change that directory name with the configure option --prefix=<path>.
If you don't want the gdb gui, including tcl/tk/tix/itcl/etc, then you can use the configure option --disable-gdbtk.
For a cross, there are a few extra steps. You need libraries and header files from the target. You can grab /usr/lib and /usr/include from the target and put them on your build machine. Then use the --with-libs=<path> and --with-headers=<path> configure options to point at the target library and header files respectively. You also need the --target=ia64-linux configure option to indicate that this is a cross to ia64-linux.
There is documentation on this stuff, but it is scattered around a bit. There is a toplevel README file that contains some info, with pointers to tool specific README files like gcc/README, which in turn point at other files. Red Hat has some nice printed documentation that we give to customers, but it isn't in a convenient form for our purposes. It is done in FrameMaker I believe. There is also some online stuff, for instance
http://gcc.gnu.org/install/index.html. This is gcc specific, but most of this stuff is the same for all of the other parts of the toolchain.
Jim
[Linux-ia64] kernel update (relative to 2.4.0)
In reply to David MosbergerThe latest IA-64 patch is now available at:
ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/
in file linux-2.4.0-ia64-010125.diff*
What changed since last time:
o Alex Williamson: Fix "implemented VA bits" calculation so it doesn't fail when all virtual address bits are implemented.
o Erich Focht/YT: Fix llseek() in /proc/mem to make it work when offset >=2^63.
o William Taber/YT: fix mm/memory.c so handle_mm_fault() gets called with the right arguments.
o BJ Nima: Update qla1280 driver to version 3.23 beta.
o Keith Owens: Fix unw_access_gr() so it accesses stacked regs correctly.
o Don Dugger: Fix munmap, mprotect, & msync to do the right thing when 4KB pages are in use. Various other IA-32 fixes.
o Asit Mallick:
+ Fix TLB handlers (this was fix was posted to the list earlier on).
+ Add missing restore of ar.lc in copy_user()
o YT:
+ Make IA-64 timer data structure (itm) part of CPU-local data
+ "Randomize" the timer tick on different CPUs so it's less likely for multiple CPUs to hit the timer interrupt simultaneous (shouldn't really make much of a difference on today's machines, but it seemed like the right thing to do and was easy to add)
+ Make unaligned handler work inside the kernel and fix
a nasty bug that would let a user program crash the system.
+ Turn on "alignment check" (psr.ac) inside the kernel so we can reliably detect unaligned accesses
+ Clean up syscall path and improve code scheduling.
+ Make MAX_DMA_ADDRESS a variable so platform-specific code can override the default value
+ Various IA-32 subsystem cleanups
- added ia32_execve() to get the right register frame when execv'ing an IA-64 program
- drop IA-32 syscall register frame in the IA-32 specific code, so we don't have to check and slow down the normal kernel exit path
- added sys32_signal since Intel's cross compiler wants it
Below is a diff that shows the changes since the last IA-64 patch. As usual, this is for your enjoyment only. If you want to get the real sources, start with 2.4.0 and apply the above patch on top of it.
This patch has been tested on BigSur, Lion, and the HP Ski simulator and found to be generally good to public health. As always, if you should encounter some unexpected problems, please let us all know.
Enjoy,
--david
Documentation/Configure.help +0 -5
@@ -17030,11 +17030,6 @@ Say Y here to enable hacks to make the kernel work on the Intel SoftSDV simulator. Select N here if you're unsure. -Enable AzusA hacks -CONFIG_IA64_AZUSA_HACKS - Say Y here to enable hacks to make the kernel work on the NEC - AzusA platform. Select N here if you're unsure. - Force socket buffers below 4GB? CONFIG_SKB_BELOW_4GB Most of today's network interface cards (NICs) support DMA to
arch/ia64/config.in +0 -1
@@ -54,7 +54,6 @@ bool ' Force interrupt redirection' CONFIG_IA64_HAVE_IRQREDIR bool ' Enable use of global TLB purge instruction (ptc.g)' CONFIG_ITANIUM_PTCG bool ' Enable SoftSDV hacks' CONFIG_IA64_SOFTSDV_HACKS - bool ' Enable AzusA hacks' CONFIG_IA64_AZUSA_HACKS bool ' Enable IA-64 Machine Check Abort' CONFIG_IA64_MCA bool ' Enable ACPI 2.0 with errata 1.3' CONFIG_ACPI20 bool ' ACPI kernel configuration manager (EXPERIMENTAL)' CONFIG_ACPI_KERNEL_CONFIG
arch/ia64/ia32/binfmt_elf32.c +2 -2
@@ -93,8 +93,8 @@/* Do all the IA-32 setup here */ - current->thread.map_base =0x40000000 ; - current->thread.task_size =0xc0000000 ;/* use what Linux/x86 uses... */ + current->thread.map_base =0x40000000 ; + current->thread.task_size =0xc0000000 ;/* use what Linux/x86 uses... */ set_fs (USER_DS );/* set addr limit for new TASK_SIZE */ /* setup ia32 state for ia32_load_state */
arch/ia64/ia32/ia32_entry.S +33 -6
@@ -4,11 +4,36 @@ #include "../kernel/entry.h" + .text + + /* + * execve() is special because in case of success, we need to + * setup a null register window frame (in case an IA-32 process + * is exec'ing an IA-64 program). + */ +ENTRY(ia32_execve) + UNW(.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(3)) + alloc loc1=ar.pfs,3,2,4,0 + mov loc0=rp + UNW(.body) + mov out0=in0 // filename + ;; // stop bit between alloc and call + mov out1=in1 // argv + mov out2=in2 // envp + add out3,sp // regs + br.call.sptk.few rp=sys32_execve +1: cmp4.ge p6,p0=r8,r0 + mov ar.pfs=loc1 // restore ar.pfs + ;; +(p6) mov ar.pfs=r0 // clear ar.pfs in case of success + sxt4 r8=r8 // return 64-bit result + mov rp=loc0 + br.ret.sptk.few rp +END(ia32_execve) + // // Get possibly unaligned sigmask argument into an aligned // kernel buffer - .text - GLOBAL_ENTRY(ia32_rt_sigsuspend) // We'll cheat and not do an alloc here since we are ultimately // going to do a simple branch to the IA64 sys_rt_sigsuspend.
@@ -46,8 +71,9 @@ cmp.ge p6,p7=r8,r0 // syscall executed successfully? adds r2=IA64_PT_REGS_R8_OFFSET+16,sp // r2 = &pt_regs.r8 ;; + alloc r3=ar.pfs,0,0,0,0 // drop the syscall argument frame st8 [r2]=r8 // store return value in slot for r8 - br.cond.sptk.few ia64_leave_kernel + br.cond.sptk.many ia64_leave_kernel END(ia32_ret_from_syscall) //
@@ -69,7 +95,8 @@ ;; st8.spill [r2]=r8 // store return value in slot for r8 br.call.sptk.few rp=invoke_syscall_trace // give parent a chance to catch return value -.ret2: br.cond.sptk.many ia64_leave_kernel // rp MUST be != ia64_leave_kernel! +.ret2: alloc r2=ar.pfs,0,0,0,0 // drop the syscall argument frame + br.cond.sptk.many ia64_leave_kernel // rp MUST be != ia64_leave_kernel! END(ia32_trace_syscall) GLOBAL_ENTRY(sys32_vfork)
@@ -116,7 +143,7 @@ data8 sys_creat data8 sys_link data8 sys_unlink /* 10 */ - data8 sys32_execve + data8 ia32_execve data8 sys_chdir data8 sys32_time data8 sys_mknod
@@ -153,7 +180,7 @@ data8 sys_brk /* 45 */ data8 sys_setgid data8 sys_getgid - data8 sys32_ni_syscall + data8 sys32_signal data8 sys_geteuid data8 sys_getegid /* 50 */ data8 sys_acct
arch/ia64/ia32/sys_ia32.c +41 -14
129 lines not on this page · raw message
arch/ia64/kernel/entry.S +27 -53
188 lines not on this page · raw message
arch/ia64/kernel/entry.h +1 -2
@@ -55,11 +55,10 @@ br.cond.sptk.many save_switch_stack; \ 1: -#define DO_LOAD_SWITCH_STACK (extra) \ +#define DO_LOAD_SWITCH_STACK \ movl r28; \ ;; \ mov b7=r28; \ br.cond.sptk.many load_switch_stack; \ 1: UNW(.restore sp); \ - extra; \ adds sp=IA64_SWITCH_STACK_SIZE,sp
arch/ia64/kernel/iosapic.c +0 -6
@@ -137,12 +137,6 @@ (dmode <<IOSAPIC_DELIVERY_SHIFT ) | vector); -#ifdef CONFIG_IA64_AZUSA_HACKS -/* set Flush Disable bit */ -if (addr != (char *)0xc0000000fec00000 ) - low32 |= (1 <<17 ); -#endif -/* dest contains both id and eid */ high32 = (dest <<IOSAPIC_DEST_SHIFT );
arch/ia64/kernel/ivt.S +22 -14
@@ -45,6 +45,12 @@ #include <asm/system.h> #include <asm/unistd.h> +#if 1 +# define PSR_DEFAULT_BITS psr.ac +#else +# define PSR_DEFAULT_BITS 0 +#endif + #define MINSTATE_VIRT /* needed by minstate.h */ #include "minstate.h"
@@ -184,15 +190,16 @@ * mode, walk the page table, and then re-execute the L3 PTE read * and go on normally after that. */ -itlb_fault: mov r16=cr.ifa // get virtual address mov r29° // save b0 mov r31=pr // save predicates +itlb_fault: mov r17=cr.iha // get virtual address of L3 PTE movl r30 // load nested fault continuation point ;; 1: ld8 r18=[r17] // read L3 PTE ;; + mov b0=r29 tbit.z p6,p0=r18,_PAGE_P_BIT // page present bit cleared? (p6) br.cond.spnt.many page_fault ;;
@@ -219,15 +226,16 @@ * mode, walk the page table, and then re-execute the L3 PTE read * and go on normally after that. */ -dtlb_fault: mov r16=cr.ifa // get virtual address mov r29° // save b0 mov r31=pr // save predicates +dtlb_fault: mov r17=cr.iha // get virtual address of L3 PTE movl r30 // load nested fault continuation point ;; 1: ld8 r18=[r17] // read L3 PTE ;; + mov b0=r29 tbit.z p6,p0=r18,_PAGE_P_BIT // page present bit cleared? (p6) br.cond.spnt.many page_fault ;;
@@ -261,6 +269,7 @@ (p8) thash r17=r16 ;; (p8) mov cr.iha=r17 +(p8) mov r29° // save b0 (p8) br.cond.dptk.many itlb_fault #endif extr.u r23=r21,IA64_PSR_CPL0_BIT,2 // extract psr.cpl
@@ -296,6 +305,7 @@ (p8) thash r17=r16 ;; (p8) mov cr.iha=r17 +(p8) mov r29° // save b0 (p8) br.cond.dptk.many dtlb_fault #endif extr.u r23=r21,IA64_PSR_CPL0_BIT,2 // extract psr.cpl
@@ -336,7 +346,7 @@ mov r9=cr.isr adds r3=8,r2 // set up second base pointer ;; - ssm psr.ic + ssm psr.ic | PSR_DEFAULT_BITS ;; srlz.i // guarantee that interrupt collection is enabled ;;
@@ -399,7 +409,6 @@ shr.u r18=r16,PMD_SHIFT // shift L2 index into position ;; ld8 r17=[r17] // fetch the L1 entry (may be 0) - mov b0=r30 ;; (p7) cmp.eq p6,p7=r17,r0 // was L1 entry NULL? dep r17=r18,r17,3,(PAGE_SHIFT-3) // compute address of L2 page table entry
@@ -409,8 +418,8 @@ ;; (p7) cmp.eq.or.andcm p6,p7=r17,r0 // was L2 entry NULL? dep r17=r19,r17,3,(PAGE_SHIFT-3) // compute address of L3 page table entry - ;; (p6) br.cond.spnt.many page_fault + mov b0=r30 br.sptk.many b0 // return to continuation point ;;
@@ -613,8 +622,7 @@ SAVE_MIN // uses r31; defines r2: - // turn interrupt collection back on: - ssm psr.ic + ssm psr.ic | PSR_DEFAULT_BITS ;; srlz.i // guarantee that interrupt collection is enabled cmp.eq pSys,pNonSys=r0,r0 // set pSys=1, pNonSys=0
@@ -701,11 +709,12 @@ .align 1024 ///////////////////////////////////////////////////////////////////////////////////////// // 0x3000 Entry 12 (size 64 bundles) External Interrupt (4) +interrupt: mov r31=pr // prepare to save predicates ;; SAVE_MIN_WITH_COVER // uses r31; defines r2 and r3 - ssm psr.ic // turn interrupt collection + ssm psr.ic | PSR_DEFAULT_BITS ;; adds r3=8,r2 // set up second base pointer for SAVE_REST srlz.i // ensure everybody knows psr.ic is back on
@@ -755,7 +764,7 @@ // The "alloc" can cause a mandatory store which could lead to // an "Alt DTLB" fault which we can handle only if psr.ic is on. // - ssm psr.ic + ssm psr.ic | PSR_DEFAULT_BITS ;; srlz.i // guarantee that interrupt collection is enabled ;;
@@ -801,7 +810,7 @@ SAVE_MIN ;; mov r14=cr.isr - ssm psr.ic + ssm psr.ic | PSR_DEFAULT_BITS ;; srlz.i // guarantee that interrupt collection is enabled ;;
@@ -887,8 +896,7 @@ mov r8=cr.iim // get break immediate (must be done while psr.ic is off) adds r3=8,r2 // set up second base pointer for SAVE_REST - // turn interrupt collection back on: - ssm psr.ic + ssm psr.ic | PSR_DEFAULT_BITS ;; srlz.i // guarantee that interrupt collection is enabled ;;
@@ -926,7 +934,7 @@ // wouldn't get the state to recover. // mov r15=cr.ifa - ssm psr.ic + ssm psr.ic | PSR_DEFAULT_BITS ;; srlz.i // guarantee that interrupt collection is enabled ;;
@@ -974,7 +982,7 @@ mov r10=cr.iim mov r11=cr.itir ;; - ssm psr.ic + ssm psr.ic | PSR_DEFAULT_BITS ;; srlz.i // guarantee that interrupt collection is enabled ;;
arch/ia64/kernel/mca_asm.S +1 -0
@@ -8,6 +8,7 @@ // kstack, switch modes, jump to C INIT handler // #include <linux/config.h> + #include <asm/pgtable.h> #include <asm/processor.h> #include <asm/mca_asm.h>
arch/ia64/kernel/minstate.h +6 -5
@@ -107,7 +107,7 @@* Note that psr.ic is NOT turned on by this macro. This is so that * we can pass interruption state as arguments to a handler. */ -#define DO_SAVE_MIN (COVER ,EXTRA ) \ +#define DO_SAVE_MIN (COVER ,SAVE_IFS ,EXTRA ) \ mov rARRSC=ar.rsc; \ mov rARPFS=ar.pfs; \ mov rR1=r1; \
@@ -116,14 +116,15 @@ mov rB6¶; /* rB6 = branch reg 6 */ \mov rCRIIP=cr.iip; \mov r1=ar.k6;/* r1 = current (physical) */ \ +COVER ; \ ;; \ invala; \ extr.u r16=rCRIPSR,32,2; /* extract psr.cpl */ \ ;; \ cmp.eq pKern,p7=r0,r16; /* are we in kernel mode already? (psr.cpl=0) */ \/* switch from user to kernel RBS: */ \ -COVER ; \ ;; \ +SAVE_IFS ; \MINSTATE_START_SAVE_MIN \ ;; \mov r16=r1;/* initialize first base pointer */ \
@@ -240,6 +241,6 @@# define STOPS #endif -#define SAVE_MIN_WITH_COVER DO_SAVE_MIN(cover;; mov rCRIFS=cr.ifs,) STOPS -#define SAVE_MIN_WITH_COVER_R19 DO_SAVE_MIN(cover;; mov rCRIFS=cr.ifs, mov r15=r19) STOPS -#define SAVE_MIN DO_SAVE_MIN(mov rCRIFS=r0,) STOPS +#define SAVE_MIN_WITH_COVER DO_SAVE_MIN(cover, mov rCRIFS=cr.ifs,) STOPS +#define SAVE_MIN_WITH_COVER_R19 DO_SAVE_MIN(cover, mov rCRIFS=cr.ifs, mov r15=r19) STOPS +#define SAVE_MIN DO_SAVE_MIN( , mov rCRIFS=r0, ) STOPS
arch/ia64/kernel/smp.c +0 -1
@@ -64,7 +64,6 @@volatile int __cpu_physical_id[NR_CPUS ] = {-1 , };/* Logical ID -> SAPIC ID */ int smp_num_cpus =1 ;volatile int smp_threads_ready;/* Set when the idlers are all forked */ -cycles_t cacheflush_time;unsigned long ap_wakeup_vector =-1 ;/* External Int to use to wakeup AP's */ static volatile unsigned long cpu_callin_map;
arch/ia64/kernel/time.c +30 -24
121 lines not on this page · raw message
arch/ia64/kernel/unaligned.c +456 -582
1,577 lines not on this page · raw message
arch/ia64/kernel/unwind.c +1 -1
@@ -306,7 +306,7 @@ } }else {/* access a stacked register */ - addr =ia64_rse_skip_regs ((unsigned long *) info->bsp, regnum); + addr =ia64_rse_skip_regs ((unsigned long *) info->bsp, regnum -32 ); nat_addr =ia64_rse_rnat_addr (addr);if ((unsigned long ) addr < info->regstk.limit || (unsigned long ) addr >= info->regstk.top)
arch/ia64/lib/copy_user.S +1 -0
@@ -319,6 +319,7 @@ EX(failure_out,(EPI) st1 [dst1]=val1[PIPE_DEPTH-1],1) br.ctop.dptk.few 5b ;; + mov ar.lc=saved_lc mov pr=saved_pr,0xffffffffffff0000 mov ar.pfs=saved_pfs br.ret.dptk.few rp
arch/ia64/lib/swiotlb.c +0 -2
@@ -10,8 +10,6 @@* unnecessary i-cache flushing. */ -#include <linux/config.h> -#include <linux/mm.h> #include <linux/module.h> #include <linux/pci.h>
arch/ia64/mm/init.c +5 -2
@@ -23,6 +23,7 @@#include <asm/pgalloc.h> #include <asm/sal.h> #include <asm/system.h> +#include <asm/uaccess.h> /* References to section boundaries: */ extern char _stext, _etext, _edata, __init_begin, __init_end;
@@ -37,6 +38,8 @@extern void ia64_tlb_init (void ); +unsigned long MAX_DMA_ADDRESS =PAGE_OFFSET +0x100000000UL ; +static unsigned long totalram_pages;/*
@@ -356,7 +359,7 @@# define vmlpt_bits (impl_va_bits - PAGE_SHIFT + pte_bits)# define POW2 (n) (1ULL << (n)) - impl_va_bits =ffz (~my_cpu_data.unimpl_va_mask); + impl_va_bits =ffz (~(my_cpu_data.unimpl_va_mask | (7UL <<61 )));if (impl_va_bits <51 || impl_va_bits >61 )panic ("CPU has bogus IMPL_VA_MSB value of %lu!\n" , impl_va_bits -1 );
@@ -390,7 +393,7 @@memset (zones_size,0 ,sizeof (zones_size)); - max_dma = (PAGE_ALIGN (MAX_DMA_ADDRESS ) >>PAGE_SHIFT ); + max_dma =virt_to_phys (MAX_DMA_ADDRESS ) >>PAGE_SHIFT ;if (max_low_pfn < max_dma) zones_size[ZONE_DMA ] = max_low_pfn;else {
arch/ia64/sn/fprom/fw-emu.c +2 -0
@@ -8,6 +8,8 @@* Copyright (C) 2000 Silicon Graphics, Inc. * Copyright (C) 2000 by Jack Steiner ([email protected]) */ +#include <linux/config.h> +#include <asm/efi.h> #include <asm/pal.h> #include <asm/sal.h>
drivers/char/mem.c +2 -2
@@ -484,13 +484,13 @@switch (orig) {case 0 : file->f_pos = offset; -return file->f_pos;case 1 : file->f_pos += offset; -return file->f_pos;default :return -EINVAL ; } +force_successful_syscall_return (); +return file->f_pos; }static int open_port (struct inode * inode,struct file * filp)
drivers/scsi/qla1280.c +40 -17
130 lines not on this page · raw message
fs/proc/base.c +15 -0
@@ -395,7 +395,22 @@ }#endif +static loff_t mem_lseek (struct file * file,loff_t offset,int orig) +{ +switch (orig) { +case 0 : + file->f_pos = offset; +case 1 : + file->f_pos += offset; +default : +return -EINVAL ; + } +force_successful_syscall_return (); +return file->f_pos; +} +static struct file_operations proc_mem_operations = { + llseek: mem_lseek, read: mem_read, write: mem_write, };
include/asm-ia64/acpikcfg.h +1 -0
@@ -1,4 +1,5 @@#include <linux/config.h> +#ifdef CONFIG_ACPI_KERNEL_CONFIG /* * acpikcfg.h - ACPI based Kernel Configuration Manager External Interfaces
include/asm-ia64/bitops.h +1 -0
@@ -158,6 +158,7 @@ __asm__ ("getf.exp %0=%1" :"=r" (exp) :"f" (d));return exp -0xffff ; } +/* * ffs: find first bit set. This is defined the same way as * the libc and compiler builtin ffs routines, therefore
include/asm-ia64/dma.h +5 -20
@@ -2,35 +2,20 @@#define _ASM_IA64_DMA_H/* -* Copyright (C) 1998, 1999 Hewlett-Packard Co -* Copyright (C) 1998, 1999 David Mosberger-Tang <[email protected]> +* Copyright (C) 1998-2001 Hewlett-Packard Co +* Copyright (C) 1998-2001 David Mosberger-Tang <[email protected]> */ #include <linux/config.h> -#include <linux/spinlock.h> /* And spinlocks */ -#include <linux/delay.h> #include <asm/io.h> /* need byte IO */ -#ifdef HAVE_REALLY_SLOW_DMA_CONTROLLER -#define dma_outb outb_p -#else -#define dma_outb outb -#endif - -#define dma_inb inb - -#define MAX_DMA_CHANNELS 8 -#define MAX_DMA_ADDRESS 0xffffffffUL - -extern spinlock_t dma_spin_lock; - -/* From PCI */ +extern unsigned long MAX_DMA_ADDRESS ;#ifdef CONFIG_PCI -extern int isa_dma_bridge_buggy; +extern int isa_dma_bridge_buggy;#else -#define isa_dma_bridge_buggy (0) +# define isa_dma_bridge_buggy (0)#endif #endif /* _ASM_IA64_DMA_H */
include/asm-ia64/ia32.h +2 -1
@@ -378,9 +378,10 @@ia64_psr (regs)->ri =0 ;/* clear return slot number */ \ia64_psr (regs)->is =1 ;/* IA-32 instruction set */ \ regs->cr_iip = new_ip; \ - regs->r12 = new_sp; \ + regs->ar_rsc =0xc ;/* enforced lazy mode, priv. level 3 */ \ regs->ar_rnat =0 ; \ regs->loadrs =0 ; \ + regs->r12 = new_sp; \ }while (0 ) extern void ia32_gdt_init (void);
include/asm-ia64/mmu_context.h +7 -14
@@ -12,21 +12,14 @@#include <asm/processor.h> /* -* Routines to manage the allocation of task context numbers. Task -* context numbers are used to reduce or eliminate the need to perform -* TLB flushes due to context switches. Context numbers are -* implemented using ia-64 region ids. Since ia-64 TLBs do not -* guarantee that the region number is checked when performing a TLB -* lookup, we need to assign a unique region id to each region in a -* process. We use the least significant three bits in a region id -* for this purpose. On processors where the region number is checked -* in TLB lookups, we can get back those two bits by defining -* CONFIG_IA64_TLB_CHECKS_REGION_NUMBER. The macro -* IA64_REGION_ID_BITS gives the number of bits in a region id. The -* architecture manual guarantees this number to be in the range -* 18-24. +* Routines to manage the allocation of task context numbers. Task context numbers are +* used to reduce or eliminate the need to perform TLB flushes due to context switches. +* Context numbers are implemented using ia-64 region ids. Since the IA-64 TLB does not +* consider the region number when performing a TLB lookup, we need to assign a unique +* region id to each region in a process. We use the least significant three bits in a +* region id for this purpose. * -* Copyright (C) 1998 David Mosberger-Tang <[email protected]> +* Copyright (C) 1998-2001 David Mosberger-Tang <[email protected]> */ #define IA64_REGION_ID_KERNEL 0/* the kernel's region id (tlb.c depends on this being 0) */
include/asm-ia64/offsets.h +14 -12
@@ -1,14 +1,17 @@#ifndef _ASM_IA64_OFFSETS_H#define _ASM_IA64_OFFSETS_H +/* * DO NOT MODIFY * -* This file was generated by arch/ia64/tools/print_offsets.awk. +* This file was generated by arch/ia64/tools/print_offsets. * */ -#define PT_PTRACED_BIT 0 -#define PT_TRACESYS_BIT 1 -#define IA64_TASK_SIZE 3408/* 0xd50 */ + +#define PT_PTRACED_BIT 0 +#define PT_TRACESYS_BIT 1 + +#define IA64_TASK_SIZE 3376/* 0xd30 */ #define IA64_PT_REGS_SIZE 400/* 0x190 */ #define IA64_SWITCH_STACK_SIZE 560/* 0x230 */ #define IA64_SIGINFO_SIZE 128/* 0x80 */
@@ -18,10 +21,9 @@#define IA64_TASK_SIGPENDING_OFFSET 16/* 0x10 */ #define IA64_TASK_NEED_RESCHED_OFFSET 40/* 0x28 */ #define IA64_TASK_PROCESSOR_OFFSET 100/* 0x64 */ -#define IA64_TASK_THREAD_OFFSET 960/* 0x3c0 */ -#define IA64_TASK_THREAD_KSP_OFFSET 960/* 0x3c0 */ -#define IA64_TASK_THREAD_SIGMASK_OFFSET 3256/* 0xcb8 */ -#define IA64_TASK_PFM_NOTIFY 3152/* 0xc50 */ +#define IA64_TASK_THREAD_OFFSET 1456/* 0x5b0 */ +#define IA64_TASK_THREAD_KSP_OFFSET 1456/* 0x5b0 */ +#define IA64_TASK_THREAD_SIGMASK_OFFSET 3224/* 0xc98 */ #define IA64_TASK_PID_OFFSET 196/* 0xc4 */ #define IA64_TASK_MM_OFFSET 88/* 0x58 */ #define IA64_PT_REGS_CR_IPSR_OFFSET 0/* 0x0 */
@@ -71,7 +73,7 @@#define IA64_PT_REGS_F8_OFFSET 368/* 0x170 */ #define IA64_PT_REGS_F9_OFFSET 384/* 0x180 */ #define IA64_SWITCH_STACK_CALLER_UNAT_OFFSET 0/* 0x0 */ -#define IA64_SWITCH_STACK_AR_FPSR_OFFSET 8/* 0x8 */ +#define IA64_SWITCH_STACK_AR_FPSR_OFFSET 8/* 0x8 */ #define IA64_SWITCH_STACK_F2_OFFSET 16/* 0x10 */ #define IA64_SWITCH_STACK_F3_OFFSET 32/* 0x20 */ #define IA64_SWITCH_STACK_F4_OFFSET 48/* 0x30 */
@@ -110,8 +112,8 @@#define IA64_SWITCH_STACK_B5_OFFSET 504/* 0x1f8 */ #define IA64_SWITCH_STACK_AR_PFS_OFFSET 512/* 0x200 */ #define IA64_SWITCH_STACK_AR_LC_OFFSET 520/* 0x208 */ -#define IA64_SWITCH_STACK_AR_UNAT_OFFSET 528/* 0x210 */ -#define IA64_SWITCH_STACK_AR_RNAT_OFFSET 536/* 0x218 */ +#define IA64_SWITCH_STACK_AR_UNAT_OFFSET 528/* 0x210 */ +#define IA64_SWITCH_STACK_AR_RNAT_OFFSET 536/* 0x218 */ #define IA64_SWITCH_STACK_AR_BSPSTORE_OFFSET 544/* 0x220 */ #define IA64_SWITCH_STACK_PR_OFFSET 552/* 0x228 */ #define IA64_SIGCONTEXT_AR_BSP_OFFSET 72/* 0x48 */
@@ -119,7 +121,7 @@#define IA64_SIGCONTEXT_FLAGS_OFFSET 0/* 0x0 */ #define IA64_SIGCONTEXT_CFM_OFFSET 48/* 0x30 */ #define IA64_SIGCONTEXT_FR6_OFFSET 560/* 0x230 */ -#define IA64_CLONE_VFORK 16384/* 0x4000 */ +#define IA64_CLONE_VFORK 16384/* 0x4000 */ #define IA64_CLONE_VM 256/* 0x100 */ #endif /* _ASM_IA64_OFFSETS_H */
include/asm-ia64/pgtable.h +3 -2
@@ -8,11 +8,12 @@* This hopefully works with any (fixed) IA-64 page-size, as defined * in <asm/page.h> (currently 8192). * -* Copyright (C) 1998-2000 Hewlett-Packard Co -* Copyright (C) 1998-2000 David Mosberger-Tang <[email protected]> +* Copyright (C) 1998-2001 Hewlett-Packard Co +* Copyright (C) 1998-2001 David Mosberger-Tang <[email protected]> */ #include <linux/config.h> +#include <asm/mman.h> #include <asm/page.h> #include <asm/processor.h>
include/asm-ia64/processor.h +6 -3
@@ -230,9 +230,12 @@#define IA64_USEC_PER_CYC_SHIFT 41/* -* CPU type, hardware bug flags, and per-CPU state. +* CPU type, hardware bug flags, and per-CPU state. Frequently used +* state comes earlier: */ struct cpuinfo_ia64 { +__u64 itm_delta;/* # of clock cycles between clock ticks */ +__u64 itm_next;/* interval timer mask value to use for next clock tick */ __u64 *pgd_quick;__u64 *pmd_quick;__u64 *pte_quick;
@@ -353,10 +356,10 @@ia64_psr (regs)->is =0 ;/* IA-64 instruction set */ \ regs->cr_iip = new_ip; \ regs->ar_rsc =0xf ;/* eager mode, privilege level 3 */ \ - regs->r12 = new_sp -16 ;/* allocate 16 byte scratch area */ \ - regs->ar_bspstore =IA64_RBS_BOT ; \ regs->ar_rnat =0 ; \ + regs->ar_bspstore =IA64_RBS_BOT ; \ regs->loadrs =0 ; \ + regs->r12 = new_sp -16 ;/* allocate 16 byte scratch area */ \ }while (0 )/* Forward declarations, a strange C thing... */
include/asm-ia64/segment.h +1 -1
@@ -3,4 +3,4 @@/* Only here because we have some old header files that expect it.. */ -#endif /* __ALPHA_SEGMENT_H */ +#endif /* _ASM_IA64_SEGMENT_H */
include/asm-ia64/sn/addrs.h +1 -0
@@ -11,6 +11,7 @@#define _ASM_SN_ADDRS_H#include <linux/config.h> +#if _LANGUAGE_C#include <linux/types.h> #endif /* _LANGUAGE_C */
include/asm-ia64/sn/agent.h +1 -0
@@ -13,6 +13,7 @@#define _ASM_SGI_SN_AGENT_H#include <linux/config.h> +#include <asm/sn/addrs.h> #include <asm/sn/arch.h> //#include <asm/sn/io.h>
include/asm-ia64/sn/mmzone_sn1.h +2 -2
@@ -1,11 +1,11 @@#ifndef _ASM_IA64_MMZONE_SN1_H#define _ASM_IA64_MMZONE_SN1_H +#include <linux/config.h> +/* * Copyright, 2000, Silicon Graphics, [email protected] */ - -#include <linux/config.h> /* Maximum configuration supported by SNIA hardware. There are other * restrictions that may limit us to a smaller max configuration.
include/asm-ia64/timex.h +6 -5
@@ -2,14 +2,15 @@#define _ASM_IA64_TIMEX_H/* -* Copyright (C) 1998, 1999 Hewlett-Packard Co -* Copyright (C) 1998, 1999 David Mosberger-Tang <[email protected]> +* Copyright (C) 1998-2001 Hewlett-Packard Co +* Copyright (C) 1998-2001 David Mosberger-Tang <[email protected]> +*/ +/* +* 2001/01/18 davidm Removed CLOCK_TICK_RATE. It makes no sense on IA-64. +* Also removed cacheflush_time as it's entirely unused. */ - -#define CLOCK_TICK_RATE 1193180/* Underlying HZ XXX fix me! */ typedef unsigned long cycles_t ; -extern cycles_t cacheflush_time;static inline cycles_t get_cycles (void )
kernel/sched.c +2 -2
@@ -260,7 +260,7 @@ target_tsk = tsk; } }else { -if (oldest_idle =-1ULL ) { +if (oldest_idle = (cycles_t) -1 ) {int prio =preemption_goodness (tsk, p, cpu);if (prio > max_prio) {
@@ -272,7 +272,7 @@ } tsk = target_tsk;if (tsk) { -if (oldest_idle !=-1ULL ) { +if (oldest_idle != (cycles_t) -1 ) { best_cpu = tsk->processor; goto send_now_idle; }
mm/memory.c +2 -2
@@ -473,7 +473,7 @@ goto out_unlock; } } -if (handle_mm_fault (current->mm, vma, ptr, datain) <=0 ) +if (handle_mm_fault (current->mm, vma, ptr, datain ?VM_READ :VM_WRITE ) <=0 ) goto out_unlock;spin_lock (&mm->page_table_lock); map =follow_page (ptr);
@@ -1223,7 +1223,7 @@if (addr >= end)BUG ();do { -if (handle_mm_fault (mm, vma, addr, write) <0 ) +if (handle_mm_fault (mm, vma, addr, write ?VM_WRITE :VM_READ ) <0 )return -1 ; addr +=PAGE_SIZE ; }while (addr < end);
[Linux-ia64] kernel update (relative to 2.4.1)
In reply to David MosbergerHere is a quick update of last week's patch that brings us in sync with 2.4.1. As usual, the patch is available at ftp.*.kernel.org in /pub/linux/kernel/ports/ia64//linux-2.4.1-ia64-010131.diff*.
Summary of changes:
- add Don's IA-32 patch that I missed last week
- add stop bit in integer division that Chuck found to be missing; as far as I know, this didn't cause any actual problems on Itanium, but it was clearly wrong
- schedule save_switch_stack/load_switch_stack for Itanium
- Gerrit: fix config.in so it works with "make xconfig" again
- print fpswa fault message as KERN_WARNING; use "dmesg -n 4" to get rid of it
Enjoy,
--david
arch/ia64/config.in +12 -7
@@ -37,22 +37,32 @@ 16KB CONFIG_IA64_PAGE_SIZE_16KB \ 64KB CONFIG_IA64_PAGE_SIZE_64KB" 16KB -if [ "$CONFIG_IA64_DIG" = "y" ]; then +if [ "$CONFIG_IA64_DIG" = "y" -o "$CONFIG_IA64_SGI_SN1" = "y" ]; then define_bool CONFIG_ITANIUM y define_bool CONFIG_IA64_BRL_EMU y +fi + +if [ "$CONFIG_ITANIUM" = "y" ]; then bool ' Enable Itanium A-step specific code' CONFIG_ITANIUM_ASTEP_SPECIFIC bool ' Enable Itanium B-step specific code' CONFIG_ITANIUM_BSTEP_SPECIFIC if [ "$CONFIG_ITANIUM_BSTEP_SPECIFIC" = "y" ]; then bool ' Enable Itanium B0-step specific code' CONFIG_ITANIUM_B0_SPECIFIC + fi + if [ "$CONFIG_ITANIUM_BSTEP_SPECIFIC" = "y" ]; then bool ' Enable Itanium B1-step specific code' CONFIG_ITANIUM_B1_SPECIFIC + fi + if [ "$CONFIG_ITANIUM_BSTEP_SPECIFIC" = "y" ]; then bool ' Enable Itanium B2-step specific code' CONFIG_ITANIUM_B2_SPECIFIC fi bool ' Enable Itanium C-step specific code' CONFIG_ITANIUM_CSTEP_SPECIFIC if [ "$CONFIG_ITANIUM_CSTEP_SPECIFIC" = "y" ]; then bool ' Enable Itanium C0-step specific code' CONFIG_ITANIUM_C0_SPECIFIC fi - bool ' Force interrupt redirection' CONFIG_IA64_HAVE_IRQREDIR bool ' Enable use of global TLB purge instruction (ptc.g)' CONFIG_ITANIUM_PTCG +fi + +if [ "$CONFIG_IA64_DIG" = "y" ]; then + bool ' Force interrupt redirection' CONFIG_IA64_HAVE_IRQREDIR bool ' Enable SoftSDV hacks' CONFIG_IA64_SOFTSDV_HACKS bool ' Enable IA-64 Machine Check Abort' CONFIG_IA64_MCA bool ' Enable ACPI 2.0 with errata 1.3' CONFIG_ACPI20
@@ -65,11 +75,6 @@ fi if [ "$CONFIG_IA64_SGI_SN1" = "y" ]; then - bool ' Enable use of global TLB purge instruction (ptc.g)' CONFIG_ITANIUM_PTCG - bool ' Enable Itanium B-step specific code' CONFIG_ITANIUM_BSTEP_SPECIFIC - if [ "$CONFIG_ITANIUM_BSTEP_SPECIFIC" = "y" ]; then - bool ' Enable Itanium B0-step specific code' CONFIG_ITANIUM_B0_SPECIFIC - fi bool ' Enable SGI Medusa Simulator Support' CONFIG_IA64_SGI_SN1_SIM n define_bool CONFIG_DEVFS_DEBUG y define_bool CONFIG_DEVFS_FS y
arch/ia64/ia32/ia32_entry.S +2 -2
@@ -160,8 +160,8 @@ data8 sys32_ni_syscall /* sys_stime is not supported on IA64 */ /* 25 */ data8 sys32_ptrace data8 sys32_alarm - data8 sys_pause data8 sys32_ni_syscall + data8 sys_pause data8 ia32_utime /* 30 */ data8 sys32_ni_syscall /* old stty syscall holder */ data8 sys32_ni_syscall /* old gtty syscall holder */
@@ -276,7 +276,7 @@ data8 sys32_getdents data8 sys32_select data8 sys_flock - data8 sys_msync + data8 sys32_msync data8 sys32_readv /* 145 */ data8 sys32_writev data8 sys_getsid
arch/ia64/ia32/sys_ia32.c +19 -13
@@ -655,7 +655,7 @@ ia32_utime(char * filename, struct utimbuf_32 *times32) {mm_segment_t old_fs =get_fs (); -struct timeval tv[2 ]; +struct timeval tv[2 ], *tvp;long ret;if (times32) {
@@ -664,15 +664,10 @@get_user (tv[1 ].tv_sec, ×32->mtime); tv[1 ].tv_usec =0 ;set_fs (KERNEL_DS ); - }else { -set_fs (KERNEL_DS ); - ret =sys_gettimeofday (&tv[0 ],0 ); -if (ret <0 ) - goto out; - tv[1 ] = tv[0 ]; - } - ret =sys_utimes (filename, tv); - out: + tvp = tv; + }else + tvp =NULL ; + ret =sys_utimes (filename, tvp);set_fs (old_fs);return ret; }
@@ -2497,7 +2492,7 @@case F_GETLK :case F_SETLK :case F_SETLKW : -if (cmd !=F_GETLK &&get_flock32 (&f, (struct flock32 *)((long )arg))) +if (get_flock32 (&f, (struct flock32 *)((long )arg)))return -EFAULT ; old_fs =get_fs ();set_fs (KERNEL_DS );
@@ -2667,14 +2662,25 @@return (ret); } -asmlinkage long sys_msync (unsigned long start,size_t len,int flags); - asmlinkage intsys_pause (void ) { current->state =TASK_INTERRUPTIBLE ;schedule ();return -ERESTARTNOHAND ; +} + +asmlinkage long sys_msync (unsigned long start,size_t len,int flags); + +asmlinkage int +sys32_msync (unsigned int start,unsigned int len,int flags) +{ +unsigned int addr; + +if (OFFSET4K (start)) +return -EINVAL ; + addr = start &PAGE_MASK ; +return (sys_msync (addr, len + (start - addr), flags)); }#ifdef NOTYET /* UNTESTED FOR IA64 FROM HERE DOWN */
arch/ia64/kernel/efi_stub.S +2 -2
@@ -58,7 +58,7 @@ ;; mov loc2=gp // save global pointer mov loc4=ar.rsc // save RSE configuration - mov ar.rsc=r0 // put RSE in enforced lazy, LE mode + mov ar.rsc=0 // put RSE in enforced lazy, LE mode ;; ld8 gp=[in0] // load EFI function's global pointer
@@ -80,7 +80,7 @@ mov out5=in6 mov out6=in7 br.call.sptk.few rp¶ // call the EFI function -.ret1: mov ar.rsc=r0 // put RSE in enforced lazy, LE mode +.ret1: mov ar.rsc=0 // put RSE in enforced lazy, LE mode mov r16=loc3 br.call.sptk.few rp=ia64_switch_mode // return to virtual mode .ret2: mov ar.rsc=loc4 // restore RSE configuration
arch/ia64/kernel/entry.S +128 -117
387 lines not on this page · raw message
arch/ia64/kernel/entry.h +42 -30
103 lines not on this page · raw message
arch/ia64/kernel/gate.S +2 -2
@@ -153,7 +153,7 @@ ENTRY(setup_rbs) flushrs // must be first in insn - mov ar.rsc=r0 // put RSE into enforced lazy mode + mov ar.rsc=0 // put RSE into enforced lazy mode adds r16=(RNAT_OFF+SIGCONTEXT_OFF),sp ;; mov r14=ar.rnat // get rnat as updated by flushrs
@@ -167,7 +167,7 @@ ENTRY(restore_rbs) flushrs - mov ar.rsc=r0 // put RSE into enforced lazy mode + mov ar.rsc=0 // put RSE into enforced lazy mode adds r16=(RNAT_OFF+SIGCONTEXT_OFF),sp ;; ld8 r14=[r16] // get new rnat
arch/ia64/kernel/head.S +1 -1
@@ -113,7 +113,7 @@ */ addl r12=IA64_STK_OFFSET-IA64_PT_REGS_SIZE-16,r2 addl r2=IA64_RBS_OFFSET,r2 // initialize the RSE - mov ar.rsc=r0 // place RSE in enforced lazy mode + mov ar.rsc=0 // place RSE in enforced lazy mode ;; mov ar.bspstore=r2 // establish the new RSE stack ;;
arch/ia64/kernel/minstate.h +2 -2
@@ -29,7 +29,7 @@*/ #define MINSTATE_START_SAVE_MIN_VIRT \ dep r1=-1,r1,61,3; /* r1 = current (virtual) */ \ -(p7) mov ar.rsc=r0; /* set enforced lazy mode, pl 0, little-endian, loadrs=0 */ \ +(p7) mov ar.rsc=0; /* set enforced lazy mode, pl 0, little-endian, loadrs=0 */ \ ;; \ (p7) addl rKRBS=IA64_RBS_OFFSET,r1; /* compute base of RBS */ \ (p7) mov rARRNAT=ar.rnat; \
@@ -55,7 +55,7 @@*/ #define MINSTATE_START_SAVE_MIN_PHYS \ (pKern) movl sp=ia64_init_stack+IA64_STK_OFFSET-IA64_PT_REGS_SIZE; \ -(p7) mov ar.rsc=r0;/* set enforced lazy mode, pl 0, little-endian, loadrs=0 */ \ +(p7) mov ar.rsc=0;/* set enforced lazy mode, pl 0, little-endian, loadrs=0 */ \ (p7) addl rKRBS=IA64_RBS_OFFSET,r1; /* compute base of register backing store */ \ ;; \ (p7) mov rARRNAT=ar.rnat; \
arch/ia64/kernel/pal.S +4 -4
@@ -171,7 +171,7 @@ dep.z r8=r8,0,61 // convert rp to physical ;; mov b7 = loc2 // install target to branch reg - mov ar.rsc=r0 // put RSE in enforced lazy, LE mode + mov ar.rsc=0 // put RSE in enforced lazy, LE mode movl r16=PAL_PSR_BITS_TO_CLEAR movl r17=PAL_PSR_BITS_TO_SET ;;
@@ -182,7 +182,7 @@ .ret1: mov rp = r8 // install return address (physical) br.cond.sptk.few b7 1: - mov ar.rsc=r0 // put RSE in enforced lazy, LE mode + mov ar.rsc=0 // put RSE in enforced lazy, LE mode mov r16=loc3 // r16= original psr br.call.sptk.few rp=ia64_switch_mode // return to virtual mode .ret2:
@@ -224,7 +224,7 @@ mov loc4=ar.rsc // save RSE configuration dep.z loc2=loc2,0,61 // convert pal entry point to physical ;; - mov ar.rsc=r0 // put RSE in enforced lazy, LE mode + mov ar.rsc=0 // put RSE in enforced lazy, LE mode movl r16=PAL_PSR_BITS_TO_CLEAR movl r17=PAL_PSR_BITS_TO_SET ;;
@@ -236,7 +236,7 @@ .ret6: br.call.sptk.many rp· // now make the call .ret7: - mov ar.rsc=r0 // put RSE in enforced lazy, LE mode + mov ar.rsc=0 // put RSE in enforced lazy, LE mode mov r16=loc3 // r16= original psr br.call.sptk.few rp=ia64_switch_mode // return to virtual mode
arch/ia64/kernel/process.c +1 -0
@@ -347,6 +347,7 @@unw_get_gr (info, i, &dst[i], &nat);if (nat) nat_bits |= mask; +printk ("r%u = %c%016lx\n" , i, nat ?'*' :' ' , dst[i]); mask <<=1 ; } dst[32 ] = nat_bits;
arch/ia64/kernel/signal.c +0 -1
@@ -52,7 +52,6 @@struct sigcontext sc; }; -extern long sys_wait4 (int ,int *,int ,struct rusage *);extern long ia64_do_signal (sigset_t *,struct sigscratch *,long );/* forward decl */ long
arch/ia64/kernel/traps.c +2 -3
@@ -319,15 +319,14 @@if (copy_from_user (bundle, (void *) fault_ip,sizeof (bundle)))return -1 ; -#ifdef FPSWA_DEBUG if (fpu_swa_count >5 && jiffies - last_time >5 *HZ ) fpu_swa_count =0 ;if (++fpu_swa_count <5 ) { last_time = jiffies; -printk ("%s(%d): floating-point assist fault at ip %016lx\n" , +printk (KERN_WARNING "%s(%d): floating-point assist fault at ip %016lx\n" , current->comm, current->pid, regs->cr_iip +ia64_psr (regs)->ri); } -#endif + exception =fp_emulate (fp_fault, bundle, ®s->cr_ipsr, ®s->ar_fpsr, &isr, ®s->pr, ®s->cr_ifs, regs);if (fp_fault) {
arch/ia64/lib/idiv64.S +1 -0
@@ -42,6 +42,7 @@ // Transfer inputs to FP registers. setf.sig f8 = in0 setf.sig f9 = in1 + ;; UNW(.fframe 16) UNW(.save.f 0x20) stf.spill [sp] = f17,-16
drivers/acpi/acpiconf.c +4 -4
@@ -234,8 +234,8 @@ ext_obj = (ACPI_OBJECT *) ret_buf.pointer;switch (ext_obj->type) { -case ACPI_TYPE_NUMBER : - busnum = (NATIVE_UINT ) ext_obj->number.value; +case ACPI_TYPE_INTEGER : + busnum = (NATIVE_UINT ) ext_obj->integer.value; next_busnum = busnum +1 ;dprintk (("Acpi cfg:_BBN busnum is %ld\n " , busnum));break ;
@@ -266,8 +266,8 @@ ext_obj = (ACPI_OBJECT *) ret_buf.pointer;switch (ext_obj->type) { -case ACPI_TYPE_NUMBER : -if ((NATIVE_UINT ) ext_obj->number.value &ACPI_STA_DEVICE_PRESENT ) { +case ACPI_TYPE_INTEGER : +if ((NATIVE_UINT ) ext_obj->integer.value &ACPI_STA_DEVICE_PRESENT ) {dprintk (("Acpi cfg:_STA: pci bus %ld exist\n" , busnum)); }else {printk ("Acpi cfg:_STA: pci bus %ld not exist. Discarding the _PRT\n" , busnum);
fs/binfmt_elf.c +0 -14
@@ -484,20 +484,6 @@if (strcmp (elf_interpreter,"/usr/lib/libc.so.1" ) =0 ||strcmp (elf_interpreter,"/usr/lib/ld.so.1" ) =0 ) ibcs2_interpreter =1 ; -#if defined(__ia64__) && !defined(CONFIG_BINFMT_ELF32 ) -/* -* XXX temporary gross hack until all IA-64 Linux binaries -* use /lib/ld-linux-ia64.so.1 as the linker name. -*/ -#define INTRP64 "/lib/ld-linux-ia64.so.1" -if (strcmp (elf_interpreter,"/lib/ld-linux.so.2" ) =0 ) { -kfree (elf_interpreter); - elf_interpreter=(char *)kmalloc (sizeof (INTRP64 ),GFP_KERNEL ); -if (!elf_interpreter) - goto out_free_file; -strcpy (elf_interpreter,INTRP64 ); - } -#endif /* defined(__ia64__) && !defined(CONFIG_BINFMT_ELF32) */ #if 0 printk ("Using ELF interpreter %s\n" , elf_interpreter);#endif
include/asm-ia64/byteorder.h +5 -5
@@ -20,18 +20,18 @@ static __inline__ __const__ __u32__ia64_swab32 (__u32 x) { -return __ia64_swab64 (x) >>32 ; +return __ia64_swab64 (x) >>32 ; } static __inline__ __const__ __u16__ia64_swab16 (__u16 x) { -return __ia64_swab64 (x) >>48 ; +return __ia64_swab64 (x) >>48 ; } -#define __arch__swab64 (x) __ia64_swab64 (x) -#define __arch__swab32 (x) __ia64_swab32 (x) -#define __arch__swab16 (x) __ia64_swab16 (x) +#define __arch__swab64 (x) __ia64_swab64(x) +#define __arch__swab32 (x) __ia64_swab32(x) +#define __arch__swab16 (x) __ia64_swab16(x)#define __BYTEORDER_HAS_U64__
include/asm-ia64/errno.h +1 -1
@@ -135,5 +135,5 @@#define ENOMEDIUM 123/* No medium found */ #define EMEDIUMTYPE 124/* Wrong medium type */ - +#define EHASHCOLLISION 125/* Number of hash collisons exceeds max. generation value */ #endif /* _ASM_IA64_ERRNO_H */
include/asm-ia64/mca_asm.h +2 -2
@@ -72,7 +72,7 @@ ;; \ dep old_psr = 0, old_psr, 32, 32; \ \ - mov ar.rsc = r0 ; \ + mov ar.rsc = 0 ; \ ;; \mov temp2 = ar.bspstore; \ ;; \
@@ -148,7 +148,7 @@ dep temp2 = 0, temp2, PSR_IC, 2; \ ;; \ mov psr.l = temp2; \ - mov ar.rsc = r0; \ + mov ar.rsc = 0; \ ;; \ srlz.d; \mov temp2 = ar.bspstore; \
include/asm-ia64/system.h +1 -1
@@ -350,7 +350,7 @@case 2 : _o_ = (__u16) (long) (old);break ; \case 4 : _o_ = (__u32) (long) (old);break ; \case 8 : _o_ = (__u64) (long) (old);break ; \ -default : \ +default :break ; \ } \ __asm__ __volatile__ ("mov ar.ccv=%0;;" ::"rO" (_o_)); \switch (size) { \