Re: add new em(4) variant for X270

2017-03-19 Thread Jonathan Gray
On Sat, Mar 18, 2017 at 04:29:56PM +0100, Claudio Jeker wrote: > The X270 seems to have a new I219-LM variant that em(4) doesn't know. > Adding it to the driver seems to be enough. > > OK? Can you also add the other variants we don't match and keep the same name Intel uses? At the moment we

Re: Making it easier to install clang alongside gcc

2017-03-18 Thread Jonathan Gray
On Sat, Mar 18, 2017 at 05:24:30PM +0100, Mark Kettenis wrote: > > Date: Thu, 16 Mar 2017 11:32:07 +1100 > > From: Jonathan Gray <j...@jsg.id.au> > > > > On Wed, Mar 15, 2017 at 09:53:41PM +0100, Mark Kettenis wrote: > > > It's currently a bit of a pai

Re: Making it easier to install clang alongside gcc

2017-03-15 Thread Jonathan Gray
On Wed, Mar 15, 2017 at 09:53:41PM +0100, Mark Kettenis wrote: > It's currently a bit of a pain to install clang and ld.lld, but keep > gcc and ld.bfd as the default compiler/linker. You can't rebuild > clang with base gcc and you really want to rebuild it with clang > instead of the ports gcc

Re: armv7 memory segments

2017-03-09 Thread Jonathan Gray
On Thu, Mar 09, 2017 at 10:38:20PM +0100, Mark Kettenis wrote: > For some reason u-boot on the exynos platform decides to split up the > memory in banks with a maximum size of 256MB. Since my Odroid XU4 has > 2GB of memory, I end up with more memory segments than the two > supported by our

Re: arm64 SMP support, diff #3/5

2017-03-07 Thread Jonathan Gray
On Tue, Mar 07, 2017 at 02:28:06AM -0500, Dale Rahn wrote: > > Updated diff, this has changed a bit since the psci driver has changed. > > diff --git a/sys/dev/fdt/psci.c b/sys/dev/fdt/psci.c > index b24613a275c..2ba500ea718 100644 > --- a/sys/dev/fdt/psci.c > +++ b/sys/dev/fdt/psci.c > @@ -29,14

Re: [PATCH] Minor spelling fixes throughout gcc md files

2017-03-01 Thread Jonathan Gray
On Wed, Mar 01, 2017 at 04:45:33PM -0500, Carlos E. Garcia wrote: > Greetings, > > Here follows some minor spelling fixes found in markdown files inside > the gcc folder. Wanted something simple for my first patch. > > Any insight or comments? We generally aren't interested in changes like this

Re: armv7/omap: attach edma at fdt, re-enable

2017-02-28 Thread Jonathan Gray
On Mon, Feb 27, 2017 at 04:16:30AM -0500, Ian Sutton wrote: > On Mon, Feb 27, 2017 at 08:08:16PM +1100, Jonathan Gray wrote: > > There is only one with "ti,edma3-tpcc". > > Geez. It may be time to increase my font size. This has been committed with some changes:

Re: INSTALL.arm64: use larger blocks in dd example

2017-02-27 Thread Jonathan Gray
On Mon, Feb 27, 2017 at 10:50:35AM +, Stuart Henderson wrote: > On 2017/02/27 21:37, Jonathan Gray wrote: > > On Mon, Feb 27, 2017 at 09:54:33AM +, Stuart Henderson wrote: > > > Using the current example (512-byte blocks): > > > 18874368 bytes transferred in 113

Re: INSTALL.arm64: use larger blocks in dd example

2017-02-27 Thread Jonathan Gray
On Mon, Feb 27, 2017 at 09:54:33AM +, Stuart Henderson wrote: > Using the current example (512-byte blocks): > 18874368 bytes transferred in 113.823 secs (165821 bytes/sec) > > Using bs=1m like we suggest in "Creating a bootable USB key using a > Un*x-like system": > 18874368 bytes

Re: armv7/omap: attach edma at fdt, re-enable

2017-02-27 Thread Jonathan Gray
On Mon, Feb 27, 2017 at 04:05:45AM -0500, Ian Sutton wrote: > On Mon, Feb 27, 2017 at 07:59:07PM +1100, Jonathan Gray wrote: > > On Mon, Feb 27, 2017 at 03:34:35AM -0500, Ian Sutton wrote: > > > This patch changes edma(4) to attach via device tree and re-enables it. > >

Re: armv7/omap: attach edma at fdt, re-enable

2017-02-27 Thread Jonathan Gray
On Mon, Feb 27, 2017 at 03:55:12AM -0500, Ian Sutton wrote: > Previous patch was malformed, d'oh. > > Index: conf/GENERIC > === > RCS file: /cvs/src/sys/arch/armv7/conf/GENERIC,v > retrieving revision 1.71 > diff -u -p -r1.71 GENERIC

Re: armv7/omap: attach edma at fdt, re-enable

2017-02-27 Thread Jonathan Gray
On Mon, Feb 27, 2017 at 03:34:35AM -0500, Ian Sutton wrote: > This patch changes edma(4) to attach via device tree and re-enables it. Looks like the line wrapping got mangled. I don't see the point in testing ti,hwmods in match. > > > Index: conf/GENERIC >

Re: arm64 SMP support, diff #3/5

2017-02-22 Thread Jonathan Gray
On Wed, Feb 22, 2017 at 06:45:52PM -0500, Dale Rahn wrote: > Add psci 2.0 features to spin up/down/suspend processors. > > This change uses extern weak symbols to determine if the platform supports > the cpu_on/cpu_off/cpu_suspend features. If available, it saves the fdt > provided argument

set sc_vendor in bcm2835_dwctwo

2017-02-20 Thread Jonathan Gray
Maybe one day these drivers will attach to a non-Broadcom dwc2 but for now they only match the Broadcom compat strings. -uhub0 at usb0 configuration 1 interface 0 "vendor 0x DWC2 root hub" rev 2.00/1.00 addr 1 +uhub0 at usb0 configuration 1 interface 0 "Broadcom DWC2 root hub" rev 2.00/1.00

Re: don't attempt to build binutils 2.15 on arm64

2017-02-18 Thread Jonathan Gray
On Sat, Feb 18, 2017 at 06:27:51PM -0800, Philip Guenther wrote: > On Sat, Feb 18, 2017 at 6:16 PM, Jonathan Gray <j...@jsg.id.au> wrote: > > binutils 2.15 is built for gdb. There is no support for arm64/aarch64 > > here and it doesn't build so don't try to. > > > &g

don't attempt to build binutils 2.15 on arm64

2017-02-18 Thread Jonathan Gray
binutils 2.15 is built for gdb. There is no support for arm64/aarch64 here and it doesn't build so don't try to. Manual pages depend on running configure which again doesn't know about aarch64. Index: Makefile.bsd-wrapper === RCS

Re: arm64 ddb support improvement

2017-02-17 Thread Jonathan Gray
On Fri, Feb 17, 2017 at 02:14:29AM -0500, Dale Rahn wrote: > Fix pieces of aarch64 ddb support: > kernel vs user mode detection > implement (optimize) 8 byte reads > cast address pointers to vaddr_t, not uint32_t (do not truncate) > remove db_fetch_reg(), not used by OpenBSD > implement ddb

Re: arm64 pmap fix: CANFAIL logic

2017-02-17 Thread Jonathan Gray
On Fri, Feb 17, 2017 at 02:11:55AM -0500, Dale Rahn wrote: > The logic to handle PMAP_CANFAIL, the logic was inverted originally. > > Code has been simplified so that it is test for if !CANFAIL then panic Looks good, but how about using __func__? Avoids going > 80 in one case. Index: pmap.c

arm64 miniroot and ramdisk hooks for raspberry pi 3

2017-02-11 Thread Jonathan Gray
Unlike the TI sitara/OMAP boot rom the raspberry pi boot rom will fail to read FAT12, the filesystem must be FAT16 or FAT32. These changes require the raspberrypi-firmware port sent to ports@ to build release along with u-boot-aarch64. Index: distrib/arm64/miniroot/Makefile

Re: clang and -Werror vs -Wpointer-sign

2017-02-11 Thread Jonathan Gray
On Wed, Feb 01, 2017 at 10:09:14PM +1100, Jonathan Gray wrote: > On Mon, Jan 30, 2017 at 07:28:03PM +0100, Stefan Kempf wrote: > > Jonathan Gray wrote: > > > Base gcc4 changes the defaults to set -Wno-pointer-sign. > > > Base clang does not, I'm not sure where in the llv

Re: inteldrm: setup backlight pwm alternate increment on backlight enable

2017-02-09 Thread Jonathan Gray
On Thu, Feb 09, 2017 at 06:39:13PM -0600, joshua stein wrote: > I have no idea why there are chickens involved, but this fixes the > problem on at least the MacBookAir7,1 (Broadwell) where upon S3 > resume, the backlight value is treated as 0 or 100 despite reporting > intermediate values, so if

use mac address from fdt on raspberry pi

2017-02-06 Thread Jonathan Gray
The videocore part of the raspberry pi that boots the system and runs the mailbox interface and other functions afterwards knows about a MAC address that appears to be derived from a portion of a unique serial number along with the raspberry pi foundation oui B827EB (base 16)

stop building arm64 kernels with -mcpu=cortex-a57

2017-02-05 Thread Jonathan Gray
Ask for a generic armv8-a encoding rather than one based on and tuned for cortex-a57. Index: Makefile.arm64 === RCS file: /cvs/src/sys/arch/arm64/conf/Makefile.arm64,v retrieving revision 1.4 diff -u -p -r1.4 Makefile.arm64 ---

Re: fix xlockmore build with clang

2017-02-02 Thread Jonathan Gray
On Fri, Feb 03, 2017 at 07:30:17AM +0100, Matthieu Herrb wrote: > On Thu, Feb 02, 2017 at 01:45:36PM +1100, Jonathan Gray wrote: > > Sync some xlockmore files with the 5.50 release to fix build errors > > with clang of the form: > > Sure, ok. > > I remember I had more

fix xserver build on arm64

2017-02-02 Thread Jonathan Gray
Only compile tested. Index: configure === RCS file: /cvs/xenocara/xserver/configure,v retrieving revision 1.63 diff -u -p -r1.63 configure --- configure 11 Oct 2016 22:15:52 - 1.63 +++ configure 2 Feb 2017 06:52:46 -

fix xlockmore build with clang

2017-02-01 Thread Jonathan Gray
Sync some xlockmore files with the 5.50 release to fix build errors with clang of the form: c++ -c -DHAVE_CONFIG_H -DDEF_FILESEARCHPATH=\"/usr/X11R6/share/X11/app-defaults/%N%C%S:/usr/X11R6/share/X11/app-defaults/%N%S\" -I. -I.. -I../.. -I/usr/xenocara/app/xlockmore/xlock/

Re: clang and -Werror vs -Wpointer-sign

2017-02-01 Thread Jonathan Gray
On Mon, Jan 30, 2017 at 07:28:03PM +0100, Stefan Kempf wrote: > Jonathan Gray wrote: > > Base gcc4 changes the defaults to set -Wno-pointer-sign. > > Base clang does not, I'm not sure where in the llvm code to do so. > > Base gcc3 does not handle -Wno-pointer-sign. > &g

clang and -Werror vs -Wpointer-sign

2017-01-28 Thread Jonathan Gray
Base gcc4 changes the defaults to set -Wno-pointer-sign. Base clang does not, I'm not sure where in the llvm code to do so. Base gcc3 does not handle -Wno-pointer-sign. Below is a patch to add -Wno-pointer-sign to places that use use -Werror and trigger -Wpointer-sign warnings which breaks the

Re: network booting efi systems with dhcpd(8)

2017-01-23 Thread Jonathan Gray
On Mon, Jan 23, 2017 at 08:39:17PM +1000, Jonathan Matthew wrote: > For network boot clients, dhcpd(8) can supply a filename for the initial > boot file for the client, which is something like pxeboot (or pxelinux.0). > EFI and BIOS clients need different boot files, though, so the server > needs

Re: usbdevs: logitech: cleanup and new ids

2017-01-22 Thread Jonathan Gray
On Mon, Jan 23, 2017 at 01:56:20AM -0500, James Hastings wrote: > Hello @tech > > Recently found a pile of old Logitech webcams to test with uvideo(4). > s/QUICKCAM/QKCAM. > shorten device strings. > Add many new Logitech device ids. > > dev/usb/usbdevs > dev/usb/uaudio.c > dev/usb/uvideo.c USB

fix BOOTSTRAP_CLANG in mk.conf build

2017-01-21 Thread Jonathan Gray
gnu/usr.bin/clang/Makefile.inc sets CC based on BOOTSTRAP_CLANG, most local llvm Makefiles include bsd.own.mk which picks up mk.conf definitions, these few don't which breaks the build when BOOTSTRAP_CLANG is set in mk.conf instead of the environment. Index: clang/Makefile

allow longer ACPI _HID/_CID strings

2017-01-10 Thread Jonathan Gray
On Hyper-V a 16 byte array isn't large enough for the strings. Scope (\_SB) { Device (GENC) { Name (_CID, "VM_Gen_Counter") // _CID: Compatible ID Name (_HID, "Hyper_V_Gen_Counter_V1") // _HID: Hardware ID Name (_UID, 0x00) // _UID:

Re: Only install relevant "intrinsics" header files

2017-01-06 Thread Jonathan Gray
On Fri, Jan 06, 2017 at 10:31:21PM +0100, Mark Kettenis wrote: > > 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-spec

Re: Only install relevant "intrinsics" header files

2017-01-06 Thread Jonathan Gray
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) hardware. > > ok? Looking at the cmake files there is also a arm_neon.h generated by llvm's tablegen. > > > Index:

Re: Build kernels with -ffreestanding?

2016-12-24 Thread Jonathan Gray
On Sat, Dec 24, 2016 at 05:07:11PM +0100, Mark Kettenis wrote: > > Date: Sat, 24 Dec 2016 00:08:35 +0100 (CET) > > From: Mark Kettenis > > > > We already do this on some architectures, but not on amd64 for > > example. The main reason is that this disables memcpy()

Re: ampintc: fix interrupt acknowledge mask

2016-12-23 Thread Jonathan Gray
On Fri, Dec 23, 2016 at 10:07:03AM +0100, Patrick Wildt wrote: > Hi, > > while looking at OpenBSD/arm64 I had interrupt storm issues. Turns out > the issue is in the interrupt controller code. It's the same controller > as on your typical OpenBSD/armv7 machine. > > If the controller has for

Re: introduce list of clang archs; makefile.cross for arm64

2016-12-18 Thread Jonathan Gray
On Sun, Dec 18, 2016 at 04:14:13PM +0100, Patrick Wildt wrote: > On Mon, Dec 19, 2016 at 02:10:05AM +1100, Jonathan Gray wrote: > > On Sun, Dec 18, 2016 at 03:54:40PM +0100, Patrick Wildt wrote: > > > Hi, > > > > > > I would like to introduce a list of

Re: introduce list of clang archs; makefile.cross for arm64

2016-12-18 Thread Jonathan Gray
On Sun, Dec 18, 2016 at 03:54:40PM +0100, Patrick Wildt wrote: > Hi, > > I would like to introduce a list of architectures that use Clang instead > of gcc. This will probably be helpful for specifying when and when not > to compile libraries for clang and clang itself. Additionally I would >

Re: Add Suunto D6i over FTDI

2016-12-11 Thread Jonathan Gray
On Sun, Dec 11, 2016 at 05:48:02PM +0100, Kristaps Dzonsons wrote: > Hi, > > Enclosed is a one-liner to get my Suunto D6i dive computer (FTDI) > recognised by libdivecomputer, http://www.libdivecomputer.org/. Before > it was just seen as a ugen. > > After: > > port 1 addr 6: full speed, power

Re: [patch]: Support Option ICON 505 3G modem

2016-12-11 Thread Jonathan Gray
On Sun, Dec 11, 2016 at 08:59:36AM +, Piotr Isajew wrote: > Dnia 11.12.2016 Jonathan Gray <j...@jsg.id.au> napisa??/a: > > [...] > >> After plugging in, the modem appears as a mass storage device and > >> it's necessary to issue a SCSI REZERO command to switc

Re: [patch]: Support Option ICON 505 3G modem

2016-12-11 Thread Jonathan Gray
On Sun, Dec 11, 2016 at 08:00:27AM +, Piotr Isajew wrote: > Hi, > > the following makes the Option ICON 505 modem recognizable by > umsm(4). > > After plugging in, the modem appears as a mass storage device and > it's necessary to issue a SCSI REZERO command to switch it to > modem operation

Re: King Jim Portabook

2016-12-10 Thread Jonathan Gray
On Sat, Dec 10, 2016 at 08:33:47PM +0900, Ryan McBride wrote: > 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 previous diff applied. > >

Re: update Mesa to 13.0.2

2016-12-05 Thread Jonathan Gray
On Mon, Dec 05, 2016 at 12:20:59PM +0100, Matthieu Herrb wrote: > On Sun, Dec 04, 2016 at 10:45:34PM +1100, Jonathan Gray wrote: > > cd /usr/xenocara/lib > > ftp https://mesa.freedesktop.org/archive/13.0.2/mesa-13.0.2.tar.gz > > tar zxf mesa-13.0.2.tar.gz > > pat

Re: NULL check before m_freem(9)

2016-11-28 Thread Jonathan Gray
On Mon, Nov 28, 2016 at 12:42:32PM +0100, Martin Pieuchot wrote: > Our m_freem(9) and m_free(9) deal with NULL like free(3), so there's no need > for such checks. > > ok? You missed one in uipc_syscalls.c and there are a few others elsewhere: Index: arch/sgi/dev/if_iec.c

Re: armv7/stand/efiboot: working BOOTAA64.EFI payload

2016-11-23 Thread Jonathan Gray
On Wed, Nov 23, 2016 at 08:50:56PM -0500, Ian Sutton wrote: > On Wed, Nov 23, 2016 at 05:48:27PM -0700, Theo de Raadt wrote: > > > I am assuming that arch/aarch64 > > > > There should be no such thing. > > > > This game of calling things 5 names has to stop. > > I'm equally irritated and would

Re: use DRM_IOCTL_GET_PCIINFO in libdrm

2016-11-22 Thread Jonathan Gray
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> > > > > Support libdrm functions required for Mesa versions >= 13. > > > > On linux this informati

Re: add a new DRM_IOCTL_GET_PCIINFO ioctl

2016-11-22 Thread Jonathan Gray
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> > > > > To pull pci information from the kernel for drm devices we need a common > > drm ioctl. This is a re

Re: kill rtioctl()

2016-11-21 Thread Jonathan Gray
On Mon, Nov 21, 2016 at 10:35:58AM +0100, Martin Pieuchot wrote: > This stub exists since the original import, time to kill it? ok jsg@ There was a #ifndef COMPAT_43 here added in '88 and removed in '93 for back when there was no routing socket. ifndef removed in commit

Re: pine64: working bootloader

2016-11-19 Thread Jonathan Gray
On Thu, Nov 17, 2016 at 04:25:14AM -0500, Ian Sutton wrote: > (resending as list seemed to eat my last mail) > > Hi, > > I've got a natively-built bootloader working on the pine64 boards > generously donated to the foundation. Simply dd(1) the following image > directly to a uSD card, insert it,

use DRM_IOCTL_GET_PCIINFO in libdrm

2016-11-19 Thread 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 nodes are handled, render and control nodes which we don't have aren't. This also only

add a new DRM_IOCTL_GET_PCIINFO ioctl

2016-11-19 Thread 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 this is added via pciio.h at kettenis' suggestion. The ioctl number reuses that of

Re: [PATCH] fix typo in vmt.c

2016-11-08 Thread Jonathan Gray
On Tue, Nov 08, 2016 at 05:03:32PM -0800, Bryan Vyhmeister wrote: > I noticed a typo in sys/dev/pv/vmt.c. > > Bryan There is a typo in your patch. > > > Index: sys/dev/pv/vmt.c > === > RCS file: /cvs/src/sys/dev/pv/vmt.c,v >

swofp_flow_timeout() use after free

2016-10-27 Thread Jonathan Gray
swofp_flow_entry_delete -> swofp_flow_entry_free -> free(swfe) Index: switchofp.c === RCS file: /cvs/src/sys/net/switchofp.c,v retrieving revision 1.16 diff -u -p -U10 -r1.16 switchofp.c --- switchofp.c 23 Oct 2016 11:56:51 -

Re: request for test: mfii

2016-10-25 Thread Jonathan Gray
On Tue, Oct 25, 2016 at 05:29:55PM +0900, YASUOKA Masahiko wrote: > Hi, > > I'm working on making mfii(4) bio(4) capable. > > If you have a machine which has mfii(4), I'd like you to test the diff > following. (It might be risky for production machines for this > moment.) > > After the diff

fix ILP32 switch(4) build

2016-10-21 Thread Jonathan Gray
/usr/src/sys/net/switchofp.c: In function 'swofp_ox_cmp_ether_addr': /usr/src/sys/net/switchofp.c:1758: warning: integer constant is too large for 'long' type /usr/src/sys/net/switchofp.c: In function 'swofp_ox_match_ether_addr': /usr/src/sys/net/switchofp.c:2746: warning: integer constant is too

add c11 static_assert definition to assert.h

2016-10-16 Thread Jonathan Gray
I encountered static_assert when trying to build an optional part of a newer version of Mesa with clang. Definition taken from FreeBSD. Index: sys/sys/cdefs.h === RCS file: /cvs/src/sys/sys/cdefs.h,v retrieving revision 1.39 diff -u

Re: libGLw/libexpoy: generate pkg-config files during build

2016-10-08 Thread Jonathan Gray
On Fri, Oct 07, 2016 at 09:02:38PM +0200, Martin Natano wrote: > Generate the pkg-config files at build time, otherwise we might run into > permission issues with noperm release builds. While there properly clean > up glw.pc. Ok? Matches the changes you made to libz etc a few weeks ago so should

Re: armv7 pinmux woes

2016-10-06 Thread Jonathan Gray
On Thu, Oct 06, 2016 at 04:43:09AM -0400, Ian Sutton wrote: > On Wed, Oct 05, 2016 at 12:40:42AM -0400, Ian Sutton wrote: > > My driver needs to recognize cases where the root disk is MMC1 and abort > > as to avoid hanging the system when the kernel tries to init userspace > > on a disk it is no

Re: clang dev/pv/hyperv.c

2016-10-04 Thread Jonathan Gray
On Sat, Sep 24, 2016 at 07:05:54PM +0200, Mark Kettenis wrote: > Another obvious mistake caught by clang. > > ok? ok jsg@ > > > Index: dev/pv/hyperv.c > === > RCS file: /cvs/src/sys/dev/pv/hyperv.c,v > retrieving revision 1.16 >

larger bus width for ommmc(4)

2016-10-02 Thread Jonathan Gray
Only set the highspeed bit in bus_clock if highspeed is supported by the controller. Needed as the bus_clock callback is called with SDMMC_TIMING_HIGHSPEED even if the capability is not set. Required to raise the bus width on pandaboard which doesn't have the highspeed capability. As anything

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

2016-10-01 Thread Jonathan Gray
On Sat, Oct 01, 2016 at 03:48:35PM +0200, Mark Kettenis wrote: > 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.

Re: Some arm cleanups suggested by clang

2016-09-23 Thread Jonathan Gray
On Fri, Sep 23, 2016 at 01:43:04PM +0200, Mark Kettenis wrote: > 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

correct option listing in switchd(8)

2016-09-23 Thread Jonathan Gray
Sync the option list with reality. Don't document the internal -I and -P options that set the instance number and title on purpose. Index: switchd.8 === RCS file: /cvs/src/usr.sbin/switchd/switchd.8,v retrieving revision 1.1 diff -u

Re: fec(4) mii_tick

2016-09-21 Thread Jonathan Gray
On Wed, Sep 21, 2016 at 02:23:57PM +0200, Mark Kettenis wrote: > > 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 tha

Re: Division by zero in ehci(4)

2016-09-19 Thread Jonathan Gray
On Mon, Sep 19, 2016 at 11:47:40AM +0200, Martin Pieuchot wrote: > On 19/09/16(Mon) 14:20, Jonathan Gray wrote: > > On Sat, Sep 17, 2016 at 04:36:12PM +0200, Martin Pieuchot wrote: > > > One of the non-checked value read from an untrusted descriptor is the > >

Re: Division by zero in ehci(4)

2016-09-18 Thread Jonathan Gray
On Sat, Sep 17, 2016 at 04:36:12PM +0200, Martin Pieuchot wrote: > One of the non-checked value read from an untrusted descriptor is the > "maximum packet size" of an endpoint. If a device reports an incorrect > value most of our HC drivers wont work and if this value is 0 ehci(4) > will crash

Re: arm assembly syntax

2016-09-18 Thread Jonathan Gray
On Sun, Sep 18, 2016 at 12:04:48PM +0200, Mark Kettenis wrote: > 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.

Re: fix clang types on arm

2016-09-17 Thread Jonathan Gray
On Fri, Sep 16, 2016 at 09:04:58PM +0200, Mark Kettenis wrote: > 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,

Re: clang makefiles for arm

2016-09-17 Thread Jonathan Gray
On Fri, Sep 16, 2016 at 08:23:27PM +0200, Mark Kettenis wrote: > 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? ok

OMAP4/5 Wake-up generator driver

2016-09-14 Thread Jonathan Gray
It turns out on OMAP4/OMAP5 there is a "Wake-up generator" interrupt controller that routes interrupts to the GIC and does power management comparable to imx with the i.MX6 General Power Controller (GPC). / { #address-cells = <0x0001>; #size-cells = <0x0001>; compatible =

Re: arm: store curcpu pointer in thread id register

2016-09-02 Thread Jonathan Gray
On Sat, Feb 27, 2016 at 05:03:46PM +0100, Patrick Wildt wrote: > On Fri, Feb 26, 2016 at 08:59:41PM -0800, Philip Guenther wrote: > > On Sat, Feb 20, 2016 at 1:49 PM, Patrick Wildt wrote: > > > since ARMv6 the coprocessor provides special registers to store software > > >

Re: switch the cubie miniroot to cubieboard2

2016-08-31 Thread Jonathan Gray
On Wed, Aug 31, 2016 at 07:26:27AM -0400, Ted Unangst wrote: > Jonathan Gray wrote: > > Now that the A20 works it likely makes sense to switch > > the cubie miniroot from the A10 based cubieboard1 to the A20 > > based cubieboard2 which more people seem to have? > >

switch the cubie miniroot to cubieboard2

2016-08-31 Thread Jonathan Gray
Now that the A20 works it likely makes sense to switch the cubie miniroot from the A10 based cubieboard1 to the A20 based cubieboard2 which more people seem to have? Index: distrib/armv7/miniroot/cubie/Makefile === RCS file:

Re: Use UWXN on armv7 when possible

2016-08-24 Thread Jonathan Gray
On Thu, Aug 25, 2016 at 12:49:45AM +0200, Mark Kettenis wrote: > So enabling full hardware-enforced W^X is perhaps a bit to much at > this moment. But enabling the bit that enforces that the kernel > cannot execute pages that are writable by userland should be fine. > The diff does this on all

Re: dev/i2c: nxptda(4)

2016-08-22 Thread Jonathan Gray
On Tue, Aug 23, 2016 at 12:44:03AM -0400, Ian Sutton wrote: > On Fri, Aug 19, 2016 at 03:02:34PM +1000, Jonathan Gray wrote: > > On Fri, Aug 19, 2016 at 02:38:32PM +1000, Jonathan Gray wrote: > > > On Thu, Aug 18, 2016 at 04:34:38PM -0400, Ian Sutton wrote: > > > >

Re: dev/i2c: nxptda(4)

2016-08-18 Thread Jonathan Gray
On Fri, Aug 19, 2016 at 02:38:32PM +1000, Jonathan Gray wrote: > On Thu, Aug 18, 2016 at 04:34:38PM -0400, Ian Sutton wrote: > > On Sat, Aug 06, 2016 at 04:26:27AM -0400, Ian Sutton wrote: > > > Interestingly, the am335x SoC does not have a HDMI/DP/etc transmitter on > >

Re: dev/i2c: nxptda(4)

2016-08-18 Thread Jonathan Gray
On Thu, Aug 18, 2016 at 04:34:38PM -0400, Ian Sutton wrote: > On Sat, Aug 06, 2016 at 04:26:27AM -0400, Ian Sutton wrote: > > Interestingly, the am335x SoC does not have a HDMI/DP/etc transmitter on > > silicon -- the BBB has its LCDC pins wired to a TDA19988 HDMI > > transmitter which is

Re: Make Cortex-A7 go fast

2016-08-14 Thread Jonathan Gray
On Sun, Aug 14, 2016 at 01:20:04PM +0200, Mark Kettenis wrote: > > Date: Sun, 14 Aug 2016 14:48:59 +1000 > > From: Jonathan Gray <j...@jsg.id.au> > > > > On Sat, Aug 13, 2016 at 08:26:30PM +0200, Mark Kettenis wrote: > > > On Cortex-A7 there is a

Re: Make Cortex-A7 go fast

2016-08-13 Thread Jonathan Gray
On Sat, Aug 13, 2016 at 08:26:30PM +0200, Mark Kettenis wrote: > On Cortex-A7 there is a magic SMP bit in the Auxiliary Control > Register that "Enables coherent requests to the processor". The > Cortex-A7 Technical Reference Manual mentions that: > > When coherent requests are disabled: > >

Re: armv7/sxipio ofw_gpio

2016-08-10 Thread Jonathan Gray
On Thu, Aug 11, 2016 at 05:41:35AM +0300, Artturi Alm wrote: > Hi, > > what's the plan for solving ordering issues for these devices? > could this be attached 'manually' from sunxi_platform_init_mainbus() or > something? What's acceptable? > I'd like to have this for carddetect before moving

Re: armv7 and unified TLBs

2016-08-02 Thread Jonathan Gray
On Tue, Aug 02, 2016 at 01:43:10PM +0200, Mark Kettenis wrote: > > Date: Tue, 2 Aug 2016 02:02:57 +1000 > > From: Jonathan Gray <j...@jsg.id.au> > > Adding back tech@ just in case a knwoledgable person there wants to > chime in... > > > On Mon, Aug 01, 201

Re: Style update for some files in arch/arm

2016-07-31 Thread Jonathan Gray
On Thu, Jul 28, 2016 at 10:31:35AM -0400, Robert Tate wrote: > I found a few files that could use updated function declarations. Here > is my diff: Thanks, committed without the comment removal portion. One issue per diff (and other files have the "End of foo.c" comment).

Re: armv7 diff for testing

2016-07-20 Thread Jonathan Gray
On Thu, Jul 21, 2016 at 12:38:35PM +1000, Jonathan Gray wrote: > On Wed, Jul 20, 2016 at 10:24:11PM -0300, Daniel Bolgheroni wrote: > > On Wed, Jul 13, 2016 at 11:39:54AM +0200, Mark Kettenis wrote: > > > The diff below removes the last board ID dependent code for the i.

Re: armv7 diff for testing

2016-07-20 Thread Jonathan Gray
On Wed, Jul 20, 2016 at 10:24:11PM -0300, Daniel Bolgheroni wrote: > On Wed, Jul 13, 2016 at 11:39:54AM +0200, Mark Kettenis wrote: > > The diff below removes the last board ID dependent code for the i.MX6 > > platform. It affects all boards that use a Micrel PHY, which would > > show up as

Re: sxitimer(4) fixes

2016-07-18 Thread Jonathan Gray
On Mon, Jul 18, 2016 at 02:41:10PM +0200, Mark Kettenis wrote: > Currently on my Olimex A10s-Olinuxino Micro, the kernel hangs after > printing: > > simplebus0 at mainbus0: "soc" > sxiuart0 at simplebus0 > sxie0 at simplebus0, address 02:d3:08:c1:74:6f > sxiuart1 at simplebus0: console > sxiuart2

Re: u-boot ffs supp.

2016-07-18 Thread Jonathan Gray
On Mon, Jul 18, 2016 at 12:25:27PM +0200, Mark Kettenis wrote: > > Date: Mon, 18 Jul 2016 11:52:15 +0300 > > From: Artturi Alm > > > > iHi, > > > > optimistic as always, this would be one item off the list making me own > > this shit.:) octeon might benefit also, but

Re: Patch for Atheros AR8161/AR8162/AR8171/AR8172 chipsets

2016-07-17 Thread Jonathan Gray
On Sun, Jul 17, 2016 at 10:52:33PM -0400, Jason Hunt wrote: > Below is a patch to add support for Atheros AR8161, AR8162, AR8171, and > AR8172 chipsets. A version of this was originally submitted by Atanas > Vladimirov in early 2015 (see reference below) but never merged, so I > have updated it

set armv7 cpufuncs based on cpuid

2016-07-16 Thread Jonathan Gray
Implementing the cp15 mmfr register with cpuid information is mandatory for armv7 implementations (including armv8 aarch32 which uses the same vmsa bits). Set cpufuncs based on this instead of an ever growing list of cortex A midr values. Index: arm/cpufunc.c

Re: remove board_id use in prcm and omgpio

2016-07-16 Thread Jonathan Gray
On Sat, Jul 16, 2016 at 04:07:23PM +1000, Jonathan Gray wrote: > prcm and omgpio have to attach early so we can't easily test > against the right fdt node without searching the entire > tree. The following uses the compatible property of the root > node to decide how to set the funct

remove board_id use in prcm and omgpio

2016-07-16 Thread Jonathan Gray
prcm and omgpio have to attach early so we can't easily test against the right fdt node without searching the entire tree. The following uses the compatible property of the root node to decide how to set the function pointers instead of board ids. The beaglebone specific pad configuration in

pinctrl for am335x

2016-07-15 Thread Jonathan Gray
Following on from kettenis' pinctrl changes in imx here is a diff to pull the pad configuration data from fdt for am335x. Initially I had this as a different driver that attached to the pinmux child of the scm node in the fdt but that prevented the manual table driven gpio pad configuration. So

Re: armv7/imx: imxpcie(4) driver & device tree problem

2016-07-14 Thread Jonathan Gray
On Thu, Jul 14, 2016 at 11:34:05AM +0200, Mark Kettenis wrote: > > Date: Thu, 14 Jul 2016 17:53:22 +1000 > > From: Jonathan Gray <j...@jsg.id.au> > > > > On Thu, Jul 14, 2016 at 03:20:34AM -0400, Ian Sutton wrote: > > > I am working on a MD

Re: armv7/imx: imxpcie(4) driver & device tree problem

2016-07-14 Thread Jonathan Gray
On Thu, Jul 14, 2016 at 03:20:34AM -0400, Ian Sutton wrote: > I am working on a MD PCI-E driver for the armv7/imx platform. It > attaches via FDT/simplebus, ascertaining its physical memory addresses > from the fdt structure originating from the dtb files present on the > msdos bootloader

Re: device attachment glue code

2016-07-11 Thread Jonathan Gray
On Sun, Jul 10, 2016 at 09:12:03PM +0200, Mark Kettenis wrote: > Currently the armv7 port has several bits ehci(4) glue code. > Basically there is one of these for every SoC platform that we > support. I converted the glue for the i.MX6 platform to use the FDT > and that works fine. However,

Re: fdt/ofw phandle lookup functions

2016-07-08 Thread Jonathan Gray
On Fri, Jul 08, 2016 at 10:11:49PM +0200, Patrick Wildt wrote: > On Fri, Jul 08, 2016 at 09:56:46PM +0200, Mark Kettenis wrote: > > FDTs use phandles as a way to have pointers to nodes in the tree. For > > example, nodes may have an "interrupt-parent" property that contains a > > phandle that

Re: [armv7] introducing tipru(4)

2016-07-04 Thread Jonathan Gray
On Tue, Jul 05, 2016 at 01:39:18AM -0400, Ian Sutton wrote: > On Mon, Jul 4, 2016 at 10:30 PM, Jonathan Gray <j...@jsg.id.au> wrote: > > Lack of fdt use aside, we don't want to enable something that > > allows userspace access to system memory like this. > > I can under

use cpsw mac address and phy id from fdt

2016-06-26 Thread Jonathan Gray
With cpsw being a switch getting the port config isn't as straightforward as fec. We only handle the first port at the moment, though the following diff fetches settings that might be helpful were we to support a second. To give an idea of what the fdt looks like here are the cpsw nodes

Re: rtl8152 usb ethernet driver

2016-06-26 Thread Jonathan Gray
On Sun, Jun 26, 2016 at 10:09:05PM +1000, Jonathan Matthew wrote: > I recently picked up a cheap Cherry View based mini-pc and found its onboard > RTL8152 (usb) ethernet wasn't supported, so I ported ure(4) from freebsd. > > I'm fairly sure there are some endianness issues, but I can't test on a

Re: [PATCH] fix xenocara build failure

2016-06-16 Thread Jonathan Gray
Someone else saw this with a git mirror as well. Yet it works fine for all of us pulling the sources from cvs... On Thu, Jun 16, 2016 at 02:23:23PM +0100, Dimitris Papastamos wrote: > Hi, > > I am seeing a build failure on -current when I build xenocara. I've > already built /usr/src so that's

Re: armv7 / efi failure on imx6q SabreLite

2016-06-14 Thread Jonathan Gray
On Tue, Jun 14, 2016 at 08:29:09AM +0200, Matthieu Herrb wrote: > On Mon, Jun 13, 2016 at 12:43:59PM +0200, Mark Kettenis wrote: > > > Date: Sun, 12 Jun 2016 19:48:24 +0200 > > > From: Matthieu Herrb > > > > > > Hi, > > > > > > I'm trying to convert my SabreLite board to boot

<    1   2   3   4   5   6   7   8   9   >