From owner-svn-src-all@freebsd.org Fri Jan 19 22:19:51 2018 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 83446ECBDAD; Fri, 19 Jan 2018 22:19:51 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5DFCB78DEC; Fri, 19 Jan 2018 22:19:51 +0000 (UTC) (envelope-from nwhitehorn@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A78DA136EB; Fri, 19 Jan 2018 22:19:50 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0JMJoUj039242; Fri, 19 Jan 2018 22:19:50 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0JMJo5a039241; Fri, 19 Jan 2018 22:19:50 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201801192219.w0JMJo5a039241@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Fri, 19 Jan 2018 22:19:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r328179 - head/sys/powerpc/aim X-SVN-Group: head X-SVN-Commit-Author: nwhitehorn X-SVN-Commit-Paths: head/sys/powerpc/aim X-SVN-Commit-Revision: 328179 X-SVN-Commit-Repository: base 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.25 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: Fri, 19 Jan 2018 22:19:51 -0000 Author: nwhitehorn Date: Fri Jan 19 22:19:50 2018 New Revision: 328179 URL: https://svnweb.freebsd.org/changeset/base/328179 Log: On AIM systems without a software-managed SLB, such as POWER9 systems using either hardware segment tables or radix-tree-based page tables, do not try to install SLB entries at trap boundaries. Modified: head/sys/powerpc/aim/trap_subr64.S Modified: head/sys/powerpc/aim/trap_subr64.S ============================================================================== --- head/sys/powerpc/aim/trap_subr64.S Fri Jan 19 22:17:13 2018 (r328178) +++ head/sys/powerpc/aim/trap_subr64.S Fri Jan 19 22:19:50 2018 (r328179) @@ -58,6 +58,9 @@ restore_usersrs: GET_CPUINFO(%r28) ld %r28,PC_USERSLB(%r28) + cmpdi %r28, 0 /* If user SLB pointer NULL, exit */ + beqlr + li %r29, 0 /* Set the counter to zero */ slbia @@ -83,6 +86,12 @@ restore_usersrs: restore_kernsrs: GET_CPUINFO(%r28) addi %r28,%r28,PC_KERNSLB + ld %r29,16(%r28) /* One past USER_SLB_SLOT */ + cmpdi %r28,0 + beqlr /* If first kernel entry is invalid, + * SLBs not in use, so exit early */ + + /* Otherwise, set up SLBs */ li %r29, 0 /* Set the counter to zero */ slbia