Commit Graph

259615 Commits

Author SHA1 Message Date
jmcneill
a4c07ed004 dwcmmc: set ciu clock rate rather than assuming fixed input rate 2018-06-19 22:44:33 +00:00
uwe
13f76e26c2 When E6 signature is checked, ignore pressed buttons. 2018-06-19 21:47:28 +00:00
uwe
cd9108c6ed Use PMS_SEND_DEV_STATUS for E9 instead of PMS_GET_SCALE (also defined
as E9).  This is more readable and is congruent with other drivers.
Same object code is generated.
2018-06-19 21:21:04 +00:00
jdolecek
18191e00de actually Xen XSAVE support itself is bigger deal than the AVX alone, so mention
that more prominently
2018-06-19 19:57:45 +00:00
jdolecek
d213fd807f note the Xen AVX fix 2018-06-19 19:53:42 +00:00
jdolecek
9f41b66436 fix FPU initialization on Xen to allow e.g. AVX when supported by hardware;
only use XSAVE when the the CPUID OSXSAVE bit is set, as this seems to be
reliable indication

tested with Xen 4.2.6 DOM0/DOMU on Intel CPU, without and with no-xsave flag,
so should work also on those AMD CPUs, which have XSAVE disabled by default;
also tested with Xen DOM0 4.8.3

fixes PR kern/50332 by Torbjorn Granlund; sorry it took three years to address

XXX pullup netbsd-8
2018-06-19 19:50:19 +00:00
jmcneill
7a2303fd1d Install RK3328 .dtb files to the correct location 2018-06-19 15:13:51 +00:00
jmcneill
81171f787d Increase reserved space at start of image from 4MB to 16MB to make room
for Rockchip bootloaders.
2018-06-19 15:12:05 +00:00
jmcneill
14738837cf Use symbolic names for chip revision. NFC. 2018-06-19 10:36:41 +00:00
maxv
f9e8f3a48f When using EagerFPU, create the fpu state in execve at IPL_HIGH.
A preemption could occur in the middle, and we don't want that to happen,
because the context switch would use the partially-constructed fpu state.

The procedure becomes:

	splhigh
	unbusy the current cpu's fpu
	create a new fpu state in memory
	install the state on the current cpu's fpu
	splx

Disabling preemption also ensures that x86_fpu_eager doesn't change in
the middle.

In LazyFPU mode we drop IPL_HIGH right away.

Add more KASSERTs.
2018-06-19 09:25:13 +00:00
gson
036399b6f4 No semicolon after macro do ... while (0) wrapper. 2018-06-19 09:20:46 +00:00
maxv
c6e8e773a7 Explicitly clear l2's pcb_fpcpu when forking.
A context switch (preemption) could occur between

	fpusave_lwp(l1, true);
and
	memcpy(pcb2, pcb1, sizeof(struct pcb));

In this case, l1's FPU state is re-installed on the current CPU, and
pcb1->pcb_fpcpu becomes non NULL. While it's fine to have l1's state
installed, we don't want to indicate l2's state is installed too.

With lazy fpu this was not a problem, because the context-switch would
not re-install the state, so pcb1->pcb_fpcpu was NULL.

Should fix PR/53383.
2018-06-19 07:23:44 +00:00
msaitoh
c838c9bb48 Regen. 2018-06-19 05:14:36 +00:00
msaitoh
08d559b1e2 All of 88E151[0248]'s model number is 0x001d. 2018-06-19 05:14:16 +00:00
thorpej
31877e2554 Sigh, fix another stupid mistake in previous that squeaked by because,
again, I booted the wrong test kernel.
2018-06-19 04:10:51 +00:00
thorpej
4081e2be7c Use the device_compatible_entry mechanism rather than of_compat_data;
all of the OF / FDT data we need is already in the i2c_attach_args.
2018-06-19 02:08:12 +00:00
jmcneill
ded90cc051 rk_cru_composite_set_rate: allow selection of parent clocks in different
domains
2018-06-19 01:24:17 +00:00
jmcneill
73ce40490c Write MAC address high register before low register. Apparently the
hardware updates the filter when the low register is written.
2018-06-18 23:50:35 +00:00
pgoyette
b1b8d8175c The whole point of my recent addition of the specificdata(9) man page
was so it could be cross-referenced here.  So, add the xref.
2018-06-18 23:40:14 +00:00
jmcneill
d65d289e05 Clear IFF_RUNNING | IFF_OACTIVE when stopping interface. 2018-06-18 22:57:18 +00:00
maxv
5e51f3eb96 Add more KASSERTs, see if they help PR/53383. 2018-06-18 20:20:27 +00:00
christos
a2ee17b347 Keep things portable (requested by joerg) by not depending on reallocarr
and instead doing the overflow check ourselves.
2018-06-18 18:33:31 +00:00
thorpej
4f9e5a443e - Rename iic_compat_match() to iic_compatible_match() and change it
to use the new device_compatible_match() routine.  A pointer to
  the matching device_compatible_entry is returned if a match is
  found.
- Adjust iic_use_direct_match() accordingly.
- i2c drivers now provide device_compatible_entry tables when performing
  direct-config matching.
- In the dsrtc driver, take advantage of this new capability to greatly
  simplify model selection.

(I'm coming for you next, of_compat_data...)
2018-06-18 17:07:07 +00:00
thorpej
bd0f6c9df4 Fix a silly mistake in device_compatible_entry_matches() that I made
while re-factoring this from a prior version.

(I booted the wrong kernel when testing, oops.)
2018-06-18 16:31:42 +00:00
thorpej
3afafc8ac9 Add device_compatible_match(), a generalized routine for weighted
matching of device_compatible_entry data to a device's "compatible"
strings.
2018-06-18 15:36:54 +00:00
christos
8adf28c539 Prevent shell execution also in the 'r ! dobad' case, pointed out by
Martijn van Duren, thanks!

XXX: pullup-8
2018-06-18 14:56:24 +00:00
jmcneill
0c9686a5ea Pull in opt_bootconfig.h for DRAM_BLOCKS 2018-06-18 13:05:20 +00:00
jakllsch
aaa141ed7e Bail early if gttwsi_send_start() fails in gttwsi_initiate_xfer() to
avoid unexpected state error message later (on Allwinner H5).
2018-06-18 12:42:29 +00:00
yamaguchi
d07cf51439 Fix to aquire pppoe_softc_list_lock before read and write the list
ok by knakahara@n.o
2018-06-18 09:53:45 +00:00
yamaguchi
f3b1425400 Fix not to use PPPOE_UNLOCK before acccess to pppoe_softc
to avoid a race condition

According to the locking order of pppoe(4), the access to
pppoe_softc has to follow 5 steps as below.

1. aquire pppoe_softc_list_lock
2. aquire pppoe_softc lock
3. release pppoe_softc_list_lock
4. access to pppoe_softc
5. release pppoe_softc lock

However, pppoe_dispatch_disc_pkt() releases the lock of pppoe_softc
temporarily, and then re-aquires it before step 4 of the adove. So,
it is possible for other contexts to destroy a pppoe_softc in the
interim.
To fix this condition, avoid PPPOE_UNLOCK with the problem.

ok by knakahara@n.o
2018-06-18 09:49:05 +00:00
msaitoh
67058b4b65 - All of Marvell PHY's registers from addr 0x0 to 0xf conforms IEEE 802.3
specification, so those register definitions are not required. Use mii.h's
 definitions. Note that E1000_ER_PAR_DETECT_FAULT should be 0x0010 instead of
 0x0100(typo).
- Restore code for BMCR_ISO which was removed in makphy.c rev. 1.44
- Whitespace fix.
2018-06-18 09:12:17 +00:00
msaitoh
9731950d5a - Rename ENP (Extended Next Page) to XNP.
- Add ANLPAR_XNP bit.
- Add definitions for RF1 and RF2 (for 1000BASE-X) .
- Rename MII_ANNP (Autonegotiation next page transmit) register to MII_ANNPT.
- Add bit definitions for MII_ANNPT and MII_ANLPRNP.
- Remove GTSR_LP_ASM_DIR bit. This is not described in the 802.3 spec now and
  no any NetBSD drivers use the definition.
2018-06-18 09:11:03 +00:00
maxv
3d11b4857e todo list for kaslr, with the issues I can think of right now 2018-06-18 06:09:56 +00:00
eadler
9a101e13fe sysctl.7: fix speeling mistake 2018-06-18 02:57:51 +00:00
eadler
8b7a64b270 queue.3: deduplicate deduplicate a a word word 2018-06-18 02:48:56 +00:00
christos
d8a64f1e46 The compat build plays games with MAKEOBJDIR and unsets MAKEOBJDIRPREFIX.
Keep using our standard NETBSDOBJDIR if it was set.
2018-06-17 23:37:22 +00:00
jmcneill
a1732b7c73 Simplify gtmr_delay and don't mix and match usage of the physical and
virtual timers (always use the virtual timer).
2018-06-17 22:42:41 +00:00
alnsn
9b45ca3d85 Current sljit version is r381. 2018-06-17 18:10:18 +00:00
kre
765ad10c6a NFC: correct typo in a comment. 2018-06-17 17:19:06 +00:00
maxv
d7e7c07f10 i586 and below don't have this 3-byte nop, so use three 1-byte nops,
reported by Nathanial Sloss
2018-06-17 15:46:39 +00:00
thorpej
2ba73bcf32 Add slightly-more generalized version of the "of_compat_data" structure
called "device_compatible_entry".  It performs a similar function, but
instead of one "compatible" string per entry, it takes an array of
"comaptible" strings per entry.  Also included are macros for initializing
an array of these entries and accessing data embedded in them.
2018-06-17 15:06:27 +00:00
thorpej
6ffcc72460 Fix compilation error pointed out by nishimura@. 2018-06-17 14:50:54 +00:00
jmcneill
62d94959b4 Make gate enable/disable logic easier to read. NFC. 2018-06-17 14:48:15 +00:00
jmcneill
69e07b1e4f Avoid calling bus_dmamap_sync with len=0 2018-06-17 13:12:25 +00:00
jmcneill
05a266f0d1 Fix soft reset logic 2018-06-17 11:52:38 +00:00
maxv
38a9944369 Enable eager fpu automatically at boot time if the cpu is affected. Intel
hasn't published a list of its affected products, but it appears that Xen
was given this information since they have a specific detection code.

We could just unconditionally enable eager; but on x86_32 eager may have
a greater performance cost than lazy, and we don't want to lose
performance on unaffected (and ~old) CPUs running NetBSD/i386.

So use the same code as Xen: take Family 6, and whitelist certain models.
2018-06-17 07:13:02 +00:00
maxv
215b7bbcb9 No, I meant to put the panic in fpudna not fputrap. Also appease it: panic
only if the fpu already has a state. We're fine with getting a DNA, what
we're not fine with is if the DNA is received while the FPU is busy.

I believe (even though I couldn't trigger it) that the panic would
otherwise fire if PT_SETFPREGS is used. And also ACPI sleep/wakeup,
probably.
2018-06-17 06:03:40 +00:00
thorpej
1de0c2e2c3 Oops, another one. 2018-06-17 01:08:15 +00:00
thorpej
81d957210f Remove now-unused variable. 2018-06-17 01:07:06 +00:00
jmcneill
89ceabbe77 Enable gpio reset logic 2018-06-17 00:33:05 +00:00