From owner-svn-src-all@freebsd.org Tue Aug 23 04:37:05 2016 Return-Path: Delivered-To: svn-src-all@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 38EECBC1FE3; Tue, 23 Aug 2016 04:37:05 +0000 (UTC) (envelope-from jhibbits@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 EF01C15EA; Tue, 23 Aug 2016 04:37:04 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7N4b4AQ084977; Tue, 23 Aug 2016 04:37:04 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7N4b4iH084976; Tue, 23 Aug 2016 04:37:04 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201608230437.u7N4b4iH084976@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 23 Aug 2016 04:37:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r304656 - head/sys/powerpc/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Aug 2016 04:37:05 -0000 Author: jhibbits Date: Tue Aug 23 04:37:03 2016 New Revision: 304656 URL: https://svnweb.freebsd.org/changeset/base/304656 Log: tlb1_init() can be called twice on BookE Summary: There is no need to call tlb1_init() twice. Now it is called first time from booke_init() and second time from powerpc_init() (where it is under BOOKE switch). Although this does not cause immediate problems in the mainline kernel, this can lead to undesirable side effects like two TLB entries with the same VA in the TLB1. Presence of two TLB entries with the same VA can hang CPU. Test Plan: Add initial mapping for UART to the tlb1_init(), build and boot the kernel, ensure that mapping presents only once (most convinient way - through Lauterbah or similar hardware debugger) Submitted by: Ivan Krivonos Differential Revision: https://reviews.freebsd.org/D7607 Modified: head/sys/powerpc/powerpc/machdep.c Modified: head/sys/powerpc/powerpc/machdep.c ============================================================================== --- head/sys/powerpc/powerpc/machdep.c Tue Aug 23 04:26:30 2016 (r304655) +++ head/sys/powerpc/powerpc/machdep.c Tue Aug 23 04:37:03 2016 (r304656) @@ -288,10 +288,6 @@ powerpc_init(vm_offset_t fdt, vm_offset_ bzero(__bss_start, _end - __bss_start); init_static_kenv(NULL, 0); } -#ifdef BOOKE - tlb1_init(); -#endif - /* Store boot environment state */ OF_initial_setup((void *)fdt, NULL, (int (*)(void *))ofentry);