[HLSL] Remove support for user-defined constructors and destructors (#193375)
This change removes the support for user-defined constructors and
destructors.
Authored-by: Sarah Spall <sarahspall at microsoft.com>
Related to #185466
[libc][math] Refactor ddiv family to header-only (#182149)
Refactors the ddiv math family to be header-only.
Closes https://github.com/llvm/llvm-project/issues/182148
Target Functions:
- ddivf128
- ddivl
acpi_apm: Narrow scope of ACPI_LOCK
This lock doesn't need to be held across seldrain/knlist_destroy. It
is also redundant (and a bug) to hold it across knlist_add and
knlist_remove since it is the mutex for the knlist.
PR: 293901
Reported by: Jiaming Zhang <r772577952 at gmail.com>
Reviewed by: markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D55994
(cherry picked from commit cc2715cf1f864345ab175db691d4e152d5fb84af)
acpi_apm: Don't recurse on ACPI_LOCK in apmreadfilt
The lock is already held by the caller since it is used as the knlist
lock.
PR: 293901
Reported by: Jiaming Zhang <r772577952 at gmail.com>
Fixes: cc2715cf1f86 ("acpi_apm: Narrow scope of ACPI_LOCK")
(cherry picked from commit 8c941e313e3925b17e49b093244c159db7a112f8)
LinuxKPI: Fix simple_read_from_buffer for zero-size and off-the-end reads
I noticed that the buf_size < 0 check can never be true (it's a
size_t) and decided to check for this condition by an alternate
expression, and I also noticed that a read_size of 0 would incorrectly
return -EFAULT. Instead, return success for both of these cases as
reading beyond the EOF of a normal file also returns EOF, not EINVAL.
Reviewed by: bz
Sponsored by: AFRL, DARPA
Differential Revision: https://reviews.freebsd.org/D55845
(cherry picked from commit 2353fa1aca553883141a7b5d0aa54312a4610412)
lindebugfs: Pass user buffer pointers to the read/write file operations
The Linux file_operations API expects the read and write operations
to take a single user buffer pointer (along with the length and the
file offset as an in/out parameter).
However, the debugfs_fill function was violating this part of the
contract as it was passing down kernel pointers instead. An earlier
commit (5668c22a13c6befa9b8486387d38457c40ce7af4) hacked around this
by modifying simple_read_from_buffer() to treat its user pointer
argument as a kernel pointer instead. However, other commits keep
tripping over this same API mismatch
(e.g. 78e25e65bf381303c8bdac9a713ab7b26a854b8c passes a kernel pointer
to copy_from_user in fops_str_write).
Instead, change debugfs_fill to use the "raw" pseudofs mode where the
uio is passed down to directly to the fill callback rather than an
sbuf. debufs_fill now iterates over the iovec in the uio similar to
the implementation of uiomove invoking the read or write operation on
[26 lines not shown]
LinuxKPI: Clear the sbuf at the start of each call to seq_read
Each invocation of seq_read invokes the seq_file.show callback which
writes into the sbuf. Then it invokes sbuf_finish before copying the
data into the caller's buffer. Without this, a second call to
seq_read on the same file would try to append data to a finished sbuf.
Reviewed by: bz
Sponsored by: AFRL, DARPA
(cherry picked from commit c181c8f5ca707962359e636ca5aa536e60147eee)
pciconf: Add a tree mode
This lists PCI devices in a hierarchy showing the parent/child
relationship of PCI devices and bridges. While this is inspired by
lspci -t output, the format is closer to ps -d and also prefers using
new-bus device names when possible. If a device does not have a
driver, the PCI selector is output in place of the device name.
When the -v flag is given, the vendor and device ID strings are output
after the device name. If a string for an ID isn't found, the hex ID
values are output instead.
Reviewed by: imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D55774
(cherry picked from commit 14b8a27883c15d3add3114f855eff7c6bda1b015)
[llvm] Introduce TargetInfo (#190730)
This PR introduces ABIInfo and TargetCodeGenInfo, the abstract ABI
lowering layer for the LLVM ABI library introduced in #158329.
This is a direct parallel to clang::ABIInfo and
clang::TargetCodeGenInfo, but operating entirely on the llvm::abi type
system rather than Clang's AST, keeping ABI logic independent of the
frontend. It is a prerequisite for implementing the target specific
lowering passes that lower FunctionInfo to LLVM IR calling conventions.
Co-authored-by: Nikita Popov <npopov at redhat.com>
[flang] [flang-rt] Implement AT edit descriptor for Fortran 202X with appropriate handling and tests (#189157)
This PR is to add AT edit descriptor, a new feature of Fortran 2023, 5.1
US 10.
AT is like A (character output) but trims trailing blanks before
emitting the string. AT is functionally the same as TRIM intrinsic.
AT is treated as a variant of A during parse. The trimming of the
trailing spaces are implemented the same as TRIM(). There exists a
method, LenTrim, that can be used to do the trimming. However it's local
to a different .cpp file, character.cpp. And the code is so simple that
no need to make extra effort to use LenTrim.
AT is output only and do not accept width.
This PR will fix #181379.
pciconf.8: Reorganize slightly to handle additional modes
Move the description of the optional device argument earlier before
describing individual command modes.
Add a subsection for list mode and a second subsection for the other
modes that work with a single device.
Reviewed by: imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D55773
(cherry picked from commit 98a0d2283701e08353ce670c8023803c58a4994c)
pci: Export bus numbers for bridge devices in struct pci_conf
This exports bus information about bridges to userspace via the
less-privileged PCIOCGETCONF ioctl. Previously if userspace wished to
query this information, it had to use direct PCI config register
access which requires higher privilege.
Reviewed by: imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D55771
(cherry picked from commit 7e7a1b61531a29b4a0a5cdac66b96f420e6c66e4)
pci.4: Quote argument to -width for a list block
This fixes an mdoc warning and also properly indents this list. While
here, update the quoted argument to be the longest tag in the list.
Also while here, correct the description of pd_numa_domain. NUMA
domains are a property of the device, not of the driver.
Reviewed by: ziaee, imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D55770
(cherry picked from commit c3ac5f14c8b330c036149d1d24cd3369d1418de2)
pciconf: Factor out fetching of matching devices from list_devs
The new fetch_devs function fetches the entire list of PCI devices
into a single list, retrying if the list changes while it is being
fetched.
Reviewed by: imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D55768
(cherry picked from commit 9eb035ff8439195f565b9e3180b727333a4e7170)
sys: Don't pass RF_ALLOCATED to bus_alloc_resource*
This is a nop as eventually these flags are passed to rman_reserve_resource
which unconditionally sets RF_ALLOCATED in the new flags for a region.
However, it's really a layering violation to use RF_ALLOCATED in relation
to struct resource objects outside of subr_rman.c as subr_rman.c uses
this flag to manage it's internal tracking of allocated vs free regions.
In addition, don't document this as a valid flag in the manual. I
think the intention here was that if a caller didn't want to pass
RF_ACTIVE or RF_SHAREABLE, they could pass RF_ALLOCATED instead of 0,
but given the layering violation, I think it's best to just pass 0
instead in that case.
NB: The bhnd bus uses RF_ALLOCATED (along with RF_ACTIVE) in a
separate API to manage resource regions that are not struct resource
objects (but a separate wrapper object). It would perhaps be cleaner
if the chipc_retain_region and chipc_release_region functions used
their own flag constants instead of reusing the rman(9) flags.
[5 lines not shown]
devinfo: Support PCI DBSF and ACPI handles for -p
When matching on a name of a device, match on ACPI handles and PCI
selectors in addition to device names. This can be useful for
matching on devices without an attached driver.
For example: devinfo -p pci0:0:31:0
Reviewed by: imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D55673
(cherry picked from commit ca25b1b26379e27bf2bab7742a7b383ca0bfc7d2)
libc/quad: fix missing closing #endif in Symbol.map
Without this lib32 libc.so.7 would be missing critical symbols,
including malloc / free and all syscall wrappers.
(cherry picked from commit 8dd28e13e41b6200e58d6e99981ff8323cff3711)
[NFC][Clang][ByteCode] Apply rule of three to Context and EvalIDScope (#193856)
Static analysis flagged these because they had destructor but did not
define copy constructor or copy assignment. For `EvalIDScope` I defined
them as deleted and was able to default the destructor for `Context`.
[CIR] Tolerate identical source and destination in cir.copy (#193852)
The SIBsim4 test in the llvm-test-suite MultiSource tests has code that
initializes a structure with itself. This was triggering a CIR
verifcation error because we were checking for source and destination
addresses matching. Since Clang allows this, this change is updating the
cir.copy operation to allow it.