mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-08 20:26:31 +00:00
Compare commits
1 Commits
f3e6a4cbc8
...
7d02f8eee5
Author | SHA1 | Date | |
---|---|---|---|
|
7d02f8eee5 |
|
@ -54,7 +54,7 @@ pio2_2t = 2.0670321098263988236496903051604844e-43L, /* 0x127044533e63a0105df5
|
||||||
pio2_3 = 2.0670321098263988236499468110329591e-43L, /* 0x127044533e63a0105e00000000000.0p-254 */
|
pio2_3 = 2.0670321098263988236499468110329591e-43L, /* 0x127044533e63a0105e00000000000.0p-254 */
|
||||||
pio2_3t = -2.5650587247459238361625433492959285e-65L; /* -0x159c4ec64ddaeb5f78671cbfb2210.0p-327 */
|
pio2_3t = -2.5650587247459238361625433492959285e-65L; /* -0x159c4ec64ddaeb5f78671cbfb2210.0p-327 */
|
||||||
|
|
||||||
static __always_inline int
|
static inline __always_inline int
|
||||||
__ieee754_rem_pio2l(long double x, long double *y)
|
__ieee754_rem_pio2l(long double x, long double *y)
|
||||||
{
|
{
|
||||||
union IEEEl2bits u,u1;
|
union IEEEl2bits u,u1;
|
||||||
|
|
|
@ -444,7 +444,7 @@ struct ld {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef STRUCT_RETURN
|
#ifdef STRUCT_RETURN
|
||||||
static __always_inline void
|
static inline __always_inline void
|
||||||
k_logl(long double x, struct ld *rp)
|
k_logl(long double x, struct ld *rp)
|
||||||
#else
|
#else
|
||||||
long double
|
long double
|
||||||
|
|
|
@ -66,7 +66,7 @@ pio2_2t = 6.36831716351095013979e-25L, /* 0xc51701b839a25205.0p-144 */
|
||||||
pio2_3t = -2.75299651904407171810e-37L; /* -0xbb5bf6c7ddd660ce.0p-185 */
|
pio2_3t = -2.75299651904407171810e-37L; /* -0xbb5bf6c7ddd660ce.0p-185 */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static __always_inline int
|
static inline __always_inline int
|
||||||
__ieee754_rem_pio2l(long double x, long double *y)
|
__ieee754_rem_pio2l(long double x, long double *y)
|
||||||
{
|
{
|
||||||
union IEEEl2bits u,u1;
|
union IEEEl2bits u,u1;
|
||||||
|
|
|
@ -444,7 +444,7 @@ struct ld {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef STRUCT_RETURN
|
#ifdef STRUCT_RETURN
|
||||||
static __always_inline void
|
static inline __always_inline void
|
||||||
k_logl(long double x, struct ld *rp)
|
k_logl(long double x, struct ld *rp)
|
||||||
#else
|
#else
|
||||||
long double
|
long double
|
||||||
|
|
|
@ -45,7 +45,7 @@ pio2_3 = 2.02226624871116645580e-21, /* 0x3BA3198A, 0x2E000000 */
|
||||||
pio2_3t = 8.47842766036889956997e-32; /* 0x397B839A, 0x252049C1 */
|
pio2_3t = 8.47842766036889956997e-32; /* 0x397B839A, 0x252049C1 */
|
||||||
|
|
||||||
#ifdef INLINE_REM_PIO2
|
#ifdef INLINE_REM_PIO2
|
||||||
static __always_inline
|
static __inline __always_inline
|
||||||
#endif
|
#endif
|
||||||
int
|
int
|
||||||
__ieee754_rem_pio2(double x, double *y)
|
__ieee754_rem_pio2(double x, double *y)
|
||||||
|
|
|
@ -38,7 +38,7 @@ pio2_1 = 1.57079631090164184570e+00, /* 0x3FF921FB, 0x50000000 */
|
||||||
pio2_1t = 1.58932547735281966916e-08; /* 0x3E5110b4, 0x611A6263 */
|
pio2_1t = 1.58932547735281966916e-08; /* 0x3E5110b4, 0x611A6263 */
|
||||||
|
|
||||||
#ifdef INLINE_REM_PIO2F
|
#ifdef INLINE_REM_PIO2F
|
||||||
static __always_inline
|
static __inline __always_inline
|
||||||
#endif
|
#endif
|
||||||
int
|
int
|
||||||
__ieee754_rem_pio2f(float x, double *y)
|
__ieee754_rem_pio2f(float x, double *y)
|
||||||
|
|
|
@ -64,7 +64,6 @@ static char *mod_searchmodule(char *name, struct mod_depend *verinfo);
|
||||||
static char * mod_searchmodule_pnpinfo(const char *bus, const char *pnpinfo);
|
static char * mod_searchmodule_pnpinfo(const char *bus, const char *pnpinfo);
|
||||||
static void file_insert_tail(struct preloaded_file *mp);
|
static void file_insert_tail(struct preloaded_file *mp);
|
||||||
static void file_remove(struct preloaded_file *fp);
|
static void file_remove(struct preloaded_file *fp);
|
||||||
static void file_remove_tail(struct preloaded_file *fp);
|
|
||||||
struct file_metadata* metadata_next(struct file_metadata *base_mp, int type);
|
struct file_metadata* metadata_next(struct file_metadata *base_mp, int type);
|
||||||
static void moduledir_readhints(struct moduledir *mdp);
|
static void moduledir_readhints(struct moduledir *mdp);
|
||||||
static void moduledir_rebuild(void);
|
static void moduledir_rebuild(void);
|
||||||
|
@ -877,7 +876,7 @@ mod_loadkld(const char *kldname, int argc, char *argv[])
|
||||||
file_insert_tail(fp); /* Add to the list of loaded files */
|
file_insert_tail(fp); /* Add to the list of loaded files */
|
||||||
if (file_load_dependencies(fp) != 0) {
|
if (file_load_dependencies(fp) != 0) {
|
||||||
err = ENOENT;
|
err = ENOENT;
|
||||||
file_remove_tail(fp);
|
file_remove(fp);
|
||||||
loadaddr = loadaddr_saved;
|
loadaddr = loadaddr_saved;
|
||||||
fp = NULL;
|
fp = NULL;
|
||||||
break;
|
break;
|
||||||
|
@ -1638,45 +1637,25 @@ file_insert_tail(struct preloaded_file *fp)
|
||||||
* Remove module from the chain
|
* Remove module from the chain
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
file_remove_impl(struct preloaded_file *fp, bool keep_tail)
|
file_remove(struct preloaded_file *fp)
|
||||||
{
|
{
|
||||||
struct preloaded_file *cm, *next;
|
struct preloaded_file *cm;
|
||||||
|
|
||||||
if (preloaded_files == NULL)
|
if (preloaded_files == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (keep_tail)
|
|
||||||
next = fp->f_next;
|
|
||||||
else
|
|
||||||
next = NULL;
|
|
||||||
|
|
||||||
if (preloaded_files == fp) {
|
if (preloaded_files == fp) {
|
||||||
preloaded_files = next;
|
preloaded_files = fp->f_next;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (cm = preloaded_files; cm->f_next != NULL; cm = cm->f_next) {
|
for (cm = preloaded_files; cm->f_next != NULL; cm = cm->f_next) {
|
||||||
if (cm->f_next == fp) {
|
if (cm->f_next == fp) {
|
||||||
cm->f_next = next;
|
cm->f_next = fp->f_next;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
file_remove(struct preloaded_file *fp)
|
|
||||||
{
|
|
||||||
|
|
||||||
file_remove_impl(fp, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
file_remove_tail(struct preloaded_file *fp)
|
|
||||||
{
|
|
||||||
|
|
||||||
file_remove_impl(fp, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
moduledir_fullpath(struct moduledir *mdp, const char *fname)
|
moduledir_fullpath(struct moduledir *mdp, const char *fname)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2024 Arm Ltd
|
* Copyright (c) 2014 ARM Ltd
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
@ -27,5 +27,157 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __ARM_ARCH
|
#ifndef __ARM_ARCH
|
||||||
#error Your compiler is too old
|
|
||||||
#endif
|
/* ACLE standardises a set of pre-defines that describe the ARM architecture.
|
||||||
|
These were mostly implemented in GCC around GCC-4.8; older versions
|
||||||
|
have no, or only partial support. To provide a level of backwards
|
||||||
|
compatibility we try to work out what the definitions should be, given
|
||||||
|
the older pre-defines that GCC did produce. This isn't complete, but
|
||||||
|
it should be enough for use by routines that depend on this header. */
|
||||||
|
|
||||||
|
/* No need to handle ARMv8, GCC had ACLE support before that. */
|
||||||
|
|
||||||
|
#define __ARM_ACLE 101
|
||||||
|
|
||||||
|
# ifdef __ARM_ARCH_7__
|
||||||
|
/* The common subset of ARMv7 in all profiles. */
|
||||||
|
# define __ARM_ARCH 7
|
||||||
|
# define __ARM_ARCH_ISA_THUMB 2
|
||||||
|
# define __ARM_FEATURE_CLZ
|
||||||
|
# define __ARM_FEATURE_LDREX 7
|
||||||
|
# define __ARM_FEATURE_UNALIGNED
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# if defined (__ARM_ARCH_7A__) || defined (__ARM_ARCH_7R__)
|
||||||
|
# define __ARM_ARCH 7
|
||||||
|
# define __ARM_ARCH_ISA_THUMB 2
|
||||||
|
# define __ARM_ARCH_ISA_ARM
|
||||||
|
# define __ARM_FEATURE_CLZ
|
||||||
|
# define __ARM_FEATURE_SIMD32
|
||||||
|
# define __ARM_FEATURE_DSP
|
||||||
|
# define __ARM_FEATURE_QBIT
|
||||||
|
# define __ARM_FEATURE_SAT
|
||||||
|
# define __ARM_FEATURE_LDREX 15
|
||||||
|
# define __ARM_FEATURE_UNALIGNED
|
||||||
|
# ifdef __ARM_ARCH_7A__
|
||||||
|
# define __ARM_ARCH_PROFILE 'A'
|
||||||
|
# else
|
||||||
|
# define __ARM_ARCH_PROFILE 'R'
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# ifdef __ARM_ARCH_7EM__
|
||||||
|
# define __ARM_ARCH 7
|
||||||
|
# define __ARM_ARCH_ISA_THUMB 2
|
||||||
|
# define __ARM_FEATURE_CLZ
|
||||||
|
# define __ARM_FEATURE_SIMD32
|
||||||
|
# define __ARM_FEATURE_DSP
|
||||||
|
# define __ARM_FEATURE_QBIT
|
||||||
|
# define __ARM_FEATURE_SAT
|
||||||
|
# define __ARM_FEATURE_LDREX 7
|
||||||
|
# define __ARM_FEATURE_UNALIGNED
|
||||||
|
# define __ARM_ARCH_PROFILE 'M'
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# ifdef __ARM_ARCH_7M__
|
||||||
|
# define __ARM_ARCH 7
|
||||||
|
# define __ARM_ARCH_ISA_THUMB 2
|
||||||
|
# define __ARM_FEATURE_CLZ
|
||||||
|
# define __ARM_FEATURE_QBIT
|
||||||
|
# define __ARM_FEATURE_SAT
|
||||||
|
# define __ARM_FEATURE_LDREX 7
|
||||||
|
# define __ARM_FEATURE_UNALIGNED
|
||||||
|
# define __ARM_ARCH_PROFILE 'M'
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# ifdef __ARM_ARCH_6T2__
|
||||||
|
# define __ARM_ARCH 6
|
||||||
|
# define __ARM_ARCH_ISA_THUMB 2
|
||||||
|
# define __ARM_ARCH_ISA_ARM
|
||||||
|
# define __ARM_FEATURE_CLZ
|
||||||
|
# define __ARM_FEATURE_SIMD32
|
||||||
|
# define __ARM_FEATURE_DSP
|
||||||
|
# define __ARM_FEATURE_QBIT
|
||||||
|
# define __ARM_FEATURE_SAT
|
||||||
|
# define __ARM_FEATURE_LDREX 4
|
||||||
|
# define __ARM_FEATURE_UNALIGNED
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# ifdef __ARM_ARCH_6M__
|
||||||
|
# define __ARM_ARCH 6
|
||||||
|
# define __ARM_ARCH_ISA_THUMB 1
|
||||||
|
# define __ARM_ARCH_PROFILE 'M'
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# if defined (__ARM_ARCH_6__) || defined (__ARM_ARCH_6J__) \
|
||||||
|
|| defined (__ARM_ARCH_6K__) || defined (__ARM_ARCH_6Z__) \
|
||||||
|
|| defined (__ARM_ARCH_6ZK__)
|
||||||
|
# define __ARM_ARCH 6
|
||||||
|
# define __ARM_ARCH_ISA_THUMB 1
|
||||||
|
# define __ARM_ARCH_ISA_ARM
|
||||||
|
# define __ARM_FEATURE_CLZ
|
||||||
|
# define __ARM_FEATURE_SIMD32
|
||||||
|
# define __ARM_FEATURE_DSP
|
||||||
|
# define __ARM_FEATURE_QBIT
|
||||||
|
# define __ARM_FEATURE_SAT
|
||||||
|
# define __ARM_FEATURE_UNALIGNED
|
||||||
|
# ifndef __thumb__
|
||||||
|
# if defined (__ARM_ARCH_6K__) || defined (__ARM_ARCH_6ZK__)
|
||||||
|
# define __ARM_FEATURE_LDREX 15
|
||||||
|
# else
|
||||||
|
# define __ARM_FEATURE_LDREX 4
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# if defined (__ARM_ARCH_5TE__) || defined (__ARM_ARCH_5E__)
|
||||||
|
# define __ARM_ARCH 5
|
||||||
|
# define __ARM_ARCH_ISA_ARM
|
||||||
|
# ifdef __ARM_ARCH_5TE__
|
||||||
|
# define __ARM_ARCH_ISA_THUMB 1
|
||||||
|
# endif
|
||||||
|
# define __ARM_FEATURE_CLZ
|
||||||
|
# define __ARM_FEATURE_DSP
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# if defined (__ARM_ARCH_5T__) || defined (__ARM_ARCH_5__)
|
||||||
|
# define __ARM_ARCH 5
|
||||||
|
# define __ARM_ARCH_ISA_ARM
|
||||||
|
# ifdef __ARM_ARCH_5TE__
|
||||||
|
# define __ARM_ARCH_ISA_THUMB 1
|
||||||
|
# endif
|
||||||
|
# define __ARM_FEATURE_CLZ
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# ifdef __ARM_ARCH_4T__
|
||||||
|
# define __ARM_ARCH 4
|
||||||
|
# define __ARM_ARCH_ISA_ARM
|
||||||
|
# define __ARM_ARCH_ISA_THUMB 1
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# ifdef __ARM_ARCH_4__
|
||||||
|
# define __ARM_ARCH 4
|
||||||
|
# define __ARM_ARCH_ISA_ARM
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# if defined (__ARM_ARCH_3__) || defined (__ARM_ARCH_3M__)
|
||||||
|
# define __ARM_ARCH 3
|
||||||
|
# define __ARM_ARCH_ISA_ARM
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# ifdef __ARM_ARCH_2__
|
||||||
|
# define __ARM_ARCH 2
|
||||||
|
# define __ARM_ARCH_ISA_ARM
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# ifdef __ARMEB__
|
||||||
|
# define __ARM_BIG_ENDIAN
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/* If we still don't know what the target architecture is, then we're
|
||||||
|
probably not using GCC. */
|
||||||
|
# ifndef __ARM_ARCH
|
||||||
|
# error Unable to determine architecture version.
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#endif /* __ARM_ARCH */
|
||||||
|
|
|
@ -4349,7 +4349,9 @@ calculate_iaq(struct adapter *sc, struct intrs_and_queues *iaq, int itype,
|
||||||
*/
|
*/
|
||||||
do {
|
do {
|
||||||
if (iaq->nrxq > 1) {
|
if (iaq->nrxq > 1) {
|
||||||
iaq->nrxq = rounddown_pow_of_two(iaq->nrxq - 1);
|
do {
|
||||||
|
iaq->nrxq--;
|
||||||
|
} while (!powerof2(iaq->nrxq));
|
||||||
if (iaq->nnmrxq > iaq->nrxq)
|
if (iaq->nnmrxq > iaq->nrxq)
|
||||||
iaq->nnmrxq = iaq->nrxq;
|
iaq->nnmrxq = iaq->nrxq;
|
||||||
}
|
}
|
||||||
|
|
|
@ -711,7 +711,7 @@ ext4_ext_tree_init(struct inode *ip)
|
||||||
|
|
||||||
ip->i_flag |= IN_E4EXTENTS;
|
ip->i_flag |= IN_E4EXTENTS;
|
||||||
|
|
||||||
memset(ip->i_data, 0, sizeof(ip->i_data));
|
memset(ip->i_data, 0, EXT2_NDADDR + EXT2_NIADDR);
|
||||||
ehp = (struct ext4_extent_header *)ip->i_data;
|
ehp = (struct ext4_extent_header *)ip->i_data;
|
||||||
ehp->eh_magic = htole16(EXT4_EXT_MAGIC);
|
ehp->eh_magic = htole16(EXT4_EXT_MAGIC);
|
||||||
ehp->eh_max = htole16(ext4_ext_space_root(ip));
|
ehp->eh_max = htole16(ext4_ext_space_root(ip));
|
||||||
|
|
|
@ -265,7 +265,7 @@
|
||||||
#define __malloc_like __attribute__((__malloc__))
|
#define __malloc_like __attribute__((__malloc__))
|
||||||
#define __pure __attribute__((__pure__))
|
#define __pure __attribute__((__pure__))
|
||||||
|
|
||||||
#define __always_inline __inline __attribute__((__always_inline__))
|
#define __always_inline __attribute__((__always_inline__))
|
||||||
#define __noinline __attribute__ ((__noinline__))
|
#define __noinline __attribute__ ((__noinline__))
|
||||||
#define __fastcall __attribute__((__fastcall__))
|
#define __fastcall __attribute__((__fastcall__))
|
||||||
#define __result_use_check __attribute__((__warn_unused_result__))
|
#define __result_use_check __attribute__((__warn_unused_result__))
|
||||||
|
|
|
@ -180,7 +180,6 @@ static __inline void
|
||||||
sched_unpin(void)
|
sched_unpin(void)
|
||||||
{
|
{
|
||||||
atomic_interrupt_fence();
|
atomic_interrupt_fence();
|
||||||
MPASS(curthread->td_pinned > 0);
|
|
||||||
curthread->td_pinned--;
|
curthread->td_pinned--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -315,6 +315,13 @@ dmar_ir_free_irte(struct dmar_unit *unit, u_int cookie)
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static u_int
|
||||||
|
clp2(u_int v)
|
||||||
|
{
|
||||||
|
|
||||||
|
return (powerof2(v) ? v : 1 << fls(v));
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
dmar_init_irt(struct dmar_unit *unit)
|
dmar_init_irt(struct dmar_unit *unit)
|
||||||
{
|
{
|
||||||
|
@ -332,7 +339,7 @@ dmar_init_irt(struct dmar_unit *unit)
|
||||||
"QI disabled, disabling interrupt remapping\n");
|
"QI disabled, disabling interrupt remapping\n");
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
unit->irte_cnt = roundup_pow_of_two(num_io_irqs);
|
unit->irte_cnt = clp2(num_io_irqs);
|
||||||
unit->irt = kmem_alloc_contig(unit->irte_cnt * sizeof(dmar_irte_t),
|
unit->irt = kmem_alloc_contig(unit->irte_cnt * sizeof(dmar_irte_t),
|
||||||
M_ZERO | M_WAITOK, 0, iommu_high, PAGE_SIZE, 0,
|
M_ZERO | M_WAITOK, 0, iommu_high, PAGE_SIZE, 0,
|
||||||
DMAR_IS_COHERENT(unit) ?
|
DMAR_IS_COHERENT(unit) ?
|
||||||
|
|
|
@ -1197,9 +1197,6 @@ ATF_TC_BODY(random_eor_and_waitall, tc)
|
||||||
size_t off;
|
size_t off;
|
||||||
int fd[2], eor;
|
int fd[2], eor;
|
||||||
|
|
||||||
if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false))
|
|
||||||
atf_tc_skip("https://bugs.freebsd.org/279994");
|
|
||||||
|
|
||||||
arc4random_buf(params.seed, sizeof(params.seed));
|
arc4random_buf(params.seed, sizeof(params.seed));
|
||||||
printf("Using seed:");
|
printf("Using seed:");
|
||||||
for (u_int i = 0; i < (u_int)sizeof(params.seed)/sizeof(u_short); i++)
|
for (u_int i = 0; i < (u_int)sizeof(params.seed)/sizeof(u_short); i++)
|
||||||
|
|
|
@ -4469,7 +4469,7 @@ main(int argc, char **argv)
|
||||||
if (fd == -1 && errno == ENOENT) {
|
if (fd == -1 && errno == ENOENT) {
|
||||||
saved_errno = errno;
|
saved_errno = errno;
|
||||||
retval = kldload("ctl");
|
retval = kldload("ctl");
|
||||||
if (retval != -1 || errno == EEXIST)
|
if (retval != -1)
|
||||||
fd = open(device, O_RDWR);
|
fd = open(device, O_RDWR);
|
||||||
else
|
else
|
||||||
errno = saved_errno;
|
errno = saved_errno;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user