Date: Sun, 18 Sep 2016 17:38:02 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> 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 Message-ID: <201609181738.u8IHc2bc024422@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609181738.u8IHc2bc024422>