From owner-svn-src-all@freebsd.org Thu Jul 19 20:13:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8629B10486BC; Thu, 19 Jul 2018 20:13:34 +0000 (UTC) (envelope-from jhibbits@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 3AA25787AE; Thu, 19 Jul 2018 20:13:34 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1C32B2E044; Thu, 19 Jul 2018 20:13:34 +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 w6JKDXZ5038926; Thu, 19 Jul 2018 20:13:33 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JKDXcF038925; Thu, 19 Jul 2018 20:13:33 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201807192013.w6JKDXcF038925@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Thu, 19 Jul 2018 20:13:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336509 - head/sys/powerpc/include X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/include X-SVN-Commit-Revision: 336509 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.27 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: Thu, 19 Jul 2018 20:13:34 -0000 Author: jhibbits Date: Thu Jul 19 20:13:33 2018 New Revision: 336509 URL: https://svnweb.freebsd.org/changeset/base/336509 Log: Merge the md_page structs for AIM and Book-E into a single unioned struct Summary: Ports like sysutils/lsof troll through kernel structures, and therefore include kernel headers and all the dirty secrets involved. struct vm_page includes the struct md_page inline, which currently is only defined if AIM or BOOKE is defined. Thus, by default, sysutils/lsof cannot build, due to the struct md_page having an incomplete type. Fix this by merging the two struct definitions into an anonymous struct-union. A similar change could be made to unify the pmap structures as well. Reviewed By: nwhitehorn Differential Revision: https://reviews.freebsd.org/D16232 Modified: head/sys/powerpc/include/pmap.h Modified: head/sys/powerpc/include/pmap.h ============================================================================== --- head/sys/powerpc/include/pmap.h Thu Jul 19 20:11:14 2018 (r336508) +++ head/sys/powerpc/include/pmap.h Thu Jul 19 20:13:33 2018 (r336509) @@ -150,12 +150,6 @@ struct pmap { struct pvo_tree pmap_pvo; }; -struct md_page { - volatile int32_t mdpg_attrs; - vm_memattr_t mdpg_cache_attrs; - struct pvo_head mdpg_pvoh; -}; - #define pmap_page_get_memattr(m) ((m)->md.mdpg_cache_attrs) #define pmap_page_is_mapped(m) (!LIST_EMPTY(&(m)->md.mdpg_pvoh)) @@ -212,11 +206,6 @@ struct pv_entry { }; typedef struct pv_entry *pv_entry_t; -struct md_page { - TAILQ_HEAD(, pv_entry) pv_list; - int pv_tracked; -}; - #define pmap_page_get_memattr(m) VM_MEMATTR_DEFAULT #define pmap_page_is_mapped(m) (!TAILQ_EMPTY(&(m)->md.pv_list)) @@ -231,6 +220,20 @@ struct pmap { struct mtx pm_mtx; /* pmap mutex */ }; #endif /* AIM */ + +struct md_page { + union { + struct md_page_booke { + TAILQ_HEAD(, pv_entry) pv_list; + int pv_tracked; + }; + struct md_page_aim { + volatile int32_t mdpg_attrs; + vm_memattr_t mdpg_cache_attrs; + struct pvo_head mdpg_pvoh; + }; + }; +}; extern struct pmap kernel_pmap_store; #define kernel_pmap (&kernel_pmap_store)