From owner-svn-src-head@freebsd.org Fri Jul 21 17:11:38 2017 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 2960DDAC6CF; Fri, 21 Jul 2017 17:11:38 +0000 (UTC) (envelope-from rlibby@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 E98C076B84; Fri, 21 Jul 2017 17:11:37 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6LHBa8x026117; Fri, 21 Jul 2017 17:11:37 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6LHBaZc026103; Fri, 21 Jul 2017 17:11:36 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <201707211711.v6LHBaZc026103@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Fri, 21 Jul 2017 17:11:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321335 - in head/sys: amd64/amd64 x86/x86 X-SVN-Group: head X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: in head/sys: amd64/amd64 x86/x86 X-SVN-Commit-Revision: 321335 X-SVN-Commit-Repository: base 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.23 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: Fri, 21 Jul 2017 17:11:38 -0000 Author: rlibby Date: Fri Jul 21 17:11:36 2017 New Revision: 321335 URL: https://svnweb.freebsd.org/changeset/base/321335 Log: __pcpu: gcc -Wredundant-decls Pollution from counter.h made __pcpu visible in amd64/pmap.c. Delete the existing extern decl of __pcpu in amd64/pmap.c and avoid referring to that symbol, instead accessing the pcpu region via PCPU_SET macros. Also delete an unused extern decl of __pcpu from mp_x86.c. Reviewed by: kib Approved by: markj (mentor) Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D11666 Modified: head/sys/amd64/amd64/pmap.c head/sys/x86/x86/mp_x86.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Fri Jul 21 16:14:35 2017 (r321334) +++ head/sys/amd64/amd64/pmap.c Fri Jul 21 17:11:36 2017 (r321335) @@ -274,8 +274,6 @@ pmap_modified_bit(pmap_t pmap) return (mask); } -extern struct pcpu __pcpu[]; - #if !defined(DIAGNOSTIC) #ifdef __GNUC_GNU_INLINE__ #define PMAP_INLINE __attribute__((__gnu_inline__)) inline @@ -1063,8 +1061,8 @@ pmap_bootstrap(vm_paddr_t *firstaddr) kernel_pmap->pm_pcids[i].pm_pcid = PMAP_PCID_KERN; kernel_pmap->pm_pcids[i].pm_gen = 1; } - __pcpu[0].pc_pcid_next = PMAP_PCID_KERN + 1; - __pcpu[0].pc_pcid_gen = 1; + PCPU_SET(pcid_next, PMAP_PCID_KERN + 1); + PCPU_SET(pcid_gen, 1); /* * pcpu area for APs is zeroed during AP startup. * pc_pcid_next and pc_pcid_gen are initialized by AP Modified: head/sys/x86/x86/mp_x86.c ============================================================================== --- head/sys/x86/x86/mp_x86.c Fri Jul 21 16:14:35 2017 (r321334) +++ head/sys/x86/x86/mp_x86.c Fri Jul 21 17:11:36 2017 (r321335) @@ -90,8 +90,6 @@ int mcount_lock; int mp_naps; /* # of Applications processors */ int boot_cpu_id = -1; /* designated BSP */ -extern struct pcpu __pcpu[]; - /* AP uses this during bootstrap. Do not staticize. */ char *bootSTK; int bootAP;