clang -Wpointer-sign

2016-09-24 Thread Mark Kettenis
So clang has this warning turned on by default. And our codebase is not clean. I don't think we intend to fix that anytime soon. In fact, I think we deliberately convert between signed and unsigned char pointers in places. So I propose to turn this warning off. Since gcc recognizes the option

Re: clang -Wpointer-sign

2016-09-24 Thread Mark Kettenis
> From: "Theo de Raadt" > Date: Sat, 24 Sep 2016 10:44:19 -0600 > > Please add this to all arch/*/conf/conf/Makefile.* files. > > We are trying to minimize differences between these files. If > that effort isn't made, they will eventually wander far apart from > each

More clang warnings in the kernel

2016-09-24 Thread Mark Kettenis
Compiling sys/dev/athn.c fails with: ../../../../dev/ic/athn.c:2182:9: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value] reg = RW(reg, AR_AES_MUTE_MASK1_FC1_MGMT, ^~~

clang: warning fix for vmt.c

2016-09-24 Thread Mark Kettenis
Using a variable for the format string isn't a godd idea. ok? Index: dev/pv/vmt.c === RCS file: /cvs/src/sys/dev/pv/vmt.c,v retrieving revision 1.9 diff -u -p -r1.9 vmt.c --- dev/pv/vmt.c3 Feb 2016 14:24:05 - 1.9

clang dev/pv/hyperv.c

2016-09-24 Thread Mark Kettenis
Another obvious mistake caught by clang. ok? Index: dev/pv/hyperv.c === RCS file: /cvs/src/sys/dev/pv/hyperv.c,v retrieving revision 1.16 diff -u -p -r1.16 hyperv.c --- dev/pv/hyperv.c 20 Sep 2016 10:27:14 - 1.16 +++

clang and

2016-09-24 Thread Mark Kettenis
clang warns by default about static functions that are unused. It does this even for static inline functions, except when those functions are defined in a header file. The RBT code in has macros that define static inline functions. Unfortunately that means that the inline functions generated

clang: kern/vfs_subr.c

2016-09-24 Thread Mark Kettenis
Finally a case where clang isn't entirely helpful. Because vp->v_tag is an enum, clang thinks its value can't be bigger than 15 and that the vp->v_tag >= nitems(vtags) check is therefore always false. But I think we want to prevent an out-of-bounds access here if the vnode is corrupted somehow.

Re: hide RT_TABLEID_MAX behind __BSD_VISIBLE

2016-09-26 Thread Mark Kettenis
> From: j...@wxcvbn.org (Jeremie Courreges-Anglas) > Date: Mon, 26 Sep 2016 21:13:24 +0200 > > AFAIK this is not a standard define, so it should be unconditionally > reachable. mkr went fine. > > Thoughts? ok kettenis@, although perhaps it makes sense to move this #define a bit further down

Modernize regress/libexec/ld.so/constructor

2016-09-26 Thread Mark Kettenis
Diff below modernizes the C++ code a bit such that the test case compiles again without warnings. It also uses CPPFLAGS instead of CFLAGS such that the c++ compiler actually stands a chance finding the header files. Since the tests succeed on amd64, and should succeed on other architectures, the

Re: hide RT_TABLEID_MAX behind __BSD_VISIBLE

2016-09-26 Thread Mark Kettenis
> From: Jeremie Courreges-Anglas <j...@wxcvbn.org> > Date: Mon, 26 Sep 2016 22:19:54 +0200 > > Mark Kettenis <mark.kette...@xs4all.nl> writes: > > >> From: j...@wxcvbn.org (Jeremie Courreges-Anglas) > >> Date: Mon, 26 Sep 2016 21:13:24 +0200 >

Re: Modernize regress/libexec/ld.so/constructor

2016-09-26 Thread Mark Kettenis
> Date: Mon, 26 Sep 2016 23:54:46 +0200 > From: Alexander Bluhm <alexander.bl...@gmx.net> > > On Mon, Sep 26, 2016 at 11:39:29PM +0200, Mark Kettenis wrote: > > Diff below modernizes the C++ code a bit such that the test case > > compiles again without warnings.

Re: Fix kbd -l

2016-09-29 Thread Mark Kettenis
> Date: Thu, 29 Sep 2016 16:09:09 +0200 > From: Theo Buehler <t...@math.ethz.ch> > > On Thu, Sep 29, 2016 at 02:19:43PM +0200, Mark Kettenis wrote: > > This diff adds a WSKBDIO_GETENCODINGS ioctl and uses it to print a > > list of supported encodings like

Re: Fix kbd -l

2016-09-29 Thread Mark Kettenis
> Date: Thu, 29 Sep 2016 14:19:43 +0200 (CEST) > From: Mark Kettenis <mark.kette...@xs4all.nl> > > This diff adds a WSKBDIO_GETENCODINGS ioctl and uses it to print a > list of supported encodings like the old kvm groveling code did. The > ioctl will clamp the number of

Re: 64-bit address for bus_space_map(9) on arm

2016-10-04 Thread Mark Kettenis
> Date: Tue, 4 Oct 2016 10:59:26 +0200 > From: Patrick Wildt > > Hi, > > continuing where we left off before the hackathon I would like to add > a diff to the 64-bit bus_addr_t discussion. This diff does not > increase the size of bus_addr_t. Instead it changes the argument

Re: cdce(4): Remove zaurus specific code

2016-10-07 Thread Mark Kettenis
> Date: Fri, 7 Oct 2016 16:32:35 +0200 > From: Frederic Cambus > > Hi tech@, > > It seems there are still some leftovers from the zaurus port removal. > > Comments? OK? Not ok. This is support for the zaurus as a usb device attached to an OpenBSD machine. Perhaps the

Re: add MCS support to radiotap

2016-10-08 Thread Mark Kettenis
> Date: Sat, 8 Oct 2016 13:06:53 +0200 (CEST) > From: Mark Kettenis <mark.kette...@xs4all.nl> > > > Date: Fri, 7 Oct 2016 18:59:52 +0200 > > From: Stefan Sperling <s...@stsp.name> > > > > On Fri, Oct 07, 2016 at 03:28:19PM +0200, Stefan Sperling w

Re: iwm ack rate mapping

2016-10-08 Thread Mark Kettenis
> Date: Fri, 7 Oct 2016 14:01:27 +0200 > From: Stefan Sperling > > Imre Vadasz pointed out that rate sets managed by net80211 are sorted > by effective data rate speed, while the iwm_rates array sorts CCK rates > (1 - 11 Mbit/s) before OFDM rates (6Mbit/s - 54Mbit/s). > > rate

Re: hide iwn firmware error log

2016-10-08 Thread Mark Kettenis
> Date: Thu, 6 Oct 2016 12:46:21 +0200 > From: Stefan Sperling > > Disable the detailed fatal firmware error log in iwn(4) by default. You're the best judge on how useful this information is. ok kettenis@ > Index: if_iwn.c >

Re: iwm(4): Improve iwm_rx_addbuf() error handling.

2016-10-08 Thread Mark Kettenis
> Date: Thu, 6 Oct 2016 12:56:37 +0200 > From: Stefan Sperling > > On Thu, Oct 06, 2016 at 10:49:21AM +0200, Imre Vadasz wrote: > > Hi, > > This patch improves the error handling iwm_rx_addbuf(), specifically in > > out-of-memory and mbuf exhaustion cases. > > > > Keep an

Re: athn: allow lower tx retry rates with RTS

2016-10-08 Thread Mark Kettenis
> Date: Fri, 7 Oct 2016 08:33:06 +0200 > From: Stefan Sperling > > On Thu, Oct 06, 2016 at 06:51:04PM +0200, Stefan Sperling wrote: > > athn(4) has a hack which disables lower Tx retry rates if RTS is used. > > > > I don't understand why this was added. Perhaps the assumption

Re: add MCS support to radiotap

2016-10-08 Thread Mark Kettenis
> Date: Fri, 7 Oct 2016 15:28:19 +0200 > From: Stefan Sperling > > Currently tcpdump shows "0 Mbit/s" for any frame sent with 11n HT MCS. > To make progress easier, I'd like to see which MCS are used on the air, > by any device. > > The change below matches what FreeBSD did to

Re: add MCS support to radiotap

2016-10-08 Thread Mark Kettenis
> Date: Fri, 7 Oct 2016 18:59:52 +0200 > From: Stefan Sperling > > On Fri, Oct 07, 2016 at 03:28:19PM +0200, Stefan Sperling wrote: > > Currently tcpdump shows "0 Mbit/s" for any frame sent with 11n HT MCS. > > To make progress easier, I'd like to see which MCS are used on the

sxitimer(4) fix

2016-10-09 Thread Mark Kettenis
On my Olimex A10s-Olinuxino Micro, time drifts quite fast (something of the order of a second per minute). The driver is written to use a 32kHz clock. The device tree on both sun4i and sun5i only references the 24MHz clock though. And the A10s and A13 datasheets don't document the settings for

fec(4) mii_tick

2016-09-21 Thread Mark Kettenis
Here is the promised diff that makes fec(4) call mii_tick() like all our other ethernet drivers that use mii do. Does this fix your problem Philip? Index: sys/arch/armv7/imx/if_fec.c === RCS file:

fec(4) cleanup

2016-09-21 Thread Mark Kettenis
Diff below removes nused code from the driver and makes sure we only enable the tx and rx interrupts. This seems to work fine for me. Next step will be to add the missing PHY tick stuff. ok? Index: sys/arch/armv7/imx/if_fec.c ===

Re: OMAP4/5 Wake-up generator driver

2016-09-15 Thread Mark Kettenis
es > intc*at fdt? # OMAP3 interrupt controller > +omwugen* at fdt? # Wake-up generator > #edma* at omap?# OMAP3 dma controller > prcm*at omap?# power/clock controller > sit

We don't need cross-unwinding support

2016-09-19 Thread Mark Kettenis
Saves a bit code and a bit of stack space, which might be important important in some unwinding scenarios. ok? Index: Makefile === RCS file: /cvs/src/lib/libcxx/Makefile,v retrieving revision 1.2 diff -u -p -r1.2 Makefile ---

Re: Modernize arm assembly in the kernel

2016-09-21 Thread Mark Kettenis
> Date: Wed, 21 Sep 2016 11:00:49 +0200 > From: Joerg Sonnenberger <jo...@bec.de> > > On Wed, Sep 21, 2016 at 10:10:43AM +0200, Mark Kettenis wrote: > > 1. In GNU as, .align 0 is equivalent to .align 2, but with clang's > >internal assembler .align 0 means

Re: fec(4) mii_tick

2016-09-21 Thread Mark Kettenis
> Date: Wed, 21 Sep 2016 21:42:36 +1000 > From: Jonathan Gray <j...@jsg.id.au> > > On Wed, Sep 21, 2016 at 01:22:04PM +0200, Mark Kettenis wrote: > > Here is the promised diff that makes fec(4) call mii_tick() like all > > our other ethernet drivers that use mii d

arm assembly syntax

2016-09-18 Thread Mark Kettenis
Somewhere down the line the ARM people made some subtle changes to their assembly syntax. The new syntax is called Unified Assembler Language (UAL), and tis is what clang supports. But gas defaults to the old pre-UAL dialect. The easiest way to make code compile with both clang and gcc is to

fix clang types on arm

2016-09-16 Thread Mark Kettenis
On OpenBSD we use a consistent set of typedefs across platforms for the types specified by the C standard. In some cases these deviate from what the processor-specific ABI says. The diff below fixes the ones relevant for arm, pretty much by following NetBSD. ok? Oh, and how do we handle

Build libc++ and libc++abi with -nostdinc++

2016-09-17 Thread Mark Kettenis
Without this, they don't build with clang++ because it tries to use the installed headers. Doesn't hurt building with eg++. ok? Index: lib/libcxx/Makefile === RCS file: /cvs/src/lib/libcxx/Makefile,v retrieving revision 1.1 diff

Re: We don't need cross-unwinding support

2016-09-19 Thread Mark Kettenis
> Date: Mon, 19 Sep 2016 14:08:49 +0200 (CEST) > From: Mark Kettenis <mark.kette...@xs4all.nl> > > Saves a bit code and a bit of stack space, which might be important > important in some unwinding scenarios. > > ok? Transplanted the diff into the wrong file. Here

Re: We don't need cross-unwinding support

2016-09-19 Thread Mark Kettenis
> Date: Mon, 19 Sep 2016 16:08:33 +0200 (CEST) > From: Mark Kettenis <mark.kette...@xs4all.nl> > > > Date: Mon, 19 Sep 2016 14:08:49 +0200 (CEST) > > From: Mark Kettenis <mark.kette...@xs4all.nl> > > > > Saves a bit code and a bit of stack space, w

Re: timeout_set_proc(9)

2016-09-19 Thread Mark Kettenis
> Date: Mon, 19 Sep 2016 13:47:25 +1000 > From: David Gwynne <da...@gwynne.id.au> > > On Fri, Sep 16, 2016 at 04:58:39PM +0200, Mark Kettenis wrote: > > > Date: Thu, 15 Sep 2016 16:29:45 +0200 > > > From: Martin Pieuchot <m...@openbsd.org> > > &

Add support for a few more arm relocations

2016-09-19 Thread Mark Kettenis
>From FreeBSD, still under GPLv2. I've seen R_ARM_MOVW_ABS_NC in code generated by clang. ok? Index: gnu/usr.bin/binutils-2.17/bfd/bfd-in2.h === RCS file: /cvs/src/gnu/usr.bin/binutils-2.17/bfd/bfd-in2.h,v retrieving revision 1.6

arm libcompiler_rt

2016-09-19 Thread Mark Kettenis
Diff below adds the relevant arm-specific code to the build. It leaves out the VFP bits. Those don't compile with our current toolchain (gcc/binutils) and I believe they're only necessary for the hard-float ABI anyway. ok? Index: Makefile

dwc2 cleanup diff

2016-09-23 Thread Mark Kettenis
Essentially fixes for clang warnings. Clang doesn't like the sc = sc; statements in dwc2_shutdown(), dwc2_childdet() and dwc2_activate(). Those functions aren't actually used. This diff moves them inside the #if 0 that's already there for dwc2_suspend() and dwc2_resume(). But

Some arm cleanups suggested by clang

2016-09-23 Thread Mark Kettenis
Most of these are warnings about static symbols that aren't used. The pmap_get_pde_pte() bit fixes: ../../../../arch/arm/arm/pmap7.c:2220:10: warning: comparison of array 'pm->pm_l2' equal to a null pointer is always false [-Wtautological-pointer-compare] if (pm->pm_l2 ==

Modernize arm assembly in the kernel

2016-09-21 Thread Mark Kettenis
This fixes two isses. 1. In GNU as, .align 0 is equivalent to .align 2, but with clang's internal assembler .align 0 means "no alignment". 2. Using "ldr" to load a constant into a register is strange. It works with GNU as, but not with clang. No binary change in a kernel compiled with

aeabi stuff in libkern

2016-09-22 Thread Mark Kettenis
clang generates these calls using the official aeabi names instead of the gcc names. Just add an alias for them. FreeBSD does something similar. ok? Index: lib/libkern/arch/arm/divsi3.S === RCS file:

Two more arm aeabi functions for the kernel

2016-09-22 Thread Mark Kettenis
These functions are necessary to build our kernel with clang. I picked these from NetBSD as I didn't quite like the way FreeBSD implemented them. I stripped all the unecessary bits from the NetBSD implementation (which is shared with userland). Do the file names with the leading underscores

dl_unwind_find_exidx prototype

2016-09-20 Thread Mark Kettenis
So my diff that switched libunwind to use dl_unwind_find_exidx() was incomplete. I forgot that I had put its prototype in and missed that file when generating the diff. However, isn't really the right place to put the prototype. We have dl_iterate_phdr() in , and dl_unwind_find_exidx() is

Re: timeout_set_proc(9)

2016-09-16 Thread Mark Kettenis
> Date: Fri, 16 Sep 2016 16:03:50 +0200 > From: Vincent Gross > > On Thu, 15 Sep 2016 16:29:45 +0200 > Martin Pieuchot wrote: > > > After discussing with a few people about a new "timed task" API I came > > to the conclusion that mixing timeouts and tasks

Re: timeout_set_proc(9)

2016-09-16 Thread Mark Kettenis
> Date: Thu, 15 Sep 2016 16:29:45 +0200 > From: Martin Pieuchot > > After discussing with a few people about a new "timed task" API I came > to the conclusion that mixing timeouts and tasks will result in: > > - always including a 'struct timeout' in a 'struct task', or the

Re: sys/systm.h: drop read_symtab_from_file() proto

2016-09-17 Thread Mark Kettenis
> Date: Sat, 17 Sep 2016 13:05:01 +0200 > From: Jasper Lievisse Adriaanse > > This seems to be a leftover from when the actual function itself was removed > at some point? ok kettenis@ > Index: systm.h > === >

Re: arm exidx functions

2016-09-17 Thread Mark Kettenis
> Date: Sat, 17 Sep 2016 09:38:46 -0700 > From: Philip Guenther <guent...@gmail.com> > > On Sat, 17 Sep 2016, Mark Kettenis wrote: > > Note that libunwind uses __gnu_Unwind_Find_exidx on Linux, so we could > > follow Linux here and drop the dl_unwind_find_exi

clang makefiles for arm

2016-09-16 Thread Mark Kettenis
I'm working on arm support for the in-tree llvm. I've got it working well enough to build "Hello, World", but I still have some exception handling issues. As a first step, this adds the build infrastructure. ok? Index: include/llvm/ARM/Makefile

Re: ld.so initarray support

2016-08-18 Thread Mark Kettenis
> Date: Wed, 17 Aug 2016 12:50:54 -0700 > From: Philip Guenther <guent...@gmail.com> > > On Wed, 17 Aug 2016, Mark Kettenis wrote: > ... > > Functions listed by DT_PREINIT_ARRAY get run immediately after ld.so has > > finished loading and relocating all

Re: Enable FIFO Synopsis DesignWare APB UART

2016-08-18 Thread Mark Kettenis
> Date: Thu, 18 Aug 2016 11:41:52 +0200 > From: Marcus Glocker <mar...@nazgul.ch> > > On Wed, Aug 17, 2016 at 04:05:05PM +0200, Mark Kettenis wrote: > > > > Date: Wed, 17 Aug 2016 15:36:21 +0200 > > > From: Marcus Glocker <mar...@nazgul.ch> > >

Use Access Flag to do page reference emulation on armv7

2016-08-18 Thread Mark Kettenis
Currently we mark page table entries as invalid to do reference emulation. This is a bit complicated as the XN bit for "small" (normal 4K) pages has been stuffed into the two-bit type field. That's why all those /* XXX use of L2_V7_S_XN */ comments were in the code for. But ARMv7

Re: ld.so: remove unused syscall stubs

2016-08-28 Thread Mark Kettenis
> Date: Sat, 27 Aug 2016 21:14:20 -0700 > From: Philip Guenther > > _dl_gettimeofday() was used by the prebind code, which was recently > removed. > > _dl_lstat() was only used by _dl_realpath(), which no longer needs it. > > ok? ok kettenis@ > Index: alpha/ldasm.S >

Add support for the PXN bit on armv7

2016-08-26 Thread Mark Kettenis
The PXN (Privileged eXecute Never) bit can be set on level 1 page table entries to prevent execution of the pages covered by that page table entry from PL1 and above. So by setting this bit on the level 1 page table entries that cover the user space part of the address space, we can prevent the

fdt_find_node() bug

2016-08-23 Thread Mark Kettenis
This function is supposed to return NULL if the node isn't found. But the current implementation will always return the node for the last path component that matched. Wchis will be the root node if nothing else matches. So this function will never return NULL if the path starts with '/'. Diff

Re: ld.so initarray support

2016-08-23 Thread Mark Kettenis
> Date: Mon, 22 Aug 2016 21:27:51 -0700 > From: Philip Guenther > > Right now, DT_NUM is defined in , but that's dumb: it > should be moved immediately to libexec/ld.so/resolv.h, right above this > struct, and its value increased to match the growth here. I killed it's >

Re: First usages of timeout_set_proc(9)

2016-10-03 Thread Mark Kettenis
> Date: Mon, 3 Oct 2016 14:57:34 +0200 > From: Martin Pieuchot > > Here are some timeouts that require a process context in order to call > ip_output(). > > The reason is that rtalloc(9) might end up inserting a RTF_CLONING route > and that requires holding a write lock. This

Re: Fix kbd -l

2016-09-30 Thread Mark Kettenis
> From: Jeremie Courreges-Anglas <j...@wxcvbn.org> > Date: Fri, 30 Sep 2016 17:00:45 +0200 > > Mark Kettenis <mark.kette...@xs4all.nl> writes: > > [...] > > >> > -for (i = 0; kbdenc_tab[i].value; i++) > >> > -print

Re: clang, stack limit and inlining

2016-10-02 Thread Mark Kettenis
> From: "Theo de Raadt" > Date: Fri, 30 Sep 2016 09:38:30 -0600 > > > Diff below is a possible way to fix this. But in a way we're cheating > > here since we'll still consume more than 2047 bytes of stack space > > when we descend into wskbd_initmute(). So perhaps we

Re: Modernize regress/libexec/ld.so/constructor

2016-09-27 Thread Mark Kettenis
> Date: Tue, 27 Sep 2016 18:01:51 +0200 > From: Alexander Bluhm <alexander.bl...@gmx.net> > > On Mon, Sep 26, 2016 at 11:39:29PM +0200, Mark Kettenis wrote: > > Since the tests succeed on amd64, and should succeed on other > > architectures, the diff re-enable

ehci(4)/imxehci(4) diff to switch port into host mode

2016-10-01 Thread Mark Kettenis
The USB controller on the Freescale i.MX application processors has a dual role port that can act as device (OTG) or as host. Since we don't have any device mode support in our kernel, we try to switch the port into host mode. Unfortunately that never worked. Here's why: The USBMODE register

Fix kbd -l

2016-09-29 Thread Mark Kettenis
This diff adds a WSKBDIO_GETENCODINGS ioctl and uses it to print a list of supported encodings like the old kvm groveling code did. The ioctl will clamp the number of entries that are returns to the number that was passed in. This means that if the number returned is the same as the number

clang, stack limit and inlining

2016-09-30 Thread Mark Kettenis
We compile out kernel with -Wframe-larger-than=2047 to make sure we don't write stupid code that blows the kernel stack. Now clang thinks it is clever and considers it a good idea to inline functions when the function and the caller live in the same source file. A particular case where this

Re: Fix kbd -l

2016-09-30 Thread Mark Kettenis
> From: Jeremie Courreges-Anglas <j...@wxcvbn.org> > Date: Fri, 30 Sep 2016 13:32:57 +0200 > > Mark Kettenis <mark.kette...@xs4all.nl> writes: > > >> Date: Thu, 29 Sep 2016 14:19:43 +0200 (CEST) > >> From: Mark Kettenis <mark.kette...@xs4all.nl&g

Re: aml_rdpciaddr is busted

2016-10-25 Thread Mark Kettenis
> Date: Wed, 19 Oct 2016 21:51:47 +0200 (CEST) > From: Mark Kettenis <mark.kette...@xs4all.nl> > > The bus number it reports will be totally bogus for devices behind PCI > bridges. As a consequence AML will peek and poke at registers of the > wrong device. This is what c

aml_rdpciaddr is busted

2016-10-19 Thread Mark Kettenis
The bus number it reports will be totally bogus for devices behind PCI bridges. As a consequence AML will peek and poke at registers of the wrong device. This is what caused the suspend issues with Joris' Macbook. The diff below attempts to fix this by using the mapping between AML nodes and

Re: use x2apic if it is enabled by BIOS

2016-10-14 Thread Mark Kettenis
> Date: Fri, 14 Oct 2016 16:49:31 +0900 (JST) > From: YASUOKA Masahiko > > Hi, > > I'm working on NEC Express5800/R110h-1 (dmesg is attached). On this > machine, our kernel panics with following message. > > cpu0 at mainbus0panic: cpu at apic id 0 already attached? > >

pstat -d fix

2016-10-22 Thread Mark Kettenis
If there is no modifier, we should not go down the "longformat" path. The amount of breakage is somewhat ABI-dependent, but on armv7 pstat -d x ticks would print stack garbage. ok? Index: pstat.c === RCS file:

Re: use x2apic if it is enabled by BIOS

2016-10-17 Thread Mark Kettenis
> Date: Sat, 15 Oct 2016 09:55:05 +0200 (CEST) > From: s...@openbsd.org > > On Fri, 14 Oct 2016, Mike Larkin wrote: > > > On Fri, Oct 14, 2016 at 04:49:31PM +0900, YASUOKA Masahiko wrote: > > > Hi, > > > > > > I'm working on NEC Express5800/R110h-1 (dmesg is attached). On this > > > machine,

Re: sparc64: delete old "traptrace" bits

2016-10-18 Thread Mark Kettenis
> Date: Sun, 16 Oct 2016 23:30:07 -0700 > From: Philip Guenther > > In 2003(!) a pile of code was deleted from sparc64's locore.s: > > revision 1.35 > date: 2003/05/17 07:09:08; author: art; state: Exp; lines: +1 -957; > Get rid of lots of

Re: CVS: cvs.openbsd.org: src (fwd)

2016-10-18 Thread Mark Kettenis
> Date: Sun, 16 Oct 2016 13:58:17 -0700 > From: Philip Guenther > > Should have sent this to tech... Yes please! But by terminating the loop early, I you'll miss the case where the symbol shadows both a function and a global variable. > -- Forwarded message

Re: suspend/resume on macbooks

2016-10-18 Thread Mark Kettenis
> Date: Tue, 18 Oct 2016 21:56:13 +0200 > From: Joris Vink > > Hi, > > Sending this out so others with Macbooks can test this. > > This diff may fix suspend/resume problems seen on certain Macbooks where > your display goes black but nothing else happens. > > Note that this

Re: acpiec on acer aspire S7 with CURRENT

2016-10-24 Thread Mark Kettenis
> Date: Mon, 24 Oct 2016 23:01:22 +0300 > From: Paul Irofti <p...@irofti.net> > > On Mon, Oct 24, 2016 at 10:50:00PM +0300, Paul Irofti wrote: > > On Mon, Oct 24, 2016 at 07:46:33PM +0200, Mark Kettenis wrote: > > > > From: Paul Irofti <p...@irofti.net&g

Re: log mutex

2016-10-20 Thread Mark Kettenis
> Date: Thu, 20 Oct 2016 15:42:32 +0200 > From: Alexander Bluhm > > Hi, > > A while ago I made kernel logging interrupt safe by adding a > splhigh(). When we are going MP this is not sufficient, so replace > it with a mutex. The idea is to hold the mutex every time

Re: acpiec on acer aspire S7 with CURRENT

2016-10-21 Thread Mark Kettenis
> Date: Fri, 21 Oct 2016 10:37:08 +0300 > From: Paul Irofti > > On Tue, Oct 18, 2016 at 09:01:59PM -0700, Ilya Kaliman wrote: > > Thanks! Now everything seems to work. Minor tweak - maybe need extra > > newline after "acpiec0 at acpi0" > > New diff that fixes the printfs,

Re: acpiec on acer aspire S7 with CURRENT

2016-10-24 Thread Mark Kettenis
e last argument, and the crs "number" should be the first, although I could live with it being the second. I feel a bit bad though for not suggesting that earlier. > -Mesaj original- > De la: "Paul Irofti" <p...@irofti.net> > Trimis: ‎22.‎10.‎2016

Re: syslog_r() should use strerror_r()

2016-10-19 Thread Mark Kettenis
> From: "Todd C. Miller" > Date: Wed, 19 Oct 2016 09:11:36 -0600 > > Currently, syslog_r() avoids using strerror() since it is not > reentrant. We have a reentrant strerror_r() so let's use it. > > OK? Perhaps add a comment explicitly stating that OpenBSD's

Re: Fix loadavg(3)

2016-11-14 Thread Mark Kettenis
> Date: Mon, 14 Nov 2016 13:11:58 +0100 > From: Martin Pieuchot > > On 12/11/16(Sat) 15:52, patrick keshishian wrote: > > Ahh... seems the culprit is softclock_thread added 2016/09/22 > > (kern/kern_timeout.c mpi@). > > I'd suggest we simply skip kernel thread when calculating

Re: umb: NCM datagram pointer entries

2016-11-14 Thread Mark Kettenis
> Date: Mon, 14 Nov 2016 10:51:03 +0100 > From: Gerhard Roth > > Hi, > > according to the NCM spec, the list of datagram pointer entries has to > be terminated with an entry where wDatagramIndex and wDatagramLen are > zero. Not all implementations seem to follow that

Re: use DRM_IOCTL_GET_PCIINFO in libdrm

2016-11-23 Thread Mark Kettenis
> Date: Wed, 23 Nov 2016 11:50:49 +1100 > From: Jonathan Gray <j...@jsg.id.au> > > On Tue, Nov 22, 2016 at 09:29:03PM +0100, Mark Kettenis wrote: > > > Date: Sat, 19 Nov 2016 19:31:18 +1100 > > > From: Jonathan Gray <j...@jsg.id.au> > > > > &

Re: add a new DRM_IOCTL_GET_PCIINFO ioctl

2016-11-23 Thread Mark Kettenis
> Date: Wed, 23 Nov 2016 11:46:41 +1100 > From: Jonathan Gray <j...@jsg.id.au> > > On Tue, Nov 22, 2016 at 09:26:21PM +0100, Mark Kettenis wrote: > > > Date: Sat, 19 Nov 2016 19:27:25 +1100 > > > From: Jonathan Gray <j...@jsg.id.au> > > > &g

Re: UEFI install fails on Hetzner EX51

2016-11-23 Thread Mark Kettenis
> From: Leo Unglaub > Date: Wed, 23 Nov 2016 12:20:24 +0100 > > Hey friends, > first of all i am sorry if this is not for tech@ and more for bugs@ but > to me it seams like a tech@ issue. > > I am trying to install OpenBSD on a Hetzner EX51 server. The specs can > be

Re: UEFI install fails on Hetzner EX51

2016-11-23 Thread Mark Kettenis
> Date: Wed, 23 Nov 2016 08:50:25 -0500 > From: Jiri B <ji...@devio.us> > > On Wed, Nov 23, 2016 at 01:55:59PM +0100, Leo Unglaub wrote: > > Hey, > > > > On 11/23/16 13:27, Mark Kettenis wrote: > > >>> Booting the UEFI version of the install.fs

Re: only free pool pages from the gc task

2016-11-22 Thread Mark Kettenis
> Date: Tue, 22 Nov 2016 12:45:44 +1000 > From: David Gwynne > > at the moment pages can be freed on a pool_put call and from the gc. > > it is a bit unfair that pool_get may end up doing the heavy lifting > of allocating a pool page and pool_put wont have to do an

Re: global mbuf memory limit

2016-11-22 Thread Mark Kettenis
> Date: Tue, 22 Nov 2016 12:42:39 +1000 > From: David Gwynne > > right now pools that make up mbufs are each limited individually. > > the following diff instead has the mbuf layer have a global limit > on the amount of memory that can be allocated to the pools. this > is

Re: add a new DRM_IOCTL_GET_PCIINFO ioctl

2016-11-22 Thread Mark Kettenis
> Date: Sat, 19 Nov 2016 19:27:25 +1100 > From: Jonathan Gray > > To pull pci information from the kernel for drm devices we need a common > drm ioctl. This is a requirement for implementing functions in libdrm > which are used by Mesa >= 13. > > To not clash with drm headers

Re: use DRM_IOCTL_GET_PCIINFO in libdrm

2016-11-22 Thread Mark Kettenis
> Date: Sat, 19 Nov 2016 19:31:18 +1100 > From: Jonathan Gray > > Support libdrm functions required for Mesa versions >= 13. > > On linux this information is pulled out of a psuedo filesystem, here the > new DRM_IOCTL_GET_PCIINFO ioctl is used for the same. > > Only primary drm

Re: pine64: working bootloader

2016-11-17 Thread Mark Kettenis
Plese stop sending large attachments. The lists will drop them, and they're overflowing my inbox. Thanks, Mark

Re: reduce iwm's RTS retry limit

2016-11-20 Thread Mark Kettenis
> Date: Sat, 19 Nov 2016 18:11:23 +0100 > From: Stefan Sperling > > The RTS retry limit we inherited from Linux seems insanely high. > > It seems to be the cause for "bursty" pings and high latency for > smaller packets while larger packets from TCP streams are stuck > in the Tx

Re: Add ioctl for disk cache flush

2016-10-30 Thread Mark Kettenis
> From: David Gwynne > Date: Mon, 31 Oct 2016 10:38:49 +1000 > > > On 31 Oct 2016, at 09:18, Stefan Fritsch wrote: > > > > On Sun, 30 Oct 2016, Stefan Fritsch wrote: > >> I agree with all your comments (and should have reviewed the initial patch > >>

Re: cdce(4): Remove zaurus specific code

2016-10-12 Thread Mark Kettenis
> Date: Tue, 11 Oct 2016 23:03:59 +0200 > From: Frederic Cambus <f...@statdns.com> > > On Fri, Oct 07, 2016 at 06:02:35PM +0200, Mark Kettenis wrote: > > > > It seems there are still some leftovers from the zaurus port removal. > > > > > >

Re: M_PREPEND in vxlan encap on not strict-alignment archs

2016-10-10 Thread Mark Kettenis
> Date: Mon, 10 Oct 2016 13:48:18 +1000 > From: David Gwynne > > if the arch can cope with prepending on an unaligned address in > vxlan, then let it do it. > > this means less work if we can get away with it. > > ok? Let's face it. The vxlan protocol is badly designed.

Re: King Jim Portabook

2016-12-10 Thread Mark Kettenis
> From: Reyk Floeter > Date: Sat, 10 Dec 2016 12:50:56 +0100 > > >> On Sat, Dec 10, 2016 at 08:17:10PM +0900, Ryan McBride wrote: > >> So I've been eying this machine for a while: > >> http://www.kingjim.co.jp/sp/portabook/xmc10/ > > > > Included below is the dmesg with the

Re: ifconfig: print netmask in CIDR notation

2016-12-13 Thread Mark Kettenis
> Date: Tue, 13 Dec 2016 10:51:40 +0100 > From: Reyk Floeter > > Hi, > > printing the netmask in hex seems to be a historical artifact in ifconfig; > I always wondered about it and I never got used to it. > > The following diff changes ifconfig output to print contiguous >

Re: if() before m_free(9)

2017-01-09 Thread Mark Kettenis
> Date: Mon, 9 Jan 2017 20:12:32 +0100 > From: Martin Pieuchot > > m_free(9) handles NULL, no need to check for it beforehand. > > Seems that we missed these because of the (void) cast! > > ok? ok kettenis@ > Index: netinet/ip_output.c >

Re: Remove uvm hint address selector

2017-01-15 Thread Mark Kettenis
> Date: Sun, 15 Jan 2017 15:06:50 +0100 > From: Stefan Kempf > > When uvm pivots are enabled, allocations > with an address hint provided by the user program are > handled by the uaddr_hint selector. > > I'd like to remove the uaddr_hint selector. The uaddr_rnd selector >

Re: arm64: userland pieces (libm)

2017-01-11 Thread Mark Kettenis
> Date: Wed, 11 Jan 2017 14:12:59 +0100 > From: Patrick Wildt > > Hi, > > I'd like to start importing the userland pieces, piece by piece. This > diff implements support for aarch64 in libm. It's based on the FreeBSD > header, modified to look and feel more like our code. >

Re: C11 max_align_t

2017-01-06 Thread Mark Kettenis
> From: "Todd C. Miller" > Date: Thu, 05 Jan 2017 15:50:02 -0700 > > I think you need to also define __CLANG_MAX_ALIGN_T_DEFINED and > perhaps _GCC_MAX_ALIGN_T to avoid libcxx from redefining max_align_t > as a different type. E.g. in src/lib/libcxx/include/stddef.h >

ld.so diff that needs testing on landisk

2017-01-03 Thread Mark Kettenis
The diff below (partly by guenther@) removes ld.so's dependency on the __got_{start,end} symbols by looking at PT_GNU_RELRO instead. On some platforms (hppa and perhaps a few others) this leads to even less writable pages. However, we're not sure if this will work correctly on landisk. So if

C11 max_align_t

2017-01-05 Thread Mark Kettenis
Diff below adds C11 support to the feature test macros in and uses those to conditionally define the max_align_t type in . All systems/compilers seem to use the same construct. See https://reviews.llvm.org/rL201729 for a bit more background. This will make it possible to remove clang's

Re: Only install relevant "intrinsics" header files

2017-01-06 Thread Mark Kettenis
> Date: Sat, 7 Jan 2017 08:10:02 +1100 > From: Jonathan Gray <j...@jsg.id.au> > > On Fri, Jan 06, 2017 at 05:26:36PM +0100, Mark Kettenis wrote: > > These are hardware-specific, so it makes sense to only install the > > ones relevant for the (target) hardw

<    7   8   9   10   11   12   13   14   15   16   >