From owner-svn-src-all@FreeBSD.ORG Tue Oct 21 16:16:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4450EA2A; Tue, 21 Oct 2014 16:16:09 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9856223; Tue, 21 Oct 2014 16:16:08 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id s9LGG2qS070638 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 21 Oct 2014 19:16:02 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua s9LGG2qS070638 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id s9LGG2HA070637; Tue, 21 Oct 2014 19:16:02 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 21 Oct 2014 19:16:02 +0300 From: Konstantin Belousov To: Hans Petter Selasky Subject: Re: svn commit: r273377 - in head: share/man/man9 sys/amd64/amd64 sys/arm/arm sys/cam/scsi sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/dev/dtrace sys/compat/ndis sys/dev/acpi_support sys/de... Message-ID: <20141021161602.GD1877@kib.kiev.ua> References: <201410210731.s9L7VMww096983@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201410210731.s9L7VMww096983@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 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: Tue, 21 Oct 2014 16:16:09 -0000 On Tue, Oct 21, 2014 at 07:31:22AM +0000, Hans Petter Selasky wrote: > Author: hselasky > Date: Tue Oct 21 07:31:21 2014 > New Revision: 273377 > URL: https://svnweb.freebsd.org/changeset/base/273377 > > Log: > Fix multiple incorrect SYSCTL arguments in the kernel: > > - Wrong integer type was specified. > > - Wrong or missing "access" specifier. The "access" specifier > sometimes included the SYSCTL type, which it should not, except for > procedural SYSCTL nodes. > > - Logical OR where binary OR was expected. > > - Properly assert the "access" argument passed to all SYSCTL macros, > using the CTASSERT macro. This applies to both static- and dynamically > created SYSCTLs. > > - Properly assert the the data type for both static and dynamic > SYSCTLs. In the case of static SYSCTLs we only assert that the data > pointed to by the SYSCTL data pointer has the correct size, hence > there is no easy way to assert types in the C language outside a > C-function. > > - Rewrote some code which doesn't pass a constant "access" specifier > when creating dynamic SYSCTL nodes, which is now a requirement. > > - Updated "EXAMPLES" section in SYSCTL manual page. > > MFC after: 3 days > Sponsored by: Mellanox Technologies > > Modified: > head/share/man/man9/Makefile > head/share/man/man9/sysctl.9 > head/sys/amd64/amd64/fpu.c > head/sys/arm/arm/busdma_machdep-v6.c > head/sys/arm/arm/busdma_machdep.c > head/sys/cam/scsi/scsi_sa.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c > head/sys/cddl/dev/dtrace/dtrace_sysctl.c > head/sys/compat/ndis/kern_ndis.c > head/sys/dev/acpi_support/acpi_asus.c > head/sys/dev/acpi_support/acpi_asus_wmi.c > head/sys/dev/acpi_support/acpi_hp.c > head/sys/dev/acpi_support/acpi_ibm.c > head/sys/dev/acpi_support/acpi_rapidstart.c > head/sys/dev/acpi_support/acpi_sony.c > head/sys/dev/bxe/bxe.c > head/sys/dev/cxgb/cxgb_sge.c > head/sys/dev/cxgbe/t4_main.c > head/sys/dev/e1000/if_em.c > head/sys/dev/e1000/if_igb.c > head/sys/dev/e1000/if_lem.c > head/sys/dev/hatm/if_hatm.c > head/sys/dev/ixgbe/ixgbe.c > head/sys/dev/ixgbe/ixv.c > head/sys/dev/ixl/if_ixl.c > head/sys/dev/mpr/mpr.c > head/sys/dev/mps/mps.c > head/sys/dev/mrsas/mrsas.c > head/sys/dev/mrsas/mrsas.h > head/sys/dev/mxge/if_mxge.c > head/sys/dev/oce/oce_sysctl.c > head/sys/dev/qlxgb/qla_os.c > head/sys/dev/qlxgbe/ql_os.c > head/sys/dev/rt/if_rt.c > head/sys/dev/sound/pci/hda/hdaa.c > head/sys/dev/vxge/vxge.c > head/sys/dev/xen/netfront/netfront.c > head/sys/fs/devfs/devfs_devs.c > head/sys/fs/fuse/fuse_main.c > head/sys/fs/fuse/fuse_vfsops.c > head/sys/geom/geom_kern.c > head/sys/kern/kern_cpuset.c > head/sys/kern/kern_descrip.c > head/sys/kern/kern_mib.c > head/sys/kern/kern_synch.c > head/sys/kern/subr_devstat.c > head/sys/kern/subr_kdb.c > head/sys/kern/subr_uio.c > head/sys/kern/vfs_cache.c > head/sys/mips/mips/busdma_machdep.c > head/sys/net80211/ieee80211_ht.c > head/sys/net80211/ieee80211_hwmp.c > head/sys/net80211/ieee80211_mesh.c > head/sys/net80211/ieee80211_superg.c > head/sys/netgraph/bluetooth/common/ng_bluetooth.c > head/sys/netgraph/ng_base.c > head/sys/netgraph/ng_socket.c > head/sys/netinet/cc/cc_chd.c > head/sys/netinet/tcp_timer.c > head/sys/netipsec/ipsec.h > head/sys/netpfil/pf/pf.c > head/sys/ofed/drivers/net/mlx4/mlx4_en.h > head/sys/powerpc/powermac/fcu.c > head/sys/powerpc/powermac/smu.c > head/sys/powerpc/powerpc/cpu.c > head/sys/sys/sysctl.h > head/sys/vm/memguard.c > head/sys/vm/vm_kern.c > head/sys/x86/x86/busdma_bounce.c This seems to break at least PowerPC 64bit, or some bits were not committed. I have to add the following change to compile GENERIC64 kernel, otherwise I get cc1: warnings being treated as errors /usr/home/kostik/work/build/bsd/DEV/src/sys/powerpc/powerpc/busdma_machdep.c: In function 'alloc_bounce_zone': /usr/home/kostik/work/build/bsd/DEV/src/sys/powerpc/powerpc/busdma_machdep.c:1030: warning: initialization from incompatible pointer type *** [busdma_machdep.o] Error code 1 OTOH, I did not verified that 32bit PowerPC kernel is compilable with the change applied. diff --git a/sys/powerpc/powerpc/busdma_machdep.c b/sys/powerpc/powerpc/busdma_machdep.c index e35ecec..b58a91b 100644 --- a/sys/powerpc/powerpc/busdma_machdep.c +++ b/sys/powerpc/powerpc/busdma_machdep.c @@ -1027,9 +1027,9 @@ alloc_bounce_zone(bus_dma_tag_t dmat) SYSCTL_ADD_STRING(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, "lowaddr", CTLFLAG_RD, bz->lowaddrid, 0, ""); - SYSCTL_ADD_INT(busdma_sysctl_tree(bz), + SYSCTL_ADD_ULONG(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, - "alignment", CTLFLAG_RD, &bz->alignment, 0, ""); + "alignment", CTLFLAG_RD, &bz->alignment, ""); return (0); }