Date: Thu, 5 May 2011 03:57:44 +0000 (UTC) From: Marcel Moolenaar <marcel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r221481 - projects/altix/sys/ia64/ia64 Message-ID: <201105050357.p453viAv080678@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marcel Date: Thu May 5 03:57:43 2011 New Revision: 221481 URL: http://svn.freebsd.org/changeset/base/221481 Log: Implement ipi_send() for Altix. This is quick-n-dirty, but works. We have SMP up and running. I haven't had a chance to test whether ptc.g works properly (given that the SHub has a register for it), but that's easily found out. Modified: projects/altix/sys/ia64/ia64/mp_machdep.c Modified: projects/altix/sys/ia64/ia64/mp_machdep.c ============================================================================== --- projects/altix/sys/ia64/ia64/mp_machdep.c Thu May 5 03:42:04 2011 (r221480) +++ projects/altix/sys/ia64/ia64/mp_machdep.c Thu May 5 03:57:43 2011 (r221481) @@ -497,14 +497,25 @@ ipi_all_but_self(int ipi) void ipi_send(struct pcpu *cpu, int xiv) { + uint64_t *ipip; + uint64_t ipi; u_int sapic_id; KASSERT(xiv != 0, ("ipi_send")); sapic_id = IA64_LID_GET_SAPIC_ID(cpu->pc_md.lid); +#if 0 + ipip = &(ia64_pib->ib_ipi[sapic_id][0]); + ipi = xiv; +#else + ipip = (void *)(IA64_PHYS_TO_RR6(0x800000000UL) | + ((u_long)cpu->pc_md.sgisn_nasid << 38) | 0x110000380UL); + ipi = 0x80000001fdc00000UL | ((u_long)xiv << 52) | (sapic_id << 4); +#endif + ia64_mf(); - ia64_st8(&(ia64_pib->ib_ipi[sapic_id][0]), xiv); + ia64_st8(ipip, ipi); ia64_mf_a(); CTR3(KTR_SMP, "ipi_send(%p, %d): cpuid=%d", cpu, xiv, PCPU_GET(cpuid)); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105050357.p453viAv080678>