Commit Graph

2442 Commits

Author SHA1 Message Date
skrll
4e8e66439e Merge nick-nhusb
- API / infrastructure changes to support memory management changes.
- Memory management improvements and bug fixes.
- HCDs should now be MP safe
- conversion to KERNHIST based debug
- FS/LS isoc support on ehci(4).
- conversion to kmem(9)
- Some USB 3 support - mostly from Takahiro HAYASHI (t-hash).
- interrupt transfers now get proper DMA operations
- general bug fixes
    - kern/48308
    - uhub status notification improvements
    - umass(4) probe fix (applied to HEAD already)
    - ohci(4) short transfer fix
2016-04-23 10:15:27 +00:00
joerg
daac313960 clang now supports normal soft float. 2016-02-27 21:48:34 +00:00
christos
256dd10e5c PR/50858: David Binderman: Remove redundant code. 2016-02-26 18:17:39 +00:00
dholland
a33f4fbcc2 Add missing va_end, from David Binderman in PR 50798. 2016-02-14 18:12:30 +00:00
dholland
e9150352cd Add missing va_end; PR 50795 from David Binderman. 2016-02-14 18:07:49 +00:00
ozaki-r
9c4cd06355 Introduce softint-based if_input
This change intends to run the whole network stack in softint context
(or normal LWP), not hardware interrupt context. Note that the work is
still incomplete by this change; to that end, we also have to softint-ify
if_link_state_change (and bpf) which can still run in hardware interrupt.

This change softint-ifies at ifp->if_input that is called from
each device driver (and ieee80211_input) to ensure Layer 2 runs
in softint (e.g., ether_input and bridge_input). To this end,
we provide a framework (called percpuq) that utlizes softint(9)
and percpu ifqueues. With this patch, rxintr of most drivers just
queues received packets and schedules a softint, and the softint
dequeues packets and does rest packet processing.

To minimize changes to each driver, percpuq is allocated in struct
ifnet for now and that is initialized by default (in if_attach).
We probably have to move percpuq to softc of each driver, but it's
future work. At this point, only wm(4) has percpuq in its softc
as a reference implementation.

Additional information including performance numbers can be found
in the thread at tech-kern@ and tech-net@:
http://mail-index.netbsd.org/tech-kern/2016/01/14/msg019997.html

Acknowledgment: riastradh@ greatly helped this work.
Thank you very much!
2016-02-09 08:32:07 +00:00
christos
2f34b929f6 use __register_t 2016-01-24 20:02:38 +00:00
christos
2b7829fe47 expose __register32_t for frame.h 2016-01-24 19:49:35 +00:00
christos
d84c286204 expose the kernel types for standalone code. 2016-01-23 22:31:19 +00:00
christos
4d497c90e6 Hide {p,v}{addr,size}_t and register_t (and a couple more types that
are machine-specific) from userland unless _KERNEL/_KMEMUSER and a
new _KERNTYPES variables is defined. The _KERNTYPES should be fixed
for many subsystems that should not be using it (rump)...
2016-01-23 21:22:13 +00:00
christos
df13a573b0 PR/50685: David Binderman: fix memory leak 2016-01-21 17:14:05 +00:00
christos
522db2ab36 move fenv inside ifdef 2015-12-25 06:02:10 +00:00
christos
408e0ea0a3 remove dup definitions from fenv.h 2015-12-22 05:28:46 +00:00
christos
257ef94e95 Add mips fenv.h (From FreeBSD) 2015-12-21 17:02:32 +00:00
christos
ec195e5a37 Add fenv.h for powerpc (from FreeBSD) 2015-12-20 16:23:14 +00:00
pgoyette
1d2807e4ae Remove SYSVSHM-specific code. The value of shminfo.shmall is zero at
the time this pmap initialization code is called, so the increment is
a no-op.  (Thanks christos@ for pointing it out.)
2015-11-05 06:26:15 +00:00
msaitoh
605f564f52 PCI Extended Configuration stuff written by nonaka@:
- Add PCI Extended Configuration Space support into x86.
- Check register offset of pci_conf_read() in MD part. It returns (pcireg_t)-1
  if it isn't accessible.
- Decode Extended Capability in PCI Extended Configuration Space.
  Currently the following extended capabilities are decoded:
   - Advanced Error Reporting
   - Virtual Channel
   - Device Serial Number
   - Power Budgeting
   - Root Complex Link Declaration
   - Root Complex Event Collector Association
   - Access Control Services
   - Alternative Routing-ID Interpretation
   - Address Translation Services
   - Single Root IO Virtualization
   - Page Request
   - TPH Requester
   - Latency Tolerance Reporting
   - Secondary PCI Express
   - Process Address Space ID
   - LN Requester
   - L1 PM Substates
  The following extended capabilities are not decoded yet:
   - Root Complex Internal Link Control
   - Multi-Function Virtual Channel
   - RCRB Header
   - Vendor Unique
   - Configuration Access Correction
   - Multiple Root IO Virtualization
   - Multicast
   - Resizable BAR
   - Dynamic Power Allocation
   - Protocol Multiplexing
   - Downstream Port Containment
   - Precision Time Management
   - M-PCIe
   - Function Reading Status Queueing
   - Readiness Time Reporting
   - Designated Vendor-Specific
2015-10-02 05:22:49 +00:00
christos
5020ab68d5 Provide access to pc/sp/syscall-return registers like we have for mcontext 2015-09-15 15:49:02 +00:00
skrll
5cfbd3ac2e Trailing whitespace 2015-09-11 06:55:56 +00:00
skrll
0363056b47 Fix up USBMODE registers in sc_vendor_init functions and not in the ehci
driver.
2015-09-11 06:51:43 +00:00
pooka
01d7ebdd80 Fix PTHREAD_FOO_INITIALIZER for C++ by not using volatile in the relevant
pthread types in C++ builds, attempt 2.

The problem with attempt 1 was making assumptions of what the MD
__cpu_simple_lock_t (declared volatile) looks like.  To get a same type
except non-volatile, we change the MD type to __cpu_simple_lock_nv_t
and typedef __cpu_simple_lock_t as a volatile __cpu_simple_lock_nv_t.
IMO, __cpu_simple_lock_t should not be volatile at all, but changing it
now is too risky.

Fixes at least Rumprun w/ gcc 5.1/5.2.  Furthermore, the mpd application
(and possibly others) will no longer require NetBSD-specific patches.

Tested: build.sh for i386, Rumprun for x86_64 w/ gcc 5.2.

Based on the patch from Christos in lib/49989.
2015-08-27 12:30:50 +00:00
uebayasi
db0ac56ebf Define ${LINKSCRIPT} in one place. 2015-08-24 14:04:24 +00:00
uebayasi
ce93b3da57 Don't mention stab and DWARF sections, because these (poorly mtaintained)
lists only help to make them harder to read.

If those sections are found in inputs, they simply appear in outputs as
orphaned sections, sorted by section types and attributes.
2015-08-24 08:13:07 +00:00
uebayasi
220951d1d4 I bet setting search-directory for ld.so is useless in any kernel. 2015-08-21 02:35:52 +00:00
uebayasi
185745d477 Indent with 2 spaces. 2015-08-20 07:00:48 +00:00
skrll
6e61a7832e Use IPL_VM for dwc2_intr and mark as MP safe where possible. 2015-07-30 07:32:40 +00:00
macallan
65192539f3 add instruction cache throttling SPR found on 750 2015-07-07 15:41:46 +00:00
matt
39f572033f Don't clear PSL_FP/PSL_VEC 2015-07-06 05:55:37 +00:00
matt
c1ada760b2 Remove PSL_SPV from BOOKE PSL_USERMOD 2015-07-06 05:36:26 +00:00
matt
7579c67f0d Back out last change. Clearing PSL_FP/PSL_VEC is handled by child_return. 2015-07-06 05:25:29 +00:00
matt
015ba04636 Don't preserve PSL_FP/PSL_VEC in cpu_setmcontext. 2015-07-06 05:20:50 +00:00
matt
5e93a4a116 Clear PSL_FP/PSL_VEC so the lwp won't think it owns them. 2015-07-06 05:03:56 +00:00
matt
6efc5a99e0 Don't reload if just re-enabling 2015-07-06 02:43:26 +00:00
matt
0b2dfc7366 Add a check to make sure that if PSL_FP is set, we own the FPU. 2015-07-06 02:30:22 +00:00
matt
fbdad514b8 Don't reload the FPU register if this is just a re-enable. 2015-07-06 01:55:50 +00:00
matt
7be314e397 Make _BSD_CLOCK_T_ unsigned int so it's the same for IPL32 and LP64
environments.  We don't really have a powerpc64 native userland
and the mips64 native userland is IPL32 so this shouldn't affect anything.
2015-06-17 13:52:51 +00:00
matt
d8c167db5e This needs to define PRIxPTE too. 2015-06-16 06:51:16 +00:00
matt
a74e1552fa Add PRIxPTE and pte_value(pt_entry_t) for printing the value of a PTE.
Add pte_zero_p(pt_entry_t) to check that a PTE has been zeroed.
2015-06-11 08:01:50 +00:00
pgoyette
37202cb966 Update device dependency information - the sysmon major device now depends on the sysmon module itself, not on the individual components. 2015-04-23 23:22:51 +00:00
jmcneill
6c00453054 __HAVE_PREEEMPTION -> __HAVE_PREEMPTION 2015-04-14 22:36:53 +00:00
matt
a0e8cd6797 forgot to commit this when I updated netbsd64 in gcc.
Remove LP64 specific change and use the same types
when possible for IPL32 and LP64.
2015-04-01 23:31:37 +00:00
nonaka
302cbb59af Enable DMA transfer. 2015-02-27 16:09:05 +00:00
nonaka
a5303a68a6 Added some register definitions for multi-queue. 2015-02-26 02:27:40 +00:00
nonaka
2f9de799ff fix offset value of RBASEn. 2015-02-26 02:21:38 +00:00
joerg
9642a6c30f Use default PAGER_MAP_DEFAULT_SIZE for ARM and PowerPC, exception
acorn26. This bumps the KVA reservation from 4MB to 16MB and avoids
long hangs on my Cubietruck under IO. acorn26 is kept as it does have a
ridiculous low 32MB KVA limit.
2015-02-23 20:34:37 +00:00
nonaka
e91ada0139 fix compile failure without DIAGNOSTIC. 2015-02-19 08:59:56 +00:00
nonaka
6e15a820ba Added Interrupt coalescing support. 2015-02-17 01:53:21 +00:00
nonaka
3012a05a13 Avoid race condition between PTE update and TLB miss walk. 2015-01-26 04:47:53 +00:00
nonaka
c74a9088fe Initialize timer DR. 2015-01-23 09:02:42 +00:00
nonaka
ef2e796f06 ddb MP support 2015-01-23 07:27:05 +00:00