svn commit: r260315 - head/lib/libusb
Author: hselasky Date: Sun Jan 5 10:41:43 2014 New Revision: 260315 URL: http://svnweb.freebsd.org/changeset/base/260315 Log: Implement two new libusb API functions. PR: usb/185454 MFC after:2 weeks Modified: head/lib/libusb/Makefile head/lib/libusb/libusb.3 head/lib/libusb/libusb.h head/lib/libusb/libusb10_io.c Modified: head/lib/libusb/Makefile == --- head/lib/libusb/MakefileSun Jan 5 02:00:05 2014(r260314) +++ head/lib/libusb/MakefileSun Jan 5 10:41:43 2014(r260315) @@ -130,6 +130,8 @@ MLINKS += libusb.3 libusb_event_handler_ MLINKS += libusb.3 libusb_lock_event_waiters.3 MLINKS += libusb.3 libusb_unlock_event_waiters.3 MLINKS += libusb.3 libusb_wait_for_event.3 +MLINKS += libusb.3 libusb_handle_events_timeout_completed.3 +MLINKS += libusb.3 libusb_handle_events_completed.3 MLINKS += libusb.3 libusb_handle_events_timeout.3 MLINKS += libusb.3 libusb_handle_events.3 MLINKS += libusb.3 libusb_handle_events_locked.3 Modified: head/lib/libusb/libusb.3 == --- head/lib/libusb/libusb.3Sun Jan 5 02:00:05 2014(r260314) +++ head/lib/libusb/libusb.3Sun Jan 5 10:41:43 2014(r260315) @@ -26,7 +26,7 @@ .\ .\ $FreeBSD$ .\ -.Dd June 7, 2013 +.Dd January 5, 2014 .Dt LIBUSB 3 .Os .Sh NAME @@ -485,11 +485,40 @@ transfer completes or another thread sto timeout expired. .Pp .Ft int +.Fn libusb_handle_events_timeout_completed libusb_context *ctx struct timeval *tv int *completed +Handle any pending events by checking if timeouts have expired and by +checking the set of file descriptors for activity. +If the +.Fa completed +argument is not equal to NULL, this function will +loop until a transfer completion callback sets the variable pointed to +by the +.Fa completed +argument to non-zero. +If the +.Fa tv +argument is not equal to NULL, this function will return +LIBUSB_ERROR_TIMEOUT after the given timeout. +Returns 0 on success, or a LIBUSB_ERROR code on failure or timeout. +.Pp +.Ft int +.Fn libusb_handle_events_completed libusb_context *ctx int *completed +Handle any pending events by checking the set of file descriptors for activity. +If the +.Fa completed +argument is not equal to NULL, this function will +loop until a transfer completion callback sets the variable pointed to +by the +.Fa completed +argument to non-zero. +Returns 0 on success, or a LIBUSB_ERROR code on failure. +.Pp +.Ft int .Fn libusb_handle_events_timeout libusb_context *ctx struct timeval *tv Handle any pending events by checking if timeouts have expired and by checking the set of file descriptors for activity. Returns 0 on success, or a -LIBUSB_ERROR code on failure. +LIBUSB_ERROR code on failure or timeout. .Pp .Ft int .Fn libusb_handle_events libusb_context *ctx @@ -508,7 +537,7 @@ Must be called with the event lock held. Determine the next internal timeout that libusb needs to handle. Returns 0 if there are no pending timeouts, 1 if a timeout was returned, or a LIBUSB_ERROR -code on failure. +code on failure or timeout. .Pp .Ft void .Fn libusb_set_pollfd_notifiers libusb_context *ctx libusb_pollfd_added_cb added_cb libusb_pollfd_removed_cb remove_cb void *user_data Modified: head/lib/libusb/libusb.h == --- head/lib/libusb/libusb.hSun Jan 5 02:00:05 2014(r260314) +++ head/lib/libusb/libusb.hSun Jan 5 10:41:43 2014(r260315) @@ -438,6 +438,8 @@ int libusb_event_handler_active(libusb_c void libusb_lock_event_waiters(libusb_context * ctx); void libusb_unlock_event_waiters(libusb_context * ctx); intlibusb_wait_for_event(libusb_context * ctx, struct timeval *tv); +intlibusb_handle_events_timeout_completed(libusb_context * ctx, struct timeval *tv, int *completed); +intlibusb_handle_events_completed(libusb_context * ctx, int *completed); intlibusb_handle_events_timeout(libusb_context * ctx, struct timeval *tv); intlibusb_handle_events(libusb_context * ctx); intlibusb_handle_events_locked(libusb_context * ctx, struct timeval *tv); Modified: head/lib/libusb/libusb10_io.c == --- head/lib/libusb/libusb10_io.c Sun Jan 5 02:00:05 2014 (r260314) +++ head/lib/libusb/libusb10_io.c Sun Jan 5 10:41:43 2014 (r260315) @@ -336,29 +336,50 @@ libusb_wait_for_event(libusb_context *ct } int -libusb_handle_events_timeout(libusb_context *ctx, struct timeval *tv) +libusb_handle_events_timeout_completed(libusb_context *ctx, +struct timeval *tv, int *completed) { - int err; + int err = 0; ctx = GET_CONTEXT(ctx); - DPRINTF(ctx, LIBUSB_DEBUG_FUNCTION, libusb_handle_events_timeout enter); + DPRINTF(ctx, LIBUSB_DEBUG_FUNCTION,
Re: svn commit: r260311 - in head/contrib: gcc gcc/cp gcc/doc gcclibs/include gcclibs/libiberty
On Sun, 5 Jan 2014 00:43:28 + (UTC) Pedro F. Giffuni wrote: Author: pfg Date: Sun Jan 5 00:43:28 2014 New Revision: 260311 URL: http://svnweb.freebsd.org/changeset/base/260311 Log: gcc: Add support for Apple's Block extension Block objects [1] are a C-level syntactic and runtime feature. They are similar to standard C functions, but in addition to executable code they may also contain variable bindings to automatic (stack) or managed (heap) memory. A block can therefore maintain a set of state (data) that it can use to impact behavior when executed. This port is based on Apple's GCC 5646 with some bugfixes from Apple GCC 5666.3. It has some small differences with the support in clang, which remains the recommended compiler. Perhaps the most notable difference is that in GCC that __block is not actually a keyword, but a macro. There will be workaround for this issue in a near future. Other issues can be consulted in the clang documentation [2] For better compatiblity with Apple's GCC and llvm-gcc some related fixes and features from Apple have been included. Support for the non-standard nested functions in GCC is now off by default. Some ports use nested functions. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r260320 - head/sys/arm/tegra
Author: ian Date: Sun Jan 5 15:33:33 2014 New Revision: 260320 URL: http://svnweb.freebsd.org/changeset/base/260320 Log: Use the common armv6 fdt_bus_tag defintion instead of an essentially identical local copy of it. Deleted: head/sys/arm/tegra/bus_space.c Modified: head/sys/arm/tegra/files.tegra2 Modified: head/sys/arm/tegra/files.tegra2 == --- head/sys/arm/tegra/files.tegra2 Sun Jan 5 13:55:33 2014 (r260319) +++ head/sys/arm/tegra/files.tegra2 Sun Jan 5 15:33:33 2014 (r260320) @@ -2,6 +2,7 @@ arm/arm/bus_space_asm_generic.Sstandard arm/arm/bus_space_generic.cstandard +arm/arm/bus_space-v6.c standard arm/arm/cpufunc_asm_armv5.Sstandard arm/arm/cpufunc_asm_arm11.Sstandard arm/arm/cpufunc_asm_armv7.Sstandard @@ -10,7 +11,6 @@ arm/arm/irq_dispatch.Sstandard arm/arm/gic.c standard arm/arm/mpcore_timer.c standard -arm/tegra/bus_space.c standard arm/tegra/common.c standard arm/tegra/tegra2_machdep.c standard ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r260311 - in head/contrib: gcc gcc/cp gcc/doc gcclibs/include gcclibs/libiberty
On 05.01.2014 06:45, Tijl Coosemans wrote: On Sun, 5 Jan 2014 00:43:28 + (UTC) Pedro F. Giffuni wrote: Author: pfg Date: Sun Jan 5 00:43:28 2014 New Revision: 260311 URL: http://svnweb.freebsd.org/changeset/base/260311 Log: gcc: Add support for Apple's Block extension Block objects [1] are a C-level syntactic and runtime feature. They are similar to standard C functions, but in addition to executable code they may also contain variable bindings to automatic (stack) or managed (heap) memory. A block can therefore maintain a set of state (data) that it can use to impact behavior when executed. This port is based on Apple's GCC 5646 with some bugfixes from Apple GCC 5666.3. It has some small differences with the support in clang, which remains the recommended compiler. Perhaps the most notable difference is that in GCC that __block is not actually a keyword, but a macro. There will be workaround for this issue in a near future. Other issues can be consulted in the clang documentation [2] For better compatiblity with Apple's GCC and llvm-gcc some related fixes and features from Apple have been included. Support for the non-standard nested functions in GCC is now off by default. Some ports use nested functions. We now have the Apple-GCC compatible -fnested-functions, however, this is of little relevance because on FreeBSD 10+ the default compiler (clang) doesn't support them at all. Most such ports should already be using the fsf gcc but I am not going to find out which do or dont; I simply won't merge this to 9 until there is a good reason to do it. * Pedro. *Anyone working on a GCD-enabled version of grep or sort? :). ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r260322 - head/share/mk
Author: dim Date: Sun Jan 5 16:40:41 2014 New Revision: 260322 URL: http://svnweb.freebsd.org/changeset/base/260322 Log: In addition to r260102, also define GCC_MS_EXTENSIONS in bsd.sys.mk, since kernel module builds do not use kern.pre.mk. MFC after:3 days X-MFC-With: r260102 Modified: head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.sys.mk == --- head/share/mk/bsd.sys.mkSun Jan 5 15:39:37 2014(r260321) +++ head/share/mk/bsd.sys.mkSun Jan 5 16:40:41 2014(r260322) @@ -123,6 +123,7 @@ CFLAGS+= -Qunused-arguments CFLAGS+=${CFLAGS.clang} CXXFLAGS+= ${CXXFLAGS.clang} .else # !CLANG +GCC_MS_EXTENSIONS= -fms-extensions CFLAGS+=${CFLAGS.gcc} CXXFLAGS+= ${CXXFLAGS.gcc} .endif # CLANG ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r260311 - in head/contrib: gcc gcc/cp gcc/doc gcclibs/include gcclibs/libiberty
On Sun, 05 Jan 2014 11:18:15 -0500 Pedro Giffuni wrote: On 05.01.2014 06:45, Tijl Coosemans wrote: On Sun, 5 Jan 2014 00:43:28 + (UTC) Pedro F. Giffuni wrote: Author: pfg Date: Sun Jan 5 00:43:28 2014 New Revision: 260311 URL: http://svnweb.freebsd.org/changeset/base/260311 Log: gcc: Add support for Apple's Block extension Block objects [1] are a C-level syntactic and runtime feature. They are similar to standard C functions, but in addition to executable code they may also contain variable bindings to automatic (stack) or managed (heap) memory. A block can therefore maintain a set of state (data) that it can use to impact behavior when executed. This port is based on Apple's GCC 5646 with some bugfixes from Apple GCC 5666.3. It has some small differences with the support in clang, which remains the recommended compiler. Perhaps the most notable difference is that in GCC that __block is not actually a keyword, but a macro. There will be workaround for this issue in a near future. Other issues can be consulted in the clang documentation [2] For better compatiblity with Apple's GCC and llvm-gcc some related fixes and features from Apple have been included. Support for the non-standard nested functions in GCC is now off by default. Some ports use nested functions. We now have the Apple-GCC compatible -fnested-functions, however, this is of little relevance because on FreeBSD 10+ the default compiler (clang) doesn't support them at all. Most such ports should already be using the fsf gcc but I am not going to find out which do or dont; I simply won't merge this to 9 until there is a good reason to do it. * Doesn't this affect architectures where clang isn't the default yet? You can grep the ports tree for nestedfct which currently implies USE_GCC=any, i.e. use base system gcc when available, otherwise use lang/gcc port. Do you think it's best to change this into USE_GCC=yes, i.e. always use lang/gcc port? ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r260323 - head/sys/arm/tegra
Author: ian Date: Sun Jan 5 16:45:34 2014 New Revision: 260323 URL: http://svnweb.freebsd.org/changeset/base/260323 Log: Eliminate use of fdt_immr_addr(), it's not needed for this SoC. Convert to the newer arm_devmap_add_entry() routine for creating device mappings. Modified: head/sys/arm/tegra/tegra2_machdep.c Modified: head/sys/arm/tegra/tegra2_machdep.c == --- head/sys/arm/tegra/tegra2_machdep.c Sun Jan 5 16:40:41 2014 (r260322) +++ head/sys/arm/tegra/tegra2_machdep.c Sun Jan 5 16:45:34 2014 (r260323) @@ -50,17 +50,12 @@ __FBSDID($FreeBSD$); #include dev/fdt/fdt_common.h -/* FIXME move to tegrareg.h */ -#define TEGRA2_BASE0xE000 /* KVM base for peripherials */ -#define TEGRA2_UARTA_VA_BASE 0xE0006000 -#define TEGRA2_UARTA_PA_BASE 0x70006000 - #define TEGRA2_CLK_RST_PA_BASE 0x60006000 #define TEGRA2_CLK_RST_OSC_FREQ_DET_REG0x58 #define TEGRA2_CLK_RST_OSC_FREQ_DET_STAT_REG 0x5C -#define OSC_FREQ_DET_TRIG (131) -#define OSC_FREQ_DET_BUSY (131) +#define OSC_FREQ_DET_TRIG (1U31) +#define OSC_FREQ_DET_BUSY (1U31) #if 0 static int @@ -107,15 +102,12 @@ vm_offset_t initarm_lastaddr(void) { - return (fdt_immr_va); + return (arm_devmap_lastaddr()); } void initarm_early_init(void) { - - if (fdt_immr_addr(TEGRA2_BASE) != 0)/* FIXME */ - while (1); } void @@ -128,26 +120,16 @@ initarm_late_init(void) { } -#define FDT_DEVMAP_MAX (1 + 2 + 1 + 1) /* FIXME */ -static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = { - { 0, 0, 0, 0, 0, } -}; - /* - * Construct pmap_devmap[] with DT-derived config data. + * Add a static mapping for the register range that includes the debug uart. + * It's not clear this is needed, but the original code established this mapping + * before conversion to the newer arm_devmap_add_entry() routine. */ int initarm_devmap_init(void) { - int i = 0; - fdt_devmap[i].pd_va = 0xe000; - fdt_devmap[i].pd_pa = 0x7000; - fdt_devmap[i].pd_size = 0x10; - fdt_devmap[i].pd_prot = VM_PROT_READ | VM_PROT_WRITE; - fdt_devmap[i].pd_cache = PTE_NOCACHE; - i++; - arm_devmap_register_table(fdt_devmap[0]); + arm_devmap_add_entry(0x7000, 0x0010); return (0); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r260326 - in head/sys: arm/lpc dev/uart
Author: ian Date: Sun Jan 5 18:40:06 2014 New Revision: 260326 URL: http://svnweb.freebsd.org/changeset/base/260326 Log: Convert from using fdt_immr style to arm_devmap_add_entry() to make static device mappings. This SoC relied heavily on the fact that all devices were static-mapped at a fixed address, and it (rather bogusly) used bus_space read and write calls passing hard-coded virtual addresses instead of proper bus handles, relying on the fact that the virtual addresses of the mappings were known at compile time, and relying on the implementation details of arm bus_space never changing. All such usage was replaced with calls to bus_space_map() to obtain a proper bus handle for the read/write calls. This required adjusting some of the #define values that map out hardware registers, and some of them were renamed in the process to make it clear which were defining absolute physical addresses and which were defining offsets. (The ones that just define offsets don't appear to be referenced and probably serve no value other than perhaps documentation.) Modified: head/sys/arm/lpc/lpc_gpio.c head/sys/arm/lpc/lpc_machdep.c head/sys/arm/lpc/lpc_mmc.c head/sys/arm/lpc/lpcreg.h head/sys/dev/uart/uart_dev_lpc.c Modified: head/sys/arm/lpc/lpc_gpio.c == --- head/sys/arm/lpc/lpc_gpio.c Sun Jan 5 17:33:10 2014(r260325) +++ head/sys/arm/lpc/lpc_gpio.c Sun Jan 5 18:40:06 2014(r260326) @@ -502,12 +502,18 @@ lpc_gpio_get_state(device_t dev, int pin void platform_gpio_init() { + bus_space_tag_t bst; + bus_space_handle_t bsh; + + bst = fdtbus_bs_tag; + /* Preset SPI devices CS pins to one */ - bus_space_write_4(fdtbus_bs_tag, - LPC_GPIO_BASE, LPC_GPIO_P3_OUTP_SET, + bus_space_map(bst, LPC_GPIO_PHYS_BASE, LPC_GPIO_SIZE, 0, bsh); + bus_space_write_4(bst, bsh, LPC_GPIO_P3_OUTP_SET, 1 (SSD1289_CS_PIN - LPC_GPIO_GPO_00(0)) | 1 (SSD1289_DC_PIN - LPC_GPIO_GPO_00(0)) | 1 (ADS7846_CS_PIN - LPC_GPIO_GPO_00(0))); + bus_space_unmap(bst, bsh, LPC_GPIO_SIZE); } static device_method_t lpc_gpio_methods[] = { Modified: head/sys/arm/lpc/lpc_machdep.c == --- head/sys/arm/lpc/lpc_machdep.c Sun Jan 5 17:33:10 2014 (r260325) +++ head/sys/arm/lpc/lpc_machdep.c Sun Jan 5 18:40:06 2014 (r260326) @@ -57,21 +57,17 @@ __FBSDID($FreeBSD$); #include arm/lpc/lpcvar.h #include dev/fdt/fdt_common.h -#include dev/ic/ns16550.h vm_offset_t initarm_lastaddr(void) { - return (fdt_immr_va); + return (arm_devmap_lastaddr()); } void initarm_early_init(void) { - - if (fdt_immr_addr(LPC_DEV_BASE) != 0) - while (1); } void @@ -89,28 +85,16 @@ initarm_late_init(void) { } -#define FDT_DEVMAP_MAX (1 + 2 + 1 + 1) -static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = { - { 0, 0, 0, 0, 0, } -}; - /* - * Construct pmap_devmap[] with DT-derived config data. + * Add a single static device mapping. + * The values used were taken from the ranges property of the SoC node in the + * dts file when this code was converted to arm_devmap_add_entry(). */ int initarm_devmap_init(void) { - /* -* IMMR range. -*/ - fdt_devmap[0].pd_va = fdt_immr_va; - fdt_devmap[0].pd_pa = fdt_immr_pa; - fdt_devmap[0].pd_size = fdt_immr_size; - fdt_devmap[0].pd_prot = VM_PROT_READ | VM_PROT_WRITE; - fdt_devmap[0].pd_cache = PTE_NOCACHE; - - arm_devmap_register_table(fdt_devmap[0]); + arm_devmap_add_entry(LPC_DEV_PHYS_BASE, LPC_DEV_SIZE); return (0); } @@ -131,15 +115,24 @@ bus_dma_get_range_nb(void) void cpu_reset(void) { + bus_space_tag_t bst; + bus_space_handle_t bsh; + + bst = fdtbus_bs_tag; + /* Enable WDT */ - bus_space_write_4(fdtbus_bs_tag, - LPC_CLKPWR_BASE, LPC_CLKPWR_TIMCLK_CTRL, + bus_space_map(bst, LPC_CLKPWR_PHYS_BASE, LPC_CLKPWR_SIZE, 0, bsh); + bus_space_write_4(bst, bsh, LPC_CLKPWR_TIMCLK_CTRL, LPC_CLKPWR_TIMCLK_CTRL_WATCHDOG); + bus_space_unmap(bst, bsh, LPC_CLKPWR_SIZE); /* Instant assert of RESETOUT_N with pulse length 1ms */ - bus_space_write_4(fdtbus_bs_tag, LPC_WDTIM_BASE, LPC_WDTIM_PULSE, 13000); - bus_space_write_4(fdtbus_bs_tag, LPC_WDTIM_BASE, LPC_WDTIM_MCTRL, 0x70); + bus_space_map(bst, LPC_WDTIM_PHYS_BASE, LPC_WDTIM_SIZE, 0, bsh); + bus_space_write_4(bst, bsh, LPC_WDTIM_PULSE, 13000); + bus_space_write_4(bst, bsh, LPC_WDTIM_MCTRL, 0x70); + bus_space_unmap(bst, bsh, LPC_WDTIM_SIZE); - for (;;); + for (;;) + continue; } Modified: head/sys/arm/lpc/lpc_mmc.c
svn commit: r260327 - in head/sys: arm/arm arm/include arm/mv dev/fdt dev/uart mips/include powerpc/include x86/include
Author: nwhitehorn Date: Sun Jan 5 18:46:58 2014 New Revision: 260327 URL: http://svnweb.freebsd.org/changeset/base/260327 Log: Retire machine/fdt.h as a header used by MI code, as its function is now obsolete. This involves the following pieces: - Remove it entirely on PowerPC, where it is not used by MD code either - Remove all references to machine/fdt.h in non-architecture-specific code (aside from uart_cpu_fdt.c, shared by ARM and MIPS, and so is somewhat non-arch-specific). - Fix code relying on header pollution from machine/fdt.h includes - Legacy fdtbus.c (still used on x86 FDT systems) now passes resource requests to its parent (nexus). This allows x86 FDT devices to allocate both memory and IO requests and removes the last notionally MI use of fdtbus_bs_tag. - On those architectures that retain a machine/fdt.h, unused bits like FDT_MAP_IRQ and FDT_INTR_MAX have been removed. Deleted: head/sys/powerpc/include/fdt.h Modified: head/sys/arm/arm/machdep.c head/sys/arm/include/fdt.h head/sys/arm/include/ofw_machdep.h head/sys/arm/mv/mv_machdep.c head/sys/arm/mv/mv_pci.c head/sys/dev/fdt/fdt_common.c head/sys/dev/fdt/fdt_common.h head/sys/dev/fdt/fdt_pci.c head/sys/dev/fdt/fdtbus.c head/sys/dev/fdt/simplebus.c head/sys/dev/uart/uart_bus_fdt.c head/sys/mips/include/fdt.h head/sys/x86/include/fdt.h head/sys/x86/include/ofw_machdep.h Modified: head/sys/arm/arm/machdep.c == --- head/sys/arm/arm/machdep.c Sun Jan 5 18:40:06 2014(r260326) +++ head/sys/arm/arm/machdep.c Sun Jan 5 18:46:58 2014(r260327) @@ -92,6 +92,7 @@ __FBSDID($FreeBSD$); #include machine/cpu.h #include machine/devmap.h #include machine/frame.h +#include machine/intr.h #include machine/machdep.h #include machine/md_var.h #include machine/metadata.h Modified: head/sys/arm/include/fdt.h == --- head/sys/arm/include/fdt.h Sun Jan 5 18:40:06 2014(r260326) +++ head/sys/arm/include/fdt.h Sun Jan 5 18:46:58 2014(r260327) @@ -51,11 +51,6 @@ */ extern bus_space_tag_t fdtbus_bs_tag; -struct mem_region { - vm_offset_t mr_start; - vm_size_t mr_size; -}; - struct arm_devmap_entry; int fdt_localbus_devmap(phandle_t, struct arm_devmap_entry *, int, int *); Modified: head/sys/arm/include/ofw_machdep.h == --- head/sys/arm/include/ofw_machdep.h Sun Jan 5 18:40:06 2014 (r260326) +++ head/sys/arm/include/ofw_machdep.h Sun Jan 5 18:46:58 2014 (r260327) @@ -32,6 +32,13 @@ #ifndef _MACHINE_OFW_MACHDEP_H_ #define _MACHINE_OFW_MACHDEP_H_ +#include vm/vm.h + typedefuint32_tcell_t; +struct mem_region { + vm_offset_t mr_start; + vm_size_t mr_size; +}; + #endif /* _MACHINE_OFW_MACHDEP_H_ */ Modified: head/sys/arm/mv/mv_machdep.c == --- head/sys/arm/mv/mv_machdep.cSun Jan 5 18:40:06 2014 (r260326) +++ head/sys/arm/mv/mv_machdep.cSun Jan 5 18:46:58 2014 (r260327) @@ -51,6 +51,7 @@ __FBSDID($FreeBSD$); #include machine/bus.h #include machine/devmap.h +#include machine/fdt.h #include machine/machdep.h #include arm/mv/mvreg.h /* XXX */ Modified: head/sys/arm/mv/mv_pci.c == --- head/sys/arm/mv/mv_pci.cSun Jan 5 18:40:06 2014(r260326) +++ head/sys/arm/mv/mv_pci.cSun Jan 5 18:46:58 2014(r260327) @@ -53,6 +53,7 @@ __FBSDID($FreeBSD$); #include sys/rman.h #include sys/endian.h +#include machine/fdt.h #include machine/intr.h #include vm/vm.h Modified: head/sys/dev/fdt/fdt_common.c == --- head/sys/dev/fdt/fdt_common.c Sun Jan 5 18:40:06 2014 (r260326) +++ head/sys/dev/fdt/fdt_common.c Sun Jan 5 18:46:58 2014 (r260327) @@ -37,7 +37,6 @@ __FBSDID($FreeBSD$); #include sys/bus.h #include sys/limits.h -#include machine/fdt.h #include machine/resource.h #include dev/fdt/fdt_common.h Modified: head/sys/dev/fdt/fdt_common.h == --- head/sys/dev/fdt/fdt_common.h Sun Jan 5 18:40:06 2014 (r260326) +++ head/sys/dev/fdt/fdt_common.h Sun Jan 5 18:46:58 2014 (r260327) @@ -35,7 +35,6 @@ #include sys/slicer.h #include contrib/libfdt/libfdt_env.h #include dev/ofw/ofw_bus.h -#include machine/fdt.h #define FDT_MEM_REGIONS8 Modified: head/sys/dev/fdt/fdt_pci.c == --- head/sys/dev/fdt/fdt_pci.c Sun Jan 5 18:40:06 2014
Re: svn commit: r260327 - in head/sys: arm/arm arm/include arm/mv dev/fdt dev/uart mips/include powerpc/include x86/include
On 01/05/14 13:46, Nathan Whitehorn wrote: Author: nwhitehorn Date: Sun Jan 5 18:46:58 2014 New Revision: 260327 URL: http://svnweb.freebsd.org/changeset/base/260327 Log: Retire machine/fdt.h as a header used by MI code, as its function is now obsolete. This involves the following pieces: - Remove it entirely on PowerPC, where it is not used by MD code either - Remove all references to machine/fdt.h in non-architecture-specific code (aside from uart_cpu_fdt.c, shared by ARM and MIPS, and so is somewhat non-arch-specific). - Fix code relying on header pollution from machine/fdt.h includes - Legacy fdtbus.c (still used on x86 FDT systems) now passes resource requests to its parent (nexus). This allows x86 FDT devices to allocate both memory and IO requests and removes the last notionally MI use of fdtbus_bs_tag. - On those architectures that retain a machine/fdt.h, unused bits like FDT_MAP_IRQ and FDT_INTR_MAX have been removed. A few extra notes from while I was doing this: #1: dev/fdt/fdt_pci.c is not actually MI. In fact, it is used only by arm/mv/mv_pci.c and contains a large number of implementation details thereof. Perhaps it should be moved into arm/mv. #2: fdtbus_bs_tag (and machine/fdt.h) are still used from uart_cpu_fdt.c, which is used by ARM and MIPS. Maybe this should be looked at some. Since this file is specific to those architectures anyway, and they use it extensively, it's not a big deal. #3: Nearly every architecture in the tree is currently separately declaring an identical struct mem_region, which is a combination of a vm_offset_t and a vm_size_t. These should be centralized. The vm_offset_t should also be a vm_paddr_t. #4: uart_bus_fdt.c really has nothing to do with FDT per se: it's just the simplebus attachment for uart(4). It should probably be renamed to uart_bus_simplebus.c or the like or split up into its constituent UART drivers. -Nathan ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r260328 - head/sys/cddl/compat/opensolaris/sys
Author: mav Date: Sun Jan 5 19:07:42 2014 New Revision: 260328 URL: http://svnweb.freebsd.org/changeset/base/260328 Log: Fix build after r260234 by converting ddi_get_lbolt64() from inline into a macro. Otherwise compiler complains that hz variable used there either undefined or defined twice, thanks to header mess caused by compat shims. Modified: head/sys/cddl/compat/opensolaris/sys/time.h Modified: head/sys/cddl/compat/opensolaris/sys/time.h == --- head/sys/cddl/compat/opensolaris/sys/time.h Sun Jan 5 18:46:58 2014 (r260327) +++ head/sys/cddl/compat/opensolaris/sys/time.h Sun Jan 5 19:07:42 2014 (r260328) @@ -70,21 +70,10 @@ gethrtime(void) { #definegethrtime_waitfree()gethrtime() extern int nsec_per_tick; /* nanoseconds per clock tick */ -extern int hz; /* clock ticks per second */ -static __inline int64_t -ddi_get_lbolt64(void) -{ - - return (((getsbinuptime() 16) * hz) 16); -} - -static __inline clock_t -ddi_get_lbolt(void) -{ - - return (ddi_get_lbolt64()); -} +#define ddi_get_lbolt64() \ +(int64_t)(((getsbinuptime() 16) * hz) 16) +#define ddi_get_lbolt()(clock_t)ddi_get_lbolt64() #else ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r260311 - in head/contrib: gcc gcc/cp gcc/doc gcclibs/include gcclibs/libiberty
On 05.01.2014 11:42, Tijl Coosemans wrote: On Sun, 05 Jan 2014 11:18:15 -0500 Pedro Giffuni wrote: On 05.01.2014 06:45, Tijl Coosemans wrote: On Sun, 5 Jan 2014 00:43:28 + (UTC) Pedro F. Giffuni wrote: Author: pfg Date: Sun Jan 5 00:43:28 2014 New Revision: 260311 URL: http://svnweb.freebsd.org/changeset/base/260311 Log: gcc: Add support for Apple's Block extension Block objects [1] are a C-level syntactic and runtime feature. They are similar to standard C functions, but in addition to executable code they may also contain variable bindings to automatic (stack) or managed (heap) memory. A block can therefore maintain a set of state (data) that it can use to impact behavior when executed. This port is based on Apple's GCC 5646 with some bugfixes from Apple GCC 5666.3. It has some small differences with the support in clang, which remains the recommended compiler. Perhaps the most notable difference is that in GCC that __block is not actually a keyword, but a macro. There will be workaround for this issue in a near future. Other issues can be consulted in the clang documentation [2] For better compatiblity with Apple's GCC and llvm-gcc some related fixes and features from Apple have been included. Support for the non-standard nested functions in GCC is now off by default. Some ports use nested functions. We now have the Apple-GCC compatible -fnested-functions, however, this is of little relevance because on FreeBSD 10+ the default compiler (clang) doesn't support them at all. Most such ports should already be using the fsf gcc but I am not going to find out which do or dont; I simply won't merge this to 9 until there is a good reason to do it. * Doesn't this affect architectures where clang isn't the default yet? Yes, it may affect a small number of ports in tier 2 platforms. The fix is rather trivial though and gcc is rather verbal about it. For tier 2 platforms it would be especially ugly to have people build a new version of gcc to run such ports. You can grep the ports tree for nestedfct which currently implies USE_GCC=any, i.e. use base system gcc when available, otherwise use lang/gcc port. Do you think it's best to change this into USE_GCC=yes, i.e. always use lang/gcc port? That search would be big: many ports (OpenOffice for example) can build with gcc 4.2 but it doesn't use nested functions. The most reliable way to catch them all would be to make an experimental run on the ports tree but we currently don't have that capacity for tier 2 platforms. I think it would be best to have upstream ports learn about -fnested-functions (stuff that works on Apple should already know) and on the long run hope that upstream authors will avoid the feature altogether. Pedro. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r260311 - in head/contrib: gcc gcc/cp gcc/doc gcclibs/include gcclibs/libiberty
On 01/05/14 14:45, Pedro Giffuni wrote: On 05.01.2014 11:42, Tijl Coosemans wrote: On Sun, 05 Jan 2014 11:18:15 -0500 Pedro Giffuni wrote: On 05.01.2014 06:45, Tijl Coosemans wrote: On Sun, 5 Jan 2014 00:43:28 + (UTC) Pedro F. Giffuni wrote: Author: pfg Date: Sun Jan 5 00:43:28 2014 New Revision: 260311 URL: http://svnweb.freebsd.org/changeset/base/260311 Log: gcc: Add support for Apple's Block extension Block objects [1] are a C-level syntactic and runtime feature. They are similar to standard C functions, but in addition to executable code they may also contain variable bindings to automatic (stack) or managed (heap) memory. A block can therefore maintain a set of state (data) that it can use to impact behavior when executed. This port is based on Apple's GCC 5646 with some bugfixes from Apple GCC 5666.3. It has some small differences with the support in clang, which remains the recommended compiler. Perhaps the most notable difference is that in GCC that __block is not actually a keyword, but a macro. There will be workaround for this issue in a near future. Other issues can be consulted in the clang documentation [2] For better compatiblity with Apple's GCC and llvm-gcc some related fixes and features from Apple have been included. Support for the non-standard nested functions in GCC is now off by default. Some ports use nested functions. We now have the Apple-GCC compatible -fnested-functions, however, this is of little relevance because on FreeBSD 10+ the default compiler (clang) doesn't support them at all. Most such ports should already be using the fsf gcc but I am not going to find out which do or dont; I simply won't merge this to 9 until there is a good reason to do it. * Doesn't this affect architectures where clang isn't the default yet? Yes, it may affect a small number of ports in tier 2 platforms. The fix is rather trivial though and gcc is rather verbal about it. For tier 2 platforms it would be especially ugly to have people build a new version of gcc to run such ports. You can grep the ports tree for nestedfct which currently implies USE_GCC=any, i.e. use base system gcc when available, otherwise use lang/gcc port. Do you think it's best to change this into USE_GCC=yes, i.e. always use lang/gcc port? That search would be big: many ports (OpenOffice for example) can build with gcc 4.2 but it doesn't use nested functions. The most reliable way to catch them all would be to make an experimental run on the ports tree but we currently don't have that capacity for tier 2 platforms. I think it would be best to have upstream ports learn about -fnested-functions (stuff that works on Apple should already know) and on the long run hope that upstream authors will avoid the feature altogether. Pedro. It's also worth pointing out that our default ports GCC (4.6) does not build on some of these platforms (PowerPC64, for example), so requiring it would unconditionally break them. lang/gcc48 does, however, at least on PPC64, so it might be worth switching the default. -Nathan ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r260331 - in head/sys/arm: broadcom/bcm2835 freescale/imx lpc
Author: ian Date: Sun Jan 5 20:09:51 2014 New Revision: 260331 URL: http://svnweb.freebsd.org/changeset/base/260331 Log: Add #include machine/fdt.h to a few files that used to get it via pollution from other headers. Modified: head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c head/sys/arm/freescale/imx/imx51_ipuv3.c head/sys/arm/lpc/lpc_machdep.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c == --- head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c Sun Jan 5 20:07:12 2014 (r260330) +++ head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c Sun Jan 5 20:09:51 2014 (r260331) @@ -56,6 +56,7 @@ __FBSDID($FreeBSD$); #include machine/bus.h #include machine/cpu.h #include machine/cpufunc.h +#include machine/fdt.h #include machine/resource.h #include machine/intr.h Modified: head/sys/arm/freescale/imx/imx51_ipuv3.c == --- head/sys/arm/freescale/imx/imx51_ipuv3.cSun Jan 5 20:07:12 2014 (r260330) +++ head/sys/arm/freescale/imx/imx51_ipuv3.cSun Jan 5 20:09:51 2014 (r260331) @@ -56,6 +56,7 @@ __FBSDID($FreeBSD$); #include machine/bus.h #include machine/cpu.h #include machine/cpufunc.h +#include machine/fdt.h #include machine/resource.h #include machine/intr.h Modified: head/sys/arm/lpc/lpc_machdep.c == --- head/sys/arm/lpc/lpc_machdep.c Sun Jan 5 20:07:12 2014 (r260330) +++ head/sys/arm/lpc/lpc_machdep.c Sun Jan 5 20:09:51 2014 (r260331) @@ -50,6 +50,7 @@ __FBSDID($FreeBSD$); #include vm/pmap.h #include machine/bus.h +#include machine/fdt.h #include machine/devmap.h #include machine/machdep.h ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r260311 - in head/contrib: gcc gcc/cp gcc/doc gcclibs/include gcclibs/libiberty
On 05.01.2014 14:52, Nathan Whitehorn wrote: On 01/05/14 14:45, Pedro Giffuni wrote: On 05.01.2014 11:42, Tijl Coosemans wrote: On Sun, 05 Jan 2014 11:18:15 -0500 Pedro Giffuni wrote: On 05.01.2014 06:45, Tijl Coosemans wrote: On Sun, 5 Jan 2014 00:43:28 + (UTC) Pedro F. Giffuni wrote: Author: pfg Date: Sun Jan 5 00:43:28 2014 New Revision: 260311 URL: http://svnweb.freebsd.org/changeset/base/260311 Log: gcc: Add support for Apple's Block extension Block objects [1] are a C-level syntactic and runtime feature. They are similar to standard C functions, but in addition to executable code they may also contain variable bindings to automatic (stack) or managed (heap) memory. A block can therefore maintain a set of state (data) that it can use to impact behavior when executed. This port is based on Apple's GCC 5646 with some bugfixes from Apple GCC 5666.3. It has some small differences with the support in clang, which remains the recommended compiler. Perhaps the most notable difference is that in GCC that __block is not actually a keyword, but a macro. There will be workaround for this issue in a near future. Other issues can be consulted in the clang documentation [2] For better compatiblity with Apple's GCC and llvm-gcc some related fixes and features from Apple have been included. Support for the non-standard nested functions in GCC is now off by default. Some ports use nested functions. We now have the Apple-GCC compatible -fnested-functions, however, this is of little relevance because on FreeBSD 10+ the default compiler (clang) doesn't support them at all. Most such ports should already be using the fsf gcc but I am not going to find out which do or dont; I simply won't merge this to 9 until there is a good reason to do it. * Doesn't this affect architectures where clang isn't the default yet? Yes, it may affect a small number of ports in tier 2 platforms. The fix is rather trivial though and gcc is rather verbal about it. For tier 2 platforms it would be especially ugly to have people build a new version of gcc to run such ports. You can grep the ports tree for nestedfct which currently implies USE_GCC=any, i.e. use base system gcc when available, otherwise use lang/gcc port. Do you think it's best to change this into USE_GCC=yes, i.e. always use lang/gcc port? That search would be big: many ports (OpenOffice for example) can build with gcc 4.2 but it doesn't use nested functions. The most reliable way to catch them all would be to make an experimental run on the ports tree but we currently don't have that capacity for tier 2 platforms. I think it would be best to have upstream ports learn about -fnested-functions (stuff that works on Apple should already know) and on the long run hope that upstream authors will avoid the feature altogether. Pedro. It's also worth pointing out that our default ports GCC (4.6) does not build on some of these platforms (PowerPC64, for example), so requiring it would unconditionally break them. lang/gcc48 does, however, at least on PPC64, so it might be worth switching the default. The whole idea of this commit is to make gcc behave more like clang so that we can start using the new features in base. For now just adding -fnested-functions on a small number of ports (hopefully nothing big/important) is probably not a huge sacrifice. When PPC64 moves to clang we will have to find a real fix for the issue so leaving the switch off is a good way to detect the trouble early. Regards, Pedro. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r260332 - head/contrib/gcc/cp
Author: pfg Date: Sun Jan 5 20:33:44 2014 New Revision: 260332 URL: http://svnweb.freebsd.org/changeset/base/260332 Log: gcc: backport some fixes from llvm-gcc llvm-gcc backported some patches from gcc trunk: http://gcc.gnu.org/ml/gcc-cvs/2007-05/msg00662.html http://gcc.gnu.org/ml/gcc-cvs/2007-07/msg00019.html http://gcc.gnu.org/ml/gcc-cvs/2007-08/msg00240.html http://gcc.gnu.org/ml/gcc-cvs/2007-08/msg00493.html The first two were always GPL2. The last two were added after the GPL3 transition, but were written by a...@google.com and Rafael EspĂndola got permission to relicense them under the GPL2 for inclusion in llvm-gcc. This fixes GCC-PR c++/31749 Obtained from:llvm-gcc (rev. 75463; GPLv2) MFC after:2 weeks Modified: head/contrib/gcc/cp/ChangeLog.gcc43 head/contrib/gcc/cp/decl.c head/contrib/gcc/cp/name-lookup.c head/contrib/gcc/cp/parser.c Modified: head/contrib/gcc/cp/ChangeLog.gcc43 == --- head/contrib/gcc/cp/ChangeLog.gcc43 Sun Jan 5 20:09:51 2014 (r260331) +++ head/contrib/gcc/cp/ChangeLog.gcc43 Sun Jan 5 20:33:44 2014 (r260332) @@ -7,6 +7,17 @@ * typeck.c (cxx_alignof_expr): When alignof is used on a plain FUNCTION_DECL, return its alignment. +2007-07-01 Ollie Wild a...@google.com (r126177) + + * name-lookup.c (ambiguous_decl): Fix case when new-value is hidden. + (select_decl): Remove function. + (unqualified_namespace_lookup): Populate binding by calling + ambiguous_decl. Remove select_decl call. + (lookup_qualified_name): Remove select_decl call. + * decl.c (lookup_and_check_tag): Check for ambiguous references. + * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error + generation when name lookup is ambiguous. + 2007-06-28 Geoffrey Keating geo...@apple.com (r126088) * decl2.c (determine_visibility): Implement @@ -29,6 +40,11 @@ * typeck.c (build_binary_op): Include types in error. +2007-05-22 Ollie Wild a...@google.com (r124963) + + * name-lookup.c (ambiguous_decl): Adds check for hidden types. + (unqualified_namespace_lookup): Adds check for hidden types. + 2007-05-18 Geoffrey Keating geo...@apple.com (r124839) * mangle.c (write_real_cst): Use 'unsigned long' for %lx. Modified: head/contrib/gcc/cp/decl.c == --- head/contrib/gcc/cp/decl.c Sun Jan 5 20:09:51 2014(r260331) +++ head/contrib/gcc/cp/decl.c Sun Jan 5 20:33:44 2014(r260332) @@ -10253,6 +10253,12 @@ lookup_and_check_tag (enum tag_types tag | DECL_SELF_REFERENCE_P (decl)); return t; } + else if (decl TREE_CODE (decl) == TREE_LIST) +{ + error (reference to %qD is ambiguous, name); + print_candidates (decl); + return error_mark_node; +} else return NULL_TREE; } Modified: head/contrib/gcc/cp/name-lookup.c == --- head/contrib/gcc/cp/name-lookup.c Sun Jan 5 20:09:51 2014 (r260331) +++ head/contrib/gcc/cp/name-lookup.c Sun Jan 5 20:33:44 2014 (r260332) @@ -42,7 +42,6 @@ struct scope_binding { #define EMPTY_SCOPE_BINDING { NULL_TREE, NULL_TREE } static cxx_scope *innermost_nonclass_level (void); -static tree select_decl (const struct scope_binding *, int); static cxx_binding *binding_for_name (cxx_scope *, tree); static tree lookup_name_innermost_nonclass_level (tree); static tree push_overloaded_decl (tree, int, bool); @@ -2104,6 +2103,22 @@ do_nonmember_using_decl (tree scope, tre return; } + /* LLVM LOCAL begin mainline */ + /* Shift the old and new bindings around so we're comparing class and + enumeration names to each other. */ + if (oldval DECL_IMPLICIT_TYPEDEF_P (oldval)) +{ + oldtype = oldval; + oldval = NULL_TREE; +} + + if (decls.value DECL_IMPLICIT_TYPEDEF_P (decls.value)) +{ + decls.type = decls.value; + decls.value = NULL_TREE; +} + /* LLVM LOCAL end mainline */ + /* It is impossible to overload a built-in function; any explicit declaration eliminates the built-in declaration. So, if OLDVAL is a built-in, then we can just pretend it isn't there. */ @@ -2113,95 +2128,112 @@ do_nonmember_using_decl (tree scope, tre !DECL_HIDDEN_FRIEND_P (oldval)) oldval = NULL_TREE; - /* Check for using functions. */ - if (decls.value is_overloaded_fn (decls.value)) + /* LLVM LOCAL begin mainline */ + if (decls.value) { - tree tmp, tmp1; - - if (oldval !is_overloaded_fn (oldval)) - { - if (!DECL_IMPLICIT_TYPEDEF_P (oldval)) - error (%qD is already declared in this scope, name); - oldval = NULL_TREE; - } - -
svn commit: r260333 - in head/sys: arm/conf boot/fdt/dts
Author: ian Date: Sun Jan 5 20:44:10 2014 New Revision: 260333 URL: http://svnweb.freebsd.org/changeset/base/260333 Log: Enable the cesa security/crypto device by providing the required property in the dts source, and adding the right devices to the kernel config. Also generally bring the kernel config into line with what we have for other Marvell/Kirkwood systems (add lots of useful devices and options). One particularly notable addition amongst the kernel config changes is USB_HOST_ALIGN=32, which may help eliminate data corruption on USB drives. PR: kern/181975 arm/162159 Modified: head/sys/arm/conf/DOCKSTAR head/sys/boot/fdt/dts/dockstar.dts Modified: head/sys/arm/conf/DOCKSTAR == --- head/sys/arm/conf/DOCKSTAR Sun Jan 5 20:33:44 2014(r260332) +++ head/sys/arm/conf/DOCKSTAR Sun Jan 5 20:44:10 2014(r260333) @@ -3,73 +3,165 @@ # # $FreeBSD$ # +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ +# ident DOCKSTAR + include../mv/kirkwood/std.db88f6xxx -optionsSOC_MV_KIRKWOOD +makeoptionsFDT_DTS_FILE=dockstar.dts + makeoptionsMODULES_OVERRIDE= -#makeoptions DEBUG=-g#Build kernel with gdb(1) debug symbols -makeoptionsWERROR=-Werror +optionsSOC_MV_KIRKWOOD optionsSCHED_4BSD #4BSD scheduler optionsINET#InterNETworking optionsINET6 #IPv6 communications protocols +optionsSOFTUPDATES +optionsCD9660 #ISO 9660 filesystem optionsFFS #Berkeley Fast Filesystem -optionsNFSCL #New Network Filesystem Client -optionsNFSLOCKD#Network Lock Manager -optionsNFS_ROOT#NFS usable as /, requires NFSCL -optionsBOOTP -optionsBOOTP_NFSROOT -optionsBOOTP_NFSV3 -optionsBOOTP_COMPAT -optionsBOOTP_WIRED_TO=mge0 - -# Root fs on USB device -#optionsROOTDEVNAME=\ufs:/dev/da0a\ - +optionsMSDOSFS #MS DOS File System (FAT, FAT32) +optionsNULLFS #NULL filesystem +optionsTMPFS #Efficient memory filesystem optionsSYSVSHM #SYSV-style shared memory optionsSYSVMSG #SYSV-style message queues optionsSYSVSEM #SYSV-style semaphores options_KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions -optionsMUTEX_NOINLINE -optionsRWLOCK_NOINLINE -optionsNO_FFS_SNAPSHOT -optionsNO_SWAPPING +optionsGEOM_ELI# Disk encryption. +optionsGEOM_LABEL # Providers labelization. +optionsGEOM_PART_GPT # GPT partitioning -# Debugging -optionsALT_BREAK_TO_DEBUGGER -optionsDDB -optionsKDB +# Flattened Device Tree +device fdt +optionsFDT +optionsFDT_DTB_STATIC + +# Misc pseudo devices +device bpf #Required for DHCP +device faith #IPv6-to-IPv4 relaying (translation) +device firmware#firmware(9) required for USB wlan +device gif #IPv6 and IPv4 tunneling +device loop#Network loopback +device md #Memory/malloc disk +device pty #BSD-style compatibility pseudo ttys +device random #Entropy device +device tun #Packet tunnel. +device ether #Required for all ethernet devices +device vlan#802.1Q VLAN support +device wlan#802.11 WLAN support -# Pseudo devices -device md -device random -device loop +# cam support for umass and ahci +device scbus +device pass +device da # Serial ports device uart # Networking -device ether device mge # Marvell Gigabit Ethernet controller device mii -device bpf -optionsHZ=1000 -optionsDEVICE_POLLING -device vlan +device e1000phy # USB -optionsUSB_DEBUG # enable debug msgs
svn commit: r260334 - in head: lib/libiconv lib/libiconv_modules/BIG5 lib/libiconv_modules/EUC lib/libiconv_modules/EUCTW lib/libiconv_modules/GBK2K lib/libiconv_modules/ISO2022 lib/libiconv_module...
Author: dim Date: Sun Jan 5 21:03:49 2014 New Revision: 260334 URL: http://svnweb.freebsd.org/changeset/base/260334 Log: Split the last gcc-specific flags off into CFLAGS.gcc. This also removes the need to use -Qunused-arguments for clang throughout the tree. MFC after:3 days Modified: head/lib/libiconv/Makefile head/lib/libiconv_modules/BIG5/Makefile head/lib/libiconv_modules/EUC/Makefile head/lib/libiconv_modules/EUCTW/Makefile head/lib/libiconv_modules/GBK2K/Makefile head/lib/libiconv_modules/ISO2022/Makefile head/lib/libiconv_modules/JOHAB/Makefile head/lib/libiconv_modules/UES/Makefile head/lib/libiconv_modules/UTF1632/Makefile head/lib/libiconv_modules/UTF7/Makefile head/lib/libiconv_modules/iconv_std/Makefile head/lib/libiconv_modules/mapper_parallel/Makefile head/lib/libiconv_modules/mapper_serial/Makefile head/lib/libiconv_modules/mapper_std/Makefile head/lib/libiconv_modules/mapper_zone/Makefile head/share/mk/bsd.sys.mk head/sys/boot/i386/boot2/Makefile head/sys/boot/i386/gptboot/Makefile head/sys/boot/i386/gptzfsboot/Makefile head/sys/boot/i386/zfsboot/Makefile head/sys/boot/pc98/boot2/Makefile head/usr.sbin/mfiutil/Makefile Modified: head/lib/libiconv/Makefile == --- head/lib/libiconv/Makefile Sun Jan 5 20:44:10 2014(r260333) +++ head/lib/libiconv/Makefile Sun Jan 5 21:03:49 2014(r260334) @@ -19,6 +19,7 @@ SRCS= citrus_bcs.c citrus_bcs_strtol.c c citrus_module.c citrus_none.c citrus_pivot_factory.c \ citrus_prop.c citrus_stdenc.c iconv.c -CFLAGS+= --param max-inline-insns-single=128 -I ${.CURDIR}/../../include -I${.CURDIR}/../libc/include +CFLAGS.gcc+= --param max-inline-insns-single=128 +CFLAGS+= -I ${.CURDIR}/../../include -I${.CURDIR}/../libc/include .include bsd.lib.mk Modified: head/lib/libiconv_modules/BIG5/Makefile == --- head/lib/libiconv_modules/BIG5/Makefile Sun Jan 5 20:44:10 2014 (r260333) +++ head/lib/libiconv_modules/BIG5/Makefile Sun Jan 5 21:03:49 2014 (r260334) @@ -2,6 +2,6 @@ SHLIB= BIG5 SRCS+= citrus_big5.c -CFLAGS+= --param max-inline-insns-single=32 +CFLAGS.gcc+= --param max-inline-insns-single=32 .include bsd.lib.mk Modified: head/lib/libiconv_modules/EUC/Makefile == --- head/lib/libiconv_modules/EUC/Makefile Sun Jan 5 20:44:10 2014 (r260333) +++ head/lib/libiconv_modules/EUC/Makefile Sun Jan 5 21:03:49 2014 (r260334) @@ -2,6 +2,6 @@ SHLIB= EUC SRCS+= citrus_euc.c -CFLAGS+= --param max-inline-insns-single=32 +CFLAGS.gcc+= --param max-inline-insns-single=32 .include bsd.lib.mk Modified: head/lib/libiconv_modules/EUCTW/Makefile == --- head/lib/libiconv_modules/EUCTW/MakefileSun Jan 5 20:44:10 2014 (r260333) +++ head/lib/libiconv_modules/EUCTW/MakefileSun Jan 5 21:03:49 2014 (r260334) @@ -2,6 +2,6 @@ SHLIB= EUCTW SRCS+= citrus_euctw.c -CFLAGS+= --param max-inline-insns-single=32 +CFLAGS.gcc+= --param max-inline-insns-single=32 .include bsd.lib.mk Modified: head/lib/libiconv_modules/GBK2K/Makefile == --- head/lib/libiconv_modules/GBK2K/MakefileSun Jan 5 20:44:10 2014 (r260333) +++ head/lib/libiconv_modules/GBK2K/MakefileSun Jan 5 21:03:49 2014 (r260334) @@ -2,6 +2,6 @@ SHLIB= GBK2K SRCS+= citrus_gbk2k.c -CFLAGS+= --param max-inline-insns-single=16 +CFLAGS.gcc+= --param max-inline-insns-single=16 .include bsd.lib.mk Modified: head/lib/libiconv_modules/ISO2022/Makefile == --- head/lib/libiconv_modules/ISO2022/Makefile Sun Jan 5 20:44:10 2014 (r260333) +++ head/lib/libiconv_modules/ISO2022/Makefile Sun Jan 5 21:03:49 2014 (r260334) @@ -2,6 +2,6 @@ SHLIB= ISO2022 SRCS+= citrus_iso2022.c -CFLAGS+= --param max-inline-insns-single=128 +CFLAGS.gcc+= --param max-inline-insns-single=128 .include bsd.lib.mk Modified: head/lib/libiconv_modules/JOHAB/Makefile == --- head/lib/libiconv_modules/JOHAB/MakefileSun Jan 5 20:44:10 2014 (r260333) +++ head/lib/libiconv_modules/JOHAB/MakefileSun Jan 5 21:03:49 2014 (r260334) @@ -2,6 +2,6 @@ SHLIB= JOHAB SRCS+= citrus_johab.c -CFLAGS+= --param max-inline-insns-single=16 +CFLAGS.gcc+= --param max-inline-insns-single=16 .include bsd.lib.mk Modified: head/lib/libiconv_modules/UES/Makefile == --- head/lib/libiconv_modules/UES/Makefile Sun Jan 5
svn commit: r260335 - head/sys/modules/iwnfw
Author: gavin Date: Sun Jan 5 21:35:07 2014 New Revision: 260335 URL: http://svnweb.freebsd.org/changeset/base/260335 Log: Wrap SUBDIRs over several lines. Modified: head/sys/modules/iwnfw/Makefile Modified: head/sys/modules/iwnfw/Makefile == --- head/sys/modules/iwnfw/Makefile Sun Jan 5 21:03:49 2014 (r260334) +++ head/sys/modules/iwnfw/Makefile Sun Jan 5 21:35:07 2014 (r260335) @@ -1,5 +1,15 @@ # $FreeBSD$ -SUBDIR=iwn135 iwn1000 iwn4965 iwn5000 iwn5150 iwn6000 iwn6000g2a iwn6000g2b iwn6050 iwn2000 iwn2030 +SUBDIR=iwn135 \ + iwn1000 \ + iwn2000 \ + iwn2030 \ + iwn4965 \ + iwn5000 \ + iwn5150 \ + iwn6000 \ + iwn6000g2a \ + iwn6000g2b \ + iwn6050 .include bsd.subdir.mk ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r260336 - head/usr.bin/find
Author: jilles Date: Sun Jan 5 21:44:04 2014 New Revision: 260336 URL: http://svnweb.freebsd.org/changeset/base/260336 Log: find: Fix -lname and -ilname. The code did not take into account that readlink() does not add a terminating '\0', and therefore did not work reliably. As before, symlinks of length PATH_MAX or more are not handled correctly. (These can only be created on other operating systems.) PR: bin/185393 Submitted by: Ben Reser (original version) MFC after:1 week Modified: head/usr.bin/find/function.c Modified: head/usr.bin/find/function.c == --- head/usr.bin/find/function.cSun Jan 5 21:35:07 2014 (r260335) +++ head/usr.bin/find/function.cSun Jan 5 21:44:04 2014 (r260336) @@ -1122,11 +1122,14 @@ f_name(PLAN *plan, FTSENT *entry) { char fn[PATH_MAX]; const char *name; + ssize_t len; if (plan-flags F_LINK) { - name = fn; - if (readlink(entry-fts_path, fn, sizeof(fn)) == -1) + len = readlink(entry-fts_path, fn, sizeof(fn) - 1); + if (len == -1) return 0; + fn[len] = '\0'; + name = fn; } else name = entry-fts_name; return !fnmatch(plan-c_data, name, ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r260340 - in head/sys: arm/include arm/mv conf dev/fdt
Author: ian Date: Sun Jan 5 22:36:34 2014 New Revision: 260340 URL: http://svnweb.freebsd.org/changeset/base/260340 Log: Remove dev/fdt/fdt_pci.c, which was code specific to Marvell ARM SoCs, related to setting up static device mappings. Since it was only used by arm/mv/mv_pci.c, it's now just static functions within that file, plus one public function that gets called only from arm/mv/mv_machdep.c. Deleted: head/sys/dev/fdt/fdt_pci.c Modified: head/sys/arm/include/fdt.h head/sys/arm/mv/mv_machdep.c head/sys/arm/mv/mv_pci.c head/sys/arm/mv/mvvar.h head/sys/conf/files head/sys/dev/fdt/fdt_common.h Modified: head/sys/arm/include/fdt.h == --- head/sys/arm/include/fdt.h Sun Jan 5 22:14:12 2014(r260339) +++ head/sys/arm/include/fdt.h Sun Jan 5 22:36:34 2014(r260340) @@ -54,7 +54,5 @@ extern bus_space_tag_t fdtbus_bs_tag; struct arm_devmap_entry; int fdt_localbus_devmap(phandle_t, struct arm_devmap_entry *, int, int *); -int fdt_pci_devmap(phandle_t, struct arm_devmap_entry *devmap, vm_offset_t, -vm_offset_t); #endif /* _MACHINE_FDT_H_ */ Modified: head/sys/arm/mv/mv_machdep.c == --- head/sys/arm/mv/mv_machdep.cSun Jan 5 22:14:12 2014 (r260339) +++ head/sys/arm/mv/mv_machdep.cSun Jan 5 22:36:34 2014 (r260340) @@ -294,11 +294,11 @@ out: } /* - * Supply a default do-nothing implementation of fdt_pci_devmap() via a weak + * Supply a default do-nothing implementation of mv_pci_devmap() via a weak * alias. Many Marvell platforms don't support a PCI interface, but to support * those that do, we end up with a reference to this function below, in * initarm_devmap_init(). If device pci appears in the kernel config, the - * real implementation of this function in dev/fdt/fdt_pci.c overrides the weak + * real implementation of this function in arm/mv/mv_pci.c overrides the weak * alias defined here. */ int mv_default_fdt_pci_devmap(phandle_t node, struct arm_devmap_entry *devmap, @@ -310,7 +310,7 @@ mv_default_fdt_pci_devmap(phandle_t node return (0); } -__weak_reference(mv_default_fdt_pci_devmap, fdt_pci_devmap); +__weak_reference(mv_default_fdt_pci_devmap, mv_pci_devmap); /* * XXX: When device entry in devmap has pd_size smaller than section size, @@ -379,7 +379,7 @@ initarm_devmap_init(void) * XXX this should account for PCI and multiple ranges * of a given kind. */ - if (fdt_pci_devmap(child, fdt_devmap[i], MV_PCI_VA_IO_BASE, + if (mv_pci_devmap(child, fdt_devmap[i], MV_PCI_VA_IO_BASE, MV_PCI_VA_MEM_BASE) != 0) return (ENXIO); i += 2; Modified: head/sys/arm/mv/mv_pci.c == --- head/sys/arm/mv/mv_pci.cSun Jan 5 22:14:12 2014(r260339) +++ head/sys/arm/mv/mv_pci.cSun Jan 5 22:36:34 2014(r260340) @@ -70,6 +70,7 @@ __FBSDID($FreeBSD$); #include ofw_bus_if.h #include pcib_if.h +#include machine/devmap.h #include machine/resource.h #include machine/bus.h @@ -83,6 +84,172 @@ __FBSDID($FreeBSD$); #define debugf(fmt, args...) #endif +/* + * Code and data related to fdt-based PCI configuration. + * + * This stuff used to be in dev/fdt/fdt_pci.c and fdt_common.h, but it was + * always Marvell-specific so that was deleted and the code now lives here. + */ + +struct mv_pci_range { + u_long base_pci; + u_long base_parent; + u_long len; +}; + +#define FDT_RANGES_CELLS ((3 + 3 + 2) * 2) + +static void +mv_pci_range_dump(struct mv_pci_range *range) +{ +#ifdef DEBUG + printf(\n); + printf( base_pci = 0x%08lx\n, range-base_pci); + printf( base_par = 0x%08lx\n, range-base_parent); + printf( len = 0x%08lx\n, range-len); +#endif +} + +static int +mv_pci_ranges_decode(phandle_t node, struct mv_pci_range *io_space, +struct mv_pci_range *mem_space) +{ + pcell_t ranges[FDT_RANGES_CELLS]; + struct mv_pci_range *pci_space; + pcell_t addr_cells, size_cells, par_addr_cells; + pcell_t *rangesptr; + pcell_t cell0, cell1, cell2; + int tuple_size, tuples, i, rv, offset_cells, len; + + /* +* Retrieve 'ranges' property. +*/ + if ((fdt_addrsize_cells(node, addr_cells, size_cells)) != 0) + return (EINVAL); + if (addr_cells != 3 || size_cells != 2) + return (ERANGE); + + par_addr_cells = fdt_parent_addr_cells(node); + if (par_addr_cells 3) + return (ERANGE); + + len = OF_getproplen(node, ranges); + if (len sizeof(ranges)) + return (ENOMEM); + + if
svn commit: r260355 - head/usr.bin/find
Author: jilles Date: Sun Jan 5 23:01:28 2014 New Revision: 260355 URL: http://svnweb.freebsd.org/changeset/base/260355 Log: find: Fix two more problems with -lname and -ilname: * Do not match symlinks that are followed because of -H or -L. This is explicitly documented in GNU find's info file and is like -type l. * Fix matching symlinks in subdirectories when fts changes directories. Also, avoid some readlink() calls on files that are obviously not symlinks (because of fts(3) restrictions, not all of them). MFC after:1 week Modified: head/usr.bin/find/find.1 head/usr.bin/find/function.c Modified: head/usr.bin/find/find.1 == --- head/usr.bin/find/find.1Sun Jan 5 23:00:38 2014(r260354) +++ head/usr.bin/find/find.1Sun Jan 5 23:01:28 2014(r260355) @@ -31,7 +31,7 @@ .\@(#)find.1 8.7 (Berkeley) 5/9/95 .\ $FreeBSD$ .\ -.Dd November 18, 2012 +.Dd January 5, 2014 .Dt FIND 1 .Os .Sh NAME @@ -520,6 +520,8 @@ Like .Ic -name , but the contents of the symbolic link are matched instead of the file name. +Note that this only matches broken symbolic links +if symbolic links are being followed. This is a GNU find extension. .It Ic -ls This primary always evaluates to true. Modified: head/usr.bin/find/function.c == --- head/usr.bin/find/function.cSun Jan 5 23:00:38 2014 (r260354) +++ head/usr.bin/find/function.cSun Jan 5 23:01:28 2014 (r260355) @@ -1125,7 +1125,17 @@ f_name(PLAN *plan, FTSENT *entry) ssize_t len; if (plan-flags F_LINK) { - len = readlink(entry-fts_path, fn, sizeof(fn) - 1); + /* +* The below test both avoids obviously useless readlink() +* calls and ensures that symlinks with existent target do +* not match if symlinks are being followed. +* Assumption: fts will stat all symlinks that are to be +* followed and will return the stat information. +*/ + if (entry-fts_info != FTS_NSOK entry-fts_info != FTS_SL + entry-fts_info != FTS_SLNONE) + return 0; + len = readlink(entry-fts_accpath, fn, sizeof(fn) - 1); if (len == -1) return 0; fn[len] = '\0'; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r260358 - head/contrib/diff/man
Author: wblock (doc committer) Date: Sun Jan 5 23:28:03 2014 New Revision: 260358 URL: http://svnweb.freebsd.org/changeset/base/260358 Log: Fix a cut and paste error. PR: docs/184791 Submitted by: Jamie Landeg Jones ja...@dyslexicfish.net MFC after:3 days Modified: head/contrib/diff/man/diff3.1 Modified: head/contrib/diff/man/diff3.1 == --- head/contrib/diff/man/diff3.1 Sun Jan 5 23:13:18 2014 (r260357) +++ head/contrib/diff/man/diff3.1 Sun Jan 5 23:28:03 2014 (r260358) @@ -73,6 +73,6 @@ and .B diff3 programs are properly installed at your site, the command .IP -.B info diff +.B info diff3 .PP should give you access to the complete manual. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r260161 - in head/sys/arm: arm include
On Wed, 2014-01-01 at 20:03 +, Zbigniew Bodek wrote: Author: zbb Date: Wed Jan 1 20:03:48 2014 New Revision: 260161 URL: http://svnweb.freebsd.org/changeset/base/260161 Log: Add polarity and level support to ARM GIC Add suport for setting triggering level and polarity in GIC. New function pointer was added to nexus which corresponds to the function which sets level/sense in the hardware (GIC). Submitted by: Wojciech Macek w...@semihalf.com Obtained from: Semihalf Modified: head/sys/arm/arm/gic.c head/sys/arm/arm/intr.c head/sys/arm/arm/nexus.c head/sys/arm/include/intr.h [...] Modified: head/sys/arm/include/intr.h == --- head/sys/arm/include/intr.h Wed Jan 1 19:38:15 2014 (r260160) +++ head/sys/arm/include/intr.h Wed Jan 1 20:03:48 2014 (r260161) @@ -68,6 +68,7 @@ #endif #include machine/psl.h +#include sys/bus.h int arm_get_next_irq(int); void arm_mask_irq(uintptr_t); @@ -77,6 +78,8 @@ void arm_setup_irqhandler(const char *, void *, int, int, void **); int arm_remove_irqhandler(int, void *); extern void (*arm_post_filter)(void *); +extern int (*arm_config_irq)(int irq, enum intr_trigger trig, +enum intr_polarity pol); void gic_init_secondary(void); It turns out that the new #include in this change is causing the current arm tinderbox failures. Enums can't have forward decls anymore, so the fix for this may not be easy. -- Ian ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r260363 - head/sys/dev/ath
Author: adrian Date: Mon Jan 6 03:48:32 2014 New Revision: 260363 URL: http://svnweb.freebsd.org/changeset/base/260363 Log: Correctly remove entries from the relevant receive ath_buf list before freeing them. The current code would walk the list and call the buffer free, which didn't remove it from any lists before pushing it back on the free list. Tested: AR9485, STA mode Noticed by: dil...@apollo.dragonflybsd.org Modified: head/sys/dev/ath/if_ath_rx_edma.c Modified: head/sys/dev/ath/if_ath_rx_edma.c == --- head/sys/dev/ath/if_ath_rx_edma.c Mon Jan 6 01:51:08 2014 (r260362) +++ head/sys/dev/ath/if_ath_rx_edma.c Mon Jan 6 03:48:32 2014 (r260363) @@ -450,18 +450,20 @@ ath_edma_recv_proc_queue(struct ath_soft static void ath_edma_flush_deferred_queue(struct ath_softc *sc) { - struct ath_buf *bf, *next; + struct ath_buf *bf; ATH_RX_LOCK_ASSERT(sc); /* Free in one set, inside the lock */ - TAILQ_FOREACH_SAFE(bf, - sc-sc_rx_rxlist[HAL_RX_QUEUE_LP], bf_list, next) { + while (! TAILQ_EMPTY(sc-sc_rx_rxlist[HAL_RX_QUEUE_LP])) { + bf = TAILQ_FIRST(sc-sc_rx_rxlist[HAL_RX_QUEUE_LP]); + TAILQ_REMOVE(sc-sc_rx_rxlist[HAL_RX_QUEUE_LP], bf, bf_list); /* Free the buffer/mbuf */ ath_edma_rxbuf_free(sc, bf); } - TAILQ_FOREACH_SAFE(bf, - sc-sc_rx_rxlist[HAL_RX_QUEUE_HP], bf_list, next) { + while (! TAILQ_EMPTY(sc-sc_rx_rxlist[HAL_RX_QUEUE_HP])) { + bf = TAILQ_FIRST(sc-sc_rx_rxlist[HAL_RX_QUEUE_HP]); + TAILQ_REMOVE(sc-sc_rx_rxlist[HAL_RX_QUEUE_HP], bf, bf_list); /* Free the buffer/mbuf */ ath_edma_rxbuf_free(sc, bf); } @@ -495,6 +497,10 @@ ath_edma_recv_proc_deferred_queue(struct ATH_RX_UNLOCK(sc); /* Handle the completed descriptors */ + /* +* XXX is this SAFE call needed? The ath_buf entries +* aren't modified by ath_rx_pkt, right? +*/ TAILQ_FOREACH_SAFE(bf, rxlist, bf_list, next) { /* * Skip the RX descriptor status - start at the data offset @@ -520,7 +526,9 @@ ath_edma_recv_proc_deferred_queue(struct /* Free in one set, inside the lock */ ATH_RX_LOCK(sc); - TAILQ_FOREACH_SAFE(bf, rxlist, bf_list, next) { + while (! TAILQ_EMPTY(rxlist)) { + bf = TAILQ_FIRST(rxlist); + TAILQ_REMOVE(rxlist, bf, bf_list); /* Free the buffer/mbuf */ ath_edma_rxbuf_free(sc, bf); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r260363 - head/sys/dev/ath
On Mon, Jan 06, 2014 at 03:48:32AM +, Adrian Chadd wrote: Author: adrian Date: Mon Jan 6 03:48:32 2014 New Revision: 260363 URL: http://svnweb.freebsd.org/changeset/base/260363 Log: Correctly remove entries from the relevant receive ath_buf list before freeing them. The current code would walk the list and call the buffer free, which didn't remove it from any lists before pushing it back on the free list. Tested: AR9485, STA mode Noticed by: dil...@apollo.dragonflybsd.org This is a NOP, right ? Modified: head/sys/dev/ath/if_ath_rx_edma.c Modified: head/sys/dev/ath/if_ath_rx_edma.c == --- head/sys/dev/ath/if_ath_rx_edma.c Mon Jan 6 01:51:08 2014 (r260362) +++ head/sys/dev/ath/if_ath_rx_edma.c Mon Jan 6 03:48:32 2014 (r260363) @@ -450,18 +450,20 @@ ath_edma_recv_proc_queue(struct ath_soft static void ath_edma_flush_deferred_queue(struct ath_softc *sc) { - struct ath_buf *bf, *next; + struct ath_buf *bf; ATH_RX_LOCK_ASSERT(sc); /* Free in one set, inside the lock */ - TAILQ_FOREACH_SAFE(bf, - sc-sc_rx_rxlist[HAL_RX_QUEUE_LP], bf_list, next) { + while (! TAILQ_EMPTY(sc-sc_rx_rxlist[HAL_RX_QUEUE_LP])) { + bf = TAILQ_FIRST(sc-sc_rx_rxlist[HAL_RX_QUEUE_LP]); + TAILQ_REMOVE(sc-sc_rx_rxlist[HAL_RX_QUEUE_LP], bf, bf_list); /* Free the buffer/mbuf */ ath_edma_rxbuf_free(sc, bf); } - TAILQ_FOREACH_SAFE(bf, - sc-sc_rx_rxlist[HAL_RX_QUEUE_HP], bf_list, next) { + while (! TAILQ_EMPTY(sc-sc_rx_rxlist[HAL_RX_QUEUE_HP])) { + bf = TAILQ_FIRST(sc-sc_rx_rxlist[HAL_RX_QUEUE_HP]); + TAILQ_REMOVE(sc-sc_rx_rxlist[HAL_RX_QUEUE_HP], bf, bf_list); /* Free the buffer/mbuf */ ath_edma_rxbuf_free(sc, bf); } @@ -495,6 +497,10 @@ ath_edma_recv_proc_deferred_queue(struct ATH_RX_UNLOCK(sc); /* Handle the completed descriptors */ + /* + * XXX is this SAFE call needed? The ath_buf entries + * aren't modified by ath_rx_pkt, right? + */ TAILQ_FOREACH_SAFE(bf, rxlist, bf_list, next) { /* * Skip the RX descriptor status - start at the data offset @@ -520,7 +526,9 @@ ath_edma_recv_proc_deferred_queue(struct /* Free in one set, inside the lock */ ATH_RX_LOCK(sc); - TAILQ_FOREACH_SAFE(bf, rxlist, bf_list, next) { + while (! TAILQ_EMPTY(rxlist)) { + bf = TAILQ_FIRST(rxlist); + TAILQ_REMOVE(rxlist, bf, bf_list); /* Free the buffer/mbuf */ ath_edma_rxbuf_free(sc, bf); } pgpqVkAk2fw9y.pgp Description: PGP signature
svn commit: r260364 - head/sys/cddl/contrib/opensolaris/common/atomic/ia64
Author: marcel Date: Mon Jan 6 05:00:58 2014 New Revision: 260364 URL: http://svnweb.freebsd.org/changeset/base/260364 Log: In atomic_or_8_nv() load 1 and not 8 bytes from the address given. Note that atomic_or_8_nv() is not used at this time. Modified: head/sys/cddl/contrib/opensolaris/common/atomic/ia64/opensolaris_atomic.S Modified: head/sys/cddl/contrib/opensolaris/common/atomic/ia64/opensolaris_atomic.S == --- head/sys/cddl/contrib/opensolaris/common/atomic/ia64/opensolaris_atomic.S Mon Jan 6 03:48:32 2014(r260363) +++ head/sys/cddl/contrib/opensolaris/common/atomic/ia64/opensolaris_atomic.S Mon Jan 6 05:00:58 2014(r260364) @@ -74,7 +74,7 @@ END(atomic_add_64_nv) */ ENTRY(atomic_or_8_nv, 2) 1: - ld8 r16 = [r32] + ld1 r16 = [r32] ;; mov ar.ccv = r16 or r8 = r16, r33 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r260161 - in head/sys/arm: arm include
On 06.01.14 03:55, Ian Lepore wrote: On Wed, 2014-01-01 at 20:03 +, Zbigniew Bodek wrote: Author: zbb Date: Wed Jan 1 20:03:48 2014 New Revision: 260161 URL: http://svnweb.freebsd.org/changeset/base/260161 Log: Add polarity and level support to ARM GIC Add suport for setting triggering level and polarity in GIC. New function pointer was added to nexus which corresponds to the function which sets level/sense in the hardware (GIC). Submitted by: Wojciech Macek w...@semihalf.com Obtained from: Semihalf Modified: head/sys/arm/arm/gic.c head/sys/arm/arm/intr.c head/sys/arm/arm/nexus.c head/sys/arm/include/intr.h [...] Modified: head/sys/arm/include/intr.h == --- head/sys/arm/include/intr.h Wed Jan 1 19:38:15 2014 (r260160) +++ head/sys/arm/include/intr.h Wed Jan 1 20:03:48 2014 (r260161) @@ -68,6 +68,7 @@ #endif #include machine/psl.h +#include sys/bus.h int arm_get_next_irq(int); void arm_mask_irq(uintptr_t); @@ -77,6 +78,8 @@ void arm_setup_irqhandler(const char *, void *, int, int, void **); int arm_remove_irqhandler(int, void *); extern void (*arm_post_filter)(void *); +extern int (*arm_config_irq)(int irq, enum intr_trigger trig, +enum intr_polarity pol); void gic_init_secondary(void); It turns out that the new #include in this change is causing the current arm tinderbox failures. Enums can't have forward decls anymore, so the fix for this may not be easy. I posted my try to fix this here: http://lists.freebsd.org/pipermail/freebsd-current/2014-January/047694.html Rebuilt 260333 successfully with it. Andreas ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r260363 - head/sys/dev/ath
On 5 January 2014 19:51, Konstantin Belousov kostik...@gmail.com wrote: On Mon, Jan 06, 2014 at 03:48:32AM +, Adrian Chadd wrote: Author: adrian Date: Mon Jan 6 03:48:32 2014 New Revision: 260363 URL: http://svnweb.freebsd.org/changeset/base/260363 Log: Correctly remove entries from the relevant receive ath_buf list before freeing them. The current code would walk the list and call the buffer free, which didn't remove it from any lists before pushing it back on the free list. Tested: AR9485, STA mode Noticed by: dil...@apollo.dragonflybsd.org This is a NOP, right ? Nope. the previous version didn't remove the entries from the list. that's the bug. -a ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r260224 - head/sys/netinet
On Fri, Jan 03, 2014 at 11:03:12AM +, Gleb Smirnoff wrote: Author: glebius Date: Fri Jan 3 11:03:12 2014 New Revision: 260224 URL: http://svnweb.freebsd.org/changeset/base/260224 Log: Make failure of ifpromisc() a non-fatal error. This makes it possible to run carp(4) on vtnet(4). vtnet(4) is the only device that doesn't correctly support promiscuous mode? I don't know details of vtnet(4) but it seems it's not hard to mimic promiscuous mode. I'm not sure why the driver returns ENOTSUP to user land given that vtnet(4) defaults to promiscuous mode for backwards compatibility. It also does not handle multicast filter configuration when VTNET_FLAG_CTRL_RX flag is not set. If vtnet(4) does not support multicast filter, it shouldn't announce IFF_MULTICAST. I wonder how vtnet(4) can work with carp(4) given that its multicast handling is ignored. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org