From owner-svn-src-head@freebsd.org Sat Jan 2 19:28:37 2016 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 7C425A5EB58; Sat, 2 Jan 2016 19:28:37 +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 mx1.freebsd.org (Postfix) with ESMTPS id 2C5F71C62; Sat, 2 Jan 2016 19:28:37 +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 u02JSaMi081446; Sat, 2 Jan 2016 19:28:36 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u02JSa2a081443; Sat, 2 Jan 2016 19:28:36 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201601021928.u02JSa2a081443@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Sat, 2 Jan 2016 19:28:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r293057 - in head/sys: arm64/include dev/ofw sparc64/include X-SVN-Group: head 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.20 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: Sat, 02 Jan 2016 19:28:37 -0000 Author: nwhitehorn Date: Sat Jan 2 19:28:35 2016 New Revision: 293057 URL: https://svnweb.freebsd.org/changeset/base/293057 Log: Make using the #address-cells property on the interrupt parent in device tree parsing opt-out rather than opt-in. All FDT-based systems as well as PowerPC systems with real Open Firmware use the CHRP-derived binding that includes it, which makes SPARC the odd man out here. Making it opt-out avoids astonishment on new platform bring up. Modified: head/sys/arm64/include/ofw_machdep.h head/sys/dev/ofw/ofw_bus_subr.c head/sys/sparc64/include/ofw_machdep.h Modified: head/sys/arm64/include/ofw_machdep.h ============================================================================== --- head/sys/arm64/include/ofw_machdep.h Sat Jan 2 19:14:19 2016 (r293056) +++ head/sys/arm64/include/ofw_machdep.h Sat Jan 2 19:28:35 2016 (r293057) @@ -41,7 +41,4 @@ struct mem_region { vm_size_t mr_size; }; -/* FDT follows ePAPR */ -#define OFW_EPAPR - #endif /* _MACHINE_OFW_MACHDEP_H_ */ Modified: head/sys/dev/ofw/ofw_bus_subr.c ============================================================================== --- head/sys/dev/ofw/ofw_bus_subr.c Sat Jan 2 19:14:19 2016 (r293056) +++ head/sys/dev/ofw/ofw_bus_subr.c Sat Jan 2 19:28:35 2016 (r293057) @@ -361,10 +361,11 @@ ofw_bus_search_intrmap(void *intr, int i paddrsz = 0; while (i > 0) { bcopy(mptr + physsz + intrsz, &parent, sizeof(parent)); -#ifdef OFW_EPAPR +#ifndef OFW_IMAP_NO_IPARENT_ADDR_CELLS /* - * Find if we need to read the parent address data. Sparc64 - * uses a different encoding that doesn't include this data. + * Find if we need to read the parent address data. + * CHRP-derived OF bindings, including ePAPR-compliant FDTs, + * use this as an optional part of the specifier. */ if (OF_getencprop(OF_node_from_xref(parent), "#address-cells", &paddrsz, sizeof(paddrsz)) == -1) Modified: head/sys/sparc64/include/ofw_machdep.h ============================================================================== --- head/sys/sparc64/include/ofw_machdep.h Sat Jan 2 19:14:19 2016 (r293056) +++ head/sys/sparc64/include/ofw_machdep.h Sat Jan 2 19:28:35 2016 (r293057) @@ -34,6 +34,9 @@ typedef uint64_t cell_t; +/* sparc64 doesn't use the interrupt parent #address-cells in interrupt maps */ +#define OFW_IMAP_NO_IPARENT_ADDR_CELLS + int OF_decode_addr(phandle_t, int, int *, bus_addr_t *); void OF_getetheraddr(device_t, u_char *); u_int OF_getscsinitid(device_t);