OpenBSD/sgi on octane2 - astpendingをcurproc->p_md.md_astpendingへ移動

べ、別にアンタの為に書いてる訳じゃないんだからねっ!!!

Index: mips64/mips64/exception.S
===================================================================
RCS file: /cvs/src/sys/arch/mips64/mips64/exception.S,v
retrieving revision 1.16
diff -r1.16 exception.S
247c248,250
<       lw      v0, astpending          # any pending interrupts?
---
>       GET_CPU_INFO(k1, k0)
>       PTR_L   k0, CI_CURPROCPADDR(k1)
>       lw      v0, P_ASTPENDING(k0)            # any pending interrupts?
423,424c430,432
<
<       lw      v0, astpending
---
>       GET_CPU_INFO(k1, k0)
>       PTR_L   k0, CI_CURPROCPADDR(k1)
>       lw      v0, P_ASTPENDING(k0)
Index: mips64/mips64/interrupt.c
===================================================================
RCS file: /cvs/src/sys/arch/mips64/mips64/interrupt.c,v
retrieving revision 1.35
diff -r1.35 interrupt.c
62,64d61
< volatile intrmask_t cpl;
< volatile intrmask_t ipending, astpending;
<
247c246
<       astpending = 0;
---
>       p->p_md.md_astpending = 0;
Index: mips64/include/cpu.h
===================================================================
RCS file: /cvs/src/sys/arch/mips64/include/cpu.h,v
retrieving revision 1.30
diff -r1.30 cpu.h
409,410c464,470
< #define       need_resched(info)      { want_resched = 1; aston(); }
< #define clear_resched(ci)     want_resched = 0
---
> #define       need_resched(ci) \
> do {                                                                  \
>       ci->ci_want_resched = 1;                                        \
>       if (ci->ci_curproc != NULL)                                     \
>               aston(ci->ci_curproc);                                  \
> } while (0)
> #define clear_resched(ci) (ci)->ci_want_resched = 0
417c477
< #define       need_proftick(p)        aston()
---
> #define       need_proftick(p)        aston(p)
423c483
< #define       signotify(p)    aston()
---
> void signotify(struct proc *);
425c485
< #define aston()               (astpending = 1)
---
> #define       aston(p)                ((p)->p_md.md_astpending = 1)
Index: mips64/include/proc.h
===================================================================
RCS file: /cvs/src/sys/arch/mips64/include/proc.h,v
retrieving revision 1.2
diff -r1.2 proc.h
54a55
>       intrmask_t md_astpending;
Index: mips64/mips64/cpu.c
===================================================================
RCS file: /cvs/src/sys/arch/mips64/mips64/cpu.c,v
retrieving revision 1.11
diff -r1.11 cpu.c
256a308,380
>
> #ifdef MULTIPROCESSOR
> void
> cpu_boot_secondary_processors(void)
> {
>       struct cpu_info *ci;
>       u_long i;
>
> //    mips64_ipi_init();
>       for (i = 0; i < MAXCPUS; i++) {
>               ci = cpu_info[i];
>               if (ci == NULL)
>                       continue;
>               if ((ci->ci_flags & CPUF_PRESENT) == 0)
>                       continue;
>               if (ci->ci_flags & CPUF_PRIMARY)
>                       continue;
>               cpu_boot_secondary(ci);
>       }
> }
>
> void
> cpu_boot_secondary(struct cpu_info *ci)
> {
>       u_long cpumask = (1UL << ci->ci_cpuid);
>
>       prom_cpu_boot_secondary(ci);
>
>       do
>               asm volatile ("sync");
>       while(!(cpus_running & cpumask));
> }
>
> void
> cpu_hatch(struct cpu_info *ci)
> {
>       u_long cpumask = (1UL << ci->ci_cpuid);
>
>       /*
>        * Make sure we can access the extended address space.
>        * Note that r10k and later do not allow XUSEG accesses
>        * from kernel mode unless SR_UX is set.
>        */
>       setsr(getsr() | SR_KX | SR_UX);
>
>       prom_cpu_hatch(ci);
>
>       atomic_setbits_int(&cpus_running, cpumask);
>
>       for (;;)
>               ;
> }
>
> void
> cpu_unidle(struct cpu_info *ci)
> {
> /*
>       if(ci != curcpu())
>           mips64_send_ipi(CI_IPI_NOTIFY, ci->ci_cpuid);
> */
> }
>
> /*
>  * Notify the current process (p) that it has a signal pending,
>  * process as soon as possible.
>  */
> void
> signotify(struct proc *p)
> {
>       aston(p);
>         cpu_unidle(p->p_cpu);
> }
> #endif /* MULTIPROCESSOR */

これでcpu.h周りの玉はほぼ打ち尽くした・・・か?