From owner-svn-src-all@freebsd.org Sun Sep 18 17:38:04 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 12AFABE0649; Sun, 18 Sep 2016 17:38:04 +0000 (UTC) (envelope-from kib@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 C84F4364; Sun, 18 Sep 2016 17:38:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8IHc3Bd024427; Sun, 18 Sep 2016 17:38:03 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8IHc2bc024422; Sun, 18 Sep 2016 17:38:02 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609181738.u8IHc2bc024422@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 18 Sep 2016 17:38:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305942 - in head: sbin/sysctl sys/amd64/amd64 sys/arm/arm sys/arm64/arm64 sys/sys 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.23 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: Sun, 18 Sep 2016 17:38:04 -0000 Author: kib Date: Sun Sep 18 17:38:02 2016 New Revision: 305942 URL: https://svnweb.freebsd.org/changeset/base/305942 Log: Consolidate four efi_next_descriptor() definitions. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sbin/sysctl/sysctl.c head/sys/amd64/amd64/machdep.c head/sys/arm/arm/machdep.c head/sys/arm64/arm64/machdep.c head/sys/sys/efi.h Modified: head/sbin/sysctl/sysctl.c ============================================================================== --- head/sbin/sysctl/sysctl.c Sun Sep 18 17:35:24 2016 (r305941) +++ head/sbin/sysctl/sysctl.c Sun Sep 18 17:38:02 2016 (r305942) @@ -637,9 +637,6 @@ S_vmtotal(size_t l2, void *p) } #ifdef __amd64__ -#define efi_next_descriptor(ptr, size) \ - ((struct efi_md *)(((uint8_t *) ptr) + size)) - static int S_efi_map(size_t l2, void *p) { Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Sun Sep 18 17:35:24 2016 (r305941) +++ head/sys/amd64/amd64/machdep.c Sun Sep 18 17:38:02 2016 (r305942) @@ -1056,9 +1056,6 @@ bios_add_smap_entries(struct bios_smap * } } -#define efi_next_descriptor(ptr, size) \ - ((struct efi_md *)(((uint8_t *) ptr) + size)) - static void add_efi_map_entries(struct efi_map_header *efihdr, vm_paddr_t *physmap, int *physmap_idx) Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Sun Sep 18 17:35:24 2016 (r305941) +++ head/sys/arm/arm/machdep.c Sun Sep 18 17:38:02 2016 (r305942) @@ -1398,9 +1398,6 @@ set_stackptrs(int cpu) #endif #ifdef EFI -#define efi_next_descriptor(ptr, size) \ - ((struct efi_md *)(((uint8_t *) ptr) + size)) - static void add_efi_map_entries(struct efi_map_header *efihdr, struct mem_region *mr, int *mrcnt) Modified: head/sys/arm64/arm64/machdep.c ============================================================================== --- head/sys/arm64/arm64/machdep.c Sun Sep 18 17:35:24 2016 (r305941) +++ head/sys/arm64/arm64/machdep.c Sun Sep 18 17:38:02 2016 (r305942) @@ -699,9 +699,6 @@ add_fdt_mem_regions(struct mem_region *m } #endif -#define efi_next_descriptor(ptr, size) \ - ((struct efi_md *)(((uint8_t *) ptr) + size)) - static void add_efi_map_entries(struct efi_map_header *efihdr, vm_paddr_t *physmap, u_int *physmap_idxp) Modified: head/sys/sys/efi.h ============================================================================== --- head/sys/sys/efi.h Sun Sep 18 17:35:24 2016 (r305941) +++ head/sys/sys/efi.h Sun Sep 18 17:38:02 2016 (r305942) @@ -90,6 +90,9 @@ struct efi_md { #define EFI_MD_ATTR_RT 0x8000000000000000UL }; +#define efi_next_descriptor(ptr, size) \ + ((struct efi_md *)(((uint8_t *)(ptr)) + (size))) + struct efi_tm { uint16_t tm_year; /* 1998 - 20XX */ uint8_t tm_mon; /* 1 - 12 */