From owner-svn-src-head@freebsd.org Tue Jun 14 16:41:40 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6B96B72335; Tue, 14 Jun 2016 16:41:40 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B63782EE9; Tue, 14 Jun 2016 16:41:40 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5EGfdi3016191; Tue, 14 Jun 2016 16:41:39 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5EGfdwD016190; Tue, 14 Jun 2016 16:41:39 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201606141641.u5EGfdwD016190@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 14 Jun 2016 16:41:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301890 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 16:41:41 -0000 Author: andrew Date: Tue Jun 14 16:41:39 2016 New Revision: 301890 URL: https://svnweb.freebsd.org/changeset/base/301890 Log: Move the arm call to intr_pic_init_secondary earlier in the secondary CPU initialisation. This ensures it will complete before signalling to the boot CPU it has booted. This fixes a race with the GIC where the arm_gic_map may not be populated before it is used to bind interrupts leading to some interrupts becoming bound to no CPUs. Approved by: re (kib) Sponsored by: ABT Systems Ltd Modified: head/sys/arm/arm/mp_machdep.c Modified: head/sys/arm/arm/mp_machdep.c ============================================================================== --- head/sys/arm/arm/mp_machdep.c Tue Jun 14 16:20:25 2016 (r301889) +++ head/sys/arm/arm/mp_machdep.c Tue Jun 14 16:41:39 2016 (r301890) @@ -199,6 +199,9 @@ init_secondary(int cpu) vfp_init(); #endif + /* Configure the interrupt controller */ + intr_pic_init_secondary(); + mtx_lock_spin(&ap_boot_mtx); atomic_add_rel_32(&smp_cpus, 1); @@ -237,7 +240,6 @@ init_secondary(int cpu) cpu_initclocks_ap(); CTR0(KTR_SMP, "go into scheduler"); - intr_pic_init_secondary(); /* Enter the scheduler */ sched_throw(NULL);