Commit Graph

31964 Commits

Author SHA1 Message Date
Joel Sherrill
b3693f5d6d bsps/sparc/include/bsp/gradcdac.h: Fix nested comment warning 2018-08-10 08:24:28 -05:00
Joel Sherrill
d071d9a17a qoriq/include/tm27.h: Fix prototype warning 2018-08-10 08:24:28 -05:00
Joel Sherrill
ebd19374c5 motorola_powerpc/include/tm27.h: Fix prototype warning 2018-08-10 08:24:28 -05:00
Joel Sherrill
3cff531fa0 bsps/powerpc/include/mpc83xx/mpc83xx.h: Fix nested comment warning 2018-08-10 08:24:28 -05:00
Joel Sherrill
5896da452c bsps/powerpc/include/bsp/tictac.h: Fix protototype warnings 2018-08-10 08:24:27 -05:00
Joel Sherrill
ae4fbf3b4f gen83xx/include/tm27.h: Fix prototype warning 2018-08-10 08:24:27 -05:00
Joel Sherrill
ec8c955d3e gen5200/include/tm27.h: Fix prototype warning 2018-08-10 08:24:27 -05:00
Joel Sherrill
7de5182999 gen5200/include/bsp/ata.h: Fix warning 2018-08-10 08:24:27 -05:00
Joel Sherrill
0fc87d4785 csb337/include/at91rm9200_dbgu.h: Fix nested comment warning 2018-08-10 08:24:26 -05:00
Sebastian Huber
b2de4260c5 score: Fix _Addresses_Subtract()
Use architecture-specific integer type for an address difference.

Update #3486.
2018-08-10 07:14:43 +02:00
Sebastian Huber
66cb142054 rtems: Parameter types in rtems_partition_create()
Use uintptr_t to specify the length of the partition buffer area instead
of uint32_t.  This is in line with rtems_region_create().  On 64-bit
targets, the length may exceed 4GiB.  Use size_t for the buffer size,
since on some targets the single object size is less than the overall
address range, e.g. m32c sizeof(uintptr_t) > sizeof(size_t).

Update #3486.
2018-08-10 07:14:43 +02:00
Sebastian Huber
b8eae1403a Add dummy PRI_MIN_KERN to <sys/priority.h>
Update #3472.
2018-08-10 07:14:43 +02:00
Sebastian Huber
0e6f7dc4c4 bsps/sparc: Fix external variable declarations 2018-08-10 07:14:43 +02:00
Sebastian Huber
f4424cfb49 bsps/sparc: Move polled APBUART functions
This reduces the link-time dependencies and avoids copy-and-paste.
2018-08-10 07:14:43 +02:00
Sebastian Huber
aac36d153a posix: Add configure check for mprotect()
Update #3491.
2018-08-10 07:14:43 +02:00
Christian Mauderer
8e6cfccf8c bsp/atsam: Fix handling of slow SPI speeds.
This patch fixes an overflow in the frequency calculation of the SPI
driver for slow SPI speeds.
2018-08-09 08:37:38 +02:00
Sebastian Huber
71948f76fa sys/event.h: Update version FreeBSD tag
Update #3472.
2018-08-08 08:15:17 +02:00
dab
ac824fffa0 Make the definition of struct kevent in event.h match what the man page for kevent(2) says.
This is a trivial comment-only fix. The man page for kevent(2) gives
the definition of struct kevent, including a comment on each
field. The actual definition in sys/event.h omitted the comments on
some fields. Add the comments in. Not only does this make the man page
and include file agree, but the comments are useful in and of
themselves.

Reviewed by:	kib (D15778: commented that this should be a separate commit)
MFC after:	3 days
Sponsored by:	Dell EMC
2018-08-08 08:15:17 +02:00
dab
96b32773e4 Address some (although not all) style(9) issues in event.h after r335776.
Reported by:	bde@
MFC after:	1 day
Sponsored by:	Dell EMC
2018-08-08 08:15:17 +02:00
dab
1d00acb1c9 Fix compilation error in r335765 under gcc 4.2.1.
The anonymous object initialization introduced in r335765 was
acceptable to clang, but not gcc 4.2.1. Fix it for both.

Reported by:	jhibbits@
Pointy Hat:	myself
MFC after:	1 week
X-MFC-with:	r335765
Sponsored by:	Dell EMC
2018-08-08 08:15:17 +02:00
dab
b37ef68873 Remove potential identifier conflict in the EV_SET macro.
PR43905 pointed out a problem with the EV_SET macro if the passed
struct kevent pointer were specified with an expression with side
effects (e.g., "kevp++"). This was fixed in rS110241, but by using a
local block that defined an internal variable (named "kevp") to get
the pointer value once. This worked, but could cause issues if an
existing variable named "kevp" is in scope. To avoid that issue,
jilles@ pointed out that "C99 compound literals and designated
initializers allow doing this cleanly using a macro". This change
incorporates that suggestion, essentially verbatim from jilles@
comment on PR43905, except retaining the old definition for pre-C99 or
non-STDC (e.g., C++) compilers.

PR:	43905
Submitted by:	Jilles Tjoelker (jilles@)
Reported by:	Lamont Granquist <lamont@scriptkiddie.org>
Reviewed by:	jmg (no comments), jilles
MFC after:	1 week
Sponsored by:	Dell EMC
Differential Revision:	https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=43905
2018-08-08 08:15:17 +02:00
pfg
bf026dd452 sys/sys: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
2018-08-08 08:15:17 +02:00
jhb
57c03363c8 Decode kevent structures logged via ktrace(2) in kdump.
- Add a new KTR_STRUCT_ARRAY ktrace record type which dumps an array of
  structures.

  The structure name in the record payload is preceded by a size_t
  containing the size of the individual structures.  Use this to
  replace the previous code that dumped the kevent arrays dumped for
  kevent().  kdump is now able to decode the kevent structures rather
  than dumping their contents via a hexdump.

  One change from before is that the 'changes' and 'events' arrays are
  not marked with separate 'read' and 'write' annotations in kdump
  output.  Instead, the first array is the 'changes' array, and the
  second array (only present if kevent doesn't fail with an error) is
  the 'events' array.  For kevent(), empty arrays are denoted by an
  entry with an array containing zero entries rather than no record.

- Move kevent decoding tables from truss to libsysdecode.

  This adds three new functions to decode members of struct kevent:
  sysdecode_kevent_filter, sysdecode_kevent_flags, and
  sysdecode_kevent_fflags.

  kdump uses these helper functions to pretty-print kevent fields.

- Move structure definitions for freebsd11 and freebsd32 kevent
  structures to <sys/event.h> so that they can be shared with userland.
  The 32-bit structures are only exposed if _WANT_KEVENT32 is defined.
  The freebsd11 structures are only exposed if _WANT_FREEBSD11_KEVENT is
  defined.  The 32-bit freebsd11 structure requires both.

- Decode freebsd11 kevent structures in truss for the compat11.kevent()
  system call.

- Log 32-bit kevent structures via ktrace for 32-bit compat kevent()
  system calls.

- While here, constify the 'void *data' argument to ktrstruct().

Reviewed by:	kib (earlier version)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D12470
2018-08-08 08:15:17 +02:00
kib
e9b708ab2a Add abstime kqueue(2) timers and expand struct kevent members.
This change implements NOTE_ABSTIME flag for EVFILT_TIMER, which
specifies that the data field contains absolute time to fire the
event.

To make this useful, data member of the struct kevent must be extended
to 64bit.  Using the opportunity, I also added ext members.  This
changes struct kevent almost to Apple struct kevent64, except I did
not changed type of ident and udata, the later would cause serious API
incompatibilities.

The type of ident was kept uintptr_t since EVFILT_AIO returns a
pointer in this field, and e.g. CHERI is sensitive to the type
(discussed with brooks, jhb).

Unlike Apple kevent64, symbol versioning allows us to claim ABI
compatibility and still name the new syscall kevent(2).  Compat shims
are provided for both host native and compat32.

Requested by:	bapt
Reviewed by:	bapt, brooks, ngie (previous version)
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D11025
2018-08-08 08:15:17 +02:00
pkelsey
f51aec82aa Fix typo.
hist -> hint

MFC after:	3 days
2018-08-08 08:15:16 +02:00
Sebastian Huber
fd27bae5b9 CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE
Make CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE configurable by the user.

Update #3434.
2018-08-08 08:15:13 +02:00
Sebastian Huber
97417bb15f tests: Remove CONFIGURE_MAXIMUM_DRIVERS
This configuration is superfluous in these tests.
2018-08-07 07:37:59 +02:00
Sebastian Huber
0b038bd48b libblock: Add RTEMS_DEPRECATED
Close #3358.
2018-08-07 07:17:19 +02:00
Sebastian Huber
b152d33ba5 fileio: Avoid deprecated rtems_disk_obtain()
Update #3358.
2018-08-07 07:17:19 +02:00
Sebastian Huber
ab96aec60a dosfs: Avoid deprecated routine
Update #3358.
2018-08-07 07:17:18 +02:00
Sebastian Huber
dd66fda397 tests: Avoid deprecated rtems_disk_io_initialize()
Update #3358.
2018-08-07 07:17:18 +02:00
Sebastian Huber
1836c6a456 bsp/gen5200: Avoid deprecated routine
Update #3358.
2018-08-07 07:17:18 +02:00
Sebastian Huber
f7cecc3308 libchip/ata: Use rtems_blkdev_create()
Update #3358.
2018-08-07 07:17:18 +02:00
Sebastian Huber
698093d68d libblock: Use rtems_blkdev_create_partition()
Update #3358.
2018-08-07 07:17:18 +02:00
Sebastian Huber
bf80279025 libtests/block15: Use rtems_blkdev_create()
Update #3358.
2018-08-07 07:17:18 +02:00
Sebastian Huber
fa12e06d33 libtests/block14: Use rtems_blkdev_create()
Update #3358.
2018-08-07 07:17:18 +02:00
Sebastian Huber
3278d20200 libtests/block13: Use rtems_blkdev_create()
Update #3358.
2018-08-07 07:17:18 +02:00
Sebastian Huber
5e4bab7769 libtests/block12: Use rtems_blkdev_create()
Update #3358.
2018-08-07 07:17:18 +02:00
Sebastian Huber
6f34f1391e libtests/block10: Use rtems_blkdev_create()
Update #3358.
2018-08-07 07:17:17 +02:00
Sebastian Huber
5005bfcccd libtests/block09: Use rtems_blkdev_create()
Update #3358.
2018-08-07 07:17:17 +02:00
Sebastian Huber
117f7b1f67 libtests/block08: Use rtems_blkdev_create()
Update #3358.
2018-08-07 07:17:17 +02:00
Sebastian Huber
bde8be291e libtests/block06: Use rtems_blkdev_create()
Update #3358.
2018-08-07 07:17:17 +02:00
Sebastian Huber
678277132b libtests/block05: Avoid uninitialized variable
Update #3358.
2018-08-07 07:17:17 +02:00
Sebastian Huber
d279e747a7 bsp/smdk2410: Use rtems_blkdev_create()
Update #3358.
2018-08-07 07:17:17 +02:00
Sebastian Huber
1dec54f90c bsps/lm32: Use rtems_blkdev_create()
Update #3358.
2018-08-07 07:17:17 +02:00
Sebastian Huber
0fe7133d6e flashdisk: Use rtems_blkdev_create()
Update #3358.
2018-08-07 07:17:17 +02:00
Sebastian Huber
16f3f107bc nvdisk: Use rtems_blkdev_create()
Update #3358.
2018-08-07 07:17:16 +02:00
Sebastian Huber
24b94c4771 ramdisk: Use rtems_blkdev_create()
Update #3358.
2018-08-07 07:17:16 +02:00
Sebastian Huber
d56e68bb8b rfs: Remove erroneous call of rtems_disk_release()
The function rtems_rfs_buffer_sync() erroneously calls
rtems_disk_release(). This screws up the reference counting of the disk.

Close #3484.
2018-08-07 07:17:11 +02:00
Sebastian Huber
32ccc016d8 bsps: Fix the generic IRQ support
The genmcf548x partly uses is own implementation of the interrupt
extension API for libbsd support.

This patch is a part of the BSP source reorganization.

Update #3285.
2018-08-03 14:14:19 +02:00